36aa1146356fc4807bf6810b47d790ff5a8a6ad6
[external/binutils.git] / gdb / ChangeLog
1 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
2
3         * target-descriptions.c (tdesc_feature_p): Remove typedef.
4         (DEF_VEC_P (tdesc_feature_p)): Remove.
5         (struct target_desc) <features>: Change type to std::vector.
6         <~target_desc>: Replace with default implementation.
7         <accept>: Adjust.
8         <operator==>: Adjust.
9         (tdesc_has_registers): Adjust.
10         (tdesc_find_feature): Adjust.
11         (tdesc_use_registers): Adjust.
12         (tdesc_create_feature): Adjust.
13
14 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
15
16         * target-descriptions.c (arch_p): Remove typedef.
17         (DEF_VEC_P (arch_p)): Remove.
18         (struct target_desc) <compatible>: Change type to std::vector.
19         <~target_desc>: Don't manually free compatible.
20         (tdesc_compatible_p): Adjust.
21         (tdesc_add_compatible): Adjust.
22         (class print_c_tdesc) <visit_pre>: Adjust.
23
24 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
25
26         * target-descriptions.c (property_s): Remove typedef.
27         (DEF_VEC_O (property_s)): Remove.
28         (struct target_desc) <properties>: Make an std::vector.
29         <~target_desc>: Don't manually free properties.
30         (tdesc_property): Adjust.
31         (set_tdesc_property): Adjust.
32         (class print_c_tdesc) <visit_pre>: Adjust.
33
34 2017-12-05  Simon Marchi  <simon.marchi@ericsson.com>
35
36         * common/gdb_assert.h (gdb_static_assert): Redefine using
37         static_assert.
38
39 2017-12-05  Simon Marchi  <simon.marchi@ericsson.com>
40
41         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
42         unused variables.
43         (ada_is_redundant_range_encoding): Likewise.
44         * ada-varobj.c (ada_varobj_get_value_of_array_variable):
45         Likewise.
46         * alpha-tdep.c (alpha_software_single_step): Likewise.
47         * arm-tdep.c (_initialize_arm_tdep): Likewise.
48         * auto-load.c (info_auto_load_cmd): Likewise.
49         * break-catch-syscall.c (insert_catch_syscall): Likewise.
50         (remove_catch_syscall): Likewise.
51         * breakpoint.c (condition_completer): Likewise.
52         (clear_command): Likewise.
53         (update_breakpoint_locations): Likewise.
54         * btrace.c (btrace_disable): Likewise.
55         (btrace_teardown): Likewise.
56         (btrace_maint_update_pt_packets): Likewise.
57         (maint_btrace_clear_cmd): Likewise.
58         * cli/cli-decode.c (lookup_cmd_1): Likewise.
59         (lookup_cmd_composition): Likewise.
60         * cli/cli-dump.c (scan_filename): Likewise.
61         (restore_command): Likewise.
62         * compile/compile-loc2c.c (compute_stack_depth): Likewise.
63         * compile/compile-object-load.c (compile_object_load): Likewise.
64         * compile/compile-object-run.c (compile_object_run): Likewise.
65         * compile/compile.c (compile_to_object): Likewise.
66         * completer.c (filename_completer): Likewise.
67         (complete_files_symbols): Likewise.
68         (complete_expression): Likewise.
69         * corelow.c (core_open): Likewise.
70         * ctf.c (ctf_start): Likewise.
71         (ctf_write_status): Likewise.
72         (ctf_write_uploaded_tsv): Likewise.
73         (ctf_write_definition_end): Likewise.
74         (ctf_open_dir): Likewise.
75         (ctf_xfer_partial): Likewise.
76         (ctf_trace_find): Likewise.
77         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
78         Likewise.
79         * dwarf2loc.c (allocate_piece_closure): Likewise.
80         (indirect_pieced_value): Likewise.
81         (dwarf2_evaluate_loc_desc_full): Likewise.
82         * dwarf2read.c (dw2_expand_marked_cus): Likewise.
83         (dw2_expand_symtabs_matching): Likewise.
84         (dw2_map_symbol_filenames): Likewise.
85         (read_and_check_comp_unit_head): Likewise.
86         (read_cutu_die_from_dwo): Likewise.
87         (lookup_dwo_unit): Likewise.
88         (read_comp_units_from_section): Likewise.
89         (dwarf2_compute_name): Likewise.
90         (handle_DW_AT_stmt_list): Likewise.
91         (create_cus_hash_table): Likewise.
92         (create_dwp_v2_section): Likewise.
93         (dwarf2_rnglists_process): Likewise.
94         (dwarf2_ranges_process): Likewise.
95         (dwarf2_record_block_ranges): Likewise.
96         (is_vtable_name): Likewise.
97         (read_formatted_entries): Likewise.
98         (skip_form_bytes): Likewise.
99         * elfread.c (elf_symtab_read): Likewise.
100         * exec.c (exec_file_command): Likewise.
101         * f-valprint.c (f_val_print): Likewise.
102         (info_common_command_for_block): Likewise.
103         * guile/guile.c (initialize_scheme_side): Likewise.
104         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Likewise.
105         * guile/scm-cmd.c (cmdscm_completer): Likewise.
106         (gdbscm_register_command_x): Likewise.
107         * guile/scm-frame.c (gdbscm_frame_read_var): Likewise.
108         * guile/scm-param.c (gdbscm_parameter_value): Likewise.
109         * guile/scm-ports.c (file_port_magic): Likewise.
110         * guile/scm-pretty-print.c (ppscm_search_pp_list): Likewise.
111         (ppscm_pretty_print_one_value): Likewise.
112         (ppscm_print_children): Likewise.
113         * guile/scm-string.c (gdbscm_string_to_argv): Likewise.
114         * guile/scm-symtab.c (gdbscm_sal_symtab): Likewise.
115         * guile/scm-type.c (gdbscm_type_next_field_x): Likewise.
116         * guile/scm-utils.c (gdbscm_parse_function_args): Likewise.
117         * i386-tdep.c (i386_register_reggroup_p): Likewise.
118         * infcmd.c (run_command_1): Likewise.
119         (until_next_fsm_clean_up): Likewise.
120         * linespec.c (linespec_complete): Likewise.
121         (find_label_symbols): Likewise.
122         * m2-valprint.c (m2_val_print): Likewise.
123         * memattr.c (require_user_regions): Likewise.
124         (lookup_mem_region): Likewise.
125         (disable_mem_command): Likewise.
126         (mem_delete): Likewise.
127         * mep-tdep.c (mep_register_name): Likewise.
128         (mep_analyze_prologue): Likewise.
129         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Likewise.
130         * mi/mi-interp.c (mi_on_sync_execution_done): Likewise.
131         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
132         * microblaze-linux-tdep.c (microblaze_linux_init_abi): Likewise.
133         * minidebug.c (lzma_open): Likewise.
134         * minsyms.c (lookup_minimal_symbol): Likewise.
135         * mips-linux-tdep.c (mips64_fill_fpregset): Likewise.
136         * mips-tdep.c (mips_stub_frame_sniffer): Likewise.
137         (mips_o64_return_value): Likewise.
138         (mips_single_step_through_delay): Likewise.
139         (_initialize_mips_tdep): Likewise.
140         * nios2-tdep.c (nios2_push_dummy_call): Likewise.
141         (nios2_software_single_step): Likewise.
142         * parse.c (find_minsym_type_and_address): Likewise.
143         * psymtab.c (psym_relocate): Likewise.
144         * python/py-breakpoint.c (bppy_get_commands): Likewise.
145         (gdbpy_breakpoint_modified): Likewise.
146         * python/py-infevents.c (create_inferior_call_event_object):
147         Likewise.
148         * python/py-record-btrace.c (btpy_list_item): Likewise.
149         * python/py-type.c (typy_str): Likewise.
150         * python/py-value.c (valpy_call): Likewise.
151         * python/python.c (do_start_initialization): Likewise.
152         * record-btrace.c (record_btrace_insn_history_range): Likewise.
153         (record_btrace_call_history_range): Likewise.
154         (record_btrace_record_method): Likewise.
155         (record_btrace_xfer_partial): Likewise.
156         (btrace_get_frame_function): Likewise.
157         * record-full.c (record_full_open): Likewise.
158         * record.c (get_context_size): Likewise.
159         * registry.h (DEFINE_REGISTRY): Likewise.
160         * remote-fileio.c (remote_fileio_request): Likewise.
161         * remote.c (remote_update_thread_list): Likewise.
162         (remote_check_symbols): Likewise.
163         (remote_commit_resume): Likewise.
164         (remote_interrupt): Likewise.
165         (remote_insert_breakpoint): Likewise.
166         (compare_sections_command): Likewise.
167         * rust-exp.y (super_name): Likewise.
168         (lex_string): Likewise.
169         (convert_ast_to_type): Likewise.
170         (convert_ast_to_expression): Likewise.
171         * rust-lang.c (rust_print_struct_def): Likewise.
172         (rust_print_type): Likewise.
173         (rust_evaluate_subexp): Likewise.
174         * rx-tdep.c (rx_register_type): Likewise.
175         * ser-event.c (serial_event_clear): Likewise.
176         * serial.c (serial_open): Likewise.
177         * spu-tdep.c (spu_overlay_new_objfile): Likewise.
178         * symfile.c (section_is_overlay): Likewise.
179         (overlay_unmapped_address): Likewise.
180         (overlay_mapped_address): Likewise.
181         (simple_overlay_update_1): Likewise.
182         (simple_overlay_update): Likewise.
183         * symtab.c (symbol_find_demangled_name): Likewise.
184         (search_symbols): Likewise.
185         * target-descriptions.c (tdesc_predefined_type): Likewise.
186         * target.c (target_commit_resume): Likewise.
187         * thread.c (print_selected_thread_frame): Likewise.
188         * top.c (new_ui_command): Likewise.
189         (gdb_readline_no_editing): Likewise.
190         * tracefile-tfile.c (tfile_open): Likewise.
191         * tracepoint.c (create_tsv_from_upload): Likewise.
192         * utils.c (quit): Likewise.
193         (defaulted_query): Likewise.
194         * valarith.c (value_concat): Likewise.
195         * xml-syscall.c (xml_list_syscalls_by_group): Likewise.
196         * xml-tdesc.c (target_fetch_description_xml): Likewise.
197         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
198         (xtensa_pseudo_register_write): Likewise.
199
200 2017-12-04  Tom Tromey  <tom@tromey.com>
201
202         * NEWS: Mention Rust trait object inspection.
203
204 2017-12-04  Pedro Alves  <palves@redhat.com>
205
206         PR gdb/22499
207         * amd64-tdep.c (amd64_insn::rex_offset): Rename to...
208         (amd64_insn::enc_prefix_offset): ... this, and tweak comment.
209         (vex2_prefix_p, vex3_prefix_p): New functions.
210         (amd64_get_insn_details): Adjust to rename.  Also skip VEX2 and
211         VEX3 prefixes.
212         (fixup_riprel): Set VEX3.!B.
213
214 2017-12-03  Simon Marchi  <simon.marchi@ericsson.com>
215
216         * target.h (mem_region_vector): Remove.
217         (struct target_ops) <to_memory_map>: Change return type to
218         std::vector<mem_region>.
219         * target-debug.h (target_debug_print_mem_region_vector): Rename
220         to ...
221         (target_debug_print_std_vector_mem_region): ... this.
222         * target-delegates.c: Re-generate.
223
224 2017-12-03  Pedro Alves  <palves@redhat.com>
225
226         * make-target-delegates (munge_type): Also munge '<', '>', and
227         ':'.  Avoid double underscores in identifiers, and trailing
228         underscores.
229         * target-debug.h
230         (target_debug_print_VEC_static_tracepoint_marker_p__p): Rename to
231         ...
232         (target_debug_print_VEC_static_tracepoint_marker_p_p): ... this.
233         * target-delegates.c: Regenerate.
234
235 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
236
237         * common/poison.h (XDELETE): Fix typo.
238
239 2017-12-01  Andrew Cagney  <cagney@redhat.com>
240             Joel Brobecker  <brobecker@adacore.com>
241             Sergio Durigan Junior  <sergiodj@redhat.com>
242
243         * NEWS (Changes since GDB 8.0: Mention new '--readnever'
244         feature.
245         * coffread.c (coff_symfile_read): Do not map over sections with
246         'coff_locate_sections' if readnever is on.
247         * dwarf2read.c (dwarf2_has_info): Return 0 if
248         readnever is on.
249         * elfread.c (elf_symfile_read): Do not map over sections with
250         'elf_locate_sections' if readnever is on.
251         * main.c (validate_readnow_readnever): New function.
252         (captured_main_1): Add support for --readnever.
253         (print_gdb_help): Document --readnever.
254         * objfile-flags.h (enum objfile_flag) <OBJF_READNEVER>: New
255         flag.
256         * symfile.c (readnever_symbol_files): New global.
257         (symbol_file_add_with_addrs): Set 'OBJF_READNEVER' when
258         'READNEVER_SYMBOL_FILES' is set.
259         (validate_readnow_readnever): New function.
260         (symbol_file_command): Handle '-readnever' option.
261         Call 'validate_readnow_readnever'.
262         (add_symbol_file_command): Handle '-readnever' option.
263         Call 'validate_readnow_readnever'.
264         (_initialize_symfile): Document new '-readnever' option for
265         both 'symbol-file' and 'add-symbol-file' commands.
266         * top.h (readnever_symbol_files): New extern global.
267         * xcoffread.c (xcoff_initial_scan): Do not read debug
268         information if readnever is on.
269
270 2017-12-01  Sergio Durigan Junior  <sergiodj@redhat.com>
271
272         * symfile.c (symbol_file_command): Call
273         'symbol_file_add_main_1' only after processing all command
274         line options.
275         (add_symbol_file_command): Modify logic to make arguments
276         position-independent.
277
278 2017-12-01  Joel Brobecker  <brobecker@adacore.com>
279
280         * ada-lang.c (symbol_list_obstack): Delete.
281         (resolve_subexp): Make sure "candidates" gets xfree'ed.
282         (ada_lookup_symbol_list_worker): Remove the limitation that
283         the result is only good until the next call, now making it
284         the responsibility of the caller to free the result when no
285         longer needed.  Adjust the function's intro comment accordingly.
286         (ada_lookup_symbol_list): Adjust the function's intro comment.
287         (ada_iterate_over_symbols): Make sure "results" gets xfree'ed.
288         (ada_lookup_encoded_symbol, get_var_value): Likewise.
289         (_initialize_ada_language): Remove symbol_list_obstack
290         initialization.
291         * ada-exp.y (block_lookup): Make sure "syms" gets xfree'ed.
292         (write_var_or_type, write_name_assoc): Likewise.
293
294 2017-12-01  Tom Tromey  <tom@tromey.com>
295
296         * Makefile.in (all_deps_files): New variable.
297         Include .Po files using all_deps_files.
298
299 2017-12-01  Joel Brobecker  <brobecker@adacore.com>
300
301         * MAINTAINERS: Update list of maintainers, moving those who
302         stepped down or became inactive to the "Past Maintainers"
303         section.
304
305 2017-11-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
306
307         * configure.ac Don't check for sys/fault.h, sys/syscall.h,
308         sys/proc.h.
309         (NEW_PROC_API): Remove.
310         (prsysent_t, pr_sigset_t, pr_sigaction64_t, pr_siginfo64_t):
311         Likewise.
312         * common/common.m4 (GDB_AC_COMMON): Don't check for sys/syscall.h.
313         * configure: Regenerate.
314         * config.in: Regenerate.
315         * gdbserver/configure: Regenerate.
316         * gdbserver/config.in: Regenerate.
317
318         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Remove
319         NEW_PROC_API test.
320         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Likewise.
321
322         * linux-btrace.c: Remove HAVE_SYS_SYSCALL_H test.
323
324         * proc-api.c: Remove !NEW_PROC_API support.
325         Remove HAVE_SYS_PROC_H and HAVE_SYS_USER_H tests.
326         Remove tests for macros always defined on Solaris.
327         * proc-events.c: Remove !NEW_PROC_API support.
328         Remove Remove HAVE_SYS_SYSCALL_H, HAVE_SYS_PROC_H and
329         HAVE_SYS_USER_H tests.
330         (init_syscall_table): Remove non-Solaris syscalls.
331         Remove tests for syscalls present on all Solaris versions.
332         Add missing Solaris 10+ syscalls.
333         (signal_table): Remove non-Solaris signals.
334         Remove tests for signals present on all Solaris versions.
335         (fault_table): Remove non-Solaris faults.
336         Remove tests for faults present on all Solaris versions.
337         * proc-flags.c: Remove !NEW_PROC_API support.
338         (pr_flag_table): Remove non-Solaris and pre-Solaris 7 comments.
339         Remove non-Solaris flags.
340         * proc-why.c: Remove !NEW_PROC_API support.
341         (pr_why_table): Remove meaningless comments.
342         Remove tests for reasons present on all Solaris versions.
343         Remove OSF/1 cases.
344         (proc_prettyfprint_why): Likewise.
345
346         * procfs.c: Remove !NEW_PROC_API and DYNAMIC_SYSCALLS support.
347         Remove HAVE_SYS_FAULT_H and HAVE_SYS_SYSCALL_H tests.
348         Remove WA_READ test, IRIX watchpoint support.
349         (gdb_sigset_t, gdb_sigaction_t, gdb_siginfo_t): Replace by base
350         types.  Change users.
351         (gdb_praddset, gdb_prdelset, gdb_premptysysset, gdb_praddsysset)
352         (gdb_prdelset, gdb_pr_issyssetmember): Replace by base macros.
353         Change callers.
354         Remove CTL_PROC_NAME_FMT tests.
355         (gdb_prstatus_t, gdb_lwpstatus_t): Replace by base types.  Change
356         users.
357         (sysset_t_size): Remove.  Use sizeof (sysset_t) in callers.
358         Remove PROCFS_DONT_PIOCSSIG_CURSIG support.
359         (proc_modify_flag): Replace GDBRESET by PCUNSET.
360         Remove PR_ASYNC, PR_KLC tests.
361         (proc_unset_inherit_on_fork): Remove PR_ASYNC test.
362         (proc_parent_pid): Remove PCWATCH etc. tests.
363         (proc_set_watchpoint): Remove !PCWATCH && !PIOCSWATCH support.
364         Remove PCAGENT test.
365         (proc_get_nthreads) [PIOCNTHR && PIOCTLIST]: Remove.
366         Remove SYS_lwpcreate || SYS_lwp_create test.
367         (proc_get_current_thread): Likewise.
368         [PIOCNTHR && PIOCTLIST]: Remove.
369         [PIOCLSTATUS]: Remove.
370         (procfs_debug_inferior): Remove non-Solaris cases, conditionals.
371         [PRFS_STOPEXEC]: Remove.
372         (syscall_is_lwp_exit): Remove non-Solaris cases, conditionals.
373         (syscall_is_exit): Likewise.
374         (syscall_is_exec): Likewise.
375         (syscall_is_lwp_create): Likewise.
376         Remove SYS_syssgi support.
377         (procfs_wait): Remove PR_ASYNC, !PIOCSSPCACT tests.
378         [SYS_syssgi]: Remove.
379         Remove non-Solaris cases, conditionals.
380         (unconditionally_kill_inferior) [PROCFS_NEED_PIOCSSIG_FOR_KILL]:
381         Remove.
382         (procfs_init_inferior) [SYS_syssgi]: Remove.
383         (procfs_set_exec_trap) [PRFS_STOPEXEC]: Remove.
384         (procfs_inferior_created) [SYS_syssgi]: Remove.
385         (procfs_set_watchpoint): Remove !AIX5 test.
386         (procfs_stopped_by_watchpoint): Remove FLTWATCH test, FLTKWATCH
387         case.
388         (mappingflags) [MA_PHYS]: Remove.
389         (info_mappings_callback): Remove PCAGENT test.
390         Remove PIOCOPENLWP || PCAGENT test.
391
392 2017-11-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
393
394         * sol-thread.c (info_solthreads): Constify args.
395         Cast args to void *.
396
397 2017-11-29  John Baldwin  <jhb@FreeBSD.org>
398
399         * target-float.c [HAVE_LIBMPFR]: Define MPFR_USE_INTMAX_T.
400
401 2017-11-29  Joel Brobecker  <brobecker@adacore.com>
402
403         * ada-lang.c (to_fixed_range_type): Make sure that the size
404         of the range type being returned is the same as the size
405         of the range type being fixed.
406
407 2017-11-29  Pedro Alves  <palves@redhat.com>
408
409         PR c++/19436
410         * NEWS: Mention setting breakpoints on functions with C++ ABI
411         tags.
412         * completer.h (completion_match_for_lcd) <match,
413         mark_ignored_range>: New methods.
414         <finish>: Consider ignored ranges.
415         <clear>: Clear ignored ranges.
416         <m_ignored_ranges, m_finished_storage>: New fields.
417         * cp-support.c (cp_search_name_hash): Ignore ABI tags.
418         (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
419         completion_match_for_lcd pointer to strncmp_iw_with_mode.
420         (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
421         * language.c (default_symbol_name_matcher): Pass the
422         completion_match_for_lcd pointer to strncmp_iw_with_mode.
423         * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
424         * utils.c (skip_abi_tag): New function.
425         (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
426         Handle ABI tags.
427         * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
428         parameter.
429
430 2017-11-29  Pedro Alves  <palves@redhat.com>
431
432         PR c++/19436
433         * NEWS: Mention setting breakpoints on functions with C++ ABI
434         tags.
435         * completer.h (completion_match_for_lcd) <match,
436         mark_ignored_range>: New methods.
437         <finish>: Consider ignored ranges.
438         <clear>: Clear ignored ranges.
439         <m_ignored_ranges, m_finished_storage>: New fields.
440         * cp-support.c (cp_search_name_hash): Ignore ABI tags.
441         (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
442         completion_match_for_lcd pointer to strncmp_iw_with_mode.
443         (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
444         * language.c (default_symbol_name_matcher): Pass the
445         completion_match_for_lcd pointer to strncmp_iw_with_mode.
446         * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
447         * utils.c (skip_abi_tag): New function.
448         (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
449         Handle ABI tags.
450         * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
451         parameter.
452
453 2017-11-29  Pedro Alves  <palves@redhat.com>
454
455         * NEWS: Mention that breakpoints on C++ functions are now set on
456         on all namespaces/classes by default, and mention "break
457         -qualified".
458         * ax-gdb.c (agent_command_1): Adjust to pass a
459         symbol_name_match_type to new_linespec_location.
460         * breakpoint.c (parse_breakpoint_sals): Adjust to
461         get_linespec_location's return type change.
462         (strace_marker_create_sals_from_location): Adjust to pass a
463         symbol_name_match_type to new_linespec_location.
464         (strace_marker_decode_location): Adjust to get_linespec_location's
465         return type change.
466         (strace_command): Adjust to pass a symbol_name_match_type to
467         new_linespec_location.
468         (LOCATION_HELP_STRING): Add paragraph about wildmatching, and
469         mention "-qualified".
470         * c-lang.c (cplus_language_defn): Install cp_search_name_hash.
471         * completer.c (explicit_location_match_type::MATCH_QUALIFIED): New
472         enumerator.
473         (complete_address_and_linespec_locations): New parameter
474         'match_type'.  Pass it down.
475         (explicit_options): Add "-qualified".
476         (collect_explicit_location_matches): Pass the requested match type
477         to the linespec completers.  Handle MATCH_QUALIFIED.
478         (location_completer): Handle "-qualified" combined with linespecs.
479         * cp-support.c (cp_search_name_hash): New.
480         (cp_symbol_name_matches_1): Implement wild matching for C++.
481         (cp_fq_symbol_name_matches): Reimplement.
482         (cp_get_symbol_name_matcher): Return different matchers depending
483         on the lookup name's match type.
484         (selftests::test_cp_symbol_name_matches): Add wild matching tests.
485         * cp-support.h (cp_search_name_hash): New declaration.
486         * dwarf2read.c
487         (selftests::dw2_expand_symtabs_matching::test_symbols): Add
488         symbols.
489         (test_dw2_expand_symtabs_matching_symbol): Add wild matching
490         tests.
491         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Adjust to
492         pass a symbol_name_match_type to new_linespec_location.
493         * linespec.c (linespec_parse_basic): Lookup function symbols using
494         the parser's symbol name match type.
495         (convert_explicit_location_to_linespec): New
496         symbol_name_match_type parameter.  Pass it down to
497         find_linespec_symbols.
498         (convert_explicit_location_to_sals): Pass the location's name
499         match type to convert_explicit_location_to_linespec.
500         (parse_linespec): New match_type parameter.  Save it in the
501         parser.
502         (linespec_parser_new): Default to symbol_name_match_type::WILD.
503         (linespec_complete_function): New symbol_name_match_type
504         parameter.  Use it.
505         (complete_linespec_component): Pass down the parser's recorded
506         name match type.
507         (linespec_complete_label): New symbol_name_match_type parameter.
508         Use it.
509         (linespec_complete): New symbol_name_match_type parameter.  Save
510         it in the parser and pass it down.  Adjust to
511         get_linespec_location's prototype change.
512         (find_function_symbols, find_linespec_symbols): New
513         symbol_name_match_type parameter.  Pass it down instead of
514         assuming symbol_name_match_type::WILD.
515         * linespec.h (linespec_complete, linespec_complete_function)
516         (linespec_complete_label): New symbol_name_match_type parameter.
517         * location.c (event_location::linespec_location): Now a struct
518         linespec_location.
519         (EL_LINESPEC): Adjust.
520         (initialize_explicit_location): Default to
521         symbol_name_match_type::WILD.
522         (new_linespec_location): New symbol_name_match_type parameter.
523         Record it in the location.
524         (get_linespec_location): Now returns a struct linespec_location.
525         (new_explicit_location): Also copy func_name_match_type.
526         (explicit_to_string_internal)
527         (string_to_explicit_location): Handle "-qualified".
528         (copy_event_location): Adjust to LINESPEC_LOCATION type change.
529         Copy symbol_name_match_type fields.
530         (event_location_deleter::operator()): Adjust to LINESPEC_LOCATION
531         type change.
532         (event_location_to_string): Adjust to LINESPEC_LOCATION type
533         change.  Handle "-qualfied".
534         (string_to_explicit_location): Handle "-qualified".
535         (string_to_event_location_basic): New symbol_name_match_type
536         parameter.  Pass it down.
537         (string_to_event_location): Handle "-qualified".
538         * location.h (struct linespec_location): New.
539         (explicit_location::func_name_match_type): New field.
540         (new_linespec_location): Now returns a const linespec_location *.
541         (string_to_event_location_basic): New symbol_name_match_type
542         parameter.
543         (explicit_completion_info::saw_explicit_location_option): New
544         field.
545         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Adjust to pass a
546         symbol_name_match_type to new_linespec_location.
547         * python/py-breakpoint.c (bppy_init): Likewise.
548         * python/python.c (gdbpy_decode_line): Likewise.
549
550 2017-11-29  Pedro Alves  <palves@redhat.com>
551
552         * ada-lang.c (ada_lookup_name_info::matches): Change type of
553         parameter from completion_match to completion_match_result.
554         Adjust.
555         (do_wild_match, do_full_match, ada_symbol_name_matches): Likewise.
556         * completer.c (completion_tracker::maybe_add_completion): Add
557         match_for_lcd parameter and use it.
558         (completion_tracker::add_completion): Likewise.
559         * completer.h (class completion_match_for_lcd): New class.
560         (completion_match_result::match_for_lcd): New field.
561         (completion_match_result::set_match): New method.
562         (completion_tracker): Add comments.
563         (completion_tracker::add_completion): Add match_for_lcd parameter.
564         (completion_tracker::reset_completion_match_result): Reset
565         match_for_lcd too.
566         (completion_tracker::maybe_add_completion): Add match_for_lcd
567         parameter.
568         (completion_tracker::m_lowest_common_denominator_unique): Extend
569         comments.
570         * cp-support.c (cp_symbol_name_matches_1)
571         (cp_fq_symbol_name_matches): Change type of parameter from
572         completion_match to completion_match_result.  Adjust.
573         * language.c (default_symbol_name_matcher): Change type of
574         parameter from completion_match to completion_match_result.
575         Adjust.
576         * language.h (completion_match_for_lcd): Forward declare.
577         (default_symbol_name_matcher): Change type of parameter from
578         completion_match to completion_match_result.
579         * symtab.c (compare_symbol_name): Adjust.
580         (completion_list_add_name): Pass the match_for_lcd to the tracker.
581         * symtab.h (ada_lookup_name_info::matches): Change type of
582         parameter from completion_match to completion_match_result.
583         (symbol_name_matcher_ftype): Likewise, and update comments.
584
585 2017-11-29  Pedro Alves  <palves@redhat.com>
586
587         * linespec.c (minsym_found, add_minsym): Use msymbol_is_function.
588         * minsyms.c (msymbol_is_text): Delete.
589         (msymbol_is_function): New function.
590         * minsyms.h (msymbol_is_text): Delete.
591         (msymbol_is_function): New declaration.
592         * symtab.c (find_function_alias_target): Use msymbol_is_function.
593
594 2017-11-29  Tom Tromey  <tom@tromey.com>
595
596         * Makefile.in (distclean): Handle the case where rmdir fails.
597
598 2017-11-29  Tom Tromey  <tom@tromey.com>
599
600         * symfile.c (_initialize_symfile): Update usage text for
601         add-symbol-file, symbol-file, load.
602
603 2017-11-29  Tom Tromey  <tom@tromey.com>
604
605         * symfile.c (add_symbol_file_command): Error if some arguments to
606         -s are missing.  Change unrecognized-argument error message.
607         (_initialize_symfile): Fix usage text for add-symbol-file.
608
609 2017-11-27  Tom Tromey  <tom@tromey.com>
610
611         * Makefile.in (REMOTE_OBS): Remove.
612         (SFILES): Remove remote sources.
613         (COMMON_SFILES): Add remote sources.
614         (ALLDEPFILES): Remove dcache.c.
615
616 2017-11-27  Tom Tromey  <tom@tromey.com>
617
618         * Makefile.in (SUBDIR_TARGET_SRCS, SUBDIR_TARGET_OBS): New
619         variables.
620         (SFILES): Use SUBDIR_TARGET_SRCS.
621         (COMMON_OBS): Use SUBDIR_TARGET_OBS.  Remove waitstatus.o.
622         (CONFIG_SRC_SUBDIR): Add target.
623         (%.o): Remove target rule.
624
625 2017-11-27  Tom Tromey  <tom@tromey.com>
626
627         * Makefile.in (COMMON_OBS): Remove filename-seen-cache.o,
628         registry.o, thread-fsm.o, debug.o.
629         (COMMON_SFILES): Add filename-seen-cache.c, registry.c,
630         thread-fsm.c, debug.c.
631
632 2017-11-27  Tom Tromey  <tom@tromey.com>
633
634         * Makefile.in (COMMON_SFILES): New.
635         (SFILES): Move some entries to COMMON_SFILES.
636         (COMMON_OBS): Use COMMON_SFILES.
637
638 2017-11-27  Tom Tromey  <tom@tromey.com>
639
640         * Makefile.in (YYFILES): Update comment.
641         (YYOBJ): Redefine.
642
643 2017-11-27  Tom Tromey  <tom@tromey.com>
644
645         * Makefile.in (SUBDIR_PYTHON_OBS): Redefine.
646         (CONFIG_SRC_SUBDIR): Add python.
647         (%.o): Remove python rule.
648         (python/%.o): New rule.
649         * configure: Rebuild.
650         * configure.ac (CONFIG_OBS): Refer to python/python.o
651
652 2017-11-27  Tom Tromey  <tom@tromey.com>
653
654         * configure: Rebuild.
655         * configure.ac (CONFIG_OBS): Refer to guile/guile.o.
656         * Makefile.in (SUBDIR_GUILE_OBS): Redefine.
657         (CONFIG_SRC_SUBDIR): Add guile.
658         (%.o): Remove guile rule.
659
660 2017-11-27  Tom Tromey  <tom@tromey.com>
661
662         * Makefile.in (SUBDIR_UNITTESTS_OBS): Redefine.
663         (%.o): Remove unittests rule.
664         (CONFIG_SRC_SUBDIR): Add unittests.
665
666 2017-11-27  Tom Tromey  <tom@tromey.com>
667
668         * Makefile.in (SUBDIR_TUI_OBS): Redefine.
669         (CONFIG_SRC_SUBDIR): Add tui.
670         (%.o): Remove tui rule.
671
672 2017-11-27  Tom Tromey  <tom@tromey.com>
673
674         * Makefile.in (SUBDIR_GCC_COMPILE_OBS): Redefine.
675         (%.o): Remove compile rule.
676         (CONFIG_SRC_SUBDIR): Add compile.
677
678 2017-11-27  Tom Tromey  <tom@tromey.com>
679
680         * Makefile.in (SUBDIR_MI_OBS): Redefine.
681         (%.o): Remove mi rule.
682         (CONFIG_SRC_SUBDIR): Add mi.
683         (COMMON_OBS): Use mi/mi-common.o
684
685 2017-11-27  Tom Tromey  <tom@tromey.com>
686
687         * Makefile.in (SUBDIR_CLI_OBS): Redefine.
688         (%.o): Remove cli rule.
689         (CONFIG_SRC_SUBDIR): Add cli.
690
691 2017-11-27  Tom Tromey  <tom@tromey.com>
692
693         * configure.ac (CONFIG_SRC_SUBDIR): Don't subst.
694         * configure: Rebuild.
695         * Makefile.in (CONFIG_SRC_SUBDIR): Redefine.
696         (CONFIG_DEP_SUBDIR): New variable.
697         (%.o): Add order-only dependency.
698         ($(CONFIG_DEP_SUBDIR)): New target.
699
700 2017-11-26  Dominik Czarnota  <dominik.b.czarnota@gmail.com>
701
702         PR gdb/21945
703         * findcmd.c (_initialize_mem_search): Update find command help
704         text.
705
706 2017-11-26  Simon Marchi  <simon.marchi@polymtl.ca>
707
708         * python/python.c (do_start_initialization): Change progname
709         type to gdb::unique_xmalloc_ptr.  Release the pointer when using
710         Python 2.
711
712 2017-11-26  Tom Tromey  <tom@tromey.com>
713
714         * common/format.h: Add include guards.
715
716 2017-11-26  Tom Tromey  <tom@tromey.com>
717
718         * nat/linux-personality.h (class
719         maybe_disable_address_space_randomization): New class.
720         (maybe_disable_address_space_randomization): Don't declare
721         function.
722         * nat/linux-personality.c (restore_personality)
723         (make_disable_asr_cleanup): Remove.
724         (maybe_disable_address_space_randomization): Now a constructor.
725         (~maybe_disable_address_space_randomization): New destructor.
726         * linux-nat.c (linux_nat_create_inferior): Update.
727
728 2017-11-26  Tom Tromey  <tom@tromey.com>
729
730         * gcore.c (write_gcore_file_1): Use gdb::unique_xmalloc_ptr.
731
732 2017-11-26  Ulrich Weigand  <uweigand@de.ibm.com>
733
734         * spu-tdep.c (spu_software_single_step): Access SPU_LSLR_REGNUM as
735         "cooked" register.  Access only first four bytes of branch target
736         registers.
737
738 2017-11-25  Sergio Durigan Junior  <sergiodj@redhat.com>
739
740         PR gdb/22491
741         * stap-probe.c (relocate_address): New function.
742         (stap_probe::get_relocated_address): Use 'relocate_address'.
743         (stap_probe::set_semaphore): Use 'relocate_address' and pass
744         'm_sem_addr'.
745         (stap_probe::clear_semaphore): Likewise.
746
747 2017-11-25  Pedro Alves  <palves@redhat.com>
748
749         * dictionary.c: Include "safe-ctype.h".
750         * minsyms.c: Include "safe-ctype.h".
751         * minsyms.c (SYMBOL_HASH_NEXT): Use TOLOWER instead of tolower.
752
753 2017-11-25   Pedro Alves  <palves@redhat.com>
754
755         * completer.c (complete_line_internal_1): Skip spaces until the
756         start of the command.
757
758 2017-11-24  Pedro Alves  <palves@redhat.com>
759
760         * cp-support.c (cp_symbol_name_matches_1): New, factored out from
761         cp_fq_symbol_name_matches.  Pass language_cplus to
762         strncmp_with_mode.
763         (cp_fq_symbol_name_matches): Call cp_symbol_name_matches_1.
764         (selftests::test_cp_symbol_name_cmp): New.
765         (_initialize_cp_support): Register "cp_symbol_name_matches"
766         selftests.
767         * language.c (default_symbol_name_matcher): Pass language_minimal
768         to strncmp_iw_with_mode.
769         * utils.c: Include "cp-support.h" and <algorithm>.
770         (valid_identifier_name_char, cp_skip_operator_token, skip_ws)
771         (cp_is_operator): New functions.
772         (strncmp_iw_with_mode): Use them.  Add language parameter.  Don't
773         skip whitespace in the symbol name when the lookup name doesn't
774         have spaces, and vice versa.
775         (strncmp_iw, strcmp_iw): Pass language to strncmp_iw_with_mode.
776         * utils.h (strncmp_iw_with_mode): Add language parameter.
777
778 2017-11-24  Joel Brobecker  <brobecker@adacore.com>
779
780         * ada-lang.c (ada_exception_message_1, ada_exception_message):
781         New functions.
782         (print_it_exception): If available, display the exception
783         message as well.
784         * NEWS: Document new feature.
785
786 2017-11-24  Ulrich Weigand  <uweigand@de.ibm.com>
787
788         * configure.nat <spu-linux>: Add fork-inferior.o to NATDEPFILES.
789
790 2017-11-24  Philipp Rudo  <prudo@linux.vnet.ibm.com>
791
792         * dtrace-probe.c (dtrace_probe::build_arg_exprs)
793         (dtrace_probe::is_enabled, dtrace_probe::enable)
794         (dtrace_probe::disable): Remove keyword 'struct' at for-range
795         variable
796         * probe.c (gen_ui_out_table_header_info)
797         (print_ui_out_not_applicables):  Remove keyword 'struct' at
798         for-range variable
799
800 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
801
802         * configure.tgt: Add arch/aarch64.o
803
804 2017-11-24  Simon Marchi  <simon.marchi@polymtl.ca>
805
806         * common/common-utils.h: Include poison.h.
807         (xfree): Remove declaration, add definition with static_assert.
808         * common/common-utils.c (xfree): Remove.
809         * common/poison.h (IsMallocatable): Define.
810         (IsFreeable): Define.
811         (free): Delete for non-freeable types.
812         (xnew): New.
813         (XNEW): Undef and redefine.
814         (xcnew): New.
815         (XCNEW): Undef and redefine.
816         (xdelete): New.
817         (XDELETE): Undef and redefine.
818         (xnewvec): New.
819         (XNEWVEC): Undef and redefine.
820         (xcnewvec): New.
821         (XCNEWVEC): Undef and redefine.
822         (xresizevec): New.
823         (XRESIZEVEC): Undef and redefine.
824         (xdeletevec): New.
825         (XDELETEVEC): Undef and redefine.
826         (xnewvar): New.
827         (XNEWVAR): Undef and redefine.
828         (xcnewvar): New.
829         (XCNEWVAR): Undef and redefine.
830         (xresizevar): New.
831         (XRESIZEVAR): Undef and redefine.
832
833 2017-11-24  Simon Marchi  <simon.marchi@polymtl.ca>
834
835         * gdbthread.h (private_thread_info): Define structure type, add
836         virtual pure destructor.
837         (thread_info) <priv>: Change type to unique_ptr.
838         <private_dtor>: Remove.
839         * thread.c (add_thread_with_info): Adjust to use of unique_ptr.
840         (private_thread_info::~private_thread_info): Provide default
841         implementation.
842         (thread_info::~thread_info): Don't call private_dtor nor
843         manually free priv.
844         * aix-thread.c (private_thread_info): Rename to ...
845         (aix_thread_info): ... this.
846         (get_aix_thread_info): New.
847         (sync_threadlists): Adjust.
848         (iter_tid): Adjust.
849         (aix_thread_resume): Adjust.
850         (aix_thread_fetch_registers): Adjust.
851         (aix_thread_store_registers): Adjust.
852         (aix_thread_extra_thread_info): Adjust.
853         * darwin-nat.h (private_thread_info): Rename to ...
854         (darwin_thread_info): ... this.
855         (get_darwin_thread_info): New.
856         * darwin-nat.c (darwin_init_thread_list): Adjust.
857         (darwin_check_new_threads): Adjust.
858         (thread_info_from_private_thread_info): Adjust.
859         * linux-thread-db.c (private_thread_info): Rename to ...
860         (thread_db_thread_info): ... this, initialize fields.
861         (get_thread_db_thread_info): New.
862         <dying>: Change type to bool.
863         (update_thread_state): Adjust to type rename.
864         (record_thread): Adjust to type rename an use of unique_ptr.
865         (thread_db_pid_to_str): Likewise.
866         (thread_db_extra_thread_info): Likewise.
867         (thread_db_thread_handle_to_thread_info): Likewise.
868         (thread_db_get_thread_local_address): Likewise.
869         * nto-tdep.h (private_thread_info): Rename to ...
870         (nto_thread_info): ... this, initialize fields.
871         (get_nto_thread_info): New.
872         <name>: Change type to std::string.
873         * nto-tdep.c (nto_extra_thread_info): Adjust to type rename and
874         use of unique_ptr.
875         * nto-procfs.c (update_thread_private_data_name): Adjust to
876         std::string change, allocate nto_private_thread_info with new.
877         (update_thread_private_data): Adjust to unique_ptr.
878         * remote.c (private_thread_info): Rename to ...
879         (remote_thread_info): ... this, initialize data members with
880         default values.
881         <extra, name>: Change type to std::string.
882         <thread_handle>: Change type to non-pointer.
883         (free_private_thread_info): Remove.
884         (get_private_info_thread): Rename to...
885         (get_remote_thread_info): ... this, change return type, adjust to
886         use of unique_ptr, use remote_thread_info constructor.
887         (remote_add_thread): Adjust.
888         (get_private_info_ptid): Rename to...
889         (get_remote_thread_info): ...this, change return type.
890         (remote_thread_name): Use get_remote_thread_info, adjust to
891         change to std::string.
892         (struct thread_item) <~thread_item>: Remove.
893         <thread_handle>: Make non pointer.
894         (start_thread): Adjust to thread_item::thread_handle type
895         change.
896         (remote_update_thread_list): Adjust to type name change, move
897         strings from temporary to long-lived object instead of
898         duplicating.
899         (remote_threads_extra_info): Use get_remote_thread_info.
900         (process_initial_stop_replies): Likewise.
901         (resume_clear_thread_private_info): Likewise.
902         (remote_resume): Adjust to type name change.
903         (remote_commit_resume): Use get_remote_thread_info.
904         (process_stop_reply): Adjust to type name change.
905         (remote_stopped_by_sw_breakpoint): Use get_remote_thread_info.
906         (remote_stopped_by_hw_breakpoint): Likewise.
907         (remote_stopped_by_watchpoint): Likewise.
908         (remote_stopped_data_address): Likewise.
909         (remote_core_of_thread): Likewise.
910         (remote_thread_handle_to_thread_info): Use
911         get_private_info_thread, adjust to thread_handle field type
912         change.
913
914 2017-11-24  Simon Marchi  <simon.marchi@polymtl.ca>
915
916         * remote.c (struct thread_item): Add constructor, disable copy
917         construction and copy assignment, define default move
918         construction and move assignment.
919         <extra, name>: Change type to std::string.
920         <core>: Initialize.
921         <thread_handle>: Make non-pointer.
922         (thread_item_t): Remove typedef.
923         (DEF_VEC_O(thread_item_t)): Remove.
924         (threads_listing_context) <contains_thread>: New method.
925         <remove_thread>: New method.
926         <items>: Change type to std::vector.
927         (clear_threads_listing_context): Remove.
928         (threads_listing_context_remove): Remove.
929         (remote_newthread_step): Use thread_item constructor, adjust to
930         change to std::vector.
931         (start_thread): Use thread_item constructor, adjust to change to
932         std::vector.
933         (end_thread): Adjust to change to std::vector and std::string.
934         (remote_get_threads_with_qthreadinfo): Use thread_item
935         constructor, adjust to std::vector.
936         (remote_update_thread_list): Adjust to change to std::vector and
937         std::string, use threads_listing_context methods.
938         (remove_child_of_pending_fork): Adjust.
939         (remove_new_fork_children): Adjust.
940         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
941         (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
942         * unittests/rsp-low-selftests.c: New file.
943         * common/rsp-low.h: Include common/byte-vector.h.
944         (hex2bin): New overload.
945         * common/rsp-low.c (hex2bin): New overload.
946
947 2017-11-24  Simon Marchi  <simon.marchi@ericsson.com>
948
949         * inferior.h (private_inferior): Define structure type, add
950         virtual pure destructor.
951         (inferior) <priv>: Change type to unique_ptr.
952         * inferior.c (private_inferior::~private_inferior): Provide
953         default implementation.
954         (inferior::~inferior): Don't free priv field.
955         (exit_inferior_1): Likewise.
956         * darwin-nat.h (struct darwin_exception_info): Initialize fields.
957         (darwin_exception_info): Remove typedef.
958         (DEF_VEC_O (darwin_thread_t)); Remove.
959         (private_inferior): Rename to ...
960         (darwin_private_inferior): ... this, extend private_inferior.
961         (get_darwin_inferior): New.
962         <threads>: Change type to std::vector of darwin_thread_t pointers.
963         * darwin-nat.c (darwin_check_new_threads): Adjust.
964         (find_inferior_task_it): Adjust.
965         (darwin_find_thread); Adjust.
966         (darwin_suspend_inferior): Adjust.
967         (darwin_resume_inferior): Adjust.
968         (darwin_find_new_inferior): Adjust.
969         (darwin_decode_notify_message): Adjust.
970         (darwin_send_reply): Adjust.
971         (darwin_resume_inferior_threads): Adjust.
972         (darwin_suspend_inferior_threads): Adjust.
973         (darwin_decode_message): Adjust.
974         (darwin_wait): Adjust.
975         (darwin_interrupt): Adjust.
976         (darwin_deallocate_threads): Adjust.
977         (darwin_mourn_inferior): Adjust, don't free private data.
978         (darwin_reply_to_all_pending_messages): Adjust.
979         (darwin_stop_inferior): Adjust.
980         (darwin_setup_exceptions): Adjust.
981         (darwin_kill_inferior): Adjust.
982         (darwin_setup_request_notification): Adjust.
983         (darwin_attach_pid): Adjust.
984         (darwin_init_thread_list): Adjust.
985         (darwin_setup_fake_stop_event): Adjust.
986         (darwin_attach): Adjust.
987         (darwin_detach): Adjust.
988         (darwin_xfer_partial): Adjust.
989         (set_enable_mach_exceptions): Adjust.
990         (darwin_pid_to_exec_file): Adjust.
991         (darwin_get_ada_task_ptid): Adjust.
992         * darwin-nat-info.c (get_task_from_args): Adjust.
993         (info_mach_ports_command): Adjust.
994         (info_mach_region_command): Adjust.
995         (info_mach_exceptions_command): Adjust.
996         * remote.c (private_inferior): Rename to ...
997         (remote_private_inferior): ... this, initialize fields.
998         (get_remote_inferior); New.
999         (remote_commit_resume): Use get_remote_inferior.
1000         (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
1001
1002 2017-11-24  Pedro Alves  <palves@redhat.com>
1003
1004         * NEWS: Mention linespecs and explicit locations, and completion
1005         improvements.
1006
1007 2017-11-24  Yao Qi  <yao.qi@linaro.org>
1008
1009         * regcache.c (regcache::dump): Remove footnote_register_size.
1010
1011 2017-11-24  Yao Qi  <yao.qi@linaro.org>
1012
1013         * regcache.c (cooked_read_test): Add more test for readonly
1014         regcache.
1015
1016 2017-11-24  Yao Qi  <yao.qi@linaro.org>
1017
1018         * gdbarch-selftests.c (test_target_has_registers): Move it to
1019         target.c.
1020         (test_target_has_stack): Likewise.
1021         (test_target_has_memory): Likewise.
1022         (test_target_prepare_to_store): Likewise.
1023         (test_target_store_registers): Likewise.
1024         (test_target_ops): Likewise.
1025         * regcache.c: Include selftest-arch.h and gdbthread.h.
1026         (target_ops_no_register): New class.
1027         (test_target_fetch_registers): New.
1028         (test_target_store_registers): New.
1029         (test_target_xfer_partial): New.
1030         (readwrite_regcache): New.
1031         (cooked_read_test): New.
1032         (_initialize_regcache): Register the test.
1033         * target.c: (test_target_has_registers): Moved from
1034         gdbarch-selftests.c.
1035         (test_target_has_stack): Likewise.
1036         (test_target_has_memory): Likewise.
1037         (test_target_prepare_to_store): Likewise.
1038         (test_target_store_registers): Likewise.
1039         * target.h (test_target_ops): New class.
1040
1041 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
1042
1043         * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
1044         selftest.
1045
1046 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
1047
1048         * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
1049         * arch/aarch64.c (aarch64_create_target_description): Create
1050         new target description.
1051         * features/Makefile: Add new files.
1052         * features/aarch64.c: Remove file.
1053         * features/aarch64-core.c: New autogenerated file.
1054         * features/aarch64-fpu.c: New autogenerated file.
1055         * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
1056
1057 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
1058
1059         * Makefile.in: Add new files.
1060         * aarch64-linux-nat.c (aarch64_linux_read_description): Call
1061         aarch64_read_description.
1062         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
1063         Call aarch64_read_description.
1064         * aarch64-tdep.c (aarch64_read_description): New function.
1065         (aarch64_gdbarch_init): Call aarch64_read_description.
1066         * aarch64-tdep.h (aarch64_read_description): New function.
1067         * arch/aarch64.c: New file.
1068         * configure.tgt: Add new files.
1069
1070 2017-11-24  Yao Qi  <yao.qi@linaro.org>
1071
1072         * mi/mi-main.c (register_changed_p): Update.
1073         * value.c (value_contents_bits_eq): Change return type.
1074         (value_contents_eq): Likewise.
1075         * value.h: Update comments.
1076
1077 2017-11-24  Yao Qi  <yao.qi@linaro.org>
1078
1079         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
1080         local 'changed'.  Remove error.
1081         (register_changed_p): Change return type to bool.
1082
1083 2017-11-24  Yao Qi  <yao.qi@linaro.org>
1084
1085         * arch/tic6x.c: New file.
1086         * arch/tic6x.h: New file.
1087         * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
1088         tic6x-core.xml and tic6x-gp.xml.
1089         * features/tic6x-c6xp.c: Generated.
1090         * features/tic6x-core.c: Generated.
1091         * features/tic6x-gp.c: Generated.
1092         * target-descriptions.c (maint_print_c_tdesc_cmd): Match
1093         "tic6x-".
1094
1095 2017-11-23  Simon Marchi  <simon.marchi@ericsson.com>
1096
1097         * mi/mi-main.c (list_available_thread_groups): Change map value
1098         type to std::vector.
1099
1100 2017-11-23  Simon Marchi  <simon.marchi@ericsson.com>
1101
1102         * osdata.c (osdata_end_column, get_osdata): Remove std::move.
1103
1104 2017-11-23  Simon Marchi  <simon.marchi@ericsson.com>
1105
1106         * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
1107         back to...
1108         <children_requested>: ... this.
1109         (varobj_get_num_children, varobj_update): Adjust.
1110
1111 2017-11-23  Simon Marchi  <simon.marchi@ericsson.com>
1112
1113         * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
1114         (ada_value_has_mutated): Likewise.
1115         * c-varobj.c (varobj_is_anonymous_child): Likewise.
1116         (c_is_path_expr_parent): Likewise.
1117         * mi/mi-cmd-var.c (varobj_update_one): Likewise.
1118         (mi_cmd_var_set_frozen): Likewise.
1119         (mi_cmd_var_update_iter): Likewise.
1120         (mi_cmd_var_update): Likewise.
1121         * varobj.c (pretty_printing): Likewise.
1122         (varobj_enable_pretty_printing): Likewise.
1123         (struct varobj_root) <floating, is_valid>: Likewise.
1124         (struct varobj_dynamic) <children_requested>: Likewise.
1125         (delete_variable): Likewise.
1126         (delete_variable_1): Likewise.
1127         (install_variable): Likewise.
1128         (update_type_if_necessary): Likewise.
1129         (install_new_value): Likewise.
1130         (value_of_root): Likewise.
1131         (is_root_p): Likewise.
1132         (varobj_create): Likewise.
1133         (varobj_delete): Likewise.
1134         (varobj_has_more): Likewise.
1135         (varobj_set_frozen): Likewise.
1136         (varobj_get_frozen): Likewise.
1137         (install_dynamic_child): Likewise.
1138         (dynamic_varobj_has_child_method): Likewise.
1139         (update_dynamic_varobj_children): Likewise.
1140         (varobj_get_num_children): Likewise.
1141         (varobj_list_children): Likewise.
1142         (is_path_expr_parent): Likewise.
1143         (varobj_default_is_path_expr_parent): Likewise.
1144         (varobj_is_dynamic_p): Likewise.
1145         (varobj_set_value): Likewise.
1146         (varobj_value_has_mutated): Likewise.
1147         (varobj_update): Likewise.
1148         (check_scope): Likewise.
1149         (value_of_root_1): Likewise.
1150         (varobj_value_get_print_value): Likewise.
1151         (varobj_editable_p): Likewise.
1152         (varobj_value_is_changeable_p): Likewise.
1153         (varobj_floating_p): Likewise.
1154         (varobj_default_value_is_changeable_p): Likewise.
1155         (varobj_invalidate_iter): Likewise.
1156         * varobj.h (struct varobj_update_result) <type_changed,
1157         children_changed, changed, value_installed>: Likewise.
1158         (struct varobj) <updated, frozen, not_fetched>: Likewise.
1159         (struct lang_varobj_ops) <value_is_changeable_p,
1160         value_has_mutated, is_path_expr_parent>: Likewise.
1161         (varobj_delete): Likewise.
1162         (varobj_set_frozen): Likewise.
1163         (varobj_get_frozen): Likewise.
1164         (varobj_set_value): Likewise.
1165         (varobj_update): Likewise.
1166         (varobj_editable_p): Likewise.
1167         (varobj_floating_p): Likewise.
1168         (varobj_has_more): Likewise.
1169         (varobj_is_dynamic_p): Likewise.
1170         (varobj_default_value_is_changeable_p): Likewise.
1171         (varobj_value_is_changeable_p): Likewise.
1172         (varobj_is_anonymous_child): Likewise.
1173         (varobj_default_is_path_expr_parent): Likewise.
1174
1175 2017-11-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1176
1177         * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
1178         (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
1179         <type_str>: Convert to 'std::string'.
1180         <expr>: Convert to 'expression_up'.
1181         (dtrace_probe_arg_s): Delete type and VEC.
1182         (dtrace_probe_enabler_s): Likewise.
1183         (struct dtrace_probe): Replace by...
1184         (class dtrace_static_probe_ops): ...this and...
1185         (class dtrace_probe): ...this.
1186         (dtrace_probe_is_linespec): Rename to...
1187         (dtrace_static_probe_ops::is_linespec): ...this.  Adjust code
1188         to reflect change.
1189         (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
1190         Adjust code.  Create new instance of 'dtrace_probe'.
1191         (dtrace_build_arg_exprs): Rename to...
1192         (dtrace_probe::build_arg_exprs): ...this.  Adjust code to
1193         reflect change.
1194         (dtrace_get_probes): Rename to...
1195         (dtrace_static_probe_ops::get_probes): ...this.  Adjust code
1196         to reflect change.
1197         (dtrace_get_arg): Rename to...
1198         (dtrace_probe::get_arg_by_number): ...this.  Adjust code to
1199         reflect change.
1200         (dtrace_probe_is_enabled): Rename to...
1201         (dtrace_probe::is_enabled): ...this.  Adjust code to reflect
1202         change.
1203         (dtrace_get_probe_address): Rename to...
1204         (dtrace_probe::get_relocated_address): ...this.  Adjust code
1205         to reflect change.
1206         (dtrace_get_probe_argument_count): Rename to...
1207         (dtrace_probe::get_argument_count): ...this.  Adjust code to
1208         reflect change.
1209         (dtrace_can_evaluate_probe_arguments): Rename to...
1210         (dtrace_probe::can_evaluate_arguments): ...this.  Adjust code
1211         to reflect change.
1212         (dtrace_evaluate_probe_argument): Rename to...
1213         (dtrace_probe::evaluate_argument): ...this.  Adjust code to
1214         reflect change.
1215         (dtrace_compile_to_ax): Rename to...
1216         (dtrace_probe::compile_to_ax): ...this.  Adjust code to
1217         reflect change.
1218         (dtrace_probe_destroy): Delete.
1219         (dtrace_type_name): Rename to...
1220         (dtrace_static_probe_ops::type_name): ...this.  Adjust code to
1221         reflect change.
1222         (dtrace_probe::get_static_ops): New method.
1223         (dtrace_gen_info_probes_table_header): Rename to...
1224         (dtrace_static_probe_ops::gen_info_probes_table_header):
1225         ...this.  Adjust code to reflect change.
1226         (dtrace_gen_info_probes_table_values): Rename to...
1227         (dtrace_probe::gen_info_probes_table_values): ...this.  Adjust
1228         code to reflect change.
1229         (dtrace_enable_probe): Rename to...
1230         (dtrace_probe::enable_probe): ...this.  Adjust code to reflect
1231         change.
1232         (dtrace_disable_probe): Rename to...
1233         (dtrace_probe::disable_probe): ...this.  Adjust code to reflect
1234         change.
1235         (struct probe_ops dtrace_probe_ops): Delete.
1236         (info_probes_dtrace_command): Call 'info_probes_for_spops'
1237         instead of 'info_probes_for_ops'.
1238         (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
1239         of 'all_probe_ops'.
1240
1241 2017-11-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1242             Simon Marchi  <simark@simark.ca>
1243
1244         * stap-probe.c (struct probe_ops stap_probe_ops): Delete
1245         variable.
1246         (struct stap_probe_arg) <stap_probe_arg>: New constructor.
1247         <aexpr>: Change type to 'expression_up'.
1248         (stap_probe_arg_s): Delete type and VEC.
1249         (struct stap_probe): Delete.  Replace by...
1250         (class stap_static_probe_ops): ...this and...
1251         (class stap_probe): ...this.  Rename variables to add 'm_'
1252         prefix.  Do not use 'union' for arguments anymore.
1253         (stap_get_expected_argument_type): Receive probe name instead
1254         of 'struct stap_probe'.  Adjust code.
1255         (stap_parse_probe_arguments): Rename to...
1256         (stap_probe::parse_arguments): ...this.  Adjust code to
1257         reflect change.
1258         (stap_get_probe_address): Rename to...
1259         (stap_probe::get_relocated_address): ...this.  Adjust code
1260         to reflect change.
1261         (stap_get_probe_argument_count): Rename to...
1262         (stap_probe::get_argument_count): ...this.  Adjust code
1263         to reflect change.
1264         (stap_get_arg): Rename to...
1265         (stap_probe::get_arg_by_number'): ...this. Adjust code to
1266         reflect change.
1267         (can_evaluate_probe_arguments): Rename to...
1268         (stap_probe::can_evaluate_arguments): ...this.  Adjust code
1269         to reflect change.
1270         (stap_evaluate_probe_argument): Rename to...
1271         (stap_probe::evaluate_argument): ...this.  Adjust code
1272         to reflect change.
1273         (stap_compile_to_ax): Rename to...
1274         (stap_probe::compile_to_ax): ...this.  Adjust code to
1275         reflect change.
1276         (stap_probe_destroy): Delete.
1277         (stap_modify_semaphore): Adjust comment.
1278         (stap_set_semaphore): Rename to...
1279         (stap_probe::set_semaphore): ...this.  Adjust code to reflect
1280         change.
1281         (stap_clear_semaphore): Rename to...
1282         (stap_probe::clear_semaphore): ...this.  Adjust code to
1283         reflect change.
1284         (stap_probe::get_static_ops): New method.
1285         (handle_stap_probe): Adjust code to create instance of
1286         'stap_probe'.
1287         (stap_get_probes): Rename to...
1288         (stap_static_probe_ops::get_probes): ...this.  Adjust code to
1289         reflect change.
1290         (stap_probe_is_linespec): Rename to...
1291         (stap_static_probe_ops::is_linespec): ...this.  Adjust code to
1292         reflect change.
1293         (stap_type_name): Rename to...
1294         (stap_static_probe_ops::type_name): ...this.  Adjust code to
1295         reflect change.
1296         (stap_gen_info_probes_table_header): Rename to...
1297         (stap_static_probe_ops::gen_info_probes_table_header):
1298         ...this.  Adjust code to reflect change.
1299         (stap_gen_info_probes_table_values): Rename to...
1300         (stap_probe::gen_info_probes_table_values): ...this.  Adjust
1301         code to reflect change.
1302         (struct probe_ops stap_probe_ops): Delete.
1303         (info_probes_stap_command): Use 'info_probes_for_spops'
1304         instead of 'info_probes_for_ops'.
1305         (_initialize_stap_probe): Use 'all_static_probe_ops' instead
1306         of 'all_probe_ops'.
1307
1308 2017-11-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1309
1310         * break-catch-throw.c (fetch_probe_arguments): Use
1311         'probe.prob' instead of 'probe.probe'.
1312         * breakpoint.c (create_longjmp_master_breakpoint): Call
1313         'can_evaluate_arguments' and 'get_relocated_address' methods
1314         from probe.
1315         (create_exception_master_breakpoint): Likewise.
1316         (add_location_to_breakpoint): Use 'sal->prob' instead of
1317         'sal->probe'.
1318         (bkpt_probe_insert_location): Call 'set_semaphore' method from
1319         probe.
1320         (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
1321         * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
1322         of 'probe_ops'.
1323         (probe_key_free): Call 'delete' on probe.
1324         (check_exception_resume): Use 'probe.prob' instead of
1325         'probe.probe'.
1326         * location.c (string_to_event_location_basic): Call
1327         'probe_linespec_to_static_ops'.
1328         * probe.c (class any_static_probe_ops): New class.
1329         (any_static_probe_ops any_static_probe_ops): New variable.
1330         (parse_probes_in_pspace): Receive 'static_probe_ops' as
1331         argument.  Adjust code to reflect change.
1332         (parse_probes): Use 'static_probe_ops' instead of
1333         'probe_ops'.  Adjust code to reflect change.
1334         (find_probes_in_objfile): Call methods to get name and
1335         provider from probe.
1336         (find_probe_by_pc): Use 'result.prob' instead of
1337         'result.probe'.  Call 'get_relocated_address' method from
1338         probe.
1339         (collect_probes): Adjust comment and argument list to receive
1340         'static_probe_ops' instead of 'probe_ops'.  Adjust code to
1341         reflect change.  Call necessary methods from probe.
1342         (compare_probes): Call methods to get name and provider from
1343         probes.
1344         (gen_ui_out_table_header_info): Receive 'static_probe_ops'
1345         instead of 'probe_ops'.  Use 'std::vector' instead of VEC,
1346         adjust code accordingly.
1347         (print_ui_out_not_applicables): Likewise.
1348         (info_probes_for_ops): Rename to...
1349         (info_probes_for_spops): ...this.  Receive 'static_probe_ops'
1350         as argument instead of 'probe_ops'.  Adjust code.  Call
1351         necessary methods from probe.
1352         (info_probes_command): Use 'info_probes_for_spops'.
1353         (enable_probes_command): Pass correct argument to
1354         'collect_probes'.  Call methods from probe.
1355         (disable_probes_command): Likewise.
1356         (get_probe_address): Move to 'any_static_probe_ops::get_address'.
1357         (get_probe_argument_count): Move to
1358         'any_static_probe_ops::get_argument_count'.
1359         (can_evaluate_probe_arguments): Move to
1360         'any_static_probe_ops::can_evaluate_arguments'.
1361         (evaluate_probe_argument): Move to
1362         'any_static_probe_ops::evaluate_argument'.
1363         (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
1364         'probe.probe'.
1365         (probe_linespec_to_ops): Rename to...
1366         (probe_linespec_to_static_ops): ...this.  Adjust code.
1367         (probe_any_is_linespec): Rename to...
1368         (any_static_probe_ops::is_linespec): ...this.
1369         (probe_any_get_probes): Rename to...
1370         (any_static_probe_ops::get_probes): ...this.
1371         (any_static_probe_ops::type_name): New method.
1372         (any_static_probe_ops::gen_info_probes_table_header): New
1373         method.
1374         (compute_probe_arg): Use 'pc_probe.prob' instead of
1375         'pc_probe.probe'.  Call methods from probe.
1376         (compile_probe_arg): Likewise.
1377         (std::vector<const probe_ops *> all_probe_ops): Delete.
1378         (std::vector<const static_probe_ops *> all_static_probe_ops):
1379         New variable.
1380         (_initialize_probe): Use 'all_static_probe_ops' instead of
1381         'all_probe_ops'.
1382         * probe.h (struct info_probe_column) <field_name>: Delete
1383         extraneous newline
1384         (info_probe_column_s): Delete type and VEC.
1385         (struct probe_ops): Delete.  Replace with...
1386         (class static_probe_ops): ...this and...
1387         (clas probe): ...this.
1388         (struct bound_probe) <bound_probe>: Delete extraneous
1389         newline.  Adjust constructor to receive 'probe' instead of
1390         'struct probe'.
1391         <probe>: Rename to...
1392         <prob>: ...this.  Delete extraneous newline.
1393         <objfile>: Delete extraneous newline.
1394         (register_probe_ops): Delete unused prototype.
1395         (info_probes_for_ops): Rename to...
1396         (info_probes_for_spops): ...this.  Adjust comment.
1397         (get_probe_address): Move to 'probe::get_address'.
1398         (get_probe_argument_count): Move to
1399         'probe::get_argument_count'.
1400         (can_evaluate_probe_arguments): Move to
1401         'probe::can_evaluate_arguments'.
1402         (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
1403         * solib-svr4.c (struct svr4_info): Adjust comment.
1404         (struct probe_and_action) <probe>: Rename to...
1405         <prob>: ...this.
1406         (register_solib_event_probe): Receive 'probe' instead of
1407         'struct probe' as argument.  Use 'prob' instead of 'probe'
1408         when applicable.
1409         (solib_event_probe_action): Call 'get_argument_count' method
1410         from probe.  Adjust comment.
1411         (svr4_handle_solib_event): Adjust comment.  Call
1412         'evaluate_argument' method from probe.
1413         (svr4_create_probe_breakpoints): Call 'get_relocated_address'
1414         from probe.
1415         (svr4_create_solib_event_breakpoints): Use 'probe' instead of
1416         'struct probe'.  Call 'can_evaluate_arguments' from probe.
1417         * symfile.h: Forward declare 'class probe' instead of 'struct
1418         probe'.
1419         * symtab.h: Likewise.
1420         (struct symtab_and_line) <probe>: Rename to...
1421         <prob>: ...this.
1422         * tracepoint.c (start_tracing): Use 'prob' when applicable.
1423         Call probe methods.
1424         (stop_tracing): Likewise.
1425
1426 2017-11-22  Joel Brobecker  <brobecker@adacore.com>
1427
1428         * ravenscar-thread.c (ravenscar_inferior_created): Remove
1429         trailing newline at end of string in call to warning.
1430
1431 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
1432
1433         * osdata.h: Include vector isntead of vec.h.
1434         (osdata_column_s): Remove typedef.
1435         (struct osdata_column): Add constructor.
1436         <name, value>: Change type to std::string.
1437         (DEF_VEC_O (osdata_column_s)): Remove.
1438         (osdata_item_s): Remove typedef.
1439         (struct osdata_item) <columns>: Change type to std::vector.
1440         (DEF_VEC_O (osdata_item_s)): Remove.
1441         (struct osdata): Add constructor.
1442         <type>: Change type to std::string.
1443         <items>: Change type to std::vector.
1444         (osdata_p): Remove typedef.
1445         (DEF_VEC_P (osdata_p)): Remove.
1446         (osdata_parse): Return a unique_ptr.
1447         (osdata_free): Remove.
1448         (make_cleanup_osdata_free): Remove.
1449         (get_osdata): Return a unique_ptr.
1450         (get_osdata_column): Return pointer to std::string, take a
1451         reference to osdata_item as parameter.
1452         * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
1453         unique_ptr.
1454         <property_name>: Change type to std::string.
1455         (osdata_start_osdata): Allocate osdata with new and adjust.
1456         (osdata_start_item): Adjust.
1457         (osdata_start_column): Adjust.
1458         (osdata_end_column): Adjust.
1459         (clear_parsing_data): Remove.
1460         (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
1461         (osdata_item_clear): Remove.
1462         (get_osdata): return a unique_ptr and adjust.
1463         (get_osdata_column): Return a pointer to std::string and adjust.
1464         (info_osdata): Adjust.
1465         * mi/mi-main.c: Include <map>.
1466         (free_vector_of_osdata_items): Remove.
1467         (list_available_thread_groups): Adjust, use std::map instead of
1468         splay tree.
1469
1470 2017-11-22  Simon Marchi  <simon.marchi@ericsson.com>
1471
1472         * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
1473         case in switch.
1474
1475 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
1476
1477         * varobj.h (DEF_VEC_P (varobj_p)): Remove.
1478
1479 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
1480
1481         * varobj.h (struct varobj_update_result): Add constructor, add
1482         move constructor, disable copy and assign, initialize fields.
1483         <newobj>: Change type to std::vector.
1484         (varobj_update): Return std::vector.
1485         * varobj.c (install_dynamic_child): Change VEC parameters to
1486         std::vector and adjust.
1487         (update_dynamic_varobj_children): Likewise.
1488         (varobj_update): Return std::vector and adjust.
1489         * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
1490
1491 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
1492
1493         * varobj.h (struct varobj) <parent>: Remove const.
1494         <children>: Change type to std::vector.
1495         (varobj_list_children): Return std::vector const reference.
1496         (varobj_restrict_range): Change parameter type to std::vector
1497         const reference.
1498         * varobj.c (varobj_has_more): Adjust.
1499         (varobj_restrict_range): Change parameter type to std::vector
1500         const reference and adjust.
1501         (install_dynamic_child): Adjust.
1502         (update_dynamic_varobj_children): Adjust.
1503         (varobj_list_children): Return std::vector const reference and
1504         adjust.
1505         (varobj_add_child): Adjust.
1506         (update_type_if_necessary): Adjust.
1507         (varobj_update): Adjust.
1508         (delete_variable_1): Adjust.
1509         * ada-varobj.c (ada_value_has_mutated): Adjust.
1510         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
1511
1512 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
1513
1514         * varobj.h (struct varobj): Add constructor and destructor,
1515         initialize fields.
1516         * varobj.c (struct varobj_root): Initialize fields.
1517         (struct varobj_dynamic): Initialize fields.
1518         (varobj_create): Use unique_ptr instead of cleanup.  Create
1519         varobj with new instead of new_root_variable.
1520         (delete_variable_1): Free variable with delete instead of
1521         free_variable.
1522         (create_child_with_value): Create variable with new instead of
1523         new_variable.
1524         (varobj::varobj): New.
1525         (varobj::~varobj): New (body mostly coming from free_variable).
1526         (new_variable): Remove.
1527         (free_variable): Remove.
1528         (do_free_variable_cleanup): Remove.
1529         (make_cleanup_free_variable): Remove.
1530
1531 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
1532
1533         * core-regset.c: Remove file.
1534         * Makefile.in (ALLDEPFILES): Remove core-regset.c.
1535
1536 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
1537
1538         * NEWS: Document use of GNU MPFR.
1539         * README: Likewise.
1540
1541         * Makefile.in (LIBMPFR): Add define.
1542         (CLIBS): Add $(LIBMPFR).
1543         * configure.ac: Add --with-mpfr configure option.
1544         * configure: Regenerate.
1545         * config.in: Regenerate.
1546
1547         * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
1548         (class mpfr_float_ops): New type.
1549         (mpfr_float_ops::from_target): Two new overloaded functions.
1550         (mpfr_float_ops::to_target): Likewise.
1551         (mpfr_float_ops::to_string): New function.
1552         (mpfr_float_ops::from_string): Likewise.
1553         (mpfr_float_ops::to_longest): Likewise.
1554         (mpfr_float_ops::from_longest): Likewise.
1555         (mpfr_float_ops::from_ulongest): Likewise.
1556         (mpfr_float_ops::to_host_double): Likewise.
1557         (mpfr_float_ops::from_host_double): Likewise.
1558         (mpfr_float_ops::convert): Likewise.
1559         (mpfr_float_ops::binop): Likewise.
1560         (mpfr_float_ops::compare): Likewise.
1561         (get_target_float_ops): Use mpfr_float_ops if available.
1562
1563 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
1564
1565         * target-float.c: Do not include <math.h>.
1566         Include <cmath> and <limits>.
1567         (DOUBLEST): Do not define.
1568         (class target_float_ops): New type.
1569         (class host_float_ops): New templated type.
1570         (class decimal_float_ops): New type.
1571
1572         (floatformat_to_doublest): Rename to ...
1573         (host_float_ops<T>::from_target): ... this.  Use template type T
1574         instead of DOUBLEST.  Use C++ math routines.  Update recursive calls.
1575         (host_float_ops<T>::from_target): New overload using a type argument.
1576         (floatformat_from_doublest): Rename to ...
1577         (host_float_ops<T>::to_target): ... this.  Use template type T
1578         instead of DOUBLEST.  Use C++ math routines.  Update recursive calls.
1579         (host_float_ops<T>::to_target): New overload using a type argument.
1580         (floatformat_printf_format): New function.
1581         (struct printf_length_modifier): New templated type.
1582         (floatformat_to_string): Rename to ...
1583         (host_float_ops<T>::to_string): ... this.  Use type instead of
1584         floatformat argument.  Use floatformat_printf_format and
1585         printf_length_modifier.  Remove special handling of invalid numbers,
1586         infinities and NaN (moved to target_float_to_string).
1587         (struct scanf_length_modifier): New templated type.
1588         (floatformat_from_string): Rename to ...
1589         (host_float_ops<T>::from_string): ... this.  Use type instead of
1590         floatformat argument.  Use scanf_length_modifier.
1591         (floatformat_to_longest): Rename to ...
1592         (host_float_ops<T>::to_longest): ... this.  Use type instead of
1593         floatformat argument.  Handle out-of-range values deterministically.
1594         (floatformat_from_longest): Rename to ...
1595         (host_float_ops<T>::from_longest): ... this.  Use type instead of
1596         floatformat argument.
1597         (floatformat_from_ulongest): Rename to ...
1598         (host_float_ops<T>::from_ulongest): ... this.  Use type instead of
1599         floatformat argument.
1600         (floatformat_to_host_double): Rename to ...
1601         (host_float_ops<T>::to_host_double): ... this.  Use type instead of
1602         floatformat argument.
1603         (floatformat_from_host_double): Rename to ...
1604         (host_float_ops<T>::from_host_double): ... this.  Use type instead of
1605         floatformat argument.
1606         (floatformat_convert): Rename to ...
1607         (host_float_ops<T>::convert): ... this.  Use type instead of
1608         floatformat arguments.  Remove handling of no-op conversions.
1609         (floatformat_binop): Rename to ...
1610         (host_float_ops<T>::binop): ... this.  Use type instead of
1611         floatformat arguments.
1612         (floatformat_compare): Rename to ...
1613         (host_float_ops<T>::compare): ... this.  Use type instead of
1614         floatformat arguments.
1615
1616         (match_endianness): Use type instead of length/byte_order arguments.
1617         (set_decnumber_context): Likewise.
1618         (decimal_from_number): Likewise.  Update calls.
1619         (decimal_to_number): Likewise.
1620         (decimal_is_zero): Likewise.  Update calls.  Move to earlier in file.
1621         (decimal_float_ops::to_host_double): New dummy function.
1622         (decimal_float_ops::from_host_double): Likewise.
1623         (decimal_to_string): Rename to ...
1624         (decimal_float_ops::to_string): ... this.  Use type instead of
1625         length/byte_order arguments.  Update calls.
1626         (decimal_from_string): Rename to ...
1627         (decimal_float_ops::from_string): ... this.  Use type instead of
1628         length/byte_order arguments.  Update calls.
1629         (decimal_from_longest): Rename to ...
1630         (decimal_float_ops::from_longest): ... this.  Use type instead of
1631         length/byte_order arguments.  Update calls.
1632         (decimal_from_ulongest): Rename to ...
1633         (decimal_float_ops::from_ulongest): ... this.  Use type instead of
1634         length/byte_order arguments.  Update calls.
1635         (decimal_to_longest): Rename to ...
1636         (decimal_float_ops::to_longest): ... this.  Use type instead of
1637         length/byte_order arguments.  Update calls.
1638         (decimal_binop): Rename to ...
1639         (decimal_float_ops::binop): ... this.  Use type instead of
1640         length/byte_order arguments.  Update calls.
1641         (decimal_compare): Rename to ...
1642         (decimal_float_ops::compare): ... this.  Use type instead of
1643         length/byte_order arguments.  Update calls.
1644         (decimal_convert): Rename to ...
1645         (decimal_float_ops::convert): ... this.  Use type instead of
1646         length/byte_order arguments.  Update calls.
1647
1648         (target_float_same_category_p): New function.
1649         (target_float_same_format_p): Likewise.
1650         (target_float_format_length): Likewise.
1651         (enum target_float_ops_kind): New type.
1652         (get_target_float_ops_kind): New function.
1653         (get_target_float_ops): Three new overloaded functions.
1654
1655         (target_float_is_zero): Update call.
1656         (target_float_to_string): Add special handling of invalid numbers,
1657         infinities and NaN (moved from floatformat_to_string).  Use
1658         target_float_ops callback.
1659         (target_float_from_string): Use target_float_ops callback.
1660         (target_float_to_longest): Likewise.
1661         (target_float_from_longest): Likewise.
1662         (target_float_from_ulongest): Likewise.
1663         (target_float_to_host_double): Likewise.
1664         (target_float_from_host_double): Likewise.
1665         (target_float_convert): Add special case for no-op conversions.
1666         Use target_float_ops callback.
1667         (target_float_binop): Use target_float_ops callback.
1668         (target_float_compare): Likewise.
1669
1670 2017-11-22  Yao Qi  <yao.qi@linaro.org>
1671
1672         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
1673
1674 2017-11-22  Yao Qi  <yao.qi@linaro.org>
1675
1676         * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
1677         * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
1678
1679 2017-11-21  Jerome Guitton  <guitton@adacore.com>
1680
1681         * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
1682         with event ptid from the lower layer before doing the
1683         ravenscar-specific update.
1684
1685 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
1686
1687         * ravenscar-thread.c (is_ravenscar_task): Also verify that
1688         the ptid's TID is nonzero.
1689
1690 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
1691
1692         * ada-lang.h (ada_get_tcb_types_info): Add declaration.
1693         * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
1694         Make non-static.  Change return type to char *.  Adjust code
1695         accordingly.  Rewrite the function's documentation.
1696         (read_atcb): Adjust call to get_tcb_types_info accordingly.
1697         * ravenscar-thread.c (ravenscar_inferior_created): Check that
1698         we have enough debugging information in the runtime to support
1699         Ada task debugging before we enable the ravenscar-thread layer.
1700
1701 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
1702
1703         * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
1704         * ada-tasks.c (ada_get_task_info_from_ptid): New function.
1705         * ravenscar-thread.c: Add into comment.
1706         (base_magic_null_ptid): Delete.
1707         (base_ptid): Change documentation.
1708         (ravenscar_active_task): Renames ravenscar_running_thread.
1709         All callers updated throughout.
1710         (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
1711         (ravenscar_task_is_currently_active): Likewise.
1712         (get_base_thread_from_ravenscar_task): Ditto.
1713         (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
1714         (ravenscar_runtime_initialized): Likewise.
1715         (get_running_thread_id): Add new parameter "cpu".  Adjust
1716         implementation to handle this new parameter.
1717         (ravenscar_fetch_registers): Small adjustment to use
1718         is_ravenscar_task and ravenscar_task_is_currently_active in
1719         order to decide whether to use the target beneath or this
1720         module's arch_ops.
1721         (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
1722         (ravenscar_stopped_by_sw_breakpoint): Use
1723         get_base_thread_from_ravenscar_task to get the underlying
1724         thread, rather than using base_ptid.
1725         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1726         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1727         Likewise.
1728         (ravenscar_inferior_created): Do not set base_magic_null_ptid.
1729
1730 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
1731
1732         * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
1733         * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
1734         (get_tcb_types_info): Set fieldnos.base_cpu.
1735         (read_atcb): Set task_info->base_cpu.
1736         (info_task): Print "Base CPU" info if set by runtime.
1737
1738 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
1739
1740         * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
1741         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1742         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1743         New functions.
1744         (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
1745         to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
1746         to_stopped_data_address and to_core_of_thread fields of
1747         ravenscar_ops.
1748
1749 2017-11-21  Ulrich Weigand  <uweigand@de.ibm.com>
1750
1751         * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
1752         (struct gdbarch_tdep): New member long_double_abi.
1753         * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
1754         member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
1755         * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
1756         format depending on long_double_abi tdep member.
1757         (ppc_floatformat_for_type): Handle __ibm128 type.
1758
1759 2017-11-20  Simon Marchi  <simon.marchi@polymtl.ca>
1760
1761         * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
1762
1763 2017-11-21  Pedro Alves  <palves@redhat.com>
1764
1765         * dwarf2read.c (mapped_index::find_name_components_bounds)
1766         <completion mode, upper bound>: Use std::lower_bound instead of
1767         std::upper_bound.
1768         (test_mapped_index_find_name_component_bounds): Remove incorrect
1769         "t1_fund" from expected symbols.
1770
1771 2017-11-21  Pedro Alves  <palves@redhat.com>
1772
1773         * dwarf2read.c (mapped_index::name_components_casing): New field.
1774         (mapped_index) <build_name_components,
1775         find_name_components_bounds): Declare new methods.
1776         (mapped_index::find_name_components_bounds)
1777         (mapped_index::build_name_components): New methods, factored out
1778         from dw2_expand_symtabs_matching_symbol.
1779         (check_find_bounds_finds)
1780         (test_mapped_index_find_name_component_bounds): New.
1781         (run_test): Rename to ...
1782         (test_dw2_expand_symtabs_matching_symbol): ... this.
1783         (run_test): Reimplement.
1784
1785 2017-11-21  Pedro Alves  <palves@redhat.com>
1786
1787         * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
1788         (symbol_end): Use cp_ident_is_alnum.
1789         (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
1790         * dwarf2read.c (make_sort_after_prefix_name): New function.
1791         (dw2_expand_symtabs_matching_symbol): Use it.
1792         (test_symbols): Add more symbols.
1793         (run_test): Add tests.
1794
1795 2017-11-17  Tom Tromey  <tom@tromey.com>
1796
1797         * symtab.h (enum symbol_subclass_kind): New.
1798         (struct symbol) <is_cplus_template_function, is_rust_vtable>:
1799         Remove.
1800         <subclass>: New member.
1801         (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
1802         * rust-lang.c (rust_get_trait_object_pointer): Update.
1803         * dwarf2read.c (read_func_scope): Update.
1804         (read_variable): Update.
1805
1806 2017-11-17  Tom Tromey  <tom@tromey.com>
1807
1808         * dwarf2read.c (read_func_scope): Update.
1809         * symtab.h (struct template_symbol): Derive from symbol.
1810         <base>: Remove.
1811
1812 2017-11-17  Tom Tromey  <tom@tromey.com>
1813
1814         * symtab.h (struct symbol) <is_rust_vtable>: New member.
1815         (struct rust_vtable_symbol): New.
1816         (find_symbol_at_address): Declare.
1817         * symtab.c (find_symbol_at_address): New function.
1818         * symfile.h (struct quick_symbol_functions)
1819         <find_compunit_symtab_by_address>: New member.
1820         * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
1821         function.
1822         (debug_sym_quick_functions): Link to
1823         debug_qf_find_compunit_symtab_by_address.
1824         * rust-lang.c (rust_get_trait_object_pointer): New function.
1825         (rust_evaluate_subexp) <case UNOP_IND>: New case.  Call
1826         rust_get_trait_object_pointer.
1827         * psymtab.c (psym_relocate): Clear psymbol_map.
1828         (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
1829         functions.
1830         (psym_functions): Link to psym_find_compunit_symtab_by_address.
1831         * objfiles.h (struct objfile) <psymbol_map>: New member.
1832         * dwarf2read.c (dwarf2_gdb_index_functions): Update.
1833         (process_die) <DW_TAG_variable>: New case.  Call read_variable.
1834         (rust_containing_type, read_variable): New functions.
1835
1836 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
1837
1838         * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
1839
1840 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
1841
1842         * common/filestuff.c: Include <algorithm>.
1843         (open_fds): Change type to std::vector<int>.
1844         (do_mark_open_fd): Adjust.
1845         (unmark_fd_no_cloexec): Adjust.
1846         (do_close): Adjust.
1847
1848 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
1849
1850         * breakpoint.c (output_thread_groups): Take an std::vector.
1851         (print_one_breakpoint_location): Adjust.
1852
1853 2017-11-17  Joel Brobecker  <brobecker@adacore.com>
1854
1855         * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
1856         (ada_evaluate_subexp_for_cast): New function.
1857         (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
1858         ada_evaluate_subexp_for_cast.
1859         (ada_evaluate_subexp) <nosideret>: Replace code by call to
1860         eval_skip_value.
1861         * eval.c (evaluate_var_value): Make non-static.
1862         (evaluate_var_msym_value, eval_skip_value): Likewise.
1863         * value.h (evaluate_var_value, evaluate_var_msym_value)
1864         (eval_skip_value): Declare.
1865
1866 2017-11-16  Joel Brobecker  <brobecker@adacore.com>
1867
1868         * ada-lang.c (ada_value_cast): Remove parameter "noside".
1869         Update all callers.
1870
1871 2017-11-16  Pedro Alves  <palves@redhat.com>
1872
1873         * python/py-unwind.c (pyuw_sniffer): Translate
1874         PyExc_KeyboardInterrupt to a GDB Quit exception.
1875
1876 2017-11-16  Pedro Alves  <palves@redhat.com>
1877
1878         * infrun.c (resume_cleanups): Delete.
1879         (resume): No longer install a resume_cleanups cleanup nor call
1880         QUIT.
1881         (proceed): Pass the terminal to the inferior.
1882         (keep_going_pass_signal): No longer install a resume_cleanups
1883         cleanup.
1884
1885 2017-11-16  Pedro Alves  <palves@redhat.com>
1886
1887         * inf-loop.c (inferior_event_handler): Don't swallow the exception
1888         if the prompt is blocked.
1889
1890 2017-11-16  Pedro Alves  <palves@redhat.com>
1891
1892         * breakpoint.c (insert_bp_location): Replace bp_err and
1893         bp_err_message locals by a gdb_exception local.
1894
1895 2017-11-16  Pedro Alves  <palves@redhat.com>
1896
1897         * inflow.c (scoped_ignore_sigttou): New class.
1898         (child_terminal_ours_1, new_tty): Use it.
1899
1900 2017-11-16  Ulrich Weigand  <uweigand@de.ibm.com>
1901
1902         * target-float.c (decimal_from_number): Add byte_order argument and
1903         call match_endianness.  Error if unknown floating-point type.
1904         (decimal_to_number): Add byte_order argument and call match_endianness.
1905         (decimal_from_longest): Update call.  Do not call match_endianness.
1906         (decimal_from_ulongest): Likewise.
1907         (decimal_binop): Likewise.
1908         (decimal_is_zero): Likewise.
1909         (decimal_compare): Likewise.
1910         (decimal_convert): Likewise.
1911
1912 2017-11-16  Phil Muldoon  <pmuldoon@redhat.com>
1913
1914         * python/python.c (gdbpy_rbreak): New function.
1915         * NEWS: Document Python rbreak feature.
1916
1917 2017-11-16  Yao Qi  <yao.qi@linaro.org>
1918
1919         * features/tic6x-c62x.xml: Remove.
1920         * features/tic6x-c64x.xml: Remove.
1921         * features/tic6x-c64xp.xml: Remove.
1922
1923 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
1924
1925         * symtab.h: Include <array>.
1926
1927 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
1928
1929         * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
1930         (bsd_kvm_proc_cmd): Likewise.
1931
1932 2017-11-15  Simon Marchi  <simon.marchi@ericsson.com>
1933
1934         * tui/tui-win.c (window_name_completer): Replace VEC with
1935         std::vector.
1936
1937 2017-11-15  Andrew Cagney  <cagney@gnu.org>
1938
1939         * MAINTAINERS: Remove no-longer applicable entries.
1940
1941 2017-11-15  Andrew Cagney  <cagney@gnu.org>
1942
1943         * MAINTAINERS: Move self to Past Maintainers.
1944
1945 2017-11-15  Yao Qi  <yao.qi@linaro.org>
1946
1947         * features/Makefile (XMLTOC): Remove nios2-linux.xml.
1948         * features/nios2-linux.c: Remove.
1949         * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
1950         initialize_tdesc_nios2_linux.
1951
1952 2017-11-15  Yao Qi  <yao.qi@linaro.org>
1953
1954         * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
1955         M68HC11_LAST_HARD_REG + 1.
1956
1957 2017-11-14  Paul Carroll  <pcarroll@codesourcery.com>
1958
1959         PR gdb/22388
1960         * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
1961         remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
1962         Return TARGET_XFER_EOF if size of returned data is 0.
1963
1964 2017-11-14  Simon Marchi  <simon.marchi@ericsson.com>
1965
1966         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1967         memory-map-selftests.c.
1968         (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
1969         * memory-map.c (memory_map_start_memory): Fix computation of hi
1970         address.
1971         * unittests/memory-map-selftests.c: New file.
1972
1973 2017-11-09  Joel Brobecker  <brobecker@adacore.com>
1974
1975         * ada-lang.c: Fix some typos in the general command documenting
1976         how Ada expressions are being evaluated and how their result
1977         is printed.
1978
1979 2017-11-09  Tom Tromey  <tom@tromey.com>
1980
1981         * psymtab.c (psymbol_hash): Do not hash string contents.
1982         (psymbol_compare): Add comment.
1983
1984 2017-11-09  Tom Tromey  <tom@tromey.com>
1985
1986         * dictionary.c (dict_hash): Move "TKB" check into the "switch".
1987
1988 2017-11-08  Joel Brobecker  <brobecker@adacore.com>
1989
1990         * ada-exp.y (write_var_from_sym): Remove parameter
1991         "orig_left_context".  Update all callers.
1992
1993 2017-11-08  Simon Marchi  <simon.marchi@ericsson.com>
1994
1995         * tracepoint.h (class collection_list) <stringify>: Return
1996         std::vector<std::string>.
1997         (encode_actions_rsp): Change parameters to
1998         std::vector<std::string> *.
1999         * tracepoint.c (collection_list::stringify): Return
2000         std::vector<std::string> and adjust accordingly.
2001         (encode_actions_rsp): Changee parameters to
2002         std::vector<std::string> and adjust accordingly.
2003         * remote.c (free_actions_list),
2004         free_actions_list_cleanup_wrapper): Remove.
2005         (remote_download_tracepoint): Adjust to std::vector.
2006
2007 2017-11-08  Tom Tromey  <tom@tromey.com>
2008
2009         * dwarf2read.c (symbolp): Remove typedef.
2010         (read_func_scope): Use std::vector.
2011         (process_structure_scope): Use std::vector.
2012
2013 2017-11-08  Pedro Alves  <palves@redhat.com>
2014
2015         * ada-lang.c (ada_make_symbol_completion_list): Use
2016         completion_skip_symbol.
2017         * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
2018         (symbol_is_function_or_method(symbol*)): New.
2019         (add_symtab_completions): Add complete_symbol_mode parameter.  Use
2020         completion_skip_symbol.
2021         (default_collect_symbol_completion_matches_break_on): Use
2022         completion_skip_symbol.  Pass down mode.
2023         (collect_file_symbol_completion_matches): Pass down mode.
2024         * symtab.h (symbol_is_function_or_method): New declarations.
2025         (completion_skip_symbol): New template function.
2026
2027 2017-11-08  Pedro Alves  <palves@redhat.com>
2028
2029         * linespec.c (iterate_over_all_matching_symtabs): Add
2030         search_domain parameter.  Pass it down to expand_symtabs_matching.
2031         (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
2032         (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
2033         search_domain.
2034         (add_all_symbol_names_from_pspace): Add search_domain parameter.
2035         Pass it down.
2036         (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
2037         symbols.
2038         (add_matching_symbols_to_info): Add search_domain parameter.  Pass
2039         it down.
2040
2041 2017-11-08  Pedro Alves  <palves@redhat.com>
2042
2043         * ada-lang.c (ada_make_symbol_completion_list): Remove text and
2044         text_len locals and don't pass them down.
2045         * symtab.c (completion_list_add_name): Remove
2046         sym_text/sym_text_len parameters and adjust.
2047         (completion_list_add_symbol, completion_list_add_msymbol)
2048         (completion_list_objc_symbol, completion_list_add_fields)
2049         (add_symtab_completions): Likewise.
2050         (default_collect_symbol_completion_matches_break_on)
2051         (collect_file_symbol_completion_matches): Remove sym_text_len
2052         local and don't pass it down.
2053         * symtab.h (completion_list_add_name): Remove
2054         sym_text/sym_text_len parameters.
2055
2056 2017-11-08  Pedro Alves  <palves@redhat.com>
2057
2058         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2059         unittests/lookup_name_info-selftests.c.
2060         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
2061         * cp-support.c: Include "selftest.h".
2062         (cp_remove_params_1): Rename from cp_remove_params.  Add
2063         'require_param' parameter, and handle it.
2064         (cp_remove_params): Reimplement.
2065         (cp_remove_params_if_any): New.
2066         (selftests::quote): New.
2067         (selftests::check_remove_params): New.
2068         (selftests::test_cp_remove_params): New.
2069         (_initialize_cp_support): Install
2070         selftests::test_cp_remove_params.
2071         * cp-support.h (cp_remove_params_if_any): Declare.
2072         * dwarf2read.c :Include "selftest.h".
2073         (dw2_expand_symtabs_matching_symbol): Use
2074         lookup_name_info::make_ignore_params.
2075         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
2076         (selftests::dw2_expand_symtabs_matching::string_or_null)
2077         (selftests::dw2_expand_symtabs_matching::check_match)
2078         (selftests::dw2_expand_symtabs_matching::test_symbols)
2079         (selftests::dw2_expand_symtabs_matching::run_test): New.
2080         (_initialize_dwarf2_read): Register
2081         selftests::dw2_expand_symtabs_matching::run_test.
2082         * psymtab.c (psym_expand_symtabs_matching): Use
2083         lookup_name_info::make_ignore_params.
2084         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
2085         If the lookup name wants to ignore parameters, strip them.
2086         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
2087         code handling '('.
2088         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
2089         (default_collect_symbol_completion_matches_break_on): Don't try to
2090         strip parameters.
2091         * symtab.h (lookup_name_info::lookup_name_info): Add
2092         'ignore_parameters' parameter.
2093         (lookup_name_info::ignore_parameters)
2094         (lookup_name_info::make_ignore_params): New methods.
2095         (lookup_name_info::m_ignore_parameters): New field.
2096         * unittests/lookup_name_info-selftests.c: New file.
2097
2098 2017-11-08  Pedro Alves  <palves@redhat.com>
2099
2100         * dwarf2read.c (dw2_expand_marked_cus)
2101         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
2102         (dw2_expand_symtabs_matching): Move further below.
2103         (dw2_expand_marked_cus): Reindent.
2104
2105 2017-11-08  Pedro Alves  <palves@redhat.com>
2106
2107         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
2108         (struct name_component): New.
2109         (mapped_index::name_components): New field.
2110         (mapped_index::symbol_name_at): New method.
2111         (dwarf2_read_index): Call mapped_index ctor.
2112         (dw2_map_matching_symbols): Add comment about name_components
2113         table.
2114         (dw2_expand_symtabs_matching): Factor part to...
2115         (dw2_expand_symtabs_matching_symbol): ... this new function.
2116         Build name components table, and lookup symbols in it before
2117         calling the name matcher.
2118         (dw2_expand_marked_cus): New, factored out from
2119         dw2_expand_symtabs_matching.
2120         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
2121
2122 2017-11-08   Pedro Alves  <palves@redhat.com>
2123
2124         * ada-lang.c (ada_encode): Rename to ..
2125         (ada_encode_1): ... this.  Add throw_errors parameter and handle
2126         it.
2127         (ada_encode): Reimplement.
2128         (match_name): Delete, folded into full_name.
2129         (resolve_subexp): No longer pass the encoded name to
2130         ada_lookup_symbol_list.
2131         (should_use_wild_match): Delete.
2132         (name_match_type_from_name): New.
2133         (ada_lookup_simple_minsym): Use lookup_name_info and the
2134         language's symbol_name_matcher_ftype.
2135         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
2136         (ada_add_block_renamings): Adjust to use lookup_name_info.
2137         (ada_lookup_name): New.
2138         (add_nonlocal_symbols, ada_add_all_symbols)
2139         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
2140         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
2141         (ada_name_for_lookup): Delete.
2142         (ada_lookup_encoded_symbol): Construct a verbatim name.
2143         (wild_match): Reverse sense of return type.  Use bool.
2144         (full_match): Reverse sense of return type.  Inline bits of old
2145         match_name here.
2146         (ada_add_block_symbols): Adjust to use lookup_name_info.
2147         (symbol_completion_match): Delete, folded into...
2148         (ada_lookup_name_info::matches): ... .this new method.
2149         (symbol_completion_add): Delete.
2150         (ada_collect_symbol_completion_matches): Add name_match_type
2151         parameter.  Adjust to use lookup_name_info and
2152         completion_list_add_name.
2153         (get_var_value, ada_add_global_exceptions): Adjust to use
2154         lookup_name_info.
2155         (ada_get_symbol_name_cmp): Delete.
2156         (do_wild_match, do_full_match): New functions.
2157         (ada_lookup_name_info::ada_lookup_name_info): New method.
2158         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
2159         functions.
2160         (ada_language_defn): Install ada_get_symbol_name_matcher.
2161         * ada-lex.l (processId): If name starts with '<', copy it
2162         verbatim.
2163         * block.c (block_iter_match_step, block_iter_match_first)
2164         (block_iter_match_next, block_lookup_symbol)
2165         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
2166         lookup_name_info.
2167         * block.h (block_iter_match_first, block_iter_match_next)
2168         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
2169         * c-lang.c (c_language_defn, cplus_language_defn)
2170         (asm_language_defn, minimal_language_defn): Adjust comments to
2171         refer to la_get_symbol_name_matcher.
2172         * completer.c (complete_files_symbols)
2173         (collect_explicit_location_matches, symbol_completer): Pass a
2174         symbol_name_match_type down.
2175         * completer.h (class completion_match, completion_match_result):
2176         New classes.
2177         (completion_tracker::reset_completion_match_result): New method.
2178         (completion_tracker::m_completion_match_result): New field.
2179         * cp-support.c (make_symbol_overload_list_block): Adjust to use
2180         lookup_name_info.
2181         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
2182         functions.
2183         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
2184         * d-lang.c: Adjust comments to refer to
2185         la_get_symbol_name_matcher.
2186         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
2187         Adjust to use lookup_name_info.
2188         (dict_iter_match_first, dict_iter_match_next)
2189         (iter_match_first_hashed, iter_match_next_hashed)
2190         (iter_match_first_linear, iter_match_next_linear): Adjust to work
2191         with a lookup_name_info.
2192         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
2193         Likewise.
2194         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
2195         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
2196         (gdb_index_symbol_name_matcher): New class.
2197         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
2198         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
2199         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
2200         with a symbol_name_match_type.
2201         (f_language_defn): Adjust comments to refer to
2202         la_get_symbol_name_matcher.
2203         * go-lang.c (go_language_defn): Adjust comments to refer to
2204         la_get_symbol_name_matcher.
2205         * language.c (default_symbol_name_matcher)
2206         (language_get_symbol_name_matcher): New functions.
2207         (unknown_language_defn, auto_language_defn): Adjust comments to
2208         refer to la_get_symbol_name_matcher.
2209         * language.h (symbol_name_cmp_ftype): Delete.
2210         (language_defn) <la_collect_symbol_completion_matches>: Add match
2211         type parameter.
2212         <la_get_symbol_name_cmp>: Delete field.
2213         <la_get_symbol_name_matcher>: New field.
2214         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
2215         (default_symbol_name_matcher, language_get_symbol_name_matcher):
2216         Declare.
2217         * linespec.c (iterate_over_all_matching_symtabs)
2218         (iterate_over_file_blocks): Adjust to use lookup_name_info.
2219         (find_methods): Add language parameter, and use lookup_name_info
2220         and the language's symbol_name_matcher_ftype.
2221         (linespec_complete_function): Adjust.
2222         (lookup_prefix_sym): Use lookup_name_info.
2223         (add_all_symbol_names_from_pspace): Adjust.
2224         (find_superclass_methods): Add language parameter and pass it
2225         down.
2226         (find_method): Pass symbol language down.
2227         (find_linespec_symbols): Don't demangle or Ada encode here.
2228         (search_minsyms_for_name): Add lookup_name_info parameter.
2229         (add_matching_symbols_to_info): Add name_match_type parameter.
2230         Use lookup_name_info.
2231         * m2-lang.c (m2_language_defn): Adjust comments to refer to
2232         la_get_symbol_name_matcher.
2233         * minsyms.c: Include <algorithm>.
2234         (add_minsym_to_demangled_hash_table): Remove table parameter and
2235         add objfile parameter.  Use search_name_hash, and add language to
2236         demangled languages vector.
2237         (struct found_minimal_symbols): New struct.
2238         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
2239         New functions.
2240         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
2241         input names here.  Use lookup_name_info instead.  Lookup up
2242         demangled names once for each language in the demangled names
2243         vector.
2244         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
2245         demangled names once for each language in the demangled names
2246         vector.
2247         (build_minimal_symbol_hash_tables): Adjust.
2248         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
2249         lookup_name_info.
2250         * objc-lang.c (objc_language_defn): Adjust comment to refer to
2251         la_get_symbol_name_matcher.
2252         * objfiles.h: Include <vector>.
2253         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
2254         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
2255         la_get_symbol_name_matcher.
2256         * p-lang.c (pascal_language_defn): Adjust comment to refer to
2257         la_get_symbol_name_matcher.
2258         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
2259         (match_partial_symbol): Use symbol_name_match_type,
2260         lookup_name_info and psymbol_name_matches.
2261         (lookup_partial_symbol): Use lookup_name_info.
2262         (map_block): Use symbol_name_match_type and lookup_name_info.
2263         (psym_map_matching_symbols): Use symbol_name_match_type.
2264         (psymbol_name_matches): New.
2265         (recursively_search_psymtabs): Use lookup_name_info and
2266         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
2267         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
2268         'kind' parameter to 'domain'.
2269         * rust-lang.c (rust_language_defn): Adjust comment to refer to
2270         la_get_symbol_name_matcher.
2271         * symfile-debug.c (debug_qf_map_matching_symbols)
2272         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
2273         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
2274         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
2275         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
2276         Adjust to use symbol_name_match_type.
2277         <expand_symtabs_matching>: Adjust to use lookup_name_info.
2278         (expand_symtabs_matching): Adjust to use lookup_name_info.
2279         * symmisc.c (maintenance_expand_symtabs): Use
2280         lookup_name_info::match_any ().
2281         * symtab.c (symbol_matches_search_name): New.
2282         (eq_symbol_entry): Adjust to use lookup_name_info and the
2283         language's matcher.
2284         (demangle_for_lookup_info::demangle_for_lookup_info): New.
2285         (lookup_name_info::match_any): New.
2286         (iterate_over_symbols, search_symbols): Use lookup_name_info.
2287         (compare_symbol_name): Add language, lookup_name_info and
2288         completion_match_result parameters, and use them.
2289         (completion_list_add_name): Make extern.  Add language and
2290         lookup_name_info parameters.  Use them.
2291         (completion_list_add_symbol, completion_list_add_msymbol)
2292         (completion_list_objc_symbol): Add lookup_name_info parameters and
2293         adjust.  Pass down language.
2294         (completion_list_add_fields): Add lookup_name_info parameters and
2295         adjust.  Pass down language.
2296         (add_symtab_completions): Add lookup_name_info parameters and
2297         adjust.
2298         (default_collect_symbol_completion_matches_break_on): Add
2299         name_match_type parameter, and use it.  Use lookup_name_info.
2300         (default_collect_symbol_completion_matches)
2301         (collect_symbol_completion_matches): Add name_match_type
2302         parameter, and pass it down.
2303         (collect_symbol_completion_matches_type): Adjust.
2304         (collect_file_symbol_completion_matches): Add name_match_type
2305         parameter, and use lookup_name_info.
2306         * symtab.h: Include <string> and "common/gdb_optional.h".
2307         (enum class symbol_name_match_type): New.
2308         (class ada_lookup_name_info): New.
2309         (struct demangle_for_lookup_info): New.
2310         (class lookup_name_info): New.
2311         (symbol_name_matcher_ftype): New.
2312         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
2313         (symbol_matches_search_name): Declare.
2314         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
2315         (default_collect_symbol_completion_matches)
2316         (collect_symbol_completion_matches)
2317         (collect_file_symbol_completion_matches): Add name_match_type
2318         parameter.
2319         (iterate_over_symbols): Use lookup_name_info.
2320         (completion_list_add_name): Declare.
2321         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
2322         (strncmp_iw_with_mode): Now extern.
2323         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
2324         (strncmp_iw_with_mode): Declare.
2325
2326 2017-11-08  Keith Seitz  <keiths@redhat.com>
2327             Pedro Alves  <palves@redhat.com>
2328
2329         * ada-lang.c (ada_language_defn): Install
2330         default_search_name_hash.
2331         * buildsym.c (struct buildsym_compunit): <language>: New field.
2332         (finish_block_internal): Pass language when creating dictionaries.
2333         (start_buildsym_compunit, start_symtab): New language parameters.
2334         Use them.
2335         (restart_symtab): Pass down compilation unit's language.
2336         * buildsym.h (enum language): Forward declare.
2337         (start_symtab): New 'language' parameter.
2338         * c-lang.c (c_language_defn, cplus_language_defn)
2339         (asm_language_defn, minimal_language_defn): Install
2340         default_search_name_hash.
2341         * coffread.c (coff_start_symtab): Adjust.
2342         * d-lang.c (d_language_defn): Install default_search_name_hash.
2343         * dbxread.c (struct symloc): Add 'pst_language' field.
2344         (PST_LANGUAGE): Define.
2345         (start_psymtab, read_ofile_symtab): Use it.
2346         (process_one_symbol): New 'language' parameter.  Pass it down.
2347         * dictionary.c (struct dictionary) <language>: New field.
2348         (DICT_LANGUAGE): Define.
2349         (dict_create_hashed, dict_create_hashed_expandable)
2350         (dict_create_linear, dict_create_linear_expandable): New parameter
2351         'language'.  Set the dictionary's language.
2352         (iter_match_first_hashed): Adjust to rename.
2353         (insert_symbol_hashed): Assert we don't see mismatching
2354         languages.  Adjust to rename.
2355         (dict_hash): Rename to ...
2356         (default_search_name_hash): ... this and make extern.
2357         * dictionary.h (struct language_defn): Forward declare.
2358         (dict_create_hashed): New parameter 'language'.
2359         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
2360         * f-lang.c (f_language_defn): Install default_search_name_hash.
2361         * go-lang.c (go_language_defn): Install default_search_name_hash.
2362         * jit.c (finalize_symtab): Pass compunit's language to dictionary
2363         creation.
2364         * language.c (unknown_language_defn, auto_language_defn):
2365         * language.h (language_defn::la_search_name_hash): New field.
2366         (default_search_name_hash): Declare.
2367         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
2368         * mdebugread.c (new_block): New parameter 'language'.
2369         * mdebugread.c (parse_symbol): Pass symbol language to block
2370         allocation.
2371         (psymtab_to_symtab_1): Pass down language.
2372         (new_symtab): Pass compunit's language to block allocation.
2373         * objc-lang.c (objc_language_defn): Install
2374         default_search_name_hash.
2375         * opencl-lang.c (opencl_language_defn):
2376         * p-lang.c (pascal_language_defn): Install
2377         default_search_name_hash.
2378         * rust-lang.c (rust_language_defn): Install
2379         default_search_name_hash.
2380         * stabsread.h (enum language): Forward declare.
2381         (process_one_symbol): Add 'language' parameter.
2382         * symtab.c (search_name_hash): New function.
2383         * symtab.h (search_name_hash): Declare.
2384         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
2385
2386 2017-11-08  Pedro Alves  <palves@redhat.com>
2387
2388         * cp-name-parser.y (main): Don't initialize extra_chars.
2389
2390 2017-11-07  Tom Tromey  <tom@tromey.com>
2391
2392         * event-top.h (command_handler): Constify.
2393         * record-full.c (cmd_record_full_start): Update.
2394         * thread.c (thread_apply_all_command): Update.
2395         * printcmd.c (eval_command): Update.
2396         * mi/mi-main.c (mi_execute_cli_command): Update.
2397         (mi_execute_async_cli_command): Update.
2398         * tui/tui-stack.c (tui_update_command): Update.
2399         * cli/cli-interp.c (safe_execute_command): Constify.
2400         * record.c (record_start): Update.
2401         (record_start, record_stop, cmd_record_start): Update.
2402         * record-btrace.c (cmd_record_btrace_bts_start): Update.
2403         (cmd_record_btrace_pt_start): Update.
2404         (cmd_record_btrace_start): Update.
2405         (cmd_record_btrace_start): Update.
2406         * reverse.c (exec_reverse_once): Update.
2407         * python/python.c (execute_gdb_command): Don't copy the command.
2408         * event-top.c (command_line_handler): Update.
2409         (command_handler): Constify.
2410         * defs.h (deprecated_call_command_hook): Constify.
2411         * cli/cli-script.h (execute_user_command): Constify.
2412         * cli/cli-script.c (execute_user_command): Constify.
2413         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
2414         (enum command_control_type): Update.
2415         * main.c (catch_command_errors): Remove non-const overload.
2416         (catch_command_errors_ftype): Remove.
2417         * python/py-cmd.c (cmdpy_function): Constify.
2418         * guile/scm-cmd.c (cmdscm_function): Constify.
2419         * cli/cli-dump.c (call_dump_func): Constify.
2420         * cli/cli-decode.c (do_const_cfunc): Constify.
2421         (do_sfunc): Constify.
2422         (cmd_func): Constify.
2423         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
2424         * top.h (execute_command): Constify.
2425         * top.c (execute_command): Constify.
2426         (execute_command_to_string): Constify.
2427         (deprecated_call_command_hook): Constify.
2428         * command.h (cmd_func): Constify.
2429         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
2430
2431 2017-11-07  Tom Tromey  <tom@tromey.com>
2432
2433         * ada-lang.c (catch_ada_exception_command): Constify.
2434         (catch_assert_command): Constify.
2435         * break-catch-throw.c (catch_catch_command, catch_throw_command)
2436         (catch_rethrow_command): Constify.
2437         (catch_exception_command_1): Constify.
2438         * breakpoint.h (add_catch_command): Constify.
2439         * break-catch-syscall.c (catch_syscall_command_1): Constify.
2440         (catch_syscall_split_args): Constify.
2441         * break-catch-sig.c (catch_signal_command): Constify.
2442         (catch_signal_split_args): Constify.
2443         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
2444         cmd_const_sfunc_ftype.
2445         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
2446         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2447         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2448         (add_setshow_string_cmd, struct cmd_list_element)
2449         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2450         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2451         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
2452         Constify.
2453         (set_cmd_sfunc): Constify.
2454         (empty_sfunc): Constify.
2455         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2456         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2457         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
2458         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2459         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2460         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
2461         Constify.
2462         (set_cmd_sfunc): Constify.
2463         (cmd_sfunc_ftype): Remove.
2464         * compile/compile.c (set_compile_args): Constify.
2465         * infrun.c (set_disable_randomization): Constify.
2466         * infcmd.c (set_args_command, set_cwd_command): Constify.
2467         * breakpoint.c (set_condition_evaluation_mode): Constify.
2468         (add_catch_command): Constify.
2469         (catch_fork_command_1, catch_exec_command_1)
2470         (catch_load_command_1, catch_unload_command_1): Constify.
2471         (catch_load_or_unload): Constify.
2472         * guile/scm-param.c (pascm_set_func): Constify.
2473         (add_setshow_generic): Constify.
2474         * python/py-param.c (get_set_value): Constify.
2475         * top.h (set_verbose): Constify.
2476         * tui/tui-win.c (tui_set_var_cmd): Constify.
2477         * mi/mi-main.c (set_mi_async_command): Constify.
2478         * cli/cli-logging.c (set_logging_overwrite)
2479         (set_logging_redirect): Constify.
2480         * value.c (set_max_value_size): Constify.
2481         * valprint.c (set_input_radix, set_output_radix): Constify.
2482         * utils.c (set_width_command, set_height_command): Constify.
2483         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
2484         * tracepoint.c (set_disconnected_tracing)
2485         (set_circular_trace_buffer, set_trace_buffer_size)
2486         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
2487         * top.c (set_history_size_command, set_verbose, set_editing)
2488         (set_gdb_datadir, set_history_filename): Constify.
2489         * target.c (set_targetdebug, maint_set_target_async_command)
2490         (maint_set_target_non_stop_command, set_target_permissions)
2491         (set_write_memory_permission): Constify.
2492         (open_target): Constify.
2493         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
2494         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
2495         * symtab.c (set_symbol_cache_size_handler): Constify.
2496         * symfile.c (set_ext_lang_command): Constify.
2497         * symfile-debug.c (set_debug_symfile): Constify.
2498         * source.c (set_directories_command): Constify.
2499         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
2500         * serial.c (set_parity): Constify.
2501         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
2502         * remote.c (set_remote_exec_file, set_remotebreak)
2503         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
2504         * record.c (set_record_insn_history_size)
2505         (set_record_call_history_size): Constify.
2506         * record-full.c (set_record_full_insn_max_num): Constify.
2507         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
2508         * osabi.c (set_osabi): Constify.
2509         * mips-tdep.c (set_mips64_transfers_32bit_regs)
2510         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
2511         * maint.c (maintenance_set_profile_cmd): Constify.
2512         * linux-thread-db.c (set_libthread_db_search_path): Constify.
2513         * language.c (set_language_command, set_range_command)
2514         (set_case_command): Constify.
2515         * infrun.c (set_non_stop, set_observer_mode)
2516         (set_stop_on_solib_events, set_schedlock_func)
2517         (set_exec_direction_func): Constify.
2518         * infcmd.c (set_inferior_tty_command): Constify.
2519         * disasm.c (set_disassembler_options_sfunc): Constify.
2520         * demangle.c (set_demangling_command): Constify.
2521         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
2522         * cris-tdep.c (set_cris_version, set_cris_mode)
2523         (set_cris_dwarf2_cfi): Constify.
2524         * corefile.c (set_gnutarget_command): Constify.
2525         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
2526         (set_target_wide_charset_sfunc): Constify.
2527         * breakpoint.c (update_dprintf_commands): Constify.
2528         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
2529         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
2530         (set_disassembly_style_sfunc): Constify.
2531         * arch-utils.c (set_endian, set_architecture): Constify.
2532         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
2533         * agent.c (set_can_use_agent): Constify.
2534
2535 2017-11-07  Tom Tromey  <tom@tromey.com>
2536
2537         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
2538         (go32_pde, go32_pte, go32_pte_for_address): Constify.
2539         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
2540         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
2541         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
2542         (parse_int_arg, show_thread_default_detach_sc_cmd)
2543         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
2544         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
2545         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
2546         (show_task_pause_cmd, set_task_detach_sc_cmd)
2547         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
2548         (set_noninvasive_cmd, set_thread_pause_cmd)
2549         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
2550         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
2551         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
2552         * windows-nat.c (display_selectors): Constify.
2553         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
2554         non-const "cfunc".
2555         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
2556         (cmd_cfunc_eq): Likewise.
2557         (struct cmd_list_element): Likewise.
2558         (do_cfunc): Remove.
2559         (cli_user_command_p): Update.
2560         * command.h (add_cmd): Remove non-const overload.
2561         (cmd_cfunc_ftype): Remove typedef.
2562         (cmd_cfunc_eq): Remove non-const overload.
2563         * value.c (show_values): Constify.
2564         * thread.c (thread_apply_all_command): Constify.
2565         * symfile.c (load_command): Constify.
2566         * source.c (directory_command): Constify.
2567         * maint.c (maintenance_internal_error)
2568         (maintenance_demangler_warning, maintenance_space_display)
2569         (maintenance_print_architecture, maintenance_translate_address)
2570         (maintenance_info_selftests, maintenance_internal_warning):
2571         Constify.
2572         * breakpoint.c (disable_trace_command, enable_trace_command):
2573         Constify.
2574         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
2575         Constify.
2576         (add_auto_load_safe_path): Constify.
2577         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
2578         * top.h (show_commands): Constify.
2579         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
2580         * sparc64-tdep.c (adi_examine_command): Constify.
2581         (adi_assign_command): Constify.
2582
2583 2017-11-07  Tom Tromey  <tom@tromey.com>
2584
2585         * frame.h (info_locals_command, info_args_command): Constify.
2586         * auto-load.h (auto_load_info_scripts): Constify.
2587         * inferior.h (registers_info): Constify.
2588         * copying.c: Rebuild.
2589         * copying.awk: Constify generated commands.
2590         * auto-load.c (auto_load_info_scripts)
2591         (info_auto_load_gdb_scripts): Constify.
2592         * cli/cli-decode.c (struct cmd_list_element): Take a
2593         cmd_const_cfunc_ftype.
2594         * command.h (add_info): Take a cmd_const_cfunc_ftype.
2595         * tui/tui-win.c (tui_all_windows_info): Constify.
2596         * python/py-auto-load.c (info_auto_load_python_scripts):
2597         Constify.
2598         * cli/cli-cmds.c (show_command): Remove non-const overload.
2599         * tracepoint.c (info_tvariables_command, info_scope_command):
2600         Constify.
2601         (info_static_tracepoint_markers_command): Constify.
2602         * thread.c (info_threads_command): Constify.
2603         (print_thread_info_1): Constify.
2604         * target.c (info_target_command): Constify.
2605         * symtab.c (info_sources_command, info_functions_command)
2606         (info_types_command): Constify.
2607         (info_variables_command): Remove non-const overload.
2608         * symfile.c (info_ext_lang_command): Constify.
2609         * stack.c (info_frame_command, info_locals_command)
2610         (info_args_command): Constify.
2611         (backtrace_command): Remove non-const overload.
2612         * source.c (info_source_command, info_line_command): Constify.
2613         * solib.c (info_sharedlibrary_command): Constify.
2614         * skip.c (info_skip_command): Constify.
2615         * ser-go32.c (info_serial_command): Constify.
2616         * reverse.c (info_bookmarks_command): Constify.
2617         * printcmd.c (info_symbol_command, info_address_command)
2618         (info_display_command): Constify.
2619         * osdata.c (info_osdata_command): Constify.
2620         * objc-lang.c (info_selectors_command, info_classes_command):
2621         Constify.
2622         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
2623         * memattr.c (info_mem_command): Constify.
2624         * macrocmd.c (info_macro_command, info_macros_command): Constify.
2625         * linux-fork.c (info_checkpoints_command): Constify.
2626         * infrun.c (info_signals_command): Constify.
2627         * inflow.c (info_terminal_command): Constify.
2628         * inferior.c (info_inferiors_command): Constify.
2629         (print_inferior): Constify.
2630         * infcmd.c (info_program_command, info_all_registers_command)
2631         (info_registers_command, info_vector_command)
2632         (info_float_command): Constify.
2633         (registers_info): Constify.
2634         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
2635         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
2636         Constify.
2637         * f-valprint.c (info_common_command): Constify.
2638         * dcache.c (info_dcache_command): Constify.
2639         (dcache_info_1): Constify.
2640         * darwin-nat-info.c (info_mach_tasks_command)
2641         (info_mach_task_command, info_mach_ports_command)
2642         (info_mach_port_command, info_mach_threads_command)
2643         (info_mach_thread_command, info_mach_regions_command)
2644         (info_mach_regions_recurse_command, info_mach_region_command)
2645         (info_mach_exceptions_command): Constify.
2646         (get_task_from_args): Constify.
2647         * cp-support.c (info_vtbl_command): Constify.
2648         * breakpoint.c (info_watchpoints_command)
2649         (info_tracepoints_command): Constify.
2650         (info_breakpoints_command): Remove non-const overload.
2651         * avr-tdep.c (avr_io_reg_read_command): Constify.
2652         * auxv.c (info_auxv_command): Constify.
2653         * ada-tasks.c (info_tasks_command): Constify.
2654         (info_task): Constify.
2655         * ada-lang.c (info_exceptions_command): Constify.
2656
2657 2017-11-07  Tom Tromey  <tom@tromey.com>
2658
2659         * solib.h (no_shared_libraries): Constify.
2660         * frame.h (return_command): Constify.
2661         * cli/cli-cmds.h (quit_command): Constify.
2662         * top.h (quit_command, execute_command): Constify.
2663         * target.h (flash_erase_command): Constify.
2664         * inferior.h (set_inferior_args, attach_command): Constify.
2665         * tracepoint.h (start_tracing, stop_tracing): Constify.
2666         * breakpoint.h (break_command, tbreak_command)
2667         (hbreak_command_wrapper, thbreak_command_wrapper)
2668         (rbreak_command_wrapper, watch_command_wrapper)
2669         (awatch_command_wrapper, rwatch_command_wrapper)
2670         (get_tracepoint_by_number): Constify.
2671         * symtab.c (info_variables_command, rbreak_command)
2672         (symtab_symbol_info): Constify.
2673         (info_variables_command): Add non-const overload.
2674         * top.c (dont_repeat_command): Constify.
2675         * breakpoint.c (ignore_command, commands_command)
2676         (condition_command, tbreak_command, hbreak_command)
2677         (thbreak_command, clear_command, break_command)
2678         (info_breakpoints_command, watch_command, rwatch_command)
2679         (awatch_command, trace_command, ftrace_command, strace_command)
2680         (trace_pass_command, break_range_command, dprintf_command)
2681         (agent_printf_command, get_tracepoint_by_number)
2682         (watch_maybe_just_location, trace_pass_command): Constify.
2683         (info_breakpoints_command): Add non-const overload.
2684         * tracefile.c (tsave_command): Constify.
2685         * infcmd.c (attach_command, disconnect_command, signal_command)
2686         (queue_signal_command, stepi_command, nexti_command)
2687         (finish_command, next_command, step_command, until_command)
2688         (advance_command, jump_command, continue_command, run_command)
2689         (start_command, starti_command, interrupt_command)
2690         (run_command_1, set_inferior_args, step_1): Constify.
2691         * inferior.c (add_inferior_command, remove_inferior_command)
2692         (clone_inferior_command): Constify.
2693         * linux-fork.c (checkpoint_command, restart_command): Constify.
2694         * windows-nat.c (signal_event_command): Constify.
2695         * guile/guile.c (guile_repl_command, guile_command): Constify.
2696         * printcmd.c (x_command, display_command, printf_command)
2697         (output_command, set_command, call_command, print_command)
2698         (eval_command): Constify.
2699         (non_const_set_command): Remove.
2700         (_initialize_printcmd): Update.
2701         * source.c (forward_search_command, reverse_search_command):
2702         Constify.
2703         * jit.c (jit_reader_load_command, jit_reader_unload_command):
2704         Constify.
2705         * infrun.c (handle_command): Constify.
2706         * memattr.c (mem_command): Constify.
2707         * stack.c (return_command, up_command, up_silently_command)
2708         (down_command, down_silently_command, frame_command)
2709         (backtrace_command, func_command, backtrace_command_1): Constify.
2710         (backtrace_command): Add non-const overload.
2711         * remote-sim.c (simulator_command): Constify.
2712         * exec.c (set_section_command): Constify.
2713         * tracepoint.c (tdump_command, trace_variable_command)
2714         (tstatus_command, tstop_command, tstart_command)
2715         (end_actions_pseudocommand, while_stepping_pseudocommand)
2716         (collect_pseudocommand, teval_pseudocommand, actions_command)
2717         (start_tracing, stop_tracing): Constify.
2718         * value.c (init_if_undefined_command): Constify.
2719         * tui/tui-stack.c (tui_update_command): Constify.
2720         * tui/tui-win.c (tui_refresh_all_command)
2721         (tui_set_tab_width_command, tui_set_win_height_command)
2722         (tui_set_focus_command, tui_scroll_forward_command)
2723         (tui_scroll_backward_command, tui_scroll_left_command)
2724         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
2725         (tui_set_win_height): Constify.
2726         * tui/tui-layout.c (tui_layout_command): Constify.
2727         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
2728         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
2729         (proc_untrace_sysexit_cmd): Constify.
2730         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
2731         (threadset_test_cmd, threadlist_update_test_cmd)
2732         (threadalive_test): Constify.
2733         * objc-lang.c (print_object_command): Constify.
2734         * command.h (add_com): Constify.
2735         * cli/cli-dump.c (restore_command): Constify.
2736         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
2737         (help_command, complete_command, shell_command, edit_command)
2738         (list_command, disassemble_command, make_command)
2739         (apropos_command, alias_command): Constify.
2740         * cli/cli-script.c (document_command, define_command)
2741         (while_command, if_command, validate_comname): Constify.
2742         * cli/cli-decode.c (struct cmd_list_element): Change type of
2743         "fun".
2744         * target.c (do_monitor_command, flash_erase_command): Constify.
2745         * regcache.c (reg_flush_command): Constify.
2746         * reverse.c (reverse_step, reverse_next, reverse_stepi)
2747         (reverse_nexti, reverse_continue, reverse_finish)
2748         (save_bookmark_command, goto_bookmark_command)
2749         (exec_reverse_once): Constify.
2750         * python/python.c (python_interactive_command, python_command):
2751         Constify.
2752         * typeprint.c (ptype_command, whatis_command, whatis_exp):
2753         Constify.
2754         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
2755         * gcore.c (gcore_command): Constify.
2756
2757 2017-11-07  Tom Tromey  <tom@tromey.com>
2758
2759         * printcmd.c (x_command): Call set_repeat_arguments.
2760         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
2761         * top.c (repeat_arguments): New global.
2762         (set_repeat_arguments): New function.
2763         (execute_command): Handle repeat_arguments.
2764         (show_commands): Calls set_repeat_arguments.
2765         * command.h (set_repeat_arguments): Declare.
2766
2767 2017-11-07  Tom Tromey  <tom@tromey.com>
2768
2769         * stack.c (backtrace_command): Use std::string.
2770         (backtrace_command_1): Make "count_exp" const.
2771
2772 2017-11-07  Tom Tromey  <tom@tromey.com>
2773
2774         * source.c (directory_switch, mod_path, add_path): Constify.
2775         * defs.h (add_path, mod_path, directory_switch): Constify.
2776         * mi/mi-cmd-env.c (env_mod_path): Constify.
2777
2778 2017-11-07  Tom Tromey  <tom@tromey.com>
2779
2780         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
2781         (run_command_1, continue_command, step_1, jump_command)
2782         (signal_command, until_command, advance_command, finish_command)
2783         (attach_command): Update.
2784
2785 2017-11-07  Tom Tromey  <tom@tromey.com>
2786
2787         * command.h (set_cmd_cfunc): Don't declare.
2788         * cli/cli-decode.c (set_cmd_cfunc): Now static.
2789
2790 2017-11-07  Tom Tromey  <tom@tromey.com>
2791
2792         * stack.c (select_frame_command): Constify.
2793         * cli/cli-decode.c (add_com_suppress_notification): Constify.
2794         * command.h (add_com_suppress_notification): Constify.
2795
2796 2017-11-07  Tom Tromey  <tom@tromey.com>
2797
2798         * breakpoint.c (stop_command): Constify.
2799         * cli/cli-decode.c (struct cmd_list_element): Constify.
2800         * command.h (add_abbrev_prefix_cmd): Constify.
2801
2802 2017-11-07  Pedro Alves  <palves@redhat.com>
2803
2804         * breakpoint.c (extract_bp_kind): New enum.
2805         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
2806         factored out from ...
2807         (extract_bp_number_and_location): ... here.
2808         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
2809
2810 2017-11-07  Pedro Alves  <palves@redhat.com>
2811
2812         * breakpoint.c (extract_bp_number_and_location): Change return
2813         type to void.  Throw error instead of warning.
2814         (enable_disable_command): Adjust.
2815
2816 2017-11-07  Xavier Roirand  <roirand@adacore.com>
2817             Pedro Alves  <palves@redhat.com>
2818
2819         * breakpoint.c (map_breakpoint_number_range): New, factored out
2820         from ...
2821         (map_breakpoint_numbers): ... here.
2822         (find_location_by_number): Change parameters from string to
2823         breakpoint number and location.
2824         (extract_bp_number_and_location): New function.
2825         (enable_disable_bp_num_loc)
2826         (enable_disable_breakpoint_location_range)
2827         (enable_disable_command): New functions, factored out ...
2828         (enable_command, disable_command): ... these functions, and
2829         adjusted to support ranges.
2830         * NEWS: Document enable/disable breakpoint location range feature.
2831
2832 2017-11-06  Luis Machado  <luis.machado@linaro.org>
2833
2834         * MAINTAINERS (Write After Approval): Update my e-mail address.
2835
2836 2017-11-06  Pedro Alves  <palves@redhat.com>
2837
2838         * gnu-nat.c (gnu_terminal_init): Delete.
2839         (gnu_target): Don't install gnu_terminal_init.
2840         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
2841         (child_terminal_init): ... this function.
2842
2843 2017-11-06  Pedro Alves  <palves@redhat.com>
2844
2845         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
2846         sgtty.h.
2847         * config.in, configure: Regenerate.
2848
2849 2017-11-06  Pedro Alves  <palves@redhat.com>
2850
2851         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
2852         (async_init_signals): Adjust.
2853         (handle_stop_sig): Rename to ...
2854         (handle_sigtstp): ... this.
2855         (async_stop_sig): Rename to ...
2856         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
2857         SIGTSTP path.
2858         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
2859         instead of STOP_SIGNAL thoughout.
2860         (handle_stop_sig): Rename to ...
2861         (handle_sigtstp): ... this.
2862         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
2863
2864 2017-11-06  Pedro Alves  <palves@redhat.com>
2865
2866         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
2867         longer set flags twice in row.
2868
2869 2017-11-06  Pedro Alves  <palves@redhat.com>
2870
2871         * Makefile.in (SER_HARDWIRE): Update comment.
2872         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
2873         * common/gdb_termios.h: Delete file.
2874         * common/job-control.c: Include termios.h and unistd.h instead of
2875         gdb_termios.h.
2876         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
2877         check.
2878         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
2879         Remove sgtty code.
2880         * configure.ac: No longer check for termio.h and sgtty.h.
2881         * configure: Regenerate.
2882         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
2883         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
2884         Replace PROCESS_GROUP_TYPE references with pid_t references
2885         throughout.
2886         (gdb_getpgrp): Delete.
2887         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
2888         (child_terminal_inferior): Remove comment.  Remove sgtty code.
2889         (child_terminal_ours_1): Use tcgetpgrp directly instead of
2890         gdb_getpgrp.  Use serial_set_tty_state instead aof
2891         serial_noflush_set_tty_state.  Remove sgtty code.
2892         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
2893         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
2894         (inferior_process_group): Now returns pid_t.
2895         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
2896         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
2897         * ser-event.c (serial_event_ops): Update.
2898         * ser-go32.c (dos_noflush_set_tty_state): Delete.
2899         (dos_ops): Update.
2900         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
2901         * ser-pipe.c (pipe_ops): Update.
2902         * ser-tcp.c (tcp_ops): Update.
2903         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
2904         HAVE_TERMIOS checks.
2905         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
2906         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
2907         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
2908         assume termios.
2909         (hardwire_noflush_set_tty_state): Delete.
2910         (hardwire_print_tty_state, hardwire_drain_output)
2911         (hardwire_flush_output, hardwire_flush_input)
2912         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
2913         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
2914         code, and assume termios.
2915         (hardwire_ops): Update.
2916         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
2917         * serial.c (serial_noflush_set_tty_state): Delete.
2918         * serial.h (serial_noflush_set_tty_state): Delete.
2919         (serial_ops::noflush_set_tty_state): Delete.
2920
2921 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
2922
2923         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
2924         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
2925         (COMMON_OBS): Remove doublest.o and dfp.o.
2926         Do not build target-float.c (instead of doublest.c)
2927         with -Wformat-nonliteral.
2928
2929         * doublest.c: Remove file.
2930         * doublest.h: Remove file.
2931         * dfp.c: Remove file.
2932         * dfp.h: Remove file.
2933
2934         * target-float.c: Do not include "doublest.h" and "dfp.h".
2935         (DOUBLEST): Move here from doublest.h.
2936         (enum float_kind): Likewise.
2937         (FLOATFORMAT_CHAR_BIT): Likewise.
2938         (FLOATFORMAT_LARGEST_BYTES): Likewise.
2939         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
2940         (floatformat_precision): Likewise.
2941         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
2942         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
2943         Likewise.
2944         (host_float_format, host_double_format, host_long_double_format):
2945         Likewise.
2946         (floatformat_to_string, floatformat_from_string): Likewise.
2947         (floatformat_to_doublest): Likewise.  Also, inline the original
2948         convert_floatformat_to_doublest.
2949         (floatformat_from_doublest): Likewise.  Also, inline the original
2950         convert_floatformat_from_doublest.
2951
2952         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
2953         (MAX_DECIMAL_STRING): Move here from dfp.c.
2954         (match_endianness): Likewise.
2955         (set_decnumber_context, decimal_check_errors): Likewise.
2956         (decimal_from_number, decimal_to_number): Likewise.
2957         (decimal_to_string, decimal_from_string): Likewise.  Make static.
2958         (decimal_from_longest, decimal_from_ulongest): Likewise.
2959         (decimal_to_longest): Likewise.
2960         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
2961         (decimal_convert): Likewise.
2962
2963 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
2964
2965         * doublest.c: Do not include "gdbtypes.h".
2966         (extract_typed_floating): Remove.
2967         (store_typed_floating): Remove.
2968         (convert_typed_floating): Remove.
2969         * doublest.h (struct type): Remove.
2970         (DOUBLEST_PRINT_FORMAT): Remove.
2971         (DOUBLEST_SCAN_FORMAT): Remove.
2972         (extract_typed_floating): Remove.
2973         (store_typed_floating): Remove.
2974         (convert_typed_floating): Remove.
2975
2976         * dfp.c (decimal_from_doublest): Remove.
2977         (decimal_to_doublest): Remove.
2978         * dfp.h: Do not include "doublest.h".
2979         (decimal_from_doublest): Remove.
2980         (decimal_to_doublest): Remove.
2981
2982         * value.c: Do not include "doublest.h" and "dfp.h".
2983         (value_as_double): Remove.
2984         (unpack_double): Remove.
2985         (value_from_double): Remove.
2986         (value_from_decfloat): Remove.
2987         * value.h: Do not include "doublest.h".
2988         (value_as_double): Remove.
2989         (unpack_double): Remove.
2990         (value_from_double): Remove.
2991         (value_from_decfloat): Remove.
2992
2993 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
2994
2995         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
2996         (i386_extract_return_value): Use target_float_convert.
2997         (i386_store_return_value): Likewise.
2998         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
2999         (i387_value_to_register): Likewise.
3000         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
3001         (ia64_register_to_value): Use target_float_convert.
3002         (ia64_value_to_register): Likewise.
3003         (ia64_extract_return_value): Likewise.
3004         (ia64_store_return_value): Likewise.
3005         (ia64_push_dummy_call): Likewise.
3006         * m68k-tdep.c: Include "target-float.h".
3007         (m68k_register_to_value): Use target_float_convert.
3008         (m68k_value_to_register): Likewise.
3009         (m68k_svr4_extract_return_value): Likewise.
3010         (m68k_svr4_store_return_value): Likewise.
3011         * ppc-sysv-tdep.c: Include "target-float.h".
3012         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
3013         (do_ppc_sysv_return_value): Likewise.
3014         (ppc64_sysv_abi_push_freg): Likewise.
3015         (ppc64_sysv_abi_return_value_base): Likewise.
3016         * rs6000-aix-tdep.c: Include "target-float.h".
3017         (rs6000_push_dummy_call): Use target_float_convert.
3018         (rs6000_return_value): Likewise.
3019         * rs6000-lynx178-tdep.c: Include "target-float.h".
3020         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
3021         (rs6000_lynx178_return_value): Likewise.
3022         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
3023         (rs6000_register_to_value): Use target_float_convert.
3024         (rs6000_value_to_register): Likewise.
3025         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
3026         (arm_extract_return_value): Use target_float_convert.
3027         (arm_store_return_value): Likewise.
3028         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
3029         (sh_register_convert_to_virtual): Use target_float_convert.
3030         (sh_register_convert_to_raw): Likewise.
3031         * sh64-tdep.c: Include "target-float.h".
3032         (sh64_extract_return_value): Use target_float_convert.
3033         (sh64_register_convert_to_virtual): Likewise.
3034         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
3035
3036 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
3037
3038         * target-float.c (floatformat_to_host_double): New function.
3039         (floatformat_from_host_double): Likewise.
3040         (target_float_to_host_double): Likewise.
3041         (target_float_from_host_double): Likewise.
3042         * target-float.h (target_float_to_host_double): Add prototype.
3043         (target_float_from_host_double): Likewise.
3044
3045         * guile/scm-value.c: Include "target-float.h".
3046         (gdbscm_value_to_real): Use target_float_to_host_double.
3047         Handle integer source values via value_as_long.
3048         * guile/scm-math.c: Include "target-float.h".  Do not include
3049         "doublest.h", "dfp.h", and "expression.h".
3050         (vlscm_convert_typed_number): Use target_float_from_host_double.
3051         (vlscm_convert_number): Likewise.
3052
3053         * python/py-value.c (valpy_float): Use target_float_to_host_double.
3054         (convert_value_from_python): Use target_float_from_host_double.
3055
3056 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
3057
3058         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
3059         (cast_from_fixed): Likewise.
3060         (ada_scaling_type): New function.
3061         (ada_delta): Return value instead of DOUBLEST.  Perform target
3062         arithmetic instead of host arithmetic.
3063         (scaling_factor): Rename to ...
3064         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
3065         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
3066         (ada_fixed_to_float): Remove.
3067         (ada_float_to_fixed): Remove.
3068         * ada-lang.h (ada_fixed_to_float): Remove.
3069         (ada_float_to_fixed): Remove.
3070         (ada_delta): Return value instead of DOUBLEST.
3071         (ada_scaling_factor): Add prototype.
3072
3073         * ada-typeprint.c: Include "target-float.h".
3074         (print_fixed_point_type): Perform target arithmetic instead of
3075         host arithmetic.
3076         * ada-valprint.c: Include "target-float.h".
3077         (ada_val_print_num): Perform target arithmetic instead of
3078         host arithmetic for fixed-point types.
3079
3080 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
3081
3082         * target-float.c: Include <math.h>.
3083         (floatformat_binop): New function.
3084         (floatformat_compare): Likewise.
3085         (target_float_binop): Likewise.
3086         (target_float_compare): Likewise.
3087         * target-float.h: Include "expression.h".
3088         (target_float_binop): Add prototype.
3089         (target_float_compare): Likewise.
3090
3091         * valarith.c: Do not include "doublest.h" and "dfp.h".
3092         Include "common/byte-vector.h".
3093         (value_args_as_decimal): Remove, replace by ...
3094         (value_args_as_target_float): ... this function.  Handle both
3095         binary and decimal target floating-point formats.
3096         (scalar_binop): Handle both binary and decimal FP using
3097         value_args_as_target_float and target_float_binop.
3098         (value_equal): Handle both binary and decimal FP using
3099         value_args_as_target_float and target_float_compare.
3100         (value_less): Likewise.
3101         (value_pos): Handle all scalar types as simple copy.
3102         (value_neg): Handle all scalar types via BINOP_SUB from 0.
3103         * dfp.c (decimal_binop): Throw error instead of internal_error
3104         when called with an unsupported operation code.
3105
3106 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
3107
3108         * target-float.c (target_float_to_string): New function.
3109         (target_float_from_string): New function.
3110         * target-float.h (target_float_to_string): Add prototype.
3111         (target_float_from_string): Add prototype.
3112
3113         * valprint.c: Include "target-float.h".  Do not include
3114         "doublest.h" and "dfp.h".
3115         (print_floating): Use target_float_to_string.
3116         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
3117         (printf_floating): Use target_float_to_string.
3118         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
3119         (print_i387_value): Use target_float_to_string.
3120         * mips-tdep.c: Include "target-float.h".
3121         (mips_print_fp_register): Use target_float_to_string.
3122         * sh64-tdep.c: Include "target-float.h".
3123         (sh64_do_fp_register): Use target_float_to_string.
3124
3125         * parse.c: Include "target-float.h".  Do not include
3126         "doublest.h" and "dfp.h".
3127         (parse_float): Use target_float_from_string.
3128         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
3129         (define_symbol): Use target_float_from_string.
3130         * gdbarch-selftests.c: Include "target-float.h".
3131         (register_to_value_test): Use target_float_from_string.
3132
3133 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
3134
3135         * Makefile.c (SFILES): Add target-float.c.
3136         (HFILES_NO_SRCDIR): Add target-float.h.
3137         (COMMON_OBS): Add target-float.o.
3138         * target-float.h: New file.
3139         * target-float.c: New file.
3140
3141         * doublest.c (floatformat_classify): Fix detection of float_zero.
3142
3143         * gdbtypes.c (is_floating_type): New function.
3144         * gdbtypes.h (is_floating_type): Add prototype.
3145
3146         * value.c: Do not include "floatformat.h".
3147         (unpack_double): Use target_float_is_valid.
3148         (is_floating_value): New function.
3149         * value.h (is_floating_value): Add prototype-
3150
3151         * valarith.c: Include "target-float.h".
3152         (value_logical_not): Use target_float_is_zero.
3153
3154         * python/py-value.c: Include "target-float.h".
3155         (valpy_nonzero): Use target_float_is_zero.
3156
3157 2017-11-04  Tom Tromey  <tom@tromey.com>
3158
3159         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
3160
3161 2017-11-04  Tom Tromey  <tom@tromey.com>
3162
3163         * breakpoint.c (set_momentary_breakpoint): Return
3164         breakpoint_up.
3165         (until_break_command): Update.
3166         (new_until_break_fsm): Change argument types to
3167         breakpoint_up.
3168         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3169         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
3170         Remove.
3171         * infcmd.c (finish_forward): Update.
3172         * breakpoint.h (set_momentary_breakpoint)
3173         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3174         (make_cleanup_delete_breakpoint): Remove.
3175         (struct breakpoint_deleter): New.
3176         (breakpoint_up): New typedef.
3177         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
3178         (insert_exception_resume_breakpoint): Update.
3179         (insert_exception_resume_from_probe): Update.
3180         (insert_longjmp_resume_breakpoint): Update.
3181         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
3182         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
3183         * infcall.c (call_function_by_hand_dummy): Update
3184
3185 2017-11-04  Tom Tromey  <tom@tromey.com>
3186
3187         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
3188
3189 2017-11-04  Tom Tromey  <tom@tromey.com>
3190
3191         * linux-tdep.c (linux_core_info_proc_mappings): Use
3192         gdb::def_vector.
3193         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
3194         "size" argument.
3195         (linux_corefile_thread): Update.
3196         (linux_make_corefile_notes): Remove unused variable.
3197
3198 2017-11-04  Tom Tromey  <tom@tromey.com>
3199
3200         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
3201         gdb::byte_vector.
3202
3203 2017-11-04  Tom Tromey  <tom@tromey.com>
3204
3205         * objfiles.c (do_free_objfile_cleanup): Remove.
3206         * compile/compile-object-load.c (compile_object_load): Update.
3207         * objfiles.h (make_cleanup_free_objfile): Remove.
3208
3209 2017-11-04  Tom Tromey  <tom@tromey.com>
3210
3211         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
3212         (adi_read_versions): Change "tags" to "gdb_byte *".
3213         (adi_print_versions): Likewise.
3214
3215 2017-11-04  Tom Tromey  <tom@tromey.com>
3216
3217         * breakpoint.c
3218         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
3219         from start_rbreak_breakpoints.
3220         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
3221         * breakpoint.h (class scoped_rbreak_breakpoints): New.
3222         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
3223         * symtab.c (do_end_rbreak_breakpoints): Remove.
3224         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
3225
3226 2017-11-04  Tom Tromey  <tom@tromey.com>
3227
3228         * cp-namespace.c (reset_directive_searched): Remove.
3229         (cp_lookup_symbol_via_imports): Use scoped_restore.
3230         * cp-support.c (reset_directive_searched): Remove.
3231         (make_symbol_overload_list_using): Use scoped_restore.
3232         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
3233         (reset_directive_searched): Remove.
3234
3235 2017-11-04  Tom Tromey  <tom@tromey.com>
3236
3237         * symfile.c (find_separate_debug_file_by_debuglink): Use
3238         unique_xmalloc_ptr.
3239
3240 2017-11-04  Tom Tromey  <tom@tromey.com>
3241
3242         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
3243         type of "info".
3244         (compute_stack_depth): Likewise.
3245         (do_compile_dwarf_expr_to_c): Use std::vector.
3246
3247 2017-11-04  Tom Tromey  <tom@tromey.com>
3248
3249         * compile/compile-object-load.c (link_callbacks_einfo): Use
3250         std::string.
3251
3252 2017-11-04  Tom Tromey  <tom@tromey.com>
3253
3254         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3255         Use scoped_free_pendings.
3256         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
3257         scoped_free_pendings.
3258         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
3259         (xcoff_initial_scan): Likewise.
3260         * buildsym.c (reset_symtab_globals): Update comment.
3261         (scoped_free_pendings): Rename from really_free_pendings.
3262         (prepare_for_building): Update comment.
3263         (buildsym_init): Likewise.
3264         * buildsym.h (class scoped_free_pendings): New class.
3265         (really_free_pendings): Don't declare.
3266
3267 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
3268
3269         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
3270         output when converting a zero value to a special byteorder format.
3271
3272 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3273
3274         * frame.c (do_frame_register_read): Remove aspace.
3275         * jit.c (jit_frame_sniffer): Likwise.
3276         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3277         * regcache.c (regcache::regcache): Pass nullptr.
3278         (regcache_print): Caller updated.
3279         * regcache.h (regcache::regcache): Remove one constructor
3280         parameter aspace.
3281
3282 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3283
3284         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
3285
3286 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3287
3288         * breakpoint.c (insert_single_step_breakpoints): Update.
3289         * frame.c (struct frame_info) <aspace>: Add const.
3290         (frame_save_as_regcache): Add const.
3291         (get_frame_address_space): Return const address_space *.
3292         * frame.h (get_frame_address_space): Update declaration.
3293         * infrun.c (struct step_over_info) <aspace>: Add const.
3294         (set_step_over_info): Make aspace const.
3295         (displaced_step_prepare_throw): Change variable const.
3296         (resume): Likewise.
3297         (proceed): Likewise.
3298         (adjust_pc_after_break): Likewise.
3299         (save_waitstatus): Likewise.
3300         (handle_signal_stop): Likewise.
3301         (keep_going_pass_signal): Likewise.
3302         * jit.c (jit_frame_sniffer): Add const.
3303         * mips-tdep.c (mips_single_step_through_delay): Likewise.
3304         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3305         * record-full.c (record_full_wait_1): Likewise.
3306         * regcache.c (regcache::regcache): Change parameter to const.
3307         * regcache.h (regcache::regcache): Likewise.
3308         (regcache::aspace): Return const address_space *.
3309         (regcache) <m_aspace>: Add const.
3310
3311 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3312
3313         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
3314         * frame.c (create_sentinel_frame): Likewise.
3315         * infrun.c (displaced_step_prepare_throw): Likewise.
3316         (resume): Likewise.
3317         (thread_still_needs_step_over_bp): Likewise.
3318         (proceed): Likewise.
3319         (do_target_wait): Likewise.
3320         (adjust_pc_after_break): Likewise.
3321         (handle_syscall_event): Likewise.
3322         (save_waitstatus): Likewise.
3323         (handle_inferior_event_1): Likewise.
3324         (handle_signal_stop): Likewise.
3325         (keep_going_pass_signal): Likewise.
3326         * linux-nat.c (status_callback): Likewise.
3327         (save_stop_reason): Likewise.
3328         (resume_stopped_resumed_lwps): Likewise.
3329         * record-full.c (record_full_exec_insn): Likewise.
3330         (record_full_wait_1): Likewise.
3331         * regcache.c (get_regcache_aspace): Remove.
3332         * regcache.h (get_regcache_aspace): Remove.
3333
3334 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3335
3336         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
3337         (init_regcache_descr): Use gdbarch_num_regs.
3338         (regcache::regcache): Likewise.
3339         (regcache::get_register_status): Likewise.
3340         (regcache::assert_raw_regnum): Likewise.
3341         (regcache::cooked_read): Likewise.
3342         (regcache::cooked_read_value): Likewise.
3343         (regcache::cooked_write): Likewise.
3344         (regcache::dump): Likewise.
3345         (regcache::num_raw_registers): New method.
3346         * regcache.h (class regcache) <num_raw_registers>: New.
3347
3348 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3349
3350         * regcache.c (regcache::assert_regnum): New method.
3351         (regcache::invalidate): Call assert_regnum.
3352         (regcache::raw_update): Likewise.
3353         (regcache::raw_write): Likewise.
3354         (regcache::raw_read_part): Likewise.
3355         (regcache::raw_write_part): Likewise.
3356         (regcache::raw_supply): Likewise.
3357         (regcache::raw_supply_integer): Likewise.
3358         (regcache::raw_supply_zeroed): Likewise.
3359         (regcache::raw_collect): Likewise.
3360         (regcache::raw_collect_integer): Likewise.
3361         * regcache.h (regcache::assert_regnum): Declare.
3362
3363 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3364
3365         * regcache.c (regcache::dump): Remove code.
3366
3367 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3368
3369         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
3370         Remove.
3371         <sizeof_cooked_register_status>: Remove.
3372         (init_regcache_descr): Update.
3373         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
3374         (regcache::save): Likewise.
3375         (regcache::dump): Likewise.
3376
3377 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
3378
3379         * ft32-tdep.c (ft32_fetch_instruction): New function.
3380         (ft32_analyze_prologue): Use ft32_fetch_instruction().
3381
3382 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
3383
3384         * cli/cli-script.c (execute_control_command): Rename to ...
3385         (execute_control_command_1): ... this.
3386         (execute_control_command): New function.
3387
3388 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
3389
3390         * tracepoint.c (tfind_command): Remove const_cast.
3391
3392 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
3393
3394         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
3395
3396 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
3397
3398         * common/common-utils.h (in_inclusive_range): New function.
3399         * arm-tdep.c (arm_record_extension_space): Use
3400         in_inclusive_range.
3401         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
3402         * cris-tdep.c (cris_spec_reg_applicable): Use
3403         in_inclusive_range.
3404
3405 2017-10-30  Pedro Alves  <palves@redhat.com>
3406             Simon Marchi <simon.marchi@ericsson.com>
3407
3408         * remote.c (remote_set_syscall_catchpoint): Build a std::string
3409         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
3410
3411 2017-10-30  Pedro Alves  <palves@redhat.com>
3412
3413         * common/common-utils.c (string_appendf, string_vappendf): New
3414         functions.
3415         * common/common-utils.h (string_appendf, string_vappendf): New
3416         declarations.
3417         * unittests/common-utils-selftests.c (string_appendf_func)
3418         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
3419         (string_vappendf_tests): New functions.
3420         (_initialize_common_utils_selftests): Register "string_appendf" and
3421         "string_vappendf tests".
3422
3423 2017-10-30  Pedro Alves  <palves@redhat.com>
3424
3425         * unittests/common-utils-selftests.c (format_func): New typedef.
3426         (string_printf_tests, string_vprintf_tests): Tests factored out
3427         and merged to ...
3428         (test_format_func): ... this new function.
3429         (string_printf_tests, string_vprintf_tests): Reimplement on top of
3430         test_format_func.
3431
3432 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
3433
3434         * darwin-nat.c: Remove include of gdb.h.
3435
3436 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
3437
3438         * xtensa-xtregs.c: Fix formatting issues.
3439
3440 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
3441
3442         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
3443
3444 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
3445
3446         PR python/21213
3447         * python/py-infthread.c (thpy_get_inferior): Increment reference
3448         of inferior before returning it.
3449
3450 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
3451
3452         * unittests/common-utils-selftests.c (format): Add
3453         ATTRIBUTE_PRINTF.
3454
3455 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
3456
3457         * xml-syscall.c (struct syscall_desc): Add constructor.
3458         <name>: Change type to std::string.
3459         (syscall_desc_up): New typedef.
3460         (syscall_desc_p): Remove typeder.
3461         (DEF_VEC_P(syscall_desc_p)): Remove.
3462         (struct syscall_group_desc): Add constructor.
3463         <name>: Change type to std::string.
3464         <syscalls>: Change type to std::vector.
3465         (syscall_group_desc_up): New typedef.
3466         (syscall_group_desc_p): Remove typedef.
3467         (DEF_VEC_P(syscall_group_desc_p)): Remove.
3468         (struct syscalls_info) <syscalls>: Change type to std::vector of
3469         unique_ptr.
3470         <groups>: Likewise.
3471         <my_gdb_datadir>: Change type to std::string.
3472         (syscalls_info_up): New typedef.
3473         (allocate_syscalls_info): Remove.
3474         (syscalls_info_free_syscalls_desc): Remove.
3475         (syscalls_info_free_syscall_group_desc): Remove.
3476         (free_syscalls_info): Remove.
3477         (make_cleanup_free_syscalls_info): Remove.
3478         (syscall_group_create_syscall_group_desc): Adjust.
3479         (syscall_group_add_syscall): Adjust.
3480         (syscall_create_syscall_desc): Adjust.
3481         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
3482         (init_syscalls_info): Adjust.
3483         (syscall_group_get_group_by_name): Adjust.
3484         (xml_get_syscall_number): Adjust.
3485         (xml_get_syscall_name): Adjust.
3486         (xml_list_of_syscalls): Adjust.
3487         (xml_list_syscalls_by_group): Adjust.
3488         (xml_list_of_groups): Adjust.
3489
3490 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
3491
3492         * probe.h: Don't include gdb_vecs.h.
3493         (DEF_VEC_P (probe_p)): Remove.
3494         (find_probes_in_objfile): Return an std::vector.
3495         * probe.c (find_probes_in_objfile): Likewise.
3496         * breakpoint.c (breakpoint_objfile_data)
3497         <longjmp_probes>: Change type to std::vector.
3498         <exception_probes>: Likewise.
3499         (free_breakpoint_probes): Don't manually free vectors.
3500         (create_longjmp_master_breakpoint): Adjust.
3501         (create_exception_master_breakpoint): Adjust.
3502         * solib-svr4.c (svr4_create_probe_breakpoints): Change
3503         parameter type, adjust.
3504         (svr4_create_solib_event_breakpoints): Adjust.
3505
3506 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
3507
3508         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
3509         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
3510         with new.
3511         (free_breakpoint_probes): Rename to ...
3512         (free_breakpoint_objfile_data): ... this, and call delete on
3513         bp_objfile_data..
3514
3515 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
3516
3517         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
3518         (loaded_script_ptr): Remove typedef.
3519         (DEF_VEC_P (loaded_script_ptr)): Remove.
3520         (struct collect_matching_scripts_data): Add constructor.
3521         <scripts_p>: Change type to (pointer to) std::vector.
3522         (collect_matching_scripts_data): Adjust.
3523         (sort_scripts_by_name): Make suitable for std::sort.
3524         (print_scripts): Don't sort vector, adjust to std::vector.
3525         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
3526
3527 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
3528
3529         * symfile.c (filename_language): Make struct, not typedef.  Add
3530         constructor.
3531         <ext>: Change type to std::string.
3532         (DEF_VEC_O (filename_language)): Remove.
3533         (filename_language_table): Change type to std::vector.
3534         (add_filename_language): Adjust.
3535         (set_ext_lang_command): Adjust.
3536         (info_ext_lang_command): Adjust.
3537         (deduce_language_from_filename): Adjust.
3538         (class scoped_restore_filename_language_table): Remove.
3539         (test_filename_language): Use scoped_restore.
3540         (test_set_ext_lang_command): Use scoped_restore, adjust to
3541         std::vector change.
3542
3543 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
3544
3545         * symfile.c: Include selftest.h.
3546         (class scoped_restore_filename_language_table): New.
3547         (test_filename_language): New test.
3548         (test_set_ext_lang_command): New test.
3549         (_initialize_symfile): Register tests.
3550
3551 2017-10-27  Keith Seitz  <keiths@redhat.com>
3552
3553         * breakpoint.c (print_breakpoint_location): Use the symbol saved
3554         in the bp_location, falling back to find_pc_sect_function when
3555         needed.
3556         (add_location_to_breakpoint): Save sal->symbol.
3557         * breakpoint.h (struct bp_location) <symbol>: New field.
3558         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
3559         * symtab.h (struct symtab_and_line) <symbol>: New field.
3560
3561 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
3562
3563         PR gdb/13669
3564         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
3565         to rewind obstack.
3566
3567 2017-10-26  Pedro Alves  <palves@redhat.com>
3568
3569         * remote.c (remote_async_terminal_ours_p): Delete.
3570         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
3571         Remove references to 'remote_async_terminal_ours_p'.
3572
3573 2017-10-26  Yao Qi  <yao.qi@linaro.org>
3574
3575         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
3576
3577 2017-10-26  Yao Qi  <yao.qi@linaro.org>
3578
3579         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
3580         aspace const.
3581         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
3582         Likewise.
3583         * breakpoint.c (bpstat_check_location): Remove cast.
3584         (breakpoint_hit_catch_fork): Make aspce const.
3585         (breakpoint_hit_catch_solib): Likewise.
3586         (breakpoint_hit_catch_exec): Likewise.
3587         (breakpoint_hit_ranged_breakpoint): Likewise.
3588         (breakpoint_hit_watchpoint): Likewise.
3589         (base_breakpoint_breakpoint_hit): Likewise.
3590         (bkpt_breakpoint_hit): Likewise.
3591         (dprintf_breakpoint_hit): Likewise.
3592         (tracepoint_breakpoint_hit): Likewise.
3593         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
3594
3595 2017-10-26  Yao Qi  <yao.qi@linaro.org>
3596
3597         * breakpoint.c (breakpoint_location_address_match): Change
3598         "struct address_space *" to "const address_space".
3599         (breakpoint_location_address_range_overlap): Likewise.
3600         (breakpoint_here_p): Likewise.
3601         (breakpoint_in_range_p): Likewise.
3602         (moribund_breakpoint_here_p): Likewise.
3603         (bp_location_inserted_here_p): Likewise.
3604         (software_breakpoint_inserted_here_p): Likewise.
3605         (hardware_breakpoint_inserted_here_p): Likewise.
3606         (hardware_watchpoint_inserted_in_range): Likewise.
3607         (bpstat_check_location): Likewise.
3608         (bpstat_stop_status): Likewise.
3609         (breakpoint_address_match): Likewise.
3610         (breakpoint_address_match_range): Likewise.
3611         (breakpoint_location_address_match): Likewise.
3612         (breakpoint_location_address_range_overlap): Likewise.
3613         (insert_single_step_breakpoint): Likewise.
3614         (breakpoint_has_location_inserted_here): Likewise.
3615         (single_step_breakpoint_inserted_here_p): Likewise.
3616         (pc_at_non_inline_function): Likewise.
3617         * breakpoint.h (bpstat_stop_status): Update declaration.
3618         (breakpoint_here_p): Likewise.
3619         (breakpoint_in_range_p): Likewise.
3620         (moribund_breakpoint_here_p): Likewise.
3621         (breakpoint_inserted_here_p): Likewise.
3622         (software_breakpoint_inserted_here_p): Likewise.
3623         (hardware_breakpoint_inserted_here_p): Likewise.
3624         (breakpoint_has_location_inserted_here): Likewise.
3625         (single_step_breakpoint_inserted_here_p): Likewise.
3626         (hardware_watchpoint_inserted_in_range): Likewise.
3627         (breakpoint_address_match): Likewise.
3628         (insert_single_step_breakpoint): Likewise.
3629         (pc_at_non_inline_function): Likewise.
3630         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
3631         * record.c (record_check_stopped_by_breakpoint): Likewise.
3632         * record.h (record_check_stopped_by_breakpoint): Likewise.
3633         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
3634
3635 2017-10-25  Yao Qi  <yao.qi@linaro.org>
3636
3637         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
3638         regcache->arch () instead get_regcache_arch.
3639         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
3640         Likewise.
3641         (aarch64_fbsd_store_inferior_registers): Likewise.
3642         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
3643         (store_gregs_to_thread): Likewise.
3644         (fetch_fpregs_from_thread): Likewise.
3645         (store_fpregs_to_thread): Likewise.
3646         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
3647         (aarch64_store_return_value): Likewise.
3648         (aarch64_software_single_step): Likewise.
3649         * aix-thread.c (aix_thread_wait): Likewise.
3650         (supply_reg32): Likewise.
3651         (supply_sprs64): Likewise.
3652         (supply_sprs32): Likewise.
3653         (fill_gprs64): Likewise.
3654         (fill_gprs32): Likewise.
3655         (fill_sprs64): Likewise.
3656         (fill_sprs32): Likewise.
3657         (store_regs_user_thread): Likewise.
3658         (store_regs_kernel_thread): Likewise.
3659         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
3660         (alphabsd_store_inferior_registers): Likewise.
3661         * alpha-tdep.c (alpha_extract_return_value): Likewise.
3662         (alpha_store_return_value): Likewise.
3663         (alpha_deal_with_atomic_sequence): Likewise.
3664         (alpha_next_pc): Likewise.
3665         (alpha_software_single_step): Likewise.
3666         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
3667         (amd64bsd_store_inferior_registers): Likewise.
3668         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
3669         Likewise.
3670         (amd64_linux_store_inferior_registers): Likewise.
3671         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
3672         (amd64_collect_native_gregset): Likewise.
3673         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
3674         (amd64obsd_collect_uthread): Likewise.
3675         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
3676         (amd64_collect_fpregset): Likewise.
3677         (amd64_supply_fxsave): Likewise.
3678         (amd64_supply_xsave): Likewise.
3679         (amd64_collect_fxsave): Likewise.
3680         (amd64_collect_xsave): Likewise.
3681         * arc-tdep.c (arc_write_pc): Likewise.
3682         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
3683         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
3684         (arm_fbsd_store_inferior_registers): Likewise.
3685         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
3686         (store_vfp_regs): Likewise.
3687         (arm_linux_fetch_inferior_registers): Likewise.
3688         (arm_linux_store_inferior_registers): Likewise.
3689         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
3690         (arm_linux_sigreturn_next_pc): Likewise.
3691         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
3692         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
3693         (fetch_register): Likewise.
3694         (store_register): Likewise.
3695         * arm-tdep.c (arm_is_thumb): Likewise.
3696         (displaced_in_arm_mode): Likewise.
3697         (bx_write_pc): Likewise.
3698         (arm_get_next_pcs_addr_bits_remove): Likewise.
3699         (arm_software_single_step): Likewise.
3700         (arm_extract_return_value): Likewise.
3701         (arm_store_return_value): Likewise.
3702         (arm_write_pc): Likewise.
3703         * bfin-tdep.c (bfin_extract_return_value): Likewise.
3704         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
3705         (bsd_uthread_store_registers): Likewise.
3706         * core-regset.c (fetch_core_registers): Likewise.
3707         * corelow.c (get_core_registers): Likewise.
3708         * cris-tdep.c (cris_store_return_value): Likewise.
3709         (cris_extract_return_value): Likewise.
3710         (find_step_target): Likewise.
3711         (find_step_target): Likewise.
3712         (cris_software_single_step): Likewise.
3713         * ctf.c (ctf_fetch_registers): Likewise.
3714         * darwin-nat.c (cancel_breakpoint): Likewise.
3715         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
3716         * frv-tdep.c (frv_extract_return_value): Likewise.
3717         * ft32-tdep.c (ft32_store_return_value): Likewise.
3718         (ft32_extract_return_value): Likewise.
3719         * go32-nat.c (fetch_register): Likewise.
3720         (go32_fetch_registers): Likewise.
3721         (go32_store_registers): Likewise.
3722         (store_register): Likewise.
3723         * h8300-tdep.c (h8300_extract_return_value): Likewise.
3724         (h8300_store_return_value): Likewise.
3725         * hppa-linux-nat.c (fetch_register): Likewise.
3726         (store_register): Likewise.
3727         (hppa_linux_fetch_inferior_registers): Likewise.
3728         (hppa_linux_store_inferior_registers): Likewise.
3729         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
3730         (i386_darwin_store_inferior_registers): Likewise.
3731         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
3732         (gnu_store_registers): Likewise.
3733         * i386-linux-nat.c (fetch_register): Likewise.
3734         (store_register): Likewise.
3735         (supply_gregset): Likewise.
3736         (fill_gregset): Likewise.
3737         (i386_linux_fetch_inferior_registers): Likewise.
3738         (i386_linux_store_inferior_registers): Likewise.
3739         (i386_linux_resume): Likewise.
3740         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
3741         Likewise.
3742         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
3743         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
3744         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
3745         (i386obsd_collect_uthread): Likewise.
3746         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
3747         (i386_supply_gregset): Likewise.
3748         (i386_collect_gregset): Likewise.
3749         (i386_supply_fpregset): Likewise.
3750         (i386_collect_fpregset): Likewise.
3751         (i386_mpx_bd_base): Likewise.
3752         * i386-v4-nat.c (supply_fpregset): Likewise.
3753         (fill_fpregset): Likewise.
3754         * i387-tdep.c (i387_supply_fsave): Likewise.
3755         (i387_collect_fsave): Likewise.
3756         (i387_supply_fxsave): Likewise.
3757         (i387_collect_fxsave): Likewise.
3758         (i387_supply_xsave): Likewise.
3759         (i387_collect_xsave): Likewise.
3760         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
3761         (ia64_linux_store_registers): Likewise.
3762         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
3763         (ia64_extract_return_value): Likewise.
3764         (ia64_store_return_value): Likewise.
3765         (find_func_descr): Likewise.
3766         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
3767         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
3768         (inf_ptrace_store_registers): Likewise.
3769         * infrun.c (use_displaced_stepping): Likewise.
3770         (displaced_step_prepare_throw): Likewise.
3771         (resume): Likewise.
3772         (proceed): Likewise.
3773         (do_target_wait): Likewise.
3774         (adjust_pc_after_break): Likewise.
3775         (handle_inferior_event_1): Likewise.
3776         (handle_signal_stop): Likewise.
3777         (save_infcall_suspend_state): Likewise.
3778         (restore_infcall_suspend_state): Likewise.
3779         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
3780         * jit.c (jit_frame_prev_register): Likewise.
3781         * linux-nat.c (save_stop_reason): Likewise.
3782         (linux_nat_wait_1): Likewise.
3783         (resume_stopped_resumed_lwps): Likewise.
3784         * linux-record.c (record_linux_sockaddr): Likewise.
3785         (record_linux_msghdr): Likewise.
3786         (record_linux_system_call): Likewise.
3787         * linux-tdep.c (linux_collect_thread_registers): Likewise.
3788         * lm32-tdep.c (lm32_extract_return_value): Likewise.
3789         (lm32_store_return_value): Likewise.
3790         * m32c-tdep.c (m32c_read_flg): Likewise.
3791         (m32c_pseudo_register_read): Likewise.
3792         (m32c_pseudo_register_write): Likewise.
3793         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
3794         (m32r_linux_collect_gregset): Likewise.
3795         * m32r-tdep.c (m32r_store_return_value): Likewise.
3796         (m32r_extract_return_value): Likewise.
3797         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
3798         (m68kbsd_collect_fpregset): Likewise.
3799         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
3800         * m68k-linux-nat.c (fetch_register): Likewise.
3801         (old_fetch_inferior_registers): Likewise.
3802         (old_store_inferior_registers): Likewise.
3803         (store_regs): Likewise.
3804         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
3805         (m68k_svr4_store_return_value): Likewise.
3806         * m88k-tdep.c (m88k_store_arguments): Likewise.
3807         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
3808         (mi_cmd_data_write_register_values): Likewise.
3809         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
3810         (mips_fbsd_store_inferior_registers): Likewise.
3811         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
3812         (mips_fbsd_supply_gregs): Likewise.
3813         (mips_fbsd_collect_fpregs): Likewise.
3814         (mips_fbsd_collect_gregs): Likewise.
3815         (mips_fbsd_supply_fpregset): Likewise.
3816         (mips_fbsd_collect_fpregset): Likewise.
3817         (mips_fbsd_supply_gregset): Likewise.
3818         (mips_fbsd_collect_gregset): Likewise.
3819         * mips-linux-nat.c (supply_gregset): Likewise.
3820         (fill_gregset): Likewise.
3821         (supply_fpregset): Likewise.
3822         (fill_fpregset): Likewise.
3823         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
3824         (mips_fill_gregset): Likewise.
3825         (mips_supply_fpregset): Likewise.
3826         (mips_fill_fpregset): Likewise.
3827         (mips64_supply_gregset): Likewise.
3828         (micromips_linux_sigframe_validate): Likewise.
3829         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
3830         (mipsnbsd_fetch_inferior_registers): Likewise.
3831         (mipsnbsd_store_inferior_registers): Likewise.
3832         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
3833         (mipsnbsd_supply_gregset): Likewise.
3834         (mipsnbsd_iterate_over_regset_sections): Likewise.
3835         (mipsnbsd_supply_reg): Likewise.
3836         (mipsnbsd_supply_fpreg): Likewise.
3837         * mips-tdep.c (mips_in_frame_stub): Likewise.
3838         (mips_dummy_id): Likewise.
3839         (is_octeon_bbit_op): Likewise.
3840         (micromips_bc1_pc): Likewise.
3841         (extended_mips16_next_pc): Likewise.
3842         (mips16_next_pc): Likewise.
3843         (deal_with_atomic_sequence): Likewise.
3844         * moxie-tdep.c (moxie_process_readu): Likewise.
3845         * nios2-tdep.c (nios2_get_next_pc): Likewise.
3846         * nto-procfs.c (procfs_store_registers): Likewise.
3847         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
3848         (ppcfbsd_store_inferior_registers): Likewise.
3849         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
3850         (fetch_altivec_register): Likewise.
3851         (get_spe_registers): Likewise.
3852         (fetch_spe_register): Likewise.
3853         (fetch_altivec_registers): Likewise.
3854         (fetch_all_gp_regs): Likewise.
3855         (fetch_all_fp_regs): Likewise.
3856         (store_vsx_register): Likewise.
3857         (store_altivec_register): Likewise.
3858         (set_spe_registers): Likewise.
3859         (store_spe_register): Likewise.
3860         (store_altivec_registers): Likewise.
3861         (store_all_gp_regs): Likewise.
3862         (store_all_fp_regs): Likewise.
3863         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
3864         (ppc_linux_collect_gregset): Likewise.
3865         (ppc_canonicalize_syscall): Likewise.
3866         (ppc_linux_record_signal): Likewise.
3867         (ppu2spu_prev_register): Likewise.
3868         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
3869         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
3870         (ppcobsd_store_registers): Likewise.
3871         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
3872         Likewise.
3873         (ppc_ravenscar_generic_store_registers): Likewise.
3874         * procfs.c (procfs_fetch_registers): Likewise.
3875         (procfs_store_registers): Likewise.
3876         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
3877         (ravenscar_store_registers): Likewise.
3878         (ravenscar_prepare_to_store): Likewise.
3879         * record-btrace.c (record_btrace_fetch_registers): Likewise.
3880         * record-full.c (record_full_wait_1): Likewise.
3881         (record_full_registers_change): Likewise.
3882         (record_full_store_registers): Likewise.
3883         (record_full_core_fetch_registers): Likewise.
3884         (record_full_save): Likewise.
3885         (record_full_goto_insn): Likewise.
3886         * regcache.c (regcache_register_size): Likewise.
3887         (get_regcache_arch): Remove.
3888         (regcache_read_pc): Likewise.
3889         * regcache.h (get_regcache_arch): Remove.
3890         * remote-sim.c (gdbsim_fetch_register): Likewise.
3891         (gdbsim_store_register): Likewise.
3892         * remote.c (fetch_register_using_p): Likewise.
3893         (send_g_packet): Likewise.
3894         (remote_prepare_to_store): Likewise.
3895         (store_registers_using_G): Likewise.
3896         * reverse.c (save_bookmark_command): Likewise.
3897         (goto_bookmark_command): Likewise.
3898         * rs6000-aix-tdep.c (branch_dest): Likewise.
3899         * rs6000-nat.c (rs6000_ptrace64): Likewise.
3900         (fetch_register): Likewise.
3901         * rs6000-tdep.c (ppc_supply_reg): Likewise.
3902         (ppc_collect_reg): Likewise.
3903         (ppc_collect_gregset): Likewise.
3904         (ppc_collect_fpregset): Likewise.
3905         (ppc_collect_vsxregset): Likewise.
3906         (ppc_collect_vrregset): Likewise.
3907         (ppc_displaced_step_hw_singlestep): Likewise.
3908         (rs6000_pseudo_register_read): Likewise.
3909         (rs6000_pseudo_register_write): Likewise.
3910         * s390-linux-nat.c (supply_gregset): Likewise.
3911         (fill_gregset): Likewise.
3912         (s390_linux_fetch_inferior_registers): Likewise.
3913         * s390-linux-tdep.c (s390_write_pc): Likewise.
3914         (s390_software_single_step): Likewise.
3915         (s390_all_but_pc_registers_record): Likewise.
3916         (s390_linux_syscall_record): Likewise.
3917         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
3918         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
3919         (shnbsd_store_inferior_registers): Likewise.
3920         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
3921         (sh_extract_return_value_fpu): Likewise.
3922         (sh_store_return_value_nofpu): Likewise.
3923         (sh_corefile_supply_regset): Likewise.
3924         (sh_corefile_collect_regset): Likewise.
3925         * sh64-tdep.c (sh64_extract_return_value): Likewise.
3926         (sh64_store_return_value): Likewise.
3927         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
3928         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
3929         (sparc_store_inferior_registers): Likewise.
3930         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
3931         (sparc_ravenscar_prepare_to_store): Likewise.
3932         * sparc-tdep.c (sparc32_store_arguments): Likewise.
3933         (sparc_analyze_control_transfer): Likewise.
3934         (sparc_step_trap): Likewise.
3935         (sparc_software_single_step): Likewise.
3936         (sparc32_gdbarch_init): Likewise.
3937         (sparc_supply_rwindow): Likewise.
3938         (sparc_collect_rwindow): Likewise.
3939         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
3940         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
3941         (sparc64nbsd_collect_gregset): Likewise.
3942         (sparc64nbsd_supply_fpregset): Likewise.
3943         (sparc64nbsd_collect_fpregset): Likewise.
3944         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
3945         (sparc64_supply_gregset): Likewise.
3946         (sparc64_collect_gregset): Likewise.
3947         (sparc64_supply_fpregset): Likewise.
3948         (sparc64_collect_fpregset): Likewise.
3949         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
3950         * spu-tdep.c (spu_unwind_sp): Likewise.
3951         (spu2ppu_prev_register): Likewise.
3952         (spu_memory_remove_breakpoint): Likewise.
3953         * stack.c (return_command): Likewise.
3954         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
3955         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
3956         * tracefile.c (trace_save_ctf): Likewise.
3957         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
3958         (do_windows_store_inferior_registers): Likewise.
3959         (windows_resume): Likewise.
3960         * xtensa-linux-nat.c (fill_gregset): Likewise.
3961         (supply_gregset_reg): Likewise.
3962         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
3963         (xtensa_register_read_masked): Likewise.
3964         (xtensa_supply_gregset): Likewise.
3965         (xtensa_extract_return_value): Likewise.
3966         (xtensa_store_return_value): Likewise.
3967
3968 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
3969
3970         * doublest.c (floatformat_from_string): New function.
3971         * doublest.h (floatformat_from_string): Add prototype.
3972
3973         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
3974         (OP_FLOAT): ... this.
3975         * expression.h: Do not include "doublest.h".
3976         (union exp_element): Replace doubleconst and decfloatconst by
3977         new element floatconst.
3978         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
3979         (ada_evaluate_subexp): Likewise.
3980         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
3981         OP_DOUBLE and OP_DECFLOAT.
3982         * expprint.c (print_subexp_standard): Likewise.
3983         (dump_subexp_body_standard): Likewise.
3984         * breakpoint.c (watchpoint_exp_is_const): Likewise.
3985
3986         * parse.c: Include "dfp.h".
3987         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3988         (write_exp_elt_floatcst): New function.
3989         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
3990         and OP_DECFLOAT.
3991         (operator_check_standard): Likewise.
3992         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
3993         Return target format buffer instead of host DOUBLEST.
3994         Use floatformat_from_string and decimal_from_string to parse
3995         either binary or decimal floating-point types.
3996         (parse_c_float): Remove.
3997         * parser-defs.h: Do not include "doublest.h".
3998         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3999         (write_exp_elt_floatcst): Add prototype.
4000         (parse_float): Update prototype.
4001         (parse_c_float): Remove.
4002
4003         * c-exp.y: Do not include "dfp.h".
4004         (typed_val_float): Use byte buffer instead of DOUBLEST.
4005         (typed_val_decfloat): Remove.
4006         (DECFLOAT): Remove.
4007         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4008         (parse_number): Update to new parse_float interface.
4009         Parse suffixes and determine type before calling parse_float.
4010         Handle decimal and binary FP types the same way.
4011
4012         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4013         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
4014         (parse_number): Update to new parse_float interface.
4015         Parse suffixes and determine type before calling parse_float.
4016
4017         * f-exp.y: Replace dval by typed_val_float.
4018         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4019         (parse_number): Use parse_float instead of atof.
4020
4021         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4022         (parse_go_float): Remove.
4023         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4024         (parse_number): Call parse_float instead of parse_go_float.
4025         Parse suffixes and determine type before calling parse_float.
4026
4027         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4028         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4029         (parse_number): Update to new parse_float interface.
4030         Parse suffixes and determine type before calling parse_float.
4031
4032         * m2-exp.y: Replace dval by byte buffer val.
4033         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4034         (parse_number): Call parse_float instead of atof.
4035
4036         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4037         (lex_number): Call parse_float instead of strtod.
4038         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
4039         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
4040         Use write_exp_elt_floatcst.
4041         (unit_testing): Remove static variable.
4042         (rust_type): Do not check unit_testing.
4043         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
4044
4045         * ada-exp.y (type_float, type_double): Remove.
4046         (typed_val_float): Use byte buffer instead of DOUBLEST.
4047         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4048         * ada-lex.l (processReal): Use parse_float instead of sscanf.
4049
4050 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
4051
4052         * aarch64-tdep.h (enum aarch64_regnum): Remove.
4053         * arch/aarch64.h: New file.
4054
4055 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
4056
4057         * dfp.h (decimal_from_string): Use const reference for argument.
4058         * dfp.c (decimal_from_string): Likewise.
4059
4060 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
4061
4062         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
4063         * sh64-tdep.c (sh64_do_fp_register): Likewise.
4064         * mips-tdep.c (mips_print_fp_register): Likewise.
4065
4066 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
4067
4068         * common/format.h (enum argclass): Replace decfloat_arg by
4069         dec32float_arg, dec64float_arg, and dec128float_arg.
4070         * common/format.c (parse_format_string): Update to return
4071         new decimal float argument classes.
4072
4073         * printcmd.c (printf_decfloat): Rename to ...
4074         (printf_floating): ... this.  Add argclass argument, and use it
4075         instead of parsing the format string again.  Add support for
4076         binary floating-point values, using floatformat_to_string.
4077         Convert value to the target format if it doesn't already match.
4078         (ui_printf): Call printf_floating instead of printf_decfloat,
4079         also for double_arg / long_double_arg.  Pass argclass.
4080
4081         * dfp.c (decimal_to_string): Add format string argument.
4082         * dfp.h (decimal_to_string): Likewise.
4083
4084         * doublest.c (floatformat_to_string): Add format string argument.
4085         * doublest.h (floatformat_to_string): Likewise.
4086
4087 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
4088
4089         * doublest.c (floatformat_precision): New routine.
4090         (floatformat_to_string): Likewise.
4091         * doublest.c (floatformat_to_string): Add prototype.
4092
4093         * printcmd.c (print_scalar_formatted): Only call print_floating
4094         on floating-point types.
4095         * valprint.c: Do not include "floatformat.h".
4096         (generic_val_print_decfloat): Remove.
4097         (generic_val_print): Call generic_val_print_float for both
4098         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
4099         (print_floating): Use floatformat_to_string.  Handle decimal float.
4100         (print_decimal_floating): Remove, merge into floatformat_to_string.
4101         * value.h (print_decimal_floating): Remove.
4102
4103         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
4104
4105 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
4106
4107         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
4108
4109 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
4110
4111         * memattr.h: Don't include vec.h.
4112         (struct mem_attrib): Initialize fields.
4113         <unknown>: New static method.
4114         (struct mem_region): Add constructors, operator<, initialize
4115         fields.
4116         * memattr.c: Include algorithm.
4117         (default_mem_attrib, unknown_mem_attrib): Remove.
4118         (user_mem_region_list): New global.
4119         (target_mem_region_list, mem_region_list): Change type to
4120         std::vector<mem_region>.
4121         (mem_use_target): Now a function.
4122         (target_mem_regions_valid): Change type to bool.
4123         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
4124         (require_user_regions): Adjust.
4125         (require_target_regions): Adjust.
4126         (create_mem_region): Adjust.
4127         (lookup_mem_region): Adjust.
4128         (invalidate_target_mem_regions): Adjust.
4129         (mem_clear): Rename to...
4130         (user_mem_clear): ... this, and adjust.
4131         (mem_command): Adjust.
4132         (info_mem_command): Adjust.
4133         (mem_enable, enable_mem_command, mem_disable,
4134         disable_mem_command): Adjust.
4135         (mem_delete): Adjust.
4136         (delete_mem_command): Adjust.
4137         * memory-map.h (parse_memory_map): Return an std::vector.
4138         * memory-map.c (parse_memory_map): Likewise.
4139         (struct memory_map_parsing_data): Add constructor.
4140         <memory_map>: Point to std::vector.
4141         (memory_map_start_memory): Adjust.
4142         (memory_map_end_memory): Adjust.
4143         (memory_map_end_property): Adjust.
4144         (clear_result): Remove.
4145         * remote.c (remote_memory_map): Return an std::vector.
4146         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
4147         Remove.
4148         (target_debug_print_mem_region_vector): New.
4149         * target-delegates.c: Regenerate.
4150         * target.h (mem_region_vector): New typedef.
4151         (to_memory_map): Return mem_region_vector.
4152         (target_memory_map): Return an std::vector.
4153         * target.c (target_memory_map): Return an std::vector.
4154         (flash_erase_command): Adjust.
4155
4156 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
4157
4158         * memory-map.c (struct memory_map_parsing_data) <property_name>:
4159         Change type to std::string.
4160         (memory_map_start_property): Adjust.
4161         (memory_map_end_property): Adjust.
4162
4163 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
4164
4165         * infrun.h: Include common/byte-vector.h.
4166         (struct displaced_step_closure): New struct.
4167         (struct buf_displaced_step_closure): New struct.
4168         * infrun.c (displaced_step_closure::~displaced_step_closure):
4169         Provide default implementation.
4170         (displaced_step_clear): Deallocate step closure with delete.
4171         * aarch64-tdep.c (displaced_step_closure): Rename to ...
4172         (aarch64_displaced_step_closure): ... this, extend
4173         displaced_step_closure.
4174         (aarch64_displaced_step_data) <dsc>: Change type to
4175         aarch64_displaced_step_closure.
4176         (aarch64_displaced_step_copy_insn): Adjust to type change, use
4177         unique_ptr.
4178         (aarch64_displaced_step_fixup): Add cast for displaced step
4179         closure.
4180         * amd64-tdep.c (displaced_step_closure): Rename to ...
4181         (amd64_displaced_step_closure): ... this, extend
4182         displaced_step_closure.
4183         <insn_buf>: Change type to std::vector<gdb_byte>.
4184         <max_len>: Remove.
4185         (fixup_riprel): Change type of DSC parameter, adjust to type
4186         change of insn_buf.
4187         (fixup_displaced_copy): Change type of DSC parameter.
4188         (amd64_displaced_step_copy_insn): Instantiate
4189         amd64_displaced_step_closure.
4190         (amd64_displaced_step_fixup): Add cast for closure type, adjust
4191         to type change of insn_buf.
4192         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
4193         parameter DSC.
4194         (arm_linux_copy_svc): Likewise.
4195         (cleanup_kernel_helper_return): Likewise.
4196         (arm_catch_kernel_helper_return): Likewise.
4197         (arm_linux_displaced_step_copy_insn): Instantiate
4198         arm_displaced_step_closure.
4199         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
4200         (displaced_read_reg): Change type of parameter DSC.
4201         (branch_write_pc): Likewise.
4202         (load_write_pc): Likewise.
4203         (alu_write_pc): Likewise.
4204         (displaced_write_reg): Likewise.
4205         (arm_copy_unmodified): Likewise.
4206         (thumb_copy_unmodified_32bit): Likewise.
4207         (thumb_copy_unmodified_16bit): Likewise.
4208         (cleanup_preload): Likewise.
4209         (install_preload): Likewise.
4210         (arm_copy_preload): Likewise.
4211         (thumb2_copy_preload): Likewise.
4212         (install_preload_reg): Likewise.
4213         (arm_copy_preload_reg): Likewise.
4214         (cleanup_copro_load_store): Likewise.
4215         (install_copro_load_store): Likewise.
4216         (arm_copy_copro_load_store) Likewise.
4217         (thumb2_copy_copro_load_store): Likewise.
4218         (cleanup_branch): Likewise.
4219         (install_b_bl_blx): Likewise.
4220         (arm_copy_b_bl_blx): Likewise.
4221         (thumb2_copy_b_bl_blx): Likewise.
4222         (thumb_copy_b): Likewise.
4223         (install_bx_blx_reg): Likewise.
4224         (arm_copy_bx_blx_reg): Likewise.
4225         (thumb_copy_bx_blx_reg): Likewise.
4226         (cleanup_alu_imm): Likewise.
4227         (arm_copy_alu_imm): Likewise.
4228         (thumb2_copy_alu_imm): Likewise.
4229         (cleanup_alu_reg): Likewise.
4230         (install_alu_reg): Likewise.
4231         (arm_copy_alu_reg): Likewise.
4232         (thumb_copy_alu_reg): Likewise.
4233         (cleanup_alu_shifted_reg): Likewise.
4234         (install_alu_shifted_reg): Likewise.
4235         (arm_copy_alu_shifted_reg): Likewise.
4236         (cleanup_load): Likewise.
4237         (cleanup_store): Likewise.
4238         (arm_copy_extra_ld_st): Likewise.
4239         (install_load_store): Likewise.
4240         (thumb2_copy_load_literal): Likewise.
4241         (thumb2_copy_load_reg_imm): Likewise.
4242         (arm_copy_ldr_str_ldrb_strb): Likewise.
4243         (cleanup_block_load_all): Likewise.
4244         (cleanup_block_store_pc): Likewise.
4245         (cleanup_block_load_pc): Likewise.
4246         (arm_copy_block_xfer): Likewise.
4247         (thumb2_copy_block_xfer): Likewise.
4248         (cleanup_svc): Likewise.
4249         (install_svc): Likewise.
4250         (arm_copy_svc): Likewise.
4251         (thumb_copy_svc): Likewise.
4252         (arm_copy_undef): Likewise.
4253         (thumb_32bit_copy_undef): Likewise.
4254         (arm_copy_unpred): Likewise.
4255         (arm_decode_misc_memhint_neon): Likewise.
4256         (arm_decode_unconditional): Likewise.
4257         (arm_decode_miscellaneous): Likewise.
4258         (arm_decode_dp_misc): Likewise.
4259         (arm_decode_ld_st_word_ubyte): Likewise.
4260         (arm_decode_media): Likewise.
4261         (arm_decode_b_bl_ldmstm): Likewise.
4262         (arm_decode_ext_reg_ld_st): Likewise.
4263         (thumb2_decode_dp_shift_reg): Likewise.
4264         (thumb2_decode_ext_reg_ld_st): Likewise.
4265         (arm_decode_svc_copro): Likewise.
4266         (thumb2_decode_svc_copro): Likewise.
4267         (install_pc_relative): Likewise.
4268         (thumb_copy_pc_relative_16bit): Likewise.
4269         (thumb_decode_pc_relative_16bit): Likewise.
4270         (thumb_copy_pc_relative_32bit): Likewise.
4271         (thumb_copy_16bit_ldr_literal): Likewise.
4272         (thumb_copy_cbnz_cbz): Likewise.
4273         (thumb2_copy_table_branch): Likewise.
4274         (cleanup_pop_pc_16bit_all): Likewise.
4275         (thumb_copy_pop_pc_16bit): Likewise.
4276         (thumb_process_displaced_16bit_insn): Likewise.
4277         (decode_thumb_32bit_ld_mem_hints): Likewise.
4278         (thumb_process_displaced_32bit_insn): Likewise.
4279         (thumb_process_displaced_insn): Likewise.
4280         (arm_process_displaced_insn): Likewise.
4281         (arm_displaced_init_closure): Likewise.
4282         (arm_displaced_step_fixup): Add cast for closure.
4283         * arm-tdep.h: Include infrun.h.
4284         (displaced_step_closure): Rename to ...
4285         (arm_displaced_step_closure): ... this, extend
4286         displaced_step_closure.
4287         <u::svc::copy_svc_os>: Change type of parameter DSC.
4288         <cleanup>: Likewise.
4289         (arm_process_displaced_insn): Likewise.
4290         (arm_displaced_init_closure): Likewise.
4291         (displaced_read_reg): Likewise.
4292         (displaced_write_reg): Likewise.
4293         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4294         Adjust.
4295         * i386-tdep.h: Include infrun.h.
4296         (i386_displaced_step_closure): New typedef.
4297         * i386-tdep.c (i386_displaced_step_copy_insn): Use
4298         i386_displaced_step_closure.
4299         (i386_displaced_step_fixup): Adjust.
4300         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
4301         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
4302         and unique_ptr.
4303         (ppc_displaced_step_fixup): Adjust.
4304         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
4305         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
4306         and unique_ptr.
4307         (s390_displaced_step_fixup): Adjust.
4308
4309 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
4310
4311         * interps.h (interp_resume, interp_suspend, interp_set_temp):
4312         Remove declarations.
4313
4314 2017-10-20  Tom Tromey  <tom@tromey.com>
4315
4316         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
4317         std::vector.
4318         (gdb_bfd_record_inclusion): Update.
4319         (bfdp): Remove typedef.
4320
4321 2017-10-20  Tom Tromey  <tom@tromey.com>
4322
4323         * gdb_bfd.c (gdb_bfd_ref): Use new.
4324         (struct gdb_bfd_data): Add constructor, destructor, and member
4325         initializers.
4326         (gdb_bfd_unref): Use delete.
4327
4328 2017-10-20  Tom Tromey  <tom@tromey.com>
4329
4330         * exec.c (exec_file_attach): Use new_bfd_ref.
4331         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
4332         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
4333         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
4334         new_bfd_ref.
4335         * gdb_bfd.h (new_bfd_ref): New function.
4336
4337 2017-10-20  Pedro Alves  <palves@redhat.com>
4338
4339         * main.c (captured_command_loop): Add attribute noinline.
4340
4341 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
4342
4343         * interps.c (struct interp_factory): Add constructor.
4344         (interp_factory_p): Remove typedef.
4345         (DEF_VEC_P(interp_factory_p)): Remove.
4346         (interpreter_factories): Change type to std::vector.
4347         (interp_factory_register): Adjust.
4348         (interp_lookup): Adjust.
4349         (interpreter_completer): Adjust.
4350
4351 2017-10-19  Tom Tromey  <tom@tromey.com>
4352
4353         * break-catch-syscall.c (catch_syscall_completer): Use
4354         std::string, gdb::unique_xmalloc_ptr.
4355
4356 2017-10-19  Tom Tromey  <tom@tromey.com>
4357
4358         * infcall.c (call_function_by_hand_dummy): Use std::string.
4359
4360 2017-10-19  Tom Tromey  <tom@tromey.com>
4361
4362         * mi/mi-main.c (mi_cmd_execute): Update.
4363         * top.h (prepare_execute_command): Return scoped_value_mark.
4364         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
4365         Add move constructor.
4366         * top.c (prepare_execute_command): Return scoped_value_mark.
4367         (execute_command): Update.
4368
4369 2017-10-19  Pedro Alves  <palves@redhat.com>
4370
4371         * xml-support.c (xml_fetch_content_from_file): Check fread's
4372         return.
4373
4374 2017-10-19  Pedro Alves  <palves@redhat.com>
4375
4376         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
4377         async.
4378         (handle_error_fd): New function.
4379         (ser_base_async): Add/delete an event loop file handler for
4380         error_fd.
4381
4382 2017-10-19  Pedro Alves  <palves@redhat.com>
4383
4384         * xml-support.c (xml_fetch_content_from_file): Don't read in
4385         chunks.  Instead use fseek to determine the file's size, and read
4386         it in one go.
4387
4388 2017-11-18  Keith Seitz  <keiths@redhat.com>
4389
4390         * c-exp.y (oper): Canonicalize conversion operators of user-defined
4391         types.
4392         Add whitespace to front of type name.
4393
4394 2017-10-18  Keith Seitz  <keiths@redhat.com>
4395
4396         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
4397         DW_AT_accessibility.
4398
4399 2017-10-18  Yao Qi  <yao.qi@linaro.org>
4400
4401         * features/tic6x-c62x-linux.c: Remove.
4402
4403 2017-10-17  Tom Tromey  <tom@tromey.com>
4404
4405         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
4406         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
4407         (do_mixed_source_and_assembly): Likewise.
4408
4409 2017-10-17  Tom Tromey  <tom@tromey.com>
4410
4411         * regcache.c (regcache::xfer_part): Remove assertion.
4412
4413 2017-10-17  Pedro Alves  <palves@redhat.com>
4414
4415         * xml-support.c (xml_fetch_content_from_file): Call
4416         unique_ptr::release() instead unique_ptr::get() when passing
4417         through xrealloc.
4418
4419 2017-10-17  Yao Qi  <yao.qi@linaro.org>
4420
4421         * regcache.c (regcache::xfer_part): Remove parameters read and
4422         write, add parameter is_raw.  All callers are updated.
4423
4424 2017-10-16  Keith Seitz  <keiths@redhat.com>
4425
4426         * c-typeprint.c (enum access_specifier): Moved here from
4427         c_type_print_base.
4428         (output_access_specifier): New function.
4429         (c_type_print_base): Consider typedefs when assessing
4430         whether access labels are needed.
4431         Use output_access_specifier as needed.
4432         Output access specifier for typedefs, if needed.
4433         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
4434         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
4435         fields.
4436         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
4437         accessor macros.
4438
4439 2017-10-16  Tom Tromey  <tom@tromey.com>
4440
4441         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
4442         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
4443         * target.c (target_fileio_read_stralloc): Update.
4444         * sparc64-tdep.c (adi_is_addr_mapped): Update.
4445         * target.h (target_fileio_read_stralloc): Return
4446         unique_xmalloc_ptr.
4447
4448 2017-10-16  Tom Tromey  <tom@tromey.com>
4449
4450         * xml-syscall.c (xml_init_syscalls_info): Update.
4451         * xml-support.c (xinclude_start_include): Update.
4452         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
4453         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
4454         (xml_fetch_content_from_file): Likewise.
4455         * osdata.c (get_osdata): Update.
4456         * target.h (target_read_stralloc, target_get_osdata): Return
4457         unique_xmalloc_ptr.
4458         * solib-aix.c (solib_aix_get_library_list): Update.
4459         * solib-target.c (solib_target_current_sos): Update.
4460         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
4461         * xml-tdesc.c (fetch_available_features_from_target): Update.
4462         (target_fetch_description_xml): Update.
4463         (file_read_description_xml): Update.
4464         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
4465         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
4466         (remote_pid_to_exec_file): Update.
4467         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
4468         (target_get_osdata): Likewise.
4469
4470 2017-10-16  Tom Tromey  <tom@tromey.com>
4471
4472         * remote.c (remote_register_number_and_offset): Use std::vector.
4473         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
4474         (putpkt_binary): Use gdb::def_vector.
4475         (compare_sections_command): Use gdb::byte_vector.
4476
4477 2017-10-16  Tom Tromey  <tom@tromey.com>
4478
4479         * ppc-linux-nat.c (hwdebug_insert_point): Use
4480         gdb::unique_xmalloc_ptr, XDUP.
4481
4482 2017-10-16  Tom Tromey  <tom@tromey.com>
4483
4484         * probe.c (parse_probes): Use std::string.
4485         (info_probes_for_ops, enable_probes_command)
4486         (disable_probes_command): Remove cleanups.
4487
4488 2017-10-16  Tom Tromey  <tom@tromey.com>
4489
4490         * buildsym.c (block_compar): Remove.
4491         (end_symtab_get_static_block): Use std::vector.
4492
4493 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
4494
4495         * memrange.h (struct mem_range): Define operator< and operator==.
4496         (mem_range_s): Remove.
4497         (DEF_VEC_O (mem_range_s)): Remove.
4498         (normalize_mem_ranges): Change parameter type to std::vector.
4499         * memrange.c (compare_mem_ranges): Remove.
4500         (normalize_mem_ranges): Change parameter type to std::vector,
4501         adjust to vector change.
4502         * exec.c (section_table_available_memory): Return vector, remove
4503         parameter.
4504         (section_table_read_available_memory): Adjust to std::vector
4505         change.
4506         * remote.c (remote_read_bytes): Adjust to std::vector
4507         change.
4508         * tracepoint.h (traceframe_available_memory): Change parameter
4509         type to std::vector.
4510         * tracepoint.c (traceframe_available_memory): Change parameter
4511         type to std::vector, adjust.
4512         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
4513         std::vector change.
4514         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4515         unittests/memrange-selftests.c.
4516         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
4517         * gdb/unittests/memrange-selftests.c: New file.
4518
4519 2017-10-16  Pedro Alves  <palves@redhat.com>
4520
4521         * elfread.c (probe_key_free): Rename range-for variable.
4522         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
4523         (find_probe_by_pc, collect_probes): Rename range-for variable.
4524
4525 2017-10-16  Yao Qi  <yao.qi@linaro.org>
4526
4527         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
4528         * features/tic6x-c62x.c: Remove.
4529         * features/tic6x-c64x-linux.c: Remove.
4530         * features/tic6x-c64x.c: Remove.
4531         * features/tic6x-c64xp-linux.c: Remove.
4532         * features/tic6x-c64xp.c: Remove.
4533         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
4534         initialize_tdesc_tic6x_*_linux functions.
4535         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
4536         initialize_tdesc_tic6x_* functions.
4537
4538 2017-10-16  Yao Qi  <yao.qi@linaro.org>
4539
4540         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
4541         tic6x-c62x.
4542         * regformats/tic6x-c62x.dat: Remove.
4543         * regformats/tic6x-c64x.dat: Remove.
4544         * regformats/tic6x-c64xp.dat: Remove.
4545
4546 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
4547
4548         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
4549         (the !HAVE_LIBEXPAT version).
4550
4551 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
4552
4553         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
4554         const.
4555
4556 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
4557
4558         * target.h: Include tracepoint.h.
4559         (enum trace_find_type): Move to tracepoint.h.
4560         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
4561         * tracepoint.h: Don't include target.h
4562         (enum trace_find_type): Move from target.h.
4563         (parse_traceframe_info): Return a unique ptr.
4564         * tracepoint.c (current_traceframe_info): Change type to unique
4565         ptr.
4566         (free_traceframe_info): Remove.
4567         (clear_traceframe_info): Don't manually free
4568         current_traceframe_info.
4569         (free_result): Remove.
4570         (parse_traceframe_info): Return a unique ptr.
4571         (get_traceframe_info): Adjust to unique ptr.
4572         * ctf.c (ctf_traceframe_info): Return a unique ptr.
4573         * remote.c (remote_traceframe_info): Return a unique ptr.
4574         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
4575         ptr.
4576         * target-debug.h (target_debug_print_traceframe_info_up): New
4577         macro.
4578         * target-delegates.c: Regenerate.
4579
4580 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
4581
4582         * memrange.h (struct mem_range): Add constructors.
4583         * tracepoint.h (struct traceframe_info) <memory>: Change type to
4584         std::vector<mem_range>.
4585         * tracepoint.c (free_traceframe_info): Don't manually free
4586         vector.
4587         (traceframe_info_start_memory): Adjust to vector change.
4588         (traceframe_available_memory): Likewise.
4589         * tracefile-tfile.c (build_traceframe_info): Likewise.
4590         * ctf.c (ctf_traceframe_info): Likewise.
4591
4592 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
4593
4594         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
4595         std::vector<int>.
4596         * tracepoint.c (free_traceframe_info): Deallocate with delete.
4597         (traceframe_info_start_tvar): Adjust to vector change.
4598         (parse_traceframe_info): Allocate with new.
4599         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
4600         vector change.
4601         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
4602         change.
4603         tfile_traceframe_info): Allocate with new.
4604         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
4605         change.
4606
4607 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
4608
4609         * tracepoint.c (traceframe_info): Rename to...
4610         (current_traceframe_info): ...this.
4611         (clear_traceframe_info): Adjust.
4612         (get_traceframe_info): Adjust.
4613
4614 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
4615
4616         * nat/linux-osdata.c: Include algorithm.
4617         (compare_processes): Remove.
4618         (struct pid_pgid_entry): New struct.
4619         (linux_xfer_osdata_processgroups): Use std::vector instead of
4620         XNEWVEC.
4621
4622 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
4623
4624         * objfiles.h: Don't include symfile.h.
4625         (struct partial_symbol): Remove forward-declaration.
4626         (struct objfile) <global_psymbols, static_psymbols>: Change type
4627         to std::vector<partial_symbol *>.
4628         * objfiles.c (objfile::objfile): Don't memset those fields.
4629         (objfile::~objfile): Don't free those fields.
4630         * psympriv.h (struct psymbol_allocation_list): Remove
4631         forward-declaration.
4632         (add_psymbol_to_list): Change psymbol_allocation_list parameter
4633         to std::vector.
4634         (start_psymtab_common): Change parameters to std::vector.
4635         * psymtab.c: Include algorithm.
4636         (require_partial_symbols): Call shrink_to_fit.
4637         (find_pc_sect_psymbol): Adjust to vector change.
4638         (match_partial_symbol): Likewise.
4639         (lookup_partial_symbol): Likewise.
4640         (psym_relocate): Likewise.
4641         (dump_psymtab): Likewise.
4642         (recursively_search_psymtabs): Likewise.
4643         (compare_psymbols): Remove.
4644         (sort_pst_symbols): Adjust to vector change.
4645         (start_psymtab_common): Likewise.
4646         (end_psymtab_common): Likewise.
4647         (psymbol_bcache_full): De-constify return value.
4648         (add_psymbol_to_bcache): Likewise.
4649         (extend_psymbol_list): Remove.
4650         (append_psymbol_to_list): Adjust to vector change.
4651         (add_psymbol_to_list): Likewise.
4652         (init_psymbol_list): Likewise.
4653         (maintenance_info_psymtabs): Likewise.
4654         (maintenance_check_psymtabs): Likewise.
4655         * symfile.h (struct psymbol_allocation_list): Remove.
4656         * symfile.c (reread_symbols): Adjust to vector change.
4657         * dbxread.c (start_psymtab): Change type of parameters.
4658         (dbx_symfile_read): Adjust to vector change.
4659         (read_dbx_symtab): Likewise.
4660         (start_psymtab): Change type of parameters.
4661         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
4662         (create_partial_symtab): Likewise.
4663         (add_partial_symbol): Likewise.
4664         (write_one_signatured_type): Likewise.
4665         (recursively_write_psymbols): Likewise.
4666         * mdebugread.c (parse_partial_symbols): Likewise.
4667         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
4668         (scan_xcoff_symtab): Adjust to vector change.
4669         (xcoff_initial_scan): Likewise.
4670
4671 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
4672
4673         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
4674
4675 2017-10-13  Yao Qi  <yao.qi@linaro.org>
4676
4677         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
4678         Remove s390x-*-expedite, add s390x-expedite.
4679
4680 2017-10-13  Yao Qi  <yao.qi@linaro.org>
4681
4682         * features/s390-gs-linux64.c: Regenerated.
4683         * features/s390x-gs-linux64.c: Regenerated.
4684
4685 2017-10-13  Tom Tromey  <tom@tromey.com>
4686
4687         * compile/compile-object-run.c (do_module_cleanup): Use delete.
4688         * solib.c (update_solib_list, reload_shared_libraries_1): Use
4689         delete.
4690         * symfile.c (symbol_file_add_with_addrs): Use new.
4691         (symbol_file_add_separate): Update comment.
4692         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
4693         * jit.c (jit_object_close_impl): Use new.
4694         (jit_unregister_code): Use delete.
4695         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
4696         (~objfile): Rename from free_objfile.
4697         (free_objfile_separate_debug, do_free_objfile_cleanup)
4698         (free_all_objfiles, objfile_purge_solibs): Use delete.
4699         * objfiles.h (struct objfile): Add constructor and destructor.
4700         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
4701         (allocate_objfile, free_objfile): Don't declare.
4702         (struct objstats): Add initializers.
4703
4704 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
4705
4706         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
4707         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
4708         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
4709         * gdbarch.h: Regenerate.
4710         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4711         Adjust comment.
4712         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
4713         (i386_displaced_step_fixup): Adjust comment.
4714         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
4715
4716 2017-10-12  Tom Tromey  <tom@tromey.com>
4717
4718         * prologue-value.h (pv_area::store_would_trash): Return bool.
4719         (pv_area::find_reg): Likewise.
4720         * prologue-value.c (pv_area::store_would_trash): Return bool.
4721         (pv_area::find_reg): Likewise.
4722
4723 2017-10-12  Tom Tromey  <tom@tromey.com>
4724
4725         * s390-linux-tdep.c (s390_store, s390_load)
4726         (s390_check_for_saved, s390_analyze_prologue): Update.
4727         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
4728         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
4729         * prologue-value.h (class pv_area): Move from prologue-value.c.
4730         Change names of members.  Add constructor, destructor, member
4731         functions.
4732         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
4733         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
4734         (pv_area_fetch, pv_area_scan): Don't declare.
4735         * prologue-value.c (struct pv_area::area_entry): Now member of
4736         pv_area.
4737         (struct pv_area): Move to prologue-value.h.
4738         (pv_area::pv_area): Rename from make_pv_area.
4739         (pv_area::~pv_area): Rename from free_pv_area.
4740         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
4741         (clear_entries, find_entry, overlaps, store_would_trash, store)
4742         (fetch, find_reg, scan): Now member of pv_area.
4743         Remove "area" argument.  Update.
4744         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
4745         Update.
4746         * mn10300-tdep.c (push_reg, check_for_saved)
4747         (mn10300_analyze_prologue): Update.
4748         * mep-tdep.c (is_arg_spill, check_for_saved)
4749         (mep_analyze_prologue): Update.
4750         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
4751         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
4752         (m32c_is_struct_return, m32c_analyze_prologue): Update.
4753         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
4754         Update.
4755         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
4756         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
4757
4758 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
4759
4760         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
4761         * linux-nat.c (linux_nat_delete_thread): New variable.
4762         (lwp_free): Invoke linux_nat_delete_thread if set.
4763         (linux_nat_set_delete_thread): New function.
4764         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
4765         thread delete callback.
4766         * arm-linux-nat.c (arm_linux_delete_thread): New function.
4767         (_initialize_arm_linux_nat): Assign thread delete callback.
4768         * s390-linux-nat.c (s390_delete_thread): New function.
4769         (_initialize_s390_nat): Assign thread delete callback.
4770         * x86-linux-nat.c (x86_linux_add_target): Likewise.
4771         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
4772         function.
4773         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
4774         declaration.
4775         * nat/x86-linux.c (x86_linux_delete_thread): New function.
4776         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
4777
4778 2017-10-09  Tom Tromey  <tom@tromey.com>
4779
4780         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
4781         std::string.
4782         * tui/tui-layout.c (enum tui_status): Use std::string.
4783
4784 2017-10-11  Tom Tromey  <tom@tromey.com>
4785
4786         * gdbthread.h (thread_command): Constify.
4787         * inferior.h (detach_command): Constify.
4788         * top.h (set_history, show_history): Constify.
4789         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
4790         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
4791         * bsd-kvm.c (bsd_kvm_cmd): Constify.
4792         * printcmd.c (set_command): Constify.
4793         (non_const_set_command): New function.
4794         * dcache.c (set_dcache_command, show_dcache_command): Constify.
4795         * breakpoint.c (enable_command, disable_command, delete_command)
4796         (catch_command, tcatch_command, set_breakpoint_cmd)
4797         (show_breakpoint_cmd): Constify.
4798         * macrocmd.c (macro_command): Constify.
4799         * infcmd.c (unset_command, kill_command, detach_command)
4800         (info_proc_cmd): Constify.
4801         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
4802         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
4803         (info_auto_load_cmd): Constify.
4804         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
4805         (unset_tdesc_cmd): Constify.
4806         * ada-lang.c (set_ada_command, show_ada_command)
4807         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
4808         * guile/guile.c (set_guile_command, show_guile_command)
4809         (info_guile_command): Constify.
4810         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
4811         Constify.
4812         * skip.c (skip_command): Constify.
4813         * compile/compile.c (_initialize_compile): Constify.
4814         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
4815         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
4816         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
4817         (maint_btrace_pt_show_cmd): Constify.
4818         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
4819         Constify.
4820         * python/python.c (user_show_python, user_set_python): Constify.
4821         * mips-tdep.c (set_mips_command, show_mips_command)
4822         (set_mipsfpu_command): Constify.
4823         * record-btrace.c (cmd_record_btrace_start)
4824         (cmd_set_record_btrace, cmd_show_record_btrace)
4825         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
4826         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
4827         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
4828         Constify.
4829         * symfile.c (overlay_command): Constify.
4830         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
4831         * cli/cli-logging.c (set_logging_command, show_logging_command):
4832         Constify.
4833         * cli/cli-dump.c (dump_command, append_command)
4834         (srec_dump_command, ihex_dump_command, verilog_dump_command)
4835         (tekhex_dump_command, binary_dump_command)
4836         (binary_append_command): Constify.
4837         * cli/cli-decode.c (struct cmd_list_element): Change type of
4838         "fun".
4839         * cli/cli-cmds.c (info_command, show_command, set_debug)
4840         (show_debug): Constify.
4841         (show_command): Add non-const overload.
4842         * top.c (set_history, show_history): Constify.
4843         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
4844         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
4845         * target.c (target_command): Constify.
4846         * sparc64-tdep.c (info_adi_command): Constify.
4847         * record-full.c (cmd_record_full_start): Constify.
4848         (set_record_full_command): Constify.  Fix typo.
4849         (show_record_full_command): Constify.
4850         * thread.c (thread_command, thread_apply_command): Constify.
4851         * memattr.c (dummy_cmd): Constify.
4852         * value.c (function_command): Constify.
4853         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
4854         * probe.c (info_probes_command): Constify.
4855         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
4856         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
4857         (show_thread_cmd, set_thread_default_cmd)
4858         (show_thread_default_cmd): Constify.
4859         (check_empty): Constify.
4860         * tracepoint.c (tfind_command): Constify.
4861         * cp-support.c (maint_cplus_command): Constify.
4862         * windows-tdep.c (info_w32_command): Constify.
4863         * record.c (cmd_record_start, set_record_command)
4864         (show_record_command, info_record_command, cmd_record_goto):
4865         Constify.
4866         * ravenscar-thread.c (set_ravenscar_command)
4867         (show_ravenscar_command): Constify.
4868         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
4869         Constify.
4870         (add_internal_problem_command): Remove casts.
4871         * arc-tdep.c (maintenance_print_arc_command): Constify.
4872         * valprint.c (set_print, show_print, set_print_raw)
4873         (show_print_raw): Constify.
4874         * maint.c (maintenance_command, maintenance_info_command)
4875         (maintenance_print_command, maintenance_set_cmd)
4876         (maintenance_show_cmd, set_per_command_cmd)
4877         (show_per_command_cmd, maintenance_check_command): Constify.
4878         * language.c (set_check, show_check): Constify.
4879         * typeprint.c (show_print_type, set_print_type): Constify.
4880         * go32-nat.c (go32_info_dos_command): Constify.
4881
4882 2017-10-11  Tom Tromey  <tom@tromey.com>
4883
4884         * breakpoint.c (prepare_re_set_context): Remove.
4885         (breakpoint_re_set_one): Update.  Don't use cleanups.
4886         (breakpoint_re_set): Use scoped_restore, std::string, and
4887         scoped_restore_current_language.
4888
4889 2017-10-11  Tom Tromey  <tom@tromey.com>
4890
4891         * breakpoint.c (commands_command_1): Use std::string.
4892         (cleanup_executing_breakpoints): Remove.
4893         (bpstat_do_actions_1): Use scoped_restore.
4894         (bpstat_check_watchpoint): Use std::string.
4895         (decode_static_tracepoint_spec): Likewise.
4896         (break_range_command): Likewise.
4897         (watch_command_1): Likewise.
4898         (compare_breakpoints): Change argument types.
4899         (clear_command): Use std::vector.
4900         (cleanup_executing_breakpoints): Remove.
4901         (update_global_location_list): Use unique_xmalloc_ptr.
4902         (strace_command): Remove unused declaration.
4903
4904 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
4905
4906         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
4907         * NEWS: Mention new FreeBSD/arm native configuration.
4908         * configure.host: Add arm*-*-freebsd*.
4909         * configure.nat: Likewise.
4910         * arm-fbsd-nat.c: New file.
4911
4912 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
4913
4914         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
4915         (ALLDEPFILES): Add arm-fbsd-tdep.c.
4916         * NEWS: Mention new FreeBSD/arm target.
4917         * configure.tgt: Add arm*-*-freebsd*.
4918         * arm-fbsd-tdep.c: New file.
4919         * arm-fbsd-tdep.h: New file.
4920
4921 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
4922
4923         * linux-tdep.c (linux_make_corefile_notes): Remove call to
4924         `gdbarch_elfcore_write_linux_prpsinfo'.
4925         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
4926         method.
4927         (elf_internal_linux_prpsinfo): Remove declaration.
4928         * gdbarch.h: Regenerate.
4929         * gdbarch.c: Regenerate.
4930
4931 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
4932
4933         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
4934         `set_gdbarch_elfcore_write_linux_prpsinfo'.
4935
4936 2017-10-11  Pedro Alves  <palves@redhat.com>
4937
4938         * breakpoint.c (reattach_breakpoints): Delete.
4939         * breakpoint.h (reattach_breakpoints): Delete.
4940
4941 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
4942
4943         * symfile.c (registered_sym_fns): Make struct, not typedef.
4944         (DEF_VEC_O (registered_sym_fns)): Remove.
4945         (symtab_fns): Change type to std::vector.
4946         (add_symtab_fns): Adjust.
4947         (find_sym_fns): Adjust.
4948
4949 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
4950
4951         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
4952         * arc-tdep.h (arc_arch_is_em): New function.
4953         (arc_arch_is_hs): Likewise.
4954
4955 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
4956
4957         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
4958         parentheses in the declaration.
4959         (macro_lookup_inclusion): Likewise.
4960         (macro_lookup_definition): Likewise.
4961         * p-lang.h (pascal_builtin_types): Likewise.
4962         * tui/tui-data.c (tui_win_list): Likewise.
4963         * tui/tui-data.h (tui_win_list): Likewise.
4964         * utils.h (make_cleanup_free_section_addr_info): Likewise.
4965
4966 2017-10-11  Mark Rages  <markrages@gmail.com>
4967
4968         * target-memory.c (block_boundaries): Fix for block address not
4969         aligned on block size.
4970
4971 2017-10-10  Pedro Alves <palves@redhat.com>
4972             Tom Tromey  <tom@tromey.com>
4973
4974         * breakpoint.c (struct captured_breakpoint_query_args)
4975         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
4976         (print_breakpoint): New.
4977         * breakpoint.h (print_breakpoint): Declare.
4978         * common/common-exceptions.h (enum return_reason): Remove
4979         references to catch_exceptions.
4980         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
4981         Delete.
4982         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
4983         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
4984         * gdb.h: Delete.
4985         * gdbthread.h (thread_select): Declare.
4986         * mi/mi-cmd-break.c: Don't include gdb.h.
4987         (breakpoint_notify): Use print_breakpoint.
4988         * mi/mi-cmd-catch.c: Don't include gdb.h.
4989         * mi/mi-interp.c: Don't include gdb.h.
4990         (mi_print_breakpoint_for_event): New.
4991         (mi_breakpoint_created, mi_breakpoint_modified): Use
4992         mi_print_breakpoint_for_event.
4993         * mi/mi-main.c: Don't include gdb.h.
4994         (mi_cmd_thread_select): Parse the global thread ID here.  Use
4995         thread_select instead of gdb_thread_select.
4996         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
4997         of using gdb_list_thread_ids.
4998         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
4999         FILEIO_ENOSYS here.
5000         (remote_fileio_request): Use TRY/CATCH instead of
5001         catch_exceptions.
5002         * symfile-mem.c (struct symbol_file_add_from_memory_args)
5003         (symbol_file_add_from_memory_wrapper): Delete.
5004         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
5005         * thread.c: Don't include gdb.h.
5006         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
5007         (thread_alive): Use thread_select.
5008         (do_captured_thread_select): Delete, parts salvaged as ...
5009         (thread_select): ... this new function.
5010         (gdb_thread_select): Delete.
5011
5012 2017-10-10  Pedro Alves  <palves@redhat.com>
5013             Tom Tromey  <tom@tromey.com>
5014
5015         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
5016         and reverse logic.
5017         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
5018         No longer macros.  Instead ...
5019         (enum wp_check_result): They're now values of this new
5020         enumeration.
5021         (watchpoint_check): Change return type to wp_check_result and
5022         parameter type to bpstat.
5023         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
5024         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
5025         catch_errors.  Reverse logic of watchpoint_check call.
5026         (breakpoint_re_set_one): Now returns void and takes a breakpoint
5027         pointer as parameter.
5028         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
5029         * common/common-exceptions.c (throw_exception_sjlj): Update
5030         comments to avoid mentioning catch_errors.
5031         * exceptions.c (catch_errors): Delete.
5032         * exceptions.h: Update comments to avoid mentioning catch_errors.
5033         (catch_errors_ftype, catch_errors): Delete.
5034         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
5035         (hook_stop_stub): Delete.
5036         (restore_selected_frame): Change return type to void, and
5037         parameter type to const frame_id &.
5038         (restore_infcall_control_state): Use TRY/CATCH instead of
5039         catch_errors.
5040         * main.c (captured_command_loop): Return void and remove
5041         parameter.  Remove references to catch_errors.
5042         (captured_main): Use TRY/CATCH instead of catch_errors.
5043         * objc-lang.c (objc_submethod_helper_data)
5044         (find_objc_msgcall_submethod_helper): Delete.
5045         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
5046         catch_errors.
5047         * record-full.c (record_full_message): Return void.
5048         (record_full_message_args, record_full_message_wrapper): Delete.
5049         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
5050         instead of catch_errors.
5051         * solib-aix.c (solib_aix_open_symbol_file_object): Change
5052         parameter type to int.
5053         * solib-darwin.c (open_symbol_file_object): Ditto.
5054         * solib-dsbt.c (open_symbol_file_object): Ditto.
5055         * solib-frv.c (open_symbol_file_object): Ditto.
5056         * solib-svr4.c (open_symbol_file_object): Ditto.
5057         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
5058         * solib.c (update_solib_list): Use TRY/CATCH instead of
5059         catch_errors.
5060         * solist.h (struct target_so_ops) <open_symbol_file_object>:
5061         Change type.
5062         * symmisc.c (struct print_symbol_args): Remove.
5063         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
5064         (print_symbol): Change type.
5065         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
5066         and remove parameters.
5067         (catch_errors): New.
5068         (get_windows_debug_event): Adjust.
5069
5070 2017-10-09  Tom Tromey  <tom@tromey.com>
5071
5072         * mi/mi-main.c (free_splay_tree): Remove.
5073         (list_available_thread_groups): Use splay_tree_up.
5074         * common/gdb_splay_tree.h: New file.
5075
5076 2017-10-09  Tom Tromey  <tom@tromey.com>
5077
5078         * mi/mi-main.c (do_nothing): Remove.
5079         (list_available_thread_groups): Update.
5080
5081 2017-10-09  Pedro Alves  <palves@redhat.com>
5082
5083         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
5084         reading registers when switching context.
5085
5086 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
5087
5088         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
5089         (fbsd_convert_siginfo): Likewise.
5090         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
5091
5092 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
5093
5094         * configure.ac (try_guile_versions): Remove guile-2.2.
5095         * configure: Regenerate.
5096
5097 2017-10-09  Tom Tromey  <tom@tromey.com>
5098
5099         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
5100         (COMPILE.pre): Use $(CXX).
5101
5102 2017-10-09  Pedro Alves  <palves@redhat.com>
5103
5104         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
5105         Use bool.
5106         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5107         * cp-support.h (cp_remove_params): Now returns a
5108         gdb::unique_xmalloc_ptr.
5109         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
5110         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
5111         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
5112         returning a gdb::unique_xmalloc_ptr.
5113         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5114         * stack.c (find_frame_funname): Adjust to cp_remove_params
5115         returning a gdb::unique_xmalloc_ptr.
5116
5117 2017-10-08  Tom Tromey  <tom@tromey.com>
5118
5119         * dwarf2read.c (dwarf2_get_dwz_file): Use
5120         gdb::unique_xmalloc_ptr.
5121         (find_slot_in_mapped_hash): Likewise.
5122         (dwarf2_physname): Likewise.
5123         (create_dwo_unit_in_dwp_v1): Use std::string.
5124         (create_dwo_unit_in_dwp_v2): Likewise.
5125         (lookup_dwo_cutu): Likewise.
5126         (inherit_abstract_dies): Use std::vector.
5127         (read_array_type): Likewise.
5128         (dwarf_decode_macros): Remove unused declaration.
5129         (unsigned_int_compar): Remove.
5130         (dwarf2_build_psymtabs_hard): Use scoped_restore.
5131         (psymtabs_addrmap_cleanup): Remove.
5132
5133 2017-10-08  Tom Tromey  <tom@tromey.com>
5134
5135         * frame-unwind.c (frame_unwind_try_unwinder): Update.
5136         * frame.h (frame_cleanup_after_sniffer): Declare.
5137         (frame_prepare_for_sniffer): Return void.
5138         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
5139         type of argument.
5140         (frame_prepare_for_sniffer): Return void.
5141
5142 2017-10-08  Tom Tromey  <tom@tromey.com>
5143
5144         * utils.h (make_cleanup_value_free): Remove.
5145         * utils.c (do_value_free, struct cleanup): Remove.
5146         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
5147         Use gdb_value_up.
5148         * value.h (struct value_deleter): New.
5149         (gdb_value_up): New typedef.
5150
5151 2017-10-08  Tom Tromey  <tom@tromey.com>
5152
5153         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
5154         (make_cleanup_free_search_symbols): Remove.
5155         (search_symbols): Return std::vector.
5156         (symbol_search::compare_search_syms): Now member of
5157         symbol_search.  Change arguments.
5158         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
5159         (symtab_symbol_info, rbreak_command): Update.
5160         * symtab.h (struct symbol_search) <next>: Remove.
5161         Add constructors.
5162         (symbol_search::operator<): New function.
5163         (symbol_search::operator==): New function.
5164         (search_symbols): Remove std::vector.
5165         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
5166         (symbol_search::compare_search_syms): Declare.
5167
5168 2017-10-06  Yao Qi  <yao.qi@linaro.org>
5169
5170         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
5171         arch/aarch64-insn.o.
5172         Remove one rule.
5173         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
5174
5175 2017-10-06  Yao Qi  <yao.qi@linaro.org>
5176
5177         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
5178         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
5179         arch/arm-linux.o respectively.
5180         * configure.tgt: Likewise.
5181
5182 2017-10-06  Yao Qi  <yao.qi@linaro.org>
5183
5184         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
5185         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
5186
5187 2017-10-06  Pedro Alves  <palves@redhat.com>
5188
5189         * windows-nat.c: Include <algorithm>.
5190
5191 2017-10-06  Yao Qi  <yao.qi@linaro.org>
5192
5193         * configure.tgt (i386_tobjs): New variable.
5194         (amd64_tobjs): New variable.
5195         Set $cpu_obs and $os_obs.
5196
5197 2017-10-06  Yao Qi  <yao.qi@linaro.org>
5198
5199         * Makefile.in (CONFIG_SRC_SUBDIR): New.
5200         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
5201         (clean): Remove object files and dependency files.
5202         (distclean): Remove the directory.
5203         * configure.ac: Invoke AC_CONFIG_COMMANDS.
5204         * configure: Re-generated.
5205         * configure.tgt: Replace amd64.o with arch/amd64.o.
5206
5207 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
5208
5209         PR build/22188
5210         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
5211         and SETEND.
5212
5213 2017-10-05  Pedro Alves  <palves@redhat.com>
5214
5215         * linux-nat.c (linux_child_follow_fork): When following the parent
5216         and detaching the child, consult the parent thread's architecture
5217         instead of the child's.
5218
5219 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
5220
5221         * ax.h: Do not include "doublest.h".
5222         (union agent_val): Remove.
5223
5224 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
5225
5226         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
5227         (decimal_to_string): Return std::string object.
5228         (decimal_from_string): Accept std::string object.  Return bool.
5229         (decimal_from_integral, decimal_from_doublest): Remove.
5230         (decimal_from_longest): Add prototype.
5231         (decimal_from_ulongest): Likewise.
5232         (decimal_to_longest): Likewise.
5233         (decimal_from_doublest): Likewise.
5234         * dfp.c: Do not include "gdbtypes.h" or "value.h".
5235         (MAX_DECIMAL_STRING): Move here.
5236         (decimal_to_string): Return std::string object.
5237         (decimal_from_string): Accept std::string object.  Return bool.
5238         (decimal_from_integral): Remove, replace by ...
5239         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
5240         (decimal_to_longest): New function.
5241         (decimal_from_floating): Remove, replace by ...
5242         (decimal_from_doublest): ... this new function.
5243         (decimal_to_doublest): Update to new decimal_to_string interface.
5244
5245         * value.c (unpack_long): Use decimal_to_longest.
5246         * valops.c (value_cast): Use decimal_from_doublest instead of
5247         decimal_from_floating.  Use decimal_from_[u]longest isntead of
5248         decimal_from_integral.
5249         * valarith.c (value_args_as_decimal): Likewise.
5250         * valprint.c (print_decimal_floating): Update to new
5251         decimal_to_string interface.
5252         * printcmd.c (printf_decfloat): Likewise.
5253         * c-exp.y (parse_number): Update to new decimal_from_string interface.
5254
5255 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
5256
5257         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
5258         * gdbtypes.c: Include "floatformat.h".
5259         * value.c: Likewise.
5260         * m68k-tdep.c: Likewise.
5261
5262         * findvar.c: Do not include "floatformat.h".
5263         * amd64-darwin-tdep.c: Likewise.
5264         * arm-linux-tdep.c: Likewise.
5265         * i386-darwin-tdep.c: Likewise.
5266         * i387-tdep.c: Likewise.
5267         * m68k-linux-tdep.c: Likewise.
5268         * mep-tdep.c: Likewise.
5269         * mips-tdep.c: Likewise.
5270         * nios2-tdep.c: Likewise.
5271         * s390-linux-tdep.c: Likewise.
5272         * sparc-obsd-tdep.c: Likewise.
5273         * sparc-tdep.c: Likewise.
5274         * sparc64-tdep.c: Likewise.
5275         * spu-tdep.c: Likewise.
5276         * tic6x-tdep.c: Likewise.
5277         * tilegx-tdep.c: Likewise.
5278         * vax-tdep.c: Likewise.
5279         * xstormy16-tdep.c: Likewise.
5280         * xtensa-tdep.c: Likewise.
5281
5282         * top.c: Do not include "doublest.h".
5283         * aarch64-tdep.c: Likewise.
5284         * alpha-tdep.c: Likewise.
5285         * arm-linux-tdep.c: Likewise.
5286         * m68k-linux-tdep.c: Likewise.
5287         * tilegx-tdep.c: Likewise.
5288         * xstormy16-tdep.c: Likewise.
5289
5290 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
5291
5292         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
5293         (mipsn32_fbsd_sigframe): Define.
5294         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
5295         for FreeBSD/mipsn32.
5296
5297 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
5298
5299         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
5300         AT_HWCAP.
5301
5302 2017-10-05  Tristan Gingold  <tgingold@free.fr>
5303
5304         * MAINTAINERS (Misc): Update my email address.
5305
5306 2017-10-04  Pedro Alves  <palves@redhat.com>
5307
5308         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
5309         it instead of target_gdbarch.
5310         (get_remote_state, get_remote_packet_size): Adjust
5311         get_remote_arch_state calls, passing down target_gdbarch
5312         explicitly.
5313         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
5314         'gdbarch' and use it instead of target_gdbarch.
5315         (get_memory_packet_size): Adjust get_remote_arch_state calls,
5316         passing down target_gdbarch explicitly.
5317         (struct stop_reply) <arch>: New field.
5318         (remote_parse_stop_reply): Use the stopped thread's architecture,
5319         not the current inferior's.  Save the architecture in the
5320         stop_reply.
5321         (process_stop_reply): Use the stop reply's architecture.
5322         (process_g_packet, remote_fetch_registers)
5323         (remote_prepare_to_store, store_registers_using_G)
5324         (remote_store_registers): Adjust get_remote_arch_state calls,
5325         using the regcache's architecture.
5326         (remote_get_trace_status): Adjust get_remote_arch_state calls,
5327         passing down target_gdbarch explicitly.
5328         * spu-multiarch.c (spu_thread_architecture): Defer to the target
5329         beneath instead of calling target_gdbarch.
5330         * target.c (default_thread_architecture): Use the specified
5331         inferior's architecture, instead of the current inferior's
5332         architecture (via target_gdbarch).
5333
5334 2017-10-04  Pedro Alves  <palves@redhat.com>
5335
5336         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
5337         case.
5338         (regcache_print): Handle !target_has_registers here instead.
5339
5340 2017-10-04  Pedro Alves  <palves@redhat.com>
5341
5342         * frame.c (create_test_frame): Delete.
5343         * frame.h (create_test_frame): Delete.
5344         * gdbarch-selftests.c: Include gdbthread.h and target.h.
5345         (class regcache_test): Delete.
5346         (test_target_has_registers, test_target_has_stack)
5347         (test_target_has_memory, test_target_prepare_to_store)
5348         (test_target_store_registers): New functions.
5349         (test_target_ops): New class.
5350         (register_to_value_test): Error out if there's already a
5351         process_stratum (or higher) target pushed.  Create a fuller mock
5352         environment, with mock target_ops, inferior, address space, thread
5353         and inferior_ptid.
5354         * progspace.c (struct address_space): Move to ...
5355         * progspace.h (struct address_space): ... here.
5356         * regcache.h (regcache::~regcache, regcache::raw_write)
5357         [GDB_SELF_TEST]: No longer virtual.
5358
5359 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
5360
5361         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
5362
5363 2017-10-04  Pedro Alves  <palves@redhat.com>
5364
5365         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
5366         out of 'between TRY and CATCH'.
5367
5368 2017-10-04  Pedro Alves  <palves@redhat.com>
5369
5370         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
5371         * common/common-exceptions.h (TRY): Open an outermost scope.
5372         Expand intro comment.
5373         (CATCH): Reindent.
5374         (END_CATCH): Close the outermost scope.
5375         * completer.c (complete_line_internal): Add missing END_CATCH.
5376
5377 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
5378
5379         * NEWS (Changes since GDB 8.0): Add entry about new
5380         'set-cwd-on-gdbserver' feature.
5381         (New remote packets): Add entry for QSetWorkingDir.
5382         * common/common-inferior.h (set_inferior_cwd): New prototype.
5383         * infcmd.c (set_inferior_cwd): Remove "static".
5384         (show_cwd_command): Expand text to include remote debugging.
5385         * remote.c: Add PACKET_QSetWorkingDir.
5386         (remote_protocol_features) <QSetWorkingDir>: New entry for
5387         PACKET_QSetWorkingDir.
5388         (extended_remote_set_inferior_cwd): New function.
5389         (extended_remote_create_inferior): Call
5390         "extended_remote_set_inferior_cwd".
5391         (_initialize_remote): Call "add_packet_config_cmd" for
5392         QSetWorkingDir.
5393
5394 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
5395
5396         * NEWS (New commands): Mention "set/show cwd".
5397         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
5398         "cd" command's help text.
5399         * common/common-inferior.h (get_inferior_cwd): New prototype.
5400         * infcmd.c (inferior_cwd_scratch): New global variable.
5401         (set_inferior_cwd): New function.
5402         (get_inferior_cwd): Likewise.
5403         (set_cwd_command): Likewise.
5404         (show_cwd_command): Likewise.
5405         (_initialize_infcmd): Add "set/show cwd" commands.
5406         * inferior.h (class inferior) <cwd>: New field.
5407         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
5408         (fork_inferior): Change inferior's cwd before its execution.
5409         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
5410         to CreateProcess.
5411
5412 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
5413
5414         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
5415         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
5416         (COMMON_OBS): Add gdb_tilde_expand.o.
5417         * common/gdb_tilde_expand.c: New file.
5418         * common/gdb_tilde_expand.h: Likewise.
5419
5420 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
5421
5422         * gdbarch.sh (objfile): Remove duplicate declaration.
5423         * gdbarch.h: Regenerate.
5424
5425 2017-10-03  Tom Tromey  <tom@tromey.com>
5426
5427         * utils.c (internal_vproblem): Use string_vprintf.
5428
5429 2017-10-03  Tom Tromey  <tom@tromey.com>
5430
5431         * printcmd.c (info_symbol_command): Use std::string.
5432
5433 2017-10-03  Tom Tromey  <tom@tromey.com>
5434
5435         * top.c (gdb_safe_append_history): Use std::string.
5436
5437 2017-10-03  Tom Tromey  <tom@tromey.com>
5438
5439         * event-top.c (stdin_event_handler): Update.
5440         * main.c (captured_main_1): Update.
5441         * top.h (make_delete_ui_cleanup): Remove.
5442         (struct ui): Add constructor and destructor.
5443         (new_ui, delete_ui): Remove.
5444         * top.c (make_delete_ui_cleanup): Remove.
5445         (new_ui_command): Use std::unique_ptr.
5446         (delete_ui_cleanup): Remove.
5447         (ui::ui): Rename from new_ui.  Update.
5448         (free_ui): Remove.
5449         (ui::~ui): Rename from delete_ui.  Update.
5450
5451 2017-10-03  Tom Tromey  <tom@tromey.com>
5452
5453         * symfile.c (load_progress): Use gdb::byte_vector.
5454
5455 2017-10-03  Tom Tromey  <tom@tromey.com>
5456
5457         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
5458         declaration.
5459         * printcmd.c (x_command): Remove unused declaration.
5460         * symfile.c (symbol_file_command): Remove unused declaration.
5461
5462 2017-10-03  Tom Tromey  <tom@tromey.com>
5463
5464         * utils.c (internal_vproblem): Use std::string.
5465         (defaulted_query): Likewise.
5466
5467 2017-10-03  Tom Tromey  <tom@tromey.com>
5468
5469         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
5470         * top.c (execute_command_to_string): Update.
5471         * utils.c (make_cleanup_restore_page_info): Remove.
5472         (do_restore_page_info_cleanup): Remove.
5473         (set_batch_flag_and_restore_page_info):
5474         New.
5475         (make_cleanup_restore_page_info): Remove.
5476         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5477         (~set_batch_flag_and_restore_page_info): New
5478         (make_cleanup_restore_uinteger): Remove.
5479         (make_cleanup_restore_integer): Remove.
5480         (struct restore_integer_closure): Remove.
5481         (restore_integer): Remove.
5482         * utils.h (struct set_batch_flag_and_restore_page_info): New
5483         class.
5484         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5485         (make_cleanup_restore_page_info): Remove.
5486         (make_cleanup_restore_uinteger) Remove.
5487         (make_cleanup_restore_integer) Remove.
5488
5489 2017-10-03  Tom Tromey  <tom@tromey.com>
5490
5491         * record-full.h (record_full_gdb_operation_disable_set): Return
5492         scoped_restore_tmpl<int>.
5493         * infrun.c (adjust_pc_after_break): Update.
5494         (handle_signal_stop): Update.
5495         * record-full.c (record_full_gdb_operation_disable_set): Return
5496         scoped_restore_tmpl<int>.
5497         (record_full_wait_1, record_full_insert_breakpoint)
5498         (record_full_remove_breakpoint, record_full_save)
5499         (record_full_goto_insn): Update.
5500
5501 2017-10-02  Tom Tromey  <tom@tromey.com>
5502
5503         PR rust/22236:
5504         * rust-lang.c (rust_val_print_str): New function.
5505         (val_print_struct): Call it.
5506         (rust_subscript): Preserve name of slice type.
5507
5508 2017-10-02  Tom Tromey  <tom@tromey.com>
5509
5510         * rust-lang.c (rust_subscript): Handle slices in
5511         EVAL_AVOID_SIDE_EFFECTS case.
5512
5513 2017-10-02  Tom Tromey  <tom@tromey.com>
5514
5515         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
5516
5517 2017-10-02  Tom Tromey  <tom@tromey.com>
5518
5519         * rust-lang.h (rust_slice_type): Add "extern".
5520
5521 2017-10-02  Tom Tromey  <tom@tromey.com>
5522             Pedro Alves  <palves@redhat.com>
5523
5524         * ada-lang.h (ada_exc_info::operator<): Make const.
5525         (ada_exc_info::operator==): Make const.
5526         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
5527         Make const.
5528
5529 2017-09-29  Tom Tromey  <tom@tromey.com>
5530
5531         * target.c (read_whatever_is_readable): Change type of "result".
5532         Update.
5533         (free_memory_read_result_vector): Remove.
5534         (read_memory_robust): Change return type.  Update.
5535         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
5536         bin2hex, std::string.
5537         * target.h (memory_read_result_s): Remove typedef.
5538         (free_memory_read_result_vector): Remove.
5539         (read_memory_robust): Return std::vector.
5540
5541 2017-09-29  Tom Tromey  <tom@tromey.com>
5542
5543         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
5544
5545 2017-09-29  Tom Tromey  <tom@tromey.com>
5546
5547         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
5548         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
5549         operator< and operator==.
5550         (ada_exceptions_list): Return a std::vector.
5551         * ada-lang.c (ada_exc_info::operator<): Rename from
5552         compare_ada_exception_info.
5553         (ada_exc_info::operator==): New.
5554         (sort_remove_dups_ada_exceptions_list): Change type of
5555         "exceptions".
5556         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
5557         (ada_add_global_exceptions): Likewise.
5558         (ada_exceptions_list_1): Return a std::vector.
5559         (ada_exceptions_list): Likewise.
5560
5561 2017-09-29  Tom Tromey  <tom@tromey.com>
5562
5563         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
5564         'std::set *'.
5565         (print_one_inferior): Update.
5566         (free_vector_of_ints): Remove.
5567         (list_available_thread_groups): Change "ids" to std::set.
5568         (mi_cmd_list_thread_groups): Update.
5569         (struct collect_cores_data) <core>: Now a std::set.
5570         (collect_cores): Update.
5571         (unique): Remove.
5572         (print_one_inferior): Update.
5573
5574 2017-09-29  Tom Tromey  <tom@tromey.com>
5575
5576         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
5577         (mi_execute_async_cli_command): Likewise.
5578         (mi_cmd_trace_frame_collected): Use field_fmt.
5579
5580 2017-09-29  Tom Tromey  <tom@tromey.com>
5581
5582         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
5583         gdb::byte_vector.
5584
5585 2017-09-29  Tom Tromey  <tom@tromey.com>
5586
5587         * mi/mi-parse.c (mi_parse): Remove unused declaration.
5588
5589 2017-09-29  Tom Tromey  <tom@tromey.com>
5590
5591         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
5592
5593 2017-09-29  Tom Tromey  <tom@tromey.com>
5594
5595         * varobj.h (varobj_gen_name): Return std::string.
5596         * varobj.c (varobj_gen_name): Return std::string.
5597         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
5598         (mi_cmd_var_delete): Don't copy "name".
5599
5600 2017-09-29  Tom Tromey  <tom@tromey.com>
5601
5602         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
5603         (mi_cmd_break_insert_1): Update.
5604
5605 2017-09-29  Tom Tromey  <tom@tromey.com>
5606
5607         * target.h (make_scoped_defer_target_commit_resume): Update.
5608         * target.c (make_scoped_defer_target_commit_resume): Rename from
5609         make_cleanup_defer_target_commit_resume.  Return a
5610         scoped_restore.
5611         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
5612
5613 2017-09-29  Tom Tromey  <tom@tromey.com>
5614
5615         * main.c (captured_main_1): Remove unused declaration.
5616         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
5617
5618 2017-09-29  Tom Tromey  <tom@tromey.com>
5619
5620         * symtab.c (search_symbols): Remove unused outer cleanup.
5621         (make_source_files_completion_list): Remove unused declaration.
5622
5623 2017-09-29  Tom Tromey  <tom@tromey.com>
5624
5625         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
5626
5627 2017-09-29  Tom Tromey  <tom@tromey.com>
5628
5629         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
5630         gdb::byte_vector.
5631
5632 2017-09-29  Tom Tromey  <tom@tromey.com>
5633
5634         * complaints.c (vcomplaint): Use std::string.
5635
5636 2017-09-29  Tom Tromey  <tom@tromey.com>
5637
5638         * tracepoint.c (trace_variable_command): Use std::string.
5639         (encode_actions_1): Remove unused declarations.
5640         (create_tsv_from_upload): Use std::string.
5641
5642 2017-09-29  Tom Tromey  <tom@tromey.com>
5643
5644         * cp-support.c (gdb_demangle): Use std::string.
5645
5646 2017-09-29  Tom Tromey  <tom@tromey.com>
5647
5648         * stack.c (parse_frame_specification): Use std::string
5649         (info_frame_command): Use gdb::unique_xmalloc_ptr.
5650
5651 2017-09-29  Tom Tromey  <tom@tromey.com>
5652
5653         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
5654
5655 2017-09-29  Tom Tromey  <tom@tromey.com>
5656
5657         * utils.c (vfprintf_maybe_filtered): Use std::string.
5658         (vfprintf_unfiltered): Likewise.
5659
5660 2017-09-29  Tom Tromey  <tom@tromey.com>
5661
5662         * event-top.c (top_level_prompt): Return std::string.
5663         (display_gdb_prompt): Update.
5664
5665 2017-09-29  Tom Tromey  <tom@tromey.com>
5666
5667         * unittests/common-utils-selftests.c (format): New function.
5668         (string_vprintf_tests): New function.
5669         (_initialize_common_utils_selftests): Register new tests.
5670         * common/common-utils.c (string_vprintf): New function.
5671         * common/common-utils.h (string_vprintf): Declare.
5672
5673 2017-09-29  Pedro Alves  <palves@redhat.com>
5674
5675         * common/rsp-low.c (unpack_varlen_hex): Constify.
5676         * common/rsp-low.h (unpack_varlen_hex): Constify.
5677         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
5678         Constify.
5679         * remote.c (remote_set_permissions, read_ptid)
5680         (remote_current_thread, remote_get_threads_with_qthreadinfo)
5681         (remote_static_tracepoint_marker_at)
5682         (remote_static_tracepoint_markers_by_strid)
5683         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
5684         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
5685         (parse_tracepoint_definition, parse_tsv_definition)
5686         (parse_static_tracepoint_marker_definition): Constify.
5687         * tracepoint.h (parse_static_tracepoint_marker_definition)
5688         (parse_trace_status, parse_tracepoint_status)
5689         (parse_tracepoint_definition, parse_tsv_definition): Constify.
5690
5691 2017-09-29  Pedro Alves  <palves@redhat.com>
5692
5693         * remote.c (target_buf, target_buf_size): Delete.
5694         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
5695         Use the connection's packet buffer instead.
5696         All callers adjusted.
5697         (_initialize_remote): Remove references to target_buf and
5698         target_buf_size.
5699
5700 2017-09-28  Pedro Alves  <palves@redhat.com>
5701
5702         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5703         unittests/common-utils-selftests.c.
5704         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
5705         (COMMON_OBS): Remove utils-selftests.o.
5706         * utils-selftests.c: Move to ...
5707         * unittests/common-utils-selftests.c: ... here and rename self
5708         test to "string_printf".
5709
5710 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
5711
5712         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
5713         having NULL cus or tus.
5714
5715 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
5716
5717         * arm-tdep.c: (convert_from_extended): Remove.
5718         (convert_to_extended): Likewise.
5719         (arm_extract_return_value): Use convert_typed_floating.
5720         (arm_store_return_value): Likewise.
5721
5722         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5723         * sh-tdep.c: Do not include "floatformat.h".
5724         (sh_littlebyte_bigword_type): New function.
5725         (sh_register_convert_to_virtual): Use convert_typed_floating.
5726         (sh_register_convert_to_raw): Likewise.
5727         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5728         (sh64_littlebyte_bigword_type): New function.
5729         (sh64_extract_return_value): Use convert_typed_floating.
5730         (sh64_register_convert_to_virtual): Likewise.
5731         (sh64_register_convert_to_raw): Likewise.
5732
5733 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
5734
5735         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
5736         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
5737
5738         * gdbtypes.h (union type_specific): Make field floatformat hold
5739         just a single struct floatformat, not an array.
5740         (floatformat_from_type): Move here.
5741         * gdbtypes.c (floatformat_from_type): Move here.  Update to
5742         changed TYPE_FLOATFORMAT definition.
5743         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
5744         (recursive_dump_type): Likewise.
5745         (init_float_type): Install correct floatformat for byte order.
5746         (arch_float_type): Likewise.
5747
5748 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
5749
5750         * gdbtypes.c (init_type): Change incoming argument from
5751         length-in-bytes to length-in-bits.  Assert length is a
5752         multiple of TARGET_CHAR_BITS.
5753         (arch_type, arch_flags_type): Likewise.
5754         (init_integer_type): Update call to init_type.
5755         (init_character_type): Likewise.
5756         (init_boolean_type): Likewise.
5757         (init_float_type): Likewise.
5758         (init_decfloat_type): Likewise.
5759         (init_complex_type): Likewise.
5760         (init_pointer_type): Likewise.
5761         (objfile_type): Likewise.
5762         (arch_integer_type): Update call to arch_type.
5763         (arch_character_type): Likewise.
5764         (arch_boolean_type): Likewise.
5765         (arch_float_type): Likewise.
5766         (arch_decfloat_type): Likewise.
5767         (arch_complex_type): Likewise.
5768         (arch_pointer_type): Likewise.
5769         (gdbtypes_post_init): Likewise.
5770
5771         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
5772         (read_base_type): Likewise.
5773         * mdebugread.c (basic_type): Likewise.
5774         * stabsread.c (dbx_init_float_type): Likewise.
5775         (rs6000_builtin_type): Likewise.
5776         (read_range_type): Likewise.  Also, fix call to init_integer_type
5777         with erroneous length argument.
5778
5779         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
5780         * d-lang.c (build_d_types): Likewise.
5781         * f-lang.c (build_fortran_types): Likewise.
5782         * go-lang.c (build_go_types): Likewise.
5783         * opencl-lang.c (build_opencl_types): Likewise.
5784         * jit.c (finalize_symtab): Likewise.
5785         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
5786         (build_std_type_info_type): Likewise.
5787         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
5788         update call to arch_flags_type.
5789
5790         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
5791         arch_type.
5792         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
5793         * windows-tdep.c (windows_get_tlb_type): Likewise.
5794
5795         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
5796         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5797         * m32c-tdep.c (make_types): Likewise.
5798         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
5799         (rl78_psw_type): Update call to arch_flags_type.
5800         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
5801         * rx-tdep.c (rx_psw_type): Likewise.
5802         (rx_fpsw_type): Likewise.
5803         * sparc-tdep.c (sparc_psr_type): Likewise.
5804         (sparc_fsr_type): Likewise.
5805         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
5806         (sparc64_ccr_type): Likewise.
5807         (sparc64_fsr_type): Likewise.
5808         (sparc64_fprs_type): Likewise.
5809
5810 2017-09-27  Tom Tromey  <tom@tromey.com>
5811
5812         * findcmd.c (find_command): Constify.
5813
5814 2017-09-27  Tom Tromey  <tom@tromey.com>
5815
5816         * ada-tasks.c (task_command_1, task_command): Constify.
5817
5818 2017-09-27  Tom Tromey  <tom@tromey.com>
5819
5820         * symtab.c (maintenance_print_symbol_cache)
5821         (maintenance_flush_symbol_cache)
5822         (maintenance_print_symbol_cache_statistics): Constify.
5823
5824 2017-09-27  Tom Tromey  <tom@tromey.com>
5825
5826         * inferior.c (detach_inferior_command, kill_inferior_command)
5827         (inferior_command): Constify.
5828
5829 2017-09-27  Tom Tromey  <tom@tromey.com>
5830
5831         * regcache.c (regcache_print, maintenance_print_registers)
5832         (maintenance_print_raw_registers)
5833         (maintenance_print_cooked_registers)
5834         (maintenance_print_register_groups)
5835         (maintenance_print_remote_registers): Constify.
5836
5837 2017-09-27  Tom Tromey  <tom@tromey.com>
5838
5839         * printcmd.c (map_display_numbers, undisplay_command)
5840         (enable_disable_display_command, enable_display_command)
5841         (disable_display_command): Constify.
5842
5843 2017-09-27  Tom Tromey  <tom@tromey.com>
5844
5845         * breakpoint.h (delete_command): Don't declare.
5846         * breakpoint.c (delete_command, enable_once_command)
5847         (enable_count_command, enable_delete_command, breakpoint_1)
5848         (maintenance_info_breakpoints, stopin_command, stopat_command)
5849         (delete_command, delete_trace_command, save_breakpoints)
5850         (save_breakpoints_command, save_tracepoints_command): Constify.
5851
5852 2017-09-27  Tom Tromey  <tom@tromey.com>
5853
5854         * macrocmd.c (macro_expand_command, macro_expand_once_command)
5855         (skip_ws, extract_identifier, macro_define_command)
5856         (macro_undef_command, macro_list_command): Constify.
5857
5858 2017-09-27  Tom Tromey  <tom@tromey.com>
5859
5860         * infcmd.c (environment_info, set_environment_command)
5861         (unset_environment_command, path_info, info_proc_cmd_1)
5862         (info_proc_cmd_mappings, info_proc_cmd_stat)
5863         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
5864         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
5865
5866 2017-09-27  Tom Tromey  <tom@tromey.com>
5867
5868         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
5869         Constify.
5870
5871 2017-09-27  Tom Tromey  <tom@tromey.com>
5872
5873         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
5874
5875 2017-09-27  Tom Tromey  <tom@tromey.com>
5876
5877         * demangle.c (demangle_command): Constify.
5878
5879 2017-09-27  Tom Tromey  <tom@tromey.com>
5880
5881         * progspace.c (maintenance_info_program_spaces_command):
5882         Constify.
5883
5884 2017-09-27  Tom Tromey  <tom@tromey.com>
5885
5886         * compile/compile.c (check_raw_argument, compile_file_command)
5887         (compile_code_command, compile_print_command): Constify.
5888
5889 2017-09-27  Tom Tromey  <tom@tromey.com>
5890
5891         * reggroups.c (maintenance_print_reggroups): Constify.
5892
5893 2017-09-27  Tom Tromey  <tom@tromey.com>
5894
5895         * dwarf2read.c (save_gdb_index_command): Constify.
5896
5897 2017-09-27  Tom Tromey  <tom@tromey.com>
5898
5899         * stap-probe.c (info_probes_stap_command): Constify.
5900
5901 2017-09-27  Tom Tromey  <tom@tromey.com>
5902
5903         * fork-child.c (unset_exec_wrapper_command): Constify.
5904
5905 2017-09-27  Tom Tromey  <tom@tromey.com>
5906
5907         * btrace.c (get_uint, get_context_size, no_chunk)
5908         (maint_btrace_packet_history_cmd)
5909         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
5910         (maint_info_btrace_cmd): Constify.
5911
5912 2017-09-27  Tom Tromey  <tom@tromey.com>
5913
5914         * reverse.c (delete_bookmark_command): Constify.
5915
5916 2017-09-27  Tom Tromey  <tom@tromey.com>
5917
5918         * remote.c (set_memory_packet_size)
5919         (set_memory_write_packet_size, show_memory_write_packet_size)
5920         (set_memory_read_packet_size, show_memory_read_packet_size)
5921         (compare_sections_command, packet_command, remote_put_command)
5922         (remote_get_command, remote_delete_command): Constify.
5923
5924 2017-09-27  Tom Tromey  <tom@tromey.com>
5925
5926         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
5927         (set_mipsfpu_double_command, set_mipsfpu_none_command)
5928         (set_mipsfpu_auto_command): Constify.
5929
5930 2017-09-27  Tom Tromey  <tom@tromey.com>
5931
5932         * cli/cli-cmds.h (cd_command): Constify.
5933         * cli/cli-cmds.c (cd_command): Constify.
5934
5935 2017-09-27  Tom Tromey  <tom@tromey.com>
5936
5937         * thread.c (thread_name_command, thread_find_command): Constify.
5938
5939 2017-09-27  Tom Tromey  <tom@tromey.com>
5940
5941         * probe.c (enable_probes_command, disable_probes_command):
5942         Constify.
5943
5944 2017-09-27  Tom Tromey  <tom@tromey.com>
5945
5946         * symfile.c (symbol_file_command): Constify.
5947         * gdbcore.h (deprecated_file_changed_hook): Constify.
5948         * exec.c (deprecated_file_changed_hook, exec_file_command)
5949         (file_command): Constify.
5950         * defs.h (symbol_file_command): Constify.
5951
5952 2017-09-27  Tom Tromey  <tom@tromey.com>
5953
5954         * remote-fileio.c (set_system_call_allowed)
5955         (show_system_call_allowed): Constify.
5956
5957 2017-09-27  Tom Tromey  <tom@tromey.com>
5958
5959         * tracepoint.c (delete_trace_variable_command)
5960         (tfind_end_command, tfind_start_command, tfind_pc_command)
5961         (tfind_tracepoint_command, tfind_line_command)
5962         (tfind_range_command, tfind_outside_command): Constify.
5963
5964 2017-09-27  Tom Tromey  <tom@tromey.com>
5965
5966         * ax-gdb.c (maint_agent_printf_command, agent_command)
5967         (agent_eval_command): Constify.
5968
5969 2017-09-27  Tom Tromey  <tom@tromey.com>
5970
5971         * tracepoint.c (info_scope_command): Constify.
5972         * python/python.c (gdbpy_decode_line): Constify.
5973         * python/py-breakpoint.c (bppy_init): Constify.
5974         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
5975         * location.h: (new_linespec_location)
5976         (string_to_event_location_basic, string_to_event_location):
5977         Constify.
5978         * location.c (new_linespec_location)
5979         (string_to_event_location_basic, string_to_event_location):
5980         Constify.
5981         * linespec.h (decode_line_with_current_source)
5982         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
5983         * linespec.c (linespec_lex_to_end)
5984         (decode_line_with_current_source)
5985         (decode_line_with_last_displayed): Constify.
5986         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
5987         Constify.
5988         * cli/cli-cmds.c (edit_command, list_command): Constify.
5989         * breakpoint.h (until_break_command, watch_command_wrapper)
5990         (awatch_command_wrapper, rwatch_command_wrapper)
5991         (init_ada_exception_breakpoint): Constify.
5992         * breakpoint.c (break_command_1, dprintf_command)
5993         (break_range_command, watch_command_wrapper)
5994         (rwatch_command_wrapper, awatch_command_wrapper)
5995         (until_break_command, init_ada_exception_breakpoint)
5996         (strace_marker_create_sals_from_location, trace_command)
5997         (ftrace_command, strace_command, struct tracepoint): Constify.
5998         * ax-gdb.c (agent_command_1): Constify.
5999         * ada-lang.c (ada_exception_sal): Constify.
6000
6001 2017-09-27  Tom Tromey  <tom@tromey.com>
6002
6003         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
6004         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
6005         (get_context_size, no_chunk, get_insn_history_modifiers)
6006         (cmd_record_insn_history, get_call_history_modifiers)
6007         (cmd_record_call_history): Constify.
6008
6009 2017-09-27  Tom Tromey  <tom@tromey.com>
6010
6011         * source.c (show_substitute_path_command)
6012         (unset_substitute_path_command, set_substitute_path_command):
6013         Constify.
6014
6015 2017-09-27  Tom Tromey  <tom@tromey.com>
6016
6017         * typeprint.c (maintenance_print_type): Constify.
6018         * maint.c (maintenance_dump_me, maintenance_demangle)
6019         (maintenance_time_display, maintenance_info_sections)
6020         (maintenance_print_statistics, maintenance_deprecate)
6021         (maintenance_undeprecate): Constify.
6022         (maintenance_do_deprecate): Constify.  Use std::string.
6023         (maintenance_selftest): Constify.
6024         * gdbtypes.h (maintenance_print_type): Constify.
6025
6026 2017-09-27  Tom Tromey  <tom@tromey.com>
6027
6028         * hppa-tdep.c (unwind_command): Constify.
6029
6030 2017-09-27  Tom Tromey  <tom@tromey.com>
6031
6032         * target-descriptions.c (unset_tdesc_filename_cmd)
6033         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
6034         Constify.
6035
6036 2017-09-27  Tom Tromey  <tom@tromey.com>
6037
6038         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
6039
6040 2017-09-27  Tom Tromey  <tom@tromey.com>
6041
6042         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
6043
6044 2017-09-27  Tom Tromey  <tom@tromey.com>
6045
6046         * tui/tui-regs.c (tui_reg_command): Constify.
6047
6048 2017-09-27  Tom Tromey  <tom@tromey.com>
6049
6050         * skip.c (skip_file_command, skip_function_command)
6051         (skip_enable_command, skip_disable_command, skip_delete_command):
6052         Constify.
6053
6054 2017-09-27  Tom Tromey  <tom@tromey.com>
6055
6056         * record-btrace.c (cmd_record_btrace_bts_start)
6057         (cmd_record_btrace_pt_start): Constify.
6058
6059 2017-09-27  Tom Tromey  <tom@tromey.com>
6060
6061         * symmisc.c (maintenance_print_symbols)
6062         (maintenance_print_msymbols, maintenance_print_objfiles)
6063         (maintenance_info_symtabs, maintenance_check_symtabs)
6064         (maintenance_expand_symtabs, maintenance_info_line_tables):
6065         Constify.
6066
6067 2017-09-27  Tom Tromey  <tom@tromey.com>
6068
6069         * top.c (new_ui_command): Constify.
6070
6071 2017-09-27  Tom Tromey  <tom@tromey.com>
6072
6073         * symfile.c (add_symbol_file_command)
6074         (remove_symbol_file_command, list_overlays_command)
6075         (map_overlay_command, unmap_overlay_command)
6076         (overlay_auto_command, overlay_manual_command)
6077         (overlay_off_command, overlay_load_command): Constify.
6078
6079 2017-09-27  Tom Tromey  <tom@tromey.com>
6080
6081         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
6082         (info_spu_mailbox_command, info_spu_dma_command)
6083         (info_spu_proxydma_command): Constify.
6084
6085 2017-09-27  Tom Tromey  <tom@tromey.com>
6086
6087         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
6088
6089 2017-09-27  Tom Tromey  <tom@tromey.com>
6090
6091         * cli/cli-script.c (user_defined_command): Constify.
6092
6093 2017-09-27  Tom Tromey  <tom@tromey.com>
6094
6095         * cli/cli-dump.c (dump_memory_command, dump_value_command)
6096         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
6097         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
6098         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
6099         (dump_binary_value, append_binary_memory, append_binary_value):
6100         Constify.
6101         (struct dump_context) <func>: Constify.
6102         (add_dump_command): Update.
6103
6104 2017-09-27  Tom Tromey  <tom@tromey.com>
6105
6106         * cli/cli-cmds.c (show_version, show_configuration)
6107         (source_command, show_user): Constify.
6108
6109 2017-09-27  Tom Tromey  <tom@tromey.com>
6110
6111         * target.c (maintenance_print_target_stack): Constify.
6112
6113 2017-09-27  Tom Tromey  <tom@tromey.com>
6114
6115         * interps.c (interpreter_exec_cmd): Constify.
6116
6117 2017-09-27  Tom Tromey  <tom@tromey.com>
6118
6119         * record-full.c (cmd_record_full_restore): Constify.
6120
6121 2017-09-27  Tom Tromey  <tom@tromey.com>
6122
6123         * memattr.c (enable_mem_command, disable_mem_command)
6124         (delete_mem_command): Constify.
6125
6126 2017-09-27  Tom Tromey  <tom@tromey.com>
6127
6128         * value.c (show_convenience): Constify.
6129
6130 2017-09-27  Tom Tromey  <tom@tromey.com>
6131
6132         * gdbcore.h (core_file_command): Update.
6133         * corefile.c (core_file_command): Constify.
6134
6135 2017-09-27  Tom Tromey  <tom@tromey.com>
6136
6137         * user-regs.c (maintenance_print_user_registers): Constify.
6138
6139 2017-09-27  Tom Tromey  <tom@tromey.com>
6140
6141         * cp-namespace.c (maintenance_cplus_namespace): Constify.
6142
6143 2017-09-27  Tom Tromey  <tom@tromey.com>
6144
6145         * cp-support.c (first_component_command): Constify.
6146
6147 2017-09-27  Tom Tromey  <tom@tromey.com>
6148
6149         * psymtab.c (maintenance_print_psymbols)
6150         (maintenance_info_psymtabs, maintenance_check_psymtabs):
6151         Constify.
6152
6153 2017-09-27  Tom Tromey  <tom@tromey.com>
6154
6155         * windows-tdep.c (display_tib): Constify.
6156
6157 2017-09-27  Tom Tromey  <tom@tromey.com>
6158
6159         * linux-fork.c (delete_checkpoint_command)
6160         (detach_checkpoint_command): Constify.
6161
6162 2017-09-27  Tom Tromey  <tom@tromey.com>
6163
6164         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
6165
6166 2017-09-27  Tom Tromey  <tom@tromey.com>
6167
6168         * arc-tdep.c (dump_arc_instruction_command): Constify.
6169
6170 2017-09-27  Tom Tromey  <tom@tromey.com>
6171
6172         * valprint.c (set_radix, show_radix): Constify.
6173
6174 2017-09-27  Tom Tromey  <tom@tromey.com>
6175
6176         * dtrace-probe.c (info_probes_dtrace_command): Constify.
6177
6178 2017-09-27  Tom Tromey  <tom@tromey.com>
6179
6180         * command.h (not_just_help_class_command): Update.
6181         * cli/cli-decode.h (not_just_help_class_command): Update.
6182         * cli/cli-decode.c (not_just_help_class_command): Constify.
6183
6184 2017-09-27  Tom Tromey  <tom@tromey.com>
6185
6186         * gdb_bfd.c (maintenance_info_bfds): Constify.
6187
6188 2017-09-27  Tom Tromey  <tom@tromey.com>
6189
6190         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
6191         overloads.
6192         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
6193         (do_const_cfunc): New function.
6194         (cmd_cfunc_eq): New overload.
6195         (cli_user_command_p): Check do_const_cfunc.
6196         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
6197         const_cfunc.
6198         * command.h (add_cmd): Add const overload and no-function
6199         overload.
6200         (set_cmd_cfunc): Add const overload.
6201         (cmd_const_cfunc_ftype): Declare.
6202         (cmd_cfunc_eq): Add const overload.
6203         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
6204         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
6205         overload.
6206
6207 2017-09-27  Tom Tromey  <tom@tromey.com>
6208
6209         * macroexp.c (get_next_token_for_substitution): New function.
6210         (substitute_args): Call it.  Check for __VA_OPT__.
6211
6212 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
6213             Pedro Alves <palves@redhat.com>
6214
6215         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
6216         producer_is_icc_lt_14.
6217         (producer_is_icc_lt_14): New function.
6218         (check_producer): Add code for checking version of ICC.
6219         (producer_is_icc): Move to producer.c.
6220         (read_structure_type): Restrict ICC workaround to ICC<14.
6221         * producer.c: Include selftest.h.
6222         (producer_is_icc, producer_parsing_tests, _initialize_producer):
6223         New functions.
6224         * producer.h (producer_is_icc): New declaration.
6225
6226 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
6227
6228         * Makefile.in (SFILES): Add producer.c.
6229         (COMMON_OBS): Add producer.o
6230         * amd64-tdep.c (producer.h): Add new include.
6231         * dwarf2read.c (producer.h): Add new include.
6232         * producer.c: New file.
6233         * producer.h: New file.
6234         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
6235         producer.c.
6236         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
6237         producer.h.
6238
6239 2017-09-26  Matthias Klose  <doko@ubuntu.com>
6240
6241         * configure.ac: Search ncursesw before ncurses.
6242         Check ncursesw/ncurses.h before ncurses/ncurses.h.
6243         * gdb_curses.h: Include <ncursesw/ncurses.h>
6244         * config.in, configure: Regenerate.
6245
6246 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6247
6248         PR gdb/22185
6249         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
6250         obsolete.
6251         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
6252         Remove i386sol2 support.
6253         * configure.nat <i386sol2>: Remove.
6254         <sol2-64>: Fold into ...
6255         <sol2>: ... this.
6256         Move common settings to default section.
6257         Add sol-thread.o.
6258         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
6259         x86_64-*-solaris2.1[0-9]*>: Rename to ...
6260         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
6261         <i[34567]86-*-solaris*>: Remove.
6262         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
6263
6264         * configure.ac: Remove wctype in libw check.
6265         (_MSE_INT_H): Don't define on Solaris 7-9.
6266         <solaris*>: Remove libthread_db.so.1 check.
6267         * configure: Regenerate.
6268         * config.in: Regenerate.
6269
6270         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
6271         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
6272         (gdb_ps_size_t): Remove.
6273         Use base types in users.
6274         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
6275
6276         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
6277
6278 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6279
6280         PR build/22206
6281         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
6282         (adi_is_addr_mapped): Likewise.
6283         (PSR_ICC): Don't redefine.
6284         (PSR_IMPL): Likewise.
6285
6286 2017-09-25  Tom Tromey  <tom@tromey.com>
6287
6288         * regcache.c (regcache::dump): Use string_printf.
6289
6290 2017-09-25  Tom Tromey  <tom@tromey.com>
6291
6292         * regcache.c (class regcache_invalidator): New.
6293         (struct register_to_invalidate): Remove.
6294         (make_cleanup_regcache_invalidate): Remove.
6295         (regcache::raw_write): Use regcache_invalidator.
6296
6297 2017-09-25  Tom Tromey  <tom@tromey.com>
6298
6299         * spu-tdep.c (spu2ppu_sniffer): Update.
6300         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
6301         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
6302         Remove.
6303         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
6304         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
6305         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
6306         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
6307         (frame_pop): Update.
6308
6309 2017-09-25  Tom Tromey  <tom@tromey.com>
6310
6311         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
6312         * regcache.h (regcache_xfree): Don't declare.
6313         * regcache.c (regcache_xfree): Remove.
6314         (do_regcache_xfree): Use delete.
6315         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
6316         * linux-fork.c (free_fork): Use delete.
6317         (fork_save_infrun_state): Likewise.
6318         * jit.c (jit_dealloc_cache): Use delete.
6319         * infrun.c (discard_infcall_suspend_state): Use delete.
6320
6321 2017-09-25  Tom Tromey  <tom@tromey.com>
6322
6323         * regcache.h (regcache_xmalloc): Don't declare.
6324         (regcache_raw_set_cached_value): Update comment.
6325         * regcache.c (regcache_xmalloc): Remove.
6326         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
6327         * jit.c (jit_frame_sniffer): Use new.
6328         * frame.c (frame_save_as_regcache): Use new.
6329
6330 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6331
6332         * NEWS: Advertise support for guarded-storage registers on IBM z.
6333
6334 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6335
6336         * s390-linux-nat.c (have_regset_gs): New static variable.
6337         (s390_linux_fetch_inferior_registers): Handle guarded-storage
6338         control block and guarded-storage broadcast control regsets.
6339         (s390_read_description): Detect whether the target has
6340         guarded-storage support, return appropriate tdesc.
6341         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
6342         (features/s390x-gs-linux64.c): Likewise.
6343         (struct gdbarch_tdep) <have_gs>: New field.
6344         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
6345         (s390_gsbc_regset): New variables.
6346         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
6347         and s390_gsbc_regset, if applicable.
6348         (s390_core_read_description): Check whether core file was from a
6349         target with guarded-storage support; include appropriate regsets.
6350         (s390_gdbarch_init): Add registers for guarded-storage support.
6351         (_initialize_s390_tdep): Initialize new target descriptions that
6352         include registers for guarded-storage support.
6353         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
6354         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
6355         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
6356         (S390_NUM_REGS): Adjust macro definition.
6357         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
6358         (tdesc_s390x_gs_linux64): New declarations.
6359
6360 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6361
6362         * features/s390-gs-linux64.xml: New file.
6363         * features/s390-gs.xml: New file.
6364         * features/s390-gsbc.xml: New file.
6365         * features/s390x-gs-linux64.xml: New file.
6366         * features/Makefile (WHICH): Add s390-gs-linux64 and
6367         s390x-gs-linux64.
6368         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
6369         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
6370         * features/s390-gs-linux64.c: New generated file.
6371         * features/s390x-gs-linux64.c: New file.
6372         * regformats/s390-gs-linux64.dat: New file.
6373         * regformats/s390x-gs-linux64.dat: New file.
6374
6375 2017-09-23  Tom Tromey  <tom@tromey.com>
6376
6377         * defs.h (make_cleanup_override_quit_handler): Don't declare.
6378
6379 2017-09-22  Tom Tromey  <tom@tromey.com>
6380
6381         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
6382         type to scoped_restore_tmpl.
6383         <scoped_input_handler>: Initialize m_quit_handler directly.
6384
6385 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
6386
6387         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
6388         (cd_command): Likewise.  Free "current_directory" before
6389         assigning to it.
6390         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
6391         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
6392         * top.c (gdb_dirbuf): Remove global declaration.
6393         * top.h (gdb_dirbuf): Likewise.
6394
6395 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
6396
6397         * gnulib/aclocal.m4: Regenerate.
6398         * gnulib/config.in: Regenerate.
6399         * gnulib/configure: Regenerate.
6400         * gnulib/import/Makefile.am: Regenerate.
6401         * gnulib/import/Makefile.in: Regenerate.
6402         * gnulib/import/assure.h: New file.
6403         * gnulib/import/at-func.c: Likewise
6404         * gnulib/import/chdir-long.c: New file.
6405         * gnulib/import/chdir-long.h: New file.
6406         * gnulib/import/cloexec.c: New file.
6407         * gnulib/import/cloexec.h: New file.
6408         * gnulib/import/close.c: New file.
6409         * gnulib/import/closedir.c: New file.
6410         * gnulib/import/dirent-private.h: New file.
6411         * gnulib/import/dup-safer.c: New file.
6412         * gnulib/import/dup.c: New file.
6413         * gnulib/import/dup2.c: New file.
6414         * gnulib/import/error.c: New file.
6415         * gnulib/import/error.h: New file.
6416         * gnulib/import/exitfail.c: New file.
6417         * gnulib/import/exitfail.h: New file.
6418         * gnulib/import/fchdir.c: New file.
6419         * gnulib/import/fcntl.c: New file.
6420         * gnulib/import/fcntl.in.h: New file.
6421         * gnulib/import/fd-hook.c: New file.
6422         * gnulib/import/fd-hook.h: New file.
6423         * gnulib/import/fd-safer.c: New file.
6424         * gnulib/import/fdopendir.c: New file.
6425         * gnulib/import/filename.h: New file.
6426         * gnulib/import/filenamecat-lgpl.c: New file.
6427         * gnulib/import/filenamecat.h: New file.
6428         * gnulib/import/fstat.c: New file.
6429         * gnulib/import/fstatat.c: New file.
6430         * gnulib/import/getcwd-lgpl.c: New file.
6431         * gnulib/import/getcwd.c: New file.
6432         * gnulib/import/getdtablesize.c: New file.
6433         * gnulib/import/getlogin_r.c: New file.
6434         * gnulib/import/getprogname.c: New file.
6435         * gnulib/import/getprogname.h: New file.
6436         * gnulib/import/gettext.h: New file.
6437         * gnulib/import/glob-libc.h: New file.
6438         * gnulib/import/glob.c: New file.
6439         * gnulib/import/glob.in.h: New file.
6440         * gnulib/import/intprops.h: New file.
6441         * gnulib/import/m4/chdir-long.m4: New file.
6442         * gnulib/import/m4/close.m4: New file.
6443         * gnulib/import/m4/closedir.m4: New file.
6444         * gnulib/import/m4/d-ino.m4: New file.
6445         * gnulib/import/m4/d-type.m4: New file.
6446         * gnulib/import/m4/dup.m4: New file.
6447         * gnulib/import/m4/dup2.m4: New file.
6448         * gnulib/import/m4/error.m4: New file.
6449         * gnulib/import/m4/fchdir.m4: New file.
6450         * gnulib/import/m4/fcntl.m4: New file.
6451         * gnulib/import/m4/fcntl_h.m4: New file.
6452         * gnulib/import/m4/fdopendir.m4: New file.
6453         * gnulib/import/m4/filenamecat.m4: New file.
6454         * gnulib/import/m4/fstat.m4: New file.
6455         * gnulib/import/m4/fstatat.m4: New file.
6456         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
6457         * gnulib/import/m4/getcwd-path-max.m4: New file.
6458         * gnulib/import/m4/getcwd.m4: New file.
6459         * gnulib/import/m4/getdtablesize.m4: New file.
6460         * gnulib/import/m4/getlogin_r.m4: New file.
6461         * gnulib/import/m4/getprogname.m4: New file.
6462         * gnulib/import/m4/glob.m4: New file.
6463         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
6464         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
6465         * gnulib/import/m4/mempcpy.m4: New file.
6466         * gnulib/import/m4/memrchr.m4: New file.
6467         * gnulib/import/m4/mode_t.m4: New file.
6468         * gnulib/import/m4/msvc-inval.m4: New file.
6469         * gnulib/import/m4/msvc-nothrow.m4: New file.
6470         * gnulib/import/m4/open.m4: New file.
6471         * gnulib/import/m4/openat.m4: New file.
6472         * gnulib/import/m4/opendir.m4: New file.
6473         * gnulib/import/m4/readdir.m4: New file.
6474         * gnulib/import/m4/realloc.m4: New file.
6475         * gnulib/import/m4/rewinddir.m4: New file.
6476         * gnulib/import/m4/save-cwd.m4: New file.
6477         * gnulib/import/m4/strdup.m4: New file.
6478         * gnulib/import/m4/strerror.m4: New file.
6479         * gnulib/import/m4/unistd-safer.m4: New file.
6480         * gnulib/import/mempcpy.c: New file.
6481         * gnulib/import/memrchr.c: New file.
6482         * gnulib/import/msvc-inval.c: New file.
6483         * gnulib/import/msvc-inval.h: New file.
6484         * gnulib/import/msvc-nothrow.c: New file.
6485         * gnulib/import/msvc-nothrow.h: New file.
6486         * gnulib/import/open.c: New file.
6487         * gnulib/import/openat-die.c: New file.
6488         * gnulib/import/openat-priv.h: New file.
6489         * gnulib/import/openat-proc.c: New file.
6490         * gnulib/import/openat.c: New file.
6491         * gnulib/import/openat.h: New file.
6492         * gnulib/import/opendir.c: New file.
6493         * gnulib/import/pipe-safer.c: New file.
6494         * gnulib/import/readdir.c: New file.
6495         * gnulib/import/realloc.c: New file.
6496         * gnulib/import/rewinddir.c: New file.
6497         * gnulib/import/save-cwd.c: New file.
6498         * gnulib/import/save-cwd.h: New file.
6499         * gnulib/import/strdup.c: New file.
6500         * gnulib/import/strerror-override.c: New file.
6501         * gnulib/import/strerror-override.h: New file.
6502         * gnulib/import/strerror.c: New file.
6503         * gnulib/import/unistd--.h: New file.
6504         * gnulib/import/unistd-safer.h: New file.
6505         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
6506         "getcwd" and "glob".
6507         * ser-tcp.c: Undefine "close" before redefining it.
6508
6509 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
6510
6511         * guile/scm-value.c (gdbscm_value_address): Initialize address,
6512         get rid of res_val.
6513
6514 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6515
6516         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
6517         <sol2,sparc>: Likewise.
6518         <sol2-64,i386>: Likewise.
6519
6520         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
6521         -Wdeprecated-declarations on *-*-solaris*.
6522         * configure: Regenerate.
6523
6524         * procfs.c: Include "nat/inferior.h".
6525         (procfs_info_proc): Fix typo.
6526
6527 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
6528
6529         * remote.c (vector): Include.
6530         (struct private_thread_info): Add field, thread_handle.
6531         (free_private_thread_info): Deallocate storage associated with
6532         thread handle.
6533         (get_private_info_thread): Initialize `thread_handle' field.
6534         (struct thread_item): Add field, thread_handle.
6535         (clear_threads_listing_context): Deallocate storage associated
6536         with thread handle.
6537         (start_thread): Add support for "handle" attribute.
6538         (thread_attributes): Add "handle".
6539         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
6540         field.
6541         (remote_update_thread_list): Update thread_handle.
6542         (remote_thread_handle_to_thread_info): New function.
6543         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
6544
6545 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
6546
6547         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
6548         function.
6549         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
6550         * python/python-internal.h (thread_object_type): Declare.
6551
6552 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
6553
6554         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
6555         (target_thread_handle_to_thread_info): Declare.
6556         * target.c (target_thread_handle_to_thread_info): New function.
6557         * target-delegates.c: Regenerate.
6558         * gdbthread.h (find_thread_by_handle): Declare.
6559         * thread.c (find_thread_by_handle): New function.
6560         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
6561         function.
6562         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
6563
6564 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
6565
6566         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
6567
6568 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
6569
6570         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
6571
6572 2017-09-21  Yao Qi  <yao.qi@linaro.org>
6573
6574         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
6575         to gdb_target_obs.
6576
6577 2017-09-20  Tom Tromey  <tom@tromey.com>
6578
6579         * breakpoint.c (struct counted_command_line): Remove.
6580         (breakpoint_commands): Update.
6581         (alloc_counted_command_line, incref_counted_command_line)
6582         (decref_counted_command_line, do_cleanup_counted_command_line)
6583         (make_cleanup_decref_counted_command_line): Remove.
6584         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
6585         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
6586         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
6587         (save_breakpoints): Update.
6588         * breakpoint.h (counted_command_line): Now a typedef to
6589         shared_ptr.
6590         (struct breakpoint) <commands>: Now a counted_command_line.
6591         (struct bpstats) <command>: Likewise.
6592
6593 2017-09-20  Tom Tromey  <tom@tromey.com>
6594
6595         * breakpoint.c (struct commands_info, do_map_commands_command):
6596         Remove.
6597         (commands_command_1): Update.
6598         (iterate_over_related_breakpoints): Take a function_view.
6599         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
6600         (delete_command): Update.
6601         (map_breakpoint_numbers): Take a function_view.
6602         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
6603         (disable_command): Update.
6604         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
6605         (enable_command): Update.
6606         (struct disp_data, do_enable_breakpoint_disp)
6607         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
6608         (do_map_enable_delete_breakpoint): Remove.
6609         (enable_once_command, enable_count_command, enable_delete_command)
6610         (delete_trace_variable_command): Update.
6611
6612 2017-09-20  Tom Tromey  <tom@tromey.com>
6613
6614         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
6615         (bpstat_clear): Use delete.
6616         (bpstats): New constructors.
6617         (bpstat_copy, bpstat_stop_status): Use new.
6618         (dprintf_after_condition_true): Update.
6619         * breakpoint.h (bpstats::bpstats): Add constructors.
6620         (bpstats::~bpstats): Add destructor.
6621
6622 2017-09-20  Pedro Alves  <palves@redhat.com>
6623
6624         * eval.c (make_params): Delete, refactored as ...
6625         (class fake_method): ... this new type's ctor.
6626         (fake_method::~fake_method): New.
6627         (evaluate_subexp_standard): Use 'fake_method'.
6628
6629 2017-09-20  Tom Tromey  <tom@tromey.com>
6630
6631         * windows-nat.c (get_windows_debug_event, windows_wait)
6632         (do_initial_windows_stuff, windows_attach): Update.
6633         * utils.c (vwarning, internal_vproblem): Update.
6634         (ui_unregister_input_event_handler_cleanup)
6635         (prepare_to_handle_input): Remove.
6636         (class scoped_input_handler): New.
6637         (defaulted_query, prompt_for_continue): Update.
6638         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
6639         Update.
6640         * top.c (undo_terminal_modifications_before_exit): Update.
6641         * target/target.h (target_terminal_init, target_terminal_inferior)
6642         (target_terminal_ours): Don't declare.
6643         (class target_terminal): New.
6644         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
6645         (target_terminal_ours_for_output)
6646         (make_cleanup_restore_target_terminal): Don't declare.
6647         (target_terminal_info): Remove.
6648         * target.c (enum terminal_state, terminal_state): Remove.
6649         (target_terminal::terminal_state): Define.
6650         (target_terminal::init): Rename from target_terminal_init.
6651         (target_terminal::inferior): Rename from
6652         target_terminal_inferior.
6653         (target_terminal::ours): Rename from target_terminal_ours.
6654         (target_terminal::ours_for_output): Rename from
6655         target_terminal_ours_for_output.
6656         (target_terminal::info): New method.
6657         (cleanup_restore_target_terminal)
6658         (make_cleanup_restore_target_terminal): Remove.
6659         * solib.c (handle_solib_event): Update.
6660         * remote.c (remote_serial_quit_handler): Update.
6661         (remote_terminal_inferior, remote_wait_as): Update.
6662         * record-full.c (record_full_wait_1): Update.
6663         * nto-procfs.c (procfs_create_inferior): Update.
6664         * nat/fork-inferior.c (startup_inferior): Update.
6665         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
6666         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
6667         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
6668         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
6669         (mi_breakpoint_created, mi_breakpoint_deleted)
6670         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
6671         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6672         (mi_user_selected_context_changed, report_initial_inferior):
6673         Update.
6674         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
6675         (linux_nat_terminal_inferior): Update.
6676         * infrun.c (follow_fork_inferior)
6677         (handle_vfork_child_exec_or_exit, do_target_resume)
6678         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
6679         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
6680         Update.
6681         * inflow.c (child_terminal_init, info_terminal_command): Update.
6682         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
6683         (attach_command): Update.
6684         * infcall.c (call_thread_fsm_should_stop): Update.
6685         * gnu-nat.c (gnu_attach): Update.
6686         * extension.c (struct active_ext_lang_state)
6687         (restore_active_ext_lang): Update.
6688         * exceptions.c (print_flush): Update.
6689         * event-top.c (async_enable_stdin, default_quit_handler): Update.
6690         (struct quit_handler_cleanup_data, restore_quit_handler)
6691         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
6692         Remove.
6693         * cp-support.c (gdb_demangle): Update.
6694         * breakpoint.c (update_inserted_breakpoint_locations)
6695         (insert_breakpoint_locations, handle_jit_event)
6696         (disable_breakpoints_in_unloaded_shlib): Update.
6697         * annotate.c (annotate_breakpoints_invalid)
6698         (annotate_frames_invalid): Update.
6699
6700 2017-09-20  Tom Tromey  <tom@tromey.com>
6701
6702         * main.c (catch_command_errors): Rename from
6703         catch_command_errors_const.
6704         (captured_main_1): Update.
6705
6706 2017-09-20  Pedro Alves  <palves@redhat.com>
6707
6708         * cli/cli-cmds.c (list_command): Use print_sal_location.
6709         (print_sal_location): New function.
6710         (ambiguous_line_spec): Use print_sal_location.
6711         * linespec.c (symbol_to_sal): Record the symbol in the sal.
6712         * symtab.c (find_function_start_sal): Likewise.
6713         * symtab.h (symtab_and_line::symbol): New field.
6714
6715 2017-09-20  Pedro Alves  <palves@redhat.com>
6716
6717         * linespec.c (minsym_found): Handle non-text minsyms.
6718         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
6719
6720 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
6721
6722         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
6723         backslash.
6724
6725 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
6726
6727         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
6728         vmovups instead vmovaps.
6729         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
6730
6731 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
6732
6733         * NEWS (Changes since GDB 8.0): Add starti.
6734         * infcmd.c (enum run_break): New.
6735         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
6736         case.
6737         (run_command): Use enum run_how.
6738         (start_command): Likewise.
6739         (starti_command): New function.
6740         (RUN_ARGS_HELP): New macro.
6741         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
6742         commands.  Add starti command.
6743
6744 2017-09-19  Yao Qi  <yao.qi@linaro.org>
6745
6746         * Makefile.in (monitor.o): Remove the rule.
6747
6748 2017-09-19  Yao Qi  <yao.qi@linaro.org>
6749
6750         * annotate.h (struct annotate_arg_emitter): Use
6751         DISABLE_COPY_AND_ASSIGN.
6752         * common/refcounted-object.h (refcounted_object): Likewise.
6753         * completer.h (struct completion_result): Likewise.
6754         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
6755         * filename-seen-cache.h (filename_seen_cache): Likewise.
6756         * gdbcore.h (thread_section_name): Likewise.
6757         * gdb_regex.h (compiled_regex): Likewise.
6758         * gdbthread.h (scoped_restore_current_thread): Likewise.
6759         * inferior.h (scoped_restore_current_inferior): Likewise.
6760         * jit.c (jit_reader): Likewise.
6761         * linespec.h (struct linespec_result): Likewise.
6762         * mi/mi-parse.h (struct mi_parse): Likewise.
6763         * nat/fork-inferior.c (execv_argv): Likewise.
6764         * progspace.h (scoped_restore_current_program_space): Likewise.
6765         * python/python-internal.h (class gdbpy_enter): Likewise.
6766         * regcache.h (regcache): Likewise.
6767         * target-descriptions.c (struct tdesc_reg): Likewise.
6768         (struct tdesc_type): Likewise.
6769         (struct tdesc_feature): Likewise.
6770         * ui-out.h (ui_out_emit_type): Likewise.
6771
6772 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
6773
6774         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
6775         label abort_expression.
6776
6777 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
6778
6779         * common/buffer.c (buffer_xml_printf): Adjust.
6780         * common/xml-utils.c (xml_escape_text): Change return type to
6781         std::string, update code accordingly.
6782         * common/xml-utils.h (xml_escape_text): Change return type to
6783         std::string.
6784         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
6785         * windows-tdep.c (windows_xfer_shared_library): Adjust.
6786         * unittests/xml-utils-selftests.c (test_xml_escape_text):
6787         Adjust.
6788
6789 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
6790
6791         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
6792         (SUBDIR_UNITTESTS_OBS): Add new object file.
6793         * unittests/xml-utils-selftests.c: New file.
6794
6795 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
6796
6797         * common/selftest.h (selftest): New struct/interface.
6798         (register_test): Add name parameter, add new overload.
6799         (run_tests): Add filter parameter.
6800         (for_each_selftest_ftype): New typedef.
6801         (for_each_selftest): New declaration.
6802         * common/selftest.c (tests): Change type to
6803         map<string, unique_ptr<selftest>>.
6804         (simple_selftest): New struct.
6805         (register_test): New function.
6806         (register_test): Add name parameter and use it.
6807         (run_tests): Add filter parameter and use it.  Add prints.
6808         Adjust to vector -> map change.
6809         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
6810         registering selftests.
6811         * arm-tdep.c (_initialize_arm_tdep): Likewise.
6812         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
6813         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
6814         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
6815         * findvar.c (_initialize_findvar): Likewise.
6816         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
6817         * maint.c (maintenance_selftest): Update call to run_tests.
6818         (maintenance_info_selftests): New function.
6819         (_initialize_maint_cmds): Register "maintenance info selftests"
6820         command.  Update "maintenance selftest" doc.
6821         * regcache.c (_initialize_regcache): Add names when registering
6822         selftests.
6823         * rust-exp.y (_initialize_rust_exp): Likewise.
6824         * selftest-arch.c (gdbarch_selftest): New struct.
6825         (gdbarch_tests): Remove.
6826         (register_test_foreach_arch): Add name parameter.  Call
6827         register_test.
6828         (tests_with_arch): Remove, move most content to
6829         gdbarch_selftest::operator().
6830         (_initialize_selftests_foreach_arch): Remove.
6831         * selftest-arch.h (register_test_foreach_arch): Add name
6832         parameter.
6833         (run_tests_with_arch): New declaration.
6834         * utils-selftests.c (_initialize_utils_selftests): Add names
6835         when registering selftests.
6836         * utils.c (_initialize_utils): Likewise.
6837         * unittests/array-view-selftests.c
6838         (_initialize_array_view_selftests): Likewise.
6839         * unittests/environ-selftests.c (_initialize_environ_selftests):
6840         Likewise.
6841         * unittests/function-view-selftests.c
6842         (_initialize_function_view_selftests): Likewise.
6843         * unittests/offset-type-selftests.c
6844         (_initialize_offset_type_selftests): Likewise.
6845         * unittests/optional-selftests.c
6846         (_initialize_optional_selftests): Likewise.
6847         * unittests/scoped_restore-selftests.c
6848         (_initialize_scoped_restore_selftests): Likewise.
6849         * NEWS: Document "maintenance selftest" and "maint info
6850         selftests".
6851
6852 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
6853
6854         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
6855         scoped_restore.
6856
6857 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
6858
6859         * mi/mi-main.c (mi_load_progress): Make uiout variable
6860         a unique_ptr.
6861
6862 2017-09-15  Pedro Alves  <palves@redhat.com>
6863
6864         * compile/compile-c-types.c (convert_enum, convert_int)
6865         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
6866
6867 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
6868
6869         * dwarf2read.c (copy_string): Remove.
6870         (parse_macro_definition): Replace copy_string with savestring.
6871
6872 2017-09-15  Yao Qi  <yao.qi@linaro.org>
6873
6874         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
6875         gdb_target_obs.
6876         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
6877         Likewise.
6878         (i[34567]86-*-linux*): Likewise.
6879
6880 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
6881
6882         * dwarf2expr.h (dwarf_stack_value): Add constructor.
6883         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
6884         <stack>: Change type to std::vector.
6885         <stack_len, stack_allocated>: Remove.
6886         <grow_stack>: Remove.
6887         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6888         (dwarf_expr_context::~dwarf_expr_context): Remove.
6889         (dwarf_expr_context::grow_stack): Remove.
6890         (dwarf_expr_context::push): Adjust.
6891         (dwarf_expr_context::pop): Adjust.
6892         (dwarf_expr_context::fetch): Adjust.
6893         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
6894         (dwarf_expr_context::stack_empty_p): Adjust.
6895         (dwarf_expr_context::execute_stack_op): Adjust.
6896
6897 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
6898
6899         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
6900         return type to bool.
6901         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
6902
6903 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
6904
6905         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
6906         Change type to bool.
6907         (dwarf_stack_value) <in_stack_memory>: Likewise.
6908         (dwarf_expr_context) <push_address>: Change parameter type to
6909         bool.
6910         <fetch_in_stack_memory>: Change return type to bool.
6911         <push>: Change parameter type to bool.
6912         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
6913         to bool.
6914         (dwarf_expr_context::push_address): Likewise.
6915         (dwarf_expr_context::fetch_in_stack_memory): Change return type
6916         to bool.
6917         (dwarf_expr_context::execute_stack_op): Adjust.
6918         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
6919
6920 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
6921
6922         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
6923         (struct dwarf_expr_context) <n_pieces>: Remove.
6924         <pieces>: Change type to std::vector.
6925         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6926         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
6927         pieces.
6928         (dwarf_expr_context::add_piece): Adjust.
6929         * dwarf2loc.c (struct piece_closure): Initialize fields.
6930         <n_pieces>: Remove.
6931         <pieces>: Change type to std::vector.
6932         (allocate_piece_closure): Adjust, change parameter to
6933         std::vector rvalue and std::move it to piece_closure.
6934         (rw_pieced_value): Adjust.
6935         (check_pieced_synthetic_pointer): Adjust.
6936         (indirect_synthetic_pointer): Adjust.
6937         (coerce_pieced_ref): Adjust.
6938         (free_pieced_value_closure):  Adjust.  Use delete to free
6939         piece_closure.
6940         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
6941         to allocate_piece_closure.
6942         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
6943
6944 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
6945
6946         * probe.h (probe_ops_cp): Remove typedef.
6947         (DEF_VEC_P (probe_ops_cp)): Remove.
6948         (all_probe_ops): Change type to std::vector.
6949         * probe.c (info_probes_for_ops): Adjust to vector change.
6950         (probe_linespec_to_ops): Likewise.
6951         (all_probe_ops): Change type to std::vector.
6952         (_initialize_probe): Adjust to vector change.
6953         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
6954         * elfread.c (elf_get_probes): Likewise.
6955         * stap-probe.c (_initialize_stap_probe): Likewise.
6956
6957 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
6958
6959         * probe.h (struct bound_probe): Define constructors.
6960         * probe.c (bound_probe_s): Remove typedef.
6961         (DEF_VEC_O (bound_probe_s)): Remove VEC.
6962         (collect_probes): Change return type to std::vector, remove
6963         cleanup.
6964         (compare_probes): Return bool, change parameter type.  Change
6965         semantic to "less than".
6966         (gen_ui_out_table_header_info): Change parameter to std::vector
6967         and update.
6968         (exists_probe_with_pops): Likewise.
6969         (info_probes_for_ops): Update to std::vector change.
6970         (enable_probes_command): Likewise.
6971         (disable_probes_command): Likewise.
6972
6973 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
6974
6975         * probe.h (struct probe_ops) <get_probes>: Change parameter from
6976         vec to std::vector.
6977         * probe.c (parse_probes_in_pspace): Update.
6978         (find_probes_in_objfile): Update.
6979         (find_probe_by_pc): Update.
6980         (collect_probes): Update.
6981         (probe_any_get_probes): Update.
6982         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
6983         return type to reference to std::vector.
6984         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
6985         std::vector and update.
6986         (dtrace_process_dof): Likewise.
6987         (dtrace_get_probes): Likewise.
6988         * elfread.c (elf_get_probes): Change return type to std::vector,
6989         store an std::vector in bfd_data.
6990         (probe_key_free): Update to std::vector.
6991         * stap-probe.c (handle_stap_probe): Change parameter to
6992         std::vector and update.
6993         (stap_get_probes): Likewise.
6994         * symfile-debug.c (debug_sym_get_probes): Change return type to
6995         std::vector and update.
6996
6997 2017-09-11  Tom Tromey  <tom@tromey.com>
6998
6999         * breakpoint.c (program_breakpoint_here_p): Update.
7000         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
7001         from make_show_memory_breakpoints_cleanup.  Return a
7002         scoped_restore_tmpl<int>.
7003         (restore_show_memory_breakpoints): Remove.
7004         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
7005         * mem-break.c (memory_validate_breakpoint): Update.
7006         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
7007         (ia64_memory_remove_breakpoint): Update.
7008         (ia64_breakpoint_from_pc): Update.
7009         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
7010         from make_show_memory_breakpoints_cleanup.
7011
7012 2017-09-11  Tom Tromey  <tom@tromey.com>
7013
7014         * d-namespace.c (d_lookup_symbol): Use std::string.
7015         (find_symbol_in_baseclass): Likewise.
7016
7017 2017-09-11  Tom Tromey  <tom@tromey.com>
7018
7019         * ctf.c (ctf_start): Use std::string.
7020
7021 2017-09-11  Tom Tromey  <tom@tromey.com>
7022
7023         * ada-lang.c (is_known_support_routine): Update.
7024         (ada_unhandled_exception_name_addr_from_raise): Update.
7025         * guile/scm-frame.c (gdbscm_frame_name): Update.
7026         * python/py-frame.c (frapy_name): Update.
7027         (frapy_function): Update.
7028         * stack.h (find_frame_funname): Update.
7029         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
7030         (print_frame): Update.
7031
7032 2017-09-11  Tom Tromey  <tom@tromey.com>
7033
7034         * findcmd.c (put_bits): Take a gdb::byte_vector.
7035         (parse_find_args): Return gdb::byte_vector.  "args" now const.
7036         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
7037         cleanups.
7038         (find_command): Update.
7039
7040 2017-09-11  Tom Tromey  <tom@tromey.com>
7041
7042         * cli/cli-script.c (class scoped_restore_hook_in): New.
7043         (clear_hook_in_cleanup): Remove.
7044         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
7045         scoped_restore_hook_in.
7046
7047 2017-09-11  Tom Tromey  <tom@tromey.com>
7048
7049         * cli/cli-script.c (restore_interp): Remove.
7050         (read_command_lines): Use scoped_restore_interp.
7051         * interps.c (scoped_restore_interp::set_temp): Rename from
7052         interp_set_temp.
7053         * interps.h (class scoped_restore_interp): New.
7054         (interp_set_temp): Remove.
7055
7056 2017-09-11  Tom Tromey  <tom@tromey.com>
7057
7058         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7059         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
7060         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
7061         scoped_restore.
7062         (mi_cmd_break_insert_1): Update.
7063         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
7064         scoped_restore.
7065
7066 2017-09-11  Tom Tromey  <tom@tromey.com>
7067
7068         * demangle.c (demangle_command): Update.
7069         * breakpoint.c (disable_command): Update.
7070         (enable_command): Update.
7071         (find_location_by_number): Make "number" const.  Use
7072         get_number_trailer.
7073         * cli/cli-utils.c (extract_arg): Return std::string.
7074         * probe.c (parse_probe_linespec): Update.  Change types.
7075         (collect_probes): Take string arguments.
7076         (parse_probe_linespec): Likewise.
7077         (info_probes_for_ops): Update.
7078         (enable_probes_command): Update.
7079         (disable_probes_command): Update.
7080         * break-catch-sig.c (catch_signal_split_args): Update.
7081         * mi/mi-parse.c (mi_parse): Update.
7082
7083 2017-09-11  Tom Tromey  <tom@tromey.com>
7084
7085         * language.h (language_enum): Make argument const.
7086         * language.c (language_enum): Make argument const.
7087
7088 2017-09-11  Tom Tromey  <tom@tromey.com>
7089
7090         * common/common-utils.h (skip_to_space): Remove macro, redeclare
7091         as function.
7092         (skip_to_space): Rename from skip_to_space_const.
7093         * common/common-utils.c (skip_to_space): New function.
7094         (skip_to_space): Rename from skip_to_space_const.
7095         * cli/cli-utils.h (get_number): Rename from get_number_const.
7096         (extract_arg): Rename from extract_arg_const.
7097         * cli/cli-utils.c (get_number): Rename from get_number_const.
7098         (extract_arg): Rename from extract_arg_const.
7099         (number_or_range_parser::get_number): Use ::get_number.
7100         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
7101         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
7102         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
7103         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
7104         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
7105         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
7106         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
7107         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
7108
7109 2017-09-11  Tom Tromey  <tom@tromey.com>
7110
7111         * python/python.c (do_start_initialization): Use
7112         py-event-types.def to initialize types.
7113         Define all object type structures.
7114         * python/python-internal.h: Don't declare event initialization
7115         functions.
7116         * python/py-threadevent.c (thread_event_object_type): Don't
7117         define.
7118         * python/py-stopevent.c (stop_event_object_type): Don't define.
7119         * python/py-signalevent.c (signal_event_object_type): Don't
7120         declare or define.
7121         * python/py-newobjfileevent.c (new_objfile_event_object_type)
7122         (clear_objfiles_event_object_type): Don't declare or define.
7123         * python/py-infevents.c (inferior_call_pre_event_object_type)
7124         (inferior_call_post_event_object_type)
7125         (register_changed_event_object_type)
7126         (memory_changed_event_object_type): Don't declare or define.
7127         * python/py-inferior.c (new_thread_event_object_type)
7128         (new_inferior_event_object_type)
7129         (inferior_deleted_event_object_type): Don't declare or define.
7130         * python/py-exitedevent.c (exited_event_object_type): Don't
7131         declare or define.
7132         * python/py-evts.c (gdbpy_initialize_py_events): Use
7133         py-all-events.def.
7134         * python/py-events.h (thread_event_object_type): Don't declare.
7135         (events_object): Use py-all-events.def.
7136         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
7137         py-event-types.def.
7138         * python/py-event-types.def: New file.
7139         * python/py-continueevent.c (create_continue_event_object): Don't
7140         declare or define.
7141         * python/py-bpevent.c (breakpoint_event_object_type): Don't
7142         declare or define.
7143         * python/py-all-events.def: New file.
7144
7145 2017-09-11  Tom Tromey  <tom@tromey.com>
7146
7147         * python/py-threadevent.c (create_thread_event_object): Return
7148         gdbpy_ref.
7149         * python/py-stopevent.h (create_stop_event_object)
7150         (create_breakpoint_event_object, create_signal_event_object):
7151         Update.
7152         * python/py-stopevent.c (create_stop_event_object): Return
7153         gdbpy_ref.
7154         (emit_stop_event): Update.
7155         * python/py-signalevent.c (create_signal_event_object): Return
7156         gdbpy_ref.
7157         * python/py-infevents.c (create_inferior_call_event_object):
7158         Update.
7159         * python/py-event.h (create_event_object)
7160         (create_thread_event_object): Update.
7161         * python/py-event.c (create_event_object): Return gdbpy_ref.
7162         * python/py-continueevent.c: Return gdbpy_ref.
7163         * python/py-bpevent.c (create_breakpoint_event_object): Return
7164         gdbpy_ref.
7165
7166 2017-09-11  Tom Tromey  <tom@tromey.com>
7167
7168         PR python/15622:
7169         * NEWS: Add entry.
7170         * python/python.c (do_start_initialization): Initialize new event
7171         types.
7172         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
7173         (gdbpy_initialize_inferior_deleted_event)
7174         (gdbpy_initialize_new_thread_event): Declare.
7175         * python/py-threadevent.c (create_thread_event_object): Add option
7176         "thread" parameter.
7177         * python/py-inferior.c (new_thread_event_object_type)
7178         (new_inferior_event_object_type)
7179         (inferior_deleted_event_object_type): Declare.
7180         (python_new_inferior, python_inferior_deleted): New functions.
7181         (add_thread_object): Emit new_thread event.
7182         (gdbpy_initialize_inferior): Attach new functions to corresponding
7183         observers.
7184         (new_thread, new_inferior, inferior_deleted): Define new event
7185         types.
7186         * python/py-evts.c (gdbpy_initialize_py_events): Add new
7187         registries.
7188         * python/py-events.h (events_object) <new_inferior,
7189         inferior_deleted, new_thread>: New fields.
7190         * python/py-event.h (create_thread_event_breakpoint): Add optional
7191         "thread" parameter.
7192
7193 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
7194
7195         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
7196         check current_ui instead.
7197         (internal_vproblem): Likewise.
7198
7199 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
7200
7201         * thread.c (print_thread_info_1): Remove unnecessary calls to
7202         uiout->is_mi_like_p.
7203
7204 2017-09-09  Tom Tromey  <tom@tromey.com>
7205
7206         * namespace.h (add_using_directive): Update.
7207         * namespace.c (add_using_directive): Change type of excludes to
7208         std::vector.
7209         * dwarf2read.c (read_import_statement): Use std::vector.
7210         (read_namespace): Update.
7211         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
7212
7213 2017-09-09  Tom Tromey  <tom@tromey.com>
7214
7215         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
7216
7217 2017-09-09  Tom Tromey  <tom@tromey.com>
7218
7219         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
7220
7221 2017-09-09  Tom Tromey  <tom@tromey.com>
7222
7223         * stack.c (func_command): Use gdb::def_vector.
7224
7225 2017-09-09  Tom Tromey  <tom@tromey.com>
7226
7227         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
7228         ui_out_emit_list, ui_out_emit_tuple.
7229         (mi_cmd_var_update): Likewise.
7230
7231 2017-09-09  Tom Tromey  <tom@tromey.com>
7232
7233         * mi/mi-interp.c (mi_user_selected_context_changed): Use
7234         ui_out_redirect_pop.
7235         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7236         ui_out_redirect_pop.
7237         * utils.c (do_ui_out_redirect_pop)
7238         (make_cleanup_ui_out_redirect_pop): Remove.
7239         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
7240         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
7241         * ui-out.h (ui_out_redirect_pop): New class.
7242
7243 2017-09-09  Tom Tromey  <tom@tromey.com>
7244
7245         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
7246         (list_available_thread_groups, mi_cmd_list_thread_groups)
7247         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
7248         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
7249         Likewise.
7250
7251 2017-09-09  Tom Tromey  <tom@tromey.com>
7252
7253         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
7254         ui_out_emit_tuple.
7255
7256 2017-09-09  Tom Tromey  <tom@tromey.com>
7257
7258         * target.c (flash_erase_command): Use ui_out_emit_tuple.
7259         * stack.c (print_frame): Use ui_out_emit_tuple.
7260         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
7261         (info_spu_mailbox_command, info_spu_dma_command)
7262         (info_spu_proxydma_command): Likewise.
7263         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
7264         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
7265         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7266         ui_out_emit_tuple.
7267         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
7268
7269 2017-09-09  Tom Tromey  <tom@tromey.com>
7270
7271         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
7272         (class ui_out_emit_table): Update comment.
7273         * ui-out.c (do_cleanup_table_end)
7274         (make_cleanup_ui_out_table_begin_end): Remove.
7275         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
7276         (info_spu_dma_cmdlist): Likewise.
7277         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
7278         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
7279         ui_out_emit_table.
7280
7281 2017-09-09  Tom Tromey  <tom@tromey.com>
7282
7283         * thread.c (print_thread_info_1): Use ui_out_emit_table,
7284         ui_out_emit_list, gdb::optional.
7285
7286 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
7287
7288         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
7289         prototype.
7290         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
7291         prototype.
7292         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
7293         prototype.
7294         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
7295         * ada-exp.y: Remove _initialize_ada_exp prototype.
7296         * ada-lang.c: Remove _initialize_ada_language prototype.
7297         * ada-tasks.c: Remove _initialize_tasks prototype.
7298         * addrmap.c: Remove _initialize_addrmap prototype.
7299         * agent.c: Remove _initialize_agent prototype.
7300         * aix-thread.c: Remove _initialize_aix_thread prototype.
7301         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
7302         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
7303         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
7304         prototype.
7305         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
7306         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
7307         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
7308         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
7309         prototype.
7310         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
7311         prototype.
7312         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
7313         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
7314         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
7315         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
7316         prototype.
7317         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
7318         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
7319         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
7320         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
7321         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7322         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
7323         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
7324         prototype.
7325         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
7326         prototype.
7327         * annotate.c: Remove _initialize_annotate prototype.
7328         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
7329         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
7330         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
7331         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
7332         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
7333         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
7334         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
7335         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
7336         prototype.
7337         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
7338         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
7339         * auto-load.c: Remove _initialize_auto_load prototype.
7340         * auxv.c: Remove _initialize_auxv prototype.
7341         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
7342         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
7343         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
7344         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
7345         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
7346         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
7347         prototype.
7348         * break-catch-throw.c: Remove _initialize_break_catch_throw
7349         prototype.
7350         * breakpoint.c: Remove _initialize_breakpoint prototype.
7351         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
7352         * btrace.c: Remove _initialize_btrace prototype.
7353         * charset.c: Remove _initialize_charset prototype.
7354         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
7355         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
7356         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
7357         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
7358         * cli/cli-script.c: Remove _initialize_cli_script prototype.
7359         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
7360         * coffread.c: Remove _initialize_coffread prototype.
7361         * compile/compile.c: Remove _initialize_compile prototype.
7362         * complaints.c: Remove _initialize_complaints prototype.
7363         * completer.c: Remove _initialize_completer prototype.
7364         * copying.awk: Remove _initialize_copying prototype.
7365         * copying.c: Regenerate.
7366         * core-regset.c: Remove _initialize_core_regset prototype.
7367         * corefile.c: Remove _initialize_core prototype.
7368         * corelow.c: Remove _initialize_corelow prototype.
7369         * cp-abi.c: Remove _initialize_cp_abi prototype.
7370         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
7371         * cp-support.c: Remove _initialize_cp_support prototype.
7372         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
7373         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
7374         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
7375         * ctf.c: Remove _initialize_ctf prototype.
7376         * d-lang.c: Remove _initialize_d_language prototype.
7377         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
7378         prototype.
7379         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
7380         * dbxread.c: Remove _initialize_dbxread prototype.
7381         * dcache.c: Remove _initialize_dcache prototype.
7382         * demangle.c: Remove _initialize_demangler prototype.
7383         * disasm-selftests.c: Remove _initialize_disasm_selftests
7384         prototype.
7385         * disasm.c: Remove _initialize_disasm prototype.
7386         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
7387         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
7388         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
7389         prototype.
7390         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
7391         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
7392         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
7393         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
7394         * elfread.c: Remove _initialize_elfread prototype.
7395         * exec.c: Remove _initialize_exec prototype.
7396         * extension.c: Remove _initialize_extension prototype.
7397         * f-lang.c: Remove _initialize_f_language prototype.
7398         * f-valprint.c: Remove _initialize_f_valprint prototype.
7399         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
7400         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
7401         * filesystem.c: Remove _initialize_filesystem prototype.
7402         * findcmd.c: Remove _initialize_mem_search prototype.
7403         * fork-child.c: Remove _initialize_fork_child prototype.
7404         * frame-base.c: Remove _initialize_frame_base prototype.
7405         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
7406         * frame.c: Remove _initialize_frame prototype.
7407         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
7408         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
7409         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
7410         * gcore.c: Remove _initialize_gcore prototype.
7411         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
7412         * gdbarch.c: Regenerate.
7413         * gdbarch.sh: Remove _initialize_gdbarch prototype.
7414         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
7415         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
7416         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
7417         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
7418         * go-lang.c: Remove _initialize_go_language prototype.
7419         * go32-nat.c: Remove _initialize_go32_nat prototype.
7420         * guile/guile.c: Remove _initialize_guile prototype.
7421         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
7422         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
7423         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
7424         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
7425         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
7426         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
7427         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
7428         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
7429         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
7430         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
7431         prototype.
7432         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
7433         prototype.
7434         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
7435         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
7436         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
7437         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
7438         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
7439         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
7440         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
7441         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
7442         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
7443         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
7444         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
7445         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
7446         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
7447         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7448         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
7449         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
7450         prototype.
7451         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
7452         prototype.
7453         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
7454         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
7455         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
7456         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
7457         * infcall.c: Remove _initialize_infcall prototype.
7458         * infcmd.c: Remove _initialize_infcmd prototype.
7459         * inferior.c: Remove _initialize_inferiors prototype.
7460         * inflow.c: Remove _initialize_inflow prototype.
7461         * infrun.c: Remove _initialize_infrun prototype.
7462         * interps.c: Remove _initialize_interpreter prototype.
7463         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
7464         * jit.c: Remove _initialize_jit prototype.
7465         * language.c: Remove _initialize_language prototype.
7466         * linux-fork.c: Remove _initialize_linux_fork prototype.
7467         * linux-nat.c: Remove _initialize_linux_nat prototype.
7468         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
7469         * linux-thread-db.c: Remove _initialize_thread_db prototype.
7470         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
7471         * m2-lang.c: Remove _initialize_m2_language prototype.
7472         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
7473         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
7474         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
7475         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
7476         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
7477         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7478         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7479         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
7480         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
7481         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
7482         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7483         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7484         * machoread.c: Remove _initialize_machoread prototype.
7485         * macrocmd.c: Remove _initialize_macrocmd prototype.
7486         * macroscope.c: Remove _initialize_macroscope prototype.
7487         * maint.c: Remove _initialize_maint_cmds prototype.
7488         * mdebugread.c: Remove _initialize_mdebugread prototype.
7489         * memattr.c: Remove _initialize_mem prototype.
7490         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
7491         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
7492         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
7493         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
7494         * mi/mi-main.c: Remove _initialize_mi_main prototype.
7495         * microblaze-linux-tdep.c: Remove
7496         _initialize_microblaze_linux_tdep prototype.
7497         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
7498         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
7499         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
7500         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
7501         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
7502         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
7503         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
7504         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
7505         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
7506         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
7507         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
7508         prototype.
7509         * mipsread.c: Remove _initialize_mipsread prototype.
7510         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
7511         prototype.
7512         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
7513         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
7514         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
7515         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
7516         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
7517         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
7518         prototype.
7519         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
7520         * nto-procfs.c: Remove _initialize_procfs prototype.
7521         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
7522         * objc-lang.c: Remove _initialize_objc_language prototype.
7523         * objfiles.c: Remove _initialize_objfiles prototype.
7524         * observer.c: Remove observer_test_first_notification_function,
7525         observer_test_second_notification_function,
7526         observer_test_third_notification_function, and
7527         _initialize_observer prototypes.
7528         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
7529         * osabi.c: Remove _initialize_gdb_osabi prototype.
7530         * osdata.c: Remove _initialize_osdata prototype.
7531         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
7532         * parse.c: Remove _initialize_parse prototype.
7533         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
7534         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
7535         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
7536         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
7537         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
7538         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
7539         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
7540         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
7541         * printcmd.c: Remove _initialize_printcmd prototype.
7542         * probe.c: Remove _initialize_probe prototype.
7543         * proc-api.c: Remove _initialize_proc_api prototype.
7544         * proc-events.c: Remove _initialize_proc_events prototype.
7545         * proc-service.c: Remove _initialize_proc_service prototype.
7546         * procfs.c: Remove _initialize_procfs prototype.
7547         * psymtab.c: Remove _initialize_psymtab prototype.
7548         * python/python.c: Remove _initialize_python prototype.
7549         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
7550         * record-btrace.c: Remove _initialize_record_btrace prototype.
7551         * record-full.c: Remove _initialize_record_full prototype.
7552         * record.c: Remove _initialize_record prototype.
7553         * regcache.c: Remove _initialize_regcache prototype.
7554         * reggroups.c: Remove _initialize_reggroup prototype.
7555         * remote-notif.c: Remove _initialize_notif prototype.
7556         * remote-sim.c: Remove _initialize_remote_sim prototype.
7557         * remote.c: Remove _initialize_remote prototype.
7558         * reverse.c: Remove _initialize_reverse prototype.
7559         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
7560         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
7561         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
7562         prototype.
7563         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
7564         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
7565         * rust-exp.y: Remove _initialize_rust_exp prototype.
7566         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
7567         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
7568         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
7569         * score-tdep.c: Remove _initialize_score_tdep prototype.
7570         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
7571         prototype.
7572         * ser-go32.c: Remove _initialize_ser_dos prototype.
7573         * ser-mingw.c: Remove _initialize_ser_windows prototype.
7574         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
7575         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
7576         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
7577         * serial.c: Remove _initialize_serial prototype.
7578         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
7579         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
7580         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
7581         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
7582         * skip.c: Remove _initialize_step_skip prototype.
7583         * sol-thread.c: Remove _initialize_sol_thread prototype.
7584         * solib-aix.c: Remove _initialize_solib_aix prototype.
7585         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
7586         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
7587         * solib-frv.c: Remove _initialize_frv_solib prototype.
7588         * solib-spu.c: Remove _initialize_spu_solib prototype.
7589         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
7590         * solib-target.c: Remove _initialize_solib_target prototype.
7591         * solib.c: Remove _initialize_solib prototype.
7592         * source.c: Remove _initialize_source prototype.
7593         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
7594         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
7595         prototype.
7596         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
7597         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
7598         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
7599         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
7600         prototype.
7601         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
7602         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
7603         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
7604         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
7605         prototype.
7606         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
7607         prototype.
7608         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
7609         prototype.
7610         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
7611         prototype.
7612         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
7613         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
7614         prototype.
7615         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
7616         prototype.
7617         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
7618         prototype.
7619         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
7620         prototype.
7621         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
7622         prototype.
7623         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
7624         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
7625         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
7626         * stabsread.c: Remove _initialize_stabsread prototype.
7627         * stack.c: Remove _initialize_stack prototype.
7628         * stap-probe.c: Remove _initialize_stap_probe prototype.
7629         * std-regs.c: Remove _initialize_frame_reg prototype.
7630         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
7631         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
7632         * symfile.c: Remove _initialize_symfile prototype.
7633         * symmisc.c: Remove _initialize_symmisc prototype.
7634         * symtab.c: Remove _initialize_symtab prototype.
7635         * target-dcache.c: Remove _initialize_target_dcache prototype.
7636         * target-descriptions.c: Remove _initialize_target_descriptions
7637         prototype.
7638         * thread.c: Remove _initialize_thread prototype.
7639         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
7640         prototype.
7641         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
7642         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
7643         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
7644         prototype.
7645         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
7646         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
7647         * tracefile.c: Remove _initialize_tracefile prototype.
7648         * tracepoint.c: Remove _initialize_tracepoint prototype.
7649         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
7650         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
7651         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
7652         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
7653         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
7654         * tui/tui-win.c: Remove _initialize_tui_win prototype.
7655         * tui/tui.c: Remove _initialize_tui prototype.
7656         * typeprint.c: Remove _initialize_typeprint prototype.
7657         * user-regs.c: Remove _initialize_user_regs prototype.
7658         * utils.c: Remove _initialize_utils prototype.
7659         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
7660         * valarith.c: Remove _initialize_valarith prototype.
7661         * valops.c: Remove _initialize_valops prototype.
7662         * valprint.c: Remove _initialize_valprint prototype.
7663         * value.c: Remove _initialize_values prototype.
7664         * varobj.c: Remove _initialize_varobj prototype.
7665         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
7666         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
7667         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
7668         * windows-nat.c: Remove _initialize_windows_nat,
7669         _initialize_check_for_gdb_ini, and _initialize_loadable
7670         prototypes.
7671         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
7672         * xcoffread.c: Remove _initialize_xcoffread prototype.
7673         * xml-support.c: Remove _initialize_xml_support prototype.
7674         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
7675         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
7676         prototype.
7677         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
7678         prototype.
7679         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
7680
7681 2017-09-08  Keith Seitz  <keiths@redhat.com>
7682
7683         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
7684         field.
7685
7686 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
7687
7688         * f-valprint.c (f_val_print): Remove check for one byte
7689         sized integers. Remove printing of character type.
7690
7691 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
7692             Christoph Weinmann  <christoph.t.weinmann@intel.com>
7693             Bernhard Heckel  <bernhard.heckel@intel.com>
7694
7695         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
7696         to maintain proper indentation when printing pointers/refs.
7697
7698 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
7699
7700         GDB 8.0.1 released.
7701
7702 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
7703
7704         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
7705
7706 2017-09-05  Tom Tromey  <tom@tromey.com>
7707
7708         * parse.c (funcall_chain): Now a std::vector.
7709         (start_arglist, end_arglist): Simplify.
7710         (free_funcalls): Remove.
7711         (parse_exp_in_context_1): Remove cleanup.
7712
7713 2017-09-05  Tom Tromey  <tom@tromey.com>
7714
7715         * go-exp.y (go_parse): Don't create a cleanup.
7716
7717 2017-09-05  Tom Tromey  <tom@tromey.com>
7718
7719         * d-exp.y (PrimaryExpression): Use std::string.
7720         (d_parse): Don't create a cleanup.
7721
7722 2017-09-05  Tom Tromey  <tom@tromey.com>
7723
7724         * utils.c (do_clear_parser_state): Remove.
7725         (make_cleanup_clear_parser_state): Remove.
7726         * p-exp.y (pascal_parse): Use scoped_restore.
7727         * m2-exp.y (m2_parse): Use scoped_restore.
7728         * f-exp.y (f_parse): Use scoped_restore.
7729         * d-exp.y (d_parse): Use scoped_restore.
7730         * c-exp.y (c_parse): Use scoped_restore.
7731         * ada-exp.y (ada_parse): Use scoped_restore.
7732         * utils.h (make_cleanup_clear_parser_state): Remove.
7733
7734 2017-09-06  Keith Seitz  <keiths@redhat.com>
7735
7736         * dwarf2read.c (dw2_linkage_name_attr): New function.
7737         (dw2_linkage_name): New function.
7738         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
7739         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
7740         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
7741
7742 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
7743
7744         * config/djgpp/djconfig.sh: Correct shell portability issue.
7745
7746 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
7747
7748         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
7749
7750 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
7751
7752         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
7753         * NEWS: Mention new FreeBSD/mips native configuration.
7754         * configure.host: Add aarch64*-*-freebsd*.
7755         * configure.nat: Likewise.
7756         * aarch64-fbsd-nat.c: New file.
7757
7758 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
7759
7760         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
7761         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
7762         * NEWS: Mention new FreeBSD/aarch64 target.
7763         * configure.tgt: Add aarch64*-*-freebsd*.
7764         * aarch64-fbsd-tdep.c: New file.
7765         * aarch64-fbsd-tdep.h: New file.
7766
7767 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
7768
7769         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
7770
7771 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
7772
7773         * parse.c (find_minsym_type_and_address): Don't relocate addresses
7774         of TLS symbols.
7775
7776 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7777
7778         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
7779         call.
7780
7781 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
7782
7783         * infrun.c (follow_exec): Call add_thread after
7784         target_find_description.
7785
7786 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
7787
7788         * infrun.c (handle_inferior_event_1): When exec'ing, read
7789         stop_pc after follow_exec.
7790
7791 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
7792
7793         * remote.c (process_g_packet): Update error message.
7794
7795 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7796
7797         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
7798         targets.
7799
7800 2017-09-05  Pedro Alves  <palves@redhat.com>
7801
7802         * eval.c (eval_call, evaluate_funcall): New functions, factored
7803         out from ...
7804         (evaluate_subexp_standard): ... this.
7805
7806 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7807
7808         * amd64-tdep.c (amd64_target_description): Create target
7809         descriptions.
7810         (_initialize_amd64_tdep): Don't call functions
7811         initialize_tdesc_amd64_*.  Add self tests.
7812         * arch/amd64.c (amd64_create_target_description): Add parameter
7813         is_linux.  Call set_tdesc_osabi if is_linux is true.
7814         * arch/amd64.h (amd64_create_target_description): Update the
7815         declaration.
7816         * arch/i386.c (i386_create_target_description): Add parameter
7817         is_linux.  Call set_tdesc_osabi if is_linux is true.
7818         * arch/i386.h (i386_create_target_description): Update
7819         declaration.
7820         * configure.tgt: Add i386.o to gdb_target_obs.
7821         * features/Makefile (XMLTOC): Remove i386/*.xml.
7822         * features/i386/amd64-avx-avx512.c: Remove.
7823         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
7824         * features/i386/amd64-avx-mpx.c: Remove.
7825         * features/i386/amd64-avx.c: Remove.
7826         * features/i386/amd64-mpx.c: Remove.
7827         * features/i386/amd64.c: Remove.
7828         * features/i386/i386-avx-avx512.c: Remove.
7829         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
7830         * features/i386/i386-avx-mpx.c: Remove.
7831         * features/i386/i386-avx.c: Remove.
7832         * features/i386/i386-mmx.c: Remove.
7833         * features/i386/i386-mpx.c: Remove.
7834         * features/i386/i386.c: Remove.
7835         * i386-tdep.c: Don't include features/i386/i386*.c., include
7836         target-descriptions.h and arch/i386.h.
7837         (i386_target_description): Create target descriptions.
7838         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
7839         functions.  Do self tests.
7840
7841 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7842
7843         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
7844         * features/i386/amd64-avx-avx512-linux.c: Removed.
7845         * features/i386/amd64-avx-linux.c: Removed.
7846         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
7847         * features/i386/amd64-avx-mpx-linux.c: Removed.
7848         * features/i386/amd64-linux.c: Removed.
7849         * features/i386/amd64-mpx-linux.c: Removed.
7850         * features/i386/x32-avx-avx512-linux.c: Removed.
7851         * features/i386/x32-avx-linux.c: Removed.
7852         * features/i386/x32-linux.c: Removed.
7853
7854 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7855
7856         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
7857         features/i386/*.c.
7858         (amd64_linux_read_description): Call
7859         amd64_create_target_description.
7860         * arch/amd64.c: New file.
7861         * arch/amd64.h: New file.
7862         * configure.tgt (x86_64-*-linux*): Append amd64.o.
7863         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
7864
7865 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7866
7867         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
7868         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
7869         (amd64_linux_read_description): Create target descriptions.
7870         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
7871         functions.  Add unit tests.
7872         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
7873         x32-core.xml.
7874         * features/i386/64bit-avx.c: Generated.
7875         * features/i386/64bit-avx512.c: Generated.
7876         * features/i386/64bit-core.c: Generated.
7877         * features/i386/64bit-linux.c: Generated.
7878         * features/i386/64bit-mpx.c: Generated.
7879         * features/i386/64bit-pkeys.c: Generated.
7880         * features/i386/64bit-segments.c: Generated.
7881         * features/i386/64bit-sse.c: Generated.
7882         * features/i386/x32-core.c: Generated.
7883         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
7884         c files for amd64-linux and x32-linux.
7885
7886 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7887
7888         * amd64-linux-tdep.c (amd64_linux_read_description): New
7889         function.
7890         (amd64_linux_core_read_description): Call
7891         amd64_linux_read_description.
7892         (amd64_linux_init_abi): Likewise.
7893         (amd64_x32_linux_init_abi): Likewise.
7894         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
7895         * x86-linux-nat.c (x86_linux_read_description): Call
7896         amd64_linux_read_description.
7897
7898 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7899
7900         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
7901         comments.
7902
7903 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7904
7905         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
7906         * features/i386/i386-avx-avx512-linux.c: Remove.
7907         * features/i386/i386-avx-linux.c: Remove.
7908         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
7909         * features/i386/i386-avx-mpx-linux.c: Remove.
7910         * features/i386/i386-linux.c: Remove.
7911         * features/i386/i386-mmx-linux.c: Remove.
7912         * features/i386/i386-mpx-linux.c: Remove.
7913
7914 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7915
7916         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
7917         (SFILES): Add arch/i386.c.
7918         (HFILES_NO_SRCDIR): Add arch/i386.h.
7919         * arch/i386.c: New file.
7920         * arch/i386.h: New file.
7921         * arch/tdesc.h (allocate_target_description): Declare.
7922         (set_tdesc_architecture): Declare.
7923         (set_tdesc_osabi): Declare.
7924         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
7925         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
7926         include arch/i386.h.
7927         (i386_linux_read_description): Remove code and call
7928         i386_create_target_description.
7929         (set_tdesc_architecture): New function.
7930         (set_tdesc_osabi): New function.
7931         * target-descriptions.h (allocate_target_description): Remove.
7932
7933 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7934
7935         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
7936         * target-descriptions.c (tdesc_create_feature): Likewise, and
7937         adjust code.
7938         * features/i386/32bit-avx.c: Re-generated.
7939         * features/i386/32bit-avx512.c: Re-generated.
7940         * features/i386/32bit-core.c: Re-generated.
7941         * features/i386/32bit-linux.c: Re-generated.
7942         * features/i386/32bit-mpx.c: Re-generated.
7943         * features/i386/32bit-pkeys.c: Re-generated.
7944         * features/i386/32bit-sse.c: Re-generated.
7945
7946 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7947
7948         * regformats/regdef.h (struct reg): Override operator == and !=.
7949
7950 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7951
7952         * arch/tdesc.h: New file.
7953         * regformats/regdat.sh: Generate code using tdesc_create_reg.
7954         * target-descriptions.c: Update comments.
7955         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
7956         declarations.
7957         * features/i386/32bit-avx.c: Re-generated.
7958         * features/i386/32bit-avx512.c: Re-generated.
7959         * features/i386/32bit-core.c: Re-generated.
7960         * features/i386/32bit-linux.c: Re-generated.
7961         * features/i386/32bit-mpx.c: Re-generated.
7962         * features/i386/32bit-pkeys.c: Re-generated.
7963         * features/i386/32bit-sse.c: Re-generated.
7964
7965 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7966
7967         * regformats/regdat.sh: Update generated code.
7968
7969 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7970
7971         * regformats/regdat.sh: Adjust code order.
7972
7973 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
7974
7975         * expprint.c (dump_subexp_body_standard): Use constant format
7976         string in fprintf_filtered call.
7977
7978 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
7979
7980         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
7981         NetBSD/i386.
7982         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
7983
7984 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
7985
7986         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
7987
7988 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
7989
7990         * bsd-kvm.o: Define _KMEMUSER.
7991         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
7992         * configure: Regenerate.
7993
7994 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
7995
7996         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
7997         * i386-fbsd-nat.c: Likewise.
7998
7999 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
8000
8001         * unittests/array-view-selftests.c: Add include of <array>.
8002
8003 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
8004
8005         * spu-tdep.c (flush_ea_cache): Add missing argument to
8006         call_function_by_hand.
8007
8008 2017-09-04  Pedro Alves  <palves@redhat.com>
8009
8010         * NEWS (Safer support for debugging with no debug info): New.
8011
8012 2017-09-04  Pedro Alves  <palves@redhat.com>
8013
8014         * c-exp.y (function_method, function_method_void): Add current
8015         instance flags to TYPE_INSTANCE.
8016         * dwarf2read.c (check_modifier): New.
8017         (compute_delayed_physnames): Assert that only C++ adds delayed
8018         physnames.  Mark fn_fields as const/volatile depending on
8019         physname.
8020         * eval.c (make_params): New type_instance_flags parameter.  Use
8021         it as the new type's instance flags.
8022         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
8023         flags element and pass it to make_params.
8024         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
8025         instance flags element.
8026         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
8027         * gdbtypes.h: Include "enum-flags.h".
8028         (type_instance_flags): New enum-flags type.
8029         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
8030         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
8031         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
8032         (follow_type_instance_flags): New function.
8033         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
8034         * parser-defs.h (follow_type_instance_flags): Declare.
8035         * valops.c (value_struct_elt_for_reference): const/volatile must
8036         match too.
8037
8038 2017-09-04  Pedro Alves  <palves@redhat.com>
8039
8040         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
8041         function/method scopes; lookup the nested name as a function local
8042         static variable.
8043
8044 2017-09-04  Pedro Alves  <palves@redhat.com>
8045
8046         (%type <voidval>): Add function_method.
8047         * c-exp.y (exp): New production for calls with no arguments.
8048         (function_method, function_method_void_or_typelist): New
8049         productions.
8050         (exp): New production for "method()::static_var".
8051         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
8052         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8053         Handle OP_FUNC_STATIC_VAR.
8054         * parse.c (operator_length_standard):
8055         Handle OP_FUNC_STATIC_VAR.
8056
8057 2017-09-04  Pedro Alves  <palves@redhat.com>
8058
8059         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
8060         handling.
8061         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8062         Ditto.
8063         * parse.c (operator_length_standard, operator_check_standard):
8064         Ditto.
8065         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
8066
8067 2017-09-04  Pedro Alves  <palves@redhat.com>
8068
8069         * ax-gdb.c: Include "typeprint.h".
8070         (gen_expr_for_cast): New function.
8071         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
8072         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
8073         type is unknown.
8074         * dwarf2read.c (new_symbol_full): Fallback to int instead of
8075         nodebug_data_symbol.
8076         * eval.c: Include "typeprint.h".
8077         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
8078         Error out if symbol has unknown type.
8079         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
8080         evaluate_subexp_for_cast.
8081         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
8082         OP_VAR_MSYM_VALUE.
8083         (evaluate_subexp_for_cast): New function.
8084         * gdbtypes.c (init_nodebug_var_type): New function.
8085         (objfile_type): Use it to initialize types of variables with no
8086         debug info.
8087         * typeprint.c (error_unknown_type): New.
8088         * typeprint.h (error_unknown_type): New declaration.
8089         * compile/compile-c-types.c (convert_type_basic): Handle
8090         TYPE_CODE_ERROR; warn and fallback to int for variables with
8091         unknown type.
8092
8093 2017-09-04  Pedro Alves  <palves@redhat.com>
8094
8095         * eval.c (evaluate_var_value): New function, factored out from ...
8096         (evaluate_subexp_standard): ... here.
8097
8098 2017-09-04  Pedro Alves  <palves@redhat.com>
8099
8100         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
8101         Remove useless assignments to 'op'.
8102
8103 2017-09-04  Pedro Alves  <palves@redhat.com>
8104
8105         * eval.c (eval_skip_value): New function.
8106         (evaluate_subexp_standard): Use it.
8107
8108 2017-09-04  Pedro Alves  <palves@redhat.com>
8109
8110         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
8111         function name from symbol/minsym and pass it to
8112         error_call_unknown_return_type.
8113
8114 2017-09-04  Pedro Alves  <palves@redhat.com>
8115
8116         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
8117         * ax-gdb.c (gen_msym_var_ref): New function.
8118         (gen_expr): Handle OP_VAR_MSYM_VALUE.
8119         * eval.c (evaluate_var_msym_value): New function.
8120         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
8121         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
8122         to call_function_by_hand.
8123         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8124         Handle OP_VAR_MSYM_VALUE.
8125         (union exp_element) <msymbol>: New field.
8126         * minsyms.h (struct type): Forward declare.
8127         (find_minsym_type_and_address): Declare.
8128         * parse.c (write_exp_elt_msym): New function.
8129         (write_exp_msymbol): Delete, refactored as ...
8130         (find_minsym_type_and_address): ... this new function.
8131         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
8132         (operator_length_standard, operator_check_standard): Handle
8133         OP_VAR_MSYM_VALUE.
8134         * std-operator.def (OP_VAR_MSYM_VALUE): New.
8135
8136 2017-09-04  Pedro Alves  <palves@redhat.com>
8137
8138         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
8139         TYPE_GNU_IFUNC specially here.  Throw error if return type is
8140         unknown.
8141         * ada-typeprint.c (print_func_type): Handle functions with unknown
8142         return type.
8143         * c-typeprint.c (c_type_print_base): Handle functions and methods
8144         with unknown return type.
8145         * compile/compile-c-symbols.c (convert_symbol_bmsym)
8146         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
8147         * compile/compile-c-types.c: Include "objfiles.h".
8148         (convert_func): For functions with unknown return type, warn and
8149         default to int.
8150         * compile/compile-object-run.c (compile_object_run): Adjust call
8151         to call_function_by_hand_dummy.
8152         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
8153         call_function_by_hand.
8154         * eval.c (evaluate_subexp_standard): Adjust calls to
8155         call_function_by_hand.  Handle functions and methods with unknown
8156         return type.  Pass expect_type to call_function_by_hand.
8157         * f-typeprint.c (f_type_print_base): Handle functions with unknown
8158         return type.
8159         * gcore.c (call_target_sbrk): Adjust call to
8160         call_function_by_hand.
8161         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
8162         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
8163         an integer address type instead of nodebug.
8164         * guile/scm-value.c (gdbscm_value_call): Adjust call to
8165         call_function_by_hand.
8166         * infcall.c (error_call_unknown_return_type): New function.
8167         (call_function_by_hand): New "default_return_type" parameter.
8168         Pass it down.
8169         (call_function_by_hand_dummy): New "default_return_type"
8170         parameter.  Use it instead of defaulting to int.  If there's no
8171         default and the return type is unknown, throw an error.  If
8172         there's a default return type, and the called function has no
8173         debug info, then assume the function is prototyped.
8174         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
8175         New "default_return_type" parameter.
8176         (error_call_unknown_return_type): New declaration.
8177         * linux-fork.c (call_lseek): Cast return type of lseek.
8178         (inferior_call_waitpid, checkpoint_command): Adjust calls to
8179         call_function_by_hand.
8180         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
8181         calls to call_function_by_hand.
8182         * m2-typeprint.c (m2_procedure): Handle functions with unknown
8183         return type.
8184         * objc-lang.c (lookup_objc_class, lookup_child_selector)
8185         (value_nsstring, print_object_command): Adjust calls to
8186         call_function_by_hand.
8187         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
8188         functions with unknown return type.
8189         (pascal_type_print_func_varspec_suffix): New function.
8190         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
8191         TYPE_CODE_METHOD>: Use it.
8192         * python/py-value.c (valpy_call): Adjust call to
8193         call_function_by_hand.
8194         * rust-lang.c (rust_evaluate_funcall): Adjust call to
8195         call_function_by_hand.
8196         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
8197         call_function_by_hand.
8198         * valops.c (value_allocate_space_in_inferior): Adjust call to
8199         call_function_by_hand.
8200         * typeprint.c (type_print_unknown_return_type): New function.
8201         * typeprint.h (type_print_unknown_return_type): New declaration.
8202
8203 2017-09-04  Pedro Alves  <palves@redhat.com>
8204
8205         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
8206         types with more than one parameter as prototyped.
8207
8208 2017-09-04  Pedro Alves  <palves@redhat.com>
8209
8210         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
8211         (disassemble_command): Use gdb_disassembly_flags instead of bare
8212         int.
8213         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
8214         (dump_insns, do_mixed_source_and_assembly_deprecated)
8215         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
8216         Use gdb_disassembly_flags instead of bare int.
8217         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
8218         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
8219         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
8220         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
8221         (enum gdb_disassembly_flag): ... values of this new enumeration.
8222         (gdb_disassembly_flags): Define.
8223         (gdb_disassembly)
8224         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
8225         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
8226         gdb_disassembly_flags instead of bare int.
8227         * record-btrace.c (btrace_insn_history)
8228         (record_btrace_insn_history, record_btrace_insn_history_range)
8229         (record_btrace_insn_history_from): Use gdb_disassembly_flags
8230         instead of bare int.
8231         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
8232         Use gdb_disassembly_flags instead of bare int.
8233         * target-debug.h (target_debug_print_gdb_disassembly_flags):
8234         Define.
8235         * target-delegates.c: Regenerate.
8236         * target.c (target_insn_history, target_insn_history_from)
8237         (target_insn_history_range): Use gdb_disassembly_flags instead of
8238         bare int.
8239         * target.h: Include "disasm.h".
8240         (struct target_ops) <to_insn_history, to_insn_history_from,
8241         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
8242         int.
8243         (target_insn_history, target_insn_history_from)
8244         (target_insn_history_range): Use gdb_disassembly_flags instead of
8245         bare int.
8246
8247 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
8248
8249         * cli/cli-script.c (build_command_line): For if/while commands,
8250         check whether args is empty.
8251
8252 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
8253
8254         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
8255         (enum command_control_type): Likewise.
8256         (struct command_line): Likewise.
8257         (free_command_lines): Likewise.
8258         (struct command_lines_deleter): Likewise.
8259         (command_line_up): Likewise.
8260         (read_command_lines): Likewise.
8261         (read_command_lines_1): Likewise.
8262         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
8263         (enum command_control_type): Likewise.
8264         (struct command_line): Likewise.
8265         (free_command_lines): Likewise.
8266         (struct command_lines_deleter): Likewise.
8267         (command_line_up): Likewise.
8268         (read_command_lines): Likewise.
8269         (read_command_lines_1): Likewise.
8270         * breakpoint.h: Include cli/cli-script.h.
8271         * extension-priv.h: Likewise.
8272         * gdbcmd.h: Likewise.
8273
8274 2017-09-04  Pedro Alves  <palves@redhat.com>
8275
8276         * ada-lang.c (is_known_support_routine): Move sal declaration to
8277         where it is initialized.
8278         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
8279         (parse_breakpoint_sals, decode_static_tracepoint_spec)
8280         (clear_command, update_static_tracepoint): Remove init_sal
8281         references.  Move declarations closer to initializations.
8282         * cli/cli-cmds.c (list_command): Move sal declarations closer to
8283         initializations.
8284         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
8285         references.  Move sal declarations closer to initializations.
8286         * frame.c (find_frame_sal): Return a symtab_and_line via function
8287         return instead of output parameter.  Remove init_sal references.
8288         * frame.h (find_frame_sal): Return a symtab_and_line via function
8289         return instead of output parameter.
8290         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
8291         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
8292         instead of memset.
8293         (gdbscm_find_pc_line): Remove init_sal reference.
8294         * infcall.c (call_function_by_hand_dummy): Remove init_sal
8295         references.  Move declarations closer to initializations.
8296         * infcmd.c (set_step_frame): Update.  Move declarations closer to
8297         initializations.
8298         (finish_backward): Remove init_sal references.  Move declarations
8299         closer to initializations.
8300         * infrun.c (process_event_stop_test, handle_step_into_function)
8301         (insert_hp_step_resume_breakpoint_at_frame)
8302         (insert_step_resume_breakpoint_at_caller): Likewise.
8303         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
8304         (symbol_to_sal): Likewise.
8305         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
8306         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
8307         to its initialization.
8308         * reverse.c (save_bookmark_command): Use new/delete.  Remove
8309         init_sal references.  Move declarations closer to initializations.
8310         * source.c (get_current_source_symtab_and_line): Remove brace
8311         initialization.
8312         (set_current_source_symtab_and_line): Now takes the sal by const
8313         reference.  Remove brace initialization.
8314         (line_info): Remove init_sal reference.
8315         * source.h (set_current_source_symtab_and_line): Now takes a
8316         symtab_and_line via const reference.
8317         * stack.c (set_current_sal_from_frame): Adjust.
8318         (print_frame_info): Adjust.
8319         (get_last_displayed_sal): Return the sal via function return
8320         instead of via output parameter.  Simplify.
8321         (frame_info): Adjust.
8322         * stack.h (get_last_displayed_sal): Return the sal via function
8323         return instead of via output parameter.
8324         * symtab.c (init_sal): Delete.
8325         (find_pc_sect_line): Remove init_sal references.  Move
8326         declarations closer to initializations.
8327         (find_function_start_sal): Remove init_sal references.  Move
8328         declarations closer to initializations.
8329         * symtab.h (struct symtab_and_line): In-class initialize all
8330         fields.
8331         * tracepoint.c (set_traceframe_context)
8332         (print_one_static_tracepoint_marker): Remove init_sal references.
8333         Move declarations closer to initializations.
8334         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
8335         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
8336         declarations closer to initializations.
8337         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
8338         init_sal references.  Adjust.
8339
8340 2017-09-04  Pedro Alves  <palves@redhat.com>
8341
8342         * ax-gdb.c (agent_command_1): Use range-for.
8343         * break-catch-throw.c (re_set_exception_catchpoint): Update.
8344         * breakpoint.c: Include "common/array-view.h".
8345         (init_breakpoint_sal, create_breakpoint_sal): Change sals
8346         parameter from struct symtabs_and_lines to
8347         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
8348         (breakpoint_sals_to_pc): Change sals parameter from struct
8349         symtabs_and_lines to std::vector reference.
8350         (check_fast_tracepoint_sals): Change sals parameter from struct
8351         symtabs_and_lines to std::array_view.  Use range-for.
8352         (decode_static_tracepoint_spec): Return a std::vector instead of
8353         symtabs_and_lines.  Update.
8354         (create_breakpoint): Update.
8355         (break_range_command, until_break_command, clear_command): Update.
8356         (base_breakpoint_decode_location, bkpt_decode_location)
8357         (bkpt_probe_create_sals_from_location)
8358         (bkpt_probe_decode_location, tracepoint_decode_location)
8359         (tracepoint_probe_decode_location)
8360         (strace_marker_create_sals_from_location): Return a std::vector
8361         instead of symtabs_and_lines.
8362         (strace_marker_create_breakpoints_sal): Update.
8363         (strace_marker_decode_location): Return a std::vector instead of
8364         symtabs_and_lines.  Update.
8365         (update_breakpoint_locations): Change struct symtabs_and_lines
8366         parameters to gdb::array_view.  Adjust.
8367         (location_to_sals): Return a std::vector instead of
8368         symtabs_and_lines.  Update.
8369         (breakpoint_re_set_default): Use std::vector instead of struct
8370         symtabs_and_lines.
8371         (decode_location_default): Return a std::vector instead of
8372         symtabs_and_lines.  Update.
8373         * breakpoint.h: Include "common/array-view.h".
8374         (struct breakpoint_ops) <decode_location>: Now returns a
8375         std::vector instead of returning a symtabs_and_lines via output
8376         parameter.
8377         (update_breakpoint_locations): Change sals parameters to use
8378         gdb::array_view.
8379         * cli/cli-cmds.c (edit_command, list_command): Update to use
8380         std::vector and gdb::array_view.
8381         (ambiguous_line_spec): Adjust to use gdb::array_view and
8382         range-for.
8383         (compare_symtabs): Rename to ...
8384         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
8385         const reference and adjust.
8386         (filter_sals): Rewrite using std::vector and standard algorithms.
8387         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
8388         (jump_command): Update to use std::vector.
8389         * linespec.c (struct linespec_state) <canonical_names>: Update
8390         comment.
8391         (add_sal_to_sals_basic): Delete.
8392         (add_sal_to_sals, filter_results, convert_results_to_lsals)
8393         (decode_line_2, create_sals_line_offset)
8394         (convert_address_location_to_sals, convert_linespec_to_sals)
8395         (convert_explicit_location_to_sals, parse_linespec)
8396         (event_location_to_sals, decode_line_full, decode_line_1)
8397         (decode_line_with_current_source)
8398         (decode_line_with_last_displayed, decode_objc)
8399         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
8400         (linespec_result::~linespec_result): Adjust to use std::vector
8401         instead of symtabs_and_lines.
8402         * linespec.h (linespec_sals::sals): Now a std::vector.
8403         (struct linespec_result): Use std::vector, bool, and in-class
8404         initialization.
8405         (decode_line_1, decode_line_with_current_source)
8406         (decode_line_with_last_displayed): Return std::vector.
8407         * macrocmd.c (info_macros_command): Use std::vector.
8408         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
8409         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
8410         std::vector.
8411         * probe.h (parse_probes): Return a std::vector.
8412         * python/python.c (gdbpy_decode_line): Use std::vector and
8413         gdb::array_view.
8414         * source.c (select_source_symtab, line_info): Use std::vector.
8415         * stack.c (func_command): Use std::vector.
8416         * symtab.h (struct symtabs_and_lines): Delete.
8417         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
8418
8419 2017-09-04  Pedro Alves  <palves@redhat.com>
8420
8421         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8422         unittests/array-view-selftests.c.
8423         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
8424         * common/array-view.h: New file.
8425         * unittests/array-view-selftests.c: New file.
8426
8427 2017-09-04  Pedro Alves  <palves@redhat.com>
8428
8429         * cli/cli-cmds.c (edit_command): Pass message to
8430         ambiguous_line_spec.
8431         (list_command): Pass message to ambiguous_line_spec.  Say
8432         "first"/"last" instead of "start" and "end" to be consistent with
8433         the manual.
8434         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
8435         them to print formatted message.
8436
8437 2017-09-04  Pedro Alves  <palves@redhat.com>
8438
8439         * btrace.c (ftrace_add_pt): Pass btrace_insn to
8440         ftrace_update_insns by reference instead of pointer.
8441
8442 2017-09-04  Yao Qi  <yao.qi@linaro.org>
8443
8444         * i386-go32-tdep.c: Include x86-xstate.h.
8445         (i386_go32_init_abi): Call i386_target_description.
8446         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
8447         if xcr0 is X86_XSTATE_X87_MASK.
8448         * i386-tdep.h (tdesc_i386): Remove the declaration.
8449         (tdesc_i386_mmx): Likewise.
8450
8451 2017-09-04  Yao Qi  <yao.qi@linaro.org>
8452
8453         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
8454         X86_XSTATE_SSE_MASK instead of 0.
8455
8456 2017-09-04  Yao Qi  <yao.qi@linaro.org>
8457
8458         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
8459         i386_target_description.
8460         * i386-fbsd-nat.c (i386fbsd_read_description): Call
8461         i386_target_description.
8462         * i386-tdep.c (i386_gdbarch_init): Likewise.
8463
8464 2017-09-04  Yao Qi  <yao.qi@linaro.org>
8465
8466         * amd64-darwin-tdep.c: Include "x86-xstate.h".
8467         (x86_darwin_init_abi_64): Call amd64_target_description.
8468         * amd64-dicos-tdep.c: Likewise.
8469         * amd64-fbsd-nat.c: Likewise.
8470         * amd64-fbsd-tdep.c: Likewise.
8471         * amd64-nbsd-tdep.c: Likewise.
8472         * amd64-obsd-tdep.c: Likewise.
8473         * amd64-sol2-tdep.c: Likewise.
8474         * amd64-windows-tdep.c: Likewise.
8475         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
8476
8477 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
8478
8479         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
8480         (btrace_function) <insn>: Change type to use std::vector.
8481         * btrace.c (ftrace_debug, ftrace_call_num_insn,
8482         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
8483         ftrace_update_insns, ftrace_compute_global_level_offset,
8484         btrace_stitch_bts, btrace_clear, btrace_insn_get,
8485         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
8486         change to std::vector.
8487         (ftrace_update_insns): Adjust to change to std::vector, change
8488         type of INSN parameter.
8489         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
8490         * record-btrace.c (btrace_call_history_insn_range,
8491         btrace_compute_src_line_range,
8492         record_btrace_frame_prev_register): Adjust to change to
8493         std::vector.
8494         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
8495         to change to std::vector.
8496
8497 2017-09-03  Tom Tromey  <tom@tromey.com>
8498
8499         * corefile.c (reopen_exec_file): Use std::string.
8500
8501 2017-09-03  Tom Tromey  <tom@tromey.com>
8502
8503         * compile/compile.c (compile_register_name_mangled): Return
8504         std::string.
8505         * compile/compile-loc2c.c (pushf_register_address): Update.
8506         (pushf_register): Update.
8507         * compile/compile-c-types.c (convert_array): Update.
8508         * compile/compile-c-symbols.c (generate_vla_size): Update.
8509         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
8510         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
8511         (convert_one_symbol): Update.
8512         (generate_c_for_for_one_variable): Update.
8513         * compile/compile-c-support.c (c_get_range_decl_name): Return a
8514         std::string.
8515         (generate_register_struct): Update.
8516         * compile/compile-internal.h (c_get_range_decl_name): Return a
8517         std::string.
8518         (compile_register_name_mangled): Return std::string.
8519
8520 2017-09-03  Tom Tromey  <tom@tromey.com>
8521
8522         * utils.c (perror_string): Return a std::string.
8523         (throw_perror_with_name, perror_warning_with_name): Update.
8524
8525 2017-09-03  Tom Tromey  <tom@tromey.com>
8526
8527         * demangle.c (demangle_command): Use std::string,
8528         unique_xmalloc_ptr.
8529
8530 2017-09-03  Tom Tromey  <tom@tromey.com>
8531
8532         * cli/cli-setshow.c (do_set_command): Use std::string.
8533
8534 2017-09-03  Tom Tromey  <tom@tromey.com>
8535
8536         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
8537
8538 2017-09-03  Tom Tromey  <tom@tromey.com>
8539
8540         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
8541
8542 2017-09-03  Tom Tromey  <tom@tromey.com>
8543
8544         * mi/mi-cmd-env.c (env_execute_cli_command): Use
8545         gdb::unique_xmalloc_ptr.
8546
8547 2017-09-03  Tom Tromey  <tom@tromey.com>
8548
8549         * thread.c (print_thread_info_1): Use string_printf.
8550         (thread_apply_command, thread_apply_all_command): Use
8551         std::string.
8552
8553 2017-09-03  Tom Tromey  <tom@tromey.com>
8554
8555         * valprint.c (val_print_string): Update.
8556         * gdbcore.h (memory_error_message): Return std::string.
8557         * corefile.c (memory_error_message): Return std::string.
8558         (memory_error): Update.
8559         * breakpoint.c (insert_bp_location): Update.
8560
8561 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
8562
8563         * target/waitstatus.h (target_waitstatus_to_string): Change
8564         return type to std::string.
8565         * target/waitstatus.c (target_waitstatus_to_string): Return
8566         std::string.
8567         * target.h (target_waitstatus_to_string): Remove declaration.
8568         * infrun.c (resume, clear_proceed_status_thread,
8569         print_target_wait_results, do_target_wait, save_waitstatus,
8570         stop_all_threads): Adjust.
8571         * record-btrace.c (record_btrace_wait): Adjust.
8572         * target-debug.h
8573         (target_debug_print_struct_target_waitstatus_p): Adjust.
8574
8575 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
8576
8577         PR gdb/22046
8578         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
8579         detection.
8580
8581 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
8582
8583         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
8584         for setting/unsetting environment variables on the remote target.
8585         (New remote packets): Add entries for QEnvironmentHexEncoded,
8586         QEnvironmentUnset and QEnvironmentReset.
8587         * common/environ.c (gdb_environ::operator=): Extend method to
8588         handle m_user_set_env_list and m_user_unset_env_list.
8589         (gdb_environ::clear): Likewise.
8590         (match_var_in_string): Change type of first parameter from 'char
8591         *' to 'const char *'.
8592         (gdb_environ::set): Extend method to handle
8593         m_user_set_env_list and m_user_unset_env_list.
8594         (gdb_environ::unset): Likewise.
8595         (gdb_environ::clear_user_set_env): New method.
8596         (gdb_environ::user_set_envp): Likewise.
8597         (gdb_environ::user_unset_envp): Likewise.
8598         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
8599         m_user_unset_env_list on move constructor/assignment.
8600         (unset): Add new default parameter 'update_unset_list = true'.
8601         (clear_user_set_env): New method.
8602         (user_set_envp): Likewise.
8603         (user_unset_envp): Likewise.
8604         (m_user_set_env_list): New std::set.
8605         (m_user_unset_env_list): Likewise.
8606         * common/rsp-low.c (hex2str): New function.
8607         (bin2hex): New overload for bin2hex function.
8608         * common/rsp-low.c (hex2str): New prototype.
8609         (str2hex): New overload prototype.
8610         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
8611         QEnvironmentUnset and QEnvironmentReset.
8612         (remote_protocol_features): Add QEnvironmentHexEncoded,
8613         QEnvironmentUnset and QEnvironmentReset packets.
8614         (send_environment_packet): New function.
8615         (extended_remote_environment_support): Likewise.
8616         (extended_remote_create_inferior): Call
8617         extended_remote_environment_support.
8618         (_initialize_remote): Add QEnvironmentHexEncoded,
8619         QEnvironmentUnset and QEnvironmentReset packet configs.
8620         * unittests/environ-selftests.c (gdb_selftest_env_var):
8621         New variable.
8622         (test_vector_initialization): New function.
8623         (test_init_from_host_environ): Likewise.
8624         (test_reinit_from_host_environ): Likewise.
8625         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
8626         Likewise.
8627         (test_unset_set_empty_vector): Likewise.
8628         (test_vector_clear): Likewise.
8629         (test_std_move): Likewise.
8630         (test_move_constructor):
8631         (test_self_move): Likewise.
8632         (test_set_unset_reset): Likewise.
8633         (run_tests): Rewrite in terms of the functions above.
8634
8635 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
8636
8637         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
8638         (adi_available): Use a temp variable of type CORE_ADDR as argument
8639         3 when calling target_auxv_search.
8640         (adi_normalize_address): Use masks and xor operators to calculate
8641         normalized address.
8642         (adi_read_versions, adi_write_versions, adi_print_versions)
8643         (do_examine, do_assign): Use paddress.
8644
8645 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
8646
8647         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
8648         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
8649         out of loop and add supply of FIR.
8650         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
8651         add collect of FIR.
8652
8653 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
8654
8655         PR gdb/21827
8656         * cli/cli-script.c (define_command): Don't convert command name
8657         to lower case.
8658
8659 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
8660
8661         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
8662         Update all callers accordingly. Remove all code blocks handling
8663         the case where DISPP is not NULL.
8664
8665 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
8666
8667         PR symtab/22003
8668         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
8669         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8670         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
8671
8672 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
8673
8674         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
8675         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
8676         (read_comp_units_from_section): New parameter abbrev_section, use
8677         read_and_check_comp_unit_head, allocate signatured_type if needed.
8678         (create_all_comp_units): Update read_comp_units_from_section caller.
8679
8680 2017-08-23  Pedro Alves  <palves@redhat.com>
8681
8682         PR remote/21852
8683         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
8684         to null_ptid and switch to thread without reading the registers
8685         after adding the inferior.
8686
8687 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
8688
8689         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
8690         compile-gcc.
8691         * compile/compile.c (compile_gcc, show_compile_gcc): New.
8692         (compile_to_object): Implement compile_gcc.
8693         (_initialize_compile): Install "set compile-gcc".  Initialize
8694         compile_gcc.
8695
8696 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
8697
8698         * compile/compile.c (compile_to_object): Conditionally call
8699         set_verbose.  Conditionally call compile or compile_v0.
8700
8701 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
8702
8703         * sparc64-tdep.h: (adi_normalize_address): New export.
8704         * sparc-nat.h: (open_adi_tag_fd): New export.
8705         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
8706         * sparc64-linux-tdep.c:
8707         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
8708         (sparc64_linux_handle_segmentation_fault): New function.
8709         (sparc64_linux_init_abi): Register
8710         sparc64_linux_handle_segmentation_fault
8711         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
8712         (sparc64_addr_bits_remove): New function.
8713         (sparc64_init_abi): Register sparc64_addr_bits_remove.
8714         (MAX_PROC_NAME_SIZE): New macro.
8715         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
8716         (sparc64adilist): New variable.
8717         (adi_proc_list): New variable.
8718         (find_adi_info): New function.
8719         (add_adi_info): New function.
8720         (get_adi_info_proc): New function.
8721         (get_adi_info): New function.
8722         (info_adi_command): New function.
8723         (read_maps_entry): New function.
8724         (adi_available): New function.
8725         (adi_normalize_address): New function.
8726         (adi_align_address): New function.
8727         (adi_convert_byte_count): New function.
8728         (adi_tag_fd): New function.
8729         (adi_is_addr_mapped): New function.
8730         (adi_read_versions): New function.
8731         (adi_write_versions): New function.
8732         (adi_print_versions): New function.
8733         (do_examine): New function.
8734         (do_assign): New function.
8735         (adi_examine_command): New function.
8736         (adi_assign_command): New function.
8737         (_initialize_sparc64_adi_tdep): New function.
8738
8739 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
8740
8741         * breakpoint.c (breakpoints_info): Rename to ...
8742         (info_breakpoints_command): ... this.
8743         (watchpoints_info): Rename to ...
8744         (info_watchpoints_command): ... this.
8745         (tracepoints_info): Rename to ...
8746         (info_tracepoints_command): ... this.
8747         (_initialize_breakpoint): Adjust.
8748         * dcache.c (dcache_info): Rename to ...
8749         (info_display_command): ... this.
8750         (_initialize_dcache): Adjust.
8751         * frame.h (args_info): Rename to ...
8752         (info_args_command): ... this.
8753         (locals_info): Rename to ...
8754         (info_locals_command): ... this.
8755         * infcmd.c (nofp_registers_info): Rename to ...
8756         (info_registers_command): ... this.
8757         (float_info): Rename to ...
8758         (info_float_command): ... this.
8759         (program_info): Rename to ...
8760         (info_program_command): ... this.
8761         (all_registers_info): Rename to ...
8762         (info_all_registers_command): ... this.
8763         (vector_info): Rename to ...
8764         (info_vector_command): ... this.
8765         (float_info): Rename to ...
8766         (info_float_command): ... this.
8767         (_initialize_infcmd): Adjust.
8768         * inferior.h (term_info): Rename to ...
8769         (info_terminal_command): ... this.
8770         * inflow.c (term_info): Rename to ...
8771         (info_terminal_command): ... this.
8772         (_initialize_inflow): Adjust.
8773         * infrun.c (signals_info): Rename to ...
8774         (info_signals_command): ... this.
8775         (_initialize_infrun): Adjust.
8776         * objc-lang.c (classes_info): Rename to ...
8777         (info_classes_command): ... this.
8778         (selectors_info): Rename to ...
8779         (info_selectors_command): ... this.
8780         (_initialize_objc_language): Adjust.
8781         * printcmd.c (sym_info): Rename to ...
8782         (info_symbol_command): ... this.
8783         (address_info): Rename to ...
8784         (info_address_command): ... this.
8785         (display_info): Rename to ...
8786         (info_display_command): ... this.
8787         (_initialize_printcmd): Adjust.
8788         * reverse.c (bookmarks_info): Rename to ...
8789         (info_breakpoints_command): ... this.
8790         (_initialize_reverse): Adjust.
8791         * ser-go32.c (dos_info): Rename to ...
8792         (info_serial_command): ... this.
8793         (_initialize_ser_dos): Adjust.
8794         * skip.c (skip_info): Rename to ...
8795         (info_skip_command): ... this.
8796         (_initialize_step_skip): Adjust.
8797         * source.c (line_info): Rename to ...
8798         (info_line_command): ... this.
8799         (source_info): Rename to ...
8800         (info_source_command)
8801         * stack.c (frame_info): Rename to ...
8802         (info_frame_command): ... this.
8803         (locals_info): Rename to ...
8804         (info_locals_command): ... this.
8805         (args_info): Rename to ...
8806         (info_args_command): ... this.
8807         (_initialize_stack): Adjust.
8808         * symtab.c (sources_info): Rename to ...
8809         (info_sources_command): ... this.
8810         (variables_info): Rename to ...
8811         (info_variables_command): ... this.
8812         (functions_info): Rename to ...
8813         (info_functions_command): ... this.
8814         (types_info): Rename to ...
8815         (info_types_command): ... this.
8816         (_initialize_symtab): Adjust.
8817         * target.c (target_info): Rename to ...
8818         (info_target_command): ... this.
8819         (initialize_targets): Adjust.
8820         * tracepoint.c (tvariables_info): Rename to ...
8821         (info_tvariables_command): ... this.
8822         (scope_info): Rename to ...
8823         (info_scope_command): ... this.
8824         (trace_dump_actions): Adjust.
8825         (_initialize_tracepoint): Adjust.
8826
8827 2017-08-22  Tom Tromey  <tom@tromey.com>
8828
8829         * breakpoint.h (install_breakpoint): Update.
8830         * breakpoint.c (add_solib_catchpoint): Update.
8831         (install_breakpoint): Change argument to a std::unique_ptr.
8832         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
8833         (create_breakpoint_sal, create_breakpoint): Update.
8834         (watch_command_1, catch_exec_command_1)
8835         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
8836         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
8837         Return the breakpoint.
8838         (set_raw_breakpoint_without_location, set_raw_breakpoint)
8839         (new_single_step_breakpoint): Update.
8840         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
8841         std::unique_ptr.
8842         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8843         std::unique_ptr.
8844         * break-catch-sig.c (create_signal_catchpoint): Use
8845         std::unique_ptr.
8846         * ada-lang.c (create_ada_exception_catchpoint): Use
8847         std::unique_ptr.
8848
8849 2017-08-22  Tom Tromey  <tom@tromey.com>
8850
8851         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
8852
8853 2017-08-22  Tom Tromey  <tom@tromey.com>
8854
8855         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
8856         (lookup_partial_symbol): Update.
8857
8858 2017-08-22  Tom Tromey  <tom@tromey.com>
8859
8860         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
8861         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
8862         (find_and_open_source, symtab_to_fullname): Update.
8863         * psymtab.c (psymtab_to_fullname): Update.
8864
8865 2017-08-22  Tom Tromey  <tom@tromey.com>
8866
8867         * exec.c (exec_file_attach): Update.
8868         * linux-thread-db.c (try_thread_db_load): Update.
8869         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
8870         * utils.c (gdb_realpath): Change return type.
8871         (gdb_realpath_keepfile): Update.
8872         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
8873         (_initialize_utils): Register the new self test.
8874         * source.c (openp): Update.
8875         (find_and_open_source): Update.
8876         * nto-tdep.c (nto_find_and_open_solib): Update.
8877         * main.c (set_gdb_data_directory): Update.
8878         (captured_main_1): Update.
8879         * dwarf2read.c (dwarf2_get_dwz_file): Update
8880         (dw2_map_symbol_filenames): Update.
8881         * auto-load.c (auto_load_safe_path_vec_update): Update.
8882         (filename_is_in_auto_load_safe_path_vec): Change type of
8883         "filename_realp".
8884         (auto_load_objfile_script): Update.
8885         (file_is_auto_load_safe): Update.  Use std::string.
8886         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
8887
8888 2017-08-22  Tom Tromey  <tom@tromey.com>
8889
8890         * utils.c (gdb_realpath_keepfile): Return a
8891         gdb::unique_xmalloc_ptr.
8892         * exec.c (exec_file_attach): Update.
8893         * utils.h (gdb_realpath_keepfile): Return a
8894         gdb::unique_xmalloc_ptr.
8895
8896 2017-08-22  Tom Tromey  <tom@tromey.com>
8897
8898         * compile/compile.c (compile_file_command): Use
8899         gdb::unique_xmalloc_ptr, std::string.
8900         * utils.c (gdb_abspath): Change return type.
8901         * source.c (openp): Update.
8902         * objfiles.c (allocate_objfile): Update.
8903         * main.c (set_gdb_data_directory): Update.
8904         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
8905
8906 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
8907
8908         * cli-cmds.c (list_commands): List actual code around more than
8909         one location.
8910
8911 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
8912
8913         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
8914
8915 2017-08-21  Pedro Alves  <palves@redhat.com>
8916
8917         PR gdb/19487
8918         * c-exp.y (variable production): Handle function aliases.
8919         * minsyms.c (msymbol_is_text): New function.
8920         * minsyms.h (msymbol_is_text): Declare.
8921         * symtab.c (find_function_alias_target): New function.
8922         * symtab.h (find_function_alias_target): Declare.
8923
8924 2017-08-21  Pedro Alves  <palves@redhat.com>
8925
8926         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
8927         typedefs.
8928         * typeprint.c (whatis_exp): If handling "whatis", and expression
8929         is OP_TYPE, strip one typedef level.  Otherwise don't strip
8930         typedefs here.
8931         * valops.c (value_cast): Save "to" type before resolving
8932         stubs/typedefs.  Use that type as resulting value's type.
8933
8934 2017-08-18  Tom Tromey  <tom@tromey.com>
8935             Pedro Alves  <palves@redhat.com>
8936
8937         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
8938         * sol-thread.c (sol_thread_resume, sol_thread_wait)
8939         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
8940         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
8941         * proc-service.c (ps_xfer_memory): Use scoped_restore.
8942         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
8943         (linux_get_siginfo_data): Add "thread" argument.  Use
8944         scoped_restore.
8945         * linux-nat.c (linux_child_follow_fork)
8946         (check_stopped_by_watchpoint): Use scoped_restore.
8947         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
8948         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
8949         (restore_inferior_ptid, save_inferior_ptid): Remove.
8950         * btrace.c (btrace_fetch): Use scoped_restore.
8951         * bsd-uthread.c (bsd_uthread_fetch_registers)
8952         (bsd_uthread_store_registers): Use scoped_restore.
8953         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
8954         scoped_restore.
8955         * aix-thread.c (aix_thread_resume, aix_thread_wait)
8956         (aix_thread_xfer_partial): Use scoped_restore.
8957         * inferior.h (save_inferior_ptid): Remove.
8958
8959 2017-08-18  Yao Qi  <yao.qi@linaro.org>
8960
8961         PR tdep/21818
8962         * arm-tdep.c (gdb_print_insn_arm): Mark
8963         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
8964
8965 2017-08-18  Yao Qi  <yao.qi@linaro.org>
8966
8967         * NEWS: Mention GDBserver's new option "--selftest".
8968         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
8969         * selftest.c: Move it to common/selftest.c.
8970         * selftest.h: Move it to common/selftest.h.
8971         * selftest-arch.c (reset): New function.
8972         (tests_with_arch): Call reset.
8973
8974 2017-08-18  Yao Qi  <yao.qi@linaro.org>
8975
8976         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
8977         instead of exception_fprintf and printf_filtered.
8978
8979 2017-08-18  Yao Qi  <yao.qi@linaro.org>
8980
8981         * selftest.c (register_self_test): Rename it to
8982         selftests::register_test.
8983         (run_self_tests): selftest::run_tests.
8984         * selftest.h: Update declarations.
8985         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
8986         selftests::register_test_foreach_arch.
8987         * selftest-arch.h: Update declaration.
8988         * aarch64-tdep.c: Update.
8989         * arm-tdep.c: Likewise.
8990         * disasm-selftests.c: Likewise.
8991         * dwarf2loc.c: Likewise.
8992         * dwarf2-frame.c: Likewise.
8993         * findvar.c: Likewise.
8994         * gdbarch-selftests.c: Likewise.
8995         * maint.c (maintenance_selftest): Likewise.
8996         * regcache.c: Likewise.
8997         * rust-exp.y: Likewise.
8998         * selftest-arch.c: Likewise.
8999         * unittests/environ-selftests.c: Likewise.
9000         * unittests/function-view-selftests.c: Likewise.
9001         * unittests/offset-type-selftests.c: Likewise.
9002         * unittests/optional-selftests.c: Likewise.
9003         * unittests/scoped_restore-selftests.c: Likewise.
9004         * utils-selftests.c: Likewise.
9005
9006 2017-08-17  Pedro Alves  <palves@redhat.com>
9007
9008         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
9009         local.
9010
9011 2017-08-17  Pedro Alves  <palves@redhat.com>
9012
9013         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
9014         field.
9015         (reset_die_in_process): Delete, replaced by ...
9016         (process_die_scope): ... this new class.  Make it responsible for
9017         freeing cu->line_header too.
9018         (process_die): Use process_die_scope.
9019         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
9020         cu->line_header_die_owner.  Don't release the line header if it's
9021         owned by the CU.
9022         (setup_type_unit_groups): Make the CU/DIE own the line header.
9023         Don't release the line header here.
9024
9025 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
9026
9027         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
9028
9029 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
9030
9031         * NEWS: Mention new shortcuts for nexti and stepi in TUI
9032         Single-Key mode
9033
9034 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
9035
9036         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
9037         mode command list.
9038
9039 2017-08-15  Stafford Horne  <shorne@gmail.com>
9040
9041         * MAINTAINERS (Write After Approval): Add Stafford Horne.
9042
9043 2017-08-15  Stafford Horne  <shorne@gmail.com>
9044
9045         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
9046
9047 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
9048
9049         PR gdb/21954
9050         * infcmd.c (unset_environment_command): Use the 'clear' method on
9051         the environment instead of resetting it.
9052
9053 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
9054
9055         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
9056         platforms.
9057
9058 2017-08-14  Tom Tromey  <tom@tromey.com>
9059
9060         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
9061         (print_binary_chars): Likewise.
9062         (BITS_IN_BYTES): Remove.
9063
9064 2017-08-14  Tom Tromey  <tom@tromey.com>
9065
9066         PR gdb/21675
9067         * valprint.c (LOW_ZERO): Change value to 034.
9068         (print_octal_chars): Add static_asserts for octal constants.
9069         * printcmd.c (print_scalar_formatted): Add 'd' case.
9070
9071 2017-08-11  Tom Tromey  <tom@tromey.com>
9072
9073         * symfile.c (add_symbol_file_command): Use std::vector.
9074
9075 2017-08-14  Tom Tromey  <tom@tromey.com>
9076
9077         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
9078         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9079         std::move.
9080         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
9081
9082 2017-08-11  Pedro Alves  <palves@redhat.com>
9083
9084         * infrun.c (process_event_stop_test): Adjust
9085         function_name_is_marked_for_skip call.
9086         * skip.c: Include <list>.
9087         (skiplist_entry): Make it a class with private fields, and
9088         getters/setters.
9089         (skiplist_entry_chain): Delete.
9090         (skiplist_entries): New.
9091         (skiplist_entry_count): Delete.
9092         (highest_skiplist_entry_num): New.
9093         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
9094         (add_skiplist_entry): Delete.
9095         (skiplist_entry::skiplist_entry): New.
9096         (skiplist_entry::add_entry): New.
9097         (skip_file_command, skip_function): Adjust.
9098         (compile_skip_regexp): Delete.
9099         (skip_command): Don't compile regexp here.  Adjust to use
9100         skiplist_entry::add_entry.
9101         (skip_info): Adjust to use range-for and getters.
9102         (skip_enable_command, skip_disable_command): Adjust to use
9103         range-for and setters.
9104         (skip_delete_command): Adjust to use std::list.
9105         (add_skiplist_entry): Delete.
9106         (skip_file_p): Delete, refactored as ...
9107         (skiplist_entry::do_skip_file_p): ... this new method.
9108         (skip_gfile_p): Delete, refactored as ...
9109         (skiplist_entry::do_gskip_file_p): ... this new method.
9110         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
9111         (skiplist_entry::skip_function_p): ... this new method.
9112         (function_name_is_marked_for_skip): Now returns bool, and takes
9113         the function sal by const reference.  Adjust to use range-for and
9114         skiplist_entry methods.
9115         (_initialize_step_skip): Remove references to
9116         skiplist_entry_chain, skiplist_entry_count.
9117         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
9118         takes the function sal by const reference.
9119
9120 2017-08-11  Yao Qi  <yao.qi@linaro.org>
9121
9122         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
9123         (dwarf2_frame_cache): Remove reset_cache_cleanup.
9124         (dwarf2_frame_cache):
9125         * frame-unwind.c (frame_unwind_try_unwinder): Catch
9126         RETURN_MASK_ALL and set *this_case to NULL.
9127         * frame-unwind.h: Update comments.
9128
9129 2017-08-11  Yao Qi  <yao.qi@linaro.org>
9130
9131         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
9132         (dwarf2_frame_state_copy_regs): Remove.
9133         (dwarf2_frame_state_free_regs): Remove.
9134         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
9135         (dwarf2_restore_rule): Call method .alloc_regs instead of
9136         dwarf2_frame_state_alloc_regs.
9137         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
9138         constructor.  Call std::move.
9139         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
9140         (dwarf2_frame_cache): Likewise.
9141
9142         [GDB_SELF_TEST]: Include selftest.h and
9143         selftest-arch.h.
9144         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
9145         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
9146         execute_cfa_program_test.
9147
9148         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
9149         copy ctor, assignment operator, move assignment.
9150         <alloc_regs>: New method.
9151         <swap>: New method.
9152         (struct dwarf2_frame_state): Delete dtor.
9153         (dwarf2_frame_state_alloc_regs): Remove declaration.
9154         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
9155         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
9156
9157 2017-08-11  Yao Qi  <yao.qi@linaro.org>
9158
9159         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
9160         (dwarf2_frame_state::dwarf2_frame_state): New.
9161         (dwarf2_frame_state::~dwarf2_frame_state): New.
9162         (dwarf2_fetch_cfa_info): Update.
9163         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
9164         rather than a pointer.  Update code.
9165         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
9166         dtor.
9167         <data_align, code_align, retaddr_column>: Change them to const.
9168         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
9169         to bool.
9170
9171 2017-08-11  Yao Qi  <yao.qi@linaro.org>
9172
9173         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
9174         <loc.exp>: New field.
9175         * dwarf2-frame.c (execute_cfa_program): Update.
9176         (dwarf2_frame_prev_register): Update.
9177
9178 2017-08-10  Pedro Alves  <palves@redhat.com>
9179
9180         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
9181
9182 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
9183
9184         * fbsd-nat.c (struct fbsd_fork_info): Remove.
9185         (fbsd_pending_children): Use std::list.
9186         (fbsd_remember_child): Likewise.
9187         (fbsd_is_child_pending): Likewise.
9188         (fbsd_pending_vfork_done): Use std::forward_list.
9189         (fbsd_add_vfork_done): Likewise.
9190         (fbsd_is_vfork_done_pending): Likewise.
9191         (fbsd_next_vfork_done): Likewise.
9192
9193 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
9194
9195         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
9196         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
9197         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
9198         for `mapfilename'.
9199         (fbsd_xfer_partial): Use gdb::byte_vector.
9200         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
9201
9202 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
9203
9204         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
9205         "filestuff.h".
9206         (fbsd_find_memory_regions): Fix `mapfile' initialization.
9207
9208 2017-08-09  Tom Tromey  <tom@tromey.com>
9209
9210         * skip.c (skiplist_entry): New constructor.
9211         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
9212         (skiplist_entry::file_is_glob): Now bool.
9213         (skiplist_entry::file, skiplist_entry::function): Now
9214         std::string.
9215         (make_skip_entry): Return a unique_ptr.  Use new.
9216         (free_skiplist_entry, free_skiplist_entry_cleanup)
9217         (make_free_skiplist_entry_cleanup): Remove.
9218         (skip_command, skip_disable_command, add_skiplist_entry)
9219         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
9220         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
9221         (function_name_is_marked_for_skip): Update.
9222         (skip_delete_command): Update.  Use delete.
9223
9224 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
9225
9226         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
9227         (aarch64_linux_core_read_description): New function.
9228         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
9229
9230 2017-08-09  Pedro Alves  <palves@redhat.com>
9231
9232         * cp-name-parser.y (cp_comp_to_string): Return a
9233         gdb::unique_xmalloc_ptr<char>.
9234         * cp-support.c (replace_typedefs_qualified_name)
9235         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
9236         (cp_canonicalize_string_full): Use op= instead of explicit
9237         convertion.
9238         (cp_class_name_from_physname, method_name_from_physname)
9239         (cp_func_name, cp_remove_params): Adjust to use
9240         gdb::unique_xmalloc_ptr<char>.
9241         * cp-support.h (cp_comp_to_string): Return a
9242         gdb::unique_xmalloc_ptr<char>.
9243         * python/py-type.c (typy_lookup_type): Adjust to use
9244         gdb::unique_xmalloc_ptr<char>.
9245
9246 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
9247
9248         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
9249
9250 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
9251             Yao Qi  <yao.qi@linaro.org>
9252
9253         * cp-support.c (cp_canonicalize_string_full): Use
9254         gdb::unique_xmalloc_ptr<char>.
9255         (cp_canonicalize_string): Likewise.
9256
9257 2017-08-09  Yao Qi  <yao.qi@linaro.org>
9258
9259         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
9260         * regformats/i386/amd64-avx-avx512.dat: Remove.
9261         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
9262         * regformats/i386/amd64-avx-mpx.dat:Remove.
9263         * regformats/i386/amd64-avx.dat: Remove.
9264         * regformats/i386/amd64-mpx.dat: Remove.
9265         * regformats/i386/i386-avx-avx512.dat: Remove.
9266         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
9267         * regformats/i386/i386-avx-mpx.dat: Remove.
9268         * regformats/i386/i386-mmx.dat: Remove.
9269         * regformats/i386/i386-mpx.dat: Remove.
9270
9271 2017-08-09  Yao Qi  <yao.qi@linaro.org>
9272
9273         * amd64-tdep.h (tdesc_x32): Remove the declaration.
9274         * amd64-tdep.c: Don't include features/i386/x32*.c.
9275         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
9276         functions.
9277         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
9278         and i386/x32-avx-avx512.
9279         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
9280         and i386/x32.xml.
9281         * features/i386/x32-avx-avx512.c: Removed.
9282         * features/i386/x32-avx-avx512.xml: Removed.
9283         * features/i386/x32-avx.c: Removed.
9284         * features/i386/x32-avx.xml: Removed.
9285         * features/i386/x32.c: Removed.
9286         * features/i386/x32.xml: Removed.
9287         * regformats/i386/x32-avx-avx512.dat: Removed.
9288         * regformats/i386/x32-avx.dat: Removed.
9289         * regformats/i386/x32.dat: Removed.
9290
9291 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
9292
9293         PR breakpoints/21886
9294         * mem-break.c (default_memory_insert_breakpoint): Use
9295         `->placed_address' rather than `->reqstd_address' for the
9296         breakpoint location.
9297
9298 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
9299
9300         * arch-utils.c (default_print_insn): Remove arch/mach/endian
9301         assertions.
9302
9303 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
9304
9305         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
9306         a union of `tdep_info', `tdesc_data' and `id'.
9307         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
9308         rather than `info.tdep_info'.
9309         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
9310         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9311         * i386-tdep.c (i386_gdbarch_init): Likewise.
9312         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
9313         * mips-tdep.c (mips_gdbarch_init): Likewise.
9314         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9315         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9316         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
9317         `info.tdep_info'.
9318         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
9319         `info.tdep_info'.
9320         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9321         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
9322         `info.tdep_info'.
9323         * spu-tdep.c (spu_gdbarch_init): Likewise.
9324         * gdbarch.h: Regenerate.
9325
9326 2017-08-07  Leszek Swirski  <leszeks@google.com>
9327
9328         PR symtab/20899
9329         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
9330
9331 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
9332
9333         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
9334         (gdbsim_open): Rename gdb_argv args object to argv.
9335
9336 2017-08-05  Tom Tromey  <tom@tromey.com>
9337
9338         * compile/compile-object-load.c (compile_object_load): Use
9339         gdb::unique_xmalloc_ptr.
9340         * cli/cli-dump.c (scan_filename): Rename from
9341         scan_filename_with_cleanup.  Change return type.
9342         (scan_expression): Rename from scan_expression_with_cleanup.
9343         Change return type.
9344         (dump_memory_to_file, dump_value_to_file, restore_command):
9345         Use gdb::unique_xmalloc_ptr.  Update.
9346         * cli/cli-cmds.c (find_and_open_script): Use
9347         gdb::unique_xmalloc_ptr.
9348         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
9349         * symmisc.c (maintenance_print_symbols)
9350         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
9351         * symfile.c (symfile_bfd_open, generic_load)
9352         (add_symbol_file_command, remove_symbol_file_command): Use
9353         gdb::unique_xmalloc_ptr.
9354         * source.c (openp): Use gdb::unique_xmalloc_ptr.
9355         * psymtab.c (maintenance_print_psymbols): Use
9356         gdb::unique_xmalloc_ptr.
9357         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
9358         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
9359         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
9360         (reload_shared_libraries_1): Likewise.
9361
9362 2017-08-05  Tom Tromey  <tom@tromey.com>
9363
9364         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
9365         (rust_op_vector, rust_set_vector): New typedefs.
9366         (current_parser): New global.
9367         (work_obstack): Change to pointer type.  Update all users.
9368         (rust_ast, pstate): Remove globals.
9369         (struct rust_parser): New.
9370         (%union) <params, field_inits>: Change type.
9371         (start, tuple_expr, unit_expr, struct_expr_list, literal)
9372         (field_expr, expr_list, maybe_expr_list, type_list): Update.
9373         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
9374         (convert_params_to_types, convert_params_to_expression): Change
9375         type of "params".
9376         (ast_string): Change type of "fields".
9377         (rust_parse): Make a rust_parser.  Remove cleanups.
9378         (rust_lex_tests): Make and install an auto_obstack.
9379
9380 2017-08-04  Yao Qi  <yao.qi@linaro.org>
9381
9382         * configure.srv (ipa_x32_linux_regobj): New.
9383         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
9384         instead of X86_TDESC_AVX512.
9385         (initialize_low_tracepoint): Call
9386         init_registers_x32_avx_avx512_linux.
9387
9388 2017-08-04  Yao Qi  <yao.qi@linaro.org>
9389
9390         * utils.h (gdb_argv): Add namespace std for nullptr_t.
9391
9392 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
9393
9394         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
9395
9396 2017-08-03  Tom Tromey  <tom@tromey.com>
9397
9398         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
9399         Remove.
9400         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
9401
9402 2017-08-03  Tom Tromey  <tom@tromey.com>
9403
9404         * python/py-param.c (compute_enum_values): Use gdb_argv.
9405
9406 2017-08-03  Tom Tromey  <tom@tromey.com>
9407
9408         * utils.h (struct gdb_argv_deleter): New.
9409         (gdb_argv): New class.
9410         * utils.c (gdb_argv::reset): New method.
9411         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
9412         * tracefile.c (tsave_command): Use gdb_argv.
9413         * top.c (new_ui_command): Use gdb_argv.
9414         * symmisc.c (maintenance_print_symbols)
9415         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
9416         * symfile.c (symbol_file_command, generic_load)
9417         (remove_symbol_file_command): Use gdb_argv.
9418         * stack.c (backtrace_command): Use gdb_argv.
9419         * source.c (add_path, show_substitute_path_command)
9420         (unset_substitute_path_command, set_substitute_path_command):
9421         Use gdb_argv.
9422         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
9423         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
9424         * remote.c (extended_remote_run, remote_put_command)
9425         (remote_get_command, remote_delete_command): Use gdb_argv.
9426         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
9427         (gdbsim_open): Use gdb_argv.
9428         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
9429         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
9430         * procfs.c (procfs_info_proc): Use gdb_argv.
9431         * interps.c (interpreter_exec_cmd): Use gdb_argv.
9432         * infrun.c (handle_command): Use gdb_argv.
9433         * inferior.c (add_inferior_command, clone_inferior_command):
9434         Use gdb_argv.
9435         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
9436         * exec.c (exec_file_command): Use gdb_argv.
9437         * cli/cli-cmds.c (alias_command): Use gdb_argv.
9438         * compile/compile.c (build_argc_argv): Use gdb_argv.
9439
9440 2017-08-03  Tom Tromey  <tom@tromey.com>
9441
9442         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
9443
9444 2017-08-03  Tom Tromey  <tom@tromey.com>
9445
9446         * python/python.c (compute_python_string): Return std::string.
9447         (gdbpy_eval_from_control_command): Update.
9448         (do_start_initialization): Use std::string.
9449         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
9450         xstrprintf.
9451         * python/py-breakpoint.c (local_setattro): Use string_printf, not
9452         xstrprintf.
9453
9454 2017-08-03  Tom Tromey  <tom@tromey.com>
9455
9456         * top.h (do_restore_instream_cleanup): Remove.
9457         * top.c (do_restore_instream_cleanup): Remove.
9458         (read_command_file): Use scoped_restore.
9459         * cli/cli-script.c (execute_user_command): Use scoped_restore.
9460
9461 2017-08-03  Tom Tromey  <tom@tromey.com>
9462
9463         * cli/cli-script.c (execute_user_command)
9464         (execute_control_command): Use scoped_restore.
9465
9466 2017-08-03  Tom Tromey  <tom@tromey.com>
9467
9468         * cli/cli-script.c (do_restore_user_call_depth): Remove.
9469         (execute_user_command): Remove user_call_depth; use
9470         user_args_stack's size instead.
9471
9472 2017-08-03  Tom Tromey  <tom@tromey.com>
9473
9474         * top.h (in_user_command): Remove.
9475         * top.c (in_user_command): Remove.
9476         * cli/cli-script.c (do_restore_user_call_depth)
9477         (execute_user_command): Update.
9478
9479 2017-08-03  Tom Tromey  <tom@tromey.com>
9480
9481         * valops.c (search_struct_method): Use gdb::byte_vector.
9482         * valarith.c (value_concat): Use std::vector.
9483         * target.c (memory_xfer_partial): Use gdb::byte_vector.
9484         (simple_search_memory): Likewise.
9485         * printcmd.c (find_string_backward): Use gdb::byte_vector.
9486         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
9487         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
9488         * elfread.c (elf_rel_plt_read): Use std::string.
9489         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
9490         * cli/cli-dump.c (restore_section_callback): Use
9491         gdb::byte_vector.
9492
9493 2017-08-03  Tom Tromey  <tom@tromey.com>
9494
9495         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
9496
9497 2017-08-03  Tom Tromey  <tom@tromey.com>
9498
9499         * tui/tui-regs.c (tui_restore_gdbout): Remove.
9500         (tui_register_format): Use scoped_restore.
9501
9502 2017-08-03  Tom Tromey  <tom@tromey.com>
9503
9504         * reverse.c (exec_direction_default): Remove.
9505         (exec_reverse_once): Use scoped_restore.
9506         * remote.c (restore_remote_timeout): Remove.
9507         (remote_flash_erase, remote_flash_write, remote_flash_done)
9508         (readchar, remote_serial_write): Use scoped_restore.
9509         * cli/cli-script.c (struct source_cleanup_lines_args)
9510         (source_cleanup_lines): Remove.
9511         (script_from_file): Use scoped_restore.
9512         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
9513         (source_command): Use scoped_restore.
9514
9515 2017-08-03  Tom Tromey  <tom@tromey.com>
9516
9517         * utils.h (make_cleanup_free_so): Remove.
9518         * utils.c (do_free_so, make_cleanup_free_so): Remove.
9519         * solist.h (struct so_deleter): New.
9520         (so_list_up): New typedef.
9521         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
9522
9523 2017-08-03  Tom Tromey  <tom@tromey.com>
9524
9525         * utils.h (make_cleanup_restore_current_language): Remove.
9526         * utils.c (do_restore_current_language)
9527         (make_cleanup_restore_current_language): Remove.
9528         * parse.c (parse_exp_in_context_1)
9529         (parse_expression_with_language): Use
9530         scoped_restore_current_language.
9531         * mi/mi-main.c (mi_cmd_execute): Use
9532         scoped_restore_current_language.
9533         * language.h (scoped_restore_current_language): New class.
9534
9535 2017-08-03  Tom Tromey  <tom@tromey.com>
9536
9537         * compile/compile.c (cleanup_unlink_file): Remove.
9538         (compile_to_object): Use gdb::unlinker.
9539         (eval_compile_command): Likewise.
9540
9541 2017-08-03  Tom Tromey  <tom@tromey.com>
9542
9543         * utils.h (make_cleanup_fclose): Remove.
9544         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
9545
9546 2017-08-03  Tom Tromey  <tom@tromey.com>
9547
9548         * top.c (open_terminal_stream): Return gdb_file_up.
9549         (new_ui_command): Update.
9550
9551 2017-08-03  Tom Tromey  <tom@tromey.com>
9552
9553         * source.c (print_source_lines_base, forward_search_command)
9554         (reverse_search_command): Use gdb_file_up.
9555
9556 2017-08-03  Tom Tromey  <tom@tromey.com>
9557
9558         * fbsd-nat.c (fbsd_find_memory_regions): Update.
9559
9560 2017-08-03  Tom Tromey  <tom@tromey.com>
9561
9562         * cli/cli-cmds.c (find_and_open_script): Change return type.
9563         Remove "streamp" and "full_path" parameters.
9564         (source_script_with_search): Update.
9565         * auto-load.c (source_script_file): Update.
9566         * cli/cli-cmds.h (find_and_open_script): Change type.
9567         (open_script): New struct.
9568
9569 2017-08-03  Tom Tromey  <tom@tromey.com>
9570
9571         * xml-support.c (xml_fetch_content_from_file): Update.
9572         * ui-file.c (stdio_file::open): Update.
9573         * tracefile-tfile.c (tfile_start): Update.
9574         * remote.c (remote_file_put, remote_file_get): Update.
9575         * nat/linux-procfs.c (linux_proc_get_int)
9576         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
9577         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
9578         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
9579         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
9580         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
9581         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
9582         * linux-nat.c (linux_proc_pending_signals): Update.
9583         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
9584         (file_closer): Remove.
9585         * compile/compile.c (compile_to_object): Update.
9586         * common/filestuff.h (struct gdb_file_deleter): New.
9587         (gdb_file_up): New typedef.
9588         (gdb_fopen_cloexec): Change return type.
9589         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
9590         * cli/cli-dump.c (fopen_with_cleanup): Remove.
9591         (dump_binary_file, restore_binary_file): Update.
9592         * auto-load.c (auto_load_objfile_script_1): Update.
9593
9594 2017-08-03  Tom Tromey  <tom@tromey.com>
9595
9596         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
9597         (info_static_tracepoint_markers_command): Likewise.
9598         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
9599         * skip.c (skip_info): Use ui_out_emit_table.
9600         * progspace.c (print_program_space): Use ui_out_emit_table.
9601         * osdata.c (info_osdata): Use ui_out_emit_table.
9602         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
9603         ui_out_emit_table.
9604         * linux-thread-db.c (info_auto_load_libthread_db): Use
9605         ui_out_emit_table.
9606         * inferior.c (print_inferior): Use ui_out_emit_table.
9607         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
9608         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
9609         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
9610         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
9611         * ui-out.h (class ui_out_emit_table): New.
9612
9613 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
9614
9615         * mips-tdep.c (mips_fpu_type_str): New function.
9616         (mips_dump_tdep): Call it.
9617
9618 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
9619
9620         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
9621         `->mips_fpu_type'.
9622
9623 2017-07-31  Xavier Roirand  <roirand@adacore.com>
9624
9625         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
9626
9627 2017-07-27  Xavier Roirand  <roirand@adacore.com>
9628
9629         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
9630
9631 2017-07-26  Yao Qi  <yao.qi@linaro.org>
9632
9633         * cli/cli-cmds.c (maintenancechecklist): New variable.
9634         * gdbcmd.h (maintenancechecklist): Declare it.
9635         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
9636         Call i386_linux_read_description with different masks.
9637         * maint.c (maintenance_check_command): New function.
9638         (_initialize_maint_cmds): Call add_prefix_cmd.
9639         * target-descriptions.c (tdesc_reg): override operator != and ==.
9640         (tdesc_type): Likewise.
9641         (tdesc_feature): Likewise.
9642         (target_desc): Likewise.
9643         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
9644         (maintenance_check_xml_descriptions): New function.
9645         (_initialize_target_descriptions) Add command "xml-descriptions".
9646         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
9647
9648 2017-07-26  Yao Qi  <yao.qi@linaro.org>
9649
9650         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
9651         Include features/i386/32bit-*.c.
9652         (i386_linux_read_description): Generate target description if it
9653         doesn't exist.
9654         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
9655         functions.
9656         * features/i386/32bit-linux.c: Re-generated.
9657         * features/i386/32bit-sse.c: Likewise.
9658         * target-descriptions.c (print_c_feature::visit): Print code to
9659         set register number if needed.
9660         (print_c_feature) <m_next_regnum>: New field.
9661
9662 2017-07-26  Yao Qi  <yao.qi@linaro.org>
9663
9664         * features/Makefile (CFILES): Rename with TDESC_CFILES.
9665         (FEATURE_XMLFILES): New.
9666         (FEATURE_CFILES): New.
9667         New rules.
9668         (clean-cfiles): Remove generated c files.
9669         * features/i386/32bit-avx.c: Generated.
9670         * features/i386/32bit-avx512.c: Generated.
9671         * features/i386/32bit-core.c: Generated.
9672         * features/i386/32bit-linux.c: Generated.
9673         * features/i386/32bit-mpx.c: Generated.
9674         * features/i386/32bit-pkeys.c: Generated.
9675         * features/i386/32bit-sse.c: Generated.
9676         * target-descriptions.c: Include algorithm.
9677         (tdesc_element_visitor): Add method visit_end.
9678         (print_c_tdesc): Implement visit_end.
9679         (print_c_tdesc:: m_filename_after_features): Move it to
9680         protected.
9681         (print_c_feature): New class.
9682         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
9683         name starts with "i386/32bit-".
9684
9685 2017-07-26  Yao Qi  <yao.qi@linaro.org>
9686
9687         * target-descriptions.c (tdesc_element_visitor): New class.
9688         (tdesc_element): New class.
9689         (tdesc_reg): Inherit from tdesc_element.
9690         (tdesc_reg::accept): New function.
9691         (tdesc_type): Inherit from tdesc_element.
9692         (tdesc_type::accept): New function.
9693         (tdesc_feature): Inherit from tdesc_element.
9694         (tdesc_feature::accept): New function.
9695         (target_desc): Inherit from tdesc_element.
9696         (target_desc::target_desc): New.
9697         (target_desc::~target_desc): New.
9698         (target_desc::accept): New.
9699         (allocate_target_description): Use new.
9700         (free_target_description): Use delete.
9701         (print_c_tdesc): New class.
9702         (maint_print_c_tdesc_cmd): Adjust.
9703
9704         * features/aarch64.c: Re-generated.
9705         * features/arc-arcompact.c: Re-generated.
9706         * features/arc-v2.c: Re-generated.
9707         * features/arm/arm-with-iwmmxt.c: Re-generated.
9708         * features/arm/arm-with-m.c: Re-generated.
9709         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
9710         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
9711         * features/arm/arm-with-neon.c: Re-generated.
9712         * features/arm/arm-with-vfpv2.c: Re-generated.
9713         * features/arm/arm-with-vfpv3.c: Re-generated.
9714         * features/i386/amd64-avx-avx512.c: Re-generated.
9715         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9716         * features/i386/amd64-avx.c: Re-generated.
9717         * features/i386/amd64-avx-linux.c: Re-generated.
9718         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
9719         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9720         * features/i386/amd64-avx-mpx.c: Re-generated.
9721         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
9722         * features/i386/amd64.c: Re-generated.
9723         * features/i386/amd64-linux.c: Re-generated.
9724         * features/i386/amd64-mpx.c: Re-generated.
9725         * features/i386/amd64-mpx-linux.c: Re-generated.
9726         * features/i386/i386-avx-avx512.c: Re-generated.
9727         * features/i386/i386-avx-avx512-linux.c: Re-generated.
9728         * features/i386/i386-avx.c: Re-generated.
9729         * features/i386/i386-avx-linux.c: Re-generated.
9730         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
9731         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
9732         * features/i386/i386-avx-mpx.c: Re-generated.
9733         * features/i386/i386-avx-mpx-linux.c: Re-generated.
9734         * features/i386/i386.c: Re-generated.
9735         * features/i386/i386-linux.c: Re-generated.
9736         * features/i386/i386-mmx.c: Re-generated.
9737         * features/i386/i386-mmx-linux.c: Re-generated.
9738         * features/i386/i386-mpx.c: Re-generated.
9739         * features/i386/i386-mpx-linux.c: Re-generated.
9740         * features/i386/x32-avx-avx512.c: Re-generated.
9741         * features/i386/x32-avx-avx512-linux.c: Re-generated.
9742         * features/i386/x32-avx.c: Re-generated.
9743         * features/i386/x32-avx-linux.c: Re-generated.
9744         * features/i386/x32.c: Re-generated.
9745         * features/i386/x32-linux.c: Re-generated.
9746         * features/microblaze.c: Re-generated.
9747         * features/microblaze-with-stack-protect.c: Re-generated.
9748         * features/mips64-dsp-linux.c: Re-generated.
9749         * features/mips64-linux.c: Re-generated.
9750         * features/mips-dsp-linux.c: Re-generated.
9751         * features/mips-linux.c: Re-generated.
9752         * features/nds32.c: Re-generated.
9753         * features/nios2.c: Re-generated.
9754         * features/nios2-linux.c: Re-generated.
9755         * features/rs6000/powerpc-32.c: Re-generated.
9756         * features/rs6000/powerpc-32l.c: Re-generated.
9757         * features/rs6000/powerpc-403.c: Re-generated.
9758         * features/rs6000/powerpc-403gc.c : Re-generated.
9759         * features/rs6000/powerpc-405.c: Re-generated.
9760         * features/rs6000/powerpc-505.c: Re-generated.
9761         * features/rs6000/powerpc-601.c: Re-generated.
9762         * features/rs6000/powerpc-602.c: Re-generated.
9763         * features/rs6000/powerpc-603.c: Re-generated.
9764         * features/rs6000/powerpc-604.c: Re-generated.
9765         * features/rs6000/powerpc-64.c: Re-generated.
9766         * features/rs6000/powerpc-64l.c: Re-generated.
9767         * features/rs6000/powerpc-7400.c: Re-generated.
9768         * features/rs6000/powerpc-750.c: Re-generated.
9769         * features/rs6000/powerpc-860.c: Re-generated.
9770         * features/rs6000/powerpc-altivec32.c: Re-generated.
9771         * features/rs6000/powerpc-altivec32l.c: Re-generated.
9772         * features/rs6000/powerpc-altivec64.c: Re-generated.
9773         * features/rs6000/powerpc-altivec64l.c: Re-generated.
9774         * features/rs6000/powerpc-cell32l.c: Re-generated.
9775         * features/rs6000/powerpc-cell64l.c: Re-generated.
9776         * features/rs6000/powerpc-e500.c: Re-generated.
9777         * features/rs6000/powerpc-e500l.c: Re-generated.
9778         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
9779         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
9780         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
9781         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
9782         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
9783         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
9784         * features/rs6000/powerpc-vsx32.c: Re-generated.
9785         * features/rs6000/powerpc-vsx32l.c: Re-generated.
9786         * features/rs6000/powerpc-vsx64.c: Re-generated.
9787         * features/rs6000/powerpc-vsx64l.c: Re-generated.
9788         * features/rs6000/rs6000.c: Re-generated.
9789         * features/s390-linux32.c: Re-generated.
9790         * features/s390-linux32v1.c: Re-generated.
9791         * features/s390-linux32v2.c: Re-generated.
9792         * features/s390-linux64.c: Re-generated.
9793         * features/s390-linux64v1.c: Re-generated.
9794         * features/s390-linux64v2.c: Re-generated.
9795         * features/s390-te-linux64.c: Re-generated.
9796         * features/s390-tevx-linux64.c: Re-generated.
9797         * features/s390-vx-linux64.c: Re-generated.
9798         * features/s390x-linux64.c: Re-generated.
9799         * features/s390x-linux64v1.c: Re-generated.
9800         * features/s390x-linux64v2.c: Re-generated.
9801         * features/s390x-te-linux64.c: Re-generated.
9802         * features/s390x-tevx-linux64.c: Re-generated.
9803         * features/s390x-vx-linux64.c: Re-generated.
9804         * features/sparc/sparc32-solaris.c: Re-generated.
9805         * features/sparc/sparc64-solaris.c: Re-generated.
9806         * features/tic6x-c62x.c: Re-generated.
9807         * features/tic6x-c62x-linux.c: Re-generated.
9808         * features/tic6x-c64x.c: Re-generated.
9809         * features/tic6x-c64x-linux.c: Re-generated.
9810         * features/tic6x-c64xp.c: Re-generated.
9811         * features/tic6x-c64xp-linux.c: Re-generated.
9812
9813 2017-07-26  Yao Qi  <yao.qi@linaro.org>
9814
9815         * i386-linux-tdep.c (i386_linux_read_description): New function.
9816         (i386_linux_core_read_description): Call
9817         i386_linux_read_description.
9818         * i386-linux-tdep.h (i386_linux_read_description): Declare.
9819         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
9820         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
9821         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
9822         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
9823         * x86-linux-nat.c (x86_linux_read_description): Call
9824         i386_linux_read_description.
9825
9826 2017-07-26  Yao Qi  <yao.qi@linaro.org>
9827
9828         * NEWS: Mention it.
9829         * features/Makefile (%.c: %.xml): Pass the xml file name to
9830         command "maint print c-tdesc".
9831         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
9832         name from 'arg'.
9833
9834 2017-07-26  Yao Qi  <yao.qi@linaro.org>
9835
9836         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
9837         in-class initialization.
9838         (tdesc_create_feature): Call new instead of XCNEW.
9839         (free_target_description): Ue delete.
9840
9841 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
9842
9843         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
9844
9845 2017-07-25  Yao Qi  <yao.qi@linaro.org>
9846
9847         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
9848         constant.
9849         (amd64_x32_init_abi): Likewise.
9850         * amd64-tdep.h (amd64_init_abi): Update declaration.
9851         (amd64_x32_init_abi): Likewise.
9852
9853 2017-07-25  Yao Qi  <yao.qi@linaro.org>
9854
9855         PR tdep/21717
9856         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
9857         condition for FPSCR.
9858         (arm_linux_store_inferior_registers): Likewise.
9859
9860 2017-07-22  Tom Tromey  <tom@tromey.com>
9861
9862         * break-catch-syscall.c (struct catch_syscall_inferior_data)
9863         <syscalls_counts>: Now a std::vector.
9864         (get_catch_syscall_inferior_data): Use "new".
9865         (catch_syscall_inferior_data_cleanup): Use "delete".
9866         (insert_catch_syscall, remove_catch_syscall)
9867         (clear_syscall_counts): Update.
9868
9869 2017-07-22  Tom Tromey  <tom@tromey.com>
9870
9871         * break-catch-syscall.c (syscall_catchpoint)
9872         <syscalls_to_be_caught>: Now a std::vector<int>
9873         (~syscall_catchpoint): Remove.
9874         (insert_catch_syscall, remove_catch_syscall)
9875         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
9876         (print_mention_catch_syscall, print_recreate_catch_syscall):
9877         Update.
9878         (create_syscall_event_catchpoint): Change type of "filter"
9879         parameter.
9880         (catch_syscall_split_args): Return a std::vector.
9881         (catch_syscall_command_1, catching_syscall_number_1): Update.
9882
9883 2017-07-22  Tom Tromey  <tom@tromey.com>
9884
9885         * break-catch-throw.c (struct exception_catchpoint)
9886         <exception_rx>: Now a std::string.
9887         (~exception_catchpoint): Remove.
9888         (print_one_detail_exception_catchpoint): Update.
9889         (handle_gnu_v3_exceptions): Change type of except_rx.
9890         (extract_exception_regexp): Return a std::string.
9891         (catch_exception_command_1): Update.
9892
9893 2017-07-22  Tom Tromey  <tom@tromey.com>
9894
9895         * break-catch-sig.c (gdb_signal_type): Remove typedef.
9896         (struct signal_catchpoint) <signals_to_be_caught>: Now a
9897         std::vector.
9898         <catch_all>: Now a bool.
9899         (~signal_catchpoint): Remove.
9900         (signal_catchpoint_insert_location)
9901         (signal_catchpoint_remove_location)
9902         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
9903         (signal_catchpoint_print_mention)
9904         (signal_catchpoint_print_recreate)
9905         (signal_catchpoint_explains_signal): Update.
9906         (create_signal_catchpoint): Change type of "filter" and
9907         "catch_all".
9908         (catch_signal_split_args): Return a std::vector.  Change type of
9909         "catch_all".
9910         (catch_signal_command): Update.
9911
9912 2017-07-20  Pedro Alves  <palves@redhat.com>
9913
9914         * ada-lang.c (ada_language_defn): Make extern.
9915         (_initialize_ada_language): Remove add_language call.
9916         * c-lang.c (c_language_defn, cplus_language_defn)
9917         (asm_language_defn, minimal_language_defn): Make extern.
9918         (_initialize_c_language): Delete.
9919         * completer.c (compare_cstrings): Delete, moved to utils.h.
9920         * d-lang.c (d_language_defn): Make extern.
9921         (_initialize_d_language): Remove add_language calls.
9922         * defs.h (enum language): Add comment.
9923         * f-lang.c (f_language_defn): Make extern.
9924         (_initialize_f_language): Remove add_language call.
9925         * go-lang.c (go_language_defn): Make extern.
9926         (_initialize_go_language): Remove add_language call.
9927         * language.c: Include <algorithm>.
9928         (languages): Redefine as const array.
9929         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
9930         (set_language_command): Handle "local".  Use for-range loop.
9931         (set_language): Remove loop.
9932         (language_enum): Rewrite.
9933         (language_def, language_str): Remove loops.
9934         (add_language): Delete.
9935         (add_set_language_command): New, based on add_languages.
9936         (skip_language_trampoline): Adjust.
9937         (local_language_defn): Delete.
9938         (language_gdbarch_post_init): Adjust.
9939         (_initialize_language): Remove add_language calls.  Call
9940         add_set_language_command.
9941         * language.h (add_language): Delete.
9942         (auto_language_defn)
9943         (unknown_language_defn, minimal_language_defn, ada_language_defn)
9944         (asm_language_defn, c_language_defn, cplus_language_defn)
9945         (d_language_defn, f_language_defn, go_language_defn)
9946         (m2_language_defn, objc_language_defn, opencl_language_defn)
9947         (pascal_language_defn, rust_language_defn): Declare.
9948         * m2-lang.c (m2_language_defn): Make extern.
9949         (_initialize_m2_language): Remove add_language call.
9950         * objc-lang.c (objc_language_defn): Make extern.
9951         (_initialize_objc_language): Remove add_language call.
9952         * opencl-lang.c (opencl_language_defn): Make extern.
9953         (_initialize_opencl_language): Remove add_language call.
9954         * p-lang.c (pascal_language_defn): Make extern.
9955         (_initialize_pascal_language): Delete.
9956         * rust-lang.c (rust_language_defn): Make extern.
9957         (_initialize_rust_language): Delete.
9958         * utils.h (compare_cstrings): New static inline function.
9959
9960 2017-07-20  Pedro Alves  <palves@redhat.com>
9961
9962         * ada-lang.c (ada_to_fixed_type_1): Adjust.
9963         (get_var_value): Constify parameters.
9964         (get_int_var_value): Change prototype.
9965         (to_fixed_range_type): Adjust.
9966         * ada-lang.h (get_int_var_value): Change prototype.
9967
9968 2017-07-20  Pedro Alves  <palves@redhat.com>
9969
9970         * dwarf2read.c (dw2_lookup_symbol): Use
9971         SYMBOL_MATCHES_SEARCH_NAME.
9972         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
9973
9974 2017-07-20  Pedro Alves  <palves@redhat.com>
9975
9976         * block.c (block_iter_name_step, block_iter_name_first)
9977         (block_iter_name_next): Delete.
9978         (block_lookup_symbol_primary): Adjust to use
9979         dict_iter_match_first/dict_iter_match_next.
9980         * block.h (block_iter_name_first, block_iter_name_next): Delete
9981         declarations.
9982         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
9983         dict_iter_match_first/dict_iter_match_next.
9984
9985 2017-07-20  Pedro Alves  <palves@redhat.com>
9986
9987         * cp-support.c (cp_find_first_component_aux): Add missing case for
9988         end of string.
9989
9990 2017-07-18  David Blaikie  <dblaikie@gmail.com>
9991
9992         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
9993         of dwo_cu's dwo_file.
9994
9995 2017-07-18  Yao Qi  <yao.qi@linaro.org>
9996
9997         * remote.c (store_registers_using_G): Remove one line comment.
9998
9999 2017-07-18  Yao Qi  <yao.qi@linaro.org>
10000
10001         * regcache.c (regcache_cpy): Simplify it.
10002         (regcache::cpy_no_passthrough): Remove it.
10003         * regcache.h (cpy_no_passthrough): Remove it.
10004         (regcache_dup, regcache_cpy): Update comments.
10005
10006 2017-07-18  Pedro Alves  <palves@redhat.com>
10007
10008         * remote-sim.c (sim_command_completer): Adjust to work with a
10009         completion_tracker instead of a VEC.
10010
10011 2017-07-17  Pedro Alves  <palves@redhat.com>
10012
10013         * completer.c (complete_source_filenames): New function.
10014         (complete_address_and_linespec_locations): New function.
10015         (location_completer): Use complete_address_and_linespec_locations.
10016         (completion_tracker::build_completion_result): Honor the tracker's
10017         request to suppress append.
10018         * completer.h (completion_tracker::suppress_append_ws)
10019         (completion_tracker::set_suppress_append_ws): New methods.
10020         (completion_tracker::m_suppress_append_ws): New field.
10021         (complete_source_filenames): New declaration.
10022         * linespec.c (linespec_complete_what): New.
10023         (struct ls_parser) <complete_what, completion_word,
10024         completion_quote_char, completion_quote_end, completion_tracker>:
10025         New fields.
10026         (string_find_incomplete_keyword_at_end): New.
10027         (linespec_lexer_lex_string): Record quote char.  If in completion
10028         mode, don't throw.
10029         (linespec_lexer_consume_token): Advance the completion word point.
10030         (linespec_lexer_peek_token): Save/restore completion info.
10031         (save_stream_and_consume_token): New.
10032         (set_completion_after_number): New.
10033         (linespec_parse_basic): Set what to complete next depending on
10034         token.  Handle function and label completions specially.
10035         (parse_linespec): Disable objc shortcut in completion mode.  Set
10036         what to complete next depending on token type.  Skip keyword if in
10037         completion mode.
10038         (complete_linespec_component, linespec_complete): New.
10039         * linespec.h (linespec_complete): Declare.
10040
10041 2017-07-17  Pedro Alves  <palves@redhat.com>
10042
10043         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
10044         Handle 'operator<' / 'operator<<'.
10045
10046 2017-07-17  Pedro Alves  <palves@redhat.com>
10047
10048         * completer.c (collect_explicit_location_matches): Handle
10049         MATCH_LABEL.
10050         (convert_explicit_location_to_linespec): New, factored out from
10051         ...
10052         (convert_explicit_location_to_sals): ... this.
10053         (complete_label): New.
10054         (linespec_complete_label, find_label_symbols_in_block): New.
10055         (find_label_symbols): Add completion_mode parameter and adjust to
10056         call find_label_symbols_in_block.
10057         * linespec.h (linespec_complete_label): Declare.
10058
10059 2017-07-17  Pedro Alves  <palves@redhat.com>
10060
10061         * ada-lang.c (ada_collect_symbol_completion_matches): Add
10062         complete_symbol_mode parameter.
10063         * cli/cli-cmds.c (complete_command): Get the completion result out
10064         of the handle_brkchars tracker if used a custom word point.
10065         * completer.c: Include "linespec.h".
10066         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
10067         (advance_to_expression_complete_word_point): New.
10068         (completion_tracker::completes_to_completion_word): New.
10069         (complete_files_symbols): Pass down
10070         complete_symbol_mode::EXPRESSION.
10071         (explicit_options, probe_options): New.
10072         (collect_explicit_location_matches): Complete on the
10073         explictit_loc->foo instead of word.  Use
10074         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
10075         keyword and options completions.
10076         (backup_text_ptr): Delete.
10077         (skip_keyword): New.
10078         (complete_explicit_location): Remove 'word' parameter.  Add
10079         language, quoted_arg_start and quoted_arg_end parameters.
10080         Rewrite, parsing left to right.
10081         (location_completer): Rewrite.
10082         (location_completer_handle_brkchars): New function.
10083         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
10084         (enum complete_line_internal_reason): Adjust comments.
10085         (completion_tracker::discard_completions): New.
10086         (completer_handle_brkchars_func_for_completer): Handle
10087         location_completer.
10088         (gdb_custom_word_point_brkchars)
10089         (gdb_org_rl_basic_quote_characters): New.
10090         (gdb_completion_word_break_characters_throw)
10091         (completion_find_completion_word): Handle trackers that use a
10092         custom word point.
10093         (completion_tracker::advance_custom_word_point_by): New.
10094         (completion_tracker::build_completion_result): Don't rely on
10095         readline appending the quote char.
10096         (gdb_rl_attempted_completion_function_throw): Handle trackers that
10097         use a custom word point.
10098         (gdb_rl_attempted_completion_function): Restore
10099         rl_basic_quote_characters.
10100         * completer.h (class completion_tracker): Extend intro comment.
10101         (completion_tracker::set_quote_char)
10102         (completion_tracker::quote_char)
10103         (completion_tracker::set_use_custom_word_point)
10104         (completion_tracker::use_custom_word_point)
10105         (completion_tracker::custom_word_point)
10106         (completion_tracker::set_custom_word_point)
10107         (completion_tracker::advance_custom_word_point_by)
10108         (completion_tracker::completes_to_completion_word)
10109         (completion_tracker::discard_completions): New methods.
10110         (completion_tracker::m_quote_char)
10111         (completion_tracker::m_use_custom_word_point)
10112         (completion_tracker::m_custom_word_point): New fields.
10113         (advance_to_expression_complete_word_point): Declare.
10114         * f-lang.c (f_collect_symbol_completion_matches): Add
10115         complete_symbol_mode parameter.
10116         * language.h (struct language_defn)
10117         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
10118         parameter.
10119         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
10120         (linespec_complete_function): New function.
10121         (linespec_lexer_lex_keyword): Adjust.
10122         * linespec.h (linespec_keywords, linespec_complete_function): New
10123         declarations.
10124         * location.c (find_end_quote): New function.
10125         (explicit_location_lex_one): Add explicit_completion_info
10126         parameter.  Save quoting info.  Don't throw if being called for
10127         completion.  Don't handle Ada operators here.
10128         (is_cp_operator, skip_op_false_positives, first_of)
10129         (explicit_location_lex_one_function): New function.
10130         (string_to_explicit_location): Replace 'dont_throw' parameter with
10131         an explicit_completion_info pointer parameter.  Handle it.  Don't
10132         use explicit_location_lex_one to lex function names.  Use
10133         explicit_location_lex_one_function instead.
10134         * location.h (struct explicit_completion_info): New.
10135         (string_to_explicit_location): Replace 'dont_throw' parameter with
10136         an explicit_completion_info pointer parameter.
10137         * symtab.c (default_collect_symbol_completion_matches_break_on):
10138         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
10139         (default_collect_symbol_completion_matches)
10140         (collect_symbol_completion_matches): Add complete_symbol_mode
10141         parameter.
10142         (collect_symbol_completion_matches_type): Pass down
10143         complete_symbol_mode::EXPRESSION.
10144         (collect_file_symbol_completion_matches): Add complete_symbol_mode
10145         parameter.  Handle LINESPEC mode.
10146         * symtab.h (complete_symbol_mode): New.
10147         (default_collect_symbol_completion_matches_break_on)
10148         (default_collect_symbol_completion_matches)
10149         (collect_symbol_completion_matches)
10150         (collect_file_symbol_completion_matches): Add complete_symbol_mode
10151         parameter.
10152
10153 2017-07-17  Pedro Alves  <palves@redhat.com>
10154
10155         * utils.c (enum class strncmp_iw_mode): New.
10156         (strcmp_iw): Rename to ...
10157         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
10158         parameters.  Handle them.
10159         (strncmp_iw): New.
10160         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
10161         * utils.h (strncmp_iw): Declare.
10162         (strcmp_iw): Move describing comments here.
10163
10164 2017-07-17  Pedro Alves  <palves@redhat.com>
10165
10166         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
10167         CP_OPERATOR_STR.
10168         * c-typeprint.c (is_type_conversion_operator): Use
10169         CP_OPERATOR_STR.
10170         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
10171         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
10172         CP_OPERATOR_LEN.
10173         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
10174         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
10175         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
10176         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
10177         CP_OPERATOR_STR.
10178         * location.c: Include "cp-support.h".
10179         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
10180         CP_OPERATOR_STR.
10181         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
10182         CP_OPERATOR_LEN.
10183
10184 2017-07-17  Pedro Alves  <palves@redhat.com>
10185
10186         * cli/cli-cmds.c (complete_command): Use a completion tracker
10187         along with completion_find_completion_word for handle_brkchars
10188         phase.
10189         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
10190         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
10191         (struct gdb_rl_completion_word_info): New.
10192         (gdb_rl_find_completion_word): New.
10193         (completion_find_completion_word): New.
10194         * completer.h (completion_find_completion_word): Declare.
10195
10196 2017-07-17  Pedro Alves  <palves@redhat.com>
10197
10198         * ada-lang.c (symbol_completion_match): Adjust comments.
10199         (symbol_completion_add): Replace vector parameter with
10200         completion_tracker parameter.  Use it.
10201         (ada_make_symbol_completion_list): Rename to...
10202         (ada_collect_symbol_completion_matches): ... this.  Add
10203         completion_tracker parameter and use it.
10204         (ada_language_defn): Adjust.
10205         * break-catch-syscall.c (catch_syscall_completer): Adjust
10206         prototype and work with completion_tracker instead of VEC.
10207         * breakpoint.c (condition_completer): Adjust prototype and work
10208         with completion_tracker instead of VEC.
10209         * c-lang.c (c_language_defn, cplus_language_defn)
10210         (asm_language_defn, minimal_language_defn): Adjust to renames.
10211         * cli/cli-cmds.c (complete_command): Rework using
10212         completion_tracker.  Catch exceptions when completing.
10213         * cli/cli-decode.c (integer_unlimited_completer)
10214         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
10215         with completion_tracker instead of VEC.
10216         * command.h (struct completion_tracker): Forward declare.
10217         (completer_ftype, completer_handle_brkchars_ftype): Change
10218         types.
10219         (complete_on_cmdlist, complete_on_enum): Adjust.
10220         * completer.c: Include <algorithm>.
10221         (struct gdb_completer_state): New.
10222         (current_completion): New global.
10223         (readline_line_completion_function): Delete.
10224         (noop_completer, filename_completer)
10225         (filename_completer_handle_brkchars, complete_files_symbols)
10226         (linespec_location_completer): Adjust to work with a
10227         completion_tracker instead of a VEC.
10228         (string_or_empty): New.
10229         (collect_explicit_location_matches): Adjust to work with a
10230         completion_tracker instead of a VEC.
10231         (explicit_location_completer): Rename to ...
10232         (complete_explicit_location): ... this and adjust to work with a
10233         completion_tracker instead of a VEC.
10234         (location_completer): Adjust to work with a completion_tracker
10235         instead of a VEC.
10236         (add_struct_fields): Adjust to work with a completion_list instead
10237         of VEC.
10238         (expression_completer): Rename to ...
10239         (complete_expression): ... this and adjust to work with a
10240         completion_tracker instead of a VEC.  Use complete_files_symbols.
10241         (expression_completer): Reimplement on top of complete_expression.
10242         (symbol_completer): Adjust to work with a completion_tracker
10243         instead of a VEC.
10244         (enum complete_line_internal_reason): Add describing comments.
10245         (complete_line_internal_normal_command): Adjust to work with a
10246         completion_tracker instead of a VEC.
10247         (complete_line_internal): Rename to ...
10248         (complete_line_internal_1): ... this and adjust to work with a
10249         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
10250         handle_brkchars phase.
10251         (new_completion_tracker): Delete.
10252         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
10253         complete_line_internal_1.
10254         (free_completion_tracker): Delete.
10255         (INITIAL_COMPLETION_HTAB_SIZE): New.
10256         (completion_tracker::completion_tracker)
10257         (completion_tracker::~completion_tracker): New.
10258         (maybe_add_completion): Delete.
10259         (completion_tracker::maybe_add_completion)
10260         (completion_tracker::add_completion)
10261         (completion_tracker::add_completions): New.
10262         (throw_max_completions_reached_error): Delete.
10263         (complete_line): Adjust to work with a completion_tracker instead
10264         of a VEC.  Don't create a completion_tracker_t or check for max
10265         completions here.
10266         (command_completer, command_completer_handle_brkchars)
10267         (signal_completer, reg_or_group_completer_1)
10268         (reg_or_group_completer, default_completer_handle_brkchars):
10269         Adjust to work with a completion_tracker.
10270         (gdb_completion_word_break_characters_throw): New.
10271         (gdb_completion_word_break_characters): Reimplement.
10272         (line_completion_function): Delete.
10273         (completion_tracker::recompute_lowest_common_denominator)
10274         (expand_preserving_ws)
10275         (completion_tracker::build_completion_result)
10276         (completion_result::completion_result)
10277         (completion_result::completion_result)
10278         (completion_result::~completion_result)
10279         (completion_result::completion_result)
10280         (completion_result::release_match_list, compare_cstrings)
10281         (completion_result::sort_match_list)
10282         (completion_result::reset_match_list)
10283         (gdb_rl_attempted_completion_function_throw)
10284         (gdb_rl_attempted_completion_function): New.
10285         * completer.h (completion_list, struct completion_result)
10286         (class completion_tracker): New.
10287         (complete_line): Add completion_tracker parameter.
10288         (readline_line_completion_function): Delete.
10289         (gdb_rl_attempted_completion_function): New.
10290         (noop_completer, filename_completer, expression_completer)
10291         (location_completer, symbol_completer, command_completer)
10292         (signal_completer, reg_or_group_completer): Update prototypes.
10293         (completion_tracker_t, new_completion_tracker)
10294         (make_cleanup_free_completion_tracker): Delete.
10295         (enum maybe_add_completion_enum): Delete.
10296         (maybe_add_completion): Delete.
10297         (throw_max_completions_reached_error): Delete.
10298         * corefile.c (complete_set_gnutarget): Adjust to work with a
10299         completion_tracker instead of a VEC.
10300         * cp-abi.c (cp_abi_completer): Adjust to work with a
10301         completion_tracker instead of a VEC.
10302         * d-lang.c (d_language_defn): Adjust.
10303         * disasm.c (disassembler_options_completer): Adjust to work with a
10304         completion_tracker instead of a VEC.
10305         * f-lang.c (f_make_symbol_completion_list): Rename to ...
10306         (f_collect_symbol_completion_matches): ... this.  Adjust to work
10307         with a completion_tracker instead of a VEC.
10308         (f_language_defn): Adjust.
10309         * go-lang.c (go_language_defn): Adjust.
10310         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
10311         Adjust to work with a completion_tracker instead of a VEC.
10312         * infrun.c (handle_completer): Likewise.
10313         * interps.c (interpreter_completer): Likewise.
10314         * interps.h (interpreter_completer): Likewise.
10315         * language.c (unknown_language_defn, auto_language_defn)
10316         (local_language_defn): Adjust.
10317         * language.h (language_defn::la_make_symbol_completion_list):
10318         Rename to ...
10319         (language_defn::la_collect_symbol_completion_matches): ... this
10320         and adjust to work with a completion_tracker instead of a VEC.
10321         * m2-lang.c (m2_language_defn): Adjust.
10322         * objc-lang.c (objc_language_defn): Adjust.
10323         * opencl-lang.c (opencl_language_defn): Adjust.
10324         * p-lang.c (pascal_language_defn): Adjust.
10325         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
10326         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
10327         with a completion_tracker.
10328         * rust-lang.c (rust_language_defn): Adjust.
10329         * symtab.c (free_completion_list, do_free_completion_list)
10330         (return_val, completion_tracker): Delete.
10331         (completion_list_add_name, completion_list_add_symbol)
10332         (completion_list_add_msymbol, completion_list_objc_symbol)
10333         (completion_list_add_fields, add_symtab_completions): Add
10334         completion_tracker parameter and use it.
10335         (default_make_symbol_completion_list_break_on_1): Rename to...
10336         (default_collect_symbol_completion_matches_break_on): ... this.
10337         Add completion_tracker parameter and use it instead of allocating
10338         a completion tracker here.
10339         (default_make_symbol_completion_list_break_on): Delete old
10340         implementation.
10341         (default_make_symbol_completion_list): Delete.
10342         (default_collect_symbol_completion_matches): New.
10343         (make_symbol_completion_list): Delete.
10344         (collect_symbol_completion_matches): New.
10345         (make_symbol_completion_type): Rename to ...
10346         (collect_symbol_completion_matches_type): ... this.  Add
10347         completion_tracker parameter and use it instead of VEC.
10348         (make_file_symbol_completion_list_1): Rename to...
10349         (collect_file_symbol_completion_matches): ... this.  Add
10350         completion_tracker parameter and use it instead of VEC.
10351         (make_file_symbol_completion_list): Delete.
10352         (add_filename_to_list): Use completion_list instead of a VEC.
10353         (add_partial_filename_data::list): Now a completion_list.
10354         (make_source_files_completion_list): Work with a completion_list
10355         instead of a VEC.
10356         * symtab.h: Include "completer.h".
10357         (default_make_symbol_completion_list_break_on)
10358         (default_make_symbol_completion_list, make_symbol_completion_list)
10359         (make_symbol_completion_type, make_file_symbol_completion_list)
10360         (make_source_files_completion_list): Delete.
10361         (default_collect_symbol_completion_matches_break_on)
10362         (default_collect_symbol_completion_matches)
10363         (collect_symbol_completion_matches)
10364         (collect_symbol_completion_matches_type)
10365         (collect_file_symbol_completion_matches)
10366         (make_source_files_completion_list): New.
10367         * top.c (init_main): Don't install a rl_completion_entry_function
10368         hook.  Install a rl_attempted_completion_function hook instead.
10369         * tui/tui-layout.c (layout_completer): Adjust to work with a
10370         completion_tracker.
10371         * tui/tui-regs.c (tui_reggroup_completer):
10372         * tui/tui-win.c (window_name_completer, focus_completer)
10373         (winheight_completer): Adjust to work with a completion_tracker.
10374         * value.c: Include "completer.h".
10375         (complete_internalvar): Adjust to work with a completion_tracker.
10376         * value.h (complete_internalvar): Likewise.
10377
10378 2017-07-17  Pedro Alves  <palves@redhat.com>
10379
10380         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
10381         renames.
10382         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
10383         comments to completer_ftype's declaration.
10384         <completer_handle_brkchars>: Change type to
10385         completer_handle_brkchars_ftype.
10386         * command.h (completer_ftype): Add describing comment and give
10387         names to parameters.
10388         (completer_ftype_void): Rename to ...
10389         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
10390         (set_cmd_completer_handle_brkchars): Adjust.
10391         * completer.c (filename_completer_handle_brkchars): New function.
10392         (complete_line_internal_normal_command): New function, factored
10393         out from ...
10394         (complete_line_internal): ... here.
10395         (command_completer_handle_brkchars)
10396         (default_completer_handle_brkchars)
10397         (completer_handle_brkchars_func_for_completer): New functions.
10398         * completer.h (set_gdb_completion_word_break_characters): Delete
10399         declaration.
10400         (completer_handle_brkchars_func_for_completer): New declaration.
10401         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
10402         completer_handle_brkchars_func_for_completer.
10403
10404 2017-07-17  Pedro Alves  <palves@redhat.com>
10405
10406         * completer.c (symbol_completer): New function, based on
10407         make_symbol_completion_list_fn.
10408         * completer.h (symbol_completer): New declaration.
10409         * guile/scm-cmd.c (cmdscm_completers): Adjust.
10410         * python/py-cmd.c (completers): Adjust.
10411         * symtab.c (make_symbol_completion_list_fn): Delete.
10412         * symtab.h (make_symbol_completion_list_fn): Delete.
10413         * cli/cli-decode.c (add_cmd): Adjust.
10414
10415 2017-07-17  Pedro Alves  <palves@redhat.com>
10416
10417         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
10418         * dwarf2read.c: Include "filename-seen-cache.h".
10419         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
10420         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
10421         * filename-seen-cache.c: New file.
10422         * filename-seen-cache.h: New file.
10423         * symtab.c: Include "filename-seen-cache.h".
10424         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
10425         (create_filename_seen_cache, clear_filename_seen_cache)
10426         (delete_filename_seen_cache, filename_seen): Delete, parts moved
10427         to filename-seen-cache.h/filename-seen-cache.c.
10428         (output_source_filename, sources_info)
10429         (maybe_add_partial_symtab_filename)
10430         (make_source_files_completion_list): Adjust to use
10431         filename_seen_cache.
10432
10433 2017-07-17  Pedro Alves  <palves@redhat.com>
10434
10435         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
10436         fields.
10437         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
10438         dwarf2_debug_sections*)): New.
10439         (dwarf2_per_objfile::dwarf2_per_objfile(const
10440         dwarf2_per_objfile&)): Declare as deleted.
10441         (dwarf2_per_objfile::operator=): Declare as deleted.
10442         (dwarf2_per_objfile::dwarf2_per_objfile)
10443         (dwarf2_per_objfile::~dwarf2_per_objfile)
10444         (dwarf2_per_objfile::free_cached_comp_units): New.
10445         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
10446         ctor.  Call dwarf2_per_objfile's ctor manually.
10447         (dwarf2_locate_sections): Deleted/refactored as ...
10448         (dwarf2_per_objfile::locate_sections): ... this new method.
10449         (free_cached_comp_units): Defer to
10450         dwarf2_per_objfile::free_cached_comp_units.
10451         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
10452
10453 2017-07-14  Tom Tromey  <tom@tromey.com>
10454
10455         PR rust/21764:
10456         * rust-exp.y (convert_ast_to_expression): Add "want_type"
10457         parameter.
10458         <UNOP_SIZEOF>: Split into separate case.
10459         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
10460
10461 2017-07-14  Tom Tromey  <tom@tromey.com>
10462
10463         PR rust/21763:
10464         * symtab.c (symbol_matches_domain): Add language_rust to special
10465         case.
10466         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
10467         treat LOC_TYPEDEF symbols as variables.
10468
10469 2017-07-14  Pedro Alves  <palves@redhat.com>
10470
10471         * symtab.c (make_file_symbol_completion_list_1): Iterate over
10472         symtabs matching all symtabs with SRCFILE as file name instead of
10473         only considering the first hit, with lookup_symtab.
10474
10475 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
10476
10477         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
10478         operator_name parameters.
10479         (gen_expr): Update function call.
10480
10481 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
10482
10483         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
10484         parameter.
10485         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
10486         Likewise.
10487         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
10488         parameter, use agent_expr::gdbarch instead, update function
10489         calls.
10490         (locexpr_tracepoint_var_ref): Likewise.
10491         (loclist_tracepoint_var_ref): Likewise.
10492         * ax-gdb.c (gen_trace_static_fields): Likewise.
10493         (gen_traced_pop): Likewise.
10494         (gen_frame_args_address): Likewise.
10495         (gen_frame_locals_address): Likewise.
10496         (gen_var_ref): Likewise.
10497         (gen_struct_ref_recursive): Likewise.
10498         (gen_static_field): Likewise.
10499         (gen_maybe_namespace_elt): Likewise.
10500         (gen_expr): Likewise.
10501         (gen_trace_for_var): Likewise.
10502         (gen_trace_for_expr): Likewise.
10503         (gen_trace_for_return_address): Likewise.
10504
10505 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
10506
10507         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
10508         parameter.
10509         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
10510
10511 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
10512
10513         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
10514         from ax, update calls.
10515         (gen_usual_arithmetic): Likewise.
10516         (gen_integral_promotions): Likewise.
10517         (gen_bitfield_ref): Likewise.
10518         (gen_primitive_field): Likewise.
10519         (gen_struct_ref_recursive): Likewise.
10520         (gen_struct_ref): Likewise.
10521         (gen_maybe_namespace_elt): Likewise.
10522         (gen_struct_elt_for_reference): Likewise.
10523         (gen_namespace_elt): Likewise.
10524         (gen_aggregate_elt_ref): Likewise.
10525         (gen_expr): Get gdbarch from ax, update calls.
10526         (gen_expr_binop_rest): Likewise.
10527
10528 2017-07-13  Pedro Alves  <palves@redhat.com>
10529
10530         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
10531         as default tdesc.
10532         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
10533         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
10534         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
10535         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
10536         tdep.
10537         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
10538         Get final tdesc from the tdep.
10539         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
10540         default tdesc.
10541         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
10542         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
10543         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
10544         Use it as default tdesc.
10545         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
10546         down to amd_init_abi.  No longer handle fallback tdesc here.
10547         * amd64-tdep.h (tdesc_x32): Declare.
10548         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
10549         parameter.
10550         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
10551         as default tdesc.
10552
10553 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10554
10555         * s390-linux-tdep.c (s390_process_record): Add support for
10556         instructions new in arch12.
10557
10558 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
10559
10560         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
10561         PT_GETFSBASE and PT_GETGSBASE.
10562         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
10563         PT_SETGSBASE.
10564
10565 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
10566
10567         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
10568         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
10569         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
10570         those rules.
10571         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
10572         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
10573         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
10574         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
10575         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
10576         * features/i386/amd64.xml: Add 64bit-segments.xml.
10577         * features/i386/amd64-avx-avx512.c: Regenerated.
10578         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
10579         * features/i386/amd64-avx-mpx.c: Regenerated.
10580         * features/i386/amd64-avx.c: Regenerated.
10581         * features/i386/amd64-mpx.c: Regenerated.
10582         * features/i386/amd64.c: Regenerated.
10583         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
10584         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10585         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
10586         * regformats/i386/amd64-avx.dat: Regenerated.
10587         * regformats/i386/amd64-mpx.dat: Regenerated.
10588         * regformats/i386/amd64.dat: Regenerated.
10589
10590 2017-07-10  Yao Qi  <yao.qi@linaro.org>
10591
10592         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
10593         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
10594
10595 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
10596
10597         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
10598         unsetenv.
10599         * gnulib/aclocal.m4: Regenerate.
10600         * gnulib/config.in: Regenerate.
10601         * gnulib/configure: Regenerate.
10602         * gnulib/import/Makefile.am: Regenerate.
10603         * gnulib/import/Makefile.in: Regenerate.
10604         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
10605         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
10606         * gnulib/import/m4/environ.m4: New file.
10607         * gnulib/import/m4/setenv.m4: New file.
10608         * gnulib/import/setenv.c: New file.
10609         * gnulib/import/unsetenv.c: New file.
10610
10611 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
10612
10613         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
10614         address when op is DW_OP_addr.
10615
10616 2017-07-09  Tom Tromey  <tom@tromey.com>
10617
10618         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
10619         check and apply to outer type.
10620
10621 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
10622
10623         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
10624         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
10625         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
10626         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
10627
10628 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
10629
10630         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
10631
10632 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
10633
10634         * corelow.c (get_core_siginfo): Remove.
10635         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
10636         instead of get_core_siginfo.
10637         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
10638         * gdbarch.h: Re-generate.
10639         * gdbarch.c: Re-generate.
10640         * linux-tdep.c (linux_core_xfer_siginfo): New.
10641         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
10642
10643 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
10644
10645         * corelow.c (thread_section_name): Move to ...
10646         * gdbcore.h (thread_section_name): ... here.
10647
10648 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
10649
10650         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
10651         (struct siginfo32): New.
10652         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
10653         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
10654         via ptrace(PT_LWPINFO).
10655
10656 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
10657
10658         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
10659         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
10660         (fbsd_get_siginfo_type): New.
10661         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
10662         (_initialize_fbsd_tdep): New.
10663
10664 2017-07-06  David Blaikie  <dblaikie@gmail.com>
10665
10666         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
10667         a singular dwo_unit*) to support multiple CUs in the same way that
10668         multiple TUs are supported.
10669         (create_cus_hash_table): Replace create_dwo_cu with a function for
10670         parsing multiple CUs from a DWO file.
10671         (open_and_init_dwo_file): Use create_cus_hash_table rather than
10672         create_dwo_cu.
10673         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
10674         htab_find, rather than comparing the signature to a singleton CU in
10675         the dwo_file.
10676
10677 2017-07-06  Pedro Alves  <palves@redhat.com>
10678
10679         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
10680
10681 2017-07-04  Pedro Alves  <palves@redhat.com>
10682
10683         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
10684         * gdbtypes.h (TYPE_STATIC): Delete.
10685         (struct fn_field) <is_public, is_abstract, is_static, is_final,
10686         is_synchronized, is_native>: Delete.
10687         <dummy>: Bump.
10688         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
10689         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
10690         (TYPE_FN_FIELD_ABSTRACT): Delete.
10691
10692 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
10693
10694         * buffer.h (buffer_finish): Fix spelling mistakes.
10695
10696 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
10697
10698         * .dir-locals.el: Automatically switch to C-style comments in
10699         versions of Emacs that support the feature.
10700
10701 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
10702             Pedro Alves  <palves@redhat.com>
10703
10704         PR cli/21688
10705         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
10706         (process_next_line): New variable 'inline_cmd'.
10707         Adjust 'if' clauses for "python", "compile" and "guile" to use
10708         'command_name_equals' and check for '!inline_cmd'.
10709
10710 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
10711
10712         PR cli/21688
10713         * cli/cli-script.c (command_name_equals_not_inline): New function.
10714         (process_next_line): Adjust 'if' clauses for "python", "compile"
10715         and "guile" to use command_name_equals_not_inline.
10716
10717 2017-06-29  Pedro Alves  <palves@redhat.com>
10718
10719         * completer.c (expression_completer): Call
10720         linespec_location_completer instead of location_completer.
10721
10722 2017-06-29  Pedro Alves  <palves@redhat.com>
10723
10724         * completer.c (expression_completer): Remove code that recomputes
10725         'text' from 'word'.
10726
10727 2017-06-29  Yao Qi  <yao.qi@linaro.org>
10728
10729         * regformats/regdat.sh: Generate code with
10730         "ifndef IN_PROCESS_AGENT".
10731
10732 2017-06-28  Pedro Alves  <palves@redhat.com>
10733
10734         * command.h: Include "common/scoped_restore.h".
10735
10736 2017-06-28  Yao Qi  <yao.qi@linaro.org>
10737
10738         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
10739         instead of obstack_grow.
10740
10741 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
10742
10743         PR gdb/21337
10744         * symfile.c (reread_symbols): Call objfiles_changed just before
10745         read_symbols.
10746
10747 2017-06-27  Pedro Alves  <palves@redhat.com>
10748
10749         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
10750         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
10751         (completion_list_add_symbol, completion_list_add_msymbol):
10752         ... these new functions.
10753         (add_symtab_completions)
10754         (default_make_symbol_completion_list_break_on_1): Adjust.
10755
10756 2017-06-27  Pedro Alves  <palves@redhat.com>
10757
10758         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
10759         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
10760         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
10761         dtor.
10762         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
10763         'storage_obstack' field an auto_obstack.  In-class initialize all
10764         non-bitfield fields.  Make minsyms_read bool.
10765         * symfile.c (read_symbols): Adjust.
10766
10767 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
10768
10769         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
10770         (gdbsim_store_register): Likewise.
10771
10772 2017-06-27  Pedro Alves  <palves@redhat.com>
10773
10774         * c-exp.y (name_obstack): Now an auto_obstack.
10775         (yylex): Use auto_obstack::clear.
10776         (c_parse): Use auto_obstack::clear instead of reinitializing and
10777         freeing the obstack.
10778         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
10779         * d-exp.y (name_obstack): Now an auto_obstack.
10780         (yylex): Use auto_obstack::clear.
10781         (d_parse): Use auto_obstack::clear instead of reinitializing and
10782         freeing the obstack.
10783         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
10784         auto_obstack.
10785         * dwarf2read.c (create_addrmap_from_index)
10786         (dwarf2_build_psymtabs_hard)
10787         (update_enumeration_type_from_children): Likewise.
10788         * gdb_obstack.h (auto_obstack): New type.
10789         * go-exp.y (name_obstack): Now an auto_obstack.
10790         (build_packaged_name): Use auto_obstack::clear.
10791         (go_parse): Use auto_obstack::clear instead of reinitializing and
10792         freeing the obstack.
10793         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
10794         auto_obstack.
10795         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
10796         * rust-exp.y (work_obstack): Now an auto_obstack.
10797         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
10798         reinitializing and freeing the obstack.
10799         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
10800         (host_char_to_target): Use auto_obstack.
10801         * utils.h (make_cleanup_obstack_free): Delete declaration.
10802         * valprint.c (generic_emit_char, generic_printstr): Use
10803         auto_obstack.
10804
10805 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
10806
10807         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
10808         thread.
10809         (darwin_init_thread_list): Don't update dummy thread.
10810         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
10811
10812 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
10813
10814         * record-full.c (netorder16): Remove.
10815
10816 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
10817
10818         * common/diagnostics.h: Define macros for GCC.
10819         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
10820         * common/vec.h: Include diagnostics.h.
10821         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
10822         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
10823         warning.
10824
10825 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
10826
10827         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
10828         New macro.
10829         * ada-lex.l: Ignore deprecated register warnings.
10830
10831 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
10832
10833         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
10834         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
10835
10836 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
10837
10838         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
10839         its own line.
10840
10841 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
10842
10843         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
10844
10845 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
10846
10847         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
10848         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
10849         (xtensa_register_read_masked): Likewise.
10850
10851 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
10852
10853         * common/environ.c (gdb_environ::unset): Update comment.
10854
10855 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
10856
10857         * python/py-unwind.c (pyuw_sniffer): Allocate space for
10858         registers.
10859
10860 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
10861
10862         * record-full.c (record_full_exec_insn): Use byte_vector.
10863
10864 2017-06-22  Yao Qi  <yao.qi@linaro.org>
10865
10866         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
10867         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10868
10869 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
10870
10871         * remote.c (cached_reg): Move from here...
10872         * regcache.h (cached_reg): ...to here.
10873         * python/py-unwind.c (struct reg_info): Remove.
10874         (cached_frame_info): Use cached_reg_t.
10875         (pyuw_prev_register): Likewise.
10876         (pyuw_sniffer): Use cached_reg_t and allocate registers.
10877         (pyuw_dealloc_cache): Free all registers.
10878
10879 2017-06-22  Pedro Alves  <palves@redhat.com>
10880             Simon Marchi  <simon.marchi@ericsson.com>
10881
10882         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
10883         warning.
10884         * common/diagnostics.h: New file.
10885
10886 2017-06-22  Pedro Alves  <palves@redhat.com>
10887
10888         * common/agent.h: Add include guards.
10889
10890 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
10891
10892         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
10893         talk about addressable units instead of bytes.
10894
10895 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
10896
10897         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
10898         of '::const_iterator'.
10899
10900 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
10901
10902         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10903         'unittests/environ-selftests.c'.
10904         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
10905         * charset.c (find_charset_names): Declare object 'iconv_env'.
10906         Update code to use 'iconv_env' object.  Remove call to
10907         'free_environ'.
10908         * common/environ.c: Include <utility>.
10909         (make_environ): Delete function.
10910         (free_environ): Delete function.
10911         (gdb_environ::clear): New function.
10912         (gdb_environ::operator=): New function.
10913         (gdb_environ::get): Likewise.
10914         (environ_vector): Delete function.
10915         (set_in_environ): Delete function.
10916         (gdb_environ::set): New function.
10917         (unset_in_environ): Delete function.
10918         (gdb_environ::unset): New function.
10919         (gdb_environ::envp): Likewise.
10920         * common/environ.h: Include <vector>.
10921         (struct gdb_environ): Delete; transform into...
10922         (class gdb_environ): ... this class.
10923         (free_environ): Delete prototype.
10924         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
10925         environ_vector): Likewise.
10926         * infcmd.c (run_command_1): Update code to call
10927         'envp' from 'gdb_environ' class.
10928         (environment_info): Update code to call methods from 'gdb_environ'
10929         class.
10930         (unset_environment_command): Likewise.
10931         (path_info): Likewise.
10932         (path_command): Likewise.
10933         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
10934         (inferior::inferior): Initialize 'environment' using the host's
10935         information.
10936         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
10937         Include "environ.h".
10938         (class inferior) <environment>: Change type from 'struct
10939         gdb_environ' to 'gdb_environ'.
10940         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
10941         methods from 'gdb_environ' class.
10942         * solib.c (solib_find_1): Likewise
10943         * unittests/environ-selftests.c: New file.
10944
10945 2017-06-20  Yao Qi  <yao.qi@linaro.org>
10946
10947         * features/i386/i386-linux.xml: Exchange the order of including
10948         32bit-linux.xml and 32bit-sse.xml.
10949         * features/i386/i386-linux.c: Regenerated.
10950
10951 2017-06-20  Yao Qi  <yao.qi@linaro.org>
10952
10953         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
10954         Delete copy ctor and assignment operator.
10955         (tdesc_type): Likewise.
10956         (tdesc_feature): Likewise.
10957         (tdesc_free_reg): Remove.
10958         (tdesc_create_reg): Use new.
10959         (tdesc_free_type): Remove.
10960         (tdesc_create_vector): Use new.
10961         (tdesc_create_union): Likewise.
10962         (tdesc_create_flags): Likewise.
10963         (tdesc_create_enum): Likewise.
10964         (tdesc_free_feature): Delete.
10965         (free_target_description): Use delete.
10966
10967 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
10968
10969         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
10970         registers.
10971
10972 2017-06-19  Pedro Alves  <palves@redhat.com>
10973
10974         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
10975         after gdb::unlinker.
10976
10977 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
10978
10979         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
10980         gdb_environ to access an environment variable.
10981
10982 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
10983
10984         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
10985         gdb_byte*.
10986
10987 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
10988
10989         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
10990
10991 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
10992
10993         * configure: Re-generate.
10994         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
10995
10996 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
10997
10998         * configure: Re-generate.
10999         * warning.m4: Pass -Werror to compiler when checking for
11000         supported warning flags.
11001
11002 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
11003
11004         * Makefile.in (COMPILE.pre): Add "-x c++".
11005
11006 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
11007             Pedro Alves  <palves@redhat.com>
11008             Yao Qi  <yao.qi@linaro.org>
11009
11010         * defs.h (RequireLongest): New.
11011         (extract_integer): Declare function template.
11012         (extract_signed_integer): Remove the declaration, but define it
11013         static inline.
11014         (extract_unsigned_integer): Likewise.
11015         (store_integer): Declare function template.
11016         (store_signed_integer): Remove the declaration, but define it
11017         static inline.
11018         (store_unsigned_integer): Likewise.
11019         * findvar.c (extract_integer): New function template.
11020         (extract_signed_integer): Remove.
11021         (extract_unsigned_integer): Remove.
11022         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
11023         instantiations.
11024         (store_integer): New function template.
11025         (store_signed_integer): Remove.
11026         (store_unsigned_integer): Remove.
11027         (store_integer): Explicit instantiations.
11028         * regcache.c (regcache_raw_read_signed): Update.
11029         (regcache::raw_read): New function.
11030         (regcache::raw_read_signed): Remove.
11031         (regcache::raw_read_unsigned): Remove.
11032         (regcache_raw_read_unsigned): Update.
11033         (regcache_raw_write_unsigned): Update.
11034         (regcache::raw_write_signed): Remove.
11035         (regcache::raw_write): New function.
11036         (regcache_cooked_read_signed): Update.
11037         (regcache::raw_write_unsigned): Remove.
11038         (regcache::cooked_read_signed): Remove.
11039         (regcache_cooked_read_unsigned): Update.
11040         (regcache::cooked_read_unsigned): Remove.
11041         (regcache_cooked_write_signed): Update.
11042         (regcache_cooked_write_unsigned): Update.
11043         * regcache.h (regcache) <raw_read_signed>: Remove.
11044         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
11045         <raw_read, raw_write>: New.
11046         <cooked_read_signed, cooked_write_signed>: Remove.
11047         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
11048         <cooked_read, cooked_write>: New.
11049         * sh64-tdep.c (sh64_pseudo_register_read): Update.
11050         (sh64_pseudo_register_write): Update.
11051
11052 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
11053
11054         * arc-tdep.c (arc_disassembler_options): New variable.
11055         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
11056         of default_print_insn.
11057         (arc_delayed_print_insn): Set info->section when needed,
11058         use default_print_insn to retrieve a disassembler.
11059
11060 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
11061
11062         PR gdb/21574
11063         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
11064         to mention $SHELL and startup-with-shell.
11065
11066 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
11067
11068         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
11069
11070 2017-06-14  Yao Qi  <yao.qi@linaro.org>
11071
11072         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
11073         default_print_insn instead of print_insn_aarch64.
11074         * arm-tdep.c (gdb_print_insn_arm): Call
11075         default_print_insn instead of print_insn_big_arm
11076         and print_insn_little_arm.
11077         * i386-tdep.c (i386_print_insn): Call default_print_insn
11078         instead of print_insn_i386.
11079         * ia64-tdep.c (ia64_print_insn): Call
11080         default_print_insn instead of print_insn_ia64.
11081         * mips-tdep.c (gdb_print_insn_mips): Call
11082         default_print_insn instead of print_insn_big_mips
11083         and print_insn_little_mips.
11084         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
11085         instead of print_insn_spu.
11086
11087 2017-06-14  Pedro Alves  <palves@redhat.com>
11088
11089         * ada-lang.c: Include "common/byte-vector.h".
11090         (ada_value_primitive_packed_val): Use gdb::byte_vector.
11091         * charset.c (wchar_iterator::iterate): Resize the vector instead
11092         of reserving it.
11093         * common/byte-vector.h: Include "common/def-vector.h".
11094         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
11095         * cli/cli-dump.c: Include "common/byte-vector.h".
11096         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
11097         * common/byte-vector.h: New file.
11098         * common/def-vector.h: New file.
11099         * common/default-init-alloc.h: New file.
11100         * dwarf2loc.c: Include "common/byte-vector.h".
11101         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
11102         instead of reserving it.
11103         * dwarf2read.c: Include "common/byte-vector.h".
11104         (data_buf::m_vec): Now a gdb::byte_vector.
11105         * gdb_regex.c: Include "common/def-vector.h".
11106         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
11107         * mi/mi-main.c: Include "common/byte-vector.h".
11108         (mi_cmd_data_read_memory): Use gdb::byte_vector.
11109         * printcmd.c: Include "common/byte-vector.h".
11110         (print_scalar_formatted): Use gdb::byte_vector.
11111         * valprint.c: Include "common/byte-vector.h".
11112         (maybe_negate_by_bytes, print_decimal_chars): Use
11113         gdb::byte_vector.
11114
11115 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
11116
11117         * darwin-nat.c: Include "nat/fork-inferior.h".
11118
11119 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
11120
11121         * configure.nat: Factor out Darwin bits that are not
11122         architecture-specific.  Add fork-inferior.o.
11123
11124 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
11125
11126         * configure.nat: Factor out AIX bits that are not
11127         architecture-specific.  Add fork-inferior.o.
11128
11129 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11130
11131         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
11132         (read_pieced_value, write_pieced_value): ...here.  Reduce to
11133         wrappers that just call rw_pieced_value.
11134
11135 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11136
11137         * dwarf2loc.c (write_pieced_value): When writing the data for a
11138         memory piece, use write_memory_with_notification instead of
11139         write_memory.
11140
11141 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11142
11143         * valops.c (read_value_memory): Change embedded_offset to
11144         represent a bit offset instead of a byte offset.
11145         * value.h (read_value_memory): Adjust comment.
11146
11147 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11148
11149         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
11150         dest_offset_bits and source_offset_bits.
11151         (write_pieced_value): Likewise.
11152
11153 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11154
11155         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
11156         given by DW_OP_bit_piece.
11157         (write_pieced_value): Likewise.
11158
11159 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11160
11161         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
11162         some other preparations to the places where sufficient information
11163         is available.
11164         (write_pieced_value): Likewise.
11165
11166 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11167
11168         * dwarf2loc.c (bits_to_bytes): New function.
11169         (read_pieced_value): Fix offset calculations for register pieces
11170         on big-endian targets.
11171         (write_pieced_value): Likewise.
11172
11173 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11174
11175         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
11176         (write_pieced_value): Likewise.
11177
11178 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11179
11180         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
11181         transfer the source value's least significant bits, instead of its
11182         lowest-addressed ones.  Rename type_len to max_offset.
11183         (read_pieced_value): Mirror above changes to write_pieced_value as
11184         applicable.
11185
11186 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11187
11188         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
11189         truncate full bytes from dest_offset_bits before using it as an
11190         offset into the buffer.
11191
11192 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11193
11194         * dwarf2loc.c (write_pieced_value): Include transfer size in
11195         byte-wise check.
11196
11197 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11198
11199         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
11200         calculation of this_size.
11201
11202 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11203
11204         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
11205         when targeting a bit-field.
11206         (write_pieced_value): Likewise.
11207
11208 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11209
11210         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
11211         (allocate_piece_closure): Drop addr_size parameter.
11212         (dwarf2_evaluate_loc_desc_full): Adjust call to
11213         allocate_piece_closure.
11214
11215 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11216
11217         PR gdb/21226
11218         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
11219         the LSB end, independent of endianness.
11220
11221 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11222
11223         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
11224         size capping.
11225
11226 2017-06-13  Yao Qi  <yao.qi@linaro.org>
11227
11228         * mips-linux-nat.c: Move include features/mips*-linux.c to
11229         mips-linux-tdep.c.
11230         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
11231         to mips-linux-tdep.c.
11232         * mips-linux-tdep.c: Include features/mips*-linux.c
11233         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
11234         functions.
11235         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
11236         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
11237         (tdesc_mips64_dsp_linux): Declare.
11238
11239 2017-06-12  Tom Tromey  <tom@tromey.com>
11240
11241         * valprint.h (val_print_type_code_int): Remove.
11242         * valprint.c (generic_val_print_int): Always call
11243         val_print_scalar_formatted.
11244         (val_print_type_code_int): Remove.
11245         * printcmd.c (print_scalar_formatted): Handle options->format==0.
11246         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
11247         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
11248         * ada-valprint.c (ada_val_print_num): Use
11249         val_print_scalar_formatted.
11250
11251 2017-06-12  Tom Tromey  <tom@tromey.com>
11252
11253         * printcmd.c (print_scalar_formatted): Unify the two switches.
11254         Don't convert scalars to LONGEST.
11255
11256 2017-06-12  Tom Tromey  <tom@tromey.com>
11257
11258         PR exp/16225:
11259         * valprint.h (print_decimal_chars): Update.
11260         * valprint.c (maybe_negate_by_bytes): New function.
11261         (print_decimal_chars): Add "is_signed" argument.
11262         * printcmd.c (print_scalar_formatted): Update.
11263
11264 2017-06-12  Tom Tromey  <tom@tromey.com>
11265
11266         PR exp/16225:
11267         * valprint.h (print_binary_chars, print_hex_chars): Update.
11268         * valprint.c (val_print_type_code_int): Update.
11269         (print_binary_chars): Add "zero_pad" argument.
11270         (emit_octal_digit): New function.
11271         (print_octal_chars): Don't zero-pad.
11272         (print_decimal_chars): Likewise.
11273         (print_hex_chars): Add "zero_pad" argument.
11274         * sh64-tdep.c (sh64_do_fp_register): Update.
11275         * regcache.c (regcache::dump): Update.
11276         * printcmd.c (print_scalar_formatted): Update.
11277         * infcmd.c (default_print_one_register_info): Update.
11278
11279 2017-06-12  Pedro Alves  <palves@redhat.com>
11280             Alan Hayward  <alan.hayward@arm.com>
11281
11282         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
11283         (mips_eabi_push_dummy_call): Rename local 'regsize' to
11284         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
11285         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
11286         Assert that abi_regsize bytes fit in 'ref_valbuf'.
11287
11288 2017-06-12  Pedro Alves  <palves@redhat.com>
11289
11290         * dwarf2read.c (mapped_symtab::data): Now a vector of
11291         symtab_index_entry instead of vector of
11292         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
11293         whether an element's name is NULL instead of checking whether the
11294         element itself is NULL.
11295         (find_slot): Change return type.  Adjust.
11296         (hash_expand, , add_index_entry, uniquify_cu_indices)
11297         (write_hash_table): Adjust.
11298
11299 2017-06-12  Pedro Alves  <palves@redhat.com>
11300
11301         * dwarf2read.c (recursively_count_psymbols): New function.
11302         (write_psymtabs_to_index): Call it to compute number of psyms and
11303         pass estimate size of psyms_seen to unordered_set's ctor.
11304
11305 2017-06-12  Pedro Alves  <palves@redhat.com>
11306
11307         * dwarf2read.c (write_hash_table): Check if key already exists
11308         before emplacing.
11309
11310 2017-06-12  Pedro Alves  <palves@redhat.com>
11311
11312         * dwarf2read.c (data_buf::append_space): Rename to...
11313         (data_buf::grow): ... this, and make private.  Adjust all callers.
11314         (data_buf::append_uint): New method.
11315         (add_address_entry, write_one_signatured_type)
11316         (write_psymtabs_to_index): Use it.
11317
11318 2017-06-12  Pedro Alves  <palves@redhat.com>
11319
11320         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
11321         (file_write (FILE *, const std::vector<Elem>&)): Delete.
11322         (data_buf::file_write): Call ::fwrite directly.
11323
11324 2017-06-12  Pedro Alves  <palves@redhat.com>
11325
11326         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
11327         std::vector::erase.
11328
11329 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
11330
11331         Code cleanup: C++ify .gdb_index producer.
11332         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
11333         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
11334         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
11335         (create_strtab, add_string): Remove.
11336         (file_write, data_buf): New.
11337         (struct symtab_index_entry): Use std::vector for cu_indices.
11338         (struct mapped_symtab): Use std::vector for data.
11339         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
11340         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
11341         Remove.
11342         (find_slot): Change return type.  Update it to the new data structures.
11343         (hash_expand, add_index_entry): Update it to the new data structures.
11344         (offset_type_compare): Remove.
11345         (uniquify_cu_indices): Update it to the new data structures.
11346         (c_str_view, c_str_view_hasher, vector_hasher): New.
11347         (add_indices_to_cpool): Remove.
11348         (write_hash_table): Update it to the new data structures.
11349         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
11350         (eq_psymtab_cu_index): Remove.
11351         (psym_index_map): New typedef.
11352         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
11353         reference and std::unordered_map for cu_index_htab.
11354         (add_address_entry, add_address_entry_worker, write_address_map)
11355         (write_psymbols): Update it to the new data structures.
11356         (write_obstack): Remove.
11357         (struct signatured_type_index_data): Change types_list to a data_buf
11358         reference and psyms_seen to a std::unordered_set reference.
11359         (write_one_signatured_type, recursively_write_psymbols)
11360         (write_psymtabs_to_index): Update it to the new data structures.
11361
11362 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
11363
11364         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
11365         separate-debug-file commands.
11366         * symfile.h (separate_debug_file_debug): New global.
11367         * symfile.c (separate_debug_file_debug): New global.
11368         (separate_debug_file_exists, find_separate_debug_file): Add
11369         debug output.
11370         (_initialize_symfile): Add "set debug separate-debug-file"
11371         command.
11372         * build-id.c (build_id_to_debug_bfd,
11373         find_separate_debug_file_by_buildid): Add debug output.
11374
11375 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
11376
11377         * gdbarch.sh (displaced_step_free_closure): Remove.
11378         * gdbarch.h, gdbarch.c: Re-generate.
11379         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
11380         displaced_step_free_closure.
11381         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
11382         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
11383         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
11384         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11385         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
11386         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11387         * arch-utils.h (simple_displaced_step_free_closure): Remove.
11388         * arch-utils.c (simple_displaced_step_free_closure): Remove.
11389         * infrun.c (displaced_step_clear): Call xfree instead of
11390         gdbarch_displaced_step_free_closure.
11391
11392 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
11393
11394         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
11395         NULL".
11396
11397 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
11398
11399         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
11400         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
11401         (mn10300_push_dummy_call): Likewise.
11402
11403 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
11404
11405         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
11406
11407 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
11408
11409         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
11410
11411 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
11412
11413         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
11414         able to start inferiors using a shell.
11415         (New remote packets): Announce new packet "QStartupWithShell".
11416         * remote.c: Add PACKET_QStartupWithShell.
11417         (extended_remote_create_inferior): Handle new
11418         PACKET_QStartupWithShell.
11419         (remote_protocol_features) <QStartupWithShell>: New entry for
11420         PACKET_QStartupWithShell.
11421         (_initialize_remote): Call "add_packet_config_cmd" for
11422         QStartupShell.
11423
11424 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
11425             Pedro Alves  <palves@redhat.com>
11426
11427         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
11428         and "nat/fork-inferior.h".
11429         * common/common-inferior.h: New file, with contents from
11430         "gdb/inferior.h".
11431         * commom/common-utils.c: Include "common-utils.h".
11432         (stringify_argv): New function.
11433         * common/common-utils.h (stringify_argv): New prototype.
11434         * configure.nat: Add "fork-inferior.o" as a dependency for
11435         "*linux*", "fbsd*" and "nbsd*" hosts.
11436         * corefile.c (get_exec_file): Update comment.
11437         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
11438         instead of "startup_inferior".
11439         (darwin_create_inferior): Call "add_thread_silent" after
11440         "fork_inferior".
11441         * fork-child.c: Cleanup unnecessary includes.
11442         (SHELL_FILE): Move to "common/common-fork-child.c".
11443         (environ): Likewise.
11444         (exec_wrapper): Initialize.
11445         (get_exec_wrapper): New function.
11446         (breakup_args): Move to "common/common-fork-child.c"; rename to
11447         "breakup_args_for_exec".
11448         (escape_bang_in_quoted_argument): Move to
11449         "common/common-fork-child.c".
11450         (saved_ui): New variable.
11451         (prefork_hook): New function.
11452         (postfork_hook): Likewise.
11453         (postfork_child_hook): Likewise.
11454         (gdb_startup_inferior): Likewise.
11455         (fork_inferior): Move to "common/common-fork-child.c".  Update
11456         function to support gdbserver.
11457         (startup_inferior): Likewise.
11458         * gdbcore.h (get_exec_file): Remove declaration.
11459         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
11460         instead of "startup_inferior".  Call "add_thread_silent" after
11461         "fork_inferior".
11462         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
11463         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
11464         instead of "startup_inferior".  Call "add_thread_silent" after
11465         "fork_inferior".
11466         * inferior.h: Include "common-inferior.h".
11467         (trace_start_error): Move to "common/common-utils.h".
11468         (trace_start_error_with_name): Likewise.
11469         (fork_inferior): Move prototype to "nat/fork-inferior.h".
11470         (startup_inferior): Likewise.
11471         (gdb_startup_inferior): New prototype.
11472         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
11473         * nat/fork-inferior.h: New file.
11474         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
11475         instead of "startup_inferior".  Call "add_thread_silent" after
11476         "fork_inferior".
11477         * target.h (target_terminal_init): Move prototype to
11478         "target/target.h".
11479         (target_terminal_inferior): Likewise.
11480         (target_terminal_ours): Likewise.
11481         * target/target.h (target_terminal_init): New prototype, moved
11482         from "target.h".
11483         (target_terminal_inferior): Likewise.
11484         (target_terminal_ours): Likewise.
11485         * utils.c (gdb_flush_out_err): New function.
11486
11487 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
11488
11489         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
11490         * common/common-gdbthread.h: New file, with parts from
11491         "gdb/gdbthread.h".
11492         * gdbthread.h: Include "common-gdbthread.h".
11493         (switch_to_thread): Moved to "common/common-gdbthread.h".
11494
11495 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
11496
11497         * Makefile.in (SFILES): Add "common/job-control.c".
11498         (HFILES_NO_SRCDIR): Add "common/job-control.h".
11499         (COMMON_OBS): Add "job-control.o".
11500         * common/job-control.c: New file, with contents from
11501         "gdb/inflow.c".
11502         * common/job-control.h: New file, with contents from "terminal.h".
11503         * fork-child.c: Include "job-control.h".
11504         * inflow.c: Include "job-control.h".
11505         (gdb_setpgid): Move to "common/common-inflow.c".
11506         (_initialize_inflow): Move setting of "job_control" to
11507         "handle_job_control".
11508         * terminal.h (job_control): Moved to "common/common-terminal.h".
11509         (gdb_setpgid): Likewise.
11510         * top.c: Include "job_control.h".
11511         * utils.c: Likewise.
11512         (job_control): Moved to "job-control.c".
11513
11514 2017-06-07  Pedro Alves  <palves@redhat.com>
11515
11516         * Makefile.in (SFILES): Add gdb_regex.c.
11517         (COMMON_OBS): Add gdb_regex.o.
11518         * ada-lang.c (ada_add_standard_exceptions)
11519         (ada_add_exceptions_from_frame, name_matches_regex)
11520         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
11521         parameter type to compiled_regex.  Adjust.
11522         (ada_exceptions_list): Use compiled_regex.
11523         * break-catch-throw.c (exception_catchpoint::pattern): Now a
11524         std::unique_ptr<compiled_regex>.
11525         (exception_catchpoint::~exception_catchpoint): Remove regfree
11526         call.
11527         (check_status_exception_catchpoint): Adjust to use compiled_regex.
11528         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
11529         * breakpoint.c (solib_catchpoint::compiled): Now a
11530         std::unique_ptr<compiled_regex>.
11531         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
11532         (check_status_catch_solib): Adjust to use compiled_regex.
11533         (add_solib_catchpoint): Adjust to use compiled_regex.
11534         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
11535         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
11536         compiled_regex reference.  Adjust to use it.
11537         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
11538         declaration.  Include "gdb_regex.h".
11539         (apropos_cmd): Change regex parameter to compiled_regex reference.
11540         * gdb_regex.c: New file.
11541         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
11542         declarations.
11543         (class compiled_regex): New.
11544         * linux-tdep.c: Include "common/gdb_optional.h".
11545         (struct mapping_regexes): New, factored out from
11546         mapping_is_anonymous_p, and adjusted to use compiled_regex.
11547         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
11548         gdb::optional and remove cleanups.  Adjust to compiled_regex.
11549         * probe.c: Include "common/gdb_optional.h".
11550         (collect_probes): Use compiled_regex and gdb::optional and remove
11551         cleanups.
11552         * skip.c: Include "common/gdb_optional.h".
11553         (skiplist_entry::compiled_function_regexp): Now a
11554         gdb::optional<compiled_regex>.
11555         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
11556         (free_skiplist_entry): Remove regfree call.
11557         (compile_skip_regexp, skip_rfunction_p): Adjust to use
11558         compiled_regex and gdb::optional.
11559         * symtab.c: Include "common/gdb_optional.h".
11560         (search_symbols): Use compiled_regex and gdb::optional.
11561         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
11562         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
11563         to gdb_regex.c.
11564
11565 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
11566
11567         * regcache.c (regcache::save): Avoid buffer use.
11568         (regcache::dump): Likewise.
11569
11570 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
11571
11572         * sh-tdep.c (sh_pseudo_register_read): Remove
11573         MAX_REGISTER_SIZE.
11574         (sh_pseudo_register_write): Likewise.
11575         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
11576         (sh64_pseudo_register_write): Likewise
11577
11578 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
11579
11580         * aarch64-tdep.c (aarch64_store_return_value): Use
11581         V_REGISTER_SIZE.
11582         (aarch64_pseudo_read_value): Likewise.
11583         (aarch64_pseudo_write): Likewise.
11584
11585 2017-06-06  Yao Qi  <yao.qi@linaro.org>
11586
11587         * regformats/regdef.h (set_register_cache): Remove the
11588         declaration.
11589
11590 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
11591
11592         * frame.c (frame_unwind_register_signed): Use
11593         frame_unwind_register_value.
11594
11595 2017-06-06  Pedro Alves  <palves@redhat.com>
11596
11597         PR breakpoints/21553
11598         * breakpoint.c (create_breakpoints_sal_default)
11599         (init_breakpoint_sal, create_breakpoint_sal): Use
11600         gdb::unique_xmalloc_ptr for string parameters.
11601         (create_breakpoint): Constify 'extra_string' and 'cond_string'
11602         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
11603         (base_breakpoint_create_breakpoints_sal)
11604         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
11605         (strace_marker_create_breakpoints_sal)
11606         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
11607         string parameters.
11608         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
11609         gdb::unique_xmalloc_ptr for string parameters.
11610         (create_breakpoint): Constify 'extra_string' and 'cond_string'
11611         parameters.
11612
11613 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
11614
11615         * alpha-tdep.c (alpha_register_to_value): Use
11616         get_frame_register_value.
11617         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
11618
11619 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
11620
11621         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
11622         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
11623         (ia64_value_to_register): Likewise.
11624         (ia64_extract_return_value): Likewise.
11625         (ia64_store_return_value): Likewise.
11626         (ia64_push_dummy_call): Likewise.
11627
11628 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
11629
11630         GDB 8.0 released.
11631
11632 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
11633
11634         * x86-linux-nat.c (struct arch_lwp_info): Remove.
11635
11636 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
11637
11638         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
11639         parameter.
11640         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
11641
11642 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
11643
11644         * event-loop.c (poll_timers): Unallocate timer using delete
11645         instead of xfree.
11646
11647 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
11648
11649         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
11650         (struct breakpoint) <~breakpoint>: New.
11651         (struct watchpoint): Inherit from breakpoint.
11652         <~watchpoint>: New.
11653         <base>: Remove.
11654         (struct tracepoint): Inherit from breakpoint.
11655         <base>: Remove.
11656         * breakpoint.c (longjmp_breakpoint_ops): Remove.
11657         (struct longjmp_breakpoint): Inherit from breakpoint.
11658         <~longjmp_breakpoint>: New.
11659         <base>: Remove.
11660         (new_breakpoint_from_type): Remove casts.
11661         (watchpoint_in_thread_scope): Remove reference to base field.
11662         (watchpoint_del_at_next_stop): Likewise.
11663         (update_watchpoint): Likewise.
11664         (watchpoint_check): Likewise.
11665         (bpstat_check_watchpoint): Likewise.
11666         (set_longjmp_breakpoint): Likewise.
11667         (struct fork_catchpoint): Inherit from breakpoint.
11668         <base>: Remove.
11669         (struct solib_catchpoint): Inherit from breakpoint.
11670         <~solib_catchpoint>: New.
11671         <base>: Remove.
11672         (dtor_catch_solib): Change to ...
11673         (solib_catchpoint::~solib_catchpoint): ... this.
11674         (breakpoint_hit_catch_solib): Remove reference to base field.
11675         (add_solib_catchpoint): Likewise.
11676         (create_fork_vfork_event_catchpoint): Likewise.
11677         (struct exec_catchpoint): Inherit from breakpoint.
11678         <~exec_catchpoint>: New.
11679         <base>: Remove.
11680         (dtor_catch_exec): Change to ...
11681         (exec_catchpoint::~exec_catchpoint): ... this.
11682         (dtor_watchpoint): Change to ...
11683         (watchpoint::~watchpoint): ... this.
11684         (watch_command_1): Remove reference to base field.
11685         (catch_exec_command_1): Likewise.
11686         (base_breakpoint_dtor): Change to ...
11687         (breakpoint::~breakpoint): ... this.
11688         (base_breakpoint_ops): Remove dtor field value.
11689         (longjmp_bkpt_dtor): Change to ...
11690         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
11691         (strace_marker_create_breakpoints_sal): Remove reference to base
11692         field.
11693         (delete_breakpoint): Don't manually call breakpoint destructor.
11694         (create_tracepoint_from_upload): Remove reference to base field.
11695         (trace_pass_set_count): Likewise.
11696         (initialize_breakpoint_ops): Don't initialize
11697         momentary_breakpoint_ops, don't set dtors.
11698         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
11699         <~ada_catchpoint>: New.
11700         <base>: Remove.
11701         (create_excep_cond_exprs): Remove reference to base field.
11702         (dtor_exception): Change to ...
11703         (ada_catchpoint::~ada_catchpoint): ... this.
11704         (dtor_catch_exception): Remove.
11705         (dtor_catch_exception_unhandled): Remove.
11706         (dtor_catch_assert): Remove.
11707         (create_ada_exception_catchpoint): Remove reference to base
11708         field.
11709         (initialize_ada_catchpoint_ops): Don't set dtors.
11710         * break-catch-sig.c (struct signal_catchpoint): Inherit from
11711         breakpoint.
11712         <~signal_catchpoint>: New.
11713         <base>: Remove.
11714         (signal_catchpoint_dtor): Change to ...
11715         (signal_catchpoint::~signal_catchpoint): ... this.
11716         (create_signal_catchpoint): Remove reference to base field.
11717         (initialize_signal_catchpoint_ops): Don't set dtor.
11718         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
11719         from breakpoint.
11720         <~syscall_catchpoint>: New.
11721         <base>: Remove.
11722         (dtor_catch_syscall): Change to ...
11723         (syscall_catchpoint::~syscall_catchpoint): ... this.
11724         (create_syscall_event_catchpoint): Remove reference to base
11725         field.
11726         (initialize_syscall_catchpoint_ops): Don't set dtor.
11727         * break-catch-throw.c (struct exception_catchpoint): Inherit
11728         from breakpoint.
11729         <~exception_catchpoint>: New.
11730         <base>: Remove.
11731         (dtor_exception_catchpoint): Change to ...
11732         (exception_catchpoint::~exception_catchpoint): ... this.
11733         (handle_gnu_v3_exceptions): Remove reference to base field.
11734         (initialize_throw_catchpoint_ops): Don't set dtor.
11735         * ctf.c (ctf_get_traceframe_address): Remove reference to base
11736         field.
11737         * remote.c (remote_get_tracepoint_status): Likewise.
11738         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
11739         * tracefile.c (tracefile_fetch_registers): Likewise.
11740         * tracepoint.c (actions_command): Likewise.
11741         (validate_actionline): Likewise.
11742         (tfind_1): Likewise.
11743         (get_traceframe_location): Likewise.
11744         (find_matching_tracepoint_location): Likewise.
11745         (parse_tracepoint_status): Likewise.
11746         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
11747
11748 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
11749
11750         * breakpoint.c (struct longjmp_breakpoint): New struct.
11751         (is_tracepoint_type): Change return type to bool.
11752         (is_longjmp_type): New function.
11753         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
11754         (set_raw_breakpoint_without_location): Use
11755         new_breakpoint_from_type.
11756         (set_raw_breakpoint): Likewise.
11757
11758 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
11759
11760         * breakpoint.c (new_breakpoint_from_type): New function.
11761         (create_breakpoint_sal): Use new_breakpoint_from_type and
11762         unique_ptr.
11763         (create_breakpoint): Likewise.
11764
11765 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
11766
11767         * memattr.c (mem_info_command): Rename to ...
11768         (info_mem_command): ... this.
11769         (mem_enable_command): Rename to ...
11770         (enable_mem_command): ... this.
11771         (mem_disable_command): Rename to ...
11772         (disable_mem_command): ... this.
11773         (mem_delete_command): Rename to ...
11774         (delete_mem_command): ... this.
11775         (_initialize_mem): Adjust function names.
11776
11777 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
11778
11779         * btrace.c (handle_pt_insn_events): New.
11780         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
11781         STATUS.  Split into this and ...
11782         (handle_pt_insn_event_flags): ... this.
11783
11784 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
11785
11786         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
11787         and struct pt_insn.resynced.
11788         * configure: Regenerated.
11789         * config.in: Regenerated.
11790
11791 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11792
11793         * btrace.c (ftrace_find_call_by_number): New function.
11794         (ftrace_new_function): Store objects, not pointers.
11795         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
11796         ftrace_new_gap, ftrace_update_function,
11797         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
11798         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
11799         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
11800         btrace_ends_with_single_insn, btrace_call_get): Account for
11801         btrace_thread_info::functions now storing objects.
11802         * btrace.h (struct btrace_thread_info): Add constructor.
11803         (struct btrace_thread_info) <functions>: Make std::vector.
11804         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
11805         Initialize with default values.
11806         * record-btrace.c (record_btrace_frame_sniffer): Account for
11807         btrace_thread_info::functions now storing objects.
11808
11809 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11810
11811         * btrace.c: Remove typedef bfun_s.
11812         (ftrace_new_gap): Directly add gaps to the list of gaps.
11813         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
11814         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
11815         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
11816         instead of gdb VEC.
11817
11818 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11819
11820         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
11821         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
11822         with btrace_thread_info::next_segment and
11823         btrace_thread_info::prev_segment.
11824         * btrace.h: Remove struct btrace_func_link.
11825         (struct btrace_function): Replace pair of function segment pointers
11826         with pair of indices.
11827         * python/py-record-btrace.c (btpy_call_prev_sibling,
11828         btpy_call_next_sibling): Replace references to
11829         btrace_thread_info::segment with btrace_thread_info::next_segment and
11830         btrace_thread_info::prev_segment.
11831         * record-btrace.c (record_btrace_frame_this_id): Use
11832         btrace_find_call_by_number.
11833
11834 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11835
11836         * btrace.c (ftrace_new_function, ftrace_fixup_level,
11837         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
11838         btrace_insn_next, btrace_insn_prev): Remove references to
11839         btrace_thread_info::flow.
11840         * btrace.h (struct btrace_function): Remove FLOW.
11841
11842 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11843
11844         * btrace.c (ftrace_find_call_by_number): New function.
11845         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
11846         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
11847         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
11848         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
11849         index.
11850         * btrace.h (struct btrace_function): Turn UP into an index.
11851         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
11852         as an index.
11853         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
11854         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
11855         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
11856
11857 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11858
11859         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11860         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11861         ftrace_update_function, ftrace_compute_global_level_offset,
11862         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
11863         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
11864         btrace_insn_end, btrace_is_empty): Remove references to
11865         btrace_thread_info::begin and btrace_thread_info::end.
11866         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
11867         (struct btrace_thread_info) <functions>: Adjust comment.
11868         * record-btrace.c (record_btrace_start_replaying): Remove reference to
11869         btrace_thread_info::begin.
11870
11871 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11872
11873         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11874         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11875         ftrace_update_function): Remove arguments that implicitly were always
11876         BTINFO->END.
11877         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
11878         Don't pass BTINFO->END.
11879
11880 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11881
11882         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
11883         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
11884         btrace_find_insn_by_number): Replace function segment pointer with
11885         index.
11886         (btrace_insn_cmp): Simplify.
11887         * btrace.h: (struct btrace_insn_iterator) Rename index to
11888         insn_index.  Replace function segment pointer with index into function
11889         segment vector.
11890         * record-btrace.c (record_btrace_call_history): Replace function
11891         segment pointer use with index.
11892         (record_btrace_frame_sniffer): Retrieve function call segment through
11893         vector.
11894         (record_btrace_set_replay): Remove defunc't safety check.
11895
11896 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11897
11898         * btrace.c (btrace_ends_with_single_insn): New function.
11899         (btrace_call_get, btrace_call_number, btrace_call_begin,
11900         btrace_call_end, btrace_call_next, btrace_call_prev,
11901         btrace_find_call_by_number): Use index into call segment vector
11902         instead of pointer.
11903         (btrace_call_cmp): Simplify.
11904         * btrace.h (struct btrace_call_iterator): Replace function call segment
11905         pointer with index into vector.
11906         * record-btrace.c (record_btrace_call_history): Use index instead of
11907         pointer.
11908
11909 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11910
11911         * btrace.c (btrace_insn_begin, btrace_insn_end,
11912         btrace_find_insn_by_number): Add btinfo to iterator.
11913         * btrace.h (struct btrace_insn_iterator): Add btinfo.
11914
11915 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11916
11917         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
11918         and save pointers directly.
11919         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
11920         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
11921         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
11922         changed signature of functions.
11923         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
11924         (btrace_fetch): Remove code that adds btrace_function pointers to
11925         vector of btrace_functions.
11926         (btrace_clear): Simplify freeing vector of btrace_functions.
11927
11928 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11929
11930         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
11931         Replace VEC_* with std::vector functions.
11932         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
11933         (struct btrace_thread_info)<functions>: Change type to std::vector.
11934
11935 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
11936
11937         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
11938         "Removed targets and native configurations" up.  Merge duplicate
11939         "New commands" sub-sections.  Add "New options" sub-sections.
11940
11941 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
11942
11943         * defs.h (copy_integer_to_size): New declaration.
11944         * findvar.c (copy_integer_to_size): New function.
11945         (do_cint_test): New selftest function.
11946         (copy_integer_to_size_test): Likewise.
11947         (_initialize_findvar): Likewise.
11948         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
11949         (mips_fbsd_collect_reg): Use raw_collect_integer.
11950         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
11951         (mips64_fill_gregset): Use raw_collect_integer
11952         (mips64_fill_fpregset): Use raw_supply_integer.
11953         * regcache.c (regcache::raw_supply_integer): New function.
11954         (regcache::raw_collect_integer): Likewise.
11955         * regcache.h: (regcache::raw_supply_integer): New declaration.
11956         (regcache::raw_collect_integer): Likewise.
11957
11958 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11959
11960         * Makefile.in (SFILES): Add gdbarch-selftests.c.
11961         (COMMON_OBS): Add gdbarch-selftests.o.
11962         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
11963         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
11964         * gdbarch-selftests.c: New file.
11965         * regcache.h (regcache) <~regcache>: Mark it virtual if
11966         GDB_SELF_TEST.
11967         <raw_write>: Likewise.
11968
11969 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11970
11971         * regcache.c (current_regcache): Change it to
11972         regcache::current_regcache.
11973         (regcache_observer_target_changed): Update.
11974         (regcache_thread_ptid_changed): Make it a regcache static
11975         method.
11976         (regcache_thread_ptid_changed): Update.
11977         (class regcache_access): New.
11978         (current_regcache_test): Update.
11979         (_initialize_regcache): Update.
11980         * regcache.h: Include forward_list.
11981         (regcache): Declare regcache_thread_ptid_changed and declare
11982         registers_changed_ptid as friend.
11983
11984 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11985
11986         * i387-tdep.c (i387_register_to_value): Use register_size
11987         instead of TYPE_LENGTH.
11988         * m68k-tdep.c (m68k_register_to_value): Likewise.
11989
11990 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11991
11992         * i387-tdep.c (i387_convert_register_p): Return false if type
11993         code isn't TYPE_CODE_FLT.
11994
11995 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11996
11997         * alpha-tdep.c (alpha_convert_register_p): Return true if type
11998         length is 4.
11999         (alpha_register_to_value): Remove type length check.
12000         (alpha_value_to_register): Likewise.
12001
12002 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12003
12004         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
12005         TYPE_CODE_FLT.
12006
12007 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12008
12009         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
12010         TYPE_CODE_FLT or not.
12011
12012 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12013
12014         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
12015         * avr-tdep.c (avr_gdbarch_init): Likewise.
12016         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12017         * cris-tdep.c (cris_gdbarch_init): Likewise.
12018         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12019         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12020         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12021         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
12022         * mep-tdep.c (mep_gdbarch_init): Likewise.
12023         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12024         * mips-tdep.c (mips_gdbarch_init): Likewise.
12025         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12026         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12027         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12028         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12029         * v850-tdep.c (v850_gdbarch_init): Likewise.
12030
12031 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12032
12033         * selftest-arch.c (tests_with_arch): Call registers_changed
12034         and reinit_frame_cache.
12035         * selftest.c (run_self_tests): Likewise.
12036
12037 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12038
12039         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
12040         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
12041
12042 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12043
12044         * rl78-tdep.c (rl78_gdbarch_init): Don't call
12045         set_gdbarch_print_insn.
12046
12047 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12048
12049         * h8300-tdep.c (h8300_gdbarch_init): Don't call
12050         set_gdbarch_print_insn.
12051
12052 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12053
12054         * alpha-tdep.c (alpha_gdbarch_init): Don't call
12055         set_gdbarch_print_insn.
12056         * arc-tdep.c (arc_gdbarch_init): Likewise.
12057         * arch-utils.c: include dis-asm.h.
12058         (default_print_insn): New function.
12059         * arch-utils.h (default_print_insn): Declare.
12060         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
12061         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12062         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
12063         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
12064         * frv-tdep.c (frv_gdbarch_init): Likewise.
12065         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12066         * gdbarch.sh (print_insn): Use default_print_insn.
12067         * gdbarch.c: Regenerated.
12068         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
12069         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
12070         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12071         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
12072         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12073         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
12074         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
12075         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
12076         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
12077         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12078         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12079         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12080         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12081         * mt-tdep.c (mt_gdbarch_init): Likewise.
12082         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12083         * nios2-tdep.c (nios2_print_insn): Remove.
12084         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
12085         * rx-tdep.c (rx_gdbarch_init): Likewise.
12086         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
12087         * score-tdep.c (score_print_insn): Remove.
12088         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
12089         * sh-tdep.c (sh_gdbarch_init): Likewise.
12090         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12091         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12092         * tic6x-tdep.c (tic6x_print_insn): Remove.
12093         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
12094         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
12095         * v850-tdep.c (v850_gdbarch_init): Likewise.
12096         * vax-tdep.c (vax_gdbarch_init): Likewise.
12097         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12098         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
12099
12100 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
12101
12102         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
12103         (MIPS_FP0_REGNUM): Remove.
12104         (MIPS_FSR_REGNUM): Remove.
12105         (mips_fbsd_supply_fpregs): Use mips_regnum.
12106         (mips_fbsd_supply_gregs): Likewise.
12107         (mips_fbsd_collect_fpregs): Likewise.
12108         (mips_fbsd_collect_gregs): Likewise.
12109
12110 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
12111
12112         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
12113         (getpfpregs_supplies): New function.
12114         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
12115         getfpregs_supplies.
12116         (mips_fbsd_store_inferior_registers): Likewise.
12117
12118 2017-05-22  Pedro Alves <palves@redhat.com>
12119
12120         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
12121         maintainer.
12122
12123 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
12124
12125         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
12126         (store_register): Likewise.
12127         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
12128         (get_decimal_float_return_value): Likewise.
12129         (do_ppc_sysv_return_value): Likewise.
12130         (ppc64_sysv_abi_push_integer): Likewise.
12131         (ppc64_sysv_abi_push_freg): Likewise.
12132         (ppc64_sysv_abi_return_value_base): Likewise.
12133         (ppc64_sysv_abi_return_value): Likewise.
12134         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
12135         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
12136         * rs6000-nat.c: Likewise.
12137         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
12138         (rs6000_value_to_register): Likewise.
12139         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
12140
12141 2017-05-21  Tom Tromey  <tom@tromey.com>
12142
12143         PR rust/21466:
12144         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
12145         arrays as "[T]", not "[T; ]".
12146
12147 2017-05-19  Tom Tromey  <tom@tromey.com>
12148
12149         PR rust/21484:
12150         * rust-lang.c (exp_descriptor_rust): New function.
12151         (rust_language_defn): Use it.
12152         * p-lang.c (pascal_language_defn): Update.
12153         * opencl-lang.c (opencl_language_defn): Update.
12154         * objc-lang.c (objc_language_defn): Update.
12155         * m2-lang.c (m2_language_defn): Update.
12156         * language.h (struct language_defn)
12157         <la_watch_location_expression>: New member.
12158         * language.c (unknown_language_defn, auto_language_defn)
12159         (local_language_defn): Update.
12160         * go-lang.c (go_language_defn): Update.
12161         * f-lang.c (f_language_defn): Update.
12162         * d-lang.c (d_language_defn): Update.
12163         * c-lang.h (c_watch_location_expression): Declare.
12164         * c-lang.c (c_watch_location_expression): New function.
12165         (c_language_defn, cplus_language_defn, asm_language_defn)
12166         (minimal_language_defn): Use it.
12167         * breakpoint.c (watch_command_1): Call
12168         la_watch_location_expression.
12169         * ada-lang.c (ada_language_defn): Update.
12170
12171 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12172
12173         PR tui/21482
12174         * gdb_curses.h (NOMACROS): Define.
12175         (NCURSES_NOMACROS): Define.
12176
12177 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12178
12179         PR tui/21482
12180         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
12181         arg to char *.
12182         * tui/tui-wingeneral.c (box_win): Likewise.
12183         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
12184         (tui_show_source_line): Likewise.
12185         (tui_show_exec_info_content): Likewise.
12186
12187 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
12188
12189         * sparc-tdep.c (sparc_structure_return_p)
12190         (sparc_arg_on_registers_p): New functions.
12191         (sparc32_store_arguments): Use them.
12192         * sparc64-tdep.c (sparc64_16_byte_align_p)
12193         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
12194         Handle TYPE_CODE_ARRAY.
12195
12196 2017-05-17  Yao Qi  <yao.qi@linaro.org>
12197
12198         * cli/cli-decode.c (add_alias_cmd): New function.
12199         * command.h (add_alias_cmd): Declare.
12200         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
12201         instead call add_alias_cmd.
12202
12203 2017-05-17  Pedro Alves  <palves@redhat.com>
12204
12205         * Makefile.in (nat_extra_makefile_frag): Rename to ...
12206         (nat_makefile_frag): ... this.  All references updated.
12207         * configure.ac: Likewise.
12208         * configure.nat: Likewise.  Enhance comments.
12209         * configure: Regenerate.
12210
12211 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12212
12213         * procfs.c (procfs_create_inferior): Change prototype to match
12214         definition.
12215
12216 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
12217
12218         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
12219         C++ compiler warning.
12220
12221 2017-05-12  Tom Tromey  <tom@tromey.com>
12222
12223         PR rust/21483:
12224         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
12225         recurse, just call value_struct_elt directly.
12226
12227 2017-05-12  Tom Tromey  <tom@tromey.com>
12228
12229         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
12230         OP_RUST_ARRAY>: Fix.
12231
12232 2017-05-12  Tom Tromey  <tom@tromey.com>
12233
12234         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
12235
12236 2017-05-09  Yao Qi  <yao.qi@linaro.org>
12237
12238         * regcache.c: Include <forward_list>.
12239         (struct regcache_list): Remove.
12240         (current_regcache): Update.
12241         (get_thread_arch_aspace_regcache): Update for std::forward_list.
12242         (regcache_thread_ptid_changed): Likewise.
12243         (registers_changed_ptid): Likewise.
12244         (current_regcache_size): Likewise.
12245
12246 2017-05-09  Yao Qi  <yao.qi@linaro.org>
12247
12248         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
12249         (current_regcache_size): New function.
12250         (current_regcache_test): New function.
12251         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
12252
12253 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
12254
12255         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
12256         (print_gp_register_row): Use get_frame_register_value.
12257
12258 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
12259
12260         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
12261         (mips_supply_fpregset): Likewise.
12262         (mips64_supply_gregset): Likewise.
12263
12264 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
12265
12266         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
12267         regcache->raw_supply_zeroed.
12268
12269 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
12270
12271         * configure.nat: Rearrange 'case' statements to match
12272         host before cpu.
12273
12274 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
12275
12276         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
12277         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
12278         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
12279         "@nat_extra_makefile_frag@".
12280         (Makefile): Remove dependency on "@frags@".
12281         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
12282         (data-directory/Makefile): Likewise.
12283         * config/aarch64/linux.mh: Deleted; moved contents to
12284         "gdb/configure.nat".
12285         * config/alpha/alpha-linux.mh: Likewise.
12286         * config/alpha/nbsd.mh: Likewise.
12287         * config/arm/linux.mh: Likewise.
12288         * config/arm/nbsdelf.mh: Likewise.
12289         * config/i386/cygwin.mh: Likewise.
12290         * config/i386/cygwin64.mh: Likewise.
12291         * config/i386/darwin.mh: Likewise.
12292         * config/i386/fbsd.mh: Likewise.
12293         * config/i386/fbsd64.mh: Likewise.
12294         * config/i386/go32.mh: Likewise.
12295         * config/i386/i386gnu.mh: Likewise.
12296         * config/i386/i386sol2.mh: Likewise.
12297         * config/i386/linux.mh: Likewise.
12298         * config/i386/linux64.mh: Likewise.
12299         * config/i386/mingw.mh: Likewise.
12300         * config/i386/mingw64.mh: Likewise.
12301         * config/i386/nbsd64.mh: Likewise.
12302         * config/i386/nbsdelf.mh: Likewise.
12303         * config/i386/nto.mh: Likewise.
12304         * config/i386/obsd.mh: Likewise.
12305         * config/i386/obsd64.mh: Likewise.
12306         * config/i386/sol2-64.mh: Likewise.
12307         * config/ia64/linux.mh: Likewise.
12308         * config/m32r/linux.mh: Likewise.
12309         * config/m68k/linux.mh: Likewise.
12310         * config/m68k/nbsdelf.mh: Likewise.
12311         * config/m68k/obsd.mh: Likewise.
12312         * config/m88k/obsd.mh: Likewise.
12313         * config/mips/fbsd.mh: Likewise.
12314         * config/mips/linux.mh: Likewise.
12315         * config/mips/nbsd.mh: Likewise.
12316         * config/mips/obsd64.mh: Likewise.
12317         * config/pa/linux.mh: Likewise.
12318         * config/pa/nbsd.mh: Likewise.
12319         * config/pa/obsd.mh: Likewise.
12320         * config/powerpc/aix.mh: Likewise.
12321         * config/powerpc/fbsd.mh: Likewise.
12322         * config/powerpc/linux.mh: Likewise.
12323         * config/powerpc/nbsd.mh: Likewise.
12324         * config/powerpc/obsd.mh: Likewise.
12325         * config/powerpc/ppc64-linux.mh: Likewise.
12326         * config/powerpc/spu-linux.mh: Likewise.
12327         * config/s390/linux.mh: Likewise.
12328         * config/sh/nbsd.mh: Likewise.
12329         * config/sparc/fbsd.mh: Likewise.
12330         * config/sparc/linux.mh: Likewise.
12331         * config/sparc/linux64.mh: Likewise.
12332         * config/sparc/nbsd64.mh: Likewise.
12333         * config/sparc/nbsdelf.mh: Likewise.
12334         * config/sparc/obsd64.mh: Likewise.
12335         * config/sparc/sol2.mh: Likewise.
12336         * config/tilegx/linux.mh: Likewise.
12337         * config/vax/nbsdelf.mh: Likewise.
12338         * config/vax/obsd.mh: Likewise.
12339         * config/xtensa/linux.mh: Likewise.
12340         * config/i386/i386gnu.mn: New file, with excerpts from
12341         "config/i386/i386gnu.mh".
12342         * configure: Regenerate.
12343         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
12344         *.mh files under "gdb/config".
12345         * configure.nat: New file, with contents from the
12346         "gdb/config/*/*.mh" files.
12347
12348 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
12349
12350         * btrace.c (btrace_clear): Free insn vector.
12351
12352 2017-05-05  Pedro Alves  <palves@redhat.com>
12353
12354         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
12355         * configure: Regenerate.
12356
12357 2017-05-04  Pedro Alves  <palves@redhat.com>
12358
12359         * Makefile.in (SFILES): Add progspace-and-thread.c.
12360         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
12361         (COMMON_OBS): Add progspace-and-thread.o.
12362         * breakpoint.c: Include "progspace-and-thread.h".
12363         (update_inserted_breakpoint_locations)
12364         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
12365         Use scoped_restore_current_pspace_and_thread.
12366         (create_std_terminate_master_breakpoint): Use
12367         scoped_restore_current_program_space.
12368         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
12369         (print_breakpoint_location): Use
12370         scoped_restore_current_program_space.
12371         (bp_loc_is_permanent): Use
12372         scoped_restore_current_pspace_and_thread.
12373         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
12374         (download_tracepoint_locations): Use
12375         scoped_restore_current_pspace_and_thread.
12376         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
12377         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
12378         (enum step_over_calls_kind): Moved from inferior.h.
12379         (class scoped_restore_current_thread): New class.
12380         * gdbthread.h (make_cleanup_restore_current_thread): Delete
12381         declaration.
12382         (scoped_restore_current_thread): New class.
12383         * infcmd.c: Include "common/gdb_optional.h".
12384         (continue_1, proceed_after_attach): Use
12385         scoped_restore_current_thread.
12386         (notice_new_inferior): Use scoped_restore_current_thread.
12387         * inferior.c: Include "progspace-and-thread.h".
12388         (restore_inferior, save_current_inferior): Delete.
12389         (add_inferior_command, clone_inferior_command): Use
12390         scoped_restore_current_pspace_and_thread.
12391         * inferior.h (scoped_restore_current_inferior): New class.
12392         * infrun.c: Include "progspace-and-thread.h" and
12393         "common/gdb_optional.h".
12394         (follow_fork_inferior): Use
12395         scoped_restore_current_pspace_and_thread.
12396         (scoped_restore_exited_inferior): New class.
12397         (handle_vfork_child_exec_or_exit): Use
12398         scoped_restore_exited_inferior,
12399         scoped_restore_current_pspace_and_thread,
12400         scoped_restore_current_thread and scoped_restore.
12401         (fetch_inferior_event): Use scoped_restore_current_thread.
12402         * linespec.c (decode_line_full, decode_line_1): Use
12403         scoped_restore_current_program_space.
12404         * mi/mi-main.c: Include "progspace-and-thread.h".
12405         (exec_continue): Use scoped_restore_current_thread.
12406         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
12407         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
12408         * proc-service.c (ps_pglobal_lookup): Use
12409         scoped_restore_current_program_space.
12410         * progspace-and-thread.c: New file.
12411         * progspace-and-thread.h: New file.
12412         * progspace.c (release_program_space, clone_program_space): Use
12413         scoped_restore_current_program_space.
12414         (restore_program_space, save_current_program_space)
12415         (save_current_space_and_thread): Delete.
12416         (switch_to_program_space_and_thread): Moved to
12417         progspace-and-thread.c.
12418         * progspace.h (save_current_program_space)
12419         (save_current_space_and_thread): Delete declarations.
12420         (scoped_restore_current_program_space): New class.
12421         * remote.c (remote_btrace_maybe_reopen): Use
12422         scoped_restore_current_thread.
12423         * symtab.c: Include "progspace-and-thread.h".
12424         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
12425         * thread.c (print_thread_info_1): Use
12426         scoped_restore_current_thread.
12427         (struct current_thread_cleanup): Delete.
12428         (do_restore_current_thread_cleanup)
12429         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
12430         (scoped_restore_current_thread::~scoped_restore_current_thread):
12431         ... this new dtor.
12432         (make_cleanup_restore_current_thread): Rename/convert to ...
12433         (scoped_restore_current_thread::scoped_restore_current_thread):
12434         ... this new ctor.
12435         (thread_apply_all_command): Use scoped_restore_current_thread.
12436         (thread_apply_command): Use scoped_restore_current_thread.
12437         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
12438         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
12439
12440 2017-05-04  Pedro Alves  <palves@redhat.com>
12441
12442         * thread.c (make_cleanup_restore_current_thread): Move
12443         find_thread_ptid call before the is_stopped call.  Assert that the
12444         thread is found.  Replace is_stopped call by checking the thread's
12445         state directly.  Remove unnecessary NULL-thread check.
12446
12447 2017-05-04  Pedro Alves  <palves@redhat.com>
12448
12449         * corelow.c (thread_section_name): New class.
12450         (get_core_register_section, get_core_siginfo): Use it.
12451
12452 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12453
12454         * corelow.c (sniff_core_bfd): Remove extra semicolon.
12455         (get_core_register_section): Remove xfree of NULL pointer.
12456
12457 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
12458
12459         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
12460         * regcache.c (regcache::raw_supply_zeroed): New function.
12461         * regcache.h (regcache::raw_supply_zeroed): New declaration.
12462
12463 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
12464
12465         * gdbarch.sh: Remove commented out definition of
12466         TARGET_CHAR_BIT.
12467         * gdbarch.h: Re-generate.
12468
12469 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
12470
12471         * configure: Regenerate.
12472
12473 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
12474
12475         * solib-target.c (solib_target_relocate_section_addresses):
12476         Remove num_section_bases, num_bases, segment_bases variables.
12477
12478 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
12479
12480         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
12481
12482 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
12483
12484         * solib-target.c: Include <vector>
12485         (struct lm_info_target) <~lm_info_target>: Remove.
12486         <segment_bases, section_bases>: Change type to
12487         std::vector<CORE_ADDR>.
12488         (library_list_start_segment, library_list_start_section,
12489         library_list_end_library,
12490         solib_target_relocate_section_addresses): Adjust.
12491
12492 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
12493
12494         * gdbarch.sh (software_single_step): Change return type to
12495         std::vector<CORE_ADDR>.
12496         * gdbarch.c, gdbarch.h: Re-generate.
12497         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
12498         Adjust.
12499         (arm_deal_with_atomic_sequence_raw): Adjust.
12500         (thumb_get_next_pcs_raw): Adjust.
12501         (arm_get_next_pcs_raw): Adjust.
12502         (arm_get_next_pcs): Adjust.
12503         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
12504         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
12505         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
12506         (alpha_software_single_step): Adjust.
12507         * alpha-tdep.h (alpha_software_single_step): Adjust.
12508         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
12509         * arm-tdep.c (arm_software_single_step): Adjust.
12510         (arm_breakpoint_kind_from_current_state): Adjust.
12511         * arm-tdep.h (arm_software_single_step): Adjust.
12512         * breakpoint.c (insert_single_step_breakpoint): Adjust.
12513         * cris-tdep.c (cris_software_single_step): Adjust.
12514         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
12515         (micromips_deal_with_atomic_sequence): Adjust.
12516         (deal_with_atomic_sequence): Adjust.
12517         (mips_software_single_step): Adjust.
12518         * mips-tdep.h (mips_software_single_step): Adjust.
12519         * moxie-tdep.c (moxie_software_single_step): Adjust.
12520         * nios2-tdep.c (nios2_software_single_step): Adjust.
12521         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
12522         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
12523         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
12524         * s390-linux-tdep.c (s390_software_single_step): Adjust.
12525         * sparc-tdep.c (sparc_software_single_step): Adjust.
12526         * spu-tdep.c (spu_software_single_step): Adjust.
12527         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
12528
12529 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
12530
12531         * gdbarch.sh: Use semi-colon as field separator instead of colon.
12532         * gdbarch.h: Re-generate.
12533
12534 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
12535
12536         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
12537         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
12538         * python/py-instruction.c, python/py-instruction.h: New file.
12539         * python/py-record.c: Add py-instruction.h include.
12540         (gdbpy_initialize_record): Make gdb.Instruction a super class of
12541         gdb.RecordInstruction.
12542         * python/python-internal.h: Add gdbpy_initialize_instruction
12543         declaration.
12544         * python/python.c (do_start_initialization): Add
12545         gdbpy_initialize_instruction.
12546
12547 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
12548
12549         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
12550         Remove.
12551         (btrace_func_from_recpy_func): New function.
12552         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
12553         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
12554         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
12555         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
12556         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
12557         Also, use new helper functions.
12558         (btpy_list_item): Use new helper functions.
12559         (recpy_bt_function_call_history): Use new type name.
12560         (btpy_call_getset): Remove.
12561         (gdbpy_initialize_btrace): Remove code to initialize
12562         gdb.BtraceFunctionCall.
12563         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
12564         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
12565         recpy_bt_func_prev, recpy_bt_func_next): New export.
12566         * python/py-record.c (recpy_func_type): New static object.
12567         (recpy_func_new, recpy_func_level, recpy_func_symbol,
12568         recpy_func_instructions, recpy_func_up, recpy_func_prev,
12569         recpy_func_next): New function.
12570         (recpy_element_hash, recpy_element_richcompare): Updated comment.
12571         (recpy_func_getset): New static object.
12572         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
12573         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
12574
12575 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
12576
12577         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
12578         (btpy_object, btpy_insn_type, btpy_new): Remove.
12579         (btpy_list_object): Use gdb.RecordInstruction type instead of
12580         gdb.BtraceInstruction type.
12581         (btrace_insn_from_recpy_insn): New function.
12582         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
12583         btpy_new.
12584         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
12585         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
12586         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
12587         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
12588         instead of btpy_object.
12589         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12590         btpy_insn_data, btpy_insn_decode): Rename to ...
12591         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
12592         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
12593         recpy_bt_insn_decode): This.  Also, use new helper functions.
12594         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
12595         recpy_insn_type.
12596         (btpy_insn_getset): Remove.
12597         (gdbpy_initialize_btrace): Remove code to initialize
12598         gdb.BtraceInstruction.  Use recpy_element_object.
12599         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
12600         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
12601         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
12602         * python/py-record.c (recpy_insn_type): New static object.
12603         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
12604         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
12605         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
12606         New function.
12607         (recpy_insn_getset): New static object.
12608         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
12609         * python/py-record.h (recpy_element_object): New typedef.
12610         (recpy_insn_type, recpy_insn_new): New export.
12611
12612 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
12613
12614         * py-record-btrace.c (btpy_insn_new): Removed.
12615         (btpy_insn_or_gap_new): New function.
12616         (btpy_insn_error): Removed.
12617         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12618         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
12619         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
12620         btpy_insn_or_gap_new instead of btpy_insn_new.
12621         (btpy_insn_getset): Remove btpy_insn_error.
12622         * py-record.c (recpy_gap_type): New static object.
12623         (recpy_gap_object): New typedef.
12624         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
12625         recpy_gap_reason_string): New function.
12626         (recpy_gap_getset): New static object.
12627         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
12628         * py-record.h (recpy_gap_new): New export.
12629
12630 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
12631
12632         * python/py-record.c (recpy_ptid): Remove.
12633         (recpy_record_getset): Remove recpy_ptid.
12634
12635 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
12636
12637         * btrace.c (btrace_fetch): Set inferior_ptid.
12638         * python/py-record-btrace.c: Add "py-record.h" include.
12639         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
12640         recpy_bt_end, recpy_bt_instruction_history,
12641         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
12642         in gdb.Record object instead of current ptid.
12643         * python/py-record.c: Include new "py-record.h" file.
12644         (recpy_record_object): Moved to py-record.h.
12645         * python/py-record.h: New file.
12646
12647 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
12648
12649         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
12650         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
12651         indentation.
12652
12653 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
12654
12655         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
12656         the past maintainers section.
12657
12658 2017-04-28  Yao Qi  <yao.qi@linaro.org>
12659
12660         * infcmd.c (get_return_value): Use regcache ctor, and remove
12661         cleanup.
12662
12663 2017-04-28  Yao Qi  <yao.qi@linaro.org>
12664             Pedro Alves  <palves@redhat.com>
12665
12666         * regcache.c (regcache::regcache): New tag dispatch ctor.
12667         (do_cooked_read): Moved above.
12668         (regcache_dup): Use the tag dispatch ctor..
12669         * regcache.h (regcache): Declare ctor, delete copy ctor and
12670         assignment operator, remove friend regcache_dup.
12671
12672 2017-04-28  Yao Qi  <yao.qi@linaro.org>
12673
12674         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
12675         call method save instead of regcache_cpy.
12676         * regcache.h (struct regcache): Make regcache_dup a friend.
12677
12678 2017-04-28  Yao Qi  <yao.qi@linaro.org>
12679
12680         * regcache.c (struct regcache): Move to regcache.h
12681         (regcache::arch): New method.
12682         (regcache_get_ptid): Update.
12683         (get_regcache_arch): Call arch method.
12684         (get_regcache_aspace): Call method aspace.
12685         (register_buffer): Change it to method.
12686         (regcache_save): Change it to regcache::save.
12687         (regcache_restore): Likewise.
12688         (regcache_cpy_no_passthrough): Remove the declaration.
12689         (regcache_cpy): Call methods restore and cpy_no_passthrough.
12690         (regcache_cpy_no_passthrough): Change it to method
12691         cpy_no_passthrough.
12692         (regcache_register_status): Change it to method
12693         get_register_status.
12694         (regcache_invalidate): Change it to method invalidate.
12695         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
12696         (regcache_raw_update): Change it to method raw_update.
12697         (regcache_raw_read): Likewise.
12698         (regcache_raw_read_signed): Likewise.
12699         (regcache_raw_read_unsigned): Likewise.
12700         (regcache_raw_write_signed): Likewise.
12701         (regcache_raw_write_unsigned): Likewise.
12702         (regcache_cooked_read): Likewise.
12703         (regcache_cooked_read_value): Likewise.
12704         (regcache_cooked_read_signed): Likewise.
12705         (regcache_cooked_read_unsigned): Likewise.
12706         (regcache_cooked_write_signed): Likewise.
12707         (regcache_cooked_write_unsigned): Likewise.
12708         (regcache_raw_set_cached_value): Likewise.
12709         (regcache_raw_write): Likewise.
12710         (regcache_cooked_write): Likewise.
12711         (regcache_xfer_part): Likewise.
12712         (regcache_raw_read_part): Likewise.
12713         (regcache_raw_write_part): Likewise.
12714         (regcache_cooked_read_part): Likewise.
12715         (regcache_cooked_write_part): Likewise.
12716         (regcache_raw_supply): Likewise.
12717         (regcache_raw_collect): Likewise.
12718         (regcache_transfer_regset): Likewise.
12719         (regcache_supply_regset): Likewise.
12720         (regcache_collect_regset): Likewise.
12721         (regcache_debug_print_register): Likewise.
12722         (enum regcache_dump_what): Move it to regcache.h.
12723         (regcache_dump): Change it to method dump.
12724         * regcache.h (enum regcache_dump_what): New.
12725         (class regcache): New.
12726         * target.c (target_fetch_registers): Call method
12727         debug_print_register.
12728         (target_store_registers): Likewise.
12729
12730 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12731
12732         * windows-nat.c (struct lm_info_windows): Initialize field.
12733         (windows_make_so): Allocate lm_info_windows with new.
12734         (windows_free_so): Free lm_info_windows with delete.
12735
12736 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12737
12738         * solib-darwin.c (struct lm_info_darwin): Initialize field.
12739         (darwin_current_sos): Allocate lm_info_darwin with new, remove
12740         cleanup.
12741         (darwin_free_so): Free lm_info_darwin with delete.
12742
12743 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12744
12745         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
12746         <l_addr_p>: Change type to bool.
12747         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
12748         (svr4_free_so): Free lm_info_svr4 with delete.
12749         (svr4_copy_library_list): Replace memcpy with call to copy
12750         constructor.
12751         (library_list_start_library, svr4_default_sos): Allocate
12752         lm_info_svr4 with new.
12753
12754 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12755
12756         * solib-target.c (struct lm_info_target): Add destructor,
12757         initialize fields.
12758         <name>: Change type to std::string.
12759         (library_list_start_library): Allocate lm_info_target with new.
12760         (solib_target_free_library_list): Free lm_info_target with
12761         delete.
12762         (solib_target_current_sos): Adapt to std::string.
12763         (solib_target_free_so): Free lm_info_target with delete.
12764
12765 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12766
12767         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
12768         fields.
12769         (frv_current_sos): Allocate lm_info_frv with new.
12770         (frv_relocate_main_executable): Free lm_info_frv with delete,
12771         allocate with new.
12772         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
12773
12774 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12775
12776         * solib-frv.c (struct lm_info_frv): Fix indentation.
12777
12778 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12779
12780         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
12781         map field.
12782         (dsbt_current_sos): Allocate lm_info_dsbt with new.
12783         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
12784         and allocate with new.
12785         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
12786
12787 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12788
12789         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
12790         <filename, member_name>: Change type to std::string.
12791         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
12792         (library_list_start_library): Allocate lm_info_aix with new.
12793         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
12794         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
12795         with copy constructor.
12796
12797 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12798
12799         * solist.h (struct lm_info): Remove.
12800         (struct lm_info_base): New class.
12801         (struct so_list) <lm_info>: Change type to lm_info_base *.
12802         * nto-tdep.c (struct lm_info): Remove.
12803         (lm_addr): Adjust.
12804         * solib-aix.c (struct lm_info): Rename to ...
12805         (struct lm_info_aix): ... this.  Extend lm_info_base.
12806         (lm_info_p): Rename to ...
12807         (lm_info_aix_p): ... this, and adjust.
12808         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
12809         solib_aix_parse_libraries, library_list_start_library,
12810         solib_aix_free_library_list, solib_aix_parse_libraries,
12811         solib_aix_get_library_list,
12812         solib_aix_relocate_section_addresses, solib_aix_free_so,
12813         solib_aix_get_section_offsets,
12814         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
12815         Adjust.
12816         (struct solib_aix_inferior_data) <library_list>: Adjust.
12817         * solib-darwin.c (struct lm_info): Rename to ...
12818         (struct lm_info_darwin): ... this.  Extend lm_info_base.
12819         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
12820         * solib-dsbt.c (struct lm_info): Rename to ...
12821         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
12822         (struct dsbt_info) <main_executable_lm_info): Adjust.
12823         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
12824         dsbt_relocate_section_addresses): Adjust.
12825         * solib-frv.c (struct lm_info): Rename to ...
12826         (struct lm_info_frv): ... this.  Extend lm_info_base.
12827         (main_executable_lm_info): Adjust.
12828         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
12829         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
12830         find_canonical_descriptor_in_load_object,
12831         frv_fdpic_find_canonical_descriptor): Adjust.
12832         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
12833         to lm_info_svr4.
12834         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
12835         svr4_clear_so, svr4_copy_library_list,
12836         library_list_start_library, svr4_default_sos, svr4_read_so_list,
12837         svr4_current_sos, svr4_fetch_objfile_link_map,
12838         solist_update_incremental): Adjust.
12839         * solib-svr4.h (struct lm_info_svr4): Move here from
12840         solib-svr4.c.
12841         * solib-target.c (struct lm_info): Rename to ...
12842         (struct lm_info_target): ... this.  Extend lm_info_base.
12843         (lm_info_p): Rename to ...
12844         (lm_info_target_p): ... this.
12845         (solib_target_parse_libraries, library_list_start_segment,
12846         library_list_start_section, library_list_start_library,
12847         library_list_end_library, solib_target_free_library_list,
12848         solib_target_current_sos, solib_target_free_so,
12849         solib_target_relocate_section_addresses): Adjust.
12850         * windows-nat.c (struct lm_info): Rename to ...
12851         (struct lm_info_windows): ... this.  Extend lm_info_base.
12852         (windows_make_so, handle_load_dll, handle_unload_dll,
12853         windows_xfer_shared_libraries): Adjust.
12854
12855 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12856
12857         * solib-darwin.c (struct darwin_so_list): Remove.
12858         (darwin_current_sos): Allocate an so_list object instead of a
12859         darwin_so_list, separately allocate an lm_info object.
12860         (darwin_free_so): Free lm_info.
12861
12862 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
12863
12864         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
12865         with fprintf_filtered.
12866
12867 2017-04-28  Yao Qi  <yao.qi@linaro.org>
12868
12869         * regcache.c (regcache::regcache): New function.
12870         (regcache::~regcache): New function.
12871         (regcache_xmalloc_1): Remove.
12872         (regcache_xmalloc): Call new regcache.
12873         (regcache_xfree): Call delete regcache.
12874         (get_thread_arch_aspace_regcache): Call new regcache.
12875
12876 2017-04-28  Yao Qi  <yao.qi@linaro.org>
12877
12878         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
12879         lwp instead of ptid_get_lwp.
12880
12881 2017-04-28  Yao Qi  <yao.qi@linaro.org>
12882
12883         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
12884         lwp_info instead of getting from inferior_ptid.
12885
12886 2017-04-27  Keith Seitz  <keiths@redhat.com>
12887
12888         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
12889         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
12890         (CV_CONVERSION_BADNESS): Define.
12891         (rank_one_type): Remove overly restrictive rvalue reference
12892         rank checks.
12893         Add cv-qualifier checks and subranks for type equality.
12894         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
12895         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
12896         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
12897
12898 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
12899
12900         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
12901         count when creating the object.
12902
12903 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
12904             Ulrich Weigand  <uweigand@de.ibm.com>
12905
12906         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
12907         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
12908         is used in AIX.
12909         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
12910         (process_xcoff_symbol): Likewise.
12911         (scan_xcoff_symtab): Likewise.
12912
12913 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
12914
12915         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
12916         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
12917         (ia64_access_reg): Use get_frame_register_unsigned.
12918         (ia64_access_rse_reg): Likewise.
12919         (ia64_libunwind_frame_prev_register): Likewise.
12920
12921 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
12922
12923         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
12924         * gdbarch.c: Regenerated.
12925         * gdbarch.h: Regenerated.
12926         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
12927         visibility external.
12928         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
12929         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
12930         (enum cfa_how_kind): Move to ...
12931         (struct dwarf2_frame_state_reg_info): Likewise.
12932         (struct dwarf2_frame_state): Likewise.
12933         * dwarf2-frame.h: ... here.
12934         (dwarf2_frame_state_alloc_regs): New declaration.
12935         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
12936         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
12937
12938 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
12939
12940         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
12941         regcache_raw_read_unsigned.
12942         (xtensa_pseudo_register_write): Likewise.
12943
12944 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
12945
12946         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
12947         (nds32_pseudo_register_write): Likewise.
12948
12949 2017-04-25  Yao Qi  <yao.qi@linaro.org>
12950
12951         * regcache.c (struct regcache) <readonly_p>: Change its type
12952         to bool.
12953         (regcache_xmalloc_1): Update parameter type and callers update.
12954
12955 2017-04-25  Yao Qi  <yao.qi@linaro.org>
12956
12957         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
12958         set_gdbarch_wchar_bit.
12959         * arm-tdep.c (arm_gdbarch_init): Likewise.
12960
12961 2017-04-25  Pedro Alves  <palves@redhat.com>
12962
12963         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
12964         (BothAreRelocatable, memcopy, memmove): Don't define.
12965         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
12966         macros.
12967
12968 2017-04-25  Pedro Alves  <palves@redhat.com>
12969
12970         * common/common-defs.h: Include "common/poison.h".
12971         * common/function-view.h: (Not, Or, Requires): Move to traits.h
12972         and adjust.
12973         * common/poison.h: New file.
12974         * common/traits.h: Include <type_traits>.
12975         (Not, Or, Requires): New, moved from common/function-view.h.
12976
12977 2017-04-25  Pedro Alves  <palves@redhat.com>
12978
12979         * breakpoint.h (struct breakpoint): In-class initialize all
12980         fields.  Make boolean fields "bool".
12981         * breakpoint.c (init_raw_breakpoint_without_location): Remove
12982         memset call and initializations no longer necessary.
12983
12984 2017-04-25  Pedro Alves  <palves@redhat.com>
12985
12986         * btrace.c (pt_btrace_insn_flags): Change parameter type to
12987         reference.
12988         (pt_btrace_insn): New function.
12989         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
12990
12991 2017-04-25  Pedro Alves  <palves@redhat.com>
12992
12993         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
12994         "base" field and inherit from "bp_location" instead.  Add
12995         non-default ctor.
12996         (allocate_location_exception): Use new non-default ctor.
12997         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
12998         (init_bp_location): Convert to ...
12999         (bp_location::bp_location): ... this new ctor, and remove memset
13000         call.
13001         (base_breakpoint_allocate_location): Use the new non-default ctor.
13002         * breakpoint.h (bp_location): Now a class.  Declare default and
13003         non-default ctors.  In-class initialize all members.
13004         (init_bp_location): Remove declaration.
13005
13006 2017-04-25  Pedro Alves  <palves@redhat.com>
13007
13008         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
13009         assignment operator.
13010
13011 2017-04-24  Yao Qi  <yao.qi@linaro.org>
13012
13013         * doublest.c (convert_doublest_to_floatformat): Call
13014         floatformat_totalsize_bytes.
13015
13016 2017-04-22  Tom Tromey  <tom@tromey.com>
13017
13018         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
13019         ui_out_emit_list.
13020         * stack.c (print_frame): Use ui_out_emit_list.
13021         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13022         ui_out_emit_list.
13023         * mi/mi-main.c (print_one_inferior)
13024         (mi_cmd_data_list_register_names)
13025         (mi_cmd_data_list_register_values, mi_cmd_list_features)
13026         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
13027         ui_out_emit_list.
13028         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
13029         (mi_output_solib_attribs): Use ui_out_emit_list,
13030         ui_out_emit_tuple.
13031         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
13032         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
13033         (mi_cmd_stack_list_args, list_args_or_locals): Use
13034         ui_out_emit_list.
13035         * disasm.c (do_assembly_only): Use ui_out_emit_list.
13036         * breakpoint.c (print_solib_event, output_thread_groups): Use
13037         ui_out_emit_list.
13038
13039 2017-04-22  Tom Tromey  <tom@tromey.com>
13040
13041         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
13042         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
13043         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
13044
13045 2017-04-22  Tom Tromey  <tom@tromey.com>
13046
13047         * tracepoint.c (tvariables_info_1)
13048         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
13049
13050 2017-04-22  Tom Tromey  <tom@tromey.com>
13051
13052         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
13053         annotate_arg_emitter.
13054         * breakpoint.c (print_mention_watchpoint)
13055         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
13056         * annotate.h (struct annotate_arg_emitter): New.
13057
13058 2017-04-22  Tom Tromey  <tom@tromey.com>
13059
13060         * record-btrace.c (record_btrace_insn_history)
13061         (record_btrace_insn_history_range, record_btrace_call_history)
13062         (record_btrace_call_history_range): Use ui_out_emit_tuple.
13063         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
13064         ui_out_emit_tuple.
13065         * stack.c (print_frame_info): Use ui_out_emit_tuple.
13066         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
13067         * skip.c (skip_info): Use ui_out_emit_tuple.
13068         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
13069         * progspace.c (print_program_space): Use ui_out_emit_tuple.
13070         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
13071         * osdata.c (info_osdata): Use ui_out_emit_tuple.
13072         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13073         ui_out_emit_tuple.
13074         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
13075         (output_register, mi_cmd_data_read_memory)
13076         (mi_cmd_data_read_memory_bytes, mi_load_progress)
13077         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
13078         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
13079         Use ui_out_emit_tuple.
13080         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
13081         ui_out_emit_tuple.
13082         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13083         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
13084         * linux-thread-db.c (info_auto_load_libthread_db): Use
13085         ui_out_emit_tuple.
13086         * inferior.c (print_inferior): Use ui_out_emit_tuple.
13087         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
13088         * disasm.c (do_mixed_source_and_assembly_deprecated)
13089         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
13090         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
13091         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
13092         * breakpoint.c (print_one_breakpoint_location)
13093         (print_one_breakpoint): Use ui_out_emit_tuple.
13094         * auto-load.c (print_script, info_auto_load_cmd): Use
13095         ui_out_emit_tuple.
13096         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
13097
13098 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
13099
13100         * thread.c (print_thread_info_1): Remove dead code.
13101
13102 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13103
13104         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
13105         GDB_SELF_TEST.
13106         * arm-tdep.c (selftests::arm_record_test): Likewise.
13107
13108 2017-04-21  Yao Qi  <yao.qi@linaro.org>
13109
13110         * regcache.c (regcache_restore): Remove argument 2.  Replace
13111         argument 3 with regcache.  Get register status from
13112         src->register_status and get register contents from
13113         register_buffer (src, regnum).
13114         (regcache_cpy): Update.
13115
13116 2017-04-19  Pedro Alves  <palves@redhat.com>
13117
13118         * gdbthread.h (thread): Add missing closing parenthesis in
13119         comment.
13120
13121 2017-04-19  Pedro Alves  <palves@redhat.com>
13122
13123         * common/refcounted-object.h: New file.
13124         * gdbthread.h: Include "common/refcounted-object.h".
13125         (thread_info): Inherit from refcounted_object and add comments.
13126         (thread_info::incref, thread_info::decref)
13127         (thread_info::m_refcount): Delete.
13128         (thread_info::deletable): Use the refcounted_object::refcount()
13129         method.
13130         * inferior.c (current_inferior_): Add comment.
13131         (set_current_inferior): Increment/decrement refcounts.
13132         (prune_inferiors, remove_inferior_command): Skip inferiors marked
13133         not-deletable instead of comparing with the current inferior.
13134         (initialize_inferiors): Increment the initial inferior's refcount.
13135         * inferior.h (struct inferior): Forward declare.
13136         Include "common/refcounted-object.h".
13137         (current_inferior, set_current_inferior): Move declaration to
13138         before struct inferior's definition, and fix comment.
13139         (inferior): Inherit from refcounted_object.  Add comments.
13140         * thread.c (switch_to_thread_no_regs): Reference the thread's
13141         inferior pointer directly instead of doing a ptid lookup.
13142         (switch_to_no_thread): New function.
13143         (switch_to_thread(thread_info *)): New function, factored out
13144         from ...
13145         (switch_to_thread(ptid_t)): ... this.
13146         (restore_current_thread): Delete.
13147         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
13148         fields, and add 'inf' field.
13149         (do_restore_current_thread_cleanup): Check whether old->inf is
13150         alive instead of looking up an inferior by ptid.  Use
13151         switch_to_thread and switch_to_no_thread.
13152         (restore_current_thread_cleanup_dtor): Use old->inf directly
13153         instead of lookup up an inferior by id.  Decref the inferior.
13154         Don't restore 'removable'.
13155         (make_cleanup_restore_current_thread): Same the inferior pointer
13156         in old, instead of the inferior number.  Incref the inferior.
13157         Don't save/clear 'removable'.
13158
13159 2017-04-19  Pedro Alves  <palves@redhat.com>
13160
13161         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13162         unittests/scoped_restore-selftests.c.
13163         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
13164         * common/scoped_restore.h (scoped_restore_base): Make "class".
13165         (scoped_restore_base::release): New public method.
13166         (scoped_restore_base::scoped_restore_base): New protected ctor.
13167         (scoped_restore_base::m_saved_var): New protected field.
13168         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
13169         scoped_restore_base base class instead of m_saved_var directly.
13170         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
13171         (scoped_restore_tmpl::scoped_restore_tmpl(const
13172         scoped_restore_tmpl<T>&)): Likewise.
13173         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
13174         method.
13175         (scoped_restore_tmpl::saved_var): New method.
13176         (scoped_restore_tmpl::m_saved_var): Delete.
13177         * inferior.h (inferior::detaching): Now a bool.
13178         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
13179         cleanup.
13180         * unittests/scoped_restore-selftests.c: New file.
13181
13182 2017-04-19  Pedro Alves  <palves@redhat.com>
13183
13184         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
13185         Re-sort in alphabetic order.
13186
13187 2017-04-18  Pedro Alves  <palves@redhat.com>
13188
13189         * xml-support.c (obstack_xml_printf): Delete.
13190         * xml-support.h (obstack_xml_printf): Delete.
13191
13192 2017-04-18  Pedro Alves  <palves@redhat.com>
13193
13194         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
13195         vdebug, verror, body_text, start_element, end_element, name,
13196         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
13197         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
13198         is_xinclude>: Make private and add m_ prefix.
13199         (gdb_xml_parser::body_text): New method, based on ...
13200         (gdb_xml_body_text): ... this.  Adjust.
13201         (gdb_xml_parser::vdebug): New method, based on ...
13202         (gdb_xml_debug): ... this.  Adjust.
13203         (gdb_xml_parser::verror): New method, based on ...
13204         (gdb_xml_error): ... this.  Adjust.
13205         (gdb_xml_parser::start_element): New method, based on ...
13206         (gdb_xml_start_element): ... this.  Adjust.
13207         (gdb_xml_start_element_wrapper): Defer to
13208         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
13209         (gdb_xml_parser::end_element): New method, based on ...
13210         (gdb_xml_end_element_wrapper): ... this.  Adjust.
13211         (gdb_xml_parser::~gdb_xml_parser): Adjust.
13212         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
13213         (gdb_xml_parser::use_dtd): New method, based on ...
13214         (gdb_xml_use_dtd): ... this.  Adjust.
13215         (gdb_xml_parser::parse): New method, based on ...
13216         (gdb_xml_parse): ... this.  Adjust.
13217         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
13218         (xinclude_start_include): Adjust to call the parser's name method.
13219         (xml_xinclude_default, xml_xinclude_start_doctype)
13220         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
13221         method.
13222         (xml_process_xincludes): Adjust to call parser methods.
13223         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
13224         declarations.
13225
13226 2017-04-18  Pedro Alves  <palves@redhat.com>
13227
13228         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
13229         gdb::optional<std::string>.
13230         * xml-support.c: Include <string>.
13231         (scope_level::scope_level(scope_level &&))
13232         (scope_level::~scope_level): Delete.
13233         (scope_level::body): Now a std::string.
13234         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
13235         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
13236         parameter.
13237         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
13238         (xinclude_parsing_data::output): Now a std::string reference.
13239         (xinclude_start_include): Adjust.
13240         (xml_xinclude_default): Adjust.
13241         (xml_process_xincludes): Add 'output' parameter, and return bool.
13242         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
13243         and return bool.
13244         * xml-tdesc.c: Include <unordered_map> and <string>.
13245         (tdesc_xml_cache): Delete.
13246         (tdesc_xml_cache_s): Delete.
13247         (xml_cache): Now an std::unordered_map.
13248         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
13249         (target_fetch_description_xml): Change return type to
13250         gdb::optional<std::string>, and adjust.
13251         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
13252         (target_fetch_description_xml): Change return type to
13253         gdb::optional<std::string>.
13254
13255 2017-04-18  Pedro Alves  <palves@redhat.com>
13256
13257         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13258         unittests/optional-selftests.c.
13259         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
13260         * unittests/optional-selftests.c: New file.
13261         * unittests/optional/assignment/1.cc: New file.
13262         * unittests/optional/assignment/2.cc: New file.
13263         * unittests/optional/assignment/3.cc: New file.
13264         * unittests/optional/assignment/4.cc: New file.
13265         * unittests/optional/assignment/5.cc: New file.
13266         * unittests/optional/assignment/6.cc: New file.
13267         * unittests/optional/assignment/7.cc: New file.
13268         * unittests/optional/cons/copy.cc: New file.
13269         * unittests/optional/cons/default.cc: New file.
13270         * unittests/optional/cons/move.cc: New file.
13271         * unittests/optional/cons/value.cc: New file.
13272         * unittests/optional/in_place.cc: New file.
13273         * unittests/optional/observers/1.cc: New file.
13274         * unittests/optional/observers/2.cc: New file.
13275
13276 2017-04-18  Pedro Alves  <palves@redhat.com>
13277
13278         * common/gdb_optional.h: Include common/traits.h.
13279         (in_place_t): New type.
13280         (in_place): New constexpr variable.
13281         (optional::optional): Remove member initialization of
13282         m_instantiated.
13283         (optional::optional(in_place_t...)): New constructor.
13284         (optional::~optional): Use reset.
13285         (optional::optional(const optional&)): New.
13286         (optional::optional(const optional&&)): New.
13287         (optional::optional(T &)): New.
13288         (optional::optional(T &&)): New.
13289         (operator::operator=(const optional &)): New.
13290         (operator::operator=(optional &&)): New.
13291         (operator::operator= (const T &))
13292         (operator::operator= (T &&))
13293         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
13294         (operator::reset): New.
13295         (operator::m_instantiated):: Add in-class initializer.
13296         * common/traits.h: Include <type_traits>.
13297         (struct And): New types.
13298
13299 2017-04-18  Pedro Alves  <palves@redhat.com>
13300
13301         * xml-support.c: Include <vector>.
13302         (scope_level::scope_level(const gdb_xml_element *))
13303         (scope_level::scope_level(scope_level&&)): New.
13304         (scope_level::~scope_level): New.
13305         (scope_level_s): Delete.
13306         (gdb_xml_parser::scopes): Now a std::vector.
13307         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
13308         Use std::vector.
13309         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
13310         scope cleanup code.
13311         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
13312         of the scopes member.  Use std::vector::emplace_back.
13313
13314 2017-04-18  Pedro Alves  <palves@redhat.com>
13315
13316         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
13317         a bool.
13318         (gdb_xml_end_element): Change type of first parameter.
13319         (gdb_xml_cleanup): Rename to ...
13320         (gdb_xml_parser::~gdb_xml_parser): ... this.
13321         (gdb_xml_create_parser_and_cleanup): Delete with ...
13322         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
13323         to this new ctor.
13324         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
13325         using gdb_xml_create_parser_and_cleanup.
13326         (xinclude_parsing_data): Add ctor/dtor.
13327         (xml_xinclude_cleanup): Delete.
13328         (xml_process_xincludes): Create a local xinclude_parsing_data
13329         instead of heap-allocating one.  Create a local gdb_xml_parser
13330         instead of heap-allocating one with
13331         gdb_xml_create_parser_and_cleanup.
13332
13333 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
13334
13335         PR threads/20743
13336         * fbsd-nat.c (resume_one_thread_cb): Remove.
13337         (resume_all_threads_cb): Remove.
13338         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
13339         iterate_over_threads.
13340
13341 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
13342
13343         * NEWS: Create a new section for the next release branch.
13344         Rename the section of the current branch, now that it has
13345         been cut.
13346
13347 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
13348
13349         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
13350         * version.in: Bump version to 8.0.50.DATE-git.
13351
13352 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
13353
13354         PR gdb/21385
13355         * windows-nat.c (windows_create_inferior): Declare 'allargs'
13356         independently of the host, and fix build breakage on Cygwin.
13357
13358 2017-04-13  Pedro Alves  <palves@redhat.com>
13359
13360         * inferior.c (free_inferior): Convert to ...
13361         (inferior::~inferior): ... this dtor.
13362         (inferior::inferior): New ctor, factored out from ...
13363         (add_inferior_silent): ... here.  Allocate the inferior with a new
13364         expression.
13365         (delete_inferior): Call delete instead of free_inferior.
13366         * inferior.h (gdb_environ, continuation): Forward declare.
13367         (inferior): Now a class.  Add in-class initialization to all
13368         members.  Make boolean fields bool, except 'detaching'.
13369         (inferior::inferior): New explicit ctor.
13370         (inferior::~inferior): New.
13371
13372 2017-04-13  Pedro Alves  <palves@redhat.com>
13373
13374         * inferior.c (init_inferior_list): Delete.
13375         * inferior.h (init_inferior_list): Delete.
13376
13377 2017-04-13  Pedro Alves  <palves@redhat.com>
13378
13379         PR threads/13217
13380         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
13381         (top level): Call it twice, with different thread sets.
13382
13383 2017-04-13  Pedro Alves  <palves@redhat.com>
13384
13385         * thread.c: Include <algorithm>.
13386         (thread_array_cleanup): Delete.
13387         (scoped_inc_dec_ref): New class.
13388         (live_threads_count): New function.
13389         (set_thread_refcount): Delete.
13390         (tp_array_compar_ascending): Now a bool.
13391         (tp_array_compar): Convert to a std::sort comparison function.
13392         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
13393         and live_threads_count.
13394
13395 2017-04-13  Pedro Alves  <palves@redhat.com>
13396
13397         * infrun.c (follow_fork_inferior): Also switch the current
13398         inferior.
13399
13400 2017-04-13  Pedro Alves  <palves@redhat.com>
13401
13402         * breakpoint.c (watch_command_1): Save watchpoint-frame info
13403         before calling create_internal_breakpoint.
13404
13405 2017-04-13  Pedro Alves  <palves@redhat.com>
13406
13407         * fork-child.c (execv_argv): New class.
13408         (breakup_args): Refactored as ...
13409         (execv_argv::init_for_no_shell): .. this method of execv_argv.
13410         Copy arguments to storage and replace separators with NULL
13411         terminators in place.
13412         (escape_bang_in_quoted_argument): Adjust to return bool.
13413         (execv_argv::execv_argv): New ctor.
13414         (execv_argv::init_for_shell): New method, factored out from
13415         fork_inferior.  Don't strdup strings into the vector.
13416         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
13417         Remove free_vector_argv call.
13418
13419 2017-04-13  Yao Qi  <yao.qi@linaro.org>
13420
13421         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
13422         tdep->rx_psw_type.
13423
13424 2017-04-13  Yao Qi  <yao.qi@linaro.org>
13425
13426         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
13427         * rx-tdep.c (rx_gdbarch_init): Likewise.
13428
13429 2017-04-13  Pedro Alves  <palves@redhat.com>
13430
13431         * breakpoint.h (struct breakpoint): Reindent.
13432
13433 2017-04-13  Pedro Alves  <palves@redhat.com>
13434
13435         * breakpoint.c (bp_location): Rename to ...
13436         (bp_locations): ... this.  All references updated.
13437         (bp_location_count): Rename to ...
13438         (bp_locations_count): ... this.  All references updated.
13439         (bp_location_placed_address_before_address_max): Rename to ...
13440         (bp_locations_placed_address_before_address_max): ... this.  All
13441         references updated.
13442         (bp_location_shadow_len_after_address_max): Rename to ...
13443         (bp_locations_shadow_len_after_address_max): ... this.  All
13444         references updated.
13445         (bp_location_compare_addrs): Rename to ...
13446         (bp_locations_compare_addrs): ... this.  All references updated.
13447         (bp_location_compare):Rename to ...
13448         (bp_locations_compare): ... this.  All references updated.
13449         (bp_location_target_extensions_update): Rename to ...
13450         (bp_locations_target_extensions_update): ... this.  All references
13451         updated.
13452
13453 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
13454
13455         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
13456         * common/common.m4: Check headers 'termios.h', 'termio.h' and
13457         'sgtty.h'.
13458         * common/gdb_termios.h: New file, with parts of "terminal.h".
13459         * inflow.c: Include "gdb_termios.h".
13460         * ser-unix.c: Include "gdb_termios.h".
13461         * terminal.h: Move terminal-related defines to
13462         "common/gdb_termios.h".
13463
13464 2017-04-12  Tom Tromey  <tom@tromey.com>
13465
13466         * probe.c (parse_probes): Update.
13467         * location.h (delete_event_location): Don't declare.
13468         (event_location_deleter::operator()): Update.
13469         * location.c (event_location_deleter::operator()): Rename from
13470         delete_event_location.
13471         * linespec.h (linespec_result) <location>: Change type to
13472         event_location_up.
13473         * linespec.c (canonicalize_linespec, event_location_to_sals)
13474         (decode_objc): Update.
13475         (linespec_result): Don't call delete_event_location.
13476         * breakpoint.c (create_breakpoints_sal)
13477         (bkpt_probe_create_sals_from_location)
13478         (strace_marker_create_sals_from_location): Update.
13479
13480 2017-04-12  Tom Tromey  <tom@tromey.com>
13481
13482         * linespec.h (struct linespec_result): Add constructor and
13483         destructor.
13484         (init_linespec_result, destroy_linespec_result)
13485         (make_cleanup_destroy_linespec_result): Don't declare.
13486         * linespec.c (init_linespec_result): Remove.
13487         (linespec_result::~linespec_result): Rename from
13488         destroy_linespec_result.  Update.
13489         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
13490         Remove.
13491         * breakpoint.c (create_breakpoint, break_range_command)
13492         (decode_location_default): Update.
13493         * ax-gdb.c (agent_command_1): Update.
13494
13495 2017-04-12  Tom Tromey  <tom@tromey.com>
13496
13497         * remote.c (remote_download_tracepoint): Update.
13498         * python/py-breakpoint.c (bppy_get_location): Update.
13499         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
13500         (gdbscm_breakpoint_location): Update.
13501         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
13502         * breakpoint.h (struct breakpoint) <location, location_range_end>:
13503         Change type to event_location_up.
13504         * breakpoint.c (create_overlay_event_breakpoint)
13505         (create_longjmp_master_breakpoint)
13506         (create_std_terminate_master_breakpoint)
13507         (create_exception_master_breakpoint)
13508         (breakpoint_event_location_empty_p, print_breakpoint_location)
13509         (print_one_breakpoint_location, create_thread_event_breakpoint)
13510         (init_breakpoint_sal, create_breakpoint)
13511         (print_recreate_ranged_breakpoint, break_range_command)
13512         (init_ada_exception_breakpoint, say_where): Update.
13513         (base_breakpoint_dtor): Don't call delete_event_location.
13514         (bkpt_print_recreate, tracepoint_print_recreate)
13515         (dprintf_print_recreate, update_static_tracepoint)
13516         (breakpoint_re_set_default): Update.
13517
13518 2017-04-12  Tom Tromey  <tom@tromey.com>
13519
13520         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
13521         type of "to_do".  Update.
13522         (compute_stack_depth): Use std::vector.
13523
13524 2017-04-12  Tom Tromey  <tom@tromey.com>
13525
13526         * printcmd.c (find_instruction_backward): Use std::vector.
13527
13528 2017-04-12  Tom Tromey  <tom@tromey.com>
13529
13530         * symfile.c (objfilep): Remove typedef.
13531         (reread_symbols): Use a std::vector.
13532
13533 2017-04-12  Tom Tromey  <tom@tromey.com>
13534
13535         * mi/mi-main.c (exec_direction_forward): Remove.
13536         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
13537         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
13538         scoped_restore.
13539         * guile/guile.c (guile_repl_command, guile_command)
13540         (gdbscm_execute_gdb_command): Use scoped_restore.
13541         * go-exp.y (go_parse): Use scoped_restore.
13542         * d-exp.y (d_parse): Use scoped_restore.
13543         * cli/cli-decode.c (cmd_func): Use scoped_restore.
13544         * c-exp.y (c_parse): Use scoped_restore.
13545
13546 2017-04-12  Tom Tromey  <tom@tromey.com>
13547
13548         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
13549         (mi_parse): Update return type.
13550         (mi_parse_free): Remove.
13551         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
13552         (mi_parse::~mi_parse): Rename from mi_parse_free.
13553         (mi_parse_cleanup): Remove.
13554         (mi_parse): Return a unique_ptr.  Use new.
13555         * mi/mi-main.c (mi_execute_command): Update.
13556
13557 2017-04-12  Tom Tromey  <tom@tromey.com>
13558
13559         * location.c (explicit_location_lex_one): Return a
13560         unique_xmalloc_ptr.
13561         (string_to_explicit_location): Update.  Remove cleanups.
13562
13563 2017-04-12  Tom Tromey  <tom@tromey.com>
13564
13565         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
13566         (compare_value_and_voffset): Change type.  Update.
13567         (compute_vtable_size): Change type of "offset_vec".
13568         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
13569         (gnuv3_get_typeid): Remove extraneous declaration.
13570
13571 2017-04-12  Tom Tromey  <tom@tromey.com>
13572
13573         * charset.h (wchar_iterator): Fix comment.
13574
13575 2017-04-12  Tom Tromey  <tom@tromey.com>
13576
13577         * charset.c (iconv_wrapper): New class.
13578         (cleanup_iconv): Remove.
13579         (convert_between_encodings): Use it.
13580
13581 2017-04-12  Tom Tromey  <tom@tromey.com>
13582
13583         * symfile.h (increment_reading_symtab): Update type.
13584         * symfile.c (decrement_reading_symtab): Remove.
13585         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
13586         * psymtab.c (psymtab_to_symtab): Update.
13587         * dwarf2read.c (dw2_instantiate_symtab): Update.
13588
13589 2017-04-12  Tom Tromey  <tom@tromey.com>
13590
13591         * jit.c (struct jit_reader): Declare separately.  Add constructor
13592         and destructor.  Change type of "handle".
13593         (loaded_jit_reader): Define separately.
13594         (jit_reader_load): Update.  New "new".
13595         (jit_reader_unload_command): Use "delete".
13596         * gdb-dlfcn.h (struct dlclose_deleter): New.
13597         (gdb_dlhandle_up): New typedef.
13598         (gdb_dlopen, gdb_dlsym): Update types.
13599         (gdb_dlclose): Remove.
13600         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
13601         (gdb_dlsym): Change type of "handle".
13602         (make_cleanup_dlclose): Remove.
13603         (dlclose_deleter::operator()): Rename from gdb_dlclose.
13604         * compile/compile-c-support.c (load_libcc): Update.
13605
13606 2017-04-12  Tom Tromey  <tom@tromey.com>
13607
13608         * symtab.h (find_pcs_for_symtab_line): Change return type.
13609         * symtab.c (find_pcs_for_symtab_line): Change return type.
13610         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
13611         type of "vec".  Update.
13612         (ltpy_get_pcs_for_line): Update.
13613         * linespec.c (decode_digits_ordinary): Update.
13614
13615 2017-04-12  Tom Tromey  <tom@tromey.com>
13616
13617         * tracepoint.c (actions_command): Update.
13618         * python/python.c (python_command, python_interactive_command):
13619         Update.
13620         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
13621         * guile/guile.c (guile_command): Update.
13622         * defs.h (read_command_lines, read_command_lines_1): Return
13623         command_line_up.
13624         (command_lines_deleter): New struct.
13625         (command_line_up): New typedef.
13626         * compile/compile.c (compile_code_command)
13627         (compile_print_command): Update.
13628         * cli/cli-script.h (get_command_line, copy_command_lines): Return
13629         command_line_up.
13630         (make_cleanup_free_command_lines): Remove.
13631         * cli/cli-script.c (get_command_line, read_command_lines_1)
13632         (copy_command_lines): Return command_line_up.
13633         (while_command, if_command, read_command_lines, define_command)
13634         (document_command): Update.
13635         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
13636         Remove.
13637         * breakpoint.h (breakpoint_set_commands): Change type of
13638         "commands".
13639         * breakpoint.c (breakpoint_set_commands): Change type of
13640         "commands".  Update.
13641         (do_map_commands_command, update_dprintf_command_list)
13642         (create_tracepoint_from_upload): Update.
13643
13644 2017-04-12  Tom Tromey  <tom@tromey.com>
13645
13646         * tracepoint.c (scope_info): Update.
13647         * spu-tdep.c (spu_catch_start): Update.
13648         * python/python.c (gdbpy_decode_line): Update.
13649         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
13650         * python/py-breakpoint.c (bppy_init): Update.
13651         * probe.c (parse_probes): Update.
13652         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
13653         * location.h (event_location_deleter): New struct.
13654         (event_location_up): New typedef.
13655         (new_linespec_location, new_address_location, new_probe_location)
13656         (new_explicit_location, copy_event_location)
13657         (string_to_event_location, string_to_event_location_basic)
13658         (string_to_explicit_location): Update return type.
13659         (make_cleanup_delete_event_location): Remove.
13660         * location.c (new_linespec_location, new_address_location)
13661         (new_probe_location, new_explicit_location, copy_event_location):
13662         Return event_location_up.
13663         (delete_event_location_cleanup)
13664         (make_cleanup_delete_event_location): Remove.
13665         (string_to_explicit_location, string_to_event_location_basic)
13666         (string_to_event_location): Return event_location_up.
13667         * linespec.c (canonicalize_linespec, event_location_to_sals)
13668         (decode_line_with_current_source)
13669         (decode_line_with_last_displayed, decode_objc): Update.
13670         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
13671         * completer.c (location_completer): Update.
13672         * cli/cli-cmds.c (edit_command, list_command): Update.
13673         * breakpoint.c (create_overlay_event_breakpoint)
13674         (create_longjmp_master_breakpoint)
13675         (create_std_terminate_master_breakpoint)
13676         (create_exception_master_breakpoint)
13677         (create_thread_event_breakpoint): Update.
13678         (init_breakpoint_sal): Update.  Remove some dead code.
13679         (create_breakpoint_sal): Change type of "location".  Update.
13680         (create_breakpoints_sal, create_breakpoint, break_command_1)
13681         (dprintf_command, break_range_command, until_break_command)
13682         (init_ada_exception_breakpoint)
13683         (strace_marker_create_sals_from_location)
13684         (update_static_tracepoint, trace_command, ftrace_command)
13685         (strace_command, create_tracepoint_from_upload): Update.
13686         * break-catch-throw.c (re_set_exception_catchpoint): Update.
13687         * ax-gdb.c (agent_command_1): Update.
13688
13689 2017-04-12  Pedro Alves  <palves@redhat.com>
13690
13691         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
13692         * configure.tgt: Handle i[34567]86-*-go32* and
13693         i[34567]86-*-msdosdjgpp*.
13694         * i386-tdep.c (i386_svr4_reg_to_regnum):
13695         Make extern.
13696         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
13697         i386-go32-tdep.c.
13698         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
13699         * i386-go32-tdep.c: New file.
13700         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
13701         declarations.
13702
13703 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
13704
13705         * aix-thread.c (pd_status2str): Change return type to const char *.
13706
13707 2017-04-12  Pedro Alves  <palves@redhat.com>
13708
13709         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
13710         calls to set_gdbarch_gnu_triplet_regexp.
13711
13712 2017-04-12  Pedro Alves  <palves@redhat.com>
13713
13714         PR gdb/21323
13715         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
13716         New enum value.
13717         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
13718         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
13719         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
13720         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
13721         * gdbarch.h, gdbarch.c: Regenerate.
13722         * aarch64-tdep.c (aarch64_gdbarch_init): Override
13723         gdbarch_wchar_bit and gdbarch_wchar_signed.
13724         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
13725         * arm-tdep.c (arm_gdbarch_init): Likewise.
13726         * avr-tdep.c (avr_gdbarch_init): Likewise.
13727         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
13728         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
13729         * i386-tdep.c (i386_go32_init_abi): Likewise.
13730         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
13731         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
13732         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
13733         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
13734         * sh-tdep.c (sh_gdbarch_init): Likewise.
13735         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
13736         * sparc64-tdep.c (sparc64_init_abi): Likewise.
13737         * windows-tdep.c (windows_init_abi): Likewise.
13738         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
13739
13740 2017-04-12  Pedro Alves  <palves@redhat.com>
13741
13742         PR c++/21323
13743         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
13744         cplus_primitive_type_char32_t>: New enum values.
13745         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
13746         and cplus_primitive_type_char32_t.
13747         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
13748         32, use the archtecture's built-in type for char16_t and char32_t,
13749         respectively.  Otherwise, fallback to init_integer_type as before,
13750         but make the type unsigned, and issue a complaint.
13751         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
13752
13753 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
13754
13755         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
13756         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
13757
13758 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
13759
13760         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
13761         'const char *'.
13762
13763 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
13764
13765         * common/common-utils.c (free_vector_argv): New function.
13766         * common/common-utils.h: Include <vector>.
13767         (free_vector_argv): New prototype.
13768         * darwin-nat.c (darwin_create_inferior): Rewrite function
13769         prototype in order to constify "exec_file" and accept a
13770         "std::string" for "allargs".
13771         * fork-child.c: Include <vector>.
13772         (breakup_args): Rewrite function, using C++.
13773         (fork_inferior): Rewrite function header, constify "exec_file_arg"
13774         and accept "std::string" for "allargs".  Update the code to
13775         calculate "argv" based on "allargs".  Update calls to "exec_fun"
13776         and "execvp".
13777         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
13778         order to constify "exec_file" and accept a "std::string" for
13779         "allargs".
13780         * go32-nat.c (go32_create_inferior): Likewise.
13781         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
13782         * infcmd.c (run_command_1): Constify "exec_file".  Use
13783         "std::string" for inferior arguments.
13784         * inferior.h (fork_inferior): Update prototype.
13785         * linux-nat.c (linux_nat_create_inferior): Rewrite function
13786         prototype in order to constify "exec_file" and accept a
13787         "std::string" for "allargs".
13788         * nto-procfs.c (procfs_create_inferior): Likewise.
13789         * procfs.c (procfs_create_inferior): Likewise.
13790         * remote-sim.c (gdbsim_create_inferior): Likewise.
13791         * remote.c (extended_remote_run): Update code to accept
13792         "std::string" as argument.
13793         (extended_remote_create_inferior): Rewrite function prototype in
13794         order to constify "exec_file" and accept a "std::string" for
13795         "allargs".
13796         * rs6000-nat.c (super_create_inferior): Likewise.
13797         (rs6000_create_inferior): Likewise.
13798         * target.h (struct target_ops) <to_create_inferior>: Likewise.
13799         * windows-nat.c (windows_create_inferior): Likewise.
13800
13801 2017-04-11  Pedro Alves  <palves@redhat.com>
13802
13803         * thread.c: Fix whitespace throughout.
13804
13805 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13806
13807         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
13808
13809 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
13810
13811         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
13812
13813 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
13814
13815         PR gdb/21364
13816         * osdata.c (info_osdata): Check if 'type' is an empty string
13817         instead of NULL.
13818
13819 2017-04-10  Pedro Alves  <palves@redhat.com>
13820
13821         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
13822         (ptid_to_global_thread_id, in_thread_list)
13823         (do_captured_list_thread_ids, set_resumed, set_running)
13824         (set_executing, set_stop_requested, finish_thread_state)
13825         (validate_registers_access, can_access_registers_ptid)
13826         (print_thread_info_1, switch_to_thread)
13827         (do_restore_current_thread_cleanup)
13828         (make_cleanup_restore_current_thread, thread_command)
13829         (thread_name_command): Use operator== instead of ptid_equal.
13830
13831 2017-04-10  Pedro Alves  <palves@redhat.com>
13832
13833         * thread.c (struct current_thread_cleanup) <next>: Delete field.
13834         (current_thread_cleanup_chain): Delete.
13835         (restore_current_thread_cleanup_dtor)
13836         (make_cleanup_restore_current_thread): Remove references to
13837         current_thread_cleanup_chain.
13838
13839 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
13840
13841         * msp430-tdep.c (msp430_pseudo_register_read): Never return
13842         REG_UNKNOWN.
13843
13844 2017-04-10  Yao Qi  <yao.qi@linaro.org>
13845
13846         PR gdb/19942
13847         * gdbthread.h (thread_info::deletable): New method.
13848         (thread_info::incref): New method.
13849         (thread_info::decref): New method.
13850         (thread_info::refcount): Move it to private.
13851         * infrun.c (save_stop_context): Call inc_refcount.
13852         (release_stop_context_cleanup): Likewise.
13853         * thread.c (set_thread_exited): New function.
13854         (init_thread_list): Delete "tp" only it is deletable, otherwise
13855         call set_thread_exited.
13856         (delete_thread_1): Call set_thread_exited.
13857         (current_thread_cleanup) <inferior_pid>: Remove.
13858         <thread>: New field.
13859         (restore_current_thread_ptid_changed): Removed.
13860         (do_restore_current_thread_cleanup): Adjust.
13861         (restore_current_thread_cleanup_dtor): Don't call
13862         find_thread_ptid.
13863         (set_thread_refcount): Use dec_refcount.
13864         (make_cleanup_restore_current_thread): Adjust.
13865         (thread_apply_all_command): Call inc_refcount.
13866         (_initialize_thread): Don't call
13867         observer_attach_thread_ptid_changed.
13868
13869 2017-04-10  Yao Qi  <yao.qi@linaro.org>
13870
13871         * thread.c (delete_thread_1): Hoist code on marking thread as
13872         exited.
13873
13874 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
13875
13876         * windows-nat.c (windows_detach): Initialize ptid with
13877         minus_one_ptid.
13878
13879 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13880
13881         * unittests/ptid-selftests.c: Fix erroneous assert messages.
13882
13883 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
13884
13885         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
13886         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
13887         (bfin_pseudo_register_write): Likewise
13888
13889 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
13890
13891         * common/ptid.h (struct ptid): Change to...
13892         (class ptid_t): ... this.
13893         <ptid_t>: New constructors.
13894         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
13895         matches>: New methods.
13896         <make_null, make_minus_one>: New static methods.
13897         <pid>: Rename to...
13898         <m_pid>: ...this.
13899         <lwp>: Rename to...
13900         <m_lwp>: ...this.
13901         <tid>: Rename to...
13902         <m_tid>: ...this.
13903         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
13904         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
13905         as references, move comment to class ptid_t.
13906         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
13907         ptid_t static methods.
13908         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
13909         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
13910         Take ptid arguments as references, implement using ptid_t methods.
13911         * unittests/ptid-selftests.c: New file.
13912         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13913         unittests/ptid-selftests.c.
13914         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
13915
13916 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13917
13918         * python/python.c (python_run_simple_file): Cast mode literal to
13919         non-const char pointer as expected by PyFile_FromString.
13920
13921 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
13922
13923         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
13924         minus_one_ptid and null_ptid.
13925
13926 2017-04-05  Pedro Alves  <palves@redhat.com>
13927
13928         * warning.m4 (build_warnings): Remove -Wno-write-strings.
13929         * configure: Regenerate.
13930
13931 2017-04-05  Pedro Alves  <palves@redhat.com>
13932
13933         * ada-exp.y (yyerror): Constify.
13934         * ada-lang.c (bound_name, get_selections)
13935         (ada_variant_discrim_type)
13936         (ada_variant_discrim_name, ada_value_struct_elt)
13937         (ada_lookup_struct_elt_type, is_unchecked_variant)
13938         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
13939         (catch_ada_exception_command_split)
13940         (catch_ada_assert_command_split, catch_assert_command)
13941         (ada_op_name): Constify.
13942         * ada-lang.h (ada_yyerror, get_selections)
13943         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
13944         * arc-tdep.c (arc_print_frame_cache): Constify.
13945         * arm-tdep.c (arm_skip_stub): Constify.
13946         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
13947         (gen_aggregate_elt_ref): Constify.
13948         * bcache.c (print_bcache_statistics): Constify.
13949         * bcache.h (print_bcache_statistics): Constify.
13950         * break-catch-throw.c (catch_exception_command_1):
13951         * breakpoint.c (struct ep_type_description::description):
13952         Constify.
13953         (add_solib_catchpoint): Constify.
13954         (catch_fork_command_1): Add cast.
13955         (add_catch_command): Constify.
13956         * breakpoint.h (add_catch_command, add_solib_catchpoint):
13957         Constify.
13958         * bsd-uthread.c (bsd_uthread_state): Constify.
13959         * buildsym.c (patch_subfile_names): Constify.
13960         * buildsym.h (next_symbol_text_func, patch_subfile_names):
13961         Constify.
13962         * c-exp.y (yyerror): Constify.
13963         (token::oper): Constify.
13964         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
13965         * c-varobj.c (cplus_describe_child): Constify.
13966         * charset.c (find_charset_names): Add cast.
13967         (find_charset_names): Constify array and add const_cast.
13968         * cli/cli-cmds.c (complete_command, cd_command): Constify.
13969         (edit_command): Constify.
13970         * cli/cli-decode.c (lookup_cmd): Constify.
13971         * cli/cli-dump.c (dump_memory_command, dump_value_command):
13972         Constify.
13973         (struct dump_context): Constify.
13974         (add_dump_command, restore_command): Constify.
13975         * cli/cli-script.c (get_command_line): Constify.
13976         * cli/cli-script.h (get_command_line): Constify.
13977         * cli/cli-utils.c (check_for_argument): Constify.
13978         * cli/cli-utils.h (check_for_argument): Constify.
13979         * coff-pe-read.c (struct read_pe_section_data): Constify.
13980         * command.h (lookup_cmd): Constify.
13981         * common/print-utils.c (decimal2str): Constify.
13982         * completer.c (gdb_print_filename): Constify.
13983         * corefile.c (set_gnutarget): Constify.
13984         * cp-name-parser.y (yyerror): Constify.
13985         * cp-valprint.c (cp_print_class_member): Constify.
13986         * cris-tdep.c (cris_register_name, crisv32_register_name):
13987         Constify.
13988         * d-exp.y (yyerror): Constify.
13989         (struct token::oper): Constify.
13990         * d-lang.h (d_yyerror): Constify.
13991         * dbxread.c (struct header_file_location::name): Constify.
13992         (add_old_header_file, add_new_header_file, last_function_name)
13993         (dbx_next_symbol_text, add_bincl_to_list)
13994         (find_corresponding_bincl_psymtab, set_namestring)
13995         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
13996         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
13997         * defs.h (command_line_input, print_address_symbolic)
13998         (deprecated_readline_begin_hook): Constify.
13999         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
14000         Constify.
14001         * event-top.c (handle_line_of_input): Constify and add cast.
14002         * exceptions.c (catch_errors): Constify.
14003         * exceptions.h (catch_errors): Constify.
14004         * expprint.c (print_subexp_standard, op_string, op_name)
14005         (op_name_standard, dump_raw_expression, dump_raw_expression):
14006         * expression.h (op_name, op_string, dump_raw_expression):
14007         Constify.
14008         * f-exp.y (yyerror): Constify.
14009         (struct token::oper): Constify.
14010         (struct f77_boolean_val::name): Constify.
14011         * f-lang.c (f_word_break_characters): Constify.
14012         * f-lang.h (f_yyerror): Constify.
14013         * fork-child.c (fork_inferior): Add cast.
14014         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
14015         (new_variant): Constify.
14016         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
14017         * gdbarch.c: Regenerate.
14018         * gdbcore.h (set_gnutarget): Constify.
14019         * go-exp.y (yyerror): Constify.
14020         (token::oper): Constify.
14021         * go-lang.h (go_yyerror): Constify.
14022         * go32-nat.c (go32_sysinfo): Constify.
14023         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
14024         * guile/scm-cmd.c (cmdscm_function): Constify.
14025         * guile/scm-param.c (pascm_param_value): Constify.
14026         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
14027         (h8300sx_register_name): Constify.
14028         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
14029         Constify.
14030         * ia64-tdep.c (ia64_register_names): Constify.
14031         * infcmd.c (construct_inferior_arguments): Constify.
14032         (path_command, attach_post_wait): Constify.
14033         * language.c (show_range_command, show_case_command)
14034         (unk_lang_error): Constify.
14035         * language.h (language_defn::la_error)
14036         (language_defn::la_name_of_this): Constify.
14037         * linespec.c (decode_line_2): Constify.
14038         * linux-thread-db.c (thread_db_err_str): Constify.
14039         * lm32-tdep.c (lm32_register_name): Constify.
14040         * m2-exp.y (yyerror): Constify.
14041         * m2-lang.h (m2_yyerror): Constify.
14042         * m32r-tdep.c (m32r_register_names): Constify and make static.
14043         * m68hc11-tdep.c (m68hc11_register_names): Constify.
14044         * m88k-tdep.c (m88k_register_name): Constify.
14045         * macroexp.c (appendmem): Constify.
14046         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
14047         (upgrade_type, parse_external, parse_partial_symbols)
14048         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
14049         (new_symbol): Constify.
14050         * memattr.c (mem_info_command): Constify.
14051         * mep-tdep.c (register_name_from_keyword): Constify.
14052         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
14053         Constify.
14054         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
14055         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
14056         * mi/mi-main.c (captured_mi_execute_command): Constify and add
14057         cast.
14058         (mi_execute_async_cli_command): Constify.
14059         * mips-tdep.c (mips_register_name): Constify.
14060         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
14061         (am33_register_name, am33_2_register_name)
14062         * moxie-tdep.c (moxie_register_names): Constify.
14063         * nat/linux-osdata.c (osdata_type): Constify fields.
14064         * nto-tdep.c (nto_parse_redirection): Constify.
14065         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
14066         (lookup_child_selector): Constify.
14067         (objc_methcall::name): Constify.
14068         * objc-lang.h (lookup_objc_class, lookup_child_selector)
14069         (lookup_struct_typedef): Constify.
14070         * objfiles.c (pc_in_section): Constify.
14071         * objfiles.h (pc_in_section): Constify.
14072         * p-exp.y (struct token::oper): Constify.
14073         (yyerror): Constify.
14074         * p-lang.h (pascal_yyerror): Constify.
14075         * parser-defs.h (op_name_standard): Constify.
14076         (op_print::string): Constify.
14077         (exp_descriptor::op_name): Constify.
14078         * printcmd.c (print_address_symbolic): Constify.
14079         * psymtab.c (print_partial_symbols): Constify.
14080         * python/py-breakpoint.c (stop_func): Constify.
14081         (bppy_get_expression): Constify.
14082         * python/py-cmd.c (cmdpy_completer::name): Constify.
14083         (cmdpy_function): Constify.
14084         * python/py-event.c (evpy_add_attribute)
14085         (gdbpy_initialize_event_generic): Constify.
14086         * python/py-event.h (evpy_add_attribute)
14087         (gdbpy_initialize_event_generic): Constify.
14088         * python/py-evts.c (add_new_registry): Constify.
14089         * python/py-finishbreakpoint.c (outofscope_func): Constify.
14090         * python/py-framefilter.c (get_py_iter_from_func): Constify.
14091         * python/py-inferior.c (get_buffer): Add cast.
14092         * python/py-param.c (parm_constant::name): Constify.
14093         * python/py-unwind.c (fprint_frame_id): Constify.
14094         * python/python.c (gdbpy_parameter_value): Constify.
14095         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
14096         * remote.c (memory_packet_config::name): Constify.
14097         (show_packet_config_cmd, remote_write_bytes)
14098         (remote_buffer_add_string):
14099         * reverse.c (exec_reverse_once): Constify.
14100         * rs6000-tdep.c (variant::name, variant::description): Constify.
14101         * rust-exp.y (rustyyerror): Constify.
14102         * rust-lang.c (rust_op_name): Constify.
14103         * rust-lang.h (rustyyerror): Constify.
14104         * serial.h (serial_ops::name): Constify.
14105         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
14106         (sh_sh3e_register_name, sh_sh2e_register_name)
14107         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
14108         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
14109         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
14110         (sh_sh4al_dsp_register_name): Constify.
14111         * sh64-tdep.c (sh64_register_name): Constify.
14112         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
14113         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
14114         * stabsread.c (patch_block_stabs, read_type_number)
14115         (ref_map::stabs, ref_add, process_reference)
14116         (symbol_reference_defined, define_symbol, define_symbol)
14117         (error_type, read_type, read_member_functions, read_cpp_abbrev)
14118         (read_one_struct_field, read_struct_fields, read_baseclasses)
14119         (read_tilde_fields, read_struct_type, read_array_type)
14120         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
14121         (read_huge_number, read_range_type, read_args, common_block_start)
14122         (find_name_end): Constify.
14123         * stabsread.h (common_block_start, define_symbol)
14124         (process_one_symbol, symbol_reference_defined, ref_add):
14125         * symfile.c (get_section_index, add_symbol_file_command):
14126         * symfile.h (get_section_index): Constify.
14127         * target-descriptions.c (tdesc_type::name): Constify.
14128         (tdesc_free_type): Add cast.
14129         * target.c (find_default_run_target):
14130         (add_deprecated_target_alias, find_default_run_target)
14131         (target_announce_detach): Constify.
14132         (do_option): Constify.
14133         * target.h (add_deprecated_target_alias): Constify.
14134         * thread.c (print_thread_info_1): Constify.
14135         * top.c (deprecated_readline_begin_hook, command_line_input):
14136         Constify.
14137         (init_main): Add casts.
14138         * top.h (handle_line_of_input): Constify.
14139         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
14140         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
14141         (tfind_command): Rename to ...
14142         (tfind_command_1): ... this and constify.
14143         (tfind_command): New function.
14144         (tfind_end_command, tfind_start_command): Adjust.
14145         (encode_source_string): Constify.
14146         * tracepoint.h (encode_source_string): Constify.
14147         * tui/tui-data.c (tui_partial_win_by_name): Constify.
14148         * tui/tui-data.h (tui_partial_win_by_name): Constify.
14149         * tui/tui-source.c (tui_set_source_content_nil): Constify.
14150         * tui/tui-source.h (tui_set_source_content_nil): Constify.
14151         * tui/tui-win.c (parse_scrolling_args): Constify.
14152         * tui/tui-windata.c (tui_erase_data_content): Constify.
14153         * tui/tui-windata.h (tui_erase_data_content): Constify.
14154         * tui/tui-winsource.c (tui_erase_source_content): Constify.
14155         * tui/tui.c (tui_enable): Add cast.
14156         * utils.c (defaulted_query): Constify.
14157         (init_page_info): Add cast.
14158         (puts_debug, subset_compare): Constify.
14159         * utils.h (subset_compare): Constify.
14160         * varobj.c (varobj_format_string): Constify.
14161         * varobj.h (varobj_format_string): Constify.
14162         * vax-tdep.c (vax_register_name): Constify.
14163         * windows-nat.c (windows_detach): Constify.
14164         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
14165         * xml-support.c (gdb_xml_end_element): Constify.
14166         * xml-tdesc.c (tdesc_start_reg): Constify.
14167         * xstormy16-tdep.c (xstormy16_register_name): Constify.
14168         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
14169         * xtensa-tdep.h (xtensa_register_t::name): Constify.
14170
14171 2017-04-05  Pedro Alves  <palves@redhat.com>
14172
14173         * proc-api.c (struct trans): Constify.
14174         (procfs_note): Constify.
14175         * proc-events.c (struct trans, syscall_table):
14176         * proc-flags.c (struct trans): Constify.
14177         * proc-utils.h (procfs_note): Constify.
14178         * proc-why.c (struct trans): Constify.
14179         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
14180         (procfs_detach): Constify.
14181         * sol-thread.c (struct string_map): Constify.
14182         (td_err_string, td_state_string): Constify.
14183
14184 2017-04-05  Pedro Alves  <palves@redhat.com>
14185
14186         * proc-api.c (procfs_filename): Don't initialize
14187         procfs_filename.
14188         (prepare_to_trace): Assume procfs_filename is non-NULL.
14189         (_initialize_proc_api): Give procfs_filename a default value here.
14190
14191 2017-04-05  Pedro Alves  <palves@redhat.com>
14192
14193         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
14194         'cond_string' parameter.
14195         (extract_exception_regexp): Constify 'string' parameter.
14196         (catch_exception_command_1): Constify.
14197         * breakpoint.c (init_catchpoint)
14198         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
14199         parameter.
14200         (ep_parse_optional_if_clause, catch_fork_command_1)
14201         (catch_exec_command_1): Constify.
14202         * breakpoint.h (init_catchpoint): Constify 'cond_string'
14203         parameter.
14204         (ep_parse_optional_if_clause): Constify.
14205         * cli/cli-utils.c (remove_trailing_whitespace)
14206         (check_for_argument): Constify.
14207         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
14208         non-const overload.
14209         (check_for_argument): Likewise.
14210
14211 2017-04-05  Pedro Alves  <palves@redhat.com>
14212
14213         * event-top.c (command_line_handler): Add cast to execute_command
14214         call.
14215         * record-btrace.c (cmd_record_btrace_bts_start)
14216         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
14217         (cmd_record_btrace_start): Add cast to execute_command call.
14218         * record-full.c (record_full_goto_insn):
14219         * record.c (record_start, record_stop): Add cast to
14220         execute_command_to_string calls.
14221         (cmd_record_start): Add cast to execute_command calls.
14222
14223 2017-04-05  Pedro Alves  <palves@redhat.com>
14224
14225         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
14226         static inline function.
14227         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
14228         array and use gdb_PyArg_ParseTupleAndKeywords.
14229         * python/py-cmd.c (cmdpy_init): Likewise.
14230         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
14231         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
14232         (infpy_search_memory): Likewise.
14233         * python/py-objfile.c (objfpy_add_separate_debug_file)
14234         (gdbpy_lookup_objfile): Likewise.
14235         * python/py-symbol.c (gdbpy_lookup_symbol)
14236         (gdbpy_lookup_global_symbol): Likewise.
14237         * python/py-type.c (gdbpy_lookup_type): Likewise.
14238         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
14239         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
14240         Likewise.
14241
14242 2017-04-05  Pedro Alves  <palves@redhat.com>
14243
14244         * python/python-internal.h (gdb_PyGetSetDef): New type.
14245         * python/py-block.c (block_object_getset)
14246         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
14247         * python/py-event.c (event_object_getset)
14248         (finish_breakpoint_object_getset): Likewise.
14249         * python/py-inferior.c (inferior_object_getset): Likewise.
14250         * python/py-infthread.c (thread_object_getset): Likewise.
14251         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
14252         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
14253         * python/py-objfile.c (objfile_getset): Likewise.
14254         * python/py-progspace.c (pspace_getset): Likewise.
14255         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
14256         Likewise.
14257         * python/py-record.c (recpy_record_getset): Likewise.
14258         * python/py-symbol.c (symbol_object_getset): Likewise.
14259         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
14260         Likewise.
14261         * python/py-type.c (type_object_getset, field_object_getset):
14262         Likewise.
14263         * python/py-value.c (value_object_getset): Likewise.
14264
14265 2017-04-05  Pedro Alves  <palves@redhat.com>
14266
14267         * python/python-internal.h (gdb_PyObject_CallMethod)
14268         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
14269         New functions.
14270         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
14271         (PySys_GetObject, PySys_SetPath): New macros.
14272
14273 2017-04-05  Pedro Alves  <palves@redhat.com>
14274
14275         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
14276         info_osdata_command.
14277         * osdata.c (info_osdata_command): Rename to ...
14278         (info_osdata): ... this.  Constify 'type' parameter, and remove
14279         the 'from_tty' parameter.  Accept NULL TYPE.
14280         (info_osdata_command): New function.
14281         * osdata.h (info_osdata_command): Remove declaration.
14282         (info_osdata): New declaration.
14283
14284 2017-04-05  Pedro Alves  <palves@redhat.com>
14285
14286         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
14287         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
14288         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
14289         parameter.
14290         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
14291         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
14292         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
14293         parameter.
14294         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
14295         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
14296         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
14297         (mi_cmd_file_list_exec_source_files)
14298         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
14299         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
14300         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
14301         parameter.
14302         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
14303         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
14304         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
14305         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
14306         (mi_cmd_stack_info_frame): Constify 'command' parameter.
14307         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
14308         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
14309         'command' parameter.
14310         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
14311         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
14312         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
14313         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
14314         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
14315         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
14316         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
14317         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
14318         (mi_cmd_var_set_update_range): Constify 'command' parameter.
14319         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
14320         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
14321         parameter.
14322         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
14323         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
14324         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
14325         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
14326         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
14327         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
14328         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
14329         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
14330         (mi_cmd_data_list_changed_registers)
14331         (mi_cmd_data_write_register_values)
14332         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
14333         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
14334         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
14335         (mi_cmd_list_features, mi_cmd_list_target_features)
14336         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
14337         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
14338         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
14339         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
14340         (mi_cmd_trace_frame_collected): Constify 'command'
14341         parameter.
14342         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
14343         'command' parameter.
14344
14345 2017-04-05  Pedro Alves  <palves@redhat.com>
14346
14347         * ada-lang.c (ada_completer_word_break_characters): Now a const
14348         array.
14349         (ada_get_gdb_completer_word_break_characters): Constify.
14350         * completer.c (gdb_completer_command_word_break_characters)
14351         (gdb_completer_file_name_break_characters)
14352         (gdb_completer_quote_characters): Now const arrays.
14353         (get_gdb_completer_quote_characters): Constify.
14354         (set_rl_completer_word_break_characters): New function.
14355         (set_gdb_completion_word_break_characters)
14356         (complete_line_internal): Use it.
14357         * completer.h (get_gdb_completer_quote_characters): Constify.
14358         (set_rl_completer_word_break_characters): Declare.
14359         * f-lang.c (f_word_break_characters): Constify.
14360         * language.c (default_word_break_characters): Constify.
14361         * language.h (language_defn::la_word_break_characters): Constify.
14362         (default_word_break_characters): Constify.
14363         * top.c (init_main): Use set_rl_completer_word_break_characters.
14364
14365 2017-04-05  Pedro Alves  <palves@redhat.com>
14366
14367         * aix-thread.c (aix_thread_pid_to_str)
14368         (aix_thread_extra_thread_info): Constify.
14369         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
14370         * bsd-uthread.c (bsd_uthread_extra_thread_info)
14371         (bsd_uthread_pid_to_str): Constify.
14372         * corelow.c (core_pid_to_str): Constify.
14373         * darwin-nat.c (darwin_pid_to_str): Constify.
14374         * fbsd-nat.c (fbsd_pid_to_str): Constify.
14375         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
14376         Constify.
14377         * gnu-nat.c (gnu_pid_to_str): Constify.
14378         * go32-nat.c (go32_pid_to_str): Constify.
14379         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
14380         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
14381         * inferior.c (inferior_pid_to_str): Constify.
14382         * linux-nat.c (linux_nat_pid_to_str): Constify.
14383         * linux-tdep.c (linux_core_pid_to_str): Constify.
14384         * linux-thread-db.c (thread_db_pid_to_str)
14385         (thread_db_extra_thread_info): Constify.
14386         * nto-tdep.c (nto_extra_thread_info): Constify.
14387         * nto-tdep.h (nto_extra_thread_info): Constify.
14388         * obsd-nat.c (obsd_pid_to_str): Constify.
14389         * procfs.c (procfs_pid_to_str): Constify.
14390         * ravenscar-thread.c (ravenscar_extra_thread_info)
14391         (ravenscar_pid_to_str): Constify.
14392         * remote-sim.c (gdbsim_pid_to_str): Constify.
14393         * remote.c (remote_threads_extra_info, remote_pid_to_str):
14394         Constify.
14395         * sol-thread.c (solaris_pid_to_str): Constify.
14396         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
14397         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
14398         * target.c (default_pid_to_str, target_pid_to_str)
14399         (normal_pid_to_str, default_pid_to_str): Constify.
14400         * target.h (target_ops::to_pid_to_str)
14401         (target_ops::to_extra_thread_info): Constify.
14402         (target_pid_to_str, normal_pid_to_str): Constify.
14403         * windows-nat.c (windows_pid_to_str): Constify.
14404         * gdbarch.sh (core_pid_to_str): Constify.
14405         * target-delegates.c: Regenerate.
14406         * gdbarch.h, gdbarch.c: Regenerate.
14407
14408 2017-04-05  Pedro Alves  <palves@redhat.com>
14409
14410         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
14411         the memory of the temporary warning_pre_print override.
14412         * utils.c (warning_pre_print): Constify.
14413         * utils.h (warning_pre_print): Constify.
14414
14415 2017-04-05  Pedro Alves  <palves@redhat.com>
14416
14417         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
14418         (shell_command): New function.
14419         (make_command): Use std::string.
14420         (init_cli_cmds): Register shell_command instead of shell_escape.
14421
14422 2017-04-05  Pedro Alves  <palves@redhat.com>
14423
14424         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
14425         * tracepoint.c (default_collect): Don't initialize.
14426
14427 2017-04-05  Pedro Alves  <palves@redhat.com>
14428
14429         * macroexp.c (macro_buffer::shared): Now a bool.
14430         (init_buffer): Update.
14431         (init_shared_buffer): Constify 'addr' parameter.
14432         (substitute_args, expand, macro_expand, macro_expand_next): Remove
14433         casts.
14434
14435 2017-04-05  Pedro Alves  <palves@redhat.com>
14436
14437         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
14438         * disasm.c (set_disassembler_options): Constify local.
14439         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
14440
14441 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
14442
14443         PR gdb/21352
14444         * tracefile.c (tsave_command): Fix argument parsing for '-r'
14445         option.
14446
14447 2017-04-05  Yao Qi  <yao.qi@linaro.org>
14448
14449         * frame.c (frame_unwind_register_unsigned): Call
14450         frame_unwind_register_value.
14451
14452 2017-04-05  Yao Qi  <yao.qi@linaro.org>
14453
14454         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
14455         Use gdb_test_multiple, and don't match anchor.
14456
14457 2017-04-05  Pedro Alves  <palves@redhat.com>
14458
14459         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
14460         (Write After Approval): Remove Simon Marchi.
14461
14462 2017-04-05  Pedro Alves  <palves@redhat.com>
14463
14464         * common/gdb_optional.h (optional::optional): Make constexpr and
14465         initialize m_dummy.
14466
14467 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
14468
14469         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14470         (amd64fbsd_jmp_buf_reg_offset): Remove.
14471         (amd64fbsd_supply_uthread): Remove function.
14472         (amd64fbsd_collect_uthread): Remove function.
14473         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
14474         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
14475         (x86_64-*-freebsd*): Remove bsd-uthread.o.
14476         (fbsd-nat.c): Update comment.
14477         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14478         (i386fbsd_jmp_buf_reg_offset): Remove.
14479         (i386fbsd_supply_uthread): Remove function.
14480         (i386fbsd_collect_uthread): Remove function.
14481         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
14482
14483 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
14484
14485         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
14486         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
14487         * NEWS: Mention that support for FreeBSD/alpha was removed.
14488         * alpha-fbsd-tdep.c: Delete file.
14489         * config/alpha/fbsd.mh: Delete file.
14490         * configure.host: Delete alpha*-*-freebsd* and
14491         alpha*-*-kfreebsd*-gnu.
14492         * configure.tgt: Delete alpha*-*-freebsd* and
14493         alpha*-*-kfreebsd*-gnu.
14494
14495 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
14496
14497         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
14498         amd64bsd_store_inferior_registers): Use ptid from regcache.
14499
14500 2017-04-04  Pedro Alves  <palves@redhat.com>
14501
14502         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
14503         data fields, make them private and add "m_" prefixes.
14504         (lnp_state_machine::lnp_state_machine): New ctor.
14505         (record_line, check_line_address, handle_set_discriminator)
14506         (handle_set_address, handle_advance_pc, handle_special_opcode)
14507         (handle_advance_line, handle_set_file, handle_negate_stmt)
14508         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
14509         (end_sequence, advance_line): New methods.
14510         (m_gdbarch, m_record_lines_p): New fields.
14511         (lnp_reader_state): Delete.
14512         (dwarf_record_line): Rename to ...
14513         (lnp_state_machine::record_line): ... adjust.
14514         (init_lnp_state_machine): Delete.
14515         (lnp_state_machine::lnp_state_machine): New.
14516         (check_line_address): Rename to ...
14517         (lnp_state_machine::check_line_address): This.
14518         (dwarf_decode_lines_1): Remove reference to "reader_state".
14519         Adjust lnp_state_machine having a non-default ctor.  Use bool.
14520         State machine internal state manipulation moved to
14521         lnp_state_machine methods.
14522
14523 2017-04-04  Pedro Alves  <palves@redhat.com>
14524
14525         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14526         unittests/offset-type-selftests.c.
14527         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
14528         * common/offset-type.h: New file.
14529         * common/preprocessor.h: New file.
14530         * common/traits.h: New file.
14531         * common/valid-expr.h: New file.
14532         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
14533         sect_offset and cu_offset strong typedefs throughout.
14534         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
14535         typedefs throughout.
14536         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
14537         sect_offset and cu_offset strong typedefs throughout.
14538         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
14539         typedefs throughout.
14540         * gdbtypes.h: Include "common/offset-type.h".
14541         (cu_offset): Now an offset type (strong typedef) instead of a
14542         struct.
14543         (sect_offset): Likewise.
14544         (union call_site_parameter_u): Rename "param_offset" field to
14545         "param_cu_off".
14546         * unittests/offset-type-selftests.c: New file.
14547
14548 2017-04-04  Pedro Alves  <palves@redhat.com>
14549
14550         * common/underlying.h: New file.
14551         * dwarf2read.c: Include "common/gdb_optional.h" and
14552         "common/underlying.h".
14553         (dir_index, file_name_index): New types.
14554         (file_entry): Use them.
14555         (file_entry::include): Use to_underlying.
14556         (line_header::add_file_name): Use dir_index.
14557         (read_formatted_entries): Use gdb::optional.  Read form before
14558         writting to file_entry.
14559         (dwarf_decode_line_header): Use dir_index.
14560         (lnp_state_machine::current_file): Use to_underlying.
14561         (lnp_state_machine::file): Change type to file_name_index.
14562         (dwarf_record_line): Use to_underlying.
14563         (init_lnp_state_machine): Use file_name_index.
14564         (dwarf_decode_lines_1): Use dir_index and file_name_index.
14565
14566 2017-04-04  Pedro Alves  <palves@redhat.com>
14567
14568         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
14569         operator bool, has_value and get methods.
14570
14571 2017-04-04  Pedro Alves  <palves@redhat.com>
14572
14573         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
14574         fields.
14575         (line_header): Initialize all data fields.  Change type of
14576         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
14577         Change type of include_dirs to std::vector<const char *>.  Remove
14578         num_include_dirs, include_dirs_size.  Change type of file_names to
14579         std::vector<file_entry>.  Remove num_file_names, file_names_size.
14580         (line_header::line_header): New.
14581         (line_header::add_include_dir, line_header::add_file_name): New
14582         methods.
14583         (line_header::include_dir_at): Remove NULL check.
14584         (line_header::file_name_at): Add const overload.
14585         (line_header_up): New unique_ptr typedef.
14586         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
14587         std::vector.  Remove free_line_header call.
14588         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
14589         free_line_header call.
14590         (free_cu_line_header): Delete.
14591         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
14592         (setup_type_unit_groups): Use line_header_up instead of cleanups.
14593         Adjust to use std::vector.
14594         (free_line_header): Delete.
14595         (free_line_header_voidp): Use delete.
14596         (add_include_dir): Replace with ...
14597         (line_header::add_include_dir): ... this method.  Use std::vector.
14598         (add_file_name): Replace with ...
14599         (line_header::add_file_name): ... this method.  Use std::vector.
14600         (add_include_dir_stub): Delete.
14601         (read_formatted_entries): Remove memset.
14602         (dwarf_decode_line_header): Return a line_header_up instead of a
14603         raw pointer.  Remove cleanup handling.  Pass lambdas to
14604         read_formatted_entries.  Adjust to use line_header methods.
14605         (dwarf_decode_lines_1): Adjust to use line_header methods.
14606         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
14607         use std::vector.
14608
14609 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
14610
14611         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
14612         instead of struct ptid.
14613
14614 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
14615
14616         * frame.c (get_frame_register_bytes): Unwind using value.
14617         (put_frame_register_bytes): Likewise.
14618
14619 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
14620
14621         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
14622         aggregate-like.
14623
14624 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
14625
14626         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
14627
14628 2017-03-29  Yao Qi  <yao.qi@linaro.org>
14629
14630         * gdbthread.h (struct thread_info): Declare constructor and
14631         destructor.  Add some in-class member initializers.
14632         * thread.c (free_thread): Remove.
14633         (init_thread_list): Call delete instead of free_thread.
14634         (new_thread): Call thread_info constructor.
14635         (thread_info::thread_info): New function.
14636         (thread_info::~thread_info): New function.
14637         (delete_thread_1): Call delete instead of free_thread.
14638         (make_cleanup_restore_current_thread): Move tp and frame to
14639         inner block.
14640
14641 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
14642
14643         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
14644         (arc_skip_prologue): Likewise.
14645         (arc_make_frame_cache): Likewise.
14646         (arc_pv_get_operand): New function.
14647         (arc_is_in_prologue): Likewise.
14648         (arc_analyze_prologue): Likewise.
14649         (arc_print_frame_cache): Likewise.
14650         (MAX_PROLOGUE_LENGTH): New constant.
14651
14652 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
14653
14654         * configure.tgt: Add arc-insn.o.
14655         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
14656         (dump_arc_instruction_command): New function.
14657         (arc_fprintf_disasm): Likewise.
14658         (arc_disassemble_info): Likewise.
14659         (arc_insn_get_operand_value): Likewise.
14660         (arc_insn_get_operand_value_signed): Likewise.
14661         (arc_insn_get_memory_base_reg): Likewise.
14662         (arc_insn_get_memory_offset): Likewise.
14663         (arc_insn_get_branch_target): Likewise.
14664         (arc_insn_dump): Likewise.
14665         (arc_insn_get_linear_next_pc): Likewise.
14666         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
14667         (arc_disassemble_info): Likewise.
14668         (arc_insn_get_branch_target): Likewise.
14669         (arc_insn_get_linear_next_pc): Likewise.
14670         * NEWS: Mention new "maint print arc arc-instruction".
14671
14672 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
14673
14674         * arc-tdep (maintenance_print_arc_list): New variable.
14675         (maintenance_print_arc_command): New function.
14676
14677 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
14678
14679         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
14680         Add "limm" and "reserved".
14681         (arc_cannot_fetch_register, arc_cannot_store_register): Add
14682         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
14683         * arc-tdep.h (arc_regnum): Likewise.
14684
14685 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
14686
14687         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14688         for THREADPTR register.
14689         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
14690         register.
14691         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
14692         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
14693         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
14694
14695 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
14696
14697         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
14698         registers above gdbarch_num_regs (gdbarch) as privileged in
14699         call0 ABI.
14700
14701 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
14702
14703         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14704         for a single specified register or for all registers in
14705         a0_base..a0_base + C0_NREGS range.
14706         (supply_gregset_reg): Call regcache_raw_supply for a single
14707         specified register or for all registers in a0_base..a0_base +
14708         C0_NREGS range.
14709
14710 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
14711
14712         * arch/xtensa.h (C0_NREGS): Add definition.
14713         * xtensa-tdep.c (C0_NREGS): Remove definition.
14714
14715 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
14716
14717         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
14718         Drop xtensa_default_isa initialization.
14719         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
14720
14721 2017-03-27  Pedro Alves  <palves@redhat.com>
14722
14723         * dwarf2read.c (file_entry) <dir_index>: Add comment.
14724         (file_entry::include_dir): New method.
14725         (line_header::include_dir_at, line_header::file_name_at): New
14726         methods.
14727         (setup_type_unit_groups, setup_type_unit_groups)
14728         (psymtab_include_file_name): Simplify using the new methods.
14729         (lnp_state_machine) <the_line_header>: New field.
14730         <file>: Add comment.
14731         (lnp_state_machine::current_file): New method.
14732         (dwarf_record_line): Simplify using the new methods.
14733         (init_lnp_state_machine): Initialize the "the_line_header" field.
14734         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
14735         Simplify using the new methods.
14736
14737 2017-03-27  Pedro Alves  <palves@redhat.com>
14738
14739         * cp-name-parser.y (make_empty): Delete.
14740         (demangler_special, nested_name, ptr_operator, array_indicator)
14741         (direct_declarator, declarator_1): Use fill_comp instead of
14742         make_empty.
14743
14744 2017-03-27  Pedro Alves  <palves@redhat.com>
14745
14746         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
14747         to ATTRIBUTE_PRINTF.
14748         * solib-target.c (library_list_start_list): Print "string" not
14749         "version".
14750         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
14751         gdb_xml_error call.
14752
14753 2017-03-27  Pedro Alves  <palves@redhat.com>
14754
14755         * dwarf2read.c (struct file_and_directory): New.
14756         (dwarf2_get_dwz_file): Adjust to use std::string.
14757         (dw2_get_file_names_reader): Adjust to use file_and_directory.
14758         (find_file_and_directory): Adjust to return a file_and_directory
14759         object.
14760         (read_file_scope): Adjust to use file_and_directory.  Remove
14761         make_cleanup/do_cleanups calls.
14762         (open_and_init_dwp_file): Adjust to use std::string.  Remove
14763         make_cleanup/do_cleanups calls.
14764         * python/python.c (do_start_initialization): Adjust to ldirname
14765         returning a std::string.
14766         * utils.c (ldirname): Now returns a std::string.
14767         * utils.h (ldirname): Change return type to std::string.
14768         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
14769         returning a std::string.
14770         * xml-tdesc.c (file_read_description_xml): Likewise.
14771
14772 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
14773
14774         * regcache.c (regcache_debug_print_register): New function.
14775         * regcache.h (regcache_debug_print_register): New declaration.
14776         * target.c (debug_print_register): Remove.
14777         (target_fetch_registers): Call regcache_debug_print_register.
14778         (target_store_registers): Likewise.
14779
14780 2017-03-24  Pádraig Brady  <pbrady@fb.com>
14781
14782         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
14783         reference beyond the 'lh->include_dirs' array before accessing to
14784         it.
14785         (psymtab_include_file_name): Likewise.
14786         (dwarf_decode_lines_1): Likewise.
14787         (dwarf_decode_lines): Likewise.
14788         (file_file_name): Likewise.
14789
14790 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
14791
14792         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
14793         inferior_ptid.
14794         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14795         ps_lsetfpregs): Likewise.
14796         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
14797         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14798         ps_lsetfpregs): Likewise.
14799         * target.c (target_fetch_registers, target_store_registers):
14800         Remove asserts.
14801
14802 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
14803
14804         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
14805
14806 2017-03-23  Yao Qi  <yao.qi@linaro.org>
14807
14808         * aarch64-tdep.c (aarch64_process_record_test): Declare.
14809         (_initialize_aarch64_tdep): Register it.
14810         (aarch64_record_load_store): Handle PRFM instruction.
14811         (aarch64_process_record_test): New function.
14812
14813 2017-03-23  Yao Qi  <yao.qi@linaro.org>
14814
14815         * aarch64-tdep.c (aarch64_record_load_store): Fix code
14816         indentation.
14817
14818 2017-03-23  Yao Qi  <yao.qi@linaro.org>
14819
14820         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
14821
14822 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14823
14824         python/python.c (do_start_initialization): Fix memory leak.
14825
14826 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
14827
14828         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
14829         using get_ptrace_pid.
14830         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
14831         inferior_ptid.
14832         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
14833         inferior_ptid instead of pid.
14834
14835 2017-03-22  Yao Qi  <yao.qi@linaro.org>
14836
14837         * aarch64-tdep.c: Wrap locally used classes in anonymous
14838         namespace.
14839         * arm-tdep.c: Likewise.
14840         * linespec.c: Likewise.
14841         * ui-out.c: Likewise.
14842
14843 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
14844
14845         PR gdb/19637
14846         * python/lib/gdb/printer/bound_registers.py: Import sys.
14847
14848 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
14849
14850         * windows-nat.c (do_windows_fetch_inferior_registers): Add
14851         windows_thread_info parameter and use it instead of
14852         current_thread.
14853         (windows_fetch_inferior_registers): Don't set current_thread,
14854         pass the thread to do_windows_fetch_inferior_registers.  Use
14855         ptid from regcache instead of inferior_ptid.
14856         (do_windows_store_inferior_registers): Add windows_thread_info
14857         parameter and use it instead of current_thread.
14858         (windows_store_inferior_registers): Don't set current_thread,
14859         pass the thread to do_windows_store_inferior_registers.  Use
14860         ptid from regcache instead of inferior_ptid.
14861
14862 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
14863
14864         * ser-mingw.c (ser_windows_raw): Remove reference to
14865         struct serial::current_timeout.
14866
14867 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
14868
14869         PR tdep/20928
14870         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
14871         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
14872         (sparc64_fsr_type): Fix %fsr decoding.
14873
14874 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
14875
14876         * python/py-record-btrace.c (btpy_insn_data): Change return type
14877         for Python 2.
14878
14879 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
14880
14881         * spu-linux-nat.c (spu_fetch_inferior_registers,
14882         spu_store_inferior_registers): Use ptid from regcache, set and
14883         restore inferior_ptid.
14884         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
14885         Likewise.
14886
14887 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
14888
14889         * i386-linux-nat.c (fetch_register, store_register,
14890         i386_linux_fetch_inferior_registers,
14891         i386_linux_store_inferior_registers): Use ptid from regcache.
14892         * ia64-linux-nat.c (ia64_linux_fetch_register,
14893         ia64_linux_store_register): Likewise.
14894         * inf-ptrace.c (inf_ptrace_fetch_register,
14895         inf_ptrace_store_register): Likewise.
14896         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
14897         m32r_linux_store_inferior_registers): Likewise.
14898         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
14899         m68kbsd_store_inferior_registers): Likewise.
14900         * m68k-linux-nat.c (fetch_register, store_register,
14901         m68k_linux_fetch_inferior_registers,
14902         m68k_linux_store_inferior_registers): Likewise.
14903         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
14904         m88kbsd_store_inferior_registers): Likewise.
14905         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
14906         mips_fbsd_store_inferior_registers): Likewise.
14907         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
14908         mips64_linux_regsets_store_registers): Likewise.
14909         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
14910         mipsnbsd_store_inferior_registers): Likewise.
14911         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
14912         mips64obsd_store_inferior_registers): Likewise.
14913         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
14914         Likewise.
14915         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
14916         ppcfbsd_store_inferior_registers): Likewise.
14917         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
14918         ppc_linux_store_inferior_registers): Likewise.
14919         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
14920         ppcnbsd_store_inferior_registers): Likewise.
14921         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
14922         ppcobsd_store_registers): Likewise.
14923         * procfs.c (procfs_fetch_registers, procfs_store_registers):
14924         Likewise.
14925         * ravenscar-thread.c (ravenscar_fetch_registers,
14926         ravenscar_store_registers, ravenscar_prepare_to_store):
14927         Likewise.
14928         * record-btrace.c (record_btrace_fetch_registers,
14929         record_btrace_store_registers, record_btrace_prepare_to_store):
14930         Likewise.
14931         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
14932         Lookup inferior using ptid from regcache, instead of
14933         current_inferior.
14934         * remote.c (remote_fetch_registers, remote_store_registers): Use
14935         ptid from regcache.
14936         * rs6000-nat.c (fetch_register, store_register): Likewise.
14937         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
14938         s390_linux_store_inferior_registers): Likewise.
14939         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
14940         shnbsd_store_inferior_registers): Likewise.
14941         * sol-thread.c (sol_thread_fetch_registers,
14942         sol_thread_store_registers): Likewise.
14943         * sparc-nat.c (sparc_fetch_inferior_registers,
14944         sparc_store_inferior_registers): Likewise.
14945         * tilegx-linux-nat.c (fetch_inferior_registers,
14946         store_inferior_registers): Likewise.
14947         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
14948         vaxbsd_store_inferior_registers): Likewise.
14949         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
14950         store_xtregs): Likewise.
14951
14952 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14953
14954         PR gdb/14441
14955         * NEWS: Mention support for rvalue references in GDB and python.
14956         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
14957         supports both lvalue and rvalue references.
14958
14959 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14960
14961         PR gdb/14441
14962         * gdbtypes.c (rank_one_type): Implement overloading
14963         resolution rules regarding rvalue references.
14964
14965 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14966
14967         PR gdb/14441
14968         * aarch64-tdep.c (aarch64_type_align)
14969         (aarch64_extract_return_value, aarch64_store_return_value): Change
14970         lvalue reference type checks to general reference type checks.
14971         * amd64-tdep.c (amd64_classify): Likewise.
14972         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
14973         Likewise.
14974         * arm-tdep.c (arm_type_align, arm_extract_return_value)
14975         (arm_store_return_value): Likewise.
14976         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
14977         * c-typeprint.c (c_print_type): Likewise.
14978         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
14979         (cplus_number_of_children, cplus_describe_child): Likewise.
14980         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
14981         * completer.c (expression_completer): Likewise.
14982         * cp-support.c (make_symbol_overload_list_adl_namespace):
14983         Likewise.
14984         * darwin-nat-info.c (info_mach_region_command): Likewise.
14985         * dwarf2loc.c (entry_data_value_coerce_ref)
14986         (value_of_dwarf_reg_entry): Likewise.
14987         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
14988         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
14989         Likewise.
14990         * findvar.c (extract_typed_address, store_typed_address):
14991         Likewise.
14992         * gdbtypes.c (rank_one_type): Likewise.
14993         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
14994         * infcall.c (value_arg_coerce): Likewise.
14995         * language.c (pointer_type): Likewise.
14996         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
14997         Likewise.
14998         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
14999         * mn10300-tdep.c (mn10300_type_align): Likewise.
15000         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
15001         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
15002         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
15003         Likewise.
15004         * printcmd.c (print_formatted, x_command): Likewise.
15005         * python/py-type.c (typy_get_composite, typy_template_argument):
15006         Likewise.
15007         * python/py-value.c (valpy_referenced_value)
15008         (valpy_get_dynamic_type, value_has_field): Likewise.
15009         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
15010         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
15011         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
15012         * spu-tdep.c (spu_scalar_value_p): Likewise.
15013         * symtab.c (lookup_symbol_aux): Likewise.
15014         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
15015         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
15016         Likewise.
15017         * valops.c (value_cast_pointers, value_cast)
15018         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
15019         (value_struct_elt, value_struct_elt_bitpos)
15020         (value_find_oload_method_list, find_overload_match)
15021         (value_rtti_indirect_type): Likewise.
15022         * valprint.c (val_print_scalar_type_p, generic_val_print):
15023         Likewise.
15024         * value.c (value_actual_type, value_as_address, unpack_long)
15025         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
15026         (coerce_ref): Likewise.
15027         * varobj.c (varobj_get_value_type): Likewise.
15028
15029 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15030
15031         PR gdb/14441
15032         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
15033         table of constants.
15034         * python/lib/gdb/command/explore.py: Support exploring values
15035         of rvalue reference types.
15036         * python/lib/gdb/types.py: Implement get_basic_type() for
15037         rvalue reference types.
15038         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
15039         constant.
15040         * python/py-value.c (valpy_getitem): Add an rvalue reference
15041         check.
15042         (valpy_reference_value): Add new parameter "refcode".
15043         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
15044         New wrappers for valpy_reference_value().
15045         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15046         (gdbpy_invoke_xmethod): Likewise.
15047
15048 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15049
15050         PR gdb/14441
15051         * dwarf2read.c (process_die, read_type_die_1): Handle the
15052         DW_TAG_rvalue_reference_type DIE.
15053         (read_tag_reference_type): Add new parameter "refcode".
15054
15055 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15056
15057         PR gdb/14441
15058         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
15059         (c_type_print_modifier, c_type_print_varspec_suffix)
15060         (c_type_print_base): Support printing rvalue reference types.
15061         * c-valprint.c (c_val_print, c_value_print): Support printing
15062         rvalue reference values.
15063
15064 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15065
15066         PR gdb/14441
15067         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
15068         typename.
15069         * cp-support.c (replace_typedefs): Handle
15070         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
15071         * python/py-type.c (typy_lookup_type): Likewise.
15072
15073 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15074
15075         PR gdb/14441
15076         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
15077         * parse.c (insert_type): Change assert statement.
15078         (follow_types): Handle rvalue reference types.
15079         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
15080         constant.
15081
15082 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15083
15084         PR gdb/14441
15085         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
15086         value_ref() interface.
15087         * c-valprint.c (c_value_print): Likewise.
15088         * infcall.c (value_arg_coerce): Likewise.
15089         * python/py-value.c (valpy_reference_value): Likewise.
15090         * valops.c (value_cast, value_reinterpret_cast)
15091         (value_dynamic_cast, typecmp): Likewise.
15092         (value_ref): Parameterize by kind of return value reference type.
15093         * value.h (value_ref): Add new parameter "refcode".
15094
15095 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15096
15097         PR gdb/14441
15098         * dwarf2read.c (read_tag_reference_type): Use
15099         lookup_lvalue_reference_type() instead of lookup_reference_type().
15100         * eval.c (evaluate_subexp_standard): Likewise.
15101         * f-exp.y: Likewise.
15102         * gdbtypes.c (make_reference_type, lookup_reference_type):
15103         Generalize with rvalue reference types.
15104         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
15105         convenience wrappers for lookup_reference_type().
15106         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
15107         reference kind parameter.
15108         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
15109         wrappers for lookup_reference_type().
15110         * guile/scm-type.c (gdbscm_type_reference): Use
15111         lookup_lvalue_reference_type() instead of lookup_reference_type().
15112         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
15113         * parse.c (follow_types): Likewise.
15114         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
15115         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
15116         Likewise.
15117         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15118         (gdbpy_invoke_xmethod): Likewise.
15119         * stabsread.c: Provide extra argument to make_reference_type()
15120         call.
15121         * valops.c (value_ref, value_rtti_indirect_type): Use
15122         lookup_lvalue_reference_type() instead of lookup_reference_type().
15123
15124 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15125
15126         PR gdb/14441
15127         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
15128         (TYPE_IS_REFERENCE): New macro.
15129         (struct type): Add rvalue_reference_type field.
15130         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
15131
15132 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
15133
15134         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
15135         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
15136         New function definition.
15137         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
15138         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
15139         New function declaration.
15140         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
15141         * mi/mi-interp.h: New file.
15142         * solib.c (info_sharedlibrary_command): Replace for loop with
15143         ALL_SO_LIBS macro
15144         * solib.h (update_solib_list): New function declaration.
15145         (so_list_head): Move macro.
15146         * solist.h (ALL_SO_LIBS): New macro.
15147
15148 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
15149
15150         * infcmd.c (post_create_inferior): Remove unused argument in
15151         call to solib_add.
15152         * remote.c (remote_start_remote): Likewise.
15153         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
15154         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
15155         (enable_break): Likewise.
15156         * solib.c (update_solib_list): Remove unused target argument
15157         and its documentation.
15158         (solib_add): Remove unused target argument.  Remove unused
15159         argument in call to update_solib_list.
15160         (info_sharedlibrary_command): Remove unused argument in call
15161         to update_solib_list.
15162         (sharedlibrary_command): Remove unused argument in call to
15163         solib_add.
15164         (handle_solib_event): Likewise.
15165         (reload_shared_libraries): Likewise.
15166         * solib.h (solib_add): Remove unused target argument.
15167
15168 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15169
15170         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
15171         (s390_displaced_step_fixup): Cover relative branches with the
15172         default fixup handling.  This fixes lack of support for some
15173         relative branch instructions.
15174
15175 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15176
15177         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
15178         ptid from regcache.
15179
15180 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15181
15182         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
15183         i386_darwin_store_inferior_registers): Use ptid from regcache.
15184
15185 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15186
15187         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
15188         i386bsd_store_inferior_registers): Use ptid from regcache.
15189
15190 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15191
15192         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
15193         hppaobsd_store_registers): Use ptid from regcache.
15194
15195 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15196
15197         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
15198         hppanbsd_store_registers): Use ptid from regcache.
15199
15200 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15201
15202         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
15203         from regcache.  Use get_ptrace_pid.
15204
15205 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15206
15207         * corelow.c (get_core_register_section): Use ptid from regcache,
15208         update doc.
15209
15210 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15211
15212         * bsd-uthread.c (bsd_uthread_fetch_registers,
15213         bsd_uthread_store_registers): Use ptid from regcache, set and
15214         restore inferior_ptid.
15215
15216 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15217
15218         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
15219         fetch_fp_regs, store_register, store_regs, store_fp_register,
15220         store_fp_regs): Use ptid from regcache.
15221
15222 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15223
15224         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
15225         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
15226         store_vfp_regs): Use ptid from regcache.
15227
15228 2017-03-17  Pedro Alves  <palves@redhat.com>
15229
15230         PR remote/21188
15231         * ser-base.c (ser_base_wait_for): Add comment.
15232         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
15233         version.
15234         * ser-unix.c (hardwire_raw): Remove reference to
15235         scb->current_timeout.
15236         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
15237         (hardwire_ops): Install ser_base_readchar instead of
15238         hardwire_readchar.
15239         * serial.h (struct serial) <current_timeout, timeout_remaining>:
15240         Remove fields.
15241
15242 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
15243
15244         PR gdb/19637
15245         * python/lib/gdb/printer/bound_registers.py: Add support for
15246         Python 3.
15247
15248 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15249
15250         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
15251         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
15252         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
15253         byte_offset to subobj_byte_offset.  Fix the handling of
15254         DWARF_VALUE_STACK on big-endian targets when coming via an
15255         implicit pointer.
15256         (dwarf2_evaluate_loc_desc): Adjust call to
15257         dwarf2_evaluate_loc_desc_full.
15258         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
15259         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
15260
15261 2017-03-16  Yao Qi  <yao.qi@linaro.org>
15262
15263         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
15264         and REVSH instructions.
15265
15266 2017-03-16  Yao Qi  <yao.qi@linaro.org>
15267
15268         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
15269         (arm_record_test): Declare.
15270         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
15271         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
15272         align with the manual.
15273         (thumb_record_misc): Adjust the code order to align with the
15274         manual.
15275         (thumb2_record_decode_insn_handler): Fix instruction matching.
15276         (instruction_reader_thumb): New class.
15277         (arm_record_test): New function.
15278
15279 2017-03-16  Yao Qi  <yao.qi@linaro.org>
15280
15281         * arm-tdep.c (abstract_memory_reader): New class.
15282         (instruction_reader): New class.
15283         (extract_arm_insn): Add argument 'reader'.  Callers updated.
15284         (decode_insn): Likewise.
15285
15286 2017-03-16  Doug Evans  <dje@google.com>
15287
15288         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
15289         member.  Change type of TYPE member to SCM.  All uses updated.
15290         (lsscm_make_lazy_string_smob): Add assert.
15291         (lsscm_make_lazy_string): Flag bad length values.
15292         (lsscm_elt_type): New function.
15293         (gdbscm_lazy_string_to_value): Rewrite to use
15294         lsscm_safe_lazy_string_to_value.
15295         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
15296         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
15297         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
15298         in incoming type.
15299         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15300         * guile/scm-type.c (tyscm_scm_to_type): New function.
15301
15302 2017-03-15  Doug Evans  <dje@google.com>
15303
15304         PR python/17728, python/18439, python/18779
15305         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
15306         member.  Change type of TYPE member to PyObject *.  All uses updated.
15307         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
15308         (gdbpy_create_lazy_string_object): Flag bad length values.
15309         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
15310         Handle typedefs in incoming type.
15311         (stpy_lazy_string_elt_type): New function.
15312         (gdbpy_extract_lazy_string): Call it.
15313         * python/py-value.c (valpy_lazy_string): Flag bad length values.
15314         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
15315         typedefs in incoming type.
15316
15317 2017-03-16  Doug Evans  <dje@google.com>
15318
15319         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15320         * guile/scm-type.c (tyscm_scm_to_type): New function.
15321
15322 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
15323
15324         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
15325         "ULONGEST" for "skip".
15326
15327 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15328
15329         PR gdb/21220
15330         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
15331         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
15332         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
15333         over ptrace peek/poke until end of buffer or error.
15334
15335 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
15336
15337         * parse.c (length_of_subexp): Make static.
15338         * parser-defs.h (length_of_subexp): Remove.
15339
15340 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15341
15342         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
15343         as well.
15344
15345 2017-03-14  Pedro Alves  <palves@redhat.com>
15346
15347         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
15348         (main): Use std::unique_ptr.  Remove calls to
15349         cp_demangled_name_parse_free.
15350
15351 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
15352
15353         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
15354         alphabsd_store_inferior_registers): Use regcache->ptid instead
15355         of inferior_ptid.
15356
15357 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
15358
15359         * aix-thread.c (aix_thread_fetch_registers,
15360         aix_thread_store_registers): Use regcache->ptid instead of
15361         inferior_ptid.
15362
15363 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
15364
15365         * aarch64-linux-nat.c (fetch_gregs_from_thread,
15366         store_gregs_to_thread, fetch_fpregs_from_thread,
15367         store_fpregs_to_thread): Use regcache->ptid instead of
15368         inferior_ptid.
15369
15370 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
15371
15372         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
15373         amd64_linux_fetch_inferior_registers): Use regcache->ptid
15374         instead of inferior_ptid.
15375
15376 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
15377
15378         * target.c (target_fetch_registers, target_store_registers): Add
15379         assert.
15380
15381 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
15382
15383         * regcache.h (regcache_get_ptid): New function.
15384         * regcache.c (regcache_get_ptid): New function.
15385
15386 2017-03-13  Mark Wielaard  <mark@klomp.org>
15387
15388         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
15389
15390 2017-03-10  Keith Seitz  <keiths@redhat.com>
15391
15392         PR c++/8218
15393         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
15394
15395 2017-03-08  Pedro Alves  <palves@redhat.com>
15396
15397         PR gdb/18360
15398         * infrun.c (start_step_over, do_target_resume, resume)
15399         (restart_threads): Assert we're not resuming a thread that is
15400         meant to be stopped.
15401         (infrun_thread_stop_requested_callback): Delete.
15402         (infrun_thread_stop_requested): If the thread is internally
15403         stopped, queue a pending stop event and clear the thread's
15404         inline-frame state.
15405         (handle_stop_requested): New function.
15406         (handle_syscall_event, handle_inferior_event_1): Use
15407         handle_stop_requested.
15408         (handle_stop_requested): New function.
15409         (handle_signal_stop): Set the thread's stop_signal here instead of
15410         at caller.
15411         (finish_step_over): Clear step over info unconditionally.
15412         (handle_signal_stop): If the user had interrupted the event
15413         thread, consider the stop a random signal.
15414         (handle_signal_stop) <signal arrived while stepping over
15415         breakpoint>: Don't restart threads here.
15416         (stop_waiting): Don't clear step-over info here.
15417
15418 2017-03-08  Pedro Alves  <palves@redhat.com>
15419
15420         PR 21206
15421         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
15422         goes to argument 2, not 1.
15423
15424 2017-03-08  Pedro Alves  <palves@redhat.com>
15425
15426         PR cli/21218
15427         * top.c (gdb_readline_wrapper): Avoid passing NULL to
15428         display_gdb_prompt.
15429         (command_line_input): Add comment.
15430
15431 2017-03-08  Pedro Alves  <palves@redhat.com>
15432
15433         PR tui/21216
15434         * tui/tui-file.c (tui_file::write): New.
15435         * tui/tui-file.h (tui_file): Override "write".
15436         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
15437         factored out from ...
15438         (tui_puts): ... here.
15439         (tui_putc): Use them.
15440         (tui_write): New function.
15441         * tui/tui-io.h (tui_write): Declare.
15442
15443 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
15444
15445         * Makefile.in (SFILES): Replace "environ.c" with
15446         "common/environ.c".
15447         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
15448         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
15449         to...
15450         * common/environ.c: ... here.
15451         * environ.h: Moved to...
15452         * common/environ.h: ... here.
15453
15454 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
15455
15456         * gdbarch.sh (pstring_ptr): New static function.
15457         (gdbarch_disassembler_options): Use it.
15458         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
15459         not valid_disassembler_option->name.
15460         * gdbarch.c: Regenerate.
15461
15462 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
15463
15464         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
15465
15466 2017-03-07  Pedro Alves  <palves@redhat.com>
15467
15468         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
15469
15470 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15471
15472         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
15473         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
15474         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
15475         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
15476
15477 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
15478
15479         * xtensa-linux-nat.c (fetch_gregs): Remove const.
15480
15481 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
15482
15483         * remote.c (remote_add_target_side_commands): Use range-based
15484         for loop.
15485
15486 2017-03-03  Yao Qi  <yao.qi@linaro.org>
15487
15488         PR gdb/21165
15489         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
15490         value is lazy.
15491         * valprint.c (common_val_print): Likewise.
15492
15493 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
15494
15495         * NEWS: Mention new set/show disassembler-options commands.
15496         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
15497         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
15498         (prospective_options): New static variable.
15499         (gdb_disassembler::gdb_disassembler): Initialize
15500         m_di.disassembler_options.
15501         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
15502         (get_disassembler_options): New function.
15503         (set_disassembler_options): Likewise.
15504         (set_disassembler_options_sfunc): Likewise.
15505         (show_disassembler_options_sfunc): Likewise.
15506         (disassembler_options_completer): Likewise.
15507         (_initialize_disasm): Likewise.
15508         * disasm.h (get_disassembler_options): New prototype.
15509         (set_disassembler_options): Likewise.
15510         * gdbarch.sh (gdbarch_disassembler_options): New variable.
15511         (gdbarch_verify_disassembler_options): Likewise.
15512         * gdbarch.c: Regenerate.
15513         * gdbarch.h: Likewise.
15514         * arm-tdep.c (num_disassembly_options): Delete.
15515         (set_disassembly_style): Likewise.
15516         (arm_disassembler_options): New static variable.
15517         (set_disassembly_style_sfunc): Convert short style name into long
15518         option name.  Call set_disassembler_options.
15519         (show_disassembly_style_sfunc): New function.
15520         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
15521         set_gdbarch_verify_disassembler_options.
15522         (_initialize_arm_tdep): Delete regnames variable and update callers.
15523         (arm_disassembler_options): Initialize.
15524         (disasm_options): New variable.
15525         (num_disassembly_options): Rename from this...
15526         (num_disassembly_styles): ...to this.  Compute by scanning through
15527         disasm_options.
15528         (valid_disassembly_styles): Initialize using disasm_options.
15529         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
15530         set_arm_regname_option.
15531         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
15532         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
15533         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
15534         set_gdbarch_verify_disassembler_options.
15535         * s390-tdep.c (s390_disassembler_options): New static variable.
15536         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
15537         set_gdbarch_verify_disassembler_options.
15538
15539 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
15540
15541         * remote.c (remote_add_target_side_condition): Remove "struct"
15542         keyword from range-based for loop.
15543
15544 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
15545
15546         * remote.c (remote_add_target_side_condition): Use range-based
15547         for loop.  Update comment.
15548
15549 2017-02-27  Yao Qi  <yao.qi@linaro.org>
15550
15551         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
15552
15553 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
15554
15555         * regcache.c (regcache_raw_update): New function.
15556         (regcache_raw_read): Move code to regcache_raw_update.
15557         * regcache.h (regcache_raw_update): New declaration.
15558         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
15559
15560 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
15561
15562         * dwarf2read.c (create_debug_type_hash_table): Initialize
15563         header.signature and header.type_offset_in_tu.
15564
15565 2017-02-24  Pedro Alves  <palves@redhat.com>
15566
15567         * symtab.c (make_file_symbol_completion_list_1): Use
15568         add_symtab_completions.
15569
15570 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
15571
15572         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
15573
15574 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
15575
15576         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
15577         I386_MAX_REGISTER_SIZE.
15578         (i386_pseudo_register_write): Likewise.
15579         (i386_process_record): Likewise.
15580         * i387-tdep.c (i387_supply_xsave): Likewise.
15581         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
15582         (store_register): Likewise.
15583
15584 2017-02-23  Pedro Alves  <palves@redhat.com>
15585
15586         * ada-lang.c: Include "common/function-view.h".
15587         (ada_iterate_over_symbols): Adjust to use function_view as
15588         callback type.
15589         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
15590         (ada_make_symbol_completion_list): Use a lambda.
15591         (ada_exc_search_name_matches): Delete.
15592         (name_matches_regex): New.
15593         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
15594         * compile/compile-c-support.c: Include "common/function-view.h".
15595         (print_one_macro): Change prototype to accept a ui_file pointer.
15596         (write_macro_definitions): Use a lambda.
15597         * dwarf2read.c: Include "common/function-view.h".
15598         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
15599         (dw2_expand_symtabs_matching): Adjust to use function_view as
15600         callback type.
15601         * language.h: Include "common/function-view.h".
15602         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
15603         function_view as callback type.
15604         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
15605         * linespec.c: Include "common/function-view.h".
15606         (collect_info::add_symbol): New method.
15607         (struct symbol_and_data_callback, iterate_inline_only, struct
15608         symbol_matcher_data, iterate_name_matcher): Delete.
15609         (iterate_over_all_matching_symtabs): Adjust to use function_view
15610         as callback type and lambdas.
15611         (iterate_over_file_blocks): Adjust to use function_view as
15612         callback type.
15613         (decode_compound_collector): Now a class with private fields.
15614         (decode_compound_collector::release_symbols): New method.
15615         (collect_one_symbol): Rename to...
15616         (decode_compound_collector::operator()): ... this and adjust.
15617         (lookup_prefix_sym): decode_compound_collector construction bits
15618         move to decode_compound_collector ctor.  Pass the
15619         decode_compound_collector object directly as callback.  Remove
15620         cleanups and use decode_compound_collector::release_symbols
15621         instead.
15622         (symtab_collector): Now a class with private fields.
15623         (symtab_collector::release_symtabs): New method.
15624         (add_symtabs_to_list): Rename to...
15625         (symtab_collector::operator()): ... this and adjust.
15626         (collect_symtabs_from_filename): symtab_collector construction
15627         bits move to symtab_collector ctor.  Pass the symtab_collector
15628         object directly as callback.  Remove cleanups and use
15629         symtab_collector::release_symtabs instead.
15630         (collect_symbols): Delete.
15631         (add_matching_symbols_to_info): Use lambdas.
15632         * macrocmd.c (print_macro_callback): Delete.
15633         (info_macro_command): Use a lambda.
15634         (info_macros_command): Pass print_macro_definition as callable
15635         directly.
15636         (print_one_macro): Remove 'ignore' parameter.
15637         (macro_list_command): Adjust.
15638         * macrotab.c (macro_for_each_data::fn): Now a function_view.
15639         (macro_for_each_data::user_data): Delete field.
15640         (foreach_macro): Adjust to call the function_view.
15641         (macro_for_each): Adjust to use function_view as callback type.
15642         (foreach_macro_in_scope): Adjust to call the function_view.
15643         (macro_for_each_in_scope): Adjust to use function_view as callback
15644         type.
15645         * macrotab.h: Include "common/function-view.h".
15646         (macro_callback_fn): Declare a prototype instead of a pointer.
15647         Remove "user_data" parameter.
15648         (macro_for_each, macro_for_each_in_scope): Adjust to use
15649         function_view as callback type.
15650         * psymtab.c (partial_map_expand_apply)
15651         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
15652         Adjust to use function_view as callback type and to return bool.
15653         (psym_expand_symtabs_matching): Adjust to use function_view as
15654         callback types.
15655         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
15656         to use function_view as callback type and to return bool.
15657         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
15658         callback types.
15659         * symfile.c (expand_symtabs_matching): Adjust to use function_view
15660         as callback types.
15661         * symfile.h: Include "common/function-view.h".
15662         (expand_symtabs_file_matcher_ftype)
15663         (expand_symtabs_symbol_matcher_ftype)
15664         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
15665         return bool.
15666         (quick_symbol_functions::map_symtabs_matching_filename)
15667         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
15668         function_view as callback type and return bool.
15669         (expand_symtabs_matching): Adjust to use function_view as callback
15670         type.
15671         (maintenance_expand_name_matcher)
15672         (maintenance_expand_file_matcher): Delete.
15673         (maintenance_expand_symtabs): Use lambdas.
15674         * symtab.c (iterate_over_some_symtabs): Adjust to use
15675         function_view as callback types and return bool.
15676         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
15677         of a cleanup.
15678         (lookup_symtab_callback): Delete.
15679         (lookup_symtab): Use a lambda.
15680         (iterate_over_symbols): Adjust to use function_view as callback
15681         type.
15682         (struct search_symbols_data, search_symbols_file_matches)
15683         (search_symbols_name_matches): Delete.
15684         (search_symbols): Use a pair of lambdas.
15685         (struct add_name_data, add_macro_name, symbol_completion_matcher)
15686         (symtab_expansion_callback): Delete.
15687         (default_make_symbol_completion_list_break_on_1): Use lambdas.
15688         * symtab.h: Include "common/function-view.h".
15689         (iterate_over_some_symtabs): Adjust to use function_view as
15690         callback type and return bool.
15691         (iterate_over_symtabs): Adjust to use function_view as callback
15692         type.
15693         (symbol_found_callback_ftype): Remove 'data' parameter and return
15694         bool.
15695         (iterate_over_symbols): Adjust to use function_view as callback
15696         type.
15697
15698 2017-02-23  Pedro Alves  <palves@redhat.com>
15699
15700         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
15701         (%.o) <unittests/%.c>: New pattern.
15702         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
15703         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
15704         * common/function-view.h: New file.
15705         * unittests/function-view-selftests.c: New file.
15706         * configure: Regenerate.
15707
15708 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
15709
15710         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
15711         inferior_ptid.
15712         * go32-nat.c (go32_thread_alive): Likewise.
15713
15714 2017-02-23  Yao Qi  <yao.qi@linaro.org>
15715
15716         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
15717         delete.
15718
15719 2017-02-23  Yao Qi  <yao.qi@linaro.org>
15720
15721         * varobj.c (varobj_clear_saved_item): Use delete instead of
15722         xfree.
15723         (update_dynamic_varobj_children): Likewise.
15724
15725 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
15726
15727         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
15728
15729 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
15730
15731         * common/enum-flags.h (enum_flags::enum_flags): Initialize
15732         m_enum_value to 0 in default constructor.
15733
15734 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
15735
15736         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
15737         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
15738         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
15739         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
15740         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
15741         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
15742         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
15743         IS_STORE_CONDITIONAL_INSN.
15744
15745 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
15746
15747         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
15748
15749 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15750
15751         * NEWS (Changes since GDB 7.12): Add DWARF-5.
15752
15753 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15754
15755         * dwarf2read.c (skip_one_die, read_attribute_value)
15756         (dwarf2_const_value_attr, dump_die_shallow)
15757         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
15758         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
15759
15760 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15761
15762         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
15763         (dwarf_parse_macro_header): Accept DWARF version 5.
15764         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
15765
15766 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15767
15768         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
15769         DW_AT_GNU_*.
15770         * common/common-exceptions.h (enum errors): Likewise.
15771         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
15772         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
15773         (dwarf_expr_context::execute_stack_op): Likewise.
15774         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
15775         Likewise.
15776         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
15777         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
15778         (show_entry_values_debug, call_site_to_target_addr)
15779         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
15780         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
15781         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
15782         (value_of_dwarf_block_entry, indirect_pieced_value)
15783         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
15784         (disassemble_dwarf_expression): Likewise.
15785         * dwarf2read.c (process_die, inherit_abstract_dies)
15786         (read_call_site_scope): Likewise.
15787         * gdbtypes.h (struct func_type, struct call_site_parameter)
15788         (struct call_site): Likewise.
15789         * stack.c (read_frame_arg): Likewise.
15790         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
15791
15792 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15793
15794         * defs.h (read_unsigned_leb128): New declaration.
15795         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
15796         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
15797         (dwarf2_find_location_expression): Call also
15798         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
15799         * dwarf2loc.h (dwarf2_version): New declaration.
15800         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
15801         rnglists.
15802         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
15803         .debug_rnglists.
15804         (struct dwop_section_names): Add loclists_dwo.
15805         (dwop_section_names): Add .debug_loclists.dwo.
15806         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
15807         (struct dwarf2_per_cu_data): Add dwarf_version.
15808         (struct dwo_sections): Add loclists.
15809         (struct attr_abbrev): Add implicit_const.
15810         (read_indirect_line_string): New declaration.
15811         (read_unsigned_leb128): Delete declaration.
15812         (rcuh_kind): New definition.
15813         (read_and_check_comp_unit_head): Change parameter
15814         is_debug_types_section to section_kind.
15815         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
15816         (read_comp_unit_head): Change parameter abfd to section, add parameter
15817         section_kind.  Handle DWARF-5.
15818         (error_check_comp_unit_head): Accept also DWARF version 5.
15819         (read_and_check_comp_unit_head): Change parameter
15820         is_debug_types_section to section_kind.
15821         (read_and_check_type_unit_head): Delete function.
15822         (read_abbrev_offset): Handle DWARF-5.
15823         (create_debug_type_hash_table): Add parameter section_kind.  Process
15824         only DW_UT_type.  Use signature and type_offset_in_tu from struct
15825         comp_unit_head.
15826         (create_debug_types_hash_table): Update create_debug_type_hash_table
15827         caller.
15828         (create_all_type_units): Call create_debug_type_hash_table.
15829         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
15830         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
15831         caller.
15832         (skip_one_die): Handle DW_FORM_implicit_const.
15833         (dwarf2_rnglists_process): New function.
15834         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
15835         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
15836         (read_attribute_value): Handle DW_FORM_implicit_const,
15837         DW_FORM_line_strp.
15838         (read_attribute): Handle DW_FORM_implicit_const.
15839         (read_indirect_string_at_offset_from): New function from
15840         read_indirect_string_at_offset.
15841         (read_indirect_string_at_offset): Call
15842         read_indirect_string_at_offset_from.
15843         (read_indirect_line_string_at_offset): New function.
15844         (read_indirect_string): New function comment.
15845         (read_indirect_line_string): New function.
15846         (read_unsigned_leb128): Make it global.
15847         (dwarf2_string_attr): Handle DWARF-5.
15848         (add_include_dir_stub, read_formatted_entries): New functions.
15849         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
15850         Handle DWARF-5.
15851         (per_cu_header_read_in): Update read_comp_unit_head caller.
15852         (dwarf2_version): New function.
15853         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
15854         rnglists.
15855         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
15856         fields.
15857
15858 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15859
15860         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
15861
15862 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15863
15864         * dwarf2read.c (dwarf2_ranges_process): New function from
15865         dwarf2_ranges_read.
15866         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
15867         dwarf2_ranges_process.
15868
15869 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15870
15871         * dwarf2read.c (create_debug_type_hash_table): New function from
15872         create_debug_types_hash_table.
15873         (create_debug_types_hash_table): Call create_debug_type_hash_table.
15874         (create_all_type_units, open_and_init_dwo_file): Update
15875         create_debug_types_hash_table callers.
15876
15877 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
15878
15879         PR gdb/16188
15880         * fork-child.c (trace_start_error): Fix thinko.  va_end should
15881         refer to 'ap', not 'args'.
15882
15883 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
15884             Pedro Alves  <palves@redhat.com>
15885
15886         PR gdb/16188
15887         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
15888         calls succeeded.
15889         * fork-child.c (trace_start_error): New function.
15890         (trace_start_error_with_name): Likewise.
15891         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
15892         * inf-ptrace.c (inf_ptrace_me): Likewise.
15893         * inferior.h (trace_start_error): New prototype.
15894         (trace_start_error_with_name): Likewise.
15895
15896 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
15897
15898         PR gdb/21164
15899         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
15900         NULL before using it.
15901         * symmisc.c (maintenance_print_symbols): Likewise.
15902         (maintenance_print_msymbols): Likewise.
15903
15904 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15905
15906         * NEWS: Add record Python bindings entry.
15907
15908 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15909
15910         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
15911         py-record-full.o.
15912         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
15913         * python/py-record-btrace.c, python/py-record-btrace.h,
15914         python/py-record-full.c, python/py-record-full.h: New file.
15915         * python/py-record.c: Add include for py-record-btrace.h and
15916         py-record-full.h.
15917         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
15918         recpy_instruction_history, recpy_function_call_history, recpy_begin,
15919         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
15920         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
15921         New definition.
15922         (gdbpy_initialize_btrace): New export.
15923         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
15924
15925 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15926
15927         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
15928         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
15929         * python/py-record.c: New file.
15930         * python/python-internal.h (gdbpy_start_recording,
15931         gdbpy_current_recording, gdpy_stop_recording,
15932         gdbpy_initialize_record): New export.
15933         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
15934         (python_GdbMethods): Add gdbpy_start_recording,
15935         gdbpy_current_recording and gdbpy_stop_recording.
15936
15937 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15938
15939         * record-btrace.c (record_btrace_record_method): New function.
15940         (init_record_btrace_ops): Initialize to_record_method.
15941         * record-full.c (record_full_record_method): New function.
15942         (init_record_full_ops, init_record_full_core_ops): Add
15943         record_full_record_method.
15944         * record.h (enum record_method): New enum.
15945         * target-debug.h (target_debug_print_enum_record_method: New define.
15946         * target-delegates.c: Regenerate.
15947         * target.c (target_record_method): New function.
15948         * target.h: Include record.h.
15949         (struct target_ops) <to_record_method>: New field.
15950         (target_record_method): New export.
15951
15952 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15953
15954         * record.h (record_start, record_stop): New export.
15955         * record.c (record_start, record_stop): New function.
15956
15957 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15958
15959         * btrace.c (btrace_fetch): Copy function call segments pointer
15960         into a vector.
15961         (btrace_clear): Clear the vector.
15962         (btrace_find_insn_by_number): Use binary search to find the correct
15963         function call segment.
15964         * btrace.h (brace_fun_p): New typedef.
15965         (struct btrace_thread_info) <functions>: New field.
15966
15967 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15968
15969         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
15970         * btrace.c (btrace_decode_error): ... here.  New function.
15971         * btrace.h (btrace_decode_error): New export.
15972
15973 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15974
15975         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
15976         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
15977         btrace_find_insn_by_number): Remove special case for gaps.
15978         * btrace.h (btrace_insn_get_error): New export.
15979         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
15980         * record-btrace.c (btrace_insn_history): Print number for gaps.
15981         (record_btrace_info, record_btrace_goto): Handle gaps.
15982
15983 2017-02-14  Tom Tromey  <tom@tromey.com>
15984
15985         PR python/13598:
15986         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
15987         event.
15988         * python/py-evts.c (gdbpy_initialize_py_events): Add
15989         before_prompt registry.
15990         * python/py-events.h (events_object) <before_prompt>: New field.
15991
15992 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
15993
15994         * btrace.c (ftrace_new_switch): Preserve up link and flags.
15995
15996 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
15997
15998         * symfile (_initialize_symfile): Add usage text to the load command's
15999         help text.
16000
16001 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
16002
16003         * utils.c (defaulted_query): Don't query on secondary UIs.
16004
16005 2017-02-10  Tom Tromey  <tom@tromey.com>
16006
16007         * rust-lang.c (rust_get_disr_info): Remove unused variable.
16008
16009 2017-02-10  Tom Tromey  <tom@tromey.com>
16010
16011         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
16012         "cleanup" local.
16013         * python/py-type.c (typy_legacy_template_argument): Remove
16014         unnecessary "cleanup" local.
16015
16016 2017-02-10  Tom Tromey  <tom@tromey.com>
16017
16018         * python/python.c (do_start_initialization): New function, from
16019         _initialize_python.
16020         (_initialize_python): Call do_start_initialization.
16021         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
16022         goto.
16023
16024 2017-02-10  Tom Tromey  <tom@tromey.com>
16025
16026         * python/py-prettyprint.c (pretty_print_one_value): Use
16027         gdbpy_ref.
16028
16029 2017-02-10  Tom Tromey  <tom@tromey.com>
16030
16031         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
16032         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
16033         gdbpy_ref.
16034         * python/py-type.c (field_new): Use gdbpy_ref.
16035         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
16036         gdbpy_ref.
16037         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
16038         (py_free_pspace): Likewise.
16039         (pspace_to_pspace_object): Likewise.
16040         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
16041         (py_free_objfile): Likewise.
16042         (objfile_to_objfile_object): Likewise.
16043         * python/py-inferior.c (delete_thread_object): Use
16044         gdbpy_ref.
16045         (infpy_read_memory): Likewise.
16046         (py_free_inferior): Likewise.
16047         * python/py-evtregistry.c (create_eventregistry_object): Use
16048         gdbpy_ref.
16049         * python/py-event.c (create_event_object): Use gdbpy_ref.
16050
16051 2017-02-10  Tom Tromey  <tom@tromey.com>
16052
16053         * python/py-ref.h (gdbpy_ref_policy): Now a template.
16054         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
16055         used.
16056         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
16057         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
16058         python/py-exitedevent.c, python/py-finishbreakpoint.c,
16059         python/py-framefilter.c, python/py-function.c,
16060         python/py-inferior.c, python/py-infevents.c,
16061         python/py-linetable.c, python/py-newobjfileevent.c,
16062         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
16063         python/py-signalevent.c, python/py-stopevent.c,
16064         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
16065         python/py-unwind.c, python/py-utils.c, python/py-value.c,
16066         python/py-varobj.c, python/py-xmethods.c, python/python.c,
16067         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
16068
16069 2017-02-10  Tom Tromey  <tom@tromey.com>
16070
16071         * ui-out.h (ui_out_emit_type): New class.
16072         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
16073         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
16074         and ui_out_emit_tuple.
16075         (enumerate_locals): Likewise.
16076         (py_mi_print_variables, py_print_locals, py_print_args): Use
16077         ui_out_emit_list.
16078         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
16079         ui_out_emit_list.
16080         * common/gdb_optional.h: New file.
16081
16082 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
16083
16084         * MAINTAINERS (Write After Approval): Update my e-mail address.
16085
16086 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
16087
16088         PR gdb/21122
16089         * breakpoint.c (_initialize_breakpoint): Update the help description
16090         of the 'commands' command to indicate that it takes a list argument.
16091
16092 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
16093
16094         * interps.c (current_interp_set_logging): Remove "return".
16095
16096 2017-02-09  Gary Benson  <gbenson@redhat.com>
16097
16098         * symtab.c (add_symtab_completions): Prevent NULL pointer
16099         dereference.
16100
16101 2017-02-08  Pedro Alves  <palves@redhat.com>
16102
16103         * interps.c (interp::interp): Remove reference to quiet_p.
16104         (interp_set): Make static.  Remove dead "Switching to" output
16105         code.
16106         (interp_quiet_p, interp_set_quiet): Delete.
16107         (interpreter_exec_cmd): Don't set the interpreter quiet.
16108         * interps.h (interp_quiet_p): Make static.
16109         (class interp) <quiet_p>: Remove field
16110
16111 2017-02-08  Jerome Guitton  <guitton@adacore.com>
16112
16113         * cli/cli-decode.c (find_command_name_length): Make it extern.
16114         * cli/cli-decode.h (find_command_name_length): Declare.
16115         * cli/cli-script.c (command_name_equals, line_first_arg):
16116         New functions.
16117         (process_next_line): Use cli-decode to parse command names.
16118         (build_command_line): Make args a constant pointer.
16119
16120 2017-02-08  Jerome Guitton  <guitton@adacore.com>
16121
16122         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
16123         Remove case-insensitive search.
16124
16125 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
16126
16127         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
16128         at the end of the line.  Avoids an ARI warning.
16129
16130 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
16131
16132         * NEWS: Mention support for record/replay of Intel 64 rdrand and
16133         rdseed instructions.
16134         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
16135
16136 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
16137
16138         PR tdep/20936
16139         Provide and use sparc32 and sparc64 target description XML files.
16140         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
16141         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
16142         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
16143         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
16144         * features/sparc/sparc32-solaris.xml: New file.
16145         * features/sparc/sparc64-solaris.xml: New file.
16146         * features/sparc/sparc32-solaris.c: Generated.
16147         * features/sparc/sparc64-solaris.c: Generated.
16148         * sparc-tdep.h: Account for differences in target descriptions.
16149         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
16150         (sparc32_register_type): Use target provided registers.
16151         (validate_tdesc_registers): New function.
16152         (sparc32_gdbarch_init): Use tdesc_has_registers.
16153         Set pseudoregister functions.
16154         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
16155         (sparc64_register_type): Use target provided registers.
16156         (sparc64_init_abi): Set pseudoregister functions.
16157
16158 2017-02-03  Tom Tromey  <tom@tromey.com>
16159
16160         PR rust/21097:
16161         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
16162         with a single member.
16163
16164 2017-02-03  Pedro Alves  <palves@redhat.com>
16165
16166         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
16167         (cli_interp_base::~cli_interp_base): New.
16168         (cli_interp): New struct.
16169         (as_cli_interp): Cast the interp itself to cli_interp.
16170         (cli_interpreter_pre_command_loop): Rename to ...
16171         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
16172         parameter.
16173         (cli_interpreter_init): Rename to ...
16174         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
16175         boolean.  Make extern.
16176         (cli_interpreter_resume): Rename to ...
16177         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
16178         extern.
16179         (cli_interpreter_suspend): Rename to ...
16180         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
16181         extern.
16182         (cli_interpreter_exec): Rename to ...
16183         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
16184         extern.
16185         (cli_interpreter_supports_command_editing): Rename to ...
16186         (cli_interp_base::supports_command_editing): ... this.  Remove
16187         'interp' parameter.  Make extern.
16188         (cli_ui_out): Rename to ...
16189         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
16190         Make extern.
16191         (cli_set_logging): Rename to ...
16192         (cli_interp_base::set_logging): ... this.  Remove 'interp'
16193         parameter.  Make extern.
16194         (cli_interp_procs): Delete.
16195         (cli_interp_factory): Adjust to use "new".
16196         * cli/cli-interp.h: Include "interps.h".
16197         (struct cli_interp_base): New struct.
16198         * interps.c (struct interp): Delete.  Fields moved to interps.h.
16199         (interp_new): Delete.
16200         (interp::interp, interp::~interp): New.
16201         (interp_set): Use bool, and return void.  Assume the interpreter
16202         has suspend, init and resume methods, and that the all return
16203         void.
16204         (set_top_level_interpreter): interp_set returns void.
16205         (interp_ui_out): Adapt.
16206         (current_interp_set_logging): Adapt.
16207         (interp_data): Delete.
16208         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
16209         (interp_exec): Adapt.
16210         (top_level_interpreter_data): Delete.
16211         * interps.h (interp_init_ftype, interp_resume_ftype)
16212         (interp_suspend_ftype, interp_exec_ftype)
16213         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
16214         (class interp): New.
16215         (interp_new): Delete.
16216         (interp_set): Now returns void.  Use bool.
16217         (interp_data, top_level_interpreter_data): Delete.
16218         * mi/mi-common.h: Include interps.h.
16219         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
16220         init, resume, suspect, exec, interp_ui_out, set_logging and
16221         pre_command_loop methods.
16222         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
16223         (mi_interpreter_init): Rename to ...
16224         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
16225         bool, return void and make extern.  Adjust.
16226         (mi_interpreter_resume): ... Rename to ...
16227         (mi_interp::resume): ... this.  Remove the 'data' parameter,
16228         return void and make extern.  Adjust.
16229         (mi_interpreter_suspend): ... Rename to ...
16230         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
16231         return void and make extern.  Adjust.
16232         (mi_interpreter_exec): ... Rename to ...
16233         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
16234         extern.  Adjust.
16235         (mi_interpreter_pre_command_loop): ... Rename to ...
16236         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
16237         parameter and make extern.
16238         (mi_on_normal_stop_1): Adjust.
16239         (mi_ui_out): Rename to ...
16240         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
16241         parameter and make extern.  Adjust.
16242         (mi_set_logging): Rename to ...
16243         (mi_interp::set_logging): ... this.  Remove the 'interp'
16244         parameter and make extern.  Adjust.
16245         (mi_interp_procs): Delete.
16246         (mi_interp_factory): Adjust to use 'new'.
16247         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
16248         (mi_print_exception, mi_execute_command, mi_load_progress):
16249         Adjust.
16250         * tui/tui-interp.c (tui_interp): New class.
16251         (as_tui_interp): Return a tui_interp pointer.
16252         (tui_on_normal_stop, tui_on_signal_received)
16253         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
16254         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
16255         to use interp::interp_ui_out.
16256         (tui_init): Rename to ...
16257         (tui_interp::init): ... this.  Remove the 'self' parameter, use
16258         bool, return void and make extern.  Adjust.
16259         (tui_resume): Rename to ...
16260         (tui_interp::resume): ... this.  Remove the 'data' parameter,
16261         return void and make extern.  Adjust.
16262         (tui_suspend): Rename to ...
16263         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
16264         return void and make extern.  Adjust.
16265         (tui_ui_out): Rename to ...
16266         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
16267         parameter, and make extern.  Adjust.
16268         (tui_exec): Rename to ...
16269         (tui_interp::exec): ... this.  Remove the 'data' parameter and
16270         make extern.
16271         (tui_interp_procs): Delete.
16272         (tui_interp_factory): Use "new".
16273
16274 2017-02-02  Tom Tromey  <tom@tromey.com>
16275
16276         * rust-exp.y (ends_raw_string, space_then_number)
16277         (rust_identifier_start_p): Return bool.
16278         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
16279         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
16280         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
16281         (rust_chartype_p): Return bool.
16282         (val_print_struct, rust_print_struct_def, rust_print_type):
16283         Update.
16284         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
16285         Return bool.
16286
16287 2017-02-02  Tom Tromey  <tom@tromey.com>
16288
16289         * rust-lang.c: Reindent.
16290
16291 2017-02-02  Tom Tromey  <tom@tromey.com>
16292
16293         * rust-lang.h (rust_crate_for_block): Update.
16294         * rust-lang.c (rust_crate_for_block): Return std::string.
16295         (rust_get_disr_info): Use std:;string, not
16296         gdb::unique_xmalloc_ptr.
16297         * rust-exp.y (crate_name): Update.
16298
16299 2017-02-02  Pedro Alves  <palves@redhat.com>
16300
16301         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
16302         field out of gdb_disassembler_test and make it static.
16303
16304 2017-02-02  Pedro Alves  <palves@redhat.com>
16305
16306         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
16307         mi1_interp and mi_interp fields.
16308
16309 2017-02-02  Pedro Alves  <palves@redhat.com>
16310
16311         * cli/cli-interp.c (struct saved_output_files, saved_output):
16312         Moved from cli/cli-logging.c.
16313         (cli_set_logging): New function.
16314         (cli_interp_procs): Install cli_set_logging.
16315         * cli/cli-interp.h (make_logging_output, cli_set_logging):
16316         Declare.
16317         * cli/cli-logging.c (struct saved_output_files, saved_output):
16318         Moved to cli/cli-interp.c.
16319         (pop_output_files): Don't save outputs here.
16320         (make_logging_output): New function.
16321         (handle_redirections): Don't build tee nor save previous outputs
16322         here.
16323         * interps.c (current_interp_set_logging): Change prototype.
16324         Assume there's always a set_logging_proc method installed.
16325         * interps.h (interp_set_logging_ftype): Change prototype.
16326         (current_interp_set_logging): Change prototype and adjust comment.
16327         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
16328         use make_logging_output.
16329         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
16330 2017-02-02  Pedro Alves  <palves@redhat.com>
16331
16332         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
16333         from ...
16334         (set_logging_overwrite): ... here.
16335         (logging_no_redirect_file): Delete.
16336         (set_logging_redirect): Don't handle redirection on the fly.
16337         Instead warn that "logging off" / "logging on" is necessary.
16338         (pop_output_files): Delete references to logging_no_redirect_file.
16339         (show_logging_command): Always speak in terms of what will happen
16340         once logging is reenabled.
16341
16342 2017-02-02  Pedro Alves  <palves@redhat.com>
16343
16344         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
16345
16346 2017-02-02  Pedro Alves  <palves@redhat.com>
16347
16348         * disasm.c (gdb_pretty_print_insn): Rename to ...
16349         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
16350         Remove gdbarch parameter.  Adapt to clear the object's buffers
16351         instead of allocating new buffers, and to print using the object's
16352         gdb_disassembler instead of calling gdb_print_insn.
16353         (dump_insns): Use gdb_pretty_print_disassembler.
16354         * disasm.h (gdb_pretty_print_insn): Delete declaration.
16355         (gdb_pretty_print_disassembler): New class.
16356         * record-btrace.c (btrace_insn_history): Use
16357         gdb_pretty_print_disassembler.
16358
16359 2017-02-02  Pedro Alves  <palves@redhat.com>
16360
16361         * ada-lang.c (type_as_string): Use string_file.
16362         * ada-valprint.c (ada_print_floating): Use string_file.
16363         * ada-varobj.c (ada_varobj_scalar_image)
16364         (ada_varobj_get_value_image): Use string_file.
16365         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
16366         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
16367         * breakpoint.c (update_inserted_breakpoint_locations)
16368         (insert_breakpoint_locations, reattach_breakpoints)
16369         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
16370         (print_it_watchpoint): Use string_file.
16371         (save_breakpoints): Use stdio_file.
16372         * c-exp.y (oper): Use string_file.
16373         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
16374         tee_file.
16375         (pop_output_files): Use delete.
16376         (handle_redirections): Use stdio_file and tee_file.
16377         * cli/cli-setshow.c (do_show_command): Use string_file.
16378         * compile/compile-c-support.c (c_compute_program): Use
16379         string_file.
16380         * compile/compile-c-symbols.c (generate_vla_size): Take a
16381         'string_file &' instead of a 'ui_file *'.
16382         (generate_c_for_for_one_variable): Take a 'string_file &' instead
16383         of a 'ui_file *'.  Use string_file.
16384         (generate_c_for_variable_locations): Take a 'string_file &'
16385         instead of a 'ui_file *'.
16386         * compile/compile-internal.h (generate_c_for_for_one_variable):
16387         Take a 'string_file &' instead of a 'ui_file *'.
16388         * compile/compile-loc2c.c (push, pushf, unary, binary)
16389         (print_label, pushf_register_address, pushf_register)
16390         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
16391         'ui_file *'.  Adjust.
16392         * compile/compile.c (compile_to_object): Use string_file.
16393         * compile/compile.h (compile_dwarf_expr_to_c)
16394         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
16395         'ui_file *'.
16396         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
16397         (replace_typedefs_qualified_name): Use string_file and
16398         obstack_copy0.
16399         * disasm.c (gdb_pretty_print_insn): Use string_file.
16400         (gdb_disassembly): Adjust reference the null_stream global.
16401         (do_ui_file_delete): Delete.
16402         (gdb_insn_length): Use null_stream.
16403         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
16404         * dwarf2loc.c (dwarf2_compile_property_to_c)
16405         (locexpr_generate_c_location, loclist_generate_c_location): Take a
16406         'string_file &' instead of a 'ui_file *'.
16407         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
16408         * dwarf2read.c (do_ui_file_peek_last): Delete.
16409         (dwarf2_compute_name): Use string_file.
16410         * event-top.c (gdb_setup_readline): Use stdio_file.
16411         * gdbarch.sh (verify_gdbarch): Use string_file.
16412         * gdbtypes.c (safe_parse_type): Use null_stream.
16413         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
16414         string_file.
16415         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
16416         'string_file *' instead of a 'ui_file *'.
16417         (gdbscm_arch_disassemble): Use string_file.
16418         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
16419         * guile/scm-ports.c (class ioscm_file_port): Now a class that
16420         inherits from ui_file.
16421         (ioscm_file_port_delete, ioscm_file_port_rewind)
16422         (ioscm_file_port_put): Delete.
16423         (ioscm_file_port_write): Rename to ...
16424         (ioscm_file_port::write): ... this.  Remove file_port_magic
16425         checks.
16426         (ioscm_file_port_new): Delete.
16427         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
16428         ui_file_up.
16429         * guile/scm-type.c (tyscm_type_name): Use string_file.
16430         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
16431         Use string_file.
16432         * infcmd.c (print_return_value_1): Use string_file.
16433         * infrun.c (print_target_wait_results): Use string_file.
16434         * language.c (add_language): Use string_file.
16435         * location.c (explicit_to_string_internal): Use string_file.
16436         * main.c (captured_main_1): Use null_file.
16437         * maint.c (maintenance_print_architecture): Use stdio_file.
16438         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
16439         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
16440         event_channel>: Change type to mi_console_file pointer.
16441         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
16442         (mi_console_file_delete): Delete.
16443         (struct mi_console_file): Delete.
16444         (mi_console_file_magic): Delete.
16445         (mi_console_file_new): Delete.
16446         (mi_console_file::mi_console_file): New.
16447         (mi_console_file_delete): Delete.
16448         (mi_console_file_fputs): Delete.
16449         (mi_console_file::write): New.
16450         (mi_console_raw_packet): Delete.
16451         (mi_console_file::flush): New.
16452         (mi_console_file_flush): Delete.
16453         (mi_console_set_raw): Rename to ...
16454         (mi_console_file::set_raw): ... this.
16455         * mi/mi-console.h (class mi_console_file): New class.
16456         (mi_console_file_new, mi_console_set_raw): Delete.
16457         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
16458         (mi_set_logging): Use delete and tee_file.  Adjust.
16459         * mi/mi-main.c (output_register): Use string_file.
16460         (mi_cmd_data_evaluate_expression): Use string_file.
16461         (mi_cmd_data_read_memory): Use string_file.
16462         (mi_cmd_execute, print_variable_or_computed): Use string_file.
16463         * mi/mi-out.c (mi_ui_out::main_stream): New.
16464         (mi_ui_out::rewind): Use main_stream and
16465         string_file.
16466         (mi_ui_out::put): Use main_stream and string_file.
16467         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16468         Allocate a 'string_file' instead.
16469         (mi_out_new): Don't allocate a mem_fileopen stream here.
16470         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16471         (mi_ui_out::main_stream): Declare method.
16472         * printcmd.c (eval_command): Use string_file.
16473         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
16474         * python/py-arch.c (archpy_disassemble): Use string_file.
16475         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
16476         * python/py-frame.c (frapy_str): Use string_file.
16477         * python/py-framefilter.c (py_print_type, py_print_single_arg):
16478         Use string_file.
16479         * python/py-type.c (typy_str): Use string_file.
16480         * python/py-unwind.c (unwind_infopy_str): Use string_file.
16481         * python/py-value.c (valpy_str): Use string_file.
16482         * record-btrace.c (btrace_insn_history): Use string_file.
16483         * regcache.c (regcache_print): Use stdio_file.
16484         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
16485         * remote.c (escape_buffer): Use string_file.
16486         * rust-lang.c (rust_get_disr_info): Use string_file.
16487         * serial.c (serial_open_ops_1): Use stdio_file.
16488         (do_serial_close): Use delete.
16489         * stack.c (print_frame_arg): Use string_file.
16490         (print_frame_args): Remove local mem_fileopen stream, not used.
16491         (print_frame): Use string_file.
16492         * symmisc.c (maintenance_print_symbols): Use stdio_file.
16493         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
16494         Take a 'string_file *' instead of a 'ui_file *'.
16495         * top.c (new_ui): Use stdio_file and stderr_file.
16496         (free_ui): Use delete.
16497         (execute_command_to_string): Use string_file.
16498         (quit_confirm): Use string_file.
16499         * tracepoint.c (collection_list::append_exp): Use string_file.
16500         * tui/tui-disasm.c (tui_disassemble): Use string_file.
16501         * tui/tui-file.c: Don't include "ui-file.h".
16502         (enum streamtype, struct tui_stream): Delete.
16503         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
16504         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
16505         (tui_file::tui_file): New method.
16506         (tui_file_fputs): Delete.
16507         (tui_file_get_strbuf): Delete.
16508         (tui_file::puts): New method.
16509         (tui_file_adjust_strbuf): Delete.
16510         (tui_file_flush): Delete.
16511         (tui_file::flush): New method.
16512         * tui/tui-file.h: Tweak intro comment.
16513         Include ui-file.h.
16514         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
16515         (tui_file_adjust_strbuf): Delete declarations.
16516         (class tui_file): New class.
16517         * tui/tui-io.c (tui_initialize_io): Use tui_file.
16518         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
16519         (tui_register_format): Use string_stream.
16520         * tui/tui-stack.c (tui_make_status_line): Use string_file.
16521         (tui_get_function_from_frame): Use string_file.
16522         * typeprint.c (type_to_string): Use string_file.
16523         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
16524         (null_stream): New global.
16525         (ui_file_delete): Delete.
16526         (ui_file::ui_file): New.
16527         (null_file_isatty): Delete.
16528         (ui_file::~ui_file): New.
16529         (null_file_rewind): Delete.
16530         (ui_file::printf): New.
16531         (null_file_put): Delete.
16532         (null_file_flush): Delete.
16533         (ui_file::putstr): New.
16534         (null_file_write): Delete.
16535         (ui_file::putstrn): New.
16536         (null_file_read): Delete.
16537         (ui_file::putc): New.
16538         (null_file_fputs): Delete.
16539         (null_file_write_async_safe): Delete.
16540         (ui_file::vprintf): New.
16541         (null_file_delete): Delete.
16542         (null_file::write): New.
16543         (null_file_fseek): Delete.
16544         (null_file::puts): New.
16545         (ui_file_data): Delete.
16546         (null_file::write_async_safe): New.
16547         (gdb_flush, ui_file_isatty): Adjust.
16548         (ui_file_put, ui_file_rewind): Delete.
16549         (ui_file_write): Adjust.
16550         (ui_file_write_for_put): Delete.
16551         (ui_file_write_async_safe, ui_file_read): Adjust.
16552         (ui_file_fseek): Delete.
16553         (fputs_unfiltered): Adjust.
16554         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
16555         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
16556         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
16557         (set_ui_file_data): Delete.
16558         (string_file::~string_file, string_file::write)
16559         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
16560         (do_ui_file_as_string, ui_file_as_string): Delete.
16561         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
16562         (struct mem_file): Delete.
16563         (mem_file_new): Delete.
16564         (stdio_file::stdio_file): New.
16565         (mem_file_delete): Delete.
16566         (stdio_file::stdio_file): New.
16567         (mem_fileopen): Delete.
16568         (stdio_file::~stdio_file): New.
16569         (mem_file_rewind): Delete.
16570         (stdio_file::set_stream): New.
16571         (mem_file_put): Delete.
16572         (stdio_file::open): New.
16573         (mem_file_write): Delete.
16574         (stdio_file_magic, struct stdio_file): Delete.
16575         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
16576         (stdio_file::flush): New.
16577         (stdio_file_read): Rename to ...
16578         (stdio_file::read): ... this.  Adjust.
16579         (stdio_file_write): Rename to ...
16580         (stdio_file::write): ... this.  Adjust.
16581         (stdio_file_write_async_safe): Rename to ...
16582         (stdio_file::write_async_safe) ... this.  Adjust.
16583         (stdio_file_fputs): Rename to ...
16584         (stdio_file::puts) ... this.  Adjust.
16585         (stdio_file_isatty): Delete.
16586         (stdio_file_fseek): Delete.
16587         (stdio_file::isatty): New.
16588         (stderr_file_write): Rename to ...
16589         (stderr_file::write) ... this.  Adjust.
16590         (stderr_file_fputs): Rename to ...
16591         (stderr_file::puts) ... this.  Adjust.
16592         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
16593         (stderr_file::stderr_file): New.
16594         (tee_file_magic): Delete.
16595         (struct tee_file): Delete.
16596         (tee_file::tee_file): New.
16597         (tee_file_new): Delete.
16598         (tee_file::~tee_file): New.
16599         (tee_file_delete): Delete.
16600         (tee_file_flush): Rename to ...
16601         (tee_file::flush): ... this.  Adjust.
16602         (tee_file_write): Rename to ...
16603         (tee_file::write): ... this.  Adjust.
16604         (tee_file::write_async_safe): New.
16605         (tee_file_fputs): Rename to ...
16606         (tee_file::puts): ... this.  Adjust.
16607         (tee_file_isatty): Rename to ...
16608         (tee_file::isatty): ... this.  Adjust.
16609         * ui-file.h (struct obstack, struct ui_file): Don't
16610         forward-declare.
16611         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
16612         (ui_file_write_ftype)
16613         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
16614         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
16615         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
16616         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
16617         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
16618         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
16619         (set_ui_file_fseek): Delete.
16620         (ui_file_data, ui_file_delete, ui_file_rewind)
16621         (struct ui_file): New.
16622         (ui_file_up): New.
16623         (class null_file): New.
16624         (null_stream): Declare.
16625         (ui_file_write_for_put, ui_file_put): Delete.
16626         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
16627         Delete.
16628         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
16629         (gdb_fopen, tee_file_new): Delete.
16630         (struct string_file): New.
16631         (struct stdio_file): New.
16632         (stdio_file_up): New.
16633         (struct stderr_file): New.
16634         (class tee_file): New.
16635         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
16636         of a 'ui_file *'.  Adjust.
16637         * ui-out.h (class ui_out) <field_stream>: Likewise.
16638         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
16639         (null_stream): Delete.
16640         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
16641         Adjust.
16642         * utils.h (struct ui_file): Delete forward declaration..
16643         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
16644         (error_stream): Take a 'string_file &' instead of a
16645         'ui_file *'.
16646         * varobj.c (varobj_value_get_print_value): Use string_file.
16647         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
16648         * gdbarch.c: Regenerate.
16649
16650 2017-02-02  Pedro Alves  <palves@redhat.com>
16651
16652         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
16653         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
16654         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
16655         Adjust to call gdb_print_insn instead of
16656         gdb_disassembler::print_insn.
16657         (dump_insns, do_mixed_source_and_assembly_deprecated)
16658         (do_mixed_source_and_assembly, do_assembly_only): Add back a
16659         'gdbarch' parameter.  Remove gdb_disassembler parameter.
16660         (gdb_disassembly): Don't allocate a gdb_disassembler here.
16661         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
16662         declaration.
16663         (gdb_pretty_print_insn): Re-add declaration.
16664         * record-btrace.c (btrace_insn_history): Don't allocate a
16665         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
16666
16667 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
16668
16669         * disasm.h (gdb_disassembly): Remove file_string parameter.
16670         * disasm.c (gdb_disassembly): Likewise.
16671         * cli/cli-cmds.c (print_disassembly): Adapt.
16672         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
16673         * stack.c (do_gdb_disassembly): Likewise.
16674
16675 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
16676
16677         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
16678         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
16679         targets.  And if the implicit value is longer than needed, extract
16680         the first bytes instead of the "least significant" ones.
16681
16682 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
16683
16684         * btrace.c (btrace_enable): Do not call btrace_add_pc for
16685         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
16686         (btrace_fetch): Assert can_access_registers_ptid.
16687         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
16688         validate_registers_access.
16689
16690 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
16691
16692         * gdbthread.h (can_access_registers_ptid): New.
16693         * thread.c (can_access_registers_ptid): New.
16694
16695 2017-02-01  Pedro Alves  <palves@redhat.com>
16696
16697         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
16698
16699 2017-01-31  Pedro Alves  <palves@redhat.com>
16700
16701         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
16702         Fix typos.
16703
16704 2017-01-31  Pedro Alves  <palves@redhat.com>
16705
16706         * stack.c (print_frame_args): Remove local mem_fileopen stream,
16707         not used.
16708
16709 2017-01-31  Pedro Alves  <palves@redhat.com>
16710
16711         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
16712
16713 2017-01-31  Pedro Alves  <palves@redhat.com>
16714
16715         * common/scoped_restore.h
16716         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
16717         change the value's parameter type to T2.
16718         (make_scoped_restore): Likewise.
16719
16720 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
16721             Richard Henderson  <rth@redhat.com>
16722
16723         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
16724         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
16725         GS_BASE for older kernels.
16726         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
16727         GS_BASE for older kernels.
16728         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
16729         and GS_BASE to the offset table.
16730         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
16731         system register group.
16732         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
16733         for older kernels.
16734         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
16735         amd64 ABI.
16736         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
16737         AMD64_GSBASE_REGNUM.
16738         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
16739         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
16740         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
16741         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
16742         i386/64bit-segments.xml in those rules.
16743         * features/i386/64bit-segments.xml: New file.
16744         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
16745         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
16746         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
16747         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
16748         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
16749         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
16750         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
16751         * features/i386/amd64-avx-linux.c: Regenerated.
16752         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
16753         * features/i386/amd64-avx-mpx.c: Regenerated.
16754         * features/i386/amd64-avx512-linux.c: Regenerated.
16755         * features/i386/amd64-linux.c: Regenerated.
16756         * features/i386/amd64-mpx-linux.c: Regenerated.
16757         * features/i386/i386-avx-mpx-linux.c: Regenerated.
16758         * features/i386/i386-avx-mpx.c: Regenerated.
16759         * features/i386/x32-avx-linux.c: Regenerated.
16760         * features/i386/x32-avx512-linux.c: Regenerated.
16761         * regformats/i386/amd64-avx-linux.dat: Regenerated.
16762         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
16763         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
16764         * regformats/i386/amd64-linux.dat: Regenerated.
16765         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
16766         * regformats/i386/x32-avx-linux.dat: Regenerated.
16767         * regformats/i386/x32-avx512-linux.dat: Regenerated.
16768         * regformats/i386/x32-linux.dat: Regenerated.
16769
16770 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
16771
16772         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
16773         Set to AMD64_NUM_REGS.
16774
16775 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
16776
16777         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
16778         that checks validity of a register number.
16779
16780 2017-01-27  Kees Cook  <keescook@google.com>
16781
16782         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
16783         fetch_fpregs if target has fpa registers.
16784         (arm_linux_store_inferior_registers): Call store_fpregs if target
16785         has fpa registers.
16786
16787 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
16788
16789         * cris-tdep.c (cris_gdbarch_init): Remove check for
16790         info.byte_order and force it to BFD_ENDIAN_LITTLE.
16791
16792 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
16793
16794         * corelow.c (get_core_register_section): Check for regset
16795         existence before checking for REGSET_VARIABLE_SIZE.
16796
16797 2017-01-26  Yao Qi  <yao.qi@linaro.org>
16798             Pedro Alves  <palves@redhat.com>
16799
16800         PR gdb/20939
16801         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
16802         call memory_error, save memaddr instead.
16803         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
16804         negative, cal memory_error.
16805         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
16806
16807 2017-01-26  Yao Qi  <yao.qi@linaro.org>
16808
16809         * disasm-selftests.c (memory_error_test): New function.
16810         (_initialize_disasm_selftests): Register memory_error_test.
16811
16812 2017-01-26  Yao Qi  <yao.qi@linaro.org>
16813
16814         * Makefile.in (SFILES): Add disasm-selftests.c and
16815         selftest-arch.c.
16816         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
16817         * disasm-selftests.c: New file.
16818         * selftest-arch.c: New file.
16819         * selftest-arch.h: New file.
16820
16821 2017-01-26  Yao Qi  <yao.qi@linaro.org>
16822
16823         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
16824         to bfd_arch_mep.  Don't return 0 if section is not
16825         found.  Call print_insn_mep.
16826
16827 2017-01-26  Pedro Alves  <palves@redhat.com>
16828             Yao Qi  <yao.qi@linaro.org>
16829
16830         * arm-tdep.c: Include "disasm.h".
16831         (gdb_print_insn_arm): Update code to get gdbarch.
16832         * disasm.c (dis_asm_read_memory): Change it to
16833         gdb_disassembler::dis_asm_read_memory.
16834         (dis_asm_memory_error): Likewise.
16835         (dis_asm_print_address): Likewise.
16836         (gdb_pretty_print_insn): Change it to
16837         gdb_disassembler::pretty_print_insn.
16838         (dump_insns): Add one argument gdb_disassemlber.  All
16839         callers updated.
16840         (do_mixed_source_and_assembly_deprecated): Likewise.
16841         (do_mixed_source_and_assembly): Likewise.
16842         (do_assembly_only): Likewise.
16843         (gdb_disassembler::gdb_disassembler): New.
16844         (gdb_disassembler::print_insn): New.
16845         * disasm.h (class gdb_disassembler): New.
16846         (gdb_pretty_print_insn): Remove declaration.
16847         (gdb_disassemble_info): Likewise.
16848         * guile/scm-disasm.c (class gdbscm_disassembler): New.
16849         (gdbscm_disasm_read_memory_worker): Update.
16850         (gdbscm_disasm_read_memory): Update.
16851         (gdbscm_disasm_memory_error): Remove.
16852         (gdbscm_disasm_print_address): Remove.
16853         (gdbscm_disassembler::gdbscm_disassembler): New.
16854         (gdbscm_print_insn_from_port): Update.
16855         * mips-tdep.c: Include disasm.h.
16856         (gdb_print_insn_mips): Update code to get gdbarch.
16857         * record-btrace.c (btrace_insn_history): Update.
16858         * spu-tdep.c: Include disasm.h.
16859         (struct spu_dis_asm_data): Remove.
16860         (struct spu_dis_asm_info): New.
16861         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
16862         SPU id.
16863         (gdb_print_insn_spu): Cast disassemble_info to
16864         spu_dis_asm_info.
16865
16866 2017-01-26  Yao Qi  <yao.qi@linaro.org>
16867
16868         * disasm.c (do_ui_file_delete): Delete.
16869         (gdb_insn_length): Move code creating stream to ...
16870         * utils.c (null_stream): ... here.  New function.
16871         * utils.h (null_stream): Declare.
16872
16873 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
16874
16875         * python/py-inferior.c (find_thread_object): Return directly
16876         from the loop.  Remove "found" variable.
16877
16878 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
16879
16880         GDB 7.12.1 released.
16881
16882 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
16883
16884         * python/py-function.c (fnpy_call): Reorder declarations to have
16885         the gdbpy_enter object declared first.
16886         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
16887
16888 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
16889
16890         PR python/21068
16891         * python/python-internal.h (PyMem_RawMalloc): Define for
16892         Python < 3.4.
16893         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
16894         PyMem_RawMalloc instead of PyMem_Malloc.
16895
16896 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
16897             Luis Machado  <lgustavo@codesourcery.com>
16898
16899         * NEWS (New commands): Mention flash-erase.
16900         (New MI commands): Mention target-flash-erase.
16901         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
16902         command.
16903         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
16904         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
16905         * target.c (flash_erase_command): New function.
16906         (initialize_targets): Add new flash-erase command.
16907         * target.h (flash_erase_command): New declaration.
16908
16909 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
16910
16911         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
16912         HAVE_SYS_PROCFS_H is defined.
16913
16914 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
16915
16916         * remote.c (struct cached_reg): Change data into a pointer.
16917         * (stop_reply_dtr): Free data pointers before deleting vector.
16918         (process_stop_reply): Likewise.
16919         (remote_parse_stop_reply): Allocate space for data
16920
16921 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
16922
16923         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
16924         MAX_REGISTER_SIZE.
16925         (amd64_pseudo_register_read_value): Likewise.
16926         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
16927         (store_register_using_P): Likewise.
16928         * regcache.c (regcache_xfer_part): Likewise.
16929
16930 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
16931
16932         Split real and pseudo registers.
16933         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
16934         (sparc32_pseudo_regnum): New enum.
16935         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
16936         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
16937         (SPARC32_CP0_REGISTERS): New macro.
16938         (sparc32_pseudo_register_name): New function.
16939         (sparc32_register_name): Use sparc32_pseudo_register_name.
16940         (sparc32_pseudo_register_type): New function.
16941         (sparc32_register_type): Use sparc32_pseudo_register_type.
16942         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
16943         pseudo register numbers.
16944         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
16945         (SPARC64_CP0_REGISTERS): New macro.
16946         (sparc64_pseudo_register_name): New function.
16947         (sparc64_register_name): Use sparc64_pseudo_register_name.
16948         (sparc64_pseudo_register_type): New function.
16949         (sparc64_register_type): Use sparc64_pseudo_register_type.
16950         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
16951         pseudo register numbers.
16952         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
16953         sparc64_store_arguments): Handle pseudo register numbers.
16954
16955 2017-01-13  Yao Qi  <yao.qi@linaro.org>
16956
16957         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
16958         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
16959         output.
16960         (getpkt_or_notif_sane_1): Likewise.
16961
16962 2017-01-13  Yao Qi  <yao.qi@linaro.org>
16963
16964         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
16965         of CC.  Pass "-x c++-header" instead of "-x c".
16966
16967 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
16968
16969         * remote.c (remote_can_async_p): Update comment.
16970
16971 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
16972
16973         * linux-nat.c (linux_nat_can_async_p): Update comment.
16974
16975 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
16976
16977         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
16978
16979 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
16980
16981         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
16982
16983 2017-01-10  Tom Tromey  <tom@tromey.com>
16984
16985         * python/py-type.c (typy_legacy_template_argument): Update.
16986         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
16987         ~demangle_parse_info): Declare new members.
16988         (cp_demangled_name_to_comp): Return unique_ptr.
16989         (cp_demangled_name_parse_free)
16990         (make_cleanup_cp_demangled_name_parse_free)
16991         (cp_new_demangle_parse_info): Remove.
16992         * cp-support.c (do_demangled_name_parse_free_cleanup)
16993         (make_cleanup_cp_demangled_name_parse_free): Remove.
16994         (inspect_type, cp_canonicalize_string_full)
16995         (cp_canonicalize_string): Update.
16996         (mangled_name_to_comp): Change return type.
16997         (cp_class_name_from_physname, method_name_from_physname)
16998         (cp_func_name, cp_remove_params): Update.
16999         * cp-name-parser.y (demangle_parse_info): New constructor, from
17000         cp_new_demangle_parse_info.
17001         (~demangle_parse_info): New destructor, from
17002         cp_demangled_name_parse_free.
17003         (cp_merge_demangle_parse_infos): Update.
17004         (cp_demangled_name_to_comp): Change return type.
17005
17006 2017-01-10  Tom Tromey  <tom@tromey.com>
17007
17008         * top.c (prevent_dont_repeat): Change return type.
17009         * python/python.c (execute_gdb_command): Use std::string.
17010         Update.
17011         * guile/guile.c (gdbscm_execute_gdb_command): Update.
17012         * command.h (prevent_dont_repeat): Change return type.
17013         * breakpoint.c (bpstat_do_actions_1): Update.
17014
17015 2017-01-10  Tom Tromey  <tom@tromey.com>
17016
17017         * value.h (scoped_value_mark::~scoped_value_mark): Call
17018         free_to_mark.
17019         (scoped_value_mark::free_to_mark): New method.
17020         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
17021         scoped_value_mark.
17022
17023 2017-01-10  Tom Tromey  <tom@tromey.com>
17024
17025         * python/py-value.c (valpy_dereference, valpy_referenced_value)
17026         (valpy_reference_value, valpy_const_value, valpy_get_address)
17027         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
17028         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
17029         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
17030         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
17031         scoped_value_mark.
17032         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
17033         * value.h (scoped_value_mark): New class.
17034
17035 2017-01-10  Tom Tromey  <tom@tromey.com>
17036
17037         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
17038         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
17039         * psymtab.c (discard_psymtabs_upto): Remove.
17040         (make_cleanup_discard_psymtabs): Remove.
17041         (struct psymtab_state): Remove.
17042
17043 2017-01-10  Tom Tromey  <tom@tromey.com>
17044
17045         * record-full.c (record_full_save_cleanups): Remove.
17046         (record_full_save): Use gdb::unlinker.
17047         * gcore.c (do_bfd_delete_cleanup): Remove.
17048         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
17049         cleanups.
17050         * dwarf2read.c (unlink_if_set): Remove.
17051         (write_psymtabs_to_index): Use gdb::unlinker.
17052         * common/gdb_unlinker.h: New file.
17053
17054 2017-01-10  Tom Tromey  <tom@tromey.com>
17055
17056         * windows-tdep.c (windows_xfer_shared_library): Update.
17057         * windows-nat.c (windows_make_so): Update.
17058         * utils.h (make_cleanup_bfd_unref): Remove.
17059         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
17060         * symfile.h (symfile_bfd_open)
17061         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
17062         * symfile.c (read_symbols, symbol_file_add)
17063         (separate_debug_file_exists): Update.
17064         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
17065         (generic_load, reread_symbols): Update.
17066         * symfile-mem.c (symbol_file_add_from_memory): Update.
17067         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
17068         (spu_symbol_file_add_from_memory): Update.
17069         * solist.h (struct target_so_ops) <bfd_open>: Return
17070         gdb_bfd_ref_ptr.
17071         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
17072         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
17073         gdb_bfd_ref_ptr.
17074         (solib_map_sections, reload_shared_libraries_1): Update.
17075         * solib-svr4.c (enable_break): Update.
17076         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
17077         * solib-frv.c (enable_break2): Update.
17078         * solib-dsbt.c (enable_break): Update.
17079         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
17080         gdb_bfd_ref_ptr.
17081         (darwin_solib_get_all_image_info_addr_at_init): Update.
17082         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
17083         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
17084         * record-full.c (record_full_save): Update.
17085         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
17086         * procfs.c (insert_dbx_link_bpt_in_file): Update.
17087         * minidebug.c (find_separate_debug_file_in_section): Return
17088         gdb_bfd_ref_ptr.
17089         * machoread.c (macho_add_oso_symfile): Change abfd to
17090         gdb_bfd_ref_ptr.
17091         (macho_symfile_read_all_oso): Update.
17092         (macho_check_dsym): Return gdb_bfd_ref_ptr.
17093         (macho_symfile_read): Update.
17094         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
17095         (jit_bfd_try_read_symtab): Update.
17096         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17097         (gdb_bfd_openw, gdb_bfd_openr_iovec)
17098         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17099         gdb_bfd_ref_ptr.
17100         (gdb_bfd_ref_policy): New struct.
17101         (gdb_bfd_ref_ptr): New typedef.
17102         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17103         (gdb_bfd_openw, gdb_bfd_openr_iovec)
17104         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17105         gdb_bfd_ref_ptr.
17106         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17107         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17108         (gcore_command): Update.
17109         * exec.c (exec_file_attach): Update.
17110         * elfread.c (elf_symfile_read): Update.
17111         * dwarf2read.c (dwarf2_get_dwz_file): Update.
17112         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
17113         (open_and_init_dwo_file): Update.
17114         (open_dwp_file): Return gdb_bfd_ref_ptr.
17115         (open_and_init_dwp_file): Update.
17116         * corelow.c (core_open): Update.
17117         * compile/compile-object-load.c (compile_object_load): Update.
17118         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
17119         * coffread.c (coff_symfile_read): Update.
17120         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
17121         gdb_bfd_ref_ptr.  Rename.
17122         (dump_bfd_file, restore_command): Update.
17123         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17124         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17125         (find_separate_debug_file_by_buildid): Update.
17126
17127 2017-01-10  Tom Tromey  <tom@tromey.com>
17128
17129         * common/gdb_ref_ptr.h: New file.
17130         * python/py-ref.h (struct gdbpy_ref_policy): New.
17131         (gdbpy_ref): Now a typedef.
17132
17133 2017-01-10  Tom Tromey  <tom@tromey.com>
17134
17135         * utils.h (make_cleanup_htab_delete): Don't declare.
17136         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
17137         Remove.
17138         * linespec.c (decode_compound_collector): Add constructor,
17139         destructor.
17140         (lookup_prefix_sym): Remove cleanup.
17141         (symtab_collector): Add constructor, destructor.
17142         (collect_symtabs_from_filename): Remove cleanup.
17143         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
17144         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
17145         Use htab_up.
17146         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
17147         * dwarf2read.c (dw2_expand_symtabs_matching)
17148         (dw2_map_symbol_filenames, dwarf_decode_macros)
17149         (write_psymtabs_to_index): Use htab_up.
17150         * dwarf2loc.c (func_verify_no_selftailcall)
17151         (call_site_find_chain_1, func_verify_no_selftailcall)
17152         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
17153         std::vector, gdb::unique_xmalloc_ptr.
17154         (call_sitep): Remove typedef.
17155         (dwarf2_locexpr_baton_eval): Remove unused variable.
17156
17157 2017-01-10  Tom Tromey  <tom@tromey.com>
17158
17159         * python/python-internal.h (make_cleanup_py_decref)
17160         (make_cleanup_py_xdecref): Don't declare.
17161         * python/py-utils.c (py_decref, make_cleanup_py_decref)
17162         (py_xdecref, make_cleanup_py_xdecref): Remove.
17163
17164 2017-01-10  Tom Tromey  <tom@tromey.com>
17165
17166         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
17167         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
17168
17169 2017-01-10  Tom Tromey  <tom@tromey.com>
17170
17171         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
17172
17173 2017-01-10  Tom Tromey  <tom@tromey.com>
17174
17175         * python/py-utils.c (unicode_to_encoded_string)
17176         (python_string_to_target_string)
17177         (python_string_to_target_python_string)
17178         (python_string_to_host_string, gdbpy_obj_to_string)
17179         (get_addr_from_python): Use gdbpy_ref.
17180
17181 2017-01-10  Tom Tromey  <tom@tromey.com>
17182
17183         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
17184         gdbpy_ref.
17185
17186 2017-01-10  Tom Tromey  <tom@tromey.com>
17187
17188         * python/python.c (eval_python_command, gdbpy_decode_line)
17189         (gdbpy_run_events, gdbpy_start_type_printers)
17190         (gdbpy_apply_type_printers): Use gdbpy_ref.
17191
17192 2017-01-10  Tom Tromey  <tom@tromey.com>
17193
17194         * python/py-param.c (get_doc_string, compute_enum_values): Use
17195         gdbpy_ref.
17196
17197 2017-01-10  Tom Tromey  <tom@tromey.com>
17198
17199         * python/py-inferior.c (find_thread_object, build_inferior_list):
17200         Use gdbpy_ref.
17201
17202 2017-01-10  Tom Tromey  <tom@tromey.com>
17203
17204         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17205
17206 2017-01-10  Tom Tromey  <tom@tromey.com>
17207
17208         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
17209         gdbpy_ref.
17210
17211 2017-01-10  Tom Tromey  <tom@tromey.com>
17212
17213         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
17214         extra incref.
17215         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
17216         Use gdbpy_ref.
17217
17218 2017-01-10  Tom Tromey  <tom@tromey.com>
17219
17220         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17221         gdbpy_ref.
17222
17223 2017-01-10  Tom Tromey  <tom@tromey.com>
17224
17225         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
17226         decref results of PyArg_ParseTupleAndKeywords.
17227
17228 2017-01-10  Tom Tromey  <tom@tromey.com>
17229
17230         * python/python.c (python_run_simple_file): Use
17231         unique_xmalloc_ptr, gdbpy_ref.
17232
17233 2017-01-10  Tom Tromey  <tom@tromey.com>
17234
17235         * python/py-prettyprint.c (print_stack_unless_memory_error)
17236         (print_string_repr, print_children): Use gdbpy_ref.
17237         (dummy_python_frame): New class.
17238         (dummy_python_frame::dummy_python_frame): Rename from
17239         push_dummy_python_frame.
17240         (py_restore_tstate): Remove.
17241
17242 2017-01-10  Tom Tromey  <tom@tromey.com>
17243
17244         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17245
17246 2017-01-10  Tom Tromey  <tom@tromey.com>
17247
17248         * python/python.c (ensure_python_env, restore_python_env):
17249         Remove.
17250         * python/python-internal.h (ensure_python_env): Don't declare.
17251         * varobj.h (varobj_ensure_python_env): Don't declare.
17252         * varobj.c (varobj_ensure_python_env): Remove.
17253
17254 2017-01-10  Tom Tromey  <tom@tromey.com>
17255
17256         * varobj.c (varobj_value_get_print_value): Use
17257         gdbpy_enter_varobj.
17258
17259 2017-01-10  Tom Tromey  <tom@tromey.com>
17260
17261         * python/py-prettyprint.c (print_string_repr, print_children):
17262         Update.
17263         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
17264         of "encoding".
17265         * varobj.c (varobj_value_get_print_value): Update.
17266         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
17267
17268 2017-01-10  Tom Tromey  <tom@tromey.com>
17269
17270         * varobj.c (varobj_get_display_hint)
17271         (dynamic_varobj_has_child_method, install_new_value_visualizer)
17272         (varobj_set_visualizer, free_variable): Use
17273         gdbpy_enter_varobj.
17274
17275 2017-01-10  Tom Tromey  <tom@tromey.com>
17276
17277         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
17278         (do_finish_initialization): New function.  Use gdbpy_ref.
17279         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
17280         do_finish_initialization.
17281
17282 2017-01-10  Tom Tromey  <tom@tromey.com>
17283
17284         * python/py-param.c (get_set_value, get_show_value): Use
17285         gdbpy_enter, gdbpy_ref.
17286
17287 2017-01-10  Tom Tromey  <tom@tromey.com>
17288
17289         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
17290
17291 2017-01-10  Tom Tromey  <tom@tromey.com>
17292
17293         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
17294
17295 2017-01-10  Tom Tromey  <tom@tromey.com>
17296
17297         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
17298         Use gdbpy_enter_varobj.
17299
17300 2017-01-10  Tom Tromey  <tom@tromey.com>
17301
17302         * varobj.c (gdbpy_enter_varobj): New constructor.
17303         * python/python-internal.h (gdbpy_enter_varobj): New class.
17304         * python/py-varobj.c (py_varobj_get_iterator): Use
17305         gdbpy_enter_varobj.
17306
17307 2017-01-10  Tom Tromey  <tom@tromey.com>
17308
17309         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
17310         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17311         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
17312         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
17313         unique_xmalloc_ptr.
17314         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
17315
17316 2017-01-10  Tom Tromey  <tom@tromey.com>
17317
17318         * python/py-xmethods.c (invoke_match_method): Use
17319         gdbpy_ref.
17320
17321 2017-01-10  Tom Tromey  <tom@tromey.com>
17322
17323         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
17324         gdbpy_enter, gdbpy_ref.
17325
17326 2017-01-10  Tom Tromey  <tom@tromey.com>
17327
17328         * python/python.c (python_interactive_command): Use gdbpy_enter.
17329
17330 2017-01-10  Tom Tromey  <tom@tromey.com>
17331
17332         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
17333         gdbpy_ref.
17334
17335 2017-01-10  Tom Tromey  <tom@tromey.com>
17336
17337         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
17338         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17339
17340 2017-01-10  Tom Tromey  <tom@tromey.com>
17341
17342         * utils.h (htab_deleter): New struct.
17343         (htab_up): New typedef.
17344         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
17345         gdbpy_enter, gdbpy_ref, htab_up.
17346
17347 2017-01-10  Tom Tromey  <tom@tromey.com>
17348
17349         * python/py-unwind.c (pending_frame_invalidate): Remove.
17350         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
17351
17352 2017-01-10  Tom Tromey  <tom@tromey.com>
17353
17354         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
17355         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
17356
17357 2017-01-10  Tom Tromey  <tom@tromey.com>
17358
17359         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
17360
17361 2017-01-10  Tom Tromey  <tom@tromey.com>
17362
17363         * python/python.c (gdbpy_eval_from_control_command)
17364         (gdbpy_source_script, gdbpy_run_events)
17365         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
17366         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
17367         gdbpy_enter.
17368
17369 2017-01-10  Tom Tromey  <tom@tromey.com>
17370
17371         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
17372
17373 2017-01-10  Tom Tromey  <tom@tromey.com>
17374
17375         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
17376
17377 2017-01-10  Tom Tromey  <tom@tromey.com>
17378
17379         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
17380         (python_on_inferior_call_pre, python_on_inferior_call_post)
17381         (python_on_memory_change, python_on_register_change)
17382         (python_inferior_exit, python_new_objfile, add_thread_object)
17383         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
17384
17385 2017-01-10  Tom Tromey  <tom@tromey.com>
17386
17387         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
17388         (bpfinishpy_handle_exit): Use gdbpy_enter.
17389
17390 2017-01-10  Tom Tromey  <tom@tromey.com>
17391
17392         * python/py-cmd.c (cmdpy_destroyer)
17393         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
17394         gdbpy_enter.
17395
17396 2017-01-10  Tom Tromey  <tom@tromey.com>
17397
17398         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17399         gdbpy_enter.
17400         (gdbpy_breakpoint_has_cond): Likewise.
17401
17402 2017-01-10  Tom Tromey  <tom@tromey.com>
17403
17404         * python/python.c (gdbpy_enter): New constructor.
17405         (~gdbpy_enter): New destructor.
17406         (restore_python_env, ensure_python_env): Rewrite.
17407         * python/python-internal.h (gdbpy_enter): New class.
17408
17409 2017-01-10  Tom Tromey  <tom@tromey.com>
17410
17411         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
17412
17413 2017-01-10  Tom Tromey  <tom@tromey.com>
17414
17415         * python/py-value.c (value_has_field, get_field_flag)
17416         (get_field_type, valpy_getitem, convert_value_from_python): Use
17417         gdbpy_ref.
17418
17419 2017-01-10  Tom Tromey  <tom@tromey.com>
17420
17421         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
17422         gdbpy_ref.
17423
17424 2017-01-10  Tom Tromey  <tom@tromey.com>
17425
17426         * python/py-prettyprint.c (search_pp_list)
17427         (find_pretty_printer_from_objfiles)
17428         (find_pretty_printer_from_progspace)
17429         (find_pretty_printer_from_gdb, find_pretty_printer)
17430         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
17431         gdbpy_ref.
17432
17433 2017-01-10  Tom Tromey  <tom@tromey.com>
17434
17435         * python/py-param.c (call_doc_function): Use gdbpy_ref.
17436
17437 2017-01-10  Tom Tromey  <tom@tromey.com>
17438
17439         * python/py-linetable.c (build_line_table_tuple_from_pcs)
17440         (ltpy_get_all_source_lines): Use gdbpy_ref.
17441
17442 2017-01-10  Tom Tromey  <tom@tromey.com>
17443
17444         * python/py-framefilter.c (extract_sym, extract_value)
17445         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
17446         gdbpy_ref.
17447
17448 2017-01-10  Tom Tromey  <tom@tromey.com>
17449
17450         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
17451
17452 2017-01-10  Tom Tromey  <tom@tromey.com>
17453
17454         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
17455
17456 2017-01-10  Tom Tromey  <tom@tromey.com>
17457
17458         * python/py-function.c (convert_values_to_python, fnpy_init): Use
17459         gdbpy_ref.
17460
17461 2017-01-10  Tom Tromey  <tom@tromey.com>
17462
17463         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
17464
17465 2017-01-10  Tom Tromey  <tom@tromey.com>
17466
17467         * python/py-type.c (convert_field, make_fielditem, typy_fields)
17468         (typy_range): Use gdbpy_ref.
17469
17470 2017-01-10  Tom Tromey  <tom@tromey.com>
17471
17472         * python/py-threadevent.c (create_thread_event_object): Use
17473         gdbpy_ref.
17474         * python/py-stopevent.c (create_stop_event_object): Simplify.
17475         (emit_stop_event): Use gdbpy_ref.
17476         * python/py-signalevent.c (create_signal_event_object): Use
17477         gdbpy_ref.
17478         * python/py-newobjfileevent.c (create_new_objfile_event_object)
17479         (emit_new_objfile_event, create_clear_objfiles_event_object)
17480         (emit_clear_objfiles_event): Use gdbpy_ref.
17481         * python/py-infevents.c (create_inferior_call_event_object)
17482         (create_register_changed_event_object)
17483         (create_memory_changed_event_object, emit_inferior_call_event)
17484         (emit_memory_changed_event, emit_register_changed_event): Use
17485         gdbpy_ref.
17486         * python/py-exitedevent.c (create_exited_event_object)
17487         (emit_exited_event): Use gdbpy_ref.
17488         * python/py-event.h (evpy_emit_event): Remove
17489         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
17490         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
17491         * python/py-continueevent.c (emit_continue_event): Use
17492         gdbpy_ref.
17493         * python/py-breakpoint.c (gdbpy_breakpoint_created)
17494         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
17495         gdbpy_ref.
17496         * python/py-bpevent.c (create_breakpoint_event_object): Use
17497         gdbpy_ref.
17498
17499 2017-01-10  Tom Tromey  <tom@tromey.com>
17500
17501         * python/py-ref.h: New file.
17502
17503 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
17504
17505         * cli-out.c (cli_ui_out::do_redirect): Change return type to
17506         void.
17507         * cli-out.h (cli_ui_out::do_redirect): Likewise.
17508         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
17509         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
17510         * ui-out.c (ui_out::redirect): Likewise.
17511         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
17512         * cli/cli-logging.c (set_logging_redirect): Update call site of
17513         ui_out::redirect.
17514         (handle_redirections): Likewise.
17515         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
17516         * top.c (execute_command_to_string): Likewise.
17517         * utils.c (do_ui_out_redirect_pop): Likewise.
17518
17519 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
17520
17521         * stack.c (_initialize_stack): Update "frame" command help message.
17522
17523 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
17524
17525         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
17526
17527 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17528
17529         * x86-linux-nat.h: Include gdb_proc_service.h.
17530
17531 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17532
17533         * ser-base.h: Include serial.h.
17534
17535 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17536
17537         * ppc-linux-tdep.h: Include ppc-tdep.h.
17538
17539 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17540
17541         * nat/amd64-linux-siginfo.h: Include signal.h.
17542
17543 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17544
17545         * nat/aarch64-linux-hw-point.h: Include break-common.h.
17546
17547 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17548
17549         * mi/mi-parse.h: Include mi-cmds.h.
17550
17551 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17552
17553         * inf-loop.c: Don't include "target.h".
17554         * inf-loop.h: Include it here.
17555
17556 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17557
17558         * dfp.h: Include "dboulest.h" and "expression.h".
17559
17560 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17561
17562         * ax-gdb.h: Include "ax.h".
17563
17564 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17565
17566         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
17567         with nat/gdb_ptrace.h.
17568
17569 2017-01-05  Yao Qi  <yao.qi@linaro.org>
17570
17571         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
17572         new line.
17573         (mips64_fbsd_sigframe_init): Likewise.
17574
17575 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
17576
17577         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
17578         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
17579
17580 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
17581
17582         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
17583         * NEWS: Mention new FreeBSD/mips native configuration.
17584         * config/mips/fbsd.mh: New file.
17585         * configure.host: Add mips*-*-freebsd*.
17586         * mips-fbsd-nat.c: New file.
17587
17588 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
17589
17590         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
17591         (ALLDEPFILES): Add mips-fbsd-tdep.c.
17592         * NEWS: Mention new FreeBSD/mips target.
17593         * configure.tgt: Add mips*-*-freebsd*.
17594         * mips-fbsd-tdep.c: New file.
17595         * mips-fbsd-tdep.h: New file.
17596
17597 2017-01-04  Yao Qi  <yao.qi@linaro.org>
17598
17599         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
17600         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
17601
17602 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
17603
17604         Update copyright year range in all GDB files.
17605
17606 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
17607
17608         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
17609
17610 For older changes see ChangeLog-2016.
17611 \f
17612 Local Variables:
17613 mode: change-log
17614 left-margin: 8
17615 fill-column: 74
17616 version-control: never
17617 coding: utf-8
17618 End: