Reorder/reindent dw2_expand_symtabs_matching & friends
[external/binutils.git] / gdb / ChangeLog
1 2017-11-08  Pedro Alves  <palves@redhat.com>
2
3         * dwarf2read.c (dw2_expand_marked_cus)
4         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
5         (dw2_expand_symtabs_matching): Move further below.
6         (dw2_expand_marked_cus): Reindent.
7
8 2017-11-08  Pedro Alves  <palves@redhat.com>
9
10         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
11         (struct name_component): New.
12         (mapped_index::name_components): New field.
13         (mapped_index::symbol_name_at): New method.
14         (dwarf2_read_index): Call mapped_index ctor.
15         (dw2_map_matching_symbols): Add comment about name_components
16         table.
17         (dw2_expand_symtabs_matching): Factor part to...
18         (dw2_expand_symtabs_matching_symbol): ... this new function.
19         Build name components table, and lookup symbols in it before
20         calling the name matcher.
21         (dw2_expand_marked_cus): New, factored out from
22         dw2_expand_symtabs_matching.
23         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
24
25 2017-11-08   Pedro Alves  <palves@redhat.com>
26
27         * ada-lang.c (ada_encode): Rename to ..
28         (ada_encode_1): ... this.  Add throw_errors parameter and handle
29         it.
30         (ada_encode): Reimplement.
31         (match_name): Delete, folded into full_name.
32         (resolve_subexp): No longer pass the encoded name to
33         ada_lookup_symbol_list.
34         (should_use_wild_match): Delete.
35         (name_match_type_from_name): New.
36         (ada_lookup_simple_minsym): Use lookup_name_info and the
37         language's symbol_name_matcher_ftype.
38         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
39         (ada_add_block_renamings): Adjust to use lookup_name_info.
40         (ada_lookup_name): New.
41         (add_nonlocal_symbols, ada_add_all_symbols)
42         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
43         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
44         (ada_name_for_lookup): Delete.
45         (ada_lookup_encoded_symbol): Construct a verbatim name.
46         (wild_match): Reverse sense of return type.  Use bool.
47         (full_match): Reverse sense of return type.  Inline bits of old
48         match_name here.
49         (ada_add_block_symbols): Adjust to use lookup_name_info.
50         (symbol_completion_match): Delete, folded into...
51         (ada_lookup_name_info::matches): ... .this new method.
52         (symbol_completion_add): Delete.
53         (ada_collect_symbol_completion_matches): Add name_match_type
54         parameter.  Adjust to use lookup_name_info and
55         completion_list_add_name.
56         (get_var_value, ada_add_global_exceptions): Adjust to use
57         lookup_name_info.
58         (ada_get_symbol_name_cmp): Delete.
59         (do_wild_match, do_full_match): New functions.
60         (ada_lookup_name_info::ada_lookup_name_info): New method.
61         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
62         functions.
63         (ada_language_defn): Install ada_get_symbol_name_matcher.
64         * ada-lex.l (processId): If name starts with '<', copy it
65         verbatim.
66         * block.c (block_iter_match_step, block_iter_match_first)
67         (block_iter_match_next, block_lookup_symbol)
68         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
69         lookup_name_info.
70         * block.h (block_iter_match_first, block_iter_match_next)
71         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
72         * c-lang.c (c_language_defn, cplus_language_defn)
73         (asm_language_defn, minimal_language_defn): Adjust comments to
74         refer to la_get_symbol_name_matcher.
75         * completer.c (complete_files_symbols)
76         (collect_explicit_location_matches, symbol_completer): Pass a
77         symbol_name_match_type down.
78         * completer.h (class completion_match, completion_match_result):
79         New classes.
80         (completion_tracker::reset_completion_match_result): New method.
81         (completion_tracker::m_completion_match_result): New field.
82         * cp-support.c (make_symbol_overload_list_block): Adjust to use
83         lookup_name_info.
84         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
85         functions.
86         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
87         * d-lang.c: Adjust comments to refer to
88         la_get_symbol_name_matcher.
89         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
90         Adjust to use lookup_name_info.
91         (dict_iter_match_first, dict_iter_match_next)
92         (iter_match_first_hashed, iter_match_next_hashed)
93         (iter_match_first_linear, iter_match_next_linear): Adjust to work
94         with a lookup_name_info.
95         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
96         Likewise.
97         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
98         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
99         (gdb_index_symbol_name_matcher): New class.
100         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
101         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
102         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
103         with a symbol_name_match_type.
104         (f_language_defn): Adjust comments to refer to
105         la_get_symbol_name_matcher.
106         * go-lang.c (go_language_defn): Adjust comments to refer to
107         la_get_symbol_name_matcher.
108         * language.c (default_symbol_name_matcher)
109         (language_get_symbol_name_matcher): New functions.
110         (unknown_language_defn, auto_language_defn): Adjust comments to
111         refer to la_get_symbol_name_matcher.
112         * language.h (symbol_name_cmp_ftype): Delete.
113         (language_defn) <la_collect_symbol_completion_matches>: Add match
114         type parameter.
115         <la_get_symbol_name_cmp>: Delete field.
116         <la_get_symbol_name_matcher>: New field.
117         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
118         (default_symbol_name_matcher, language_get_symbol_name_matcher):
119         Declare.
120         * linespec.c (iterate_over_all_matching_symtabs)
121         (iterate_over_file_blocks): Adjust to use lookup_name_info.
122         (find_methods): Add language parameter, and use lookup_name_info
123         and the language's symbol_name_matcher_ftype.
124         (linespec_complete_function): Adjust.
125         (lookup_prefix_sym): Use lookup_name_info.
126         (add_all_symbol_names_from_pspace): Adjust.
127         (find_superclass_methods): Add language parameter and pass it
128         down.
129         (find_method): Pass symbol language down.
130         (find_linespec_symbols): Don't demangle or Ada encode here.
131         (search_minsyms_for_name): Add lookup_name_info parameter.
132         (add_matching_symbols_to_info): Add name_match_type parameter.
133         Use lookup_name_info.
134         * m2-lang.c (m2_language_defn): Adjust comments to refer to
135         la_get_symbol_name_matcher.
136         * minsyms.c: Include <algorithm>.
137         (add_minsym_to_demangled_hash_table): Remove table parameter and
138         add objfile parameter.  Use search_name_hash, and add language to
139         demangled languages vector.
140         (struct found_minimal_symbols): New struct.
141         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
142         New functions.
143         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
144         input names here.  Use lookup_name_info instead.  Lookup up
145         demangled names once for each language in the demangled names
146         vector.
147         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
148         demangled names once for each language in the demangled names
149         vector.
150         (build_minimal_symbol_hash_tables): Adjust.
151         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
152         lookup_name_info.
153         * objc-lang.c (objc_language_defn): Adjust comment to refer to
154         la_get_symbol_name_matcher.
155         * objfiles.h: Include <vector>.
156         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
157         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
158         la_get_symbol_name_matcher.
159         * p-lang.c (pascal_language_defn): Adjust comment to refer to
160         la_get_symbol_name_matcher.
161         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
162         (match_partial_symbol): Use symbol_name_match_type,
163         lookup_name_info and psymbol_name_matches.
164         (lookup_partial_symbol): Use lookup_name_info.
165         (map_block): Use symbol_name_match_type and lookup_name_info.
166         (psym_map_matching_symbols): Use symbol_name_match_type.
167         (psymbol_name_matches): New.
168         (recursively_search_psymtabs): Use lookup_name_info and
169         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
170         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
171         'kind' parameter to 'domain'.
172         * rust-lang.c (rust_language_defn): Adjust comment to refer to
173         la_get_symbol_name_matcher.
174         * symfile-debug.c (debug_qf_map_matching_symbols)
175         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
176         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
177         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
178         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
179         Adjust to use symbol_name_match_type.
180         <expand_symtabs_matching>: Adjust to use lookup_name_info.
181         (expand_symtabs_matching): Adjust to use lookup_name_info.
182         * symmisc.c (maintenance_expand_symtabs): Use
183         lookup_name_info::match_any ().
184         * symtab.c (symbol_matches_search_name): New.
185         (eq_symbol_entry): Adjust to use lookup_name_info and the
186         language's matcher.
187         (demangle_for_lookup_info::demangle_for_lookup_info): New.
188         (lookup_name_info::match_any): New.
189         (iterate_over_symbols, search_symbols): Use lookup_name_info.
190         (compare_symbol_name): Add language, lookup_name_info and
191         completion_match_result parameters, and use them.
192         (completion_list_add_name): Make extern.  Add language and
193         lookup_name_info parameters.  Use them.
194         (completion_list_add_symbol, completion_list_add_msymbol)
195         (completion_list_objc_symbol): Add lookup_name_info parameters and
196         adjust.  Pass down language.
197         (completion_list_add_fields): Add lookup_name_info parameters and
198         adjust.  Pass down language.
199         (add_symtab_completions): Add lookup_name_info parameters and
200         adjust.
201         (default_collect_symbol_completion_matches_break_on): Add
202         name_match_type parameter, and use it.  Use lookup_name_info.
203         (default_collect_symbol_completion_matches)
204         (collect_symbol_completion_matches): Add name_match_type
205         parameter, and pass it down.
206         (collect_symbol_completion_matches_type): Adjust.
207         (collect_file_symbol_completion_matches): Add name_match_type
208         parameter, and use lookup_name_info.
209         * symtab.h: Include <string> and "common/gdb_optional.h".
210         (enum class symbol_name_match_type): New.
211         (class ada_lookup_name_info): New.
212         (struct demangle_for_lookup_info): New.
213         (class lookup_name_info): New.
214         (symbol_name_matcher_ftype): New.
215         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
216         (symbol_matches_search_name): Declare.
217         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
218         (default_collect_symbol_completion_matches)
219         (collect_symbol_completion_matches)
220         (collect_file_symbol_completion_matches): Add name_match_type
221         parameter.
222         (iterate_over_symbols): Use lookup_name_info.
223         (completion_list_add_name): Declare.
224         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
225         (strncmp_iw_with_mode): Now extern.
226         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
227         (strncmp_iw_with_mode): Declare.
228
229 2017-11-08  Keith Seitz  <keiths@redhat.com>
230             Pedro Alves  <palves@redhat.com>
231
232         * ada-lang.c (ada_language_defn): Install
233         default_search_name_hash.
234         * buildsym.c (struct buildsym_compunit): <language>: New field.
235         (finish_block_internal): Pass language when creating dictionaries.
236         (start_buildsym_compunit, start_symtab): New language parameters.
237         Use them.
238         (restart_symtab): Pass down compilation unit's language.
239         * buildsym.h (enum language): Forward declare.
240         (start_symtab): New 'language' parameter.
241         * c-lang.c (c_language_defn, cplus_language_defn)
242         (asm_language_defn, minimal_language_defn): Install
243         default_search_name_hash.
244         * coffread.c (coff_start_symtab): Adjust.
245         * d-lang.c (d_language_defn): Install default_search_name_hash.
246         * dbxread.c (struct symloc): Add 'pst_language' field.
247         (PST_LANGUAGE): Define.
248         (start_psymtab, read_ofile_symtab): Use it.
249         (process_one_symbol): New 'language' parameter.  Pass it down.
250         * dictionary.c (struct dictionary) <language>: New field.
251         (DICT_LANGUAGE): Define.
252         (dict_create_hashed, dict_create_hashed_expandable)
253         (dict_create_linear, dict_create_linear_expandable): New parameter
254         'language'.  Set the dictionary's language.
255         (iter_match_first_hashed): Adjust to rename.
256         (insert_symbol_hashed): Assert we don't see mismatching
257         languages.  Adjust to rename.
258         (dict_hash): Rename to ...
259         (default_search_name_hash): ... this and make extern.
260         * dictionary.h (struct language_defn): Forward declare.
261         (dict_create_hashed): New parameter 'language'.
262         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
263         * f-lang.c (f_language_defn): Install default_search_name_hash.
264         * go-lang.c (go_language_defn): Install default_search_name_hash.
265         * jit.c (finalize_symtab): Pass compunit's language to dictionary
266         creation.
267         * language.c (unknown_language_defn, auto_language_defn):
268         * language.h (language_defn::la_search_name_hash): New field.
269         (default_search_name_hash): Declare.
270         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
271         * mdebugread.c (new_block): New parameter 'language'.
272         * mdebugread.c (parse_symbol): Pass symbol language to block
273         allocation.
274         (psymtab_to_symtab_1): Pass down language.
275         (new_symtab): Pass compunit's language to block allocation.
276         * objc-lang.c (objc_language_defn): Install
277         default_search_name_hash.
278         * opencl-lang.c (opencl_language_defn):
279         * p-lang.c (pascal_language_defn): Install
280         default_search_name_hash.
281         * rust-lang.c (rust_language_defn): Install
282         default_search_name_hash.
283         * stabsread.h (enum language): Forward declare.
284         (process_one_symbol): Add 'language' parameter.
285         * symtab.c (search_name_hash): New function.
286         * symtab.h (search_name_hash): Declare.
287         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
288
289 2017-11-08  Pedro Alves  <palves@redhat.com>
290
291         * cp-name-parser.y (main): Don't initialize extra_chars.
292
293 2017-11-07  Tom Tromey  <tom@tromey.com>
294
295         * event-top.h (command_handler): Constify.
296         * record-full.c (cmd_record_full_start): Update.
297         * thread.c (thread_apply_all_command): Update.
298         * printcmd.c (eval_command): Update.
299         * mi/mi-main.c (mi_execute_cli_command): Update.
300         (mi_execute_async_cli_command): Update.
301         * tui/tui-stack.c (tui_update_command): Update.
302         * cli/cli-interp.c (safe_execute_command): Constify.
303         * record.c (record_start): Update.
304         (record_start, record_stop, cmd_record_start): Update.
305         * record-btrace.c (cmd_record_btrace_bts_start): Update.
306         (cmd_record_btrace_pt_start): Update.
307         (cmd_record_btrace_start): Update.
308         (cmd_record_btrace_start): Update.
309         * reverse.c (exec_reverse_once): Update.
310         * python/python.c (execute_gdb_command): Don't copy the command.
311         * event-top.c (command_line_handler): Update.
312         (command_handler): Constify.
313         * defs.h (deprecated_call_command_hook): Constify.
314         * cli/cli-script.h (execute_user_command): Constify.
315         * cli/cli-script.c (execute_user_command): Constify.
316         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
317         (enum command_control_type): Update.
318         * main.c (catch_command_errors): Remove non-const overload.
319         (catch_command_errors_ftype): Remove.
320         * python/py-cmd.c (cmdpy_function): Constify.
321         * guile/scm-cmd.c (cmdscm_function): Constify.
322         * cli/cli-dump.c (call_dump_func): Constify.
323         * cli/cli-decode.c (do_const_cfunc): Constify.
324         (do_sfunc): Constify.
325         (cmd_func): Constify.
326         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
327         * top.h (execute_command): Constify.
328         * top.c (execute_command): Constify.
329         (execute_command_to_string): Constify.
330         (deprecated_call_command_hook): Constify.
331         * command.h (cmd_func): Constify.
332         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
333
334 2017-11-07  Tom Tromey  <tom@tromey.com>
335
336         * ada-lang.c (catch_ada_exception_command): Constify.
337         (catch_assert_command): Constify.
338         * break-catch-throw.c (catch_catch_command, catch_throw_command)
339         (catch_rethrow_command): Constify.
340         (catch_exception_command_1): Constify.
341         * breakpoint.h (add_catch_command): Constify.
342         * break-catch-syscall.c (catch_syscall_command_1): Constify.
343         (catch_syscall_split_args): Constify.
344         * break-catch-sig.c (catch_signal_command): Constify.
345         (catch_signal_split_args): Constify.
346         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
347         cmd_const_sfunc_ftype.
348         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
349         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
350         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
351         (add_setshow_string_cmd, struct cmd_list_element)
352         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
353         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
354         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
355         Constify.
356         (set_cmd_sfunc): Constify.
357         (empty_sfunc): Constify.
358         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
359         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
360         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
361         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
362         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
363         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
364         Constify.
365         (set_cmd_sfunc): Constify.
366         (cmd_sfunc_ftype): Remove.
367         * compile/compile.c (set_compile_args): Constify.
368         * infrun.c (set_disable_randomization): Constify.
369         * infcmd.c (set_args_command, set_cwd_command): Constify.
370         * breakpoint.c (set_condition_evaluation_mode): Constify.
371         (add_catch_command): Constify.
372         (catch_fork_command_1, catch_exec_command_1)
373         (catch_load_command_1, catch_unload_command_1): Constify.
374         (catch_load_or_unload): Constify.
375         * guile/scm-param.c (pascm_set_func): Constify.
376         (add_setshow_generic): Constify.
377         * python/py-param.c (get_set_value): Constify.
378         * top.h (set_verbose): Constify.
379         * tui/tui-win.c (tui_set_var_cmd): Constify.
380         * mi/mi-main.c (set_mi_async_command): Constify.
381         * cli/cli-logging.c (set_logging_overwrite)
382         (set_logging_redirect): Constify.
383         * value.c (set_max_value_size): Constify.
384         * valprint.c (set_input_radix, set_output_radix): Constify.
385         * utils.c (set_width_command, set_height_command): Constify.
386         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
387         * tracepoint.c (set_disconnected_tracing)
388         (set_circular_trace_buffer, set_trace_buffer_size)
389         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
390         * top.c (set_history_size_command, set_verbose, set_editing)
391         (set_gdb_datadir, set_history_filename): Constify.
392         * target.c (set_targetdebug, maint_set_target_async_command)
393         (maint_set_target_non_stop_command, set_target_permissions)
394         (set_write_memory_permission): Constify.
395         (open_target): Constify.
396         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
397         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
398         * symtab.c (set_symbol_cache_size_handler): Constify.
399         * symfile.c (set_ext_lang_command): Constify.
400         * symfile-debug.c (set_debug_symfile): Constify.
401         * source.c (set_directories_command): Constify.
402         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
403         * serial.c (set_parity): Constify.
404         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
405         * remote.c (set_remote_exec_file, set_remotebreak)
406         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
407         * record.c (set_record_insn_history_size)
408         (set_record_call_history_size): Constify.
409         * record-full.c (set_record_full_insn_max_num): Constify.
410         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
411         * osabi.c (set_osabi): Constify.
412         * mips-tdep.c (set_mips64_transfers_32bit_regs)
413         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
414         * maint.c (maintenance_set_profile_cmd): Constify.
415         * linux-thread-db.c (set_libthread_db_search_path): Constify.
416         * language.c (set_language_command, set_range_command)
417         (set_case_command): Constify.
418         * infrun.c (set_non_stop, set_observer_mode)
419         (set_stop_on_solib_events, set_schedlock_func)
420         (set_exec_direction_func): Constify.
421         * infcmd.c (set_inferior_tty_command): Constify.
422         * disasm.c (set_disassembler_options_sfunc): Constify.
423         * demangle.c (set_demangling_command): Constify.
424         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
425         * cris-tdep.c (set_cris_version, set_cris_mode)
426         (set_cris_dwarf2_cfi): Constify.
427         * corefile.c (set_gnutarget_command): Constify.
428         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
429         (set_target_wide_charset_sfunc): Constify.
430         * breakpoint.c (update_dprintf_commands): Constify.
431         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
432         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
433         (set_disassembly_style_sfunc): Constify.
434         * arch-utils.c (set_endian, set_architecture): Constify.
435         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
436         * agent.c (set_can_use_agent): Constify.
437
438 2017-11-07  Tom Tromey  <tom@tromey.com>
439
440         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
441         (go32_pde, go32_pte, go32_pte_for_address): Constify.
442         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
443         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
444         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
445         (parse_int_arg, show_thread_default_detach_sc_cmd)
446         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
447         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
448         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
449         (show_task_pause_cmd, set_task_detach_sc_cmd)
450         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
451         (set_noninvasive_cmd, set_thread_pause_cmd)
452         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
453         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
454         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
455         * windows-nat.c (display_selectors): Constify.
456         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
457         non-const "cfunc".
458         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
459         (cmd_cfunc_eq): Likewise.
460         (struct cmd_list_element): Likewise.
461         (do_cfunc): Remove.
462         (cli_user_command_p): Update.
463         * command.h (add_cmd): Remove non-const overload.
464         (cmd_cfunc_ftype): Remove typedef.
465         (cmd_cfunc_eq): Remove non-const overload.
466         * value.c (show_values): Constify.
467         * thread.c (thread_apply_all_command): Constify.
468         * symfile.c (load_command): Constify.
469         * source.c (directory_command): Constify.
470         * maint.c (maintenance_internal_error)
471         (maintenance_demangler_warning, maintenance_space_display)
472         (maintenance_print_architecture, maintenance_translate_address)
473         (maintenance_info_selftests, maintenance_internal_warning):
474         Constify.
475         * breakpoint.c (disable_trace_command, enable_trace_command):
476         Constify.
477         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
478         Constify.
479         (add_auto_load_safe_path): Constify.
480         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
481         * top.h (show_commands): Constify.
482         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
483         * sparc64-tdep.c (adi_examine_command): Constify.
484         (adi_assign_command): Constify.
485
486 2017-11-07  Tom Tromey  <tom@tromey.com>
487
488         * frame.h (info_locals_command, info_args_command): Constify.
489         * auto-load.h (auto_load_info_scripts): Constify.
490         * inferior.h (registers_info): Constify.
491         * copying.c: Rebuild.
492         * copying.awk: Constify generated commands.
493         * auto-load.c (auto_load_info_scripts)
494         (info_auto_load_gdb_scripts): Constify.
495         * cli/cli-decode.c (struct cmd_list_element): Take a
496         cmd_const_cfunc_ftype.
497         * command.h (add_info): Take a cmd_const_cfunc_ftype.
498         * tui/tui-win.c (tui_all_windows_info): Constify.
499         * python/py-auto-load.c (info_auto_load_python_scripts):
500         Constify.
501         * cli/cli-cmds.c (show_command): Remove non-const overload.
502         * tracepoint.c (info_tvariables_command, info_scope_command):
503         Constify.
504         (info_static_tracepoint_markers_command): Constify.
505         * thread.c (info_threads_command): Constify.
506         (print_thread_info_1): Constify.
507         * target.c (info_target_command): Constify.
508         * symtab.c (info_sources_command, info_functions_command)
509         (info_types_command): Constify.
510         (info_variables_command): Remove non-const overload.
511         * symfile.c (info_ext_lang_command): Constify.
512         * stack.c (info_frame_command, info_locals_command)
513         (info_args_command): Constify.
514         (backtrace_command): Remove non-const overload.
515         * source.c (info_source_command, info_line_command): Constify.
516         * solib.c (info_sharedlibrary_command): Constify.
517         * skip.c (info_skip_command): Constify.
518         * ser-go32.c (info_serial_command): Constify.
519         * reverse.c (info_bookmarks_command): Constify.
520         * printcmd.c (info_symbol_command, info_address_command)
521         (info_display_command): Constify.
522         * osdata.c (info_osdata_command): Constify.
523         * objc-lang.c (info_selectors_command, info_classes_command):
524         Constify.
525         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
526         * memattr.c (info_mem_command): Constify.
527         * macrocmd.c (info_macro_command, info_macros_command): Constify.
528         * linux-fork.c (info_checkpoints_command): Constify.
529         * infrun.c (info_signals_command): Constify.
530         * inflow.c (info_terminal_command): Constify.
531         * inferior.c (info_inferiors_command): Constify.
532         (print_inferior): Constify.
533         * infcmd.c (info_program_command, info_all_registers_command)
534         (info_registers_command, info_vector_command)
535         (info_float_command): Constify.
536         (registers_info): Constify.
537         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
538         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
539         Constify.
540         * f-valprint.c (info_common_command): Constify.
541         * dcache.c (info_dcache_command): Constify.
542         (dcache_info_1): Constify.
543         * darwin-nat-info.c (info_mach_tasks_command)
544         (info_mach_task_command, info_mach_ports_command)
545         (info_mach_port_command, info_mach_threads_command)
546         (info_mach_thread_command, info_mach_regions_command)
547         (info_mach_regions_recurse_command, info_mach_region_command)
548         (info_mach_exceptions_command): Constify.
549         (get_task_from_args): Constify.
550         * cp-support.c (info_vtbl_command): Constify.
551         * breakpoint.c (info_watchpoints_command)
552         (info_tracepoints_command): Constify.
553         (info_breakpoints_command): Remove non-const overload.
554         * avr-tdep.c (avr_io_reg_read_command): Constify.
555         * auxv.c (info_auxv_command): Constify.
556         * ada-tasks.c (info_tasks_command): Constify.
557         (info_task): Constify.
558         * ada-lang.c (info_exceptions_command): Constify.
559
560 2017-11-07  Tom Tromey  <tom@tromey.com>
561
562         * solib.h (no_shared_libraries): Constify.
563         * frame.h (return_command): Constify.
564         * cli/cli-cmds.h (quit_command): Constify.
565         * top.h (quit_command, execute_command): Constify.
566         * target.h (flash_erase_command): Constify.
567         * inferior.h (set_inferior_args, attach_command): Constify.
568         * tracepoint.h (start_tracing, stop_tracing): Constify.
569         * breakpoint.h (break_command, tbreak_command)
570         (hbreak_command_wrapper, thbreak_command_wrapper)
571         (rbreak_command_wrapper, watch_command_wrapper)
572         (awatch_command_wrapper, rwatch_command_wrapper)
573         (get_tracepoint_by_number): Constify.
574         * symtab.c (info_variables_command, rbreak_command)
575         (symtab_symbol_info): Constify.
576         (info_variables_command): Add non-const overload.
577         * top.c (dont_repeat_command): Constify.
578         * breakpoint.c (ignore_command, commands_command)
579         (condition_command, tbreak_command, hbreak_command)
580         (thbreak_command, clear_command, break_command)
581         (info_breakpoints_command, watch_command, rwatch_command)
582         (awatch_command, trace_command, ftrace_command, strace_command)
583         (trace_pass_command, break_range_command, dprintf_command)
584         (agent_printf_command, get_tracepoint_by_number)
585         (watch_maybe_just_location, trace_pass_command): Constify.
586         (info_breakpoints_command): Add non-const overload.
587         * tracefile.c (tsave_command): Constify.
588         * infcmd.c (attach_command, disconnect_command, signal_command)
589         (queue_signal_command, stepi_command, nexti_command)
590         (finish_command, next_command, step_command, until_command)
591         (advance_command, jump_command, continue_command, run_command)
592         (start_command, starti_command, interrupt_command)
593         (run_command_1, set_inferior_args, step_1): Constify.
594         * inferior.c (add_inferior_command, remove_inferior_command)
595         (clone_inferior_command): Constify.
596         * linux-fork.c (checkpoint_command, restart_command): Constify.
597         * windows-nat.c (signal_event_command): Constify.
598         * guile/guile.c (guile_repl_command, guile_command): Constify.
599         * printcmd.c (x_command, display_command, printf_command)
600         (output_command, set_command, call_command, print_command)
601         (eval_command): Constify.
602         (non_const_set_command): Remove.
603         (_initialize_printcmd): Update.
604         * source.c (forward_search_command, reverse_search_command):
605         Constify.
606         * jit.c (jit_reader_load_command, jit_reader_unload_command):
607         Constify.
608         * infrun.c (handle_command): Constify.
609         * memattr.c (mem_command): Constify.
610         * stack.c (return_command, up_command, up_silently_command)
611         (down_command, down_silently_command, frame_command)
612         (backtrace_command, func_command, backtrace_command_1): Constify.
613         (backtrace_command): Add non-const overload.
614         * remote-sim.c (simulator_command): Constify.
615         * exec.c (set_section_command): Constify.
616         * tracepoint.c (tdump_command, trace_variable_command)
617         (tstatus_command, tstop_command, tstart_command)
618         (end_actions_pseudocommand, while_stepping_pseudocommand)
619         (collect_pseudocommand, teval_pseudocommand, actions_command)
620         (start_tracing, stop_tracing): Constify.
621         * value.c (init_if_undefined_command): Constify.
622         * tui/tui-stack.c (tui_update_command): Constify.
623         * tui/tui-win.c (tui_refresh_all_command)
624         (tui_set_tab_width_command, tui_set_win_height_command)
625         (tui_set_focus_command, tui_scroll_forward_command)
626         (tui_scroll_backward_command, tui_scroll_left_command)
627         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
628         (tui_set_win_height): Constify.
629         * tui/tui-layout.c (tui_layout_command): Constify.
630         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
631         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
632         (proc_untrace_sysexit_cmd): Constify.
633         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
634         (threadset_test_cmd, threadlist_update_test_cmd)
635         (threadalive_test): Constify.
636         * objc-lang.c (print_object_command): Constify.
637         * command.h (add_com): Constify.
638         * cli/cli-dump.c (restore_command): Constify.
639         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
640         (help_command, complete_command, shell_command, edit_command)
641         (list_command, disassemble_command, make_command)
642         (apropos_command, alias_command): Constify.
643         * cli/cli-script.c (document_command, define_command)
644         (while_command, if_command, validate_comname): Constify.
645         * cli/cli-decode.c (struct cmd_list_element): Change type of
646         "fun".
647         * target.c (do_monitor_command, flash_erase_command): Constify.
648         * regcache.c (reg_flush_command): Constify.
649         * reverse.c (reverse_step, reverse_next, reverse_stepi)
650         (reverse_nexti, reverse_continue, reverse_finish)
651         (save_bookmark_command, goto_bookmark_command)
652         (exec_reverse_once): Constify.
653         * python/python.c (python_interactive_command, python_command):
654         Constify.
655         * typeprint.c (ptype_command, whatis_command, whatis_exp):
656         Constify.
657         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
658         * gcore.c (gcore_command): Constify.
659
660 2017-11-07  Tom Tromey  <tom@tromey.com>
661
662         * printcmd.c (x_command): Call set_repeat_arguments.
663         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
664         * top.c (repeat_arguments): New global.
665         (set_repeat_arguments): New function.
666         (execute_command): Handle repeat_arguments.
667         (show_commands): Calls set_repeat_arguments.
668         * command.h (set_repeat_arguments): Declare.
669
670 2017-11-07  Tom Tromey  <tom@tromey.com>
671
672         * stack.c (backtrace_command): Use std::string.
673         (backtrace_command_1): Make "count_exp" const.
674
675 2017-11-07  Tom Tromey  <tom@tromey.com>
676
677         * source.c (directory_switch, mod_path, add_path): Constify.
678         * defs.h (add_path, mod_path, directory_switch): Constify.
679         * mi/mi-cmd-env.c (env_mod_path): Constify.
680
681 2017-11-07  Tom Tromey  <tom@tromey.com>
682
683         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
684         (run_command_1, continue_command, step_1, jump_command)
685         (signal_command, until_command, advance_command, finish_command)
686         (attach_command): Update.
687
688 2017-11-07  Tom Tromey  <tom@tromey.com>
689
690         * command.h (set_cmd_cfunc): Don't declare.
691         * cli/cli-decode.c (set_cmd_cfunc): Now static.
692
693 2017-11-07  Tom Tromey  <tom@tromey.com>
694
695         * stack.c (select_frame_command): Constify.
696         * cli/cli-decode.c (add_com_suppress_notification): Constify.
697         * command.h (add_com_suppress_notification): Constify.
698
699 2017-11-07  Tom Tromey  <tom@tromey.com>
700
701         * breakpoint.c (stop_command): Constify.
702         * cli/cli-decode.c (struct cmd_list_element): Constify.
703         * command.h (add_abbrev_prefix_cmd): Constify.
704
705 2017-11-07  Pedro Alves  <palves@redhat.com>
706
707         * breakpoint.c (extract_bp_kind): New enum.
708         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
709         factored out from ...
710         (extract_bp_number_and_location): ... here.
711         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
712
713 2017-11-07  Pedro Alves  <palves@redhat.com>
714
715         * breakpoint.c (extract_bp_number_and_location): Change return
716         type to void.  Throw error instead of warning.
717         (enable_disable_command): Adjust.
718
719 2017-11-07  Xavier Roirand  <roirand@adacore.com>
720             Pedro Alves  <palves@redhat.com>
721
722         * breakpoint.c (map_breakpoint_number_range): New, factored out
723         from ...
724         (map_breakpoint_numbers): ... here.
725         (find_location_by_number): Change parameters from string to
726         breakpoint number and location.
727         (extract_bp_number_and_location): New function.
728         (enable_disable_bp_num_loc)
729         (enable_disable_breakpoint_location_range)
730         (enable_disable_command): New functions, factored out ...
731         (enable_command, disable_command): ... these functions, and
732         adjusted to support ranges.
733         * NEWS: Document enable/disable breakpoint location range feature.
734
735 2017-11-06  Luis Machado  <luis.machado@linaro.org>
736
737         * MAINTAINERS (Write After Approval): Update my e-mail address.
738
739 2017-11-06  Pedro Alves  <palves@redhat.com>
740
741         * gnu-nat.c (gnu_terminal_init): Delete.
742         (gnu_target): Don't install gnu_terminal_init.
743         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
744         (child_terminal_init): ... this function.
745
746 2017-11-06  Pedro Alves  <palves@redhat.com>
747
748         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
749         sgtty.h.
750         * config.in, configure: Regenerate.
751
752 2017-11-06  Pedro Alves  <palves@redhat.com>
753
754         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
755         (async_init_signals): Adjust.
756         (handle_stop_sig): Rename to ...
757         (handle_sigtstp): ... this.
758         (async_stop_sig): Rename to ...
759         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
760         SIGTSTP path.
761         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
762         instead of STOP_SIGNAL thoughout.
763         (handle_stop_sig): Rename to ...
764         (handle_sigtstp): ... this.
765         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
766
767 2017-11-06  Pedro Alves  <palves@redhat.com>
768
769         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
770         longer set flags twice in row.
771
772 2017-11-06  Pedro Alves  <palves@redhat.com>
773
774         * Makefile.in (SER_HARDWIRE): Update comment.
775         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
776         * common/gdb_termios.h: Delete file.
777         * common/job-control.c: Include termios.h and unistd.h instead of
778         gdb_termios.h.
779         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
780         check.
781         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
782         Remove sgtty code.
783         * configure.ac: No longer check for termio.h and sgtty.h.
784         * configure: Regenerate.
785         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
786         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
787         Replace PROCESS_GROUP_TYPE references with pid_t references
788         throughout.
789         (gdb_getpgrp): Delete.
790         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
791         (child_terminal_inferior): Remove comment.  Remove sgtty code.
792         (child_terminal_ours_1): Use tcgetpgrp directly instead of
793         gdb_getpgrp.  Use serial_set_tty_state instead aof
794         serial_noflush_set_tty_state.  Remove sgtty code.
795         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
796         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
797         (inferior_process_group): Now returns pid_t.
798         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
799         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
800         * ser-event.c (serial_event_ops): Update.
801         * ser-go32.c (dos_noflush_set_tty_state): Delete.
802         (dos_ops): Update.
803         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
804         * ser-pipe.c (pipe_ops): Update.
805         * ser-tcp.c (tcp_ops): Update.
806         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
807         HAVE_TERMIOS checks.
808         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
809         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
810         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
811         assume termios.
812         (hardwire_noflush_set_tty_state): Delete.
813         (hardwire_print_tty_state, hardwire_drain_output)
814         (hardwire_flush_output, hardwire_flush_input)
815         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
816         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
817         code, and assume termios.
818         (hardwire_ops): Update.
819         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
820         * serial.c (serial_noflush_set_tty_state): Delete.
821         * serial.h (serial_noflush_set_tty_state): Delete.
822         (serial_ops::noflush_set_tty_state): Delete.
823
824 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
825
826         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
827         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
828         (COMMON_OBS): Remove doublest.o and dfp.o.
829         Do not build target-float.c (instead of doublest.c)
830         with -Wformat-nonliteral.
831
832         * doublest.c: Remove file.
833         * doublest.h: Remove file.
834         * dfp.c: Remove file.
835         * dfp.h: Remove file.
836
837         * target-float.c: Do not include "doublest.h" and "dfp.h".
838         (DOUBLEST): Move here from doublest.h.
839         (enum float_kind): Likewise.
840         (FLOATFORMAT_CHAR_BIT): Likewise.
841         (FLOATFORMAT_LARGEST_BYTES): Likewise.
842         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
843         (floatformat_precision): Likewise.
844         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
845         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
846         Likewise.
847         (host_float_format, host_double_format, host_long_double_format):
848         Likewise.
849         (floatformat_to_string, floatformat_from_string): Likewise.
850         (floatformat_to_doublest): Likewise.  Also, inline the original
851         convert_floatformat_to_doublest.
852         (floatformat_from_doublest): Likewise.  Also, inline the original
853         convert_floatformat_from_doublest.
854
855         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
856         (MAX_DECIMAL_STRING): Move here from dfp.c.
857         (match_endianness): Likewise.
858         (set_decnumber_context, decimal_check_errors): Likewise.
859         (decimal_from_number, decimal_to_number): Likewise.
860         (decimal_to_string, decimal_from_string): Likewise.  Make static.
861         (decimal_from_longest, decimal_from_ulongest): Likewise.
862         (decimal_to_longest): Likewise.
863         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
864         (decimal_convert): Likewise.
865
866 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
867
868         * doublest.c: Do not include "gdbtypes.h".
869         (extract_typed_floating): Remove.
870         (store_typed_floating): Remove.
871         (convert_typed_floating): Remove.
872         * doublest.h (struct type): Remove.
873         (DOUBLEST_PRINT_FORMAT): Remove.
874         (DOUBLEST_SCAN_FORMAT): Remove.
875         (extract_typed_floating): Remove.
876         (store_typed_floating): Remove.
877         (convert_typed_floating): Remove.
878
879         * dfp.c (decimal_from_doublest): Remove.
880         (decimal_to_doublest): Remove.
881         * dfp.h: Do not include "doublest.h".
882         (decimal_from_doublest): Remove.
883         (decimal_to_doublest): Remove.
884
885         * value.c: Do not include "doublest.h" and "dfp.h".
886         (value_as_double): Remove.
887         (unpack_double): Remove.
888         (value_from_double): Remove.
889         (value_from_decfloat): Remove.
890         * value.h: Do not include "doublest.h".
891         (value_as_double): Remove.
892         (unpack_double): Remove.
893         (value_from_double): Remove.
894         (value_from_decfloat): Remove.
895
896 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
897
898         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
899         (i386_extract_return_value): Use target_float_convert.
900         (i386_store_return_value): Likewise.
901         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
902         (i387_value_to_register): Likewise.
903         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
904         (ia64_register_to_value): Use target_float_convert.
905         (ia64_value_to_register): Likewise.
906         (ia64_extract_return_value): Likewise.
907         (ia64_store_return_value): Likewise.
908         (ia64_push_dummy_call): Likewise.
909         * m68k-tdep.c: Include "target-float.h".
910         (m68k_register_to_value): Use target_float_convert.
911         (m68k_value_to_register): Likewise.
912         (m68k_svr4_extract_return_value): Likewise.
913         (m68k_svr4_store_return_value): Likewise.
914         * ppc-sysv-tdep.c: Include "target-float.h".
915         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
916         (do_ppc_sysv_return_value): Likewise.
917         (ppc64_sysv_abi_push_freg): Likewise.
918         (ppc64_sysv_abi_return_value_base): Likewise.
919         * rs6000-aix-tdep.c: Include "target-float.h".
920         (rs6000_push_dummy_call): Use target_float_convert.
921         (rs6000_return_value): Likewise.
922         * rs6000-lynx178-tdep.c: Include "target-float.h".
923         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
924         (rs6000_lynx178_return_value): Likewise.
925         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
926         (rs6000_register_to_value): Use target_float_convert.
927         (rs6000_value_to_register): Likewise.
928         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
929         (arm_extract_return_value): Use target_float_convert.
930         (arm_store_return_value): Likewise.
931         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
932         (sh_register_convert_to_virtual): Use target_float_convert.
933         (sh_register_convert_to_raw): Likewise.
934         * sh64-tdep.c: Include "target-float.h".
935         (sh64_extract_return_value): Use target_float_convert.
936         (sh64_register_convert_to_virtual): Likewise.
937         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
938
939 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
940
941         * target-float.c (floatformat_to_host_double): New function.
942         (floatformat_from_host_double): Likewise.
943         (target_float_to_host_double): Likewise.
944         (target_float_from_host_double): Likewise.
945         * target-float.h (target_float_to_host_double): Add prototype.
946         (target_float_from_host_double): Likewise.
947
948         * guile/scm-value.c: Include "target-float.h".
949         (gdbscm_value_to_real): Use target_float_to_host_double.
950         Handle integer source values via value_as_long.
951         * guile/scm-math.c: Include "target-float.h".  Do not include
952         "doublest.h", "dfp.h", and "expression.h".
953         (vlscm_convert_typed_number): Use target_float_from_host_double.
954         (vlscm_convert_number): Likewise.
955
956         * python/py-value.c (valpy_float): Use target_float_to_host_double.
957         (convert_value_from_python): Use target_float_from_host_double.
958
959 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
960
961         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
962         (cast_from_fixed): Likewise.
963         (ada_scaling_type): New function.
964         (ada_delta): Return value instead of DOUBLEST.  Perform target
965         arithmetic instead of host arithmetic.
966         (scaling_factor): Rename to ...
967         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
968         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
969         (ada_fixed_to_float): Remove.
970         (ada_float_to_fixed): Remove.
971         * ada-lang.h (ada_fixed_to_float): Remove.
972         (ada_float_to_fixed): Remove.
973         (ada_delta): Return value instead of DOUBLEST.
974         (ada_scaling_factor): Add prototype.
975
976         * ada-typeprint.c: Include "target-float.h".
977         (print_fixed_point_type): Perform target arithmetic instead of
978         host arithmetic.
979         * ada-valprint.c: Include "target-float.h".
980         (ada_val_print_num): Perform target arithmetic instead of
981         host arithmetic for fixed-point types.
982
983 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
984
985         * target-float.c: Include <math.h>.
986         (floatformat_binop): New function.
987         (floatformat_compare): Likewise.
988         (target_float_binop): Likewise.
989         (target_float_compare): Likewise.
990         * target-float.h: Include "expression.h".
991         (target_float_binop): Add prototype.
992         (target_float_compare): Likewise.
993
994         * valarith.c: Do not include "doublest.h" and "dfp.h".
995         Include "common/byte-vector.h".
996         (value_args_as_decimal): Remove, replace by ...
997         (value_args_as_target_float): ... this function.  Handle both
998         binary and decimal target floating-point formats.
999         (scalar_binop): Handle both binary and decimal FP using
1000         value_args_as_target_float and target_float_binop.
1001         (value_equal): Handle both binary and decimal FP using
1002         value_args_as_target_float and target_float_compare.
1003         (value_less): Likewise.
1004         (value_pos): Handle all scalar types as simple copy.
1005         (value_neg): Handle all scalar types via BINOP_SUB from 0.
1006         * dfp.c (decimal_binop): Throw error instead of internal_error
1007         when called with an unsupported operation code.
1008
1009 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1010
1011         * target-float.c (target_float_to_string): New function.
1012         (target_float_from_string): New function.
1013         * target-float.h (target_float_to_string): Add prototype.
1014         (target_float_from_string): Add prototype.
1015
1016         * valprint.c: Include "target-float.h".  Do not include
1017         "doublest.h" and "dfp.h".
1018         (print_floating): Use target_float_to_string.
1019         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
1020         (printf_floating): Use target_float_to_string.
1021         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1022         (print_i387_value): Use target_float_to_string.
1023         * mips-tdep.c: Include "target-float.h".
1024         (mips_print_fp_register): Use target_float_to_string.
1025         * sh64-tdep.c: Include "target-float.h".
1026         (sh64_do_fp_register): Use target_float_to_string.
1027
1028         * parse.c: Include "target-float.h".  Do not include
1029         "doublest.h" and "dfp.h".
1030         (parse_float): Use target_float_from_string.
1031         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
1032         (define_symbol): Use target_float_from_string.
1033         * gdbarch-selftests.c: Include "target-float.h".
1034         (register_to_value_test): Use target_float_from_string.
1035
1036 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1037
1038         * Makefile.c (SFILES): Add target-float.c.
1039         (HFILES_NO_SRCDIR): Add target-float.h.
1040         (COMMON_OBS): Add target-float.o.
1041         * target-float.h: New file.
1042         * target-float.c: New file.
1043
1044         * doublest.c (floatformat_classify): Fix detection of float_zero.
1045
1046         * gdbtypes.c (is_floating_type): New function.
1047         * gdbtypes.h (is_floating_type): Add prototype.
1048
1049         * value.c: Do not include "floatformat.h".
1050         (unpack_double): Use target_float_is_valid.
1051         (is_floating_value): New function.
1052         * value.h (is_floating_value): Add prototype-
1053
1054         * valarith.c: Include "target-float.h".
1055         (value_logical_not): Use target_float_is_zero.
1056
1057         * python/py-value.c: Include "target-float.h".
1058         (valpy_nonzero): Use target_float_is_zero.
1059
1060 2017-11-04  Tom Tromey  <tom@tromey.com>
1061
1062         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1063
1064 2017-11-04  Tom Tromey  <tom@tromey.com>
1065
1066         * breakpoint.c (set_momentary_breakpoint): Return
1067         breakpoint_up.
1068         (until_break_command): Update.
1069         (new_until_break_fsm): Change argument types to
1070         breakpoint_up.
1071         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1072         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1073         Remove.
1074         * infcmd.c (finish_forward): Update.
1075         * breakpoint.h (set_momentary_breakpoint)
1076         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1077         (make_cleanup_delete_breakpoint): Remove.
1078         (struct breakpoint_deleter): New.
1079         (breakpoint_up): New typedef.
1080         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1081         (insert_exception_resume_breakpoint): Update.
1082         (insert_exception_resume_from_probe): Update.
1083         (insert_longjmp_resume_breakpoint): Update.
1084         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1085         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1086         * infcall.c (call_function_by_hand_dummy): Update
1087
1088 2017-11-04  Tom Tromey  <tom@tromey.com>
1089
1090         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1091
1092 2017-11-04  Tom Tromey  <tom@tromey.com>
1093
1094         * linux-tdep.c (linux_core_info_proc_mappings): Use
1095         gdb::def_vector.
1096         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
1097         "size" argument.
1098         (linux_corefile_thread): Update.
1099         (linux_make_corefile_notes): Remove unused variable.
1100
1101 2017-11-04  Tom Tromey  <tom@tromey.com>
1102
1103         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1104         gdb::byte_vector.
1105
1106 2017-11-04  Tom Tromey  <tom@tromey.com>
1107
1108         * objfiles.c (do_free_objfile_cleanup): Remove.
1109         * compile/compile-object-load.c (compile_object_load): Update.
1110         * objfiles.h (make_cleanup_free_objfile): Remove.
1111
1112 2017-11-04  Tom Tromey  <tom@tromey.com>
1113
1114         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1115         (adi_read_versions): Change "tags" to "gdb_byte *".
1116         (adi_print_versions): Likewise.
1117
1118 2017-11-04  Tom Tromey  <tom@tromey.com>
1119
1120         * breakpoint.c
1121         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1122         from start_rbreak_breakpoints.
1123         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1124         * breakpoint.h (class scoped_rbreak_breakpoints): New.
1125         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1126         * symtab.c (do_end_rbreak_breakpoints): Remove.
1127         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1128
1129 2017-11-04  Tom Tromey  <tom@tromey.com>
1130
1131         * cp-namespace.c (reset_directive_searched): Remove.
1132         (cp_lookup_symbol_via_imports): Use scoped_restore.
1133         * cp-support.c (reset_directive_searched): Remove.
1134         (make_symbol_overload_list_using): Use scoped_restore.
1135         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1136         (reset_directive_searched): Remove.
1137
1138 2017-11-04  Tom Tromey  <tom@tromey.com>
1139
1140         * symfile.c (find_separate_debug_file_by_debuglink): Use
1141         unique_xmalloc_ptr.
1142
1143 2017-11-04  Tom Tromey  <tom@tromey.com>
1144
1145         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1146         type of "info".
1147         (compute_stack_depth): Likewise.
1148         (do_compile_dwarf_expr_to_c): Use std::vector.
1149
1150 2017-11-04  Tom Tromey  <tom@tromey.com>
1151
1152         * compile/compile-object-load.c (link_callbacks_einfo): Use
1153         std::string.
1154
1155 2017-11-04  Tom Tromey  <tom@tromey.com>
1156
1157         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1158         Use scoped_free_pendings.
1159         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1160         scoped_free_pendings.
1161         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1162         (xcoff_initial_scan): Likewise.
1163         * buildsym.c (reset_symtab_globals): Update comment.
1164         (scoped_free_pendings): Rename from really_free_pendings.
1165         (prepare_for_building): Update comment.
1166         (buildsym_init): Likewise.
1167         * buildsym.h (class scoped_free_pendings): New class.
1168         (really_free_pendings): Don't declare.
1169
1170 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
1171
1172         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1173         output when converting a zero value to a special byteorder format.
1174
1175 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1176
1177         * frame.c (do_frame_register_read): Remove aspace.
1178         * jit.c (jit_frame_sniffer): Likwise.
1179         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1180         * regcache.c (regcache::regcache): Pass nullptr.
1181         (regcache_print): Caller updated.
1182         * regcache.h (regcache::regcache): Remove one constructor
1183         parameter aspace.
1184
1185 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1186
1187         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1188
1189 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1190
1191         * breakpoint.c (insert_single_step_breakpoints): Update.
1192         * frame.c (struct frame_info) <aspace>: Add const.
1193         (frame_save_as_regcache): Add const.
1194         (get_frame_address_space): Return const address_space *.
1195         * frame.h (get_frame_address_space): Update declaration.
1196         * infrun.c (struct step_over_info) <aspace>: Add const.
1197         (set_step_over_info): Make aspace const.
1198         (displaced_step_prepare_throw): Change variable const.
1199         (resume): Likewise.
1200         (proceed): Likewise.
1201         (adjust_pc_after_break): Likewise.
1202         (save_waitstatus): Likewise.
1203         (handle_signal_stop): Likewise.
1204         (keep_going_pass_signal): Likewise.
1205         * jit.c (jit_frame_sniffer): Add const.
1206         * mips-tdep.c (mips_single_step_through_delay): Likewise.
1207         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1208         * record-full.c (record_full_wait_1): Likewise.
1209         * regcache.c (regcache::regcache): Change parameter to const.
1210         * regcache.h (regcache::regcache): Likewise.
1211         (regcache::aspace): Return const address_space *.
1212         (regcache) <m_aspace>: Add const.
1213
1214 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1215
1216         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1217         * frame.c (create_sentinel_frame): Likewise.
1218         * infrun.c (displaced_step_prepare_throw): Likewise.
1219         (resume): Likewise.
1220         (thread_still_needs_step_over_bp): Likewise.
1221         (proceed): Likewise.
1222         (do_target_wait): Likewise.
1223         (adjust_pc_after_break): Likewise.
1224         (handle_syscall_event): Likewise.
1225         (save_waitstatus): Likewise.
1226         (handle_inferior_event_1): Likewise.
1227         (handle_signal_stop): Likewise.
1228         (keep_going_pass_signal): Likewise.
1229         * linux-nat.c (status_callback): Likewise.
1230         (save_stop_reason): Likewise.
1231         (resume_stopped_resumed_lwps): Likewise.
1232         * record-full.c (record_full_exec_insn): Likewise.
1233         (record_full_wait_1): Likewise.
1234         * regcache.c (get_regcache_aspace): Remove.
1235         * regcache.h (get_regcache_aspace): Remove.
1236
1237 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1238
1239         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1240         (init_regcache_descr): Use gdbarch_num_regs.
1241         (regcache::regcache): Likewise.
1242         (regcache::get_register_status): Likewise.
1243         (regcache::assert_raw_regnum): Likewise.
1244         (regcache::cooked_read): Likewise.
1245         (regcache::cooked_read_value): Likewise.
1246         (regcache::cooked_write): Likewise.
1247         (regcache::dump): Likewise.
1248         (regcache::num_raw_registers): New method.
1249         * regcache.h (class regcache) <num_raw_registers>: New.
1250
1251 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1252
1253         * regcache.c (regcache::assert_regnum): New method.
1254         (regcache::invalidate): Call assert_regnum.
1255         (regcache::raw_update): Likewise.
1256         (regcache::raw_write): Likewise.
1257         (regcache::raw_read_part): Likewise.
1258         (regcache::raw_write_part): Likewise.
1259         (regcache::raw_supply): Likewise.
1260         (regcache::raw_supply_integer): Likewise.
1261         (regcache::raw_supply_zeroed): Likewise.
1262         (regcache::raw_collect): Likewise.
1263         (regcache::raw_collect_integer): Likewise.
1264         * regcache.h (regcache::assert_regnum): Declare.
1265
1266 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1267
1268         * regcache.c (regcache::dump): Remove code.
1269
1270 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1271
1272         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1273         Remove.
1274         <sizeof_cooked_register_status>: Remove.
1275         (init_regcache_descr): Update.
1276         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1277         (regcache::save): Likewise.
1278         (regcache::dump): Likewise.
1279
1280 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
1281
1282         * ft32-tdep.c (ft32_fetch_instruction): New function.
1283         (ft32_analyze_prologue): Use ft32_fetch_instruction().
1284
1285 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
1286
1287         * cli/cli-script.c (execute_control_command): Rename to ...
1288         (execute_control_command_1): ... this.
1289         (execute_control_command): New function.
1290
1291 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
1292
1293         * tracepoint.c (tfind_command): Remove const_cast.
1294
1295 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
1296
1297         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1298
1299 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
1300
1301         * common/common-utils.h (in_inclusive_range): New function.
1302         * arm-tdep.c (arm_record_extension_space): Use
1303         in_inclusive_range.
1304         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1305         * cris-tdep.c (cris_spec_reg_applicable): Use
1306         in_inclusive_range.
1307
1308 2017-10-30  Pedro Alves  <palves@redhat.com>
1309             Simon Marchi <simon.marchi@ericsson.com>
1310
1311         * remote.c (remote_set_syscall_catchpoint): Build a std::string
1312         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1313
1314 2017-10-30  Pedro Alves  <palves@redhat.com>
1315
1316         * common/common-utils.c (string_appendf, string_vappendf): New
1317         functions.
1318         * common/common-utils.h (string_appendf, string_vappendf): New
1319         declarations.
1320         * unittests/common-utils-selftests.c (string_appendf_func)
1321         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1322         (string_vappendf_tests): New functions.
1323         (_initialize_common_utils_selftests): Register "string_appendf" and
1324         "string_vappendf tests".
1325
1326 2017-10-30  Pedro Alves  <palves@redhat.com>
1327
1328         * unittests/common-utils-selftests.c (format_func): New typedef.
1329         (string_printf_tests, string_vprintf_tests): Tests factored out
1330         and merged to ...
1331         (test_format_func): ... this new function.
1332         (string_printf_tests, string_vprintf_tests): Reimplement on top of
1333         test_format_func.
1334
1335 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1336
1337         * darwin-nat.c: Remove include of gdb.h.
1338
1339 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1340
1341         * xtensa-xtregs.c: Fix formatting issues.
1342
1343 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1344
1345         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1346
1347 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
1348
1349         PR python/21213
1350         * python/py-infthread.c (thpy_get_inferior): Increment reference
1351         of inferior before returning it.
1352
1353 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1354
1355         * unittests/common-utils-selftests.c (format): Add
1356         ATTRIBUTE_PRINTF.
1357
1358 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1359
1360         * xml-syscall.c (struct syscall_desc): Add constructor.
1361         <name>: Change type to std::string.
1362         (syscall_desc_up): New typedef.
1363         (syscall_desc_p): Remove typeder.
1364         (DEF_VEC_P(syscall_desc_p)): Remove.
1365         (struct syscall_group_desc): Add constructor.
1366         <name>: Change type to std::string.
1367         <syscalls>: Change type to std::vector.
1368         (syscall_group_desc_up): New typedef.
1369         (syscall_group_desc_p): Remove typedef.
1370         (DEF_VEC_P(syscall_group_desc_p)): Remove.
1371         (struct syscalls_info) <syscalls>: Change type to std::vector of
1372         unique_ptr.
1373         <groups>: Likewise.
1374         <my_gdb_datadir>: Change type to std::string.
1375         (syscalls_info_up): New typedef.
1376         (allocate_syscalls_info): Remove.
1377         (syscalls_info_free_syscalls_desc): Remove.
1378         (syscalls_info_free_syscall_group_desc): Remove.
1379         (free_syscalls_info): Remove.
1380         (make_cleanup_free_syscalls_info): Remove.
1381         (syscall_group_create_syscall_group_desc): Adjust.
1382         (syscall_group_add_syscall): Adjust.
1383         (syscall_create_syscall_desc): Adjust.
1384         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1385         (init_syscalls_info): Adjust.
1386         (syscall_group_get_group_by_name): Adjust.
1387         (xml_get_syscall_number): Adjust.
1388         (xml_get_syscall_name): Adjust.
1389         (xml_list_of_syscalls): Adjust.
1390         (xml_list_syscalls_by_group): Adjust.
1391         (xml_list_of_groups): Adjust.
1392
1393 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1394
1395         * probe.h: Don't include gdb_vecs.h.
1396         (DEF_VEC_P (probe_p)): Remove.
1397         (find_probes_in_objfile): Return an std::vector.
1398         * probe.c (find_probes_in_objfile): Likewise.
1399         * breakpoint.c (breakpoint_objfile_data)
1400         <longjmp_probes>: Change type to std::vector.
1401         <exception_probes>: Likewise.
1402         (free_breakpoint_probes): Don't manually free vectors.
1403         (create_longjmp_master_breakpoint): Adjust.
1404         (create_exception_master_breakpoint): Adjust.
1405         * solib-svr4.c (svr4_create_probe_breakpoints): Change
1406         parameter type, adjust.
1407         (svr4_create_solib_event_breakpoints): Adjust.
1408
1409 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1410
1411         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1412         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1413         with new.
1414         (free_breakpoint_probes): Rename to ...
1415         (free_breakpoint_objfile_data): ... this, and call delete on
1416         bp_objfile_data..
1417
1418 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1419
1420         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1421         (loaded_script_ptr): Remove typedef.
1422         (DEF_VEC_P (loaded_script_ptr)): Remove.
1423         (struct collect_matching_scripts_data): Add constructor.
1424         <scripts_p>: Change type to (pointer to) std::vector.
1425         (collect_matching_scripts_data): Adjust.
1426         (sort_scripts_by_name): Make suitable for std::sort.
1427         (print_scripts): Don't sort vector, adjust to std::vector.
1428         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1429
1430 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1431
1432         * symfile.c (filename_language): Make struct, not typedef.  Add
1433         constructor.
1434         <ext>: Change type to std::string.
1435         (DEF_VEC_O (filename_language)): Remove.
1436         (filename_language_table): Change type to std::vector.
1437         (add_filename_language): Adjust.
1438         (set_ext_lang_command): Adjust.
1439         (info_ext_lang_command): Adjust.
1440         (deduce_language_from_filename): Adjust.
1441         (class scoped_restore_filename_language_table): Remove.
1442         (test_filename_language): Use scoped_restore.
1443         (test_set_ext_lang_command): Use scoped_restore, adjust to
1444         std::vector change.
1445
1446 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1447
1448         * symfile.c: Include selftest.h.
1449         (class scoped_restore_filename_language_table): New.
1450         (test_filename_language): New test.
1451         (test_set_ext_lang_command): New test.
1452         (_initialize_symfile): Register tests.
1453
1454 2017-10-27  Keith Seitz  <keiths@redhat.com>
1455
1456         * breakpoint.c (print_breakpoint_location): Use the symbol saved
1457         in the bp_location, falling back to find_pc_sect_function when
1458         needed.
1459         (add_location_to_breakpoint): Save sal->symbol.
1460         * breakpoint.h (struct bp_location) <symbol>: New field.
1461         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1462         * symtab.h (struct symtab_and_line) <symbol>: New field.
1463
1464 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
1465
1466         PR gdb/13669
1467         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1468         to rewind obstack.
1469
1470 2017-10-26  Pedro Alves  <palves@redhat.com>
1471
1472         * remote.c (remote_async_terminal_ours_p): Delete.
1473         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1474         Remove references to 'remote_async_terminal_ours_p'.
1475
1476 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1477
1478         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1479
1480 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1481
1482         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1483         aspace const.
1484         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1485         Likewise.
1486         * breakpoint.c (bpstat_check_location): Remove cast.
1487         (breakpoint_hit_catch_fork): Make aspce const.
1488         (breakpoint_hit_catch_solib): Likewise.
1489         (breakpoint_hit_catch_exec): Likewise.
1490         (breakpoint_hit_ranged_breakpoint): Likewise.
1491         (breakpoint_hit_watchpoint): Likewise.
1492         (base_breakpoint_breakpoint_hit): Likewise.
1493         (bkpt_breakpoint_hit): Likewise.
1494         (dprintf_breakpoint_hit): Likewise.
1495         (tracepoint_breakpoint_hit): Likewise.
1496         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1497
1498 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1499
1500         * breakpoint.c (breakpoint_location_address_match): Change
1501         "struct address_space *" to "const address_space".
1502         (breakpoint_location_address_range_overlap): Likewise.
1503         (breakpoint_here_p): Likewise.
1504         (breakpoint_in_range_p): Likewise.
1505         (moribund_breakpoint_here_p): Likewise.
1506         (bp_location_inserted_here_p): Likewise.
1507         (software_breakpoint_inserted_here_p): Likewise.
1508         (hardware_breakpoint_inserted_here_p): Likewise.
1509         (hardware_watchpoint_inserted_in_range): Likewise.
1510         (bpstat_check_location): Likewise.
1511         (bpstat_stop_status): Likewise.
1512         (breakpoint_address_match): Likewise.
1513         (breakpoint_address_match_range): Likewise.
1514         (breakpoint_location_address_match): Likewise.
1515         (breakpoint_location_address_range_overlap): Likewise.
1516         (insert_single_step_breakpoint): Likewise.
1517         (breakpoint_has_location_inserted_here): Likewise.
1518         (single_step_breakpoint_inserted_here_p): Likewise.
1519         (pc_at_non_inline_function): Likewise.
1520         * breakpoint.h (bpstat_stop_status): Update declaration.
1521         (breakpoint_here_p): Likewise.
1522         (breakpoint_in_range_p): Likewise.
1523         (moribund_breakpoint_here_p): Likewise.
1524         (breakpoint_inserted_here_p): Likewise.
1525         (software_breakpoint_inserted_here_p): Likewise.
1526         (hardware_breakpoint_inserted_here_p): Likewise.
1527         (breakpoint_has_location_inserted_here): Likewise.
1528         (single_step_breakpoint_inserted_here_p): Likewise.
1529         (hardware_watchpoint_inserted_in_range): Likewise.
1530         (breakpoint_address_match): Likewise.
1531         (insert_single_step_breakpoint): Likewise.
1532         (pc_at_non_inline_function): Likewise.
1533         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1534         * record.c (record_check_stopped_by_breakpoint): Likewise.
1535         * record.h (record_check_stopped_by_breakpoint): Likewise.
1536         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1537
1538 2017-10-25  Yao Qi  <yao.qi@linaro.org>
1539
1540         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1541         regcache->arch () instead get_regcache_arch.
1542         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1543         Likewise.
1544         (aarch64_fbsd_store_inferior_registers): Likewise.
1545         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1546         (store_gregs_to_thread): Likewise.
1547         (fetch_fpregs_from_thread): Likewise.
1548         (store_fpregs_to_thread): Likewise.
1549         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1550         (aarch64_store_return_value): Likewise.
1551         (aarch64_software_single_step): Likewise.
1552         * aix-thread.c (aix_thread_wait): Likewise.
1553         (supply_reg32): Likewise.
1554         (supply_sprs64): Likewise.
1555         (supply_sprs32): Likewise.
1556         (fill_gprs64): Likewise.
1557         (fill_gprs32): Likewise.
1558         (fill_sprs64): Likewise.
1559         (fill_sprs32): Likewise.
1560         (store_regs_user_thread): Likewise.
1561         (store_regs_kernel_thread): Likewise.
1562         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1563         (alphabsd_store_inferior_registers): Likewise.
1564         * alpha-tdep.c (alpha_extract_return_value): Likewise.
1565         (alpha_store_return_value): Likewise.
1566         (alpha_deal_with_atomic_sequence): Likewise.
1567         (alpha_next_pc): Likewise.
1568         (alpha_software_single_step): Likewise.
1569         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1570         (amd64bsd_store_inferior_registers): Likewise.
1571         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1572         Likewise.
1573         (amd64_linux_store_inferior_registers): Likewise.
1574         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1575         (amd64_collect_native_gregset): Likewise.
1576         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1577         (amd64obsd_collect_uthread): Likewise.
1578         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1579         (amd64_collect_fpregset): Likewise.
1580         (amd64_supply_fxsave): Likewise.
1581         (amd64_supply_xsave): Likewise.
1582         (amd64_collect_fxsave): Likewise.
1583         (amd64_collect_xsave): Likewise.
1584         * arc-tdep.c (arc_write_pc): Likewise.
1585         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1586         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1587         (arm_fbsd_store_inferior_registers): Likewise.
1588         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1589         (store_vfp_regs): Likewise.
1590         (arm_linux_fetch_inferior_registers): Likewise.
1591         (arm_linux_store_inferior_registers): Likewise.
1592         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1593         (arm_linux_sigreturn_next_pc): Likewise.
1594         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1595         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1596         (fetch_register): Likewise.
1597         (store_register): Likewise.
1598         * arm-tdep.c (arm_is_thumb): Likewise.
1599         (displaced_in_arm_mode): Likewise.
1600         (bx_write_pc): Likewise.
1601         (arm_get_next_pcs_addr_bits_remove): Likewise.
1602         (arm_software_single_step): Likewise.
1603         (arm_extract_return_value): Likewise.
1604         (arm_store_return_value): Likewise.
1605         (arm_write_pc): Likewise.
1606         * bfin-tdep.c (bfin_extract_return_value): Likewise.
1607         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
1608         (bsd_uthread_store_registers): Likewise.
1609         * core-regset.c (fetch_core_registers): Likewise.
1610         * corelow.c (get_core_registers): Likewise.
1611         * cris-tdep.c (cris_store_return_value): Likewise.
1612         (cris_extract_return_value): Likewise.
1613         (find_step_target): Likewise.
1614         (find_step_target): Likewise.
1615         (cris_software_single_step): Likewise.
1616         * ctf.c (ctf_fetch_registers): Likewise.
1617         * darwin-nat.c (cancel_breakpoint): Likewise.
1618         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
1619         * frv-tdep.c (frv_extract_return_value): Likewise.
1620         * ft32-tdep.c (ft32_store_return_value): Likewise.
1621         (ft32_extract_return_value): Likewise.
1622         * go32-nat.c (fetch_register): Likewise.
1623         (go32_fetch_registers): Likewise.
1624         (go32_store_registers): Likewise.
1625         (store_register): Likewise.
1626         * h8300-tdep.c (h8300_extract_return_value): Likewise.
1627         (h8300_store_return_value): Likewise.
1628         * hppa-linux-nat.c (fetch_register): Likewise.
1629         (store_register): Likewise.
1630         (hppa_linux_fetch_inferior_registers): Likewise.
1631         (hppa_linux_store_inferior_registers): Likewise.
1632         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
1633         (i386_darwin_store_inferior_registers): Likewise.
1634         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
1635         (gnu_store_registers): Likewise.
1636         * i386-linux-nat.c (fetch_register): Likewise.
1637         (store_register): Likewise.
1638         (supply_gregset): Likewise.
1639         (fill_gregset): Likewise.
1640         (i386_linux_fetch_inferior_registers): Likewise.
1641         (i386_linux_store_inferior_registers): Likewise.
1642         (i386_linux_resume): Likewise.
1643         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
1644         Likewise.
1645         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
1646         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
1647         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
1648         (i386obsd_collect_uthread): Likewise.
1649         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1650         (i386_supply_gregset): Likewise.
1651         (i386_collect_gregset): Likewise.
1652         (i386_supply_fpregset): Likewise.
1653         (i386_collect_fpregset): Likewise.
1654         (i386_mpx_bd_base): Likewise.
1655         * i386-v4-nat.c (supply_fpregset): Likewise.
1656         (fill_fpregset): Likewise.
1657         * i387-tdep.c (i387_supply_fsave): Likewise.
1658         (i387_collect_fsave): Likewise.
1659         (i387_supply_fxsave): Likewise.
1660         (i387_collect_fxsave): Likewise.
1661         (i387_supply_xsave): Likewise.
1662         (i387_collect_xsave): Likewise.
1663         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
1664         (ia64_linux_store_registers): Likewise.
1665         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
1666         (ia64_extract_return_value): Likewise.
1667         (ia64_store_return_value): Likewise.
1668         (find_func_descr): Likewise.
1669         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
1670         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
1671         (inf_ptrace_store_registers): Likewise.
1672         * infrun.c (use_displaced_stepping): Likewise.
1673         (displaced_step_prepare_throw): Likewise.
1674         (resume): Likewise.
1675         (proceed): Likewise.
1676         (do_target_wait): Likewise.
1677         (adjust_pc_after_break): Likewise.
1678         (handle_inferior_event_1): Likewise.
1679         (handle_signal_stop): Likewise.
1680         (save_infcall_suspend_state): Likewise.
1681         (restore_infcall_suspend_state): Likewise.
1682         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
1683         * jit.c (jit_frame_prev_register): Likewise.
1684         * linux-nat.c (save_stop_reason): Likewise.
1685         (linux_nat_wait_1): Likewise.
1686         (resume_stopped_resumed_lwps): Likewise.
1687         * linux-record.c (record_linux_sockaddr): Likewise.
1688         (record_linux_msghdr): Likewise.
1689         (record_linux_system_call): Likewise.
1690         * linux-tdep.c (linux_collect_thread_registers): Likewise.
1691         * lm32-tdep.c (lm32_extract_return_value): Likewise.
1692         (lm32_store_return_value): Likewise.
1693         * m32c-tdep.c (m32c_read_flg): Likewise.
1694         (m32c_pseudo_register_read): Likewise.
1695         (m32c_pseudo_register_write): Likewise.
1696         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
1697         (m32r_linux_collect_gregset): Likewise.
1698         * m32r-tdep.c (m32r_store_return_value): Likewise.
1699         (m32r_extract_return_value): Likewise.
1700         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1701         (m68kbsd_collect_fpregset): Likewise.
1702         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
1703         * m68k-linux-nat.c (fetch_register): Likewise.
1704         (old_fetch_inferior_registers): Likewise.
1705         (old_store_inferior_registers): Likewise.
1706         (store_regs): Likewise.
1707         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
1708         (m68k_svr4_store_return_value): Likewise.
1709         * m88k-tdep.c (m88k_store_arguments): Likewise.
1710         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
1711         (mi_cmd_data_write_register_values): Likewise.
1712         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
1713         (mips_fbsd_store_inferior_registers): Likewise.
1714         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
1715         (mips_fbsd_supply_gregs): Likewise.
1716         (mips_fbsd_collect_fpregs): Likewise.
1717         (mips_fbsd_collect_gregs): Likewise.
1718         (mips_fbsd_supply_fpregset): Likewise.
1719         (mips_fbsd_collect_fpregset): Likewise.
1720         (mips_fbsd_supply_gregset): Likewise.
1721         (mips_fbsd_collect_gregset): Likewise.
1722         * mips-linux-nat.c (supply_gregset): Likewise.
1723         (fill_gregset): Likewise.
1724         (supply_fpregset): Likewise.
1725         (fill_fpregset): Likewise.
1726         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
1727         (mips_fill_gregset): Likewise.
1728         (mips_supply_fpregset): Likewise.
1729         (mips_fill_fpregset): Likewise.
1730         (mips64_supply_gregset): Likewise.
1731         (micromips_linux_sigframe_validate): Likewise.
1732         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
1733         (mipsnbsd_fetch_inferior_registers): Likewise.
1734         (mipsnbsd_store_inferior_registers): Likewise.
1735         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1736         (mipsnbsd_supply_gregset): Likewise.
1737         (mipsnbsd_iterate_over_regset_sections): Likewise.
1738         (mipsnbsd_supply_reg): Likewise.
1739         (mipsnbsd_supply_fpreg): Likewise.
1740         * mips-tdep.c (mips_in_frame_stub): Likewise.
1741         (mips_dummy_id): Likewise.
1742         (is_octeon_bbit_op): Likewise.
1743         (micromips_bc1_pc): Likewise.
1744         (extended_mips16_next_pc): Likewise.
1745         (mips16_next_pc): Likewise.
1746         (deal_with_atomic_sequence): Likewise.
1747         * moxie-tdep.c (moxie_process_readu): Likewise.
1748         * nios2-tdep.c (nios2_get_next_pc): Likewise.
1749         * nto-procfs.c (procfs_store_registers): Likewise.
1750         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
1751         (ppcfbsd_store_inferior_registers): Likewise.
1752         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
1753         (fetch_altivec_register): Likewise.
1754         (get_spe_registers): Likewise.
1755         (fetch_spe_register): Likewise.
1756         (fetch_altivec_registers): Likewise.
1757         (fetch_all_gp_regs): Likewise.
1758         (fetch_all_fp_regs): Likewise.
1759         (store_vsx_register): Likewise.
1760         (store_altivec_register): Likewise.
1761         (set_spe_registers): Likewise.
1762         (store_spe_register): Likewise.
1763         (store_altivec_registers): Likewise.
1764         (store_all_gp_regs): Likewise.
1765         (store_all_fp_regs): Likewise.
1766         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
1767         (ppc_linux_collect_gregset): Likewise.
1768         (ppc_canonicalize_syscall): Likewise.
1769         (ppc_linux_record_signal): Likewise.
1770         (ppu2spu_prev_register): Likewise.
1771         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
1772         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
1773         (ppcobsd_store_registers): Likewise.
1774         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
1775         Likewise.
1776         (ppc_ravenscar_generic_store_registers): Likewise.
1777         * procfs.c (procfs_fetch_registers): Likewise.
1778         (procfs_store_registers): Likewise.
1779         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
1780         (ravenscar_store_registers): Likewise.
1781         (ravenscar_prepare_to_store): Likewise.
1782         * record-btrace.c (record_btrace_fetch_registers): Likewise.
1783         * record-full.c (record_full_wait_1): Likewise.
1784         (record_full_registers_change): Likewise.
1785         (record_full_store_registers): Likewise.
1786         (record_full_core_fetch_registers): Likewise.
1787         (record_full_save): Likewise.
1788         (record_full_goto_insn): Likewise.
1789         * regcache.c (regcache_register_size): Likewise.
1790         (get_regcache_arch): Remove.
1791         (regcache_read_pc): Likewise.
1792         * regcache.h (get_regcache_arch): Remove.
1793         * remote-sim.c (gdbsim_fetch_register): Likewise.
1794         (gdbsim_store_register): Likewise.
1795         * remote.c (fetch_register_using_p): Likewise.
1796         (send_g_packet): Likewise.
1797         (remote_prepare_to_store): Likewise.
1798         (store_registers_using_G): Likewise.
1799         * reverse.c (save_bookmark_command): Likewise.
1800         (goto_bookmark_command): Likewise.
1801         * rs6000-aix-tdep.c (branch_dest): Likewise.
1802         * rs6000-nat.c (rs6000_ptrace64): Likewise.
1803         (fetch_register): Likewise.
1804         * rs6000-tdep.c (ppc_supply_reg): Likewise.
1805         (ppc_collect_reg): Likewise.
1806         (ppc_collect_gregset): Likewise.
1807         (ppc_collect_fpregset): Likewise.
1808         (ppc_collect_vsxregset): Likewise.
1809         (ppc_collect_vrregset): Likewise.
1810         (ppc_displaced_step_hw_singlestep): Likewise.
1811         (rs6000_pseudo_register_read): Likewise.
1812         (rs6000_pseudo_register_write): Likewise.
1813         * s390-linux-nat.c (supply_gregset): Likewise.
1814         (fill_gregset): Likewise.
1815         (s390_linux_fetch_inferior_registers): Likewise.
1816         * s390-linux-tdep.c (s390_write_pc): Likewise.
1817         (s390_software_single_step): Likewise.
1818         (s390_all_but_pc_registers_record): Likewise.
1819         (s390_linux_syscall_record): Likewise.
1820         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
1821         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
1822         (shnbsd_store_inferior_registers): Likewise.
1823         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
1824         (sh_extract_return_value_fpu): Likewise.
1825         (sh_store_return_value_nofpu): Likewise.
1826         (sh_corefile_supply_regset): Likewise.
1827         (sh_corefile_collect_regset): Likewise.
1828         * sh64-tdep.c (sh64_extract_return_value): Likewise.
1829         (sh64_store_return_value): Likewise.
1830         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
1831         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
1832         (sparc_store_inferior_registers): Likewise.
1833         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
1834         (sparc_ravenscar_prepare_to_store): Likewise.
1835         * sparc-tdep.c (sparc32_store_arguments): Likewise.
1836         (sparc_analyze_control_transfer): Likewise.
1837         (sparc_step_trap): Likewise.
1838         (sparc_software_single_step): Likewise.
1839         (sparc32_gdbarch_init): Likewise.
1840         (sparc_supply_rwindow): Likewise.
1841         (sparc_collect_rwindow): Likewise.
1842         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
1843         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
1844         (sparc64nbsd_collect_gregset): Likewise.
1845         (sparc64nbsd_supply_fpregset): Likewise.
1846         (sparc64nbsd_collect_fpregset): Likewise.
1847         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1848         (sparc64_supply_gregset): Likewise.
1849         (sparc64_collect_gregset): Likewise.
1850         (sparc64_supply_fpregset): Likewise.
1851         (sparc64_collect_fpregset): Likewise.
1852         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
1853         * spu-tdep.c (spu_unwind_sp): Likewise.
1854         (spu2ppu_prev_register): Likewise.
1855         (spu_memory_remove_breakpoint): Likewise.
1856         * stack.c (return_command): Likewise.
1857         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
1858         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
1859         * tracefile.c (trace_save_ctf): Likewise.
1860         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
1861         (do_windows_store_inferior_registers): Likewise.
1862         (windows_resume): Likewise.
1863         * xtensa-linux-nat.c (fill_gregset): Likewise.
1864         (supply_gregset_reg): Likewise.
1865         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
1866         (xtensa_register_read_masked): Likewise.
1867         (xtensa_supply_gregset): Likewise.
1868         (xtensa_extract_return_value): Likewise.
1869         (xtensa_store_return_value): Likewise.
1870
1871 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
1872
1873         * doublest.c (floatformat_from_string): New function.
1874         * doublest.h (floatformat_from_string): Add prototype.
1875
1876         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
1877         (OP_FLOAT): ... this.
1878         * expression.h: Do not include "doublest.h".
1879         (union exp_element): Replace doubleconst and decfloatconst by
1880         new element floatconst.
1881         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
1882         (ada_evaluate_subexp): Likewise.
1883         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
1884         OP_DOUBLE and OP_DECFLOAT.
1885         * expprint.c (print_subexp_standard): Likewise.
1886         (dump_subexp_body_standard): Likewise.
1887         * breakpoint.c (watchpoint_exp_is_const): Likewise.
1888
1889         * parse.c: Include "dfp.h".
1890         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1891         (write_exp_elt_floatcst): New function.
1892         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
1893         and OP_DECFLOAT.
1894         (operator_check_standard): Likewise.
1895         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
1896         Return target format buffer instead of host DOUBLEST.
1897         Use floatformat_from_string and decimal_from_string to parse
1898         either binary or decimal floating-point types.
1899         (parse_c_float): Remove.
1900         * parser-defs.h: Do not include "doublest.h".
1901         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1902         (write_exp_elt_floatcst): Add prototype.
1903         (parse_float): Update prototype.
1904         (parse_c_float): Remove.
1905
1906         * c-exp.y: Do not include "dfp.h".
1907         (typed_val_float): Use byte buffer instead of DOUBLEST.
1908         (typed_val_decfloat): Remove.
1909         (DECFLOAT): Remove.
1910         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1911         (parse_number): Update to new parse_float interface.
1912         Parse suffixes and determine type before calling parse_float.
1913         Handle decimal and binary FP types the same way.
1914
1915         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1916         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
1917         (parse_number): Update to new parse_float interface.
1918         Parse suffixes and determine type before calling parse_float.
1919
1920         * f-exp.y: Replace dval by typed_val_float.
1921         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1922         (parse_number): Use parse_float instead of atof.
1923
1924         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1925         (parse_go_float): Remove.
1926         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1927         (parse_number): Call parse_float instead of parse_go_float.
1928         Parse suffixes and determine type before calling parse_float.
1929
1930         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1931         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1932         (parse_number): Update to new parse_float interface.
1933         Parse suffixes and determine type before calling parse_float.
1934
1935         * m2-exp.y: Replace dval by byte buffer val.
1936         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1937         (parse_number): Call parse_float instead of atof.
1938
1939         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1940         (lex_number): Call parse_float instead of strtod.
1941         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
1942         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
1943         Use write_exp_elt_floatcst.
1944         (unit_testing): Remove static variable.
1945         (rust_type): Do not check unit_testing.
1946         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
1947
1948         * ada-exp.y (type_float, type_double): Remove.
1949         (typed_val_float): Use byte buffer instead of DOUBLEST.
1950         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1951         * ada-lex.l (processReal): Use parse_float instead of sscanf.
1952
1953 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
1954
1955         * aarch64-tdep.h (enum aarch64_regnum): Remove.
1956         * arch/aarch64.h: New file.
1957
1958 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1959
1960         * dfp.h (decimal_from_string): Use const reference for argument.
1961         * dfp.c (decimal_from_string): Likewise.
1962
1963 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1964
1965         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
1966         * sh64-tdep.c (sh64_do_fp_register): Likewise.
1967         * mips-tdep.c (mips_print_fp_register): Likewise.
1968
1969 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1970
1971         * common/format.h (enum argclass): Replace decfloat_arg by
1972         dec32float_arg, dec64float_arg, and dec128float_arg.
1973         * common/format.c (parse_format_string): Update to return
1974         new decimal float argument classes.
1975
1976         * printcmd.c (printf_decfloat): Rename to ...
1977         (printf_floating): ... this.  Add argclass argument, and use it
1978         instead of parsing the format string again.  Add support for
1979         binary floating-point values, using floatformat_to_string.
1980         Convert value to the target format if it doesn't already match.
1981         (ui_printf): Call printf_floating instead of printf_decfloat,
1982         also for double_arg / long_double_arg.  Pass argclass.
1983
1984         * dfp.c (decimal_to_string): Add format string argument.
1985         * dfp.h (decimal_to_string): Likewise.
1986
1987         * doublest.c (floatformat_to_string): Add format string argument.
1988         * doublest.h (floatformat_to_string): Likewise.
1989
1990 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1991
1992         * doublest.c (floatformat_precision): New routine.
1993         (floatformat_to_string): Likewise.
1994         * doublest.c (floatformat_to_string): Add prototype.
1995
1996         * printcmd.c (print_scalar_formatted): Only call print_floating
1997         on floating-point types.
1998         * valprint.c: Do not include "floatformat.h".
1999         (generic_val_print_decfloat): Remove.
2000         (generic_val_print): Call generic_val_print_float for both
2001         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2002         (print_floating): Use floatformat_to_string.  Handle decimal float.
2003         (print_decimal_floating): Remove, merge into floatformat_to_string.
2004         * value.h (print_decimal_floating): Remove.
2005
2006         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2007
2008 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2009
2010         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2011
2012 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2013
2014         * memattr.h: Don't include vec.h.
2015         (struct mem_attrib): Initialize fields.
2016         <unknown>: New static method.
2017         (struct mem_region): Add constructors, operator<, initialize
2018         fields.
2019         * memattr.c: Include algorithm.
2020         (default_mem_attrib, unknown_mem_attrib): Remove.
2021         (user_mem_region_list): New global.
2022         (target_mem_region_list, mem_region_list): Change type to
2023         std::vector<mem_region>.
2024         (mem_use_target): Now a function.
2025         (target_mem_regions_valid): Change type to bool.
2026         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2027         (require_user_regions): Adjust.
2028         (require_target_regions): Adjust.
2029         (create_mem_region): Adjust.
2030         (lookup_mem_region): Adjust.
2031         (invalidate_target_mem_regions): Adjust.
2032         (mem_clear): Rename to...
2033         (user_mem_clear): ... this, and adjust.
2034         (mem_command): Adjust.
2035         (info_mem_command): Adjust.
2036         (mem_enable, enable_mem_command, mem_disable,
2037         disable_mem_command): Adjust.
2038         (mem_delete): Adjust.
2039         (delete_mem_command): Adjust.
2040         * memory-map.h (parse_memory_map): Return an std::vector.
2041         * memory-map.c (parse_memory_map): Likewise.
2042         (struct memory_map_parsing_data): Add constructor.
2043         <memory_map>: Point to std::vector.
2044         (memory_map_start_memory): Adjust.
2045         (memory_map_end_memory): Adjust.
2046         (memory_map_end_property): Adjust.
2047         (clear_result): Remove.
2048         * remote.c (remote_memory_map): Return an std::vector.
2049         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2050         Remove.
2051         (target_debug_print_mem_region_vector): New.
2052         * target-delegates.c: Regenerate.
2053         * target.h (mem_region_vector): New typedef.
2054         (to_memory_map): Return mem_region_vector.
2055         (target_memory_map): Return an std::vector.
2056         * target.c (target_memory_map): Return an std::vector.
2057         (flash_erase_command): Adjust.
2058
2059 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2060
2061         * memory-map.c (struct memory_map_parsing_data) <property_name>:
2062         Change type to std::string.
2063         (memory_map_start_property): Adjust.
2064         (memory_map_end_property): Adjust.
2065
2066 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2067
2068         * infrun.h: Include common/byte-vector.h.
2069         (struct displaced_step_closure): New struct.
2070         (struct buf_displaced_step_closure): New struct.
2071         * infrun.c (displaced_step_closure::~displaced_step_closure):
2072         Provide default implementation.
2073         (displaced_step_clear): Deallocate step closure with delete.
2074         * aarch64-tdep.c (displaced_step_closure): Rename to ...
2075         (aarch64_displaced_step_closure): ... this, extend
2076         displaced_step_closure.
2077         (aarch64_displaced_step_data) <dsc>: Change type to
2078         aarch64_displaced_step_closure.
2079         (aarch64_displaced_step_copy_insn): Adjust to type change, use
2080         unique_ptr.
2081         (aarch64_displaced_step_fixup): Add cast for displaced step
2082         closure.
2083         * amd64-tdep.c (displaced_step_closure): Rename to ...
2084         (amd64_displaced_step_closure): ... this, extend
2085         displaced_step_closure.
2086         <insn_buf>: Change type to std::vector<gdb_byte>.
2087         <max_len>: Remove.
2088         (fixup_riprel): Change type of DSC parameter, adjust to type
2089         change of insn_buf.
2090         (fixup_displaced_copy): Change type of DSC parameter.
2091         (amd64_displaced_step_copy_insn): Instantiate
2092         amd64_displaced_step_closure.
2093         (amd64_displaced_step_fixup): Add cast for closure type, adjust
2094         to type change of insn_buf.
2095         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2096         parameter DSC.
2097         (arm_linux_copy_svc): Likewise.
2098         (cleanup_kernel_helper_return): Likewise.
2099         (arm_catch_kernel_helper_return): Likewise.
2100         (arm_linux_displaced_step_copy_insn): Instantiate
2101         arm_displaced_step_closure.
2102         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2103         (displaced_read_reg): Change type of parameter DSC.
2104         (branch_write_pc): Likewise.
2105         (load_write_pc): Likewise.
2106         (alu_write_pc): Likewise.
2107         (displaced_write_reg): Likewise.
2108         (arm_copy_unmodified): Likewise.
2109         (thumb_copy_unmodified_32bit): Likewise.
2110         (thumb_copy_unmodified_16bit): Likewise.
2111         (cleanup_preload): Likewise.
2112         (install_preload): Likewise.
2113         (arm_copy_preload): Likewise.
2114         (thumb2_copy_preload): Likewise.
2115         (install_preload_reg): Likewise.
2116         (arm_copy_preload_reg): Likewise.
2117         (cleanup_copro_load_store): Likewise.
2118         (install_copro_load_store): Likewise.
2119         (arm_copy_copro_load_store) Likewise.
2120         (thumb2_copy_copro_load_store): Likewise.
2121         (cleanup_branch): Likewise.
2122         (install_b_bl_blx): Likewise.
2123         (arm_copy_b_bl_blx): Likewise.
2124         (thumb2_copy_b_bl_blx): Likewise.
2125         (thumb_copy_b): Likewise.
2126         (install_bx_blx_reg): Likewise.
2127         (arm_copy_bx_blx_reg): Likewise.
2128         (thumb_copy_bx_blx_reg): Likewise.
2129         (cleanup_alu_imm): Likewise.
2130         (arm_copy_alu_imm): Likewise.
2131         (thumb2_copy_alu_imm): Likewise.
2132         (cleanup_alu_reg): Likewise.
2133         (install_alu_reg): Likewise.
2134         (arm_copy_alu_reg): Likewise.
2135         (thumb_copy_alu_reg): Likewise.
2136         (cleanup_alu_shifted_reg): Likewise.
2137         (install_alu_shifted_reg): Likewise.
2138         (arm_copy_alu_shifted_reg): Likewise.
2139         (cleanup_load): Likewise.
2140         (cleanup_store): Likewise.
2141         (arm_copy_extra_ld_st): Likewise.
2142         (install_load_store): Likewise.
2143         (thumb2_copy_load_literal): Likewise.
2144         (thumb2_copy_load_reg_imm): Likewise.
2145         (arm_copy_ldr_str_ldrb_strb): Likewise.
2146         (cleanup_block_load_all): Likewise.
2147         (cleanup_block_store_pc): Likewise.
2148         (cleanup_block_load_pc): Likewise.
2149         (arm_copy_block_xfer): Likewise.
2150         (thumb2_copy_block_xfer): Likewise.
2151         (cleanup_svc): Likewise.
2152         (install_svc): Likewise.
2153         (arm_copy_svc): Likewise.
2154         (thumb_copy_svc): Likewise.
2155         (arm_copy_undef): Likewise.
2156         (thumb_32bit_copy_undef): Likewise.
2157         (arm_copy_unpred): Likewise.
2158         (arm_decode_misc_memhint_neon): Likewise.
2159         (arm_decode_unconditional): Likewise.
2160         (arm_decode_miscellaneous): Likewise.
2161         (arm_decode_dp_misc): Likewise.
2162         (arm_decode_ld_st_word_ubyte): Likewise.
2163         (arm_decode_media): Likewise.
2164         (arm_decode_b_bl_ldmstm): Likewise.
2165         (arm_decode_ext_reg_ld_st): Likewise.
2166         (thumb2_decode_dp_shift_reg): Likewise.
2167         (thumb2_decode_ext_reg_ld_st): Likewise.
2168         (arm_decode_svc_copro): Likewise.
2169         (thumb2_decode_svc_copro): Likewise.
2170         (install_pc_relative): Likewise.
2171         (thumb_copy_pc_relative_16bit): Likewise.
2172         (thumb_decode_pc_relative_16bit): Likewise.
2173         (thumb_copy_pc_relative_32bit): Likewise.
2174         (thumb_copy_16bit_ldr_literal): Likewise.
2175         (thumb_copy_cbnz_cbz): Likewise.
2176         (thumb2_copy_table_branch): Likewise.
2177         (cleanup_pop_pc_16bit_all): Likewise.
2178         (thumb_copy_pop_pc_16bit): Likewise.
2179         (thumb_process_displaced_16bit_insn): Likewise.
2180         (decode_thumb_32bit_ld_mem_hints): Likewise.
2181         (thumb_process_displaced_32bit_insn): Likewise.
2182         (thumb_process_displaced_insn): Likewise.
2183         (arm_process_displaced_insn): Likewise.
2184         (arm_displaced_init_closure): Likewise.
2185         (arm_displaced_step_fixup): Add cast for closure.
2186         * arm-tdep.h: Include infrun.h.
2187         (displaced_step_closure): Rename to ...
2188         (arm_displaced_step_closure): ... this, extend
2189         displaced_step_closure.
2190         <u::svc::copy_svc_os>: Change type of parameter DSC.
2191         <cleanup>: Likewise.
2192         (arm_process_displaced_insn): Likewise.
2193         (arm_displaced_init_closure): Likewise.
2194         (displaced_read_reg): Likewise.
2195         (displaced_write_reg): Likewise.
2196         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2197         Adjust.
2198         * i386-tdep.h: Include infrun.h.
2199         (i386_displaced_step_closure): New typedef.
2200         * i386-tdep.c (i386_displaced_step_copy_insn): Use
2201         i386_displaced_step_closure.
2202         (i386_displaced_step_fixup): Adjust.
2203         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2204         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2205         and unique_ptr.
2206         (ppc_displaced_step_fixup): Adjust.
2207         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2208         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2209         and unique_ptr.
2210         (s390_displaced_step_fixup): Adjust.
2211
2212 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2213
2214         * interps.h (interp_resume, interp_suspend, interp_set_temp):
2215         Remove declarations.
2216
2217 2017-10-20  Tom Tromey  <tom@tromey.com>
2218
2219         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2220         std::vector.
2221         (gdb_bfd_record_inclusion): Update.
2222         (bfdp): Remove typedef.
2223
2224 2017-10-20  Tom Tromey  <tom@tromey.com>
2225
2226         * gdb_bfd.c (gdb_bfd_ref): Use new.
2227         (struct gdb_bfd_data): Add constructor, destructor, and member
2228         initializers.
2229         (gdb_bfd_unref): Use delete.
2230
2231 2017-10-20  Tom Tromey  <tom@tromey.com>
2232
2233         * exec.c (exec_file_attach): Use new_bfd_ref.
2234         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2235         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2236         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2237         new_bfd_ref.
2238         * gdb_bfd.h (new_bfd_ref): New function.
2239
2240 2017-10-20  Pedro Alves  <palves@redhat.com>
2241
2242         * main.c (captured_command_loop): Add attribute noinline.
2243
2244 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
2245
2246         * interps.c (struct interp_factory): Add constructor.
2247         (interp_factory_p): Remove typedef.
2248         (DEF_VEC_P(interp_factory_p)): Remove.
2249         (interpreter_factories): Change type to std::vector.
2250         (interp_factory_register): Adjust.
2251         (interp_lookup): Adjust.
2252         (interpreter_completer): Adjust.
2253
2254 2017-10-19  Tom Tromey  <tom@tromey.com>
2255
2256         * break-catch-syscall.c (catch_syscall_completer): Use
2257         std::string, gdb::unique_xmalloc_ptr.
2258
2259 2017-10-19  Tom Tromey  <tom@tromey.com>
2260
2261         * infcall.c (call_function_by_hand_dummy): Use std::string.
2262
2263 2017-10-19  Tom Tromey  <tom@tromey.com>
2264
2265         * mi/mi-main.c (mi_cmd_execute): Update.
2266         * top.h (prepare_execute_command): Return scoped_value_mark.
2267         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2268         Add move constructor.
2269         * top.c (prepare_execute_command): Return scoped_value_mark.
2270         (execute_command): Update.
2271
2272 2017-10-19  Pedro Alves  <palves@redhat.com>
2273
2274         * xml-support.c (xml_fetch_content_from_file): Check fread's
2275         return.
2276
2277 2017-10-19  Pedro Alves  <palves@redhat.com>
2278
2279         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2280         async.
2281         (handle_error_fd): New function.
2282         (ser_base_async): Add/delete an event loop file handler for
2283         error_fd.
2284
2285 2017-10-19  Pedro Alves  <palves@redhat.com>
2286
2287         * xml-support.c (xml_fetch_content_from_file): Don't read in
2288         chunks.  Instead use fseek to determine the file's size, and read
2289         it in one go.
2290
2291 2017-11-18  Keith Seitz  <keiths@redhat.com>
2292
2293         * c-exp.y (oper): Canonicalize conversion operators of user-defined
2294         types.
2295         Add whitespace to front of type name.
2296
2297 2017-10-18  Keith Seitz  <keiths@redhat.com>
2298
2299         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2300         DW_AT_accessibility.
2301
2302 2017-10-18  Yao Qi  <yao.qi@linaro.org>
2303
2304         * features/tic6x-c62x-linux.c: Remove.
2305
2306 2017-10-17  Tom Tromey  <tom@tromey.com>
2307
2308         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2309         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2310         (do_mixed_source_and_assembly): Likewise.
2311
2312 2017-10-17  Tom Tromey  <tom@tromey.com>
2313
2314         * regcache.c (regcache::xfer_part): Remove assertion.
2315
2316 2017-10-17  Pedro Alves  <palves@redhat.com>
2317
2318         * xml-support.c (xml_fetch_content_from_file): Call
2319         unique_ptr::release() instead unique_ptr::get() when passing
2320         through xrealloc.
2321
2322 2017-10-17  Yao Qi  <yao.qi@linaro.org>
2323
2324         * regcache.c (regcache::xfer_part): Remove parameters read and
2325         write, add parameter is_raw.  All callers are updated.
2326
2327 2017-10-16  Keith Seitz  <keiths@redhat.com>
2328
2329         * c-typeprint.c (enum access_specifier): Moved here from
2330         c_type_print_base.
2331         (output_access_specifier): New function.
2332         (c_type_print_base): Consider typedefs when assessing
2333         whether access labels are needed.
2334         Use output_access_specifier as needed.
2335         Output access specifier for typedefs, if needed.
2336         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2337         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2338         fields.
2339         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2340         accessor macros.
2341
2342 2017-10-16  Tom Tromey  <tom@tromey.com>
2343
2344         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2345         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2346         * target.c (target_fileio_read_stralloc): Update.
2347         * sparc64-tdep.c (adi_is_addr_mapped): Update.
2348         * target.h (target_fileio_read_stralloc): Return
2349         unique_xmalloc_ptr.
2350
2351 2017-10-16  Tom Tromey  <tom@tromey.com>
2352
2353         * xml-syscall.c (xml_init_syscalls_info): Update.
2354         * xml-support.c (xinclude_start_include): Update.
2355         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2356         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2357         (xml_fetch_content_from_file): Likewise.
2358         * osdata.c (get_osdata): Update.
2359         * target.h (target_read_stralloc, target_get_osdata): Return
2360         unique_xmalloc_ptr.
2361         * solib-aix.c (solib_aix_get_library_list): Update.
2362         * solib-target.c (solib_target_current_sos): Update.
2363         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2364         * xml-tdesc.c (fetch_available_features_from_target): Update.
2365         (target_fetch_description_xml): Update.
2366         (file_read_description_xml): Update.
2367         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2368         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2369         (remote_pid_to_exec_file): Update.
2370         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2371         (target_get_osdata): Likewise.
2372
2373 2017-10-16  Tom Tromey  <tom@tromey.com>
2374
2375         * remote.c (remote_register_number_and_offset): Use std::vector.
2376         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2377         (putpkt_binary): Use gdb::def_vector.
2378         (compare_sections_command): Use gdb::byte_vector.
2379
2380 2017-10-16  Tom Tromey  <tom@tromey.com>
2381
2382         * ppc-linux-nat.c (hwdebug_insert_point): Use
2383         gdb::unique_xmalloc_ptr, XDUP.
2384
2385 2017-10-16  Tom Tromey  <tom@tromey.com>
2386
2387         * probe.c (parse_probes): Use std::string.
2388         (info_probes_for_ops, enable_probes_command)
2389         (disable_probes_command): Remove cleanups.
2390
2391 2017-10-16  Tom Tromey  <tom@tromey.com>
2392
2393         * buildsym.c (block_compar): Remove.
2394         (end_symtab_get_static_block): Use std::vector.
2395
2396 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
2397
2398         * memrange.h (struct mem_range): Define operator< and operator==.
2399         (mem_range_s): Remove.
2400         (DEF_VEC_O (mem_range_s)): Remove.
2401         (normalize_mem_ranges): Change parameter type to std::vector.
2402         * memrange.c (compare_mem_ranges): Remove.
2403         (normalize_mem_ranges): Change parameter type to std::vector,
2404         adjust to vector change.
2405         * exec.c (section_table_available_memory): Return vector, remove
2406         parameter.
2407         (section_table_read_available_memory): Adjust to std::vector
2408         change.
2409         * remote.c (remote_read_bytes): Adjust to std::vector
2410         change.
2411         * tracepoint.h (traceframe_available_memory): Change parameter
2412         type to std::vector.
2413         * tracepoint.c (traceframe_available_memory): Change parameter
2414         type to std::vector, adjust.
2415         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2416         std::vector change.
2417         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2418         unittests/memrange-selftests.c.
2419         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2420         * gdb/unittests/memrange-selftests.c: New file.
2421
2422 2017-10-16  Pedro Alves  <palves@redhat.com>
2423
2424         * elfread.c (probe_key_free): Rename range-for variable.
2425         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2426         (find_probe_by_pc, collect_probes): Rename range-for variable.
2427
2428 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2429
2430         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2431         * features/tic6x-c62x.c: Remove.
2432         * features/tic6x-c64x-linux.c: Remove.
2433         * features/tic6x-c64x.c: Remove.
2434         * features/tic6x-c64xp-linux.c: Remove.
2435         * features/tic6x-c64xp.c: Remove.
2436         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2437         initialize_tdesc_tic6x_*_linux functions.
2438         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2439         initialize_tdesc_tic6x_* functions.
2440
2441 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2442
2443         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2444         tic6x-c62x.
2445         * regformats/tic6x-c62x.dat: Remove.
2446         * regformats/tic6x-c64x.dat: Remove.
2447         * regformats/tic6x-c64xp.dat: Remove.
2448
2449 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2450
2451         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2452         (the !HAVE_LIBEXPAT version).
2453
2454 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2455
2456         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2457         const.
2458
2459 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2460
2461         * target.h: Include tracepoint.h.
2462         (enum trace_find_type): Move to tracepoint.h.
2463         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2464         * tracepoint.h: Don't include target.h
2465         (enum trace_find_type): Move from target.h.
2466         (parse_traceframe_info): Return a unique ptr.
2467         * tracepoint.c (current_traceframe_info): Change type to unique
2468         ptr.
2469         (free_traceframe_info): Remove.
2470         (clear_traceframe_info): Don't manually free
2471         current_traceframe_info.
2472         (free_result): Remove.
2473         (parse_traceframe_info): Return a unique ptr.
2474         (get_traceframe_info): Adjust to unique ptr.
2475         * ctf.c (ctf_traceframe_info): Return a unique ptr.
2476         * remote.c (remote_traceframe_info): Return a unique ptr.
2477         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2478         ptr.
2479         * target-debug.h (target_debug_print_traceframe_info_up): New
2480         macro.
2481         * target-delegates.c: Regenerate.
2482
2483 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2484
2485         * memrange.h (struct mem_range): Add constructors.
2486         * tracepoint.h (struct traceframe_info) <memory>: Change type to
2487         std::vector<mem_range>.
2488         * tracepoint.c (free_traceframe_info): Don't manually free
2489         vector.
2490         (traceframe_info_start_memory): Adjust to vector change.
2491         (traceframe_available_memory): Likewise.
2492         * tracefile-tfile.c (build_traceframe_info): Likewise.
2493         * ctf.c (ctf_traceframe_info): Likewise.
2494
2495 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2496
2497         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2498         std::vector<int>.
2499         * tracepoint.c (free_traceframe_info): Deallocate with delete.
2500         (traceframe_info_start_tvar): Adjust to vector change.
2501         (parse_traceframe_info): Allocate with new.
2502         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2503         vector change.
2504         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2505         change.
2506         tfile_traceframe_info): Allocate with new.
2507         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2508         change.
2509
2510 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2511
2512         * tracepoint.c (traceframe_info): Rename to...
2513         (current_traceframe_info): ...this.
2514         (clear_traceframe_info): Adjust.
2515         (get_traceframe_info): Adjust.
2516
2517 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2518
2519         * nat/linux-osdata.c: Include algorithm.
2520         (compare_processes): Remove.
2521         (struct pid_pgid_entry): New struct.
2522         (linux_xfer_osdata_processgroups): Use std::vector instead of
2523         XNEWVEC.
2524
2525 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2526
2527         * objfiles.h: Don't include symfile.h.
2528         (struct partial_symbol): Remove forward-declaration.
2529         (struct objfile) <global_psymbols, static_psymbols>: Change type
2530         to std::vector<partial_symbol *>.
2531         * objfiles.c (objfile::objfile): Don't memset those fields.
2532         (objfile::~objfile): Don't free those fields.
2533         * psympriv.h (struct psymbol_allocation_list): Remove
2534         forward-declaration.
2535         (add_psymbol_to_list): Change psymbol_allocation_list parameter
2536         to std::vector.
2537         (start_psymtab_common): Change parameters to std::vector.
2538         * psymtab.c: Include algorithm.
2539         (require_partial_symbols): Call shrink_to_fit.
2540         (find_pc_sect_psymbol): Adjust to vector change.
2541         (match_partial_symbol): Likewise.
2542         (lookup_partial_symbol): Likewise.
2543         (psym_relocate): Likewise.
2544         (dump_psymtab): Likewise.
2545         (recursively_search_psymtabs): Likewise.
2546         (compare_psymbols): Remove.
2547         (sort_pst_symbols): Adjust to vector change.
2548         (start_psymtab_common): Likewise.
2549         (end_psymtab_common): Likewise.
2550         (psymbol_bcache_full): De-constify return value.
2551         (add_psymbol_to_bcache): Likewise.
2552         (extend_psymbol_list): Remove.
2553         (append_psymbol_to_list): Adjust to vector change.
2554         (add_psymbol_to_list): Likewise.
2555         (init_psymbol_list): Likewise.
2556         (maintenance_info_psymtabs): Likewise.
2557         (maintenance_check_psymtabs): Likewise.
2558         * symfile.h (struct psymbol_allocation_list): Remove.
2559         * symfile.c (reread_symbols): Adjust to vector change.
2560         * dbxread.c (start_psymtab): Change type of parameters.
2561         (dbx_symfile_read): Adjust to vector change.
2562         (read_dbx_symtab): Likewise.
2563         (start_psymtab): Change type of parameters.
2564         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2565         (create_partial_symtab): Likewise.
2566         (add_partial_symbol): Likewise.
2567         (write_one_signatured_type): Likewise.
2568         (recursively_write_psymbols): Likewise.
2569         * mdebugread.c (parse_partial_symbols): Likewise.
2570         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2571         (scan_xcoff_symtab): Adjust to vector change.
2572         (xcoff_initial_scan): Likewise.
2573
2574 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
2575
2576         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2577
2578 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2579
2580         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2581         Remove s390x-*-expedite, add s390x-expedite.
2582
2583 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2584
2585         * features/s390-gs-linux64.c: Regenerated.
2586         * features/s390x-gs-linux64.c: Regenerated.
2587
2588 2017-10-13  Tom Tromey  <tom@tromey.com>
2589
2590         * compile/compile-object-run.c (do_module_cleanup): Use delete.
2591         * solib.c (update_solib_list, reload_shared_libraries_1): Use
2592         delete.
2593         * symfile.c (symbol_file_add_with_addrs): Use new.
2594         (symbol_file_add_separate): Update comment.
2595         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2596         * jit.c (jit_object_close_impl): Use new.
2597         (jit_unregister_code): Use delete.
2598         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2599         (~objfile): Rename from free_objfile.
2600         (free_objfile_separate_debug, do_free_objfile_cleanup)
2601         (free_all_objfiles, objfile_purge_solibs): Use delete.
2602         * objfiles.h (struct objfile): Add constructor and destructor.
2603         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
2604         (allocate_objfile, free_objfile): Don't declare.
2605         (struct objstats): Add initializers.
2606
2607 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2608
2609         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
2610         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
2611         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
2612         * gdbarch.h: Regenerate.
2613         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2614         Adjust comment.
2615         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
2616         (i386_displaced_step_fixup): Adjust comment.
2617         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
2618
2619 2017-10-12  Tom Tromey  <tom@tromey.com>
2620
2621         * prologue-value.h (pv_area::store_would_trash): Return bool.
2622         (pv_area::find_reg): Likewise.
2623         * prologue-value.c (pv_area::store_would_trash): Return bool.
2624         (pv_area::find_reg): Likewise.
2625
2626 2017-10-12  Tom Tromey  <tom@tromey.com>
2627
2628         * s390-linux-tdep.c (s390_store, s390_load)
2629         (s390_check_for_saved, s390_analyze_prologue): Update.
2630         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
2631         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
2632         * prologue-value.h (class pv_area): Move from prologue-value.c.
2633         Change names of members.  Add constructor, destructor, member
2634         functions.
2635         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
2636         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
2637         (pv_area_fetch, pv_area_scan): Don't declare.
2638         * prologue-value.c (struct pv_area::area_entry): Now member of
2639         pv_area.
2640         (struct pv_area): Move to prologue-value.h.
2641         (pv_area::pv_area): Rename from make_pv_area.
2642         (pv_area::~pv_area): Rename from free_pv_area.
2643         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
2644         (clear_entries, find_entry, overlaps, store_would_trash, store)
2645         (fetch, find_reg, scan): Now member of pv_area.
2646         Remove "area" argument.  Update.
2647         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
2648         Update.
2649         * mn10300-tdep.c (push_reg, check_for_saved)
2650         (mn10300_analyze_prologue): Update.
2651         * mep-tdep.c (is_arg_spill, check_for_saved)
2652         (mep_analyze_prologue): Update.
2653         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
2654         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
2655         (m32c_is_struct_return, m32c_analyze_prologue): Update.
2656         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
2657         Update.
2658         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
2659         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
2660
2661 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2662
2663         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
2664         * linux-nat.c (linux_nat_delete_thread): New variable.
2665         (lwp_free): Invoke linux_nat_delete_thread if set.
2666         (linux_nat_set_delete_thread): New function.
2667         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
2668         thread delete callback.
2669         * arm-linux-nat.c (arm_linux_delete_thread): New function.
2670         (_initialize_arm_linux_nat): Assign thread delete callback.
2671         * s390-linux-nat.c (s390_delete_thread): New function.
2672         (_initialize_s390_nat): Assign thread delete callback.
2673         * x86-linux-nat.c (x86_linux_add_target): Likewise.
2674         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
2675         function.
2676         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
2677         declaration.
2678         * nat/x86-linux.c (x86_linux_delete_thread): New function.
2679         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
2680
2681 2017-10-09  Tom Tromey  <tom@tromey.com>
2682
2683         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
2684         std::string.
2685         * tui/tui-layout.c (enum tui_status): Use std::string.
2686
2687 2017-10-11  Tom Tromey  <tom@tromey.com>
2688
2689         * gdbthread.h (thread_command): Constify.
2690         * inferior.h (detach_command): Constify.
2691         * top.h (set_history, show_history): Constify.
2692         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
2693         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
2694         * bsd-kvm.c (bsd_kvm_cmd): Constify.
2695         * printcmd.c (set_command): Constify.
2696         (non_const_set_command): New function.
2697         * dcache.c (set_dcache_command, show_dcache_command): Constify.
2698         * breakpoint.c (enable_command, disable_command, delete_command)
2699         (catch_command, tcatch_command, set_breakpoint_cmd)
2700         (show_breakpoint_cmd): Constify.
2701         * macrocmd.c (macro_command): Constify.
2702         * infcmd.c (unset_command, kill_command, detach_command)
2703         (info_proc_cmd): Constify.
2704         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
2705         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
2706         (info_auto_load_cmd): Constify.
2707         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
2708         (unset_tdesc_cmd): Constify.
2709         * ada-lang.c (set_ada_command, show_ada_command)
2710         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
2711         * guile/guile.c (set_guile_command, show_guile_command)
2712         (info_guile_command): Constify.
2713         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
2714         Constify.
2715         * skip.c (skip_command): Constify.
2716         * compile/compile.c (_initialize_compile): Constify.
2717         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
2718         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
2719         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
2720         (maint_btrace_pt_show_cmd): Constify.
2721         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
2722         Constify.
2723         * python/python.c (user_show_python, user_set_python): Constify.
2724         * mips-tdep.c (set_mips_command, show_mips_command)
2725         (set_mipsfpu_command): Constify.
2726         * record-btrace.c (cmd_record_btrace_start)
2727         (cmd_set_record_btrace, cmd_show_record_btrace)
2728         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
2729         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
2730         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
2731         Constify.
2732         * symfile.c (overlay_command): Constify.
2733         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2734         * cli/cli-logging.c (set_logging_command, show_logging_command):
2735         Constify.
2736         * cli/cli-dump.c (dump_command, append_command)
2737         (srec_dump_command, ihex_dump_command, verilog_dump_command)
2738         (tekhex_dump_command, binary_dump_command)
2739         (binary_append_command): Constify.
2740         * cli/cli-decode.c (struct cmd_list_element): Change type of
2741         "fun".
2742         * cli/cli-cmds.c (info_command, show_command, set_debug)
2743         (show_debug): Constify.
2744         (show_command): Add non-const overload.
2745         * top.c (set_history, show_history): Constify.
2746         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
2747         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
2748         * target.c (target_command): Constify.
2749         * sparc64-tdep.c (info_adi_command): Constify.
2750         * record-full.c (cmd_record_full_start): Constify.
2751         (set_record_full_command): Constify.  Fix typo.
2752         (show_record_full_command): Constify.
2753         * thread.c (thread_command, thread_apply_command): Constify.
2754         * memattr.c (dummy_cmd): Constify.
2755         * value.c (function_command): Constify.
2756         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
2757         * probe.c (info_probes_command): Constify.
2758         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
2759         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
2760         (show_thread_cmd, set_thread_default_cmd)
2761         (show_thread_default_cmd): Constify.
2762         (check_empty): Constify.
2763         * tracepoint.c (tfind_command): Constify.
2764         * cp-support.c (maint_cplus_command): Constify.
2765         * windows-tdep.c (info_w32_command): Constify.
2766         * record.c (cmd_record_start, set_record_command)
2767         (show_record_command, info_record_command, cmd_record_goto):
2768         Constify.
2769         * ravenscar-thread.c (set_ravenscar_command)
2770         (show_ravenscar_command): Constify.
2771         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
2772         Constify.
2773         (add_internal_problem_command): Remove casts.
2774         * arc-tdep.c (maintenance_print_arc_command): Constify.
2775         * valprint.c (set_print, show_print, set_print_raw)
2776         (show_print_raw): Constify.
2777         * maint.c (maintenance_command, maintenance_info_command)
2778         (maintenance_print_command, maintenance_set_cmd)
2779         (maintenance_show_cmd, set_per_command_cmd)
2780         (show_per_command_cmd, maintenance_check_command): Constify.
2781         * language.c (set_check, show_check): Constify.
2782         * typeprint.c (show_print_type, set_print_type): Constify.
2783         * go32-nat.c (go32_info_dos_command): Constify.
2784
2785 2017-10-11  Tom Tromey  <tom@tromey.com>
2786
2787         * breakpoint.c (prepare_re_set_context): Remove.
2788         (breakpoint_re_set_one): Update.  Don't use cleanups.
2789         (breakpoint_re_set): Use scoped_restore, std::string, and
2790         scoped_restore_current_language.
2791
2792 2017-10-11  Tom Tromey  <tom@tromey.com>
2793
2794         * breakpoint.c (commands_command_1): Use std::string.
2795         (cleanup_executing_breakpoints): Remove.
2796         (bpstat_do_actions_1): Use scoped_restore.
2797         (bpstat_check_watchpoint): Use std::string.
2798         (decode_static_tracepoint_spec): Likewise.
2799         (break_range_command): Likewise.
2800         (watch_command_1): Likewise.
2801         (compare_breakpoints): Change argument types.
2802         (clear_command): Use std::vector.
2803         (cleanup_executing_breakpoints): Remove.
2804         (update_global_location_list): Use unique_xmalloc_ptr.
2805         (strace_command): Remove unused declaration.
2806
2807 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2808
2809         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
2810         * NEWS: Mention new FreeBSD/arm native configuration.
2811         * configure.host: Add arm*-*-freebsd*.
2812         * configure.nat: Likewise.
2813         * arm-fbsd-nat.c: New file.
2814
2815 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2816
2817         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
2818         (ALLDEPFILES): Add arm-fbsd-tdep.c.
2819         * NEWS: Mention new FreeBSD/arm target.
2820         * configure.tgt: Add arm*-*-freebsd*.
2821         * arm-fbsd-tdep.c: New file.
2822         * arm-fbsd-tdep.h: New file.
2823
2824 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2825
2826         * linux-tdep.c (linux_make_corefile_notes): Remove call to
2827         `gdbarch_elfcore_write_linux_prpsinfo'.
2828         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
2829         method.
2830         (elf_internal_linux_prpsinfo): Remove declaration.
2831         * gdbarch.h: Regenerate.
2832         * gdbarch.c: Regenerate.
2833
2834 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2835
2836         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
2837         `set_gdbarch_elfcore_write_linux_prpsinfo'.
2838
2839 2017-10-11  Pedro Alves  <palves@redhat.com>
2840
2841         * breakpoint.c (reattach_breakpoints): Delete.
2842         * breakpoint.h (reattach_breakpoints): Delete.
2843
2844 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
2845
2846         * symfile.c (registered_sym_fns): Make struct, not typedef.
2847         (DEF_VEC_O (registered_sym_fns)): Remove.
2848         (symtab_fns): Change type to std::vector.
2849         (add_symtab_fns): Adjust.
2850         (find_sym_fns): Adjust.
2851
2852 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
2853
2854         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
2855         * arc-tdep.h (arc_arch_is_em): New function.
2856         (arc_arch_is_hs): Likewise.
2857
2858 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
2859
2860         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
2861         parentheses in the declaration.
2862         (macro_lookup_inclusion): Likewise.
2863         (macro_lookup_definition): Likewise.
2864         * p-lang.h (pascal_builtin_types): Likewise.
2865         * tui/tui-data.c (tui_win_list): Likewise.
2866         * tui/tui-data.h (tui_win_list): Likewise.
2867         * utils.h (make_cleanup_free_section_addr_info): Likewise.
2868
2869 2017-10-11  Mark Rages  <markrages@gmail.com>
2870
2871         * target-memory.c (block_boundaries): Fix for block address not
2872         aligned on block size.
2873
2874 2017-10-10  Pedro Alves <palves@redhat.com>
2875             Tom Tromey  <tom@tromey.com>
2876
2877         * breakpoint.c (struct captured_breakpoint_query_args)
2878         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
2879         (print_breakpoint): New.
2880         * breakpoint.h (print_breakpoint): Declare.
2881         * common/common-exceptions.h (enum return_reason): Remove
2882         references to catch_exceptions.
2883         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
2884         Delete.
2885         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
2886         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
2887         * gdb.h: Delete.
2888         * gdbthread.h (thread_select): Declare.
2889         * mi/mi-cmd-break.c: Don't include gdb.h.
2890         (breakpoint_notify): Use print_breakpoint.
2891         * mi/mi-cmd-catch.c: Don't include gdb.h.
2892         * mi/mi-interp.c: Don't include gdb.h.
2893         (mi_print_breakpoint_for_event): New.
2894         (mi_breakpoint_created, mi_breakpoint_modified): Use
2895         mi_print_breakpoint_for_event.
2896         * mi/mi-main.c: Don't include gdb.h.
2897         (mi_cmd_thread_select): Parse the global thread ID here.  Use
2898         thread_select instead of gdb_thread_select.
2899         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
2900         of using gdb_list_thread_ids.
2901         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
2902         FILEIO_ENOSYS here.
2903         (remote_fileio_request): Use TRY/CATCH instead of
2904         catch_exceptions.
2905         * symfile-mem.c (struct symbol_file_add_from_memory_args)
2906         (symbol_file_add_from_memory_wrapper): Delete.
2907         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
2908         * thread.c: Don't include gdb.h.
2909         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
2910         (thread_alive): Use thread_select.
2911         (do_captured_thread_select): Delete, parts salvaged as ...
2912         (thread_select): ... this new function.
2913         (gdb_thread_select): Delete.
2914
2915 2017-10-10  Pedro Alves  <palves@redhat.com>
2916             Tom Tromey  <tom@tromey.com>
2917
2918         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
2919         and reverse logic.
2920         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
2921         No longer macros.  Instead ...
2922         (enum wp_check_result): They're now values of this new
2923         enumeration.
2924         (watchpoint_check): Change return type to wp_check_result and
2925         parameter type to bpstat.
2926         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
2927         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
2928         catch_errors.  Reverse logic of watchpoint_check call.
2929         (breakpoint_re_set_one): Now returns void and takes a breakpoint
2930         pointer as parameter.
2931         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
2932         * common/common-exceptions.c (throw_exception_sjlj): Update
2933         comments to avoid mentioning catch_errors.
2934         * exceptions.c (catch_errors): Delete.
2935         * exceptions.h: Update comments to avoid mentioning catch_errors.
2936         (catch_errors_ftype, catch_errors): Delete.
2937         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
2938         (hook_stop_stub): Delete.
2939         (restore_selected_frame): Change return type to void, and
2940         parameter type to const frame_id &.
2941         (restore_infcall_control_state): Use TRY/CATCH instead of
2942         catch_errors.
2943         * main.c (captured_command_loop): Return void and remove
2944         parameter.  Remove references to catch_errors.
2945         (captured_main): Use TRY/CATCH instead of catch_errors.
2946         * objc-lang.c (objc_submethod_helper_data)
2947         (find_objc_msgcall_submethod_helper): Delete.
2948         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
2949         catch_errors.
2950         * record-full.c (record_full_message): Return void.
2951         (record_full_message_args, record_full_message_wrapper): Delete.
2952         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
2953         instead of catch_errors.
2954         * solib-aix.c (solib_aix_open_symbol_file_object): Change
2955         parameter type to int.
2956         * solib-darwin.c (open_symbol_file_object): Ditto.
2957         * solib-dsbt.c (open_symbol_file_object): Ditto.
2958         * solib-frv.c (open_symbol_file_object): Ditto.
2959         * solib-svr4.c (open_symbol_file_object): Ditto.
2960         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
2961         * solib.c (update_solib_list): Use TRY/CATCH instead of
2962         catch_errors.
2963         * solist.h (struct target_so_ops) <open_symbol_file_object>:
2964         Change type.
2965         * symmisc.c (struct print_symbol_args): Remove.
2966         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
2967         (print_symbol): Change type.
2968         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
2969         and remove parameters.
2970         (catch_errors): New.
2971         (get_windows_debug_event): Adjust.
2972
2973 2017-10-09  Tom Tromey  <tom@tromey.com>
2974
2975         * mi/mi-main.c (free_splay_tree): Remove.
2976         (list_available_thread_groups): Use splay_tree_up.
2977         * common/gdb_splay_tree.h: New file.
2978
2979 2017-10-09  Tom Tromey  <tom@tromey.com>
2980
2981         * mi/mi-main.c (do_nothing): Remove.
2982         (list_available_thread_groups): Update.
2983
2984 2017-10-09  Pedro Alves  <palves@redhat.com>
2985
2986         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
2987         reading registers when switching context.
2988
2989 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
2990
2991         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
2992         (fbsd_convert_siginfo): Likewise.
2993         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
2994
2995 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
2996
2997         * configure.ac (try_guile_versions): Remove guile-2.2.
2998         * configure: Regenerate.
2999
3000 2017-10-09  Tom Tromey  <tom@tromey.com>
3001
3002         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3003         (COMPILE.pre): Use $(CXX).
3004
3005 2017-10-09  Pedro Alves  <palves@redhat.com>
3006
3007         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3008         Use bool.
3009         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3010         * cp-support.h (cp_remove_params): Now returns a
3011         gdb::unique_xmalloc_ptr.
3012         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3013         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3014         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3015         returning a gdb::unique_xmalloc_ptr.
3016         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3017         * stack.c (find_frame_funname): Adjust to cp_remove_params
3018         returning a gdb::unique_xmalloc_ptr.
3019
3020 2017-10-08  Tom Tromey  <tom@tromey.com>
3021
3022         * dwarf2read.c (dwarf2_get_dwz_file): Use
3023         gdb::unique_xmalloc_ptr.
3024         (find_slot_in_mapped_hash): Likewise.
3025         (dwarf2_physname): Likewise.
3026         (create_dwo_unit_in_dwp_v1): Use std::string.
3027         (create_dwo_unit_in_dwp_v2): Likewise.
3028         (lookup_dwo_cutu): Likewise.
3029         (inherit_abstract_dies): Use std::vector.
3030         (read_array_type): Likewise.
3031         (dwarf_decode_macros): Remove unused declaration.
3032         (unsigned_int_compar): Remove.
3033         (dwarf2_build_psymtabs_hard): Use scoped_restore.
3034         (psymtabs_addrmap_cleanup): Remove.
3035
3036 2017-10-08  Tom Tromey  <tom@tromey.com>
3037
3038         * frame-unwind.c (frame_unwind_try_unwinder): Update.
3039         * frame.h (frame_cleanup_after_sniffer): Declare.
3040         (frame_prepare_for_sniffer): Return void.
3041         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
3042         type of argument.
3043         (frame_prepare_for_sniffer): Return void.
3044
3045 2017-10-08  Tom Tromey  <tom@tromey.com>
3046
3047         * utils.h (make_cleanup_value_free): Remove.
3048         * utils.c (do_value_free, struct cleanup): Remove.
3049         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3050         Use gdb_value_up.
3051         * value.h (struct value_deleter): New.
3052         (gdb_value_up): New typedef.
3053
3054 2017-10-08  Tom Tromey  <tom@tromey.com>
3055
3056         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3057         (make_cleanup_free_search_symbols): Remove.
3058         (search_symbols): Return std::vector.
3059         (symbol_search::compare_search_syms): Now member of
3060         symbol_search.  Change arguments.
3061         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
3062         (symtab_symbol_info, rbreak_command): Update.
3063         * symtab.h (struct symbol_search) <next>: Remove.
3064         Add constructors.
3065         (symbol_search::operator<): New function.
3066         (symbol_search::operator==): New function.
3067         (search_symbols): Remove std::vector.
3068         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3069         (symbol_search::compare_search_syms): Declare.
3070
3071 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3072
3073         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3074         arch/aarch64-insn.o.
3075         Remove one rule.
3076         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3077
3078 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3079
3080         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3081         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3082         arch/arm-linux.o respectively.
3083         * configure.tgt: Likewise.
3084
3085 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3086
3087         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3088         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3089
3090 2017-10-06  Pedro Alves  <palves@redhat.com>
3091
3092         * windows-nat.c: Include <algorithm>.
3093
3094 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3095
3096         * configure.tgt (i386_tobjs): New variable.
3097         (amd64_tobjs): New variable.
3098         Set $cpu_obs and $os_obs.
3099
3100 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3101
3102         * Makefile.in (CONFIG_SRC_SUBDIR): New.
3103         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3104         (clean): Remove object files and dependency files.
3105         (distclean): Remove the directory.
3106         * configure.ac: Invoke AC_CONFIG_COMMANDS.
3107         * configure: Re-generated.
3108         * configure.tgt: Replace amd64.o with arch/amd64.o.
3109
3110 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
3111
3112         PR build/22188
3113         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3114         and SETEND.
3115
3116 2017-10-05  Pedro Alves  <palves@redhat.com>
3117
3118         * linux-nat.c (linux_child_follow_fork): When following the parent
3119         and detaching the child, consult the parent thread's architecture
3120         instead of the child's.
3121
3122 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3123
3124         * ax.h: Do not include "doublest.h".
3125         (union agent_val): Remove.
3126
3127 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3128
3129         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3130         (decimal_to_string): Return std::string object.
3131         (decimal_from_string): Accept std::string object.  Return bool.
3132         (decimal_from_integral, decimal_from_doublest): Remove.
3133         (decimal_from_longest): Add prototype.
3134         (decimal_from_ulongest): Likewise.
3135         (decimal_to_longest): Likewise.
3136         (decimal_from_doublest): Likewise.
3137         * dfp.c: Do not include "gdbtypes.h" or "value.h".
3138         (MAX_DECIMAL_STRING): Move here.
3139         (decimal_to_string): Return std::string object.
3140         (decimal_from_string): Accept std::string object.  Return bool.
3141         (decimal_from_integral): Remove, replace by ...
3142         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3143         (decimal_to_longest): New function.
3144         (decimal_from_floating): Remove, replace by ...
3145         (decimal_from_doublest): ... this new function.
3146         (decimal_to_doublest): Update to new decimal_to_string interface.
3147
3148         * value.c (unpack_long): Use decimal_to_longest.
3149         * valops.c (value_cast): Use decimal_from_doublest instead of
3150         decimal_from_floating.  Use decimal_from_[u]longest isntead of
3151         decimal_from_integral.
3152         * valarith.c (value_args_as_decimal): Likewise.
3153         * valprint.c (print_decimal_floating): Update to new
3154         decimal_to_string interface.
3155         * printcmd.c (printf_decfloat): Likewise.
3156         * c-exp.y (parse_number): Update to new decimal_from_string interface.
3157
3158 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3159
3160         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
3161         * gdbtypes.c: Include "floatformat.h".
3162         * value.c: Likewise.
3163         * m68k-tdep.c: Likewise.
3164
3165         * findvar.c: Do not include "floatformat.h".
3166         * amd64-darwin-tdep.c: Likewise.
3167         * arm-linux-tdep.c: Likewise.
3168         * i386-darwin-tdep.c: Likewise.
3169         * i387-tdep.c: Likewise.
3170         * m68k-linux-tdep.c: Likewise.
3171         * mep-tdep.c: Likewise.
3172         * mips-tdep.c: Likewise.
3173         * nios2-tdep.c: Likewise.
3174         * s390-linux-tdep.c: Likewise.
3175         * sparc-obsd-tdep.c: Likewise.
3176         * sparc-tdep.c: Likewise.
3177         * sparc64-tdep.c: Likewise.
3178         * spu-tdep.c: Likewise.
3179         * tic6x-tdep.c: Likewise.
3180         * tilegx-tdep.c: Likewise.
3181         * vax-tdep.c: Likewise.
3182         * xstormy16-tdep.c: Likewise.
3183         * xtensa-tdep.c: Likewise.
3184
3185         * top.c: Do not include "doublest.h".
3186         * aarch64-tdep.c: Likewise.
3187         * alpha-tdep.c: Likewise.
3188         * arm-linux-tdep.c: Likewise.
3189         * m68k-linux-tdep.c: Likewise.
3190         * tilegx-tdep.c: Likewise.
3191         * xstormy16-tdep.c: Likewise.
3192
3193 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3194
3195         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3196         (mipsn32_fbsd_sigframe): Define.
3197         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3198         for FreeBSD/mipsn32.
3199
3200 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3201
3202         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3203         AT_HWCAP.
3204
3205 2017-10-05  Tristan Gingold  <tgingold@free.fr>
3206
3207         * MAINTAINERS (Misc): Update my email address.
3208
3209 2017-10-04  Pedro Alves  <palves@redhat.com>
3210
3211         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
3212         it instead of target_gdbarch.
3213         (get_remote_state, get_remote_packet_size): Adjust
3214         get_remote_arch_state calls, passing down target_gdbarch
3215         explicitly.
3216         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3217         'gdbarch' and use it instead of target_gdbarch.
3218         (get_memory_packet_size): Adjust get_remote_arch_state calls,
3219         passing down target_gdbarch explicitly.
3220         (struct stop_reply) <arch>: New field.
3221         (remote_parse_stop_reply): Use the stopped thread's architecture,
3222         not the current inferior's.  Save the architecture in the
3223         stop_reply.
3224         (process_stop_reply): Use the stop reply's architecture.
3225         (process_g_packet, remote_fetch_registers)
3226         (remote_prepare_to_store, store_registers_using_G)
3227         (remote_store_registers): Adjust get_remote_arch_state calls,
3228         using the regcache's architecture.
3229         (remote_get_trace_status): Adjust get_remote_arch_state calls,
3230         passing down target_gdbarch explicitly.
3231         * spu-multiarch.c (spu_thread_architecture): Defer to the target
3232         beneath instead of calling target_gdbarch.
3233         * target.c (default_thread_architecture): Use the specified
3234         inferior's architecture, instead of the current inferior's
3235         architecture (via target_gdbarch).
3236
3237 2017-10-04  Pedro Alves  <palves@redhat.com>
3238
3239         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3240         case.
3241         (regcache_print): Handle !target_has_registers here instead.
3242
3243 2017-10-04  Pedro Alves  <palves@redhat.com>
3244
3245         * frame.c (create_test_frame): Delete.
3246         * frame.h (create_test_frame): Delete.
3247         * gdbarch-selftests.c: Include gdbthread.h and target.h.
3248         (class regcache_test): Delete.
3249         (test_target_has_registers, test_target_has_stack)
3250         (test_target_has_memory, test_target_prepare_to_store)
3251         (test_target_store_registers): New functions.
3252         (test_target_ops): New class.
3253         (register_to_value_test): Error out if there's already a
3254         process_stratum (or higher) target pushed.  Create a fuller mock
3255         environment, with mock target_ops, inferior, address space, thread
3256         and inferior_ptid.
3257         * progspace.c (struct address_space): Move to ...
3258         * progspace.h (struct address_space): ... here.
3259         * regcache.h (regcache::~regcache, regcache::raw_write)
3260         [GDB_SELF_TEST]: No longer virtual.
3261
3262 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
3263
3264         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3265
3266 2017-10-04  Pedro Alves  <palves@redhat.com>
3267
3268         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3269         out of 'between TRY and CATCH'.
3270
3271 2017-10-04  Pedro Alves  <palves@redhat.com>
3272
3273         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3274         * common/common-exceptions.h (TRY): Open an outermost scope.
3275         Expand intro comment.
3276         (CATCH): Reindent.
3277         (END_CATCH): Close the outermost scope.
3278         * completer.c (complete_line_internal): Add missing END_CATCH.
3279
3280 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3281
3282         * NEWS (Changes since GDB 8.0): Add entry about new
3283         'set-cwd-on-gdbserver' feature.
3284         (New remote packets): Add entry for QSetWorkingDir.
3285         * common/common-inferior.h (set_inferior_cwd): New prototype.
3286         * infcmd.c (set_inferior_cwd): Remove "static".
3287         (show_cwd_command): Expand text to include remote debugging.
3288         * remote.c: Add PACKET_QSetWorkingDir.
3289         (remote_protocol_features) <QSetWorkingDir>: New entry for
3290         PACKET_QSetWorkingDir.
3291         (extended_remote_set_inferior_cwd): New function.
3292         (extended_remote_create_inferior): Call
3293         "extended_remote_set_inferior_cwd".
3294         (_initialize_remote): Call "add_packet_config_cmd" for
3295         QSetWorkingDir.
3296
3297 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3298
3299         * NEWS (New commands): Mention "set/show cwd".
3300         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3301         "cd" command's help text.
3302         * common/common-inferior.h (get_inferior_cwd): New prototype.
3303         * infcmd.c (inferior_cwd_scratch): New global variable.
3304         (set_inferior_cwd): New function.
3305         (get_inferior_cwd): Likewise.
3306         (set_cwd_command): Likewise.
3307         (show_cwd_command): Likewise.
3308         (_initialize_infcmd): Add "set/show cwd" commands.
3309         * inferior.h (class inferior) <cwd>: New field.
3310         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3311         (fork_inferior): Change inferior's cwd before its execution.
3312         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3313         to CreateProcess.
3314
3315 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3316
3317         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3318         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3319         (COMMON_OBS): Add gdb_tilde_expand.o.
3320         * common/gdb_tilde_expand.c: New file.
3321         * common/gdb_tilde_expand.h: Likewise.
3322
3323 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
3324
3325         * gdbarch.sh (objfile): Remove duplicate declaration.
3326         * gdbarch.h: Regenerate.
3327
3328 2017-10-03  Tom Tromey  <tom@tromey.com>
3329
3330         * utils.c (internal_vproblem): Use string_vprintf.
3331
3332 2017-10-03  Tom Tromey  <tom@tromey.com>
3333
3334         * printcmd.c (info_symbol_command): Use std::string.
3335
3336 2017-10-03  Tom Tromey  <tom@tromey.com>
3337
3338         * top.c (gdb_safe_append_history): Use std::string.
3339
3340 2017-10-03  Tom Tromey  <tom@tromey.com>
3341
3342         * event-top.c (stdin_event_handler): Update.
3343         * main.c (captured_main_1): Update.
3344         * top.h (make_delete_ui_cleanup): Remove.
3345         (struct ui): Add constructor and destructor.
3346         (new_ui, delete_ui): Remove.
3347         * top.c (make_delete_ui_cleanup): Remove.
3348         (new_ui_command): Use std::unique_ptr.
3349         (delete_ui_cleanup): Remove.
3350         (ui::ui): Rename from new_ui.  Update.
3351         (free_ui): Remove.
3352         (ui::~ui): Rename from delete_ui.  Update.
3353
3354 2017-10-03  Tom Tromey  <tom@tromey.com>
3355
3356         * symfile.c (load_progress): Use gdb::byte_vector.
3357
3358 2017-10-03  Tom Tromey  <tom@tromey.com>
3359
3360         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3361         declaration.
3362         * printcmd.c (x_command): Remove unused declaration.
3363         * symfile.c (symbol_file_command): Remove unused declaration.
3364
3365 2017-10-03  Tom Tromey  <tom@tromey.com>
3366
3367         * utils.c (internal_vproblem): Use std::string.
3368         (defaulted_query): Likewise.
3369
3370 2017-10-03  Tom Tromey  <tom@tromey.com>
3371
3372         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3373         * top.c (execute_command_to_string): Update.
3374         * utils.c (make_cleanup_restore_page_info): Remove.
3375         (do_restore_page_info_cleanup): Remove.
3376         (set_batch_flag_and_restore_page_info):
3377         New.
3378         (make_cleanup_restore_page_info): Remove.
3379         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3380         (~set_batch_flag_and_restore_page_info): New
3381         (make_cleanup_restore_uinteger): Remove.
3382         (make_cleanup_restore_integer): Remove.
3383         (struct restore_integer_closure): Remove.
3384         (restore_integer): Remove.
3385         * utils.h (struct set_batch_flag_and_restore_page_info): New
3386         class.
3387         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3388         (make_cleanup_restore_page_info): Remove.
3389         (make_cleanup_restore_uinteger) Remove.
3390         (make_cleanup_restore_integer) Remove.
3391
3392 2017-10-03  Tom Tromey  <tom@tromey.com>
3393
3394         * record-full.h (record_full_gdb_operation_disable_set): Return
3395         scoped_restore_tmpl<int>.
3396         * infrun.c (adjust_pc_after_break): Update.
3397         (handle_signal_stop): Update.
3398         * record-full.c (record_full_gdb_operation_disable_set): Return
3399         scoped_restore_tmpl<int>.
3400         (record_full_wait_1, record_full_insert_breakpoint)
3401         (record_full_remove_breakpoint, record_full_save)
3402         (record_full_goto_insn): Update.
3403
3404 2017-10-02  Tom Tromey  <tom@tromey.com>
3405
3406         PR rust/22236:
3407         * rust-lang.c (rust_val_print_str): New function.
3408         (val_print_struct): Call it.
3409         (rust_subscript): Preserve name of slice type.
3410
3411 2017-10-02  Tom Tromey  <tom@tromey.com>
3412
3413         * rust-lang.c (rust_subscript): Handle slices in
3414         EVAL_AVOID_SIDE_EFFECTS case.
3415
3416 2017-10-02  Tom Tromey  <tom@tromey.com>
3417
3418         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3419
3420 2017-10-02  Tom Tromey  <tom@tromey.com>
3421
3422         * rust-lang.h (rust_slice_type): Add "extern".
3423
3424 2017-10-02  Tom Tromey  <tom@tromey.com>
3425             Pedro Alves  <palves@redhat.com>
3426
3427         * ada-lang.h (ada_exc_info::operator<): Make const.
3428         (ada_exc_info::operator==): Make const.
3429         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3430         Make const.
3431
3432 2017-09-29  Tom Tromey  <tom@tromey.com>
3433
3434         * target.c (read_whatever_is_readable): Change type of "result".
3435         Update.
3436         (free_memory_read_result_vector): Remove.
3437         (read_memory_robust): Change return type.  Update.
3438         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
3439         bin2hex, std::string.
3440         * target.h (memory_read_result_s): Remove typedef.
3441         (free_memory_read_result_vector): Remove.
3442         (read_memory_robust): Return std::vector.
3443
3444 2017-09-29  Tom Tromey  <tom@tromey.com>
3445
3446         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3447
3448 2017-09-29  Tom Tromey  <tom@tromey.com>
3449
3450         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3451         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
3452         operator< and operator==.
3453         (ada_exceptions_list): Return a std::vector.
3454         * ada-lang.c (ada_exc_info::operator<): Rename from
3455         compare_ada_exception_info.
3456         (ada_exc_info::operator==): New.
3457         (sort_remove_dups_ada_exceptions_list): Change type of
3458         "exceptions".
3459         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3460         (ada_add_global_exceptions): Likewise.
3461         (ada_exceptions_list_1): Return a std::vector.
3462         (ada_exceptions_list): Likewise.
3463
3464 2017-09-29  Tom Tromey  <tom@tromey.com>
3465
3466         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3467         'std::set *'.
3468         (print_one_inferior): Update.
3469         (free_vector_of_ints): Remove.
3470         (list_available_thread_groups): Change "ids" to std::set.
3471         (mi_cmd_list_thread_groups): Update.
3472         (struct collect_cores_data) <core>: Now a std::set.
3473         (collect_cores): Update.
3474         (unique): Remove.
3475         (print_one_inferior): Update.
3476
3477 2017-09-29  Tom Tromey  <tom@tromey.com>
3478
3479         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3480         (mi_execute_async_cli_command): Likewise.
3481         (mi_cmd_trace_frame_collected): Use field_fmt.
3482
3483 2017-09-29  Tom Tromey  <tom@tromey.com>
3484
3485         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3486         gdb::byte_vector.
3487
3488 2017-09-29  Tom Tromey  <tom@tromey.com>
3489
3490         * mi/mi-parse.c (mi_parse): Remove unused declaration.
3491
3492 2017-09-29  Tom Tromey  <tom@tromey.com>
3493
3494         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3495
3496 2017-09-29  Tom Tromey  <tom@tromey.com>
3497
3498         * varobj.h (varobj_gen_name): Return std::string.
3499         * varobj.c (varobj_gen_name): Return std::string.
3500         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3501         (mi_cmd_var_delete): Don't copy "name".
3502
3503 2017-09-29  Tom Tromey  <tom@tromey.com>
3504
3505         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3506         (mi_cmd_break_insert_1): Update.
3507
3508 2017-09-29  Tom Tromey  <tom@tromey.com>
3509
3510         * target.h (make_scoped_defer_target_commit_resume): Update.
3511         * target.c (make_scoped_defer_target_commit_resume): Rename from
3512         make_cleanup_defer_target_commit_resume.  Return a
3513         scoped_restore.
3514         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3515
3516 2017-09-29  Tom Tromey  <tom@tromey.com>
3517
3518         * main.c (captured_main_1): Remove unused declaration.
3519         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3520
3521 2017-09-29  Tom Tromey  <tom@tromey.com>
3522
3523         * symtab.c (search_symbols): Remove unused outer cleanup.
3524         (make_source_files_completion_list): Remove unused declaration.
3525
3526 2017-09-29  Tom Tromey  <tom@tromey.com>
3527
3528         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3529
3530 2017-09-29  Tom Tromey  <tom@tromey.com>
3531
3532         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3533         gdb::byte_vector.
3534
3535 2017-09-29  Tom Tromey  <tom@tromey.com>
3536
3537         * complaints.c (vcomplaint): Use std::string.
3538
3539 2017-09-29  Tom Tromey  <tom@tromey.com>
3540
3541         * tracepoint.c (trace_variable_command): Use std::string.
3542         (encode_actions_1): Remove unused declarations.
3543         (create_tsv_from_upload): Use std::string.
3544
3545 2017-09-29  Tom Tromey  <tom@tromey.com>
3546
3547         * cp-support.c (gdb_demangle): Use std::string.
3548
3549 2017-09-29  Tom Tromey  <tom@tromey.com>
3550
3551         * stack.c (parse_frame_specification): Use std::string
3552         (info_frame_command): Use gdb::unique_xmalloc_ptr.
3553
3554 2017-09-29  Tom Tromey  <tom@tromey.com>
3555
3556         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3557
3558 2017-09-29  Tom Tromey  <tom@tromey.com>
3559
3560         * utils.c (vfprintf_maybe_filtered): Use std::string.
3561         (vfprintf_unfiltered): Likewise.
3562
3563 2017-09-29  Tom Tromey  <tom@tromey.com>
3564
3565         * event-top.c (top_level_prompt): Return std::string.
3566         (display_gdb_prompt): Update.
3567
3568 2017-09-29  Tom Tromey  <tom@tromey.com>
3569
3570         * unittests/common-utils-selftests.c (format): New function.
3571         (string_vprintf_tests): New function.
3572         (_initialize_common_utils_selftests): Register new tests.
3573         * common/common-utils.c (string_vprintf): New function.
3574         * common/common-utils.h (string_vprintf): Declare.
3575
3576 2017-09-29  Pedro Alves  <palves@redhat.com>
3577
3578         * common/rsp-low.c (unpack_varlen_hex): Constify.
3579         * common/rsp-low.h (unpack_varlen_hex): Constify.
3580         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3581         Constify.
3582         * remote.c (remote_set_permissions, read_ptid)
3583         (remote_current_thread, remote_get_threads_with_qthreadinfo)
3584         (remote_static_tracepoint_marker_at)
3585         (remote_static_tracepoint_markers_by_strid)
3586         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3587         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3588         (parse_tracepoint_definition, parse_tsv_definition)
3589         (parse_static_tracepoint_marker_definition): Constify.
3590         * tracepoint.h (parse_static_tracepoint_marker_definition)
3591         (parse_trace_status, parse_tracepoint_status)
3592         (parse_tracepoint_definition, parse_tsv_definition): Constify.
3593
3594 2017-09-29  Pedro Alves  <palves@redhat.com>
3595
3596         * remote.c (target_buf, target_buf_size): Delete.
3597         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3598         Use the connection's packet buffer instead.
3599         All callers adjusted.
3600         (_initialize_remote): Remove references to target_buf and
3601         target_buf_size.
3602
3603 2017-09-28  Pedro Alves  <palves@redhat.com>
3604
3605         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3606         unittests/common-utils-selftests.c.
3607         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
3608         (COMMON_OBS): Remove utils-selftests.o.
3609         * utils-selftests.c: Move to ...
3610         * unittests/common-utils-selftests.c: ... here and rename self
3611         test to "string_printf".
3612
3613 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
3614
3615         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
3616         having NULL cus or tus.
3617
3618 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3619
3620         * arm-tdep.c: (convert_from_extended): Remove.
3621         (convert_to_extended): Likewise.
3622         (arm_extract_return_value): Use convert_typed_floating.
3623         (arm_store_return_value): Likewise.
3624
3625         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3626         * sh-tdep.c: Do not include "floatformat.h".
3627         (sh_littlebyte_bigword_type): New function.
3628         (sh_register_convert_to_virtual): Use convert_typed_floating.
3629         (sh_register_convert_to_raw): Likewise.
3630         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3631         (sh64_littlebyte_bigword_type): New function.
3632         (sh64_extract_return_value): Use convert_typed_floating.
3633         (sh64_register_convert_to_virtual): Likewise.
3634         (sh64_register_convert_to_raw): Likewise.
3635
3636 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3637
3638         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
3639         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
3640
3641         * gdbtypes.h (union type_specific): Make field floatformat hold
3642         just a single struct floatformat, not an array.
3643         (floatformat_from_type): Move here.
3644         * gdbtypes.c (floatformat_from_type): Move here.  Update to
3645         changed TYPE_FLOATFORMAT definition.
3646         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
3647         (recursive_dump_type): Likewise.
3648         (init_float_type): Install correct floatformat for byte order.
3649         (arch_float_type): Likewise.
3650
3651 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3652
3653         * gdbtypes.c (init_type): Change incoming argument from
3654         length-in-bytes to length-in-bits.  Assert length is a
3655         multiple of TARGET_CHAR_BITS.
3656         (arch_type, arch_flags_type): Likewise.
3657         (init_integer_type): Update call to init_type.
3658         (init_character_type): Likewise.
3659         (init_boolean_type): Likewise.
3660         (init_float_type): Likewise.
3661         (init_decfloat_type): Likewise.
3662         (init_complex_type): Likewise.
3663         (init_pointer_type): Likewise.
3664         (objfile_type): Likewise.
3665         (arch_integer_type): Update call to arch_type.
3666         (arch_character_type): Likewise.
3667         (arch_boolean_type): Likewise.
3668         (arch_float_type): Likewise.
3669         (arch_decfloat_type): Likewise.
3670         (arch_complex_type): Likewise.
3671         (arch_pointer_type): Likewise.
3672         (gdbtypes_post_init): Likewise.
3673
3674         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
3675         (read_base_type): Likewise.
3676         * mdebugread.c (basic_type): Likewise.
3677         * stabsread.c (dbx_init_float_type): Likewise.
3678         (rs6000_builtin_type): Likewise.
3679         (read_range_type): Likewise.  Also, fix call to init_integer_type
3680         with erroneous length argument.
3681
3682         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
3683         * d-lang.c (build_d_types): Likewise.
3684         * f-lang.c (build_fortran_types): Likewise.
3685         * go-lang.c (build_go_types): Likewise.
3686         * opencl-lang.c (build_opencl_types): Likewise.
3687         * jit.c (finalize_symtab): Likewise.
3688         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
3689         (build_std_type_info_type): Likewise.
3690         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
3691         update call to arch_flags_type.
3692
3693         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
3694         arch_type.
3695         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
3696         * windows-tdep.c (windows_get_tlb_type): Likewise.
3697
3698         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
3699         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3700         * m32c-tdep.c (make_types): Likewise.
3701         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
3702         (rl78_psw_type): Update call to arch_flags_type.
3703         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
3704         * rx-tdep.c (rx_psw_type): Likewise.
3705         (rx_fpsw_type): Likewise.
3706         * sparc-tdep.c (sparc_psr_type): Likewise.
3707         (sparc_fsr_type): Likewise.
3708         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
3709         (sparc64_ccr_type): Likewise.
3710         (sparc64_fsr_type): Likewise.
3711         (sparc64_fprs_type): Likewise.
3712
3713 2017-09-27  Tom Tromey  <tom@tromey.com>
3714
3715         * findcmd.c (find_command): Constify.
3716
3717 2017-09-27  Tom Tromey  <tom@tromey.com>
3718
3719         * ada-tasks.c (task_command_1, task_command): Constify.
3720
3721 2017-09-27  Tom Tromey  <tom@tromey.com>
3722
3723         * symtab.c (maintenance_print_symbol_cache)
3724         (maintenance_flush_symbol_cache)
3725         (maintenance_print_symbol_cache_statistics): Constify.
3726
3727 2017-09-27  Tom Tromey  <tom@tromey.com>
3728
3729         * inferior.c (detach_inferior_command, kill_inferior_command)
3730         (inferior_command): Constify.
3731
3732 2017-09-27  Tom Tromey  <tom@tromey.com>
3733
3734         * regcache.c (regcache_print, maintenance_print_registers)
3735         (maintenance_print_raw_registers)
3736         (maintenance_print_cooked_registers)
3737         (maintenance_print_register_groups)
3738         (maintenance_print_remote_registers): Constify.
3739
3740 2017-09-27  Tom Tromey  <tom@tromey.com>
3741
3742         * printcmd.c (map_display_numbers, undisplay_command)
3743         (enable_disable_display_command, enable_display_command)
3744         (disable_display_command): Constify.
3745
3746 2017-09-27  Tom Tromey  <tom@tromey.com>
3747
3748         * breakpoint.h (delete_command): Don't declare.
3749         * breakpoint.c (delete_command, enable_once_command)
3750         (enable_count_command, enable_delete_command, breakpoint_1)
3751         (maintenance_info_breakpoints, stopin_command, stopat_command)
3752         (delete_command, delete_trace_command, save_breakpoints)
3753         (save_breakpoints_command, save_tracepoints_command): Constify.
3754
3755 2017-09-27  Tom Tromey  <tom@tromey.com>
3756
3757         * macrocmd.c (macro_expand_command, macro_expand_once_command)
3758         (skip_ws, extract_identifier, macro_define_command)
3759         (macro_undef_command, macro_list_command): Constify.
3760
3761 2017-09-27  Tom Tromey  <tom@tromey.com>
3762
3763         * infcmd.c (environment_info, set_environment_command)
3764         (unset_environment_command, path_info, info_proc_cmd_1)
3765         (info_proc_cmd_mappings, info_proc_cmd_stat)
3766         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
3767         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
3768
3769 2017-09-27  Tom Tromey  <tom@tromey.com>
3770
3771         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
3772         Constify.
3773
3774 2017-09-27  Tom Tromey  <tom@tromey.com>
3775
3776         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
3777
3778 2017-09-27  Tom Tromey  <tom@tromey.com>
3779
3780         * demangle.c (demangle_command): Constify.
3781
3782 2017-09-27  Tom Tromey  <tom@tromey.com>
3783
3784         * progspace.c (maintenance_info_program_spaces_command):
3785         Constify.
3786
3787 2017-09-27  Tom Tromey  <tom@tromey.com>
3788
3789         * compile/compile.c (check_raw_argument, compile_file_command)
3790         (compile_code_command, compile_print_command): Constify.
3791
3792 2017-09-27  Tom Tromey  <tom@tromey.com>
3793
3794         * reggroups.c (maintenance_print_reggroups): Constify.
3795
3796 2017-09-27  Tom Tromey  <tom@tromey.com>
3797
3798         * dwarf2read.c (save_gdb_index_command): Constify.
3799
3800 2017-09-27  Tom Tromey  <tom@tromey.com>
3801
3802         * stap-probe.c (info_probes_stap_command): Constify.
3803
3804 2017-09-27  Tom Tromey  <tom@tromey.com>
3805
3806         * fork-child.c (unset_exec_wrapper_command): Constify.
3807
3808 2017-09-27  Tom Tromey  <tom@tromey.com>
3809
3810         * btrace.c (get_uint, get_context_size, no_chunk)
3811         (maint_btrace_packet_history_cmd)
3812         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
3813         (maint_info_btrace_cmd): Constify.
3814
3815 2017-09-27  Tom Tromey  <tom@tromey.com>
3816
3817         * reverse.c (delete_bookmark_command): Constify.
3818
3819 2017-09-27  Tom Tromey  <tom@tromey.com>
3820
3821         * remote.c (set_memory_packet_size)
3822         (set_memory_write_packet_size, show_memory_write_packet_size)
3823         (set_memory_read_packet_size, show_memory_read_packet_size)
3824         (compare_sections_command, packet_command, remote_put_command)
3825         (remote_get_command, remote_delete_command): Constify.
3826
3827 2017-09-27  Tom Tromey  <tom@tromey.com>
3828
3829         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
3830         (set_mipsfpu_double_command, set_mipsfpu_none_command)
3831         (set_mipsfpu_auto_command): Constify.
3832
3833 2017-09-27  Tom Tromey  <tom@tromey.com>
3834
3835         * cli/cli-cmds.h (cd_command): Constify.
3836         * cli/cli-cmds.c (cd_command): Constify.
3837
3838 2017-09-27  Tom Tromey  <tom@tromey.com>
3839
3840         * thread.c (thread_name_command, thread_find_command): Constify.
3841
3842 2017-09-27  Tom Tromey  <tom@tromey.com>
3843
3844         * probe.c (enable_probes_command, disable_probes_command):
3845         Constify.
3846
3847 2017-09-27  Tom Tromey  <tom@tromey.com>
3848
3849         * symfile.c (symbol_file_command): Constify.
3850         * gdbcore.h (deprecated_file_changed_hook): Constify.
3851         * exec.c (deprecated_file_changed_hook, exec_file_command)
3852         (file_command): Constify.
3853         * defs.h (symbol_file_command): Constify.
3854
3855 2017-09-27  Tom Tromey  <tom@tromey.com>
3856
3857         * remote-fileio.c (set_system_call_allowed)
3858         (show_system_call_allowed): Constify.
3859
3860 2017-09-27  Tom Tromey  <tom@tromey.com>
3861
3862         * tracepoint.c (delete_trace_variable_command)
3863         (tfind_end_command, tfind_start_command, tfind_pc_command)
3864         (tfind_tracepoint_command, tfind_line_command)
3865         (tfind_range_command, tfind_outside_command): Constify.
3866
3867 2017-09-27  Tom Tromey  <tom@tromey.com>
3868
3869         * ax-gdb.c (maint_agent_printf_command, agent_command)
3870         (agent_eval_command): Constify.
3871
3872 2017-09-27  Tom Tromey  <tom@tromey.com>
3873
3874         * tracepoint.c (info_scope_command): Constify.
3875         * python/python.c (gdbpy_decode_line): Constify.
3876         * python/py-breakpoint.c (bppy_init): Constify.
3877         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
3878         * location.h: (new_linespec_location)
3879         (string_to_event_location_basic, string_to_event_location):
3880         Constify.
3881         * location.c (new_linespec_location)
3882         (string_to_event_location_basic, string_to_event_location):
3883         Constify.
3884         * linespec.h (decode_line_with_current_source)
3885         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
3886         * linespec.c (linespec_lex_to_end)
3887         (decode_line_with_current_source)
3888         (decode_line_with_last_displayed): Constify.
3889         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
3890         Constify.
3891         * cli/cli-cmds.c (edit_command, list_command): Constify.
3892         * breakpoint.h (until_break_command, watch_command_wrapper)
3893         (awatch_command_wrapper, rwatch_command_wrapper)
3894         (init_ada_exception_breakpoint): Constify.
3895         * breakpoint.c (break_command_1, dprintf_command)
3896         (break_range_command, watch_command_wrapper)
3897         (rwatch_command_wrapper, awatch_command_wrapper)
3898         (until_break_command, init_ada_exception_breakpoint)
3899         (strace_marker_create_sals_from_location, trace_command)
3900         (ftrace_command, strace_command, struct tracepoint): Constify.
3901         * ax-gdb.c (agent_command_1): Constify.
3902         * ada-lang.c (ada_exception_sal): Constify.
3903
3904 2017-09-27  Tom Tromey  <tom@tromey.com>
3905
3906         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
3907         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
3908         (get_context_size, no_chunk, get_insn_history_modifiers)
3909         (cmd_record_insn_history, get_call_history_modifiers)
3910         (cmd_record_call_history): Constify.
3911
3912 2017-09-27  Tom Tromey  <tom@tromey.com>
3913
3914         * source.c (show_substitute_path_command)
3915         (unset_substitute_path_command, set_substitute_path_command):
3916         Constify.
3917
3918 2017-09-27  Tom Tromey  <tom@tromey.com>
3919
3920         * typeprint.c (maintenance_print_type): Constify.
3921         * maint.c (maintenance_dump_me, maintenance_demangle)
3922         (maintenance_time_display, maintenance_info_sections)
3923         (maintenance_print_statistics, maintenance_deprecate)
3924         (maintenance_undeprecate): Constify.
3925         (maintenance_do_deprecate): Constify.  Use std::string.
3926         (maintenance_selftest): Constify.
3927         * gdbtypes.h (maintenance_print_type): Constify.
3928
3929 2017-09-27  Tom Tromey  <tom@tromey.com>
3930
3931         * hppa-tdep.c (unwind_command): Constify.
3932
3933 2017-09-27  Tom Tromey  <tom@tromey.com>
3934
3935         * target-descriptions.c (unset_tdesc_filename_cmd)
3936         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
3937         Constify.
3938
3939 2017-09-27  Tom Tromey  <tom@tromey.com>
3940
3941         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
3942
3943 2017-09-27  Tom Tromey  <tom@tromey.com>
3944
3945         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
3946
3947 2017-09-27  Tom Tromey  <tom@tromey.com>
3948
3949         * tui/tui-regs.c (tui_reg_command): Constify.
3950
3951 2017-09-27  Tom Tromey  <tom@tromey.com>
3952
3953         * skip.c (skip_file_command, skip_function_command)
3954         (skip_enable_command, skip_disable_command, skip_delete_command):
3955         Constify.
3956
3957 2017-09-27  Tom Tromey  <tom@tromey.com>
3958
3959         * record-btrace.c (cmd_record_btrace_bts_start)
3960         (cmd_record_btrace_pt_start): Constify.
3961
3962 2017-09-27  Tom Tromey  <tom@tromey.com>
3963
3964         * symmisc.c (maintenance_print_symbols)
3965         (maintenance_print_msymbols, maintenance_print_objfiles)
3966         (maintenance_info_symtabs, maintenance_check_symtabs)
3967         (maintenance_expand_symtabs, maintenance_info_line_tables):
3968         Constify.
3969
3970 2017-09-27  Tom Tromey  <tom@tromey.com>
3971
3972         * top.c (new_ui_command): Constify.
3973
3974 2017-09-27  Tom Tromey  <tom@tromey.com>
3975
3976         * symfile.c (add_symbol_file_command)
3977         (remove_symbol_file_command, list_overlays_command)
3978         (map_overlay_command, unmap_overlay_command)
3979         (overlay_auto_command, overlay_manual_command)
3980         (overlay_off_command, overlay_load_command): Constify.
3981
3982 2017-09-27  Tom Tromey  <tom@tromey.com>
3983
3984         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
3985         (info_spu_mailbox_command, info_spu_dma_command)
3986         (info_spu_proxydma_command): Constify.
3987
3988 2017-09-27  Tom Tromey  <tom@tromey.com>
3989
3990         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
3991
3992 2017-09-27  Tom Tromey  <tom@tromey.com>
3993
3994         * cli/cli-script.c (user_defined_command): Constify.
3995
3996 2017-09-27  Tom Tromey  <tom@tromey.com>
3997
3998         * cli/cli-dump.c (dump_memory_command, dump_value_command)
3999         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4000         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4001         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4002         (dump_binary_value, append_binary_memory, append_binary_value):
4003         Constify.
4004         (struct dump_context) <func>: Constify.
4005         (add_dump_command): Update.
4006
4007 2017-09-27  Tom Tromey  <tom@tromey.com>
4008
4009         * cli/cli-cmds.c (show_version, show_configuration)
4010         (source_command, show_user): Constify.
4011
4012 2017-09-27  Tom Tromey  <tom@tromey.com>
4013
4014         * target.c (maintenance_print_target_stack): Constify.
4015
4016 2017-09-27  Tom Tromey  <tom@tromey.com>
4017
4018         * interps.c (interpreter_exec_cmd): Constify.
4019
4020 2017-09-27  Tom Tromey  <tom@tromey.com>
4021
4022         * record-full.c (cmd_record_full_restore): Constify.
4023
4024 2017-09-27  Tom Tromey  <tom@tromey.com>
4025
4026         * memattr.c (enable_mem_command, disable_mem_command)
4027         (delete_mem_command): Constify.
4028
4029 2017-09-27  Tom Tromey  <tom@tromey.com>
4030
4031         * value.c (show_convenience): Constify.
4032
4033 2017-09-27  Tom Tromey  <tom@tromey.com>
4034
4035         * gdbcore.h (core_file_command): Update.
4036         * corefile.c (core_file_command): Constify.
4037
4038 2017-09-27  Tom Tromey  <tom@tromey.com>
4039
4040         * user-regs.c (maintenance_print_user_registers): Constify.
4041
4042 2017-09-27  Tom Tromey  <tom@tromey.com>
4043
4044         * cp-namespace.c (maintenance_cplus_namespace): Constify.
4045
4046 2017-09-27  Tom Tromey  <tom@tromey.com>
4047
4048         * cp-support.c (first_component_command): Constify.
4049
4050 2017-09-27  Tom Tromey  <tom@tromey.com>
4051
4052         * psymtab.c (maintenance_print_psymbols)
4053         (maintenance_info_psymtabs, maintenance_check_psymtabs):
4054         Constify.
4055
4056 2017-09-27  Tom Tromey  <tom@tromey.com>
4057
4058         * windows-tdep.c (display_tib): Constify.
4059
4060 2017-09-27  Tom Tromey  <tom@tromey.com>
4061
4062         * linux-fork.c (delete_checkpoint_command)
4063         (detach_checkpoint_command): Constify.
4064
4065 2017-09-27  Tom Tromey  <tom@tromey.com>
4066
4067         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4068
4069 2017-09-27  Tom Tromey  <tom@tromey.com>
4070
4071         * arc-tdep.c (dump_arc_instruction_command): Constify.
4072
4073 2017-09-27  Tom Tromey  <tom@tromey.com>
4074
4075         * valprint.c (set_radix, show_radix): Constify.
4076
4077 2017-09-27  Tom Tromey  <tom@tromey.com>
4078
4079         * dtrace-probe.c (info_probes_dtrace_command): Constify.
4080
4081 2017-09-27  Tom Tromey  <tom@tromey.com>
4082
4083         * command.h (not_just_help_class_command): Update.
4084         * cli/cli-decode.h (not_just_help_class_command): Update.
4085         * cli/cli-decode.c (not_just_help_class_command): Constify.
4086
4087 2017-09-27  Tom Tromey  <tom@tromey.com>
4088
4089         * gdb_bfd.c (maintenance_info_bfds): Constify.
4090
4091 2017-09-27  Tom Tromey  <tom@tromey.com>
4092
4093         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4094         overloads.
4095         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
4096         (do_const_cfunc): New function.
4097         (cmd_cfunc_eq): New overload.
4098         (cli_user_command_p): Check do_const_cfunc.
4099         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4100         const_cfunc.
4101         * command.h (add_cmd): Add const overload and no-function
4102         overload.
4103         (set_cmd_cfunc): Add const overload.
4104         (cmd_const_cfunc_ftype): Declare.
4105         (cmd_cfunc_eq): Add const overload.
4106         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4107         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4108         overload.
4109
4110 2017-09-27  Tom Tromey  <tom@tromey.com>
4111
4112         * macroexp.c (get_next_token_for_substitution): New function.
4113         (substitute_args): Call it.  Check for __VA_OPT__.
4114
4115 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4116             Pedro Alves <palves@redhat.com>
4117
4118         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4119         producer_is_icc_lt_14.
4120         (producer_is_icc_lt_14): New function.
4121         (check_producer): Add code for checking version of ICC.
4122         (producer_is_icc): Move to producer.c.
4123         (read_structure_type): Restrict ICC workaround to ICC<14.
4124         * producer.c: Include selftest.h.
4125         (producer_is_icc, producer_parsing_tests, _initialize_producer):
4126         New functions.
4127         * producer.h (producer_is_icc): New declaration.
4128
4129 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4130
4131         * Makefile.in (SFILES): Add producer.c.
4132         (COMMON_OBS): Add producer.o
4133         * amd64-tdep.c (producer.h): Add new include.
4134         * dwarf2read.c (producer.h): Add new include.
4135         * producer.c: New file.
4136         * producer.h: New file.
4137         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4138         producer.c.
4139         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4140         producer.h.
4141
4142 2017-09-26  Matthias Klose  <doko@ubuntu.com>
4143
4144         * configure.ac: Search ncursesw before ncurses.
4145         Check ncursesw/ncurses.h before ncurses/ncurses.h.
4146         * gdb_curses.h: Include <ncursesw/ncurses.h>
4147         * config.in, configure: Regenerate.
4148
4149 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4150
4151         PR gdb/22185
4152         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4153         obsolete.
4154         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4155         Remove i386sol2 support.
4156         * configure.nat <i386sol2>: Remove.
4157         <sol2-64>: Fold into ...
4158         <sol2>: ... this.
4159         Move common settings to default section.
4160         Add sol-thread.o.
4161         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4162         x86_64-*-solaris2.1[0-9]*>: Rename to ...
4163         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4164         <i[34567]86-*-solaris*>: Remove.
4165         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4166
4167         * configure.ac: Remove wctype in libw check.
4168         (_MSE_INT_H): Don't define on Solaris 7-9.
4169         <solaris*>: Remove libthread_db.so.1 check.
4170         * configure: Regenerate.
4171         * config.in: Regenerate.
4172
4173         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4174         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4175         (gdb_ps_size_t): Remove.
4176         Use base types in users.
4177         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4178
4179         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4180
4181 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4182
4183         PR build/22206
4184         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4185         (adi_is_addr_mapped): Likewise.
4186         (PSR_ICC): Don't redefine.
4187         (PSR_IMPL): Likewise.
4188
4189 2017-09-25  Tom Tromey  <tom@tromey.com>
4190
4191         * regcache.c (regcache::dump): Use string_printf.
4192
4193 2017-09-25  Tom Tromey  <tom@tromey.com>
4194
4195         * regcache.c (class regcache_invalidator): New.
4196         (struct register_to_invalidate): Remove.
4197         (make_cleanup_regcache_invalidate): Remove.
4198         (regcache::raw_write): Use regcache_invalidator.
4199
4200 2017-09-25  Tom Tromey  <tom@tromey.com>
4201
4202         * spu-tdep.c (spu2ppu_sniffer): Update.
4203         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4204         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4205         Remove.
4206         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4207         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4208         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4209         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4210         (frame_pop): Update.
4211
4212 2017-09-25  Tom Tromey  <tom@tromey.com>
4213
4214         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4215         * regcache.h (regcache_xfree): Don't declare.
4216         * regcache.c (regcache_xfree): Remove.
4217         (do_regcache_xfree): Use delete.
4218         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4219         * linux-fork.c (free_fork): Use delete.
4220         (fork_save_infrun_state): Likewise.
4221         * jit.c (jit_dealloc_cache): Use delete.
4222         * infrun.c (discard_infcall_suspend_state): Use delete.
4223
4224 2017-09-25  Tom Tromey  <tom@tromey.com>
4225
4226         * regcache.h (regcache_xmalloc): Don't declare.
4227         (regcache_raw_set_cached_value): Update comment.
4228         * regcache.c (regcache_xmalloc): Remove.
4229         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4230         * jit.c (jit_frame_sniffer): Use new.
4231         * frame.c (frame_save_as_regcache): Use new.
4232
4233 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4234
4235         * NEWS: Advertise support for guarded-storage registers on IBM z.
4236
4237 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4238
4239         * s390-linux-nat.c (have_regset_gs): New static variable.
4240         (s390_linux_fetch_inferior_registers): Handle guarded-storage
4241         control block and guarded-storage broadcast control regsets.
4242         (s390_read_description): Detect whether the target has
4243         guarded-storage support, return appropriate tdesc.
4244         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4245         (features/s390x-gs-linux64.c): Likewise.
4246         (struct gdbarch_tdep) <have_gs>: New field.
4247         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4248         (s390_gsbc_regset): New variables.
4249         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4250         and s390_gsbc_regset, if applicable.
4251         (s390_core_read_description): Check whether core file was from a
4252         target with guarded-storage support; include appropriate regsets.
4253         (s390_gdbarch_init): Add registers for guarded-storage support.
4254         (_initialize_s390_tdep): Initialize new target descriptions that
4255         include registers for guarded-storage support.
4256         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4257         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4258         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4259         (S390_NUM_REGS): Adjust macro definition.
4260         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4261         (tdesc_s390x_gs_linux64): New declarations.
4262
4263 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4264
4265         * features/s390-gs-linux64.xml: New file.
4266         * features/s390-gs.xml: New file.
4267         * features/s390-gsbc.xml: New file.
4268         * features/s390x-gs-linux64.xml: New file.
4269         * features/Makefile (WHICH): Add s390-gs-linux64 and
4270         s390x-gs-linux64.
4271         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4272         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4273         * features/s390-gs-linux64.c: New generated file.
4274         * features/s390x-gs-linux64.c: New file.
4275         * regformats/s390-gs-linux64.dat: New file.
4276         * regformats/s390x-gs-linux64.dat: New file.
4277
4278 2017-09-23  Tom Tromey  <tom@tromey.com>
4279
4280         * defs.h (make_cleanup_override_quit_handler): Don't declare.
4281
4282 2017-09-22  Tom Tromey  <tom@tromey.com>
4283
4284         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4285         type to scoped_restore_tmpl.
4286         <scoped_input_handler>: Initialize m_quit_handler directly.
4287
4288 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4289
4290         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4291         (cd_command): Likewise.  Free "current_directory" before
4292         assigning to it.
4293         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4294         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4295         * top.c (gdb_dirbuf): Remove global declaration.
4296         * top.h (gdb_dirbuf): Likewise.
4297
4298 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4299
4300         * gnulib/aclocal.m4: Regenerate.
4301         * gnulib/config.in: Regenerate.
4302         * gnulib/configure: Regenerate.
4303         * gnulib/import/Makefile.am: Regenerate.
4304         * gnulib/import/Makefile.in: Regenerate.
4305         * gnulib/import/assure.h: New file.
4306         * gnulib/import/at-func.c: Likewise
4307         * gnulib/import/chdir-long.c: New file.
4308         * gnulib/import/chdir-long.h: New file.
4309         * gnulib/import/cloexec.c: New file.
4310         * gnulib/import/cloexec.h: New file.
4311         * gnulib/import/close.c: New file.
4312         * gnulib/import/closedir.c: New file.
4313         * gnulib/import/dirent-private.h: New file.
4314         * gnulib/import/dup-safer.c: New file.
4315         * gnulib/import/dup.c: New file.
4316         * gnulib/import/dup2.c: New file.
4317         * gnulib/import/error.c: New file.
4318         * gnulib/import/error.h: New file.
4319         * gnulib/import/exitfail.c: New file.
4320         * gnulib/import/exitfail.h: New file.
4321         * gnulib/import/fchdir.c: New file.
4322         * gnulib/import/fcntl.c: New file.
4323         * gnulib/import/fcntl.in.h: New file.
4324         * gnulib/import/fd-hook.c: New file.
4325         * gnulib/import/fd-hook.h: New file.
4326         * gnulib/import/fd-safer.c: New file.
4327         * gnulib/import/fdopendir.c: New file.
4328         * gnulib/import/filename.h: New file.
4329         * gnulib/import/filenamecat-lgpl.c: New file.
4330         * gnulib/import/filenamecat.h: New file.
4331         * gnulib/import/fstat.c: New file.
4332         * gnulib/import/fstatat.c: New file.
4333         * gnulib/import/getcwd-lgpl.c: New file.
4334         * gnulib/import/getcwd.c: New file.
4335         * gnulib/import/getdtablesize.c: New file.
4336         * gnulib/import/getlogin_r.c: New file.
4337         * gnulib/import/getprogname.c: New file.
4338         * gnulib/import/getprogname.h: New file.
4339         * gnulib/import/gettext.h: New file.
4340         * gnulib/import/glob-libc.h: New file.
4341         * gnulib/import/glob.c: New file.
4342         * gnulib/import/glob.in.h: New file.
4343         * gnulib/import/intprops.h: New file.
4344         * gnulib/import/m4/chdir-long.m4: New file.
4345         * gnulib/import/m4/close.m4: New file.
4346         * gnulib/import/m4/closedir.m4: New file.
4347         * gnulib/import/m4/d-ino.m4: New file.
4348         * gnulib/import/m4/d-type.m4: New file.
4349         * gnulib/import/m4/dup.m4: New file.
4350         * gnulib/import/m4/dup2.m4: New file.
4351         * gnulib/import/m4/error.m4: New file.
4352         * gnulib/import/m4/fchdir.m4: New file.
4353         * gnulib/import/m4/fcntl.m4: New file.
4354         * gnulib/import/m4/fcntl_h.m4: New file.
4355         * gnulib/import/m4/fdopendir.m4: New file.
4356         * gnulib/import/m4/filenamecat.m4: New file.
4357         * gnulib/import/m4/fstat.m4: New file.
4358         * gnulib/import/m4/fstatat.m4: New file.
4359         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4360         * gnulib/import/m4/getcwd-path-max.m4: New file.
4361         * gnulib/import/m4/getcwd.m4: New file.
4362         * gnulib/import/m4/getdtablesize.m4: New file.
4363         * gnulib/import/m4/getlogin_r.m4: New file.
4364         * gnulib/import/m4/getprogname.m4: New file.
4365         * gnulib/import/m4/glob.m4: New file.
4366         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4367         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4368         * gnulib/import/m4/mempcpy.m4: New file.
4369         * gnulib/import/m4/memrchr.m4: New file.
4370         * gnulib/import/m4/mode_t.m4: New file.
4371         * gnulib/import/m4/msvc-inval.m4: New file.
4372         * gnulib/import/m4/msvc-nothrow.m4: New file.
4373         * gnulib/import/m4/open.m4: New file.
4374         * gnulib/import/m4/openat.m4: New file.
4375         * gnulib/import/m4/opendir.m4: New file.
4376         * gnulib/import/m4/readdir.m4: New file.
4377         * gnulib/import/m4/realloc.m4: New file.
4378         * gnulib/import/m4/rewinddir.m4: New file.
4379         * gnulib/import/m4/save-cwd.m4: New file.
4380         * gnulib/import/m4/strdup.m4: New file.
4381         * gnulib/import/m4/strerror.m4: New file.
4382         * gnulib/import/m4/unistd-safer.m4: New file.
4383         * gnulib/import/mempcpy.c: New file.
4384         * gnulib/import/memrchr.c: New file.
4385         * gnulib/import/msvc-inval.c: New file.
4386         * gnulib/import/msvc-inval.h: New file.
4387         * gnulib/import/msvc-nothrow.c: New file.
4388         * gnulib/import/msvc-nothrow.h: New file.
4389         * gnulib/import/open.c: New file.
4390         * gnulib/import/openat-die.c: New file.
4391         * gnulib/import/openat-priv.h: New file.
4392         * gnulib/import/openat-proc.c: New file.
4393         * gnulib/import/openat.c: New file.
4394         * gnulib/import/openat.h: New file.
4395         * gnulib/import/opendir.c: New file.
4396         * gnulib/import/pipe-safer.c: New file.
4397         * gnulib/import/readdir.c: New file.
4398         * gnulib/import/realloc.c: New file.
4399         * gnulib/import/rewinddir.c: New file.
4400         * gnulib/import/save-cwd.c: New file.
4401         * gnulib/import/save-cwd.h: New file.
4402         * gnulib/import/strdup.c: New file.
4403         * gnulib/import/strerror-override.c: New file.
4404         * gnulib/import/strerror-override.h: New file.
4405         * gnulib/import/strerror.c: New file.
4406         * gnulib/import/unistd--.h: New file.
4407         * gnulib/import/unistd-safer.h: New file.
4408         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4409         "getcwd" and "glob".
4410         * ser-tcp.c: Undefine "close" before redefining it.
4411
4412 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4413
4414         * guile/scm-value.c (gdbscm_value_address): Initialize address,
4415         get rid of res_val.
4416
4417 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4418
4419         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4420         <sol2,sparc>: Likewise.
4421         <sol2-64,i386>: Likewise.
4422
4423         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4424         -Wdeprecated-declarations on *-*-solaris*.
4425         * configure: Regenerate.
4426
4427         * procfs.c: Include "nat/inferior.h".
4428         (procfs_info_proc): Fix typo.
4429
4430 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4431
4432         * remote.c (vector): Include.
4433         (struct private_thread_info): Add field, thread_handle.
4434         (free_private_thread_info): Deallocate storage associated with
4435         thread handle.
4436         (get_private_info_thread): Initialize `thread_handle' field.
4437         (struct thread_item): Add field, thread_handle.
4438         (clear_threads_listing_context): Deallocate storage associated
4439         with thread handle.
4440         (start_thread): Add support for "handle" attribute.
4441         (thread_attributes): Add "handle".
4442         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4443         field.
4444         (remote_update_thread_list): Update thread_handle.
4445         (remote_thread_handle_to_thread_info): New function.
4446         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4447
4448 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4449
4450         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4451         function.
4452         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4453         * python/python-internal.h (thread_object_type): Declare.
4454
4455 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4456
4457         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4458         (target_thread_handle_to_thread_info): Declare.
4459         * target.c (target_thread_handle_to_thread_info): New function.
4460         * target-delegates.c: Regenerate.
4461         * gdbthread.h (find_thread_by_handle): Declare.
4462         * thread.c (find_thread_by_handle): New function.
4463         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4464         function.
4465         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4466
4467 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4468
4469         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4470
4471 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4472
4473         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4474
4475 2017-09-21  Yao Qi  <yao.qi@linaro.org>
4476
4477         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4478         to gdb_target_obs.
4479
4480 2017-09-20  Tom Tromey  <tom@tromey.com>
4481
4482         * breakpoint.c (struct counted_command_line): Remove.
4483         (breakpoint_commands): Update.
4484         (alloc_counted_command_line, incref_counted_command_line)
4485         (decref_counted_command_line, do_cleanup_counted_command_line)
4486         (make_cleanup_decref_counted_command_line): Remove.
4487         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4488         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4489         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4490         (save_breakpoints): Update.
4491         * breakpoint.h (counted_command_line): Now a typedef to
4492         shared_ptr.
4493         (struct breakpoint) <commands>: Now a counted_command_line.
4494         (struct bpstats) <command>: Likewise.
4495
4496 2017-09-20  Tom Tromey  <tom@tromey.com>
4497
4498         * breakpoint.c (struct commands_info, do_map_commands_command):
4499         Remove.
4500         (commands_command_1): Update.
4501         (iterate_over_related_breakpoints): Take a function_view.
4502         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4503         (delete_command): Update.
4504         (map_breakpoint_numbers): Take a function_view.
4505         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4506         (disable_command): Update.
4507         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4508         (enable_command): Update.
4509         (struct disp_data, do_enable_breakpoint_disp)
4510         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4511         (do_map_enable_delete_breakpoint): Remove.
4512         (enable_once_command, enable_count_command, enable_delete_command)
4513         (delete_trace_variable_command): Update.
4514
4515 2017-09-20  Tom Tromey  <tom@tromey.com>
4516
4517         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
4518         (bpstat_clear): Use delete.
4519         (bpstats): New constructors.
4520         (bpstat_copy, bpstat_stop_status): Use new.
4521         (dprintf_after_condition_true): Update.
4522         * breakpoint.h (bpstats::bpstats): Add constructors.
4523         (bpstats::~bpstats): Add destructor.
4524
4525 2017-09-20  Pedro Alves  <palves@redhat.com>
4526
4527         * eval.c (make_params): Delete, refactored as ...
4528         (class fake_method): ... this new type's ctor.
4529         (fake_method::~fake_method): New.
4530         (evaluate_subexp_standard): Use 'fake_method'.
4531
4532 2017-09-20  Tom Tromey  <tom@tromey.com>
4533
4534         * windows-nat.c (get_windows_debug_event, windows_wait)
4535         (do_initial_windows_stuff, windows_attach): Update.
4536         * utils.c (vwarning, internal_vproblem): Update.
4537         (ui_unregister_input_event_handler_cleanup)
4538         (prepare_to_handle_input): Remove.
4539         (class scoped_input_handler): New.
4540         (defaulted_query, prompt_for_continue): Update.
4541         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4542         Update.
4543         * top.c (undo_terminal_modifications_before_exit): Update.
4544         * target/target.h (target_terminal_init, target_terminal_inferior)
4545         (target_terminal_ours): Don't declare.
4546         (class target_terminal): New.
4547         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4548         (target_terminal_ours_for_output)
4549         (make_cleanup_restore_target_terminal): Don't declare.
4550         (target_terminal_info): Remove.
4551         * target.c (enum terminal_state, terminal_state): Remove.
4552         (target_terminal::terminal_state): Define.
4553         (target_terminal::init): Rename from target_terminal_init.
4554         (target_terminal::inferior): Rename from
4555         target_terminal_inferior.
4556         (target_terminal::ours): Rename from target_terminal_ours.
4557         (target_terminal::ours_for_output): Rename from
4558         target_terminal_ours_for_output.
4559         (target_terminal::info): New method.
4560         (cleanup_restore_target_terminal)
4561         (make_cleanup_restore_target_terminal): Remove.
4562         * solib.c (handle_solib_event): Update.
4563         * remote.c (remote_serial_quit_handler): Update.
4564         (remote_terminal_inferior, remote_wait_as): Update.
4565         * record-full.c (record_full_wait_1): Update.
4566         * nto-procfs.c (procfs_create_inferior): Update.
4567         * nat/fork-inferior.c (startup_inferior): Update.
4568         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4569         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4570         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4571         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4572         (mi_breakpoint_created, mi_breakpoint_deleted)
4573         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4574         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4575         (mi_user_selected_context_changed, report_initial_inferior):
4576         Update.
4577         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4578         (linux_nat_terminal_inferior): Update.
4579         * infrun.c (follow_fork_inferior)
4580         (handle_vfork_child_exec_or_exit, do_target_resume)
4581         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4582         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4583         Update.
4584         * inflow.c (child_terminal_init, info_terminal_command): Update.
4585         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4586         (attach_command): Update.
4587         * infcall.c (call_thread_fsm_should_stop): Update.
4588         * gnu-nat.c (gnu_attach): Update.
4589         * extension.c (struct active_ext_lang_state)
4590         (restore_active_ext_lang): Update.
4591         * exceptions.c (print_flush): Update.
4592         * event-top.c (async_enable_stdin, default_quit_handler): Update.
4593         (struct quit_handler_cleanup_data, restore_quit_handler)
4594         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4595         Remove.
4596         * cp-support.c (gdb_demangle): Update.
4597         * breakpoint.c (update_inserted_breakpoint_locations)
4598         (insert_breakpoint_locations, handle_jit_event)
4599         (disable_breakpoints_in_unloaded_shlib): Update.
4600         * annotate.c (annotate_breakpoints_invalid)
4601         (annotate_frames_invalid): Update.
4602
4603 2017-09-20  Tom Tromey  <tom@tromey.com>
4604
4605         * main.c (catch_command_errors): Rename from
4606         catch_command_errors_const.
4607         (captured_main_1): Update.
4608
4609 2017-09-20  Pedro Alves  <palves@redhat.com>
4610
4611         * cli/cli-cmds.c (list_command): Use print_sal_location.
4612         (print_sal_location): New function.
4613         (ambiguous_line_spec): Use print_sal_location.
4614         * linespec.c (symbol_to_sal): Record the symbol in the sal.
4615         * symtab.c (find_function_start_sal): Likewise.
4616         * symtab.h (symtab_and_line::symbol): New field.
4617
4618 2017-09-20  Pedro Alves  <palves@redhat.com>
4619
4620         * linespec.c (minsym_found): Handle non-text minsyms.
4621         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
4622
4623 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4624
4625         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
4626         backslash.
4627
4628 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4629
4630         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
4631         vmovups instead vmovaps.
4632         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
4633
4634 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
4635
4636         * NEWS (Changes since GDB 8.0): Add starti.
4637         * infcmd.c (enum run_break): New.
4638         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
4639         case.
4640         (run_command): Use enum run_how.
4641         (start_command): Likewise.
4642         (starti_command): New function.
4643         (RUN_ARGS_HELP): New macro.
4644         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
4645         commands.  Add starti command.
4646
4647 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4648
4649         * Makefile.in (monitor.o): Remove the rule.
4650
4651 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4652
4653         * annotate.h (struct annotate_arg_emitter): Use
4654         DISABLE_COPY_AND_ASSIGN.
4655         * common/refcounted-object.h (refcounted_object): Likewise.
4656         * completer.h (struct completion_result): Likewise.
4657         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
4658         * filename-seen-cache.h (filename_seen_cache): Likewise.
4659         * gdbcore.h (thread_section_name): Likewise.
4660         * gdb_regex.h (compiled_regex): Likewise.
4661         * gdbthread.h (scoped_restore_current_thread): Likewise.
4662         * inferior.h (scoped_restore_current_inferior): Likewise.
4663         * jit.c (jit_reader): Likewise.
4664         * linespec.h (struct linespec_result): Likewise.
4665         * mi/mi-parse.h (struct mi_parse): Likewise.
4666         * nat/fork-inferior.c (execv_argv): Likewise.
4667         * progspace.h (scoped_restore_current_program_space): Likewise.
4668         * python/python-internal.h (class gdbpy_enter): Likewise.
4669         * regcache.h (regcache): Likewise.
4670         * target-descriptions.c (struct tdesc_reg): Likewise.
4671         (struct tdesc_type): Likewise.
4672         (struct tdesc_feature): Likewise.
4673         * ui-out.h (ui_out_emit_type): Likewise.
4674
4675 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
4676
4677         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
4678         label abort_expression.
4679
4680 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4681
4682         * common/buffer.c (buffer_xml_printf): Adjust.
4683         * common/xml-utils.c (xml_escape_text): Change return type to
4684         std::string, update code accordingly.
4685         * common/xml-utils.h (xml_escape_text): Change return type to
4686         std::string.
4687         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
4688         * windows-tdep.c (windows_xfer_shared_library): Adjust.
4689         * unittests/xml-utils-selftests.c (test_xml_escape_text):
4690         Adjust.
4691
4692 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4693
4694         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
4695         (SUBDIR_UNITTESTS_OBS): Add new object file.
4696         * unittests/xml-utils-selftests.c: New file.
4697
4698 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4699
4700         * common/selftest.h (selftest): New struct/interface.
4701         (register_test): Add name parameter, add new overload.
4702         (run_tests): Add filter parameter.
4703         (for_each_selftest_ftype): New typedef.
4704         (for_each_selftest): New declaration.
4705         * common/selftest.c (tests): Change type to
4706         map<string, unique_ptr<selftest>>.
4707         (simple_selftest): New struct.
4708         (register_test): New function.
4709         (register_test): Add name parameter and use it.
4710         (run_tests): Add filter parameter and use it.  Add prints.
4711         Adjust to vector -> map change.
4712         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
4713         registering selftests.
4714         * arm-tdep.c (_initialize_arm_tdep): Likewise.
4715         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
4716         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
4717         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
4718         * findvar.c (_initialize_findvar): Likewise.
4719         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
4720         * maint.c (maintenance_selftest): Update call to run_tests.
4721         (maintenance_info_selftests): New function.
4722         (_initialize_maint_cmds): Register "maintenance info selftests"
4723         command.  Update "maintenance selftest" doc.
4724         * regcache.c (_initialize_regcache): Add names when registering
4725         selftests.
4726         * rust-exp.y (_initialize_rust_exp): Likewise.
4727         * selftest-arch.c (gdbarch_selftest): New struct.
4728         (gdbarch_tests): Remove.
4729         (register_test_foreach_arch): Add name parameter.  Call
4730         register_test.
4731         (tests_with_arch): Remove, move most content to
4732         gdbarch_selftest::operator().
4733         (_initialize_selftests_foreach_arch): Remove.
4734         * selftest-arch.h (register_test_foreach_arch): Add name
4735         parameter.
4736         (run_tests_with_arch): New declaration.
4737         * utils-selftests.c (_initialize_utils_selftests): Add names
4738         when registering selftests.
4739         * utils.c (_initialize_utils): Likewise.
4740         * unittests/array-view-selftests.c
4741         (_initialize_array_view_selftests): Likewise.
4742         * unittests/environ-selftests.c (_initialize_environ_selftests):
4743         Likewise.
4744         * unittests/function-view-selftests.c
4745         (_initialize_function_view_selftests): Likewise.
4746         * unittests/offset-type-selftests.c
4747         (_initialize_offset_type_selftests): Likewise.
4748         * unittests/optional-selftests.c
4749         (_initialize_optional_selftests): Likewise.
4750         * unittests/scoped_restore-selftests.c
4751         (_initialize_scoped_restore_selftests): Likewise.
4752         * NEWS: Document "maintenance selftest" and "maint info
4753         selftests".
4754
4755 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4756
4757         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
4758         scoped_restore.
4759
4760 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4761
4762         * mi/mi-main.c (mi_load_progress): Make uiout variable
4763         a unique_ptr.
4764
4765 2017-09-15  Pedro Alves  <palves@redhat.com>
4766
4767         * compile/compile-c-types.c (convert_enum, convert_int)
4768         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
4769
4770 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
4771
4772         * dwarf2read.c (copy_string): Remove.
4773         (parse_macro_definition): Replace copy_string with savestring.
4774
4775 2017-09-15  Yao Qi  <yao.qi@linaro.org>
4776
4777         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
4778         gdb_target_obs.
4779         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
4780         Likewise.
4781         (i[34567]86-*-linux*): Likewise.
4782
4783 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4784
4785         * dwarf2expr.h (dwarf_stack_value): Add constructor.
4786         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
4787         <stack>: Change type to std::vector.
4788         <stack_len, stack_allocated>: Remove.
4789         <grow_stack>: Remove.
4790         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4791         (dwarf_expr_context::~dwarf_expr_context): Remove.
4792         (dwarf_expr_context::grow_stack): Remove.
4793         (dwarf_expr_context::push): Adjust.
4794         (dwarf_expr_context::pop): Adjust.
4795         (dwarf_expr_context::fetch): Adjust.
4796         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
4797         (dwarf_expr_context::stack_empty_p): Adjust.
4798         (dwarf_expr_context::execute_stack_op): Adjust.
4799
4800 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4801
4802         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
4803         return type to bool.
4804         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
4805
4806 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4807
4808         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
4809         Change type to bool.
4810         (dwarf_stack_value) <in_stack_memory>: Likewise.
4811         (dwarf_expr_context) <push_address>: Change parameter type to
4812         bool.
4813         <fetch_in_stack_memory>: Change return type to bool.
4814         <push>: Change parameter type to bool.
4815         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
4816         to bool.
4817         (dwarf_expr_context::push_address): Likewise.
4818         (dwarf_expr_context::fetch_in_stack_memory): Change return type
4819         to bool.
4820         (dwarf_expr_context::execute_stack_op): Adjust.
4821         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
4822
4823 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4824
4825         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
4826         (struct dwarf_expr_context) <n_pieces>: Remove.
4827         <pieces>: Change type to std::vector.
4828         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4829         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
4830         pieces.
4831         (dwarf_expr_context::add_piece): Adjust.
4832         * dwarf2loc.c (struct piece_closure): Initialize fields.
4833         <n_pieces>: Remove.
4834         <pieces>: Change type to std::vector.
4835         (allocate_piece_closure): Adjust, change parameter to
4836         std::vector rvalue and std::move it to piece_closure.
4837         (rw_pieced_value): Adjust.
4838         (check_pieced_synthetic_pointer): Adjust.
4839         (indirect_synthetic_pointer): Adjust.
4840         (coerce_pieced_ref): Adjust.
4841         (free_pieced_value_closure):  Adjust.  Use delete to free
4842         piece_closure.
4843         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
4844         to allocate_piece_closure.
4845         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
4846
4847 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4848
4849         * probe.h (probe_ops_cp): Remove typedef.
4850         (DEF_VEC_P (probe_ops_cp)): Remove.
4851         (all_probe_ops): Change type to std::vector.
4852         * probe.c (info_probes_for_ops): Adjust to vector change.
4853         (probe_linespec_to_ops): Likewise.
4854         (all_probe_ops): Change type to std::vector.
4855         (_initialize_probe): Adjust to vector change.
4856         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
4857         * elfread.c (elf_get_probes): Likewise.
4858         * stap-probe.c (_initialize_stap_probe): Likewise.
4859
4860 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4861
4862         * probe.h (struct bound_probe): Define constructors.
4863         * probe.c (bound_probe_s): Remove typedef.
4864         (DEF_VEC_O (bound_probe_s)): Remove VEC.
4865         (collect_probes): Change return type to std::vector, remove
4866         cleanup.
4867         (compare_probes): Return bool, change parameter type.  Change
4868         semantic to "less than".
4869         (gen_ui_out_table_header_info): Change parameter to std::vector
4870         and update.
4871         (exists_probe_with_pops): Likewise.
4872         (info_probes_for_ops): Update to std::vector change.
4873         (enable_probes_command): Likewise.
4874         (disable_probes_command): Likewise.
4875
4876 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4877
4878         * probe.h (struct probe_ops) <get_probes>: Change parameter from
4879         vec to std::vector.
4880         * probe.c (parse_probes_in_pspace): Update.
4881         (find_probes_in_objfile): Update.
4882         (find_probe_by_pc): Update.
4883         (collect_probes): Update.
4884         (probe_any_get_probes): Update.
4885         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
4886         return type to reference to std::vector.
4887         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
4888         std::vector and update.
4889         (dtrace_process_dof): Likewise.
4890         (dtrace_get_probes): Likewise.
4891         * elfread.c (elf_get_probes): Change return type to std::vector,
4892         store an std::vector in bfd_data.
4893         (probe_key_free): Update to std::vector.
4894         * stap-probe.c (handle_stap_probe): Change parameter to
4895         std::vector and update.
4896         (stap_get_probes): Likewise.
4897         * symfile-debug.c (debug_sym_get_probes): Change return type to
4898         std::vector and update.
4899
4900 2017-09-11  Tom Tromey  <tom@tromey.com>
4901
4902         * breakpoint.c (program_breakpoint_here_p): Update.
4903         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
4904         from make_show_memory_breakpoints_cleanup.  Return a
4905         scoped_restore_tmpl<int>.
4906         (restore_show_memory_breakpoints): Remove.
4907         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
4908         * mem-break.c (memory_validate_breakpoint): Update.
4909         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
4910         (ia64_memory_remove_breakpoint): Update.
4911         (ia64_breakpoint_from_pc): Update.
4912         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
4913         from make_show_memory_breakpoints_cleanup.
4914
4915 2017-09-11  Tom Tromey  <tom@tromey.com>
4916
4917         * d-namespace.c (d_lookup_symbol): Use std::string.
4918         (find_symbol_in_baseclass): Likewise.
4919
4920 2017-09-11  Tom Tromey  <tom@tromey.com>
4921
4922         * ctf.c (ctf_start): Use std::string.
4923
4924 2017-09-11  Tom Tromey  <tom@tromey.com>
4925
4926         * ada-lang.c (is_known_support_routine): Update.
4927         (ada_unhandled_exception_name_addr_from_raise): Update.
4928         * guile/scm-frame.c (gdbscm_frame_name): Update.
4929         * python/py-frame.c (frapy_name): Update.
4930         (frapy_function): Update.
4931         * stack.h (find_frame_funname): Update.
4932         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
4933         (print_frame): Update.
4934
4935 2017-09-11  Tom Tromey  <tom@tromey.com>
4936
4937         * findcmd.c (put_bits): Take a gdb::byte_vector.
4938         (parse_find_args): Return gdb::byte_vector.  "args" now const.
4939         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
4940         cleanups.
4941         (find_command): Update.
4942
4943 2017-09-11  Tom Tromey  <tom@tromey.com>
4944
4945         * cli/cli-script.c (class scoped_restore_hook_in): New.
4946         (clear_hook_in_cleanup): Remove.
4947         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
4948         scoped_restore_hook_in.
4949
4950 2017-09-11  Tom Tromey  <tom@tromey.com>
4951
4952         * cli/cli-script.c (restore_interp): Remove.
4953         (read_command_lines): Use scoped_restore_interp.
4954         * interps.c (scoped_restore_interp::set_temp): Rename from
4955         interp_set_temp.
4956         * interps.h (class scoped_restore_interp): New.
4957         (interp_set_temp): Remove.
4958
4959 2017-09-11  Tom Tromey  <tom@tromey.com>
4960
4961         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4962         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
4963         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
4964         scoped_restore.
4965         (mi_cmd_break_insert_1): Update.
4966         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
4967         scoped_restore.
4968
4969 2017-09-11  Tom Tromey  <tom@tromey.com>
4970
4971         * demangle.c (demangle_command): Update.
4972         * breakpoint.c (disable_command): Update.
4973         (enable_command): Update.
4974         (find_location_by_number): Make "number" const.  Use
4975         get_number_trailer.
4976         * cli/cli-utils.c (extract_arg): Return std::string.
4977         * probe.c (parse_probe_linespec): Update.  Change types.
4978         (collect_probes): Take string arguments.
4979         (parse_probe_linespec): Likewise.
4980         (info_probes_for_ops): Update.
4981         (enable_probes_command): Update.
4982         (disable_probes_command): Update.
4983         * break-catch-sig.c (catch_signal_split_args): Update.
4984         * mi/mi-parse.c (mi_parse): Update.
4985
4986 2017-09-11  Tom Tromey  <tom@tromey.com>
4987
4988         * language.h (language_enum): Make argument const.
4989         * language.c (language_enum): Make argument const.
4990
4991 2017-09-11  Tom Tromey  <tom@tromey.com>
4992
4993         * common/common-utils.h (skip_to_space): Remove macro, redeclare
4994         as function.
4995         (skip_to_space): Rename from skip_to_space_const.
4996         * common/common-utils.c (skip_to_space): New function.
4997         (skip_to_space): Rename from skip_to_space_const.
4998         * cli/cli-utils.h (get_number): Rename from get_number_const.
4999         (extract_arg): Rename from extract_arg_const.
5000         * cli/cli-utils.c (get_number): Rename from get_number_const.
5001         (extract_arg): Rename from extract_arg_const.
5002         (number_or_range_parser::get_number): Use ::get_number.
5003         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5004         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5005         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5006         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5007         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5008         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5009         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5010         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5011
5012 2017-09-11  Tom Tromey  <tom@tromey.com>
5013
5014         * python/python.c (do_start_initialization): Use
5015         py-event-types.def to initialize types.
5016         Define all object type structures.
5017         * python/python-internal.h: Don't declare event initialization
5018         functions.
5019         * python/py-threadevent.c (thread_event_object_type): Don't
5020         define.
5021         * python/py-stopevent.c (stop_event_object_type): Don't define.
5022         * python/py-signalevent.c (signal_event_object_type): Don't
5023         declare or define.
5024         * python/py-newobjfileevent.c (new_objfile_event_object_type)
5025         (clear_objfiles_event_object_type): Don't declare or define.
5026         * python/py-infevents.c (inferior_call_pre_event_object_type)
5027         (inferior_call_post_event_object_type)
5028         (register_changed_event_object_type)
5029         (memory_changed_event_object_type): Don't declare or define.
5030         * python/py-inferior.c (new_thread_event_object_type)
5031         (new_inferior_event_object_type)
5032         (inferior_deleted_event_object_type): Don't declare or define.
5033         * python/py-exitedevent.c (exited_event_object_type): Don't
5034         declare or define.
5035         * python/py-evts.c (gdbpy_initialize_py_events): Use
5036         py-all-events.def.
5037         * python/py-events.h (thread_event_object_type): Don't declare.
5038         (events_object): Use py-all-events.def.
5039         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
5040         py-event-types.def.
5041         * python/py-event-types.def: New file.
5042         * python/py-continueevent.c (create_continue_event_object): Don't
5043         declare or define.
5044         * python/py-bpevent.c (breakpoint_event_object_type): Don't
5045         declare or define.
5046         * python/py-all-events.def: New file.
5047
5048 2017-09-11  Tom Tromey  <tom@tromey.com>
5049
5050         * python/py-threadevent.c (create_thread_event_object): Return
5051         gdbpy_ref.
5052         * python/py-stopevent.h (create_stop_event_object)
5053         (create_breakpoint_event_object, create_signal_event_object):
5054         Update.
5055         * python/py-stopevent.c (create_stop_event_object): Return
5056         gdbpy_ref.
5057         (emit_stop_event): Update.
5058         * python/py-signalevent.c (create_signal_event_object): Return
5059         gdbpy_ref.
5060         * python/py-infevents.c (create_inferior_call_event_object):
5061         Update.
5062         * python/py-event.h (create_event_object)
5063         (create_thread_event_object): Update.
5064         * python/py-event.c (create_event_object): Return gdbpy_ref.
5065         * python/py-continueevent.c: Return gdbpy_ref.
5066         * python/py-bpevent.c (create_breakpoint_event_object): Return
5067         gdbpy_ref.
5068
5069 2017-09-11  Tom Tromey  <tom@tromey.com>
5070
5071         PR python/15622:
5072         * NEWS: Add entry.
5073         * python/python.c (do_start_initialization): Initialize new event
5074         types.
5075         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5076         (gdbpy_initialize_inferior_deleted_event)
5077         (gdbpy_initialize_new_thread_event): Declare.
5078         * python/py-threadevent.c (create_thread_event_object): Add option
5079         "thread" parameter.
5080         * python/py-inferior.c (new_thread_event_object_type)
5081         (new_inferior_event_object_type)
5082         (inferior_deleted_event_object_type): Declare.
5083         (python_new_inferior, python_inferior_deleted): New functions.
5084         (add_thread_object): Emit new_thread event.
5085         (gdbpy_initialize_inferior): Attach new functions to corresponding
5086         observers.
5087         (new_thread, new_inferior, inferior_deleted): Define new event
5088         types.
5089         * python/py-evts.c (gdbpy_initialize_py_events): Add new
5090         registries.
5091         * python/py-events.h (events_object) <new_inferior,
5092         inferior_deleted, new_thread>: New fields.
5093         * python/py-event.h (create_thread_event_breakpoint): Add optional
5094         "thread" parameter.
5095
5096 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5097
5098         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5099         check current_ui instead.
5100         (internal_vproblem): Likewise.
5101
5102 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
5103
5104         * thread.c (print_thread_info_1): Remove unnecessary calls to
5105         uiout->is_mi_like_p.
5106
5107 2017-09-09  Tom Tromey  <tom@tromey.com>
5108
5109         * namespace.h (add_using_directive): Update.
5110         * namespace.c (add_using_directive): Change type of excludes to
5111         std::vector.
5112         * dwarf2read.c (read_import_statement): Use std::vector.
5113         (read_namespace): Update.
5114         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5115
5116 2017-09-09  Tom Tromey  <tom@tromey.com>
5117
5118         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5119
5120 2017-09-09  Tom Tromey  <tom@tromey.com>
5121
5122         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5123
5124 2017-09-09  Tom Tromey  <tom@tromey.com>
5125
5126         * stack.c (func_command): Use gdb::def_vector.
5127
5128 2017-09-09  Tom Tromey  <tom@tromey.com>
5129
5130         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5131         ui_out_emit_list, ui_out_emit_tuple.
5132         (mi_cmd_var_update): Likewise.
5133
5134 2017-09-09  Tom Tromey  <tom@tromey.com>
5135
5136         * mi/mi-interp.c (mi_user_selected_context_changed): Use
5137         ui_out_redirect_pop.
5138         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5139         ui_out_redirect_pop.
5140         * utils.c (do_ui_out_redirect_pop)
5141         (make_cleanup_ui_out_redirect_pop): Remove.
5142         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5143         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5144         * ui-out.h (ui_out_redirect_pop): New class.
5145
5146 2017-09-09  Tom Tromey  <tom@tromey.com>
5147
5148         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5149         (list_available_thread_groups, mi_cmd_list_thread_groups)
5150         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5151         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5152         Likewise.
5153
5154 2017-09-09  Tom Tromey  <tom@tromey.com>
5155
5156         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5157         ui_out_emit_tuple.
5158
5159 2017-09-09  Tom Tromey  <tom@tromey.com>
5160
5161         * target.c (flash_erase_command): Use ui_out_emit_tuple.
5162         * stack.c (print_frame): Use ui_out_emit_tuple.
5163         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5164         (info_spu_mailbox_command, info_spu_dma_command)
5165         (info_spu_proxydma_command): Likewise.
5166         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5167         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5168         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5169         ui_out_emit_tuple.
5170         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5171
5172 2017-09-09  Tom Tromey  <tom@tromey.com>
5173
5174         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5175         (class ui_out_emit_table): Update comment.
5176         * ui-out.c (do_cleanup_table_end)
5177         (make_cleanup_ui_out_table_begin_end): Remove.
5178         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5179         (info_spu_dma_cmdlist): Likewise.
5180         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5181         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5182         ui_out_emit_table.
5183
5184 2017-09-09  Tom Tromey  <tom@tromey.com>
5185
5186         * thread.c (print_thread_info_1): Use ui_out_emit_table,
5187         ui_out_emit_list, gdb::optional.
5188
5189 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
5190
5191         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5192         prototype.
5193         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5194         prototype.
5195         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5196         prototype.
5197         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5198         * ada-exp.y: Remove _initialize_ada_exp prototype.
5199         * ada-lang.c: Remove _initialize_ada_language prototype.
5200         * ada-tasks.c: Remove _initialize_tasks prototype.
5201         * addrmap.c: Remove _initialize_addrmap prototype.
5202         * agent.c: Remove _initialize_agent prototype.
5203         * aix-thread.c: Remove _initialize_aix_thread prototype.
5204         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5205         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5206         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5207         prototype.
5208         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5209         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5210         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5211         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5212         prototype.
5213         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5214         prototype.
5215         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5216         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5217         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5218         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5219         prototype.
5220         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5221         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5222         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5223         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5224         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5225         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5226         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5227         prototype.
5228         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5229         prototype.
5230         * annotate.c: Remove _initialize_annotate prototype.
5231         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5232         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5233         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5234         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5235         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5236         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5237         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5238         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5239         prototype.
5240         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5241         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5242         * auto-load.c: Remove _initialize_auto_load prototype.
5243         * auxv.c: Remove _initialize_auxv prototype.
5244         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5245         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5246         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5247         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5248         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5249         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5250         prototype.
5251         * break-catch-throw.c: Remove _initialize_break_catch_throw
5252         prototype.
5253         * breakpoint.c: Remove _initialize_breakpoint prototype.
5254         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5255         * btrace.c: Remove _initialize_btrace prototype.
5256         * charset.c: Remove _initialize_charset prototype.
5257         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5258         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5259         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5260         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5261         * cli/cli-script.c: Remove _initialize_cli_script prototype.
5262         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5263         * coffread.c: Remove _initialize_coffread prototype.
5264         * compile/compile.c: Remove _initialize_compile prototype.
5265         * complaints.c: Remove _initialize_complaints prototype.
5266         * completer.c: Remove _initialize_completer prototype.
5267         * copying.awk: Remove _initialize_copying prototype.
5268         * copying.c: Regenerate.
5269         * core-regset.c: Remove _initialize_core_regset prototype.
5270         * corefile.c: Remove _initialize_core prototype.
5271         * corelow.c: Remove _initialize_corelow prototype.
5272         * cp-abi.c: Remove _initialize_cp_abi prototype.
5273         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5274         * cp-support.c: Remove _initialize_cp_support prototype.
5275         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5276         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5277         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5278         * ctf.c: Remove _initialize_ctf prototype.
5279         * d-lang.c: Remove _initialize_d_language prototype.
5280         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5281         prototype.
5282         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5283         * dbxread.c: Remove _initialize_dbxread prototype.
5284         * dcache.c: Remove _initialize_dcache prototype.
5285         * demangle.c: Remove _initialize_demangler prototype.
5286         * disasm-selftests.c: Remove _initialize_disasm_selftests
5287         prototype.
5288         * disasm.c: Remove _initialize_disasm prototype.
5289         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5290         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5291         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5292         prototype.
5293         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5294         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5295         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5296         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5297         * elfread.c: Remove _initialize_elfread prototype.
5298         * exec.c: Remove _initialize_exec prototype.
5299         * extension.c: Remove _initialize_extension prototype.
5300         * f-lang.c: Remove _initialize_f_language prototype.
5301         * f-valprint.c: Remove _initialize_f_valprint prototype.
5302         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5303         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5304         * filesystem.c: Remove _initialize_filesystem prototype.
5305         * findcmd.c: Remove _initialize_mem_search prototype.
5306         * fork-child.c: Remove _initialize_fork_child prototype.
5307         * frame-base.c: Remove _initialize_frame_base prototype.
5308         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5309         * frame.c: Remove _initialize_frame prototype.
5310         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5311         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5312         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5313         * gcore.c: Remove _initialize_gcore prototype.
5314         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5315         * gdbarch.c: Regenerate.
5316         * gdbarch.sh: Remove _initialize_gdbarch prototype.
5317         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5318         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5319         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5320         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5321         * go-lang.c: Remove _initialize_go_language prototype.
5322         * go32-nat.c: Remove _initialize_go32_nat prototype.
5323         * guile/guile.c: Remove _initialize_guile prototype.
5324         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5325         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5326         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5327         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5328         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5329         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5330         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5331         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5332         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5333         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5334         prototype.
5335         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5336         prototype.
5337         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5338         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5339         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5340         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5341         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5342         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5343         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5344         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5345         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5346         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5347         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5348         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5349         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5350         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5351         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5352         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5353         prototype.
5354         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5355         prototype.
5356         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5357         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5358         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5359         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5360         * infcall.c: Remove _initialize_infcall prototype.
5361         * infcmd.c: Remove _initialize_infcmd prototype.
5362         * inferior.c: Remove _initialize_inferiors prototype.
5363         * inflow.c: Remove _initialize_inflow prototype.
5364         * infrun.c: Remove _initialize_infrun prototype.
5365         * interps.c: Remove _initialize_interpreter prototype.
5366         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5367         * jit.c: Remove _initialize_jit prototype.
5368         * language.c: Remove _initialize_language prototype.
5369         * linux-fork.c: Remove _initialize_linux_fork prototype.
5370         * linux-nat.c: Remove _initialize_linux_nat prototype.
5371         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5372         * linux-thread-db.c: Remove _initialize_thread_db prototype.
5373         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5374         * m2-lang.c: Remove _initialize_m2_language prototype.
5375         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5376         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5377         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5378         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5379         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5380         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5381         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5382         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5383         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5384         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5385         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5386         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5387         * machoread.c: Remove _initialize_machoread prototype.
5388         * macrocmd.c: Remove _initialize_macrocmd prototype.
5389         * macroscope.c: Remove _initialize_macroscope prototype.
5390         * maint.c: Remove _initialize_maint_cmds prototype.
5391         * mdebugread.c: Remove _initialize_mdebugread prototype.
5392         * memattr.c: Remove _initialize_mem prototype.
5393         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5394         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5395         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5396         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5397         * mi/mi-main.c: Remove _initialize_mi_main prototype.
5398         * microblaze-linux-tdep.c: Remove
5399         _initialize_microblaze_linux_tdep prototype.
5400         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5401         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5402         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5403         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5404         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5405         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5406         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5407         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5408         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5409         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5410         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5411         prototype.
5412         * mipsread.c: Remove _initialize_mipsread prototype.
5413         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5414         prototype.
5415         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5416         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5417         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5418         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5419         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5420         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5421         prototype.
5422         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5423         * nto-procfs.c: Remove _initialize_procfs prototype.
5424         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5425         * objc-lang.c: Remove _initialize_objc_language prototype.
5426         * objfiles.c: Remove _initialize_objfiles prototype.
5427         * observer.c: Remove observer_test_first_notification_function,
5428         observer_test_second_notification_function,
5429         observer_test_third_notification_function, and
5430         _initialize_observer prototypes.
5431         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5432         * osabi.c: Remove _initialize_gdb_osabi prototype.
5433         * osdata.c: Remove _initialize_osdata prototype.
5434         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5435         * parse.c: Remove _initialize_parse prototype.
5436         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5437         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5438         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5439         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5440         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5441         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5442         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5443         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5444         * printcmd.c: Remove _initialize_printcmd prototype.
5445         * probe.c: Remove _initialize_probe prototype.
5446         * proc-api.c: Remove _initialize_proc_api prototype.
5447         * proc-events.c: Remove _initialize_proc_events prototype.
5448         * proc-service.c: Remove _initialize_proc_service prototype.
5449         * procfs.c: Remove _initialize_procfs prototype.
5450         * psymtab.c: Remove _initialize_psymtab prototype.
5451         * python/python.c: Remove _initialize_python prototype.
5452         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5453         * record-btrace.c: Remove _initialize_record_btrace prototype.
5454         * record-full.c: Remove _initialize_record_full prototype.
5455         * record.c: Remove _initialize_record prototype.
5456         * regcache.c: Remove _initialize_regcache prototype.
5457         * reggroups.c: Remove _initialize_reggroup prototype.
5458         * remote-notif.c: Remove _initialize_notif prototype.
5459         * remote-sim.c: Remove _initialize_remote_sim prototype.
5460         * remote.c: Remove _initialize_remote prototype.
5461         * reverse.c: Remove _initialize_reverse prototype.
5462         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5463         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5464         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5465         prototype.
5466         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5467         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5468         * rust-exp.y: Remove _initialize_rust_exp prototype.
5469         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5470         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5471         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5472         * score-tdep.c: Remove _initialize_score_tdep prototype.
5473         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5474         prototype.
5475         * ser-go32.c: Remove _initialize_ser_dos prototype.
5476         * ser-mingw.c: Remove _initialize_ser_windows prototype.
5477         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5478         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5479         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5480         * serial.c: Remove _initialize_serial prototype.
5481         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5482         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5483         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5484         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5485         * skip.c: Remove _initialize_step_skip prototype.
5486         * sol-thread.c: Remove _initialize_sol_thread prototype.
5487         * solib-aix.c: Remove _initialize_solib_aix prototype.
5488         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5489         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5490         * solib-frv.c: Remove _initialize_frv_solib prototype.
5491         * solib-spu.c: Remove _initialize_spu_solib prototype.
5492         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5493         * solib-target.c: Remove _initialize_solib_target prototype.
5494         * solib.c: Remove _initialize_solib prototype.
5495         * source.c: Remove _initialize_source prototype.
5496         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5497         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5498         prototype.
5499         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5500         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5501         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5502         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5503         prototype.
5504         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5505         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5506         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5507         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5508         prototype.
5509         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5510         prototype.
5511         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5512         prototype.
5513         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5514         prototype.
5515         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5516         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5517         prototype.
5518         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5519         prototype.
5520         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5521         prototype.
5522         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5523         prototype.
5524         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5525         prototype.
5526         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5527         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5528         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5529         * stabsread.c: Remove _initialize_stabsread prototype.
5530         * stack.c: Remove _initialize_stack prototype.
5531         * stap-probe.c: Remove _initialize_stap_probe prototype.
5532         * std-regs.c: Remove _initialize_frame_reg prototype.
5533         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5534         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5535         * symfile.c: Remove _initialize_symfile prototype.
5536         * symmisc.c: Remove _initialize_symmisc prototype.
5537         * symtab.c: Remove _initialize_symtab prototype.
5538         * target-dcache.c: Remove _initialize_target_dcache prototype.
5539         * target-descriptions.c: Remove _initialize_target_descriptions
5540         prototype.
5541         * thread.c: Remove _initialize_thread prototype.
5542         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5543         prototype.
5544         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5545         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5546         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5547         prototype.
5548         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5549         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5550         * tracefile.c: Remove _initialize_tracefile prototype.
5551         * tracepoint.c: Remove _initialize_tracepoint prototype.
5552         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5553         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5554         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5555         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5556         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5557         * tui/tui-win.c: Remove _initialize_tui_win prototype.
5558         * tui/tui.c: Remove _initialize_tui prototype.
5559         * typeprint.c: Remove _initialize_typeprint prototype.
5560         * user-regs.c: Remove _initialize_user_regs prototype.
5561         * utils.c: Remove _initialize_utils prototype.
5562         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5563         * valarith.c: Remove _initialize_valarith prototype.
5564         * valops.c: Remove _initialize_valops prototype.
5565         * valprint.c: Remove _initialize_valprint prototype.
5566         * value.c: Remove _initialize_values prototype.
5567         * varobj.c: Remove _initialize_varobj prototype.
5568         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5569         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5570         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5571         * windows-nat.c: Remove _initialize_windows_nat,
5572         _initialize_check_for_gdb_ini, and _initialize_loadable
5573         prototypes.
5574         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5575         * xcoffread.c: Remove _initialize_xcoffread prototype.
5576         * xml-support.c: Remove _initialize_xml_support prototype.
5577         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5578         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5579         prototype.
5580         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5581         prototype.
5582         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5583
5584 2017-09-08  Keith Seitz  <keiths@redhat.com>
5585
5586         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5587         field.
5588
5589 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
5590
5591         * f-valprint.c (f_val_print): Remove check for one byte
5592         sized integers. Remove printing of character type.
5593
5594 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
5595             Christoph Weinmann  <christoph.t.weinmann@intel.com>
5596             Bernhard Heckel  <bernhard.heckel@intel.com>
5597
5598         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5599         to maintain proper indentation when printing pointers/refs.
5600
5601 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5602
5603         GDB 8.0.1 released.
5604
5605 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5606
5607         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
5608
5609 2017-09-05  Tom Tromey  <tom@tromey.com>
5610
5611         * parse.c (funcall_chain): Now a std::vector.
5612         (start_arglist, end_arglist): Simplify.
5613         (free_funcalls): Remove.
5614         (parse_exp_in_context_1): Remove cleanup.
5615
5616 2017-09-05  Tom Tromey  <tom@tromey.com>
5617
5618         * go-exp.y (go_parse): Don't create a cleanup.
5619
5620 2017-09-05  Tom Tromey  <tom@tromey.com>
5621
5622         * d-exp.y (PrimaryExpression): Use std::string.
5623         (d_parse): Don't create a cleanup.
5624
5625 2017-09-05  Tom Tromey  <tom@tromey.com>
5626
5627         * utils.c (do_clear_parser_state): Remove.
5628         (make_cleanup_clear_parser_state): Remove.
5629         * p-exp.y (pascal_parse): Use scoped_restore.
5630         * m2-exp.y (m2_parse): Use scoped_restore.
5631         * f-exp.y (f_parse): Use scoped_restore.
5632         * d-exp.y (d_parse): Use scoped_restore.
5633         * c-exp.y (c_parse): Use scoped_restore.
5634         * ada-exp.y (ada_parse): Use scoped_restore.
5635         * utils.h (make_cleanup_clear_parser_state): Remove.
5636
5637 2017-09-06  Keith Seitz  <keiths@redhat.com>
5638
5639         * dwarf2read.c (dw2_linkage_name_attr): New function.
5640         (dw2_linkage_name): New function.
5641         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
5642         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
5643         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
5644
5645 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5646
5647         * config/djgpp/djconfig.sh: Correct shell portability issue.
5648
5649 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5650
5651         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
5652
5653 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5654
5655         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
5656         * NEWS: Mention new FreeBSD/mips native configuration.
5657         * configure.host: Add aarch64*-*-freebsd*.
5658         * configure.nat: Likewise.
5659         * aarch64-fbsd-nat.c: New file.
5660
5661 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5662
5663         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
5664         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
5665         * NEWS: Mention new FreeBSD/aarch64 target.
5666         * configure.tgt: Add aarch64*-*-freebsd*.
5667         * aarch64-fbsd-tdep.c: New file.
5668         * aarch64-fbsd-tdep.h: New file.
5669
5670 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5671
5672         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
5673
5674 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
5675
5676         * parse.c (find_minsym_type_and_address): Don't relocate addresses
5677         of TLS symbols.
5678
5679 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5680
5681         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
5682         call.
5683
5684 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5685
5686         * infrun.c (follow_exec): Call add_thread after
5687         target_find_description.
5688
5689 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5690
5691         * infrun.c (handle_inferior_event_1): When exec'ing, read
5692         stop_pc after follow_exec.
5693
5694 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5695
5696         * remote.c (process_g_packet): Update error message.
5697
5698 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5699
5700         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
5701         targets.
5702
5703 2017-09-05  Pedro Alves  <palves@redhat.com>
5704
5705         * eval.c (eval_call, evaluate_funcall): New functions, factored
5706         out from ...
5707         (evaluate_subexp_standard): ... this.
5708
5709 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5710
5711         * amd64-tdep.c (amd64_target_description): Create target
5712         descriptions.
5713         (_initialize_amd64_tdep): Don't call functions
5714         initialize_tdesc_amd64_*.  Add self tests.
5715         * arch/amd64.c (amd64_create_target_description): Add parameter
5716         is_linux.  Call set_tdesc_osabi if is_linux is true.
5717         * arch/amd64.h (amd64_create_target_description): Update the
5718         declaration.
5719         * arch/i386.c (i386_create_target_description): Add parameter
5720         is_linux.  Call set_tdesc_osabi if is_linux is true.
5721         * arch/i386.h (i386_create_target_description): Update
5722         declaration.
5723         * configure.tgt: Add i386.o to gdb_target_obs.
5724         * features/Makefile (XMLTOC): Remove i386/*.xml.
5725         * features/i386/amd64-avx-avx512.c: Remove.
5726         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
5727         * features/i386/amd64-avx-mpx.c: Remove.
5728         * features/i386/amd64-avx.c: Remove.
5729         * features/i386/amd64-mpx.c: Remove.
5730         * features/i386/amd64.c: Remove.
5731         * features/i386/i386-avx-avx512.c: Remove.
5732         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
5733         * features/i386/i386-avx-mpx.c: Remove.
5734         * features/i386/i386-avx.c: Remove.
5735         * features/i386/i386-mmx.c: Remove.
5736         * features/i386/i386-mpx.c: Remove.
5737         * features/i386/i386.c: Remove.
5738         * i386-tdep.c: Don't include features/i386/i386*.c., include
5739         target-descriptions.h and arch/i386.h.
5740         (i386_target_description): Create target descriptions.
5741         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
5742         functions.  Do self tests.
5743
5744 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5745
5746         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
5747         * features/i386/amd64-avx-avx512-linux.c: Removed.
5748         * features/i386/amd64-avx-linux.c: Removed.
5749         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
5750         * features/i386/amd64-avx-mpx-linux.c: Removed.
5751         * features/i386/amd64-linux.c: Removed.
5752         * features/i386/amd64-mpx-linux.c: Removed.
5753         * features/i386/x32-avx-avx512-linux.c: Removed.
5754         * features/i386/x32-avx-linux.c: Removed.
5755         * features/i386/x32-linux.c: Removed.
5756
5757 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5758
5759         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
5760         features/i386/*.c.
5761         (amd64_linux_read_description): Call
5762         amd64_create_target_description.
5763         * arch/amd64.c: New file.
5764         * arch/amd64.h: New file.
5765         * configure.tgt (x86_64-*-linux*): Append amd64.o.
5766         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
5767
5768 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5769
5770         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
5771         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
5772         (amd64_linux_read_description): Create target descriptions.
5773         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
5774         functions.  Add unit tests.
5775         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
5776         x32-core.xml.
5777         * features/i386/64bit-avx.c: Generated.
5778         * features/i386/64bit-avx512.c: Generated.
5779         * features/i386/64bit-core.c: Generated.
5780         * features/i386/64bit-linux.c: Generated.
5781         * features/i386/64bit-mpx.c: Generated.
5782         * features/i386/64bit-pkeys.c: Generated.
5783         * features/i386/64bit-segments.c: Generated.
5784         * features/i386/64bit-sse.c: Generated.
5785         * features/i386/x32-core.c: Generated.
5786         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
5787         c files for amd64-linux and x32-linux.
5788
5789 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5790
5791         * amd64-linux-tdep.c (amd64_linux_read_description): New
5792         function.
5793         (amd64_linux_core_read_description): Call
5794         amd64_linux_read_description.
5795         (amd64_linux_init_abi): Likewise.
5796         (amd64_x32_linux_init_abi): Likewise.
5797         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
5798         * x86-linux-nat.c (x86_linux_read_description): Call
5799         amd64_linux_read_description.
5800
5801 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5802
5803         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
5804         comments.
5805
5806 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5807
5808         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
5809         * features/i386/i386-avx-avx512-linux.c: Remove.
5810         * features/i386/i386-avx-linux.c: Remove.
5811         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
5812         * features/i386/i386-avx-mpx-linux.c: Remove.
5813         * features/i386/i386-linux.c: Remove.
5814         * features/i386/i386-mmx-linux.c: Remove.
5815         * features/i386/i386-mpx-linux.c: Remove.
5816
5817 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5818
5819         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
5820         (SFILES): Add arch/i386.c.
5821         (HFILES_NO_SRCDIR): Add arch/i386.h.
5822         * arch/i386.c: New file.
5823         * arch/i386.h: New file.
5824         * arch/tdesc.h (allocate_target_description): Declare.
5825         (set_tdesc_architecture): Declare.
5826         (set_tdesc_osabi): Declare.
5827         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
5828         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
5829         include arch/i386.h.
5830         (i386_linux_read_description): Remove code and call
5831         i386_create_target_description.
5832         (set_tdesc_architecture): New function.
5833         (set_tdesc_osabi): New function.
5834         * target-descriptions.h (allocate_target_description): Remove.
5835
5836 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5837
5838         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
5839         * target-descriptions.c (tdesc_create_feature): Likewise, and
5840         adjust code.
5841         * features/i386/32bit-avx.c: Re-generated.
5842         * features/i386/32bit-avx512.c: Re-generated.
5843         * features/i386/32bit-core.c: Re-generated.
5844         * features/i386/32bit-linux.c: Re-generated.
5845         * features/i386/32bit-mpx.c: Re-generated.
5846         * features/i386/32bit-pkeys.c: Re-generated.
5847         * features/i386/32bit-sse.c: Re-generated.
5848
5849 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5850
5851         * regformats/regdef.h (struct reg): Override operator == and !=.
5852
5853 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5854
5855         * arch/tdesc.h: New file.
5856         * regformats/regdat.sh: Generate code using tdesc_create_reg.
5857         * target-descriptions.c: Update comments.
5858         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
5859         declarations.
5860         * features/i386/32bit-avx.c: Re-generated.
5861         * features/i386/32bit-avx512.c: Re-generated.
5862         * features/i386/32bit-core.c: Re-generated.
5863         * features/i386/32bit-linux.c: Re-generated.
5864         * features/i386/32bit-mpx.c: Re-generated.
5865         * features/i386/32bit-pkeys.c: Re-generated.
5866         * features/i386/32bit-sse.c: Re-generated.
5867
5868 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5869
5870         * regformats/regdat.sh: Update generated code.
5871
5872 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5873
5874         * regformats/regdat.sh: Adjust code order.
5875
5876 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5877
5878         * expprint.c (dump_subexp_body_standard): Use constant format
5879         string in fprintf_filtered call.
5880
5881 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5882
5883         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
5884         NetBSD/i386.
5885         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
5886
5887 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5888
5889         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
5890
5891 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5892
5893         * bsd-kvm.o: Define _KMEMUSER.
5894         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
5895         * configure: Regenerate.
5896
5897 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5898
5899         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
5900         * i386-fbsd-nat.c: Likewise.
5901
5902 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5903
5904         * unittests/array-view-selftests.c: Add include of <array>.
5905
5906 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5907
5908         * spu-tdep.c (flush_ea_cache): Add missing argument to
5909         call_function_by_hand.
5910
5911 2017-09-04  Pedro Alves  <palves@redhat.com>
5912
5913         * NEWS (Safer support for debugging with no debug info): New.
5914
5915 2017-09-04  Pedro Alves  <palves@redhat.com>
5916
5917         * c-exp.y (function_method, function_method_void): Add current
5918         instance flags to TYPE_INSTANCE.
5919         * dwarf2read.c (check_modifier): New.
5920         (compute_delayed_physnames): Assert that only C++ adds delayed
5921         physnames.  Mark fn_fields as const/volatile depending on
5922         physname.
5923         * eval.c (make_params): New type_instance_flags parameter.  Use
5924         it as the new type's instance flags.
5925         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
5926         flags element and pass it to make_params.
5927         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
5928         instance flags element.
5929         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
5930         * gdbtypes.h: Include "enum-flags.h".
5931         (type_instance_flags): New enum-flags type.
5932         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
5933         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
5934         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
5935         (follow_type_instance_flags): New function.
5936         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
5937         * parser-defs.h (follow_type_instance_flags): Declare.
5938         * valops.c (value_struct_elt_for_reference): const/volatile must
5939         match too.
5940
5941 2017-09-04  Pedro Alves  <palves@redhat.com>
5942
5943         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
5944         function/method scopes; lookup the nested name as a function local
5945         static variable.
5946
5947 2017-09-04  Pedro Alves  <palves@redhat.com>
5948
5949         (%type <voidval>): Add function_method.
5950         * c-exp.y (exp): New production for calls with no arguments.
5951         (function_method, function_method_void_or_typelist): New
5952         productions.
5953         (exp): New production for "method()::static_var".
5954         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
5955         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5956         Handle OP_FUNC_STATIC_VAR.
5957         * parse.c (operator_length_standard):
5958         Handle OP_FUNC_STATIC_VAR.
5959
5960 2017-09-04  Pedro Alves  <palves@redhat.com>
5961
5962         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
5963         handling.
5964         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5965         Ditto.
5966         * parse.c (operator_length_standard, operator_check_standard):
5967         Ditto.
5968         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
5969
5970 2017-09-04  Pedro Alves  <palves@redhat.com>
5971
5972         * ax-gdb.c: Include "typeprint.h".
5973         (gen_expr_for_cast): New function.
5974         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
5975         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
5976         type is unknown.
5977         * dwarf2read.c (new_symbol_full): Fallback to int instead of
5978         nodebug_data_symbol.
5979         * eval.c: Include "typeprint.h".
5980         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
5981         Error out if symbol has unknown type.
5982         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
5983         evaluate_subexp_for_cast.
5984         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
5985         OP_VAR_MSYM_VALUE.
5986         (evaluate_subexp_for_cast): New function.
5987         * gdbtypes.c (init_nodebug_var_type): New function.
5988         (objfile_type): Use it to initialize types of variables with no
5989         debug info.
5990         * typeprint.c (error_unknown_type): New.
5991         * typeprint.h (error_unknown_type): New declaration.
5992         * compile/compile-c-types.c (convert_type_basic): Handle
5993         TYPE_CODE_ERROR; warn and fallback to int for variables with
5994         unknown type.
5995
5996 2017-09-04  Pedro Alves  <palves@redhat.com>
5997
5998         * eval.c (evaluate_var_value): New function, factored out from ...
5999         (evaluate_subexp_standard): ... here.
6000
6001 2017-09-04  Pedro Alves  <palves@redhat.com>
6002
6003         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6004         Remove useless assignments to 'op'.
6005
6006 2017-09-04  Pedro Alves  <palves@redhat.com>
6007
6008         * eval.c (eval_skip_value): New function.
6009         (evaluate_subexp_standard): Use it.
6010
6011 2017-09-04  Pedro Alves  <palves@redhat.com>
6012
6013         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6014         function name from symbol/minsym and pass it to
6015         error_call_unknown_return_type.
6016
6017 2017-09-04  Pedro Alves  <palves@redhat.com>
6018
6019         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6020         * ax-gdb.c (gen_msym_var_ref): New function.
6021         (gen_expr): Handle OP_VAR_MSYM_VALUE.
6022         * eval.c (evaluate_var_msym_value): New function.
6023         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6024         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6025         to call_function_by_hand.
6026         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6027         Handle OP_VAR_MSYM_VALUE.
6028         (union exp_element) <msymbol>: New field.
6029         * minsyms.h (struct type): Forward declare.
6030         (find_minsym_type_and_address): Declare.
6031         * parse.c (write_exp_elt_msym): New function.
6032         (write_exp_msymbol): Delete, refactored as ...
6033         (find_minsym_type_and_address): ... this new function.
6034         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6035         (operator_length_standard, operator_check_standard): Handle
6036         OP_VAR_MSYM_VALUE.
6037         * std-operator.def (OP_VAR_MSYM_VALUE): New.
6038
6039 2017-09-04  Pedro Alves  <palves@redhat.com>
6040
6041         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6042         TYPE_GNU_IFUNC specially here.  Throw error if return type is
6043         unknown.
6044         * ada-typeprint.c (print_func_type): Handle functions with unknown
6045         return type.
6046         * c-typeprint.c (c_type_print_base): Handle functions and methods
6047         with unknown return type.
6048         * compile/compile-c-symbols.c (convert_symbol_bmsym)
6049         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6050         * compile/compile-c-types.c: Include "objfiles.h".
6051         (convert_func): For functions with unknown return type, warn and
6052         default to int.
6053         * compile/compile-object-run.c (compile_object_run): Adjust call
6054         to call_function_by_hand_dummy.
6055         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6056         call_function_by_hand.
6057         * eval.c (evaluate_subexp_standard): Adjust calls to
6058         call_function_by_hand.  Handle functions and methods with unknown
6059         return type.  Pass expect_type to call_function_by_hand.
6060         * f-typeprint.c (f_type_print_base): Handle functions with unknown
6061         return type.
6062         * gcore.c (call_target_sbrk): Adjust call to
6063         call_function_by_hand.
6064         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6065         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
6066         an integer address type instead of nodebug.
6067         * guile/scm-value.c (gdbscm_value_call): Adjust call to
6068         call_function_by_hand.
6069         * infcall.c (error_call_unknown_return_type): New function.
6070         (call_function_by_hand): New "default_return_type" parameter.
6071         Pass it down.
6072         (call_function_by_hand_dummy): New "default_return_type"
6073         parameter.  Use it instead of defaulting to int.  If there's no
6074         default and the return type is unknown, throw an error.  If
6075         there's a default return type, and the called function has no
6076         debug info, then assume the function is prototyped.
6077         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6078         New "default_return_type" parameter.
6079         (error_call_unknown_return_type): New declaration.
6080         * linux-fork.c (call_lseek): Cast return type of lseek.
6081         (inferior_call_waitpid, checkpoint_command): Adjust calls to
6082         call_function_by_hand.
6083         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6084         calls to call_function_by_hand.
6085         * m2-typeprint.c (m2_procedure): Handle functions with unknown
6086         return type.
6087         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6088         (value_nsstring, print_object_command): Adjust calls to
6089         call_function_by_hand.
6090         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6091         functions with unknown return type.
6092         (pascal_type_print_func_varspec_suffix): New function.
6093         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6094         TYPE_CODE_METHOD>: Use it.
6095         * python/py-value.c (valpy_call): Adjust call to
6096         call_function_by_hand.
6097         * rust-lang.c (rust_evaluate_funcall): Adjust call to
6098         call_function_by_hand.
6099         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6100         call_function_by_hand.
6101         * valops.c (value_allocate_space_in_inferior): Adjust call to
6102         call_function_by_hand.
6103         * typeprint.c (type_print_unknown_return_type): New function.
6104         * typeprint.h (type_print_unknown_return_type): New declaration.
6105
6106 2017-09-04  Pedro Alves  <palves@redhat.com>
6107
6108         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6109         types with more than one parameter as prototyped.
6110
6111 2017-09-04  Pedro Alves  <palves@redhat.com>
6112
6113         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6114         (disassemble_command): Use gdb_disassembly_flags instead of bare
6115         int.
6116         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6117         (dump_insns, do_mixed_source_and_assembly_deprecated)
6118         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6119         Use gdb_disassembly_flags instead of bare int.
6120         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6121         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6122         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6123         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
6124         (enum gdb_disassembly_flag): ... values of this new enumeration.
6125         (gdb_disassembly_flags): Define.
6126         (gdb_disassembly)
6127         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6128         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6129         gdb_disassembly_flags instead of bare int.
6130         * record-btrace.c (btrace_insn_history)
6131         (record_btrace_insn_history, record_btrace_insn_history_range)
6132         (record_btrace_insn_history_from): Use gdb_disassembly_flags
6133         instead of bare int.
6134         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6135         Use gdb_disassembly_flags instead of bare int.
6136         * target-debug.h (target_debug_print_gdb_disassembly_flags):
6137         Define.
6138         * target-delegates.c: Regenerate.
6139         * target.c (target_insn_history, target_insn_history_from)
6140         (target_insn_history_range): Use gdb_disassembly_flags instead of
6141         bare int.
6142         * target.h: Include "disasm.h".
6143         (struct target_ops) <to_insn_history, to_insn_history_from,
6144         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6145         int.
6146         (target_insn_history, target_insn_history_from)
6147         (target_insn_history_range): Use gdb_disassembly_flags instead of
6148         bare int.
6149
6150 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6151
6152         * cli/cli-script.c (build_command_line): For if/while commands,
6153         check whether args is empty.
6154
6155 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6156
6157         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6158         (enum command_control_type): Likewise.
6159         (struct command_line): Likewise.
6160         (free_command_lines): Likewise.
6161         (struct command_lines_deleter): Likewise.
6162         (command_line_up): Likewise.
6163         (read_command_lines): Likewise.
6164         (read_command_lines_1): Likewise.
6165         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6166         (enum command_control_type): Likewise.
6167         (struct command_line): Likewise.
6168         (free_command_lines): Likewise.
6169         (struct command_lines_deleter): Likewise.
6170         (command_line_up): Likewise.
6171         (read_command_lines): Likewise.
6172         (read_command_lines_1): Likewise.
6173         * breakpoint.h: Include cli/cli-script.h.
6174         * extension-priv.h: Likewise.
6175         * gdbcmd.h: Likewise.
6176
6177 2017-09-04  Pedro Alves  <palves@redhat.com>
6178
6179         * ada-lang.c (is_known_support_routine): Move sal declaration to
6180         where it is initialized.
6181         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6182         (parse_breakpoint_sals, decode_static_tracepoint_spec)
6183         (clear_command, update_static_tracepoint): Remove init_sal
6184         references.  Move declarations closer to initializations.
6185         * cli/cli-cmds.c (list_command): Move sal declarations closer to
6186         initializations.
6187         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6188         references.  Move sal declarations closer to initializations.
6189         * frame.c (find_frame_sal): Return a symtab_and_line via function
6190         return instead of output parameter.  Remove init_sal references.
6191         * frame.h (find_frame_sal): Return a symtab_and_line via function
6192         return instead of output parameter.
6193         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6194         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6195         instead of memset.
6196         (gdbscm_find_pc_line): Remove init_sal reference.
6197         * infcall.c (call_function_by_hand_dummy): Remove init_sal
6198         references.  Move declarations closer to initializations.
6199         * infcmd.c (set_step_frame): Update.  Move declarations closer to
6200         initializations.
6201         (finish_backward): Remove init_sal references.  Move declarations
6202         closer to initializations.
6203         * infrun.c (process_event_stop_test, handle_step_into_function)
6204         (insert_hp_step_resume_breakpoint_at_frame)
6205         (insert_step_resume_breakpoint_at_caller): Likewise.
6206         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6207         (symbol_to_sal): Likewise.
6208         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6209         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6210         to its initialization.
6211         * reverse.c (save_bookmark_command): Use new/delete.  Remove
6212         init_sal references.  Move declarations closer to initializations.
6213         * source.c (get_current_source_symtab_and_line): Remove brace
6214         initialization.
6215         (set_current_source_symtab_and_line): Now takes the sal by const
6216         reference.  Remove brace initialization.
6217         (line_info): Remove init_sal reference.
6218         * source.h (set_current_source_symtab_and_line): Now takes a
6219         symtab_and_line via const reference.
6220         * stack.c (set_current_sal_from_frame): Adjust.
6221         (print_frame_info): Adjust.
6222         (get_last_displayed_sal): Return the sal via function return
6223         instead of via output parameter.  Simplify.
6224         (frame_info): Adjust.
6225         * stack.h (get_last_displayed_sal): Return the sal via function
6226         return instead of via output parameter.
6227         * symtab.c (init_sal): Delete.
6228         (find_pc_sect_line): Remove init_sal references.  Move
6229         declarations closer to initializations.
6230         (find_function_start_sal): Remove init_sal references.  Move
6231         declarations closer to initializations.
6232         * symtab.h (struct symtab_and_line): In-class initialize all
6233         fields.
6234         * tracepoint.c (set_traceframe_context)
6235         (print_one_static_tracepoint_marker): Remove init_sal references.
6236         Move declarations closer to initializations.
6237         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6238         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
6239         declarations closer to initializations.
6240         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6241         init_sal references.  Adjust.
6242
6243 2017-09-04  Pedro Alves  <palves@redhat.com>
6244
6245         * ax-gdb.c (agent_command_1): Use range-for.
6246         * break-catch-throw.c (re_set_exception_catchpoint): Update.
6247         * breakpoint.c: Include "common/array-view.h".
6248         (init_breakpoint_sal, create_breakpoint_sal): Change sals
6249         parameter from struct symtabs_and_lines to
6250         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
6251         (breakpoint_sals_to_pc): Change sals parameter from struct
6252         symtabs_and_lines to std::vector reference.
6253         (check_fast_tracepoint_sals): Change sals parameter from struct
6254         symtabs_and_lines to std::array_view.  Use range-for.
6255         (decode_static_tracepoint_spec): Return a std::vector instead of
6256         symtabs_and_lines.  Update.
6257         (create_breakpoint): Update.
6258         (break_range_command, until_break_command, clear_command): Update.
6259         (base_breakpoint_decode_location, bkpt_decode_location)
6260         (bkpt_probe_create_sals_from_location)
6261         (bkpt_probe_decode_location, tracepoint_decode_location)
6262         (tracepoint_probe_decode_location)
6263         (strace_marker_create_sals_from_location): Return a std::vector
6264         instead of symtabs_and_lines.
6265         (strace_marker_create_breakpoints_sal): Update.
6266         (strace_marker_decode_location): Return a std::vector instead of
6267         symtabs_and_lines.  Update.
6268         (update_breakpoint_locations): Change struct symtabs_and_lines
6269         parameters to gdb::array_view.  Adjust.
6270         (location_to_sals): Return a std::vector instead of
6271         symtabs_and_lines.  Update.
6272         (breakpoint_re_set_default): Use std::vector instead of struct
6273         symtabs_and_lines.
6274         (decode_location_default): Return a std::vector instead of
6275         symtabs_and_lines.  Update.
6276         * breakpoint.h: Include "common/array-view.h".
6277         (struct breakpoint_ops) <decode_location>: Now returns a
6278         std::vector instead of returning a symtabs_and_lines via output
6279         parameter.
6280         (update_breakpoint_locations): Change sals parameters to use
6281         gdb::array_view.
6282         * cli/cli-cmds.c (edit_command, list_command): Update to use
6283         std::vector and gdb::array_view.
6284         (ambiguous_line_spec): Adjust to use gdb::array_view and
6285         range-for.
6286         (compare_symtabs): Rename to ...
6287         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
6288         const reference and adjust.
6289         (filter_sals): Rewrite using std::vector and standard algorithms.
6290         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6291         (jump_command): Update to use std::vector.
6292         * linespec.c (struct linespec_state) <canonical_names>: Update
6293         comment.
6294         (add_sal_to_sals_basic): Delete.
6295         (add_sal_to_sals, filter_results, convert_results_to_lsals)
6296         (decode_line_2, create_sals_line_offset)
6297         (convert_address_location_to_sals, convert_linespec_to_sals)
6298         (convert_explicit_location_to_sals, parse_linespec)
6299         (event_location_to_sals, decode_line_full, decode_line_1)
6300         (decode_line_with_current_source)
6301         (decode_line_with_last_displayed, decode_objc)
6302         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6303         (linespec_result::~linespec_result): Adjust to use std::vector
6304         instead of symtabs_and_lines.
6305         * linespec.h (linespec_sals::sals): Now a std::vector.
6306         (struct linespec_result): Use std::vector, bool, and in-class
6307         initialization.
6308         (decode_line_1, decode_line_with_current_source)
6309         (decode_line_with_last_displayed): Return std::vector.
6310         * macrocmd.c (info_macros_command): Use std::vector.
6311         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6312         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6313         std::vector.
6314         * probe.h (parse_probes): Return a std::vector.
6315         * python/python.c (gdbpy_decode_line): Use std::vector and
6316         gdb::array_view.
6317         * source.c (select_source_symtab, line_info): Use std::vector.
6318         * stack.c (func_command): Use std::vector.
6319         * symtab.h (struct symtabs_and_lines): Delete.
6320         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6321
6322 2017-09-04  Pedro Alves  <palves@redhat.com>
6323
6324         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6325         unittests/array-view-selftests.c.
6326         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6327         * common/array-view.h: New file.
6328         * unittests/array-view-selftests.c: New file.
6329
6330 2017-09-04  Pedro Alves  <palves@redhat.com>
6331
6332         * cli/cli-cmds.c (edit_command): Pass message to
6333         ambiguous_line_spec.
6334         (list_command): Pass message to ambiguous_line_spec.  Say
6335         "first"/"last" instead of "start" and "end" to be consistent with
6336         the manual.
6337         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
6338         them to print formatted message.
6339
6340 2017-09-04  Pedro Alves  <palves@redhat.com>
6341
6342         * btrace.c (ftrace_add_pt): Pass btrace_insn to
6343         ftrace_update_insns by reference instead of pointer.
6344
6345 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6346
6347         * i386-go32-tdep.c: Include x86-xstate.h.
6348         (i386_go32_init_abi): Call i386_target_description.
6349         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6350         if xcr0 is X86_XSTATE_X87_MASK.
6351         * i386-tdep.h (tdesc_i386): Remove the declaration.
6352         (tdesc_i386_mmx): Likewise.
6353
6354 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6355
6356         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6357         X86_XSTATE_SSE_MASK instead of 0.
6358
6359 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6360
6361         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6362         i386_target_description.
6363         * i386-fbsd-nat.c (i386fbsd_read_description): Call
6364         i386_target_description.
6365         * i386-tdep.c (i386_gdbarch_init): Likewise.
6366
6367 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6368
6369         * amd64-darwin-tdep.c: Include "x86-xstate.h".
6370         (x86_darwin_init_abi_64): Call amd64_target_description.
6371         * amd64-dicos-tdep.c: Likewise.
6372         * amd64-fbsd-nat.c: Likewise.
6373         * amd64-fbsd-tdep.c: Likewise.
6374         * amd64-nbsd-tdep.c: Likewise.
6375         * amd64-obsd-tdep.c: Likewise.
6376         * amd64-sol2-tdep.c: Likewise.
6377         * amd64-windows-tdep.c: Likewise.
6378         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6379
6380 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6381
6382         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6383         (btrace_function) <insn>: Change type to use std::vector.
6384         * btrace.c (ftrace_debug, ftrace_call_num_insn,
6385         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6386         ftrace_update_insns, ftrace_compute_global_level_offset,
6387         btrace_stitch_bts, btrace_clear, btrace_insn_get,
6388         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6389         change to std::vector.
6390         (ftrace_update_insns): Adjust to change to std::vector, change
6391         type of INSN parameter.
6392         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6393         * record-btrace.c (btrace_call_history_insn_range,
6394         btrace_compute_src_line_range,
6395         record_btrace_frame_prev_register): Adjust to change to
6396         std::vector.
6397         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6398         to change to std::vector.
6399
6400 2017-09-03  Tom Tromey  <tom@tromey.com>
6401
6402         * corefile.c (reopen_exec_file): Use std::string.
6403
6404 2017-09-03  Tom Tromey  <tom@tromey.com>
6405
6406         * compile/compile.c (compile_register_name_mangled): Return
6407         std::string.
6408         * compile/compile-loc2c.c (pushf_register_address): Update.
6409         (pushf_register): Update.
6410         * compile/compile-c-types.c (convert_array): Update.
6411         * compile/compile-c-symbols.c (generate_vla_size): Update.
6412         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6413         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6414         (convert_one_symbol): Update.
6415         (generate_c_for_for_one_variable): Update.
6416         * compile/compile-c-support.c (c_get_range_decl_name): Return a
6417         std::string.
6418         (generate_register_struct): Update.
6419         * compile/compile-internal.h (c_get_range_decl_name): Return a
6420         std::string.
6421         (compile_register_name_mangled): Return std::string.
6422
6423 2017-09-03  Tom Tromey  <tom@tromey.com>
6424
6425         * utils.c (perror_string): Return a std::string.
6426         (throw_perror_with_name, perror_warning_with_name): Update.
6427
6428 2017-09-03  Tom Tromey  <tom@tromey.com>
6429
6430         * demangle.c (demangle_command): Use std::string,
6431         unique_xmalloc_ptr.
6432
6433 2017-09-03  Tom Tromey  <tom@tromey.com>
6434
6435         * cli/cli-setshow.c (do_set_command): Use std::string.
6436
6437 2017-09-03  Tom Tromey  <tom@tromey.com>
6438
6439         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6440
6441 2017-09-03  Tom Tromey  <tom@tromey.com>
6442
6443         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6444
6445 2017-09-03  Tom Tromey  <tom@tromey.com>
6446
6447         * mi/mi-cmd-env.c (env_execute_cli_command): Use
6448         gdb::unique_xmalloc_ptr.
6449
6450 2017-09-03  Tom Tromey  <tom@tromey.com>
6451
6452         * thread.c (print_thread_info_1): Use string_printf.
6453         (thread_apply_command, thread_apply_all_command): Use
6454         std::string.
6455
6456 2017-09-03  Tom Tromey  <tom@tromey.com>
6457
6458         * valprint.c (val_print_string): Update.
6459         * gdbcore.h (memory_error_message): Return std::string.
6460         * corefile.c (memory_error_message): Return std::string.
6461         (memory_error): Update.
6462         * breakpoint.c (insert_bp_location): Update.
6463
6464 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
6465
6466         * target/waitstatus.h (target_waitstatus_to_string): Change
6467         return type to std::string.
6468         * target/waitstatus.c (target_waitstatus_to_string): Return
6469         std::string.
6470         * target.h (target_waitstatus_to_string): Remove declaration.
6471         * infrun.c (resume, clear_proceed_status_thread,
6472         print_target_wait_results, do_target_wait, save_waitstatus,
6473         stop_all_threads): Adjust.
6474         * record-btrace.c (record_btrace_wait): Adjust.
6475         * target-debug.h
6476         (target_debug_print_struct_target_waitstatus_p): Adjust.
6477
6478 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6479
6480         PR gdb/22046
6481         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6482         detection.
6483
6484 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
6485
6486         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6487         for setting/unsetting environment variables on the remote target.
6488         (New remote packets): Add entries for QEnvironmentHexEncoded,
6489         QEnvironmentUnset and QEnvironmentReset.
6490         * common/environ.c (gdb_environ::operator=): Extend method to
6491         handle m_user_set_env_list and m_user_unset_env_list.
6492         (gdb_environ::clear): Likewise.
6493         (match_var_in_string): Change type of first parameter from 'char
6494         *' to 'const char *'.
6495         (gdb_environ::set): Extend method to handle
6496         m_user_set_env_list and m_user_unset_env_list.
6497         (gdb_environ::unset): Likewise.
6498         (gdb_environ::clear_user_set_env): New method.
6499         (gdb_environ::user_set_envp): Likewise.
6500         (gdb_environ::user_unset_envp): Likewise.
6501         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6502         m_user_unset_env_list on move constructor/assignment.
6503         (unset): Add new default parameter 'update_unset_list = true'.
6504         (clear_user_set_env): New method.
6505         (user_set_envp): Likewise.
6506         (user_unset_envp): Likewise.
6507         (m_user_set_env_list): New std::set.
6508         (m_user_unset_env_list): Likewise.
6509         * common/rsp-low.c (hex2str): New function.
6510         (bin2hex): New overload for bin2hex function.
6511         * common/rsp-low.c (hex2str): New prototype.
6512         (str2hex): New overload prototype.
6513         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6514         QEnvironmentUnset and QEnvironmentReset.
6515         (remote_protocol_features): Add QEnvironmentHexEncoded,
6516         QEnvironmentUnset and QEnvironmentReset packets.
6517         (send_environment_packet): New function.
6518         (extended_remote_environment_support): Likewise.
6519         (extended_remote_create_inferior): Call
6520         extended_remote_environment_support.
6521         (_initialize_remote): Add QEnvironmentHexEncoded,
6522         QEnvironmentUnset and QEnvironmentReset packet configs.
6523         * unittests/environ-selftests.c (gdb_selftest_env_var):
6524         New variable.
6525         (test_vector_initialization): New function.
6526         (test_init_from_host_environ): Likewise.
6527         (test_reinit_from_host_environ): Likewise.
6528         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6529         Likewise.
6530         (test_unset_set_empty_vector): Likewise.
6531         (test_vector_clear): Likewise.
6532         (test_std_move): Likewise.
6533         (test_move_constructor):
6534         (test_self_move): Likewise.
6535         (test_set_unset_reset): Likewise.
6536         (run_tests): Rewrite in terms of the functions above.
6537
6538 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
6539
6540         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6541         (adi_available): Use a temp variable of type CORE_ADDR as argument
6542         3 when calling target_auxv_search.
6543         (adi_normalize_address): Use masks and xor operators to calculate
6544         normalized address.
6545         (adi_read_versions, adi_write_versions, adi_print_versions)
6546         (do_examine, do_assign): Use paddress.
6547
6548 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
6549
6550         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6551         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6552         out of loop and add supply of FIR.
6553         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6554         add collect of FIR.
6555
6556 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
6557
6558         PR gdb/21827
6559         * cli/cli-script.c (define_command): Don't convert command name
6560         to lower case.
6561
6562 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
6563
6564         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6565         Update all callers accordingly. Remove all code blocks handling
6566         the case where DISPP is not NULL.
6567
6568 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6569
6570         PR symtab/22003
6571         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6572         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6573         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6574
6575 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6576
6577         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6578         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6579         (read_comp_units_from_section): New parameter abbrev_section, use
6580         read_and_check_comp_unit_head, allocate signatured_type if needed.
6581         (create_all_comp_units): Update read_comp_units_from_section caller.
6582
6583 2017-08-23  Pedro Alves  <palves@redhat.com>
6584
6585         PR remote/21852
6586         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6587         to null_ptid and switch to thread without reading the registers
6588         after adding the inferior.
6589
6590 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6591
6592         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6593         compile-gcc.
6594         * compile/compile.c (compile_gcc, show_compile_gcc): New.
6595         (compile_to_object): Implement compile_gcc.
6596         (_initialize_compile): Install "set compile-gcc".  Initialize
6597         compile_gcc.
6598
6599 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6600
6601         * compile/compile.c (compile_to_object): Conditionally call
6602         set_verbose.  Conditionally call compile or compile_v0.
6603
6604 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
6605
6606         * sparc64-tdep.h: (adi_normalize_address): New export.
6607         * sparc-nat.h: (open_adi_tag_fd): New export.
6608         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
6609         * sparc64-linux-tdep.c:
6610         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
6611         (sparc64_linux_handle_segmentation_fault): New function.
6612         (sparc64_linux_init_abi): Register
6613         sparc64_linux_handle_segmentation_fault
6614         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
6615         (sparc64_addr_bits_remove): New function.
6616         (sparc64_init_abi): Register sparc64_addr_bits_remove.
6617         (MAX_PROC_NAME_SIZE): New macro.
6618         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
6619         (sparc64adilist): New variable.
6620         (adi_proc_list): New variable.
6621         (find_adi_info): New function.
6622         (add_adi_info): New function.
6623         (get_adi_info_proc): New function.
6624         (get_adi_info): New function.
6625         (info_adi_command): New function.
6626         (read_maps_entry): New function.
6627         (adi_available): New function.
6628         (adi_normalize_address): New function.
6629         (adi_align_address): New function.
6630         (adi_convert_byte_count): New function.
6631         (adi_tag_fd): New function.
6632         (adi_is_addr_mapped): New function.
6633         (adi_read_versions): New function.
6634         (adi_write_versions): New function.
6635         (adi_print_versions): New function.
6636         (do_examine): New function.
6637         (do_assign): New function.
6638         (adi_examine_command): New function.
6639         (adi_assign_command): New function.
6640         (_initialize_sparc64_adi_tdep): New function.
6641
6642 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
6643
6644         * breakpoint.c (breakpoints_info): Rename to ...
6645         (info_breakpoints_command): ... this.
6646         (watchpoints_info): Rename to ...
6647         (info_watchpoints_command): ... this.
6648         (tracepoints_info): Rename to ...
6649         (info_tracepoints_command): ... this.
6650         (_initialize_breakpoint): Adjust.
6651         * dcache.c (dcache_info): Rename to ...
6652         (info_display_command): ... this.
6653         (_initialize_dcache): Adjust.
6654         * frame.h (args_info): Rename to ...
6655         (info_args_command): ... this.
6656         (locals_info): Rename to ...
6657         (info_locals_command): ... this.
6658         * infcmd.c (nofp_registers_info): Rename to ...
6659         (info_registers_command): ... this.
6660         (float_info): Rename to ...
6661         (info_float_command): ... this.
6662         (program_info): Rename to ...
6663         (info_program_command): ... this.
6664         (all_registers_info): Rename to ...
6665         (info_all_registers_command): ... this.
6666         (vector_info): Rename to ...
6667         (info_vector_command): ... this.
6668         (float_info): Rename to ...
6669         (info_float_command): ... this.
6670         (_initialize_infcmd): Adjust.
6671         * inferior.h (term_info): Rename to ...
6672         (info_terminal_command): ... this.
6673         * inflow.c (term_info): Rename to ...
6674         (info_terminal_command): ... this.
6675         (_initialize_inflow): Adjust.
6676         * infrun.c (signals_info): Rename to ...
6677         (info_signals_command): ... this.
6678         (_initialize_infrun): Adjust.
6679         * objc-lang.c (classes_info): Rename to ...
6680         (info_classes_command): ... this.
6681         (selectors_info): Rename to ...
6682         (info_selectors_command): ... this.
6683         (_initialize_objc_language): Adjust.
6684         * printcmd.c (sym_info): Rename to ...
6685         (info_symbol_command): ... this.
6686         (address_info): Rename to ...
6687         (info_address_command): ... this.
6688         (display_info): Rename to ...
6689         (info_display_command): ... this.
6690         (_initialize_printcmd): Adjust.
6691         * reverse.c (bookmarks_info): Rename to ...
6692         (info_breakpoints_command): ... this.
6693         (_initialize_reverse): Adjust.
6694         * ser-go32.c (dos_info): Rename to ...
6695         (info_serial_command): ... this.
6696         (_initialize_ser_dos): Adjust.
6697         * skip.c (skip_info): Rename to ...
6698         (info_skip_command): ... this.
6699         (_initialize_step_skip): Adjust.
6700         * source.c (line_info): Rename to ...
6701         (info_line_command): ... this.
6702         (source_info): Rename to ...
6703         (info_source_command)
6704         * stack.c (frame_info): Rename to ...
6705         (info_frame_command): ... this.
6706         (locals_info): Rename to ...
6707         (info_locals_command): ... this.
6708         (args_info): Rename to ...
6709         (info_args_command): ... this.
6710         (_initialize_stack): Adjust.
6711         * symtab.c (sources_info): Rename to ...
6712         (info_sources_command): ... this.
6713         (variables_info): Rename to ...
6714         (info_variables_command): ... this.
6715         (functions_info): Rename to ...
6716         (info_functions_command): ... this.
6717         (types_info): Rename to ...
6718         (info_types_command): ... this.
6719         (_initialize_symtab): Adjust.
6720         * target.c (target_info): Rename to ...
6721         (info_target_command): ... this.
6722         (initialize_targets): Adjust.
6723         * tracepoint.c (tvariables_info): Rename to ...
6724         (info_tvariables_command): ... this.
6725         (scope_info): Rename to ...
6726         (info_scope_command): ... this.
6727         (trace_dump_actions): Adjust.
6728         (_initialize_tracepoint): Adjust.
6729
6730 2017-08-22  Tom Tromey  <tom@tromey.com>
6731
6732         * breakpoint.h (install_breakpoint): Update.
6733         * breakpoint.c (add_solib_catchpoint): Update.
6734         (install_breakpoint): Change argument to a std::unique_ptr.
6735         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6736         (create_breakpoint_sal, create_breakpoint): Update.
6737         (watch_command_1, catch_exec_command_1)
6738         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6739         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6740         Return the breakpoint.
6741         (set_raw_breakpoint_without_location, set_raw_breakpoint)
6742         (new_single_step_breakpoint): Update.
6743         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
6744         std::unique_ptr.
6745         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6746         std::unique_ptr.
6747         * break-catch-sig.c (create_signal_catchpoint): Use
6748         std::unique_ptr.
6749         * ada-lang.c (create_ada_exception_catchpoint): Use
6750         std::unique_ptr.
6751
6752 2017-08-22  Tom Tromey  <tom@tromey.com>
6753
6754         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
6755
6756 2017-08-22  Tom Tromey  <tom@tromey.com>
6757
6758         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
6759         (lookup_partial_symbol): Update.
6760
6761 2017-08-22  Tom Tromey  <tom@tromey.com>
6762
6763         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
6764         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
6765         (find_and_open_source, symtab_to_fullname): Update.
6766         * psymtab.c (psymtab_to_fullname): Update.
6767
6768 2017-08-22  Tom Tromey  <tom@tromey.com>
6769
6770         * exec.c (exec_file_attach): Update.
6771         * linux-thread-db.c (try_thread_db_load): Update.
6772         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
6773         * utils.c (gdb_realpath): Change return type.
6774         (gdb_realpath_keepfile): Update.
6775         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
6776         (_initialize_utils): Register the new self test.
6777         * source.c (openp): Update.
6778         (find_and_open_source): Update.
6779         * nto-tdep.c (nto_find_and_open_solib): Update.
6780         * main.c (set_gdb_data_directory): Update.
6781         (captured_main_1): Update.
6782         * dwarf2read.c (dwarf2_get_dwz_file): Update
6783         (dw2_map_symbol_filenames): Update.
6784         * auto-load.c (auto_load_safe_path_vec_update): Update.
6785         (filename_is_in_auto_load_safe_path_vec): Change type of
6786         "filename_realp".
6787         (auto_load_objfile_script): Update.
6788         (file_is_auto_load_safe): Update.  Use std::string.
6789         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
6790
6791 2017-08-22  Tom Tromey  <tom@tromey.com>
6792
6793         * utils.c (gdb_realpath_keepfile): Return a
6794         gdb::unique_xmalloc_ptr.
6795         * exec.c (exec_file_attach): Update.
6796         * utils.h (gdb_realpath_keepfile): Return a
6797         gdb::unique_xmalloc_ptr.
6798
6799 2017-08-22  Tom Tromey  <tom@tromey.com>
6800
6801         * compile/compile.c (compile_file_command): Use
6802         gdb::unique_xmalloc_ptr, std::string.
6803         * utils.c (gdb_abspath): Change return type.
6804         * source.c (openp): Update.
6805         * objfiles.c (allocate_objfile): Update.
6806         * main.c (set_gdb_data_directory): Update.
6807         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
6808
6809 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
6810
6811         * cli-cmds.c (list_commands): List actual code around more than
6812         one location.
6813
6814 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
6815
6816         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
6817
6818 2017-08-21  Pedro Alves  <palves@redhat.com>
6819
6820         PR gdb/19487
6821         * c-exp.y (variable production): Handle function aliases.
6822         * minsyms.c (msymbol_is_text): New function.
6823         * minsyms.h (msymbol_is_text): Declare.
6824         * symtab.c (find_function_alias_target): New function.
6825         * symtab.h (find_function_alias_target): Declare.
6826
6827 2017-08-21  Pedro Alves  <palves@redhat.com>
6828
6829         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
6830         typedefs.
6831         * typeprint.c (whatis_exp): If handling "whatis", and expression
6832         is OP_TYPE, strip one typedef level.  Otherwise don't strip
6833         typedefs here.
6834         * valops.c (value_cast): Save "to" type before resolving
6835         stubs/typedefs.  Use that type as resulting value's type.
6836
6837 2017-08-18  Tom Tromey  <tom@tromey.com>
6838             Pedro Alves  <palves@redhat.com>
6839
6840         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
6841         * sol-thread.c (sol_thread_resume, sol_thread_wait)
6842         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
6843         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
6844         * proc-service.c (ps_xfer_memory): Use scoped_restore.
6845         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
6846         (linux_get_siginfo_data): Add "thread" argument.  Use
6847         scoped_restore.
6848         * linux-nat.c (linux_child_follow_fork)
6849         (check_stopped_by_watchpoint): Use scoped_restore.
6850         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
6851         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
6852         (restore_inferior_ptid, save_inferior_ptid): Remove.
6853         * btrace.c (btrace_fetch): Use scoped_restore.
6854         * bsd-uthread.c (bsd_uthread_fetch_registers)
6855         (bsd_uthread_store_registers): Use scoped_restore.
6856         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
6857         scoped_restore.
6858         * aix-thread.c (aix_thread_resume, aix_thread_wait)
6859         (aix_thread_xfer_partial): Use scoped_restore.
6860         * inferior.h (save_inferior_ptid): Remove.
6861
6862 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6863
6864         PR tdep/21818
6865         * arm-tdep.c (gdb_print_insn_arm): Mark
6866         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
6867
6868 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6869
6870         * NEWS: Mention GDBserver's new option "--selftest".
6871         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
6872         * selftest.c: Move it to common/selftest.c.
6873         * selftest.h: Move it to common/selftest.h.
6874         * selftest-arch.c (reset): New function.
6875         (tests_with_arch): Call reset.
6876
6877 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6878
6879         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
6880         instead of exception_fprintf and printf_filtered.
6881
6882 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6883
6884         * selftest.c (register_self_test): Rename it to
6885         selftests::register_test.
6886         (run_self_tests): selftest::run_tests.
6887         * selftest.h: Update declarations.
6888         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
6889         selftests::register_test_foreach_arch.
6890         * selftest-arch.h: Update declaration.
6891         * aarch64-tdep.c: Update.
6892         * arm-tdep.c: Likewise.
6893         * disasm-selftests.c: Likewise.
6894         * dwarf2loc.c: Likewise.
6895         * dwarf2-frame.c: Likewise.
6896         * findvar.c: Likewise.
6897         * gdbarch-selftests.c: Likewise.
6898         * maint.c (maintenance_selftest): Likewise.
6899         * regcache.c: Likewise.
6900         * rust-exp.y: Likewise.
6901         * selftest-arch.c: Likewise.
6902         * unittests/environ-selftests.c: Likewise.
6903         * unittests/function-view-selftests.c: Likewise.
6904         * unittests/offset-type-selftests.c: Likewise.
6905         * unittests/optional-selftests.c: Likewise.
6906         * unittests/scoped_restore-selftests.c: Likewise.
6907         * utils-selftests.c: Likewise.
6908
6909 2017-08-17  Pedro Alves  <palves@redhat.com>
6910
6911         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
6912         local.
6913
6914 2017-08-17  Pedro Alves  <palves@redhat.com>
6915
6916         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
6917         field.
6918         (reset_die_in_process): Delete, replaced by ...
6919         (process_die_scope): ... this new class.  Make it responsible for
6920         freeing cu->line_header too.
6921         (process_die): Use process_die_scope.
6922         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
6923         cu->line_header_die_owner.  Don't release the line header if it's
6924         owned by the CU.
6925         (setup_type_unit_groups): Make the CU/DIE own the line header.
6926         Don't release the line header here.
6927
6928 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
6929
6930         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
6931
6932 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6933
6934         * NEWS: Mention new shortcuts for nexti and stepi in TUI
6935         Single-Key mode
6936
6937 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6938
6939         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
6940         mode command list.
6941
6942 2017-08-15  Stafford Horne  <shorne@gmail.com>
6943
6944         * MAINTAINERS (Write After Approval): Add Stafford Horne.
6945
6946 2017-08-15  Stafford Horne  <shorne@gmail.com>
6947
6948         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
6949
6950 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
6951
6952         PR gdb/21954
6953         * infcmd.c (unset_environment_command): Use the 'clear' method on
6954         the environment instead of resetting it.
6955
6956 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
6957
6958         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
6959         platforms.
6960
6961 2017-08-14  Tom Tromey  <tom@tromey.com>
6962
6963         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
6964         (print_binary_chars): Likewise.
6965         (BITS_IN_BYTES): Remove.
6966
6967 2017-08-14  Tom Tromey  <tom@tromey.com>
6968
6969         PR gdb/21675
6970         * valprint.c (LOW_ZERO): Change value to 034.
6971         (print_octal_chars): Add static_asserts for octal constants.
6972         * printcmd.c (print_scalar_formatted): Add 'd' case.
6973
6974 2017-08-11  Tom Tromey  <tom@tromey.com>
6975
6976         * symfile.c (add_symbol_file_command): Use std::vector.
6977
6978 2017-08-14  Tom Tromey  <tom@tromey.com>
6979
6980         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
6981         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6982         std::move.
6983         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
6984
6985 2017-08-11  Pedro Alves  <palves@redhat.com>
6986
6987         * infrun.c (process_event_stop_test): Adjust
6988         function_name_is_marked_for_skip call.
6989         * skip.c: Include <list>.
6990         (skiplist_entry): Make it a class with private fields, and
6991         getters/setters.
6992         (skiplist_entry_chain): Delete.
6993         (skiplist_entries): New.
6994         (skiplist_entry_count): Delete.
6995         (highest_skiplist_entry_num): New.
6996         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
6997         (add_skiplist_entry): Delete.
6998         (skiplist_entry::skiplist_entry): New.
6999         (skiplist_entry::add_entry): New.
7000         (skip_file_command, skip_function): Adjust.
7001         (compile_skip_regexp): Delete.
7002         (skip_command): Don't compile regexp here.  Adjust to use
7003         skiplist_entry::add_entry.
7004         (skip_info): Adjust to use range-for and getters.
7005         (skip_enable_command, skip_disable_command): Adjust to use
7006         range-for and setters.
7007         (skip_delete_command): Adjust to use std::list.
7008         (add_skiplist_entry): Delete.
7009         (skip_file_p): Delete, refactored as ...
7010         (skiplist_entry::do_skip_file_p): ... this new method.
7011         (skip_gfile_p): Delete, refactored as ...
7012         (skiplist_entry::do_gskip_file_p): ... this new method.
7013         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7014         (skiplist_entry::skip_function_p): ... this new method.
7015         (function_name_is_marked_for_skip): Now returns bool, and takes
7016         the function sal by const reference.  Adjust to use range-for and
7017         skiplist_entry methods.
7018         (_initialize_step_skip): Remove references to
7019         skiplist_entry_chain, skiplist_entry_count.
7020         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7021         takes the function sal by const reference.
7022
7023 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7024
7025         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7026         (dwarf2_frame_cache): Remove reset_cache_cleanup.
7027         (dwarf2_frame_cache):
7028         * frame-unwind.c (frame_unwind_try_unwinder): Catch
7029         RETURN_MASK_ALL and set *this_case to NULL.
7030         * frame-unwind.h: Update comments.
7031
7032 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7033
7034         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7035         (dwarf2_frame_state_copy_regs): Remove.
7036         (dwarf2_frame_state_free_regs): Remove.
7037         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7038         (dwarf2_restore_rule): Call method .alloc_regs instead of
7039         dwarf2_frame_state_alloc_regs.
7040         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
7041         constructor.  Call std::move.
7042         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7043         (dwarf2_frame_cache): Likewise.
7044
7045         [GDB_SELF_TEST]: Include selftest.h and
7046         selftest-arch.h.
7047         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7048         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7049         execute_cfa_program_test.
7050
7051         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7052         copy ctor, assignment operator, move assignment.
7053         <alloc_regs>: New method.
7054         <swap>: New method.
7055         (struct dwarf2_frame_state): Delete dtor.
7056         (dwarf2_frame_state_alloc_regs): Remove declaration.
7057         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7058         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7059
7060 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7061
7062         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7063         (dwarf2_frame_state::dwarf2_frame_state): New.
7064         (dwarf2_frame_state::~dwarf2_frame_state): New.
7065         (dwarf2_fetch_cfa_info): Update.
7066         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
7067         rather than a pointer.  Update code.
7068         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7069         dtor.
7070         <data_align, code_align, retaddr_column>: Change them to const.
7071         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7072         to bool.
7073
7074 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7075
7076         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7077         <loc.exp>: New field.
7078         * dwarf2-frame.c (execute_cfa_program): Update.
7079         (dwarf2_frame_prev_register): Update.
7080
7081 2017-08-10  Pedro Alves  <palves@redhat.com>
7082
7083         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7084
7085 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7086
7087         * fbsd-nat.c (struct fbsd_fork_info): Remove.
7088         (fbsd_pending_children): Use std::list.
7089         (fbsd_remember_child): Likewise.
7090         (fbsd_is_child_pending): Likewise.
7091         (fbsd_pending_vfork_done): Use std::forward_list.
7092         (fbsd_add_vfork_done): Likewise.
7093         (fbsd_is_vfork_done_pending): Likewise.
7094         (fbsd_next_vfork_done): Likewise.
7095
7096 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7097
7098         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7099         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7100         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7101         for `mapfilename'.
7102         (fbsd_xfer_partial): Use gdb::byte_vector.
7103         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7104
7105 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7106
7107         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7108         "filestuff.h".
7109         (fbsd_find_memory_regions): Fix `mapfile' initialization.
7110
7111 2017-08-09  Tom Tromey  <tom@tromey.com>
7112
7113         * skip.c (skiplist_entry): New constructor.
7114         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7115         (skiplist_entry::file_is_glob): Now bool.
7116         (skiplist_entry::file, skiplist_entry::function): Now
7117         std::string.
7118         (make_skip_entry): Return a unique_ptr.  Use new.
7119         (free_skiplist_entry, free_skiplist_entry_cleanup)
7120         (make_free_skiplist_entry_cleanup): Remove.
7121         (skip_command, skip_disable_command, add_skiplist_entry)
7122         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7123         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7124         (function_name_is_marked_for_skip): Update.
7125         (skip_delete_command): Update.  Use delete.
7126
7127 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
7128
7129         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7130         (aarch64_linux_core_read_description): New function.
7131         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7132
7133 2017-08-09  Pedro Alves  <palves@redhat.com>
7134
7135         * cp-name-parser.y (cp_comp_to_string): Return a
7136         gdb::unique_xmalloc_ptr<char>.
7137         * cp-support.c (replace_typedefs_qualified_name)
7138         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7139         (cp_canonicalize_string_full): Use op= instead of explicit
7140         convertion.
7141         (cp_class_name_from_physname, method_name_from_physname)
7142         (cp_func_name, cp_remove_params): Adjust to use
7143         gdb::unique_xmalloc_ptr<char>.
7144         * cp-support.h (cp_comp_to_string): Return a
7145         gdb::unique_xmalloc_ptr<char>.
7146         * python/py-type.c (typy_lookup_type): Adjust to use
7147         gdb::unique_xmalloc_ptr<char>.
7148
7149 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
7150
7151         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7152
7153 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
7154             Yao Qi  <yao.qi@linaro.org>
7155
7156         * cp-support.c (cp_canonicalize_string_full): Use
7157         gdb::unique_xmalloc_ptr<char>.
7158         (cp_canonicalize_string): Likewise.
7159
7160 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7161
7162         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7163         * regformats/i386/amd64-avx-avx512.dat: Remove.
7164         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7165         * regformats/i386/amd64-avx-mpx.dat:Remove.
7166         * regformats/i386/amd64-avx.dat: Remove.
7167         * regformats/i386/amd64-mpx.dat: Remove.
7168         * regformats/i386/i386-avx-avx512.dat: Remove.
7169         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7170         * regformats/i386/i386-avx-mpx.dat: Remove.
7171         * regformats/i386/i386-mmx.dat: Remove.
7172         * regformats/i386/i386-mpx.dat: Remove.
7173
7174 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7175
7176         * amd64-tdep.h (tdesc_x32): Remove the declaration.
7177         * amd64-tdep.c: Don't include features/i386/x32*.c.
7178         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7179         functions.
7180         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7181         and i386/x32-avx-avx512.
7182         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7183         and i386/x32.xml.
7184         * features/i386/x32-avx-avx512.c: Removed.
7185         * features/i386/x32-avx-avx512.xml: Removed.
7186         * features/i386/x32-avx.c: Removed.
7187         * features/i386/x32-avx.xml: Removed.
7188         * features/i386/x32.c: Removed.
7189         * features/i386/x32.xml: Removed.
7190         * regformats/i386/x32-avx-avx512.dat: Removed.
7191         * regformats/i386/x32-avx.dat: Removed.
7192         * regformats/i386/x32.dat: Removed.
7193
7194 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7195
7196         PR breakpoints/21886
7197         * mem-break.c (default_memory_insert_breakpoint): Use
7198         `->placed_address' rather than `->reqstd_address' for the
7199         breakpoint location.
7200
7201 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7202
7203         * arch-utils.c (default_print_insn): Remove arch/mach/endian
7204         assertions.
7205
7206 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7207
7208         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7209         a union of `tdep_info', `tdesc_data' and `id'.
7210         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7211         rather than `info.tdep_info'.
7212         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7213         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7214         * i386-tdep.c (i386_gdbarch_init): Likewise.
7215         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7216         * mips-tdep.c (mips_gdbarch_init): Likewise.
7217         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7218         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7219         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7220         `info.tdep_info'.
7221         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7222         `info.tdep_info'.
7223         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7224         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7225         `info.tdep_info'.
7226         * spu-tdep.c (spu_gdbarch_init): Likewise.
7227         * gdbarch.h: Regenerate.
7228
7229 2017-08-07  Leszek Swirski  <leszeks@google.com>
7230
7231         PR symtab/20899
7232         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7233
7234 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
7235
7236         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7237         (gdbsim_open): Rename gdb_argv args object to argv.
7238
7239 2017-08-05  Tom Tromey  <tom@tromey.com>
7240
7241         * compile/compile-object-load.c (compile_object_load): Use
7242         gdb::unique_xmalloc_ptr.
7243         * cli/cli-dump.c (scan_filename): Rename from
7244         scan_filename_with_cleanup.  Change return type.
7245         (scan_expression): Rename from scan_expression_with_cleanup.
7246         Change return type.
7247         (dump_memory_to_file, dump_value_to_file, restore_command):
7248         Use gdb::unique_xmalloc_ptr.  Update.
7249         * cli/cli-cmds.c (find_and_open_script): Use
7250         gdb::unique_xmalloc_ptr.
7251         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7252         * symmisc.c (maintenance_print_symbols)
7253         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7254         * symfile.c (symfile_bfd_open, generic_load)
7255         (add_symbol_file_command, remove_symbol_file_command): Use
7256         gdb::unique_xmalloc_ptr.
7257         * source.c (openp): Use gdb::unique_xmalloc_ptr.
7258         * psymtab.c (maintenance_print_psymbols): Use
7259         gdb::unique_xmalloc_ptr.
7260         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7261         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7262         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7263         (reload_shared_libraries_1): Likewise.
7264
7265 2017-08-05  Tom Tromey  <tom@tromey.com>
7266
7267         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7268         (rust_op_vector, rust_set_vector): New typedefs.
7269         (current_parser): New global.
7270         (work_obstack): Change to pointer type.  Update all users.
7271         (rust_ast, pstate): Remove globals.
7272         (struct rust_parser): New.
7273         (%union) <params, field_inits>: Change type.
7274         (start, tuple_expr, unit_expr, struct_expr_list, literal)
7275         (field_expr, expr_list, maybe_expr_list, type_list): Update.
7276         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7277         (convert_params_to_types, convert_params_to_expression): Change
7278         type of "params".
7279         (ast_string): Change type of "fields".
7280         (rust_parse): Make a rust_parser.  Remove cleanups.
7281         (rust_lex_tests): Make and install an auto_obstack.
7282
7283 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7284
7285         * configure.srv (ipa_x32_linux_regobj): New.
7286         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7287         instead of X86_TDESC_AVX512.
7288         (initialize_low_tracepoint): Call
7289         init_registers_x32_avx_avx512_linux.
7290
7291 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7292
7293         * utils.h (gdb_argv): Add namespace std for nullptr_t.
7294
7295 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7296
7297         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7298
7299 2017-08-03  Tom Tromey  <tom@tromey.com>
7300
7301         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7302         Remove.
7303         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7304
7305 2017-08-03  Tom Tromey  <tom@tromey.com>
7306
7307         * python/py-param.c (compute_enum_values): Use gdb_argv.
7308
7309 2017-08-03  Tom Tromey  <tom@tromey.com>
7310
7311         * utils.h (struct gdb_argv_deleter): New.
7312         (gdb_argv): New class.
7313         * utils.c (gdb_argv::reset): New method.
7314         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7315         * tracefile.c (tsave_command): Use gdb_argv.
7316         * top.c (new_ui_command): Use gdb_argv.
7317         * symmisc.c (maintenance_print_symbols)
7318         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7319         * symfile.c (symbol_file_command, generic_load)
7320         (remove_symbol_file_command): Use gdb_argv.
7321         * stack.c (backtrace_command): Use gdb_argv.
7322         * source.c (add_path, show_substitute_path_command)
7323         (unset_substitute_path_command, set_substitute_path_command):
7324         Use gdb_argv.
7325         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
7326         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7327         * remote.c (extended_remote_run, remote_put_command)
7328         (remote_get_command, remote_delete_command): Use gdb_argv.
7329         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7330         (gdbsim_open): Use gdb_argv.
7331         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7332         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7333         * procfs.c (procfs_info_proc): Use gdb_argv.
7334         * interps.c (interpreter_exec_cmd): Use gdb_argv.
7335         * infrun.c (handle_command): Use gdb_argv.
7336         * inferior.c (add_inferior_command, clone_inferior_command):
7337         Use gdb_argv.
7338         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7339         * exec.c (exec_file_command): Use gdb_argv.
7340         * cli/cli-cmds.c (alias_command): Use gdb_argv.
7341         * compile/compile.c (build_argc_argv): Use gdb_argv.
7342
7343 2017-08-03  Tom Tromey  <tom@tromey.com>
7344
7345         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7346
7347 2017-08-03  Tom Tromey  <tom@tromey.com>
7348
7349         * python/python.c (compute_python_string): Return std::string.
7350         (gdbpy_eval_from_control_command): Update.
7351         (do_start_initialization): Use std::string.
7352         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7353         xstrprintf.
7354         * python/py-breakpoint.c (local_setattro): Use string_printf, not
7355         xstrprintf.
7356
7357 2017-08-03  Tom Tromey  <tom@tromey.com>
7358
7359         * top.h (do_restore_instream_cleanup): Remove.
7360         * top.c (do_restore_instream_cleanup): Remove.
7361         (read_command_file): Use scoped_restore.
7362         * cli/cli-script.c (execute_user_command): Use scoped_restore.
7363
7364 2017-08-03  Tom Tromey  <tom@tromey.com>
7365
7366         * cli/cli-script.c (execute_user_command)
7367         (execute_control_command): Use scoped_restore.
7368
7369 2017-08-03  Tom Tromey  <tom@tromey.com>
7370
7371         * cli/cli-script.c (do_restore_user_call_depth): Remove.
7372         (execute_user_command): Remove user_call_depth; use
7373         user_args_stack's size instead.
7374
7375 2017-08-03  Tom Tromey  <tom@tromey.com>
7376
7377         * top.h (in_user_command): Remove.
7378         * top.c (in_user_command): Remove.
7379         * cli/cli-script.c (do_restore_user_call_depth)
7380         (execute_user_command): Update.
7381
7382 2017-08-03  Tom Tromey  <tom@tromey.com>
7383
7384         * valops.c (search_struct_method): Use gdb::byte_vector.
7385         * valarith.c (value_concat): Use std::vector.
7386         * target.c (memory_xfer_partial): Use gdb::byte_vector.
7387         (simple_search_memory): Likewise.
7388         * printcmd.c (find_string_backward): Use gdb::byte_vector.
7389         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7390         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7391         * elfread.c (elf_rel_plt_read): Use std::string.
7392         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7393         * cli/cli-dump.c (restore_section_callback): Use
7394         gdb::byte_vector.
7395
7396 2017-08-03  Tom Tromey  <tom@tromey.com>
7397
7398         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7399
7400 2017-08-03  Tom Tromey  <tom@tromey.com>
7401
7402         * tui/tui-regs.c (tui_restore_gdbout): Remove.
7403         (tui_register_format): Use scoped_restore.
7404
7405 2017-08-03  Tom Tromey  <tom@tromey.com>
7406
7407         * reverse.c (exec_direction_default): Remove.
7408         (exec_reverse_once): Use scoped_restore.
7409         * remote.c (restore_remote_timeout): Remove.
7410         (remote_flash_erase, remote_flash_write, remote_flash_done)
7411         (readchar, remote_serial_write): Use scoped_restore.
7412         * cli/cli-script.c (struct source_cleanup_lines_args)
7413         (source_cleanup_lines): Remove.
7414         (script_from_file): Use scoped_restore.
7415         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7416         (source_command): Use scoped_restore.
7417
7418 2017-08-03  Tom Tromey  <tom@tromey.com>
7419
7420         * utils.h (make_cleanup_free_so): Remove.
7421         * utils.c (do_free_so, make_cleanup_free_so): Remove.
7422         * solist.h (struct so_deleter): New.
7423         (so_list_up): New typedef.
7424         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7425
7426 2017-08-03  Tom Tromey  <tom@tromey.com>
7427
7428         * utils.h (make_cleanup_restore_current_language): Remove.
7429         * utils.c (do_restore_current_language)
7430         (make_cleanup_restore_current_language): Remove.
7431         * parse.c (parse_exp_in_context_1)
7432         (parse_expression_with_language): Use
7433         scoped_restore_current_language.
7434         * mi/mi-main.c (mi_cmd_execute): Use
7435         scoped_restore_current_language.
7436         * language.h (scoped_restore_current_language): New class.
7437
7438 2017-08-03  Tom Tromey  <tom@tromey.com>
7439
7440         * compile/compile.c (cleanup_unlink_file): Remove.
7441         (compile_to_object): Use gdb::unlinker.
7442         (eval_compile_command): Likewise.
7443
7444 2017-08-03  Tom Tromey  <tom@tromey.com>
7445
7446         * utils.h (make_cleanup_fclose): Remove.
7447         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7448
7449 2017-08-03  Tom Tromey  <tom@tromey.com>
7450
7451         * top.c (open_terminal_stream): Return gdb_file_up.
7452         (new_ui_command): Update.
7453
7454 2017-08-03  Tom Tromey  <tom@tromey.com>
7455
7456         * source.c (print_source_lines_base, forward_search_command)
7457         (reverse_search_command): Use gdb_file_up.
7458
7459 2017-08-03  Tom Tromey  <tom@tromey.com>
7460
7461         * fbsd-nat.c (fbsd_find_memory_regions): Update.
7462
7463 2017-08-03  Tom Tromey  <tom@tromey.com>
7464
7465         * cli/cli-cmds.c (find_and_open_script): Change return type.
7466         Remove "streamp" and "full_path" parameters.
7467         (source_script_with_search): Update.
7468         * auto-load.c (source_script_file): Update.
7469         * cli/cli-cmds.h (find_and_open_script): Change type.
7470         (open_script): New struct.
7471
7472 2017-08-03  Tom Tromey  <tom@tromey.com>
7473
7474         * xml-support.c (xml_fetch_content_from_file): Update.
7475         * ui-file.c (stdio_file::open): Update.
7476         * tracefile-tfile.c (tfile_start): Update.
7477         * remote.c (remote_file_put, remote_file_get): Update.
7478         * nat/linux-procfs.c (linux_proc_get_int)
7479         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7480         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7481         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7482         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7483         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7484         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7485         * linux-nat.c (linux_proc_pending_signals): Update.
7486         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7487         (file_closer): Remove.
7488         * compile/compile.c (compile_to_object): Update.
7489         * common/filestuff.h (struct gdb_file_deleter): New.
7490         (gdb_file_up): New typedef.
7491         (gdb_fopen_cloexec): Change return type.
7492         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7493         * cli/cli-dump.c (fopen_with_cleanup): Remove.
7494         (dump_binary_file, restore_binary_file): Update.
7495         * auto-load.c (auto_load_objfile_script_1): Update.
7496
7497 2017-08-03  Tom Tromey  <tom@tromey.com>
7498
7499         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7500         (info_static_tracepoint_markers_command): Likewise.
7501         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7502         * skip.c (skip_info): Use ui_out_emit_table.
7503         * progspace.c (print_program_space): Use ui_out_emit_table.
7504         * osdata.c (info_osdata): Use ui_out_emit_table.
7505         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7506         ui_out_emit_table.
7507         * linux-thread-db.c (info_auto_load_libthread_db): Use
7508         ui_out_emit_table.
7509         * inferior.c (print_inferior): Use ui_out_emit_table.
7510         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7511         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7512         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7513         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7514         * ui-out.h (class ui_out_emit_table): New.
7515
7516 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
7517
7518         * mips-tdep.c (mips_fpu_type_str): New function.
7519         (mips_dump_tdep): Call it.
7520
7521 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
7522
7523         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7524         `->mips_fpu_type'.
7525
7526 2017-07-31  Xavier Roirand  <roirand@adacore.com>
7527
7528         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7529
7530 2017-07-27  Xavier Roirand  <roirand@adacore.com>
7531
7532         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7533
7534 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7535
7536         * cli/cli-cmds.c (maintenancechecklist): New variable.
7537         * gdbcmd.h (maintenancechecklist): Declare it.
7538         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7539         Call i386_linux_read_description with different masks.
7540         * maint.c (maintenance_check_command): New function.
7541         (_initialize_maint_cmds): Call add_prefix_cmd.
7542         * target-descriptions.c (tdesc_reg): override operator != and ==.
7543         (tdesc_type): Likewise.
7544         (tdesc_feature): Likewise.
7545         (target_desc): Likewise.
7546         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7547         (maintenance_check_xml_descriptions): New function.
7548         (_initialize_target_descriptions) Add command "xml-descriptions".
7549         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7550
7551 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7552
7553         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7554         Include features/i386/32bit-*.c.
7555         (i386_linux_read_description): Generate target description if it
7556         doesn't exist.
7557         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7558         functions.
7559         * features/i386/32bit-linux.c: Re-generated.
7560         * features/i386/32bit-sse.c: Likewise.
7561         * target-descriptions.c (print_c_feature::visit): Print code to
7562         set register number if needed.
7563         (print_c_feature) <m_next_regnum>: New field.
7564
7565 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7566
7567         * features/Makefile (CFILES): Rename with TDESC_CFILES.
7568         (FEATURE_XMLFILES): New.
7569         (FEATURE_CFILES): New.
7570         New rules.
7571         (clean-cfiles): Remove generated c files.
7572         * features/i386/32bit-avx.c: Generated.
7573         * features/i386/32bit-avx512.c: Generated.
7574         * features/i386/32bit-core.c: Generated.
7575         * features/i386/32bit-linux.c: Generated.
7576         * features/i386/32bit-mpx.c: Generated.
7577         * features/i386/32bit-pkeys.c: Generated.
7578         * features/i386/32bit-sse.c: Generated.
7579         * target-descriptions.c: Include algorithm.
7580         (tdesc_element_visitor): Add method visit_end.
7581         (print_c_tdesc): Implement visit_end.
7582         (print_c_tdesc:: m_filename_after_features): Move it to
7583         protected.
7584         (print_c_feature): New class.
7585         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7586         name starts with "i386/32bit-".
7587
7588 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7589
7590         * target-descriptions.c (tdesc_element_visitor): New class.
7591         (tdesc_element): New class.
7592         (tdesc_reg): Inherit from tdesc_element.
7593         (tdesc_reg::accept): New function.
7594         (tdesc_type): Inherit from tdesc_element.
7595         (tdesc_type::accept): New function.
7596         (tdesc_feature): Inherit from tdesc_element.
7597         (tdesc_feature::accept): New function.
7598         (target_desc): Inherit from tdesc_element.
7599         (target_desc::target_desc): New.
7600         (target_desc::~target_desc): New.
7601         (target_desc::accept): New.
7602         (allocate_target_description): Use new.
7603         (free_target_description): Use delete.
7604         (print_c_tdesc): New class.
7605         (maint_print_c_tdesc_cmd): Adjust.
7606
7607         * features/aarch64.c: Re-generated.
7608         * features/arc-arcompact.c: Re-generated.
7609         * features/arc-v2.c: Re-generated.
7610         * features/arm/arm-with-iwmmxt.c: Re-generated.
7611         * features/arm/arm-with-m.c: Re-generated.
7612         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
7613         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
7614         * features/arm/arm-with-neon.c: Re-generated.
7615         * features/arm/arm-with-vfpv2.c: Re-generated.
7616         * features/arm/arm-with-vfpv3.c: Re-generated.
7617         * features/i386/amd64-avx-avx512.c: Re-generated.
7618         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7619         * features/i386/amd64-avx.c: Re-generated.
7620         * features/i386/amd64-avx-linux.c: Re-generated.
7621         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
7622         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7623         * features/i386/amd64-avx-mpx.c: Re-generated.
7624         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
7625         * features/i386/amd64.c: Re-generated.
7626         * features/i386/amd64-linux.c: Re-generated.
7627         * features/i386/amd64-mpx.c: Re-generated.
7628         * features/i386/amd64-mpx-linux.c: Re-generated.
7629         * features/i386/i386-avx-avx512.c: Re-generated.
7630         * features/i386/i386-avx-avx512-linux.c: Re-generated.
7631         * features/i386/i386-avx.c: Re-generated.
7632         * features/i386/i386-avx-linux.c: Re-generated.
7633         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
7634         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
7635         * features/i386/i386-avx-mpx.c: Re-generated.
7636         * features/i386/i386-avx-mpx-linux.c: Re-generated.
7637         * features/i386/i386.c: Re-generated.
7638         * features/i386/i386-linux.c: Re-generated.
7639         * features/i386/i386-mmx.c: Re-generated.
7640         * features/i386/i386-mmx-linux.c: Re-generated.
7641         * features/i386/i386-mpx.c: Re-generated.
7642         * features/i386/i386-mpx-linux.c: Re-generated.
7643         * features/i386/x32-avx-avx512.c: Re-generated.
7644         * features/i386/x32-avx-avx512-linux.c: Re-generated.
7645         * features/i386/x32-avx.c: Re-generated.
7646         * features/i386/x32-avx-linux.c: Re-generated.
7647         * features/i386/x32.c: Re-generated.
7648         * features/i386/x32-linux.c: Re-generated.
7649         * features/microblaze.c: Re-generated.
7650         * features/microblaze-with-stack-protect.c: Re-generated.
7651         * features/mips64-dsp-linux.c: Re-generated.
7652         * features/mips64-linux.c: Re-generated.
7653         * features/mips-dsp-linux.c: Re-generated.
7654         * features/mips-linux.c: Re-generated.
7655         * features/nds32.c: Re-generated.
7656         * features/nios2.c: Re-generated.
7657         * features/nios2-linux.c: Re-generated.
7658         * features/rs6000/powerpc-32.c: Re-generated.
7659         * features/rs6000/powerpc-32l.c: Re-generated.
7660         * features/rs6000/powerpc-403.c: Re-generated.
7661         * features/rs6000/powerpc-403gc.c : Re-generated.
7662         * features/rs6000/powerpc-405.c: Re-generated.
7663         * features/rs6000/powerpc-505.c: Re-generated.
7664         * features/rs6000/powerpc-601.c: Re-generated.
7665         * features/rs6000/powerpc-602.c: Re-generated.
7666         * features/rs6000/powerpc-603.c: Re-generated.
7667         * features/rs6000/powerpc-604.c: Re-generated.
7668         * features/rs6000/powerpc-64.c: Re-generated.
7669         * features/rs6000/powerpc-64l.c: Re-generated.
7670         * features/rs6000/powerpc-7400.c: Re-generated.
7671         * features/rs6000/powerpc-750.c: Re-generated.
7672         * features/rs6000/powerpc-860.c: Re-generated.
7673         * features/rs6000/powerpc-altivec32.c: Re-generated.
7674         * features/rs6000/powerpc-altivec32l.c: Re-generated.
7675         * features/rs6000/powerpc-altivec64.c: Re-generated.
7676         * features/rs6000/powerpc-altivec64l.c: Re-generated.
7677         * features/rs6000/powerpc-cell32l.c: Re-generated.
7678         * features/rs6000/powerpc-cell64l.c: Re-generated.
7679         * features/rs6000/powerpc-e500.c: Re-generated.
7680         * features/rs6000/powerpc-e500l.c: Re-generated.
7681         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
7682         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
7683         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
7684         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
7685         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
7686         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
7687         * features/rs6000/powerpc-vsx32.c: Re-generated.
7688         * features/rs6000/powerpc-vsx32l.c: Re-generated.
7689         * features/rs6000/powerpc-vsx64.c: Re-generated.
7690         * features/rs6000/powerpc-vsx64l.c: Re-generated.
7691         * features/rs6000/rs6000.c: Re-generated.
7692         * features/s390-linux32.c: Re-generated.
7693         * features/s390-linux32v1.c: Re-generated.
7694         * features/s390-linux32v2.c: Re-generated.
7695         * features/s390-linux64.c: Re-generated.
7696         * features/s390-linux64v1.c: Re-generated.
7697         * features/s390-linux64v2.c: Re-generated.
7698         * features/s390-te-linux64.c: Re-generated.
7699         * features/s390-tevx-linux64.c: Re-generated.
7700         * features/s390-vx-linux64.c: Re-generated.
7701         * features/s390x-linux64.c: Re-generated.
7702         * features/s390x-linux64v1.c: Re-generated.
7703         * features/s390x-linux64v2.c: Re-generated.
7704         * features/s390x-te-linux64.c: Re-generated.
7705         * features/s390x-tevx-linux64.c: Re-generated.
7706         * features/s390x-vx-linux64.c: Re-generated.
7707         * features/sparc/sparc32-solaris.c: Re-generated.
7708         * features/sparc/sparc64-solaris.c: Re-generated.
7709         * features/tic6x-c62x.c: Re-generated.
7710         * features/tic6x-c62x-linux.c: Re-generated.
7711         * features/tic6x-c64x.c: Re-generated.
7712         * features/tic6x-c64x-linux.c: Re-generated.
7713         * features/tic6x-c64xp.c: Re-generated.
7714         * features/tic6x-c64xp-linux.c: Re-generated.
7715
7716 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7717
7718         * i386-linux-tdep.c (i386_linux_read_description): New function.
7719         (i386_linux_core_read_description): Call
7720         i386_linux_read_description.
7721         * i386-linux-tdep.h (i386_linux_read_description): Declare.
7722         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
7723         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
7724         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
7725         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
7726         * x86-linux-nat.c (x86_linux_read_description): Call
7727         i386_linux_read_description.
7728
7729 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7730
7731         * NEWS: Mention it.
7732         * features/Makefile (%.c: %.xml): Pass the xml file name to
7733         command "maint print c-tdesc".
7734         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7735         name from 'arg'.
7736
7737 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7738
7739         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
7740         in-class initialization.
7741         (tdesc_create_feature): Call new instead of XCNEW.
7742         (free_target_description): Ue delete.
7743
7744 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
7745
7746         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
7747
7748 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7749
7750         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
7751         constant.
7752         (amd64_x32_init_abi): Likewise.
7753         * amd64-tdep.h (amd64_init_abi): Update declaration.
7754         (amd64_x32_init_abi): Likewise.
7755
7756 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7757
7758         PR tdep/21717
7759         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
7760         condition for FPSCR.
7761         (arm_linux_store_inferior_registers): Likewise.
7762
7763 2017-07-22  Tom Tromey  <tom@tromey.com>
7764
7765         * break-catch-syscall.c (struct catch_syscall_inferior_data)
7766         <syscalls_counts>: Now a std::vector.
7767         (get_catch_syscall_inferior_data): Use "new".
7768         (catch_syscall_inferior_data_cleanup): Use "delete".
7769         (insert_catch_syscall, remove_catch_syscall)
7770         (clear_syscall_counts): Update.
7771
7772 2017-07-22  Tom Tromey  <tom@tromey.com>
7773
7774         * break-catch-syscall.c (syscall_catchpoint)
7775         <syscalls_to_be_caught>: Now a std::vector<int>
7776         (~syscall_catchpoint): Remove.
7777         (insert_catch_syscall, remove_catch_syscall)
7778         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
7779         (print_mention_catch_syscall, print_recreate_catch_syscall):
7780         Update.
7781         (create_syscall_event_catchpoint): Change type of "filter"
7782         parameter.
7783         (catch_syscall_split_args): Return a std::vector.
7784         (catch_syscall_command_1, catching_syscall_number_1): Update.
7785
7786 2017-07-22  Tom Tromey  <tom@tromey.com>
7787
7788         * break-catch-throw.c (struct exception_catchpoint)
7789         <exception_rx>: Now a std::string.
7790         (~exception_catchpoint): Remove.
7791         (print_one_detail_exception_catchpoint): Update.
7792         (handle_gnu_v3_exceptions): Change type of except_rx.
7793         (extract_exception_regexp): Return a std::string.
7794         (catch_exception_command_1): Update.
7795
7796 2017-07-22  Tom Tromey  <tom@tromey.com>
7797
7798         * break-catch-sig.c (gdb_signal_type): Remove typedef.
7799         (struct signal_catchpoint) <signals_to_be_caught>: Now a
7800         std::vector.
7801         <catch_all>: Now a bool.
7802         (~signal_catchpoint): Remove.
7803         (signal_catchpoint_insert_location)
7804         (signal_catchpoint_remove_location)
7805         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
7806         (signal_catchpoint_print_mention)
7807         (signal_catchpoint_print_recreate)
7808         (signal_catchpoint_explains_signal): Update.
7809         (create_signal_catchpoint): Change type of "filter" and
7810         "catch_all".
7811         (catch_signal_split_args): Return a std::vector.  Change type of
7812         "catch_all".
7813         (catch_signal_command): Update.
7814
7815 2017-07-20  Pedro Alves  <palves@redhat.com>
7816
7817         * ada-lang.c (ada_language_defn): Make extern.
7818         (_initialize_ada_language): Remove add_language call.
7819         * c-lang.c (c_language_defn, cplus_language_defn)
7820         (asm_language_defn, minimal_language_defn): Make extern.
7821         (_initialize_c_language): Delete.
7822         * completer.c (compare_cstrings): Delete, moved to utils.h.
7823         * d-lang.c (d_language_defn): Make extern.
7824         (_initialize_d_language): Remove add_language calls.
7825         * defs.h (enum language): Add comment.
7826         * f-lang.c (f_language_defn): Make extern.
7827         (_initialize_f_language): Remove add_language call.
7828         * go-lang.c (go_language_defn): Make extern.
7829         (_initialize_go_language): Remove add_language call.
7830         * language.c: Include <algorithm>.
7831         (languages): Redefine as const array.
7832         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
7833         (set_language_command): Handle "local".  Use for-range loop.
7834         (set_language): Remove loop.
7835         (language_enum): Rewrite.
7836         (language_def, language_str): Remove loops.
7837         (add_language): Delete.
7838         (add_set_language_command): New, based on add_languages.
7839         (skip_language_trampoline): Adjust.
7840         (local_language_defn): Delete.
7841         (language_gdbarch_post_init): Adjust.
7842         (_initialize_language): Remove add_language calls.  Call
7843         add_set_language_command.
7844         * language.h (add_language): Delete.
7845         (auto_language_defn)
7846         (unknown_language_defn, minimal_language_defn, ada_language_defn)
7847         (asm_language_defn, c_language_defn, cplus_language_defn)
7848         (d_language_defn, f_language_defn, go_language_defn)
7849         (m2_language_defn, objc_language_defn, opencl_language_defn)
7850         (pascal_language_defn, rust_language_defn): Declare.
7851         * m2-lang.c (m2_language_defn): Make extern.
7852         (_initialize_m2_language): Remove add_language call.
7853         * objc-lang.c (objc_language_defn): Make extern.
7854         (_initialize_objc_language): Remove add_language call.
7855         * opencl-lang.c (opencl_language_defn): Make extern.
7856         (_initialize_opencl_language): Remove add_language call.
7857         * p-lang.c (pascal_language_defn): Make extern.
7858         (_initialize_pascal_language): Delete.
7859         * rust-lang.c (rust_language_defn): Make extern.
7860         (_initialize_rust_language): Delete.
7861         * utils.h (compare_cstrings): New static inline function.
7862
7863 2017-07-20  Pedro Alves  <palves@redhat.com>
7864
7865         * ada-lang.c (ada_to_fixed_type_1): Adjust.
7866         (get_var_value): Constify parameters.
7867         (get_int_var_value): Change prototype.
7868         (to_fixed_range_type): Adjust.
7869         * ada-lang.h (get_int_var_value): Change prototype.
7870
7871 2017-07-20  Pedro Alves  <palves@redhat.com>
7872
7873         * dwarf2read.c (dw2_lookup_symbol): Use
7874         SYMBOL_MATCHES_SEARCH_NAME.
7875         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
7876
7877 2017-07-20  Pedro Alves  <palves@redhat.com>
7878
7879         * block.c (block_iter_name_step, block_iter_name_first)
7880         (block_iter_name_next): Delete.
7881         (block_lookup_symbol_primary): Adjust to use
7882         dict_iter_match_first/dict_iter_match_next.
7883         * block.h (block_iter_name_first, block_iter_name_next): Delete
7884         declarations.
7885         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
7886         dict_iter_match_first/dict_iter_match_next.
7887
7888 2017-07-20  Pedro Alves  <palves@redhat.com>
7889
7890         * cp-support.c (cp_find_first_component_aux): Add missing case for
7891         end of string.
7892
7893 2017-07-18  David Blaikie  <dblaikie@gmail.com>
7894
7895         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
7896         of dwo_cu's dwo_file.
7897
7898 2017-07-18  Yao Qi  <yao.qi@linaro.org>
7899
7900         * remote.c (store_registers_using_G): Remove one line comment.
7901
7902 2017-07-18  Yao Qi  <yao.qi@linaro.org>
7903
7904         * regcache.c (regcache_cpy): Simplify it.
7905         (regcache::cpy_no_passthrough): Remove it.
7906         * regcache.h (cpy_no_passthrough): Remove it.
7907         (regcache_dup, regcache_cpy): Update comments.
7908
7909 2017-07-18  Pedro Alves  <palves@redhat.com>
7910
7911         * remote-sim.c (sim_command_completer): Adjust to work with a
7912         completion_tracker instead of a VEC.
7913
7914 2017-07-17  Pedro Alves  <palves@redhat.com>
7915
7916         * completer.c (complete_source_filenames): New function.
7917         (complete_address_and_linespec_locations): New function.
7918         (location_completer): Use complete_address_and_linespec_locations.
7919         (completion_tracker::build_completion_result): Honor the tracker's
7920         request to suppress append.
7921         * completer.h (completion_tracker::suppress_append_ws)
7922         (completion_tracker::set_suppress_append_ws): New methods.
7923         (completion_tracker::m_suppress_append_ws): New field.
7924         (complete_source_filenames): New declaration.
7925         * linespec.c (linespec_complete_what): New.
7926         (struct ls_parser) <complete_what, completion_word,
7927         completion_quote_char, completion_quote_end, completion_tracker>:
7928         New fields.
7929         (string_find_incomplete_keyword_at_end): New.
7930         (linespec_lexer_lex_string): Record quote char.  If in completion
7931         mode, don't throw.
7932         (linespec_lexer_consume_token): Advance the completion word point.
7933         (linespec_lexer_peek_token): Save/restore completion info.
7934         (save_stream_and_consume_token): New.
7935         (set_completion_after_number): New.
7936         (linespec_parse_basic): Set what to complete next depending on
7937         token.  Handle function and label completions specially.
7938         (parse_linespec): Disable objc shortcut in completion mode.  Set
7939         what to complete next depending on token type.  Skip keyword if in
7940         completion mode.
7941         (complete_linespec_component, linespec_complete): New.
7942         * linespec.h (linespec_complete): Declare.
7943
7944 2017-07-17  Pedro Alves  <palves@redhat.com>
7945
7946         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
7947         Handle 'operator<' / 'operator<<'.
7948
7949 2017-07-17  Pedro Alves  <palves@redhat.com>
7950
7951         * completer.c (collect_explicit_location_matches): Handle
7952         MATCH_LABEL.
7953         (convert_explicit_location_to_linespec): New, factored out from
7954         ...
7955         (convert_explicit_location_to_sals): ... this.
7956         (complete_label): New.
7957         (linespec_complete_label, find_label_symbols_in_block): New.
7958         (find_label_symbols): Add completion_mode parameter and adjust to
7959         call find_label_symbols_in_block.
7960         * linespec.h (linespec_complete_label): Declare.
7961
7962 2017-07-17  Pedro Alves  <palves@redhat.com>
7963
7964         * ada-lang.c (ada_collect_symbol_completion_matches): Add
7965         complete_symbol_mode parameter.
7966         * cli/cli-cmds.c (complete_command): Get the completion result out
7967         of the handle_brkchars tracker if used a custom word point.
7968         * completer.c: Include "linespec.h".
7969         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
7970         (advance_to_expression_complete_word_point): New.
7971         (completion_tracker::completes_to_completion_word): New.
7972         (complete_files_symbols): Pass down
7973         complete_symbol_mode::EXPRESSION.
7974         (explicit_options, probe_options): New.
7975         (collect_explicit_location_matches): Complete on the
7976         explictit_loc->foo instead of word.  Use
7977         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
7978         keyword and options completions.
7979         (backup_text_ptr): Delete.
7980         (skip_keyword): New.
7981         (complete_explicit_location): Remove 'word' parameter.  Add
7982         language, quoted_arg_start and quoted_arg_end parameters.
7983         Rewrite, parsing left to right.
7984         (location_completer): Rewrite.
7985         (location_completer_handle_brkchars): New function.
7986         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
7987         (enum complete_line_internal_reason): Adjust comments.
7988         (completion_tracker::discard_completions): New.
7989         (completer_handle_brkchars_func_for_completer): Handle
7990         location_completer.
7991         (gdb_custom_word_point_brkchars)
7992         (gdb_org_rl_basic_quote_characters): New.
7993         (gdb_completion_word_break_characters_throw)
7994         (completion_find_completion_word): Handle trackers that use a
7995         custom word point.
7996         (completion_tracker::advance_custom_word_point_by): New.
7997         (completion_tracker::build_completion_result): Don't rely on
7998         readline appending the quote char.
7999         (gdb_rl_attempted_completion_function_throw): Handle trackers that
8000         use a custom word point.
8001         (gdb_rl_attempted_completion_function): Restore
8002         rl_basic_quote_characters.
8003         * completer.h (class completion_tracker): Extend intro comment.
8004         (completion_tracker::set_quote_char)
8005         (completion_tracker::quote_char)
8006         (completion_tracker::set_use_custom_word_point)
8007         (completion_tracker::use_custom_word_point)
8008         (completion_tracker::custom_word_point)
8009         (completion_tracker::set_custom_word_point)
8010         (completion_tracker::advance_custom_word_point_by)
8011         (completion_tracker::completes_to_completion_word)
8012         (completion_tracker::discard_completions): New methods.
8013         (completion_tracker::m_quote_char)
8014         (completion_tracker::m_use_custom_word_point)
8015         (completion_tracker::m_custom_word_point): New fields.
8016         (advance_to_expression_complete_word_point): Declare.
8017         * f-lang.c (f_collect_symbol_completion_matches): Add
8018         complete_symbol_mode parameter.
8019         * language.h (struct language_defn)
8020         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8021         parameter.
8022         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
8023         (linespec_complete_function): New function.
8024         (linespec_lexer_lex_keyword): Adjust.
8025         * linespec.h (linespec_keywords, linespec_complete_function): New
8026         declarations.
8027         * location.c (find_end_quote): New function.
8028         (explicit_location_lex_one): Add explicit_completion_info
8029         parameter.  Save quoting info.  Don't throw if being called for
8030         completion.  Don't handle Ada operators here.
8031         (is_cp_operator, skip_op_false_positives, first_of)
8032         (explicit_location_lex_one_function): New function.
8033         (string_to_explicit_location): Replace 'dont_throw' parameter with
8034         an explicit_completion_info pointer parameter.  Handle it.  Don't
8035         use explicit_location_lex_one to lex function names.  Use
8036         explicit_location_lex_one_function instead.
8037         * location.h (struct explicit_completion_info): New.
8038         (string_to_explicit_location): Replace 'dont_throw' parameter with
8039         an explicit_completion_info pointer parameter.
8040         * symtab.c (default_collect_symbol_completion_matches_break_on):
8041         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
8042         (default_collect_symbol_completion_matches)
8043         (collect_symbol_completion_matches): Add complete_symbol_mode
8044         parameter.
8045         (collect_symbol_completion_matches_type): Pass down
8046         complete_symbol_mode::EXPRESSION.
8047         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8048         parameter.  Handle LINESPEC mode.
8049         * symtab.h (complete_symbol_mode): New.
8050         (default_collect_symbol_completion_matches_break_on)
8051         (default_collect_symbol_completion_matches)
8052         (collect_symbol_completion_matches)
8053         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8054         parameter.
8055
8056 2017-07-17  Pedro Alves  <palves@redhat.com>
8057
8058         * utils.c (enum class strncmp_iw_mode): New.
8059         (strcmp_iw): Rename to ...
8060         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
8061         parameters.  Handle them.
8062         (strncmp_iw): New.
8063         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8064         * utils.h (strncmp_iw): Declare.
8065         (strcmp_iw): Move describing comments here.
8066
8067 2017-07-17  Pedro Alves  <palves@redhat.com>
8068
8069         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8070         CP_OPERATOR_STR.
8071         * c-typeprint.c (is_type_conversion_operator): Use
8072         CP_OPERATOR_STR.
8073         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8074         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8075         CP_OPERATOR_LEN.
8076         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8077         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8078         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8079         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8080         CP_OPERATOR_STR.
8081         * location.c: Include "cp-support.h".
8082         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8083         CP_OPERATOR_STR.
8084         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8085         CP_OPERATOR_LEN.
8086
8087 2017-07-17  Pedro Alves  <palves@redhat.com>
8088
8089         * cli/cli-cmds.c (complete_command): Use a completion tracker
8090         along with completion_find_completion_word for handle_brkchars
8091         phase.
8092         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8093         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8094         (struct gdb_rl_completion_word_info): New.
8095         (gdb_rl_find_completion_word): New.
8096         (completion_find_completion_word): New.
8097         * completer.h (completion_find_completion_word): Declare.
8098
8099 2017-07-17  Pedro Alves  <palves@redhat.com>
8100
8101         * ada-lang.c (symbol_completion_match): Adjust comments.
8102         (symbol_completion_add): Replace vector parameter with
8103         completion_tracker parameter.  Use it.
8104         (ada_make_symbol_completion_list): Rename to...
8105         (ada_collect_symbol_completion_matches): ... this.  Add
8106         completion_tracker parameter and use it.
8107         (ada_language_defn): Adjust.
8108         * break-catch-syscall.c (catch_syscall_completer): Adjust
8109         prototype and work with completion_tracker instead of VEC.
8110         * breakpoint.c (condition_completer): Adjust prototype and work
8111         with completion_tracker instead of VEC.
8112         * c-lang.c (c_language_defn, cplus_language_defn)
8113         (asm_language_defn, minimal_language_defn): Adjust to renames.
8114         * cli/cli-cmds.c (complete_command): Rework using
8115         completion_tracker.  Catch exceptions when completing.
8116         * cli/cli-decode.c (integer_unlimited_completer)
8117         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8118         with completion_tracker instead of VEC.
8119         * command.h (struct completion_tracker): Forward declare.
8120         (completer_ftype, completer_handle_brkchars_ftype): Change
8121         types.
8122         (complete_on_cmdlist, complete_on_enum): Adjust.
8123         * completer.c: Include <algorithm>.
8124         (struct gdb_completer_state): New.
8125         (current_completion): New global.
8126         (readline_line_completion_function): Delete.
8127         (noop_completer, filename_completer)
8128         (filename_completer_handle_brkchars, complete_files_symbols)
8129         (linespec_location_completer): Adjust to work with a
8130         completion_tracker instead of a VEC.
8131         (string_or_empty): New.
8132         (collect_explicit_location_matches): Adjust to work with a
8133         completion_tracker instead of a VEC.
8134         (explicit_location_completer): Rename to ...
8135         (complete_explicit_location): ... this and adjust to work with a
8136         completion_tracker instead of a VEC.
8137         (location_completer): Adjust to work with a completion_tracker
8138         instead of a VEC.
8139         (add_struct_fields): Adjust to work with a completion_list instead
8140         of VEC.
8141         (expression_completer): Rename to ...
8142         (complete_expression): ... this and adjust to work with a
8143         completion_tracker instead of a VEC.  Use complete_files_symbols.
8144         (expression_completer): Reimplement on top of complete_expression.
8145         (symbol_completer): Adjust to work with a completion_tracker
8146         instead of a VEC.
8147         (enum complete_line_internal_reason): Add describing comments.
8148         (complete_line_internal_normal_command): Adjust to work with a
8149         completion_tracker instead of a VEC.
8150         (complete_line_internal): Rename to ...
8151         (complete_line_internal_1): ... this and adjust to work with a
8152         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
8153         handle_brkchars phase.
8154         (new_completion_tracker): Delete.
8155         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8156         complete_line_internal_1.
8157         (free_completion_tracker): Delete.
8158         (INITIAL_COMPLETION_HTAB_SIZE): New.
8159         (completion_tracker::completion_tracker)
8160         (completion_tracker::~completion_tracker): New.
8161         (maybe_add_completion): Delete.
8162         (completion_tracker::maybe_add_completion)
8163         (completion_tracker::add_completion)
8164         (completion_tracker::add_completions): New.
8165         (throw_max_completions_reached_error): Delete.
8166         (complete_line): Adjust to work with a completion_tracker instead
8167         of a VEC.  Don't create a completion_tracker_t or check for max
8168         completions here.
8169         (command_completer, command_completer_handle_brkchars)
8170         (signal_completer, reg_or_group_completer_1)
8171         (reg_or_group_completer, default_completer_handle_brkchars):
8172         Adjust to work with a completion_tracker.
8173         (gdb_completion_word_break_characters_throw): New.
8174         (gdb_completion_word_break_characters): Reimplement.
8175         (line_completion_function): Delete.
8176         (completion_tracker::recompute_lowest_common_denominator)
8177         (expand_preserving_ws)
8178         (completion_tracker::build_completion_result)
8179         (completion_result::completion_result)
8180         (completion_result::completion_result)
8181         (completion_result::~completion_result)
8182         (completion_result::completion_result)
8183         (completion_result::release_match_list, compare_cstrings)
8184         (completion_result::sort_match_list)
8185         (completion_result::reset_match_list)
8186         (gdb_rl_attempted_completion_function_throw)
8187         (gdb_rl_attempted_completion_function): New.
8188         * completer.h (completion_list, struct completion_result)
8189         (class completion_tracker): New.
8190         (complete_line): Add completion_tracker parameter.
8191         (readline_line_completion_function): Delete.
8192         (gdb_rl_attempted_completion_function): New.
8193         (noop_completer, filename_completer, expression_completer)
8194         (location_completer, symbol_completer, command_completer)
8195         (signal_completer, reg_or_group_completer): Update prototypes.
8196         (completion_tracker_t, new_completion_tracker)
8197         (make_cleanup_free_completion_tracker): Delete.
8198         (enum maybe_add_completion_enum): Delete.
8199         (maybe_add_completion): Delete.
8200         (throw_max_completions_reached_error): Delete.
8201         * corefile.c (complete_set_gnutarget): Adjust to work with a
8202         completion_tracker instead of a VEC.
8203         * cp-abi.c (cp_abi_completer): Adjust to work with a
8204         completion_tracker instead of a VEC.
8205         * d-lang.c (d_language_defn): Adjust.
8206         * disasm.c (disassembler_options_completer): Adjust to work with a
8207         completion_tracker instead of a VEC.
8208         * f-lang.c (f_make_symbol_completion_list): Rename to ...
8209         (f_collect_symbol_completion_matches): ... this.  Adjust to work
8210         with a completion_tracker instead of a VEC.
8211         (f_language_defn): Adjust.
8212         * go-lang.c (go_language_defn): Adjust.
8213         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8214         Adjust to work with a completion_tracker instead of a VEC.
8215         * infrun.c (handle_completer): Likewise.
8216         * interps.c (interpreter_completer): Likewise.
8217         * interps.h (interpreter_completer): Likewise.
8218         * language.c (unknown_language_defn, auto_language_defn)
8219         (local_language_defn): Adjust.
8220         * language.h (language_defn::la_make_symbol_completion_list):
8221         Rename to ...
8222         (language_defn::la_collect_symbol_completion_matches): ... this
8223         and adjust to work with a completion_tracker instead of a VEC.
8224         * m2-lang.c (m2_language_defn): Adjust.
8225         * objc-lang.c (objc_language_defn): Adjust.
8226         * opencl-lang.c (opencl_language_defn): Adjust.
8227         * p-lang.c (pascal_language_defn): Adjust.
8228         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8229         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8230         with a completion_tracker.
8231         * rust-lang.c (rust_language_defn): Adjust.
8232         * symtab.c (free_completion_list, do_free_completion_list)
8233         (return_val, completion_tracker): Delete.
8234         (completion_list_add_name, completion_list_add_symbol)
8235         (completion_list_add_msymbol, completion_list_objc_symbol)
8236         (completion_list_add_fields, add_symtab_completions): Add
8237         completion_tracker parameter and use it.
8238         (default_make_symbol_completion_list_break_on_1): Rename to...
8239         (default_collect_symbol_completion_matches_break_on): ... this.
8240         Add completion_tracker parameter and use it instead of allocating
8241         a completion tracker here.
8242         (default_make_symbol_completion_list_break_on): Delete old
8243         implementation.
8244         (default_make_symbol_completion_list): Delete.
8245         (default_collect_symbol_completion_matches): New.
8246         (make_symbol_completion_list): Delete.
8247         (collect_symbol_completion_matches): New.
8248         (make_symbol_completion_type): Rename to ...
8249         (collect_symbol_completion_matches_type): ... this.  Add
8250         completion_tracker parameter and use it instead of VEC.
8251         (make_file_symbol_completion_list_1): Rename to...
8252         (collect_file_symbol_completion_matches): ... this.  Add
8253         completion_tracker parameter and use it instead of VEC.
8254         (make_file_symbol_completion_list): Delete.
8255         (add_filename_to_list): Use completion_list instead of a VEC.
8256         (add_partial_filename_data::list): Now a completion_list.
8257         (make_source_files_completion_list): Work with a completion_list
8258         instead of a VEC.
8259         * symtab.h: Include "completer.h".
8260         (default_make_symbol_completion_list_break_on)
8261         (default_make_symbol_completion_list, make_symbol_completion_list)
8262         (make_symbol_completion_type, make_file_symbol_completion_list)
8263         (make_source_files_completion_list): Delete.
8264         (default_collect_symbol_completion_matches_break_on)
8265         (default_collect_symbol_completion_matches)
8266         (collect_symbol_completion_matches)
8267         (collect_symbol_completion_matches_type)
8268         (collect_file_symbol_completion_matches)
8269         (make_source_files_completion_list): New.
8270         * top.c (init_main): Don't install a rl_completion_entry_function
8271         hook.  Install a rl_attempted_completion_function hook instead.
8272         * tui/tui-layout.c (layout_completer): Adjust to work with a
8273         completion_tracker.
8274         * tui/tui-regs.c (tui_reggroup_completer):
8275         * tui/tui-win.c (window_name_completer, focus_completer)
8276         (winheight_completer): Adjust to work with a completion_tracker.
8277         * value.c: Include "completer.h".
8278         (complete_internalvar): Adjust to work with a completion_tracker.
8279         * value.h (complete_internalvar): Likewise.
8280
8281 2017-07-17  Pedro Alves  <palves@redhat.com>
8282
8283         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8284         renames.
8285         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8286         comments to completer_ftype's declaration.
8287         <completer_handle_brkchars>: Change type to
8288         completer_handle_brkchars_ftype.
8289         * command.h (completer_ftype): Add describing comment and give
8290         names to parameters.
8291         (completer_ftype_void): Rename to ...
8292         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
8293         (set_cmd_completer_handle_brkchars): Adjust.
8294         * completer.c (filename_completer_handle_brkchars): New function.
8295         (complete_line_internal_normal_command): New function, factored
8296         out from ...
8297         (complete_line_internal): ... here.
8298         (command_completer_handle_brkchars)
8299         (default_completer_handle_brkchars)
8300         (completer_handle_brkchars_func_for_completer): New functions.
8301         * completer.h (set_gdb_completion_word_break_characters): Delete
8302         declaration.
8303         (completer_handle_brkchars_func_for_completer): New declaration.
8304         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8305         completer_handle_brkchars_func_for_completer.
8306
8307 2017-07-17  Pedro Alves  <palves@redhat.com>
8308
8309         * completer.c (symbol_completer): New function, based on
8310         make_symbol_completion_list_fn.
8311         * completer.h (symbol_completer): New declaration.
8312         * guile/scm-cmd.c (cmdscm_completers): Adjust.
8313         * python/py-cmd.c (completers): Adjust.
8314         * symtab.c (make_symbol_completion_list_fn): Delete.
8315         * symtab.h (make_symbol_completion_list_fn): Delete.
8316         * cli/cli-decode.c (add_cmd): Adjust.
8317
8318 2017-07-17  Pedro Alves  <palves@redhat.com>
8319
8320         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8321         * dwarf2read.c: Include "filename-seen-cache.h".
8322         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8323         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8324         * filename-seen-cache.c: New file.
8325         * filename-seen-cache.h: New file.
8326         * symtab.c: Include "filename-seen-cache.h".
8327         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8328         (create_filename_seen_cache, clear_filename_seen_cache)
8329         (delete_filename_seen_cache, filename_seen): Delete, parts moved
8330         to filename-seen-cache.h/filename-seen-cache.c.
8331         (output_source_filename, sources_info)
8332         (maybe_add_partial_symtab_filename)
8333         (make_source_files_completion_list): Adjust to use
8334         filename_seen_cache.
8335
8336 2017-07-17  Pedro Alves  <palves@redhat.com>
8337
8338         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8339         fields.
8340         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8341         dwarf2_debug_sections*)): New.
8342         (dwarf2_per_objfile::dwarf2_per_objfile(const
8343         dwarf2_per_objfile&)): Declare as deleted.
8344         (dwarf2_per_objfile::operator=): Declare as deleted.
8345         (dwarf2_per_objfile::dwarf2_per_objfile)
8346         (dwarf2_per_objfile::~dwarf2_per_objfile)
8347         (dwarf2_per_objfile::free_cached_comp_units): New.
8348         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8349         ctor.  Call dwarf2_per_objfile's ctor manually.
8350         (dwarf2_locate_sections): Deleted/refactored as ...
8351         (dwarf2_per_objfile::locate_sections): ... this new method.
8352         (free_cached_comp_units): Defer to
8353         dwarf2_per_objfile::free_cached_comp_units.
8354         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8355
8356 2017-07-14  Tom Tromey  <tom@tromey.com>
8357
8358         PR rust/21764:
8359         * rust-exp.y (convert_ast_to_expression): Add "want_type"
8360         parameter.
8361         <UNOP_SIZEOF>: Split into separate case.
8362         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
8363
8364 2017-07-14  Tom Tromey  <tom@tromey.com>
8365
8366         PR rust/21763:
8367         * symtab.c (symbol_matches_domain): Add language_rust to special
8368         case.
8369         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8370         treat LOC_TYPEDEF symbols as variables.
8371
8372 2017-07-14  Pedro Alves  <palves@redhat.com>
8373
8374         * symtab.c (make_file_symbol_completion_list_1): Iterate over
8375         symtabs matching all symtabs with SRCFILE as file name instead of
8376         only considering the first hit, with lookup_symtab.
8377
8378 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8379
8380         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8381         operator_name parameters.
8382         (gen_expr): Update function call.
8383
8384 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8385
8386         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8387         parameter.
8388         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8389         Likewise.
8390         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8391         parameter, use agent_expr::gdbarch instead, update function
8392         calls.
8393         (locexpr_tracepoint_var_ref): Likewise.
8394         (loclist_tracepoint_var_ref): Likewise.
8395         * ax-gdb.c (gen_trace_static_fields): Likewise.
8396         (gen_traced_pop): Likewise.
8397         (gen_frame_args_address): Likewise.
8398         (gen_frame_locals_address): Likewise.
8399         (gen_var_ref): Likewise.
8400         (gen_struct_ref_recursive): Likewise.
8401         (gen_static_field): Likewise.
8402         (gen_maybe_namespace_elt): Likewise.
8403         (gen_expr): Likewise.
8404         (gen_trace_for_var): Likewise.
8405         (gen_trace_for_expr): Likewise.
8406         (gen_trace_for_return_address): Likewise.
8407
8408 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8409
8410         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8411         parameter.
8412         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8413
8414 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8415
8416         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8417         from ax, update calls.
8418         (gen_usual_arithmetic): Likewise.
8419         (gen_integral_promotions): Likewise.
8420         (gen_bitfield_ref): Likewise.
8421         (gen_primitive_field): Likewise.
8422         (gen_struct_ref_recursive): Likewise.
8423         (gen_struct_ref): Likewise.
8424         (gen_maybe_namespace_elt): Likewise.
8425         (gen_struct_elt_for_reference): Likewise.
8426         (gen_namespace_elt): Likewise.
8427         (gen_aggregate_elt_ref): Likewise.
8428         (gen_expr): Get gdbarch from ax, update calls.
8429         (gen_expr_binop_rest): Likewise.
8430
8431 2017-07-13  Pedro Alves  <palves@redhat.com>
8432
8433         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8434         as default tdesc.
8435         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8436         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8437         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8438         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
8439         tdep.
8440         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8441         Get final tdesc from the tdep.
8442         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8443         default tdesc.
8444         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8445         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8446         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8447         Use it as default tdesc.
8448         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8449         down to amd_init_abi.  No longer handle fallback tdesc here.
8450         * amd64-tdep.h (tdesc_x32): Declare.
8451         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8452         parameter.
8453         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8454         as default tdesc.
8455
8456 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8457
8458         * s390-linux-tdep.c (s390_process_record): Add support for
8459         instructions new in arch12.
8460
8461 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8462
8463         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8464         PT_GETFSBASE and PT_GETGSBASE.
8465         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8466         PT_SETGSBASE.
8467
8468 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8469
8470         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8471         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8472         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8473         those rules.
8474         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8475         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8476         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8477         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8478         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8479         * features/i386/amd64.xml: Add 64bit-segments.xml.
8480         * features/i386/amd64-avx-avx512.c: Regenerated.
8481         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8482         * features/i386/amd64-avx-mpx.c: Regenerated.
8483         * features/i386/amd64-avx.c: Regenerated.
8484         * features/i386/amd64-mpx.c: Regenerated.
8485         * features/i386/amd64.c: Regenerated.
8486         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8487         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8488         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8489         * regformats/i386/amd64-avx.dat: Regenerated.
8490         * regformats/i386/amd64-mpx.dat: Regenerated.
8491         * regformats/i386/amd64.dat: Regenerated.
8492
8493 2017-07-10  Yao Qi  <yao.qi@linaro.org>
8494
8495         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8496         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8497
8498 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
8499
8500         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8501         unsetenv.
8502         * gnulib/aclocal.m4: Regenerate.
8503         * gnulib/config.in: Regenerate.
8504         * gnulib/configure: Regenerate.
8505         * gnulib/import/Makefile.am: Regenerate.
8506         * gnulib/import/Makefile.in: Regenerate.
8507         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8508         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8509         * gnulib/import/m4/environ.m4: New file.
8510         * gnulib/import/m4/setenv.m4: New file.
8511         * gnulib/import/setenv.c: New file.
8512         * gnulib/import/unsetenv.c: New file.
8513
8514 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
8515
8516         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8517         address when op is DW_OP_addr.
8518
8519 2017-07-09  Tom Tromey  <tom@tromey.com>
8520
8521         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8522         check and apply to outer type.
8523
8524 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8525
8526         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8527         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8528         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8529         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8530
8531 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8532
8533         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8534
8535 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8536
8537         * corelow.c (get_core_siginfo): Remove.
8538         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8539         instead of get_core_siginfo.
8540         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8541         * gdbarch.h: Re-generate.
8542         * gdbarch.c: Re-generate.
8543         * linux-tdep.c (linux_core_xfer_siginfo): New.
8544         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8545
8546 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8547
8548         * corelow.c (thread_section_name): Move to ...
8549         * gdbcore.h (thread_section_name): ... here.
8550
8551 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8552
8553         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8554         (struct siginfo32): New.
8555         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8556         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8557         via ptrace(PT_LWPINFO).
8558
8559 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8560
8561         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8562         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8563         (fbsd_get_siginfo_type): New.
8564         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8565         (_initialize_fbsd_tdep): New.
8566
8567 2017-07-06  David Blaikie  <dblaikie@gmail.com>
8568
8569         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8570         a singular dwo_unit*) to support multiple CUs in the same way that
8571         multiple TUs are supported.
8572         (create_cus_hash_table): Replace create_dwo_cu with a function for
8573         parsing multiple CUs from a DWO file.
8574         (open_and_init_dwo_file): Use create_cus_hash_table rather than
8575         create_dwo_cu.
8576         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8577         htab_find, rather than comparing the signature to a singleton CU in
8578         the dwo_file.
8579
8580 2017-07-06  Pedro Alves  <palves@redhat.com>
8581
8582         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8583
8584 2017-07-04  Pedro Alves  <palves@redhat.com>
8585
8586         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8587         * gdbtypes.h (TYPE_STATIC): Delete.
8588         (struct fn_field) <is_public, is_abstract, is_static, is_final,
8589         is_synchronized, is_native>: Delete.
8590         <dummy>: Bump.
8591         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8592         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8593         (TYPE_FN_FIELD_ABSTRACT): Delete.
8594
8595 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
8596
8597         * buffer.h (buffer_finish): Fix spelling mistakes.
8598
8599 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
8600
8601         * .dir-locals.el: Automatically switch to C-style comments in
8602         versions of Emacs that support the feature.
8603
8604 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8605             Pedro Alves  <palves@redhat.com>
8606
8607         PR cli/21688
8608         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
8609         (process_next_line): New variable 'inline_cmd'.
8610         Adjust 'if' clauses for "python", "compile" and "guile" to use
8611         'command_name_equals' and check for '!inline_cmd'.
8612
8613 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8614
8615         PR cli/21688
8616         * cli/cli-script.c (command_name_equals_not_inline): New function.
8617         (process_next_line): Adjust 'if' clauses for "python", "compile"
8618         and "guile" to use command_name_equals_not_inline.
8619
8620 2017-06-29  Pedro Alves  <palves@redhat.com>
8621
8622         * completer.c (expression_completer): Call
8623         linespec_location_completer instead of location_completer.
8624
8625 2017-06-29  Pedro Alves  <palves@redhat.com>
8626
8627         * completer.c (expression_completer): Remove code that recomputes
8628         'text' from 'word'.
8629
8630 2017-06-29  Yao Qi  <yao.qi@linaro.org>
8631
8632         * regformats/regdat.sh: Generate code with
8633         "ifndef IN_PROCESS_AGENT".
8634
8635 2017-06-28  Pedro Alves  <palves@redhat.com>
8636
8637         * command.h: Include "common/scoped_restore.h".
8638
8639 2017-06-28  Yao Qi  <yao.qi@linaro.org>
8640
8641         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
8642         instead of obstack_grow.
8643
8644 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
8645
8646         PR gdb/21337
8647         * symfile.c (reread_symbols): Call objfiles_changed just before
8648         read_symbols.
8649
8650 2017-06-27  Pedro Alves  <palves@redhat.com>
8651
8652         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
8653         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
8654         (completion_list_add_symbol, completion_list_add_msymbol):
8655         ... these new functions.
8656         (add_symtab_completions)
8657         (default_make_symbol_completion_list_break_on_1): Adjust.
8658
8659 2017-06-27  Pedro Alves  <palves@redhat.com>
8660
8661         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
8662         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
8663         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
8664         dtor.
8665         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
8666         'storage_obstack' field an auto_obstack.  In-class initialize all
8667         non-bitfield fields.  Make minsyms_read bool.
8668         * symfile.c (read_symbols): Adjust.
8669
8670 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
8671
8672         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
8673         (gdbsim_store_register): Likewise.
8674
8675 2017-06-27  Pedro Alves  <palves@redhat.com>
8676
8677         * c-exp.y (name_obstack): Now an auto_obstack.
8678         (yylex): Use auto_obstack::clear.
8679         (c_parse): Use auto_obstack::clear instead of reinitializing and
8680         freeing the obstack.
8681         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
8682         * d-exp.y (name_obstack): Now an auto_obstack.
8683         (yylex): Use auto_obstack::clear.
8684         (d_parse): Use auto_obstack::clear instead of reinitializing and
8685         freeing the obstack.
8686         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
8687         auto_obstack.
8688         * dwarf2read.c (create_addrmap_from_index)
8689         (dwarf2_build_psymtabs_hard)
8690         (update_enumeration_type_from_children): Likewise.
8691         * gdb_obstack.h (auto_obstack): New type.
8692         * go-exp.y (name_obstack): Now an auto_obstack.
8693         (build_packaged_name): Use auto_obstack::clear.
8694         (go_parse): Use auto_obstack::clear instead of reinitializing and
8695         freeing the obstack.
8696         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
8697         auto_obstack.
8698         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
8699         * rust-exp.y (work_obstack): Now an auto_obstack.
8700         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
8701         reinitializing and freeing the obstack.
8702         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
8703         (host_char_to_target): Use auto_obstack.
8704         * utils.h (make_cleanup_obstack_free): Delete declaration.
8705         * valprint.c (generic_emit_char, generic_printstr): Use
8706         auto_obstack.
8707
8708 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
8709
8710         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
8711         thread.
8712         (darwin_init_thread_list): Don't update dummy thread.
8713         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
8714
8715 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8716
8717         * record-full.c (netorder16): Remove.
8718
8719 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8720
8721         * common/diagnostics.h: Define macros for GCC.
8722         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
8723         * common/vec.h: Include diagnostics.h.
8724         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
8725         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
8726         warning.
8727
8728 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8729
8730         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
8731         New macro.
8732         * ada-lex.l: Ignore deprecated register warnings.
8733
8734 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8735
8736         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8737         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8738
8739 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8740
8741         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
8742         its own line.
8743
8744 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8745
8746         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
8747
8748 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
8749
8750         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
8751         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
8752         (xtensa_register_read_masked): Likewise.
8753
8754 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
8755
8756         * common/environ.c (gdb_environ::unset): Update comment.
8757
8758 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8759
8760         * python/py-unwind.c (pyuw_sniffer): Allocate space for
8761         registers.
8762
8763 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8764
8765         * record-full.c (record_full_exec_insn): Use byte_vector.
8766
8767 2017-06-22  Yao Qi  <yao.qi@linaro.org>
8768
8769         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
8770         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8771
8772 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8773
8774         * remote.c (cached_reg): Move from here...
8775         * regcache.h (cached_reg): ...to here.
8776         * python/py-unwind.c (struct reg_info): Remove.
8777         (cached_frame_info): Use cached_reg_t.
8778         (pyuw_prev_register): Likewise.
8779         (pyuw_sniffer): Use cached_reg_t and allocate registers.
8780         (pyuw_dealloc_cache): Free all registers.
8781
8782 2017-06-22  Pedro Alves  <palves@redhat.com>
8783             Simon Marchi  <simon.marchi@ericsson.com>
8784
8785         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
8786         warning.
8787         * common/diagnostics.h: New file.
8788
8789 2017-06-22  Pedro Alves  <palves@redhat.com>
8790
8791         * common/agent.h: Add include guards.
8792
8793 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
8794
8795         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
8796         talk about addressable units instead of bytes.
8797
8798 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8799
8800         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
8801         of '::const_iterator'.
8802
8803 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8804
8805         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8806         'unittests/environ-selftests.c'.
8807         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
8808         * charset.c (find_charset_names): Declare object 'iconv_env'.
8809         Update code to use 'iconv_env' object.  Remove call to
8810         'free_environ'.
8811         * common/environ.c: Include <utility>.
8812         (make_environ): Delete function.
8813         (free_environ): Delete function.
8814         (gdb_environ::clear): New function.
8815         (gdb_environ::operator=): New function.
8816         (gdb_environ::get): Likewise.
8817         (environ_vector): Delete function.
8818         (set_in_environ): Delete function.
8819         (gdb_environ::set): New function.
8820         (unset_in_environ): Delete function.
8821         (gdb_environ::unset): New function.
8822         (gdb_environ::envp): Likewise.
8823         * common/environ.h: Include <vector>.
8824         (struct gdb_environ): Delete; transform into...
8825         (class gdb_environ): ... this class.
8826         (free_environ): Delete prototype.
8827         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
8828         environ_vector): Likewise.
8829         * infcmd.c (run_command_1): Update code to call
8830         'envp' from 'gdb_environ' class.
8831         (environment_info): Update code to call methods from 'gdb_environ'
8832         class.
8833         (unset_environment_command): Likewise.
8834         (path_info): Likewise.
8835         (path_command): Likewise.
8836         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
8837         (inferior::inferior): Initialize 'environment' using the host's
8838         information.
8839         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
8840         Include "environ.h".
8841         (class inferior) <environment>: Change type from 'struct
8842         gdb_environ' to 'gdb_environ'.
8843         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
8844         methods from 'gdb_environ' class.
8845         * solib.c (solib_find_1): Likewise
8846         * unittests/environ-selftests.c: New file.
8847
8848 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8849
8850         * features/i386/i386-linux.xml: Exchange the order of including
8851         32bit-linux.xml and 32bit-sse.xml.
8852         * features/i386/i386-linux.c: Regenerated.
8853
8854 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8855
8856         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
8857         Delete copy ctor and assignment operator.
8858         (tdesc_type): Likewise.
8859         (tdesc_feature): Likewise.
8860         (tdesc_free_reg): Remove.
8861         (tdesc_create_reg): Use new.
8862         (tdesc_free_type): Remove.
8863         (tdesc_create_vector): Use new.
8864         (tdesc_create_union): Likewise.
8865         (tdesc_create_flags): Likewise.
8866         (tdesc_create_enum): Likewise.
8867         (tdesc_free_feature): Delete.
8868         (free_target_description): Use delete.
8869
8870 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
8871
8872         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
8873         registers.
8874
8875 2017-06-19  Pedro Alves  <palves@redhat.com>
8876
8877         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
8878         after gdb::unlinker.
8879
8880 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
8881
8882         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
8883         gdb_environ to access an environment variable.
8884
8885 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
8886
8887         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
8888         gdb_byte*.
8889
8890 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8891
8892         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
8893
8894 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8895
8896         * configure: Re-generate.
8897         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
8898
8899 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8900
8901         * configure: Re-generate.
8902         * warning.m4: Pass -Werror to compiler when checking for
8903         supported warning flags.
8904
8905 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8906
8907         * Makefile.in (COMPILE.pre): Add "-x c++".
8908
8909 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
8910             Pedro Alves  <palves@redhat.com>
8911             Yao Qi  <yao.qi@linaro.org>
8912
8913         * defs.h (RequireLongest): New.
8914         (extract_integer): Declare function template.
8915         (extract_signed_integer): Remove the declaration, but define it
8916         static inline.
8917         (extract_unsigned_integer): Likewise.
8918         (store_integer): Declare function template.
8919         (store_signed_integer): Remove the declaration, but define it
8920         static inline.
8921         (store_unsigned_integer): Likewise.
8922         * findvar.c (extract_integer): New function template.
8923         (extract_signed_integer): Remove.
8924         (extract_unsigned_integer): Remove.
8925         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
8926         instantiations.
8927         (store_integer): New function template.
8928         (store_signed_integer): Remove.
8929         (store_unsigned_integer): Remove.
8930         (store_integer): Explicit instantiations.
8931         * regcache.c (regcache_raw_read_signed): Update.
8932         (regcache::raw_read): New function.
8933         (regcache::raw_read_signed): Remove.
8934         (regcache::raw_read_unsigned): Remove.
8935         (regcache_raw_read_unsigned): Update.
8936         (regcache_raw_write_unsigned): Update.
8937         (regcache::raw_write_signed): Remove.
8938         (regcache::raw_write): New function.
8939         (regcache_cooked_read_signed): Update.
8940         (regcache::raw_write_unsigned): Remove.
8941         (regcache::cooked_read_signed): Remove.
8942         (regcache_cooked_read_unsigned): Update.
8943         (regcache::cooked_read_unsigned): Remove.
8944         (regcache_cooked_write_signed): Update.
8945         (regcache_cooked_write_unsigned): Update.
8946         * regcache.h (regcache) <raw_read_signed>: Remove.
8947         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
8948         <raw_read, raw_write>: New.
8949         <cooked_read_signed, cooked_write_signed>: Remove.
8950         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
8951         <cooked_read, cooked_write>: New.
8952         * sh64-tdep.c (sh64_pseudo_register_read): Update.
8953         (sh64_pseudo_register_write): Update.
8954
8955 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
8956
8957         * arc-tdep.c (arc_disassembler_options): New variable.
8958         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
8959         of default_print_insn.
8960         (arc_delayed_print_insn): Set info->section when needed,
8961         use default_print_insn to retrieve a disassembler.
8962
8963 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
8964
8965         PR gdb/21574
8966         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
8967         to mention $SHELL and startup-with-shell.
8968
8969 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
8970
8971         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
8972
8973 2017-06-14  Yao Qi  <yao.qi@linaro.org>
8974
8975         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
8976         default_print_insn instead of print_insn_aarch64.
8977         * arm-tdep.c (gdb_print_insn_arm): Call
8978         default_print_insn instead of print_insn_big_arm
8979         and print_insn_little_arm.
8980         * i386-tdep.c (i386_print_insn): Call default_print_insn
8981         instead of print_insn_i386.
8982         * ia64-tdep.c (ia64_print_insn): Call
8983         default_print_insn instead of print_insn_ia64.
8984         * mips-tdep.c (gdb_print_insn_mips): Call
8985         default_print_insn instead of print_insn_big_mips
8986         and print_insn_little_mips.
8987         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
8988         instead of print_insn_spu.
8989
8990 2017-06-14  Pedro Alves  <palves@redhat.com>
8991
8992         * ada-lang.c: Include "common/byte-vector.h".
8993         (ada_value_primitive_packed_val): Use gdb::byte_vector.
8994         * charset.c (wchar_iterator::iterate): Resize the vector instead
8995         of reserving it.
8996         * common/byte-vector.h: Include "common/def-vector.h".
8997         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
8998         * cli/cli-dump.c: Include "common/byte-vector.h".
8999         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9000         * common/byte-vector.h: New file.
9001         * common/def-vector.h: New file.
9002         * common/default-init-alloc.h: New file.
9003         * dwarf2loc.c: Include "common/byte-vector.h".
9004         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9005         instead of reserving it.
9006         * dwarf2read.c: Include "common/byte-vector.h".
9007         (data_buf::m_vec): Now a gdb::byte_vector.
9008         * gdb_regex.c: Include "common/def-vector.h".
9009         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9010         * mi/mi-main.c: Include "common/byte-vector.h".
9011         (mi_cmd_data_read_memory): Use gdb::byte_vector.
9012         * printcmd.c: Include "common/byte-vector.h".
9013         (print_scalar_formatted): Use gdb::byte_vector.
9014         * valprint.c: Include "common/byte-vector.h".
9015         (maybe_negate_by_bytes, print_decimal_chars): Use
9016         gdb::byte_vector.
9017
9018 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9019
9020         * darwin-nat.c: Include "nat/fork-inferior.h".
9021
9022 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9023
9024         * configure.nat: Factor out Darwin bits that are not
9025         architecture-specific.  Add fork-inferior.o.
9026
9027 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9028
9029         * configure.nat: Factor out AIX bits that are not
9030         architecture-specific.  Add fork-inferior.o.
9031
9032 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9033
9034         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
9035         (read_pieced_value, write_pieced_value): ...here.  Reduce to
9036         wrappers that just call rw_pieced_value.
9037
9038 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9039
9040         * dwarf2loc.c (write_pieced_value): When writing the data for a
9041         memory piece, use write_memory_with_notification instead of
9042         write_memory.
9043
9044 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9045
9046         * valops.c (read_value_memory): Change embedded_offset to
9047         represent a bit offset instead of a byte offset.
9048         * value.h (read_value_memory): Adjust comment.
9049
9050 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9051
9052         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9053         dest_offset_bits and source_offset_bits.
9054         (write_pieced_value): Likewise.
9055
9056 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9057
9058         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9059         given by DW_OP_bit_piece.
9060         (write_pieced_value): Likewise.
9061
9062 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9063
9064         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9065         some other preparations to the places where sufficient information
9066         is available.
9067         (write_pieced_value): Likewise.
9068
9069 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9070
9071         * dwarf2loc.c (bits_to_bytes): New function.
9072         (read_pieced_value): Fix offset calculations for register pieces
9073         on big-endian targets.
9074         (write_pieced_value): Likewise.
9075
9076 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9077
9078         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9079         (write_pieced_value): Likewise.
9080
9081 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9082
9083         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9084         transfer the source value's least significant bits, instead of its
9085         lowest-addressed ones.  Rename type_len to max_offset.
9086         (read_pieced_value): Mirror above changes to write_pieced_value as
9087         applicable.
9088
9089 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9090
9091         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9092         truncate full bytes from dest_offset_bits before using it as an
9093         offset into the buffer.
9094
9095 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9096
9097         * dwarf2loc.c (write_pieced_value): Include transfer size in
9098         byte-wise check.
9099
9100 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9101
9102         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9103         calculation of this_size.
9104
9105 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9106
9107         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9108         when targeting a bit-field.
9109         (write_pieced_value): Likewise.
9110
9111 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9112
9113         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9114         (allocate_piece_closure): Drop addr_size parameter.
9115         (dwarf2_evaluate_loc_desc_full): Adjust call to
9116         allocate_piece_closure.
9117
9118 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9119
9120         PR gdb/21226
9121         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9122         the LSB end, independent of endianness.
9123
9124 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9125
9126         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9127         size capping.
9128
9129 2017-06-13  Yao Qi  <yao.qi@linaro.org>
9130
9131         * mips-linux-nat.c: Move include features/mips*-linux.c to
9132         mips-linux-tdep.c.
9133         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9134         to mips-linux-tdep.c.
9135         * mips-linux-tdep.c: Include features/mips*-linux.c
9136         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9137         functions.
9138         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9139         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9140         (tdesc_mips64_dsp_linux): Declare.
9141
9142 2017-06-12  Tom Tromey  <tom@tromey.com>
9143
9144         * valprint.h (val_print_type_code_int): Remove.
9145         * valprint.c (generic_val_print_int): Always call
9146         val_print_scalar_formatted.
9147         (val_print_type_code_int): Remove.
9148         * printcmd.c (print_scalar_formatted): Handle options->format==0.
9149         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9150         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9151         * ada-valprint.c (ada_val_print_num): Use
9152         val_print_scalar_formatted.
9153
9154 2017-06-12  Tom Tromey  <tom@tromey.com>
9155
9156         * printcmd.c (print_scalar_formatted): Unify the two switches.
9157         Don't convert scalars to LONGEST.
9158
9159 2017-06-12  Tom Tromey  <tom@tromey.com>
9160
9161         PR exp/16225:
9162         * valprint.h (print_decimal_chars): Update.
9163         * valprint.c (maybe_negate_by_bytes): New function.
9164         (print_decimal_chars): Add "is_signed" argument.
9165         * printcmd.c (print_scalar_formatted): Update.
9166
9167 2017-06-12  Tom Tromey  <tom@tromey.com>
9168
9169         PR exp/16225:
9170         * valprint.h (print_binary_chars, print_hex_chars): Update.
9171         * valprint.c (val_print_type_code_int): Update.
9172         (print_binary_chars): Add "zero_pad" argument.
9173         (emit_octal_digit): New function.
9174         (print_octal_chars): Don't zero-pad.
9175         (print_decimal_chars): Likewise.
9176         (print_hex_chars): Add "zero_pad" argument.
9177         * sh64-tdep.c (sh64_do_fp_register): Update.
9178         * regcache.c (regcache::dump): Update.
9179         * printcmd.c (print_scalar_formatted): Update.
9180         * infcmd.c (default_print_one_register_info): Update.
9181
9182 2017-06-12  Pedro Alves  <palves@redhat.com>
9183             Alan Hayward  <alan.hayward@arm.com>
9184
9185         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9186         (mips_eabi_push_dummy_call): Rename local 'regsize' to
9187         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
9188         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9189         Assert that abi_regsize bytes fit in 'ref_valbuf'.
9190
9191 2017-06-12  Pedro Alves  <palves@redhat.com>
9192
9193         * dwarf2read.c (mapped_symtab::data): Now a vector of
9194         symtab_index_entry instead of vector of
9195         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
9196         whether an element's name is NULL instead of checking whether the
9197         element itself is NULL.
9198         (find_slot): Change return type.  Adjust.
9199         (hash_expand, , add_index_entry, uniquify_cu_indices)
9200         (write_hash_table): Adjust.
9201
9202 2017-06-12  Pedro Alves  <palves@redhat.com>
9203
9204         * dwarf2read.c (recursively_count_psymbols): New function.
9205         (write_psymtabs_to_index): Call it to compute number of psyms and
9206         pass estimate size of psyms_seen to unordered_set's ctor.
9207
9208 2017-06-12  Pedro Alves  <palves@redhat.com>
9209
9210         * dwarf2read.c (write_hash_table): Check if key already exists
9211         before emplacing.
9212
9213 2017-06-12  Pedro Alves  <palves@redhat.com>
9214
9215         * dwarf2read.c (data_buf::append_space): Rename to...
9216         (data_buf::grow): ... this, and make private.  Adjust all callers.
9217         (data_buf::append_uint): New method.
9218         (add_address_entry, write_one_signatured_type)
9219         (write_psymtabs_to_index): Use it.
9220
9221 2017-06-12  Pedro Alves  <palves@redhat.com>
9222
9223         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9224         (file_write (FILE *, const std::vector<Elem>&)): Delete.
9225         (data_buf::file_write): Call ::fwrite directly.
9226
9227 2017-06-12  Pedro Alves  <palves@redhat.com>
9228
9229         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9230         std::vector::erase.
9231
9232 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9233
9234         Code cleanup: C++ify .gdb_index producer.
9235         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9236         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9237         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9238         (create_strtab, add_string): Remove.
9239         (file_write, data_buf): New.
9240         (struct symtab_index_entry): Use std::vector for cu_indices.
9241         (struct mapped_symtab): Use std::vector for data.
9242         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9243         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9244         Remove.
9245         (find_slot): Change return type.  Update it to the new data structures.
9246         (hash_expand, add_index_entry): Update it to the new data structures.
9247         (offset_type_compare): Remove.
9248         (uniquify_cu_indices): Update it to the new data structures.
9249         (c_str_view, c_str_view_hasher, vector_hasher): New.
9250         (add_indices_to_cpool): Remove.
9251         (write_hash_table): Update it to the new data structures.
9252         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9253         (eq_psymtab_cu_index): Remove.
9254         (psym_index_map): New typedef.
9255         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9256         reference and std::unordered_map for cu_index_htab.
9257         (add_address_entry, add_address_entry_worker, write_address_map)
9258         (write_psymbols): Update it to the new data structures.
9259         (write_obstack): Remove.
9260         (struct signatured_type_index_data): Change types_list to a data_buf
9261         reference and psyms_seen to a std::unordered_set reference.
9262         (write_one_signatured_type, recursively_write_psymbols)
9263         (write_psymtabs_to_index): Update it to the new data structures.
9264
9265 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
9266
9267         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9268         separate-debug-file commands.
9269         * symfile.h (separate_debug_file_debug): New global.
9270         * symfile.c (separate_debug_file_debug): New global.
9271         (separate_debug_file_exists, find_separate_debug_file): Add
9272         debug output.
9273         (_initialize_symfile): Add "set debug separate-debug-file"
9274         command.
9275         * build-id.c (build_id_to_debug_bfd,
9276         find_separate_debug_file_by_buildid): Add debug output.
9277
9278 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
9279
9280         * gdbarch.sh (displaced_step_free_closure): Remove.
9281         * gdbarch.h, gdbarch.c: Re-generate.
9282         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9283         displaced_step_free_closure.
9284         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9285         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9286         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9287         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9288         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9289         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9290         * arch-utils.h (simple_displaced_step_free_closure): Remove.
9291         * arch-utils.c (simple_displaced_step_free_closure): Remove.
9292         * infrun.c (displaced_step_clear): Call xfree instead of
9293         gdbarch_displaced_step_free_closure.
9294
9295 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
9296
9297         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9298         NULL".
9299
9300 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
9301
9302         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9303         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9304         (mn10300_push_dummy_call): Likewise.
9305
9306 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9307
9308         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9309
9310 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9311
9312         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9313
9314 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9315
9316         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9317         able to start inferiors using a shell.
9318         (New remote packets): Announce new packet "QStartupWithShell".
9319         * remote.c: Add PACKET_QStartupWithShell.
9320         (extended_remote_create_inferior): Handle new
9321         PACKET_QStartupWithShell.
9322         (remote_protocol_features) <QStartupWithShell>: New entry for
9323         PACKET_QStartupWithShell.
9324         (_initialize_remote): Call "add_packet_config_cmd" for
9325         QStartupShell.
9326
9327 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9328             Pedro Alves  <palves@redhat.com>
9329
9330         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9331         and "nat/fork-inferior.h".
9332         * common/common-inferior.h: New file, with contents from
9333         "gdb/inferior.h".
9334         * commom/common-utils.c: Include "common-utils.h".
9335         (stringify_argv): New function.
9336         * common/common-utils.h (stringify_argv): New prototype.
9337         * configure.nat: Add "fork-inferior.o" as a dependency for
9338         "*linux*", "fbsd*" and "nbsd*" hosts.
9339         * corefile.c (get_exec_file): Update comment.
9340         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9341         instead of "startup_inferior".
9342         (darwin_create_inferior): Call "add_thread_silent" after
9343         "fork_inferior".
9344         * fork-child.c: Cleanup unnecessary includes.
9345         (SHELL_FILE): Move to "common/common-fork-child.c".
9346         (environ): Likewise.
9347         (exec_wrapper): Initialize.
9348         (get_exec_wrapper): New function.
9349         (breakup_args): Move to "common/common-fork-child.c"; rename to
9350         "breakup_args_for_exec".
9351         (escape_bang_in_quoted_argument): Move to
9352         "common/common-fork-child.c".
9353         (saved_ui): New variable.
9354         (prefork_hook): New function.
9355         (postfork_hook): Likewise.
9356         (postfork_child_hook): Likewise.
9357         (gdb_startup_inferior): Likewise.
9358         (fork_inferior): Move to "common/common-fork-child.c".  Update
9359         function to support gdbserver.
9360         (startup_inferior): Likewise.
9361         * gdbcore.h (get_exec_file): Remove declaration.
9362         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9363         instead of "startup_inferior".  Call "add_thread_silent" after
9364         "fork_inferior".
9365         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9366         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9367         instead of "startup_inferior".  Call "add_thread_silent" after
9368         "fork_inferior".
9369         * inferior.h: Include "common-inferior.h".
9370         (trace_start_error): Move to "common/common-utils.h".
9371         (trace_start_error_with_name): Likewise.
9372         (fork_inferior): Move prototype to "nat/fork-inferior.h".
9373         (startup_inferior): Likewise.
9374         (gdb_startup_inferior): New prototype.
9375         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9376         * nat/fork-inferior.h: New file.
9377         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9378         instead of "startup_inferior".  Call "add_thread_silent" after
9379         "fork_inferior".
9380         * target.h (target_terminal_init): Move prototype to
9381         "target/target.h".
9382         (target_terminal_inferior): Likewise.
9383         (target_terminal_ours): Likewise.
9384         * target/target.h (target_terminal_init): New prototype, moved
9385         from "target.h".
9386         (target_terminal_inferior): Likewise.
9387         (target_terminal_ours): Likewise.
9388         * utils.c (gdb_flush_out_err): New function.
9389
9390 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9391
9392         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9393         * common/common-gdbthread.h: New file, with parts from
9394         "gdb/gdbthread.h".
9395         * gdbthread.h: Include "common-gdbthread.h".
9396         (switch_to_thread): Moved to "common/common-gdbthread.h".
9397
9398 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9399
9400         * Makefile.in (SFILES): Add "common/job-control.c".
9401         (HFILES_NO_SRCDIR): Add "common/job-control.h".
9402         (COMMON_OBS): Add "job-control.o".
9403         * common/job-control.c: New file, with contents from
9404         "gdb/inflow.c".
9405         * common/job-control.h: New file, with contents from "terminal.h".
9406         * fork-child.c: Include "job-control.h".
9407         * inflow.c: Include "job-control.h".
9408         (gdb_setpgid): Move to "common/common-inflow.c".
9409         (_initialize_inflow): Move setting of "job_control" to
9410         "handle_job_control".
9411         * terminal.h (job_control): Moved to "common/common-terminal.h".
9412         (gdb_setpgid): Likewise.
9413         * top.c: Include "job_control.h".
9414         * utils.c: Likewise.
9415         (job_control): Moved to "job-control.c".
9416
9417 2017-06-07  Pedro Alves  <palves@redhat.com>
9418
9419         * Makefile.in (SFILES): Add gdb_regex.c.
9420         (COMMON_OBS): Add gdb_regex.o.
9421         * ada-lang.c (ada_add_standard_exceptions)
9422         (ada_add_exceptions_from_frame, name_matches_regex)
9423         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9424         parameter type to compiled_regex.  Adjust.
9425         (ada_exceptions_list): Use compiled_regex.
9426         * break-catch-throw.c (exception_catchpoint::pattern): Now a
9427         std::unique_ptr<compiled_regex>.
9428         (exception_catchpoint::~exception_catchpoint): Remove regfree
9429         call.
9430         (check_status_exception_catchpoint): Adjust to use compiled_regex.
9431         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9432         * breakpoint.c (solib_catchpoint::compiled): Now a
9433         std::unique_ptr<compiled_regex>.
9434         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9435         (check_status_catch_solib): Adjust to use compiled_regex.
9436         (add_solib_catchpoint): Adjust to use compiled_regex.
9437         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9438         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9439         compiled_regex reference.  Adjust to use it.
9440         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9441         declaration.  Include "gdb_regex.h".
9442         (apropos_cmd): Change regex parameter to compiled_regex reference.
9443         * gdb_regex.c: New file.
9444         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9445         declarations.
9446         (class compiled_regex): New.
9447         * linux-tdep.c: Include "common/gdb_optional.h".
9448         (struct mapping_regexes): New, factored out from
9449         mapping_is_anonymous_p, and adjusted to use compiled_regex.
9450         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9451         gdb::optional and remove cleanups.  Adjust to compiled_regex.
9452         * probe.c: Include "common/gdb_optional.h".
9453         (collect_probes): Use compiled_regex and gdb::optional and remove
9454         cleanups.
9455         * skip.c: Include "common/gdb_optional.h".
9456         (skiplist_entry::compiled_function_regexp): Now a
9457         gdb::optional<compiled_regex>.
9458         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9459         (free_skiplist_entry): Remove regfree call.
9460         (compile_skip_regexp, skip_rfunction_p): Adjust to use
9461         compiled_regex and gdb::optional.
9462         * symtab.c: Include "common/gdb_optional.h".
9463         (search_symbols): Use compiled_regex and gdb::optional.
9464         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9465         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
9466         to gdb_regex.c.
9467
9468 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9469
9470         * regcache.c (regcache::save): Avoid buffer use.
9471         (regcache::dump): Likewise.
9472
9473 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9474
9475         * sh-tdep.c (sh_pseudo_register_read): Remove
9476         MAX_REGISTER_SIZE.
9477         (sh_pseudo_register_write): Likewise.
9478         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9479         (sh64_pseudo_register_write): Likewise
9480
9481 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9482
9483         * aarch64-tdep.c (aarch64_store_return_value): Use
9484         V_REGISTER_SIZE.
9485         (aarch64_pseudo_read_value): Likewise.
9486         (aarch64_pseudo_write): Likewise.
9487
9488 2017-06-06  Yao Qi  <yao.qi@linaro.org>
9489
9490         * regformats/regdef.h (set_register_cache): Remove the
9491         declaration.
9492
9493 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
9494
9495         * frame.c (frame_unwind_register_signed): Use
9496         frame_unwind_register_value.
9497
9498 2017-06-06  Pedro Alves  <palves@redhat.com>
9499
9500         PR breakpoints/21553
9501         * breakpoint.c (create_breakpoints_sal_default)
9502         (init_breakpoint_sal, create_breakpoint_sal): Use
9503         gdb::unique_xmalloc_ptr for string parameters.
9504         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9505         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
9506         (base_breakpoint_create_breakpoints_sal)
9507         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9508         (strace_marker_create_breakpoints_sal)
9509         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9510         string parameters.
9511         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9512         gdb::unique_xmalloc_ptr for string parameters.
9513         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9514         parameters.
9515
9516 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9517
9518         * alpha-tdep.c (alpha_register_to_value): Use
9519         get_frame_register_value.
9520         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9521
9522 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9523
9524         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9525         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9526         (ia64_value_to_register): Likewise.
9527         (ia64_extract_return_value): Likewise.
9528         (ia64_store_return_value): Likewise.
9529         (ia64_push_dummy_call): Likewise.
9530
9531 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
9532
9533         GDB 8.0 released.
9534
9535 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
9536
9537         * x86-linux-nat.c (struct arch_lwp_info): Remove.
9538
9539 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
9540
9541         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9542         parameter.
9543         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9544
9545 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
9546
9547         * event-loop.c (poll_timers): Unallocate timer using delete
9548         instead of xfree.
9549
9550 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9551
9552         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9553         (struct breakpoint) <~breakpoint>: New.
9554         (struct watchpoint): Inherit from breakpoint.
9555         <~watchpoint>: New.
9556         <base>: Remove.
9557         (struct tracepoint): Inherit from breakpoint.
9558         <base>: Remove.
9559         * breakpoint.c (longjmp_breakpoint_ops): Remove.
9560         (struct longjmp_breakpoint): Inherit from breakpoint.
9561         <~longjmp_breakpoint>: New.
9562         <base>: Remove.
9563         (new_breakpoint_from_type): Remove casts.
9564         (watchpoint_in_thread_scope): Remove reference to base field.
9565         (watchpoint_del_at_next_stop): Likewise.
9566         (update_watchpoint): Likewise.
9567         (watchpoint_check): Likewise.
9568         (bpstat_check_watchpoint): Likewise.
9569         (set_longjmp_breakpoint): Likewise.
9570         (struct fork_catchpoint): Inherit from breakpoint.
9571         <base>: Remove.
9572         (struct solib_catchpoint): Inherit from breakpoint.
9573         <~solib_catchpoint>: New.
9574         <base>: Remove.
9575         (dtor_catch_solib): Change to ...
9576         (solib_catchpoint::~solib_catchpoint): ... this.
9577         (breakpoint_hit_catch_solib): Remove reference to base field.
9578         (add_solib_catchpoint): Likewise.
9579         (create_fork_vfork_event_catchpoint): Likewise.
9580         (struct exec_catchpoint): Inherit from breakpoint.
9581         <~exec_catchpoint>: New.
9582         <base>: Remove.
9583         (dtor_catch_exec): Change to ...
9584         (exec_catchpoint::~exec_catchpoint): ... this.
9585         (dtor_watchpoint): Change to ...
9586         (watchpoint::~watchpoint): ... this.
9587         (watch_command_1): Remove reference to base field.
9588         (catch_exec_command_1): Likewise.
9589         (base_breakpoint_dtor): Change to ...
9590         (breakpoint::~breakpoint): ... this.
9591         (base_breakpoint_ops): Remove dtor field value.
9592         (longjmp_bkpt_dtor): Change to ...
9593         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9594         (strace_marker_create_breakpoints_sal): Remove reference to base
9595         field.
9596         (delete_breakpoint): Don't manually call breakpoint destructor.
9597         (create_tracepoint_from_upload): Remove reference to base field.
9598         (trace_pass_set_count): Likewise.
9599         (initialize_breakpoint_ops): Don't initialize
9600         momentary_breakpoint_ops, don't set dtors.
9601         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9602         <~ada_catchpoint>: New.
9603         <base>: Remove.
9604         (create_excep_cond_exprs): Remove reference to base field.
9605         (dtor_exception): Change to ...
9606         (ada_catchpoint::~ada_catchpoint): ... this.
9607         (dtor_catch_exception): Remove.
9608         (dtor_catch_exception_unhandled): Remove.
9609         (dtor_catch_assert): Remove.
9610         (create_ada_exception_catchpoint): Remove reference to base
9611         field.
9612         (initialize_ada_catchpoint_ops): Don't set dtors.
9613         * break-catch-sig.c (struct signal_catchpoint): Inherit from
9614         breakpoint.
9615         <~signal_catchpoint>: New.
9616         <base>: Remove.
9617         (signal_catchpoint_dtor): Change to ...
9618         (signal_catchpoint::~signal_catchpoint): ... this.
9619         (create_signal_catchpoint): Remove reference to base field.
9620         (initialize_signal_catchpoint_ops): Don't set dtor.
9621         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
9622         from breakpoint.
9623         <~syscall_catchpoint>: New.
9624         <base>: Remove.
9625         (dtor_catch_syscall): Change to ...
9626         (syscall_catchpoint::~syscall_catchpoint): ... this.
9627         (create_syscall_event_catchpoint): Remove reference to base
9628         field.
9629         (initialize_syscall_catchpoint_ops): Don't set dtor.
9630         * break-catch-throw.c (struct exception_catchpoint): Inherit
9631         from breakpoint.
9632         <~exception_catchpoint>: New.
9633         <base>: Remove.
9634         (dtor_exception_catchpoint): Change to ...
9635         (exception_catchpoint::~exception_catchpoint): ... this.
9636         (handle_gnu_v3_exceptions): Remove reference to base field.
9637         (initialize_throw_catchpoint_ops): Don't set dtor.
9638         * ctf.c (ctf_get_traceframe_address): Remove reference to base
9639         field.
9640         * remote.c (remote_get_tracepoint_status): Likewise.
9641         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
9642         * tracefile.c (tracefile_fetch_registers): Likewise.
9643         * tracepoint.c (actions_command): Likewise.
9644         (validate_actionline): Likewise.
9645         (tfind_1): Likewise.
9646         (get_traceframe_location): Likewise.
9647         (find_matching_tracepoint_location): Likewise.
9648         (parse_tracepoint_status): Likewise.
9649         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
9650
9651 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9652
9653         * breakpoint.c (struct longjmp_breakpoint): New struct.
9654         (is_tracepoint_type): Change return type to bool.
9655         (is_longjmp_type): New function.
9656         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
9657         (set_raw_breakpoint_without_location): Use
9658         new_breakpoint_from_type.
9659         (set_raw_breakpoint): Likewise.
9660
9661 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9662
9663         * breakpoint.c (new_breakpoint_from_type): New function.
9664         (create_breakpoint_sal): Use new_breakpoint_from_type and
9665         unique_ptr.
9666         (create_breakpoint): Likewise.
9667
9668 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
9669
9670         * memattr.c (mem_info_command): Rename to ...
9671         (info_mem_command): ... this.
9672         (mem_enable_command): Rename to ...
9673         (enable_mem_command): ... this.
9674         (mem_disable_command): Rename to ...
9675         (disable_mem_command): ... this.
9676         (mem_delete_command): Rename to ...
9677         (delete_mem_command): ... this.
9678         (_initialize_mem): Adjust function names.
9679
9680 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9681
9682         * btrace.c (handle_pt_insn_events): New.
9683         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
9684         STATUS.  Split into this and ...
9685         (handle_pt_insn_event_flags): ... this.
9686
9687 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9688
9689         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
9690         and struct pt_insn.resynced.
9691         * configure: Regenerated.
9692         * config.in: Regenerated.
9693
9694 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9695
9696         * btrace.c (ftrace_find_call_by_number): New function.
9697         (ftrace_new_function): Store objects, not pointers.
9698         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
9699         ftrace_new_gap, ftrace_update_function,
9700         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
9701         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
9702         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
9703         btrace_ends_with_single_insn, btrace_call_get): Account for
9704         btrace_thread_info::functions now storing objects.
9705         * btrace.h (struct btrace_thread_info): Add constructor.
9706         (struct btrace_thread_info) <functions>: Make std::vector.
9707         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
9708         Initialize with default values.
9709         * record-btrace.c (record_btrace_frame_sniffer): Account for
9710         btrace_thread_info::functions now storing objects.
9711
9712 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9713
9714         * btrace.c: Remove typedef bfun_s.
9715         (ftrace_new_gap): Directly add gaps to the list of gaps.
9716         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
9717         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
9718         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
9719         instead of gdb VEC.
9720
9721 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9722
9723         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
9724         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
9725         with btrace_thread_info::next_segment and
9726         btrace_thread_info::prev_segment.
9727         * btrace.h: Remove struct btrace_func_link.
9728         (struct btrace_function): Replace pair of function segment pointers
9729         with pair of indices.
9730         * python/py-record-btrace.c (btpy_call_prev_sibling,
9731         btpy_call_next_sibling): Replace references to
9732         btrace_thread_info::segment with btrace_thread_info::next_segment and
9733         btrace_thread_info::prev_segment.
9734         * record-btrace.c (record_btrace_frame_this_id): Use
9735         btrace_find_call_by_number.
9736
9737 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9738
9739         * btrace.c (ftrace_new_function, ftrace_fixup_level,
9740         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9741         btrace_insn_next, btrace_insn_prev): Remove references to
9742         btrace_thread_info::flow.
9743         * btrace.h (struct btrace_function): Remove FLOW.
9744
9745 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9746
9747         * btrace.c (ftrace_find_call_by_number): New function.
9748         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
9749         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
9750         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
9751         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
9752         index.
9753         * btrace.h (struct btrace_function): Turn UP into an index.
9754         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
9755         as an index.
9756         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
9757         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
9758         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
9759
9760 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9761
9762         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9763         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9764         ftrace_update_function, ftrace_compute_global_level_offset,
9765         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
9766         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
9767         btrace_insn_end, btrace_is_empty): Remove references to
9768         btrace_thread_info::begin and btrace_thread_info::end.
9769         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
9770         (struct btrace_thread_info) <functions>: Adjust comment.
9771         * record-btrace.c (record_btrace_start_replaying): Remove reference to
9772         btrace_thread_info::begin.
9773
9774 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9775
9776         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9777         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9778         ftrace_update_function): Remove arguments that implicitly were always
9779         BTINFO->END.
9780         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
9781         Don't pass BTINFO->END.
9782
9783 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9784
9785         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
9786         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
9787         btrace_find_insn_by_number): Replace function segment pointer with
9788         index.
9789         (btrace_insn_cmp): Simplify.
9790         * btrace.h: (struct btrace_insn_iterator) Rename index to
9791         insn_index.  Replace function segment pointer with index into function
9792         segment vector.
9793         * record-btrace.c (record_btrace_call_history): Replace function
9794         segment pointer use with index.
9795         (record_btrace_frame_sniffer): Retrieve function call segment through
9796         vector.
9797         (record_btrace_set_replay): Remove defunc't safety check.
9798
9799 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9800
9801         * btrace.c (btrace_ends_with_single_insn): New function.
9802         (btrace_call_get, btrace_call_number, btrace_call_begin,
9803         btrace_call_end, btrace_call_next, btrace_call_prev,
9804         btrace_find_call_by_number): Use index into call segment vector
9805         instead of pointer.
9806         (btrace_call_cmp): Simplify.
9807         * btrace.h (struct btrace_call_iterator): Replace function call segment
9808         pointer with index into vector.
9809         * record-btrace.c (record_btrace_call_history): Use index instead of
9810         pointer.
9811
9812 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9813
9814         * btrace.c (btrace_insn_begin, btrace_insn_end,
9815         btrace_find_insn_by_number): Add btinfo to iterator.
9816         * btrace.h (struct btrace_insn_iterator): Add btinfo.
9817
9818 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9819
9820         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
9821         and save pointers directly.
9822         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
9823         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
9824         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
9825         changed signature of functions.
9826         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
9827         (btrace_fetch): Remove code that adds btrace_function pointers to
9828         vector of btrace_functions.
9829         (btrace_clear): Simplify freeing vector of btrace_functions.
9830
9831 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9832
9833         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
9834         Replace VEC_* with std::vector functions.
9835         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
9836         (struct btrace_thread_info)<functions>: Change type to std::vector.
9837
9838 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9839
9840         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
9841         "Removed targets and native configurations" up.  Merge duplicate
9842         "New commands" sub-sections.  Add "New options" sub-sections.
9843
9844 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
9845
9846         * defs.h (copy_integer_to_size): New declaration.
9847         * findvar.c (copy_integer_to_size): New function.
9848         (do_cint_test): New selftest function.
9849         (copy_integer_to_size_test): Likewise.
9850         (_initialize_findvar): Likewise.
9851         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
9852         (mips_fbsd_collect_reg): Use raw_collect_integer.
9853         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
9854         (mips64_fill_gregset): Use raw_collect_integer
9855         (mips64_fill_fpregset): Use raw_supply_integer.
9856         * regcache.c (regcache::raw_supply_integer): New function.
9857         (regcache::raw_collect_integer): Likewise.
9858         * regcache.h: (regcache::raw_supply_integer): New declaration.
9859         (regcache::raw_collect_integer): Likewise.
9860
9861 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9862
9863         * Makefile.in (SFILES): Add gdbarch-selftests.c.
9864         (COMMON_OBS): Add gdbarch-selftests.o.
9865         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
9866         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
9867         * gdbarch-selftests.c: New file.
9868         * regcache.h (regcache) <~regcache>: Mark it virtual if
9869         GDB_SELF_TEST.
9870         <raw_write>: Likewise.
9871
9872 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9873
9874         * regcache.c (current_regcache): Change it to
9875         regcache::current_regcache.
9876         (regcache_observer_target_changed): Update.
9877         (regcache_thread_ptid_changed): Make it a regcache static
9878         method.
9879         (regcache_thread_ptid_changed): Update.
9880         (class regcache_access): New.
9881         (current_regcache_test): Update.
9882         (_initialize_regcache): Update.
9883         * regcache.h: Include forward_list.
9884         (regcache): Declare regcache_thread_ptid_changed and declare
9885         registers_changed_ptid as friend.
9886
9887 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9888
9889         * i387-tdep.c (i387_register_to_value): Use register_size
9890         instead of TYPE_LENGTH.
9891         * m68k-tdep.c (m68k_register_to_value): Likewise.
9892
9893 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9894
9895         * i387-tdep.c (i387_convert_register_p): Return false if type
9896         code isn't TYPE_CODE_FLT.
9897
9898 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9899
9900         * alpha-tdep.c (alpha_convert_register_p): Return true if type
9901         length is 4.
9902         (alpha_register_to_value): Remove type length check.
9903         (alpha_value_to_register): Likewise.
9904
9905 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9906
9907         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
9908         TYPE_CODE_FLT.
9909
9910 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9911
9912         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
9913         TYPE_CODE_FLT or not.
9914
9915 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9916
9917         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
9918         * avr-tdep.c (avr_gdbarch_init): Likewise.
9919         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9920         * cris-tdep.c (cris_gdbarch_init): Likewise.
9921         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9922         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9923         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9924         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
9925         * mep-tdep.c (mep_gdbarch_init): Likewise.
9926         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9927         * mips-tdep.c (mips_gdbarch_init): Likewise.
9928         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9929         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9930         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9931         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9932         * v850-tdep.c (v850_gdbarch_init): Likewise.
9933
9934 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9935
9936         * selftest-arch.c (tests_with_arch): Call registers_changed
9937         and reinit_frame_cache.
9938         * selftest.c (run_self_tests): Likewise.
9939
9940 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9941
9942         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
9943         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
9944
9945 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9946
9947         * rl78-tdep.c (rl78_gdbarch_init): Don't call
9948         set_gdbarch_print_insn.
9949
9950 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9951
9952         * h8300-tdep.c (h8300_gdbarch_init): Don't call
9953         set_gdbarch_print_insn.
9954
9955 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9956
9957         * alpha-tdep.c (alpha_gdbarch_init): Don't call
9958         set_gdbarch_print_insn.
9959         * arc-tdep.c (arc_gdbarch_init): Likewise.
9960         * arch-utils.c: include dis-asm.h.
9961         (default_print_insn): New function.
9962         * arch-utils.h (default_print_insn): Declare.
9963         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
9964         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9965         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
9966         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
9967         * frv-tdep.c (frv_gdbarch_init): Likewise.
9968         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9969         * gdbarch.sh (print_insn): Use default_print_insn.
9970         * gdbarch.c: Regenerated.
9971         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
9972         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
9973         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9974         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
9975         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9976         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
9977         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
9978         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
9979         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
9980         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9981         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9982         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9983         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9984         * mt-tdep.c (mt_gdbarch_init): Likewise.
9985         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9986         * nios2-tdep.c (nios2_print_insn): Remove.
9987         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
9988         * rx-tdep.c (rx_gdbarch_init): Likewise.
9989         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9990         * score-tdep.c (score_print_insn): Remove.
9991         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
9992         * sh-tdep.c (sh_gdbarch_init): Likewise.
9993         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9994         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9995         * tic6x-tdep.c (tic6x_print_insn): Remove.
9996         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
9997         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
9998         * v850-tdep.c (v850_gdbarch_init): Likewise.
9999         * vax-tdep.c (vax_gdbarch_init): Likewise.
10000         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10001         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10002
10003 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10004
10005         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10006         (MIPS_FP0_REGNUM): Remove.
10007         (MIPS_FSR_REGNUM): Remove.
10008         (mips_fbsd_supply_fpregs): Use mips_regnum.
10009         (mips_fbsd_supply_gregs): Likewise.
10010         (mips_fbsd_collect_fpregs): Likewise.
10011         (mips_fbsd_collect_gregs): Likewise.
10012
10013 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10014
10015         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10016         (getpfpregs_supplies): New function.
10017         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10018         getfpregs_supplies.
10019         (mips_fbsd_store_inferior_registers): Likewise.
10020
10021 2017-05-22  Pedro Alves <palves@redhat.com>
10022
10023         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10024         maintainer.
10025
10026 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
10027
10028         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10029         (store_register): Likewise.
10030         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10031         (get_decimal_float_return_value): Likewise.
10032         (do_ppc_sysv_return_value): Likewise.
10033         (ppc64_sysv_abi_push_integer): Likewise.
10034         (ppc64_sysv_abi_push_freg): Likewise.
10035         (ppc64_sysv_abi_return_value_base): Likewise.
10036         (ppc64_sysv_abi_return_value): Likewise.
10037         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10038         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10039         * rs6000-nat.c: Likewise.
10040         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10041         (rs6000_value_to_register): Likewise.
10042         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10043
10044 2017-05-21  Tom Tromey  <tom@tromey.com>
10045
10046         PR rust/21466:
10047         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10048         arrays as "[T]", not "[T; ]".
10049
10050 2017-05-19  Tom Tromey  <tom@tromey.com>
10051
10052         PR rust/21484:
10053         * rust-lang.c (exp_descriptor_rust): New function.
10054         (rust_language_defn): Use it.
10055         * p-lang.c (pascal_language_defn): Update.
10056         * opencl-lang.c (opencl_language_defn): Update.
10057         * objc-lang.c (objc_language_defn): Update.
10058         * m2-lang.c (m2_language_defn): Update.
10059         * language.h (struct language_defn)
10060         <la_watch_location_expression>: New member.
10061         * language.c (unknown_language_defn, auto_language_defn)
10062         (local_language_defn): Update.
10063         * go-lang.c (go_language_defn): Update.
10064         * f-lang.c (f_language_defn): Update.
10065         * d-lang.c (d_language_defn): Update.
10066         * c-lang.h (c_watch_location_expression): Declare.
10067         * c-lang.c (c_watch_location_expression): New function.
10068         (c_language_defn, cplus_language_defn, asm_language_defn)
10069         (minimal_language_defn): Use it.
10070         * breakpoint.c (watch_command_1): Call
10071         la_watch_location_expression.
10072         * ada-lang.c (ada_language_defn): Update.
10073
10074 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10075
10076         PR tui/21482
10077         * gdb_curses.h (NOMACROS): Define.
10078         (NCURSES_NOMACROS): Define.
10079
10080 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10081
10082         PR tui/21482
10083         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10084         arg to char *.
10085         * tui/tui-wingeneral.c (box_win): Likewise.
10086         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10087         (tui_show_source_line): Likewise.
10088         (tui_show_exec_info_content): Likewise.
10089
10090 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10091
10092         * sparc-tdep.c (sparc_structure_return_p)
10093         (sparc_arg_on_registers_p): New functions.
10094         (sparc32_store_arguments): Use them.
10095         * sparc64-tdep.c (sparc64_16_byte_align_p)
10096         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10097         Handle TYPE_CODE_ARRAY.
10098
10099 2017-05-17  Yao Qi  <yao.qi@linaro.org>
10100
10101         * cli/cli-decode.c (add_alias_cmd): New function.
10102         * command.h (add_alias_cmd): Declare.
10103         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10104         instead call add_alias_cmd.
10105
10106 2017-05-17  Pedro Alves  <palves@redhat.com>
10107
10108         * Makefile.in (nat_extra_makefile_frag): Rename to ...
10109         (nat_makefile_frag): ... this.  All references updated.
10110         * configure.ac: Likewise.
10111         * configure.nat: Likewise.  Enhance comments.
10112         * configure: Regenerate.
10113
10114 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10115
10116         * procfs.c (procfs_create_inferior): Change prototype to match
10117         definition.
10118
10119 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
10120
10121         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10122         C++ compiler warning.
10123
10124 2017-05-12  Tom Tromey  <tom@tromey.com>
10125
10126         PR rust/21483:
10127         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10128         recurse, just call value_struct_elt directly.
10129
10130 2017-05-12  Tom Tromey  <tom@tromey.com>
10131
10132         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10133         OP_RUST_ARRAY>: Fix.
10134
10135 2017-05-12  Tom Tromey  <tom@tromey.com>
10136
10137         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10138
10139 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10140
10141         * regcache.c: Include <forward_list>.
10142         (struct regcache_list): Remove.
10143         (current_regcache): Update.
10144         (get_thread_arch_aspace_regcache): Update for std::forward_list.
10145         (regcache_thread_ptid_changed): Likewise.
10146         (registers_changed_ptid): Likewise.
10147         (current_regcache_size): Likewise.
10148
10149 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10150
10151         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10152         (current_regcache_size): New function.
10153         (current_regcache_test): New function.
10154         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10155
10156 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10157
10158         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10159         (print_gp_register_row): Use get_frame_register_value.
10160
10161 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10162
10163         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10164         (mips_supply_fpregset): Likewise.
10165         (mips64_supply_gregset): Likewise.
10166
10167 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10168
10169         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
10170         regcache->raw_supply_zeroed.
10171
10172 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10173
10174         * configure.nat: Rearrange 'case' statements to match
10175         host before cpu.
10176
10177 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10178
10179         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
10180         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10181         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
10182         "@nat_extra_makefile_frag@".
10183         (Makefile): Remove dependency on "@frags@".
10184         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10185         (data-directory/Makefile): Likewise.
10186         * config/aarch64/linux.mh: Deleted; moved contents to
10187         "gdb/configure.nat".
10188         * config/alpha/alpha-linux.mh: Likewise.
10189         * config/alpha/nbsd.mh: Likewise.
10190         * config/arm/linux.mh: Likewise.
10191         * config/arm/nbsdelf.mh: Likewise.
10192         * config/i386/cygwin.mh: Likewise.
10193         * config/i386/cygwin64.mh: Likewise.
10194         * config/i386/darwin.mh: Likewise.
10195         * config/i386/fbsd.mh: Likewise.
10196         * config/i386/fbsd64.mh: Likewise.
10197         * config/i386/go32.mh: Likewise.
10198         * config/i386/i386gnu.mh: Likewise.
10199         * config/i386/i386sol2.mh: Likewise.
10200         * config/i386/linux.mh: Likewise.
10201         * config/i386/linux64.mh: Likewise.
10202         * config/i386/mingw.mh: Likewise.
10203         * config/i386/mingw64.mh: Likewise.
10204         * config/i386/nbsd64.mh: Likewise.
10205         * config/i386/nbsdelf.mh: Likewise.
10206         * config/i386/nto.mh: Likewise.
10207         * config/i386/obsd.mh: Likewise.
10208         * config/i386/obsd64.mh: Likewise.
10209         * config/i386/sol2-64.mh: Likewise.
10210         * config/ia64/linux.mh: Likewise.
10211         * config/m32r/linux.mh: Likewise.
10212         * config/m68k/linux.mh: Likewise.
10213         * config/m68k/nbsdelf.mh: Likewise.
10214         * config/m68k/obsd.mh: Likewise.
10215         * config/m88k/obsd.mh: Likewise.
10216         * config/mips/fbsd.mh: Likewise.
10217         * config/mips/linux.mh: Likewise.
10218         * config/mips/nbsd.mh: Likewise.
10219         * config/mips/obsd64.mh: Likewise.
10220         * config/pa/linux.mh: Likewise.
10221         * config/pa/nbsd.mh: Likewise.
10222         * config/pa/obsd.mh: Likewise.
10223         * config/powerpc/aix.mh: Likewise.
10224         * config/powerpc/fbsd.mh: Likewise.
10225         * config/powerpc/linux.mh: Likewise.
10226         * config/powerpc/nbsd.mh: Likewise.
10227         * config/powerpc/obsd.mh: Likewise.
10228         * config/powerpc/ppc64-linux.mh: Likewise.
10229         * config/powerpc/spu-linux.mh: Likewise.
10230         * config/s390/linux.mh: Likewise.
10231         * config/sh/nbsd.mh: Likewise.
10232         * config/sparc/fbsd.mh: Likewise.
10233         * config/sparc/linux.mh: Likewise.
10234         * config/sparc/linux64.mh: Likewise.
10235         * config/sparc/nbsd64.mh: Likewise.
10236         * config/sparc/nbsdelf.mh: Likewise.
10237         * config/sparc/obsd64.mh: Likewise.
10238         * config/sparc/sol2.mh: Likewise.
10239         * config/tilegx/linux.mh: Likewise.
10240         * config/vax/nbsdelf.mh: Likewise.
10241         * config/vax/obsd.mh: Likewise.
10242         * config/xtensa/linux.mh: Likewise.
10243         * config/i386/i386gnu.mn: New file, with excerpts from
10244         "config/i386/i386gnu.mh".
10245         * configure: Regenerate.
10246         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10247         *.mh files under "gdb/config".
10248         * configure.nat: New file, with contents from the
10249         "gdb/config/*/*.mh" files.
10250
10251 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
10252
10253         * btrace.c (btrace_clear): Free insn vector.
10254
10255 2017-05-05  Pedro Alves  <palves@redhat.com>
10256
10257         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10258         * configure: Regenerate.
10259
10260 2017-05-04  Pedro Alves  <palves@redhat.com>
10261
10262         * Makefile.in (SFILES): Add progspace-and-thread.c.
10263         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10264         (COMMON_OBS): Add progspace-and-thread.o.
10265         * breakpoint.c: Include "progspace-and-thread.h".
10266         (update_inserted_breakpoint_locations)
10267         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10268         Use scoped_restore_current_pspace_and_thread.
10269         (create_std_terminate_master_breakpoint): Use
10270         scoped_restore_current_program_space.
10271         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10272         (print_breakpoint_location): Use
10273         scoped_restore_current_program_space.
10274         (bp_loc_is_permanent): Use
10275         scoped_restore_current_pspace_and_thread.
10276         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10277         (download_tracepoint_locations): Use
10278         scoped_restore_current_pspace_and_thread.
10279         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10280         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10281         (enum step_over_calls_kind): Moved from inferior.h.
10282         (class scoped_restore_current_thread): New class.
10283         * gdbthread.h (make_cleanup_restore_current_thread): Delete
10284         declaration.
10285         (scoped_restore_current_thread): New class.
10286         * infcmd.c: Include "common/gdb_optional.h".
10287         (continue_1, proceed_after_attach): Use
10288         scoped_restore_current_thread.
10289         (notice_new_inferior): Use scoped_restore_current_thread.
10290         * inferior.c: Include "progspace-and-thread.h".
10291         (restore_inferior, save_current_inferior): Delete.
10292         (add_inferior_command, clone_inferior_command): Use
10293         scoped_restore_current_pspace_and_thread.
10294         * inferior.h (scoped_restore_current_inferior): New class.
10295         * infrun.c: Include "progspace-and-thread.h" and
10296         "common/gdb_optional.h".
10297         (follow_fork_inferior): Use
10298         scoped_restore_current_pspace_and_thread.
10299         (scoped_restore_exited_inferior): New class.
10300         (handle_vfork_child_exec_or_exit): Use
10301         scoped_restore_exited_inferior,
10302         scoped_restore_current_pspace_and_thread,
10303         scoped_restore_current_thread and scoped_restore.
10304         (fetch_inferior_event): Use scoped_restore_current_thread.
10305         * linespec.c (decode_line_full, decode_line_1): Use
10306         scoped_restore_current_program_space.
10307         * mi/mi-main.c: Include "progspace-and-thread.h".
10308         (exec_continue): Use scoped_restore_current_thread.
10309         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10310         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10311         * proc-service.c (ps_pglobal_lookup): Use
10312         scoped_restore_current_program_space.
10313         * progspace-and-thread.c: New file.
10314         * progspace-and-thread.h: New file.
10315         * progspace.c (release_program_space, clone_program_space): Use
10316         scoped_restore_current_program_space.
10317         (restore_program_space, save_current_program_space)
10318         (save_current_space_and_thread): Delete.
10319         (switch_to_program_space_and_thread): Moved to
10320         progspace-and-thread.c.
10321         * progspace.h (save_current_program_space)
10322         (save_current_space_and_thread): Delete declarations.
10323         (scoped_restore_current_program_space): New class.
10324         * remote.c (remote_btrace_maybe_reopen): Use
10325         scoped_restore_current_thread.
10326         * symtab.c: Include "progspace-and-thread.h".
10327         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10328         * thread.c (print_thread_info_1): Use
10329         scoped_restore_current_thread.
10330         (struct current_thread_cleanup): Delete.
10331         (do_restore_current_thread_cleanup)
10332         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10333         (scoped_restore_current_thread::~scoped_restore_current_thread):
10334         ... this new dtor.
10335         (make_cleanup_restore_current_thread): Rename/convert to ...
10336         (scoped_restore_current_thread::scoped_restore_current_thread):
10337         ... this new ctor.
10338         (thread_apply_all_command): Use scoped_restore_current_thread.
10339         (thread_apply_command): Use scoped_restore_current_thread.
10340         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10341         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10342
10343 2017-05-04  Pedro Alves  <palves@redhat.com>
10344
10345         * thread.c (make_cleanup_restore_current_thread): Move
10346         find_thread_ptid call before the is_stopped call.  Assert that the
10347         thread is found.  Replace is_stopped call by checking the thread's
10348         state directly.  Remove unnecessary NULL-thread check.
10349
10350 2017-05-04  Pedro Alves  <palves@redhat.com>
10351
10352         * corelow.c (thread_section_name): New class.
10353         (get_core_register_section, get_core_siginfo): Use it.
10354
10355 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10356
10357         * corelow.c (sniff_core_bfd): Remove extra semicolon.
10358         (get_core_register_section): Remove xfree of NULL pointer.
10359
10360 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
10361
10362         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10363         * regcache.c (regcache::raw_supply_zeroed): New function.
10364         * regcache.h (regcache::raw_supply_zeroed): New declaration.
10365
10366 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10367
10368         * gdbarch.sh: Remove commented out definition of
10369         TARGET_CHAR_BIT.
10370         * gdbarch.h: Re-generate.
10371
10372 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
10373
10374         * configure: Regenerate.
10375
10376 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
10377
10378         * solib-target.c (solib_target_relocate_section_addresses):
10379         Remove num_section_bases, num_bases, segment_bases variables.
10380
10381 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10382
10383         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10384
10385 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10386
10387         * solib-target.c: Include <vector>
10388         (struct lm_info_target) <~lm_info_target>: Remove.
10389         <segment_bases, section_bases>: Change type to
10390         std::vector<CORE_ADDR>.
10391         (library_list_start_segment, library_list_start_section,
10392         library_list_end_library,
10393         solib_target_relocate_section_addresses): Adjust.
10394
10395 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10396
10397         * gdbarch.sh (software_single_step): Change return type to
10398         std::vector<CORE_ADDR>.
10399         * gdbarch.c, gdbarch.h: Re-generate.
10400         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10401         Adjust.
10402         (arm_deal_with_atomic_sequence_raw): Adjust.
10403         (thumb_get_next_pcs_raw): Adjust.
10404         (arm_get_next_pcs_raw): Adjust.
10405         (arm_get_next_pcs): Adjust.
10406         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10407         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10408         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10409         (alpha_software_single_step): Adjust.
10410         * alpha-tdep.h (alpha_software_single_step): Adjust.
10411         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10412         * arm-tdep.c (arm_software_single_step): Adjust.
10413         (arm_breakpoint_kind_from_current_state): Adjust.
10414         * arm-tdep.h (arm_software_single_step): Adjust.
10415         * breakpoint.c (insert_single_step_breakpoint): Adjust.
10416         * cris-tdep.c (cris_software_single_step): Adjust.
10417         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10418         (micromips_deal_with_atomic_sequence): Adjust.
10419         (deal_with_atomic_sequence): Adjust.
10420         (mips_software_single_step): Adjust.
10421         * mips-tdep.h (mips_software_single_step): Adjust.
10422         * moxie-tdep.c (moxie_software_single_step): Adjust.
10423         * nios2-tdep.c (nios2_software_single_step): Adjust.
10424         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10425         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10426         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10427         * s390-linux-tdep.c (s390_software_single_step): Adjust.
10428         * sparc-tdep.c (sparc_software_single_step): Adjust.
10429         * spu-tdep.c (spu_software_single_step): Adjust.
10430         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10431
10432 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10433
10434         * gdbarch.sh: Use semi-colon as field separator instead of colon.
10435         * gdbarch.h: Re-generate.
10436
10437 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10438
10439         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10440         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10441         * python/py-instruction.c, python/py-instruction.h: New file.
10442         * python/py-record.c: Add py-instruction.h include.
10443         (gdbpy_initialize_record): Make gdb.Instruction a super class of
10444         gdb.RecordInstruction.
10445         * python/python-internal.h: Add gdbpy_initialize_instruction
10446         declaration.
10447         * python/python.c (do_start_initialization): Add
10448         gdbpy_initialize_instruction.
10449
10450 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10451
10452         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10453         Remove.
10454         (btrace_func_from_recpy_func): New function.
10455         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10456         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10457         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10458         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10459         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10460         Also, use new helper functions.
10461         (btpy_list_item): Use new helper functions.
10462         (recpy_bt_function_call_history): Use new type name.
10463         (btpy_call_getset): Remove.
10464         (gdbpy_initialize_btrace): Remove code to initialize
10465         gdb.BtraceFunctionCall.
10466         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10467         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10468         recpy_bt_func_prev, recpy_bt_func_next): New export.
10469         * python/py-record.c (recpy_func_type): New static object.
10470         (recpy_func_new, recpy_func_level, recpy_func_symbol,
10471         recpy_func_instructions, recpy_func_up, recpy_func_prev,
10472         recpy_func_next): New function.
10473         (recpy_element_hash, recpy_element_richcompare): Updated comment.
10474         (recpy_func_getset): New static object.
10475         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10476         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10477
10478 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10479
10480         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10481         (btpy_object, btpy_insn_type, btpy_new): Remove.
10482         (btpy_list_object): Use gdb.RecordInstruction type instead of
10483         gdb.BtraceInstruction type.
10484         (btrace_insn_from_recpy_insn): New function.
10485         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10486         btpy_new.
10487         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10488         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10489         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10490         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10491         instead of btpy_object.
10492         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10493         btpy_insn_data, btpy_insn_decode): Rename to ...
10494         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10495         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10496         recpy_bt_insn_decode): This.  Also, use new helper functions.
10497         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10498         recpy_insn_type.
10499         (btpy_insn_getset): Remove.
10500         (gdbpy_initialize_btrace): Remove code to initialize
10501         gdb.BtraceInstruction.  Use recpy_element_object.
10502         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10503         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10504         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10505         * python/py-record.c (recpy_insn_type): New static object.
10506         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10507         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10508         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10509         New function.
10510         (recpy_insn_getset): New static object.
10511         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10512         * python/py-record.h (recpy_element_object): New typedef.
10513         (recpy_insn_type, recpy_insn_new): New export.
10514
10515 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10516
10517         * py-record-btrace.c (btpy_insn_new): Removed.
10518         (btpy_insn_or_gap_new): New function.
10519         (btpy_insn_error): Removed.
10520         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10521         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10522         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10523         btpy_insn_or_gap_new instead of btpy_insn_new.
10524         (btpy_insn_getset): Remove btpy_insn_error.
10525         * py-record.c (recpy_gap_type): New static object.
10526         (recpy_gap_object): New typedef.
10527         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10528         recpy_gap_reason_string): New function.
10529         (recpy_gap_getset): New static object.
10530         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10531         * py-record.h (recpy_gap_new): New export.
10532
10533 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10534
10535         * python/py-record.c (recpy_ptid): Remove.
10536         (recpy_record_getset): Remove recpy_ptid.
10537
10538 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10539
10540         * btrace.c (btrace_fetch): Set inferior_ptid.
10541         * python/py-record-btrace.c: Add "py-record.h" include.
10542         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10543         recpy_bt_end, recpy_bt_instruction_history,
10544         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10545         in gdb.Record object instead of current ptid.
10546         * python/py-record.c: Include new "py-record.h" file.
10547         (recpy_record_object): Moved to py-record.h.
10548         * python/py-record.h: New file.
10549
10550 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10551
10552         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10553         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10554         indentation.
10555
10556 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
10557
10558         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10559         the past maintainers section.
10560
10561 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10562
10563         * infcmd.c (get_return_value): Use regcache ctor, and remove
10564         cleanup.
10565
10566 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10567             Pedro Alves  <palves@redhat.com>
10568
10569         * regcache.c (regcache::regcache): New tag dispatch ctor.
10570         (do_cooked_read): Moved above.
10571         (regcache_dup): Use the tag dispatch ctor..
10572         * regcache.h (regcache): Declare ctor, delete copy ctor and
10573         assignment operator, remove friend regcache_dup.
10574
10575 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10576
10577         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10578         call method save instead of regcache_cpy.
10579         * regcache.h (struct regcache): Make regcache_dup a friend.
10580
10581 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10582
10583         * regcache.c (struct regcache): Move to regcache.h
10584         (regcache::arch): New method.
10585         (regcache_get_ptid): Update.
10586         (get_regcache_arch): Call arch method.
10587         (get_regcache_aspace): Call method aspace.
10588         (register_buffer): Change it to method.
10589         (regcache_save): Change it to regcache::save.
10590         (regcache_restore): Likewise.
10591         (regcache_cpy_no_passthrough): Remove the declaration.
10592         (regcache_cpy): Call methods restore and cpy_no_passthrough.
10593         (regcache_cpy_no_passthrough): Change it to method
10594         cpy_no_passthrough.
10595         (regcache_register_status): Change it to method
10596         get_register_status.
10597         (regcache_invalidate): Change it to method invalidate.
10598         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10599         (regcache_raw_update): Change it to method raw_update.
10600         (regcache_raw_read): Likewise.
10601         (regcache_raw_read_signed): Likewise.
10602         (regcache_raw_read_unsigned): Likewise.
10603         (regcache_raw_write_signed): Likewise.
10604         (regcache_raw_write_unsigned): Likewise.
10605         (regcache_cooked_read): Likewise.
10606         (regcache_cooked_read_value): Likewise.
10607         (regcache_cooked_read_signed): Likewise.
10608         (regcache_cooked_read_unsigned): Likewise.
10609         (regcache_cooked_write_signed): Likewise.
10610         (regcache_cooked_write_unsigned): Likewise.
10611         (regcache_raw_set_cached_value): Likewise.
10612         (regcache_raw_write): Likewise.
10613         (regcache_cooked_write): Likewise.
10614         (regcache_xfer_part): Likewise.
10615         (regcache_raw_read_part): Likewise.
10616         (regcache_raw_write_part): Likewise.
10617         (regcache_cooked_read_part): Likewise.
10618         (regcache_cooked_write_part): Likewise.
10619         (regcache_raw_supply): Likewise.
10620         (regcache_raw_collect): Likewise.
10621         (regcache_transfer_regset): Likewise.
10622         (regcache_supply_regset): Likewise.
10623         (regcache_collect_regset): Likewise.
10624         (regcache_debug_print_register): Likewise.
10625         (enum regcache_dump_what): Move it to regcache.h.
10626         (regcache_dump): Change it to method dump.
10627         * regcache.h (enum regcache_dump_what): New.
10628         (class regcache): New.
10629         * target.c (target_fetch_registers): Call method
10630         debug_print_register.
10631         (target_store_registers): Likewise.
10632
10633 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10634
10635         * windows-nat.c (struct lm_info_windows): Initialize field.
10636         (windows_make_so): Allocate lm_info_windows with new.
10637         (windows_free_so): Free lm_info_windows with delete.
10638
10639 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10640
10641         * solib-darwin.c (struct lm_info_darwin): Initialize field.
10642         (darwin_current_sos): Allocate lm_info_darwin with new, remove
10643         cleanup.
10644         (darwin_free_so): Free lm_info_darwin with delete.
10645
10646 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10647
10648         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
10649         <l_addr_p>: Change type to bool.
10650         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
10651         (svr4_free_so): Free lm_info_svr4 with delete.
10652         (svr4_copy_library_list): Replace memcpy with call to copy
10653         constructor.
10654         (library_list_start_library, svr4_default_sos): Allocate
10655         lm_info_svr4 with new.
10656
10657 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10658
10659         * solib-target.c (struct lm_info_target): Add destructor,
10660         initialize fields.
10661         <name>: Change type to std::string.
10662         (library_list_start_library): Allocate lm_info_target with new.
10663         (solib_target_free_library_list): Free lm_info_target with
10664         delete.
10665         (solib_target_current_sos): Adapt to std::string.
10666         (solib_target_free_so): Free lm_info_target with delete.
10667
10668 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10669
10670         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
10671         fields.
10672         (frv_current_sos): Allocate lm_info_frv with new.
10673         (frv_relocate_main_executable): Free lm_info_frv with delete,
10674         allocate with new.
10675         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
10676
10677 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10678
10679         * solib-frv.c (struct lm_info_frv): Fix indentation.
10680
10681 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10682
10683         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
10684         map field.
10685         (dsbt_current_sos): Allocate lm_info_dsbt with new.
10686         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
10687         and allocate with new.
10688         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
10689
10690 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10691
10692         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
10693         <filename, member_name>: Change type to std::string.
10694         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
10695         (library_list_start_library): Allocate lm_info_aix with new.
10696         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
10697         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
10698         with copy constructor.
10699
10700 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10701
10702         * solist.h (struct lm_info): Remove.
10703         (struct lm_info_base): New class.
10704         (struct so_list) <lm_info>: Change type to lm_info_base *.
10705         * nto-tdep.c (struct lm_info): Remove.
10706         (lm_addr): Adjust.
10707         * solib-aix.c (struct lm_info): Rename to ...
10708         (struct lm_info_aix): ... this.  Extend lm_info_base.
10709         (lm_info_p): Rename to ...
10710         (lm_info_aix_p): ... this, and adjust.
10711         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
10712         solib_aix_parse_libraries, library_list_start_library,
10713         solib_aix_free_library_list, solib_aix_parse_libraries,
10714         solib_aix_get_library_list,
10715         solib_aix_relocate_section_addresses, solib_aix_free_so,
10716         solib_aix_get_section_offsets,
10717         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
10718         Adjust.
10719         (struct solib_aix_inferior_data) <library_list>: Adjust.
10720         * solib-darwin.c (struct lm_info): Rename to ...
10721         (struct lm_info_darwin): ... this.  Extend lm_info_base.
10722         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
10723         * solib-dsbt.c (struct lm_info): Rename to ...
10724         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
10725         (struct dsbt_info) <main_executable_lm_info): Adjust.
10726         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
10727         dsbt_relocate_section_addresses): Adjust.
10728         * solib-frv.c (struct lm_info): Rename to ...
10729         (struct lm_info_frv): ... this.  Extend lm_info_base.
10730         (main_executable_lm_info): Adjust.
10731         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
10732         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
10733         find_canonical_descriptor_in_load_object,
10734         frv_fdpic_find_canonical_descriptor): Adjust.
10735         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10736         to lm_info_svr4.
10737         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10738         svr4_clear_so, svr4_copy_library_list,
10739         library_list_start_library, svr4_default_sos, svr4_read_so_list,
10740         svr4_current_sos, svr4_fetch_objfile_link_map,
10741         solist_update_incremental): Adjust.
10742         * solib-svr4.h (struct lm_info_svr4): Move here from
10743         solib-svr4.c.
10744         * solib-target.c (struct lm_info): Rename to ...
10745         (struct lm_info_target): ... this.  Extend lm_info_base.
10746         (lm_info_p): Rename to ...
10747         (lm_info_target_p): ... this.
10748         (solib_target_parse_libraries, library_list_start_segment,
10749         library_list_start_section, library_list_start_library,
10750         library_list_end_library, solib_target_free_library_list,
10751         solib_target_current_sos, solib_target_free_so,
10752         solib_target_relocate_section_addresses): Adjust.
10753         * windows-nat.c (struct lm_info): Rename to ...
10754         (struct lm_info_windows): ... this.  Extend lm_info_base.
10755         (windows_make_so, handle_load_dll, handle_unload_dll,
10756         windows_xfer_shared_libraries): Adjust.
10757
10758 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10759
10760         * solib-darwin.c (struct darwin_so_list): Remove.
10761         (darwin_current_sos): Allocate an so_list object instead of a
10762         darwin_so_list, separately allocate an lm_info object.
10763         (darwin_free_so): Free lm_info.
10764
10765 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
10766
10767         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
10768         with fprintf_filtered.
10769
10770 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10771
10772         * regcache.c (regcache::regcache): New function.
10773         (regcache::~regcache): New function.
10774         (regcache_xmalloc_1): Remove.
10775         (regcache_xmalloc): Call new regcache.
10776         (regcache_xfree): Call delete regcache.
10777         (get_thread_arch_aspace_regcache): Call new regcache.
10778
10779 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10780
10781         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
10782         lwp instead of ptid_get_lwp.
10783
10784 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10785
10786         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
10787         lwp_info instead of getting from inferior_ptid.
10788
10789 2017-04-27  Keith Seitz  <keiths@redhat.com>
10790
10791         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
10792         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
10793         (CV_CONVERSION_BADNESS): Define.
10794         (rank_one_type): Remove overly restrictive rvalue reference
10795         rank checks.
10796         Add cv-qualifier checks and subranks for type equality.
10797         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
10798         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
10799         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
10800
10801 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
10802
10803         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
10804         count when creating the object.
10805
10806 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
10807             Ulrich Weigand  <uweigand@de.ibm.com>
10808
10809         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
10810         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
10811         is used in AIX.
10812         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
10813         (process_xcoff_symbol): Likewise.
10814         (scan_xcoff_symtab): Likewise.
10815
10816 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10817
10818         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
10819         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
10820         (ia64_access_reg): Use get_frame_register_unsigned.
10821         (ia64_access_rse_reg): Likewise.
10822         (ia64_libunwind_frame_prev_register): Likewise.
10823
10824 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
10825
10826         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
10827         * gdbarch.c: Regenerated.
10828         * gdbarch.h: Regenerated.
10829         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
10830         visibility external.
10831         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
10832         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
10833         (enum cfa_how_kind): Move to ...
10834         (struct dwarf2_frame_state_reg_info): Likewise.
10835         (struct dwarf2_frame_state): Likewise.
10836         * dwarf2-frame.h: ... here.
10837         (dwarf2_frame_state_alloc_regs): New declaration.
10838         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
10839         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
10840
10841 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10842
10843         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
10844         regcache_raw_read_unsigned.
10845         (xtensa_pseudo_register_write): Likewise.
10846
10847 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10848
10849         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
10850         (nds32_pseudo_register_write): Likewise.
10851
10852 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10853
10854         * regcache.c (struct regcache) <readonly_p>: Change its type
10855         to bool.
10856         (regcache_xmalloc_1): Update parameter type and callers update.
10857
10858 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10859
10860         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
10861         set_gdbarch_wchar_bit.
10862         * arm-tdep.c (arm_gdbarch_init): Likewise.
10863
10864 2017-04-25  Pedro Alves  <palves@redhat.com>
10865
10866         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
10867         (BothAreRelocatable, memcopy, memmove): Don't define.
10868         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
10869         macros.
10870
10871 2017-04-25  Pedro Alves  <palves@redhat.com>
10872
10873         * common/common-defs.h: Include "common/poison.h".
10874         * common/function-view.h: (Not, Or, Requires): Move to traits.h
10875         and adjust.
10876         * common/poison.h: New file.
10877         * common/traits.h: Include <type_traits>.
10878         (Not, Or, Requires): New, moved from common/function-view.h.
10879
10880 2017-04-25  Pedro Alves  <palves@redhat.com>
10881
10882         * breakpoint.h (struct breakpoint): In-class initialize all
10883         fields.  Make boolean fields "bool".
10884         * breakpoint.c (init_raw_breakpoint_without_location): Remove
10885         memset call and initializations no longer necessary.
10886
10887 2017-04-25  Pedro Alves  <palves@redhat.com>
10888
10889         * btrace.c (pt_btrace_insn_flags): Change parameter type to
10890         reference.
10891         (pt_btrace_insn): New function.
10892         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
10893
10894 2017-04-25  Pedro Alves  <palves@redhat.com>
10895
10896         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
10897         "base" field and inherit from "bp_location" instead.  Add
10898         non-default ctor.
10899         (allocate_location_exception): Use new non-default ctor.
10900         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
10901         (init_bp_location): Convert to ...
10902         (bp_location::bp_location): ... this new ctor, and remove memset
10903         call.
10904         (base_breakpoint_allocate_location): Use the new non-default ctor.
10905         * breakpoint.h (bp_location): Now a class.  Declare default and
10906         non-default ctors.  In-class initialize all members.
10907         (init_bp_location): Remove declaration.
10908
10909 2017-04-25  Pedro Alves  <palves@redhat.com>
10910
10911         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
10912         assignment operator.
10913
10914 2017-04-24  Yao Qi  <yao.qi@linaro.org>
10915
10916         * doublest.c (convert_doublest_to_floatformat): Call
10917         floatformat_totalsize_bytes.
10918
10919 2017-04-22  Tom Tromey  <tom@tromey.com>
10920
10921         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
10922         ui_out_emit_list.
10923         * stack.c (print_frame): Use ui_out_emit_list.
10924         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10925         ui_out_emit_list.
10926         * mi/mi-main.c (print_one_inferior)
10927         (mi_cmd_data_list_register_names)
10928         (mi_cmd_data_list_register_values, mi_cmd_list_features)
10929         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
10930         ui_out_emit_list.
10931         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
10932         (mi_output_solib_attribs): Use ui_out_emit_list,
10933         ui_out_emit_tuple.
10934         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
10935         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
10936         (mi_cmd_stack_list_args, list_args_or_locals): Use
10937         ui_out_emit_list.
10938         * disasm.c (do_assembly_only): Use ui_out_emit_list.
10939         * breakpoint.c (print_solib_event, output_thread_groups): Use
10940         ui_out_emit_list.
10941
10942 2017-04-22  Tom Tromey  <tom@tromey.com>
10943
10944         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
10945         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
10946         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
10947
10948 2017-04-22  Tom Tromey  <tom@tromey.com>
10949
10950         * tracepoint.c (tvariables_info_1)
10951         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
10952
10953 2017-04-22  Tom Tromey  <tom@tromey.com>
10954
10955         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
10956         annotate_arg_emitter.
10957         * breakpoint.c (print_mention_watchpoint)
10958         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
10959         * annotate.h (struct annotate_arg_emitter): New.
10960
10961 2017-04-22  Tom Tromey  <tom@tromey.com>
10962
10963         * record-btrace.c (record_btrace_insn_history)
10964         (record_btrace_insn_history_range, record_btrace_call_history)
10965         (record_btrace_call_history_range): Use ui_out_emit_tuple.
10966         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
10967         ui_out_emit_tuple.
10968         * stack.c (print_frame_info): Use ui_out_emit_tuple.
10969         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
10970         * skip.c (skip_info): Use ui_out_emit_tuple.
10971         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
10972         * progspace.c (print_program_space): Use ui_out_emit_tuple.
10973         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
10974         * osdata.c (info_osdata): Use ui_out_emit_tuple.
10975         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10976         ui_out_emit_tuple.
10977         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
10978         (output_register, mi_cmd_data_read_memory)
10979         (mi_cmd_data_read_memory_bytes, mi_load_progress)
10980         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
10981         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
10982         Use ui_out_emit_tuple.
10983         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
10984         ui_out_emit_tuple.
10985         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10986         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
10987         * linux-thread-db.c (info_auto_load_libthread_db): Use
10988         ui_out_emit_tuple.
10989         * inferior.c (print_inferior): Use ui_out_emit_tuple.
10990         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
10991         * disasm.c (do_mixed_source_and_assembly_deprecated)
10992         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
10993         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
10994         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
10995         * breakpoint.c (print_one_breakpoint_location)
10996         (print_one_breakpoint): Use ui_out_emit_tuple.
10997         * auto-load.c (print_script, info_auto_load_cmd): Use
10998         ui_out_emit_tuple.
10999         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11000
11001 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
11002
11003         * thread.c (print_thread_info_1): Remove dead code.
11004
11005 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11006
11007         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11008         GDB_SELF_TEST.
11009         * arm-tdep.c (selftests::arm_record_test): Likewise.
11010
11011 2017-04-21  Yao Qi  <yao.qi@linaro.org>
11012
11013         * regcache.c (regcache_restore): Remove argument 2.  Replace
11014         argument 3 with regcache.  Get register status from
11015         src->register_status and get register contents from
11016         register_buffer (src, regnum).
11017         (regcache_cpy): Update.
11018
11019 2017-04-19  Pedro Alves  <palves@redhat.com>
11020
11021         * gdbthread.h (thread): Add missing closing parenthesis in
11022         comment.
11023
11024 2017-04-19  Pedro Alves  <palves@redhat.com>
11025
11026         * common/refcounted-object.h: New file.
11027         * gdbthread.h: Include "common/refcounted-object.h".
11028         (thread_info): Inherit from refcounted_object and add comments.
11029         (thread_info::incref, thread_info::decref)
11030         (thread_info::m_refcount): Delete.
11031         (thread_info::deletable): Use the refcounted_object::refcount()
11032         method.
11033         * inferior.c (current_inferior_): Add comment.
11034         (set_current_inferior): Increment/decrement refcounts.
11035         (prune_inferiors, remove_inferior_command): Skip inferiors marked
11036         not-deletable instead of comparing with the current inferior.
11037         (initialize_inferiors): Increment the initial inferior's refcount.
11038         * inferior.h (struct inferior): Forward declare.
11039         Include "common/refcounted-object.h".
11040         (current_inferior, set_current_inferior): Move declaration to
11041         before struct inferior's definition, and fix comment.
11042         (inferior): Inherit from refcounted_object.  Add comments.
11043         * thread.c (switch_to_thread_no_regs): Reference the thread's
11044         inferior pointer directly instead of doing a ptid lookup.
11045         (switch_to_no_thread): New function.
11046         (switch_to_thread(thread_info *)): New function, factored out
11047         from ...
11048         (switch_to_thread(ptid_t)): ... this.
11049         (restore_current_thread): Delete.
11050         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11051         fields, and add 'inf' field.
11052         (do_restore_current_thread_cleanup): Check whether old->inf is
11053         alive instead of looking up an inferior by ptid.  Use
11054         switch_to_thread and switch_to_no_thread.
11055         (restore_current_thread_cleanup_dtor): Use old->inf directly
11056         instead of lookup up an inferior by id.  Decref the inferior.
11057         Don't restore 'removable'.
11058         (make_cleanup_restore_current_thread): Same the inferior pointer
11059         in old, instead of the inferior number.  Incref the inferior.
11060         Don't save/clear 'removable'.
11061
11062 2017-04-19  Pedro Alves  <palves@redhat.com>
11063
11064         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11065         unittests/scoped_restore-selftests.c.
11066         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11067         * common/scoped_restore.h (scoped_restore_base): Make "class".
11068         (scoped_restore_base::release): New public method.
11069         (scoped_restore_base::scoped_restore_base): New protected ctor.
11070         (scoped_restore_base::m_saved_var): New protected field.
11071         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11072         scoped_restore_base base class instead of m_saved_var directly.
11073         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11074         (scoped_restore_tmpl::scoped_restore_tmpl(const
11075         scoped_restore_tmpl<T>&)): Likewise.
11076         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11077         method.
11078         (scoped_restore_tmpl::saved_var): New method.
11079         (scoped_restore_tmpl::m_saved_var): Delete.
11080         * inferior.h (inferior::detaching): Now a bool.
11081         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11082         cleanup.
11083         * unittests/scoped_restore-selftests.c: New file.
11084
11085 2017-04-19  Pedro Alves  <palves@redhat.com>
11086
11087         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11088         Re-sort in alphabetic order.
11089
11090 2017-04-18  Pedro Alves  <palves@redhat.com>
11091
11092         * xml-support.c (obstack_xml_printf): Delete.
11093         * xml-support.h (obstack_xml_printf): Delete.
11094
11095 2017-04-18  Pedro Alves  <palves@redhat.com>
11096
11097         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11098         vdebug, verror, body_text, start_element, end_element, name,
11099         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11100         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11101         is_xinclude>: Make private and add m_ prefix.
11102         (gdb_xml_parser::body_text): New method, based on ...
11103         (gdb_xml_body_text): ... this.  Adjust.
11104         (gdb_xml_parser::vdebug): New method, based on ...
11105         (gdb_xml_debug): ... this.  Adjust.
11106         (gdb_xml_parser::verror): New method, based on ...
11107         (gdb_xml_error): ... this.  Adjust.
11108         (gdb_xml_parser::start_element): New method, based on ...
11109         (gdb_xml_start_element): ... this.  Adjust.
11110         (gdb_xml_start_element_wrapper): Defer to
11111         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11112         (gdb_xml_parser::end_element): New method, based on ...
11113         (gdb_xml_end_element_wrapper): ... this.  Adjust.
11114         (gdb_xml_parser::~gdb_xml_parser): Adjust.
11115         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11116         (gdb_xml_parser::use_dtd): New method, based on ...
11117         (gdb_xml_use_dtd): ... this.  Adjust.
11118         (gdb_xml_parser::parse): New method, based on ...
11119         (gdb_xml_parse): ... this.  Adjust.
11120         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11121         (xinclude_start_include): Adjust to call the parser's name method.
11122         (xml_xinclude_default, xml_xinclude_start_doctype)
11123         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11124         method.
11125         (xml_process_xincludes): Adjust to call parser methods.
11126         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11127         declarations.
11128
11129 2017-04-18  Pedro Alves  <palves@redhat.com>
11130
11131         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11132         gdb::optional<std::string>.
11133         * xml-support.c: Include <string>.
11134         (scope_level::scope_level(scope_level &&))
11135         (scope_level::~scope_level): Delete.
11136         (scope_level::body): Now a std::string.
11137         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11138         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11139         parameter.
11140         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11141         (xinclude_parsing_data::output): Now a std::string reference.
11142         (xinclude_start_include): Adjust.
11143         (xml_xinclude_default): Adjust.
11144         (xml_process_xincludes): Add 'output' parameter, and return bool.
11145         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11146         and return bool.
11147         * xml-tdesc.c: Include <unordered_map> and <string>.
11148         (tdesc_xml_cache): Delete.
11149         (tdesc_xml_cache_s): Delete.
11150         (xml_cache): Now an std::unordered_map.
11151         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11152         (target_fetch_description_xml): Change return type to
11153         gdb::optional<std::string>, and adjust.
11154         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11155         (target_fetch_description_xml): Change return type to
11156         gdb::optional<std::string>.
11157
11158 2017-04-18  Pedro Alves  <palves@redhat.com>
11159
11160         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11161         unittests/optional-selftests.c.
11162         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11163         * unittests/optional-selftests.c: New file.
11164         * unittests/optional/assignment/1.cc: New file.
11165         * unittests/optional/assignment/2.cc: New file.
11166         * unittests/optional/assignment/3.cc: New file.
11167         * unittests/optional/assignment/4.cc: New file.
11168         * unittests/optional/assignment/5.cc: New file.
11169         * unittests/optional/assignment/6.cc: New file.
11170         * unittests/optional/assignment/7.cc: New file.
11171         * unittests/optional/cons/copy.cc: New file.
11172         * unittests/optional/cons/default.cc: New file.
11173         * unittests/optional/cons/move.cc: New file.
11174         * unittests/optional/cons/value.cc: New file.
11175         * unittests/optional/in_place.cc: New file.
11176         * unittests/optional/observers/1.cc: New file.
11177         * unittests/optional/observers/2.cc: New file.
11178
11179 2017-04-18  Pedro Alves  <palves@redhat.com>
11180
11181         * common/gdb_optional.h: Include common/traits.h.
11182         (in_place_t): New type.
11183         (in_place): New constexpr variable.
11184         (optional::optional): Remove member initialization of
11185         m_instantiated.
11186         (optional::optional(in_place_t...)): New constructor.
11187         (optional::~optional): Use reset.
11188         (optional::optional(const optional&)): New.
11189         (optional::optional(const optional&&)): New.
11190         (optional::optional(T &)): New.
11191         (optional::optional(T &&)): New.
11192         (operator::operator=(const optional &)): New.
11193         (operator::operator=(optional &&)): New.
11194         (operator::operator= (const T &))
11195         (operator::operator= (T &&))
11196         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
11197         (operator::reset): New.
11198         (operator::m_instantiated):: Add in-class initializer.
11199         * common/traits.h: Include <type_traits>.
11200         (struct And): New types.
11201
11202 2017-04-18  Pedro Alves  <palves@redhat.com>
11203
11204         * xml-support.c: Include <vector>.
11205         (scope_level::scope_level(const gdb_xml_element *))
11206         (scope_level::scope_level(scope_level&&)): New.
11207         (scope_level::~scope_level): New.
11208         (scope_level_s): Delete.
11209         (gdb_xml_parser::scopes): Now a std::vector.
11210         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11211         Use std::vector.
11212         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11213         scope cleanup code.
11214         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11215         of the scopes member.  Use std::vector::emplace_back.
11216
11217 2017-04-18  Pedro Alves  <palves@redhat.com>
11218
11219         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
11220         a bool.
11221         (gdb_xml_end_element): Change type of first parameter.
11222         (gdb_xml_cleanup): Rename to ...
11223         (gdb_xml_parser::~gdb_xml_parser): ... this.
11224         (gdb_xml_create_parser_and_cleanup): Delete with ...
11225         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11226         to this new ctor.
11227         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11228         using gdb_xml_create_parser_and_cleanup.
11229         (xinclude_parsing_data): Add ctor/dtor.
11230         (xml_xinclude_cleanup): Delete.
11231         (xml_process_xincludes): Create a local xinclude_parsing_data
11232         instead of heap-allocating one.  Create a local gdb_xml_parser
11233         instead of heap-allocating one with
11234         gdb_xml_create_parser_and_cleanup.
11235
11236 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
11237
11238         PR threads/20743
11239         * fbsd-nat.c (resume_one_thread_cb): Remove.
11240         (resume_all_threads_cb): Remove.
11241         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11242         iterate_over_threads.
11243
11244 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11245
11246         * NEWS: Create a new section for the next release branch.
11247         Rename the section of the current branch, now that it has
11248         been cut.
11249
11250 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11251
11252         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11253         * version.in: Bump version to 8.0.50.DATE-git.
11254
11255 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
11256
11257         PR gdb/21385
11258         * windows-nat.c (windows_create_inferior): Declare 'allargs'
11259         independently of the host, and fix build breakage on Cygwin.
11260
11261 2017-04-13  Pedro Alves  <palves@redhat.com>
11262
11263         * inferior.c (free_inferior): Convert to ...
11264         (inferior::~inferior): ... this dtor.
11265         (inferior::inferior): New ctor, factored out from ...
11266         (add_inferior_silent): ... here.  Allocate the inferior with a new
11267         expression.
11268         (delete_inferior): Call delete instead of free_inferior.
11269         * inferior.h (gdb_environ, continuation): Forward declare.
11270         (inferior): Now a class.  Add in-class initialization to all
11271         members.  Make boolean fields bool, except 'detaching'.
11272         (inferior::inferior): New explicit ctor.
11273         (inferior::~inferior): New.
11274
11275 2017-04-13  Pedro Alves  <palves@redhat.com>
11276
11277         * inferior.c (init_inferior_list): Delete.
11278         * inferior.h (init_inferior_list): Delete.
11279
11280 2017-04-13  Pedro Alves  <palves@redhat.com>
11281
11282         PR threads/13217
11283         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11284         (top level): Call it twice, with different thread sets.
11285
11286 2017-04-13  Pedro Alves  <palves@redhat.com>
11287
11288         * thread.c: Include <algorithm>.
11289         (thread_array_cleanup): Delete.
11290         (scoped_inc_dec_ref): New class.
11291         (live_threads_count): New function.
11292         (set_thread_refcount): Delete.
11293         (tp_array_compar_ascending): Now a bool.
11294         (tp_array_compar): Convert to a std::sort comparison function.
11295         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11296         and live_threads_count.
11297
11298 2017-04-13  Pedro Alves  <palves@redhat.com>
11299
11300         * infrun.c (follow_fork_inferior): Also switch the current
11301         inferior.
11302
11303 2017-04-13  Pedro Alves  <palves@redhat.com>
11304
11305         * breakpoint.c (watch_command_1): Save watchpoint-frame info
11306         before calling create_internal_breakpoint.
11307
11308 2017-04-13  Pedro Alves  <palves@redhat.com>
11309
11310         * fork-child.c (execv_argv): New class.
11311         (breakup_args): Refactored as ...
11312         (execv_argv::init_for_no_shell): .. this method of execv_argv.
11313         Copy arguments to storage and replace separators with NULL
11314         terminators in place.
11315         (escape_bang_in_quoted_argument): Adjust to return bool.
11316         (execv_argv::execv_argv): New ctor.
11317         (execv_argv::init_for_shell): New method, factored out from
11318         fork_inferior.  Don't strdup strings into the vector.
11319         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
11320         Remove free_vector_argv call.
11321
11322 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11323
11324         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11325         tdep->rx_psw_type.
11326
11327 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11328
11329         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11330         * rx-tdep.c (rx_gdbarch_init): Likewise.
11331
11332 2017-04-13  Pedro Alves  <palves@redhat.com>
11333
11334         * breakpoint.h (struct breakpoint): Reindent.
11335
11336 2017-04-13  Pedro Alves  <palves@redhat.com>
11337
11338         * breakpoint.c (bp_location): Rename to ...
11339         (bp_locations): ... this.  All references updated.
11340         (bp_location_count): Rename to ...
11341         (bp_locations_count): ... this.  All references updated.
11342         (bp_location_placed_address_before_address_max): Rename to ...
11343         (bp_locations_placed_address_before_address_max): ... this.  All
11344         references updated.
11345         (bp_location_shadow_len_after_address_max): Rename to ...
11346         (bp_locations_shadow_len_after_address_max): ... this.  All
11347         references updated.
11348         (bp_location_compare_addrs): Rename to ...
11349         (bp_locations_compare_addrs): ... this.  All references updated.
11350         (bp_location_compare):Rename to ...
11351         (bp_locations_compare): ... this.  All references updated.
11352         (bp_location_target_extensions_update): Rename to ...
11353         (bp_locations_target_extensions_update): ... this.  All references
11354         updated.
11355
11356 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11357
11358         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11359         * common/common.m4: Check headers 'termios.h', 'termio.h' and
11360         'sgtty.h'.
11361         * common/gdb_termios.h: New file, with parts of "terminal.h".
11362         * inflow.c: Include "gdb_termios.h".
11363         * ser-unix.c: Include "gdb_termios.h".
11364         * terminal.h: Move terminal-related defines to
11365         "common/gdb_termios.h".
11366
11367 2017-04-12  Tom Tromey  <tom@tromey.com>
11368
11369         * probe.c (parse_probes): Update.
11370         * location.h (delete_event_location): Don't declare.
11371         (event_location_deleter::operator()): Update.
11372         * location.c (event_location_deleter::operator()): Rename from
11373         delete_event_location.
11374         * linespec.h (linespec_result) <location>: Change type to
11375         event_location_up.
11376         * linespec.c (canonicalize_linespec, event_location_to_sals)
11377         (decode_objc): Update.
11378         (linespec_result): Don't call delete_event_location.
11379         * breakpoint.c (create_breakpoints_sal)
11380         (bkpt_probe_create_sals_from_location)
11381         (strace_marker_create_sals_from_location): Update.
11382
11383 2017-04-12  Tom Tromey  <tom@tromey.com>
11384
11385         * linespec.h (struct linespec_result): Add constructor and
11386         destructor.
11387         (init_linespec_result, destroy_linespec_result)
11388         (make_cleanup_destroy_linespec_result): Don't declare.
11389         * linespec.c (init_linespec_result): Remove.
11390         (linespec_result::~linespec_result): Rename from
11391         destroy_linespec_result.  Update.
11392         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11393         Remove.
11394         * breakpoint.c (create_breakpoint, break_range_command)
11395         (decode_location_default): Update.
11396         * ax-gdb.c (agent_command_1): Update.
11397
11398 2017-04-12  Tom Tromey  <tom@tromey.com>
11399
11400         * remote.c (remote_download_tracepoint): Update.
11401         * python/py-breakpoint.c (bppy_get_location): Update.
11402         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11403         (gdbscm_breakpoint_location): Update.
11404         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11405         * breakpoint.h (struct breakpoint) <location, location_range_end>:
11406         Change type to event_location_up.
11407         * breakpoint.c (create_overlay_event_breakpoint)
11408         (create_longjmp_master_breakpoint)
11409         (create_std_terminate_master_breakpoint)
11410         (create_exception_master_breakpoint)
11411         (breakpoint_event_location_empty_p, print_breakpoint_location)
11412         (print_one_breakpoint_location, create_thread_event_breakpoint)
11413         (init_breakpoint_sal, create_breakpoint)
11414         (print_recreate_ranged_breakpoint, break_range_command)
11415         (init_ada_exception_breakpoint, say_where): Update.
11416         (base_breakpoint_dtor): Don't call delete_event_location.
11417         (bkpt_print_recreate, tracepoint_print_recreate)
11418         (dprintf_print_recreate, update_static_tracepoint)
11419         (breakpoint_re_set_default): Update.
11420
11421 2017-04-12  Tom Tromey  <tom@tromey.com>
11422
11423         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11424         type of "to_do".  Update.
11425         (compute_stack_depth): Use std::vector.
11426
11427 2017-04-12  Tom Tromey  <tom@tromey.com>
11428
11429         * printcmd.c (find_instruction_backward): Use std::vector.
11430
11431 2017-04-12  Tom Tromey  <tom@tromey.com>
11432
11433         * symfile.c (objfilep): Remove typedef.
11434         (reread_symbols): Use a std::vector.
11435
11436 2017-04-12  Tom Tromey  <tom@tromey.com>
11437
11438         * mi/mi-main.c (exec_direction_forward): Remove.
11439         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11440         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11441         scoped_restore.
11442         * guile/guile.c (guile_repl_command, guile_command)
11443         (gdbscm_execute_gdb_command): Use scoped_restore.
11444         * go-exp.y (go_parse): Use scoped_restore.
11445         * d-exp.y (d_parse): Use scoped_restore.
11446         * cli/cli-decode.c (cmd_func): Use scoped_restore.
11447         * c-exp.y (c_parse): Use scoped_restore.
11448
11449 2017-04-12  Tom Tromey  <tom@tromey.com>
11450
11451         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11452         (mi_parse): Update return type.
11453         (mi_parse_free): Remove.
11454         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11455         (mi_parse::~mi_parse): Rename from mi_parse_free.
11456         (mi_parse_cleanup): Remove.
11457         (mi_parse): Return a unique_ptr.  Use new.
11458         * mi/mi-main.c (mi_execute_command): Update.
11459
11460 2017-04-12  Tom Tromey  <tom@tromey.com>
11461
11462         * location.c (explicit_location_lex_one): Return a
11463         unique_xmalloc_ptr.
11464         (string_to_explicit_location): Update.  Remove cleanups.
11465
11466 2017-04-12  Tom Tromey  <tom@tromey.com>
11467
11468         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11469         (compare_value_and_voffset): Change type.  Update.
11470         (compute_vtable_size): Change type of "offset_vec".
11471         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
11472         (gnuv3_get_typeid): Remove extraneous declaration.
11473
11474 2017-04-12  Tom Tromey  <tom@tromey.com>
11475
11476         * charset.h (wchar_iterator): Fix comment.
11477
11478 2017-04-12  Tom Tromey  <tom@tromey.com>
11479
11480         * charset.c (iconv_wrapper): New class.
11481         (cleanup_iconv): Remove.
11482         (convert_between_encodings): Use it.
11483
11484 2017-04-12  Tom Tromey  <tom@tromey.com>
11485
11486         * symfile.h (increment_reading_symtab): Update type.
11487         * symfile.c (decrement_reading_symtab): Remove.
11488         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11489         * psymtab.c (psymtab_to_symtab): Update.
11490         * dwarf2read.c (dw2_instantiate_symtab): Update.
11491
11492 2017-04-12  Tom Tromey  <tom@tromey.com>
11493
11494         * jit.c (struct jit_reader): Declare separately.  Add constructor
11495         and destructor.  Change type of "handle".
11496         (loaded_jit_reader): Define separately.
11497         (jit_reader_load): Update.  New "new".
11498         (jit_reader_unload_command): Use "delete".
11499         * gdb-dlfcn.h (struct dlclose_deleter): New.
11500         (gdb_dlhandle_up): New typedef.
11501         (gdb_dlopen, gdb_dlsym): Update types.
11502         (gdb_dlclose): Remove.
11503         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11504         (gdb_dlsym): Change type of "handle".
11505         (make_cleanup_dlclose): Remove.
11506         (dlclose_deleter::operator()): Rename from gdb_dlclose.
11507         * compile/compile-c-support.c (load_libcc): Update.
11508
11509 2017-04-12  Tom Tromey  <tom@tromey.com>
11510
11511         * symtab.h (find_pcs_for_symtab_line): Change return type.
11512         * symtab.c (find_pcs_for_symtab_line): Change return type.
11513         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11514         type of "vec".  Update.
11515         (ltpy_get_pcs_for_line): Update.
11516         * linespec.c (decode_digits_ordinary): Update.
11517
11518 2017-04-12  Tom Tromey  <tom@tromey.com>
11519
11520         * tracepoint.c (actions_command): Update.
11521         * python/python.c (python_command, python_interactive_command):
11522         Update.
11523         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11524         * guile/guile.c (guile_command): Update.
11525         * defs.h (read_command_lines, read_command_lines_1): Return
11526         command_line_up.
11527         (command_lines_deleter): New struct.
11528         (command_line_up): New typedef.
11529         * compile/compile.c (compile_code_command)
11530         (compile_print_command): Update.
11531         * cli/cli-script.h (get_command_line, copy_command_lines): Return
11532         command_line_up.
11533         (make_cleanup_free_command_lines): Remove.
11534         * cli/cli-script.c (get_command_line, read_command_lines_1)
11535         (copy_command_lines): Return command_line_up.
11536         (while_command, if_command, read_command_lines, define_command)
11537         (document_command): Update.
11538         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11539         Remove.
11540         * breakpoint.h (breakpoint_set_commands): Change type of
11541         "commands".
11542         * breakpoint.c (breakpoint_set_commands): Change type of
11543         "commands".  Update.
11544         (do_map_commands_command, update_dprintf_command_list)
11545         (create_tracepoint_from_upload): Update.
11546
11547 2017-04-12  Tom Tromey  <tom@tromey.com>
11548
11549         * tracepoint.c (scope_info): Update.
11550         * spu-tdep.c (spu_catch_start): Update.
11551         * python/python.c (gdbpy_decode_line): Update.
11552         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11553         * python/py-breakpoint.c (bppy_init): Update.
11554         * probe.c (parse_probes): Update.
11555         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11556         * location.h (event_location_deleter): New struct.
11557         (event_location_up): New typedef.
11558         (new_linespec_location, new_address_location, new_probe_location)
11559         (new_explicit_location, copy_event_location)
11560         (string_to_event_location, string_to_event_location_basic)
11561         (string_to_explicit_location): Update return type.
11562         (make_cleanup_delete_event_location): Remove.
11563         * location.c (new_linespec_location, new_address_location)
11564         (new_probe_location, new_explicit_location, copy_event_location):
11565         Return event_location_up.
11566         (delete_event_location_cleanup)
11567         (make_cleanup_delete_event_location): Remove.
11568         (string_to_explicit_location, string_to_event_location_basic)
11569         (string_to_event_location): Return event_location_up.
11570         * linespec.c (canonicalize_linespec, event_location_to_sals)
11571         (decode_line_with_current_source)
11572         (decode_line_with_last_displayed, decode_objc): Update.
11573         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11574         * completer.c (location_completer): Update.
11575         * cli/cli-cmds.c (edit_command, list_command): Update.
11576         * breakpoint.c (create_overlay_event_breakpoint)
11577         (create_longjmp_master_breakpoint)
11578         (create_std_terminate_master_breakpoint)
11579         (create_exception_master_breakpoint)
11580         (create_thread_event_breakpoint): Update.
11581         (init_breakpoint_sal): Update.  Remove some dead code.
11582         (create_breakpoint_sal): Change type of "location".  Update.
11583         (create_breakpoints_sal, create_breakpoint, break_command_1)
11584         (dprintf_command, break_range_command, until_break_command)
11585         (init_ada_exception_breakpoint)
11586         (strace_marker_create_sals_from_location)
11587         (update_static_tracepoint, trace_command, ftrace_command)
11588         (strace_command, create_tracepoint_from_upload): Update.
11589         * break-catch-throw.c (re_set_exception_catchpoint): Update.
11590         * ax-gdb.c (agent_command_1): Update.
11591
11592 2017-04-12  Pedro Alves  <palves@redhat.com>
11593
11594         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11595         * configure.tgt: Handle i[34567]86-*-go32* and
11596         i[34567]86-*-msdosdjgpp*.
11597         * i386-tdep.c (i386_svr4_reg_to_regnum):
11598         Make extern.
11599         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11600         i386-go32-tdep.c.
11601         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11602         * i386-go32-tdep.c: New file.
11603         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
11604         declarations.
11605
11606 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
11607
11608         * aix-thread.c (pd_status2str): Change return type to const char *.
11609
11610 2017-04-12  Pedro Alves  <palves@redhat.com>
11611
11612         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
11613         calls to set_gdbarch_gnu_triplet_regexp.
11614
11615 2017-04-12  Pedro Alves  <palves@redhat.com>
11616
11617         PR gdb/21323
11618         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
11619         New enum value.
11620         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
11621         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
11622         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
11623         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
11624         * gdbarch.h, gdbarch.c: Regenerate.
11625         * aarch64-tdep.c (aarch64_gdbarch_init): Override
11626         gdbarch_wchar_bit and gdbarch_wchar_signed.
11627         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
11628         * arm-tdep.c (arm_gdbarch_init): Likewise.
11629         * avr-tdep.c (avr_gdbarch_init): Likewise.
11630         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
11631         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
11632         * i386-tdep.c (i386_go32_init_abi): Likewise.
11633         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11634         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11635         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11636         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11637         * sh-tdep.c (sh_gdbarch_init): Likewise.
11638         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11639         * sparc64-tdep.c (sparc64_init_abi): Likewise.
11640         * windows-tdep.c (windows_init_abi): Likewise.
11641         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11642
11643 2017-04-12  Pedro Alves  <palves@redhat.com>
11644
11645         PR c++/21323
11646         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
11647         cplus_primitive_type_char32_t>: New enum values.
11648         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
11649         and cplus_primitive_type_char32_t.
11650         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
11651         32, use the archtecture's built-in type for char16_t and char32_t,
11652         respectively.  Otherwise, fallback to init_integer_type as before,
11653         but make the type unsigned, and issue a complaint.
11654         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
11655
11656 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
11657
11658         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
11659         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
11660
11661 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11662
11663         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
11664         'const char *'.
11665
11666 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11667
11668         * common/common-utils.c (free_vector_argv): New function.
11669         * common/common-utils.h: Include <vector>.
11670         (free_vector_argv): New prototype.
11671         * darwin-nat.c (darwin_create_inferior): Rewrite function
11672         prototype in order to constify "exec_file" and accept a
11673         "std::string" for "allargs".
11674         * fork-child.c: Include <vector>.
11675         (breakup_args): Rewrite function, using C++.
11676         (fork_inferior): Rewrite function header, constify "exec_file_arg"
11677         and accept "std::string" for "allargs".  Update the code to
11678         calculate "argv" based on "allargs".  Update calls to "exec_fun"
11679         and "execvp".
11680         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
11681         order to constify "exec_file" and accept a "std::string" for
11682         "allargs".
11683         * go32-nat.c (go32_create_inferior): Likewise.
11684         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
11685         * infcmd.c (run_command_1): Constify "exec_file".  Use
11686         "std::string" for inferior arguments.
11687         * inferior.h (fork_inferior): Update prototype.
11688         * linux-nat.c (linux_nat_create_inferior): Rewrite function
11689         prototype in order to constify "exec_file" and accept a
11690         "std::string" for "allargs".
11691         * nto-procfs.c (procfs_create_inferior): Likewise.
11692         * procfs.c (procfs_create_inferior): Likewise.
11693         * remote-sim.c (gdbsim_create_inferior): Likewise.
11694         * remote.c (extended_remote_run): Update code to accept
11695         "std::string" as argument.
11696         (extended_remote_create_inferior): Rewrite function prototype in
11697         order to constify "exec_file" and accept a "std::string" for
11698         "allargs".
11699         * rs6000-nat.c (super_create_inferior): Likewise.
11700         (rs6000_create_inferior): Likewise.
11701         * target.h (struct target_ops) <to_create_inferior>: Likewise.
11702         * windows-nat.c (windows_create_inferior): Likewise.
11703
11704 2017-04-11  Pedro Alves  <palves@redhat.com>
11705
11706         * thread.c: Fix whitespace throughout.
11707
11708 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11709
11710         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
11711
11712 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
11713
11714         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
11715
11716 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
11717
11718         PR gdb/21364
11719         * osdata.c (info_osdata): Check if 'type' is an empty string
11720         instead of NULL.
11721
11722 2017-04-10  Pedro Alves  <palves@redhat.com>
11723
11724         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
11725         (ptid_to_global_thread_id, in_thread_list)
11726         (do_captured_list_thread_ids, set_resumed, set_running)
11727         (set_executing, set_stop_requested, finish_thread_state)
11728         (validate_registers_access, can_access_registers_ptid)
11729         (print_thread_info_1, switch_to_thread)
11730         (do_restore_current_thread_cleanup)
11731         (make_cleanup_restore_current_thread, thread_command)
11732         (thread_name_command): Use operator== instead of ptid_equal.
11733
11734 2017-04-10  Pedro Alves  <palves@redhat.com>
11735
11736         * thread.c (struct current_thread_cleanup) <next>: Delete field.
11737         (current_thread_cleanup_chain): Delete.
11738         (restore_current_thread_cleanup_dtor)
11739         (make_cleanup_restore_current_thread): Remove references to
11740         current_thread_cleanup_chain.
11741
11742 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
11743
11744         * msp430-tdep.c (msp430_pseudo_register_read): Never return
11745         REG_UNKNOWN.
11746
11747 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11748
11749         PR gdb/19942
11750         * gdbthread.h (thread_info::deletable): New method.
11751         (thread_info::incref): New method.
11752         (thread_info::decref): New method.
11753         (thread_info::refcount): Move it to private.
11754         * infrun.c (save_stop_context): Call inc_refcount.
11755         (release_stop_context_cleanup): Likewise.
11756         * thread.c (set_thread_exited): New function.
11757         (init_thread_list): Delete "tp" only it is deletable, otherwise
11758         call set_thread_exited.
11759         (delete_thread_1): Call set_thread_exited.
11760         (current_thread_cleanup) <inferior_pid>: Remove.
11761         <thread>: New field.
11762         (restore_current_thread_ptid_changed): Removed.
11763         (do_restore_current_thread_cleanup): Adjust.
11764         (restore_current_thread_cleanup_dtor): Don't call
11765         find_thread_ptid.
11766         (set_thread_refcount): Use dec_refcount.
11767         (make_cleanup_restore_current_thread): Adjust.
11768         (thread_apply_all_command): Call inc_refcount.
11769         (_initialize_thread): Don't call
11770         observer_attach_thread_ptid_changed.
11771
11772 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11773
11774         * thread.c (delete_thread_1): Hoist code on marking thread as
11775         exited.
11776
11777 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11778
11779         * windows-nat.c (windows_detach): Initialize ptid with
11780         minus_one_ptid.
11781
11782 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11783
11784         * unittests/ptid-selftests.c: Fix erroneous assert messages.
11785
11786 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
11787
11788         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
11789         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
11790         (bfin_pseudo_register_write): Likewise
11791
11792 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
11793
11794         * common/ptid.h (struct ptid): Change to...
11795         (class ptid_t): ... this.
11796         <ptid_t>: New constructors.
11797         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
11798         matches>: New methods.
11799         <make_null, make_minus_one>: New static methods.
11800         <pid>: Rename to...
11801         <m_pid>: ...this.
11802         <lwp>: Rename to...
11803         <m_lwp>: ...this.
11804         <tid>: Rename to...
11805         <m_tid>: ...this.
11806         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
11807         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
11808         as references, move comment to class ptid_t.
11809         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
11810         ptid_t static methods.
11811         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
11812         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
11813         Take ptid arguments as references, implement using ptid_t methods.
11814         * unittests/ptid-selftests.c: New file.
11815         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11816         unittests/ptid-selftests.c.
11817         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
11818
11819 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
11820
11821         * python/python.c (python_run_simple_file): Cast mode literal to
11822         non-const char pointer as expected by PyFile_FromString.
11823
11824 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
11825
11826         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
11827         minus_one_ptid and null_ptid.
11828
11829 2017-04-05  Pedro Alves  <palves@redhat.com>
11830
11831         * warning.m4 (build_warnings): Remove -Wno-write-strings.
11832         * configure: Regenerate.
11833
11834 2017-04-05  Pedro Alves  <palves@redhat.com>
11835
11836         * ada-exp.y (yyerror): Constify.
11837         * ada-lang.c (bound_name, get_selections)
11838         (ada_variant_discrim_type)
11839         (ada_variant_discrim_name, ada_value_struct_elt)
11840         (ada_lookup_struct_elt_type, is_unchecked_variant)
11841         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
11842         (catch_ada_exception_command_split)
11843         (catch_ada_assert_command_split, catch_assert_command)
11844         (ada_op_name): Constify.
11845         * ada-lang.h (ada_yyerror, get_selections)
11846         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
11847         * arc-tdep.c (arc_print_frame_cache): Constify.
11848         * arm-tdep.c (arm_skip_stub): Constify.
11849         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
11850         (gen_aggregate_elt_ref): Constify.
11851         * bcache.c (print_bcache_statistics): Constify.
11852         * bcache.h (print_bcache_statistics): Constify.
11853         * break-catch-throw.c (catch_exception_command_1):
11854         * breakpoint.c (struct ep_type_description::description):
11855         Constify.
11856         (add_solib_catchpoint): Constify.
11857         (catch_fork_command_1): Add cast.
11858         (add_catch_command): Constify.
11859         * breakpoint.h (add_catch_command, add_solib_catchpoint):
11860         Constify.
11861         * bsd-uthread.c (bsd_uthread_state): Constify.
11862         * buildsym.c (patch_subfile_names): Constify.
11863         * buildsym.h (next_symbol_text_func, patch_subfile_names):
11864         Constify.
11865         * c-exp.y (yyerror): Constify.
11866         (token::oper): Constify.
11867         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
11868         * c-varobj.c (cplus_describe_child): Constify.
11869         * charset.c (find_charset_names): Add cast.
11870         (find_charset_names): Constify array and add const_cast.
11871         * cli/cli-cmds.c (complete_command, cd_command): Constify.
11872         (edit_command): Constify.
11873         * cli/cli-decode.c (lookup_cmd): Constify.
11874         * cli/cli-dump.c (dump_memory_command, dump_value_command):
11875         Constify.
11876         (struct dump_context): Constify.
11877         (add_dump_command, restore_command): Constify.
11878         * cli/cli-script.c (get_command_line): Constify.
11879         * cli/cli-script.h (get_command_line): Constify.
11880         * cli/cli-utils.c (check_for_argument): Constify.
11881         * cli/cli-utils.h (check_for_argument): Constify.
11882         * coff-pe-read.c (struct read_pe_section_data): Constify.
11883         * command.h (lookup_cmd): Constify.
11884         * common/print-utils.c (decimal2str): Constify.
11885         * completer.c (gdb_print_filename): Constify.
11886         * corefile.c (set_gnutarget): Constify.
11887         * cp-name-parser.y (yyerror): Constify.
11888         * cp-valprint.c (cp_print_class_member): Constify.
11889         * cris-tdep.c (cris_register_name, crisv32_register_name):
11890         Constify.
11891         * d-exp.y (yyerror): Constify.
11892         (struct token::oper): Constify.
11893         * d-lang.h (d_yyerror): Constify.
11894         * dbxread.c (struct header_file_location::name): Constify.
11895         (add_old_header_file, add_new_header_file, last_function_name)
11896         (dbx_next_symbol_text, add_bincl_to_list)
11897         (find_corresponding_bincl_psymtab, set_namestring)
11898         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
11899         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
11900         * defs.h (command_line_input, print_address_symbolic)
11901         (deprecated_readline_begin_hook): Constify.
11902         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
11903         Constify.
11904         * event-top.c (handle_line_of_input): Constify and add cast.
11905         * exceptions.c (catch_errors): Constify.
11906         * exceptions.h (catch_errors): Constify.
11907         * expprint.c (print_subexp_standard, op_string, op_name)
11908         (op_name_standard, dump_raw_expression, dump_raw_expression):
11909         * expression.h (op_name, op_string, dump_raw_expression):
11910         Constify.
11911         * f-exp.y (yyerror): Constify.
11912         (struct token::oper): Constify.
11913         (struct f77_boolean_val::name): Constify.
11914         * f-lang.c (f_word_break_characters): Constify.
11915         * f-lang.h (f_yyerror): Constify.
11916         * fork-child.c (fork_inferior): Add cast.
11917         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
11918         (new_variant): Constify.
11919         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
11920         * gdbarch.c: Regenerate.
11921         * gdbcore.h (set_gnutarget): Constify.
11922         * go-exp.y (yyerror): Constify.
11923         (token::oper): Constify.
11924         * go-lang.h (go_yyerror): Constify.
11925         * go32-nat.c (go32_sysinfo): Constify.
11926         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
11927         * guile/scm-cmd.c (cmdscm_function): Constify.
11928         * guile/scm-param.c (pascm_param_value): Constify.
11929         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
11930         (h8300sx_register_name): Constify.
11931         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
11932         Constify.
11933         * ia64-tdep.c (ia64_register_names): Constify.
11934         * infcmd.c (construct_inferior_arguments): Constify.
11935         (path_command, attach_post_wait): Constify.
11936         * language.c (show_range_command, show_case_command)
11937         (unk_lang_error): Constify.
11938         * language.h (language_defn::la_error)
11939         (language_defn::la_name_of_this): Constify.
11940         * linespec.c (decode_line_2): Constify.
11941         * linux-thread-db.c (thread_db_err_str): Constify.
11942         * lm32-tdep.c (lm32_register_name): Constify.
11943         * m2-exp.y (yyerror): Constify.
11944         * m2-lang.h (m2_yyerror): Constify.
11945         * m32r-tdep.c (m32r_register_names): Constify and make static.
11946         * m68hc11-tdep.c (m68hc11_register_names): Constify.
11947         * m88k-tdep.c (m88k_register_name): Constify.
11948         * macroexp.c (appendmem): Constify.
11949         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
11950         (upgrade_type, parse_external, parse_partial_symbols)
11951         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
11952         (new_symbol): Constify.
11953         * memattr.c (mem_info_command): Constify.
11954         * mep-tdep.c (register_name_from_keyword): Constify.
11955         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
11956         Constify.
11957         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
11958         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
11959         * mi/mi-main.c (captured_mi_execute_command): Constify and add
11960         cast.
11961         (mi_execute_async_cli_command): Constify.
11962         * mips-tdep.c (mips_register_name): Constify.
11963         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
11964         (am33_register_name, am33_2_register_name)
11965         * moxie-tdep.c (moxie_register_names): Constify.
11966         * nat/linux-osdata.c (osdata_type): Constify fields.
11967         * nto-tdep.c (nto_parse_redirection): Constify.
11968         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
11969         (lookup_child_selector): Constify.
11970         (objc_methcall::name): Constify.
11971         * objc-lang.h (lookup_objc_class, lookup_child_selector)
11972         (lookup_struct_typedef): Constify.
11973         * objfiles.c (pc_in_section): Constify.
11974         * objfiles.h (pc_in_section): Constify.
11975         * p-exp.y (struct token::oper): Constify.
11976         (yyerror): Constify.
11977         * p-lang.h (pascal_yyerror): Constify.
11978         * parser-defs.h (op_name_standard): Constify.
11979         (op_print::string): Constify.
11980         (exp_descriptor::op_name): Constify.
11981         * printcmd.c (print_address_symbolic): Constify.
11982         * psymtab.c (print_partial_symbols): Constify.
11983         * python/py-breakpoint.c (stop_func): Constify.
11984         (bppy_get_expression): Constify.
11985         * python/py-cmd.c (cmdpy_completer::name): Constify.
11986         (cmdpy_function): Constify.
11987         * python/py-event.c (evpy_add_attribute)
11988         (gdbpy_initialize_event_generic): Constify.
11989         * python/py-event.h (evpy_add_attribute)
11990         (gdbpy_initialize_event_generic): Constify.
11991         * python/py-evts.c (add_new_registry): Constify.
11992         * python/py-finishbreakpoint.c (outofscope_func): Constify.
11993         * python/py-framefilter.c (get_py_iter_from_func): Constify.
11994         * python/py-inferior.c (get_buffer): Add cast.
11995         * python/py-param.c (parm_constant::name): Constify.
11996         * python/py-unwind.c (fprint_frame_id): Constify.
11997         * python/python.c (gdbpy_parameter_value): Constify.
11998         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
11999         * remote.c (memory_packet_config::name): Constify.
12000         (show_packet_config_cmd, remote_write_bytes)
12001         (remote_buffer_add_string):
12002         * reverse.c (exec_reverse_once): Constify.
12003         * rs6000-tdep.c (variant::name, variant::description): Constify.
12004         * rust-exp.y (rustyyerror): Constify.
12005         * rust-lang.c (rust_op_name): Constify.
12006         * rust-lang.h (rustyyerror): Constify.
12007         * serial.h (serial_ops::name): Constify.
12008         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12009         (sh_sh3e_register_name, sh_sh2e_register_name)
12010         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12011         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12012         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12013         (sh_sh4al_dsp_register_name): Constify.
12014         * sh64-tdep.c (sh64_register_name): Constify.
12015         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12016         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12017         * stabsread.c (patch_block_stabs, read_type_number)
12018         (ref_map::stabs, ref_add, process_reference)
12019         (symbol_reference_defined, define_symbol, define_symbol)
12020         (error_type, read_type, read_member_functions, read_cpp_abbrev)
12021         (read_one_struct_field, read_struct_fields, read_baseclasses)
12022         (read_tilde_fields, read_struct_type, read_array_type)
12023         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12024         (read_huge_number, read_range_type, read_args, common_block_start)
12025         (find_name_end): Constify.
12026         * stabsread.h (common_block_start, define_symbol)
12027         (process_one_symbol, symbol_reference_defined, ref_add):
12028         * symfile.c (get_section_index, add_symbol_file_command):
12029         * symfile.h (get_section_index): Constify.
12030         * target-descriptions.c (tdesc_type::name): Constify.
12031         (tdesc_free_type): Add cast.
12032         * target.c (find_default_run_target):
12033         (add_deprecated_target_alias, find_default_run_target)
12034         (target_announce_detach): Constify.
12035         (do_option): Constify.
12036         * target.h (add_deprecated_target_alias): Constify.
12037         * thread.c (print_thread_info_1): Constify.
12038         * top.c (deprecated_readline_begin_hook, command_line_input):
12039         Constify.
12040         (init_main): Add casts.
12041         * top.h (handle_line_of_input): Constify.
12042         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12043         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12044         (tfind_command): Rename to ...
12045         (tfind_command_1): ... this and constify.
12046         (tfind_command): New function.
12047         (tfind_end_command, tfind_start_command): Adjust.
12048         (encode_source_string): Constify.
12049         * tracepoint.h (encode_source_string): Constify.
12050         * tui/tui-data.c (tui_partial_win_by_name): Constify.
12051         * tui/tui-data.h (tui_partial_win_by_name): Constify.
12052         * tui/tui-source.c (tui_set_source_content_nil): Constify.
12053         * tui/tui-source.h (tui_set_source_content_nil): Constify.
12054         * tui/tui-win.c (parse_scrolling_args): Constify.
12055         * tui/tui-windata.c (tui_erase_data_content): Constify.
12056         * tui/tui-windata.h (tui_erase_data_content): Constify.
12057         * tui/tui-winsource.c (tui_erase_source_content): Constify.
12058         * tui/tui.c (tui_enable): Add cast.
12059         * utils.c (defaulted_query): Constify.
12060         (init_page_info): Add cast.
12061         (puts_debug, subset_compare): Constify.
12062         * utils.h (subset_compare): Constify.
12063         * varobj.c (varobj_format_string): Constify.
12064         * varobj.h (varobj_format_string): Constify.
12065         * vax-tdep.c (vax_register_name): Constify.
12066         * windows-nat.c (windows_detach): Constify.
12067         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12068         * xml-support.c (gdb_xml_end_element): Constify.
12069         * xml-tdesc.c (tdesc_start_reg): Constify.
12070         * xstormy16-tdep.c (xstormy16_register_name): Constify.
12071         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12072         * xtensa-tdep.h (xtensa_register_t::name): Constify.
12073
12074 2017-04-05  Pedro Alves  <palves@redhat.com>
12075
12076         * proc-api.c (struct trans): Constify.
12077         (procfs_note): Constify.
12078         * proc-events.c (struct trans, syscall_table):
12079         * proc-flags.c (struct trans): Constify.
12080         * proc-utils.h (procfs_note): Constify.
12081         * proc-why.c (struct trans): Constify.
12082         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12083         (procfs_detach): Constify.
12084         * sol-thread.c (struct string_map): Constify.
12085         (td_err_string, td_state_string): Constify.
12086
12087 2017-04-05  Pedro Alves  <palves@redhat.com>
12088
12089         * proc-api.c (procfs_filename): Don't initialize
12090         procfs_filename.
12091         (prepare_to_trace): Assume procfs_filename is non-NULL.
12092         (_initialize_proc_api): Give procfs_filename a default value here.
12093
12094 2017-04-05  Pedro Alves  <palves@redhat.com>
12095
12096         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12097         'cond_string' parameter.
12098         (extract_exception_regexp): Constify 'string' parameter.
12099         (catch_exception_command_1): Constify.
12100         * breakpoint.c (init_catchpoint)
12101         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12102         parameter.
12103         (ep_parse_optional_if_clause, catch_fork_command_1)
12104         (catch_exec_command_1): Constify.
12105         * breakpoint.h (init_catchpoint): Constify 'cond_string'
12106         parameter.
12107         (ep_parse_optional_if_clause): Constify.
12108         * cli/cli-utils.c (remove_trailing_whitespace)
12109         (check_for_argument): Constify.
12110         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12111         non-const overload.
12112         (check_for_argument): Likewise.
12113
12114 2017-04-05  Pedro Alves  <palves@redhat.com>
12115
12116         * event-top.c (command_line_handler): Add cast to execute_command
12117         call.
12118         * record-btrace.c (cmd_record_btrace_bts_start)
12119         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12120         (cmd_record_btrace_start): Add cast to execute_command call.
12121         * record-full.c (record_full_goto_insn):
12122         * record.c (record_start, record_stop): Add cast to
12123         execute_command_to_string calls.
12124         (cmd_record_start): Add cast to execute_command calls.
12125
12126 2017-04-05  Pedro Alves  <palves@redhat.com>
12127
12128         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12129         static inline function.
12130         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12131         array and use gdb_PyArg_ParseTupleAndKeywords.
12132         * python/py-cmd.c (cmdpy_init): Likewise.
12133         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12134         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12135         (infpy_search_memory): Likewise.
12136         * python/py-objfile.c (objfpy_add_separate_debug_file)
12137         (gdbpy_lookup_objfile): Likewise.
12138         * python/py-symbol.c (gdbpy_lookup_symbol)
12139         (gdbpy_lookup_global_symbol): Likewise.
12140         * python/py-type.c (gdbpy_lookup_type): Likewise.
12141         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12142         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12143         Likewise.
12144
12145 2017-04-05  Pedro Alves  <palves@redhat.com>
12146
12147         * python/python-internal.h (gdb_PyGetSetDef): New type.
12148         * python/py-block.c (block_object_getset)
12149         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12150         * python/py-event.c (event_object_getset)
12151         (finish_breakpoint_object_getset): Likewise.
12152         * python/py-inferior.c (inferior_object_getset): Likewise.
12153         * python/py-infthread.c (thread_object_getset): Likewise.
12154         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12155         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12156         * python/py-objfile.c (objfile_getset): Likewise.
12157         * python/py-progspace.c (pspace_getset): Likewise.
12158         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12159         Likewise.
12160         * python/py-record.c (recpy_record_getset): Likewise.
12161         * python/py-symbol.c (symbol_object_getset): Likewise.
12162         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12163         Likewise.
12164         * python/py-type.c (type_object_getset, field_object_getset):
12165         Likewise.
12166         * python/py-value.c (value_object_getset): Likewise.
12167
12168 2017-04-05  Pedro Alves  <palves@redhat.com>
12169
12170         * python/python-internal.h (gdb_PyObject_CallMethod)
12171         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12172         New functions.
12173         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12174         (PySys_GetObject, PySys_SetPath): New macros.
12175
12176 2017-04-05  Pedro Alves  <palves@redhat.com>
12177
12178         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12179         info_osdata_command.
12180         * osdata.c (info_osdata_command): Rename to ...
12181         (info_osdata): ... this.  Constify 'type' parameter, and remove
12182         the 'from_tty' parameter.  Accept NULL TYPE.
12183         (info_osdata_command): New function.
12184         * osdata.h (info_osdata_command): Remove declaration.
12185         (info_osdata): New declaration.
12186
12187 2017-04-05  Pedro Alves  <palves@redhat.com>
12188
12189         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12190         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12191         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12192         parameter.
12193         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12194         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12195         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12196         parameter.
12197         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12198         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12199         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12200         (mi_cmd_file_list_exec_source_files)
12201         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12202         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12203         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12204         parameter.
12205         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12206         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12207         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12208         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12209         (mi_cmd_stack_info_frame): Constify 'command' parameter.
12210         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12211         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12212         'command' parameter.
12213         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12214         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12215         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12216         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12217         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12218         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12219         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12220         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12221         (mi_cmd_var_set_update_range): Constify 'command' parameter.
12222         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12223         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12224         parameter.
12225         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12226         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12227         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12228         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12229         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12230         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12231         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12232         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12233         (mi_cmd_data_list_changed_registers)
12234         (mi_cmd_data_write_register_values)
12235         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12236         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12237         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12238         (mi_cmd_list_features, mi_cmd_list_target_features)
12239         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12240         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12241         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12242         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12243         (mi_cmd_trace_frame_collected): Constify 'command'
12244         parameter.
12245         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12246         'command' parameter.
12247
12248 2017-04-05  Pedro Alves  <palves@redhat.com>
12249
12250         * ada-lang.c (ada_completer_word_break_characters): Now a const
12251         array.
12252         (ada_get_gdb_completer_word_break_characters): Constify.
12253         * completer.c (gdb_completer_command_word_break_characters)
12254         (gdb_completer_file_name_break_characters)
12255         (gdb_completer_quote_characters): Now const arrays.
12256         (get_gdb_completer_quote_characters): Constify.
12257         (set_rl_completer_word_break_characters): New function.
12258         (set_gdb_completion_word_break_characters)
12259         (complete_line_internal): Use it.
12260         * completer.h (get_gdb_completer_quote_characters): Constify.
12261         (set_rl_completer_word_break_characters): Declare.
12262         * f-lang.c (f_word_break_characters): Constify.
12263         * language.c (default_word_break_characters): Constify.
12264         * language.h (language_defn::la_word_break_characters): Constify.
12265         (default_word_break_characters): Constify.
12266         * top.c (init_main): Use set_rl_completer_word_break_characters.
12267
12268 2017-04-05  Pedro Alves  <palves@redhat.com>
12269
12270         * aix-thread.c (aix_thread_pid_to_str)
12271         (aix_thread_extra_thread_info): Constify.
12272         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12273         * bsd-uthread.c (bsd_uthread_extra_thread_info)
12274         (bsd_uthread_pid_to_str): Constify.
12275         * corelow.c (core_pid_to_str): Constify.
12276         * darwin-nat.c (darwin_pid_to_str): Constify.
12277         * fbsd-nat.c (fbsd_pid_to_str): Constify.
12278         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12279         Constify.
12280         * gnu-nat.c (gnu_pid_to_str): Constify.
12281         * go32-nat.c (go32_pid_to_str): Constify.
12282         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12283         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12284         * inferior.c (inferior_pid_to_str): Constify.
12285         * linux-nat.c (linux_nat_pid_to_str): Constify.
12286         * linux-tdep.c (linux_core_pid_to_str): Constify.
12287         * linux-thread-db.c (thread_db_pid_to_str)
12288         (thread_db_extra_thread_info): Constify.
12289         * nto-tdep.c (nto_extra_thread_info): Constify.
12290         * nto-tdep.h (nto_extra_thread_info): Constify.
12291         * obsd-nat.c (obsd_pid_to_str): Constify.
12292         * procfs.c (procfs_pid_to_str): Constify.
12293         * ravenscar-thread.c (ravenscar_extra_thread_info)
12294         (ravenscar_pid_to_str): Constify.
12295         * remote-sim.c (gdbsim_pid_to_str): Constify.
12296         * remote.c (remote_threads_extra_info, remote_pid_to_str):
12297         Constify.
12298         * sol-thread.c (solaris_pid_to_str): Constify.
12299         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12300         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12301         * target.c (default_pid_to_str, target_pid_to_str)
12302         (normal_pid_to_str, default_pid_to_str): Constify.
12303         * target.h (target_ops::to_pid_to_str)
12304         (target_ops::to_extra_thread_info): Constify.
12305         (target_pid_to_str, normal_pid_to_str): Constify.
12306         * windows-nat.c (windows_pid_to_str): Constify.
12307         * gdbarch.sh (core_pid_to_str): Constify.
12308         * target-delegates.c: Regenerate.
12309         * gdbarch.h, gdbarch.c: Regenerate.
12310
12311 2017-04-05  Pedro Alves  <palves@redhat.com>
12312
12313         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12314         the memory of the temporary warning_pre_print override.
12315         * utils.c (warning_pre_print): Constify.
12316         * utils.h (warning_pre_print): Constify.
12317
12318 2017-04-05  Pedro Alves  <palves@redhat.com>
12319
12320         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12321         (shell_command): New function.
12322         (make_command): Use std::string.
12323         (init_cli_cmds): Register shell_command instead of shell_escape.
12324
12325 2017-04-05  Pedro Alves  <palves@redhat.com>
12326
12327         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12328         * tracepoint.c (default_collect): Don't initialize.
12329
12330 2017-04-05  Pedro Alves  <palves@redhat.com>
12331
12332         * macroexp.c (macro_buffer::shared): Now a bool.
12333         (init_buffer): Update.
12334         (init_shared_buffer): Constify 'addr' parameter.
12335         (substitute_args, expand, macro_expand, macro_expand_next): Remove
12336         casts.
12337
12338 2017-04-05  Pedro Alves  <palves@redhat.com>
12339
12340         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12341         * disasm.c (set_disassembler_options): Constify local.
12342         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12343
12344 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
12345
12346         PR gdb/21352
12347         * tracefile.c (tsave_command): Fix argument parsing for '-r'
12348         option.
12349
12350 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12351
12352         * frame.c (frame_unwind_register_unsigned): Call
12353         frame_unwind_register_value.
12354
12355 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12356
12357         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12358         Use gdb_test_multiple, and don't match anchor.
12359
12360 2017-04-05  Pedro Alves  <palves@redhat.com>
12361
12362         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12363         (Write After Approval): Remove Simon Marchi.
12364
12365 2017-04-05  Pedro Alves  <palves@redhat.com>
12366
12367         * common/gdb_optional.h (optional::optional): Make constexpr and
12368         initialize m_dummy.
12369
12370 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12371
12372         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12373         (amd64fbsd_jmp_buf_reg_offset): Remove.
12374         (amd64fbsd_supply_uthread): Remove function.
12375         (amd64fbsd_collect_uthread): Remove function.
12376         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12377         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12378         (x86_64-*-freebsd*): Remove bsd-uthread.o.
12379         (fbsd-nat.c): Update comment.
12380         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12381         (i386fbsd_jmp_buf_reg_offset): Remove.
12382         (i386fbsd_supply_uthread): Remove function.
12383         (i386fbsd_collect_uthread): Remove function.
12384         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12385
12386 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12387
12388         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12389         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12390         * NEWS: Mention that support for FreeBSD/alpha was removed.
12391         * alpha-fbsd-tdep.c: Delete file.
12392         * config/alpha/fbsd.mh: Delete file.
12393         * configure.host: Delete alpha*-*-freebsd* and
12394         alpha*-*-kfreebsd*-gnu.
12395         * configure.tgt: Delete alpha*-*-freebsd* and
12396         alpha*-*-kfreebsd*-gnu.
12397
12398 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12399
12400         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12401         amd64bsd_store_inferior_registers): Use ptid from regcache.
12402
12403 2017-04-04  Pedro Alves  <palves@redhat.com>
12404
12405         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
12406         data fields, make them private and add "m_" prefixes.
12407         (lnp_state_machine::lnp_state_machine): New ctor.
12408         (record_line, check_line_address, handle_set_discriminator)
12409         (handle_set_address, handle_advance_pc, handle_special_opcode)
12410         (handle_advance_line, handle_set_file, handle_negate_stmt)
12411         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12412         (end_sequence, advance_line): New methods.
12413         (m_gdbarch, m_record_lines_p): New fields.
12414         (lnp_reader_state): Delete.
12415         (dwarf_record_line): Rename to ...
12416         (lnp_state_machine::record_line): ... adjust.
12417         (init_lnp_state_machine): Delete.
12418         (lnp_state_machine::lnp_state_machine): New.
12419         (check_line_address): Rename to ...
12420         (lnp_state_machine::check_line_address): This.
12421         (dwarf_decode_lines_1): Remove reference to "reader_state".
12422         Adjust lnp_state_machine having a non-default ctor.  Use bool.
12423         State machine internal state manipulation moved to
12424         lnp_state_machine methods.
12425
12426 2017-04-04  Pedro Alves  <palves@redhat.com>
12427
12428         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12429         unittests/offset-type-selftests.c.
12430         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12431         * common/offset-type.h: New file.
12432         * common/preprocessor.h: New file.
12433         * common/traits.h: New file.
12434         * common/valid-expr.h: New file.
12435         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
12436         sect_offset and cu_offset strong typedefs throughout.
12437         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12438         typedefs throughout.
12439         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
12440         sect_offset and cu_offset strong typedefs throughout.
12441         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12442         typedefs throughout.
12443         * gdbtypes.h: Include "common/offset-type.h".
12444         (cu_offset): Now an offset type (strong typedef) instead of a
12445         struct.
12446         (sect_offset): Likewise.
12447         (union call_site_parameter_u): Rename "param_offset" field to
12448         "param_cu_off".
12449         * unittests/offset-type-selftests.c: New file.
12450
12451 2017-04-04  Pedro Alves  <palves@redhat.com>
12452
12453         * common/underlying.h: New file.
12454         * dwarf2read.c: Include "common/gdb_optional.h" and
12455         "common/underlying.h".
12456         (dir_index, file_name_index): New types.
12457         (file_entry): Use them.
12458         (file_entry::include): Use to_underlying.
12459         (line_header::add_file_name): Use dir_index.
12460         (read_formatted_entries): Use gdb::optional.  Read form before
12461         writting to file_entry.
12462         (dwarf_decode_line_header): Use dir_index.
12463         (lnp_state_machine::current_file): Use to_underlying.
12464         (lnp_state_machine::file): Change type to file_name_index.
12465         (dwarf_record_line): Use to_underlying.
12466         (init_lnp_state_machine): Use file_name_index.
12467         (dwarf_decode_lines_1): Use dir_index and file_name_index.
12468
12469 2017-04-04  Pedro Alves  <palves@redhat.com>
12470
12471         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12472         operator bool, has_value and get methods.
12473
12474 2017-04-04  Pedro Alves  <palves@redhat.com>
12475
12476         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12477         fields.
12478         (line_header): Initialize all data fields.  Change type of
12479         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12480         Change type of include_dirs to std::vector<const char *>.  Remove
12481         num_include_dirs, include_dirs_size.  Change type of file_names to
12482         std::vector<file_entry>.  Remove num_file_names, file_names_size.
12483         (line_header::line_header): New.
12484         (line_header::add_include_dir, line_header::add_file_name): New
12485         methods.
12486         (line_header::include_dir_at): Remove NULL check.
12487         (line_header::file_name_at): Add const overload.
12488         (line_header_up): New unique_ptr typedef.
12489         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
12490         std::vector.  Remove free_line_header call.
12491         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
12492         free_line_header call.
12493         (free_cu_line_header): Delete.
12494         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12495         (setup_type_unit_groups): Use line_header_up instead of cleanups.
12496         Adjust to use std::vector.
12497         (free_line_header): Delete.
12498         (free_line_header_voidp): Use delete.
12499         (add_include_dir): Replace with ...
12500         (line_header::add_include_dir): ... this method.  Use std::vector.
12501         (add_file_name): Replace with ...
12502         (line_header::add_file_name): ... this method.  Use std::vector.
12503         (add_include_dir_stub): Delete.
12504         (read_formatted_entries): Remove memset.
12505         (dwarf_decode_line_header): Return a line_header_up instead of a
12506         raw pointer.  Remove cleanup handling.  Pass lambdas to
12507         read_formatted_entries.  Adjust to use line_header methods.
12508         (dwarf_decode_lines_1): Adjust to use line_header methods.
12509         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12510         use std::vector.
12511
12512 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
12513
12514         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12515         instead of struct ptid.
12516
12517 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
12518
12519         * frame.c (get_frame_register_bytes): Unwind using value.
12520         (put_frame_register_bytes): Likewise.
12521
12522 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
12523
12524         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12525         aggregate-like.
12526
12527 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
12528
12529         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12530
12531 2017-03-29  Yao Qi  <yao.qi@linaro.org>
12532
12533         * gdbthread.h (struct thread_info): Declare constructor and
12534         destructor.  Add some in-class member initializers.
12535         * thread.c (free_thread): Remove.
12536         (init_thread_list): Call delete instead of free_thread.
12537         (new_thread): Call thread_info constructor.
12538         (thread_info::thread_info): New function.
12539         (thread_info::~thread_info): New function.
12540         (delete_thread_1): Call delete instead of free_thread.
12541         (make_cleanup_restore_current_thread): Move tp and frame to
12542         inner block.
12543
12544 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12545
12546         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12547         (arc_skip_prologue): Likewise.
12548         (arc_make_frame_cache): Likewise.
12549         (arc_pv_get_operand): New function.
12550         (arc_is_in_prologue): Likewise.
12551         (arc_analyze_prologue): Likewise.
12552         (arc_print_frame_cache): Likewise.
12553         (MAX_PROLOGUE_LENGTH): New constant.
12554
12555 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12556
12557         * configure.tgt: Add arc-insn.o.
12558         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12559         (dump_arc_instruction_command): New function.
12560         (arc_fprintf_disasm): Likewise.
12561         (arc_disassemble_info): Likewise.
12562         (arc_insn_get_operand_value): Likewise.
12563         (arc_insn_get_operand_value_signed): Likewise.
12564         (arc_insn_get_memory_base_reg): Likewise.
12565         (arc_insn_get_memory_offset): Likewise.
12566         (arc_insn_get_branch_target): Likewise.
12567         (arc_insn_dump): Likewise.
12568         (arc_insn_get_linear_next_pc): Likewise.
12569         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12570         (arc_disassemble_info): Likewise.
12571         (arc_insn_get_branch_target): Likewise.
12572         (arc_insn_get_linear_next_pc): Likewise.
12573         * NEWS: Mention new "maint print arc arc-instruction".
12574
12575 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12576
12577         * arc-tdep (maintenance_print_arc_list): New variable.
12578         (maintenance_print_arc_command): New function.
12579
12580 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12581
12582         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12583         Add "limm" and "reserved".
12584         (arc_cannot_fetch_register, arc_cannot_store_register): Add
12585         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12586         * arc-tdep.h (arc_regnum): Likewise.
12587
12588 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12589
12590         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12591         for THREADPTR register.
12592         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12593         register.
12594         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12595         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12596         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12597
12598 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12599
12600         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12601         registers above gdbarch_num_regs (gdbarch) as privileged in
12602         call0 ABI.
12603
12604 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12605
12606         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12607         for a single specified register or for all registers in
12608         a0_base..a0_base + C0_NREGS range.
12609         (supply_gregset_reg): Call regcache_raw_supply for a single
12610         specified register or for all registers in a0_base..a0_base +
12611         C0_NREGS range.
12612
12613 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12614
12615         * arch/xtensa.h (C0_NREGS): Add definition.
12616         * xtensa-tdep.c (C0_NREGS): Remove definition.
12617
12618 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12619
12620         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
12621         Drop xtensa_default_isa initialization.
12622         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
12623
12624 2017-03-27  Pedro Alves  <palves@redhat.com>
12625
12626         * dwarf2read.c (file_entry) <dir_index>: Add comment.
12627         (file_entry::include_dir): New method.
12628         (line_header::include_dir_at, line_header::file_name_at): New
12629         methods.
12630         (setup_type_unit_groups, setup_type_unit_groups)
12631         (psymtab_include_file_name): Simplify using the new methods.
12632         (lnp_state_machine) <the_line_header>: New field.
12633         <file>: Add comment.
12634         (lnp_state_machine::current_file): New method.
12635         (dwarf_record_line): Simplify using the new methods.
12636         (init_lnp_state_machine): Initialize the "the_line_header" field.
12637         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
12638         Simplify using the new methods.
12639
12640 2017-03-27  Pedro Alves  <palves@redhat.com>
12641
12642         * cp-name-parser.y (make_empty): Delete.
12643         (demangler_special, nested_name, ptr_operator, array_indicator)
12644         (direct_declarator, declarator_1): Use fill_comp instead of
12645         make_empty.
12646
12647 2017-03-27  Pedro Alves  <palves@redhat.com>
12648
12649         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
12650         to ATTRIBUTE_PRINTF.
12651         * solib-target.c (library_list_start_list): Print "string" not
12652         "version".
12653         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
12654         gdb_xml_error call.
12655
12656 2017-03-27  Pedro Alves  <palves@redhat.com>
12657
12658         * dwarf2read.c (struct file_and_directory): New.
12659         (dwarf2_get_dwz_file): Adjust to use std::string.
12660         (dw2_get_file_names_reader): Adjust to use file_and_directory.
12661         (find_file_and_directory): Adjust to return a file_and_directory
12662         object.
12663         (read_file_scope): Adjust to use file_and_directory.  Remove
12664         make_cleanup/do_cleanups calls.
12665         (open_and_init_dwp_file): Adjust to use std::string.  Remove
12666         make_cleanup/do_cleanups calls.
12667         * python/python.c (do_start_initialization): Adjust to ldirname
12668         returning a std::string.
12669         * utils.c (ldirname): Now returns a std::string.
12670         * utils.h (ldirname): Change return type to std::string.
12671         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
12672         returning a std::string.
12673         * xml-tdesc.c (file_read_description_xml): Likewise.
12674
12675 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
12676
12677         * regcache.c (regcache_debug_print_register): New function.
12678         * regcache.h (regcache_debug_print_register): New declaration.
12679         * target.c (debug_print_register): Remove.
12680         (target_fetch_registers): Call regcache_debug_print_register.
12681         (target_store_registers): Likewise.
12682
12683 2017-03-24  Pádraig Brady  <pbrady@fb.com>
12684
12685         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
12686         reference beyond the 'lh->include_dirs' array before accessing to
12687         it.
12688         (psymtab_include_file_name): Likewise.
12689         (dwarf_decode_lines_1): Likewise.
12690         (dwarf_decode_lines): Likewise.
12691         (file_file_name): Likewise.
12692
12693 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
12694
12695         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
12696         inferior_ptid.
12697         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12698         ps_lsetfpregs): Likewise.
12699         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
12700         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12701         ps_lsetfpregs): Likewise.
12702         * target.c (target_fetch_registers, target_store_registers):
12703         Remove asserts.
12704
12705 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
12706
12707         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
12708
12709 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12710
12711         * aarch64-tdep.c (aarch64_process_record_test): Declare.
12712         (_initialize_aarch64_tdep): Register it.
12713         (aarch64_record_load_store): Handle PRFM instruction.
12714         (aarch64_process_record_test): New function.
12715
12716 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12717
12718         * aarch64-tdep.c (aarch64_record_load_store): Fix code
12719         indentation.
12720
12721 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12722
12723         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
12724
12725 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12726
12727         python/python.c (do_start_initialization): Fix memory leak.
12728
12729 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12730
12731         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
12732         using get_ptrace_pid.
12733         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12734         inferior_ptid.
12735         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12736         inferior_ptid instead of pid.
12737
12738 2017-03-22  Yao Qi  <yao.qi@linaro.org>
12739
12740         * aarch64-tdep.c: Wrap locally used classes in anonymous
12741         namespace.
12742         * arm-tdep.c: Likewise.
12743         * linespec.c: Likewise.
12744         * ui-out.c: Likewise.
12745
12746 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
12747
12748         PR gdb/19637
12749         * python/lib/gdb/printer/bound_registers.py: Import sys.
12750
12751 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12752
12753         * windows-nat.c (do_windows_fetch_inferior_registers): Add
12754         windows_thread_info parameter and use it instead of
12755         current_thread.
12756         (windows_fetch_inferior_registers): Don't set current_thread,
12757         pass the thread to do_windows_fetch_inferior_registers.  Use
12758         ptid from regcache instead of inferior_ptid.
12759         (do_windows_store_inferior_registers): Add windows_thread_info
12760         parameter and use it instead of current_thread.
12761         (windows_store_inferior_registers): Don't set current_thread,
12762         pass the thread to do_windows_store_inferior_registers.  Use
12763         ptid from regcache instead of inferior_ptid.
12764
12765 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12766
12767         * ser-mingw.c (ser_windows_raw): Remove reference to
12768         struct serial::current_timeout.
12769
12770 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
12771
12772         PR tdep/20928
12773         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
12774         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
12775         (sparc64_fsr_type): Fix %fsr decoding.
12776
12777 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
12778
12779         * python/py-record-btrace.c (btpy_insn_data): Change return type
12780         for Python 2.
12781
12782 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12783
12784         * spu-linux-nat.c (spu_fetch_inferior_registers,
12785         spu_store_inferior_registers): Use ptid from regcache, set and
12786         restore inferior_ptid.
12787         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
12788         Likewise.
12789
12790 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12791
12792         * i386-linux-nat.c (fetch_register, store_register,
12793         i386_linux_fetch_inferior_registers,
12794         i386_linux_store_inferior_registers): Use ptid from regcache.
12795         * ia64-linux-nat.c (ia64_linux_fetch_register,
12796         ia64_linux_store_register): Likewise.
12797         * inf-ptrace.c (inf_ptrace_fetch_register,
12798         inf_ptrace_store_register): Likewise.
12799         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
12800         m32r_linux_store_inferior_registers): Likewise.
12801         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
12802         m68kbsd_store_inferior_registers): Likewise.
12803         * m68k-linux-nat.c (fetch_register, store_register,
12804         m68k_linux_fetch_inferior_registers,
12805         m68k_linux_store_inferior_registers): Likewise.
12806         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
12807         m88kbsd_store_inferior_registers): Likewise.
12808         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
12809         mips_fbsd_store_inferior_registers): Likewise.
12810         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
12811         mips64_linux_regsets_store_registers): Likewise.
12812         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
12813         mipsnbsd_store_inferior_registers): Likewise.
12814         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
12815         mips64obsd_store_inferior_registers): Likewise.
12816         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
12817         Likewise.
12818         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
12819         ppcfbsd_store_inferior_registers): Likewise.
12820         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
12821         ppc_linux_store_inferior_registers): Likewise.
12822         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
12823         ppcnbsd_store_inferior_registers): Likewise.
12824         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
12825         ppcobsd_store_registers): Likewise.
12826         * procfs.c (procfs_fetch_registers, procfs_store_registers):
12827         Likewise.
12828         * ravenscar-thread.c (ravenscar_fetch_registers,
12829         ravenscar_store_registers, ravenscar_prepare_to_store):
12830         Likewise.
12831         * record-btrace.c (record_btrace_fetch_registers,
12832         record_btrace_store_registers, record_btrace_prepare_to_store):
12833         Likewise.
12834         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
12835         Lookup inferior using ptid from regcache, instead of
12836         current_inferior.
12837         * remote.c (remote_fetch_registers, remote_store_registers): Use
12838         ptid from regcache.
12839         * rs6000-nat.c (fetch_register, store_register): Likewise.
12840         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
12841         s390_linux_store_inferior_registers): Likewise.
12842         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
12843         shnbsd_store_inferior_registers): Likewise.
12844         * sol-thread.c (sol_thread_fetch_registers,
12845         sol_thread_store_registers): Likewise.
12846         * sparc-nat.c (sparc_fetch_inferior_registers,
12847         sparc_store_inferior_registers): Likewise.
12848         * tilegx-linux-nat.c (fetch_inferior_registers,
12849         store_inferior_registers): Likewise.
12850         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
12851         vaxbsd_store_inferior_registers): Likewise.
12852         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
12853         store_xtregs): Likewise.
12854
12855 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12856
12857         PR gdb/14441
12858         * NEWS: Mention support for rvalue references in GDB and python.
12859         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
12860         supports both lvalue and rvalue references.
12861
12862 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12863
12864         PR gdb/14441
12865         * gdbtypes.c (rank_one_type): Implement overloading
12866         resolution rules regarding rvalue references.
12867
12868 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12869
12870         PR gdb/14441
12871         * aarch64-tdep.c (aarch64_type_align)
12872         (aarch64_extract_return_value, aarch64_store_return_value): Change
12873         lvalue reference type checks to general reference type checks.
12874         * amd64-tdep.c (amd64_classify): Likewise.
12875         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
12876         Likewise.
12877         * arm-tdep.c (arm_type_align, arm_extract_return_value)
12878         (arm_store_return_value): Likewise.
12879         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
12880         * c-typeprint.c (c_print_type): Likewise.
12881         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
12882         (cplus_number_of_children, cplus_describe_child): Likewise.
12883         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
12884         * completer.c (expression_completer): Likewise.
12885         * cp-support.c (make_symbol_overload_list_adl_namespace):
12886         Likewise.
12887         * darwin-nat-info.c (info_mach_region_command): Likewise.
12888         * dwarf2loc.c (entry_data_value_coerce_ref)
12889         (value_of_dwarf_reg_entry): Likewise.
12890         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
12891         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
12892         Likewise.
12893         * findvar.c (extract_typed_address, store_typed_address):
12894         Likewise.
12895         * gdbtypes.c (rank_one_type): Likewise.
12896         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
12897         * infcall.c (value_arg_coerce): Likewise.
12898         * language.c (pointer_type): Likewise.
12899         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
12900         Likewise.
12901         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
12902         * mn10300-tdep.c (mn10300_type_align): Likewise.
12903         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
12904         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
12905         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
12906         Likewise.
12907         * printcmd.c (print_formatted, x_command): Likewise.
12908         * python/py-type.c (typy_get_composite, typy_template_argument):
12909         Likewise.
12910         * python/py-value.c (valpy_referenced_value)
12911         (valpy_get_dynamic_type, value_has_field): Likewise.
12912         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
12913         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
12914         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
12915         * spu-tdep.c (spu_scalar_value_p): Likewise.
12916         * symtab.c (lookup_symbol_aux): Likewise.
12917         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
12918         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
12919         Likewise.
12920         * valops.c (value_cast_pointers, value_cast)
12921         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
12922         (value_struct_elt, value_struct_elt_bitpos)
12923         (value_find_oload_method_list, find_overload_match)
12924         (value_rtti_indirect_type): Likewise.
12925         * valprint.c (val_print_scalar_type_p, generic_val_print):
12926         Likewise.
12927         * value.c (value_actual_type, value_as_address, unpack_long)
12928         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
12929         (coerce_ref): Likewise.
12930         * varobj.c (varobj_get_value_type): Likewise.
12931
12932 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12933
12934         PR gdb/14441
12935         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
12936         table of constants.
12937         * python/lib/gdb/command/explore.py: Support exploring values
12938         of rvalue reference types.
12939         * python/lib/gdb/types.py: Implement get_basic_type() for
12940         rvalue reference types.
12941         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
12942         constant.
12943         * python/py-value.c (valpy_getitem): Add an rvalue reference
12944         check.
12945         (valpy_reference_value): Add new parameter "refcode".
12946         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
12947         New wrappers for valpy_reference_value().
12948         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12949         (gdbpy_invoke_xmethod): Likewise.
12950
12951 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12952
12953         PR gdb/14441
12954         * dwarf2read.c (process_die, read_type_die_1): Handle the
12955         DW_TAG_rvalue_reference_type DIE.
12956         (read_tag_reference_type): Add new parameter "refcode".
12957
12958 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12959
12960         PR gdb/14441
12961         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
12962         (c_type_print_modifier, c_type_print_varspec_suffix)
12963         (c_type_print_base): Support printing rvalue reference types.
12964         * c-valprint.c (c_val_print, c_value_print): Support printing
12965         rvalue reference values.
12966
12967 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12968
12969         PR gdb/14441
12970         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
12971         typename.
12972         * cp-support.c (replace_typedefs): Handle
12973         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
12974         * python/py-type.c (typy_lookup_type): Likewise.
12975
12976 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12977
12978         PR gdb/14441
12979         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
12980         * parse.c (insert_type): Change assert statement.
12981         (follow_types): Handle rvalue reference types.
12982         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
12983         constant.
12984
12985 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12986
12987         PR gdb/14441
12988         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
12989         value_ref() interface.
12990         * c-valprint.c (c_value_print): Likewise.
12991         * infcall.c (value_arg_coerce): Likewise.
12992         * python/py-value.c (valpy_reference_value): Likewise.
12993         * valops.c (value_cast, value_reinterpret_cast)
12994         (value_dynamic_cast, typecmp): Likewise.
12995         (value_ref): Parameterize by kind of return value reference type.
12996         * value.h (value_ref): Add new parameter "refcode".
12997
12998 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12999
13000         PR gdb/14441
13001         * dwarf2read.c (read_tag_reference_type): Use
13002         lookup_lvalue_reference_type() instead of lookup_reference_type().
13003         * eval.c (evaluate_subexp_standard): Likewise.
13004         * f-exp.y: Likewise.
13005         * gdbtypes.c (make_reference_type, lookup_reference_type):
13006         Generalize with rvalue reference types.
13007         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13008         convenience wrappers for lookup_reference_type().
13009         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13010         reference kind parameter.
13011         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13012         wrappers for lookup_reference_type().
13013         * guile/scm-type.c (gdbscm_type_reference): Use
13014         lookup_lvalue_reference_type() instead of lookup_reference_type().
13015         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13016         * parse.c (follow_types): Likewise.
13017         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13018         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13019         Likewise.
13020         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13021         (gdbpy_invoke_xmethod): Likewise.
13022         * stabsread.c: Provide extra argument to make_reference_type()
13023         call.
13024         * valops.c (value_ref, value_rtti_indirect_type): Use
13025         lookup_lvalue_reference_type() instead of lookup_reference_type().
13026
13027 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13028
13029         PR gdb/14441
13030         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13031         (TYPE_IS_REFERENCE): New macro.
13032         (struct type): Add rvalue_reference_type field.
13033         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13034
13035 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13036
13037         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13038         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13039         New function definition.
13040         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13041         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13042         New function declaration.
13043         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13044         * mi/mi-interp.h: New file.
13045         * solib.c (info_sharedlibrary_command): Replace for loop with
13046         ALL_SO_LIBS macro
13047         * solib.h (update_solib_list): New function declaration.
13048         (so_list_head): Move macro.
13049         * solist.h (ALL_SO_LIBS): New macro.
13050
13051 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13052
13053         * infcmd.c (post_create_inferior): Remove unused argument in
13054         call to solib_add.
13055         * remote.c (remote_start_remote): Likewise.
13056         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13057         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13058         (enable_break): Likewise.
13059         * solib.c (update_solib_list): Remove unused target argument
13060         and its documentation.
13061         (solib_add): Remove unused target argument.  Remove unused
13062         argument in call to update_solib_list.
13063         (info_sharedlibrary_command): Remove unused argument in call
13064         to update_solib_list.
13065         (sharedlibrary_command): Remove unused argument in call to
13066         solib_add.
13067         (handle_solib_event): Likewise.
13068         (reload_shared_libraries): Likewise.
13069         * solib.h (solib_add): Remove unused target argument.
13070
13071 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13072
13073         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13074         (s390_displaced_step_fixup): Cover relative branches with the
13075         default fixup handling.  This fixes lack of support for some
13076         relative branch instructions.
13077
13078 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13079
13080         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13081         ptid from regcache.
13082
13083 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13084
13085         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13086         i386_darwin_store_inferior_registers): Use ptid from regcache.
13087
13088 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13089
13090         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13091         i386bsd_store_inferior_registers): Use ptid from regcache.
13092
13093 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13094
13095         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13096         hppaobsd_store_registers): Use ptid from regcache.
13097
13098 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13099
13100         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13101         hppanbsd_store_registers): Use ptid from regcache.
13102
13103 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13104
13105         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13106         from regcache.  Use get_ptrace_pid.
13107
13108 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13109
13110         * corelow.c (get_core_register_section): Use ptid from regcache,
13111         update doc.
13112
13113 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13114
13115         * bsd-uthread.c (bsd_uthread_fetch_registers,
13116         bsd_uthread_store_registers): Use ptid from regcache, set and
13117         restore inferior_ptid.
13118
13119 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13120
13121         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13122         fetch_fp_regs, store_register, store_regs, store_fp_register,
13123         store_fp_regs): Use ptid from regcache.
13124
13125 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13126
13127         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13128         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13129         store_vfp_regs): Use ptid from regcache.
13130
13131 2017-03-17  Pedro Alves  <palves@redhat.com>
13132
13133         PR remote/21188
13134         * ser-base.c (ser_base_wait_for): Add comment.
13135         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13136         version.
13137         * ser-unix.c (hardwire_raw): Remove reference to
13138         scb->current_timeout.
13139         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13140         (hardwire_ops): Install ser_base_readchar instead of
13141         hardwire_readchar.
13142         * serial.h (struct serial) <current_timeout, timeout_remaining>:
13143         Remove fields.
13144
13145 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
13146
13147         PR gdb/19637
13148         * python/lib/gdb/printer/bound_registers.py: Add support for
13149         Python 3.
13150
13151 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13152
13153         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13154         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13155         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13156         byte_offset to subobj_byte_offset.  Fix the handling of
13157         DWARF_VALUE_STACK on big-endian targets when coming via an
13158         implicit pointer.
13159         (dwarf2_evaluate_loc_desc): Adjust call to
13160         dwarf2_evaluate_loc_desc_full.
13161         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13162         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13163
13164 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13165
13166         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13167         and REVSH instructions.
13168
13169 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13170
13171         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13172         (arm_record_test): Declare.
13173         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13174         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13175         align with the manual.
13176         (thumb_record_misc): Adjust the code order to align with the
13177         manual.
13178         (thumb2_record_decode_insn_handler): Fix instruction matching.
13179         (instruction_reader_thumb): New class.
13180         (arm_record_test): New function.
13181
13182 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13183
13184         * arm-tdep.c (abstract_memory_reader): New class.
13185         (instruction_reader): New class.
13186         (extract_arm_insn): Add argument 'reader'.  Callers updated.
13187         (decode_insn): Likewise.
13188
13189 2017-03-16  Doug Evans  <dje@google.com>
13190
13191         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13192         member.  Change type of TYPE member to SCM.  All uses updated.
13193         (lsscm_make_lazy_string_smob): Add assert.
13194         (lsscm_make_lazy_string): Flag bad length values.
13195         (lsscm_elt_type): New function.
13196         (gdbscm_lazy_string_to_value): Rewrite to use
13197         lsscm_safe_lazy_string_to_value.
13198         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13199         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13200         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
13201         in incoming type.
13202         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13203         * guile/scm-type.c (tyscm_scm_to_type): New function.
13204
13205 2017-03-15  Doug Evans  <dje@google.com>
13206
13207         PR python/17728, python/18439, python/18779
13208         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13209         member.  Change type of TYPE member to PyObject *.  All uses updated.
13210         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13211         (gdbpy_create_lazy_string_object): Flag bad length values.
13212         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13213         Handle typedefs in incoming type.
13214         (stpy_lazy_string_elt_type): New function.
13215         (gdbpy_extract_lazy_string): Call it.
13216         * python/py-value.c (valpy_lazy_string): Flag bad length values.
13217         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
13218         typedefs in incoming type.
13219
13220 2017-03-16  Doug Evans  <dje@google.com>
13221
13222         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13223         * guile/scm-type.c (tyscm_scm_to_type): New function.
13224
13225 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
13226
13227         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13228         "ULONGEST" for "skip".
13229
13230 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13231
13232         PR gdb/21220
13233         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13234         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13235         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
13236         over ptrace peek/poke until end of buffer or error.
13237
13238 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
13239
13240         * parse.c (length_of_subexp): Make static.
13241         * parser-defs.h (length_of_subexp): Remove.
13242
13243 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13244
13245         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13246         as well.
13247
13248 2017-03-14  Pedro Alves  <palves@redhat.com>
13249
13250         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13251         (main): Use std::unique_ptr.  Remove calls to
13252         cp_demangled_name_parse_free.
13253
13254 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13255
13256         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13257         alphabsd_store_inferior_registers): Use regcache->ptid instead
13258         of inferior_ptid.
13259
13260 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13261
13262         * aix-thread.c (aix_thread_fetch_registers,
13263         aix_thread_store_registers): Use regcache->ptid instead of
13264         inferior_ptid.
13265
13266 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13267
13268         * aarch64-linux-nat.c (fetch_gregs_from_thread,
13269         store_gregs_to_thread, fetch_fpregs_from_thread,
13270         store_fpregs_to_thread): Use regcache->ptid instead of
13271         inferior_ptid.
13272
13273 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13274
13275         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13276         amd64_linux_fetch_inferior_registers): Use regcache->ptid
13277         instead of inferior_ptid.
13278
13279 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13280
13281         * target.c (target_fetch_registers, target_store_registers): Add
13282         assert.
13283
13284 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13285
13286         * regcache.h (regcache_get_ptid): New function.
13287         * regcache.c (regcache_get_ptid): New function.
13288
13289 2017-03-13  Mark Wielaard  <mark@klomp.org>
13290
13291         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13292
13293 2017-03-10  Keith Seitz  <keiths@redhat.com>
13294
13295         PR c++/8218
13296         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13297
13298 2017-03-08  Pedro Alves  <palves@redhat.com>
13299
13300         PR gdb/18360
13301         * infrun.c (start_step_over, do_target_resume, resume)
13302         (restart_threads): Assert we're not resuming a thread that is
13303         meant to be stopped.
13304         (infrun_thread_stop_requested_callback): Delete.
13305         (infrun_thread_stop_requested): If the thread is internally
13306         stopped, queue a pending stop event and clear the thread's
13307         inline-frame state.
13308         (handle_stop_requested): New function.
13309         (handle_syscall_event, handle_inferior_event_1): Use
13310         handle_stop_requested.
13311         (handle_stop_requested): New function.
13312         (handle_signal_stop): Set the thread's stop_signal here instead of
13313         at caller.
13314         (finish_step_over): Clear step over info unconditionally.
13315         (handle_signal_stop): If the user had interrupted the event
13316         thread, consider the stop a random signal.
13317         (handle_signal_stop) <signal arrived while stepping over
13318         breakpoint>: Don't restart threads here.
13319         (stop_waiting): Don't clear step-over info here.
13320
13321 2017-03-08  Pedro Alves  <palves@redhat.com>
13322
13323         PR 21206
13324         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13325         goes to argument 2, not 1.
13326
13327 2017-03-08  Pedro Alves  <palves@redhat.com>
13328
13329         PR cli/21218
13330         * top.c (gdb_readline_wrapper): Avoid passing NULL to
13331         display_gdb_prompt.
13332         (command_line_input): Add comment.
13333
13334 2017-03-08  Pedro Alves  <palves@redhat.com>
13335
13336         PR tui/21216
13337         * tui/tui-file.c (tui_file::write): New.
13338         * tui/tui-file.h (tui_file): Override "write".
13339         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13340         factored out from ...
13341         (tui_puts): ... here.
13342         (tui_putc): Use them.
13343         (tui_write): New function.
13344         * tui/tui-io.h (tui_write): Declare.
13345
13346 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
13347
13348         * Makefile.in (SFILES): Replace "environ.c" with
13349         "common/environ.c".
13350         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13351         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
13352         to...
13353         * common/environ.c: ... here.
13354         * environ.h: Moved to...
13355         * common/environ.h: ... here.
13356
13357 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13358
13359         * gdbarch.sh (pstring_ptr): New static function.
13360         (gdbarch_disassembler_options): Use it.
13361         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13362         not valid_disassembler_option->name.
13363         * gdbarch.c: Regenerate.
13364
13365 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13366
13367         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13368
13369 2017-03-07  Pedro Alves  <palves@redhat.com>
13370
13371         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13372
13373 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13374
13375         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13376         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13377         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13378         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13379
13380 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
13381
13382         * xtensa-linux-nat.c (fetch_gregs): Remove const.
13383
13384 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
13385
13386         * remote.c (remote_add_target_side_commands): Use range-based
13387         for loop.
13388
13389 2017-03-03  Yao Qi  <yao.qi@linaro.org>
13390
13391         PR gdb/21165
13392         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13393         value is lazy.
13394         * valprint.c (common_val_print): Likewise.
13395
13396 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
13397
13398         * NEWS: Mention new set/show disassembler-options commands.
13399         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13400         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13401         (prospective_options): New static variable.
13402         (gdb_disassembler::gdb_disassembler): Initialize
13403         m_di.disassembler_options.
13404         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13405         (get_disassembler_options): New function.
13406         (set_disassembler_options): Likewise.
13407         (set_disassembler_options_sfunc): Likewise.
13408         (show_disassembler_options_sfunc): Likewise.
13409         (disassembler_options_completer): Likewise.
13410         (_initialize_disasm): Likewise.
13411         * disasm.h (get_disassembler_options): New prototype.
13412         (set_disassembler_options): Likewise.
13413         * gdbarch.sh (gdbarch_disassembler_options): New variable.
13414         (gdbarch_verify_disassembler_options): Likewise.
13415         * gdbarch.c: Regenerate.
13416         * gdbarch.h: Likewise.
13417         * arm-tdep.c (num_disassembly_options): Delete.
13418         (set_disassembly_style): Likewise.
13419         (arm_disassembler_options): New static variable.
13420         (set_disassembly_style_sfunc): Convert short style name into long
13421         option name.  Call set_disassembler_options.
13422         (show_disassembly_style_sfunc): New function.
13423         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13424         set_gdbarch_verify_disassembler_options.
13425         (_initialize_arm_tdep): Delete regnames variable and update callers.
13426         (arm_disassembler_options): Initialize.
13427         (disasm_options): New variable.
13428         (num_disassembly_options): Rename from this...
13429         (num_disassembly_styles): ...to this.  Compute by scanning through
13430         disasm_options.
13431         (valid_disassembly_styles): Initialize using disasm_options.
13432         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13433         set_arm_regname_option.
13434         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13435         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13436         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13437         set_gdbarch_verify_disassembler_options.
13438         * s390-tdep.c (s390_disassembler_options): New static variable.
13439         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13440         set_gdbarch_verify_disassembler_options.
13441
13442 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13443
13444         * remote.c (remote_add_target_side_condition): Remove "struct"
13445         keyword from range-based for loop.
13446
13447 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13448
13449         * remote.c (remote_add_target_side_condition): Use range-based
13450         for loop.  Update comment.
13451
13452 2017-02-27  Yao Qi  <yao.qi@linaro.org>
13453
13454         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13455
13456 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
13457
13458         * regcache.c (regcache_raw_update): New function.
13459         (regcache_raw_read): Move code to regcache_raw_update.
13460         * regcache.h (regcache_raw_update): New declaration.
13461         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13462
13463 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
13464
13465         * dwarf2read.c (create_debug_type_hash_table): Initialize
13466         header.signature and header.type_offset_in_tu.
13467
13468 2017-02-24  Pedro Alves  <palves@redhat.com>
13469
13470         * symtab.c (make_file_symbol_completion_list_1): Use
13471         add_symtab_completions.
13472
13473 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13474
13475         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13476
13477 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13478
13479         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13480         I386_MAX_REGISTER_SIZE.
13481         (i386_pseudo_register_write): Likewise.
13482         (i386_process_record): Likewise.
13483         * i387-tdep.c (i387_supply_xsave): Likewise.
13484         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13485         (store_register): Likewise.
13486
13487 2017-02-23  Pedro Alves  <palves@redhat.com>
13488
13489         * ada-lang.c: Include "common/function-view.h".
13490         (ada_iterate_over_symbols): Adjust to use function_view as
13491         callback type.
13492         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13493         (ada_make_symbol_completion_list): Use a lambda.
13494         (ada_exc_search_name_matches): Delete.
13495         (name_matches_regex): New.
13496         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13497         * compile/compile-c-support.c: Include "common/function-view.h".
13498         (print_one_macro): Change prototype to accept a ui_file pointer.
13499         (write_macro_definitions): Use a lambda.
13500         * dwarf2read.c: Include "common/function-view.h".
13501         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13502         (dw2_expand_symtabs_matching): Adjust to use function_view as
13503         callback type.
13504         * language.h: Include "common/function-view.h".
13505         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13506         function_view as callback type.
13507         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13508         * linespec.c: Include "common/function-view.h".
13509         (collect_info::add_symbol): New method.
13510         (struct symbol_and_data_callback, iterate_inline_only, struct
13511         symbol_matcher_data, iterate_name_matcher): Delete.
13512         (iterate_over_all_matching_symtabs): Adjust to use function_view
13513         as callback type and lambdas.
13514         (iterate_over_file_blocks): Adjust to use function_view as
13515         callback type.
13516         (decode_compound_collector): Now a class with private fields.
13517         (decode_compound_collector::release_symbols): New method.
13518         (collect_one_symbol): Rename to...
13519         (decode_compound_collector::operator()): ... this and adjust.
13520         (lookup_prefix_sym): decode_compound_collector construction bits
13521         move to decode_compound_collector ctor.  Pass the
13522         decode_compound_collector object directly as callback.  Remove
13523         cleanups and use decode_compound_collector::release_symbols
13524         instead.
13525         (symtab_collector): Now a class with private fields.
13526         (symtab_collector::release_symtabs): New method.
13527         (add_symtabs_to_list): Rename to...
13528         (symtab_collector::operator()): ... this and adjust.
13529         (collect_symtabs_from_filename): symtab_collector construction
13530         bits move to symtab_collector ctor.  Pass the symtab_collector
13531         object directly as callback.  Remove cleanups and use
13532         symtab_collector::release_symtabs instead.
13533         (collect_symbols): Delete.
13534         (add_matching_symbols_to_info): Use lambdas.
13535         * macrocmd.c (print_macro_callback): Delete.
13536         (info_macro_command): Use a lambda.
13537         (info_macros_command): Pass print_macro_definition as callable
13538         directly.
13539         (print_one_macro): Remove 'ignore' parameter.
13540         (macro_list_command): Adjust.
13541         * macrotab.c (macro_for_each_data::fn): Now a function_view.
13542         (macro_for_each_data::user_data): Delete field.
13543         (foreach_macro): Adjust to call the function_view.
13544         (macro_for_each): Adjust to use function_view as callback type.
13545         (foreach_macro_in_scope): Adjust to call the function_view.
13546         (macro_for_each_in_scope): Adjust to use function_view as callback
13547         type.
13548         * macrotab.h: Include "common/function-view.h".
13549         (macro_callback_fn): Declare a prototype instead of a pointer.
13550         Remove "user_data" parameter.
13551         (macro_for_each, macro_for_each_in_scope): Adjust to use
13552         function_view as callback type.
13553         * psymtab.c (partial_map_expand_apply)
13554         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13555         Adjust to use function_view as callback type and to return bool.
13556         (psym_expand_symtabs_matching): Adjust to use function_view as
13557         callback types.
13558         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13559         to use function_view as callback type and to return bool.
13560         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13561         callback types.
13562         * symfile.c (expand_symtabs_matching): Adjust to use function_view
13563         as callback types.
13564         * symfile.h: Include "common/function-view.h".
13565         (expand_symtabs_file_matcher_ftype)
13566         (expand_symtabs_symbol_matcher_ftype)
13567         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13568         return bool.
13569         (quick_symbol_functions::map_symtabs_matching_filename)
13570         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13571         function_view as callback type and return bool.
13572         (expand_symtabs_matching): Adjust to use function_view as callback
13573         type.
13574         (maintenance_expand_name_matcher)
13575         (maintenance_expand_file_matcher): Delete.
13576         (maintenance_expand_symtabs): Use lambdas.
13577         * symtab.c (iterate_over_some_symtabs): Adjust to use
13578         function_view as callback types and return bool.
13579         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
13580         of a cleanup.
13581         (lookup_symtab_callback): Delete.
13582         (lookup_symtab): Use a lambda.
13583         (iterate_over_symbols): Adjust to use function_view as callback
13584         type.
13585         (struct search_symbols_data, search_symbols_file_matches)
13586         (search_symbols_name_matches): Delete.
13587         (search_symbols): Use a pair of lambdas.
13588         (struct add_name_data, add_macro_name, symbol_completion_matcher)
13589         (symtab_expansion_callback): Delete.
13590         (default_make_symbol_completion_list_break_on_1): Use lambdas.
13591         * symtab.h: Include "common/function-view.h".
13592         (iterate_over_some_symtabs): Adjust to use function_view as
13593         callback type and return bool.
13594         (iterate_over_symtabs): Adjust to use function_view as callback
13595         type.
13596         (symbol_found_callback_ftype): Remove 'data' parameter and return
13597         bool.
13598         (iterate_over_symbols): Adjust to use function_view as callback
13599         type.
13600
13601 2017-02-23  Pedro Alves  <palves@redhat.com>
13602
13603         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
13604         (%.o) <unittests/%.c>: New pattern.
13605         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
13606         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
13607         * common/function-view.h: New file.
13608         * unittests/function-view-selftests.c: New file.
13609         * configure: Regenerate.
13610
13611 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
13612
13613         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
13614         inferior_ptid.
13615         * go32-nat.c (go32_thread_alive): Likewise.
13616
13617 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13618
13619         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
13620         delete.
13621
13622 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13623
13624         * varobj.c (varobj_clear_saved_item): Use delete instead of
13625         xfree.
13626         (update_dynamic_varobj_children): Likewise.
13627
13628 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13629
13630         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
13631
13632 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
13633
13634         * common/enum-flags.h (enum_flags::enum_flags): Initialize
13635         m_enum_value to 0 in default constructor.
13636
13637 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
13638
13639         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
13640         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
13641         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
13642         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
13643         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
13644         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
13645         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
13646         IS_STORE_CONDITIONAL_INSN.
13647
13648 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13649
13650         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
13651
13652 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13653
13654         * NEWS (Changes since GDB 7.12): Add DWARF-5.
13655
13656 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13657
13658         * dwarf2read.c (skip_one_die, read_attribute_value)
13659         (dwarf2_const_value_attr, dump_die_shallow)
13660         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
13661         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
13662
13663 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13664
13665         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
13666         (dwarf_parse_macro_header): Accept DWARF version 5.
13667         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
13668
13669 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13670
13671         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
13672         DW_AT_GNU_*.
13673         * common/common-exceptions.h (enum errors): Likewise.
13674         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
13675         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
13676         (dwarf_expr_context::execute_stack_op): Likewise.
13677         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
13678         Likewise.
13679         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
13680         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
13681         (show_entry_values_debug, call_site_to_target_addr)
13682         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
13683         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
13684         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
13685         (value_of_dwarf_block_entry, indirect_pieced_value)
13686         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
13687         (disassemble_dwarf_expression): Likewise.
13688         * dwarf2read.c (process_die, inherit_abstract_dies)
13689         (read_call_site_scope): Likewise.
13690         * gdbtypes.h (struct func_type, struct call_site_parameter)
13691         (struct call_site): Likewise.
13692         * stack.c (read_frame_arg): Likewise.
13693         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
13694
13695 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13696
13697         * defs.h (read_unsigned_leb128): New declaration.
13698         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
13699         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
13700         (dwarf2_find_location_expression): Call also
13701         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
13702         * dwarf2loc.h (dwarf2_version): New declaration.
13703         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
13704         rnglists.
13705         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
13706         .debug_rnglists.
13707         (struct dwop_section_names): Add loclists_dwo.
13708         (dwop_section_names): Add .debug_loclists.dwo.
13709         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
13710         (struct dwarf2_per_cu_data): Add dwarf_version.
13711         (struct dwo_sections): Add loclists.
13712         (struct attr_abbrev): Add implicit_const.
13713         (read_indirect_line_string): New declaration.
13714         (read_unsigned_leb128): Delete declaration.
13715         (rcuh_kind): New definition.
13716         (read_and_check_comp_unit_head): Change parameter
13717         is_debug_types_section to section_kind.
13718         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
13719         (read_comp_unit_head): Change parameter abfd to section, add parameter
13720         section_kind.  Handle DWARF-5.
13721         (error_check_comp_unit_head): Accept also DWARF version 5.
13722         (read_and_check_comp_unit_head): Change parameter
13723         is_debug_types_section to section_kind.
13724         (read_and_check_type_unit_head): Delete function.
13725         (read_abbrev_offset): Handle DWARF-5.
13726         (create_debug_type_hash_table): Add parameter section_kind.  Process
13727         only DW_UT_type.  Use signature and type_offset_in_tu from struct
13728         comp_unit_head.
13729         (create_debug_types_hash_table): Update create_debug_type_hash_table
13730         caller.
13731         (create_all_type_units): Call create_debug_type_hash_table.
13732         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
13733         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13734         caller.
13735         (skip_one_die): Handle DW_FORM_implicit_const.
13736         (dwarf2_rnglists_process): New function.
13737         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13738         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13739         (read_attribute_value): Handle DW_FORM_implicit_const,
13740         DW_FORM_line_strp.
13741         (read_attribute): Handle DW_FORM_implicit_const.
13742         (read_indirect_string_at_offset_from): New function from
13743         read_indirect_string_at_offset.
13744         (read_indirect_string_at_offset): Call
13745         read_indirect_string_at_offset_from.
13746         (read_indirect_line_string_at_offset): New function.
13747         (read_indirect_string): New function comment.
13748         (read_indirect_line_string): New function.
13749         (read_unsigned_leb128): Make it global.
13750         (dwarf2_string_attr): Handle DWARF-5.
13751         (add_include_dir_stub, read_formatted_entries): New functions.
13752         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
13753         Handle DWARF-5.
13754         (per_cu_header_read_in): Update read_comp_unit_head caller.
13755         (dwarf2_version): New function.
13756         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
13757         rnglists.
13758         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
13759         fields.
13760
13761 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13762
13763         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
13764
13765 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13766
13767         * dwarf2read.c (dwarf2_ranges_process): New function from
13768         dwarf2_ranges_read.
13769         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
13770         dwarf2_ranges_process.
13771
13772 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13773
13774         * dwarf2read.c (create_debug_type_hash_table): New function from
13775         create_debug_types_hash_table.
13776         (create_debug_types_hash_table): Call create_debug_type_hash_table.
13777         (create_all_type_units, open_and_init_dwo_file): Update
13778         create_debug_types_hash_table callers.
13779
13780 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13781
13782         PR gdb/16188
13783         * fork-child.c (trace_start_error): Fix thinko.  va_end should
13784         refer to 'ap', not 'args'.
13785
13786 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13787             Pedro Alves  <palves@redhat.com>
13788
13789         PR gdb/16188
13790         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
13791         calls succeeded.
13792         * fork-child.c (trace_start_error): New function.
13793         (trace_start_error_with_name): Likewise.
13794         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
13795         * inf-ptrace.c (inf_ptrace_me): Likewise.
13796         * inferior.h (trace_start_error): New prototype.
13797         (trace_start_error_with_name): Likewise.
13798
13799 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
13800
13801         PR gdb/21164
13802         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
13803         NULL before using it.
13804         * symmisc.c (maintenance_print_symbols): Likewise.
13805         (maintenance_print_msymbols): Likewise.
13806
13807 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13808
13809         * NEWS: Add record Python bindings entry.
13810
13811 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13812
13813         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
13814         py-record-full.o.
13815         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
13816         * python/py-record-btrace.c, python/py-record-btrace.h,
13817         python/py-record-full.c, python/py-record-full.h: New file.
13818         * python/py-record.c: Add include for py-record-btrace.h and
13819         py-record-full.h.
13820         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
13821         recpy_instruction_history, recpy_function_call_history, recpy_begin,
13822         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
13823         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
13824         New definition.
13825         (gdbpy_initialize_btrace): New export.
13826         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
13827
13828 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13829
13830         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
13831         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
13832         * python/py-record.c: New file.
13833         * python/python-internal.h (gdbpy_start_recording,
13834         gdbpy_current_recording, gdpy_stop_recording,
13835         gdbpy_initialize_record): New export.
13836         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
13837         (python_GdbMethods): Add gdbpy_start_recording,
13838         gdbpy_current_recording and gdbpy_stop_recording.
13839
13840 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13841
13842         * record-btrace.c (record_btrace_record_method): New function.
13843         (init_record_btrace_ops): Initialize to_record_method.
13844         * record-full.c (record_full_record_method): New function.
13845         (init_record_full_ops, init_record_full_core_ops): Add
13846         record_full_record_method.
13847         * record.h (enum record_method): New enum.
13848         * target-debug.h (target_debug_print_enum_record_method: New define.
13849         * target-delegates.c: Regenerate.
13850         * target.c (target_record_method): New function.
13851         * target.h: Include record.h.
13852         (struct target_ops) <to_record_method>: New field.
13853         (target_record_method): New export.
13854
13855 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13856
13857         * record.h (record_start, record_stop): New export.
13858         * record.c (record_start, record_stop): New function.
13859
13860 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13861
13862         * btrace.c (btrace_fetch): Copy function call segments pointer
13863         into a vector.
13864         (btrace_clear): Clear the vector.
13865         (btrace_find_insn_by_number): Use binary search to find the correct
13866         function call segment.
13867         * btrace.h (brace_fun_p): New typedef.
13868         (struct btrace_thread_info) <functions>: New field.
13869
13870 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13871
13872         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
13873         * btrace.c (btrace_decode_error): ... here.  New function.
13874         * btrace.h (btrace_decode_error): New export.
13875
13876 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13877
13878         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
13879         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
13880         btrace_find_insn_by_number): Remove special case for gaps.
13881         * btrace.h (btrace_insn_get_error): New export.
13882         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
13883         * record-btrace.c (btrace_insn_history): Print number for gaps.
13884         (record_btrace_info, record_btrace_goto): Handle gaps.
13885
13886 2017-02-14  Tom Tromey  <tom@tromey.com>
13887
13888         PR python/13598:
13889         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
13890         event.
13891         * python/py-evts.c (gdbpy_initialize_py_events): Add
13892         before_prompt registry.
13893         * python/py-events.h (events_object) <before_prompt>: New field.
13894
13895 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
13896
13897         * btrace.c (ftrace_new_switch): Preserve up link and flags.
13898
13899 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
13900
13901         * symfile (_initialize_symfile): Add usage text to the load command's
13902         help text.
13903
13904 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
13905
13906         * utils.c (defaulted_query): Don't query on secondary UIs.
13907
13908 2017-02-10  Tom Tromey  <tom@tromey.com>
13909
13910         * rust-lang.c (rust_get_disr_info): Remove unused variable.
13911
13912 2017-02-10  Tom Tromey  <tom@tromey.com>
13913
13914         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
13915         "cleanup" local.
13916         * python/py-type.c (typy_legacy_template_argument): Remove
13917         unnecessary "cleanup" local.
13918
13919 2017-02-10  Tom Tromey  <tom@tromey.com>
13920
13921         * python/python.c (do_start_initialization): New function, from
13922         _initialize_python.
13923         (_initialize_python): Call do_start_initialization.
13924         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
13925         goto.
13926
13927 2017-02-10  Tom Tromey  <tom@tromey.com>
13928
13929         * python/py-prettyprint.c (pretty_print_one_value): Use
13930         gdbpy_ref.
13931
13932 2017-02-10  Tom Tromey  <tom@tromey.com>
13933
13934         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
13935         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
13936         gdbpy_ref.
13937         * python/py-type.c (field_new): Use gdbpy_ref.
13938         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
13939         gdbpy_ref.
13940         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
13941         (py_free_pspace): Likewise.
13942         (pspace_to_pspace_object): Likewise.
13943         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
13944         (py_free_objfile): Likewise.
13945         (objfile_to_objfile_object): Likewise.
13946         * python/py-inferior.c (delete_thread_object): Use
13947         gdbpy_ref.
13948         (infpy_read_memory): Likewise.
13949         (py_free_inferior): Likewise.
13950         * python/py-evtregistry.c (create_eventregistry_object): Use
13951         gdbpy_ref.
13952         * python/py-event.c (create_event_object): Use gdbpy_ref.
13953
13954 2017-02-10  Tom Tromey  <tom@tromey.com>
13955
13956         * python/py-ref.h (gdbpy_ref_policy): Now a template.
13957         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
13958         used.
13959         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
13960         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
13961         python/py-exitedevent.c, python/py-finishbreakpoint.c,
13962         python/py-framefilter.c, python/py-function.c,
13963         python/py-inferior.c, python/py-infevents.c,
13964         python/py-linetable.c, python/py-newobjfileevent.c,
13965         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
13966         python/py-signalevent.c, python/py-stopevent.c,
13967         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
13968         python/py-unwind.c, python/py-utils.c, python/py-value.c,
13969         python/py-varobj.c, python/py-xmethods.c, python/python.c,
13970         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
13971
13972 2017-02-10  Tom Tromey  <tom@tromey.com>
13973
13974         * ui-out.h (ui_out_emit_type): New class.
13975         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
13976         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
13977         and ui_out_emit_tuple.
13978         (enumerate_locals): Likewise.
13979         (py_mi_print_variables, py_print_locals, py_print_args): Use
13980         ui_out_emit_list.
13981         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
13982         ui_out_emit_list.
13983         * common/gdb_optional.h: New file.
13984
13985 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
13986
13987         * MAINTAINERS (Write After Approval): Update my e-mail address.
13988
13989 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
13990
13991         PR gdb/21122
13992         * breakpoint.c (_initialize_breakpoint): Update the help description
13993         of the 'commands' command to indicate that it takes a list argument.
13994
13995 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
13996
13997         * interps.c (current_interp_set_logging): Remove "return".
13998
13999 2017-02-09  Gary Benson  <gbenson@redhat.com>
14000
14001         * symtab.c (add_symtab_completions): Prevent NULL pointer
14002         dereference.
14003
14004 2017-02-08  Pedro Alves  <palves@redhat.com>
14005
14006         * interps.c (interp::interp): Remove reference to quiet_p.
14007         (interp_set): Make static.  Remove dead "Switching to" output
14008         code.
14009         (interp_quiet_p, interp_set_quiet): Delete.
14010         (interpreter_exec_cmd): Don't set the interpreter quiet.
14011         * interps.h (interp_quiet_p): Make static.
14012         (class interp) <quiet_p>: Remove field
14013
14014 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14015
14016         * cli/cli-decode.c (find_command_name_length): Make it extern.
14017         * cli/cli-decode.h (find_command_name_length): Declare.
14018         * cli/cli-script.c (command_name_equals, line_first_arg):
14019         New functions.
14020         (process_next_line): Use cli-decode to parse command names.
14021         (build_command_line): Make args a constant pointer.
14022
14023 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14024
14025         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14026         Remove case-insensitive search.
14027
14028 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
14029
14030         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14031         at the end of the line.  Avoids an ARI warning.
14032
14033 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
14034
14035         * NEWS: Mention support for record/replay of Intel 64 rdrand and
14036         rdseed instructions.
14037         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14038
14039 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
14040
14041         PR tdep/20936
14042         Provide and use sparc32 and sparc64 target description XML files.
14043         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14044         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14045         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14046         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14047         * features/sparc/sparc32-solaris.xml: New file.
14048         * features/sparc/sparc64-solaris.xml: New file.
14049         * features/sparc/sparc32-solaris.c: Generated.
14050         * features/sparc/sparc64-solaris.c: Generated.
14051         * sparc-tdep.h: Account for differences in target descriptions.
14052         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14053         (sparc32_register_type): Use target provided registers.
14054         (validate_tdesc_registers): New function.
14055         (sparc32_gdbarch_init): Use tdesc_has_registers.
14056         Set pseudoregister functions.
14057         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14058         (sparc64_register_type): Use target provided registers.
14059         (sparc64_init_abi): Set pseudoregister functions.
14060
14061 2017-02-03  Tom Tromey  <tom@tromey.com>
14062
14063         PR rust/21097:
14064         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14065         with a single member.
14066
14067 2017-02-03  Pedro Alves  <palves@redhat.com>
14068
14069         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14070         (cli_interp_base::~cli_interp_base): New.
14071         (cli_interp): New struct.
14072         (as_cli_interp): Cast the interp itself to cli_interp.
14073         (cli_interpreter_pre_command_loop): Rename to ...
14074         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
14075         parameter.
14076         (cli_interpreter_init): Rename to ...
14077         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
14078         boolean.  Make extern.
14079         (cli_interpreter_resume): Rename to ...
14080         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
14081         extern.
14082         (cli_interpreter_suspend): Rename to ...
14083         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
14084         extern.
14085         (cli_interpreter_exec): Rename to ...
14086         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
14087         extern.
14088         (cli_interpreter_supports_command_editing): Rename to ...
14089         (cli_interp_base::supports_command_editing): ... this.  Remove
14090         'interp' parameter.  Make extern.
14091         (cli_ui_out): Rename to ...
14092         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
14093         Make extern.
14094         (cli_set_logging): Rename to ...
14095         (cli_interp_base::set_logging): ... this.  Remove 'interp'
14096         parameter.  Make extern.
14097         (cli_interp_procs): Delete.
14098         (cli_interp_factory): Adjust to use "new".
14099         * cli/cli-interp.h: Include "interps.h".
14100         (struct cli_interp_base): New struct.
14101         * interps.c (struct interp): Delete.  Fields moved to interps.h.
14102         (interp_new): Delete.
14103         (interp::interp, interp::~interp): New.
14104         (interp_set): Use bool, and return void.  Assume the interpreter
14105         has suspend, init and resume methods, and that the all return
14106         void.
14107         (set_top_level_interpreter): interp_set returns void.
14108         (interp_ui_out): Adapt.
14109         (current_interp_set_logging): Adapt.
14110         (interp_data): Delete.
14111         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14112         (interp_exec): Adapt.
14113         (top_level_interpreter_data): Delete.
14114         * interps.h (interp_init_ftype, interp_resume_ftype)
14115         (interp_suspend_ftype, interp_exec_ftype)
14116         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14117         (class interp): New.
14118         (interp_new): Delete.
14119         (interp_set): Now returns void.  Use bool.
14120         (interp_data, top_level_interpreter_data): Delete.
14121         * mi/mi-common.h: Include interps.h.
14122         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
14123         init, resume, suspect, exec, interp_ui_out, set_logging and
14124         pre_command_loop methods.
14125         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14126         (mi_interpreter_init): Rename to ...
14127         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
14128         bool, return void and make extern.  Adjust.
14129         (mi_interpreter_resume): ... Rename to ...
14130         (mi_interp::resume): ... this.  Remove the 'data' parameter,
14131         return void and make extern.  Adjust.
14132         (mi_interpreter_suspend): ... Rename to ...
14133         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
14134         return void and make extern.  Adjust.
14135         (mi_interpreter_exec): ... Rename to ...
14136         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
14137         extern.  Adjust.
14138         (mi_interpreter_pre_command_loop): ... Rename to ...
14139         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
14140         parameter and make extern.
14141         (mi_on_normal_stop_1): Adjust.
14142         (mi_ui_out): Rename to ...
14143         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
14144         parameter and make extern.  Adjust.
14145         (mi_set_logging): Rename to ...
14146         (mi_interp::set_logging): ... this.  Remove the 'interp'
14147         parameter and make extern.  Adjust.
14148         (mi_interp_procs): Delete.
14149         (mi_interp_factory): Adjust to use 'new'.
14150         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14151         (mi_print_exception, mi_execute_command, mi_load_progress):
14152         Adjust.
14153         * tui/tui-interp.c (tui_interp): New class.
14154         (as_tui_interp): Return a tui_interp pointer.
14155         (tui_on_normal_stop, tui_on_signal_received)
14156         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14157         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14158         to use interp::interp_ui_out.
14159         (tui_init): Rename to ...
14160         (tui_interp::init): ... this.  Remove the 'self' parameter, use
14161         bool, return void and make extern.  Adjust.
14162         (tui_resume): Rename to ...
14163         (tui_interp::resume): ... this.  Remove the 'data' parameter,
14164         return void and make extern.  Adjust.
14165         (tui_suspend): Rename to ...
14166         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
14167         return void and make extern.  Adjust.
14168         (tui_ui_out): Rename to ...
14169         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
14170         parameter, and make extern.  Adjust.
14171         (tui_exec): Rename to ...
14172         (tui_interp::exec): ... this.  Remove the 'data' parameter and
14173         make extern.
14174         (tui_interp_procs): Delete.
14175         (tui_interp_factory): Use "new".
14176
14177 2017-02-02  Tom Tromey  <tom@tromey.com>
14178
14179         * rust-exp.y (ends_raw_string, space_then_number)
14180         (rust_identifier_start_p): Return bool.
14181         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14182         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14183         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14184         (rust_chartype_p): Return bool.
14185         (val_print_struct, rust_print_struct_def, rust_print_type):
14186         Update.
14187         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14188         Return bool.
14189
14190 2017-02-02  Tom Tromey  <tom@tromey.com>
14191
14192         * rust-lang.c: Reindent.
14193
14194 2017-02-02  Tom Tromey  <tom@tromey.com>
14195
14196         * rust-lang.h (rust_crate_for_block): Update.
14197         * rust-lang.c (rust_crate_for_block): Return std::string.
14198         (rust_get_disr_info): Use std:;string, not
14199         gdb::unique_xmalloc_ptr.
14200         * rust-exp.y (crate_name): Update.
14201
14202 2017-02-02  Pedro Alves  <palves@redhat.com>
14203
14204         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14205         field out of gdb_disassembler_test and make it static.
14206
14207 2017-02-02  Pedro Alves  <palves@redhat.com>
14208
14209         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14210         mi1_interp and mi_interp fields.
14211
14212 2017-02-02  Pedro Alves  <palves@redhat.com>
14213
14214         * cli/cli-interp.c (struct saved_output_files, saved_output):
14215         Moved from cli/cli-logging.c.
14216         (cli_set_logging): New function.
14217         (cli_interp_procs): Install cli_set_logging.
14218         * cli/cli-interp.h (make_logging_output, cli_set_logging):
14219         Declare.
14220         * cli/cli-logging.c (struct saved_output_files, saved_output):
14221         Moved to cli/cli-interp.c.
14222         (pop_output_files): Don't save outputs here.
14223         (make_logging_output): New function.
14224         (handle_redirections): Don't build tee nor save previous outputs
14225         here.
14226         * interps.c (current_interp_set_logging): Change prototype.
14227         Assume there's always a set_logging_proc method installed.
14228         * interps.h (interp_set_logging_ftype): Change prototype.
14229         (current_interp_set_logging): Change prototype and adjust comment.
14230         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
14231         use make_logging_output.
14232         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14233 2017-02-02  Pedro Alves  <palves@redhat.com>
14234
14235         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14236         from ...
14237         (set_logging_overwrite): ... here.
14238         (logging_no_redirect_file): Delete.
14239         (set_logging_redirect): Don't handle redirection on the fly.
14240         Instead warn that "logging off" / "logging on" is necessary.
14241         (pop_output_files): Delete references to logging_no_redirect_file.
14242         (show_logging_command): Always speak in terms of what will happen
14243         once logging is reenabled.
14244
14245 2017-02-02  Pedro Alves  <palves@redhat.com>
14246
14247         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14248
14249 2017-02-02  Pedro Alves  <palves@redhat.com>
14250
14251         * disasm.c (gdb_pretty_print_insn): Rename to ...
14252         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14253         Remove gdbarch parameter.  Adapt to clear the object's buffers
14254         instead of allocating new buffers, and to print using the object's
14255         gdb_disassembler instead of calling gdb_print_insn.
14256         (dump_insns): Use gdb_pretty_print_disassembler.
14257         * disasm.h (gdb_pretty_print_insn): Delete declaration.
14258         (gdb_pretty_print_disassembler): New class.
14259         * record-btrace.c (btrace_insn_history): Use
14260         gdb_pretty_print_disassembler.
14261
14262 2017-02-02  Pedro Alves  <palves@redhat.com>
14263
14264         * ada-lang.c (type_as_string): Use string_file.
14265         * ada-valprint.c (ada_print_floating): Use string_file.
14266         * ada-varobj.c (ada_varobj_scalar_image)
14267         (ada_varobj_get_value_image): Use string_file.
14268         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14269         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14270         * breakpoint.c (update_inserted_breakpoint_locations)
14271         (insert_breakpoint_locations, reattach_breakpoints)
14272         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14273         (print_it_watchpoint): Use string_file.
14274         (save_breakpoints): Use stdio_file.
14275         * c-exp.y (oper): Use string_file.
14276         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14277         tee_file.
14278         (pop_output_files): Use delete.
14279         (handle_redirections): Use stdio_file and tee_file.
14280         * cli/cli-setshow.c (do_show_command): Use string_file.
14281         * compile/compile-c-support.c (c_compute_program): Use
14282         string_file.
14283         * compile/compile-c-symbols.c (generate_vla_size): Take a
14284         'string_file &' instead of a 'ui_file *'.
14285         (generate_c_for_for_one_variable): Take a 'string_file &' instead
14286         of a 'ui_file *'.  Use string_file.
14287         (generate_c_for_variable_locations): Take a 'string_file &'
14288         instead of a 'ui_file *'.
14289         * compile/compile-internal.h (generate_c_for_for_one_variable):
14290         Take a 'string_file &' instead of a 'ui_file *'.
14291         * compile/compile-loc2c.c (push, pushf, unary, binary)
14292         (print_label, pushf_register_address, pushf_register)
14293         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14294         'ui_file *'.  Adjust.
14295         * compile/compile.c (compile_to_object): Use string_file.
14296         * compile/compile.h (compile_dwarf_expr_to_c)
14297         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14298         'ui_file *'.
14299         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14300         (replace_typedefs_qualified_name): Use string_file and
14301         obstack_copy0.
14302         * disasm.c (gdb_pretty_print_insn): Use string_file.
14303         (gdb_disassembly): Adjust reference the null_stream global.
14304         (do_ui_file_delete): Delete.
14305         (gdb_insn_length): Use null_stream.
14306         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14307         * dwarf2loc.c (dwarf2_compile_property_to_c)
14308         (locexpr_generate_c_location, loclist_generate_c_location): Take a
14309         'string_file &' instead of a 'ui_file *'.
14310         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14311         * dwarf2read.c (do_ui_file_peek_last): Delete.
14312         (dwarf2_compute_name): Use string_file.
14313         * event-top.c (gdb_setup_readline): Use stdio_file.
14314         * gdbarch.sh (verify_gdbarch): Use string_file.
14315         * gdbtypes.c (safe_parse_type): Use null_stream.
14316         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14317         string_file.
14318         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14319         'string_file *' instead of a 'ui_file *'.
14320         (gdbscm_arch_disassemble): Use string_file.
14321         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14322         * guile/scm-ports.c (class ioscm_file_port): Now a class that
14323         inherits from ui_file.
14324         (ioscm_file_port_delete, ioscm_file_port_rewind)
14325         (ioscm_file_port_put): Delete.
14326         (ioscm_file_port_write): Rename to ...
14327         (ioscm_file_port::write): ... this.  Remove file_port_magic
14328         checks.
14329         (ioscm_file_port_new): Delete.
14330         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14331         ui_file_up.
14332         * guile/scm-type.c (tyscm_type_name): Use string_file.
14333         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14334         Use string_file.
14335         * infcmd.c (print_return_value_1): Use string_file.
14336         * infrun.c (print_target_wait_results): Use string_file.
14337         * language.c (add_language): Use string_file.
14338         * location.c (explicit_to_string_internal): Use string_file.
14339         * main.c (captured_main_1): Use null_file.
14340         * maint.c (maintenance_print_architecture): Use stdio_file.
14341         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14342         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14343         event_channel>: Change type to mi_console_file pointer.
14344         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14345         (mi_console_file_delete): Delete.
14346         (struct mi_console_file): Delete.
14347         (mi_console_file_magic): Delete.
14348         (mi_console_file_new): Delete.
14349         (mi_console_file::mi_console_file): New.
14350         (mi_console_file_delete): Delete.
14351         (mi_console_file_fputs): Delete.
14352         (mi_console_file::write): New.
14353         (mi_console_raw_packet): Delete.
14354         (mi_console_file::flush): New.
14355         (mi_console_file_flush): Delete.
14356         (mi_console_set_raw): Rename to ...
14357         (mi_console_file::set_raw): ... this.
14358         * mi/mi-console.h (class mi_console_file): New class.
14359         (mi_console_file_new, mi_console_set_raw): Delete.
14360         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14361         (mi_set_logging): Use delete and tee_file.  Adjust.
14362         * mi/mi-main.c (output_register): Use string_file.
14363         (mi_cmd_data_evaluate_expression): Use string_file.
14364         (mi_cmd_data_read_memory): Use string_file.
14365         (mi_cmd_execute, print_variable_or_computed): Use string_file.
14366         * mi/mi-out.c (mi_ui_out::main_stream): New.
14367         (mi_ui_out::rewind): Use main_stream and
14368         string_file.
14369         (mi_ui_out::put): Use main_stream and string_file.
14370         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14371         Allocate a 'string_file' instead.
14372         (mi_out_new): Don't allocate a mem_fileopen stream here.
14373         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14374         (mi_ui_out::main_stream): Declare method.
14375         * printcmd.c (eval_command): Use string_file.
14376         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14377         * python/py-arch.c (archpy_disassemble): Use string_file.
14378         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14379         * python/py-frame.c (frapy_str): Use string_file.
14380         * python/py-framefilter.c (py_print_type, py_print_single_arg):
14381         Use string_file.
14382         * python/py-type.c (typy_str): Use string_file.
14383         * python/py-unwind.c (unwind_infopy_str): Use string_file.
14384         * python/py-value.c (valpy_str): Use string_file.
14385         * record-btrace.c (btrace_insn_history): Use string_file.
14386         * regcache.c (regcache_print): Use stdio_file.
14387         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14388         * remote.c (escape_buffer): Use string_file.
14389         * rust-lang.c (rust_get_disr_info): Use string_file.
14390         * serial.c (serial_open_ops_1): Use stdio_file.
14391         (do_serial_close): Use delete.
14392         * stack.c (print_frame_arg): Use string_file.
14393         (print_frame_args): Remove local mem_fileopen stream, not used.
14394         (print_frame): Use string_file.
14395         * symmisc.c (maintenance_print_symbols): Use stdio_file.
14396         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14397         Take a 'string_file *' instead of a 'ui_file *'.
14398         * top.c (new_ui): Use stdio_file and stderr_file.
14399         (free_ui): Use delete.
14400         (execute_command_to_string): Use string_file.
14401         (quit_confirm): Use string_file.
14402         * tracepoint.c (collection_list::append_exp): Use string_file.
14403         * tui/tui-disasm.c (tui_disassemble): Use string_file.
14404         * tui/tui-file.c: Don't include "ui-file.h".
14405         (enum streamtype, struct tui_stream): Delete.
14406         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14407         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14408         (tui_file::tui_file): New method.
14409         (tui_file_fputs): Delete.
14410         (tui_file_get_strbuf): Delete.
14411         (tui_file::puts): New method.
14412         (tui_file_adjust_strbuf): Delete.
14413         (tui_file_flush): Delete.
14414         (tui_file::flush): New method.
14415         * tui/tui-file.h: Tweak intro comment.
14416         Include ui-file.h.
14417         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14418         (tui_file_adjust_strbuf): Delete declarations.
14419         (class tui_file): New class.
14420         * tui/tui-io.c (tui_initialize_io): Use tui_file.
14421         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14422         (tui_register_format): Use string_stream.
14423         * tui/tui-stack.c (tui_make_status_line): Use string_file.
14424         (tui_get_function_from_frame): Use string_file.
14425         * typeprint.c (type_to_string): Use string_file.
14426         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14427         (null_stream): New global.
14428         (ui_file_delete): Delete.
14429         (ui_file::ui_file): New.
14430         (null_file_isatty): Delete.
14431         (ui_file::~ui_file): New.
14432         (null_file_rewind): Delete.
14433         (ui_file::printf): New.
14434         (null_file_put): Delete.
14435         (null_file_flush): Delete.
14436         (ui_file::putstr): New.
14437         (null_file_write): Delete.
14438         (ui_file::putstrn): New.
14439         (null_file_read): Delete.
14440         (ui_file::putc): New.
14441         (null_file_fputs): Delete.
14442         (null_file_write_async_safe): Delete.
14443         (ui_file::vprintf): New.
14444         (null_file_delete): Delete.
14445         (null_file::write): New.
14446         (null_file_fseek): Delete.
14447         (null_file::puts): New.
14448         (ui_file_data): Delete.
14449         (null_file::write_async_safe): New.
14450         (gdb_flush, ui_file_isatty): Adjust.
14451         (ui_file_put, ui_file_rewind): Delete.
14452         (ui_file_write): Adjust.
14453         (ui_file_write_for_put): Delete.
14454         (ui_file_write_async_safe, ui_file_read): Adjust.
14455         (ui_file_fseek): Delete.
14456         (fputs_unfiltered): Adjust.
14457         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14458         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14459         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14460         (set_ui_file_data): Delete.
14461         (string_file::~string_file, string_file::write)
14462         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14463         (do_ui_file_as_string, ui_file_as_string): Delete.
14464         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14465         (struct mem_file): Delete.
14466         (mem_file_new): Delete.
14467         (stdio_file::stdio_file): New.
14468         (mem_file_delete): Delete.
14469         (stdio_file::stdio_file): New.
14470         (mem_fileopen): Delete.
14471         (stdio_file::~stdio_file): New.
14472         (mem_file_rewind): Delete.
14473         (stdio_file::set_stream): New.
14474         (mem_file_put): Delete.
14475         (stdio_file::open): New.
14476         (mem_file_write): Delete.
14477         (stdio_file_magic, struct stdio_file): Delete.
14478         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14479         (stdio_file::flush): New.
14480         (stdio_file_read): Rename to ...
14481         (stdio_file::read): ... this.  Adjust.
14482         (stdio_file_write): Rename to ...
14483         (stdio_file::write): ... this.  Adjust.
14484         (stdio_file_write_async_safe): Rename to ...
14485         (stdio_file::write_async_safe) ... this.  Adjust.
14486         (stdio_file_fputs): Rename to ...
14487         (stdio_file::puts) ... this.  Adjust.
14488         (stdio_file_isatty): Delete.
14489         (stdio_file_fseek): Delete.
14490         (stdio_file::isatty): New.
14491         (stderr_file_write): Rename to ...
14492         (stderr_file::write) ... this.  Adjust.
14493         (stderr_file_fputs): Rename to ...
14494         (stderr_file::puts) ... this.  Adjust.
14495         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14496         (stderr_file::stderr_file): New.
14497         (tee_file_magic): Delete.
14498         (struct tee_file): Delete.
14499         (tee_file::tee_file): New.
14500         (tee_file_new): Delete.
14501         (tee_file::~tee_file): New.
14502         (tee_file_delete): Delete.
14503         (tee_file_flush): Rename to ...
14504         (tee_file::flush): ... this.  Adjust.
14505         (tee_file_write): Rename to ...
14506         (tee_file::write): ... this.  Adjust.
14507         (tee_file::write_async_safe): New.
14508         (tee_file_fputs): Rename to ...
14509         (tee_file::puts): ... this.  Adjust.
14510         (tee_file_isatty): Rename to ...
14511         (tee_file::isatty): ... this.  Adjust.
14512         * ui-file.h (struct obstack, struct ui_file): Don't
14513         forward-declare.
14514         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14515         (ui_file_write_ftype)
14516         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14517         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14518         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14519         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14520         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14521         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14522         (set_ui_file_fseek): Delete.
14523         (ui_file_data, ui_file_delete, ui_file_rewind)
14524         (struct ui_file): New.
14525         (ui_file_up): New.
14526         (class null_file): New.
14527         (null_stream): Declare.
14528         (ui_file_write_for_put, ui_file_put): Delete.
14529         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14530         Delete.
14531         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14532         (gdb_fopen, tee_file_new): Delete.
14533         (struct string_file): New.
14534         (struct stdio_file): New.
14535         (stdio_file_up): New.
14536         (struct stderr_file): New.
14537         (class tee_file): New.
14538         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14539         of a 'ui_file *'.  Adjust.
14540         * ui-out.h (class ui_out) <field_stream>: Likewise.
14541         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14542         (null_stream): Delete.
14543         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14544         Adjust.
14545         * utils.h (struct ui_file): Delete forward declaration..
14546         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14547         (error_stream): Take a 'string_file &' instead of a
14548         'ui_file *'.
14549         * varobj.c (varobj_value_get_print_value): Use string_file.
14550         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14551         * gdbarch.c: Regenerate.
14552
14553 2017-02-02  Pedro Alves  <palves@redhat.com>
14554
14555         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14556         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
14557         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
14558         Adjust to call gdb_print_insn instead of
14559         gdb_disassembler::print_insn.
14560         (dump_insns, do_mixed_source_and_assembly_deprecated)
14561         (do_mixed_source_and_assembly, do_assembly_only): Add back a
14562         'gdbarch' parameter.  Remove gdb_disassembler parameter.
14563         (gdb_disassembly): Don't allocate a gdb_disassembler here.
14564         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14565         declaration.
14566         (gdb_pretty_print_insn): Re-add declaration.
14567         * record-btrace.c (btrace_insn_history): Don't allocate a
14568         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
14569
14570 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
14571
14572         * disasm.h (gdb_disassembly): Remove file_string parameter.
14573         * disasm.c (gdb_disassembly): Likewise.
14574         * cli/cli-cmds.c (print_disassembly): Adapt.
14575         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14576         * stack.c (do_gdb_disassembly): Likewise.
14577
14578 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14579
14580         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14581         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14582         targets.  And if the implicit value is longer than needed, extract
14583         the first bytes instead of the "least significant" ones.
14584
14585 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14586
14587         * btrace.c (btrace_enable): Do not call btrace_add_pc for
14588         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14589         (btrace_fetch): Assert can_access_registers_ptid.
14590         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14591         validate_registers_access.
14592
14593 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14594
14595         * gdbthread.h (can_access_registers_ptid): New.
14596         * thread.c (can_access_registers_ptid): New.
14597
14598 2017-02-01  Pedro Alves  <palves@redhat.com>
14599
14600         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14601
14602 2017-01-31  Pedro Alves  <palves@redhat.com>
14603
14604         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
14605         Fix typos.
14606
14607 2017-01-31  Pedro Alves  <palves@redhat.com>
14608
14609         * stack.c (print_frame_args): Remove local mem_fileopen stream,
14610         not used.
14611
14612 2017-01-31  Pedro Alves  <palves@redhat.com>
14613
14614         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
14615
14616 2017-01-31  Pedro Alves  <palves@redhat.com>
14617
14618         * common/scoped_restore.h
14619         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
14620         change the value's parameter type to T2.
14621         (make_scoped_restore): Likewise.
14622
14623 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14624             Richard Henderson  <rth@redhat.com>
14625
14626         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
14627         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
14628         GS_BASE for older kernels.
14629         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
14630         GS_BASE for older kernels.
14631         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
14632         and GS_BASE to the offset table.
14633         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
14634         system register group.
14635         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
14636         for older kernels.
14637         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
14638         amd64 ABI.
14639         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
14640         AMD64_GSBASE_REGNUM.
14641         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
14642         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
14643         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
14644         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
14645         i386/64bit-segments.xml in those rules.
14646         * features/i386/64bit-segments.xml: New file.
14647         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
14648         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
14649         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
14650         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
14651         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
14652         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
14653         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
14654         * features/i386/amd64-avx-linux.c: Regenerated.
14655         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
14656         * features/i386/amd64-avx-mpx.c: Regenerated.
14657         * features/i386/amd64-avx512-linux.c: Regenerated.
14658         * features/i386/amd64-linux.c: Regenerated.
14659         * features/i386/amd64-mpx-linux.c: Regenerated.
14660         * features/i386/i386-avx-mpx-linux.c: Regenerated.
14661         * features/i386/i386-avx-mpx.c: Regenerated.
14662         * features/i386/x32-avx-linux.c: Regenerated.
14663         * features/i386/x32-avx512-linux.c: Regenerated.
14664         * regformats/i386/amd64-avx-linux.dat: Regenerated.
14665         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
14666         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
14667         * regformats/i386/amd64-linux.dat: Regenerated.
14668         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
14669         * regformats/i386/x32-avx-linux.dat: Regenerated.
14670         * regformats/i386/x32-avx512-linux.dat: Regenerated.
14671         * regformats/i386/x32-linux.dat: Regenerated.
14672
14673 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14674
14675         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
14676         Set to AMD64_NUM_REGS.
14677
14678 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14679
14680         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
14681         that checks validity of a register number.
14682
14683 2017-01-27  Kees Cook  <keescook@google.com>
14684
14685         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
14686         fetch_fpregs if target has fpa registers.
14687         (arm_linux_store_inferior_registers): Call store_fpregs if target
14688         has fpa registers.
14689
14690 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14691
14692         * cris-tdep.c (cris_gdbarch_init): Remove check for
14693         info.byte_order and force it to BFD_ENDIAN_LITTLE.
14694
14695 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
14696
14697         * corelow.c (get_core_register_section): Check for regset
14698         existence before checking for REGSET_VARIABLE_SIZE.
14699
14700 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14701             Pedro Alves  <palves@redhat.com>
14702
14703         PR gdb/20939
14704         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
14705         call memory_error, save memaddr instead.
14706         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
14707         negative, cal memory_error.
14708         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
14709
14710 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14711
14712         * disasm-selftests.c (memory_error_test): New function.
14713         (_initialize_disasm_selftests): Register memory_error_test.
14714
14715 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14716
14717         * Makefile.in (SFILES): Add disasm-selftests.c and
14718         selftest-arch.c.
14719         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
14720         * disasm-selftests.c: New file.
14721         * selftest-arch.c: New file.
14722         * selftest-arch.h: New file.
14723
14724 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14725
14726         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
14727         to bfd_arch_mep.  Don't return 0 if section is not
14728         found.  Call print_insn_mep.
14729
14730 2017-01-26  Pedro Alves  <palves@redhat.com>
14731             Yao Qi  <yao.qi@linaro.org>
14732
14733         * arm-tdep.c: Include "disasm.h".
14734         (gdb_print_insn_arm): Update code to get gdbarch.
14735         * disasm.c (dis_asm_read_memory): Change it to
14736         gdb_disassembler::dis_asm_read_memory.
14737         (dis_asm_memory_error): Likewise.
14738         (dis_asm_print_address): Likewise.
14739         (gdb_pretty_print_insn): Change it to
14740         gdb_disassembler::pretty_print_insn.
14741         (dump_insns): Add one argument gdb_disassemlber.  All
14742         callers updated.
14743         (do_mixed_source_and_assembly_deprecated): Likewise.
14744         (do_mixed_source_and_assembly): Likewise.
14745         (do_assembly_only): Likewise.
14746         (gdb_disassembler::gdb_disassembler): New.
14747         (gdb_disassembler::print_insn): New.
14748         * disasm.h (class gdb_disassembler): New.
14749         (gdb_pretty_print_insn): Remove declaration.
14750         (gdb_disassemble_info): Likewise.
14751         * guile/scm-disasm.c (class gdbscm_disassembler): New.
14752         (gdbscm_disasm_read_memory_worker): Update.
14753         (gdbscm_disasm_read_memory): Update.
14754         (gdbscm_disasm_memory_error): Remove.
14755         (gdbscm_disasm_print_address): Remove.
14756         (gdbscm_disassembler::gdbscm_disassembler): New.
14757         (gdbscm_print_insn_from_port): Update.
14758         * mips-tdep.c: Include disasm.h.
14759         (gdb_print_insn_mips): Update code to get gdbarch.
14760         * record-btrace.c (btrace_insn_history): Update.
14761         * spu-tdep.c: Include disasm.h.
14762         (struct spu_dis_asm_data): Remove.
14763         (struct spu_dis_asm_info): New.
14764         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
14765         SPU id.
14766         (gdb_print_insn_spu): Cast disassemble_info to
14767         spu_dis_asm_info.
14768
14769 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14770
14771         * disasm.c (do_ui_file_delete): Delete.
14772         (gdb_insn_length): Move code creating stream to ...
14773         * utils.c (null_stream): ... here.  New function.
14774         * utils.h (null_stream): Declare.
14775
14776 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
14777
14778         * python/py-inferior.c (find_thread_object): Return directly
14779         from the loop.  Remove "found" variable.
14780
14781 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
14782
14783         GDB 7.12.1 released.
14784
14785 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14786
14787         * python/py-function.c (fnpy_call): Reorder declarations to have
14788         the gdbpy_enter object declared first.
14789         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
14790
14791 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14792
14793         PR python/21068
14794         * python/python-internal.h (PyMem_RawMalloc): Define for
14795         Python < 3.4.
14796         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
14797         PyMem_RawMalloc instead of PyMem_Malloc.
14798
14799 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
14800             Luis Machado  <lgustavo@codesourcery.com>
14801
14802         * NEWS (New commands): Mention flash-erase.
14803         (New MI commands): Mention target-flash-erase.
14804         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
14805         command.
14806         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
14807         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
14808         * target.c (flash_erase_command): New function.
14809         (initialize_targets): Add new flash-erase command.
14810         * target.h (flash_erase_command): New declaration.
14811
14812 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
14813
14814         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
14815         HAVE_SYS_PROCFS_H is defined.
14816
14817 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14818
14819         * remote.c (struct cached_reg): Change data into a pointer.
14820         * (stop_reply_dtr): Free data pointers before deleting vector.
14821         (process_stop_reply): Likewise.
14822         (remote_parse_stop_reply): Allocate space for data
14823
14824 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14825
14826         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
14827         MAX_REGISTER_SIZE.
14828         (amd64_pseudo_register_read_value): Likewise.
14829         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
14830         (store_register_using_P): Likewise.
14831         * regcache.c (regcache_xfer_part): Likewise.
14832
14833 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
14834
14835         Split real and pseudo registers.
14836         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
14837         (sparc32_pseudo_regnum): New enum.
14838         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
14839         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
14840         (SPARC32_CP0_REGISTERS): New macro.
14841         (sparc32_pseudo_register_name): New function.
14842         (sparc32_register_name): Use sparc32_pseudo_register_name.
14843         (sparc32_pseudo_register_type): New function.
14844         (sparc32_register_type): Use sparc32_pseudo_register_type.
14845         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
14846         pseudo register numbers.
14847         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
14848         (SPARC64_CP0_REGISTERS): New macro.
14849         (sparc64_pseudo_register_name): New function.
14850         (sparc64_register_name): Use sparc64_pseudo_register_name.
14851         (sparc64_pseudo_register_type): New function.
14852         (sparc64_register_type): Use sparc64_pseudo_register_type.
14853         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
14854         pseudo register numbers.
14855         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
14856         sparc64_store_arguments): Handle pseudo register numbers.
14857
14858 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14859
14860         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
14861         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
14862         output.
14863         (getpkt_or_notif_sane_1): Likewise.
14864
14865 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14866
14867         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
14868         of CC.  Pass "-x c++-header" instead of "-x c".
14869
14870 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14871
14872         * remote.c (remote_can_async_p): Update comment.
14873
14874 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14875
14876         * linux-nat.c (linux_nat_can_async_p): Update comment.
14877
14878 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14879
14880         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
14881
14882 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
14883
14884         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
14885
14886 2017-01-10  Tom Tromey  <tom@tromey.com>
14887
14888         * python/py-type.c (typy_legacy_template_argument): Update.
14889         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
14890         ~demangle_parse_info): Declare new members.
14891         (cp_demangled_name_to_comp): Return unique_ptr.
14892         (cp_demangled_name_parse_free)
14893         (make_cleanup_cp_demangled_name_parse_free)
14894         (cp_new_demangle_parse_info): Remove.
14895         * cp-support.c (do_demangled_name_parse_free_cleanup)
14896         (make_cleanup_cp_demangled_name_parse_free): Remove.
14897         (inspect_type, cp_canonicalize_string_full)
14898         (cp_canonicalize_string): Update.
14899         (mangled_name_to_comp): Change return type.
14900         (cp_class_name_from_physname, method_name_from_physname)
14901         (cp_func_name, cp_remove_params): Update.
14902         * cp-name-parser.y (demangle_parse_info): New constructor, from
14903         cp_new_demangle_parse_info.
14904         (~demangle_parse_info): New destructor, from
14905         cp_demangled_name_parse_free.
14906         (cp_merge_demangle_parse_infos): Update.
14907         (cp_demangled_name_to_comp): Change return type.
14908
14909 2017-01-10  Tom Tromey  <tom@tromey.com>
14910
14911         * top.c (prevent_dont_repeat): Change return type.
14912         * python/python.c (execute_gdb_command): Use std::string.
14913         Update.
14914         * guile/guile.c (gdbscm_execute_gdb_command): Update.
14915         * command.h (prevent_dont_repeat): Change return type.
14916         * breakpoint.c (bpstat_do_actions_1): Update.
14917
14918 2017-01-10  Tom Tromey  <tom@tromey.com>
14919
14920         * value.h (scoped_value_mark::~scoped_value_mark): Call
14921         free_to_mark.
14922         (scoped_value_mark::free_to_mark): New method.
14923         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
14924         scoped_value_mark.
14925
14926 2017-01-10  Tom Tromey  <tom@tromey.com>
14927
14928         * python/py-value.c (valpy_dereference, valpy_referenced_value)
14929         (valpy_reference_value, valpy_const_value, valpy_get_address)
14930         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
14931         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
14932         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
14933         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
14934         scoped_value_mark.
14935         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
14936         * value.h (scoped_value_mark): New class.
14937
14938 2017-01-10  Tom Tromey  <tom@tromey.com>
14939
14940         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
14941         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
14942         * psymtab.c (discard_psymtabs_upto): Remove.
14943         (make_cleanup_discard_psymtabs): Remove.
14944         (struct psymtab_state): Remove.
14945
14946 2017-01-10  Tom Tromey  <tom@tromey.com>
14947
14948         * record-full.c (record_full_save_cleanups): Remove.
14949         (record_full_save): Use gdb::unlinker.
14950         * gcore.c (do_bfd_delete_cleanup): Remove.
14951         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
14952         cleanups.
14953         * dwarf2read.c (unlink_if_set): Remove.
14954         (write_psymtabs_to_index): Use gdb::unlinker.
14955         * common/gdb_unlinker.h: New file.
14956
14957 2017-01-10  Tom Tromey  <tom@tromey.com>
14958
14959         * windows-tdep.c (windows_xfer_shared_library): Update.
14960         * windows-nat.c (windows_make_so): Update.
14961         * utils.h (make_cleanup_bfd_unref): Remove.
14962         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
14963         * symfile.h (symfile_bfd_open)
14964         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
14965         * symfile.c (read_symbols, symbol_file_add)
14966         (separate_debug_file_exists): Update.
14967         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
14968         (generic_load, reread_symbols): Update.
14969         * symfile-mem.c (symbol_file_add_from_memory): Update.
14970         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
14971         (spu_symbol_file_add_from_memory): Update.
14972         * solist.h (struct target_so_ops) <bfd_open>: Return
14973         gdb_bfd_ref_ptr.
14974         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
14975         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
14976         gdb_bfd_ref_ptr.
14977         (solib_map_sections, reload_shared_libraries_1): Update.
14978         * solib-svr4.c (enable_break): Update.
14979         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
14980         * solib-frv.c (enable_break2): Update.
14981         * solib-dsbt.c (enable_break): Update.
14982         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
14983         gdb_bfd_ref_ptr.
14984         (darwin_solib_get_all_image_info_addr_at_init): Update.
14985         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
14986         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
14987         * record-full.c (record_full_save): Update.
14988         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
14989         * procfs.c (insert_dbx_link_bpt_in_file): Update.
14990         * minidebug.c (find_separate_debug_file_in_section): Return
14991         gdb_bfd_ref_ptr.
14992         * machoread.c (macho_add_oso_symfile): Change abfd to
14993         gdb_bfd_ref_ptr.
14994         (macho_symfile_read_all_oso): Update.
14995         (macho_check_dsym): Return gdb_bfd_ref_ptr.
14996         (macho_symfile_read): Update.
14997         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
14998         (jit_bfd_try_read_symtab): Update.
14999         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15000         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15001         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15002         gdb_bfd_ref_ptr.
15003         (gdb_bfd_ref_policy): New struct.
15004         (gdb_bfd_ref_ptr): New typedef.
15005         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15006         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15007         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15008         gdb_bfd_ref_ptr.
15009         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15010         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15011         (gcore_command): Update.
15012         * exec.c (exec_file_attach): Update.
15013         * elfread.c (elf_symfile_read): Update.
15014         * dwarf2read.c (dwarf2_get_dwz_file): Update.
15015         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15016         (open_and_init_dwo_file): Update.
15017         (open_dwp_file): Return gdb_bfd_ref_ptr.
15018         (open_and_init_dwp_file): Update.
15019         * corelow.c (core_open): Update.
15020         * compile/compile-object-load.c (compile_object_load): Update.
15021         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15022         * coffread.c (coff_symfile_read): Update.
15023         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15024         gdb_bfd_ref_ptr.  Rename.
15025         (dump_bfd_file, restore_command): Update.
15026         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15027         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15028         (find_separate_debug_file_by_buildid): Update.
15029
15030 2017-01-10  Tom Tromey  <tom@tromey.com>
15031
15032         * common/gdb_ref_ptr.h: New file.
15033         * python/py-ref.h (struct gdbpy_ref_policy): New.
15034         (gdbpy_ref): Now a typedef.
15035
15036 2017-01-10  Tom Tromey  <tom@tromey.com>
15037
15038         * utils.h (make_cleanup_htab_delete): Don't declare.
15039         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15040         Remove.
15041         * linespec.c (decode_compound_collector): Add constructor,
15042         destructor.
15043         (lookup_prefix_sym): Remove cleanup.
15044         (symtab_collector): Add constructor, destructor.
15045         (collect_symtabs_from_filename): Remove cleanup.
15046         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15047         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15048         Use htab_up.
15049         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15050         * dwarf2read.c (dw2_expand_symtabs_matching)
15051         (dw2_map_symbol_filenames, dwarf_decode_macros)
15052         (write_psymtabs_to_index): Use htab_up.
15053         * dwarf2loc.c (func_verify_no_selftailcall)
15054         (call_site_find_chain_1, func_verify_no_selftailcall)
15055         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15056         std::vector, gdb::unique_xmalloc_ptr.
15057         (call_sitep): Remove typedef.
15058         (dwarf2_locexpr_baton_eval): Remove unused variable.
15059
15060 2017-01-10  Tom Tromey  <tom@tromey.com>
15061
15062         * python/python-internal.h (make_cleanup_py_decref)
15063         (make_cleanup_py_xdecref): Don't declare.
15064         * python/py-utils.c (py_decref, make_cleanup_py_decref)
15065         (py_xdecref, make_cleanup_py_xdecref): Remove.
15066
15067 2017-01-10  Tom Tromey  <tom@tromey.com>
15068
15069         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15070         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15071
15072 2017-01-10  Tom Tromey  <tom@tromey.com>
15073
15074         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15075
15076 2017-01-10  Tom Tromey  <tom@tromey.com>
15077
15078         * python/py-utils.c (unicode_to_encoded_string)
15079         (python_string_to_target_string)
15080         (python_string_to_target_python_string)
15081         (python_string_to_host_string, gdbpy_obj_to_string)
15082         (get_addr_from_python): Use gdbpy_ref.
15083
15084 2017-01-10  Tom Tromey  <tom@tromey.com>
15085
15086         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15087         gdbpy_ref.
15088
15089 2017-01-10  Tom Tromey  <tom@tromey.com>
15090
15091         * python/python.c (eval_python_command, gdbpy_decode_line)
15092         (gdbpy_run_events, gdbpy_start_type_printers)
15093         (gdbpy_apply_type_printers): Use gdbpy_ref.
15094
15095 2017-01-10  Tom Tromey  <tom@tromey.com>
15096
15097         * python/py-param.c (get_doc_string, compute_enum_values): Use
15098         gdbpy_ref.
15099
15100 2017-01-10  Tom Tromey  <tom@tromey.com>
15101
15102         * python/py-inferior.c (find_thread_object, build_inferior_list):
15103         Use gdbpy_ref.
15104
15105 2017-01-10  Tom Tromey  <tom@tromey.com>
15106
15107         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15108
15109 2017-01-10  Tom Tromey  <tom@tromey.com>
15110
15111         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15112         gdbpy_ref.
15113
15114 2017-01-10  Tom Tromey  <tom@tromey.com>
15115
15116         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
15117         extra incref.
15118         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15119         Use gdbpy_ref.
15120
15121 2017-01-10  Tom Tromey  <tom@tromey.com>
15122
15123         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15124         gdbpy_ref.
15125
15126 2017-01-10  Tom Tromey  <tom@tromey.com>
15127
15128         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
15129         decref results of PyArg_ParseTupleAndKeywords.
15130
15131 2017-01-10  Tom Tromey  <tom@tromey.com>
15132
15133         * python/python.c (python_run_simple_file): Use
15134         unique_xmalloc_ptr, gdbpy_ref.
15135
15136 2017-01-10  Tom Tromey  <tom@tromey.com>
15137
15138         * python/py-prettyprint.c (print_stack_unless_memory_error)
15139         (print_string_repr, print_children): Use gdbpy_ref.
15140         (dummy_python_frame): New class.
15141         (dummy_python_frame::dummy_python_frame): Rename from
15142         push_dummy_python_frame.
15143         (py_restore_tstate): Remove.
15144
15145 2017-01-10  Tom Tromey  <tom@tromey.com>
15146
15147         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15148
15149 2017-01-10  Tom Tromey  <tom@tromey.com>
15150
15151         * python/python.c (ensure_python_env, restore_python_env):
15152         Remove.
15153         * python/python-internal.h (ensure_python_env): Don't declare.
15154         * varobj.h (varobj_ensure_python_env): Don't declare.
15155         * varobj.c (varobj_ensure_python_env): Remove.
15156
15157 2017-01-10  Tom Tromey  <tom@tromey.com>
15158
15159         * varobj.c (varobj_value_get_print_value): Use
15160         gdbpy_enter_varobj.
15161
15162 2017-01-10  Tom Tromey  <tom@tromey.com>
15163
15164         * python/py-prettyprint.c (print_string_repr, print_children):
15165         Update.
15166         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15167         of "encoding".
15168         * varobj.c (varobj_value_get_print_value): Update.
15169         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15170
15171 2017-01-10  Tom Tromey  <tom@tromey.com>
15172
15173         * varobj.c (varobj_get_display_hint)
15174         (dynamic_varobj_has_child_method, install_new_value_visualizer)
15175         (varobj_set_visualizer, free_variable): Use
15176         gdbpy_enter_varobj.
15177
15178 2017-01-10  Tom Tromey  <tom@tromey.com>
15179
15180         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15181         (do_finish_initialization): New function.  Use gdbpy_ref.
15182         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
15183         do_finish_initialization.
15184
15185 2017-01-10  Tom Tromey  <tom@tromey.com>
15186
15187         * python/py-param.c (get_set_value, get_show_value): Use
15188         gdbpy_enter, gdbpy_ref.
15189
15190 2017-01-10  Tom Tromey  <tom@tromey.com>
15191
15192         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15193
15194 2017-01-10  Tom Tromey  <tom@tromey.com>
15195
15196         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15197
15198 2017-01-10  Tom Tromey  <tom@tromey.com>
15199
15200         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15201         Use gdbpy_enter_varobj.
15202
15203 2017-01-10  Tom Tromey  <tom@tromey.com>
15204
15205         * varobj.c (gdbpy_enter_varobj): New constructor.
15206         * python/python-internal.h (gdbpy_enter_varobj): New class.
15207         * python/py-varobj.c (py_varobj_get_iterator): Use
15208         gdbpy_enter_varobj.
15209
15210 2017-01-10  Tom Tromey  <tom@tromey.com>
15211
15212         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15213         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15214         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15215         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15216         unique_xmalloc_ptr.
15217         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15218
15219 2017-01-10  Tom Tromey  <tom@tromey.com>
15220
15221         * python/py-xmethods.c (invoke_match_method): Use
15222         gdbpy_ref.
15223
15224 2017-01-10  Tom Tromey  <tom@tromey.com>
15225
15226         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15227         gdbpy_enter, gdbpy_ref.
15228
15229 2017-01-10  Tom Tromey  <tom@tromey.com>
15230
15231         * python/python.c (python_interactive_command): Use gdbpy_enter.
15232
15233 2017-01-10  Tom Tromey  <tom@tromey.com>
15234
15235         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15236         gdbpy_ref.
15237
15238 2017-01-10  Tom Tromey  <tom@tromey.com>
15239
15240         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15241         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15242
15243 2017-01-10  Tom Tromey  <tom@tromey.com>
15244
15245         * utils.h (htab_deleter): New struct.
15246         (htab_up): New typedef.
15247         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15248         gdbpy_enter, gdbpy_ref, htab_up.
15249
15250 2017-01-10  Tom Tromey  <tom@tromey.com>
15251
15252         * python/py-unwind.c (pending_frame_invalidate): Remove.
15253         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15254
15255 2017-01-10  Tom Tromey  <tom@tromey.com>
15256
15257         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15258         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15259
15260 2017-01-10  Tom Tromey  <tom@tromey.com>
15261
15262         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15263
15264 2017-01-10  Tom Tromey  <tom@tromey.com>
15265
15266         * python/python.c (gdbpy_eval_from_control_command)
15267         (gdbpy_source_script, gdbpy_run_events)
15268         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15269         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15270         gdbpy_enter.
15271
15272 2017-01-10  Tom Tromey  <tom@tromey.com>
15273
15274         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15275
15276 2017-01-10  Tom Tromey  <tom@tromey.com>
15277
15278         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15279
15280 2017-01-10  Tom Tromey  <tom@tromey.com>
15281
15282         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15283         (python_on_inferior_call_pre, python_on_inferior_call_post)
15284         (python_on_memory_change, python_on_register_change)
15285         (python_inferior_exit, python_new_objfile, add_thread_object)
15286         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15287
15288 2017-01-10  Tom Tromey  <tom@tromey.com>
15289
15290         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15291         (bpfinishpy_handle_exit): Use gdbpy_enter.
15292
15293 2017-01-10  Tom Tromey  <tom@tromey.com>
15294
15295         * python/py-cmd.c (cmdpy_destroyer)
15296         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15297         gdbpy_enter.
15298
15299 2017-01-10  Tom Tromey  <tom@tromey.com>
15300
15301         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15302         gdbpy_enter.
15303         (gdbpy_breakpoint_has_cond): Likewise.
15304
15305 2017-01-10  Tom Tromey  <tom@tromey.com>
15306
15307         * python/python.c (gdbpy_enter): New constructor.
15308         (~gdbpy_enter): New destructor.
15309         (restore_python_env, ensure_python_env): Rewrite.
15310         * python/python-internal.h (gdbpy_enter): New class.
15311
15312 2017-01-10  Tom Tromey  <tom@tromey.com>
15313
15314         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15315
15316 2017-01-10  Tom Tromey  <tom@tromey.com>
15317
15318         * python/py-value.c (value_has_field, get_field_flag)
15319         (get_field_type, valpy_getitem, convert_value_from_python): Use
15320         gdbpy_ref.
15321
15322 2017-01-10  Tom Tromey  <tom@tromey.com>
15323
15324         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15325         gdbpy_ref.
15326
15327 2017-01-10  Tom Tromey  <tom@tromey.com>
15328
15329         * python/py-prettyprint.c (search_pp_list)
15330         (find_pretty_printer_from_objfiles)
15331         (find_pretty_printer_from_progspace)
15332         (find_pretty_printer_from_gdb, find_pretty_printer)
15333         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15334         gdbpy_ref.
15335
15336 2017-01-10  Tom Tromey  <tom@tromey.com>
15337
15338         * python/py-param.c (call_doc_function): Use gdbpy_ref.
15339
15340 2017-01-10  Tom Tromey  <tom@tromey.com>
15341
15342         * python/py-linetable.c (build_line_table_tuple_from_pcs)
15343         (ltpy_get_all_source_lines): Use gdbpy_ref.
15344
15345 2017-01-10  Tom Tromey  <tom@tromey.com>
15346
15347         * python/py-framefilter.c (extract_sym, extract_value)
15348         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15349         gdbpy_ref.
15350
15351 2017-01-10  Tom Tromey  <tom@tromey.com>
15352
15353         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15354
15355 2017-01-10  Tom Tromey  <tom@tromey.com>
15356
15357         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15358
15359 2017-01-10  Tom Tromey  <tom@tromey.com>
15360
15361         * python/py-function.c (convert_values_to_python, fnpy_init): Use
15362         gdbpy_ref.
15363
15364 2017-01-10  Tom Tromey  <tom@tromey.com>
15365
15366         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15367
15368 2017-01-10  Tom Tromey  <tom@tromey.com>
15369
15370         * python/py-type.c (convert_field, make_fielditem, typy_fields)
15371         (typy_range): Use gdbpy_ref.
15372
15373 2017-01-10  Tom Tromey  <tom@tromey.com>
15374
15375         * python/py-threadevent.c (create_thread_event_object): Use
15376         gdbpy_ref.
15377         * python/py-stopevent.c (create_stop_event_object): Simplify.
15378         (emit_stop_event): Use gdbpy_ref.
15379         * python/py-signalevent.c (create_signal_event_object): Use
15380         gdbpy_ref.
15381         * python/py-newobjfileevent.c (create_new_objfile_event_object)
15382         (emit_new_objfile_event, create_clear_objfiles_event_object)
15383         (emit_clear_objfiles_event): Use gdbpy_ref.
15384         * python/py-infevents.c (create_inferior_call_event_object)
15385         (create_register_changed_event_object)
15386         (create_memory_changed_event_object, emit_inferior_call_event)
15387         (emit_memory_changed_event, emit_register_changed_event): Use
15388         gdbpy_ref.
15389         * python/py-exitedevent.c (create_exited_event_object)
15390         (emit_exited_event): Use gdbpy_ref.
15391         * python/py-event.h (evpy_emit_event): Remove
15392         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15393         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15394         * python/py-continueevent.c (emit_continue_event): Use
15395         gdbpy_ref.
15396         * python/py-breakpoint.c (gdbpy_breakpoint_created)
15397         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15398         gdbpy_ref.
15399         * python/py-bpevent.c (create_breakpoint_event_object): Use
15400         gdbpy_ref.
15401
15402 2017-01-10  Tom Tromey  <tom@tromey.com>
15403
15404         * python/py-ref.h: New file.
15405
15406 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15407
15408         * cli-out.c (cli_ui_out::do_redirect): Change return type to
15409         void.
15410         * cli-out.h (cli_ui_out::do_redirect): Likewise.
15411         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15412         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15413         * ui-out.c (ui_out::redirect): Likewise.
15414         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15415         * cli/cli-logging.c (set_logging_redirect): Update call site of
15416         ui_out::redirect.
15417         (handle_redirections): Likewise.
15418         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15419         * top.c (execute_command_to_string): Likewise.
15420         * utils.c (do_ui_out_redirect_pop): Likewise.
15421
15422 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15423
15424         * stack.c (_initialize_stack): Update "frame" command help message.
15425
15426 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
15427
15428         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15429
15430 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15431
15432         * x86-linux-nat.h: Include gdb_proc_service.h.
15433
15434 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15435
15436         * ser-base.h: Include serial.h.
15437
15438 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15439
15440         * ppc-linux-tdep.h: Include ppc-tdep.h.
15441
15442 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15443
15444         * nat/amd64-linux-siginfo.h: Include signal.h.
15445
15446 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15447
15448         * nat/aarch64-linux-hw-point.h: Include break-common.h.
15449
15450 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15451
15452         * mi/mi-parse.h: Include mi-cmds.h.
15453
15454 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15455
15456         * inf-loop.c: Don't include "target.h".
15457         * inf-loop.h: Include it here.
15458
15459 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15460
15461         * dfp.h: Include "dboulest.h" and "expression.h".
15462
15463 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15464
15465         * ax-gdb.h: Include "ax.h".
15466
15467 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15468
15469         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15470         with nat/gdb_ptrace.h.
15471
15472 2017-01-05  Yao Qi  <yao.qi@linaro.org>
15473
15474         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15475         new line.
15476         (mips64_fbsd_sigframe_init): Likewise.
15477
15478 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15479
15480         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15481         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15482
15483 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15484
15485         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15486         * NEWS: Mention new FreeBSD/mips native configuration.
15487         * config/mips/fbsd.mh: New file.
15488         * configure.host: Add mips*-*-freebsd*.
15489         * mips-fbsd-nat.c: New file.
15490
15491 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15492
15493         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15494         (ALLDEPFILES): Add mips-fbsd-tdep.c.
15495         * NEWS: Mention new FreeBSD/mips target.
15496         * configure.tgt: Add mips*-*-freebsd*.
15497         * mips-fbsd-tdep.c: New file.
15498         * mips-fbsd-tdep.h: New file.
15499
15500 2017-01-04  Yao Qi  <yao.qi@linaro.org>
15501
15502         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15503         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15504
15505 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15506
15507         Update copyright year range in all GDB files.
15508
15509 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15510
15511         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15512
15513 For older changes see ChangeLog-2016.
15514 \f
15515 Local Variables:
15516 mode: change-log
15517 left-margin: 8
15518 fill-column: 74
15519 version-control: never
15520 coding: utf-8
15521 End: