lookup_name_info::make_ignore_params
[external/binutils.git] / gdb / ChangeLog
1 2017-11-08  Pedro Alves  <palves@redhat.com>
2
3         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4         unittests/lookup_name_info-selftests.c.
5         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
6         * cp-support.c: Include "selftest.h".
7         (cp_remove_params_1): Rename from cp_remove_params.  Add
8         'require_param' parameter, and handle it.
9         (cp_remove_params): Reimplement.
10         (cp_remove_params_if_any): New.
11         (selftests::quote): New.
12         (selftests::check_remove_params): New.
13         (selftests::test_cp_remove_params): New.
14         (_initialize_cp_support): Install
15         selftests::test_cp_remove_params.
16         * cp-support.h (cp_remove_params_if_any): Declare.
17         * dwarf2read.c :Include "selftest.h".
18         (dw2_expand_symtabs_matching_symbol): Use
19         lookup_name_info::make_ignore_params.
20         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
21         (selftests::dw2_expand_symtabs_matching::string_or_null)
22         (selftests::dw2_expand_symtabs_matching::check_match)
23         (selftests::dw2_expand_symtabs_matching::test_symbols)
24         (selftests::dw2_expand_symtabs_matching::run_test): New.
25         (_initialize_dwarf2_read): Register
26         selftests::dw2_expand_symtabs_matching::run_test.
27         * psymtab.c (psym_expand_symtabs_matching): Use
28         lookup_name_info::make_ignore_params.
29         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
30         If the lookup name wants to ignore parameters, strip them.
31         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
32         code handling '('.
33         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
34         (default_collect_symbol_completion_matches_break_on): Don't try to
35         strip parameters.
36         * symtab.h (lookup_name_info::lookup_name_info): Add
37         'ignore_parameters' parameter.
38         (lookup_name_info::ignore_parameters)
39         (lookup_name_info::make_ignore_params): New methods.
40         (lookup_name_info::m_ignore_parameters): New field.
41         * unittests/lookup_name_info-selftests.c: New file.
42
43 2017-11-08  Pedro Alves  <palves@redhat.com>
44
45         * dwarf2read.c (dw2_expand_marked_cus)
46         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
47         (dw2_expand_symtabs_matching): Move further below.
48         (dw2_expand_marked_cus): Reindent.
49
50 2017-11-08  Pedro Alves  <palves@redhat.com>
51
52         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
53         (struct name_component): New.
54         (mapped_index::name_components): New field.
55         (mapped_index::symbol_name_at): New method.
56         (dwarf2_read_index): Call mapped_index ctor.
57         (dw2_map_matching_symbols): Add comment about name_components
58         table.
59         (dw2_expand_symtabs_matching): Factor part to...
60         (dw2_expand_symtabs_matching_symbol): ... this new function.
61         Build name components table, and lookup symbols in it before
62         calling the name matcher.
63         (dw2_expand_marked_cus): New, factored out from
64         dw2_expand_symtabs_matching.
65         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
66
67 2017-11-08   Pedro Alves  <palves@redhat.com>
68
69         * ada-lang.c (ada_encode): Rename to ..
70         (ada_encode_1): ... this.  Add throw_errors parameter and handle
71         it.
72         (ada_encode): Reimplement.
73         (match_name): Delete, folded into full_name.
74         (resolve_subexp): No longer pass the encoded name to
75         ada_lookup_symbol_list.
76         (should_use_wild_match): Delete.
77         (name_match_type_from_name): New.
78         (ada_lookup_simple_minsym): Use lookup_name_info and the
79         language's symbol_name_matcher_ftype.
80         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
81         (ada_add_block_renamings): Adjust to use lookup_name_info.
82         (ada_lookup_name): New.
83         (add_nonlocal_symbols, ada_add_all_symbols)
84         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
85         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
86         (ada_name_for_lookup): Delete.
87         (ada_lookup_encoded_symbol): Construct a verbatim name.
88         (wild_match): Reverse sense of return type.  Use bool.
89         (full_match): Reverse sense of return type.  Inline bits of old
90         match_name here.
91         (ada_add_block_symbols): Adjust to use lookup_name_info.
92         (symbol_completion_match): Delete, folded into...
93         (ada_lookup_name_info::matches): ... .this new method.
94         (symbol_completion_add): Delete.
95         (ada_collect_symbol_completion_matches): Add name_match_type
96         parameter.  Adjust to use lookup_name_info and
97         completion_list_add_name.
98         (get_var_value, ada_add_global_exceptions): Adjust to use
99         lookup_name_info.
100         (ada_get_symbol_name_cmp): Delete.
101         (do_wild_match, do_full_match): New functions.
102         (ada_lookup_name_info::ada_lookup_name_info): New method.
103         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
104         functions.
105         (ada_language_defn): Install ada_get_symbol_name_matcher.
106         * ada-lex.l (processId): If name starts with '<', copy it
107         verbatim.
108         * block.c (block_iter_match_step, block_iter_match_first)
109         (block_iter_match_next, block_lookup_symbol)
110         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
111         lookup_name_info.
112         * block.h (block_iter_match_first, block_iter_match_next)
113         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
114         * c-lang.c (c_language_defn, cplus_language_defn)
115         (asm_language_defn, minimal_language_defn): Adjust comments to
116         refer to la_get_symbol_name_matcher.
117         * completer.c (complete_files_symbols)
118         (collect_explicit_location_matches, symbol_completer): Pass a
119         symbol_name_match_type down.
120         * completer.h (class completion_match, completion_match_result):
121         New classes.
122         (completion_tracker::reset_completion_match_result): New method.
123         (completion_tracker::m_completion_match_result): New field.
124         * cp-support.c (make_symbol_overload_list_block): Adjust to use
125         lookup_name_info.
126         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
127         functions.
128         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
129         * d-lang.c: Adjust comments to refer to
130         la_get_symbol_name_matcher.
131         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
132         Adjust to use lookup_name_info.
133         (dict_iter_match_first, dict_iter_match_next)
134         (iter_match_first_hashed, iter_match_next_hashed)
135         (iter_match_first_linear, iter_match_next_linear): Adjust to work
136         with a lookup_name_info.
137         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
138         Likewise.
139         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
140         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
141         (gdb_index_symbol_name_matcher): New class.
142         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
143         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
144         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
145         with a symbol_name_match_type.
146         (f_language_defn): Adjust comments to refer to
147         la_get_symbol_name_matcher.
148         * go-lang.c (go_language_defn): Adjust comments to refer to
149         la_get_symbol_name_matcher.
150         * language.c (default_symbol_name_matcher)
151         (language_get_symbol_name_matcher): New functions.
152         (unknown_language_defn, auto_language_defn): Adjust comments to
153         refer to la_get_symbol_name_matcher.
154         * language.h (symbol_name_cmp_ftype): Delete.
155         (language_defn) <la_collect_symbol_completion_matches>: Add match
156         type parameter.
157         <la_get_symbol_name_cmp>: Delete field.
158         <la_get_symbol_name_matcher>: New field.
159         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
160         (default_symbol_name_matcher, language_get_symbol_name_matcher):
161         Declare.
162         * linespec.c (iterate_over_all_matching_symtabs)
163         (iterate_over_file_blocks): Adjust to use lookup_name_info.
164         (find_methods): Add language parameter, and use lookup_name_info
165         and the language's symbol_name_matcher_ftype.
166         (linespec_complete_function): Adjust.
167         (lookup_prefix_sym): Use lookup_name_info.
168         (add_all_symbol_names_from_pspace): Adjust.
169         (find_superclass_methods): Add language parameter and pass it
170         down.
171         (find_method): Pass symbol language down.
172         (find_linespec_symbols): Don't demangle or Ada encode here.
173         (search_minsyms_for_name): Add lookup_name_info parameter.
174         (add_matching_symbols_to_info): Add name_match_type parameter.
175         Use lookup_name_info.
176         * m2-lang.c (m2_language_defn): Adjust comments to refer to
177         la_get_symbol_name_matcher.
178         * minsyms.c: Include <algorithm>.
179         (add_minsym_to_demangled_hash_table): Remove table parameter and
180         add objfile parameter.  Use search_name_hash, and add language to
181         demangled languages vector.
182         (struct found_minimal_symbols): New struct.
183         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
184         New functions.
185         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
186         input names here.  Use lookup_name_info instead.  Lookup up
187         demangled names once for each language in the demangled names
188         vector.
189         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
190         demangled names once for each language in the demangled names
191         vector.
192         (build_minimal_symbol_hash_tables): Adjust.
193         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
194         lookup_name_info.
195         * objc-lang.c (objc_language_defn): Adjust comment to refer to
196         la_get_symbol_name_matcher.
197         * objfiles.h: Include <vector>.
198         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
199         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
200         la_get_symbol_name_matcher.
201         * p-lang.c (pascal_language_defn): Adjust comment to refer to
202         la_get_symbol_name_matcher.
203         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
204         (match_partial_symbol): Use symbol_name_match_type,
205         lookup_name_info and psymbol_name_matches.
206         (lookup_partial_symbol): Use lookup_name_info.
207         (map_block): Use symbol_name_match_type and lookup_name_info.
208         (psym_map_matching_symbols): Use symbol_name_match_type.
209         (psymbol_name_matches): New.
210         (recursively_search_psymtabs): Use lookup_name_info and
211         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
212         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
213         'kind' parameter to 'domain'.
214         * rust-lang.c (rust_language_defn): Adjust comment to refer to
215         la_get_symbol_name_matcher.
216         * symfile-debug.c (debug_qf_map_matching_symbols)
217         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
218         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
219         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
220         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
221         Adjust to use symbol_name_match_type.
222         <expand_symtabs_matching>: Adjust to use lookup_name_info.
223         (expand_symtabs_matching): Adjust to use lookup_name_info.
224         * symmisc.c (maintenance_expand_symtabs): Use
225         lookup_name_info::match_any ().
226         * symtab.c (symbol_matches_search_name): New.
227         (eq_symbol_entry): Adjust to use lookup_name_info and the
228         language's matcher.
229         (demangle_for_lookup_info::demangle_for_lookup_info): New.
230         (lookup_name_info::match_any): New.
231         (iterate_over_symbols, search_symbols): Use lookup_name_info.
232         (compare_symbol_name): Add language, lookup_name_info and
233         completion_match_result parameters, and use them.
234         (completion_list_add_name): Make extern.  Add language and
235         lookup_name_info parameters.  Use them.
236         (completion_list_add_symbol, completion_list_add_msymbol)
237         (completion_list_objc_symbol): Add lookup_name_info parameters and
238         adjust.  Pass down language.
239         (completion_list_add_fields): Add lookup_name_info parameters and
240         adjust.  Pass down language.
241         (add_symtab_completions): Add lookup_name_info parameters and
242         adjust.
243         (default_collect_symbol_completion_matches_break_on): Add
244         name_match_type parameter, and use it.  Use lookup_name_info.
245         (default_collect_symbol_completion_matches)
246         (collect_symbol_completion_matches): Add name_match_type
247         parameter, and pass it down.
248         (collect_symbol_completion_matches_type): Adjust.
249         (collect_file_symbol_completion_matches): Add name_match_type
250         parameter, and use lookup_name_info.
251         * symtab.h: Include <string> and "common/gdb_optional.h".
252         (enum class symbol_name_match_type): New.
253         (class ada_lookup_name_info): New.
254         (struct demangle_for_lookup_info): New.
255         (class lookup_name_info): New.
256         (symbol_name_matcher_ftype): New.
257         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
258         (symbol_matches_search_name): Declare.
259         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
260         (default_collect_symbol_completion_matches)
261         (collect_symbol_completion_matches)
262         (collect_file_symbol_completion_matches): Add name_match_type
263         parameter.
264         (iterate_over_symbols): Use lookup_name_info.
265         (completion_list_add_name): Declare.
266         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
267         (strncmp_iw_with_mode): Now extern.
268         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
269         (strncmp_iw_with_mode): Declare.
270
271 2017-11-08  Keith Seitz  <keiths@redhat.com>
272             Pedro Alves  <palves@redhat.com>
273
274         * ada-lang.c (ada_language_defn): Install
275         default_search_name_hash.
276         * buildsym.c (struct buildsym_compunit): <language>: New field.
277         (finish_block_internal): Pass language when creating dictionaries.
278         (start_buildsym_compunit, start_symtab): New language parameters.
279         Use them.
280         (restart_symtab): Pass down compilation unit's language.
281         * buildsym.h (enum language): Forward declare.
282         (start_symtab): New 'language' parameter.
283         * c-lang.c (c_language_defn, cplus_language_defn)
284         (asm_language_defn, minimal_language_defn): Install
285         default_search_name_hash.
286         * coffread.c (coff_start_symtab): Adjust.
287         * d-lang.c (d_language_defn): Install default_search_name_hash.
288         * dbxread.c (struct symloc): Add 'pst_language' field.
289         (PST_LANGUAGE): Define.
290         (start_psymtab, read_ofile_symtab): Use it.
291         (process_one_symbol): New 'language' parameter.  Pass it down.
292         * dictionary.c (struct dictionary) <language>: New field.
293         (DICT_LANGUAGE): Define.
294         (dict_create_hashed, dict_create_hashed_expandable)
295         (dict_create_linear, dict_create_linear_expandable): New parameter
296         'language'.  Set the dictionary's language.
297         (iter_match_first_hashed): Adjust to rename.
298         (insert_symbol_hashed): Assert we don't see mismatching
299         languages.  Adjust to rename.
300         (dict_hash): Rename to ...
301         (default_search_name_hash): ... this and make extern.
302         * dictionary.h (struct language_defn): Forward declare.
303         (dict_create_hashed): New parameter 'language'.
304         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
305         * f-lang.c (f_language_defn): Install default_search_name_hash.
306         * go-lang.c (go_language_defn): Install default_search_name_hash.
307         * jit.c (finalize_symtab): Pass compunit's language to dictionary
308         creation.
309         * language.c (unknown_language_defn, auto_language_defn):
310         * language.h (language_defn::la_search_name_hash): New field.
311         (default_search_name_hash): Declare.
312         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
313         * mdebugread.c (new_block): New parameter 'language'.
314         * mdebugread.c (parse_symbol): Pass symbol language to block
315         allocation.
316         (psymtab_to_symtab_1): Pass down language.
317         (new_symtab): Pass compunit's language to block allocation.
318         * objc-lang.c (objc_language_defn): Install
319         default_search_name_hash.
320         * opencl-lang.c (opencl_language_defn):
321         * p-lang.c (pascal_language_defn): Install
322         default_search_name_hash.
323         * rust-lang.c (rust_language_defn): Install
324         default_search_name_hash.
325         * stabsread.h (enum language): Forward declare.
326         (process_one_symbol): Add 'language' parameter.
327         * symtab.c (search_name_hash): New function.
328         * symtab.h (search_name_hash): Declare.
329         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
330
331 2017-11-08  Pedro Alves  <palves@redhat.com>
332
333         * cp-name-parser.y (main): Don't initialize extra_chars.
334
335 2017-11-07  Tom Tromey  <tom@tromey.com>
336
337         * event-top.h (command_handler): Constify.
338         * record-full.c (cmd_record_full_start): Update.
339         * thread.c (thread_apply_all_command): Update.
340         * printcmd.c (eval_command): Update.
341         * mi/mi-main.c (mi_execute_cli_command): Update.
342         (mi_execute_async_cli_command): Update.
343         * tui/tui-stack.c (tui_update_command): Update.
344         * cli/cli-interp.c (safe_execute_command): Constify.
345         * record.c (record_start): Update.
346         (record_start, record_stop, cmd_record_start): Update.
347         * record-btrace.c (cmd_record_btrace_bts_start): Update.
348         (cmd_record_btrace_pt_start): Update.
349         (cmd_record_btrace_start): Update.
350         (cmd_record_btrace_start): Update.
351         * reverse.c (exec_reverse_once): Update.
352         * python/python.c (execute_gdb_command): Don't copy the command.
353         * event-top.c (command_line_handler): Update.
354         (command_handler): Constify.
355         * defs.h (deprecated_call_command_hook): Constify.
356         * cli/cli-script.h (execute_user_command): Constify.
357         * cli/cli-script.c (execute_user_command): Constify.
358         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
359         (enum command_control_type): Update.
360         * main.c (catch_command_errors): Remove non-const overload.
361         (catch_command_errors_ftype): Remove.
362         * python/py-cmd.c (cmdpy_function): Constify.
363         * guile/scm-cmd.c (cmdscm_function): Constify.
364         * cli/cli-dump.c (call_dump_func): Constify.
365         * cli/cli-decode.c (do_const_cfunc): Constify.
366         (do_sfunc): Constify.
367         (cmd_func): Constify.
368         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
369         * top.h (execute_command): Constify.
370         * top.c (execute_command): Constify.
371         (execute_command_to_string): Constify.
372         (deprecated_call_command_hook): Constify.
373         * command.h (cmd_func): Constify.
374         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
375
376 2017-11-07  Tom Tromey  <tom@tromey.com>
377
378         * ada-lang.c (catch_ada_exception_command): Constify.
379         (catch_assert_command): Constify.
380         * break-catch-throw.c (catch_catch_command, catch_throw_command)
381         (catch_rethrow_command): Constify.
382         (catch_exception_command_1): Constify.
383         * breakpoint.h (add_catch_command): Constify.
384         * break-catch-syscall.c (catch_syscall_command_1): Constify.
385         (catch_syscall_split_args): Constify.
386         * break-catch-sig.c (catch_signal_command): Constify.
387         (catch_signal_split_args): Constify.
388         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
389         cmd_const_sfunc_ftype.
390         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
391         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
392         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
393         (add_setshow_string_cmd, struct cmd_list_element)
394         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
395         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
396         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
397         Constify.
398         (set_cmd_sfunc): Constify.
399         (empty_sfunc): Constify.
400         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
401         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
402         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
403         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
404         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
405         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
406         Constify.
407         (set_cmd_sfunc): Constify.
408         (cmd_sfunc_ftype): Remove.
409         * compile/compile.c (set_compile_args): Constify.
410         * infrun.c (set_disable_randomization): Constify.
411         * infcmd.c (set_args_command, set_cwd_command): Constify.
412         * breakpoint.c (set_condition_evaluation_mode): Constify.
413         (add_catch_command): Constify.
414         (catch_fork_command_1, catch_exec_command_1)
415         (catch_load_command_1, catch_unload_command_1): Constify.
416         (catch_load_or_unload): Constify.
417         * guile/scm-param.c (pascm_set_func): Constify.
418         (add_setshow_generic): Constify.
419         * python/py-param.c (get_set_value): Constify.
420         * top.h (set_verbose): Constify.
421         * tui/tui-win.c (tui_set_var_cmd): Constify.
422         * mi/mi-main.c (set_mi_async_command): Constify.
423         * cli/cli-logging.c (set_logging_overwrite)
424         (set_logging_redirect): Constify.
425         * value.c (set_max_value_size): Constify.
426         * valprint.c (set_input_radix, set_output_radix): Constify.
427         * utils.c (set_width_command, set_height_command): Constify.
428         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
429         * tracepoint.c (set_disconnected_tracing)
430         (set_circular_trace_buffer, set_trace_buffer_size)
431         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
432         * top.c (set_history_size_command, set_verbose, set_editing)
433         (set_gdb_datadir, set_history_filename): Constify.
434         * target.c (set_targetdebug, maint_set_target_async_command)
435         (maint_set_target_non_stop_command, set_target_permissions)
436         (set_write_memory_permission): Constify.
437         (open_target): Constify.
438         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
439         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
440         * symtab.c (set_symbol_cache_size_handler): Constify.
441         * symfile.c (set_ext_lang_command): Constify.
442         * symfile-debug.c (set_debug_symfile): Constify.
443         * source.c (set_directories_command): Constify.
444         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
445         * serial.c (set_parity): Constify.
446         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
447         * remote.c (set_remote_exec_file, set_remotebreak)
448         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
449         * record.c (set_record_insn_history_size)
450         (set_record_call_history_size): Constify.
451         * record-full.c (set_record_full_insn_max_num): Constify.
452         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
453         * osabi.c (set_osabi): Constify.
454         * mips-tdep.c (set_mips64_transfers_32bit_regs)
455         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
456         * maint.c (maintenance_set_profile_cmd): Constify.
457         * linux-thread-db.c (set_libthread_db_search_path): Constify.
458         * language.c (set_language_command, set_range_command)
459         (set_case_command): Constify.
460         * infrun.c (set_non_stop, set_observer_mode)
461         (set_stop_on_solib_events, set_schedlock_func)
462         (set_exec_direction_func): Constify.
463         * infcmd.c (set_inferior_tty_command): Constify.
464         * disasm.c (set_disassembler_options_sfunc): Constify.
465         * demangle.c (set_demangling_command): Constify.
466         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
467         * cris-tdep.c (set_cris_version, set_cris_mode)
468         (set_cris_dwarf2_cfi): Constify.
469         * corefile.c (set_gnutarget_command): Constify.
470         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
471         (set_target_wide_charset_sfunc): Constify.
472         * breakpoint.c (update_dprintf_commands): Constify.
473         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
474         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
475         (set_disassembly_style_sfunc): Constify.
476         * arch-utils.c (set_endian, set_architecture): Constify.
477         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
478         * agent.c (set_can_use_agent): Constify.
479
480 2017-11-07  Tom Tromey  <tom@tromey.com>
481
482         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
483         (go32_pde, go32_pte, go32_pte_for_address): Constify.
484         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
485         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
486         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
487         (parse_int_arg, show_thread_default_detach_sc_cmd)
488         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
489         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
490         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
491         (show_task_pause_cmd, set_task_detach_sc_cmd)
492         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
493         (set_noninvasive_cmd, set_thread_pause_cmd)
494         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
495         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
496         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
497         * windows-nat.c (display_selectors): Constify.
498         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
499         non-const "cfunc".
500         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
501         (cmd_cfunc_eq): Likewise.
502         (struct cmd_list_element): Likewise.
503         (do_cfunc): Remove.
504         (cli_user_command_p): Update.
505         * command.h (add_cmd): Remove non-const overload.
506         (cmd_cfunc_ftype): Remove typedef.
507         (cmd_cfunc_eq): Remove non-const overload.
508         * value.c (show_values): Constify.
509         * thread.c (thread_apply_all_command): Constify.
510         * symfile.c (load_command): Constify.
511         * source.c (directory_command): Constify.
512         * maint.c (maintenance_internal_error)
513         (maintenance_demangler_warning, maintenance_space_display)
514         (maintenance_print_architecture, maintenance_translate_address)
515         (maintenance_info_selftests, maintenance_internal_warning):
516         Constify.
517         * breakpoint.c (disable_trace_command, enable_trace_command):
518         Constify.
519         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
520         Constify.
521         (add_auto_load_safe_path): Constify.
522         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
523         * top.h (show_commands): Constify.
524         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
525         * sparc64-tdep.c (adi_examine_command): Constify.
526         (adi_assign_command): Constify.
527
528 2017-11-07  Tom Tromey  <tom@tromey.com>
529
530         * frame.h (info_locals_command, info_args_command): Constify.
531         * auto-load.h (auto_load_info_scripts): Constify.
532         * inferior.h (registers_info): Constify.
533         * copying.c: Rebuild.
534         * copying.awk: Constify generated commands.
535         * auto-load.c (auto_load_info_scripts)
536         (info_auto_load_gdb_scripts): Constify.
537         * cli/cli-decode.c (struct cmd_list_element): Take a
538         cmd_const_cfunc_ftype.
539         * command.h (add_info): Take a cmd_const_cfunc_ftype.
540         * tui/tui-win.c (tui_all_windows_info): Constify.
541         * python/py-auto-load.c (info_auto_load_python_scripts):
542         Constify.
543         * cli/cli-cmds.c (show_command): Remove non-const overload.
544         * tracepoint.c (info_tvariables_command, info_scope_command):
545         Constify.
546         (info_static_tracepoint_markers_command): Constify.
547         * thread.c (info_threads_command): Constify.
548         (print_thread_info_1): Constify.
549         * target.c (info_target_command): Constify.
550         * symtab.c (info_sources_command, info_functions_command)
551         (info_types_command): Constify.
552         (info_variables_command): Remove non-const overload.
553         * symfile.c (info_ext_lang_command): Constify.
554         * stack.c (info_frame_command, info_locals_command)
555         (info_args_command): Constify.
556         (backtrace_command): Remove non-const overload.
557         * source.c (info_source_command, info_line_command): Constify.
558         * solib.c (info_sharedlibrary_command): Constify.
559         * skip.c (info_skip_command): Constify.
560         * ser-go32.c (info_serial_command): Constify.
561         * reverse.c (info_bookmarks_command): Constify.
562         * printcmd.c (info_symbol_command, info_address_command)
563         (info_display_command): Constify.
564         * osdata.c (info_osdata_command): Constify.
565         * objc-lang.c (info_selectors_command, info_classes_command):
566         Constify.
567         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
568         * memattr.c (info_mem_command): Constify.
569         * macrocmd.c (info_macro_command, info_macros_command): Constify.
570         * linux-fork.c (info_checkpoints_command): Constify.
571         * infrun.c (info_signals_command): Constify.
572         * inflow.c (info_terminal_command): Constify.
573         * inferior.c (info_inferiors_command): Constify.
574         (print_inferior): Constify.
575         * infcmd.c (info_program_command, info_all_registers_command)
576         (info_registers_command, info_vector_command)
577         (info_float_command): Constify.
578         (registers_info): Constify.
579         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
580         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
581         Constify.
582         * f-valprint.c (info_common_command): Constify.
583         * dcache.c (info_dcache_command): Constify.
584         (dcache_info_1): Constify.
585         * darwin-nat-info.c (info_mach_tasks_command)
586         (info_mach_task_command, info_mach_ports_command)
587         (info_mach_port_command, info_mach_threads_command)
588         (info_mach_thread_command, info_mach_regions_command)
589         (info_mach_regions_recurse_command, info_mach_region_command)
590         (info_mach_exceptions_command): Constify.
591         (get_task_from_args): Constify.
592         * cp-support.c (info_vtbl_command): Constify.
593         * breakpoint.c (info_watchpoints_command)
594         (info_tracepoints_command): Constify.
595         (info_breakpoints_command): Remove non-const overload.
596         * avr-tdep.c (avr_io_reg_read_command): Constify.
597         * auxv.c (info_auxv_command): Constify.
598         * ada-tasks.c (info_tasks_command): Constify.
599         (info_task): Constify.
600         * ada-lang.c (info_exceptions_command): Constify.
601
602 2017-11-07  Tom Tromey  <tom@tromey.com>
603
604         * solib.h (no_shared_libraries): Constify.
605         * frame.h (return_command): Constify.
606         * cli/cli-cmds.h (quit_command): Constify.
607         * top.h (quit_command, execute_command): Constify.
608         * target.h (flash_erase_command): Constify.
609         * inferior.h (set_inferior_args, attach_command): Constify.
610         * tracepoint.h (start_tracing, stop_tracing): Constify.
611         * breakpoint.h (break_command, tbreak_command)
612         (hbreak_command_wrapper, thbreak_command_wrapper)
613         (rbreak_command_wrapper, watch_command_wrapper)
614         (awatch_command_wrapper, rwatch_command_wrapper)
615         (get_tracepoint_by_number): Constify.
616         * symtab.c (info_variables_command, rbreak_command)
617         (symtab_symbol_info): Constify.
618         (info_variables_command): Add non-const overload.
619         * top.c (dont_repeat_command): Constify.
620         * breakpoint.c (ignore_command, commands_command)
621         (condition_command, tbreak_command, hbreak_command)
622         (thbreak_command, clear_command, break_command)
623         (info_breakpoints_command, watch_command, rwatch_command)
624         (awatch_command, trace_command, ftrace_command, strace_command)
625         (trace_pass_command, break_range_command, dprintf_command)
626         (agent_printf_command, get_tracepoint_by_number)
627         (watch_maybe_just_location, trace_pass_command): Constify.
628         (info_breakpoints_command): Add non-const overload.
629         * tracefile.c (tsave_command): Constify.
630         * infcmd.c (attach_command, disconnect_command, signal_command)
631         (queue_signal_command, stepi_command, nexti_command)
632         (finish_command, next_command, step_command, until_command)
633         (advance_command, jump_command, continue_command, run_command)
634         (start_command, starti_command, interrupt_command)
635         (run_command_1, set_inferior_args, step_1): Constify.
636         * inferior.c (add_inferior_command, remove_inferior_command)
637         (clone_inferior_command): Constify.
638         * linux-fork.c (checkpoint_command, restart_command): Constify.
639         * windows-nat.c (signal_event_command): Constify.
640         * guile/guile.c (guile_repl_command, guile_command): Constify.
641         * printcmd.c (x_command, display_command, printf_command)
642         (output_command, set_command, call_command, print_command)
643         (eval_command): Constify.
644         (non_const_set_command): Remove.
645         (_initialize_printcmd): Update.
646         * source.c (forward_search_command, reverse_search_command):
647         Constify.
648         * jit.c (jit_reader_load_command, jit_reader_unload_command):
649         Constify.
650         * infrun.c (handle_command): Constify.
651         * memattr.c (mem_command): Constify.
652         * stack.c (return_command, up_command, up_silently_command)
653         (down_command, down_silently_command, frame_command)
654         (backtrace_command, func_command, backtrace_command_1): Constify.
655         (backtrace_command): Add non-const overload.
656         * remote-sim.c (simulator_command): Constify.
657         * exec.c (set_section_command): Constify.
658         * tracepoint.c (tdump_command, trace_variable_command)
659         (tstatus_command, tstop_command, tstart_command)
660         (end_actions_pseudocommand, while_stepping_pseudocommand)
661         (collect_pseudocommand, teval_pseudocommand, actions_command)
662         (start_tracing, stop_tracing): Constify.
663         * value.c (init_if_undefined_command): Constify.
664         * tui/tui-stack.c (tui_update_command): Constify.
665         * tui/tui-win.c (tui_refresh_all_command)
666         (tui_set_tab_width_command, tui_set_win_height_command)
667         (tui_set_focus_command, tui_scroll_forward_command)
668         (tui_scroll_backward_command, tui_scroll_left_command)
669         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
670         (tui_set_win_height): Constify.
671         * tui/tui-layout.c (tui_layout_command): Constify.
672         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
673         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
674         (proc_untrace_sysexit_cmd): Constify.
675         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
676         (threadset_test_cmd, threadlist_update_test_cmd)
677         (threadalive_test): Constify.
678         * objc-lang.c (print_object_command): Constify.
679         * command.h (add_com): Constify.
680         * cli/cli-dump.c (restore_command): Constify.
681         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
682         (help_command, complete_command, shell_command, edit_command)
683         (list_command, disassemble_command, make_command)
684         (apropos_command, alias_command): Constify.
685         * cli/cli-script.c (document_command, define_command)
686         (while_command, if_command, validate_comname): Constify.
687         * cli/cli-decode.c (struct cmd_list_element): Change type of
688         "fun".
689         * target.c (do_monitor_command, flash_erase_command): Constify.
690         * regcache.c (reg_flush_command): Constify.
691         * reverse.c (reverse_step, reverse_next, reverse_stepi)
692         (reverse_nexti, reverse_continue, reverse_finish)
693         (save_bookmark_command, goto_bookmark_command)
694         (exec_reverse_once): Constify.
695         * python/python.c (python_interactive_command, python_command):
696         Constify.
697         * typeprint.c (ptype_command, whatis_command, whatis_exp):
698         Constify.
699         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
700         * gcore.c (gcore_command): Constify.
701
702 2017-11-07  Tom Tromey  <tom@tromey.com>
703
704         * printcmd.c (x_command): Call set_repeat_arguments.
705         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
706         * top.c (repeat_arguments): New global.
707         (set_repeat_arguments): New function.
708         (execute_command): Handle repeat_arguments.
709         (show_commands): Calls set_repeat_arguments.
710         * command.h (set_repeat_arguments): Declare.
711
712 2017-11-07  Tom Tromey  <tom@tromey.com>
713
714         * stack.c (backtrace_command): Use std::string.
715         (backtrace_command_1): Make "count_exp" const.
716
717 2017-11-07  Tom Tromey  <tom@tromey.com>
718
719         * source.c (directory_switch, mod_path, add_path): Constify.
720         * defs.h (add_path, mod_path, directory_switch): Constify.
721         * mi/mi-cmd-env.c (env_mod_path): Constify.
722
723 2017-11-07  Tom Tromey  <tom@tromey.com>
724
725         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
726         (run_command_1, continue_command, step_1, jump_command)
727         (signal_command, until_command, advance_command, finish_command)
728         (attach_command): Update.
729
730 2017-11-07  Tom Tromey  <tom@tromey.com>
731
732         * command.h (set_cmd_cfunc): Don't declare.
733         * cli/cli-decode.c (set_cmd_cfunc): Now static.
734
735 2017-11-07  Tom Tromey  <tom@tromey.com>
736
737         * stack.c (select_frame_command): Constify.
738         * cli/cli-decode.c (add_com_suppress_notification): Constify.
739         * command.h (add_com_suppress_notification): Constify.
740
741 2017-11-07  Tom Tromey  <tom@tromey.com>
742
743         * breakpoint.c (stop_command): Constify.
744         * cli/cli-decode.c (struct cmd_list_element): Constify.
745         * command.h (add_abbrev_prefix_cmd): Constify.
746
747 2017-11-07  Pedro Alves  <palves@redhat.com>
748
749         * breakpoint.c (extract_bp_kind): New enum.
750         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
751         factored out from ...
752         (extract_bp_number_and_location): ... here.
753         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
754
755 2017-11-07  Pedro Alves  <palves@redhat.com>
756
757         * breakpoint.c (extract_bp_number_and_location): Change return
758         type to void.  Throw error instead of warning.
759         (enable_disable_command): Adjust.
760
761 2017-11-07  Xavier Roirand  <roirand@adacore.com>
762             Pedro Alves  <palves@redhat.com>
763
764         * breakpoint.c (map_breakpoint_number_range): New, factored out
765         from ...
766         (map_breakpoint_numbers): ... here.
767         (find_location_by_number): Change parameters from string to
768         breakpoint number and location.
769         (extract_bp_number_and_location): New function.
770         (enable_disable_bp_num_loc)
771         (enable_disable_breakpoint_location_range)
772         (enable_disable_command): New functions, factored out ...
773         (enable_command, disable_command): ... these functions, and
774         adjusted to support ranges.
775         * NEWS: Document enable/disable breakpoint location range feature.
776
777 2017-11-06  Luis Machado  <luis.machado@linaro.org>
778
779         * MAINTAINERS (Write After Approval): Update my e-mail address.
780
781 2017-11-06  Pedro Alves  <palves@redhat.com>
782
783         * gnu-nat.c (gnu_terminal_init): Delete.
784         (gnu_target): Don't install gnu_terminal_init.
785         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
786         (child_terminal_init): ... this function.
787
788 2017-11-06  Pedro Alves  <palves@redhat.com>
789
790         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
791         sgtty.h.
792         * config.in, configure: Regenerate.
793
794 2017-11-06  Pedro Alves  <palves@redhat.com>
795
796         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
797         (async_init_signals): Adjust.
798         (handle_stop_sig): Rename to ...
799         (handle_sigtstp): ... this.
800         (async_stop_sig): Rename to ...
801         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
802         SIGTSTP path.
803         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
804         instead of STOP_SIGNAL thoughout.
805         (handle_stop_sig): Rename to ...
806         (handle_sigtstp): ... this.
807         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
808
809 2017-11-06  Pedro Alves  <palves@redhat.com>
810
811         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
812         longer set flags twice in row.
813
814 2017-11-06  Pedro Alves  <palves@redhat.com>
815
816         * Makefile.in (SER_HARDWIRE): Update comment.
817         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
818         * common/gdb_termios.h: Delete file.
819         * common/job-control.c: Include termios.h and unistd.h instead of
820         gdb_termios.h.
821         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
822         check.
823         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
824         Remove sgtty code.
825         * configure.ac: No longer check for termio.h and sgtty.h.
826         * configure: Regenerate.
827         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
828         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
829         Replace PROCESS_GROUP_TYPE references with pid_t references
830         throughout.
831         (gdb_getpgrp): Delete.
832         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
833         (child_terminal_inferior): Remove comment.  Remove sgtty code.
834         (child_terminal_ours_1): Use tcgetpgrp directly instead of
835         gdb_getpgrp.  Use serial_set_tty_state instead aof
836         serial_noflush_set_tty_state.  Remove sgtty code.
837         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
838         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
839         (inferior_process_group): Now returns pid_t.
840         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
841         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
842         * ser-event.c (serial_event_ops): Update.
843         * ser-go32.c (dos_noflush_set_tty_state): Delete.
844         (dos_ops): Update.
845         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
846         * ser-pipe.c (pipe_ops): Update.
847         * ser-tcp.c (tcp_ops): Update.
848         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
849         HAVE_TERMIOS checks.
850         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
851         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
852         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
853         assume termios.
854         (hardwire_noflush_set_tty_state): Delete.
855         (hardwire_print_tty_state, hardwire_drain_output)
856         (hardwire_flush_output, hardwire_flush_input)
857         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
858         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
859         code, and assume termios.
860         (hardwire_ops): Update.
861         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
862         * serial.c (serial_noflush_set_tty_state): Delete.
863         * serial.h (serial_noflush_set_tty_state): Delete.
864         (serial_ops::noflush_set_tty_state): Delete.
865
866 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
867
868         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
869         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
870         (COMMON_OBS): Remove doublest.o and dfp.o.
871         Do not build target-float.c (instead of doublest.c)
872         with -Wformat-nonliteral.
873
874         * doublest.c: Remove file.
875         * doublest.h: Remove file.
876         * dfp.c: Remove file.
877         * dfp.h: Remove file.
878
879         * target-float.c: Do not include "doublest.h" and "dfp.h".
880         (DOUBLEST): Move here from doublest.h.
881         (enum float_kind): Likewise.
882         (FLOATFORMAT_CHAR_BIT): Likewise.
883         (FLOATFORMAT_LARGEST_BYTES): Likewise.
884         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
885         (floatformat_precision): Likewise.
886         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
887         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
888         Likewise.
889         (host_float_format, host_double_format, host_long_double_format):
890         Likewise.
891         (floatformat_to_string, floatformat_from_string): Likewise.
892         (floatformat_to_doublest): Likewise.  Also, inline the original
893         convert_floatformat_to_doublest.
894         (floatformat_from_doublest): Likewise.  Also, inline the original
895         convert_floatformat_from_doublest.
896
897         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
898         (MAX_DECIMAL_STRING): Move here from dfp.c.
899         (match_endianness): Likewise.
900         (set_decnumber_context, decimal_check_errors): Likewise.
901         (decimal_from_number, decimal_to_number): Likewise.
902         (decimal_to_string, decimal_from_string): Likewise.  Make static.
903         (decimal_from_longest, decimal_from_ulongest): Likewise.
904         (decimal_to_longest): Likewise.
905         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
906         (decimal_convert): Likewise.
907
908 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
909
910         * doublest.c: Do not include "gdbtypes.h".
911         (extract_typed_floating): Remove.
912         (store_typed_floating): Remove.
913         (convert_typed_floating): Remove.
914         * doublest.h (struct type): Remove.
915         (DOUBLEST_PRINT_FORMAT): Remove.
916         (DOUBLEST_SCAN_FORMAT): Remove.
917         (extract_typed_floating): Remove.
918         (store_typed_floating): Remove.
919         (convert_typed_floating): Remove.
920
921         * dfp.c (decimal_from_doublest): Remove.
922         (decimal_to_doublest): Remove.
923         * dfp.h: Do not include "doublest.h".
924         (decimal_from_doublest): Remove.
925         (decimal_to_doublest): Remove.
926
927         * value.c: Do not include "doublest.h" and "dfp.h".
928         (value_as_double): Remove.
929         (unpack_double): Remove.
930         (value_from_double): Remove.
931         (value_from_decfloat): Remove.
932         * value.h: Do not include "doublest.h".
933         (value_as_double): Remove.
934         (unpack_double): Remove.
935         (value_from_double): Remove.
936         (value_from_decfloat): Remove.
937
938 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
939
940         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
941         (i386_extract_return_value): Use target_float_convert.
942         (i386_store_return_value): Likewise.
943         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
944         (i387_value_to_register): Likewise.
945         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
946         (ia64_register_to_value): Use target_float_convert.
947         (ia64_value_to_register): Likewise.
948         (ia64_extract_return_value): Likewise.
949         (ia64_store_return_value): Likewise.
950         (ia64_push_dummy_call): Likewise.
951         * m68k-tdep.c: Include "target-float.h".
952         (m68k_register_to_value): Use target_float_convert.
953         (m68k_value_to_register): Likewise.
954         (m68k_svr4_extract_return_value): Likewise.
955         (m68k_svr4_store_return_value): Likewise.
956         * ppc-sysv-tdep.c: Include "target-float.h".
957         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
958         (do_ppc_sysv_return_value): Likewise.
959         (ppc64_sysv_abi_push_freg): Likewise.
960         (ppc64_sysv_abi_return_value_base): Likewise.
961         * rs6000-aix-tdep.c: Include "target-float.h".
962         (rs6000_push_dummy_call): Use target_float_convert.
963         (rs6000_return_value): Likewise.
964         * rs6000-lynx178-tdep.c: Include "target-float.h".
965         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
966         (rs6000_lynx178_return_value): Likewise.
967         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
968         (rs6000_register_to_value): Use target_float_convert.
969         (rs6000_value_to_register): Likewise.
970         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
971         (arm_extract_return_value): Use target_float_convert.
972         (arm_store_return_value): Likewise.
973         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
974         (sh_register_convert_to_virtual): Use target_float_convert.
975         (sh_register_convert_to_raw): Likewise.
976         * sh64-tdep.c: Include "target-float.h".
977         (sh64_extract_return_value): Use target_float_convert.
978         (sh64_register_convert_to_virtual): Likewise.
979         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
980
981 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
982
983         * target-float.c (floatformat_to_host_double): New function.
984         (floatformat_from_host_double): Likewise.
985         (target_float_to_host_double): Likewise.
986         (target_float_from_host_double): Likewise.
987         * target-float.h (target_float_to_host_double): Add prototype.
988         (target_float_from_host_double): Likewise.
989
990         * guile/scm-value.c: Include "target-float.h".
991         (gdbscm_value_to_real): Use target_float_to_host_double.
992         Handle integer source values via value_as_long.
993         * guile/scm-math.c: Include "target-float.h".  Do not include
994         "doublest.h", "dfp.h", and "expression.h".
995         (vlscm_convert_typed_number): Use target_float_from_host_double.
996         (vlscm_convert_number): Likewise.
997
998         * python/py-value.c (valpy_float): Use target_float_to_host_double.
999         (convert_value_from_python): Use target_float_from_host_double.
1000
1001 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1002
1003         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1004         (cast_from_fixed): Likewise.
1005         (ada_scaling_type): New function.
1006         (ada_delta): Return value instead of DOUBLEST.  Perform target
1007         arithmetic instead of host arithmetic.
1008         (scaling_factor): Rename to ...
1009         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
1010         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
1011         (ada_fixed_to_float): Remove.
1012         (ada_float_to_fixed): Remove.
1013         * ada-lang.h (ada_fixed_to_float): Remove.
1014         (ada_float_to_fixed): Remove.
1015         (ada_delta): Return value instead of DOUBLEST.
1016         (ada_scaling_factor): Add prototype.
1017
1018         * ada-typeprint.c: Include "target-float.h".
1019         (print_fixed_point_type): Perform target arithmetic instead of
1020         host arithmetic.
1021         * ada-valprint.c: Include "target-float.h".
1022         (ada_val_print_num): Perform target arithmetic instead of
1023         host arithmetic for fixed-point types.
1024
1025 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1026
1027         * target-float.c: Include <math.h>.
1028         (floatformat_binop): New function.
1029         (floatformat_compare): Likewise.
1030         (target_float_binop): Likewise.
1031         (target_float_compare): Likewise.
1032         * target-float.h: Include "expression.h".
1033         (target_float_binop): Add prototype.
1034         (target_float_compare): Likewise.
1035
1036         * valarith.c: Do not include "doublest.h" and "dfp.h".
1037         Include "common/byte-vector.h".
1038         (value_args_as_decimal): Remove, replace by ...
1039         (value_args_as_target_float): ... this function.  Handle both
1040         binary and decimal target floating-point formats.
1041         (scalar_binop): Handle both binary and decimal FP using
1042         value_args_as_target_float and target_float_binop.
1043         (value_equal): Handle both binary and decimal FP using
1044         value_args_as_target_float and target_float_compare.
1045         (value_less): Likewise.
1046         (value_pos): Handle all scalar types as simple copy.
1047         (value_neg): Handle all scalar types via BINOP_SUB from 0.
1048         * dfp.c (decimal_binop): Throw error instead of internal_error
1049         when called with an unsupported operation code.
1050
1051 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1052
1053         * target-float.c (target_float_to_string): New function.
1054         (target_float_from_string): New function.
1055         * target-float.h (target_float_to_string): Add prototype.
1056         (target_float_from_string): Add prototype.
1057
1058         * valprint.c: Include "target-float.h".  Do not include
1059         "doublest.h" and "dfp.h".
1060         (print_floating): Use target_float_to_string.
1061         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
1062         (printf_floating): Use target_float_to_string.
1063         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1064         (print_i387_value): Use target_float_to_string.
1065         * mips-tdep.c: Include "target-float.h".
1066         (mips_print_fp_register): Use target_float_to_string.
1067         * sh64-tdep.c: Include "target-float.h".
1068         (sh64_do_fp_register): Use target_float_to_string.
1069
1070         * parse.c: Include "target-float.h".  Do not include
1071         "doublest.h" and "dfp.h".
1072         (parse_float): Use target_float_from_string.
1073         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
1074         (define_symbol): Use target_float_from_string.
1075         * gdbarch-selftests.c: Include "target-float.h".
1076         (register_to_value_test): Use target_float_from_string.
1077
1078 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1079
1080         * Makefile.c (SFILES): Add target-float.c.
1081         (HFILES_NO_SRCDIR): Add target-float.h.
1082         (COMMON_OBS): Add target-float.o.
1083         * target-float.h: New file.
1084         * target-float.c: New file.
1085
1086         * doublest.c (floatformat_classify): Fix detection of float_zero.
1087
1088         * gdbtypes.c (is_floating_type): New function.
1089         * gdbtypes.h (is_floating_type): Add prototype.
1090
1091         * value.c: Do not include "floatformat.h".
1092         (unpack_double): Use target_float_is_valid.
1093         (is_floating_value): New function.
1094         * value.h (is_floating_value): Add prototype-
1095
1096         * valarith.c: Include "target-float.h".
1097         (value_logical_not): Use target_float_is_zero.
1098
1099         * python/py-value.c: Include "target-float.h".
1100         (valpy_nonzero): Use target_float_is_zero.
1101
1102 2017-11-04  Tom Tromey  <tom@tromey.com>
1103
1104         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1105
1106 2017-11-04  Tom Tromey  <tom@tromey.com>
1107
1108         * breakpoint.c (set_momentary_breakpoint): Return
1109         breakpoint_up.
1110         (until_break_command): Update.
1111         (new_until_break_fsm): Change argument types to
1112         breakpoint_up.
1113         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1114         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1115         Remove.
1116         * infcmd.c (finish_forward): Update.
1117         * breakpoint.h (set_momentary_breakpoint)
1118         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1119         (make_cleanup_delete_breakpoint): Remove.
1120         (struct breakpoint_deleter): New.
1121         (breakpoint_up): New typedef.
1122         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1123         (insert_exception_resume_breakpoint): Update.
1124         (insert_exception_resume_from_probe): Update.
1125         (insert_longjmp_resume_breakpoint): Update.
1126         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1127         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1128         * infcall.c (call_function_by_hand_dummy): Update
1129
1130 2017-11-04  Tom Tromey  <tom@tromey.com>
1131
1132         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1133
1134 2017-11-04  Tom Tromey  <tom@tromey.com>
1135
1136         * linux-tdep.c (linux_core_info_proc_mappings): Use
1137         gdb::def_vector.
1138         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
1139         "size" argument.
1140         (linux_corefile_thread): Update.
1141         (linux_make_corefile_notes): Remove unused variable.
1142
1143 2017-11-04  Tom Tromey  <tom@tromey.com>
1144
1145         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1146         gdb::byte_vector.
1147
1148 2017-11-04  Tom Tromey  <tom@tromey.com>
1149
1150         * objfiles.c (do_free_objfile_cleanup): Remove.
1151         * compile/compile-object-load.c (compile_object_load): Update.
1152         * objfiles.h (make_cleanup_free_objfile): Remove.
1153
1154 2017-11-04  Tom Tromey  <tom@tromey.com>
1155
1156         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1157         (adi_read_versions): Change "tags" to "gdb_byte *".
1158         (adi_print_versions): Likewise.
1159
1160 2017-11-04  Tom Tromey  <tom@tromey.com>
1161
1162         * breakpoint.c
1163         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1164         from start_rbreak_breakpoints.
1165         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1166         * breakpoint.h (class scoped_rbreak_breakpoints): New.
1167         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1168         * symtab.c (do_end_rbreak_breakpoints): Remove.
1169         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1170
1171 2017-11-04  Tom Tromey  <tom@tromey.com>
1172
1173         * cp-namespace.c (reset_directive_searched): Remove.
1174         (cp_lookup_symbol_via_imports): Use scoped_restore.
1175         * cp-support.c (reset_directive_searched): Remove.
1176         (make_symbol_overload_list_using): Use scoped_restore.
1177         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1178         (reset_directive_searched): Remove.
1179
1180 2017-11-04  Tom Tromey  <tom@tromey.com>
1181
1182         * symfile.c (find_separate_debug_file_by_debuglink): Use
1183         unique_xmalloc_ptr.
1184
1185 2017-11-04  Tom Tromey  <tom@tromey.com>
1186
1187         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1188         type of "info".
1189         (compute_stack_depth): Likewise.
1190         (do_compile_dwarf_expr_to_c): Use std::vector.
1191
1192 2017-11-04  Tom Tromey  <tom@tromey.com>
1193
1194         * compile/compile-object-load.c (link_callbacks_einfo): Use
1195         std::string.
1196
1197 2017-11-04  Tom Tromey  <tom@tromey.com>
1198
1199         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1200         Use scoped_free_pendings.
1201         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1202         scoped_free_pendings.
1203         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1204         (xcoff_initial_scan): Likewise.
1205         * buildsym.c (reset_symtab_globals): Update comment.
1206         (scoped_free_pendings): Rename from really_free_pendings.
1207         (prepare_for_building): Update comment.
1208         (buildsym_init): Likewise.
1209         * buildsym.h (class scoped_free_pendings): New class.
1210         (really_free_pendings): Don't declare.
1211
1212 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
1213
1214         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1215         output when converting a zero value to a special byteorder format.
1216
1217 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1218
1219         * frame.c (do_frame_register_read): Remove aspace.
1220         * jit.c (jit_frame_sniffer): Likwise.
1221         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1222         * regcache.c (regcache::regcache): Pass nullptr.
1223         (regcache_print): Caller updated.
1224         * regcache.h (regcache::regcache): Remove one constructor
1225         parameter aspace.
1226
1227 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1228
1229         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1230
1231 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1232
1233         * breakpoint.c (insert_single_step_breakpoints): Update.
1234         * frame.c (struct frame_info) <aspace>: Add const.
1235         (frame_save_as_regcache): Add const.
1236         (get_frame_address_space): Return const address_space *.
1237         * frame.h (get_frame_address_space): Update declaration.
1238         * infrun.c (struct step_over_info) <aspace>: Add const.
1239         (set_step_over_info): Make aspace const.
1240         (displaced_step_prepare_throw): Change variable const.
1241         (resume): Likewise.
1242         (proceed): Likewise.
1243         (adjust_pc_after_break): Likewise.
1244         (save_waitstatus): Likewise.
1245         (handle_signal_stop): Likewise.
1246         (keep_going_pass_signal): Likewise.
1247         * jit.c (jit_frame_sniffer): Add const.
1248         * mips-tdep.c (mips_single_step_through_delay): Likewise.
1249         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1250         * record-full.c (record_full_wait_1): Likewise.
1251         * regcache.c (regcache::regcache): Change parameter to const.
1252         * regcache.h (regcache::regcache): Likewise.
1253         (regcache::aspace): Return const address_space *.
1254         (regcache) <m_aspace>: Add const.
1255
1256 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1257
1258         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1259         * frame.c (create_sentinel_frame): Likewise.
1260         * infrun.c (displaced_step_prepare_throw): Likewise.
1261         (resume): Likewise.
1262         (thread_still_needs_step_over_bp): Likewise.
1263         (proceed): Likewise.
1264         (do_target_wait): Likewise.
1265         (adjust_pc_after_break): Likewise.
1266         (handle_syscall_event): Likewise.
1267         (save_waitstatus): Likewise.
1268         (handle_inferior_event_1): Likewise.
1269         (handle_signal_stop): Likewise.
1270         (keep_going_pass_signal): Likewise.
1271         * linux-nat.c (status_callback): Likewise.
1272         (save_stop_reason): Likewise.
1273         (resume_stopped_resumed_lwps): Likewise.
1274         * record-full.c (record_full_exec_insn): Likewise.
1275         (record_full_wait_1): Likewise.
1276         * regcache.c (get_regcache_aspace): Remove.
1277         * regcache.h (get_regcache_aspace): Remove.
1278
1279 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1280
1281         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1282         (init_regcache_descr): Use gdbarch_num_regs.
1283         (regcache::regcache): Likewise.
1284         (regcache::get_register_status): Likewise.
1285         (regcache::assert_raw_regnum): Likewise.
1286         (regcache::cooked_read): Likewise.
1287         (regcache::cooked_read_value): Likewise.
1288         (regcache::cooked_write): Likewise.
1289         (regcache::dump): Likewise.
1290         (regcache::num_raw_registers): New method.
1291         * regcache.h (class regcache) <num_raw_registers>: New.
1292
1293 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1294
1295         * regcache.c (regcache::assert_regnum): New method.
1296         (regcache::invalidate): Call assert_regnum.
1297         (regcache::raw_update): Likewise.
1298         (regcache::raw_write): Likewise.
1299         (regcache::raw_read_part): Likewise.
1300         (regcache::raw_write_part): Likewise.
1301         (regcache::raw_supply): Likewise.
1302         (regcache::raw_supply_integer): Likewise.
1303         (regcache::raw_supply_zeroed): Likewise.
1304         (regcache::raw_collect): Likewise.
1305         (regcache::raw_collect_integer): Likewise.
1306         * regcache.h (regcache::assert_regnum): Declare.
1307
1308 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1309
1310         * regcache.c (regcache::dump): Remove code.
1311
1312 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1313
1314         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1315         Remove.
1316         <sizeof_cooked_register_status>: Remove.
1317         (init_regcache_descr): Update.
1318         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1319         (regcache::save): Likewise.
1320         (regcache::dump): Likewise.
1321
1322 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
1323
1324         * ft32-tdep.c (ft32_fetch_instruction): New function.
1325         (ft32_analyze_prologue): Use ft32_fetch_instruction().
1326
1327 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
1328
1329         * cli/cli-script.c (execute_control_command): Rename to ...
1330         (execute_control_command_1): ... this.
1331         (execute_control_command): New function.
1332
1333 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
1334
1335         * tracepoint.c (tfind_command): Remove const_cast.
1336
1337 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
1338
1339         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1340
1341 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
1342
1343         * common/common-utils.h (in_inclusive_range): New function.
1344         * arm-tdep.c (arm_record_extension_space): Use
1345         in_inclusive_range.
1346         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1347         * cris-tdep.c (cris_spec_reg_applicable): Use
1348         in_inclusive_range.
1349
1350 2017-10-30  Pedro Alves  <palves@redhat.com>
1351             Simon Marchi <simon.marchi@ericsson.com>
1352
1353         * remote.c (remote_set_syscall_catchpoint): Build a std::string
1354         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1355
1356 2017-10-30  Pedro Alves  <palves@redhat.com>
1357
1358         * common/common-utils.c (string_appendf, string_vappendf): New
1359         functions.
1360         * common/common-utils.h (string_appendf, string_vappendf): New
1361         declarations.
1362         * unittests/common-utils-selftests.c (string_appendf_func)
1363         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1364         (string_vappendf_tests): New functions.
1365         (_initialize_common_utils_selftests): Register "string_appendf" and
1366         "string_vappendf tests".
1367
1368 2017-10-30  Pedro Alves  <palves@redhat.com>
1369
1370         * unittests/common-utils-selftests.c (format_func): New typedef.
1371         (string_printf_tests, string_vprintf_tests): Tests factored out
1372         and merged to ...
1373         (test_format_func): ... this new function.
1374         (string_printf_tests, string_vprintf_tests): Reimplement on top of
1375         test_format_func.
1376
1377 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1378
1379         * darwin-nat.c: Remove include of gdb.h.
1380
1381 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1382
1383         * xtensa-xtregs.c: Fix formatting issues.
1384
1385 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1386
1387         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1388
1389 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
1390
1391         PR python/21213
1392         * python/py-infthread.c (thpy_get_inferior): Increment reference
1393         of inferior before returning it.
1394
1395 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1396
1397         * unittests/common-utils-selftests.c (format): Add
1398         ATTRIBUTE_PRINTF.
1399
1400 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1401
1402         * xml-syscall.c (struct syscall_desc): Add constructor.
1403         <name>: Change type to std::string.
1404         (syscall_desc_up): New typedef.
1405         (syscall_desc_p): Remove typeder.
1406         (DEF_VEC_P(syscall_desc_p)): Remove.
1407         (struct syscall_group_desc): Add constructor.
1408         <name>: Change type to std::string.
1409         <syscalls>: Change type to std::vector.
1410         (syscall_group_desc_up): New typedef.
1411         (syscall_group_desc_p): Remove typedef.
1412         (DEF_VEC_P(syscall_group_desc_p)): Remove.
1413         (struct syscalls_info) <syscalls>: Change type to std::vector of
1414         unique_ptr.
1415         <groups>: Likewise.
1416         <my_gdb_datadir>: Change type to std::string.
1417         (syscalls_info_up): New typedef.
1418         (allocate_syscalls_info): Remove.
1419         (syscalls_info_free_syscalls_desc): Remove.
1420         (syscalls_info_free_syscall_group_desc): Remove.
1421         (free_syscalls_info): Remove.
1422         (make_cleanup_free_syscalls_info): Remove.
1423         (syscall_group_create_syscall_group_desc): Adjust.
1424         (syscall_group_add_syscall): Adjust.
1425         (syscall_create_syscall_desc): Adjust.
1426         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1427         (init_syscalls_info): Adjust.
1428         (syscall_group_get_group_by_name): Adjust.
1429         (xml_get_syscall_number): Adjust.
1430         (xml_get_syscall_name): Adjust.
1431         (xml_list_of_syscalls): Adjust.
1432         (xml_list_syscalls_by_group): Adjust.
1433         (xml_list_of_groups): Adjust.
1434
1435 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1436
1437         * probe.h: Don't include gdb_vecs.h.
1438         (DEF_VEC_P (probe_p)): Remove.
1439         (find_probes_in_objfile): Return an std::vector.
1440         * probe.c (find_probes_in_objfile): Likewise.
1441         * breakpoint.c (breakpoint_objfile_data)
1442         <longjmp_probes>: Change type to std::vector.
1443         <exception_probes>: Likewise.
1444         (free_breakpoint_probes): Don't manually free vectors.
1445         (create_longjmp_master_breakpoint): Adjust.
1446         (create_exception_master_breakpoint): Adjust.
1447         * solib-svr4.c (svr4_create_probe_breakpoints): Change
1448         parameter type, adjust.
1449         (svr4_create_solib_event_breakpoints): Adjust.
1450
1451 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1452
1453         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1454         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1455         with new.
1456         (free_breakpoint_probes): Rename to ...
1457         (free_breakpoint_objfile_data): ... this, and call delete on
1458         bp_objfile_data..
1459
1460 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1461
1462         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1463         (loaded_script_ptr): Remove typedef.
1464         (DEF_VEC_P (loaded_script_ptr)): Remove.
1465         (struct collect_matching_scripts_data): Add constructor.
1466         <scripts_p>: Change type to (pointer to) std::vector.
1467         (collect_matching_scripts_data): Adjust.
1468         (sort_scripts_by_name): Make suitable for std::sort.
1469         (print_scripts): Don't sort vector, adjust to std::vector.
1470         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1471
1472 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1473
1474         * symfile.c (filename_language): Make struct, not typedef.  Add
1475         constructor.
1476         <ext>: Change type to std::string.
1477         (DEF_VEC_O (filename_language)): Remove.
1478         (filename_language_table): Change type to std::vector.
1479         (add_filename_language): Adjust.
1480         (set_ext_lang_command): Adjust.
1481         (info_ext_lang_command): Adjust.
1482         (deduce_language_from_filename): Adjust.
1483         (class scoped_restore_filename_language_table): Remove.
1484         (test_filename_language): Use scoped_restore.
1485         (test_set_ext_lang_command): Use scoped_restore, adjust to
1486         std::vector change.
1487
1488 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1489
1490         * symfile.c: Include selftest.h.
1491         (class scoped_restore_filename_language_table): New.
1492         (test_filename_language): New test.
1493         (test_set_ext_lang_command): New test.
1494         (_initialize_symfile): Register tests.
1495
1496 2017-10-27  Keith Seitz  <keiths@redhat.com>
1497
1498         * breakpoint.c (print_breakpoint_location): Use the symbol saved
1499         in the bp_location, falling back to find_pc_sect_function when
1500         needed.
1501         (add_location_to_breakpoint): Save sal->symbol.
1502         * breakpoint.h (struct bp_location) <symbol>: New field.
1503         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1504         * symtab.h (struct symtab_and_line) <symbol>: New field.
1505
1506 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
1507
1508         PR gdb/13669
1509         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1510         to rewind obstack.
1511
1512 2017-10-26  Pedro Alves  <palves@redhat.com>
1513
1514         * remote.c (remote_async_terminal_ours_p): Delete.
1515         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1516         Remove references to 'remote_async_terminal_ours_p'.
1517
1518 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1519
1520         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1521
1522 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1523
1524         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1525         aspace const.
1526         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1527         Likewise.
1528         * breakpoint.c (bpstat_check_location): Remove cast.
1529         (breakpoint_hit_catch_fork): Make aspce const.
1530         (breakpoint_hit_catch_solib): Likewise.
1531         (breakpoint_hit_catch_exec): Likewise.
1532         (breakpoint_hit_ranged_breakpoint): Likewise.
1533         (breakpoint_hit_watchpoint): Likewise.
1534         (base_breakpoint_breakpoint_hit): Likewise.
1535         (bkpt_breakpoint_hit): Likewise.
1536         (dprintf_breakpoint_hit): Likewise.
1537         (tracepoint_breakpoint_hit): Likewise.
1538         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1539
1540 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1541
1542         * breakpoint.c (breakpoint_location_address_match): Change
1543         "struct address_space *" to "const address_space".
1544         (breakpoint_location_address_range_overlap): Likewise.
1545         (breakpoint_here_p): Likewise.
1546         (breakpoint_in_range_p): Likewise.
1547         (moribund_breakpoint_here_p): Likewise.
1548         (bp_location_inserted_here_p): Likewise.
1549         (software_breakpoint_inserted_here_p): Likewise.
1550         (hardware_breakpoint_inserted_here_p): Likewise.
1551         (hardware_watchpoint_inserted_in_range): Likewise.
1552         (bpstat_check_location): Likewise.
1553         (bpstat_stop_status): Likewise.
1554         (breakpoint_address_match): Likewise.
1555         (breakpoint_address_match_range): Likewise.
1556         (breakpoint_location_address_match): Likewise.
1557         (breakpoint_location_address_range_overlap): Likewise.
1558         (insert_single_step_breakpoint): Likewise.
1559         (breakpoint_has_location_inserted_here): Likewise.
1560         (single_step_breakpoint_inserted_here_p): Likewise.
1561         (pc_at_non_inline_function): Likewise.
1562         * breakpoint.h (bpstat_stop_status): Update declaration.
1563         (breakpoint_here_p): Likewise.
1564         (breakpoint_in_range_p): Likewise.
1565         (moribund_breakpoint_here_p): Likewise.
1566         (breakpoint_inserted_here_p): Likewise.
1567         (software_breakpoint_inserted_here_p): Likewise.
1568         (hardware_breakpoint_inserted_here_p): Likewise.
1569         (breakpoint_has_location_inserted_here): Likewise.
1570         (single_step_breakpoint_inserted_here_p): Likewise.
1571         (hardware_watchpoint_inserted_in_range): Likewise.
1572         (breakpoint_address_match): Likewise.
1573         (insert_single_step_breakpoint): Likewise.
1574         (pc_at_non_inline_function): Likewise.
1575         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1576         * record.c (record_check_stopped_by_breakpoint): Likewise.
1577         * record.h (record_check_stopped_by_breakpoint): Likewise.
1578         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1579
1580 2017-10-25  Yao Qi  <yao.qi@linaro.org>
1581
1582         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1583         regcache->arch () instead get_regcache_arch.
1584         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1585         Likewise.
1586         (aarch64_fbsd_store_inferior_registers): Likewise.
1587         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1588         (store_gregs_to_thread): Likewise.
1589         (fetch_fpregs_from_thread): Likewise.
1590         (store_fpregs_to_thread): Likewise.
1591         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1592         (aarch64_store_return_value): Likewise.
1593         (aarch64_software_single_step): Likewise.
1594         * aix-thread.c (aix_thread_wait): Likewise.
1595         (supply_reg32): Likewise.
1596         (supply_sprs64): Likewise.
1597         (supply_sprs32): Likewise.
1598         (fill_gprs64): Likewise.
1599         (fill_gprs32): Likewise.
1600         (fill_sprs64): Likewise.
1601         (fill_sprs32): Likewise.
1602         (store_regs_user_thread): Likewise.
1603         (store_regs_kernel_thread): Likewise.
1604         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1605         (alphabsd_store_inferior_registers): Likewise.
1606         * alpha-tdep.c (alpha_extract_return_value): Likewise.
1607         (alpha_store_return_value): Likewise.
1608         (alpha_deal_with_atomic_sequence): Likewise.
1609         (alpha_next_pc): Likewise.
1610         (alpha_software_single_step): Likewise.
1611         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1612         (amd64bsd_store_inferior_registers): Likewise.
1613         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1614         Likewise.
1615         (amd64_linux_store_inferior_registers): Likewise.
1616         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1617         (amd64_collect_native_gregset): Likewise.
1618         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1619         (amd64obsd_collect_uthread): Likewise.
1620         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1621         (amd64_collect_fpregset): Likewise.
1622         (amd64_supply_fxsave): Likewise.
1623         (amd64_supply_xsave): Likewise.
1624         (amd64_collect_fxsave): Likewise.
1625         (amd64_collect_xsave): Likewise.
1626         * arc-tdep.c (arc_write_pc): Likewise.
1627         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1628         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1629         (arm_fbsd_store_inferior_registers): Likewise.
1630         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1631         (store_vfp_regs): Likewise.
1632         (arm_linux_fetch_inferior_registers): Likewise.
1633         (arm_linux_store_inferior_registers): Likewise.
1634         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1635         (arm_linux_sigreturn_next_pc): Likewise.
1636         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1637         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1638         (fetch_register): Likewise.
1639         (store_register): Likewise.
1640         * arm-tdep.c (arm_is_thumb): Likewise.
1641         (displaced_in_arm_mode): Likewise.
1642         (bx_write_pc): Likewise.
1643         (arm_get_next_pcs_addr_bits_remove): Likewise.
1644         (arm_software_single_step): Likewise.
1645         (arm_extract_return_value): Likewise.
1646         (arm_store_return_value): Likewise.
1647         (arm_write_pc): Likewise.
1648         * bfin-tdep.c (bfin_extract_return_value): Likewise.
1649         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
1650         (bsd_uthread_store_registers): Likewise.
1651         * core-regset.c (fetch_core_registers): Likewise.
1652         * corelow.c (get_core_registers): Likewise.
1653         * cris-tdep.c (cris_store_return_value): Likewise.
1654         (cris_extract_return_value): Likewise.
1655         (find_step_target): Likewise.
1656         (find_step_target): Likewise.
1657         (cris_software_single_step): Likewise.
1658         * ctf.c (ctf_fetch_registers): Likewise.
1659         * darwin-nat.c (cancel_breakpoint): Likewise.
1660         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
1661         * frv-tdep.c (frv_extract_return_value): Likewise.
1662         * ft32-tdep.c (ft32_store_return_value): Likewise.
1663         (ft32_extract_return_value): Likewise.
1664         * go32-nat.c (fetch_register): Likewise.
1665         (go32_fetch_registers): Likewise.
1666         (go32_store_registers): Likewise.
1667         (store_register): Likewise.
1668         * h8300-tdep.c (h8300_extract_return_value): Likewise.
1669         (h8300_store_return_value): Likewise.
1670         * hppa-linux-nat.c (fetch_register): Likewise.
1671         (store_register): Likewise.
1672         (hppa_linux_fetch_inferior_registers): Likewise.
1673         (hppa_linux_store_inferior_registers): Likewise.
1674         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
1675         (i386_darwin_store_inferior_registers): Likewise.
1676         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
1677         (gnu_store_registers): Likewise.
1678         * i386-linux-nat.c (fetch_register): Likewise.
1679         (store_register): Likewise.
1680         (supply_gregset): Likewise.
1681         (fill_gregset): Likewise.
1682         (i386_linux_fetch_inferior_registers): Likewise.
1683         (i386_linux_store_inferior_registers): Likewise.
1684         (i386_linux_resume): Likewise.
1685         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
1686         Likewise.
1687         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
1688         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
1689         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
1690         (i386obsd_collect_uthread): Likewise.
1691         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1692         (i386_supply_gregset): Likewise.
1693         (i386_collect_gregset): Likewise.
1694         (i386_supply_fpregset): Likewise.
1695         (i386_collect_fpregset): Likewise.
1696         (i386_mpx_bd_base): Likewise.
1697         * i386-v4-nat.c (supply_fpregset): Likewise.
1698         (fill_fpregset): Likewise.
1699         * i387-tdep.c (i387_supply_fsave): Likewise.
1700         (i387_collect_fsave): Likewise.
1701         (i387_supply_fxsave): Likewise.
1702         (i387_collect_fxsave): Likewise.
1703         (i387_supply_xsave): Likewise.
1704         (i387_collect_xsave): Likewise.
1705         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
1706         (ia64_linux_store_registers): Likewise.
1707         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
1708         (ia64_extract_return_value): Likewise.
1709         (ia64_store_return_value): Likewise.
1710         (find_func_descr): Likewise.
1711         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
1712         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
1713         (inf_ptrace_store_registers): Likewise.
1714         * infrun.c (use_displaced_stepping): Likewise.
1715         (displaced_step_prepare_throw): Likewise.
1716         (resume): Likewise.
1717         (proceed): Likewise.
1718         (do_target_wait): Likewise.
1719         (adjust_pc_after_break): Likewise.
1720         (handle_inferior_event_1): Likewise.
1721         (handle_signal_stop): Likewise.
1722         (save_infcall_suspend_state): Likewise.
1723         (restore_infcall_suspend_state): Likewise.
1724         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
1725         * jit.c (jit_frame_prev_register): Likewise.
1726         * linux-nat.c (save_stop_reason): Likewise.
1727         (linux_nat_wait_1): Likewise.
1728         (resume_stopped_resumed_lwps): Likewise.
1729         * linux-record.c (record_linux_sockaddr): Likewise.
1730         (record_linux_msghdr): Likewise.
1731         (record_linux_system_call): Likewise.
1732         * linux-tdep.c (linux_collect_thread_registers): Likewise.
1733         * lm32-tdep.c (lm32_extract_return_value): Likewise.
1734         (lm32_store_return_value): Likewise.
1735         * m32c-tdep.c (m32c_read_flg): Likewise.
1736         (m32c_pseudo_register_read): Likewise.
1737         (m32c_pseudo_register_write): Likewise.
1738         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
1739         (m32r_linux_collect_gregset): Likewise.
1740         * m32r-tdep.c (m32r_store_return_value): Likewise.
1741         (m32r_extract_return_value): Likewise.
1742         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1743         (m68kbsd_collect_fpregset): Likewise.
1744         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
1745         * m68k-linux-nat.c (fetch_register): Likewise.
1746         (old_fetch_inferior_registers): Likewise.
1747         (old_store_inferior_registers): Likewise.
1748         (store_regs): Likewise.
1749         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
1750         (m68k_svr4_store_return_value): Likewise.
1751         * m88k-tdep.c (m88k_store_arguments): Likewise.
1752         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
1753         (mi_cmd_data_write_register_values): Likewise.
1754         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
1755         (mips_fbsd_store_inferior_registers): Likewise.
1756         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
1757         (mips_fbsd_supply_gregs): Likewise.
1758         (mips_fbsd_collect_fpregs): Likewise.
1759         (mips_fbsd_collect_gregs): Likewise.
1760         (mips_fbsd_supply_fpregset): Likewise.
1761         (mips_fbsd_collect_fpregset): Likewise.
1762         (mips_fbsd_supply_gregset): Likewise.
1763         (mips_fbsd_collect_gregset): Likewise.
1764         * mips-linux-nat.c (supply_gregset): Likewise.
1765         (fill_gregset): Likewise.
1766         (supply_fpregset): Likewise.
1767         (fill_fpregset): Likewise.
1768         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
1769         (mips_fill_gregset): Likewise.
1770         (mips_supply_fpregset): Likewise.
1771         (mips_fill_fpregset): Likewise.
1772         (mips64_supply_gregset): Likewise.
1773         (micromips_linux_sigframe_validate): Likewise.
1774         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
1775         (mipsnbsd_fetch_inferior_registers): Likewise.
1776         (mipsnbsd_store_inferior_registers): Likewise.
1777         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1778         (mipsnbsd_supply_gregset): Likewise.
1779         (mipsnbsd_iterate_over_regset_sections): Likewise.
1780         (mipsnbsd_supply_reg): Likewise.
1781         (mipsnbsd_supply_fpreg): Likewise.
1782         * mips-tdep.c (mips_in_frame_stub): Likewise.
1783         (mips_dummy_id): Likewise.
1784         (is_octeon_bbit_op): Likewise.
1785         (micromips_bc1_pc): Likewise.
1786         (extended_mips16_next_pc): Likewise.
1787         (mips16_next_pc): Likewise.
1788         (deal_with_atomic_sequence): Likewise.
1789         * moxie-tdep.c (moxie_process_readu): Likewise.
1790         * nios2-tdep.c (nios2_get_next_pc): Likewise.
1791         * nto-procfs.c (procfs_store_registers): Likewise.
1792         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
1793         (ppcfbsd_store_inferior_registers): Likewise.
1794         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
1795         (fetch_altivec_register): Likewise.
1796         (get_spe_registers): Likewise.
1797         (fetch_spe_register): Likewise.
1798         (fetch_altivec_registers): Likewise.
1799         (fetch_all_gp_regs): Likewise.
1800         (fetch_all_fp_regs): Likewise.
1801         (store_vsx_register): Likewise.
1802         (store_altivec_register): Likewise.
1803         (set_spe_registers): Likewise.
1804         (store_spe_register): Likewise.
1805         (store_altivec_registers): Likewise.
1806         (store_all_gp_regs): Likewise.
1807         (store_all_fp_regs): Likewise.
1808         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
1809         (ppc_linux_collect_gregset): Likewise.
1810         (ppc_canonicalize_syscall): Likewise.
1811         (ppc_linux_record_signal): Likewise.
1812         (ppu2spu_prev_register): Likewise.
1813         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
1814         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
1815         (ppcobsd_store_registers): Likewise.
1816         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
1817         Likewise.
1818         (ppc_ravenscar_generic_store_registers): Likewise.
1819         * procfs.c (procfs_fetch_registers): Likewise.
1820         (procfs_store_registers): Likewise.
1821         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
1822         (ravenscar_store_registers): Likewise.
1823         (ravenscar_prepare_to_store): Likewise.
1824         * record-btrace.c (record_btrace_fetch_registers): Likewise.
1825         * record-full.c (record_full_wait_1): Likewise.
1826         (record_full_registers_change): Likewise.
1827         (record_full_store_registers): Likewise.
1828         (record_full_core_fetch_registers): Likewise.
1829         (record_full_save): Likewise.
1830         (record_full_goto_insn): Likewise.
1831         * regcache.c (regcache_register_size): Likewise.
1832         (get_regcache_arch): Remove.
1833         (regcache_read_pc): Likewise.
1834         * regcache.h (get_regcache_arch): Remove.
1835         * remote-sim.c (gdbsim_fetch_register): Likewise.
1836         (gdbsim_store_register): Likewise.
1837         * remote.c (fetch_register_using_p): Likewise.
1838         (send_g_packet): Likewise.
1839         (remote_prepare_to_store): Likewise.
1840         (store_registers_using_G): Likewise.
1841         * reverse.c (save_bookmark_command): Likewise.
1842         (goto_bookmark_command): Likewise.
1843         * rs6000-aix-tdep.c (branch_dest): Likewise.
1844         * rs6000-nat.c (rs6000_ptrace64): Likewise.
1845         (fetch_register): Likewise.
1846         * rs6000-tdep.c (ppc_supply_reg): Likewise.
1847         (ppc_collect_reg): Likewise.
1848         (ppc_collect_gregset): Likewise.
1849         (ppc_collect_fpregset): Likewise.
1850         (ppc_collect_vsxregset): Likewise.
1851         (ppc_collect_vrregset): Likewise.
1852         (ppc_displaced_step_hw_singlestep): Likewise.
1853         (rs6000_pseudo_register_read): Likewise.
1854         (rs6000_pseudo_register_write): Likewise.
1855         * s390-linux-nat.c (supply_gregset): Likewise.
1856         (fill_gregset): Likewise.
1857         (s390_linux_fetch_inferior_registers): Likewise.
1858         * s390-linux-tdep.c (s390_write_pc): Likewise.
1859         (s390_software_single_step): Likewise.
1860         (s390_all_but_pc_registers_record): Likewise.
1861         (s390_linux_syscall_record): Likewise.
1862         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
1863         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
1864         (shnbsd_store_inferior_registers): Likewise.
1865         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
1866         (sh_extract_return_value_fpu): Likewise.
1867         (sh_store_return_value_nofpu): Likewise.
1868         (sh_corefile_supply_regset): Likewise.
1869         (sh_corefile_collect_regset): Likewise.
1870         * sh64-tdep.c (sh64_extract_return_value): Likewise.
1871         (sh64_store_return_value): Likewise.
1872         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
1873         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
1874         (sparc_store_inferior_registers): Likewise.
1875         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
1876         (sparc_ravenscar_prepare_to_store): Likewise.
1877         * sparc-tdep.c (sparc32_store_arguments): Likewise.
1878         (sparc_analyze_control_transfer): Likewise.
1879         (sparc_step_trap): Likewise.
1880         (sparc_software_single_step): Likewise.
1881         (sparc32_gdbarch_init): Likewise.
1882         (sparc_supply_rwindow): Likewise.
1883         (sparc_collect_rwindow): Likewise.
1884         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
1885         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
1886         (sparc64nbsd_collect_gregset): Likewise.
1887         (sparc64nbsd_supply_fpregset): Likewise.
1888         (sparc64nbsd_collect_fpregset): Likewise.
1889         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1890         (sparc64_supply_gregset): Likewise.
1891         (sparc64_collect_gregset): Likewise.
1892         (sparc64_supply_fpregset): Likewise.
1893         (sparc64_collect_fpregset): Likewise.
1894         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
1895         * spu-tdep.c (spu_unwind_sp): Likewise.
1896         (spu2ppu_prev_register): Likewise.
1897         (spu_memory_remove_breakpoint): Likewise.
1898         * stack.c (return_command): Likewise.
1899         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
1900         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
1901         * tracefile.c (trace_save_ctf): Likewise.
1902         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
1903         (do_windows_store_inferior_registers): Likewise.
1904         (windows_resume): Likewise.
1905         * xtensa-linux-nat.c (fill_gregset): Likewise.
1906         (supply_gregset_reg): Likewise.
1907         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
1908         (xtensa_register_read_masked): Likewise.
1909         (xtensa_supply_gregset): Likewise.
1910         (xtensa_extract_return_value): Likewise.
1911         (xtensa_store_return_value): Likewise.
1912
1913 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
1914
1915         * doublest.c (floatformat_from_string): New function.
1916         * doublest.h (floatformat_from_string): Add prototype.
1917
1918         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
1919         (OP_FLOAT): ... this.
1920         * expression.h: Do not include "doublest.h".
1921         (union exp_element): Replace doubleconst and decfloatconst by
1922         new element floatconst.
1923         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
1924         (ada_evaluate_subexp): Likewise.
1925         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
1926         OP_DOUBLE and OP_DECFLOAT.
1927         * expprint.c (print_subexp_standard): Likewise.
1928         (dump_subexp_body_standard): Likewise.
1929         * breakpoint.c (watchpoint_exp_is_const): Likewise.
1930
1931         * parse.c: Include "dfp.h".
1932         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1933         (write_exp_elt_floatcst): New function.
1934         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
1935         and OP_DECFLOAT.
1936         (operator_check_standard): Likewise.
1937         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
1938         Return target format buffer instead of host DOUBLEST.
1939         Use floatformat_from_string and decimal_from_string to parse
1940         either binary or decimal floating-point types.
1941         (parse_c_float): Remove.
1942         * parser-defs.h: Do not include "doublest.h".
1943         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1944         (write_exp_elt_floatcst): Add prototype.
1945         (parse_float): Update prototype.
1946         (parse_c_float): Remove.
1947
1948         * c-exp.y: Do not include "dfp.h".
1949         (typed_val_float): Use byte buffer instead of DOUBLEST.
1950         (typed_val_decfloat): Remove.
1951         (DECFLOAT): Remove.
1952         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1953         (parse_number): Update to new parse_float interface.
1954         Parse suffixes and determine type before calling parse_float.
1955         Handle decimal and binary FP types the same way.
1956
1957         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1958         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
1959         (parse_number): Update to new parse_float interface.
1960         Parse suffixes and determine type before calling parse_float.
1961
1962         * f-exp.y: Replace dval by typed_val_float.
1963         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1964         (parse_number): Use parse_float instead of atof.
1965
1966         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1967         (parse_go_float): Remove.
1968         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1969         (parse_number): Call parse_float instead of parse_go_float.
1970         Parse suffixes and determine type before calling parse_float.
1971
1972         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1973         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1974         (parse_number): Update to new parse_float interface.
1975         Parse suffixes and determine type before calling parse_float.
1976
1977         * m2-exp.y: Replace dval by byte buffer val.
1978         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1979         (parse_number): Call parse_float instead of atof.
1980
1981         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1982         (lex_number): Call parse_float instead of strtod.
1983         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
1984         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
1985         Use write_exp_elt_floatcst.
1986         (unit_testing): Remove static variable.
1987         (rust_type): Do not check unit_testing.
1988         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
1989
1990         * ada-exp.y (type_float, type_double): Remove.
1991         (typed_val_float): Use byte buffer instead of DOUBLEST.
1992         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1993         * ada-lex.l (processReal): Use parse_float instead of sscanf.
1994
1995 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
1996
1997         * aarch64-tdep.h (enum aarch64_regnum): Remove.
1998         * arch/aarch64.h: New file.
1999
2000 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2001
2002         * dfp.h (decimal_from_string): Use const reference for argument.
2003         * dfp.c (decimal_from_string): Likewise.
2004
2005 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2006
2007         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2008         * sh64-tdep.c (sh64_do_fp_register): Likewise.
2009         * mips-tdep.c (mips_print_fp_register): Likewise.
2010
2011 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2012
2013         * common/format.h (enum argclass): Replace decfloat_arg by
2014         dec32float_arg, dec64float_arg, and dec128float_arg.
2015         * common/format.c (parse_format_string): Update to return
2016         new decimal float argument classes.
2017
2018         * printcmd.c (printf_decfloat): Rename to ...
2019         (printf_floating): ... this.  Add argclass argument, and use it
2020         instead of parsing the format string again.  Add support for
2021         binary floating-point values, using floatformat_to_string.
2022         Convert value to the target format if it doesn't already match.
2023         (ui_printf): Call printf_floating instead of printf_decfloat,
2024         also for double_arg / long_double_arg.  Pass argclass.
2025
2026         * dfp.c (decimal_to_string): Add format string argument.
2027         * dfp.h (decimal_to_string): Likewise.
2028
2029         * doublest.c (floatformat_to_string): Add format string argument.
2030         * doublest.h (floatformat_to_string): Likewise.
2031
2032 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2033
2034         * doublest.c (floatformat_precision): New routine.
2035         (floatformat_to_string): Likewise.
2036         * doublest.c (floatformat_to_string): Add prototype.
2037
2038         * printcmd.c (print_scalar_formatted): Only call print_floating
2039         on floating-point types.
2040         * valprint.c: Do not include "floatformat.h".
2041         (generic_val_print_decfloat): Remove.
2042         (generic_val_print): Call generic_val_print_float for both
2043         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2044         (print_floating): Use floatformat_to_string.  Handle decimal float.
2045         (print_decimal_floating): Remove, merge into floatformat_to_string.
2046         * value.h (print_decimal_floating): Remove.
2047
2048         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2049
2050 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2051
2052         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2053
2054 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2055
2056         * memattr.h: Don't include vec.h.
2057         (struct mem_attrib): Initialize fields.
2058         <unknown>: New static method.
2059         (struct mem_region): Add constructors, operator<, initialize
2060         fields.
2061         * memattr.c: Include algorithm.
2062         (default_mem_attrib, unknown_mem_attrib): Remove.
2063         (user_mem_region_list): New global.
2064         (target_mem_region_list, mem_region_list): Change type to
2065         std::vector<mem_region>.
2066         (mem_use_target): Now a function.
2067         (target_mem_regions_valid): Change type to bool.
2068         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2069         (require_user_regions): Adjust.
2070         (require_target_regions): Adjust.
2071         (create_mem_region): Adjust.
2072         (lookup_mem_region): Adjust.
2073         (invalidate_target_mem_regions): Adjust.
2074         (mem_clear): Rename to...
2075         (user_mem_clear): ... this, and adjust.
2076         (mem_command): Adjust.
2077         (info_mem_command): Adjust.
2078         (mem_enable, enable_mem_command, mem_disable,
2079         disable_mem_command): Adjust.
2080         (mem_delete): Adjust.
2081         (delete_mem_command): Adjust.
2082         * memory-map.h (parse_memory_map): Return an std::vector.
2083         * memory-map.c (parse_memory_map): Likewise.
2084         (struct memory_map_parsing_data): Add constructor.
2085         <memory_map>: Point to std::vector.
2086         (memory_map_start_memory): Adjust.
2087         (memory_map_end_memory): Adjust.
2088         (memory_map_end_property): Adjust.
2089         (clear_result): Remove.
2090         * remote.c (remote_memory_map): Return an std::vector.
2091         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2092         Remove.
2093         (target_debug_print_mem_region_vector): New.
2094         * target-delegates.c: Regenerate.
2095         * target.h (mem_region_vector): New typedef.
2096         (to_memory_map): Return mem_region_vector.
2097         (target_memory_map): Return an std::vector.
2098         * target.c (target_memory_map): Return an std::vector.
2099         (flash_erase_command): Adjust.
2100
2101 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2102
2103         * memory-map.c (struct memory_map_parsing_data) <property_name>:
2104         Change type to std::string.
2105         (memory_map_start_property): Adjust.
2106         (memory_map_end_property): Adjust.
2107
2108 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2109
2110         * infrun.h: Include common/byte-vector.h.
2111         (struct displaced_step_closure): New struct.
2112         (struct buf_displaced_step_closure): New struct.
2113         * infrun.c (displaced_step_closure::~displaced_step_closure):
2114         Provide default implementation.
2115         (displaced_step_clear): Deallocate step closure with delete.
2116         * aarch64-tdep.c (displaced_step_closure): Rename to ...
2117         (aarch64_displaced_step_closure): ... this, extend
2118         displaced_step_closure.
2119         (aarch64_displaced_step_data) <dsc>: Change type to
2120         aarch64_displaced_step_closure.
2121         (aarch64_displaced_step_copy_insn): Adjust to type change, use
2122         unique_ptr.
2123         (aarch64_displaced_step_fixup): Add cast for displaced step
2124         closure.
2125         * amd64-tdep.c (displaced_step_closure): Rename to ...
2126         (amd64_displaced_step_closure): ... this, extend
2127         displaced_step_closure.
2128         <insn_buf>: Change type to std::vector<gdb_byte>.
2129         <max_len>: Remove.
2130         (fixup_riprel): Change type of DSC parameter, adjust to type
2131         change of insn_buf.
2132         (fixup_displaced_copy): Change type of DSC parameter.
2133         (amd64_displaced_step_copy_insn): Instantiate
2134         amd64_displaced_step_closure.
2135         (amd64_displaced_step_fixup): Add cast for closure type, adjust
2136         to type change of insn_buf.
2137         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2138         parameter DSC.
2139         (arm_linux_copy_svc): Likewise.
2140         (cleanup_kernel_helper_return): Likewise.
2141         (arm_catch_kernel_helper_return): Likewise.
2142         (arm_linux_displaced_step_copy_insn): Instantiate
2143         arm_displaced_step_closure.
2144         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2145         (displaced_read_reg): Change type of parameter DSC.
2146         (branch_write_pc): Likewise.
2147         (load_write_pc): Likewise.
2148         (alu_write_pc): Likewise.
2149         (displaced_write_reg): Likewise.
2150         (arm_copy_unmodified): Likewise.
2151         (thumb_copy_unmodified_32bit): Likewise.
2152         (thumb_copy_unmodified_16bit): Likewise.
2153         (cleanup_preload): Likewise.
2154         (install_preload): Likewise.
2155         (arm_copy_preload): Likewise.
2156         (thumb2_copy_preload): Likewise.
2157         (install_preload_reg): Likewise.
2158         (arm_copy_preload_reg): Likewise.
2159         (cleanup_copro_load_store): Likewise.
2160         (install_copro_load_store): Likewise.
2161         (arm_copy_copro_load_store) Likewise.
2162         (thumb2_copy_copro_load_store): Likewise.
2163         (cleanup_branch): Likewise.
2164         (install_b_bl_blx): Likewise.
2165         (arm_copy_b_bl_blx): Likewise.
2166         (thumb2_copy_b_bl_blx): Likewise.
2167         (thumb_copy_b): Likewise.
2168         (install_bx_blx_reg): Likewise.
2169         (arm_copy_bx_blx_reg): Likewise.
2170         (thumb_copy_bx_blx_reg): Likewise.
2171         (cleanup_alu_imm): Likewise.
2172         (arm_copy_alu_imm): Likewise.
2173         (thumb2_copy_alu_imm): Likewise.
2174         (cleanup_alu_reg): Likewise.
2175         (install_alu_reg): Likewise.
2176         (arm_copy_alu_reg): Likewise.
2177         (thumb_copy_alu_reg): Likewise.
2178         (cleanup_alu_shifted_reg): Likewise.
2179         (install_alu_shifted_reg): Likewise.
2180         (arm_copy_alu_shifted_reg): Likewise.
2181         (cleanup_load): Likewise.
2182         (cleanup_store): Likewise.
2183         (arm_copy_extra_ld_st): Likewise.
2184         (install_load_store): Likewise.
2185         (thumb2_copy_load_literal): Likewise.
2186         (thumb2_copy_load_reg_imm): Likewise.
2187         (arm_copy_ldr_str_ldrb_strb): Likewise.
2188         (cleanup_block_load_all): Likewise.
2189         (cleanup_block_store_pc): Likewise.
2190         (cleanup_block_load_pc): Likewise.
2191         (arm_copy_block_xfer): Likewise.
2192         (thumb2_copy_block_xfer): Likewise.
2193         (cleanup_svc): Likewise.
2194         (install_svc): Likewise.
2195         (arm_copy_svc): Likewise.
2196         (thumb_copy_svc): Likewise.
2197         (arm_copy_undef): Likewise.
2198         (thumb_32bit_copy_undef): Likewise.
2199         (arm_copy_unpred): Likewise.
2200         (arm_decode_misc_memhint_neon): Likewise.
2201         (arm_decode_unconditional): Likewise.
2202         (arm_decode_miscellaneous): Likewise.
2203         (arm_decode_dp_misc): Likewise.
2204         (arm_decode_ld_st_word_ubyte): Likewise.
2205         (arm_decode_media): Likewise.
2206         (arm_decode_b_bl_ldmstm): Likewise.
2207         (arm_decode_ext_reg_ld_st): Likewise.
2208         (thumb2_decode_dp_shift_reg): Likewise.
2209         (thumb2_decode_ext_reg_ld_st): Likewise.
2210         (arm_decode_svc_copro): Likewise.
2211         (thumb2_decode_svc_copro): Likewise.
2212         (install_pc_relative): Likewise.
2213         (thumb_copy_pc_relative_16bit): Likewise.
2214         (thumb_decode_pc_relative_16bit): Likewise.
2215         (thumb_copy_pc_relative_32bit): Likewise.
2216         (thumb_copy_16bit_ldr_literal): Likewise.
2217         (thumb_copy_cbnz_cbz): Likewise.
2218         (thumb2_copy_table_branch): Likewise.
2219         (cleanup_pop_pc_16bit_all): Likewise.
2220         (thumb_copy_pop_pc_16bit): Likewise.
2221         (thumb_process_displaced_16bit_insn): Likewise.
2222         (decode_thumb_32bit_ld_mem_hints): Likewise.
2223         (thumb_process_displaced_32bit_insn): Likewise.
2224         (thumb_process_displaced_insn): Likewise.
2225         (arm_process_displaced_insn): Likewise.
2226         (arm_displaced_init_closure): Likewise.
2227         (arm_displaced_step_fixup): Add cast for closure.
2228         * arm-tdep.h: Include infrun.h.
2229         (displaced_step_closure): Rename to ...
2230         (arm_displaced_step_closure): ... this, extend
2231         displaced_step_closure.
2232         <u::svc::copy_svc_os>: Change type of parameter DSC.
2233         <cleanup>: Likewise.
2234         (arm_process_displaced_insn): Likewise.
2235         (arm_displaced_init_closure): Likewise.
2236         (displaced_read_reg): Likewise.
2237         (displaced_write_reg): Likewise.
2238         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2239         Adjust.
2240         * i386-tdep.h: Include infrun.h.
2241         (i386_displaced_step_closure): New typedef.
2242         * i386-tdep.c (i386_displaced_step_copy_insn): Use
2243         i386_displaced_step_closure.
2244         (i386_displaced_step_fixup): Adjust.
2245         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2246         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2247         and unique_ptr.
2248         (ppc_displaced_step_fixup): Adjust.
2249         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2250         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2251         and unique_ptr.
2252         (s390_displaced_step_fixup): Adjust.
2253
2254 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2255
2256         * interps.h (interp_resume, interp_suspend, interp_set_temp):
2257         Remove declarations.
2258
2259 2017-10-20  Tom Tromey  <tom@tromey.com>
2260
2261         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2262         std::vector.
2263         (gdb_bfd_record_inclusion): Update.
2264         (bfdp): Remove typedef.
2265
2266 2017-10-20  Tom Tromey  <tom@tromey.com>
2267
2268         * gdb_bfd.c (gdb_bfd_ref): Use new.
2269         (struct gdb_bfd_data): Add constructor, destructor, and member
2270         initializers.
2271         (gdb_bfd_unref): Use delete.
2272
2273 2017-10-20  Tom Tromey  <tom@tromey.com>
2274
2275         * exec.c (exec_file_attach): Use new_bfd_ref.
2276         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2277         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2278         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2279         new_bfd_ref.
2280         * gdb_bfd.h (new_bfd_ref): New function.
2281
2282 2017-10-20  Pedro Alves  <palves@redhat.com>
2283
2284         * main.c (captured_command_loop): Add attribute noinline.
2285
2286 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
2287
2288         * interps.c (struct interp_factory): Add constructor.
2289         (interp_factory_p): Remove typedef.
2290         (DEF_VEC_P(interp_factory_p)): Remove.
2291         (interpreter_factories): Change type to std::vector.
2292         (interp_factory_register): Adjust.
2293         (interp_lookup): Adjust.
2294         (interpreter_completer): Adjust.
2295
2296 2017-10-19  Tom Tromey  <tom@tromey.com>
2297
2298         * break-catch-syscall.c (catch_syscall_completer): Use
2299         std::string, gdb::unique_xmalloc_ptr.
2300
2301 2017-10-19  Tom Tromey  <tom@tromey.com>
2302
2303         * infcall.c (call_function_by_hand_dummy): Use std::string.
2304
2305 2017-10-19  Tom Tromey  <tom@tromey.com>
2306
2307         * mi/mi-main.c (mi_cmd_execute): Update.
2308         * top.h (prepare_execute_command): Return scoped_value_mark.
2309         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2310         Add move constructor.
2311         * top.c (prepare_execute_command): Return scoped_value_mark.
2312         (execute_command): Update.
2313
2314 2017-10-19  Pedro Alves  <palves@redhat.com>
2315
2316         * xml-support.c (xml_fetch_content_from_file): Check fread's
2317         return.
2318
2319 2017-10-19  Pedro Alves  <palves@redhat.com>
2320
2321         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2322         async.
2323         (handle_error_fd): New function.
2324         (ser_base_async): Add/delete an event loop file handler for
2325         error_fd.
2326
2327 2017-10-19  Pedro Alves  <palves@redhat.com>
2328
2329         * xml-support.c (xml_fetch_content_from_file): Don't read in
2330         chunks.  Instead use fseek to determine the file's size, and read
2331         it in one go.
2332
2333 2017-11-18  Keith Seitz  <keiths@redhat.com>
2334
2335         * c-exp.y (oper): Canonicalize conversion operators of user-defined
2336         types.
2337         Add whitespace to front of type name.
2338
2339 2017-10-18  Keith Seitz  <keiths@redhat.com>
2340
2341         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2342         DW_AT_accessibility.
2343
2344 2017-10-18  Yao Qi  <yao.qi@linaro.org>
2345
2346         * features/tic6x-c62x-linux.c: Remove.
2347
2348 2017-10-17  Tom Tromey  <tom@tromey.com>
2349
2350         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2351         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2352         (do_mixed_source_and_assembly): Likewise.
2353
2354 2017-10-17  Tom Tromey  <tom@tromey.com>
2355
2356         * regcache.c (regcache::xfer_part): Remove assertion.
2357
2358 2017-10-17  Pedro Alves  <palves@redhat.com>
2359
2360         * xml-support.c (xml_fetch_content_from_file): Call
2361         unique_ptr::release() instead unique_ptr::get() when passing
2362         through xrealloc.
2363
2364 2017-10-17  Yao Qi  <yao.qi@linaro.org>
2365
2366         * regcache.c (regcache::xfer_part): Remove parameters read and
2367         write, add parameter is_raw.  All callers are updated.
2368
2369 2017-10-16  Keith Seitz  <keiths@redhat.com>
2370
2371         * c-typeprint.c (enum access_specifier): Moved here from
2372         c_type_print_base.
2373         (output_access_specifier): New function.
2374         (c_type_print_base): Consider typedefs when assessing
2375         whether access labels are needed.
2376         Use output_access_specifier as needed.
2377         Output access specifier for typedefs, if needed.
2378         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2379         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2380         fields.
2381         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2382         accessor macros.
2383
2384 2017-10-16  Tom Tromey  <tom@tromey.com>
2385
2386         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2387         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2388         * target.c (target_fileio_read_stralloc): Update.
2389         * sparc64-tdep.c (adi_is_addr_mapped): Update.
2390         * target.h (target_fileio_read_stralloc): Return
2391         unique_xmalloc_ptr.
2392
2393 2017-10-16  Tom Tromey  <tom@tromey.com>
2394
2395         * xml-syscall.c (xml_init_syscalls_info): Update.
2396         * xml-support.c (xinclude_start_include): Update.
2397         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2398         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2399         (xml_fetch_content_from_file): Likewise.
2400         * osdata.c (get_osdata): Update.
2401         * target.h (target_read_stralloc, target_get_osdata): Return
2402         unique_xmalloc_ptr.
2403         * solib-aix.c (solib_aix_get_library_list): Update.
2404         * solib-target.c (solib_target_current_sos): Update.
2405         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2406         * xml-tdesc.c (fetch_available_features_from_target): Update.
2407         (target_fetch_description_xml): Update.
2408         (file_read_description_xml): Update.
2409         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2410         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2411         (remote_pid_to_exec_file): Update.
2412         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2413         (target_get_osdata): Likewise.
2414
2415 2017-10-16  Tom Tromey  <tom@tromey.com>
2416
2417         * remote.c (remote_register_number_and_offset): Use std::vector.
2418         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2419         (putpkt_binary): Use gdb::def_vector.
2420         (compare_sections_command): Use gdb::byte_vector.
2421
2422 2017-10-16  Tom Tromey  <tom@tromey.com>
2423
2424         * ppc-linux-nat.c (hwdebug_insert_point): Use
2425         gdb::unique_xmalloc_ptr, XDUP.
2426
2427 2017-10-16  Tom Tromey  <tom@tromey.com>
2428
2429         * probe.c (parse_probes): Use std::string.
2430         (info_probes_for_ops, enable_probes_command)
2431         (disable_probes_command): Remove cleanups.
2432
2433 2017-10-16  Tom Tromey  <tom@tromey.com>
2434
2435         * buildsym.c (block_compar): Remove.
2436         (end_symtab_get_static_block): Use std::vector.
2437
2438 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
2439
2440         * memrange.h (struct mem_range): Define operator< and operator==.
2441         (mem_range_s): Remove.
2442         (DEF_VEC_O (mem_range_s)): Remove.
2443         (normalize_mem_ranges): Change parameter type to std::vector.
2444         * memrange.c (compare_mem_ranges): Remove.
2445         (normalize_mem_ranges): Change parameter type to std::vector,
2446         adjust to vector change.
2447         * exec.c (section_table_available_memory): Return vector, remove
2448         parameter.
2449         (section_table_read_available_memory): Adjust to std::vector
2450         change.
2451         * remote.c (remote_read_bytes): Adjust to std::vector
2452         change.
2453         * tracepoint.h (traceframe_available_memory): Change parameter
2454         type to std::vector.
2455         * tracepoint.c (traceframe_available_memory): Change parameter
2456         type to std::vector, adjust.
2457         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2458         std::vector change.
2459         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2460         unittests/memrange-selftests.c.
2461         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2462         * gdb/unittests/memrange-selftests.c: New file.
2463
2464 2017-10-16  Pedro Alves  <palves@redhat.com>
2465
2466         * elfread.c (probe_key_free): Rename range-for variable.
2467         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2468         (find_probe_by_pc, collect_probes): Rename range-for variable.
2469
2470 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2471
2472         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2473         * features/tic6x-c62x.c: Remove.
2474         * features/tic6x-c64x-linux.c: Remove.
2475         * features/tic6x-c64x.c: Remove.
2476         * features/tic6x-c64xp-linux.c: Remove.
2477         * features/tic6x-c64xp.c: Remove.
2478         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2479         initialize_tdesc_tic6x_*_linux functions.
2480         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2481         initialize_tdesc_tic6x_* functions.
2482
2483 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2484
2485         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2486         tic6x-c62x.
2487         * regformats/tic6x-c62x.dat: Remove.
2488         * regformats/tic6x-c64x.dat: Remove.
2489         * regformats/tic6x-c64xp.dat: Remove.
2490
2491 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2492
2493         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2494         (the !HAVE_LIBEXPAT version).
2495
2496 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2497
2498         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2499         const.
2500
2501 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2502
2503         * target.h: Include tracepoint.h.
2504         (enum trace_find_type): Move to tracepoint.h.
2505         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2506         * tracepoint.h: Don't include target.h
2507         (enum trace_find_type): Move from target.h.
2508         (parse_traceframe_info): Return a unique ptr.
2509         * tracepoint.c (current_traceframe_info): Change type to unique
2510         ptr.
2511         (free_traceframe_info): Remove.
2512         (clear_traceframe_info): Don't manually free
2513         current_traceframe_info.
2514         (free_result): Remove.
2515         (parse_traceframe_info): Return a unique ptr.
2516         (get_traceframe_info): Adjust to unique ptr.
2517         * ctf.c (ctf_traceframe_info): Return a unique ptr.
2518         * remote.c (remote_traceframe_info): Return a unique ptr.
2519         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2520         ptr.
2521         * target-debug.h (target_debug_print_traceframe_info_up): New
2522         macro.
2523         * target-delegates.c: Regenerate.
2524
2525 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2526
2527         * memrange.h (struct mem_range): Add constructors.
2528         * tracepoint.h (struct traceframe_info) <memory>: Change type to
2529         std::vector<mem_range>.
2530         * tracepoint.c (free_traceframe_info): Don't manually free
2531         vector.
2532         (traceframe_info_start_memory): Adjust to vector change.
2533         (traceframe_available_memory): Likewise.
2534         * tracefile-tfile.c (build_traceframe_info): Likewise.
2535         * ctf.c (ctf_traceframe_info): Likewise.
2536
2537 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2538
2539         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2540         std::vector<int>.
2541         * tracepoint.c (free_traceframe_info): Deallocate with delete.
2542         (traceframe_info_start_tvar): Adjust to vector change.
2543         (parse_traceframe_info): Allocate with new.
2544         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2545         vector change.
2546         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2547         change.
2548         tfile_traceframe_info): Allocate with new.
2549         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2550         change.
2551
2552 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2553
2554         * tracepoint.c (traceframe_info): Rename to...
2555         (current_traceframe_info): ...this.
2556         (clear_traceframe_info): Adjust.
2557         (get_traceframe_info): Adjust.
2558
2559 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2560
2561         * nat/linux-osdata.c: Include algorithm.
2562         (compare_processes): Remove.
2563         (struct pid_pgid_entry): New struct.
2564         (linux_xfer_osdata_processgroups): Use std::vector instead of
2565         XNEWVEC.
2566
2567 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2568
2569         * objfiles.h: Don't include symfile.h.
2570         (struct partial_symbol): Remove forward-declaration.
2571         (struct objfile) <global_psymbols, static_psymbols>: Change type
2572         to std::vector<partial_symbol *>.
2573         * objfiles.c (objfile::objfile): Don't memset those fields.
2574         (objfile::~objfile): Don't free those fields.
2575         * psympriv.h (struct psymbol_allocation_list): Remove
2576         forward-declaration.
2577         (add_psymbol_to_list): Change psymbol_allocation_list parameter
2578         to std::vector.
2579         (start_psymtab_common): Change parameters to std::vector.
2580         * psymtab.c: Include algorithm.
2581         (require_partial_symbols): Call shrink_to_fit.
2582         (find_pc_sect_psymbol): Adjust to vector change.
2583         (match_partial_symbol): Likewise.
2584         (lookup_partial_symbol): Likewise.
2585         (psym_relocate): Likewise.
2586         (dump_psymtab): Likewise.
2587         (recursively_search_psymtabs): Likewise.
2588         (compare_psymbols): Remove.
2589         (sort_pst_symbols): Adjust to vector change.
2590         (start_psymtab_common): Likewise.
2591         (end_psymtab_common): Likewise.
2592         (psymbol_bcache_full): De-constify return value.
2593         (add_psymbol_to_bcache): Likewise.
2594         (extend_psymbol_list): Remove.
2595         (append_psymbol_to_list): Adjust to vector change.
2596         (add_psymbol_to_list): Likewise.
2597         (init_psymbol_list): Likewise.
2598         (maintenance_info_psymtabs): Likewise.
2599         (maintenance_check_psymtabs): Likewise.
2600         * symfile.h (struct psymbol_allocation_list): Remove.
2601         * symfile.c (reread_symbols): Adjust to vector change.
2602         * dbxread.c (start_psymtab): Change type of parameters.
2603         (dbx_symfile_read): Adjust to vector change.
2604         (read_dbx_symtab): Likewise.
2605         (start_psymtab): Change type of parameters.
2606         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2607         (create_partial_symtab): Likewise.
2608         (add_partial_symbol): Likewise.
2609         (write_one_signatured_type): Likewise.
2610         (recursively_write_psymbols): Likewise.
2611         * mdebugread.c (parse_partial_symbols): Likewise.
2612         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2613         (scan_xcoff_symtab): Adjust to vector change.
2614         (xcoff_initial_scan): Likewise.
2615
2616 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
2617
2618         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2619
2620 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2621
2622         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2623         Remove s390x-*-expedite, add s390x-expedite.
2624
2625 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2626
2627         * features/s390-gs-linux64.c: Regenerated.
2628         * features/s390x-gs-linux64.c: Regenerated.
2629
2630 2017-10-13  Tom Tromey  <tom@tromey.com>
2631
2632         * compile/compile-object-run.c (do_module_cleanup): Use delete.
2633         * solib.c (update_solib_list, reload_shared_libraries_1): Use
2634         delete.
2635         * symfile.c (symbol_file_add_with_addrs): Use new.
2636         (symbol_file_add_separate): Update comment.
2637         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2638         * jit.c (jit_object_close_impl): Use new.
2639         (jit_unregister_code): Use delete.
2640         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2641         (~objfile): Rename from free_objfile.
2642         (free_objfile_separate_debug, do_free_objfile_cleanup)
2643         (free_all_objfiles, objfile_purge_solibs): Use delete.
2644         * objfiles.h (struct objfile): Add constructor and destructor.
2645         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
2646         (allocate_objfile, free_objfile): Don't declare.
2647         (struct objstats): Add initializers.
2648
2649 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2650
2651         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
2652         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
2653         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
2654         * gdbarch.h: Regenerate.
2655         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2656         Adjust comment.
2657         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
2658         (i386_displaced_step_fixup): Adjust comment.
2659         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
2660
2661 2017-10-12  Tom Tromey  <tom@tromey.com>
2662
2663         * prologue-value.h (pv_area::store_would_trash): Return bool.
2664         (pv_area::find_reg): Likewise.
2665         * prologue-value.c (pv_area::store_would_trash): Return bool.
2666         (pv_area::find_reg): Likewise.
2667
2668 2017-10-12  Tom Tromey  <tom@tromey.com>
2669
2670         * s390-linux-tdep.c (s390_store, s390_load)
2671         (s390_check_for_saved, s390_analyze_prologue): Update.
2672         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
2673         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
2674         * prologue-value.h (class pv_area): Move from prologue-value.c.
2675         Change names of members.  Add constructor, destructor, member
2676         functions.
2677         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
2678         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
2679         (pv_area_fetch, pv_area_scan): Don't declare.
2680         * prologue-value.c (struct pv_area::area_entry): Now member of
2681         pv_area.
2682         (struct pv_area): Move to prologue-value.h.
2683         (pv_area::pv_area): Rename from make_pv_area.
2684         (pv_area::~pv_area): Rename from free_pv_area.
2685         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
2686         (clear_entries, find_entry, overlaps, store_would_trash, store)
2687         (fetch, find_reg, scan): Now member of pv_area.
2688         Remove "area" argument.  Update.
2689         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
2690         Update.
2691         * mn10300-tdep.c (push_reg, check_for_saved)
2692         (mn10300_analyze_prologue): Update.
2693         * mep-tdep.c (is_arg_spill, check_for_saved)
2694         (mep_analyze_prologue): Update.
2695         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
2696         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
2697         (m32c_is_struct_return, m32c_analyze_prologue): Update.
2698         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
2699         Update.
2700         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
2701         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
2702
2703 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2704
2705         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
2706         * linux-nat.c (linux_nat_delete_thread): New variable.
2707         (lwp_free): Invoke linux_nat_delete_thread if set.
2708         (linux_nat_set_delete_thread): New function.
2709         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
2710         thread delete callback.
2711         * arm-linux-nat.c (arm_linux_delete_thread): New function.
2712         (_initialize_arm_linux_nat): Assign thread delete callback.
2713         * s390-linux-nat.c (s390_delete_thread): New function.
2714         (_initialize_s390_nat): Assign thread delete callback.
2715         * x86-linux-nat.c (x86_linux_add_target): Likewise.
2716         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
2717         function.
2718         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
2719         declaration.
2720         * nat/x86-linux.c (x86_linux_delete_thread): New function.
2721         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
2722
2723 2017-10-09  Tom Tromey  <tom@tromey.com>
2724
2725         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
2726         std::string.
2727         * tui/tui-layout.c (enum tui_status): Use std::string.
2728
2729 2017-10-11  Tom Tromey  <tom@tromey.com>
2730
2731         * gdbthread.h (thread_command): Constify.
2732         * inferior.h (detach_command): Constify.
2733         * top.h (set_history, show_history): Constify.
2734         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
2735         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
2736         * bsd-kvm.c (bsd_kvm_cmd): Constify.
2737         * printcmd.c (set_command): Constify.
2738         (non_const_set_command): New function.
2739         * dcache.c (set_dcache_command, show_dcache_command): Constify.
2740         * breakpoint.c (enable_command, disable_command, delete_command)
2741         (catch_command, tcatch_command, set_breakpoint_cmd)
2742         (show_breakpoint_cmd): Constify.
2743         * macrocmd.c (macro_command): Constify.
2744         * infcmd.c (unset_command, kill_command, detach_command)
2745         (info_proc_cmd): Constify.
2746         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
2747         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
2748         (info_auto_load_cmd): Constify.
2749         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
2750         (unset_tdesc_cmd): Constify.
2751         * ada-lang.c (set_ada_command, show_ada_command)
2752         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
2753         * guile/guile.c (set_guile_command, show_guile_command)
2754         (info_guile_command): Constify.
2755         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
2756         Constify.
2757         * skip.c (skip_command): Constify.
2758         * compile/compile.c (_initialize_compile): Constify.
2759         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
2760         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
2761         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
2762         (maint_btrace_pt_show_cmd): Constify.
2763         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
2764         Constify.
2765         * python/python.c (user_show_python, user_set_python): Constify.
2766         * mips-tdep.c (set_mips_command, show_mips_command)
2767         (set_mipsfpu_command): Constify.
2768         * record-btrace.c (cmd_record_btrace_start)
2769         (cmd_set_record_btrace, cmd_show_record_btrace)
2770         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
2771         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
2772         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
2773         Constify.
2774         * symfile.c (overlay_command): Constify.
2775         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2776         * cli/cli-logging.c (set_logging_command, show_logging_command):
2777         Constify.
2778         * cli/cli-dump.c (dump_command, append_command)
2779         (srec_dump_command, ihex_dump_command, verilog_dump_command)
2780         (tekhex_dump_command, binary_dump_command)
2781         (binary_append_command): Constify.
2782         * cli/cli-decode.c (struct cmd_list_element): Change type of
2783         "fun".
2784         * cli/cli-cmds.c (info_command, show_command, set_debug)
2785         (show_debug): Constify.
2786         (show_command): Add non-const overload.
2787         * top.c (set_history, show_history): Constify.
2788         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
2789         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
2790         * target.c (target_command): Constify.
2791         * sparc64-tdep.c (info_adi_command): Constify.
2792         * record-full.c (cmd_record_full_start): Constify.
2793         (set_record_full_command): Constify.  Fix typo.
2794         (show_record_full_command): Constify.
2795         * thread.c (thread_command, thread_apply_command): Constify.
2796         * memattr.c (dummy_cmd): Constify.
2797         * value.c (function_command): Constify.
2798         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
2799         * probe.c (info_probes_command): Constify.
2800         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
2801         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
2802         (show_thread_cmd, set_thread_default_cmd)
2803         (show_thread_default_cmd): Constify.
2804         (check_empty): Constify.
2805         * tracepoint.c (tfind_command): Constify.
2806         * cp-support.c (maint_cplus_command): Constify.
2807         * windows-tdep.c (info_w32_command): Constify.
2808         * record.c (cmd_record_start, set_record_command)
2809         (show_record_command, info_record_command, cmd_record_goto):
2810         Constify.
2811         * ravenscar-thread.c (set_ravenscar_command)
2812         (show_ravenscar_command): Constify.
2813         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
2814         Constify.
2815         (add_internal_problem_command): Remove casts.
2816         * arc-tdep.c (maintenance_print_arc_command): Constify.
2817         * valprint.c (set_print, show_print, set_print_raw)
2818         (show_print_raw): Constify.
2819         * maint.c (maintenance_command, maintenance_info_command)
2820         (maintenance_print_command, maintenance_set_cmd)
2821         (maintenance_show_cmd, set_per_command_cmd)
2822         (show_per_command_cmd, maintenance_check_command): Constify.
2823         * language.c (set_check, show_check): Constify.
2824         * typeprint.c (show_print_type, set_print_type): Constify.
2825         * go32-nat.c (go32_info_dos_command): Constify.
2826
2827 2017-10-11  Tom Tromey  <tom@tromey.com>
2828
2829         * breakpoint.c (prepare_re_set_context): Remove.
2830         (breakpoint_re_set_one): Update.  Don't use cleanups.
2831         (breakpoint_re_set): Use scoped_restore, std::string, and
2832         scoped_restore_current_language.
2833
2834 2017-10-11  Tom Tromey  <tom@tromey.com>
2835
2836         * breakpoint.c (commands_command_1): Use std::string.
2837         (cleanup_executing_breakpoints): Remove.
2838         (bpstat_do_actions_1): Use scoped_restore.
2839         (bpstat_check_watchpoint): Use std::string.
2840         (decode_static_tracepoint_spec): Likewise.
2841         (break_range_command): Likewise.
2842         (watch_command_1): Likewise.
2843         (compare_breakpoints): Change argument types.
2844         (clear_command): Use std::vector.
2845         (cleanup_executing_breakpoints): Remove.
2846         (update_global_location_list): Use unique_xmalloc_ptr.
2847         (strace_command): Remove unused declaration.
2848
2849 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2850
2851         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
2852         * NEWS: Mention new FreeBSD/arm native configuration.
2853         * configure.host: Add arm*-*-freebsd*.
2854         * configure.nat: Likewise.
2855         * arm-fbsd-nat.c: New file.
2856
2857 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2858
2859         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
2860         (ALLDEPFILES): Add arm-fbsd-tdep.c.
2861         * NEWS: Mention new FreeBSD/arm target.
2862         * configure.tgt: Add arm*-*-freebsd*.
2863         * arm-fbsd-tdep.c: New file.
2864         * arm-fbsd-tdep.h: New file.
2865
2866 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2867
2868         * linux-tdep.c (linux_make_corefile_notes): Remove call to
2869         `gdbarch_elfcore_write_linux_prpsinfo'.
2870         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
2871         method.
2872         (elf_internal_linux_prpsinfo): Remove declaration.
2873         * gdbarch.h: Regenerate.
2874         * gdbarch.c: Regenerate.
2875
2876 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2877
2878         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
2879         `set_gdbarch_elfcore_write_linux_prpsinfo'.
2880
2881 2017-10-11  Pedro Alves  <palves@redhat.com>
2882
2883         * breakpoint.c (reattach_breakpoints): Delete.
2884         * breakpoint.h (reattach_breakpoints): Delete.
2885
2886 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
2887
2888         * symfile.c (registered_sym_fns): Make struct, not typedef.
2889         (DEF_VEC_O (registered_sym_fns)): Remove.
2890         (symtab_fns): Change type to std::vector.
2891         (add_symtab_fns): Adjust.
2892         (find_sym_fns): Adjust.
2893
2894 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
2895
2896         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
2897         * arc-tdep.h (arc_arch_is_em): New function.
2898         (arc_arch_is_hs): Likewise.
2899
2900 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
2901
2902         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
2903         parentheses in the declaration.
2904         (macro_lookup_inclusion): Likewise.
2905         (macro_lookup_definition): Likewise.
2906         * p-lang.h (pascal_builtin_types): Likewise.
2907         * tui/tui-data.c (tui_win_list): Likewise.
2908         * tui/tui-data.h (tui_win_list): Likewise.
2909         * utils.h (make_cleanup_free_section_addr_info): Likewise.
2910
2911 2017-10-11  Mark Rages  <markrages@gmail.com>
2912
2913         * target-memory.c (block_boundaries): Fix for block address not
2914         aligned on block size.
2915
2916 2017-10-10  Pedro Alves <palves@redhat.com>
2917             Tom Tromey  <tom@tromey.com>
2918
2919         * breakpoint.c (struct captured_breakpoint_query_args)
2920         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
2921         (print_breakpoint): New.
2922         * breakpoint.h (print_breakpoint): Declare.
2923         * common/common-exceptions.h (enum return_reason): Remove
2924         references to catch_exceptions.
2925         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
2926         Delete.
2927         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
2928         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
2929         * gdb.h: Delete.
2930         * gdbthread.h (thread_select): Declare.
2931         * mi/mi-cmd-break.c: Don't include gdb.h.
2932         (breakpoint_notify): Use print_breakpoint.
2933         * mi/mi-cmd-catch.c: Don't include gdb.h.
2934         * mi/mi-interp.c: Don't include gdb.h.
2935         (mi_print_breakpoint_for_event): New.
2936         (mi_breakpoint_created, mi_breakpoint_modified): Use
2937         mi_print_breakpoint_for_event.
2938         * mi/mi-main.c: Don't include gdb.h.
2939         (mi_cmd_thread_select): Parse the global thread ID here.  Use
2940         thread_select instead of gdb_thread_select.
2941         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
2942         of using gdb_list_thread_ids.
2943         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
2944         FILEIO_ENOSYS here.
2945         (remote_fileio_request): Use TRY/CATCH instead of
2946         catch_exceptions.
2947         * symfile-mem.c (struct symbol_file_add_from_memory_args)
2948         (symbol_file_add_from_memory_wrapper): Delete.
2949         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
2950         * thread.c: Don't include gdb.h.
2951         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
2952         (thread_alive): Use thread_select.
2953         (do_captured_thread_select): Delete, parts salvaged as ...
2954         (thread_select): ... this new function.
2955         (gdb_thread_select): Delete.
2956
2957 2017-10-10  Pedro Alves  <palves@redhat.com>
2958             Tom Tromey  <tom@tromey.com>
2959
2960         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
2961         and reverse logic.
2962         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
2963         No longer macros.  Instead ...
2964         (enum wp_check_result): They're now values of this new
2965         enumeration.
2966         (watchpoint_check): Change return type to wp_check_result and
2967         parameter type to bpstat.
2968         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
2969         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
2970         catch_errors.  Reverse logic of watchpoint_check call.
2971         (breakpoint_re_set_one): Now returns void and takes a breakpoint
2972         pointer as parameter.
2973         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
2974         * common/common-exceptions.c (throw_exception_sjlj): Update
2975         comments to avoid mentioning catch_errors.
2976         * exceptions.c (catch_errors): Delete.
2977         * exceptions.h: Update comments to avoid mentioning catch_errors.
2978         (catch_errors_ftype, catch_errors): Delete.
2979         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
2980         (hook_stop_stub): Delete.
2981         (restore_selected_frame): Change return type to void, and
2982         parameter type to const frame_id &.
2983         (restore_infcall_control_state): Use TRY/CATCH instead of
2984         catch_errors.
2985         * main.c (captured_command_loop): Return void and remove
2986         parameter.  Remove references to catch_errors.
2987         (captured_main): Use TRY/CATCH instead of catch_errors.
2988         * objc-lang.c (objc_submethod_helper_data)
2989         (find_objc_msgcall_submethod_helper): Delete.
2990         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
2991         catch_errors.
2992         * record-full.c (record_full_message): Return void.
2993         (record_full_message_args, record_full_message_wrapper): Delete.
2994         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
2995         instead of catch_errors.
2996         * solib-aix.c (solib_aix_open_symbol_file_object): Change
2997         parameter type to int.
2998         * solib-darwin.c (open_symbol_file_object): Ditto.
2999         * solib-dsbt.c (open_symbol_file_object): Ditto.
3000         * solib-frv.c (open_symbol_file_object): Ditto.
3001         * solib-svr4.c (open_symbol_file_object): Ditto.
3002         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3003         * solib.c (update_solib_list): Use TRY/CATCH instead of
3004         catch_errors.
3005         * solist.h (struct target_so_ops) <open_symbol_file_object>:
3006         Change type.
3007         * symmisc.c (struct print_symbol_args): Remove.
3008         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3009         (print_symbol): Change type.
3010         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3011         and remove parameters.
3012         (catch_errors): New.
3013         (get_windows_debug_event): Adjust.
3014
3015 2017-10-09  Tom Tromey  <tom@tromey.com>
3016
3017         * mi/mi-main.c (free_splay_tree): Remove.
3018         (list_available_thread_groups): Use splay_tree_up.
3019         * common/gdb_splay_tree.h: New file.
3020
3021 2017-10-09  Tom Tromey  <tom@tromey.com>
3022
3023         * mi/mi-main.c (do_nothing): Remove.
3024         (list_available_thread_groups): Update.
3025
3026 2017-10-09  Pedro Alves  <palves@redhat.com>
3027
3028         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3029         reading registers when switching context.
3030
3031 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
3032
3033         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3034         (fbsd_convert_siginfo): Likewise.
3035         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3036
3037 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
3038
3039         * configure.ac (try_guile_versions): Remove guile-2.2.
3040         * configure: Regenerate.
3041
3042 2017-10-09  Tom Tromey  <tom@tromey.com>
3043
3044         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3045         (COMPILE.pre): Use $(CXX).
3046
3047 2017-10-09  Pedro Alves  <palves@redhat.com>
3048
3049         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3050         Use bool.
3051         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3052         * cp-support.h (cp_remove_params): Now returns a
3053         gdb::unique_xmalloc_ptr.
3054         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3055         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3056         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3057         returning a gdb::unique_xmalloc_ptr.
3058         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3059         * stack.c (find_frame_funname): Adjust to cp_remove_params
3060         returning a gdb::unique_xmalloc_ptr.
3061
3062 2017-10-08  Tom Tromey  <tom@tromey.com>
3063
3064         * dwarf2read.c (dwarf2_get_dwz_file): Use
3065         gdb::unique_xmalloc_ptr.
3066         (find_slot_in_mapped_hash): Likewise.
3067         (dwarf2_physname): Likewise.
3068         (create_dwo_unit_in_dwp_v1): Use std::string.
3069         (create_dwo_unit_in_dwp_v2): Likewise.
3070         (lookup_dwo_cutu): Likewise.
3071         (inherit_abstract_dies): Use std::vector.
3072         (read_array_type): Likewise.
3073         (dwarf_decode_macros): Remove unused declaration.
3074         (unsigned_int_compar): Remove.
3075         (dwarf2_build_psymtabs_hard): Use scoped_restore.
3076         (psymtabs_addrmap_cleanup): Remove.
3077
3078 2017-10-08  Tom Tromey  <tom@tromey.com>
3079
3080         * frame-unwind.c (frame_unwind_try_unwinder): Update.
3081         * frame.h (frame_cleanup_after_sniffer): Declare.
3082         (frame_prepare_for_sniffer): Return void.
3083         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
3084         type of argument.
3085         (frame_prepare_for_sniffer): Return void.
3086
3087 2017-10-08  Tom Tromey  <tom@tromey.com>
3088
3089         * utils.h (make_cleanup_value_free): Remove.
3090         * utils.c (do_value_free, struct cleanup): Remove.
3091         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3092         Use gdb_value_up.
3093         * value.h (struct value_deleter): New.
3094         (gdb_value_up): New typedef.
3095
3096 2017-10-08  Tom Tromey  <tom@tromey.com>
3097
3098         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3099         (make_cleanup_free_search_symbols): Remove.
3100         (search_symbols): Return std::vector.
3101         (symbol_search::compare_search_syms): Now member of
3102         symbol_search.  Change arguments.
3103         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
3104         (symtab_symbol_info, rbreak_command): Update.
3105         * symtab.h (struct symbol_search) <next>: Remove.
3106         Add constructors.
3107         (symbol_search::operator<): New function.
3108         (symbol_search::operator==): New function.
3109         (search_symbols): Remove std::vector.
3110         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3111         (symbol_search::compare_search_syms): Declare.
3112
3113 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3114
3115         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3116         arch/aarch64-insn.o.
3117         Remove one rule.
3118         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3119
3120 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3121
3122         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3123         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3124         arch/arm-linux.o respectively.
3125         * configure.tgt: Likewise.
3126
3127 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3128
3129         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3130         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3131
3132 2017-10-06  Pedro Alves  <palves@redhat.com>
3133
3134         * windows-nat.c: Include <algorithm>.
3135
3136 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3137
3138         * configure.tgt (i386_tobjs): New variable.
3139         (amd64_tobjs): New variable.
3140         Set $cpu_obs and $os_obs.
3141
3142 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3143
3144         * Makefile.in (CONFIG_SRC_SUBDIR): New.
3145         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3146         (clean): Remove object files and dependency files.
3147         (distclean): Remove the directory.
3148         * configure.ac: Invoke AC_CONFIG_COMMANDS.
3149         * configure: Re-generated.
3150         * configure.tgt: Replace amd64.o with arch/amd64.o.
3151
3152 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
3153
3154         PR build/22188
3155         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3156         and SETEND.
3157
3158 2017-10-05  Pedro Alves  <palves@redhat.com>
3159
3160         * linux-nat.c (linux_child_follow_fork): When following the parent
3161         and detaching the child, consult the parent thread's architecture
3162         instead of the child's.
3163
3164 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3165
3166         * ax.h: Do not include "doublest.h".
3167         (union agent_val): Remove.
3168
3169 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3170
3171         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3172         (decimal_to_string): Return std::string object.
3173         (decimal_from_string): Accept std::string object.  Return bool.
3174         (decimal_from_integral, decimal_from_doublest): Remove.
3175         (decimal_from_longest): Add prototype.
3176         (decimal_from_ulongest): Likewise.
3177         (decimal_to_longest): Likewise.
3178         (decimal_from_doublest): Likewise.
3179         * dfp.c: Do not include "gdbtypes.h" or "value.h".
3180         (MAX_DECIMAL_STRING): Move here.
3181         (decimal_to_string): Return std::string object.
3182         (decimal_from_string): Accept std::string object.  Return bool.
3183         (decimal_from_integral): Remove, replace by ...
3184         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3185         (decimal_to_longest): New function.
3186         (decimal_from_floating): Remove, replace by ...
3187         (decimal_from_doublest): ... this new function.
3188         (decimal_to_doublest): Update to new decimal_to_string interface.
3189
3190         * value.c (unpack_long): Use decimal_to_longest.
3191         * valops.c (value_cast): Use decimal_from_doublest instead of
3192         decimal_from_floating.  Use decimal_from_[u]longest isntead of
3193         decimal_from_integral.
3194         * valarith.c (value_args_as_decimal): Likewise.
3195         * valprint.c (print_decimal_floating): Update to new
3196         decimal_to_string interface.
3197         * printcmd.c (printf_decfloat): Likewise.
3198         * c-exp.y (parse_number): Update to new decimal_from_string interface.
3199
3200 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3201
3202         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
3203         * gdbtypes.c: Include "floatformat.h".
3204         * value.c: Likewise.
3205         * m68k-tdep.c: Likewise.
3206
3207         * findvar.c: Do not include "floatformat.h".
3208         * amd64-darwin-tdep.c: Likewise.
3209         * arm-linux-tdep.c: Likewise.
3210         * i386-darwin-tdep.c: Likewise.
3211         * i387-tdep.c: Likewise.
3212         * m68k-linux-tdep.c: Likewise.
3213         * mep-tdep.c: Likewise.
3214         * mips-tdep.c: Likewise.
3215         * nios2-tdep.c: Likewise.
3216         * s390-linux-tdep.c: Likewise.
3217         * sparc-obsd-tdep.c: Likewise.
3218         * sparc-tdep.c: Likewise.
3219         * sparc64-tdep.c: Likewise.
3220         * spu-tdep.c: Likewise.
3221         * tic6x-tdep.c: Likewise.
3222         * tilegx-tdep.c: Likewise.
3223         * vax-tdep.c: Likewise.
3224         * xstormy16-tdep.c: Likewise.
3225         * xtensa-tdep.c: Likewise.
3226
3227         * top.c: Do not include "doublest.h".
3228         * aarch64-tdep.c: Likewise.
3229         * alpha-tdep.c: Likewise.
3230         * arm-linux-tdep.c: Likewise.
3231         * m68k-linux-tdep.c: Likewise.
3232         * tilegx-tdep.c: Likewise.
3233         * xstormy16-tdep.c: Likewise.
3234
3235 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3236
3237         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3238         (mipsn32_fbsd_sigframe): Define.
3239         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3240         for FreeBSD/mipsn32.
3241
3242 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3243
3244         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3245         AT_HWCAP.
3246
3247 2017-10-05  Tristan Gingold  <tgingold@free.fr>
3248
3249         * MAINTAINERS (Misc): Update my email address.
3250
3251 2017-10-04  Pedro Alves  <palves@redhat.com>
3252
3253         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
3254         it instead of target_gdbarch.
3255         (get_remote_state, get_remote_packet_size): Adjust
3256         get_remote_arch_state calls, passing down target_gdbarch
3257         explicitly.
3258         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3259         'gdbarch' and use it instead of target_gdbarch.
3260         (get_memory_packet_size): Adjust get_remote_arch_state calls,
3261         passing down target_gdbarch explicitly.
3262         (struct stop_reply) <arch>: New field.
3263         (remote_parse_stop_reply): Use the stopped thread's architecture,
3264         not the current inferior's.  Save the architecture in the
3265         stop_reply.
3266         (process_stop_reply): Use the stop reply's architecture.
3267         (process_g_packet, remote_fetch_registers)
3268         (remote_prepare_to_store, store_registers_using_G)
3269         (remote_store_registers): Adjust get_remote_arch_state calls,
3270         using the regcache's architecture.
3271         (remote_get_trace_status): Adjust get_remote_arch_state calls,
3272         passing down target_gdbarch explicitly.
3273         * spu-multiarch.c (spu_thread_architecture): Defer to the target
3274         beneath instead of calling target_gdbarch.
3275         * target.c (default_thread_architecture): Use the specified
3276         inferior's architecture, instead of the current inferior's
3277         architecture (via target_gdbarch).
3278
3279 2017-10-04  Pedro Alves  <palves@redhat.com>
3280
3281         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3282         case.
3283         (regcache_print): Handle !target_has_registers here instead.
3284
3285 2017-10-04  Pedro Alves  <palves@redhat.com>
3286
3287         * frame.c (create_test_frame): Delete.
3288         * frame.h (create_test_frame): Delete.
3289         * gdbarch-selftests.c: Include gdbthread.h and target.h.
3290         (class regcache_test): Delete.
3291         (test_target_has_registers, test_target_has_stack)
3292         (test_target_has_memory, test_target_prepare_to_store)
3293         (test_target_store_registers): New functions.
3294         (test_target_ops): New class.
3295         (register_to_value_test): Error out if there's already a
3296         process_stratum (or higher) target pushed.  Create a fuller mock
3297         environment, with mock target_ops, inferior, address space, thread
3298         and inferior_ptid.
3299         * progspace.c (struct address_space): Move to ...
3300         * progspace.h (struct address_space): ... here.
3301         * regcache.h (regcache::~regcache, regcache::raw_write)
3302         [GDB_SELF_TEST]: No longer virtual.
3303
3304 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
3305
3306         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3307
3308 2017-10-04  Pedro Alves  <palves@redhat.com>
3309
3310         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3311         out of 'between TRY and CATCH'.
3312
3313 2017-10-04  Pedro Alves  <palves@redhat.com>
3314
3315         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3316         * common/common-exceptions.h (TRY): Open an outermost scope.
3317         Expand intro comment.
3318         (CATCH): Reindent.
3319         (END_CATCH): Close the outermost scope.
3320         * completer.c (complete_line_internal): Add missing END_CATCH.
3321
3322 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3323
3324         * NEWS (Changes since GDB 8.0): Add entry about new
3325         'set-cwd-on-gdbserver' feature.
3326         (New remote packets): Add entry for QSetWorkingDir.
3327         * common/common-inferior.h (set_inferior_cwd): New prototype.
3328         * infcmd.c (set_inferior_cwd): Remove "static".
3329         (show_cwd_command): Expand text to include remote debugging.
3330         * remote.c: Add PACKET_QSetWorkingDir.
3331         (remote_protocol_features) <QSetWorkingDir>: New entry for
3332         PACKET_QSetWorkingDir.
3333         (extended_remote_set_inferior_cwd): New function.
3334         (extended_remote_create_inferior): Call
3335         "extended_remote_set_inferior_cwd".
3336         (_initialize_remote): Call "add_packet_config_cmd" for
3337         QSetWorkingDir.
3338
3339 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3340
3341         * NEWS (New commands): Mention "set/show cwd".
3342         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3343         "cd" command's help text.
3344         * common/common-inferior.h (get_inferior_cwd): New prototype.
3345         * infcmd.c (inferior_cwd_scratch): New global variable.
3346         (set_inferior_cwd): New function.
3347         (get_inferior_cwd): Likewise.
3348         (set_cwd_command): Likewise.
3349         (show_cwd_command): Likewise.
3350         (_initialize_infcmd): Add "set/show cwd" commands.
3351         * inferior.h (class inferior) <cwd>: New field.
3352         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3353         (fork_inferior): Change inferior's cwd before its execution.
3354         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3355         to CreateProcess.
3356
3357 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3358
3359         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3360         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3361         (COMMON_OBS): Add gdb_tilde_expand.o.
3362         * common/gdb_tilde_expand.c: New file.
3363         * common/gdb_tilde_expand.h: Likewise.
3364
3365 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
3366
3367         * gdbarch.sh (objfile): Remove duplicate declaration.
3368         * gdbarch.h: Regenerate.
3369
3370 2017-10-03  Tom Tromey  <tom@tromey.com>
3371
3372         * utils.c (internal_vproblem): Use string_vprintf.
3373
3374 2017-10-03  Tom Tromey  <tom@tromey.com>
3375
3376         * printcmd.c (info_symbol_command): Use std::string.
3377
3378 2017-10-03  Tom Tromey  <tom@tromey.com>
3379
3380         * top.c (gdb_safe_append_history): Use std::string.
3381
3382 2017-10-03  Tom Tromey  <tom@tromey.com>
3383
3384         * event-top.c (stdin_event_handler): Update.
3385         * main.c (captured_main_1): Update.
3386         * top.h (make_delete_ui_cleanup): Remove.
3387         (struct ui): Add constructor and destructor.
3388         (new_ui, delete_ui): Remove.
3389         * top.c (make_delete_ui_cleanup): Remove.
3390         (new_ui_command): Use std::unique_ptr.
3391         (delete_ui_cleanup): Remove.
3392         (ui::ui): Rename from new_ui.  Update.
3393         (free_ui): Remove.
3394         (ui::~ui): Rename from delete_ui.  Update.
3395
3396 2017-10-03  Tom Tromey  <tom@tromey.com>
3397
3398         * symfile.c (load_progress): Use gdb::byte_vector.
3399
3400 2017-10-03  Tom Tromey  <tom@tromey.com>
3401
3402         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3403         declaration.
3404         * printcmd.c (x_command): Remove unused declaration.
3405         * symfile.c (symbol_file_command): Remove unused declaration.
3406
3407 2017-10-03  Tom Tromey  <tom@tromey.com>
3408
3409         * utils.c (internal_vproblem): Use std::string.
3410         (defaulted_query): Likewise.
3411
3412 2017-10-03  Tom Tromey  <tom@tromey.com>
3413
3414         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3415         * top.c (execute_command_to_string): Update.
3416         * utils.c (make_cleanup_restore_page_info): Remove.
3417         (do_restore_page_info_cleanup): Remove.
3418         (set_batch_flag_and_restore_page_info):
3419         New.
3420         (make_cleanup_restore_page_info): Remove.
3421         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3422         (~set_batch_flag_and_restore_page_info): New
3423         (make_cleanup_restore_uinteger): Remove.
3424         (make_cleanup_restore_integer): Remove.
3425         (struct restore_integer_closure): Remove.
3426         (restore_integer): Remove.
3427         * utils.h (struct set_batch_flag_and_restore_page_info): New
3428         class.
3429         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3430         (make_cleanup_restore_page_info): Remove.
3431         (make_cleanup_restore_uinteger) Remove.
3432         (make_cleanup_restore_integer) Remove.
3433
3434 2017-10-03  Tom Tromey  <tom@tromey.com>
3435
3436         * record-full.h (record_full_gdb_operation_disable_set): Return
3437         scoped_restore_tmpl<int>.
3438         * infrun.c (adjust_pc_after_break): Update.
3439         (handle_signal_stop): Update.
3440         * record-full.c (record_full_gdb_operation_disable_set): Return
3441         scoped_restore_tmpl<int>.
3442         (record_full_wait_1, record_full_insert_breakpoint)
3443         (record_full_remove_breakpoint, record_full_save)
3444         (record_full_goto_insn): Update.
3445
3446 2017-10-02  Tom Tromey  <tom@tromey.com>
3447
3448         PR rust/22236:
3449         * rust-lang.c (rust_val_print_str): New function.
3450         (val_print_struct): Call it.
3451         (rust_subscript): Preserve name of slice type.
3452
3453 2017-10-02  Tom Tromey  <tom@tromey.com>
3454
3455         * rust-lang.c (rust_subscript): Handle slices in
3456         EVAL_AVOID_SIDE_EFFECTS case.
3457
3458 2017-10-02  Tom Tromey  <tom@tromey.com>
3459
3460         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3461
3462 2017-10-02  Tom Tromey  <tom@tromey.com>
3463
3464         * rust-lang.h (rust_slice_type): Add "extern".
3465
3466 2017-10-02  Tom Tromey  <tom@tromey.com>
3467             Pedro Alves  <palves@redhat.com>
3468
3469         * ada-lang.h (ada_exc_info::operator<): Make const.
3470         (ada_exc_info::operator==): Make const.
3471         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3472         Make const.
3473
3474 2017-09-29  Tom Tromey  <tom@tromey.com>
3475
3476         * target.c (read_whatever_is_readable): Change type of "result".
3477         Update.
3478         (free_memory_read_result_vector): Remove.
3479         (read_memory_robust): Change return type.  Update.
3480         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
3481         bin2hex, std::string.
3482         * target.h (memory_read_result_s): Remove typedef.
3483         (free_memory_read_result_vector): Remove.
3484         (read_memory_robust): Return std::vector.
3485
3486 2017-09-29  Tom Tromey  <tom@tromey.com>
3487
3488         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3489
3490 2017-09-29  Tom Tromey  <tom@tromey.com>
3491
3492         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3493         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
3494         operator< and operator==.
3495         (ada_exceptions_list): Return a std::vector.
3496         * ada-lang.c (ada_exc_info::operator<): Rename from
3497         compare_ada_exception_info.
3498         (ada_exc_info::operator==): New.
3499         (sort_remove_dups_ada_exceptions_list): Change type of
3500         "exceptions".
3501         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3502         (ada_add_global_exceptions): Likewise.
3503         (ada_exceptions_list_1): Return a std::vector.
3504         (ada_exceptions_list): Likewise.
3505
3506 2017-09-29  Tom Tromey  <tom@tromey.com>
3507
3508         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3509         'std::set *'.
3510         (print_one_inferior): Update.
3511         (free_vector_of_ints): Remove.
3512         (list_available_thread_groups): Change "ids" to std::set.
3513         (mi_cmd_list_thread_groups): Update.
3514         (struct collect_cores_data) <core>: Now a std::set.
3515         (collect_cores): Update.
3516         (unique): Remove.
3517         (print_one_inferior): Update.
3518
3519 2017-09-29  Tom Tromey  <tom@tromey.com>
3520
3521         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3522         (mi_execute_async_cli_command): Likewise.
3523         (mi_cmd_trace_frame_collected): Use field_fmt.
3524
3525 2017-09-29  Tom Tromey  <tom@tromey.com>
3526
3527         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3528         gdb::byte_vector.
3529
3530 2017-09-29  Tom Tromey  <tom@tromey.com>
3531
3532         * mi/mi-parse.c (mi_parse): Remove unused declaration.
3533
3534 2017-09-29  Tom Tromey  <tom@tromey.com>
3535
3536         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3537
3538 2017-09-29  Tom Tromey  <tom@tromey.com>
3539
3540         * varobj.h (varobj_gen_name): Return std::string.
3541         * varobj.c (varobj_gen_name): Return std::string.
3542         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3543         (mi_cmd_var_delete): Don't copy "name".
3544
3545 2017-09-29  Tom Tromey  <tom@tromey.com>
3546
3547         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3548         (mi_cmd_break_insert_1): Update.
3549
3550 2017-09-29  Tom Tromey  <tom@tromey.com>
3551
3552         * target.h (make_scoped_defer_target_commit_resume): Update.
3553         * target.c (make_scoped_defer_target_commit_resume): Rename from
3554         make_cleanup_defer_target_commit_resume.  Return a
3555         scoped_restore.
3556         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3557
3558 2017-09-29  Tom Tromey  <tom@tromey.com>
3559
3560         * main.c (captured_main_1): Remove unused declaration.
3561         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3562
3563 2017-09-29  Tom Tromey  <tom@tromey.com>
3564
3565         * symtab.c (search_symbols): Remove unused outer cleanup.
3566         (make_source_files_completion_list): Remove unused declaration.
3567
3568 2017-09-29  Tom Tromey  <tom@tromey.com>
3569
3570         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3571
3572 2017-09-29  Tom Tromey  <tom@tromey.com>
3573
3574         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3575         gdb::byte_vector.
3576
3577 2017-09-29  Tom Tromey  <tom@tromey.com>
3578
3579         * complaints.c (vcomplaint): Use std::string.
3580
3581 2017-09-29  Tom Tromey  <tom@tromey.com>
3582
3583         * tracepoint.c (trace_variable_command): Use std::string.
3584         (encode_actions_1): Remove unused declarations.
3585         (create_tsv_from_upload): Use std::string.
3586
3587 2017-09-29  Tom Tromey  <tom@tromey.com>
3588
3589         * cp-support.c (gdb_demangle): Use std::string.
3590
3591 2017-09-29  Tom Tromey  <tom@tromey.com>
3592
3593         * stack.c (parse_frame_specification): Use std::string
3594         (info_frame_command): Use gdb::unique_xmalloc_ptr.
3595
3596 2017-09-29  Tom Tromey  <tom@tromey.com>
3597
3598         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3599
3600 2017-09-29  Tom Tromey  <tom@tromey.com>
3601
3602         * utils.c (vfprintf_maybe_filtered): Use std::string.
3603         (vfprintf_unfiltered): Likewise.
3604
3605 2017-09-29  Tom Tromey  <tom@tromey.com>
3606
3607         * event-top.c (top_level_prompt): Return std::string.
3608         (display_gdb_prompt): Update.
3609
3610 2017-09-29  Tom Tromey  <tom@tromey.com>
3611
3612         * unittests/common-utils-selftests.c (format): New function.
3613         (string_vprintf_tests): New function.
3614         (_initialize_common_utils_selftests): Register new tests.
3615         * common/common-utils.c (string_vprintf): New function.
3616         * common/common-utils.h (string_vprintf): Declare.
3617
3618 2017-09-29  Pedro Alves  <palves@redhat.com>
3619
3620         * common/rsp-low.c (unpack_varlen_hex): Constify.
3621         * common/rsp-low.h (unpack_varlen_hex): Constify.
3622         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3623         Constify.
3624         * remote.c (remote_set_permissions, read_ptid)
3625         (remote_current_thread, remote_get_threads_with_qthreadinfo)
3626         (remote_static_tracepoint_marker_at)
3627         (remote_static_tracepoint_markers_by_strid)
3628         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3629         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3630         (parse_tracepoint_definition, parse_tsv_definition)
3631         (parse_static_tracepoint_marker_definition): Constify.
3632         * tracepoint.h (parse_static_tracepoint_marker_definition)
3633         (parse_trace_status, parse_tracepoint_status)
3634         (parse_tracepoint_definition, parse_tsv_definition): Constify.
3635
3636 2017-09-29  Pedro Alves  <palves@redhat.com>
3637
3638         * remote.c (target_buf, target_buf_size): Delete.
3639         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3640         Use the connection's packet buffer instead.
3641         All callers adjusted.
3642         (_initialize_remote): Remove references to target_buf and
3643         target_buf_size.
3644
3645 2017-09-28  Pedro Alves  <palves@redhat.com>
3646
3647         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3648         unittests/common-utils-selftests.c.
3649         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
3650         (COMMON_OBS): Remove utils-selftests.o.
3651         * utils-selftests.c: Move to ...
3652         * unittests/common-utils-selftests.c: ... here and rename self
3653         test to "string_printf".
3654
3655 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
3656
3657         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
3658         having NULL cus or tus.
3659
3660 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3661
3662         * arm-tdep.c: (convert_from_extended): Remove.
3663         (convert_to_extended): Likewise.
3664         (arm_extract_return_value): Use convert_typed_floating.
3665         (arm_store_return_value): Likewise.
3666
3667         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3668         * sh-tdep.c: Do not include "floatformat.h".
3669         (sh_littlebyte_bigword_type): New function.
3670         (sh_register_convert_to_virtual): Use convert_typed_floating.
3671         (sh_register_convert_to_raw): Likewise.
3672         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3673         (sh64_littlebyte_bigword_type): New function.
3674         (sh64_extract_return_value): Use convert_typed_floating.
3675         (sh64_register_convert_to_virtual): Likewise.
3676         (sh64_register_convert_to_raw): Likewise.
3677
3678 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3679
3680         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
3681         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
3682
3683         * gdbtypes.h (union type_specific): Make field floatformat hold
3684         just a single struct floatformat, not an array.
3685         (floatformat_from_type): Move here.
3686         * gdbtypes.c (floatformat_from_type): Move here.  Update to
3687         changed TYPE_FLOATFORMAT definition.
3688         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
3689         (recursive_dump_type): Likewise.
3690         (init_float_type): Install correct floatformat for byte order.
3691         (arch_float_type): Likewise.
3692
3693 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3694
3695         * gdbtypes.c (init_type): Change incoming argument from
3696         length-in-bytes to length-in-bits.  Assert length is a
3697         multiple of TARGET_CHAR_BITS.
3698         (arch_type, arch_flags_type): Likewise.
3699         (init_integer_type): Update call to init_type.
3700         (init_character_type): Likewise.
3701         (init_boolean_type): Likewise.
3702         (init_float_type): Likewise.
3703         (init_decfloat_type): Likewise.
3704         (init_complex_type): Likewise.
3705         (init_pointer_type): Likewise.
3706         (objfile_type): Likewise.
3707         (arch_integer_type): Update call to arch_type.
3708         (arch_character_type): Likewise.
3709         (arch_boolean_type): Likewise.
3710         (arch_float_type): Likewise.
3711         (arch_decfloat_type): Likewise.
3712         (arch_complex_type): Likewise.
3713         (arch_pointer_type): Likewise.
3714         (gdbtypes_post_init): Likewise.
3715
3716         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
3717         (read_base_type): Likewise.
3718         * mdebugread.c (basic_type): Likewise.
3719         * stabsread.c (dbx_init_float_type): Likewise.
3720         (rs6000_builtin_type): Likewise.
3721         (read_range_type): Likewise.  Also, fix call to init_integer_type
3722         with erroneous length argument.
3723
3724         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
3725         * d-lang.c (build_d_types): Likewise.
3726         * f-lang.c (build_fortran_types): Likewise.
3727         * go-lang.c (build_go_types): Likewise.
3728         * opencl-lang.c (build_opencl_types): Likewise.
3729         * jit.c (finalize_symtab): Likewise.
3730         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
3731         (build_std_type_info_type): Likewise.
3732         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
3733         update call to arch_flags_type.
3734
3735         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
3736         arch_type.
3737         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
3738         * windows-tdep.c (windows_get_tlb_type): Likewise.
3739
3740         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
3741         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3742         * m32c-tdep.c (make_types): Likewise.
3743         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
3744         (rl78_psw_type): Update call to arch_flags_type.
3745         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
3746         * rx-tdep.c (rx_psw_type): Likewise.
3747         (rx_fpsw_type): Likewise.
3748         * sparc-tdep.c (sparc_psr_type): Likewise.
3749         (sparc_fsr_type): Likewise.
3750         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
3751         (sparc64_ccr_type): Likewise.
3752         (sparc64_fsr_type): Likewise.
3753         (sparc64_fprs_type): Likewise.
3754
3755 2017-09-27  Tom Tromey  <tom@tromey.com>
3756
3757         * findcmd.c (find_command): Constify.
3758
3759 2017-09-27  Tom Tromey  <tom@tromey.com>
3760
3761         * ada-tasks.c (task_command_1, task_command): Constify.
3762
3763 2017-09-27  Tom Tromey  <tom@tromey.com>
3764
3765         * symtab.c (maintenance_print_symbol_cache)
3766         (maintenance_flush_symbol_cache)
3767         (maintenance_print_symbol_cache_statistics): Constify.
3768
3769 2017-09-27  Tom Tromey  <tom@tromey.com>
3770
3771         * inferior.c (detach_inferior_command, kill_inferior_command)
3772         (inferior_command): Constify.
3773
3774 2017-09-27  Tom Tromey  <tom@tromey.com>
3775
3776         * regcache.c (regcache_print, maintenance_print_registers)
3777         (maintenance_print_raw_registers)
3778         (maintenance_print_cooked_registers)
3779         (maintenance_print_register_groups)
3780         (maintenance_print_remote_registers): Constify.
3781
3782 2017-09-27  Tom Tromey  <tom@tromey.com>
3783
3784         * printcmd.c (map_display_numbers, undisplay_command)
3785         (enable_disable_display_command, enable_display_command)
3786         (disable_display_command): Constify.
3787
3788 2017-09-27  Tom Tromey  <tom@tromey.com>
3789
3790         * breakpoint.h (delete_command): Don't declare.
3791         * breakpoint.c (delete_command, enable_once_command)
3792         (enable_count_command, enable_delete_command, breakpoint_1)
3793         (maintenance_info_breakpoints, stopin_command, stopat_command)
3794         (delete_command, delete_trace_command, save_breakpoints)
3795         (save_breakpoints_command, save_tracepoints_command): Constify.
3796
3797 2017-09-27  Tom Tromey  <tom@tromey.com>
3798
3799         * macrocmd.c (macro_expand_command, macro_expand_once_command)
3800         (skip_ws, extract_identifier, macro_define_command)
3801         (macro_undef_command, macro_list_command): Constify.
3802
3803 2017-09-27  Tom Tromey  <tom@tromey.com>
3804
3805         * infcmd.c (environment_info, set_environment_command)
3806         (unset_environment_command, path_info, info_proc_cmd_1)
3807         (info_proc_cmd_mappings, info_proc_cmd_stat)
3808         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
3809         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
3810
3811 2017-09-27  Tom Tromey  <tom@tromey.com>
3812
3813         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
3814         Constify.
3815
3816 2017-09-27  Tom Tromey  <tom@tromey.com>
3817
3818         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
3819
3820 2017-09-27  Tom Tromey  <tom@tromey.com>
3821
3822         * demangle.c (demangle_command): Constify.
3823
3824 2017-09-27  Tom Tromey  <tom@tromey.com>
3825
3826         * progspace.c (maintenance_info_program_spaces_command):
3827         Constify.
3828
3829 2017-09-27  Tom Tromey  <tom@tromey.com>
3830
3831         * compile/compile.c (check_raw_argument, compile_file_command)
3832         (compile_code_command, compile_print_command): Constify.
3833
3834 2017-09-27  Tom Tromey  <tom@tromey.com>
3835
3836         * reggroups.c (maintenance_print_reggroups): Constify.
3837
3838 2017-09-27  Tom Tromey  <tom@tromey.com>
3839
3840         * dwarf2read.c (save_gdb_index_command): Constify.
3841
3842 2017-09-27  Tom Tromey  <tom@tromey.com>
3843
3844         * stap-probe.c (info_probes_stap_command): Constify.
3845
3846 2017-09-27  Tom Tromey  <tom@tromey.com>
3847
3848         * fork-child.c (unset_exec_wrapper_command): Constify.
3849
3850 2017-09-27  Tom Tromey  <tom@tromey.com>
3851
3852         * btrace.c (get_uint, get_context_size, no_chunk)
3853         (maint_btrace_packet_history_cmd)
3854         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
3855         (maint_info_btrace_cmd): Constify.
3856
3857 2017-09-27  Tom Tromey  <tom@tromey.com>
3858
3859         * reverse.c (delete_bookmark_command): Constify.
3860
3861 2017-09-27  Tom Tromey  <tom@tromey.com>
3862
3863         * remote.c (set_memory_packet_size)
3864         (set_memory_write_packet_size, show_memory_write_packet_size)
3865         (set_memory_read_packet_size, show_memory_read_packet_size)
3866         (compare_sections_command, packet_command, remote_put_command)
3867         (remote_get_command, remote_delete_command): Constify.
3868
3869 2017-09-27  Tom Tromey  <tom@tromey.com>
3870
3871         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
3872         (set_mipsfpu_double_command, set_mipsfpu_none_command)
3873         (set_mipsfpu_auto_command): Constify.
3874
3875 2017-09-27  Tom Tromey  <tom@tromey.com>
3876
3877         * cli/cli-cmds.h (cd_command): Constify.
3878         * cli/cli-cmds.c (cd_command): Constify.
3879
3880 2017-09-27  Tom Tromey  <tom@tromey.com>
3881
3882         * thread.c (thread_name_command, thread_find_command): Constify.
3883
3884 2017-09-27  Tom Tromey  <tom@tromey.com>
3885
3886         * probe.c (enable_probes_command, disable_probes_command):
3887         Constify.
3888
3889 2017-09-27  Tom Tromey  <tom@tromey.com>
3890
3891         * symfile.c (symbol_file_command): Constify.
3892         * gdbcore.h (deprecated_file_changed_hook): Constify.
3893         * exec.c (deprecated_file_changed_hook, exec_file_command)
3894         (file_command): Constify.
3895         * defs.h (symbol_file_command): Constify.
3896
3897 2017-09-27  Tom Tromey  <tom@tromey.com>
3898
3899         * remote-fileio.c (set_system_call_allowed)
3900         (show_system_call_allowed): Constify.
3901
3902 2017-09-27  Tom Tromey  <tom@tromey.com>
3903
3904         * tracepoint.c (delete_trace_variable_command)
3905         (tfind_end_command, tfind_start_command, tfind_pc_command)
3906         (tfind_tracepoint_command, tfind_line_command)
3907         (tfind_range_command, tfind_outside_command): Constify.
3908
3909 2017-09-27  Tom Tromey  <tom@tromey.com>
3910
3911         * ax-gdb.c (maint_agent_printf_command, agent_command)
3912         (agent_eval_command): Constify.
3913
3914 2017-09-27  Tom Tromey  <tom@tromey.com>
3915
3916         * tracepoint.c (info_scope_command): Constify.
3917         * python/python.c (gdbpy_decode_line): Constify.
3918         * python/py-breakpoint.c (bppy_init): Constify.
3919         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
3920         * location.h: (new_linespec_location)
3921         (string_to_event_location_basic, string_to_event_location):
3922         Constify.
3923         * location.c (new_linespec_location)
3924         (string_to_event_location_basic, string_to_event_location):
3925         Constify.
3926         * linespec.h (decode_line_with_current_source)
3927         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
3928         * linespec.c (linespec_lex_to_end)
3929         (decode_line_with_current_source)
3930         (decode_line_with_last_displayed): Constify.
3931         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
3932         Constify.
3933         * cli/cli-cmds.c (edit_command, list_command): Constify.
3934         * breakpoint.h (until_break_command, watch_command_wrapper)
3935         (awatch_command_wrapper, rwatch_command_wrapper)
3936         (init_ada_exception_breakpoint): Constify.
3937         * breakpoint.c (break_command_1, dprintf_command)
3938         (break_range_command, watch_command_wrapper)
3939         (rwatch_command_wrapper, awatch_command_wrapper)
3940         (until_break_command, init_ada_exception_breakpoint)
3941         (strace_marker_create_sals_from_location, trace_command)
3942         (ftrace_command, strace_command, struct tracepoint): Constify.
3943         * ax-gdb.c (agent_command_1): Constify.
3944         * ada-lang.c (ada_exception_sal): Constify.
3945
3946 2017-09-27  Tom Tromey  <tom@tromey.com>
3947
3948         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
3949         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
3950         (get_context_size, no_chunk, get_insn_history_modifiers)
3951         (cmd_record_insn_history, get_call_history_modifiers)
3952         (cmd_record_call_history): Constify.
3953
3954 2017-09-27  Tom Tromey  <tom@tromey.com>
3955
3956         * source.c (show_substitute_path_command)
3957         (unset_substitute_path_command, set_substitute_path_command):
3958         Constify.
3959
3960 2017-09-27  Tom Tromey  <tom@tromey.com>
3961
3962         * typeprint.c (maintenance_print_type): Constify.
3963         * maint.c (maintenance_dump_me, maintenance_demangle)
3964         (maintenance_time_display, maintenance_info_sections)
3965         (maintenance_print_statistics, maintenance_deprecate)
3966         (maintenance_undeprecate): Constify.
3967         (maintenance_do_deprecate): Constify.  Use std::string.
3968         (maintenance_selftest): Constify.
3969         * gdbtypes.h (maintenance_print_type): Constify.
3970
3971 2017-09-27  Tom Tromey  <tom@tromey.com>
3972
3973         * hppa-tdep.c (unwind_command): Constify.
3974
3975 2017-09-27  Tom Tromey  <tom@tromey.com>
3976
3977         * target-descriptions.c (unset_tdesc_filename_cmd)
3978         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
3979         Constify.
3980
3981 2017-09-27  Tom Tromey  <tom@tromey.com>
3982
3983         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
3984
3985 2017-09-27  Tom Tromey  <tom@tromey.com>
3986
3987         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
3988
3989 2017-09-27  Tom Tromey  <tom@tromey.com>
3990
3991         * tui/tui-regs.c (tui_reg_command): Constify.
3992
3993 2017-09-27  Tom Tromey  <tom@tromey.com>
3994
3995         * skip.c (skip_file_command, skip_function_command)
3996         (skip_enable_command, skip_disable_command, skip_delete_command):
3997         Constify.
3998
3999 2017-09-27  Tom Tromey  <tom@tromey.com>
4000
4001         * record-btrace.c (cmd_record_btrace_bts_start)
4002         (cmd_record_btrace_pt_start): Constify.
4003
4004 2017-09-27  Tom Tromey  <tom@tromey.com>
4005
4006         * symmisc.c (maintenance_print_symbols)
4007         (maintenance_print_msymbols, maintenance_print_objfiles)
4008         (maintenance_info_symtabs, maintenance_check_symtabs)
4009         (maintenance_expand_symtabs, maintenance_info_line_tables):
4010         Constify.
4011
4012 2017-09-27  Tom Tromey  <tom@tromey.com>
4013
4014         * top.c (new_ui_command): Constify.
4015
4016 2017-09-27  Tom Tromey  <tom@tromey.com>
4017
4018         * symfile.c (add_symbol_file_command)
4019         (remove_symbol_file_command, list_overlays_command)
4020         (map_overlay_command, unmap_overlay_command)
4021         (overlay_auto_command, overlay_manual_command)
4022         (overlay_off_command, overlay_load_command): Constify.
4023
4024 2017-09-27  Tom Tromey  <tom@tromey.com>
4025
4026         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4027         (info_spu_mailbox_command, info_spu_dma_command)
4028         (info_spu_proxydma_command): Constify.
4029
4030 2017-09-27  Tom Tromey  <tom@tromey.com>
4031
4032         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4033
4034 2017-09-27  Tom Tromey  <tom@tromey.com>
4035
4036         * cli/cli-script.c (user_defined_command): Constify.
4037
4038 2017-09-27  Tom Tromey  <tom@tromey.com>
4039
4040         * cli/cli-dump.c (dump_memory_command, dump_value_command)
4041         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4042         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4043         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4044         (dump_binary_value, append_binary_memory, append_binary_value):
4045         Constify.
4046         (struct dump_context) <func>: Constify.
4047         (add_dump_command): Update.
4048
4049 2017-09-27  Tom Tromey  <tom@tromey.com>
4050
4051         * cli/cli-cmds.c (show_version, show_configuration)
4052         (source_command, show_user): Constify.
4053
4054 2017-09-27  Tom Tromey  <tom@tromey.com>
4055
4056         * target.c (maintenance_print_target_stack): Constify.
4057
4058 2017-09-27  Tom Tromey  <tom@tromey.com>
4059
4060         * interps.c (interpreter_exec_cmd): Constify.
4061
4062 2017-09-27  Tom Tromey  <tom@tromey.com>
4063
4064         * record-full.c (cmd_record_full_restore): Constify.
4065
4066 2017-09-27  Tom Tromey  <tom@tromey.com>
4067
4068         * memattr.c (enable_mem_command, disable_mem_command)
4069         (delete_mem_command): Constify.
4070
4071 2017-09-27  Tom Tromey  <tom@tromey.com>
4072
4073         * value.c (show_convenience): Constify.
4074
4075 2017-09-27  Tom Tromey  <tom@tromey.com>
4076
4077         * gdbcore.h (core_file_command): Update.
4078         * corefile.c (core_file_command): Constify.
4079
4080 2017-09-27  Tom Tromey  <tom@tromey.com>
4081
4082         * user-regs.c (maintenance_print_user_registers): Constify.
4083
4084 2017-09-27  Tom Tromey  <tom@tromey.com>
4085
4086         * cp-namespace.c (maintenance_cplus_namespace): Constify.
4087
4088 2017-09-27  Tom Tromey  <tom@tromey.com>
4089
4090         * cp-support.c (first_component_command): Constify.
4091
4092 2017-09-27  Tom Tromey  <tom@tromey.com>
4093
4094         * psymtab.c (maintenance_print_psymbols)
4095         (maintenance_info_psymtabs, maintenance_check_psymtabs):
4096         Constify.
4097
4098 2017-09-27  Tom Tromey  <tom@tromey.com>
4099
4100         * windows-tdep.c (display_tib): Constify.
4101
4102 2017-09-27  Tom Tromey  <tom@tromey.com>
4103
4104         * linux-fork.c (delete_checkpoint_command)
4105         (detach_checkpoint_command): Constify.
4106
4107 2017-09-27  Tom Tromey  <tom@tromey.com>
4108
4109         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4110
4111 2017-09-27  Tom Tromey  <tom@tromey.com>
4112
4113         * arc-tdep.c (dump_arc_instruction_command): Constify.
4114
4115 2017-09-27  Tom Tromey  <tom@tromey.com>
4116
4117         * valprint.c (set_radix, show_radix): Constify.
4118
4119 2017-09-27  Tom Tromey  <tom@tromey.com>
4120
4121         * dtrace-probe.c (info_probes_dtrace_command): Constify.
4122
4123 2017-09-27  Tom Tromey  <tom@tromey.com>
4124
4125         * command.h (not_just_help_class_command): Update.
4126         * cli/cli-decode.h (not_just_help_class_command): Update.
4127         * cli/cli-decode.c (not_just_help_class_command): Constify.
4128
4129 2017-09-27  Tom Tromey  <tom@tromey.com>
4130
4131         * gdb_bfd.c (maintenance_info_bfds): Constify.
4132
4133 2017-09-27  Tom Tromey  <tom@tromey.com>
4134
4135         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4136         overloads.
4137         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
4138         (do_const_cfunc): New function.
4139         (cmd_cfunc_eq): New overload.
4140         (cli_user_command_p): Check do_const_cfunc.
4141         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4142         const_cfunc.
4143         * command.h (add_cmd): Add const overload and no-function
4144         overload.
4145         (set_cmd_cfunc): Add const overload.
4146         (cmd_const_cfunc_ftype): Declare.
4147         (cmd_cfunc_eq): Add const overload.
4148         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4149         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4150         overload.
4151
4152 2017-09-27  Tom Tromey  <tom@tromey.com>
4153
4154         * macroexp.c (get_next_token_for_substitution): New function.
4155         (substitute_args): Call it.  Check for __VA_OPT__.
4156
4157 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4158             Pedro Alves <palves@redhat.com>
4159
4160         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4161         producer_is_icc_lt_14.
4162         (producer_is_icc_lt_14): New function.
4163         (check_producer): Add code for checking version of ICC.
4164         (producer_is_icc): Move to producer.c.
4165         (read_structure_type): Restrict ICC workaround to ICC<14.
4166         * producer.c: Include selftest.h.
4167         (producer_is_icc, producer_parsing_tests, _initialize_producer):
4168         New functions.
4169         * producer.h (producer_is_icc): New declaration.
4170
4171 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4172
4173         * Makefile.in (SFILES): Add producer.c.
4174         (COMMON_OBS): Add producer.o
4175         * amd64-tdep.c (producer.h): Add new include.
4176         * dwarf2read.c (producer.h): Add new include.
4177         * producer.c: New file.
4178         * producer.h: New file.
4179         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4180         producer.c.
4181         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4182         producer.h.
4183
4184 2017-09-26  Matthias Klose  <doko@ubuntu.com>
4185
4186         * configure.ac: Search ncursesw before ncurses.
4187         Check ncursesw/ncurses.h before ncurses/ncurses.h.
4188         * gdb_curses.h: Include <ncursesw/ncurses.h>
4189         * config.in, configure: Regenerate.
4190
4191 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4192
4193         PR gdb/22185
4194         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4195         obsolete.
4196         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4197         Remove i386sol2 support.
4198         * configure.nat <i386sol2>: Remove.
4199         <sol2-64>: Fold into ...
4200         <sol2>: ... this.
4201         Move common settings to default section.
4202         Add sol-thread.o.
4203         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4204         x86_64-*-solaris2.1[0-9]*>: Rename to ...
4205         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4206         <i[34567]86-*-solaris*>: Remove.
4207         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4208
4209         * configure.ac: Remove wctype in libw check.
4210         (_MSE_INT_H): Don't define on Solaris 7-9.
4211         <solaris*>: Remove libthread_db.so.1 check.
4212         * configure: Regenerate.
4213         * config.in: Regenerate.
4214
4215         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4216         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4217         (gdb_ps_size_t): Remove.
4218         Use base types in users.
4219         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4220
4221         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4222
4223 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4224
4225         PR build/22206
4226         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4227         (adi_is_addr_mapped): Likewise.
4228         (PSR_ICC): Don't redefine.
4229         (PSR_IMPL): Likewise.
4230
4231 2017-09-25  Tom Tromey  <tom@tromey.com>
4232
4233         * regcache.c (regcache::dump): Use string_printf.
4234
4235 2017-09-25  Tom Tromey  <tom@tromey.com>
4236
4237         * regcache.c (class regcache_invalidator): New.
4238         (struct register_to_invalidate): Remove.
4239         (make_cleanup_regcache_invalidate): Remove.
4240         (regcache::raw_write): Use regcache_invalidator.
4241
4242 2017-09-25  Tom Tromey  <tom@tromey.com>
4243
4244         * spu-tdep.c (spu2ppu_sniffer): Update.
4245         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4246         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4247         Remove.
4248         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4249         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4250         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4251         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4252         (frame_pop): Update.
4253
4254 2017-09-25  Tom Tromey  <tom@tromey.com>
4255
4256         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4257         * regcache.h (regcache_xfree): Don't declare.
4258         * regcache.c (regcache_xfree): Remove.
4259         (do_regcache_xfree): Use delete.
4260         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4261         * linux-fork.c (free_fork): Use delete.
4262         (fork_save_infrun_state): Likewise.
4263         * jit.c (jit_dealloc_cache): Use delete.
4264         * infrun.c (discard_infcall_suspend_state): Use delete.
4265
4266 2017-09-25  Tom Tromey  <tom@tromey.com>
4267
4268         * regcache.h (regcache_xmalloc): Don't declare.
4269         (regcache_raw_set_cached_value): Update comment.
4270         * regcache.c (regcache_xmalloc): Remove.
4271         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4272         * jit.c (jit_frame_sniffer): Use new.
4273         * frame.c (frame_save_as_regcache): Use new.
4274
4275 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4276
4277         * NEWS: Advertise support for guarded-storage registers on IBM z.
4278
4279 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4280
4281         * s390-linux-nat.c (have_regset_gs): New static variable.
4282         (s390_linux_fetch_inferior_registers): Handle guarded-storage
4283         control block and guarded-storage broadcast control regsets.
4284         (s390_read_description): Detect whether the target has
4285         guarded-storage support, return appropriate tdesc.
4286         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4287         (features/s390x-gs-linux64.c): Likewise.
4288         (struct gdbarch_tdep) <have_gs>: New field.
4289         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4290         (s390_gsbc_regset): New variables.
4291         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4292         and s390_gsbc_regset, if applicable.
4293         (s390_core_read_description): Check whether core file was from a
4294         target with guarded-storage support; include appropriate regsets.
4295         (s390_gdbarch_init): Add registers for guarded-storage support.
4296         (_initialize_s390_tdep): Initialize new target descriptions that
4297         include registers for guarded-storage support.
4298         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4299         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4300         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4301         (S390_NUM_REGS): Adjust macro definition.
4302         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4303         (tdesc_s390x_gs_linux64): New declarations.
4304
4305 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4306
4307         * features/s390-gs-linux64.xml: New file.
4308         * features/s390-gs.xml: New file.
4309         * features/s390-gsbc.xml: New file.
4310         * features/s390x-gs-linux64.xml: New file.
4311         * features/Makefile (WHICH): Add s390-gs-linux64 and
4312         s390x-gs-linux64.
4313         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4314         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4315         * features/s390-gs-linux64.c: New generated file.
4316         * features/s390x-gs-linux64.c: New file.
4317         * regformats/s390-gs-linux64.dat: New file.
4318         * regformats/s390x-gs-linux64.dat: New file.
4319
4320 2017-09-23  Tom Tromey  <tom@tromey.com>
4321
4322         * defs.h (make_cleanup_override_quit_handler): Don't declare.
4323
4324 2017-09-22  Tom Tromey  <tom@tromey.com>
4325
4326         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4327         type to scoped_restore_tmpl.
4328         <scoped_input_handler>: Initialize m_quit_handler directly.
4329
4330 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4331
4332         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4333         (cd_command): Likewise.  Free "current_directory" before
4334         assigning to it.
4335         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4336         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4337         * top.c (gdb_dirbuf): Remove global declaration.
4338         * top.h (gdb_dirbuf): Likewise.
4339
4340 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4341
4342         * gnulib/aclocal.m4: Regenerate.
4343         * gnulib/config.in: Regenerate.
4344         * gnulib/configure: Regenerate.
4345         * gnulib/import/Makefile.am: Regenerate.
4346         * gnulib/import/Makefile.in: Regenerate.
4347         * gnulib/import/assure.h: New file.
4348         * gnulib/import/at-func.c: Likewise
4349         * gnulib/import/chdir-long.c: New file.
4350         * gnulib/import/chdir-long.h: New file.
4351         * gnulib/import/cloexec.c: New file.
4352         * gnulib/import/cloexec.h: New file.
4353         * gnulib/import/close.c: New file.
4354         * gnulib/import/closedir.c: New file.
4355         * gnulib/import/dirent-private.h: New file.
4356         * gnulib/import/dup-safer.c: New file.
4357         * gnulib/import/dup.c: New file.
4358         * gnulib/import/dup2.c: New file.
4359         * gnulib/import/error.c: New file.
4360         * gnulib/import/error.h: New file.
4361         * gnulib/import/exitfail.c: New file.
4362         * gnulib/import/exitfail.h: New file.
4363         * gnulib/import/fchdir.c: New file.
4364         * gnulib/import/fcntl.c: New file.
4365         * gnulib/import/fcntl.in.h: New file.
4366         * gnulib/import/fd-hook.c: New file.
4367         * gnulib/import/fd-hook.h: New file.
4368         * gnulib/import/fd-safer.c: New file.
4369         * gnulib/import/fdopendir.c: New file.
4370         * gnulib/import/filename.h: New file.
4371         * gnulib/import/filenamecat-lgpl.c: New file.
4372         * gnulib/import/filenamecat.h: New file.
4373         * gnulib/import/fstat.c: New file.
4374         * gnulib/import/fstatat.c: New file.
4375         * gnulib/import/getcwd-lgpl.c: New file.
4376         * gnulib/import/getcwd.c: New file.
4377         * gnulib/import/getdtablesize.c: New file.
4378         * gnulib/import/getlogin_r.c: New file.
4379         * gnulib/import/getprogname.c: New file.
4380         * gnulib/import/getprogname.h: New file.
4381         * gnulib/import/gettext.h: New file.
4382         * gnulib/import/glob-libc.h: New file.
4383         * gnulib/import/glob.c: New file.
4384         * gnulib/import/glob.in.h: New file.
4385         * gnulib/import/intprops.h: New file.
4386         * gnulib/import/m4/chdir-long.m4: New file.
4387         * gnulib/import/m4/close.m4: New file.
4388         * gnulib/import/m4/closedir.m4: New file.
4389         * gnulib/import/m4/d-ino.m4: New file.
4390         * gnulib/import/m4/d-type.m4: New file.
4391         * gnulib/import/m4/dup.m4: New file.
4392         * gnulib/import/m4/dup2.m4: New file.
4393         * gnulib/import/m4/error.m4: New file.
4394         * gnulib/import/m4/fchdir.m4: New file.
4395         * gnulib/import/m4/fcntl.m4: New file.
4396         * gnulib/import/m4/fcntl_h.m4: New file.
4397         * gnulib/import/m4/fdopendir.m4: New file.
4398         * gnulib/import/m4/filenamecat.m4: New file.
4399         * gnulib/import/m4/fstat.m4: New file.
4400         * gnulib/import/m4/fstatat.m4: New file.
4401         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4402         * gnulib/import/m4/getcwd-path-max.m4: New file.
4403         * gnulib/import/m4/getcwd.m4: New file.
4404         * gnulib/import/m4/getdtablesize.m4: New file.
4405         * gnulib/import/m4/getlogin_r.m4: New file.
4406         * gnulib/import/m4/getprogname.m4: New file.
4407         * gnulib/import/m4/glob.m4: New file.
4408         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4409         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4410         * gnulib/import/m4/mempcpy.m4: New file.
4411         * gnulib/import/m4/memrchr.m4: New file.
4412         * gnulib/import/m4/mode_t.m4: New file.
4413         * gnulib/import/m4/msvc-inval.m4: New file.
4414         * gnulib/import/m4/msvc-nothrow.m4: New file.
4415         * gnulib/import/m4/open.m4: New file.
4416         * gnulib/import/m4/openat.m4: New file.
4417         * gnulib/import/m4/opendir.m4: New file.
4418         * gnulib/import/m4/readdir.m4: New file.
4419         * gnulib/import/m4/realloc.m4: New file.
4420         * gnulib/import/m4/rewinddir.m4: New file.
4421         * gnulib/import/m4/save-cwd.m4: New file.
4422         * gnulib/import/m4/strdup.m4: New file.
4423         * gnulib/import/m4/strerror.m4: New file.
4424         * gnulib/import/m4/unistd-safer.m4: New file.
4425         * gnulib/import/mempcpy.c: New file.
4426         * gnulib/import/memrchr.c: New file.
4427         * gnulib/import/msvc-inval.c: New file.
4428         * gnulib/import/msvc-inval.h: New file.
4429         * gnulib/import/msvc-nothrow.c: New file.
4430         * gnulib/import/msvc-nothrow.h: New file.
4431         * gnulib/import/open.c: New file.
4432         * gnulib/import/openat-die.c: New file.
4433         * gnulib/import/openat-priv.h: New file.
4434         * gnulib/import/openat-proc.c: New file.
4435         * gnulib/import/openat.c: New file.
4436         * gnulib/import/openat.h: New file.
4437         * gnulib/import/opendir.c: New file.
4438         * gnulib/import/pipe-safer.c: New file.
4439         * gnulib/import/readdir.c: New file.
4440         * gnulib/import/realloc.c: New file.
4441         * gnulib/import/rewinddir.c: New file.
4442         * gnulib/import/save-cwd.c: New file.
4443         * gnulib/import/save-cwd.h: New file.
4444         * gnulib/import/strdup.c: New file.
4445         * gnulib/import/strerror-override.c: New file.
4446         * gnulib/import/strerror-override.h: New file.
4447         * gnulib/import/strerror.c: New file.
4448         * gnulib/import/unistd--.h: New file.
4449         * gnulib/import/unistd-safer.h: New file.
4450         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4451         "getcwd" and "glob".
4452         * ser-tcp.c: Undefine "close" before redefining it.
4453
4454 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4455
4456         * guile/scm-value.c (gdbscm_value_address): Initialize address,
4457         get rid of res_val.
4458
4459 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4460
4461         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4462         <sol2,sparc>: Likewise.
4463         <sol2-64,i386>: Likewise.
4464
4465         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4466         -Wdeprecated-declarations on *-*-solaris*.
4467         * configure: Regenerate.
4468
4469         * procfs.c: Include "nat/inferior.h".
4470         (procfs_info_proc): Fix typo.
4471
4472 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4473
4474         * remote.c (vector): Include.
4475         (struct private_thread_info): Add field, thread_handle.
4476         (free_private_thread_info): Deallocate storage associated with
4477         thread handle.
4478         (get_private_info_thread): Initialize `thread_handle' field.
4479         (struct thread_item): Add field, thread_handle.
4480         (clear_threads_listing_context): Deallocate storage associated
4481         with thread handle.
4482         (start_thread): Add support for "handle" attribute.
4483         (thread_attributes): Add "handle".
4484         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4485         field.
4486         (remote_update_thread_list): Update thread_handle.
4487         (remote_thread_handle_to_thread_info): New function.
4488         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4489
4490 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4491
4492         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4493         function.
4494         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4495         * python/python-internal.h (thread_object_type): Declare.
4496
4497 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4498
4499         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4500         (target_thread_handle_to_thread_info): Declare.
4501         * target.c (target_thread_handle_to_thread_info): New function.
4502         * target-delegates.c: Regenerate.
4503         * gdbthread.h (find_thread_by_handle): Declare.
4504         * thread.c (find_thread_by_handle): New function.
4505         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4506         function.
4507         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4508
4509 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4510
4511         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4512
4513 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4514
4515         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4516
4517 2017-09-21  Yao Qi  <yao.qi@linaro.org>
4518
4519         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4520         to gdb_target_obs.
4521
4522 2017-09-20  Tom Tromey  <tom@tromey.com>
4523
4524         * breakpoint.c (struct counted_command_line): Remove.
4525         (breakpoint_commands): Update.
4526         (alloc_counted_command_line, incref_counted_command_line)
4527         (decref_counted_command_line, do_cleanup_counted_command_line)
4528         (make_cleanup_decref_counted_command_line): Remove.
4529         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4530         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4531         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4532         (save_breakpoints): Update.
4533         * breakpoint.h (counted_command_line): Now a typedef to
4534         shared_ptr.
4535         (struct breakpoint) <commands>: Now a counted_command_line.
4536         (struct bpstats) <command>: Likewise.
4537
4538 2017-09-20  Tom Tromey  <tom@tromey.com>
4539
4540         * breakpoint.c (struct commands_info, do_map_commands_command):
4541         Remove.
4542         (commands_command_1): Update.
4543         (iterate_over_related_breakpoints): Take a function_view.
4544         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4545         (delete_command): Update.
4546         (map_breakpoint_numbers): Take a function_view.
4547         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4548         (disable_command): Update.
4549         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4550         (enable_command): Update.
4551         (struct disp_data, do_enable_breakpoint_disp)
4552         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4553         (do_map_enable_delete_breakpoint): Remove.
4554         (enable_once_command, enable_count_command, enable_delete_command)
4555         (delete_trace_variable_command): Update.
4556
4557 2017-09-20  Tom Tromey  <tom@tromey.com>
4558
4559         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
4560         (bpstat_clear): Use delete.
4561         (bpstats): New constructors.
4562         (bpstat_copy, bpstat_stop_status): Use new.
4563         (dprintf_after_condition_true): Update.
4564         * breakpoint.h (bpstats::bpstats): Add constructors.
4565         (bpstats::~bpstats): Add destructor.
4566
4567 2017-09-20  Pedro Alves  <palves@redhat.com>
4568
4569         * eval.c (make_params): Delete, refactored as ...
4570         (class fake_method): ... this new type's ctor.
4571         (fake_method::~fake_method): New.
4572         (evaluate_subexp_standard): Use 'fake_method'.
4573
4574 2017-09-20  Tom Tromey  <tom@tromey.com>
4575
4576         * windows-nat.c (get_windows_debug_event, windows_wait)
4577         (do_initial_windows_stuff, windows_attach): Update.
4578         * utils.c (vwarning, internal_vproblem): Update.
4579         (ui_unregister_input_event_handler_cleanup)
4580         (prepare_to_handle_input): Remove.
4581         (class scoped_input_handler): New.
4582         (defaulted_query, prompt_for_continue): Update.
4583         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4584         Update.
4585         * top.c (undo_terminal_modifications_before_exit): Update.
4586         * target/target.h (target_terminal_init, target_terminal_inferior)
4587         (target_terminal_ours): Don't declare.
4588         (class target_terminal): New.
4589         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4590         (target_terminal_ours_for_output)
4591         (make_cleanup_restore_target_terminal): Don't declare.
4592         (target_terminal_info): Remove.
4593         * target.c (enum terminal_state, terminal_state): Remove.
4594         (target_terminal::terminal_state): Define.
4595         (target_terminal::init): Rename from target_terminal_init.
4596         (target_terminal::inferior): Rename from
4597         target_terminal_inferior.
4598         (target_terminal::ours): Rename from target_terminal_ours.
4599         (target_terminal::ours_for_output): Rename from
4600         target_terminal_ours_for_output.
4601         (target_terminal::info): New method.
4602         (cleanup_restore_target_terminal)
4603         (make_cleanup_restore_target_terminal): Remove.
4604         * solib.c (handle_solib_event): Update.
4605         * remote.c (remote_serial_quit_handler): Update.
4606         (remote_terminal_inferior, remote_wait_as): Update.
4607         * record-full.c (record_full_wait_1): Update.
4608         * nto-procfs.c (procfs_create_inferior): Update.
4609         * nat/fork-inferior.c (startup_inferior): Update.
4610         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4611         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4612         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4613         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4614         (mi_breakpoint_created, mi_breakpoint_deleted)
4615         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4616         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4617         (mi_user_selected_context_changed, report_initial_inferior):
4618         Update.
4619         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4620         (linux_nat_terminal_inferior): Update.
4621         * infrun.c (follow_fork_inferior)
4622         (handle_vfork_child_exec_or_exit, do_target_resume)
4623         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4624         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4625         Update.
4626         * inflow.c (child_terminal_init, info_terminal_command): Update.
4627         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4628         (attach_command): Update.
4629         * infcall.c (call_thread_fsm_should_stop): Update.
4630         * gnu-nat.c (gnu_attach): Update.
4631         * extension.c (struct active_ext_lang_state)
4632         (restore_active_ext_lang): Update.
4633         * exceptions.c (print_flush): Update.
4634         * event-top.c (async_enable_stdin, default_quit_handler): Update.
4635         (struct quit_handler_cleanup_data, restore_quit_handler)
4636         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4637         Remove.
4638         * cp-support.c (gdb_demangle): Update.
4639         * breakpoint.c (update_inserted_breakpoint_locations)
4640         (insert_breakpoint_locations, handle_jit_event)
4641         (disable_breakpoints_in_unloaded_shlib): Update.
4642         * annotate.c (annotate_breakpoints_invalid)
4643         (annotate_frames_invalid): Update.
4644
4645 2017-09-20  Tom Tromey  <tom@tromey.com>
4646
4647         * main.c (catch_command_errors): Rename from
4648         catch_command_errors_const.
4649         (captured_main_1): Update.
4650
4651 2017-09-20  Pedro Alves  <palves@redhat.com>
4652
4653         * cli/cli-cmds.c (list_command): Use print_sal_location.
4654         (print_sal_location): New function.
4655         (ambiguous_line_spec): Use print_sal_location.
4656         * linespec.c (symbol_to_sal): Record the symbol in the sal.
4657         * symtab.c (find_function_start_sal): Likewise.
4658         * symtab.h (symtab_and_line::symbol): New field.
4659
4660 2017-09-20  Pedro Alves  <palves@redhat.com>
4661
4662         * linespec.c (minsym_found): Handle non-text minsyms.
4663         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
4664
4665 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4666
4667         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
4668         backslash.
4669
4670 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4671
4672         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
4673         vmovups instead vmovaps.
4674         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
4675
4676 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
4677
4678         * NEWS (Changes since GDB 8.0): Add starti.
4679         * infcmd.c (enum run_break): New.
4680         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
4681         case.
4682         (run_command): Use enum run_how.
4683         (start_command): Likewise.
4684         (starti_command): New function.
4685         (RUN_ARGS_HELP): New macro.
4686         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
4687         commands.  Add starti command.
4688
4689 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4690
4691         * Makefile.in (monitor.o): Remove the rule.
4692
4693 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4694
4695         * annotate.h (struct annotate_arg_emitter): Use
4696         DISABLE_COPY_AND_ASSIGN.
4697         * common/refcounted-object.h (refcounted_object): Likewise.
4698         * completer.h (struct completion_result): Likewise.
4699         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
4700         * filename-seen-cache.h (filename_seen_cache): Likewise.
4701         * gdbcore.h (thread_section_name): Likewise.
4702         * gdb_regex.h (compiled_regex): Likewise.
4703         * gdbthread.h (scoped_restore_current_thread): Likewise.
4704         * inferior.h (scoped_restore_current_inferior): Likewise.
4705         * jit.c (jit_reader): Likewise.
4706         * linespec.h (struct linespec_result): Likewise.
4707         * mi/mi-parse.h (struct mi_parse): Likewise.
4708         * nat/fork-inferior.c (execv_argv): Likewise.
4709         * progspace.h (scoped_restore_current_program_space): Likewise.
4710         * python/python-internal.h (class gdbpy_enter): Likewise.
4711         * regcache.h (regcache): Likewise.
4712         * target-descriptions.c (struct tdesc_reg): Likewise.
4713         (struct tdesc_type): Likewise.
4714         (struct tdesc_feature): Likewise.
4715         * ui-out.h (ui_out_emit_type): Likewise.
4716
4717 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
4718
4719         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
4720         label abort_expression.
4721
4722 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4723
4724         * common/buffer.c (buffer_xml_printf): Adjust.
4725         * common/xml-utils.c (xml_escape_text): Change return type to
4726         std::string, update code accordingly.
4727         * common/xml-utils.h (xml_escape_text): Change return type to
4728         std::string.
4729         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
4730         * windows-tdep.c (windows_xfer_shared_library): Adjust.
4731         * unittests/xml-utils-selftests.c (test_xml_escape_text):
4732         Adjust.
4733
4734 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4735
4736         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
4737         (SUBDIR_UNITTESTS_OBS): Add new object file.
4738         * unittests/xml-utils-selftests.c: New file.
4739
4740 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4741
4742         * common/selftest.h (selftest): New struct/interface.
4743         (register_test): Add name parameter, add new overload.
4744         (run_tests): Add filter parameter.
4745         (for_each_selftest_ftype): New typedef.
4746         (for_each_selftest): New declaration.
4747         * common/selftest.c (tests): Change type to
4748         map<string, unique_ptr<selftest>>.
4749         (simple_selftest): New struct.
4750         (register_test): New function.
4751         (register_test): Add name parameter and use it.
4752         (run_tests): Add filter parameter and use it.  Add prints.
4753         Adjust to vector -> map change.
4754         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
4755         registering selftests.
4756         * arm-tdep.c (_initialize_arm_tdep): Likewise.
4757         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
4758         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
4759         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
4760         * findvar.c (_initialize_findvar): Likewise.
4761         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
4762         * maint.c (maintenance_selftest): Update call to run_tests.
4763         (maintenance_info_selftests): New function.
4764         (_initialize_maint_cmds): Register "maintenance info selftests"
4765         command.  Update "maintenance selftest" doc.
4766         * regcache.c (_initialize_regcache): Add names when registering
4767         selftests.
4768         * rust-exp.y (_initialize_rust_exp): Likewise.
4769         * selftest-arch.c (gdbarch_selftest): New struct.
4770         (gdbarch_tests): Remove.
4771         (register_test_foreach_arch): Add name parameter.  Call
4772         register_test.
4773         (tests_with_arch): Remove, move most content to
4774         gdbarch_selftest::operator().
4775         (_initialize_selftests_foreach_arch): Remove.
4776         * selftest-arch.h (register_test_foreach_arch): Add name
4777         parameter.
4778         (run_tests_with_arch): New declaration.
4779         * utils-selftests.c (_initialize_utils_selftests): Add names
4780         when registering selftests.
4781         * utils.c (_initialize_utils): Likewise.
4782         * unittests/array-view-selftests.c
4783         (_initialize_array_view_selftests): Likewise.
4784         * unittests/environ-selftests.c (_initialize_environ_selftests):
4785         Likewise.
4786         * unittests/function-view-selftests.c
4787         (_initialize_function_view_selftests): Likewise.
4788         * unittests/offset-type-selftests.c
4789         (_initialize_offset_type_selftests): Likewise.
4790         * unittests/optional-selftests.c
4791         (_initialize_optional_selftests): Likewise.
4792         * unittests/scoped_restore-selftests.c
4793         (_initialize_scoped_restore_selftests): Likewise.
4794         * NEWS: Document "maintenance selftest" and "maint info
4795         selftests".
4796
4797 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4798
4799         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
4800         scoped_restore.
4801
4802 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4803
4804         * mi/mi-main.c (mi_load_progress): Make uiout variable
4805         a unique_ptr.
4806
4807 2017-09-15  Pedro Alves  <palves@redhat.com>
4808
4809         * compile/compile-c-types.c (convert_enum, convert_int)
4810         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
4811
4812 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
4813
4814         * dwarf2read.c (copy_string): Remove.
4815         (parse_macro_definition): Replace copy_string with savestring.
4816
4817 2017-09-15  Yao Qi  <yao.qi@linaro.org>
4818
4819         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
4820         gdb_target_obs.
4821         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
4822         Likewise.
4823         (i[34567]86-*-linux*): Likewise.
4824
4825 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4826
4827         * dwarf2expr.h (dwarf_stack_value): Add constructor.
4828         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
4829         <stack>: Change type to std::vector.
4830         <stack_len, stack_allocated>: Remove.
4831         <grow_stack>: Remove.
4832         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4833         (dwarf_expr_context::~dwarf_expr_context): Remove.
4834         (dwarf_expr_context::grow_stack): Remove.
4835         (dwarf_expr_context::push): Adjust.
4836         (dwarf_expr_context::pop): Adjust.
4837         (dwarf_expr_context::fetch): Adjust.
4838         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
4839         (dwarf_expr_context::stack_empty_p): Adjust.
4840         (dwarf_expr_context::execute_stack_op): Adjust.
4841
4842 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4843
4844         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
4845         return type to bool.
4846         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
4847
4848 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4849
4850         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
4851         Change type to bool.
4852         (dwarf_stack_value) <in_stack_memory>: Likewise.
4853         (dwarf_expr_context) <push_address>: Change parameter type to
4854         bool.
4855         <fetch_in_stack_memory>: Change return type to bool.
4856         <push>: Change parameter type to bool.
4857         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
4858         to bool.
4859         (dwarf_expr_context::push_address): Likewise.
4860         (dwarf_expr_context::fetch_in_stack_memory): Change return type
4861         to bool.
4862         (dwarf_expr_context::execute_stack_op): Adjust.
4863         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
4864
4865 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4866
4867         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
4868         (struct dwarf_expr_context) <n_pieces>: Remove.
4869         <pieces>: Change type to std::vector.
4870         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4871         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
4872         pieces.
4873         (dwarf_expr_context::add_piece): Adjust.
4874         * dwarf2loc.c (struct piece_closure): Initialize fields.
4875         <n_pieces>: Remove.
4876         <pieces>: Change type to std::vector.
4877         (allocate_piece_closure): Adjust, change parameter to
4878         std::vector rvalue and std::move it to piece_closure.
4879         (rw_pieced_value): Adjust.
4880         (check_pieced_synthetic_pointer): Adjust.
4881         (indirect_synthetic_pointer): Adjust.
4882         (coerce_pieced_ref): Adjust.
4883         (free_pieced_value_closure):  Adjust.  Use delete to free
4884         piece_closure.
4885         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
4886         to allocate_piece_closure.
4887         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
4888
4889 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4890
4891         * probe.h (probe_ops_cp): Remove typedef.
4892         (DEF_VEC_P (probe_ops_cp)): Remove.
4893         (all_probe_ops): Change type to std::vector.
4894         * probe.c (info_probes_for_ops): Adjust to vector change.
4895         (probe_linespec_to_ops): Likewise.
4896         (all_probe_ops): Change type to std::vector.
4897         (_initialize_probe): Adjust to vector change.
4898         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
4899         * elfread.c (elf_get_probes): Likewise.
4900         * stap-probe.c (_initialize_stap_probe): Likewise.
4901
4902 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4903
4904         * probe.h (struct bound_probe): Define constructors.
4905         * probe.c (bound_probe_s): Remove typedef.
4906         (DEF_VEC_O (bound_probe_s)): Remove VEC.
4907         (collect_probes): Change return type to std::vector, remove
4908         cleanup.
4909         (compare_probes): Return bool, change parameter type.  Change
4910         semantic to "less than".
4911         (gen_ui_out_table_header_info): Change parameter to std::vector
4912         and update.
4913         (exists_probe_with_pops): Likewise.
4914         (info_probes_for_ops): Update to std::vector change.
4915         (enable_probes_command): Likewise.
4916         (disable_probes_command): Likewise.
4917
4918 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4919
4920         * probe.h (struct probe_ops) <get_probes>: Change parameter from
4921         vec to std::vector.
4922         * probe.c (parse_probes_in_pspace): Update.
4923         (find_probes_in_objfile): Update.
4924         (find_probe_by_pc): Update.
4925         (collect_probes): Update.
4926         (probe_any_get_probes): Update.
4927         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
4928         return type to reference to std::vector.
4929         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
4930         std::vector and update.
4931         (dtrace_process_dof): Likewise.
4932         (dtrace_get_probes): Likewise.
4933         * elfread.c (elf_get_probes): Change return type to std::vector,
4934         store an std::vector in bfd_data.
4935         (probe_key_free): Update to std::vector.
4936         * stap-probe.c (handle_stap_probe): Change parameter to
4937         std::vector and update.
4938         (stap_get_probes): Likewise.
4939         * symfile-debug.c (debug_sym_get_probes): Change return type to
4940         std::vector and update.
4941
4942 2017-09-11  Tom Tromey  <tom@tromey.com>
4943
4944         * breakpoint.c (program_breakpoint_here_p): Update.
4945         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
4946         from make_show_memory_breakpoints_cleanup.  Return a
4947         scoped_restore_tmpl<int>.
4948         (restore_show_memory_breakpoints): Remove.
4949         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
4950         * mem-break.c (memory_validate_breakpoint): Update.
4951         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
4952         (ia64_memory_remove_breakpoint): Update.
4953         (ia64_breakpoint_from_pc): Update.
4954         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
4955         from make_show_memory_breakpoints_cleanup.
4956
4957 2017-09-11  Tom Tromey  <tom@tromey.com>
4958
4959         * d-namespace.c (d_lookup_symbol): Use std::string.
4960         (find_symbol_in_baseclass): Likewise.
4961
4962 2017-09-11  Tom Tromey  <tom@tromey.com>
4963
4964         * ctf.c (ctf_start): Use std::string.
4965
4966 2017-09-11  Tom Tromey  <tom@tromey.com>
4967
4968         * ada-lang.c (is_known_support_routine): Update.
4969         (ada_unhandled_exception_name_addr_from_raise): Update.
4970         * guile/scm-frame.c (gdbscm_frame_name): Update.
4971         * python/py-frame.c (frapy_name): Update.
4972         (frapy_function): Update.
4973         * stack.h (find_frame_funname): Update.
4974         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
4975         (print_frame): Update.
4976
4977 2017-09-11  Tom Tromey  <tom@tromey.com>
4978
4979         * findcmd.c (put_bits): Take a gdb::byte_vector.
4980         (parse_find_args): Return gdb::byte_vector.  "args" now const.
4981         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
4982         cleanups.
4983         (find_command): Update.
4984
4985 2017-09-11  Tom Tromey  <tom@tromey.com>
4986
4987         * cli/cli-script.c (class scoped_restore_hook_in): New.
4988         (clear_hook_in_cleanup): Remove.
4989         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
4990         scoped_restore_hook_in.
4991
4992 2017-09-11  Tom Tromey  <tom@tromey.com>
4993
4994         * cli/cli-script.c (restore_interp): Remove.
4995         (read_command_lines): Use scoped_restore_interp.
4996         * interps.c (scoped_restore_interp::set_temp): Rename from
4997         interp_set_temp.
4998         * interps.h (class scoped_restore_interp): New.
4999         (interp_set_temp): Remove.
5000
5001 2017-09-11  Tom Tromey  <tom@tromey.com>
5002
5003         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5004         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5005         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5006         scoped_restore.
5007         (mi_cmd_break_insert_1): Update.
5008         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5009         scoped_restore.
5010
5011 2017-09-11  Tom Tromey  <tom@tromey.com>
5012
5013         * demangle.c (demangle_command): Update.
5014         * breakpoint.c (disable_command): Update.
5015         (enable_command): Update.
5016         (find_location_by_number): Make "number" const.  Use
5017         get_number_trailer.
5018         * cli/cli-utils.c (extract_arg): Return std::string.
5019         * probe.c (parse_probe_linespec): Update.  Change types.
5020         (collect_probes): Take string arguments.
5021         (parse_probe_linespec): Likewise.
5022         (info_probes_for_ops): Update.
5023         (enable_probes_command): Update.
5024         (disable_probes_command): Update.
5025         * break-catch-sig.c (catch_signal_split_args): Update.
5026         * mi/mi-parse.c (mi_parse): Update.
5027
5028 2017-09-11  Tom Tromey  <tom@tromey.com>
5029
5030         * language.h (language_enum): Make argument const.
5031         * language.c (language_enum): Make argument const.
5032
5033 2017-09-11  Tom Tromey  <tom@tromey.com>
5034
5035         * common/common-utils.h (skip_to_space): Remove macro, redeclare
5036         as function.
5037         (skip_to_space): Rename from skip_to_space_const.
5038         * common/common-utils.c (skip_to_space): New function.
5039         (skip_to_space): Rename from skip_to_space_const.
5040         * cli/cli-utils.h (get_number): Rename from get_number_const.
5041         (extract_arg): Rename from extract_arg_const.
5042         * cli/cli-utils.c (get_number): Rename from get_number_const.
5043         (extract_arg): Rename from extract_arg_const.
5044         (number_or_range_parser::get_number): Use ::get_number.
5045         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5046         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5047         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5048         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5049         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5050         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5051         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5052         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5053
5054 2017-09-11  Tom Tromey  <tom@tromey.com>
5055
5056         * python/python.c (do_start_initialization): Use
5057         py-event-types.def to initialize types.
5058         Define all object type structures.
5059         * python/python-internal.h: Don't declare event initialization
5060         functions.
5061         * python/py-threadevent.c (thread_event_object_type): Don't
5062         define.
5063         * python/py-stopevent.c (stop_event_object_type): Don't define.
5064         * python/py-signalevent.c (signal_event_object_type): Don't
5065         declare or define.
5066         * python/py-newobjfileevent.c (new_objfile_event_object_type)
5067         (clear_objfiles_event_object_type): Don't declare or define.
5068         * python/py-infevents.c (inferior_call_pre_event_object_type)
5069         (inferior_call_post_event_object_type)
5070         (register_changed_event_object_type)
5071         (memory_changed_event_object_type): Don't declare or define.
5072         * python/py-inferior.c (new_thread_event_object_type)
5073         (new_inferior_event_object_type)
5074         (inferior_deleted_event_object_type): Don't declare or define.
5075         * python/py-exitedevent.c (exited_event_object_type): Don't
5076         declare or define.
5077         * python/py-evts.c (gdbpy_initialize_py_events): Use
5078         py-all-events.def.
5079         * python/py-events.h (thread_event_object_type): Don't declare.
5080         (events_object): Use py-all-events.def.
5081         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
5082         py-event-types.def.
5083         * python/py-event-types.def: New file.
5084         * python/py-continueevent.c (create_continue_event_object): Don't
5085         declare or define.
5086         * python/py-bpevent.c (breakpoint_event_object_type): Don't
5087         declare or define.
5088         * python/py-all-events.def: New file.
5089
5090 2017-09-11  Tom Tromey  <tom@tromey.com>
5091
5092         * python/py-threadevent.c (create_thread_event_object): Return
5093         gdbpy_ref.
5094         * python/py-stopevent.h (create_stop_event_object)
5095         (create_breakpoint_event_object, create_signal_event_object):
5096         Update.
5097         * python/py-stopevent.c (create_stop_event_object): Return
5098         gdbpy_ref.
5099         (emit_stop_event): Update.
5100         * python/py-signalevent.c (create_signal_event_object): Return
5101         gdbpy_ref.
5102         * python/py-infevents.c (create_inferior_call_event_object):
5103         Update.
5104         * python/py-event.h (create_event_object)
5105         (create_thread_event_object): Update.
5106         * python/py-event.c (create_event_object): Return gdbpy_ref.
5107         * python/py-continueevent.c: Return gdbpy_ref.
5108         * python/py-bpevent.c (create_breakpoint_event_object): Return
5109         gdbpy_ref.
5110
5111 2017-09-11  Tom Tromey  <tom@tromey.com>
5112
5113         PR python/15622:
5114         * NEWS: Add entry.
5115         * python/python.c (do_start_initialization): Initialize new event
5116         types.
5117         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5118         (gdbpy_initialize_inferior_deleted_event)
5119         (gdbpy_initialize_new_thread_event): Declare.
5120         * python/py-threadevent.c (create_thread_event_object): Add option
5121         "thread" parameter.
5122         * python/py-inferior.c (new_thread_event_object_type)
5123         (new_inferior_event_object_type)
5124         (inferior_deleted_event_object_type): Declare.
5125         (python_new_inferior, python_inferior_deleted): New functions.
5126         (add_thread_object): Emit new_thread event.
5127         (gdbpy_initialize_inferior): Attach new functions to corresponding
5128         observers.
5129         (new_thread, new_inferior, inferior_deleted): Define new event
5130         types.
5131         * python/py-evts.c (gdbpy_initialize_py_events): Add new
5132         registries.
5133         * python/py-events.h (events_object) <new_inferior,
5134         inferior_deleted, new_thread>: New fields.
5135         * python/py-event.h (create_thread_event_breakpoint): Add optional
5136         "thread" parameter.
5137
5138 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5139
5140         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5141         check current_ui instead.
5142         (internal_vproblem): Likewise.
5143
5144 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
5145
5146         * thread.c (print_thread_info_1): Remove unnecessary calls to
5147         uiout->is_mi_like_p.
5148
5149 2017-09-09  Tom Tromey  <tom@tromey.com>
5150
5151         * namespace.h (add_using_directive): Update.
5152         * namespace.c (add_using_directive): Change type of excludes to
5153         std::vector.
5154         * dwarf2read.c (read_import_statement): Use std::vector.
5155         (read_namespace): Update.
5156         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5157
5158 2017-09-09  Tom Tromey  <tom@tromey.com>
5159
5160         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5161
5162 2017-09-09  Tom Tromey  <tom@tromey.com>
5163
5164         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5165
5166 2017-09-09  Tom Tromey  <tom@tromey.com>
5167
5168         * stack.c (func_command): Use gdb::def_vector.
5169
5170 2017-09-09  Tom Tromey  <tom@tromey.com>
5171
5172         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5173         ui_out_emit_list, ui_out_emit_tuple.
5174         (mi_cmd_var_update): Likewise.
5175
5176 2017-09-09  Tom Tromey  <tom@tromey.com>
5177
5178         * mi/mi-interp.c (mi_user_selected_context_changed): Use
5179         ui_out_redirect_pop.
5180         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5181         ui_out_redirect_pop.
5182         * utils.c (do_ui_out_redirect_pop)
5183         (make_cleanup_ui_out_redirect_pop): Remove.
5184         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5185         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5186         * ui-out.h (ui_out_redirect_pop): New class.
5187
5188 2017-09-09  Tom Tromey  <tom@tromey.com>
5189
5190         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5191         (list_available_thread_groups, mi_cmd_list_thread_groups)
5192         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5193         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5194         Likewise.
5195
5196 2017-09-09  Tom Tromey  <tom@tromey.com>
5197
5198         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5199         ui_out_emit_tuple.
5200
5201 2017-09-09  Tom Tromey  <tom@tromey.com>
5202
5203         * target.c (flash_erase_command): Use ui_out_emit_tuple.
5204         * stack.c (print_frame): Use ui_out_emit_tuple.
5205         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5206         (info_spu_mailbox_command, info_spu_dma_command)
5207         (info_spu_proxydma_command): Likewise.
5208         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5209         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5210         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5211         ui_out_emit_tuple.
5212         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5213
5214 2017-09-09  Tom Tromey  <tom@tromey.com>
5215
5216         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5217         (class ui_out_emit_table): Update comment.
5218         * ui-out.c (do_cleanup_table_end)
5219         (make_cleanup_ui_out_table_begin_end): Remove.
5220         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5221         (info_spu_dma_cmdlist): Likewise.
5222         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5223         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5224         ui_out_emit_table.
5225
5226 2017-09-09  Tom Tromey  <tom@tromey.com>
5227
5228         * thread.c (print_thread_info_1): Use ui_out_emit_table,
5229         ui_out_emit_list, gdb::optional.
5230
5231 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
5232
5233         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5234         prototype.
5235         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5236         prototype.
5237         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5238         prototype.
5239         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5240         * ada-exp.y: Remove _initialize_ada_exp prototype.
5241         * ada-lang.c: Remove _initialize_ada_language prototype.
5242         * ada-tasks.c: Remove _initialize_tasks prototype.
5243         * addrmap.c: Remove _initialize_addrmap prototype.
5244         * agent.c: Remove _initialize_agent prototype.
5245         * aix-thread.c: Remove _initialize_aix_thread prototype.
5246         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5247         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5248         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5249         prototype.
5250         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5251         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5252         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5253         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5254         prototype.
5255         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5256         prototype.
5257         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5258         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5259         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5260         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5261         prototype.
5262         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5263         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5264         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5265         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5266         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5267         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5268         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5269         prototype.
5270         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5271         prototype.
5272         * annotate.c: Remove _initialize_annotate prototype.
5273         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5274         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5275         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5276         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5277         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5278         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5279         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5280         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5281         prototype.
5282         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5283         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5284         * auto-load.c: Remove _initialize_auto_load prototype.
5285         * auxv.c: Remove _initialize_auxv prototype.
5286         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5287         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5288         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5289         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5290         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5291         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5292         prototype.
5293         * break-catch-throw.c: Remove _initialize_break_catch_throw
5294         prototype.
5295         * breakpoint.c: Remove _initialize_breakpoint prototype.
5296         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5297         * btrace.c: Remove _initialize_btrace prototype.
5298         * charset.c: Remove _initialize_charset prototype.
5299         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5300         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5301         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5302         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5303         * cli/cli-script.c: Remove _initialize_cli_script prototype.
5304         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5305         * coffread.c: Remove _initialize_coffread prototype.
5306         * compile/compile.c: Remove _initialize_compile prototype.
5307         * complaints.c: Remove _initialize_complaints prototype.
5308         * completer.c: Remove _initialize_completer prototype.
5309         * copying.awk: Remove _initialize_copying prototype.
5310         * copying.c: Regenerate.
5311         * core-regset.c: Remove _initialize_core_regset prototype.
5312         * corefile.c: Remove _initialize_core prototype.
5313         * corelow.c: Remove _initialize_corelow prototype.
5314         * cp-abi.c: Remove _initialize_cp_abi prototype.
5315         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5316         * cp-support.c: Remove _initialize_cp_support prototype.
5317         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5318         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5319         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5320         * ctf.c: Remove _initialize_ctf prototype.
5321         * d-lang.c: Remove _initialize_d_language prototype.
5322         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5323         prototype.
5324         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5325         * dbxread.c: Remove _initialize_dbxread prototype.
5326         * dcache.c: Remove _initialize_dcache prototype.
5327         * demangle.c: Remove _initialize_demangler prototype.
5328         * disasm-selftests.c: Remove _initialize_disasm_selftests
5329         prototype.
5330         * disasm.c: Remove _initialize_disasm prototype.
5331         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5332         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5333         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5334         prototype.
5335         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5336         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5337         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5338         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5339         * elfread.c: Remove _initialize_elfread prototype.
5340         * exec.c: Remove _initialize_exec prototype.
5341         * extension.c: Remove _initialize_extension prototype.
5342         * f-lang.c: Remove _initialize_f_language prototype.
5343         * f-valprint.c: Remove _initialize_f_valprint prototype.
5344         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5345         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5346         * filesystem.c: Remove _initialize_filesystem prototype.
5347         * findcmd.c: Remove _initialize_mem_search prototype.
5348         * fork-child.c: Remove _initialize_fork_child prototype.
5349         * frame-base.c: Remove _initialize_frame_base prototype.
5350         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5351         * frame.c: Remove _initialize_frame prototype.
5352         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5353         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5354         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5355         * gcore.c: Remove _initialize_gcore prototype.
5356         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5357         * gdbarch.c: Regenerate.
5358         * gdbarch.sh: Remove _initialize_gdbarch prototype.
5359         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5360         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5361         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5362         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5363         * go-lang.c: Remove _initialize_go_language prototype.
5364         * go32-nat.c: Remove _initialize_go32_nat prototype.
5365         * guile/guile.c: Remove _initialize_guile prototype.
5366         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5367         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5368         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5369         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5370         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5371         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5372         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5373         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5374         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5375         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5376         prototype.
5377         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5378         prototype.
5379         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5380         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5381         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5382         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5383         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5384         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5385         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5386         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5387         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5388         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5389         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5390         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5391         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5392         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5393         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5394         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5395         prototype.
5396         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5397         prototype.
5398         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5399         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5400         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5401         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5402         * infcall.c: Remove _initialize_infcall prototype.
5403         * infcmd.c: Remove _initialize_infcmd prototype.
5404         * inferior.c: Remove _initialize_inferiors prototype.
5405         * inflow.c: Remove _initialize_inflow prototype.
5406         * infrun.c: Remove _initialize_infrun prototype.
5407         * interps.c: Remove _initialize_interpreter prototype.
5408         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5409         * jit.c: Remove _initialize_jit prototype.
5410         * language.c: Remove _initialize_language prototype.
5411         * linux-fork.c: Remove _initialize_linux_fork prototype.
5412         * linux-nat.c: Remove _initialize_linux_nat prototype.
5413         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5414         * linux-thread-db.c: Remove _initialize_thread_db prototype.
5415         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5416         * m2-lang.c: Remove _initialize_m2_language prototype.
5417         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5418         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5419         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5420         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5421         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5422         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5423         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5424         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5425         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5426         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5427         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5428         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5429         * machoread.c: Remove _initialize_machoread prototype.
5430         * macrocmd.c: Remove _initialize_macrocmd prototype.
5431         * macroscope.c: Remove _initialize_macroscope prototype.
5432         * maint.c: Remove _initialize_maint_cmds prototype.
5433         * mdebugread.c: Remove _initialize_mdebugread prototype.
5434         * memattr.c: Remove _initialize_mem prototype.
5435         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5436         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5437         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5438         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5439         * mi/mi-main.c: Remove _initialize_mi_main prototype.
5440         * microblaze-linux-tdep.c: Remove
5441         _initialize_microblaze_linux_tdep prototype.
5442         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5443         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5444         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5445         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5446         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5447         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5448         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5449         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5450         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5451         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5452         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5453         prototype.
5454         * mipsread.c: Remove _initialize_mipsread prototype.
5455         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5456         prototype.
5457         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5458         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5459         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5460         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5461         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5462         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5463         prototype.
5464         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5465         * nto-procfs.c: Remove _initialize_procfs prototype.
5466         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5467         * objc-lang.c: Remove _initialize_objc_language prototype.
5468         * objfiles.c: Remove _initialize_objfiles prototype.
5469         * observer.c: Remove observer_test_first_notification_function,
5470         observer_test_second_notification_function,
5471         observer_test_third_notification_function, and
5472         _initialize_observer prototypes.
5473         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5474         * osabi.c: Remove _initialize_gdb_osabi prototype.
5475         * osdata.c: Remove _initialize_osdata prototype.
5476         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5477         * parse.c: Remove _initialize_parse prototype.
5478         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5479         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5480         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5481         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5482         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5483         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5484         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5485         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5486         * printcmd.c: Remove _initialize_printcmd prototype.
5487         * probe.c: Remove _initialize_probe prototype.
5488         * proc-api.c: Remove _initialize_proc_api prototype.
5489         * proc-events.c: Remove _initialize_proc_events prototype.
5490         * proc-service.c: Remove _initialize_proc_service prototype.
5491         * procfs.c: Remove _initialize_procfs prototype.
5492         * psymtab.c: Remove _initialize_psymtab prototype.
5493         * python/python.c: Remove _initialize_python prototype.
5494         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5495         * record-btrace.c: Remove _initialize_record_btrace prototype.
5496         * record-full.c: Remove _initialize_record_full prototype.
5497         * record.c: Remove _initialize_record prototype.
5498         * regcache.c: Remove _initialize_regcache prototype.
5499         * reggroups.c: Remove _initialize_reggroup prototype.
5500         * remote-notif.c: Remove _initialize_notif prototype.
5501         * remote-sim.c: Remove _initialize_remote_sim prototype.
5502         * remote.c: Remove _initialize_remote prototype.
5503         * reverse.c: Remove _initialize_reverse prototype.
5504         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5505         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5506         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5507         prototype.
5508         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5509         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5510         * rust-exp.y: Remove _initialize_rust_exp prototype.
5511         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5512         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5513         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5514         * score-tdep.c: Remove _initialize_score_tdep prototype.
5515         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5516         prototype.
5517         * ser-go32.c: Remove _initialize_ser_dos prototype.
5518         * ser-mingw.c: Remove _initialize_ser_windows prototype.
5519         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5520         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5521         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5522         * serial.c: Remove _initialize_serial prototype.
5523         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5524         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5525         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5526         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5527         * skip.c: Remove _initialize_step_skip prototype.
5528         * sol-thread.c: Remove _initialize_sol_thread prototype.
5529         * solib-aix.c: Remove _initialize_solib_aix prototype.
5530         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5531         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5532         * solib-frv.c: Remove _initialize_frv_solib prototype.
5533         * solib-spu.c: Remove _initialize_spu_solib prototype.
5534         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5535         * solib-target.c: Remove _initialize_solib_target prototype.
5536         * solib.c: Remove _initialize_solib prototype.
5537         * source.c: Remove _initialize_source prototype.
5538         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5539         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5540         prototype.
5541         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5542         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5543         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5544         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5545         prototype.
5546         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5547         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5548         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5549         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5550         prototype.
5551         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5552         prototype.
5553         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5554         prototype.
5555         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5556         prototype.
5557         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5558         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5559         prototype.
5560         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5561         prototype.
5562         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5563         prototype.
5564         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5565         prototype.
5566         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5567         prototype.
5568         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5569         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5570         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5571         * stabsread.c: Remove _initialize_stabsread prototype.
5572         * stack.c: Remove _initialize_stack prototype.
5573         * stap-probe.c: Remove _initialize_stap_probe prototype.
5574         * std-regs.c: Remove _initialize_frame_reg prototype.
5575         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5576         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5577         * symfile.c: Remove _initialize_symfile prototype.
5578         * symmisc.c: Remove _initialize_symmisc prototype.
5579         * symtab.c: Remove _initialize_symtab prototype.
5580         * target-dcache.c: Remove _initialize_target_dcache prototype.
5581         * target-descriptions.c: Remove _initialize_target_descriptions
5582         prototype.
5583         * thread.c: Remove _initialize_thread prototype.
5584         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5585         prototype.
5586         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5587         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5588         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5589         prototype.
5590         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5591         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5592         * tracefile.c: Remove _initialize_tracefile prototype.
5593         * tracepoint.c: Remove _initialize_tracepoint prototype.
5594         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5595         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5596         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5597         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5598         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5599         * tui/tui-win.c: Remove _initialize_tui_win prototype.
5600         * tui/tui.c: Remove _initialize_tui prototype.
5601         * typeprint.c: Remove _initialize_typeprint prototype.
5602         * user-regs.c: Remove _initialize_user_regs prototype.
5603         * utils.c: Remove _initialize_utils prototype.
5604         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5605         * valarith.c: Remove _initialize_valarith prototype.
5606         * valops.c: Remove _initialize_valops prototype.
5607         * valprint.c: Remove _initialize_valprint prototype.
5608         * value.c: Remove _initialize_values prototype.
5609         * varobj.c: Remove _initialize_varobj prototype.
5610         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5611         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5612         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5613         * windows-nat.c: Remove _initialize_windows_nat,
5614         _initialize_check_for_gdb_ini, and _initialize_loadable
5615         prototypes.
5616         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5617         * xcoffread.c: Remove _initialize_xcoffread prototype.
5618         * xml-support.c: Remove _initialize_xml_support prototype.
5619         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5620         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5621         prototype.
5622         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5623         prototype.
5624         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5625
5626 2017-09-08  Keith Seitz  <keiths@redhat.com>
5627
5628         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5629         field.
5630
5631 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
5632
5633         * f-valprint.c (f_val_print): Remove check for one byte
5634         sized integers. Remove printing of character type.
5635
5636 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
5637             Christoph Weinmann  <christoph.t.weinmann@intel.com>
5638             Bernhard Heckel  <bernhard.heckel@intel.com>
5639
5640         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5641         to maintain proper indentation when printing pointers/refs.
5642
5643 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5644
5645         GDB 8.0.1 released.
5646
5647 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5648
5649         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
5650
5651 2017-09-05  Tom Tromey  <tom@tromey.com>
5652
5653         * parse.c (funcall_chain): Now a std::vector.
5654         (start_arglist, end_arglist): Simplify.
5655         (free_funcalls): Remove.
5656         (parse_exp_in_context_1): Remove cleanup.
5657
5658 2017-09-05  Tom Tromey  <tom@tromey.com>
5659
5660         * go-exp.y (go_parse): Don't create a cleanup.
5661
5662 2017-09-05  Tom Tromey  <tom@tromey.com>
5663
5664         * d-exp.y (PrimaryExpression): Use std::string.
5665         (d_parse): Don't create a cleanup.
5666
5667 2017-09-05  Tom Tromey  <tom@tromey.com>
5668
5669         * utils.c (do_clear_parser_state): Remove.
5670         (make_cleanup_clear_parser_state): Remove.
5671         * p-exp.y (pascal_parse): Use scoped_restore.
5672         * m2-exp.y (m2_parse): Use scoped_restore.
5673         * f-exp.y (f_parse): Use scoped_restore.
5674         * d-exp.y (d_parse): Use scoped_restore.
5675         * c-exp.y (c_parse): Use scoped_restore.
5676         * ada-exp.y (ada_parse): Use scoped_restore.
5677         * utils.h (make_cleanup_clear_parser_state): Remove.
5678
5679 2017-09-06  Keith Seitz  <keiths@redhat.com>
5680
5681         * dwarf2read.c (dw2_linkage_name_attr): New function.
5682         (dw2_linkage_name): New function.
5683         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
5684         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
5685         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
5686
5687 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5688
5689         * config/djgpp/djconfig.sh: Correct shell portability issue.
5690
5691 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5692
5693         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
5694
5695 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5696
5697         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
5698         * NEWS: Mention new FreeBSD/mips native configuration.
5699         * configure.host: Add aarch64*-*-freebsd*.
5700         * configure.nat: Likewise.
5701         * aarch64-fbsd-nat.c: New file.
5702
5703 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5704
5705         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
5706         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
5707         * NEWS: Mention new FreeBSD/aarch64 target.
5708         * configure.tgt: Add aarch64*-*-freebsd*.
5709         * aarch64-fbsd-tdep.c: New file.
5710         * aarch64-fbsd-tdep.h: New file.
5711
5712 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5713
5714         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
5715
5716 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
5717
5718         * parse.c (find_minsym_type_and_address): Don't relocate addresses
5719         of TLS symbols.
5720
5721 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5722
5723         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
5724         call.
5725
5726 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5727
5728         * infrun.c (follow_exec): Call add_thread after
5729         target_find_description.
5730
5731 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5732
5733         * infrun.c (handle_inferior_event_1): When exec'ing, read
5734         stop_pc after follow_exec.
5735
5736 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5737
5738         * remote.c (process_g_packet): Update error message.
5739
5740 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5741
5742         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
5743         targets.
5744
5745 2017-09-05  Pedro Alves  <palves@redhat.com>
5746
5747         * eval.c (eval_call, evaluate_funcall): New functions, factored
5748         out from ...
5749         (evaluate_subexp_standard): ... this.
5750
5751 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5752
5753         * amd64-tdep.c (amd64_target_description): Create target
5754         descriptions.
5755         (_initialize_amd64_tdep): Don't call functions
5756         initialize_tdesc_amd64_*.  Add self tests.
5757         * arch/amd64.c (amd64_create_target_description): Add parameter
5758         is_linux.  Call set_tdesc_osabi if is_linux is true.
5759         * arch/amd64.h (amd64_create_target_description): Update the
5760         declaration.
5761         * arch/i386.c (i386_create_target_description): Add parameter
5762         is_linux.  Call set_tdesc_osabi if is_linux is true.
5763         * arch/i386.h (i386_create_target_description): Update
5764         declaration.
5765         * configure.tgt: Add i386.o to gdb_target_obs.
5766         * features/Makefile (XMLTOC): Remove i386/*.xml.
5767         * features/i386/amd64-avx-avx512.c: Remove.
5768         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
5769         * features/i386/amd64-avx-mpx.c: Remove.
5770         * features/i386/amd64-avx.c: Remove.
5771         * features/i386/amd64-mpx.c: Remove.
5772         * features/i386/amd64.c: Remove.
5773         * features/i386/i386-avx-avx512.c: Remove.
5774         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
5775         * features/i386/i386-avx-mpx.c: Remove.
5776         * features/i386/i386-avx.c: Remove.
5777         * features/i386/i386-mmx.c: Remove.
5778         * features/i386/i386-mpx.c: Remove.
5779         * features/i386/i386.c: Remove.
5780         * i386-tdep.c: Don't include features/i386/i386*.c., include
5781         target-descriptions.h and arch/i386.h.
5782         (i386_target_description): Create target descriptions.
5783         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
5784         functions.  Do self tests.
5785
5786 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5787
5788         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
5789         * features/i386/amd64-avx-avx512-linux.c: Removed.
5790         * features/i386/amd64-avx-linux.c: Removed.
5791         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
5792         * features/i386/amd64-avx-mpx-linux.c: Removed.
5793         * features/i386/amd64-linux.c: Removed.
5794         * features/i386/amd64-mpx-linux.c: Removed.
5795         * features/i386/x32-avx-avx512-linux.c: Removed.
5796         * features/i386/x32-avx-linux.c: Removed.
5797         * features/i386/x32-linux.c: Removed.
5798
5799 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5800
5801         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
5802         features/i386/*.c.
5803         (amd64_linux_read_description): Call
5804         amd64_create_target_description.
5805         * arch/amd64.c: New file.
5806         * arch/amd64.h: New file.
5807         * configure.tgt (x86_64-*-linux*): Append amd64.o.
5808         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
5809
5810 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5811
5812         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
5813         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
5814         (amd64_linux_read_description): Create target descriptions.
5815         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
5816         functions.  Add unit tests.
5817         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
5818         x32-core.xml.
5819         * features/i386/64bit-avx.c: Generated.
5820         * features/i386/64bit-avx512.c: Generated.
5821         * features/i386/64bit-core.c: Generated.
5822         * features/i386/64bit-linux.c: Generated.
5823         * features/i386/64bit-mpx.c: Generated.
5824         * features/i386/64bit-pkeys.c: Generated.
5825         * features/i386/64bit-segments.c: Generated.
5826         * features/i386/64bit-sse.c: Generated.
5827         * features/i386/x32-core.c: Generated.
5828         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
5829         c files for amd64-linux and x32-linux.
5830
5831 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5832
5833         * amd64-linux-tdep.c (amd64_linux_read_description): New
5834         function.
5835         (amd64_linux_core_read_description): Call
5836         amd64_linux_read_description.
5837         (amd64_linux_init_abi): Likewise.
5838         (amd64_x32_linux_init_abi): Likewise.
5839         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
5840         * x86-linux-nat.c (x86_linux_read_description): Call
5841         amd64_linux_read_description.
5842
5843 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5844
5845         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
5846         comments.
5847
5848 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5849
5850         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
5851         * features/i386/i386-avx-avx512-linux.c: Remove.
5852         * features/i386/i386-avx-linux.c: Remove.
5853         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
5854         * features/i386/i386-avx-mpx-linux.c: Remove.
5855         * features/i386/i386-linux.c: Remove.
5856         * features/i386/i386-mmx-linux.c: Remove.
5857         * features/i386/i386-mpx-linux.c: Remove.
5858
5859 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5860
5861         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
5862         (SFILES): Add arch/i386.c.
5863         (HFILES_NO_SRCDIR): Add arch/i386.h.
5864         * arch/i386.c: New file.
5865         * arch/i386.h: New file.
5866         * arch/tdesc.h (allocate_target_description): Declare.
5867         (set_tdesc_architecture): Declare.
5868         (set_tdesc_osabi): Declare.
5869         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
5870         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
5871         include arch/i386.h.
5872         (i386_linux_read_description): Remove code and call
5873         i386_create_target_description.
5874         (set_tdesc_architecture): New function.
5875         (set_tdesc_osabi): New function.
5876         * target-descriptions.h (allocate_target_description): Remove.
5877
5878 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5879
5880         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
5881         * target-descriptions.c (tdesc_create_feature): Likewise, and
5882         adjust code.
5883         * features/i386/32bit-avx.c: Re-generated.
5884         * features/i386/32bit-avx512.c: Re-generated.
5885         * features/i386/32bit-core.c: Re-generated.
5886         * features/i386/32bit-linux.c: Re-generated.
5887         * features/i386/32bit-mpx.c: Re-generated.
5888         * features/i386/32bit-pkeys.c: Re-generated.
5889         * features/i386/32bit-sse.c: Re-generated.
5890
5891 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5892
5893         * regformats/regdef.h (struct reg): Override operator == and !=.
5894
5895 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5896
5897         * arch/tdesc.h: New file.
5898         * regformats/regdat.sh: Generate code using tdesc_create_reg.
5899         * target-descriptions.c: Update comments.
5900         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
5901         declarations.
5902         * features/i386/32bit-avx.c: Re-generated.
5903         * features/i386/32bit-avx512.c: Re-generated.
5904         * features/i386/32bit-core.c: Re-generated.
5905         * features/i386/32bit-linux.c: Re-generated.
5906         * features/i386/32bit-mpx.c: Re-generated.
5907         * features/i386/32bit-pkeys.c: Re-generated.
5908         * features/i386/32bit-sse.c: Re-generated.
5909
5910 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5911
5912         * regformats/regdat.sh: Update generated code.
5913
5914 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5915
5916         * regformats/regdat.sh: Adjust code order.
5917
5918 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5919
5920         * expprint.c (dump_subexp_body_standard): Use constant format
5921         string in fprintf_filtered call.
5922
5923 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5924
5925         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
5926         NetBSD/i386.
5927         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
5928
5929 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5930
5931         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
5932
5933 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5934
5935         * bsd-kvm.o: Define _KMEMUSER.
5936         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
5937         * configure: Regenerate.
5938
5939 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5940
5941         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
5942         * i386-fbsd-nat.c: Likewise.
5943
5944 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5945
5946         * unittests/array-view-selftests.c: Add include of <array>.
5947
5948 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5949
5950         * spu-tdep.c (flush_ea_cache): Add missing argument to
5951         call_function_by_hand.
5952
5953 2017-09-04  Pedro Alves  <palves@redhat.com>
5954
5955         * NEWS (Safer support for debugging with no debug info): New.
5956
5957 2017-09-04  Pedro Alves  <palves@redhat.com>
5958
5959         * c-exp.y (function_method, function_method_void): Add current
5960         instance flags to TYPE_INSTANCE.
5961         * dwarf2read.c (check_modifier): New.
5962         (compute_delayed_physnames): Assert that only C++ adds delayed
5963         physnames.  Mark fn_fields as const/volatile depending on
5964         physname.
5965         * eval.c (make_params): New type_instance_flags parameter.  Use
5966         it as the new type's instance flags.
5967         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
5968         flags element and pass it to make_params.
5969         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
5970         instance flags element.
5971         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
5972         * gdbtypes.h: Include "enum-flags.h".
5973         (type_instance_flags): New enum-flags type.
5974         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
5975         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
5976         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
5977         (follow_type_instance_flags): New function.
5978         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
5979         * parser-defs.h (follow_type_instance_flags): Declare.
5980         * valops.c (value_struct_elt_for_reference): const/volatile must
5981         match too.
5982
5983 2017-09-04  Pedro Alves  <palves@redhat.com>
5984
5985         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
5986         function/method scopes; lookup the nested name as a function local
5987         static variable.
5988
5989 2017-09-04  Pedro Alves  <palves@redhat.com>
5990
5991         (%type <voidval>): Add function_method.
5992         * c-exp.y (exp): New production for calls with no arguments.
5993         (function_method, function_method_void_or_typelist): New
5994         productions.
5995         (exp): New production for "method()::static_var".
5996         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
5997         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5998         Handle OP_FUNC_STATIC_VAR.
5999         * parse.c (operator_length_standard):
6000         Handle OP_FUNC_STATIC_VAR.
6001
6002 2017-09-04  Pedro Alves  <palves@redhat.com>
6003
6004         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6005         handling.
6006         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6007         Ditto.
6008         * parse.c (operator_length_standard, operator_check_standard):
6009         Ditto.
6010         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6011
6012 2017-09-04  Pedro Alves  <palves@redhat.com>
6013
6014         * ax-gdb.c: Include "typeprint.h".
6015         (gen_expr_for_cast): New function.
6016         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6017         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6018         type is unknown.
6019         * dwarf2read.c (new_symbol_full): Fallback to int instead of
6020         nodebug_data_symbol.
6021         * eval.c: Include "typeprint.h".
6022         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6023         Error out if symbol has unknown type.
6024         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6025         evaluate_subexp_for_cast.
6026         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6027         OP_VAR_MSYM_VALUE.
6028         (evaluate_subexp_for_cast): New function.
6029         * gdbtypes.c (init_nodebug_var_type): New function.
6030         (objfile_type): Use it to initialize types of variables with no
6031         debug info.
6032         * typeprint.c (error_unknown_type): New.
6033         * typeprint.h (error_unknown_type): New declaration.
6034         * compile/compile-c-types.c (convert_type_basic): Handle
6035         TYPE_CODE_ERROR; warn and fallback to int for variables with
6036         unknown type.
6037
6038 2017-09-04  Pedro Alves  <palves@redhat.com>
6039
6040         * eval.c (evaluate_var_value): New function, factored out from ...
6041         (evaluate_subexp_standard): ... here.
6042
6043 2017-09-04  Pedro Alves  <palves@redhat.com>
6044
6045         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6046         Remove useless assignments to 'op'.
6047
6048 2017-09-04  Pedro Alves  <palves@redhat.com>
6049
6050         * eval.c (eval_skip_value): New function.
6051         (evaluate_subexp_standard): Use it.
6052
6053 2017-09-04  Pedro Alves  <palves@redhat.com>
6054
6055         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6056         function name from symbol/minsym and pass it to
6057         error_call_unknown_return_type.
6058
6059 2017-09-04  Pedro Alves  <palves@redhat.com>
6060
6061         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6062         * ax-gdb.c (gen_msym_var_ref): New function.
6063         (gen_expr): Handle OP_VAR_MSYM_VALUE.
6064         * eval.c (evaluate_var_msym_value): New function.
6065         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6066         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6067         to call_function_by_hand.
6068         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6069         Handle OP_VAR_MSYM_VALUE.
6070         (union exp_element) <msymbol>: New field.
6071         * minsyms.h (struct type): Forward declare.
6072         (find_minsym_type_and_address): Declare.
6073         * parse.c (write_exp_elt_msym): New function.
6074         (write_exp_msymbol): Delete, refactored as ...
6075         (find_minsym_type_and_address): ... this new function.
6076         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6077         (operator_length_standard, operator_check_standard): Handle
6078         OP_VAR_MSYM_VALUE.
6079         * std-operator.def (OP_VAR_MSYM_VALUE): New.
6080
6081 2017-09-04  Pedro Alves  <palves@redhat.com>
6082
6083         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6084         TYPE_GNU_IFUNC specially here.  Throw error if return type is
6085         unknown.
6086         * ada-typeprint.c (print_func_type): Handle functions with unknown
6087         return type.
6088         * c-typeprint.c (c_type_print_base): Handle functions and methods
6089         with unknown return type.
6090         * compile/compile-c-symbols.c (convert_symbol_bmsym)
6091         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6092         * compile/compile-c-types.c: Include "objfiles.h".
6093         (convert_func): For functions with unknown return type, warn and
6094         default to int.
6095         * compile/compile-object-run.c (compile_object_run): Adjust call
6096         to call_function_by_hand_dummy.
6097         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6098         call_function_by_hand.
6099         * eval.c (evaluate_subexp_standard): Adjust calls to
6100         call_function_by_hand.  Handle functions and methods with unknown
6101         return type.  Pass expect_type to call_function_by_hand.
6102         * f-typeprint.c (f_type_print_base): Handle functions with unknown
6103         return type.
6104         * gcore.c (call_target_sbrk): Adjust call to
6105         call_function_by_hand.
6106         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6107         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
6108         an integer address type instead of nodebug.
6109         * guile/scm-value.c (gdbscm_value_call): Adjust call to
6110         call_function_by_hand.
6111         * infcall.c (error_call_unknown_return_type): New function.
6112         (call_function_by_hand): New "default_return_type" parameter.
6113         Pass it down.
6114         (call_function_by_hand_dummy): New "default_return_type"
6115         parameter.  Use it instead of defaulting to int.  If there's no
6116         default and the return type is unknown, throw an error.  If
6117         there's a default return type, and the called function has no
6118         debug info, then assume the function is prototyped.
6119         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6120         New "default_return_type" parameter.
6121         (error_call_unknown_return_type): New declaration.
6122         * linux-fork.c (call_lseek): Cast return type of lseek.
6123         (inferior_call_waitpid, checkpoint_command): Adjust calls to
6124         call_function_by_hand.
6125         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6126         calls to call_function_by_hand.
6127         * m2-typeprint.c (m2_procedure): Handle functions with unknown
6128         return type.
6129         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6130         (value_nsstring, print_object_command): Adjust calls to
6131         call_function_by_hand.
6132         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6133         functions with unknown return type.
6134         (pascal_type_print_func_varspec_suffix): New function.
6135         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6136         TYPE_CODE_METHOD>: Use it.
6137         * python/py-value.c (valpy_call): Adjust call to
6138         call_function_by_hand.
6139         * rust-lang.c (rust_evaluate_funcall): Adjust call to
6140         call_function_by_hand.
6141         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6142         call_function_by_hand.
6143         * valops.c (value_allocate_space_in_inferior): Adjust call to
6144         call_function_by_hand.
6145         * typeprint.c (type_print_unknown_return_type): New function.
6146         * typeprint.h (type_print_unknown_return_type): New declaration.
6147
6148 2017-09-04  Pedro Alves  <palves@redhat.com>
6149
6150         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6151         types with more than one parameter as prototyped.
6152
6153 2017-09-04  Pedro Alves  <palves@redhat.com>
6154
6155         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6156         (disassemble_command): Use gdb_disassembly_flags instead of bare
6157         int.
6158         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6159         (dump_insns, do_mixed_source_and_assembly_deprecated)
6160         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6161         Use gdb_disassembly_flags instead of bare int.
6162         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6163         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6164         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6165         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
6166         (enum gdb_disassembly_flag): ... values of this new enumeration.
6167         (gdb_disassembly_flags): Define.
6168         (gdb_disassembly)
6169         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6170         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6171         gdb_disassembly_flags instead of bare int.
6172         * record-btrace.c (btrace_insn_history)
6173         (record_btrace_insn_history, record_btrace_insn_history_range)
6174         (record_btrace_insn_history_from): Use gdb_disassembly_flags
6175         instead of bare int.
6176         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6177         Use gdb_disassembly_flags instead of bare int.
6178         * target-debug.h (target_debug_print_gdb_disassembly_flags):
6179         Define.
6180         * target-delegates.c: Regenerate.
6181         * target.c (target_insn_history, target_insn_history_from)
6182         (target_insn_history_range): Use gdb_disassembly_flags instead of
6183         bare int.
6184         * target.h: Include "disasm.h".
6185         (struct target_ops) <to_insn_history, to_insn_history_from,
6186         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6187         int.
6188         (target_insn_history, target_insn_history_from)
6189         (target_insn_history_range): Use gdb_disassembly_flags instead of
6190         bare int.
6191
6192 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6193
6194         * cli/cli-script.c (build_command_line): For if/while commands,
6195         check whether args is empty.
6196
6197 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6198
6199         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6200         (enum command_control_type): Likewise.
6201         (struct command_line): Likewise.
6202         (free_command_lines): Likewise.
6203         (struct command_lines_deleter): Likewise.
6204         (command_line_up): Likewise.
6205         (read_command_lines): Likewise.
6206         (read_command_lines_1): Likewise.
6207         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6208         (enum command_control_type): Likewise.
6209         (struct command_line): Likewise.
6210         (free_command_lines): Likewise.
6211         (struct command_lines_deleter): Likewise.
6212         (command_line_up): Likewise.
6213         (read_command_lines): Likewise.
6214         (read_command_lines_1): Likewise.
6215         * breakpoint.h: Include cli/cli-script.h.
6216         * extension-priv.h: Likewise.
6217         * gdbcmd.h: Likewise.
6218
6219 2017-09-04  Pedro Alves  <palves@redhat.com>
6220
6221         * ada-lang.c (is_known_support_routine): Move sal declaration to
6222         where it is initialized.
6223         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6224         (parse_breakpoint_sals, decode_static_tracepoint_spec)
6225         (clear_command, update_static_tracepoint): Remove init_sal
6226         references.  Move declarations closer to initializations.
6227         * cli/cli-cmds.c (list_command): Move sal declarations closer to
6228         initializations.
6229         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6230         references.  Move sal declarations closer to initializations.
6231         * frame.c (find_frame_sal): Return a symtab_and_line via function
6232         return instead of output parameter.  Remove init_sal references.
6233         * frame.h (find_frame_sal): Return a symtab_and_line via function
6234         return instead of output parameter.
6235         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6236         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6237         instead of memset.
6238         (gdbscm_find_pc_line): Remove init_sal reference.
6239         * infcall.c (call_function_by_hand_dummy): Remove init_sal
6240         references.  Move declarations closer to initializations.
6241         * infcmd.c (set_step_frame): Update.  Move declarations closer to
6242         initializations.
6243         (finish_backward): Remove init_sal references.  Move declarations
6244         closer to initializations.
6245         * infrun.c (process_event_stop_test, handle_step_into_function)
6246         (insert_hp_step_resume_breakpoint_at_frame)
6247         (insert_step_resume_breakpoint_at_caller): Likewise.
6248         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6249         (symbol_to_sal): Likewise.
6250         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6251         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6252         to its initialization.
6253         * reverse.c (save_bookmark_command): Use new/delete.  Remove
6254         init_sal references.  Move declarations closer to initializations.
6255         * source.c (get_current_source_symtab_and_line): Remove brace
6256         initialization.
6257         (set_current_source_symtab_and_line): Now takes the sal by const
6258         reference.  Remove brace initialization.
6259         (line_info): Remove init_sal reference.
6260         * source.h (set_current_source_symtab_and_line): Now takes a
6261         symtab_and_line via const reference.
6262         * stack.c (set_current_sal_from_frame): Adjust.
6263         (print_frame_info): Adjust.
6264         (get_last_displayed_sal): Return the sal via function return
6265         instead of via output parameter.  Simplify.
6266         (frame_info): Adjust.
6267         * stack.h (get_last_displayed_sal): Return the sal via function
6268         return instead of via output parameter.
6269         * symtab.c (init_sal): Delete.
6270         (find_pc_sect_line): Remove init_sal references.  Move
6271         declarations closer to initializations.
6272         (find_function_start_sal): Remove init_sal references.  Move
6273         declarations closer to initializations.
6274         * symtab.h (struct symtab_and_line): In-class initialize all
6275         fields.
6276         * tracepoint.c (set_traceframe_context)
6277         (print_one_static_tracepoint_marker): Remove init_sal references.
6278         Move declarations closer to initializations.
6279         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6280         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
6281         declarations closer to initializations.
6282         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6283         init_sal references.  Adjust.
6284
6285 2017-09-04  Pedro Alves  <palves@redhat.com>
6286
6287         * ax-gdb.c (agent_command_1): Use range-for.
6288         * break-catch-throw.c (re_set_exception_catchpoint): Update.
6289         * breakpoint.c: Include "common/array-view.h".
6290         (init_breakpoint_sal, create_breakpoint_sal): Change sals
6291         parameter from struct symtabs_and_lines to
6292         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
6293         (breakpoint_sals_to_pc): Change sals parameter from struct
6294         symtabs_and_lines to std::vector reference.
6295         (check_fast_tracepoint_sals): Change sals parameter from struct
6296         symtabs_and_lines to std::array_view.  Use range-for.
6297         (decode_static_tracepoint_spec): Return a std::vector instead of
6298         symtabs_and_lines.  Update.
6299         (create_breakpoint): Update.
6300         (break_range_command, until_break_command, clear_command): Update.
6301         (base_breakpoint_decode_location, bkpt_decode_location)
6302         (bkpt_probe_create_sals_from_location)
6303         (bkpt_probe_decode_location, tracepoint_decode_location)
6304         (tracepoint_probe_decode_location)
6305         (strace_marker_create_sals_from_location): Return a std::vector
6306         instead of symtabs_and_lines.
6307         (strace_marker_create_breakpoints_sal): Update.
6308         (strace_marker_decode_location): Return a std::vector instead of
6309         symtabs_and_lines.  Update.
6310         (update_breakpoint_locations): Change struct symtabs_and_lines
6311         parameters to gdb::array_view.  Adjust.
6312         (location_to_sals): Return a std::vector instead of
6313         symtabs_and_lines.  Update.
6314         (breakpoint_re_set_default): Use std::vector instead of struct
6315         symtabs_and_lines.
6316         (decode_location_default): Return a std::vector instead of
6317         symtabs_and_lines.  Update.
6318         * breakpoint.h: Include "common/array-view.h".
6319         (struct breakpoint_ops) <decode_location>: Now returns a
6320         std::vector instead of returning a symtabs_and_lines via output
6321         parameter.
6322         (update_breakpoint_locations): Change sals parameters to use
6323         gdb::array_view.
6324         * cli/cli-cmds.c (edit_command, list_command): Update to use
6325         std::vector and gdb::array_view.
6326         (ambiguous_line_spec): Adjust to use gdb::array_view and
6327         range-for.
6328         (compare_symtabs): Rename to ...
6329         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
6330         const reference and adjust.
6331         (filter_sals): Rewrite using std::vector and standard algorithms.
6332         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6333         (jump_command): Update to use std::vector.
6334         * linespec.c (struct linespec_state) <canonical_names>: Update
6335         comment.
6336         (add_sal_to_sals_basic): Delete.
6337         (add_sal_to_sals, filter_results, convert_results_to_lsals)
6338         (decode_line_2, create_sals_line_offset)
6339         (convert_address_location_to_sals, convert_linespec_to_sals)
6340         (convert_explicit_location_to_sals, parse_linespec)
6341         (event_location_to_sals, decode_line_full, decode_line_1)
6342         (decode_line_with_current_source)
6343         (decode_line_with_last_displayed, decode_objc)
6344         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6345         (linespec_result::~linespec_result): Adjust to use std::vector
6346         instead of symtabs_and_lines.
6347         * linespec.h (linespec_sals::sals): Now a std::vector.
6348         (struct linespec_result): Use std::vector, bool, and in-class
6349         initialization.
6350         (decode_line_1, decode_line_with_current_source)
6351         (decode_line_with_last_displayed): Return std::vector.
6352         * macrocmd.c (info_macros_command): Use std::vector.
6353         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6354         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6355         std::vector.
6356         * probe.h (parse_probes): Return a std::vector.
6357         * python/python.c (gdbpy_decode_line): Use std::vector and
6358         gdb::array_view.
6359         * source.c (select_source_symtab, line_info): Use std::vector.
6360         * stack.c (func_command): Use std::vector.
6361         * symtab.h (struct symtabs_and_lines): Delete.
6362         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6363
6364 2017-09-04  Pedro Alves  <palves@redhat.com>
6365
6366         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6367         unittests/array-view-selftests.c.
6368         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6369         * common/array-view.h: New file.
6370         * unittests/array-view-selftests.c: New file.
6371
6372 2017-09-04  Pedro Alves  <palves@redhat.com>
6373
6374         * cli/cli-cmds.c (edit_command): Pass message to
6375         ambiguous_line_spec.
6376         (list_command): Pass message to ambiguous_line_spec.  Say
6377         "first"/"last" instead of "start" and "end" to be consistent with
6378         the manual.
6379         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
6380         them to print formatted message.
6381
6382 2017-09-04  Pedro Alves  <palves@redhat.com>
6383
6384         * btrace.c (ftrace_add_pt): Pass btrace_insn to
6385         ftrace_update_insns by reference instead of pointer.
6386
6387 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6388
6389         * i386-go32-tdep.c: Include x86-xstate.h.
6390         (i386_go32_init_abi): Call i386_target_description.
6391         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6392         if xcr0 is X86_XSTATE_X87_MASK.
6393         * i386-tdep.h (tdesc_i386): Remove the declaration.
6394         (tdesc_i386_mmx): Likewise.
6395
6396 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6397
6398         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6399         X86_XSTATE_SSE_MASK instead of 0.
6400
6401 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6402
6403         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6404         i386_target_description.
6405         * i386-fbsd-nat.c (i386fbsd_read_description): Call
6406         i386_target_description.
6407         * i386-tdep.c (i386_gdbarch_init): Likewise.
6408
6409 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6410
6411         * amd64-darwin-tdep.c: Include "x86-xstate.h".
6412         (x86_darwin_init_abi_64): Call amd64_target_description.
6413         * amd64-dicos-tdep.c: Likewise.
6414         * amd64-fbsd-nat.c: Likewise.
6415         * amd64-fbsd-tdep.c: Likewise.
6416         * amd64-nbsd-tdep.c: Likewise.
6417         * amd64-obsd-tdep.c: Likewise.
6418         * amd64-sol2-tdep.c: Likewise.
6419         * amd64-windows-tdep.c: Likewise.
6420         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6421
6422 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6423
6424         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6425         (btrace_function) <insn>: Change type to use std::vector.
6426         * btrace.c (ftrace_debug, ftrace_call_num_insn,
6427         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6428         ftrace_update_insns, ftrace_compute_global_level_offset,
6429         btrace_stitch_bts, btrace_clear, btrace_insn_get,
6430         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6431         change to std::vector.
6432         (ftrace_update_insns): Adjust to change to std::vector, change
6433         type of INSN parameter.
6434         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6435         * record-btrace.c (btrace_call_history_insn_range,
6436         btrace_compute_src_line_range,
6437         record_btrace_frame_prev_register): Adjust to change to
6438         std::vector.
6439         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6440         to change to std::vector.
6441
6442 2017-09-03  Tom Tromey  <tom@tromey.com>
6443
6444         * corefile.c (reopen_exec_file): Use std::string.
6445
6446 2017-09-03  Tom Tromey  <tom@tromey.com>
6447
6448         * compile/compile.c (compile_register_name_mangled): Return
6449         std::string.
6450         * compile/compile-loc2c.c (pushf_register_address): Update.
6451         (pushf_register): Update.
6452         * compile/compile-c-types.c (convert_array): Update.
6453         * compile/compile-c-symbols.c (generate_vla_size): Update.
6454         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6455         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6456         (convert_one_symbol): Update.
6457         (generate_c_for_for_one_variable): Update.
6458         * compile/compile-c-support.c (c_get_range_decl_name): Return a
6459         std::string.
6460         (generate_register_struct): Update.
6461         * compile/compile-internal.h (c_get_range_decl_name): Return a
6462         std::string.
6463         (compile_register_name_mangled): Return std::string.
6464
6465 2017-09-03  Tom Tromey  <tom@tromey.com>
6466
6467         * utils.c (perror_string): Return a std::string.
6468         (throw_perror_with_name, perror_warning_with_name): Update.
6469
6470 2017-09-03  Tom Tromey  <tom@tromey.com>
6471
6472         * demangle.c (demangle_command): Use std::string,
6473         unique_xmalloc_ptr.
6474
6475 2017-09-03  Tom Tromey  <tom@tromey.com>
6476
6477         * cli/cli-setshow.c (do_set_command): Use std::string.
6478
6479 2017-09-03  Tom Tromey  <tom@tromey.com>
6480
6481         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6482
6483 2017-09-03  Tom Tromey  <tom@tromey.com>
6484
6485         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6486
6487 2017-09-03  Tom Tromey  <tom@tromey.com>
6488
6489         * mi/mi-cmd-env.c (env_execute_cli_command): Use
6490         gdb::unique_xmalloc_ptr.
6491
6492 2017-09-03  Tom Tromey  <tom@tromey.com>
6493
6494         * thread.c (print_thread_info_1): Use string_printf.
6495         (thread_apply_command, thread_apply_all_command): Use
6496         std::string.
6497
6498 2017-09-03  Tom Tromey  <tom@tromey.com>
6499
6500         * valprint.c (val_print_string): Update.
6501         * gdbcore.h (memory_error_message): Return std::string.
6502         * corefile.c (memory_error_message): Return std::string.
6503         (memory_error): Update.
6504         * breakpoint.c (insert_bp_location): Update.
6505
6506 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
6507
6508         * target/waitstatus.h (target_waitstatus_to_string): Change
6509         return type to std::string.
6510         * target/waitstatus.c (target_waitstatus_to_string): Return
6511         std::string.
6512         * target.h (target_waitstatus_to_string): Remove declaration.
6513         * infrun.c (resume, clear_proceed_status_thread,
6514         print_target_wait_results, do_target_wait, save_waitstatus,
6515         stop_all_threads): Adjust.
6516         * record-btrace.c (record_btrace_wait): Adjust.
6517         * target-debug.h
6518         (target_debug_print_struct_target_waitstatus_p): Adjust.
6519
6520 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6521
6522         PR gdb/22046
6523         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6524         detection.
6525
6526 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
6527
6528         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6529         for setting/unsetting environment variables on the remote target.
6530         (New remote packets): Add entries for QEnvironmentHexEncoded,
6531         QEnvironmentUnset and QEnvironmentReset.
6532         * common/environ.c (gdb_environ::operator=): Extend method to
6533         handle m_user_set_env_list and m_user_unset_env_list.
6534         (gdb_environ::clear): Likewise.
6535         (match_var_in_string): Change type of first parameter from 'char
6536         *' to 'const char *'.
6537         (gdb_environ::set): Extend method to handle
6538         m_user_set_env_list and m_user_unset_env_list.
6539         (gdb_environ::unset): Likewise.
6540         (gdb_environ::clear_user_set_env): New method.
6541         (gdb_environ::user_set_envp): Likewise.
6542         (gdb_environ::user_unset_envp): Likewise.
6543         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6544         m_user_unset_env_list on move constructor/assignment.
6545         (unset): Add new default parameter 'update_unset_list = true'.
6546         (clear_user_set_env): New method.
6547         (user_set_envp): Likewise.
6548         (user_unset_envp): Likewise.
6549         (m_user_set_env_list): New std::set.
6550         (m_user_unset_env_list): Likewise.
6551         * common/rsp-low.c (hex2str): New function.
6552         (bin2hex): New overload for bin2hex function.
6553         * common/rsp-low.c (hex2str): New prototype.
6554         (str2hex): New overload prototype.
6555         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6556         QEnvironmentUnset and QEnvironmentReset.
6557         (remote_protocol_features): Add QEnvironmentHexEncoded,
6558         QEnvironmentUnset and QEnvironmentReset packets.
6559         (send_environment_packet): New function.
6560         (extended_remote_environment_support): Likewise.
6561         (extended_remote_create_inferior): Call
6562         extended_remote_environment_support.
6563         (_initialize_remote): Add QEnvironmentHexEncoded,
6564         QEnvironmentUnset and QEnvironmentReset packet configs.
6565         * unittests/environ-selftests.c (gdb_selftest_env_var):
6566         New variable.
6567         (test_vector_initialization): New function.
6568         (test_init_from_host_environ): Likewise.
6569         (test_reinit_from_host_environ): Likewise.
6570         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6571         Likewise.
6572         (test_unset_set_empty_vector): Likewise.
6573         (test_vector_clear): Likewise.
6574         (test_std_move): Likewise.
6575         (test_move_constructor):
6576         (test_self_move): Likewise.
6577         (test_set_unset_reset): Likewise.
6578         (run_tests): Rewrite in terms of the functions above.
6579
6580 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
6581
6582         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6583         (adi_available): Use a temp variable of type CORE_ADDR as argument
6584         3 when calling target_auxv_search.
6585         (adi_normalize_address): Use masks and xor operators to calculate
6586         normalized address.
6587         (adi_read_versions, adi_write_versions, adi_print_versions)
6588         (do_examine, do_assign): Use paddress.
6589
6590 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
6591
6592         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6593         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6594         out of loop and add supply of FIR.
6595         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6596         add collect of FIR.
6597
6598 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
6599
6600         PR gdb/21827
6601         * cli/cli-script.c (define_command): Don't convert command name
6602         to lower case.
6603
6604 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
6605
6606         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6607         Update all callers accordingly. Remove all code blocks handling
6608         the case where DISPP is not NULL.
6609
6610 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6611
6612         PR symtab/22003
6613         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6614         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6615         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6616
6617 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6618
6619         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6620         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6621         (read_comp_units_from_section): New parameter abbrev_section, use
6622         read_and_check_comp_unit_head, allocate signatured_type if needed.
6623         (create_all_comp_units): Update read_comp_units_from_section caller.
6624
6625 2017-08-23  Pedro Alves  <palves@redhat.com>
6626
6627         PR remote/21852
6628         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6629         to null_ptid and switch to thread without reading the registers
6630         after adding the inferior.
6631
6632 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6633
6634         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6635         compile-gcc.
6636         * compile/compile.c (compile_gcc, show_compile_gcc): New.
6637         (compile_to_object): Implement compile_gcc.
6638         (_initialize_compile): Install "set compile-gcc".  Initialize
6639         compile_gcc.
6640
6641 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6642
6643         * compile/compile.c (compile_to_object): Conditionally call
6644         set_verbose.  Conditionally call compile or compile_v0.
6645
6646 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
6647
6648         * sparc64-tdep.h: (adi_normalize_address): New export.
6649         * sparc-nat.h: (open_adi_tag_fd): New export.
6650         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
6651         * sparc64-linux-tdep.c:
6652         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
6653         (sparc64_linux_handle_segmentation_fault): New function.
6654         (sparc64_linux_init_abi): Register
6655         sparc64_linux_handle_segmentation_fault
6656         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
6657         (sparc64_addr_bits_remove): New function.
6658         (sparc64_init_abi): Register sparc64_addr_bits_remove.
6659         (MAX_PROC_NAME_SIZE): New macro.
6660         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
6661         (sparc64adilist): New variable.
6662         (adi_proc_list): New variable.
6663         (find_adi_info): New function.
6664         (add_adi_info): New function.
6665         (get_adi_info_proc): New function.
6666         (get_adi_info): New function.
6667         (info_adi_command): New function.
6668         (read_maps_entry): New function.
6669         (adi_available): New function.
6670         (adi_normalize_address): New function.
6671         (adi_align_address): New function.
6672         (adi_convert_byte_count): New function.
6673         (adi_tag_fd): New function.
6674         (adi_is_addr_mapped): New function.
6675         (adi_read_versions): New function.
6676         (adi_write_versions): New function.
6677         (adi_print_versions): New function.
6678         (do_examine): New function.
6679         (do_assign): New function.
6680         (adi_examine_command): New function.
6681         (adi_assign_command): New function.
6682         (_initialize_sparc64_adi_tdep): New function.
6683
6684 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
6685
6686         * breakpoint.c (breakpoints_info): Rename to ...
6687         (info_breakpoints_command): ... this.
6688         (watchpoints_info): Rename to ...
6689         (info_watchpoints_command): ... this.
6690         (tracepoints_info): Rename to ...
6691         (info_tracepoints_command): ... this.
6692         (_initialize_breakpoint): Adjust.
6693         * dcache.c (dcache_info): Rename to ...
6694         (info_display_command): ... this.
6695         (_initialize_dcache): Adjust.
6696         * frame.h (args_info): Rename to ...
6697         (info_args_command): ... this.
6698         (locals_info): Rename to ...
6699         (info_locals_command): ... this.
6700         * infcmd.c (nofp_registers_info): Rename to ...
6701         (info_registers_command): ... this.
6702         (float_info): Rename to ...
6703         (info_float_command): ... this.
6704         (program_info): Rename to ...
6705         (info_program_command): ... this.
6706         (all_registers_info): Rename to ...
6707         (info_all_registers_command): ... this.
6708         (vector_info): Rename to ...
6709         (info_vector_command): ... this.
6710         (float_info): Rename to ...
6711         (info_float_command): ... this.
6712         (_initialize_infcmd): Adjust.
6713         * inferior.h (term_info): Rename to ...
6714         (info_terminal_command): ... this.
6715         * inflow.c (term_info): Rename to ...
6716         (info_terminal_command): ... this.
6717         (_initialize_inflow): Adjust.
6718         * infrun.c (signals_info): Rename to ...
6719         (info_signals_command): ... this.
6720         (_initialize_infrun): Adjust.
6721         * objc-lang.c (classes_info): Rename to ...
6722         (info_classes_command): ... this.
6723         (selectors_info): Rename to ...
6724         (info_selectors_command): ... this.
6725         (_initialize_objc_language): Adjust.
6726         * printcmd.c (sym_info): Rename to ...
6727         (info_symbol_command): ... this.
6728         (address_info): Rename to ...
6729         (info_address_command): ... this.
6730         (display_info): Rename to ...
6731         (info_display_command): ... this.
6732         (_initialize_printcmd): Adjust.
6733         * reverse.c (bookmarks_info): Rename to ...
6734         (info_breakpoints_command): ... this.
6735         (_initialize_reverse): Adjust.
6736         * ser-go32.c (dos_info): Rename to ...
6737         (info_serial_command): ... this.
6738         (_initialize_ser_dos): Adjust.
6739         * skip.c (skip_info): Rename to ...
6740         (info_skip_command): ... this.
6741         (_initialize_step_skip): Adjust.
6742         * source.c (line_info): Rename to ...
6743         (info_line_command): ... this.
6744         (source_info): Rename to ...
6745         (info_source_command)
6746         * stack.c (frame_info): Rename to ...
6747         (info_frame_command): ... this.
6748         (locals_info): Rename to ...
6749         (info_locals_command): ... this.
6750         (args_info): Rename to ...
6751         (info_args_command): ... this.
6752         (_initialize_stack): Adjust.
6753         * symtab.c (sources_info): Rename to ...
6754         (info_sources_command): ... this.
6755         (variables_info): Rename to ...
6756         (info_variables_command): ... this.
6757         (functions_info): Rename to ...
6758         (info_functions_command): ... this.
6759         (types_info): Rename to ...
6760         (info_types_command): ... this.
6761         (_initialize_symtab): Adjust.
6762         * target.c (target_info): Rename to ...
6763         (info_target_command): ... this.
6764         (initialize_targets): Adjust.
6765         * tracepoint.c (tvariables_info): Rename to ...
6766         (info_tvariables_command): ... this.
6767         (scope_info): Rename to ...
6768         (info_scope_command): ... this.
6769         (trace_dump_actions): Adjust.
6770         (_initialize_tracepoint): Adjust.
6771
6772 2017-08-22  Tom Tromey  <tom@tromey.com>
6773
6774         * breakpoint.h (install_breakpoint): Update.
6775         * breakpoint.c (add_solib_catchpoint): Update.
6776         (install_breakpoint): Change argument to a std::unique_ptr.
6777         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6778         (create_breakpoint_sal, create_breakpoint): Update.
6779         (watch_command_1, catch_exec_command_1)
6780         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6781         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6782         Return the breakpoint.
6783         (set_raw_breakpoint_without_location, set_raw_breakpoint)
6784         (new_single_step_breakpoint): Update.
6785         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
6786         std::unique_ptr.
6787         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6788         std::unique_ptr.
6789         * break-catch-sig.c (create_signal_catchpoint): Use
6790         std::unique_ptr.
6791         * ada-lang.c (create_ada_exception_catchpoint): Use
6792         std::unique_ptr.
6793
6794 2017-08-22  Tom Tromey  <tom@tromey.com>
6795
6796         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
6797
6798 2017-08-22  Tom Tromey  <tom@tromey.com>
6799
6800         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
6801         (lookup_partial_symbol): Update.
6802
6803 2017-08-22  Tom Tromey  <tom@tromey.com>
6804
6805         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
6806         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
6807         (find_and_open_source, symtab_to_fullname): Update.
6808         * psymtab.c (psymtab_to_fullname): Update.
6809
6810 2017-08-22  Tom Tromey  <tom@tromey.com>
6811
6812         * exec.c (exec_file_attach): Update.
6813         * linux-thread-db.c (try_thread_db_load): Update.
6814         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
6815         * utils.c (gdb_realpath): Change return type.
6816         (gdb_realpath_keepfile): Update.
6817         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
6818         (_initialize_utils): Register the new self test.
6819         * source.c (openp): Update.
6820         (find_and_open_source): Update.
6821         * nto-tdep.c (nto_find_and_open_solib): Update.
6822         * main.c (set_gdb_data_directory): Update.
6823         (captured_main_1): Update.
6824         * dwarf2read.c (dwarf2_get_dwz_file): Update
6825         (dw2_map_symbol_filenames): Update.
6826         * auto-load.c (auto_load_safe_path_vec_update): Update.
6827         (filename_is_in_auto_load_safe_path_vec): Change type of
6828         "filename_realp".
6829         (auto_load_objfile_script): Update.
6830         (file_is_auto_load_safe): Update.  Use std::string.
6831         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
6832
6833 2017-08-22  Tom Tromey  <tom@tromey.com>
6834
6835         * utils.c (gdb_realpath_keepfile): Return a
6836         gdb::unique_xmalloc_ptr.
6837         * exec.c (exec_file_attach): Update.
6838         * utils.h (gdb_realpath_keepfile): Return a
6839         gdb::unique_xmalloc_ptr.
6840
6841 2017-08-22  Tom Tromey  <tom@tromey.com>
6842
6843         * compile/compile.c (compile_file_command): Use
6844         gdb::unique_xmalloc_ptr, std::string.
6845         * utils.c (gdb_abspath): Change return type.
6846         * source.c (openp): Update.
6847         * objfiles.c (allocate_objfile): Update.
6848         * main.c (set_gdb_data_directory): Update.
6849         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
6850
6851 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
6852
6853         * cli-cmds.c (list_commands): List actual code around more than
6854         one location.
6855
6856 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
6857
6858         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
6859
6860 2017-08-21  Pedro Alves  <palves@redhat.com>
6861
6862         PR gdb/19487
6863         * c-exp.y (variable production): Handle function aliases.
6864         * minsyms.c (msymbol_is_text): New function.
6865         * minsyms.h (msymbol_is_text): Declare.
6866         * symtab.c (find_function_alias_target): New function.
6867         * symtab.h (find_function_alias_target): Declare.
6868
6869 2017-08-21  Pedro Alves  <palves@redhat.com>
6870
6871         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
6872         typedefs.
6873         * typeprint.c (whatis_exp): If handling "whatis", and expression
6874         is OP_TYPE, strip one typedef level.  Otherwise don't strip
6875         typedefs here.
6876         * valops.c (value_cast): Save "to" type before resolving
6877         stubs/typedefs.  Use that type as resulting value's type.
6878
6879 2017-08-18  Tom Tromey  <tom@tromey.com>
6880             Pedro Alves  <palves@redhat.com>
6881
6882         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
6883         * sol-thread.c (sol_thread_resume, sol_thread_wait)
6884         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
6885         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
6886         * proc-service.c (ps_xfer_memory): Use scoped_restore.
6887         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
6888         (linux_get_siginfo_data): Add "thread" argument.  Use
6889         scoped_restore.
6890         * linux-nat.c (linux_child_follow_fork)
6891         (check_stopped_by_watchpoint): Use scoped_restore.
6892         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
6893         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
6894         (restore_inferior_ptid, save_inferior_ptid): Remove.
6895         * btrace.c (btrace_fetch): Use scoped_restore.
6896         * bsd-uthread.c (bsd_uthread_fetch_registers)
6897         (bsd_uthread_store_registers): Use scoped_restore.
6898         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
6899         scoped_restore.
6900         * aix-thread.c (aix_thread_resume, aix_thread_wait)
6901         (aix_thread_xfer_partial): Use scoped_restore.
6902         * inferior.h (save_inferior_ptid): Remove.
6903
6904 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6905
6906         PR tdep/21818
6907         * arm-tdep.c (gdb_print_insn_arm): Mark
6908         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
6909
6910 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6911
6912         * NEWS: Mention GDBserver's new option "--selftest".
6913         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
6914         * selftest.c: Move it to common/selftest.c.
6915         * selftest.h: Move it to common/selftest.h.
6916         * selftest-arch.c (reset): New function.
6917         (tests_with_arch): Call reset.
6918
6919 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6920
6921         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
6922         instead of exception_fprintf and printf_filtered.
6923
6924 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6925
6926         * selftest.c (register_self_test): Rename it to
6927         selftests::register_test.
6928         (run_self_tests): selftest::run_tests.
6929         * selftest.h: Update declarations.
6930         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
6931         selftests::register_test_foreach_arch.
6932         * selftest-arch.h: Update declaration.
6933         * aarch64-tdep.c: Update.
6934         * arm-tdep.c: Likewise.
6935         * disasm-selftests.c: Likewise.
6936         * dwarf2loc.c: Likewise.
6937         * dwarf2-frame.c: Likewise.
6938         * findvar.c: Likewise.
6939         * gdbarch-selftests.c: Likewise.
6940         * maint.c (maintenance_selftest): Likewise.
6941         * regcache.c: Likewise.
6942         * rust-exp.y: Likewise.
6943         * selftest-arch.c: Likewise.
6944         * unittests/environ-selftests.c: Likewise.
6945         * unittests/function-view-selftests.c: Likewise.
6946         * unittests/offset-type-selftests.c: Likewise.
6947         * unittests/optional-selftests.c: Likewise.
6948         * unittests/scoped_restore-selftests.c: Likewise.
6949         * utils-selftests.c: Likewise.
6950
6951 2017-08-17  Pedro Alves  <palves@redhat.com>
6952
6953         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
6954         local.
6955
6956 2017-08-17  Pedro Alves  <palves@redhat.com>
6957
6958         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
6959         field.
6960         (reset_die_in_process): Delete, replaced by ...
6961         (process_die_scope): ... this new class.  Make it responsible for
6962         freeing cu->line_header too.
6963         (process_die): Use process_die_scope.
6964         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
6965         cu->line_header_die_owner.  Don't release the line header if it's
6966         owned by the CU.
6967         (setup_type_unit_groups): Make the CU/DIE own the line header.
6968         Don't release the line header here.
6969
6970 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
6971
6972         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
6973
6974 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6975
6976         * NEWS: Mention new shortcuts for nexti and stepi in TUI
6977         Single-Key mode
6978
6979 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6980
6981         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
6982         mode command list.
6983
6984 2017-08-15  Stafford Horne  <shorne@gmail.com>
6985
6986         * MAINTAINERS (Write After Approval): Add Stafford Horne.
6987
6988 2017-08-15  Stafford Horne  <shorne@gmail.com>
6989
6990         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
6991
6992 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
6993
6994         PR gdb/21954
6995         * infcmd.c (unset_environment_command): Use the 'clear' method on
6996         the environment instead of resetting it.
6997
6998 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
6999
7000         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7001         platforms.
7002
7003 2017-08-14  Tom Tromey  <tom@tromey.com>
7004
7005         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7006         (print_binary_chars): Likewise.
7007         (BITS_IN_BYTES): Remove.
7008
7009 2017-08-14  Tom Tromey  <tom@tromey.com>
7010
7011         PR gdb/21675
7012         * valprint.c (LOW_ZERO): Change value to 034.
7013         (print_octal_chars): Add static_asserts for octal constants.
7014         * printcmd.c (print_scalar_formatted): Add 'd' case.
7015
7016 2017-08-11  Tom Tromey  <tom@tromey.com>
7017
7018         * symfile.c (add_symbol_file_command): Use std::vector.
7019
7020 2017-08-14  Tom Tromey  <tom@tromey.com>
7021
7022         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7023         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7024         std::move.
7025         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7026
7027 2017-08-11  Pedro Alves  <palves@redhat.com>
7028
7029         * infrun.c (process_event_stop_test): Adjust
7030         function_name_is_marked_for_skip call.
7031         * skip.c: Include <list>.
7032         (skiplist_entry): Make it a class with private fields, and
7033         getters/setters.
7034         (skiplist_entry_chain): Delete.
7035         (skiplist_entries): New.
7036         (skiplist_entry_count): Delete.
7037         (highest_skiplist_entry_num): New.
7038         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7039         (add_skiplist_entry): Delete.
7040         (skiplist_entry::skiplist_entry): New.
7041         (skiplist_entry::add_entry): New.
7042         (skip_file_command, skip_function): Adjust.
7043         (compile_skip_regexp): Delete.
7044         (skip_command): Don't compile regexp here.  Adjust to use
7045         skiplist_entry::add_entry.
7046         (skip_info): Adjust to use range-for and getters.
7047         (skip_enable_command, skip_disable_command): Adjust to use
7048         range-for and setters.
7049         (skip_delete_command): Adjust to use std::list.
7050         (add_skiplist_entry): Delete.
7051         (skip_file_p): Delete, refactored as ...
7052         (skiplist_entry::do_skip_file_p): ... this new method.
7053         (skip_gfile_p): Delete, refactored as ...
7054         (skiplist_entry::do_gskip_file_p): ... this new method.
7055         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7056         (skiplist_entry::skip_function_p): ... this new method.
7057         (function_name_is_marked_for_skip): Now returns bool, and takes
7058         the function sal by const reference.  Adjust to use range-for and
7059         skiplist_entry methods.
7060         (_initialize_step_skip): Remove references to
7061         skiplist_entry_chain, skiplist_entry_count.
7062         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7063         takes the function sal by const reference.
7064
7065 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7066
7067         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7068         (dwarf2_frame_cache): Remove reset_cache_cleanup.
7069         (dwarf2_frame_cache):
7070         * frame-unwind.c (frame_unwind_try_unwinder): Catch
7071         RETURN_MASK_ALL and set *this_case to NULL.
7072         * frame-unwind.h: Update comments.
7073
7074 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7075
7076         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7077         (dwarf2_frame_state_copy_regs): Remove.
7078         (dwarf2_frame_state_free_regs): Remove.
7079         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7080         (dwarf2_restore_rule): Call method .alloc_regs instead of
7081         dwarf2_frame_state_alloc_regs.
7082         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
7083         constructor.  Call std::move.
7084         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7085         (dwarf2_frame_cache): Likewise.
7086
7087         [GDB_SELF_TEST]: Include selftest.h and
7088         selftest-arch.h.
7089         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7090         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7091         execute_cfa_program_test.
7092
7093         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7094         copy ctor, assignment operator, move assignment.
7095         <alloc_regs>: New method.
7096         <swap>: New method.
7097         (struct dwarf2_frame_state): Delete dtor.
7098         (dwarf2_frame_state_alloc_regs): Remove declaration.
7099         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7100         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7101
7102 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7103
7104         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7105         (dwarf2_frame_state::dwarf2_frame_state): New.
7106         (dwarf2_frame_state::~dwarf2_frame_state): New.
7107         (dwarf2_fetch_cfa_info): Update.
7108         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
7109         rather than a pointer.  Update code.
7110         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7111         dtor.
7112         <data_align, code_align, retaddr_column>: Change them to const.
7113         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7114         to bool.
7115
7116 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7117
7118         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7119         <loc.exp>: New field.
7120         * dwarf2-frame.c (execute_cfa_program): Update.
7121         (dwarf2_frame_prev_register): Update.
7122
7123 2017-08-10  Pedro Alves  <palves@redhat.com>
7124
7125         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7126
7127 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7128
7129         * fbsd-nat.c (struct fbsd_fork_info): Remove.
7130         (fbsd_pending_children): Use std::list.
7131         (fbsd_remember_child): Likewise.
7132         (fbsd_is_child_pending): Likewise.
7133         (fbsd_pending_vfork_done): Use std::forward_list.
7134         (fbsd_add_vfork_done): Likewise.
7135         (fbsd_is_vfork_done_pending): Likewise.
7136         (fbsd_next_vfork_done): Likewise.
7137
7138 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7139
7140         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7141         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7142         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7143         for `mapfilename'.
7144         (fbsd_xfer_partial): Use gdb::byte_vector.
7145         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7146
7147 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7148
7149         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7150         "filestuff.h".
7151         (fbsd_find_memory_regions): Fix `mapfile' initialization.
7152
7153 2017-08-09  Tom Tromey  <tom@tromey.com>
7154
7155         * skip.c (skiplist_entry): New constructor.
7156         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7157         (skiplist_entry::file_is_glob): Now bool.
7158         (skiplist_entry::file, skiplist_entry::function): Now
7159         std::string.
7160         (make_skip_entry): Return a unique_ptr.  Use new.
7161         (free_skiplist_entry, free_skiplist_entry_cleanup)
7162         (make_free_skiplist_entry_cleanup): Remove.
7163         (skip_command, skip_disable_command, add_skiplist_entry)
7164         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7165         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7166         (function_name_is_marked_for_skip): Update.
7167         (skip_delete_command): Update.  Use delete.
7168
7169 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
7170
7171         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7172         (aarch64_linux_core_read_description): New function.
7173         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7174
7175 2017-08-09  Pedro Alves  <palves@redhat.com>
7176
7177         * cp-name-parser.y (cp_comp_to_string): Return a
7178         gdb::unique_xmalloc_ptr<char>.
7179         * cp-support.c (replace_typedefs_qualified_name)
7180         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7181         (cp_canonicalize_string_full): Use op= instead of explicit
7182         convertion.
7183         (cp_class_name_from_physname, method_name_from_physname)
7184         (cp_func_name, cp_remove_params): Adjust to use
7185         gdb::unique_xmalloc_ptr<char>.
7186         * cp-support.h (cp_comp_to_string): Return a
7187         gdb::unique_xmalloc_ptr<char>.
7188         * python/py-type.c (typy_lookup_type): Adjust to use
7189         gdb::unique_xmalloc_ptr<char>.
7190
7191 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
7192
7193         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7194
7195 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
7196             Yao Qi  <yao.qi@linaro.org>
7197
7198         * cp-support.c (cp_canonicalize_string_full): Use
7199         gdb::unique_xmalloc_ptr<char>.
7200         (cp_canonicalize_string): Likewise.
7201
7202 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7203
7204         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7205         * regformats/i386/amd64-avx-avx512.dat: Remove.
7206         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7207         * regformats/i386/amd64-avx-mpx.dat:Remove.
7208         * regformats/i386/amd64-avx.dat: Remove.
7209         * regformats/i386/amd64-mpx.dat: Remove.
7210         * regformats/i386/i386-avx-avx512.dat: Remove.
7211         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7212         * regformats/i386/i386-avx-mpx.dat: Remove.
7213         * regformats/i386/i386-mmx.dat: Remove.
7214         * regformats/i386/i386-mpx.dat: Remove.
7215
7216 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7217
7218         * amd64-tdep.h (tdesc_x32): Remove the declaration.
7219         * amd64-tdep.c: Don't include features/i386/x32*.c.
7220         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7221         functions.
7222         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7223         and i386/x32-avx-avx512.
7224         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7225         and i386/x32.xml.
7226         * features/i386/x32-avx-avx512.c: Removed.
7227         * features/i386/x32-avx-avx512.xml: Removed.
7228         * features/i386/x32-avx.c: Removed.
7229         * features/i386/x32-avx.xml: Removed.
7230         * features/i386/x32.c: Removed.
7231         * features/i386/x32.xml: Removed.
7232         * regformats/i386/x32-avx-avx512.dat: Removed.
7233         * regformats/i386/x32-avx.dat: Removed.
7234         * regformats/i386/x32.dat: Removed.
7235
7236 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7237
7238         PR breakpoints/21886
7239         * mem-break.c (default_memory_insert_breakpoint): Use
7240         `->placed_address' rather than `->reqstd_address' for the
7241         breakpoint location.
7242
7243 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7244
7245         * arch-utils.c (default_print_insn): Remove arch/mach/endian
7246         assertions.
7247
7248 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7249
7250         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7251         a union of `tdep_info', `tdesc_data' and `id'.
7252         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7253         rather than `info.tdep_info'.
7254         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7255         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7256         * i386-tdep.c (i386_gdbarch_init): Likewise.
7257         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7258         * mips-tdep.c (mips_gdbarch_init): Likewise.
7259         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7260         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7261         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7262         `info.tdep_info'.
7263         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7264         `info.tdep_info'.
7265         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7266         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7267         `info.tdep_info'.
7268         * spu-tdep.c (spu_gdbarch_init): Likewise.
7269         * gdbarch.h: Regenerate.
7270
7271 2017-08-07  Leszek Swirski  <leszeks@google.com>
7272
7273         PR symtab/20899
7274         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7275
7276 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
7277
7278         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7279         (gdbsim_open): Rename gdb_argv args object to argv.
7280
7281 2017-08-05  Tom Tromey  <tom@tromey.com>
7282
7283         * compile/compile-object-load.c (compile_object_load): Use
7284         gdb::unique_xmalloc_ptr.
7285         * cli/cli-dump.c (scan_filename): Rename from
7286         scan_filename_with_cleanup.  Change return type.
7287         (scan_expression): Rename from scan_expression_with_cleanup.
7288         Change return type.
7289         (dump_memory_to_file, dump_value_to_file, restore_command):
7290         Use gdb::unique_xmalloc_ptr.  Update.
7291         * cli/cli-cmds.c (find_and_open_script): Use
7292         gdb::unique_xmalloc_ptr.
7293         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7294         * symmisc.c (maintenance_print_symbols)
7295         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7296         * symfile.c (symfile_bfd_open, generic_load)
7297         (add_symbol_file_command, remove_symbol_file_command): Use
7298         gdb::unique_xmalloc_ptr.
7299         * source.c (openp): Use gdb::unique_xmalloc_ptr.
7300         * psymtab.c (maintenance_print_psymbols): Use
7301         gdb::unique_xmalloc_ptr.
7302         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7303         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7304         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7305         (reload_shared_libraries_1): Likewise.
7306
7307 2017-08-05  Tom Tromey  <tom@tromey.com>
7308
7309         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7310         (rust_op_vector, rust_set_vector): New typedefs.
7311         (current_parser): New global.
7312         (work_obstack): Change to pointer type.  Update all users.
7313         (rust_ast, pstate): Remove globals.
7314         (struct rust_parser): New.
7315         (%union) <params, field_inits>: Change type.
7316         (start, tuple_expr, unit_expr, struct_expr_list, literal)
7317         (field_expr, expr_list, maybe_expr_list, type_list): Update.
7318         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7319         (convert_params_to_types, convert_params_to_expression): Change
7320         type of "params".
7321         (ast_string): Change type of "fields".
7322         (rust_parse): Make a rust_parser.  Remove cleanups.
7323         (rust_lex_tests): Make and install an auto_obstack.
7324
7325 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7326
7327         * configure.srv (ipa_x32_linux_regobj): New.
7328         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7329         instead of X86_TDESC_AVX512.
7330         (initialize_low_tracepoint): Call
7331         init_registers_x32_avx_avx512_linux.
7332
7333 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7334
7335         * utils.h (gdb_argv): Add namespace std for nullptr_t.
7336
7337 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7338
7339         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7340
7341 2017-08-03  Tom Tromey  <tom@tromey.com>
7342
7343         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7344         Remove.
7345         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7346
7347 2017-08-03  Tom Tromey  <tom@tromey.com>
7348
7349         * python/py-param.c (compute_enum_values): Use gdb_argv.
7350
7351 2017-08-03  Tom Tromey  <tom@tromey.com>
7352
7353         * utils.h (struct gdb_argv_deleter): New.
7354         (gdb_argv): New class.
7355         * utils.c (gdb_argv::reset): New method.
7356         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7357         * tracefile.c (tsave_command): Use gdb_argv.
7358         * top.c (new_ui_command): Use gdb_argv.
7359         * symmisc.c (maintenance_print_symbols)
7360         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7361         * symfile.c (symbol_file_command, generic_load)
7362         (remove_symbol_file_command): Use gdb_argv.
7363         * stack.c (backtrace_command): Use gdb_argv.
7364         * source.c (add_path, show_substitute_path_command)
7365         (unset_substitute_path_command, set_substitute_path_command):
7366         Use gdb_argv.
7367         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
7368         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7369         * remote.c (extended_remote_run, remote_put_command)
7370         (remote_get_command, remote_delete_command): Use gdb_argv.
7371         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7372         (gdbsim_open): Use gdb_argv.
7373         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7374         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7375         * procfs.c (procfs_info_proc): Use gdb_argv.
7376         * interps.c (interpreter_exec_cmd): Use gdb_argv.
7377         * infrun.c (handle_command): Use gdb_argv.
7378         * inferior.c (add_inferior_command, clone_inferior_command):
7379         Use gdb_argv.
7380         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7381         * exec.c (exec_file_command): Use gdb_argv.
7382         * cli/cli-cmds.c (alias_command): Use gdb_argv.
7383         * compile/compile.c (build_argc_argv): Use gdb_argv.
7384
7385 2017-08-03  Tom Tromey  <tom@tromey.com>
7386
7387         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7388
7389 2017-08-03  Tom Tromey  <tom@tromey.com>
7390
7391         * python/python.c (compute_python_string): Return std::string.
7392         (gdbpy_eval_from_control_command): Update.
7393         (do_start_initialization): Use std::string.
7394         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7395         xstrprintf.
7396         * python/py-breakpoint.c (local_setattro): Use string_printf, not
7397         xstrprintf.
7398
7399 2017-08-03  Tom Tromey  <tom@tromey.com>
7400
7401         * top.h (do_restore_instream_cleanup): Remove.
7402         * top.c (do_restore_instream_cleanup): Remove.
7403         (read_command_file): Use scoped_restore.
7404         * cli/cli-script.c (execute_user_command): Use scoped_restore.
7405
7406 2017-08-03  Tom Tromey  <tom@tromey.com>
7407
7408         * cli/cli-script.c (execute_user_command)
7409         (execute_control_command): Use scoped_restore.
7410
7411 2017-08-03  Tom Tromey  <tom@tromey.com>
7412
7413         * cli/cli-script.c (do_restore_user_call_depth): Remove.
7414         (execute_user_command): Remove user_call_depth; use
7415         user_args_stack's size instead.
7416
7417 2017-08-03  Tom Tromey  <tom@tromey.com>
7418
7419         * top.h (in_user_command): Remove.
7420         * top.c (in_user_command): Remove.
7421         * cli/cli-script.c (do_restore_user_call_depth)
7422         (execute_user_command): Update.
7423
7424 2017-08-03  Tom Tromey  <tom@tromey.com>
7425
7426         * valops.c (search_struct_method): Use gdb::byte_vector.
7427         * valarith.c (value_concat): Use std::vector.
7428         * target.c (memory_xfer_partial): Use gdb::byte_vector.
7429         (simple_search_memory): Likewise.
7430         * printcmd.c (find_string_backward): Use gdb::byte_vector.
7431         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7432         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7433         * elfread.c (elf_rel_plt_read): Use std::string.
7434         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7435         * cli/cli-dump.c (restore_section_callback): Use
7436         gdb::byte_vector.
7437
7438 2017-08-03  Tom Tromey  <tom@tromey.com>
7439
7440         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7441
7442 2017-08-03  Tom Tromey  <tom@tromey.com>
7443
7444         * tui/tui-regs.c (tui_restore_gdbout): Remove.
7445         (tui_register_format): Use scoped_restore.
7446
7447 2017-08-03  Tom Tromey  <tom@tromey.com>
7448
7449         * reverse.c (exec_direction_default): Remove.
7450         (exec_reverse_once): Use scoped_restore.
7451         * remote.c (restore_remote_timeout): Remove.
7452         (remote_flash_erase, remote_flash_write, remote_flash_done)
7453         (readchar, remote_serial_write): Use scoped_restore.
7454         * cli/cli-script.c (struct source_cleanup_lines_args)
7455         (source_cleanup_lines): Remove.
7456         (script_from_file): Use scoped_restore.
7457         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7458         (source_command): Use scoped_restore.
7459
7460 2017-08-03  Tom Tromey  <tom@tromey.com>
7461
7462         * utils.h (make_cleanup_free_so): Remove.
7463         * utils.c (do_free_so, make_cleanup_free_so): Remove.
7464         * solist.h (struct so_deleter): New.
7465         (so_list_up): New typedef.
7466         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7467
7468 2017-08-03  Tom Tromey  <tom@tromey.com>
7469
7470         * utils.h (make_cleanup_restore_current_language): Remove.
7471         * utils.c (do_restore_current_language)
7472         (make_cleanup_restore_current_language): Remove.
7473         * parse.c (parse_exp_in_context_1)
7474         (parse_expression_with_language): Use
7475         scoped_restore_current_language.
7476         * mi/mi-main.c (mi_cmd_execute): Use
7477         scoped_restore_current_language.
7478         * language.h (scoped_restore_current_language): New class.
7479
7480 2017-08-03  Tom Tromey  <tom@tromey.com>
7481
7482         * compile/compile.c (cleanup_unlink_file): Remove.
7483         (compile_to_object): Use gdb::unlinker.
7484         (eval_compile_command): Likewise.
7485
7486 2017-08-03  Tom Tromey  <tom@tromey.com>
7487
7488         * utils.h (make_cleanup_fclose): Remove.
7489         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7490
7491 2017-08-03  Tom Tromey  <tom@tromey.com>
7492
7493         * top.c (open_terminal_stream): Return gdb_file_up.
7494         (new_ui_command): Update.
7495
7496 2017-08-03  Tom Tromey  <tom@tromey.com>
7497
7498         * source.c (print_source_lines_base, forward_search_command)
7499         (reverse_search_command): Use gdb_file_up.
7500
7501 2017-08-03  Tom Tromey  <tom@tromey.com>
7502
7503         * fbsd-nat.c (fbsd_find_memory_regions): Update.
7504
7505 2017-08-03  Tom Tromey  <tom@tromey.com>
7506
7507         * cli/cli-cmds.c (find_and_open_script): Change return type.
7508         Remove "streamp" and "full_path" parameters.
7509         (source_script_with_search): Update.
7510         * auto-load.c (source_script_file): Update.
7511         * cli/cli-cmds.h (find_and_open_script): Change type.
7512         (open_script): New struct.
7513
7514 2017-08-03  Tom Tromey  <tom@tromey.com>
7515
7516         * xml-support.c (xml_fetch_content_from_file): Update.
7517         * ui-file.c (stdio_file::open): Update.
7518         * tracefile-tfile.c (tfile_start): Update.
7519         * remote.c (remote_file_put, remote_file_get): Update.
7520         * nat/linux-procfs.c (linux_proc_get_int)
7521         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7522         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7523         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7524         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7525         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7526         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7527         * linux-nat.c (linux_proc_pending_signals): Update.
7528         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7529         (file_closer): Remove.
7530         * compile/compile.c (compile_to_object): Update.
7531         * common/filestuff.h (struct gdb_file_deleter): New.
7532         (gdb_file_up): New typedef.
7533         (gdb_fopen_cloexec): Change return type.
7534         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7535         * cli/cli-dump.c (fopen_with_cleanup): Remove.
7536         (dump_binary_file, restore_binary_file): Update.
7537         * auto-load.c (auto_load_objfile_script_1): Update.
7538
7539 2017-08-03  Tom Tromey  <tom@tromey.com>
7540
7541         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7542         (info_static_tracepoint_markers_command): Likewise.
7543         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7544         * skip.c (skip_info): Use ui_out_emit_table.
7545         * progspace.c (print_program_space): Use ui_out_emit_table.
7546         * osdata.c (info_osdata): Use ui_out_emit_table.
7547         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7548         ui_out_emit_table.
7549         * linux-thread-db.c (info_auto_load_libthread_db): Use
7550         ui_out_emit_table.
7551         * inferior.c (print_inferior): Use ui_out_emit_table.
7552         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7553         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7554         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7555         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7556         * ui-out.h (class ui_out_emit_table): New.
7557
7558 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
7559
7560         * mips-tdep.c (mips_fpu_type_str): New function.
7561         (mips_dump_tdep): Call it.
7562
7563 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
7564
7565         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7566         `->mips_fpu_type'.
7567
7568 2017-07-31  Xavier Roirand  <roirand@adacore.com>
7569
7570         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7571
7572 2017-07-27  Xavier Roirand  <roirand@adacore.com>
7573
7574         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7575
7576 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7577
7578         * cli/cli-cmds.c (maintenancechecklist): New variable.
7579         * gdbcmd.h (maintenancechecklist): Declare it.
7580         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7581         Call i386_linux_read_description with different masks.
7582         * maint.c (maintenance_check_command): New function.
7583         (_initialize_maint_cmds): Call add_prefix_cmd.
7584         * target-descriptions.c (tdesc_reg): override operator != and ==.
7585         (tdesc_type): Likewise.
7586         (tdesc_feature): Likewise.
7587         (target_desc): Likewise.
7588         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7589         (maintenance_check_xml_descriptions): New function.
7590         (_initialize_target_descriptions) Add command "xml-descriptions".
7591         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7592
7593 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7594
7595         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7596         Include features/i386/32bit-*.c.
7597         (i386_linux_read_description): Generate target description if it
7598         doesn't exist.
7599         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7600         functions.
7601         * features/i386/32bit-linux.c: Re-generated.
7602         * features/i386/32bit-sse.c: Likewise.
7603         * target-descriptions.c (print_c_feature::visit): Print code to
7604         set register number if needed.
7605         (print_c_feature) <m_next_regnum>: New field.
7606
7607 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7608
7609         * features/Makefile (CFILES): Rename with TDESC_CFILES.
7610         (FEATURE_XMLFILES): New.
7611         (FEATURE_CFILES): New.
7612         New rules.
7613         (clean-cfiles): Remove generated c files.
7614         * features/i386/32bit-avx.c: Generated.
7615         * features/i386/32bit-avx512.c: Generated.
7616         * features/i386/32bit-core.c: Generated.
7617         * features/i386/32bit-linux.c: Generated.
7618         * features/i386/32bit-mpx.c: Generated.
7619         * features/i386/32bit-pkeys.c: Generated.
7620         * features/i386/32bit-sse.c: Generated.
7621         * target-descriptions.c: Include algorithm.
7622         (tdesc_element_visitor): Add method visit_end.
7623         (print_c_tdesc): Implement visit_end.
7624         (print_c_tdesc:: m_filename_after_features): Move it to
7625         protected.
7626         (print_c_feature): New class.
7627         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7628         name starts with "i386/32bit-".
7629
7630 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7631
7632         * target-descriptions.c (tdesc_element_visitor): New class.
7633         (tdesc_element): New class.
7634         (tdesc_reg): Inherit from tdesc_element.
7635         (tdesc_reg::accept): New function.
7636         (tdesc_type): Inherit from tdesc_element.
7637         (tdesc_type::accept): New function.
7638         (tdesc_feature): Inherit from tdesc_element.
7639         (tdesc_feature::accept): New function.
7640         (target_desc): Inherit from tdesc_element.
7641         (target_desc::target_desc): New.
7642         (target_desc::~target_desc): New.
7643         (target_desc::accept): New.
7644         (allocate_target_description): Use new.
7645         (free_target_description): Use delete.
7646         (print_c_tdesc): New class.
7647         (maint_print_c_tdesc_cmd): Adjust.
7648
7649         * features/aarch64.c: Re-generated.
7650         * features/arc-arcompact.c: Re-generated.
7651         * features/arc-v2.c: Re-generated.
7652         * features/arm/arm-with-iwmmxt.c: Re-generated.
7653         * features/arm/arm-with-m.c: Re-generated.
7654         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
7655         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
7656         * features/arm/arm-with-neon.c: Re-generated.
7657         * features/arm/arm-with-vfpv2.c: Re-generated.
7658         * features/arm/arm-with-vfpv3.c: Re-generated.
7659         * features/i386/amd64-avx-avx512.c: Re-generated.
7660         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7661         * features/i386/amd64-avx.c: Re-generated.
7662         * features/i386/amd64-avx-linux.c: Re-generated.
7663         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
7664         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7665         * features/i386/amd64-avx-mpx.c: Re-generated.
7666         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
7667         * features/i386/amd64.c: Re-generated.
7668         * features/i386/amd64-linux.c: Re-generated.
7669         * features/i386/amd64-mpx.c: Re-generated.
7670         * features/i386/amd64-mpx-linux.c: Re-generated.
7671         * features/i386/i386-avx-avx512.c: Re-generated.
7672         * features/i386/i386-avx-avx512-linux.c: Re-generated.
7673         * features/i386/i386-avx.c: Re-generated.
7674         * features/i386/i386-avx-linux.c: Re-generated.
7675         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
7676         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
7677         * features/i386/i386-avx-mpx.c: Re-generated.
7678         * features/i386/i386-avx-mpx-linux.c: Re-generated.
7679         * features/i386/i386.c: Re-generated.
7680         * features/i386/i386-linux.c: Re-generated.
7681         * features/i386/i386-mmx.c: Re-generated.
7682         * features/i386/i386-mmx-linux.c: Re-generated.
7683         * features/i386/i386-mpx.c: Re-generated.
7684         * features/i386/i386-mpx-linux.c: Re-generated.
7685         * features/i386/x32-avx-avx512.c: Re-generated.
7686         * features/i386/x32-avx-avx512-linux.c: Re-generated.
7687         * features/i386/x32-avx.c: Re-generated.
7688         * features/i386/x32-avx-linux.c: Re-generated.
7689         * features/i386/x32.c: Re-generated.
7690         * features/i386/x32-linux.c: Re-generated.
7691         * features/microblaze.c: Re-generated.
7692         * features/microblaze-with-stack-protect.c: Re-generated.
7693         * features/mips64-dsp-linux.c: Re-generated.
7694         * features/mips64-linux.c: Re-generated.
7695         * features/mips-dsp-linux.c: Re-generated.
7696         * features/mips-linux.c: Re-generated.
7697         * features/nds32.c: Re-generated.
7698         * features/nios2.c: Re-generated.
7699         * features/nios2-linux.c: Re-generated.
7700         * features/rs6000/powerpc-32.c: Re-generated.
7701         * features/rs6000/powerpc-32l.c: Re-generated.
7702         * features/rs6000/powerpc-403.c: Re-generated.
7703         * features/rs6000/powerpc-403gc.c : Re-generated.
7704         * features/rs6000/powerpc-405.c: Re-generated.
7705         * features/rs6000/powerpc-505.c: Re-generated.
7706         * features/rs6000/powerpc-601.c: Re-generated.
7707         * features/rs6000/powerpc-602.c: Re-generated.
7708         * features/rs6000/powerpc-603.c: Re-generated.
7709         * features/rs6000/powerpc-604.c: Re-generated.
7710         * features/rs6000/powerpc-64.c: Re-generated.
7711         * features/rs6000/powerpc-64l.c: Re-generated.
7712         * features/rs6000/powerpc-7400.c: Re-generated.
7713         * features/rs6000/powerpc-750.c: Re-generated.
7714         * features/rs6000/powerpc-860.c: Re-generated.
7715         * features/rs6000/powerpc-altivec32.c: Re-generated.
7716         * features/rs6000/powerpc-altivec32l.c: Re-generated.
7717         * features/rs6000/powerpc-altivec64.c: Re-generated.
7718         * features/rs6000/powerpc-altivec64l.c: Re-generated.
7719         * features/rs6000/powerpc-cell32l.c: Re-generated.
7720         * features/rs6000/powerpc-cell64l.c: Re-generated.
7721         * features/rs6000/powerpc-e500.c: Re-generated.
7722         * features/rs6000/powerpc-e500l.c: Re-generated.
7723         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
7724         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
7725         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
7726         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
7727         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
7728         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
7729         * features/rs6000/powerpc-vsx32.c: Re-generated.
7730         * features/rs6000/powerpc-vsx32l.c: Re-generated.
7731         * features/rs6000/powerpc-vsx64.c: Re-generated.
7732         * features/rs6000/powerpc-vsx64l.c: Re-generated.
7733         * features/rs6000/rs6000.c: Re-generated.
7734         * features/s390-linux32.c: Re-generated.
7735         * features/s390-linux32v1.c: Re-generated.
7736         * features/s390-linux32v2.c: Re-generated.
7737         * features/s390-linux64.c: Re-generated.
7738         * features/s390-linux64v1.c: Re-generated.
7739         * features/s390-linux64v2.c: Re-generated.
7740         * features/s390-te-linux64.c: Re-generated.
7741         * features/s390-tevx-linux64.c: Re-generated.
7742         * features/s390-vx-linux64.c: Re-generated.
7743         * features/s390x-linux64.c: Re-generated.
7744         * features/s390x-linux64v1.c: Re-generated.
7745         * features/s390x-linux64v2.c: Re-generated.
7746         * features/s390x-te-linux64.c: Re-generated.
7747         * features/s390x-tevx-linux64.c: Re-generated.
7748         * features/s390x-vx-linux64.c: Re-generated.
7749         * features/sparc/sparc32-solaris.c: Re-generated.
7750         * features/sparc/sparc64-solaris.c: Re-generated.
7751         * features/tic6x-c62x.c: Re-generated.
7752         * features/tic6x-c62x-linux.c: Re-generated.
7753         * features/tic6x-c64x.c: Re-generated.
7754         * features/tic6x-c64x-linux.c: Re-generated.
7755         * features/tic6x-c64xp.c: Re-generated.
7756         * features/tic6x-c64xp-linux.c: Re-generated.
7757
7758 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7759
7760         * i386-linux-tdep.c (i386_linux_read_description): New function.
7761         (i386_linux_core_read_description): Call
7762         i386_linux_read_description.
7763         * i386-linux-tdep.h (i386_linux_read_description): Declare.
7764         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
7765         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
7766         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
7767         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
7768         * x86-linux-nat.c (x86_linux_read_description): Call
7769         i386_linux_read_description.
7770
7771 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7772
7773         * NEWS: Mention it.
7774         * features/Makefile (%.c: %.xml): Pass the xml file name to
7775         command "maint print c-tdesc".
7776         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7777         name from 'arg'.
7778
7779 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7780
7781         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
7782         in-class initialization.
7783         (tdesc_create_feature): Call new instead of XCNEW.
7784         (free_target_description): Ue delete.
7785
7786 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
7787
7788         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
7789
7790 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7791
7792         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
7793         constant.
7794         (amd64_x32_init_abi): Likewise.
7795         * amd64-tdep.h (amd64_init_abi): Update declaration.
7796         (amd64_x32_init_abi): Likewise.
7797
7798 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7799
7800         PR tdep/21717
7801         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
7802         condition for FPSCR.
7803         (arm_linux_store_inferior_registers): Likewise.
7804
7805 2017-07-22  Tom Tromey  <tom@tromey.com>
7806
7807         * break-catch-syscall.c (struct catch_syscall_inferior_data)
7808         <syscalls_counts>: Now a std::vector.
7809         (get_catch_syscall_inferior_data): Use "new".
7810         (catch_syscall_inferior_data_cleanup): Use "delete".
7811         (insert_catch_syscall, remove_catch_syscall)
7812         (clear_syscall_counts): Update.
7813
7814 2017-07-22  Tom Tromey  <tom@tromey.com>
7815
7816         * break-catch-syscall.c (syscall_catchpoint)
7817         <syscalls_to_be_caught>: Now a std::vector<int>
7818         (~syscall_catchpoint): Remove.
7819         (insert_catch_syscall, remove_catch_syscall)
7820         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
7821         (print_mention_catch_syscall, print_recreate_catch_syscall):
7822         Update.
7823         (create_syscall_event_catchpoint): Change type of "filter"
7824         parameter.
7825         (catch_syscall_split_args): Return a std::vector.
7826         (catch_syscall_command_1, catching_syscall_number_1): Update.
7827
7828 2017-07-22  Tom Tromey  <tom@tromey.com>
7829
7830         * break-catch-throw.c (struct exception_catchpoint)
7831         <exception_rx>: Now a std::string.
7832         (~exception_catchpoint): Remove.
7833         (print_one_detail_exception_catchpoint): Update.
7834         (handle_gnu_v3_exceptions): Change type of except_rx.
7835         (extract_exception_regexp): Return a std::string.
7836         (catch_exception_command_1): Update.
7837
7838 2017-07-22  Tom Tromey  <tom@tromey.com>
7839
7840         * break-catch-sig.c (gdb_signal_type): Remove typedef.
7841         (struct signal_catchpoint) <signals_to_be_caught>: Now a
7842         std::vector.
7843         <catch_all>: Now a bool.
7844         (~signal_catchpoint): Remove.
7845         (signal_catchpoint_insert_location)
7846         (signal_catchpoint_remove_location)
7847         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
7848         (signal_catchpoint_print_mention)
7849         (signal_catchpoint_print_recreate)
7850         (signal_catchpoint_explains_signal): Update.
7851         (create_signal_catchpoint): Change type of "filter" and
7852         "catch_all".
7853         (catch_signal_split_args): Return a std::vector.  Change type of
7854         "catch_all".
7855         (catch_signal_command): Update.
7856
7857 2017-07-20  Pedro Alves  <palves@redhat.com>
7858
7859         * ada-lang.c (ada_language_defn): Make extern.
7860         (_initialize_ada_language): Remove add_language call.
7861         * c-lang.c (c_language_defn, cplus_language_defn)
7862         (asm_language_defn, minimal_language_defn): Make extern.
7863         (_initialize_c_language): Delete.
7864         * completer.c (compare_cstrings): Delete, moved to utils.h.
7865         * d-lang.c (d_language_defn): Make extern.
7866         (_initialize_d_language): Remove add_language calls.
7867         * defs.h (enum language): Add comment.
7868         * f-lang.c (f_language_defn): Make extern.
7869         (_initialize_f_language): Remove add_language call.
7870         * go-lang.c (go_language_defn): Make extern.
7871         (_initialize_go_language): Remove add_language call.
7872         * language.c: Include <algorithm>.
7873         (languages): Redefine as const array.
7874         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
7875         (set_language_command): Handle "local".  Use for-range loop.
7876         (set_language): Remove loop.
7877         (language_enum): Rewrite.
7878         (language_def, language_str): Remove loops.
7879         (add_language): Delete.
7880         (add_set_language_command): New, based on add_languages.
7881         (skip_language_trampoline): Adjust.
7882         (local_language_defn): Delete.
7883         (language_gdbarch_post_init): Adjust.
7884         (_initialize_language): Remove add_language calls.  Call
7885         add_set_language_command.
7886         * language.h (add_language): Delete.
7887         (auto_language_defn)
7888         (unknown_language_defn, minimal_language_defn, ada_language_defn)
7889         (asm_language_defn, c_language_defn, cplus_language_defn)
7890         (d_language_defn, f_language_defn, go_language_defn)
7891         (m2_language_defn, objc_language_defn, opencl_language_defn)
7892         (pascal_language_defn, rust_language_defn): Declare.
7893         * m2-lang.c (m2_language_defn): Make extern.
7894         (_initialize_m2_language): Remove add_language call.
7895         * objc-lang.c (objc_language_defn): Make extern.
7896         (_initialize_objc_language): Remove add_language call.
7897         * opencl-lang.c (opencl_language_defn): Make extern.
7898         (_initialize_opencl_language): Remove add_language call.
7899         * p-lang.c (pascal_language_defn): Make extern.
7900         (_initialize_pascal_language): Delete.
7901         * rust-lang.c (rust_language_defn): Make extern.
7902         (_initialize_rust_language): Delete.
7903         * utils.h (compare_cstrings): New static inline function.
7904
7905 2017-07-20  Pedro Alves  <palves@redhat.com>
7906
7907         * ada-lang.c (ada_to_fixed_type_1): Adjust.
7908         (get_var_value): Constify parameters.
7909         (get_int_var_value): Change prototype.
7910         (to_fixed_range_type): Adjust.
7911         * ada-lang.h (get_int_var_value): Change prototype.
7912
7913 2017-07-20  Pedro Alves  <palves@redhat.com>
7914
7915         * dwarf2read.c (dw2_lookup_symbol): Use
7916         SYMBOL_MATCHES_SEARCH_NAME.
7917         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
7918
7919 2017-07-20  Pedro Alves  <palves@redhat.com>
7920
7921         * block.c (block_iter_name_step, block_iter_name_first)
7922         (block_iter_name_next): Delete.
7923         (block_lookup_symbol_primary): Adjust to use
7924         dict_iter_match_first/dict_iter_match_next.
7925         * block.h (block_iter_name_first, block_iter_name_next): Delete
7926         declarations.
7927         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
7928         dict_iter_match_first/dict_iter_match_next.
7929
7930 2017-07-20  Pedro Alves  <palves@redhat.com>
7931
7932         * cp-support.c (cp_find_first_component_aux): Add missing case for
7933         end of string.
7934
7935 2017-07-18  David Blaikie  <dblaikie@gmail.com>
7936
7937         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
7938         of dwo_cu's dwo_file.
7939
7940 2017-07-18  Yao Qi  <yao.qi@linaro.org>
7941
7942         * remote.c (store_registers_using_G): Remove one line comment.
7943
7944 2017-07-18  Yao Qi  <yao.qi@linaro.org>
7945
7946         * regcache.c (regcache_cpy): Simplify it.
7947         (regcache::cpy_no_passthrough): Remove it.
7948         * regcache.h (cpy_no_passthrough): Remove it.
7949         (regcache_dup, regcache_cpy): Update comments.
7950
7951 2017-07-18  Pedro Alves  <palves@redhat.com>
7952
7953         * remote-sim.c (sim_command_completer): Adjust to work with a
7954         completion_tracker instead of a VEC.
7955
7956 2017-07-17  Pedro Alves  <palves@redhat.com>
7957
7958         * completer.c (complete_source_filenames): New function.
7959         (complete_address_and_linespec_locations): New function.
7960         (location_completer): Use complete_address_and_linespec_locations.
7961         (completion_tracker::build_completion_result): Honor the tracker's
7962         request to suppress append.
7963         * completer.h (completion_tracker::suppress_append_ws)
7964         (completion_tracker::set_suppress_append_ws): New methods.
7965         (completion_tracker::m_suppress_append_ws): New field.
7966         (complete_source_filenames): New declaration.
7967         * linespec.c (linespec_complete_what): New.
7968         (struct ls_parser) <complete_what, completion_word,
7969         completion_quote_char, completion_quote_end, completion_tracker>:
7970         New fields.
7971         (string_find_incomplete_keyword_at_end): New.
7972         (linespec_lexer_lex_string): Record quote char.  If in completion
7973         mode, don't throw.
7974         (linespec_lexer_consume_token): Advance the completion word point.
7975         (linespec_lexer_peek_token): Save/restore completion info.
7976         (save_stream_and_consume_token): New.
7977         (set_completion_after_number): New.
7978         (linespec_parse_basic): Set what to complete next depending on
7979         token.  Handle function and label completions specially.
7980         (parse_linespec): Disable objc shortcut in completion mode.  Set
7981         what to complete next depending on token type.  Skip keyword if in
7982         completion mode.
7983         (complete_linespec_component, linespec_complete): New.
7984         * linespec.h (linespec_complete): Declare.
7985
7986 2017-07-17  Pedro Alves  <palves@redhat.com>
7987
7988         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
7989         Handle 'operator<' / 'operator<<'.
7990
7991 2017-07-17  Pedro Alves  <palves@redhat.com>
7992
7993         * completer.c (collect_explicit_location_matches): Handle
7994         MATCH_LABEL.
7995         (convert_explicit_location_to_linespec): New, factored out from
7996         ...
7997         (convert_explicit_location_to_sals): ... this.
7998         (complete_label): New.
7999         (linespec_complete_label, find_label_symbols_in_block): New.
8000         (find_label_symbols): Add completion_mode parameter and adjust to
8001         call find_label_symbols_in_block.
8002         * linespec.h (linespec_complete_label): Declare.
8003
8004 2017-07-17  Pedro Alves  <palves@redhat.com>
8005
8006         * ada-lang.c (ada_collect_symbol_completion_matches): Add
8007         complete_symbol_mode parameter.
8008         * cli/cli-cmds.c (complete_command): Get the completion result out
8009         of the handle_brkchars tracker if used a custom word point.
8010         * completer.c: Include "linespec.h".
8011         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8012         (advance_to_expression_complete_word_point): New.
8013         (completion_tracker::completes_to_completion_word): New.
8014         (complete_files_symbols): Pass down
8015         complete_symbol_mode::EXPRESSION.
8016         (explicit_options, probe_options): New.
8017         (collect_explicit_location_matches): Complete on the
8018         explictit_loc->foo instead of word.  Use
8019         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
8020         keyword and options completions.
8021         (backup_text_ptr): Delete.
8022         (skip_keyword): New.
8023         (complete_explicit_location): Remove 'word' parameter.  Add
8024         language, quoted_arg_start and quoted_arg_end parameters.
8025         Rewrite, parsing left to right.
8026         (location_completer): Rewrite.
8027         (location_completer_handle_brkchars): New function.
8028         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8029         (enum complete_line_internal_reason): Adjust comments.
8030         (completion_tracker::discard_completions): New.
8031         (completer_handle_brkchars_func_for_completer): Handle
8032         location_completer.
8033         (gdb_custom_word_point_brkchars)
8034         (gdb_org_rl_basic_quote_characters): New.
8035         (gdb_completion_word_break_characters_throw)
8036         (completion_find_completion_word): Handle trackers that use a
8037         custom word point.
8038         (completion_tracker::advance_custom_word_point_by): New.
8039         (completion_tracker::build_completion_result): Don't rely on
8040         readline appending the quote char.
8041         (gdb_rl_attempted_completion_function_throw): Handle trackers that
8042         use a custom word point.
8043         (gdb_rl_attempted_completion_function): Restore
8044         rl_basic_quote_characters.
8045         * completer.h (class completion_tracker): Extend intro comment.
8046         (completion_tracker::set_quote_char)
8047         (completion_tracker::quote_char)
8048         (completion_tracker::set_use_custom_word_point)
8049         (completion_tracker::use_custom_word_point)
8050         (completion_tracker::custom_word_point)
8051         (completion_tracker::set_custom_word_point)
8052         (completion_tracker::advance_custom_word_point_by)
8053         (completion_tracker::completes_to_completion_word)
8054         (completion_tracker::discard_completions): New methods.
8055         (completion_tracker::m_quote_char)
8056         (completion_tracker::m_use_custom_word_point)
8057         (completion_tracker::m_custom_word_point): New fields.
8058         (advance_to_expression_complete_word_point): Declare.
8059         * f-lang.c (f_collect_symbol_completion_matches): Add
8060         complete_symbol_mode parameter.
8061         * language.h (struct language_defn)
8062         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8063         parameter.
8064         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
8065         (linespec_complete_function): New function.
8066         (linespec_lexer_lex_keyword): Adjust.
8067         * linespec.h (linespec_keywords, linespec_complete_function): New
8068         declarations.
8069         * location.c (find_end_quote): New function.
8070         (explicit_location_lex_one): Add explicit_completion_info
8071         parameter.  Save quoting info.  Don't throw if being called for
8072         completion.  Don't handle Ada operators here.
8073         (is_cp_operator, skip_op_false_positives, first_of)
8074         (explicit_location_lex_one_function): New function.
8075         (string_to_explicit_location): Replace 'dont_throw' parameter with
8076         an explicit_completion_info pointer parameter.  Handle it.  Don't
8077         use explicit_location_lex_one to lex function names.  Use
8078         explicit_location_lex_one_function instead.
8079         * location.h (struct explicit_completion_info): New.
8080         (string_to_explicit_location): Replace 'dont_throw' parameter with
8081         an explicit_completion_info pointer parameter.
8082         * symtab.c (default_collect_symbol_completion_matches_break_on):
8083         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
8084         (default_collect_symbol_completion_matches)
8085         (collect_symbol_completion_matches): Add complete_symbol_mode
8086         parameter.
8087         (collect_symbol_completion_matches_type): Pass down
8088         complete_symbol_mode::EXPRESSION.
8089         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8090         parameter.  Handle LINESPEC mode.
8091         * symtab.h (complete_symbol_mode): New.
8092         (default_collect_symbol_completion_matches_break_on)
8093         (default_collect_symbol_completion_matches)
8094         (collect_symbol_completion_matches)
8095         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8096         parameter.
8097
8098 2017-07-17  Pedro Alves  <palves@redhat.com>
8099
8100         * utils.c (enum class strncmp_iw_mode): New.
8101         (strcmp_iw): Rename to ...
8102         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
8103         parameters.  Handle them.
8104         (strncmp_iw): New.
8105         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8106         * utils.h (strncmp_iw): Declare.
8107         (strcmp_iw): Move describing comments here.
8108
8109 2017-07-17  Pedro Alves  <palves@redhat.com>
8110
8111         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8112         CP_OPERATOR_STR.
8113         * c-typeprint.c (is_type_conversion_operator): Use
8114         CP_OPERATOR_STR.
8115         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8116         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8117         CP_OPERATOR_LEN.
8118         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8119         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8120         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8121         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8122         CP_OPERATOR_STR.
8123         * location.c: Include "cp-support.h".
8124         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8125         CP_OPERATOR_STR.
8126         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8127         CP_OPERATOR_LEN.
8128
8129 2017-07-17  Pedro Alves  <palves@redhat.com>
8130
8131         * cli/cli-cmds.c (complete_command): Use a completion tracker
8132         along with completion_find_completion_word for handle_brkchars
8133         phase.
8134         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8135         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8136         (struct gdb_rl_completion_word_info): New.
8137         (gdb_rl_find_completion_word): New.
8138         (completion_find_completion_word): New.
8139         * completer.h (completion_find_completion_word): Declare.
8140
8141 2017-07-17  Pedro Alves  <palves@redhat.com>
8142
8143         * ada-lang.c (symbol_completion_match): Adjust comments.
8144         (symbol_completion_add): Replace vector parameter with
8145         completion_tracker parameter.  Use it.
8146         (ada_make_symbol_completion_list): Rename to...
8147         (ada_collect_symbol_completion_matches): ... this.  Add
8148         completion_tracker parameter and use it.
8149         (ada_language_defn): Adjust.
8150         * break-catch-syscall.c (catch_syscall_completer): Adjust
8151         prototype and work with completion_tracker instead of VEC.
8152         * breakpoint.c (condition_completer): Adjust prototype and work
8153         with completion_tracker instead of VEC.
8154         * c-lang.c (c_language_defn, cplus_language_defn)
8155         (asm_language_defn, minimal_language_defn): Adjust to renames.
8156         * cli/cli-cmds.c (complete_command): Rework using
8157         completion_tracker.  Catch exceptions when completing.
8158         * cli/cli-decode.c (integer_unlimited_completer)
8159         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8160         with completion_tracker instead of VEC.
8161         * command.h (struct completion_tracker): Forward declare.
8162         (completer_ftype, completer_handle_brkchars_ftype): Change
8163         types.
8164         (complete_on_cmdlist, complete_on_enum): Adjust.
8165         * completer.c: Include <algorithm>.
8166         (struct gdb_completer_state): New.
8167         (current_completion): New global.
8168         (readline_line_completion_function): Delete.
8169         (noop_completer, filename_completer)
8170         (filename_completer_handle_brkchars, complete_files_symbols)
8171         (linespec_location_completer): Adjust to work with a
8172         completion_tracker instead of a VEC.
8173         (string_or_empty): New.
8174         (collect_explicit_location_matches): Adjust to work with a
8175         completion_tracker instead of a VEC.
8176         (explicit_location_completer): Rename to ...
8177         (complete_explicit_location): ... this and adjust to work with a
8178         completion_tracker instead of a VEC.
8179         (location_completer): Adjust to work with a completion_tracker
8180         instead of a VEC.
8181         (add_struct_fields): Adjust to work with a completion_list instead
8182         of VEC.
8183         (expression_completer): Rename to ...
8184         (complete_expression): ... this and adjust to work with a
8185         completion_tracker instead of a VEC.  Use complete_files_symbols.
8186         (expression_completer): Reimplement on top of complete_expression.
8187         (symbol_completer): Adjust to work with a completion_tracker
8188         instead of a VEC.
8189         (enum complete_line_internal_reason): Add describing comments.
8190         (complete_line_internal_normal_command): Adjust to work with a
8191         completion_tracker instead of a VEC.
8192         (complete_line_internal): Rename to ...
8193         (complete_line_internal_1): ... this and adjust to work with a
8194         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
8195         handle_brkchars phase.
8196         (new_completion_tracker): Delete.
8197         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8198         complete_line_internal_1.
8199         (free_completion_tracker): Delete.
8200         (INITIAL_COMPLETION_HTAB_SIZE): New.
8201         (completion_tracker::completion_tracker)
8202         (completion_tracker::~completion_tracker): New.
8203         (maybe_add_completion): Delete.
8204         (completion_tracker::maybe_add_completion)
8205         (completion_tracker::add_completion)
8206         (completion_tracker::add_completions): New.
8207         (throw_max_completions_reached_error): Delete.
8208         (complete_line): Adjust to work with a completion_tracker instead
8209         of a VEC.  Don't create a completion_tracker_t or check for max
8210         completions here.
8211         (command_completer, command_completer_handle_brkchars)
8212         (signal_completer, reg_or_group_completer_1)
8213         (reg_or_group_completer, default_completer_handle_brkchars):
8214         Adjust to work with a completion_tracker.
8215         (gdb_completion_word_break_characters_throw): New.
8216         (gdb_completion_word_break_characters): Reimplement.
8217         (line_completion_function): Delete.
8218         (completion_tracker::recompute_lowest_common_denominator)
8219         (expand_preserving_ws)
8220         (completion_tracker::build_completion_result)
8221         (completion_result::completion_result)
8222         (completion_result::completion_result)
8223         (completion_result::~completion_result)
8224         (completion_result::completion_result)
8225         (completion_result::release_match_list, compare_cstrings)
8226         (completion_result::sort_match_list)
8227         (completion_result::reset_match_list)
8228         (gdb_rl_attempted_completion_function_throw)
8229         (gdb_rl_attempted_completion_function): New.
8230         * completer.h (completion_list, struct completion_result)
8231         (class completion_tracker): New.
8232         (complete_line): Add completion_tracker parameter.
8233         (readline_line_completion_function): Delete.
8234         (gdb_rl_attempted_completion_function): New.
8235         (noop_completer, filename_completer, expression_completer)
8236         (location_completer, symbol_completer, command_completer)
8237         (signal_completer, reg_or_group_completer): Update prototypes.
8238         (completion_tracker_t, new_completion_tracker)
8239         (make_cleanup_free_completion_tracker): Delete.
8240         (enum maybe_add_completion_enum): Delete.
8241         (maybe_add_completion): Delete.
8242         (throw_max_completions_reached_error): Delete.
8243         * corefile.c (complete_set_gnutarget): Adjust to work with a
8244         completion_tracker instead of a VEC.
8245         * cp-abi.c (cp_abi_completer): Adjust to work with a
8246         completion_tracker instead of a VEC.
8247         * d-lang.c (d_language_defn): Adjust.
8248         * disasm.c (disassembler_options_completer): Adjust to work with a
8249         completion_tracker instead of a VEC.
8250         * f-lang.c (f_make_symbol_completion_list): Rename to ...
8251         (f_collect_symbol_completion_matches): ... this.  Adjust to work
8252         with a completion_tracker instead of a VEC.
8253         (f_language_defn): Adjust.
8254         * go-lang.c (go_language_defn): Adjust.
8255         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8256         Adjust to work with a completion_tracker instead of a VEC.
8257         * infrun.c (handle_completer): Likewise.
8258         * interps.c (interpreter_completer): Likewise.
8259         * interps.h (interpreter_completer): Likewise.
8260         * language.c (unknown_language_defn, auto_language_defn)
8261         (local_language_defn): Adjust.
8262         * language.h (language_defn::la_make_symbol_completion_list):
8263         Rename to ...
8264         (language_defn::la_collect_symbol_completion_matches): ... this
8265         and adjust to work with a completion_tracker instead of a VEC.
8266         * m2-lang.c (m2_language_defn): Adjust.
8267         * objc-lang.c (objc_language_defn): Adjust.
8268         * opencl-lang.c (opencl_language_defn): Adjust.
8269         * p-lang.c (pascal_language_defn): Adjust.
8270         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8271         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8272         with a completion_tracker.
8273         * rust-lang.c (rust_language_defn): Adjust.
8274         * symtab.c (free_completion_list, do_free_completion_list)
8275         (return_val, completion_tracker): Delete.
8276         (completion_list_add_name, completion_list_add_symbol)
8277         (completion_list_add_msymbol, completion_list_objc_symbol)
8278         (completion_list_add_fields, add_symtab_completions): Add
8279         completion_tracker parameter and use it.
8280         (default_make_symbol_completion_list_break_on_1): Rename to...
8281         (default_collect_symbol_completion_matches_break_on): ... this.
8282         Add completion_tracker parameter and use it instead of allocating
8283         a completion tracker here.
8284         (default_make_symbol_completion_list_break_on): Delete old
8285         implementation.
8286         (default_make_symbol_completion_list): Delete.
8287         (default_collect_symbol_completion_matches): New.
8288         (make_symbol_completion_list): Delete.
8289         (collect_symbol_completion_matches): New.
8290         (make_symbol_completion_type): Rename to ...
8291         (collect_symbol_completion_matches_type): ... this.  Add
8292         completion_tracker parameter and use it instead of VEC.
8293         (make_file_symbol_completion_list_1): Rename to...
8294         (collect_file_symbol_completion_matches): ... this.  Add
8295         completion_tracker parameter and use it instead of VEC.
8296         (make_file_symbol_completion_list): Delete.
8297         (add_filename_to_list): Use completion_list instead of a VEC.
8298         (add_partial_filename_data::list): Now a completion_list.
8299         (make_source_files_completion_list): Work with a completion_list
8300         instead of a VEC.
8301         * symtab.h: Include "completer.h".
8302         (default_make_symbol_completion_list_break_on)
8303         (default_make_symbol_completion_list, make_symbol_completion_list)
8304         (make_symbol_completion_type, make_file_symbol_completion_list)
8305         (make_source_files_completion_list): Delete.
8306         (default_collect_symbol_completion_matches_break_on)
8307         (default_collect_symbol_completion_matches)
8308         (collect_symbol_completion_matches)
8309         (collect_symbol_completion_matches_type)
8310         (collect_file_symbol_completion_matches)
8311         (make_source_files_completion_list): New.
8312         * top.c (init_main): Don't install a rl_completion_entry_function
8313         hook.  Install a rl_attempted_completion_function hook instead.
8314         * tui/tui-layout.c (layout_completer): Adjust to work with a
8315         completion_tracker.
8316         * tui/tui-regs.c (tui_reggroup_completer):
8317         * tui/tui-win.c (window_name_completer, focus_completer)
8318         (winheight_completer): Adjust to work with a completion_tracker.
8319         * value.c: Include "completer.h".
8320         (complete_internalvar): Adjust to work with a completion_tracker.
8321         * value.h (complete_internalvar): Likewise.
8322
8323 2017-07-17  Pedro Alves  <palves@redhat.com>
8324
8325         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8326         renames.
8327         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8328         comments to completer_ftype's declaration.
8329         <completer_handle_brkchars>: Change type to
8330         completer_handle_brkchars_ftype.
8331         * command.h (completer_ftype): Add describing comment and give
8332         names to parameters.
8333         (completer_ftype_void): Rename to ...
8334         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
8335         (set_cmd_completer_handle_brkchars): Adjust.
8336         * completer.c (filename_completer_handle_brkchars): New function.
8337         (complete_line_internal_normal_command): New function, factored
8338         out from ...
8339         (complete_line_internal): ... here.
8340         (command_completer_handle_brkchars)
8341         (default_completer_handle_brkchars)
8342         (completer_handle_brkchars_func_for_completer): New functions.
8343         * completer.h (set_gdb_completion_word_break_characters): Delete
8344         declaration.
8345         (completer_handle_brkchars_func_for_completer): New declaration.
8346         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8347         completer_handle_brkchars_func_for_completer.
8348
8349 2017-07-17  Pedro Alves  <palves@redhat.com>
8350
8351         * completer.c (symbol_completer): New function, based on
8352         make_symbol_completion_list_fn.
8353         * completer.h (symbol_completer): New declaration.
8354         * guile/scm-cmd.c (cmdscm_completers): Adjust.
8355         * python/py-cmd.c (completers): Adjust.
8356         * symtab.c (make_symbol_completion_list_fn): Delete.
8357         * symtab.h (make_symbol_completion_list_fn): Delete.
8358         * cli/cli-decode.c (add_cmd): Adjust.
8359
8360 2017-07-17  Pedro Alves  <palves@redhat.com>
8361
8362         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8363         * dwarf2read.c: Include "filename-seen-cache.h".
8364         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8365         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8366         * filename-seen-cache.c: New file.
8367         * filename-seen-cache.h: New file.
8368         * symtab.c: Include "filename-seen-cache.h".
8369         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8370         (create_filename_seen_cache, clear_filename_seen_cache)
8371         (delete_filename_seen_cache, filename_seen): Delete, parts moved
8372         to filename-seen-cache.h/filename-seen-cache.c.
8373         (output_source_filename, sources_info)
8374         (maybe_add_partial_symtab_filename)
8375         (make_source_files_completion_list): Adjust to use
8376         filename_seen_cache.
8377
8378 2017-07-17  Pedro Alves  <palves@redhat.com>
8379
8380         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8381         fields.
8382         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8383         dwarf2_debug_sections*)): New.
8384         (dwarf2_per_objfile::dwarf2_per_objfile(const
8385         dwarf2_per_objfile&)): Declare as deleted.
8386         (dwarf2_per_objfile::operator=): Declare as deleted.
8387         (dwarf2_per_objfile::dwarf2_per_objfile)
8388         (dwarf2_per_objfile::~dwarf2_per_objfile)
8389         (dwarf2_per_objfile::free_cached_comp_units): New.
8390         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8391         ctor.  Call dwarf2_per_objfile's ctor manually.
8392         (dwarf2_locate_sections): Deleted/refactored as ...
8393         (dwarf2_per_objfile::locate_sections): ... this new method.
8394         (free_cached_comp_units): Defer to
8395         dwarf2_per_objfile::free_cached_comp_units.
8396         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8397
8398 2017-07-14  Tom Tromey  <tom@tromey.com>
8399
8400         PR rust/21764:
8401         * rust-exp.y (convert_ast_to_expression): Add "want_type"
8402         parameter.
8403         <UNOP_SIZEOF>: Split into separate case.
8404         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
8405
8406 2017-07-14  Tom Tromey  <tom@tromey.com>
8407
8408         PR rust/21763:
8409         * symtab.c (symbol_matches_domain): Add language_rust to special
8410         case.
8411         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8412         treat LOC_TYPEDEF symbols as variables.
8413
8414 2017-07-14  Pedro Alves  <palves@redhat.com>
8415
8416         * symtab.c (make_file_symbol_completion_list_1): Iterate over
8417         symtabs matching all symtabs with SRCFILE as file name instead of
8418         only considering the first hit, with lookup_symtab.
8419
8420 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8421
8422         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8423         operator_name parameters.
8424         (gen_expr): Update function call.
8425
8426 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8427
8428         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8429         parameter.
8430         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8431         Likewise.
8432         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8433         parameter, use agent_expr::gdbarch instead, update function
8434         calls.
8435         (locexpr_tracepoint_var_ref): Likewise.
8436         (loclist_tracepoint_var_ref): Likewise.
8437         * ax-gdb.c (gen_trace_static_fields): Likewise.
8438         (gen_traced_pop): Likewise.
8439         (gen_frame_args_address): Likewise.
8440         (gen_frame_locals_address): Likewise.
8441         (gen_var_ref): Likewise.
8442         (gen_struct_ref_recursive): Likewise.
8443         (gen_static_field): Likewise.
8444         (gen_maybe_namespace_elt): Likewise.
8445         (gen_expr): Likewise.
8446         (gen_trace_for_var): Likewise.
8447         (gen_trace_for_expr): Likewise.
8448         (gen_trace_for_return_address): Likewise.
8449
8450 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8451
8452         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8453         parameter.
8454         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8455
8456 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8457
8458         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8459         from ax, update calls.
8460         (gen_usual_arithmetic): Likewise.
8461         (gen_integral_promotions): Likewise.
8462         (gen_bitfield_ref): Likewise.
8463         (gen_primitive_field): Likewise.
8464         (gen_struct_ref_recursive): Likewise.
8465         (gen_struct_ref): Likewise.
8466         (gen_maybe_namespace_elt): Likewise.
8467         (gen_struct_elt_for_reference): Likewise.
8468         (gen_namespace_elt): Likewise.
8469         (gen_aggregate_elt_ref): Likewise.
8470         (gen_expr): Get gdbarch from ax, update calls.
8471         (gen_expr_binop_rest): Likewise.
8472
8473 2017-07-13  Pedro Alves  <palves@redhat.com>
8474
8475         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8476         as default tdesc.
8477         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8478         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8479         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8480         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
8481         tdep.
8482         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8483         Get final tdesc from the tdep.
8484         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8485         default tdesc.
8486         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8487         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8488         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8489         Use it as default tdesc.
8490         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8491         down to amd_init_abi.  No longer handle fallback tdesc here.
8492         * amd64-tdep.h (tdesc_x32): Declare.
8493         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8494         parameter.
8495         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8496         as default tdesc.
8497
8498 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8499
8500         * s390-linux-tdep.c (s390_process_record): Add support for
8501         instructions new in arch12.
8502
8503 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8504
8505         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8506         PT_GETFSBASE and PT_GETGSBASE.
8507         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8508         PT_SETGSBASE.
8509
8510 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8511
8512         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8513         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8514         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8515         those rules.
8516         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8517         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8518         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8519         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8520         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8521         * features/i386/amd64.xml: Add 64bit-segments.xml.
8522         * features/i386/amd64-avx-avx512.c: Regenerated.
8523         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8524         * features/i386/amd64-avx-mpx.c: Regenerated.
8525         * features/i386/amd64-avx.c: Regenerated.
8526         * features/i386/amd64-mpx.c: Regenerated.
8527         * features/i386/amd64.c: Regenerated.
8528         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8529         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8530         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8531         * regformats/i386/amd64-avx.dat: Regenerated.
8532         * regformats/i386/amd64-mpx.dat: Regenerated.
8533         * regformats/i386/amd64.dat: Regenerated.
8534
8535 2017-07-10  Yao Qi  <yao.qi@linaro.org>
8536
8537         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8538         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8539
8540 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
8541
8542         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8543         unsetenv.
8544         * gnulib/aclocal.m4: Regenerate.
8545         * gnulib/config.in: Regenerate.
8546         * gnulib/configure: Regenerate.
8547         * gnulib/import/Makefile.am: Regenerate.
8548         * gnulib/import/Makefile.in: Regenerate.
8549         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8550         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8551         * gnulib/import/m4/environ.m4: New file.
8552         * gnulib/import/m4/setenv.m4: New file.
8553         * gnulib/import/setenv.c: New file.
8554         * gnulib/import/unsetenv.c: New file.
8555
8556 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
8557
8558         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8559         address when op is DW_OP_addr.
8560
8561 2017-07-09  Tom Tromey  <tom@tromey.com>
8562
8563         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8564         check and apply to outer type.
8565
8566 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8567
8568         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8569         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8570         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8571         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8572
8573 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8574
8575         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8576
8577 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8578
8579         * corelow.c (get_core_siginfo): Remove.
8580         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8581         instead of get_core_siginfo.
8582         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8583         * gdbarch.h: Re-generate.
8584         * gdbarch.c: Re-generate.
8585         * linux-tdep.c (linux_core_xfer_siginfo): New.
8586         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8587
8588 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8589
8590         * corelow.c (thread_section_name): Move to ...
8591         * gdbcore.h (thread_section_name): ... here.
8592
8593 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8594
8595         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8596         (struct siginfo32): New.
8597         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8598         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8599         via ptrace(PT_LWPINFO).
8600
8601 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8602
8603         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8604         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8605         (fbsd_get_siginfo_type): New.
8606         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8607         (_initialize_fbsd_tdep): New.
8608
8609 2017-07-06  David Blaikie  <dblaikie@gmail.com>
8610
8611         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8612         a singular dwo_unit*) to support multiple CUs in the same way that
8613         multiple TUs are supported.
8614         (create_cus_hash_table): Replace create_dwo_cu with a function for
8615         parsing multiple CUs from a DWO file.
8616         (open_and_init_dwo_file): Use create_cus_hash_table rather than
8617         create_dwo_cu.
8618         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8619         htab_find, rather than comparing the signature to a singleton CU in
8620         the dwo_file.
8621
8622 2017-07-06  Pedro Alves  <palves@redhat.com>
8623
8624         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8625
8626 2017-07-04  Pedro Alves  <palves@redhat.com>
8627
8628         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8629         * gdbtypes.h (TYPE_STATIC): Delete.
8630         (struct fn_field) <is_public, is_abstract, is_static, is_final,
8631         is_synchronized, is_native>: Delete.
8632         <dummy>: Bump.
8633         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8634         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8635         (TYPE_FN_FIELD_ABSTRACT): Delete.
8636
8637 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
8638
8639         * buffer.h (buffer_finish): Fix spelling mistakes.
8640
8641 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
8642
8643         * .dir-locals.el: Automatically switch to C-style comments in
8644         versions of Emacs that support the feature.
8645
8646 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8647             Pedro Alves  <palves@redhat.com>
8648
8649         PR cli/21688
8650         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
8651         (process_next_line): New variable 'inline_cmd'.
8652         Adjust 'if' clauses for "python", "compile" and "guile" to use
8653         'command_name_equals' and check for '!inline_cmd'.
8654
8655 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8656
8657         PR cli/21688
8658         * cli/cli-script.c (command_name_equals_not_inline): New function.
8659         (process_next_line): Adjust 'if' clauses for "python", "compile"
8660         and "guile" to use command_name_equals_not_inline.
8661
8662 2017-06-29  Pedro Alves  <palves@redhat.com>
8663
8664         * completer.c (expression_completer): Call
8665         linespec_location_completer instead of location_completer.
8666
8667 2017-06-29  Pedro Alves  <palves@redhat.com>
8668
8669         * completer.c (expression_completer): Remove code that recomputes
8670         'text' from 'word'.
8671
8672 2017-06-29  Yao Qi  <yao.qi@linaro.org>
8673
8674         * regformats/regdat.sh: Generate code with
8675         "ifndef IN_PROCESS_AGENT".
8676
8677 2017-06-28  Pedro Alves  <palves@redhat.com>
8678
8679         * command.h: Include "common/scoped_restore.h".
8680
8681 2017-06-28  Yao Qi  <yao.qi@linaro.org>
8682
8683         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
8684         instead of obstack_grow.
8685
8686 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
8687
8688         PR gdb/21337
8689         * symfile.c (reread_symbols): Call objfiles_changed just before
8690         read_symbols.
8691
8692 2017-06-27  Pedro Alves  <palves@redhat.com>
8693
8694         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
8695         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
8696         (completion_list_add_symbol, completion_list_add_msymbol):
8697         ... these new functions.
8698         (add_symtab_completions)
8699         (default_make_symbol_completion_list_break_on_1): Adjust.
8700
8701 2017-06-27  Pedro Alves  <palves@redhat.com>
8702
8703         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
8704         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
8705         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
8706         dtor.
8707         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
8708         'storage_obstack' field an auto_obstack.  In-class initialize all
8709         non-bitfield fields.  Make minsyms_read bool.
8710         * symfile.c (read_symbols): Adjust.
8711
8712 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
8713
8714         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
8715         (gdbsim_store_register): Likewise.
8716
8717 2017-06-27  Pedro Alves  <palves@redhat.com>
8718
8719         * c-exp.y (name_obstack): Now an auto_obstack.
8720         (yylex): Use auto_obstack::clear.
8721         (c_parse): Use auto_obstack::clear instead of reinitializing and
8722         freeing the obstack.
8723         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
8724         * d-exp.y (name_obstack): Now an auto_obstack.
8725         (yylex): Use auto_obstack::clear.
8726         (d_parse): Use auto_obstack::clear instead of reinitializing and
8727         freeing the obstack.
8728         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
8729         auto_obstack.
8730         * dwarf2read.c (create_addrmap_from_index)
8731         (dwarf2_build_psymtabs_hard)
8732         (update_enumeration_type_from_children): Likewise.
8733         * gdb_obstack.h (auto_obstack): New type.
8734         * go-exp.y (name_obstack): Now an auto_obstack.
8735         (build_packaged_name): Use auto_obstack::clear.
8736         (go_parse): Use auto_obstack::clear instead of reinitializing and
8737         freeing the obstack.
8738         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
8739         auto_obstack.
8740         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
8741         * rust-exp.y (work_obstack): Now an auto_obstack.
8742         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
8743         reinitializing and freeing the obstack.
8744         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
8745         (host_char_to_target): Use auto_obstack.
8746         * utils.h (make_cleanup_obstack_free): Delete declaration.
8747         * valprint.c (generic_emit_char, generic_printstr): Use
8748         auto_obstack.
8749
8750 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
8751
8752         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
8753         thread.
8754         (darwin_init_thread_list): Don't update dummy thread.
8755         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
8756
8757 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8758
8759         * record-full.c (netorder16): Remove.
8760
8761 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8762
8763         * common/diagnostics.h: Define macros for GCC.
8764         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
8765         * common/vec.h: Include diagnostics.h.
8766         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
8767         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
8768         warning.
8769
8770 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8771
8772         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
8773         New macro.
8774         * ada-lex.l: Ignore deprecated register warnings.
8775
8776 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8777
8778         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8779         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8780
8781 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8782
8783         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
8784         its own line.
8785
8786 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8787
8788         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
8789
8790 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
8791
8792         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
8793         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
8794         (xtensa_register_read_masked): Likewise.
8795
8796 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
8797
8798         * common/environ.c (gdb_environ::unset): Update comment.
8799
8800 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8801
8802         * python/py-unwind.c (pyuw_sniffer): Allocate space for
8803         registers.
8804
8805 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8806
8807         * record-full.c (record_full_exec_insn): Use byte_vector.
8808
8809 2017-06-22  Yao Qi  <yao.qi@linaro.org>
8810
8811         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
8812         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8813
8814 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8815
8816         * remote.c (cached_reg): Move from here...
8817         * regcache.h (cached_reg): ...to here.
8818         * python/py-unwind.c (struct reg_info): Remove.
8819         (cached_frame_info): Use cached_reg_t.
8820         (pyuw_prev_register): Likewise.
8821         (pyuw_sniffer): Use cached_reg_t and allocate registers.
8822         (pyuw_dealloc_cache): Free all registers.
8823
8824 2017-06-22  Pedro Alves  <palves@redhat.com>
8825             Simon Marchi  <simon.marchi@ericsson.com>
8826
8827         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
8828         warning.
8829         * common/diagnostics.h: New file.
8830
8831 2017-06-22  Pedro Alves  <palves@redhat.com>
8832
8833         * common/agent.h: Add include guards.
8834
8835 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
8836
8837         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
8838         talk about addressable units instead of bytes.
8839
8840 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8841
8842         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
8843         of '::const_iterator'.
8844
8845 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8846
8847         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8848         'unittests/environ-selftests.c'.
8849         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
8850         * charset.c (find_charset_names): Declare object 'iconv_env'.
8851         Update code to use 'iconv_env' object.  Remove call to
8852         'free_environ'.
8853         * common/environ.c: Include <utility>.
8854         (make_environ): Delete function.
8855         (free_environ): Delete function.
8856         (gdb_environ::clear): New function.
8857         (gdb_environ::operator=): New function.
8858         (gdb_environ::get): Likewise.
8859         (environ_vector): Delete function.
8860         (set_in_environ): Delete function.
8861         (gdb_environ::set): New function.
8862         (unset_in_environ): Delete function.
8863         (gdb_environ::unset): New function.
8864         (gdb_environ::envp): Likewise.
8865         * common/environ.h: Include <vector>.
8866         (struct gdb_environ): Delete; transform into...
8867         (class gdb_environ): ... this class.
8868         (free_environ): Delete prototype.
8869         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
8870         environ_vector): Likewise.
8871         * infcmd.c (run_command_1): Update code to call
8872         'envp' from 'gdb_environ' class.
8873         (environment_info): Update code to call methods from 'gdb_environ'
8874         class.
8875         (unset_environment_command): Likewise.
8876         (path_info): Likewise.
8877         (path_command): Likewise.
8878         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
8879         (inferior::inferior): Initialize 'environment' using the host's
8880         information.
8881         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
8882         Include "environ.h".
8883         (class inferior) <environment>: Change type from 'struct
8884         gdb_environ' to 'gdb_environ'.
8885         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
8886         methods from 'gdb_environ' class.
8887         * solib.c (solib_find_1): Likewise
8888         * unittests/environ-selftests.c: New file.
8889
8890 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8891
8892         * features/i386/i386-linux.xml: Exchange the order of including
8893         32bit-linux.xml and 32bit-sse.xml.
8894         * features/i386/i386-linux.c: Regenerated.
8895
8896 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8897
8898         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
8899         Delete copy ctor and assignment operator.
8900         (tdesc_type): Likewise.
8901         (tdesc_feature): Likewise.
8902         (tdesc_free_reg): Remove.
8903         (tdesc_create_reg): Use new.
8904         (tdesc_free_type): Remove.
8905         (tdesc_create_vector): Use new.
8906         (tdesc_create_union): Likewise.
8907         (tdesc_create_flags): Likewise.
8908         (tdesc_create_enum): Likewise.
8909         (tdesc_free_feature): Delete.
8910         (free_target_description): Use delete.
8911
8912 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
8913
8914         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
8915         registers.
8916
8917 2017-06-19  Pedro Alves  <palves@redhat.com>
8918
8919         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
8920         after gdb::unlinker.
8921
8922 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
8923
8924         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
8925         gdb_environ to access an environment variable.
8926
8927 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
8928
8929         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
8930         gdb_byte*.
8931
8932 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8933
8934         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
8935
8936 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8937
8938         * configure: Re-generate.
8939         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
8940
8941 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8942
8943         * configure: Re-generate.
8944         * warning.m4: Pass -Werror to compiler when checking for
8945         supported warning flags.
8946
8947 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8948
8949         * Makefile.in (COMPILE.pre): Add "-x c++".
8950
8951 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
8952             Pedro Alves  <palves@redhat.com>
8953             Yao Qi  <yao.qi@linaro.org>
8954
8955         * defs.h (RequireLongest): New.
8956         (extract_integer): Declare function template.
8957         (extract_signed_integer): Remove the declaration, but define it
8958         static inline.
8959         (extract_unsigned_integer): Likewise.
8960         (store_integer): Declare function template.
8961         (store_signed_integer): Remove the declaration, but define it
8962         static inline.
8963         (store_unsigned_integer): Likewise.
8964         * findvar.c (extract_integer): New function template.
8965         (extract_signed_integer): Remove.
8966         (extract_unsigned_integer): Remove.
8967         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
8968         instantiations.
8969         (store_integer): New function template.
8970         (store_signed_integer): Remove.
8971         (store_unsigned_integer): Remove.
8972         (store_integer): Explicit instantiations.
8973         * regcache.c (regcache_raw_read_signed): Update.
8974         (regcache::raw_read): New function.
8975         (regcache::raw_read_signed): Remove.
8976         (regcache::raw_read_unsigned): Remove.
8977         (regcache_raw_read_unsigned): Update.
8978         (regcache_raw_write_unsigned): Update.
8979         (regcache::raw_write_signed): Remove.
8980         (regcache::raw_write): New function.
8981         (regcache_cooked_read_signed): Update.
8982         (regcache::raw_write_unsigned): Remove.
8983         (regcache::cooked_read_signed): Remove.
8984         (regcache_cooked_read_unsigned): Update.
8985         (regcache::cooked_read_unsigned): Remove.
8986         (regcache_cooked_write_signed): Update.
8987         (regcache_cooked_write_unsigned): Update.
8988         * regcache.h (regcache) <raw_read_signed>: Remove.
8989         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
8990         <raw_read, raw_write>: New.
8991         <cooked_read_signed, cooked_write_signed>: Remove.
8992         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
8993         <cooked_read, cooked_write>: New.
8994         * sh64-tdep.c (sh64_pseudo_register_read): Update.
8995         (sh64_pseudo_register_write): Update.
8996
8997 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
8998
8999         * arc-tdep.c (arc_disassembler_options): New variable.
9000         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9001         of default_print_insn.
9002         (arc_delayed_print_insn): Set info->section when needed,
9003         use default_print_insn to retrieve a disassembler.
9004
9005 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
9006
9007         PR gdb/21574
9008         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9009         to mention $SHELL and startup-with-shell.
9010
9011 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
9012
9013         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9014
9015 2017-06-14  Yao Qi  <yao.qi@linaro.org>
9016
9017         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9018         default_print_insn instead of print_insn_aarch64.
9019         * arm-tdep.c (gdb_print_insn_arm): Call
9020         default_print_insn instead of print_insn_big_arm
9021         and print_insn_little_arm.
9022         * i386-tdep.c (i386_print_insn): Call default_print_insn
9023         instead of print_insn_i386.
9024         * ia64-tdep.c (ia64_print_insn): Call
9025         default_print_insn instead of print_insn_ia64.
9026         * mips-tdep.c (gdb_print_insn_mips): Call
9027         default_print_insn instead of print_insn_big_mips
9028         and print_insn_little_mips.
9029         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9030         instead of print_insn_spu.
9031
9032 2017-06-14  Pedro Alves  <palves@redhat.com>
9033
9034         * ada-lang.c: Include "common/byte-vector.h".
9035         (ada_value_primitive_packed_val): Use gdb::byte_vector.
9036         * charset.c (wchar_iterator::iterate): Resize the vector instead
9037         of reserving it.
9038         * common/byte-vector.h: Include "common/def-vector.h".
9039         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9040         * cli/cli-dump.c: Include "common/byte-vector.h".
9041         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9042         * common/byte-vector.h: New file.
9043         * common/def-vector.h: New file.
9044         * common/default-init-alloc.h: New file.
9045         * dwarf2loc.c: Include "common/byte-vector.h".
9046         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9047         instead of reserving it.
9048         * dwarf2read.c: Include "common/byte-vector.h".
9049         (data_buf::m_vec): Now a gdb::byte_vector.
9050         * gdb_regex.c: Include "common/def-vector.h".
9051         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9052         * mi/mi-main.c: Include "common/byte-vector.h".
9053         (mi_cmd_data_read_memory): Use gdb::byte_vector.
9054         * printcmd.c: Include "common/byte-vector.h".
9055         (print_scalar_formatted): Use gdb::byte_vector.
9056         * valprint.c: Include "common/byte-vector.h".
9057         (maybe_negate_by_bytes, print_decimal_chars): Use
9058         gdb::byte_vector.
9059
9060 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9061
9062         * darwin-nat.c: Include "nat/fork-inferior.h".
9063
9064 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9065
9066         * configure.nat: Factor out Darwin bits that are not
9067         architecture-specific.  Add fork-inferior.o.
9068
9069 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9070
9071         * configure.nat: Factor out AIX bits that are not
9072         architecture-specific.  Add fork-inferior.o.
9073
9074 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9075
9076         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
9077         (read_pieced_value, write_pieced_value): ...here.  Reduce to
9078         wrappers that just call rw_pieced_value.
9079
9080 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9081
9082         * dwarf2loc.c (write_pieced_value): When writing the data for a
9083         memory piece, use write_memory_with_notification instead of
9084         write_memory.
9085
9086 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9087
9088         * valops.c (read_value_memory): Change embedded_offset to
9089         represent a bit offset instead of a byte offset.
9090         * value.h (read_value_memory): Adjust comment.
9091
9092 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9093
9094         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9095         dest_offset_bits and source_offset_bits.
9096         (write_pieced_value): Likewise.
9097
9098 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9099
9100         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9101         given by DW_OP_bit_piece.
9102         (write_pieced_value): Likewise.
9103
9104 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9105
9106         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9107         some other preparations to the places where sufficient information
9108         is available.
9109         (write_pieced_value): Likewise.
9110
9111 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9112
9113         * dwarf2loc.c (bits_to_bytes): New function.
9114         (read_pieced_value): Fix offset calculations for register pieces
9115         on big-endian targets.
9116         (write_pieced_value): Likewise.
9117
9118 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9119
9120         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9121         (write_pieced_value): Likewise.
9122
9123 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9124
9125         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9126         transfer the source value's least significant bits, instead of its
9127         lowest-addressed ones.  Rename type_len to max_offset.
9128         (read_pieced_value): Mirror above changes to write_pieced_value as
9129         applicable.
9130
9131 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9132
9133         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9134         truncate full bytes from dest_offset_bits before using it as an
9135         offset into the buffer.
9136
9137 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9138
9139         * dwarf2loc.c (write_pieced_value): Include transfer size in
9140         byte-wise check.
9141
9142 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9143
9144         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9145         calculation of this_size.
9146
9147 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9148
9149         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9150         when targeting a bit-field.
9151         (write_pieced_value): Likewise.
9152
9153 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9154
9155         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9156         (allocate_piece_closure): Drop addr_size parameter.
9157         (dwarf2_evaluate_loc_desc_full): Adjust call to
9158         allocate_piece_closure.
9159
9160 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9161
9162         PR gdb/21226
9163         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9164         the LSB end, independent of endianness.
9165
9166 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9167
9168         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9169         size capping.
9170
9171 2017-06-13  Yao Qi  <yao.qi@linaro.org>
9172
9173         * mips-linux-nat.c: Move include features/mips*-linux.c to
9174         mips-linux-tdep.c.
9175         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9176         to mips-linux-tdep.c.
9177         * mips-linux-tdep.c: Include features/mips*-linux.c
9178         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9179         functions.
9180         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9181         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9182         (tdesc_mips64_dsp_linux): Declare.
9183
9184 2017-06-12  Tom Tromey  <tom@tromey.com>
9185
9186         * valprint.h (val_print_type_code_int): Remove.
9187         * valprint.c (generic_val_print_int): Always call
9188         val_print_scalar_formatted.
9189         (val_print_type_code_int): Remove.
9190         * printcmd.c (print_scalar_formatted): Handle options->format==0.
9191         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9192         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9193         * ada-valprint.c (ada_val_print_num): Use
9194         val_print_scalar_formatted.
9195
9196 2017-06-12  Tom Tromey  <tom@tromey.com>
9197
9198         * printcmd.c (print_scalar_formatted): Unify the two switches.
9199         Don't convert scalars to LONGEST.
9200
9201 2017-06-12  Tom Tromey  <tom@tromey.com>
9202
9203         PR exp/16225:
9204         * valprint.h (print_decimal_chars): Update.
9205         * valprint.c (maybe_negate_by_bytes): New function.
9206         (print_decimal_chars): Add "is_signed" argument.
9207         * printcmd.c (print_scalar_formatted): Update.
9208
9209 2017-06-12  Tom Tromey  <tom@tromey.com>
9210
9211         PR exp/16225:
9212         * valprint.h (print_binary_chars, print_hex_chars): Update.
9213         * valprint.c (val_print_type_code_int): Update.
9214         (print_binary_chars): Add "zero_pad" argument.
9215         (emit_octal_digit): New function.
9216         (print_octal_chars): Don't zero-pad.
9217         (print_decimal_chars): Likewise.
9218         (print_hex_chars): Add "zero_pad" argument.
9219         * sh64-tdep.c (sh64_do_fp_register): Update.
9220         * regcache.c (regcache::dump): Update.
9221         * printcmd.c (print_scalar_formatted): Update.
9222         * infcmd.c (default_print_one_register_info): Update.
9223
9224 2017-06-12  Pedro Alves  <palves@redhat.com>
9225             Alan Hayward  <alan.hayward@arm.com>
9226
9227         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9228         (mips_eabi_push_dummy_call): Rename local 'regsize' to
9229         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
9230         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9231         Assert that abi_regsize bytes fit in 'ref_valbuf'.
9232
9233 2017-06-12  Pedro Alves  <palves@redhat.com>
9234
9235         * dwarf2read.c (mapped_symtab::data): Now a vector of
9236         symtab_index_entry instead of vector of
9237         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
9238         whether an element's name is NULL instead of checking whether the
9239         element itself is NULL.
9240         (find_slot): Change return type.  Adjust.
9241         (hash_expand, , add_index_entry, uniquify_cu_indices)
9242         (write_hash_table): Adjust.
9243
9244 2017-06-12  Pedro Alves  <palves@redhat.com>
9245
9246         * dwarf2read.c (recursively_count_psymbols): New function.
9247         (write_psymtabs_to_index): Call it to compute number of psyms and
9248         pass estimate size of psyms_seen to unordered_set's ctor.
9249
9250 2017-06-12  Pedro Alves  <palves@redhat.com>
9251
9252         * dwarf2read.c (write_hash_table): Check if key already exists
9253         before emplacing.
9254
9255 2017-06-12  Pedro Alves  <palves@redhat.com>
9256
9257         * dwarf2read.c (data_buf::append_space): Rename to...
9258         (data_buf::grow): ... this, and make private.  Adjust all callers.
9259         (data_buf::append_uint): New method.
9260         (add_address_entry, write_one_signatured_type)
9261         (write_psymtabs_to_index): Use it.
9262
9263 2017-06-12  Pedro Alves  <palves@redhat.com>
9264
9265         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9266         (file_write (FILE *, const std::vector<Elem>&)): Delete.
9267         (data_buf::file_write): Call ::fwrite directly.
9268
9269 2017-06-12  Pedro Alves  <palves@redhat.com>
9270
9271         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9272         std::vector::erase.
9273
9274 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9275
9276         Code cleanup: C++ify .gdb_index producer.
9277         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9278         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9279         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9280         (create_strtab, add_string): Remove.
9281         (file_write, data_buf): New.
9282         (struct symtab_index_entry): Use std::vector for cu_indices.
9283         (struct mapped_symtab): Use std::vector for data.
9284         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9285         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9286         Remove.
9287         (find_slot): Change return type.  Update it to the new data structures.
9288         (hash_expand, add_index_entry): Update it to the new data structures.
9289         (offset_type_compare): Remove.
9290         (uniquify_cu_indices): Update it to the new data structures.
9291         (c_str_view, c_str_view_hasher, vector_hasher): New.
9292         (add_indices_to_cpool): Remove.
9293         (write_hash_table): Update it to the new data structures.
9294         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9295         (eq_psymtab_cu_index): Remove.
9296         (psym_index_map): New typedef.
9297         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9298         reference and std::unordered_map for cu_index_htab.
9299         (add_address_entry, add_address_entry_worker, write_address_map)
9300         (write_psymbols): Update it to the new data structures.
9301         (write_obstack): Remove.
9302         (struct signatured_type_index_data): Change types_list to a data_buf
9303         reference and psyms_seen to a std::unordered_set reference.
9304         (write_one_signatured_type, recursively_write_psymbols)
9305         (write_psymtabs_to_index): Update it to the new data structures.
9306
9307 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
9308
9309         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9310         separate-debug-file commands.
9311         * symfile.h (separate_debug_file_debug): New global.
9312         * symfile.c (separate_debug_file_debug): New global.
9313         (separate_debug_file_exists, find_separate_debug_file): Add
9314         debug output.
9315         (_initialize_symfile): Add "set debug separate-debug-file"
9316         command.
9317         * build-id.c (build_id_to_debug_bfd,
9318         find_separate_debug_file_by_buildid): Add debug output.
9319
9320 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
9321
9322         * gdbarch.sh (displaced_step_free_closure): Remove.
9323         * gdbarch.h, gdbarch.c: Re-generate.
9324         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9325         displaced_step_free_closure.
9326         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9327         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9328         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9329         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9330         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9331         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9332         * arch-utils.h (simple_displaced_step_free_closure): Remove.
9333         * arch-utils.c (simple_displaced_step_free_closure): Remove.
9334         * infrun.c (displaced_step_clear): Call xfree instead of
9335         gdbarch_displaced_step_free_closure.
9336
9337 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
9338
9339         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9340         NULL".
9341
9342 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
9343
9344         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9345         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9346         (mn10300_push_dummy_call): Likewise.
9347
9348 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9349
9350         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9351
9352 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9353
9354         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9355
9356 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9357
9358         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9359         able to start inferiors using a shell.
9360         (New remote packets): Announce new packet "QStartupWithShell".
9361         * remote.c: Add PACKET_QStartupWithShell.
9362         (extended_remote_create_inferior): Handle new
9363         PACKET_QStartupWithShell.
9364         (remote_protocol_features) <QStartupWithShell>: New entry for
9365         PACKET_QStartupWithShell.
9366         (_initialize_remote): Call "add_packet_config_cmd" for
9367         QStartupShell.
9368
9369 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9370             Pedro Alves  <palves@redhat.com>
9371
9372         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9373         and "nat/fork-inferior.h".
9374         * common/common-inferior.h: New file, with contents from
9375         "gdb/inferior.h".
9376         * commom/common-utils.c: Include "common-utils.h".
9377         (stringify_argv): New function.
9378         * common/common-utils.h (stringify_argv): New prototype.
9379         * configure.nat: Add "fork-inferior.o" as a dependency for
9380         "*linux*", "fbsd*" and "nbsd*" hosts.
9381         * corefile.c (get_exec_file): Update comment.
9382         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9383         instead of "startup_inferior".
9384         (darwin_create_inferior): Call "add_thread_silent" after
9385         "fork_inferior".
9386         * fork-child.c: Cleanup unnecessary includes.
9387         (SHELL_FILE): Move to "common/common-fork-child.c".
9388         (environ): Likewise.
9389         (exec_wrapper): Initialize.
9390         (get_exec_wrapper): New function.
9391         (breakup_args): Move to "common/common-fork-child.c"; rename to
9392         "breakup_args_for_exec".
9393         (escape_bang_in_quoted_argument): Move to
9394         "common/common-fork-child.c".
9395         (saved_ui): New variable.
9396         (prefork_hook): New function.
9397         (postfork_hook): Likewise.
9398         (postfork_child_hook): Likewise.
9399         (gdb_startup_inferior): Likewise.
9400         (fork_inferior): Move to "common/common-fork-child.c".  Update
9401         function to support gdbserver.
9402         (startup_inferior): Likewise.
9403         * gdbcore.h (get_exec_file): Remove declaration.
9404         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9405         instead of "startup_inferior".  Call "add_thread_silent" after
9406         "fork_inferior".
9407         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9408         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9409         instead of "startup_inferior".  Call "add_thread_silent" after
9410         "fork_inferior".
9411         * inferior.h: Include "common-inferior.h".
9412         (trace_start_error): Move to "common/common-utils.h".
9413         (trace_start_error_with_name): Likewise.
9414         (fork_inferior): Move prototype to "nat/fork-inferior.h".
9415         (startup_inferior): Likewise.
9416         (gdb_startup_inferior): New prototype.
9417         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9418         * nat/fork-inferior.h: New file.
9419         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9420         instead of "startup_inferior".  Call "add_thread_silent" after
9421         "fork_inferior".
9422         * target.h (target_terminal_init): Move prototype to
9423         "target/target.h".
9424         (target_terminal_inferior): Likewise.
9425         (target_terminal_ours): Likewise.
9426         * target/target.h (target_terminal_init): New prototype, moved
9427         from "target.h".
9428         (target_terminal_inferior): Likewise.
9429         (target_terminal_ours): Likewise.
9430         * utils.c (gdb_flush_out_err): New function.
9431
9432 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9433
9434         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9435         * common/common-gdbthread.h: New file, with parts from
9436         "gdb/gdbthread.h".
9437         * gdbthread.h: Include "common-gdbthread.h".
9438         (switch_to_thread): Moved to "common/common-gdbthread.h".
9439
9440 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9441
9442         * Makefile.in (SFILES): Add "common/job-control.c".
9443         (HFILES_NO_SRCDIR): Add "common/job-control.h".
9444         (COMMON_OBS): Add "job-control.o".
9445         * common/job-control.c: New file, with contents from
9446         "gdb/inflow.c".
9447         * common/job-control.h: New file, with contents from "terminal.h".
9448         * fork-child.c: Include "job-control.h".
9449         * inflow.c: Include "job-control.h".
9450         (gdb_setpgid): Move to "common/common-inflow.c".
9451         (_initialize_inflow): Move setting of "job_control" to
9452         "handle_job_control".
9453         * terminal.h (job_control): Moved to "common/common-terminal.h".
9454         (gdb_setpgid): Likewise.
9455         * top.c: Include "job_control.h".
9456         * utils.c: Likewise.
9457         (job_control): Moved to "job-control.c".
9458
9459 2017-06-07  Pedro Alves  <palves@redhat.com>
9460
9461         * Makefile.in (SFILES): Add gdb_regex.c.
9462         (COMMON_OBS): Add gdb_regex.o.
9463         * ada-lang.c (ada_add_standard_exceptions)
9464         (ada_add_exceptions_from_frame, name_matches_regex)
9465         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9466         parameter type to compiled_regex.  Adjust.
9467         (ada_exceptions_list): Use compiled_regex.
9468         * break-catch-throw.c (exception_catchpoint::pattern): Now a
9469         std::unique_ptr<compiled_regex>.
9470         (exception_catchpoint::~exception_catchpoint): Remove regfree
9471         call.
9472         (check_status_exception_catchpoint): Adjust to use compiled_regex.
9473         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9474         * breakpoint.c (solib_catchpoint::compiled): Now a
9475         std::unique_ptr<compiled_regex>.
9476         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9477         (check_status_catch_solib): Adjust to use compiled_regex.
9478         (add_solib_catchpoint): Adjust to use compiled_regex.
9479         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9480         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9481         compiled_regex reference.  Adjust to use it.
9482         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9483         declaration.  Include "gdb_regex.h".
9484         (apropos_cmd): Change regex parameter to compiled_regex reference.
9485         * gdb_regex.c: New file.
9486         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9487         declarations.
9488         (class compiled_regex): New.
9489         * linux-tdep.c: Include "common/gdb_optional.h".
9490         (struct mapping_regexes): New, factored out from
9491         mapping_is_anonymous_p, and adjusted to use compiled_regex.
9492         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9493         gdb::optional and remove cleanups.  Adjust to compiled_regex.
9494         * probe.c: Include "common/gdb_optional.h".
9495         (collect_probes): Use compiled_regex and gdb::optional and remove
9496         cleanups.
9497         * skip.c: Include "common/gdb_optional.h".
9498         (skiplist_entry::compiled_function_regexp): Now a
9499         gdb::optional<compiled_regex>.
9500         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9501         (free_skiplist_entry): Remove regfree call.
9502         (compile_skip_regexp, skip_rfunction_p): Adjust to use
9503         compiled_regex and gdb::optional.
9504         * symtab.c: Include "common/gdb_optional.h".
9505         (search_symbols): Use compiled_regex and gdb::optional.
9506         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9507         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
9508         to gdb_regex.c.
9509
9510 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9511
9512         * regcache.c (regcache::save): Avoid buffer use.
9513         (regcache::dump): Likewise.
9514
9515 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9516
9517         * sh-tdep.c (sh_pseudo_register_read): Remove
9518         MAX_REGISTER_SIZE.
9519         (sh_pseudo_register_write): Likewise.
9520         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9521         (sh64_pseudo_register_write): Likewise
9522
9523 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9524
9525         * aarch64-tdep.c (aarch64_store_return_value): Use
9526         V_REGISTER_SIZE.
9527         (aarch64_pseudo_read_value): Likewise.
9528         (aarch64_pseudo_write): Likewise.
9529
9530 2017-06-06  Yao Qi  <yao.qi@linaro.org>
9531
9532         * regformats/regdef.h (set_register_cache): Remove the
9533         declaration.
9534
9535 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
9536
9537         * frame.c (frame_unwind_register_signed): Use
9538         frame_unwind_register_value.
9539
9540 2017-06-06  Pedro Alves  <palves@redhat.com>
9541
9542         PR breakpoints/21553
9543         * breakpoint.c (create_breakpoints_sal_default)
9544         (init_breakpoint_sal, create_breakpoint_sal): Use
9545         gdb::unique_xmalloc_ptr for string parameters.
9546         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9547         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
9548         (base_breakpoint_create_breakpoints_sal)
9549         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9550         (strace_marker_create_breakpoints_sal)
9551         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9552         string parameters.
9553         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9554         gdb::unique_xmalloc_ptr for string parameters.
9555         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9556         parameters.
9557
9558 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9559
9560         * alpha-tdep.c (alpha_register_to_value): Use
9561         get_frame_register_value.
9562         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9563
9564 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9565
9566         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9567         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9568         (ia64_value_to_register): Likewise.
9569         (ia64_extract_return_value): Likewise.
9570         (ia64_store_return_value): Likewise.
9571         (ia64_push_dummy_call): Likewise.
9572
9573 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
9574
9575         GDB 8.0 released.
9576
9577 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
9578
9579         * x86-linux-nat.c (struct arch_lwp_info): Remove.
9580
9581 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
9582
9583         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9584         parameter.
9585         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9586
9587 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
9588
9589         * event-loop.c (poll_timers): Unallocate timer using delete
9590         instead of xfree.
9591
9592 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9593
9594         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9595         (struct breakpoint) <~breakpoint>: New.
9596         (struct watchpoint): Inherit from breakpoint.
9597         <~watchpoint>: New.
9598         <base>: Remove.
9599         (struct tracepoint): Inherit from breakpoint.
9600         <base>: Remove.
9601         * breakpoint.c (longjmp_breakpoint_ops): Remove.
9602         (struct longjmp_breakpoint): Inherit from breakpoint.
9603         <~longjmp_breakpoint>: New.
9604         <base>: Remove.
9605         (new_breakpoint_from_type): Remove casts.
9606         (watchpoint_in_thread_scope): Remove reference to base field.
9607         (watchpoint_del_at_next_stop): Likewise.
9608         (update_watchpoint): Likewise.
9609         (watchpoint_check): Likewise.
9610         (bpstat_check_watchpoint): Likewise.
9611         (set_longjmp_breakpoint): Likewise.
9612         (struct fork_catchpoint): Inherit from breakpoint.
9613         <base>: Remove.
9614         (struct solib_catchpoint): Inherit from breakpoint.
9615         <~solib_catchpoint>: New.
9616         <base>: Remove.
9617         (dtor_catch_solib): Change to ...
9618         (solib_catchpoint::~solib_catchpoint): ... this.
9619         (breakpoint_hit_catch_solib): Remove reference to base field.
9620         (add_solib_catchpoint): Likewise.
9621         (create_fork_vfork_event_catchpoint): Likewise.
9622         (struct exec_catchpoint): Inherit from breakpoint.
9623         <~exec_catchpoint>: New.
9624         <base>: Remove.
9625         (dtor_catch_exec): Change to ...
9626         (exec_catchpoint::~exec_catchpoint): ... this.
9627         (dtor_watchpoint): Change to ...
9628         (watchpoint::~watchpoint): ... this.
9629         (watch_command_1): Remove reference to base field.
9630         (catch_exec_command_1): Likewise.
9631         (base_breakpoint_dtor): Change to ...
9632         (breakpoint::~breakpoint): ... this.
9633         (base_breakpoint_ops): Remove dtor field value.
9634         (longjmp_bkpt_dtor): Change to ...
9635         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9636         (strace_marker_create_breakpoints_sal): Remove reference to base
9637         field.
9638         (delete_breakpoint): Don't manually call breakpoint destructor.
9639         (create_tracepoint_from_upload): Remove reference to base field.
9640         (trace_pass_set_count): Likewise.
9641         (initialize_breakpoint_ops): Don't initialize
9642         momentary_breakpoint_ops, don't set dtors.
9643         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9644         <~ada_catchpoint>: New.
9645         <base>: Remove.
9646         (create_excep_cond_exprs): Remove reference to base field.
9647         (dtor_exception): Change to ...
9648         (ada_catchpoint::~ada_catchpoint): ... this.
9649         (dtor_catch_exception): Remove.
9650         (dtor_catch_exception_unhandled): Remove.
9651         (dtor_catch_assert): Remove.
9652         (create_ada_exception_catchpoint): Remove reference to base
9653         field.
9654         (initialize_ada_catchpoint_ops): Don't set dtors.
9655         * break-catch-sig.c (struct signal_catchpoint): Inherit from
9656         breakpoint.
9657         <~signal_catchpoint>: New.
9658         <base>: Remove.
9659         (signal_catchpoint_dtor): Change to ...
9660         (signal_catchpoint::~signal_catchpoint): ... this.
9661         (create_signal_catchpoint): Remove reference to base field.
9662         (initialize_signal_catchpoint_ops): Don't set dtor.
9663         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
9664         from breakpoint.
9665         <~syscall_catchpoint>: New.
9666         <base>: Remove.
9667         (dtor_catch_syscall): Change to ...
9668         (syscall_catchpoint::~syscall_catchpoint): ... this.
9669         (create_syscall_event_catchpoint): Remove reference to base
9670         field.
9671         (initialize_syscall_catchpoint_ops): Don't set dtor.
9672         * break-catch-throw.c (struct exception_catchpoint): Inherit
9673         from breakpoint.
9674         <~exception_catchpoint>: New.
9675         <base>: Remove.
9676         (dtor_exception_catchpoint): Change to ...
9677         (exception_catchpoint::~exception_catchpoint): ... this.
9678         (handle_gnu_v3_exceptions): Remove reference to base field.
9679         (initialize_throw_catchpoint_ops): Don't set dtor.
9680         * ctf.c (ctf_get_traceframe_address): Remove reference to base
9681         field.
9682         * remote.c (remote_get_tracepoint_status): Likewise.
9683         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
9684         * tracefile.c (tracefile_fetch_registers): Likewise.
9685         * tracepoint.c (actions_command): Likewise.
9686         (validate_actionline): Likewise.
9687         (tfind_1): Likewise.
9688         (get_traceframe_location): Likewise.
9689         (find_matching_tracepoint_location): Likewise.
9690         (parse_tracepoint_status): Likewise.
9691         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
9692
9693 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9694
9695         * breakpoint.c (struct longjmp_breakpoint): New struct.
9696         (is_tracepoint_type): Change return type to bool.
9697         (is_longjmp_type): New function.
9698         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
9699         (set_raw_breakpoint_without_location): Use
9700         new_breakpoint_from_type.
9701         (set_raw_breakpoint): Likewise.
9702
9703 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9704
9705         * breakpoint.c (new_breakpoint_from_type): New function.
9706         (create_breakpoint_sal): Use new_breakpoint_from_type and
9707         unique_ptr.
9708         (create_breakpoint): Likewise.
9709
9710 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
9711
9712         * memattr.c (mem_info_command): Rename to ...
9713         (info_mem_command): ... this.
9714         (mem_enable_command): Rename to ...
9715         (enable_mem_command): ... this.
9716         (mem_disable_command): Rename to ...
9717         (disable_mem_command): ... this.
9718         (mem_delete_command): Rename to ...
9719         (delete_mem_command): ... this.
9720         (_initialize_mem): Adjust function names.
9721
9722 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9723
9724         * btrace.c (handle_pt_insn_events): New.
9725         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
9726         STATUS.  Split into this and ...
9727         (handle_pt_insn_event_flags): ... this.
9728
9729 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9730
9731         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
9732         and struct pt_insn.resynced.
9733         * configure: Regenerated.
9734         * config.in: Regenerated.
9735
9736 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9737
9738         * btrace.c (ftrace_find_call_by_number): New function.
9739         (ftrace_new_function): Store objects, not pointers.
9740         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
9741         ftrace_new_gap, ftrace_update_function,
9742         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
9743         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
9744         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
9745         btrace_ends_with_single_insn, btrace_call_get): Account for
9746         btrace_thread_info::functions now storing objects.
9747         * btrace.h (struct btrace_thread_info): Add constructor.
9748         (struct btrace_thread_info) <functions>: Make std::vector.
9749         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
9750         Initialize with default values.
9751         * record-btrace.c (record_btrace_frame_sniffer): Account for
9752         btrace_thread_info::functions now storing objects.
9753
9754 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9755
9756         * btrace.c: Remove typedef bfun_s.
9757         (ftrace_new_gap): Directly add gaps to the list of gaps.
9758         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
9759         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
9760         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
9761         instead of gdb VEC.
9762
9763 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9764
9765         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
9766         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
9767         with btrace_thread_info::next_segment and
9768         btrace_thread_info::prev_segment.
9769         * btrace.h: Remove struct btrace_func_link.
9770         (struct btrace_function): Replace pair of function segment pointers
9771         with pair of indices.
9772         * python/py-record-btrace.c (btpy_call_prev_sibling,
9773         btpy_call_next_sibling): Replace references to
9774         btrace_thread_info::segment with btrace_thread_info::next_segment and
9775         btrace_thread_info::prev_segment.
9776         * record-btrace.c (record_btrace_frame_this_id): Use
9777         btrace_find_call_by_number.
9778
9779 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9780
9781         * btrace.c (ftrace_new_function, ftrace_fixup_level,
9782         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9783         btrace_insn_next, btrace_insn_prev): Remove references to
9784         btrace_thread_info::flow.
9785         * btrace.h (struct btrace_function): Remove FLOW.
9786
9787 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9788
9789         * btrace.c (ftrace_find_call_by_number): New function.
9790         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
9791         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
9792         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
9793         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
9794         index.
9795         * btrace.h (struct btrace_function): Turn UP into an index.
9796         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
9797         as an index.
9798         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
9799         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
9800         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
9801
9802 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9803
9804         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9805         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9806         ftrace_update_function, ftrace_compute_global_level_offset,
9807         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
9808         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
9809         btrace_insn_end, btrace_is_empty): Remove references to
9810         btrace_thread_info::begin and btrace_thread_info::end.
9811         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
9812         (struct btrace_thread_info) <functions>: Adjust comment.
9813         * record-btrace.c (record_btrace_start_replaying): Remove reference to
9814         btrace_thread_info::begin.
9815
9816 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9817
9818         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9819         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9820         ftrace_update_function): Remove arguments that implicitly were always
9821         BTINFO->END.
9822         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
9823         Don't pass BTINFO->END.
9824
9825 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9826
9827         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
9828         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
9829         btrace_find_insn_by_number): Replace function segment pointer with
9830         index.
9831         (btrace_insn_cmp): Simplify.
9832         * btrace.h: (struct btrace_insn_iterator) Rename index to
9833         insn_index.  Replace function segment pointer with index into function
9834         segment vector.
9835         * record-btrace.c (record_btrace_call_history): Replace function
9836         segment pointer use with index.
9837         (record_btrace_frame_sniffer): Retrieve function call segment through
9838         vector.
9839         (record_btrace_set_replay): Remove defunc't safety check.
9840
9841 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9842
9843         * btrace.c (btrace_ends_with_single_insn): New function.
9844         (btrace_call_get, btrace_call_number, btrace_call_begin,
9845         btrace_call_end, btrace_call_next, btrace_call_prev,
9846         btrace_find_call_by_number): Use index into call segment vector
9847         instead of pointer.
9848         (btrace_call_cmp): Simplify.
9849         * btrace.h (struct btrace_call_iterator): Replace function call segment
9850         pointer with index into vector.
9851         * record-btrace.c (record_btrace_call_history): Use index instead of
9852         pointer.
9853
9854 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9855
9856         * btrace.c (btrace_insn_begin, btrace_insn_end,
9857         btrace_find_insn_by_number): Add btinfo to iterator.
9858         * btrace.h (struct btrace_insn_iterator): Add btinfo.
9859
9860 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9861
9862         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
9863         and save pointers directly.
9864         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
9865         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
9866         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
9867         changed signature of functions.
9868         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
9869         (btrace_fetch): Remove code that adds btrace_function pointers to
9870         vector of btrace_functions.
9871         (btrace_clear): Simplify freeing vector of btrace_functions.
9872
9873 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9874
9875         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
9876         Replace VEC_* with std::vector functions.
9877         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
9878         (struct btrace_thread_info)<functions>: Change type to std::vector.
9879
9880 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9881
9882         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
9883         "Removed targets and native configurations" up.  Merge duplicate
9884         "New commands" sub-sections.  Add "New options" sub-sections.
9885
9886 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
9887
9888         * defs.h (copy_integer_to_size): New declaration.
9889         * findvar.c (copy_integer_to_size): New function.
9890         (do_cint_test): New selftest function.
9891         (copy_integer_to_size_test): Likewise.
9892         (_initialize_findvar): Likewise.
9893         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
9894         (mips_fbsd_collect_reg): Use raw_collect_integer.
9895         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
9896         (mips64_fill_gregset): Use raw_collect_integer
9897         (mips64_fill_fpregset): Use raw_supply_integer.
9898         * regcache.c (regcache::raw_supply_integer): New function.
9899         (regcache::raw_collect_integer): Likewise.
9900         * regcache.h: (regcache::raw_supply_integer): New declaration.
9901         (regcache::raw_collect_integer): Likewise.
9902
9903 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9904
9905         * Makefile.in (SFILES): Add gdbarch-selftests.c.
9906         (COMMON_OBS): Add gdbarch-selftests.o.
9907         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
9908         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
9909         * gdbarch-selftests.c: New file.
9910         * regcache.h (regcache) <~regcache>: Mark it virtual if
9911         GDB_SELF_TEST.
9912         <raw_write>: Likewise.
9913
9914 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9915
9916         * regcache.c (current_regcache): Change it to
9917         regcache::current_regcache.
9918         (regcache_observer_target_changed): Update.
9919         (regcache_thread_ptid_changed): Make it a regcache static
9920         method.
9921         (regcache_thread_ptid_changed): Update.
9922         (class regcache_access): New.
9923         (current_regcache_test): Update.
9924         (_initialize_regcache): Update.
9925         * regcache.h: Include forward_list.
9926         (regcache): Declare regcache_thread_ptid_changed and declare
9927         registers_changed_ptid as friend.
9928
9929 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9930
9931         * i387-tdep.c (i387_register_to_value): Use register_size
9932         instead of TYPE_LENGTH.
9933         * m68k-tdep.c (m68k_register_to_value): Likewise.
9934
9935 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9936
9937         * i387-tdep.c (i387_convert_register_p): Return false if type
9938         code isn't TYPE_CODE_FLT.
9939
9940 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9941
9942         * alpha-tdep.c (alpha_convert_register_p): Return true if type
9943         length is 4.
9944         (alpha_register_to_value): Remove type length check.
9945         (alpha_value_to_register): Likewise.
9946
9947 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9948
9949         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
9950         TYPE_CODE_FLT.
9951
9952 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9953
9954         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
9955         TYPE_CODE_FLT or not.
9956
9957 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9958
9959         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
9960         * avr-tdep.c (avr_gdbarch_init): Likewise.
9961         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9962         * cris-tdep.c (cris_gdbarch_init): Likewise.
9963         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9964         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9965         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9966         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
9967         * mep-tdep.c (mep_gdbarch_init): Likewise.
9968         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9969         * mips-tdep.c (mips_gdbarch_init): Likewise.
9970         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9971         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9972         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9973         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9974         * v850-tdep.c (v850_gdbarch_init): Likewise.
9975
9976 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9977
9978         * selftest-arch.c (tests_with_arch): Call registers_changed
9979         and reinit_frame_cache.
9980         * selftest.c (run_self_tests): Likewise.
9981
9982 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9983
9984         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
9985         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
9986
9987 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9988
9989         * rl78-tdep.c (rl78_gdbarch_init): Don't call
9990         set_gdbarch_print_insn.
9991
9992 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9993
9994         * h8300-tdep.c (h8300_gdbarch_init): Don't call
9995         set_gdbarch_print_insn.
9996
9997 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9998
9999         * alpha-tdep.c (alpha_gdbarch_init): Don't call
10000         set_gdbarch_print_insn.
10001         * arc-tdep.c (arc_gdbarch_init): Likewise.
10002         * arch-utils.c: include dis-asm.h.
10003         (default_print_insn): New function.
10004         * arch-utils.h (default_print_insn): Declare.
10005         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10006         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10007         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10008         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10009         * frv-tdep.c (frv_gdbarch_init): Likewise.
10010         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10011         * gdbarch.sh (print_insn): Use default_print_insn.
10012         * gdbarch.c: Regenerated.
10013         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10014         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10015         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10016         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10017         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10018         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10019         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10020         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10021         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10022         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10023         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10024         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10025         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10026         * mt-tdep.c (mt_gdbarch_init): Likewise.
10027         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10028         * nios2-tdep.c (nios2_print_insn): Remove.
10029         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10030         * rx-tdep.c (rx_gdbarch_init): Likewise.
10031         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10032         * score-tdep.c (score_print_insn): Remove.
10033         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10034         * sh-tdep.c (sh_gdbarch_init): Likewise.
10035         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10036         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10037         * tic6x-tdep.c (tic6x_print_insn): Remove.
10038         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10039         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10040         * v850-tdep.c (v850_gdbarch_init): Likewise.
10041         * vax-tdep.c (vax_gdbarch_init): Likewise.
10042         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10043         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10044
10045 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10046
10047         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10048         (MIPS_FP0_REGNUM): Remove.
10049         (MIPS_FSR_REGNUM): Remove.
10050         (mips_fbsd_supply_fpregs): Use mips_regnum.
10051         (mips_fbsd_supply_gregs): Likewise.
10052         (mips_fbsd_collect_fpregs): Likewise.
10053         (mips_fbsd_collect_gregs): Likewise.
10054
10055 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10056
10057         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10058         (getpfpregs_supplies): New function.
10059         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10060         getfpregs_supplies.
10061         (mips_fbsd_store_inferior_registers): Likewise.
10062
10063 2017-05-22  Pedro Alves <palves@redhat.com>
10064
10065         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10066         maintainer.
10067
10068 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
10069
10070         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10071         (store_register): Likewise.
10072         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10073         (get_decimal_float_return_value): Likewise.
10074         (do_ppc_sysv_return_value): Likewise.
10075         (ppc64_sysv_abi_push_integer): Likewise.
10076         (ppc64_sysv_abi_push_freg): Likewise.
10077         (ppc64_sysv_abi_return_value_base): Likewise.
10078         (ppc64_sysv_abi_return_value): Likewise.
10079         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10080         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10081         * rs6000-nat.c: Likewise.
10082         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10083         (rs6000_value_to_register): Likewise.
10084         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10085
10086 2017-05-21  Tom Tromey  <tom@tromey.com>
10087
10088         PR rust/21466:
10089         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10090         arrays as "[T]", not "[T; ]".
10091
10092 2017-05-19  Tom Tromey  <tom@tromey.com>
10093
10094         PR rust/21484:
10095         * rust-lang.c (exp_descriptor_rust): New function.
10096         (rust_language_defn): Use it.
10097         * p-lang.c (pascal_language_defn): Update.
10098         * opencl-lang.c (opencl_language_defn): Update.
10099         * objc-lang.c (objc_language_defn): Update.
10100         * m2-lang.c (m2_language_defn): Update.
10101         * language.h (struct language_defn)
10102         <la_watch_location_expression>: New member.
10103         * language.c (unknown_language_defn, auto_language_defn)
10104         (local_language_defn): Update.
10105         * go-lang.c (go_language_defn): Update.
10106         * f-lang.c (f_language_defn): Update.
10107         * d-lang.c (d_language_defn): Update.
10108         * c-lang.h (c_watch_location_expression): Declare.
10109         * c-lang.c (c_watch_location_expression): New function.
10110         (c_language_defn, cplus_language_defn, asm_language_defn)
10111         (minimal_language_defn): Use it.
10112         * breakpoint.c (watch_command_1): Call
10113         la_watch_location_expression.
10114         * ada-lang.c (ada_language_defn): Update.
10115
10116 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10117
10118         PR tui/21482
10119         * gdb_curses.h (NOMACROS): Define.
10120         (NCURSES_NOMACROS): Define.
10121
10122 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10123
10124         PR tui/21482
10125         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10126         arg to char *.
10127         * tui/tui-wingeneral.c (box_win): Likewise.
10128         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10129         (tui_show_source_line): Likewise.
10130         (tui_show_exec_info_content): Likewise.
10131
10132 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10133
10134         * sparc-tdep.c (sparc_structure_return_p)
10135         (sparc_arg_on_registers_p): New functions.
10136         (sparc32_store_arguments): Use them.
10137         * sparc64-tdep.c (sparc64_16_byte_align_p)
10138         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10139         Handle TYPE_CODE_ARRAY.
10140
10141 2017-05-17  Yao Qi  <yao.qi@linaro.org>
10142
10143         * cli/cli-decode.c (add_alias_cmd): New function.
10144         * command.h (add_alias_cmd): Declare.
10145         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10146         instead call add_alias_cmd.
10147
10148 2017-05-17  Pedro Alves  <palves@redhat.com>
10149
10150         * Makefile.in (nat_extra_makefile_frag): Rename to ...
10151         (nat_makefile_frag): ... this.  All references updated.
10152         * configure.ac: Likewise.
10153         * configure.nat: Likewise.  Enhance comments.
10154         * configure: Regenerate.
10155
10156 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10157
10158         * procfs.c (procfs_create_inferior): Change prototype to match
10159         definition.
10160
10161 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
10162
10163         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10164         C++ compiler warning.
10165
10166 2017-05-12  Tom Tromey  <tom@tromey.com>
10167
10168         PR rust/21483:
10169         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10170         recurse, just call value_struct_elt directly.
10171
10172 2017-05-12  Tom Tromey  <tom@tromey.com>
10173
10174         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10175         OP_RUST_ARRAY>: Fix.
10176
10177 2017-05-12  Tom Tromey  <tom@tromey.com>
10178
10179         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10180
10181 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10182
10183         * regcache.c: Include <forward_list>.
10184         (struct regcache_list): Remove.
10185         (current_regcache): Update.
10186         (get_thread_arch_aspace_regcache): Update for std::forward_list.
10187         (regcache_thread_ptid_changed): Likewise.
10188         (registers_changed_ptid): Likewise.
10189         (current_regcache_size): Likewise.
10190
10191 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10192
10193         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10194         (current_regcache_size): New function.
10195         (current_regcache_test): New function.
10196         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10197
10198 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10199
10200         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10201         (print_gp_register_row): Use get_frame_register_value.
10202
10203 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10204
10205         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10206         (mips_supply_fpregset): Likewise.
10207         (mips64_supply_gregset): Likewise.
10208
10209 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10210
10211         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
10212         regcache->raw_supply_zeroed.
10213
10214 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10215
10216         * configure.nat: Rearrange 'case' statements to match
10217         host before cpu.
10218
10219 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10220
10221         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
10222         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10223         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
10224         "@nat_extra_makefile_frag@".
10225         (Makefile): Remove dependency on "@frags@".
10226         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10227         (data-directory/Makefile): Likewise.
10228         * config/aarch64/linux.mh: Deleted; moved contents to
10229         "gdb/configure.nat".
10230         * config/alpha/alpha-linux.mh: Likewise.
10231         * config/alpha/nbsd.mh: Likewise.
10232         * config/arm/linux.mh: Likewise.
10233         * config/arm/nbsdelf.mh: Likewise.
10234         * config/i386/cygwin.mh: Likewise.
10235         * config/i386/cygwin64.mh: Likewise.
10236         * config/i386/darwin.mh: Likewise.
10237         * config/i386/fbsd.mh: Likewise.
10238         * config/i386/fbsd64.mh: Likewise.
10239         * config/i386/go32.mh: Likewise.
10240         * config/i386/i386gnu.mh: Likewise.
10241         * config/i386/i386sol2.mh: Likewise.
10242         * config/i386/linux.mh: Likewise.
10243         * config/i386/linux64.mh: Likewise.
10244         * config/i386/mingw.mh: Likewise.
10245         * config/i386/mingw64.mh: Likewise.
10246         * config/i386/nbsd64.mh: Likewise.
10247         * config/i386/nbsdelf.mh: Likewise.
10248         * config/i386/nto.mh: Likewise.
10249         * config/i386/obsd.mh: Likewise.
10250         * config/i386/obsd64.mh: Likewise.
10251         * config/i386/sol2-64.mh: Likewise.
10252         * config/ia64/linux.mh: Likewise.
10253         * config/m32r/linux.mh: Likewise.
10254         * config/m68k/linux.mh: Likewise.
10255         * config/m68k/nbsdelf.mh: Likewise.
10256         * config/m68k/obsd.mh: Likewise.
10257         * config/m88k/obsd.mh: Likewise.
10258         * config/mips/fbsd.mh: Likewise.
10259         * config/mips/linux.mh: Likewise.
10260         * config/mips/nbsd.mh: Likewise.
10261         * config/mips/obsd64.mh: Likewise.
10262         * config/pa/linux.mh: Likewise.
10263         * config/pa/nbsd.mh: Likewise.
10264         * config/pa/obsd.mh: Likewise.
10265         * config/powerpc/aix.mh: Likewise.
10266         * config/powerpc/fbsd.mh: Likewise.
10267         * config/powerpc/linux.mh: Likewise.
10268         * config/powerpc/nbsd.mh: Likewise.
10269         * config/powerpc/obsd.mh: Likewise.
10270         * config/powerpc/ppc64-linux.mh: Likewise.
10271         * config/powerpc/spu-linux.mh: Likewise.
10272         * config/s390/linux.mh: Likewise.
10273         * config/sh/nbsd.mh: Likewise.
10274         * config/sparc/fbsd.mh: Likewise.
10275         * config/sparc/linux.mh: Likewise.
10276         * config/sparc/linux64.mh: Likewise.
10277         * config/sparc/nbsd64.mh: Likewise.
10278         * config/sparc/nbsdelf.mh: Likewise.
10279         * config/sparc/obsd64.mh: Likewise.
10280         * config/sparc/sol2.mh: Likewise.
10281         * config/tilegx/linux.mh: Likewise.
10282         * config/vax/nbsdelf.mh: Likewise.
10283         * config/vax/obsd.mh: Likewise.
10284         * config/xtensa/linux.mh: Likewise.
10285         * config/i386/i386gnu.mn: New file, with excerpts from
10286         "config/i386/i386gnu.mh".
10287         * configure: Regenerate.
10288         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10289         *.mh files under "gdb/config".
10290         * configure.nat: New file, with contents from the
10291         "gdb/config/*/*.mh" files.
10292
10293 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
10294
10295         * btrace.c (btrace_clear): Free insn vector.
10296
10297 2017-05-05  Pedro Alves  <palves@redhat.com>
10298
10299         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10300         * configure: Regenerate.
10301
10302 2017-05-04  Pedro Alves  <palves@redhat.com>
10303
10304         * Makefile.in (SFILES): Add progspace-and-thread.c.
10305         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10306         (COMMON_OBS): Add progspace-and-thread.o.
10307         * breakpoint.c: Include "progspace-and-thread.h".
10308         (update_inserted_breakpoint_locations)
10309         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10310         Use scoped_restore_current_pspace_and_thread.
10311         (create_std_terminate_master_breakpoint): Use
10312         scoped_restore_current_program_space.
10313         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10314         (print_breakpoint_location): Use
10315         scoped_restore_current_program_space.
10316         (bp_loc_is_permanent): Use
10317         scoped_restore_current_pspace_and_thread.
10318         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10319         (download_tracepoint_locations): Use
10320         scoped_restore_current_pspace_and_thread.
10321         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10322         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10323         (enum step_over_calls_kind): Moved from inferior.h.
10324         (class scoped_restore_current_thread): New class.
10325         * gdbthread.h (make_cleanup_restore_current_thread): Delete
10326         declaration.
10327         (scoped_restore_current_thread): New class.
10328         * infcmd.c: Include "common/gdb_optional.h".
10329         (continue_1, proceed_after_attach): Use
10330         scoped_restore_current_thread.
10331         (notice_new_inferior): Use scoped_restore_current_thread.
10332         * inferior.c: Include "progspace-and-thread.h".
10333         (restore_inferior, save_current_inferior): Delete.
10334         (add_inferior_command, clone_inferior_command): Use
10335         scoped_restore_current_pspace_and_thread.
10336         * inferior.h (scoped_restore_current_inferior): New class.
10337         * infrun.c: Include "progspace-and-thread.h" and
10338         "common/gdb_optional.h".
10339         (follow_fork_inferior): Use
10340         scoped_restore_current_pspace_and_thread.
10341         (scoped_restore_exited_inferior): New class.
10342         (handle_vfork_child_exec_or_exit): Use
10343         scoped_restore_exited_inferior,
10344         scoped_restore_current_pspace_and_thread,
10345         scoped_restore_current_thread and scoped_restore.
10346         (fetch_inferior_event): Use scoped_restore_current_thread.
10347         * linespec.c (decode_line_full, decode_line_1): Use
10348         scoped_restore_current_program_space.
10349         * mi/mi-main.c: Include "progspace-and-thread.h".
10350         (exec_continue): Use scoped_restore_current_thread.
10351         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10352         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10353         * proc-service.c (ps_pglobal_lookup): Use
10354         scoped_restore_current_program_space.
10355         * progspace-and-thread.c: New file.
10356         * progspace-and-thread.h: New file.
10357         * progspace.c (release_program_space, clone_program_space): Use
10358         scoped_restore_current_program_space.
10359         (restore_program_space, save_current_program_space)
10360         (save_current_space_and_thread): Delete.
10361         (switch_to_program_space_and_thread): Moved to
10362         progspace-and-thread.c.
10363         * progspace.h (save_current_program_space)
10364         (save_current_space_and_thread): Delete declarations.
10365         (scoped_restore_current_program_space): New class.
10366         * remote.c (remote_btrace_maybe_reopen): Use
10367         scoped_restore_current_thread.
10368         * symtab.c: Include "progspace-and-thread.h".
10369         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10370         * thread.c (print_thread_info_1): Use
10371         scoped_restore_current_thread.
10372         (struct current_thread_cleanup): Delete.
10373         (do_restore_current_thread_cleanup)
10374         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10375         (scoped_restore_current_thread::~scoped_restore_current_thread):
10376         ... this new dtor.
10377         (make_cleanup_restore_current_thread): Rename/convert to ...
10378         (scoped_restore_current_thread::scoped_restore_current_thread):
10379         ... this new ctor.
10380         (thread_apply_all_command): Use scoped_restore_current_thread.
10381         (thread_apply_command): Use scoped_restore_current_thread.
10382         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10383         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10384
10385 2017-05-04  Pedro Alves  <palves@redhat.com>
10386
10387         * thread.c (make_cleanup_restore_current_thread): Move
10388         find_thread_ptid call before the is_stopped call.  Assert that the
10389         thread is found.  Replace is_stopped call by checking the thread's
10390         state directly.  Remove unnecessary NULL-thread check.
10391
10392 2017-05-04  Pedro Alves  <palves@redhat.com>
10393
10394         * corelow.c (thread_section_name): New class.
10395         (get_core_register_section, get_core_siginfo): Use it.
10396
10397 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10398
10399         * corelow.c (sniff_core_bfd): Remove extra semicolon.
10400         (get_core_register_section): Remove xfree of NULL pointer.
10401
10402 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
10403
10404         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10405         * regcache.c (regcache::raw_supply_zeroed): New function.
10406         * regcache.h (regcache::raw_supply_zeroed): New declaration.
10407
10408 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10409
10410         * gdbarch.sh: Remove commented out definition of
10411         TARGET_CHAR_BIT.
10412         * gdbarch.h: Re-generate.
10413
10414 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
10415
10416         * configure: Regenerate.
10417
10418 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
10419
10420         * solib-target.c (solib_target_relocate_section_addresses):
10421         Remove num_section_bases, num_bases, segment_bases variables.
10422
10423 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10424
10425         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10426
10427 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10428
10429         * solib-target.c: Include <vector>
10430         (struct lm_info_target) <~lm_info_target>: Remove.
10431         <segment_bases, section_bases>: Change type to
10432         std::vector<CORE_ADDR>.
10433         (library_list_start_segment, library_list_start_section,
10434         library_list_end_library,
10435         solib_target_relocate_section_addresses): Adjust.
10436
10437 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10438
10439         * gdbarch.sh (software_single_step): Change return type to
10440         std::vector<CORE_ADDR>.
10441         * gdbarch.c, gdbarch.h: Re-generate.
10442         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10443         Adjust.
10444         (arm_deal_with_atomic_sequence_raw): Adjust.
10445         (thumb_get_next_pcs_raw): Adjust.
10446         (arm_get_next_pcs_raw): Adjust.
10447         (arm_get_next_pcs): Adjust.
10448         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10449         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10450         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10451         (alpha_software_single_step): Adjust.
10452         * alpha-tdep.h (alpha_software_single_step): Adjust.
10453         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10454         * arm-tdep.c (arm_software_single_step): Adjust.
10455         (arm_breakpoint_kind_from_current_state): Adjust.
10456         * arm-tdep.h (arm_software_single_step): Adjust.
10457         * breakpoint.c (insert_single_step_breakpoint): Adjust.
10458         * cris-tdep.c (cris_software_single_step): Adjust.
10459         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10460         (micromips_deal_with_atomic_sequence): Adjust.
10461         (deal_with_atomic_sequence): Adjust.
10462         (mips_software_single_step): Adjust.
10463         * mips-tdep.h (mips_software_single_step): Adjust.
10464         * moxie-tdep.c (moxie_software_single_step): Adjust.
10465         * nios2-tdep.c (nios2_software_single_step): Adjust.
10466         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10467         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10468         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10469         * s390-linux-tdep.c (s390_software_single_step): Adjust.
10470         * sparc-tdep.c (sparc_software_single_step): Adjust.
10471         * spu-tdep.c (spu_software_single_step): Adjust.
10472         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10473
10474 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10475
10476         * gdbarch.sh: Use semi-colon as field separator instead of colon.
10477         * gdbarch.h: Re-generate.
10478
10479 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10480
10481         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10482         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10483         * python/py-instruction.c, python/py-instruction.h: New file.
10484         * python/py-record.c: Add py-instruction.h include.
10485         (gdbpy_initialize_record): Make gdb.Instruction a super class of
10486         gdb.RecordInstruction.
10487         * python/python-internal.h: Add gdbpy_initialize_instruction
10488         declaration.
10489         * python/python.c (do_start_initialization): Add
10490         gdbpy_initialize_instruction.
10491
10492 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10493
10494         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10495         Remove.
10496         (btrace_func_from_recpy_func): New function.
10497         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10498         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10499         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10500         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10501         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10502         Also, use new helper functions.
10503         (btpy_list_item): Use new helper functions.
10504         (recpy_bt_function_call_history): Use new type name.
10505         (btpy_call_getset): Remove.
10506         (gdbpy_initialize_btrace): Remove code to initialize
10507         gdb.BtraceFunctionCall.
10508         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10509         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10510         recpy_bt_func_prev, recpy_bt_func_next): New export.
10511         * python/py-record.c (recpy_func_type): New static object.
10512         (recpy_func_new, recpy_func_level, recpy_func_symbol,
10513         recpy_func_instructions, recpy_func_up, recpy_func_prev,
10514         recpy_func_next): New function.
10515         (recpy_element_hash, recpy_element_richcompare): Updated comment.
10516         (recpy_func_getset): New static object.
10517         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10518         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10519
10520 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10521
10522         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10523         (btpy_object, btpy_insn_type, btpy_new): Remove.
10524         (btpy_list_object): Use gdb.RecordInstruction type instead of
10525         gdb.BtraceInstruction type.
10526         (btrace_insn_from_recpy_insn): New function.
10527         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10528         btpy_new.
10529         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10530         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10531         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10532         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10533         instead of btpy_object.
10534         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10535         btpy_insn_data, btpy_insn_decode): Rename to ...
10536         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10537         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10538         recpy_bt_insn_decode): This.  Also, use new helper functions.
10539         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10540         recpy_insn_type.
10541         (btpy_insn_getset): Remove.
10542         (gdbpy_initialize_btrace): Remove code to initialize
10543         gdb.BtraceInstruction.  Use recpy_element_object.
10544         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10545         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10546         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10547         * python/py-record.c (recpy_insn_type): New static object.
10548         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10549         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10550         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10551         New function.
10552         (recpy_insn_getset): New static object.
10553         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10554         * python/py-record.h (recpy_element_object): New typedef.
10555         (recpy_insn_type, recpy_insn_new): New export.
10556
10557 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10558
10559         * py-record-btrace.c (btpy_insn_new): Removed.
10560         (btpy_insn_or_gap_new): New function.
10561         (btpy_insn_error): Removed.
10562         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10563         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10564         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10565         btpy_insn_or_gap_new instead of btpy_insn_new.
10566         (btpy_insn_getset): Remove btpy_insn_error.
10567         * py-record.c (recpy_gap_type): New static object.
10568         (recpy_gap_object): New typedef.
10569         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10570         recpy_gap_reason_string): New function.
10571         (recpy_gap_getset): New static object.
10572         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10573         * py-record.h (recpy_gap_new): New export.
10574
10575 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10576
10577         * python/py-record.c (recpy_ptid): Remove.
10578         (recpy_record_getset): Remove recpy_ptid.
10579
10580 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10581
10582         * btrace.c (btrace_fetch): Set inferior_ptid.
10583         * python/py-record-btrace.c: Add "py-record.h" include.
10584         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10585         recpy_bt_end, recpy_bt_instruction_history,
10586         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10587         in gdb.Record object instead of current ptid.
10588         * python/py-record.c: Include new "py-record.h" file.
10589         (recpy_record_object): Moved to py-record.h.
10590         * python/py-record.h: New file.
10591
10592 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10593
10594         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10595         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10596         indentation.
10597
10598 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
10599
10600         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10601         the past maintainers section.
10602
10603 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10604
10605         * infcmd.c (get_return_value): Use regcache ctor, and remove
10606         cleanup.
10607
10608 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10609             Pedro Alves  <palves@redhat.com>
10610
10611         * regcache.c (regcache::regcache): New tag dispatch ctor.
10612         (do_cooked_read): Moved above.
10613         (regcache_dup): Use the tag dispatch ctor..
10614         * regcache.h (regcache): Declare ctor, delete copy ctor and
10615         assignment operator, remove friend regcache_dup.
10616
10617 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10618
10619         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10620         call method save instead of regcache_cpy.
10621         * regcache.h (struct regcache): Make regcache_dup a friend.
10622
10623 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10624
10625         * regcache.c (struct regcache): Move to regcache.h
10626         (regcache::arch): New method.
10627         (regcache_get_ptid): Update.
10628         (get_regcache_arch): Call arch method.
10629         (get_regcache_aspace): Call method aspace.
10630         (register_buffer): Change it to method.
10631         (regcache_save): Change it to regcache::save.
10632         (regcache_restore): Likewise.
10633         (regcache_cpy_no_passthrough): Remove the declaration.
10634         (regcache_cpy): Call methods restore and cpy_no_passthrough.
10635         (regcache_cpy_no_passthrough): Change it to method
10636         cpy_no_passthrough.
10637         (regcache_register_status): Change it to method
10638         get_register_status.
10639         (regcache_invalidate): Change it to method invalidate.
10640         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10641         (regcache_raw_update): Change it to method raw_update.
10642         (regcache_raw_read): Likewise.
10643         (regcache_raw_read_signed): Likewise.
10644         (regcache_raw_read_unsigned): Likewise.
10645         (regcache_raw_write_signed): Likewise.
10646         (regcache_raw_write_unsigned): Likewise.
10647         (regcache_cooked_read): Likewise.
10648         (regcache_cooked_read_value): Likewise.
10649         (regcache_cooked_read_signed): Likewise.
10650         (regcache_cooked_read_unsigned): Likewise.
10651         (regcache_cooked_write_signed): Likewise.
10652         (regcache_cooked_write_unsigned): Likewise.
10653         (regcache_raw_set_cached_value): Likewise.
10654         (regcache_raw_write): Likewise.
10655         (regcache_cooked_write): Likewise.
10656         (regcache_xfer_part): Likewise.
10657         (regcache_raw_read_part): Likewise.
10658         (regcache_raw_write_part): Likewise.
10659         (regcache_cooked_read_part): Likewise.
10660         (regcache_cooked_write_part): Likewise.
10661         (regcache_raw_supply): Likewise.
10662         (regcache_raw_collect): Likewise.
10663         (regcache_transfer_regset): Likewise.
10664         (regcache_supply_regset): Likewise.
10665         (regcache_collect_regset): Likewise.
10666         (regcache_debug_print_register): Likewise.
10667         (enum regcache_dump_what): Move it to regcache.h.
10668         (regcache_dump): Change it to method dump.
10669         * regcache.h (enum regcache_dump_what): New.
10670         (class regcache): New.
10671         * target.c (target_fetch_registers): Call method
10672         debug_print_register.
10673         (target_store_registers): Likewise.
10674
10675 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10676
10677         * windows-nat.c (struct lm_info_windows): Initialize field.
10678         (windows_make_so): Allocate lm_info_windows with new.
10679         (windows_free_so): Free lm_info_windows with delete.
10680
10681 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10682
10683         * solib-darwin.c (struct lm_info_darwin): Initialize field.
10684         (darwin_current_sos): Allocate lm_info_darwin with new, remove
10685         cleanup.
10686         (darwin_free_so): Free lm_info_darwin with delete.
10687
10688 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10689
10690         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
10691         <l_addr_p>: Change type to bool.
10692         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
10693         (svr4_free_so): Free lm_info_svr4 with delete.
10694         (svr4_copy_library_list): Replace memcpy with call to copy
10695         constructor.
10696         (library_list_start_library, svr4_default_sos): Allocate
10697         lm_info_svr4 with new.
10698
10699 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10700
10701         * solib-target.c (struct lm_info_target): Add destructor,
10702         initialize fields.
10703         <name>: Change type to std::string.
10704         (library_list_start_library): Allocate lm_info_target with new.
10705         (solib_target_free_library_list): Free lm_info_target with
10706         delete.
10707         (solib_target_current_sos): Adapt to std::string.
10708         (solib_target_free_so): Free lm_info_target with delete.
10709
10710 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10711
10712         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
10713         fields.
10714         (frv_current_sos): Allocate lm_info_frv with new.
10715         (frv_relocate_main_executable): Free lm_info_frv with delete,
10716         allocate with new.
10717         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
10718
10719 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10720
10721         * solib-frv.c (struct lm_info_frv): Fix indentation.
10722
10723 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10724
10725         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
10726         map field.
10727         (dsbt_current_sos): Allocate lm_info_dsbt with new.
10728         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
10729         and allocate with new.
10730         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
10731
10732 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10733
10734         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
10735         <filename, member_name>: Change type to std::string.
10736         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
10737         (library_list_start_library): Allocate lm_info_aix with new.
10738         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
10739         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
10740         with copy constructor.
10741
10742 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10743
10744         * solist.h (struct lm_info): Remove.
10745         (struct lm_info_base): New class.
10746         (struct so_list) <lm_info>: Change type to lm_info_base *.
10747         * nto-tdep.c (struct lm_info): Remove.
10748         (lm_addr): Adjust.
10749         * solib-aix.c (struct lm_info): Rename to ...
10750         (struct lm_info_aix): ... this.  Extend lm_info_base.
10751         (lm_info_p): Rename to ...
10752         (lm_info_aix_p): ... this, and adjust.
10753         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
10754         solib_aix_parse_libraries, library_list_start_library,
10755         solib_aix_free_library_list, solib_aix_parse_libraries,
10756         solib_aix_get_library_list,
10757         solib_aix_relocate_section_addresses, solib_aix_free_so,
10758         solib_aix_get_section_offsets,
10759         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
10760         Adjust.
10761         (struct solib_aix_inferior_data) <library_list>: Adjust.
10762         * solib-darwin.c (struct lm_info): Rename to ...
10763         (struct lm_info_darwin): ... this.  Extend lm_info_base.
10764         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
10765         * solib-dsbt.c (struct lm_info): Rename to ...
10766         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
10767         (struct dsbt_info) <main_executable_lm_info): Adjust.
10768         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
10769         dsbt_relocate_section_addresses): Adjust.
10770         * solib-frv.c (struct lm_info): Rename to ...
10771         (struct lm_info_frv): ... this.  Extend lm_info_base.
10772         (main_executable_lm_info): Adjust.
10773         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
10774         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
10775         find_canonical_descriptor_in_load_object,
10776         frv_fdpic_find_canonical_descriptor): Adjust.
10777         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10778         to lm_info_svr4.
10779         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10780         svr4_clear_so, svr4_copy_library_list,
10781         library_list_start_library, svr4_default_sos, svr4_read_so_list,
10782         svr4_current_sos, svr4_fetch_objfile_link_map,
10783         solist_update_incremental): Adjust.
10784         * solib-svr4.h (struct lm_info_svr4): Move here from
10785         solib-svr4.c.
10786         * solib-target.c (struct lm_info): Rename to ...
10787         (struct lm_info_target): ... this.  Extend lm_info_base.
10788         (lm_info_p): Rename to ...
10789         (lm_info_target_p): ... this.
10790         (solib_target_parse_libraries, library_list_start_segment,
10791         library_list_start_section, library_list_start_library,
10792         library_list_end_library, solib_target_free_library_list,
10793         solib_target_current_sos, solib_target_free_so,
10794         solib_target_relocate_section_addresses): Adjust.
10795         * windows-nat.c (struct lm_info): Rename to ...
10796         (struct lm_info_windows): ... this.  Extend lm_info_base.
10797         (windows_make_so, handle_load_dll, handle_unload_dll,
10798         windows_xfer_shared_libraries): Adjust.
10799
10800 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10801
10802         * solib-darwin.c (struct darwin_so_list): Remove.
10803         (darwin_current_sos): Allocate an so_list object instead of a
10804         darwin_so_list, separately allocate an lm_info object.
10805         (darwin_free_so): Free lm_info.
10806
10807 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
10808
10809         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
10810         with fprintf_filtered.
10811
10812 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10813
10814         * regcache.c (regcache::regcache): New function.
10815         (regcache::~regcache): New function.
10816         (regcache_xmalloc_1): Remove.
10817         (regcache_xmalloc): Call new regcache.
10818         (regcache_xfree): Call delete regcache.
10819         (get_thread_arch_aspace_regcache): Call new regcache.
10820
10821 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10822
10823         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
10824         lwp instead of ptid_get_lwp.
10825
10826 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10827
10828         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
10829         lwp_info instead of getting from inferior_ptid.
10830
10831 2017-04-27  Keith Seitz  <keiths@redhat.com>
10832
10833         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
10834         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
10835         (CV_CONVERSION_BADNESS): Define.
10836         (rank_one_type): Remove overly restrictive rvalue reference
10837         rank checks.
10838         Add cv-qualifier checks and subranks for type equality.
10839         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
10840         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
10841         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
10842
10843 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
10844
10845         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
10846         count when creating the object.
10847
10848 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
10849             Ulrich Weigand  <uweigand@de.ibm.com>
10850
10851         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
10852         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
10853         is used in AIX.
10854         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
10855         (process_xcoff_symbol): Likewise.
10856         (scan_xcoff_symtab): Likewise.
10857
10858 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10859
10860         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
10861         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
10862         (ia64_access_reg): Use get_frame_register_unsigned.
10863         (ia64_access_rse_reg): Likewise.
10864         (ia64_libunwind_frame_prev_register): Likewise.
10865
10866 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
10867
10868         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
10869         * gdbarch.c: Regenerated.
10870         * gdbarch.h: Regenerated.
10871         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
10872         visibility external.
10873         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
10874         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
10875         (enum cfa_how_kind): Move to ...
10876         (struct dwarf2_frame_state_reg_info): Likewise.
10877         (struct dwarf2_frame_state): Likewise.
10878         * dwarf2-frame.h: ... here.
10879         (dwarf2_frame_state_alloc_regs): New declaration.
10880         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
10881         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
10882
10883 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10884
10885         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
10886         regcache_raw_read_unsigned.
10887         (xtensa_pseudo_register_write): Likewise.
10888
10889 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10890
10891         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
10892         (nds32_pseudo_register_write): Likewise.
10893
10894 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10895
10896         * regcache.c (struct regcache) <readonly_p>: Change its type
10897         to bool.
10898         (regcache_xmalloc_1): Update parameter type and callers update.
10899
10900 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10901
10902         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
10903         set_gdbarch_wchar_bit.
10904         * arm-tdep.c (arm_gdbarch_init): Likewise.
10905
10906 2017-04-25  Pedro Alves  <palves@redhat.com>
10907
10908         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
10909         (BothAreRelocatable, memcopy, memmove): Don't define.
10910         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
10911         macros.
10912
10913 2017-04-25  Pedro Alves  <palves@redhat.com>
10914
10915         * common/common-defs.h: Include "common/poison.h".
10916         * common/function-view.h: (Not, Or, Requires): Move to traits.h
10917         and adjust.
10918         * common/poison.h: New file.
10919         * common/traits.h: Include <type_traits>.
10920         (Not, Or, Requires): New, moved from common/function-view.h.
10921
10922 2017-04-25  Pedro Alves  <palves@redhat.com>
10923
10924         * breakpoint.h (struct breakpoint): In-class initialize all
10925         fields.  Make boolean fields "bool".
10926         * breakpoint.c (init_raw_breakpoint_without_location): Remove
10927         memset call and initializations no longer necessary.
10928
10929 2017-04-25  Pedro Alves  <palves@redhat.com>
10930
10931         * btrace.c (pt_btrace_insn_flags): Change parameter type to
10932         reference.
10933         (pt_btrace_insn): New function.
10934         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
10935
10936 2017-04-25  Pedro Alves  <palves@redhat.com>
10937
10938         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
10939         "base" field and inherit from "bp_location" instead.  Add
10940         non-default ctor.
10941         (allocate_location_exception): Use new non-default ctor.
10942         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
10943         (init_bp_location): Convert to ...
10944         (bp_location::bp_location): ... this new ctor, and remove memset
10945         call.
10946         (base_breakpoint_allocate_location): Use the new non-default ctor.
10947         * breakpoint.h (bp_location): Now a class.  Declare default and
10948         non-default ctors.  In-class initialize all members.
10949         (init_bp_location): Remove declaration.
10950
10951 2017-04-25  Pedro Alves  <palves@redhat.com>
10952
10953         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
10954         assignment operator.
10955
10956 2017-04-24  Yao Qi  <yao.qi@linaro.org>
10957
10958         * doublest.c (convert_doublest_to_floatformat): Call
10959         floatformat_totalsize_bytes.
10960
10961 2017-04-22  Tom Tromey  <tom@tromey.com>
10962
10963         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
10964         ui_out_emit_list.
10965         * stack.c (print_frame): Use ui_out_emit_list.
10966         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10967         ui_out_emit_list.
10968         * mi/mi-main.c (print_one_inferior)
10969         (mi_cmd_data_list_register_names)
10970         (mi_cmd_data_list_register_values, mi_cmd_list_features)
10971         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
10972         ui_out_emit_list.
10973         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
10974         (mi_output_solib_attribs): Use ui_out_emit_list,
10975         ui_out_emit_tuple.
10976         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
10977         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
10978         (mi_cmd_stack_list_args, list_args_or_locals): Use
10979         ui_out_emit_list.
10980         * disasm.c (do_assembly_only): Use ui_out_emit_list.
10981         * breakpoint.c (print_solib_event, output_thread_groups): Use
10982         ui_out_emit_list.
10983
10984 2017-04-22  Tom Tromey  <tom@tromey.com>
10985
10986         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
10987         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
10988         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
10989
10990 2017-04-22  Tom Tromey  <tom@tromey.com>
10991
10992         * tracepoint.c (tvariables_info_1)
10993         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
10994
10995 2017-04-22  Tom Tromey  <tom@tromey.com>
10996
10997         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
10998         annotate_arg_emitter.
10999         * breakpoint.c (print_mention_watchpoint)
11000         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11001         * annotate.h (struct annotate_arg_emitter): New.
11002
11003 2017-04-22  Tom Tromey  <tom@tromey.com>
11004
11005         * record-btrace.c (record_btrace_insn_history)
11006         (record_btrace_insn_history_range, record_btrace_call_history)
11007         (record_btrace_call_history_range): Use ui_out_emit_tuple.
11008         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11009         ui_out_emit_tuple.
11010         * stack.c (print_frame_info): Use ui_out_emit_tuple.
11011         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11012         * skip.c (skip_info): Use ui_out_emit_tuple.
11013         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11014         * progspace.c (print_program_space): Use ui_out_emit_tuple.
11015         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11016         * osdata.c (info_osdata): Use ui_out_emit_tuple.
11017         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11018         ui_out_emit_tuple.
11019         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11020         (output_register, mi_cmd_data_read_memory)
11021         (mi_cmd_data_read_memory_bytes, mi_load_progress)
11022         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11023         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11024         Use ui_out_emit_tuple.
11025         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11026         ui_out_emit_tuple.
11027         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11028         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11029         * linux-thread-db.c (info_auto_load_libthread_db): Use
11030         ui_out_emit_tuple.
11031         * inferior.c (print_inferior): Use ui_out_emit_tuple.
11032         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11033         * disasm.c (do_mixed_source_and_assembly_deprecated)
11034         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11035         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11036         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11037         * breakpoint.c (print_one_breakpoint_location)
11038         (print_one_breakpoint): Use ui_out_emit_tuple.
11039         * auto-load.c (print_script, info_auto_load_cmd): Use
11040         ui_out_emit_tuple.
11041         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11042
11043 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
11044
11045         * thread.c (print_thread_info_1): Remove dead code.
11046
11047 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11048
11049         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11050         GDB_SELF_TEST.
11051         * arm-tdep.c (selftests::arm_record_test): Likewise.
11052
11053 2017-04-21  Yao Qi  <yao.qi@linaro.org>
11054
11055         * regcache.c (regcache_restore): Remove argument 2.  Replace
11056         argument 3 with regcache.  Get register status from
11057         src->register_status and get register contents from
11058         register_buffer (src, regnum).
11059         (regcache_cpy): Update.
11060
11061 2017-04-19  Pedro Alves  <palves@redhat.com>
11062
11063         * gdbthread.h (thread): Add missing closing parenthesis in
11064         comment.
11065
11066 2017-04-19  Pedro Alves  <palves@redhat.com>
11067
11068         * common/refcounted-object.h: New file.
11069         * gdbthread.h: Include "common/refcounted-object.h".
11070         (thread_info): Inherit from refcounted_object and add comments.
11071         (thread_info::incref, thread_info::decref)
11072         (thread_info::m_refcount): Delete.
11073         (thread_info::deletable): Use the refcounted_object::refcount()
11074         method.
11075         * inferior.c (current_inferior_): Add comment.
11076         (set_current_inferior): Increment/decrement refcounts.
11077         (prune_inferiors, remove_inferior_command): Skip inferiors marked
11078         not-deletable instead of comparing with the current inferior.
11079         (initialize_inferiors): Increment the initial inferior's refcount.
11080         * inferior.h (struct inferior): Forward declare.
11081         Include "common/refcounted-object.h".
11082         (current_inferior, set_current_inferior): Move declaration to
11083         before struct inferior's definition, and fix comment.
11084         (inferior): Inherit from refcounted_object.  Add comments.
11085         * thread.c (switch_to_thread_no_regs): Reference the thread's
11086         inferior pointer directly instead of doing a ptid lookup.
11087         (switch_to_no_thread): New function.
11088         (switch_to_thread(thread_info *)): New function, factored out
11089         from ...
11090         (switch_to_thread(ptid_t)): ... this.
11091         (restore_current_thread): Delete.
11092         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11093         fields, and add 'inf' field.
11094         (do_restore_current_thread_cleanup): Check whether old->inf is
11095         alive instead of looking up an inferior by ptid.  Use
11096         switch_to_thread and switch_to_no_thread.
11097         (restore_current_thread_cleanup_dtor): Use old->inf directly
11098         instead of lookup up an inferior by id.  Decref the inferior.
11099         Don't restore 'removable'.
11100         (make_cleanup_restore_current_thread): Same the inferior pointer
11101         in old, instead of the inferior number.  Incref the inferior.
11102         Don't save/clear 'removable'.
11103
11104 2017-04-19  Pedro Alves  <palves@redhat.com>
11105
11106         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11107         unittests/scoped_restore-selftests.c.
11108         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11109         * common/scoped_restore.h (scoped_restore_base): Make "class".
11110         (scoped_restore_base::release): New public method.
11111         (scoped_restore_base::scoped_restore_base): New protected ctor.
11112         (scoped_restore_base::m_saved_var): New protected field.
11113         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11114         scoped_restore_base base class instead of m_saved_var directly.
11115         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11116         (scoped_restore_tmpl::scoped_restore_tmpl(const
11117         scoped_restore_tmpl<T>&)): Likewise.
11118         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11119         method.
11120         (scoped_restore_tmpl::saved_var): New method.
11121         (scoped_restore_tmpl::m_saved_var): Delete.
11122         * inferior.h (inferior::detaching): Now a bool.
11123         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11124         cleanup.
11125         * unittests/scoped_restore-selftests.c: New file.
11126
11127 2017-04-19  Pedro Alves  <palves@redhat.com>
11128
11129         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11130         Re-sort in alphabetic order.
11131
11132 2017-04-18  Pedro Alves  <palves@redhat.com>
11133
11134         * xml-support.c (obstack_xml_printf): Delete.
11135         * xml-support.h (obstack_xml_printf): Delete.
11136
11137 2017-04-18  Pedro Alves  <palves@redhat.com>
11138
11139         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11140         vdebug, verror, body_text, start_element, end_element, name,
11141         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11142         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11143         is_xinclude>: Make private and add m_ prefix.
11144         (gdb_xml_parser::body_text): New method, based on ...
11145         (gdb_xml_body_text): ... this.  Adjust.
11146         (gdb_xml_parser::vdebug): New method, based on ...
11147         (gdb_xml_debug): ... this.  Adjust.
11148         (gdb_xml_parser::verror): New method, based on ...
11149         (gdb_xml_error): ... this.  Adjust.
11150         (gdb_xml_parser::start_element): New method, based on ...
11151         (gdb_xml_start_element): ... this.  Adjust.
11152         (gdb_xml_start_element_wrapper): Defer to
11153         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11154         (gdb_xml_parser::end_element): New method, based on ...
11155         (gdb_xml_end_element_wrapper): ... this.  Adjust.
11156         (gdb_xml_parser::~gdb_xml_parser): Adjust.
11157         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11158         (gdb_xml_parser::use_dtd): New method, based on ...
11159         (gdb_xml_use_dtd): ... this.  Adjust.
11160         (gdb_xml_parser::parse): New method, based on ...
11161         (gdb_xml_parse): ... this.  Adjust.
11162         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11163         (xinclude_start_include): Adjust to call the parser's name method.
11164         (xml_xinclude_default, xml_xinclude_start_doctype)
11165         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11166         method.
11167         (xml_process_xincludes): Adjust to call parser methods.
11168         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11169         declarations.
11170
11171 2017-04-18  Pedro Alves  <palves@redhat.com>
11172
11173         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11174         gdb::optional<std::string>.
11175         * xml-support.c: Include <string>.
11176         (scope_level::scope_level(scope_level &&))
11177         (scope_level::~scope_level): Delete.
11178         (scope_level::body): Now a std::string.
11179         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11180         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11181         parameter.
11182         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11183         (xinclude_parsing_data::output): Now a std::string reference.
11184         (xinclude_start_include): Adjust.
11185         (xml_xinclude_default): Adjust.
11186         (xml_process_xincludes): Add 'output' parameter, and return bool.
11187         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11188         and return bool.
11189         * xml-tdesc.c: Include <unordered_map> and <string>.
11190         (tdesc_xml_cache): Delete.
11191         (tdesc_xml_cache_s): Delete.
11192         (xml_cache): Now an std::unordered_map.
11193         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11194         (target_fetch_description_xml): Change return type to
11195         gdb::optional<std::string>, and adjust.
11196         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11197         (target_fetch_description_xml): Change return type to
11198         gdb::optional<std::string>.
11199
11200 2017-04-18  Pedro Alves  <palves@redhat.com>
11201
11202         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11203         unittests/optional-selftests.c.
11204         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11205         * unittests/optional-selftests.c: New file.
11206         * unittests/optional/assignment/1.cc: New file.
11207         * unittests/optional/assignment/2.cc: New file.
11208         * unittests/optional/assignment/3.cc: New file.
11209         * unittests/optional/assignment/4.cc: New file.
11210         * unittests/optional/assignment/5.cc: New file.
11211         * unittests/optional/assignment/6.cc: New file.
11212         * unittests/optional/assignment/7.cc: New file.
11213         * unittests/optional/cons/copy.cc: New file.
11214         * unittests/optional/cons/default.cc: New file.
11215         * unittests/optional/cons/move.cc: New file.
11216         * unittests/optional/cons/value.cc: New file.
11217         * unittests/optional/in_place.cc: New file.
11218         * unittests/optional/observers/1.cc: New file.
11219         * unittests/optional/observers/2.cc: New file.
11220
11221 2017-04-18  Pedro Alves  <palves@redhat.com>
11222
11223         * common/gdb_optional.h: Include common/traits.h.
11224         (in_place_t): New type.
11225         (in_place): New constexpr variable.
11226         (optional::optional): Remove member initialization of
11227         m_instantiated.
11228         (optional::optional(in_place_t...)): New constructor.
11229         (optional::~optional): Use reset.
11230         (optional::optional(const optional&)): New.
11231         (optional::optional(const optional&&)): New.
11232         (optional::optional(T &)): New.
11233         (optional::optional(T &&)): New.
11234         (operator::operator=(const optional &)): New.
11235         (operator::operator=(optional &&)): New.
11236         (operator::operator= (const T &))
11237         (operator::operator= (T &&))
11238         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
11239         (operator::reset): New.
11240         (operator::m_instantiated):: Add in-class initializer.
11241         * common/traits.h: Include <type_traits>.
11242         (struct And): New types.
11243
11244 2017-04-18  Pedro Alves  <palves@redhat.com>
11245
11246         * xml-support.c: Include <vector>.
11247         (scope_level::scope_level(const gdb_xml_element *))
11248         (scope_level::scope_level(scope_level&&)): New.
11249         (scope_level::~scope_level): New.
11250         (scope_level_s): Delete.
11251         (gdb_xml_parser::scopes): Now a std::vector.
11252         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11253         Use std::vector.
11254         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11255         scope cleanup code.
11256         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11257         of the scopes member.  Use std::vector::emplace_back.
11258
11259 2017-04-18  Pedro Alves  <palves@redhat.com>
11260
11261         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
11262         a bool.
11263         (gdb_xml_end_element): Change type of first parameter.
11264         (gdb_xml_cleanup): Rename to ...
11265         (gdb_xml_parser::~gdb_xml_parser): ... this.
11266         (gdb_xml_create_parser_and_cleanup): Delete with ...
11267         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11268         to this new ctor.
11269         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11270         using gdb_xml_create_parser_and_cleanup.
11271         (xinclude_parsing_data): Add ctor/dtor.
11272         (xml_xinclude_cleanup): Delete.
11273         (xml_process_xincludes): Create a local xinclude_parsing_data
11274         instead of heap-allocating one.  Create a local gdb_xml_parser
11275         instead of heap-allocating one with
11276         gdb_xml_create_parser_and_cleanup.
11277
11278 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
11279
11280         PR threads/20743
11281         * fbsd-nat.c (resume_one_thread_cb): Remove.
11282         (resume_all_threads_cb): Remove.
11283         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11284         iterate_over_threads.
11285
11286 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11287
11288         * NEWS: Create a new section for the next release branch.
11289         Rename the section of the current branch, now that it has
11290         been cut.
11291
11292 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11293
11294         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11295         * version.in: Bump version to 8.0.50.DATE-git.
11296
11297 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
11298
11299         PR gdb/21385
11300         * windows-nat.c (windows_create_inferior): Declare 'allargs'
11301         independently of the host, and fix build breakage on Cygwin.
11302
11303 2017-04-13  Pedro Alves  <palves@redhat.com>
11304
11305         * inferior.c (free_inferior): Convert to ...
11306         (inferior::~inferior): ... this dtor.
11307         (inferior::inferior): New ctor, factored out from ...
11308         (add_inferior_silent): ... here.  Allocate the inferior with a new
11309         expression.
11310         (delete_inferior): Call delete instead of free_inferior.
11311         * inferior.h (gdb_environ, continuation): Forward declare.
11312         (inferior): Now a class.  Add in-class initialization to all
11313         members.  Make boolean fields bool, except 'detaching'.
11314         (inferior::inferior): New explicit ctor.
11315         (inferior::~inferior): New.
11316
11317 2017-04-13  Pedro Alves  <palves@redhat.com>
11318
11319         * inferior.c (init_inferior_list): Delete.
11320         * inferior.h (init_inferior_list): Delete.
11321
11322 2017-04-13  Pedro Alves  <palves@redhat.com>
11323
11324         PR threads/13217
11325         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11326         (top level): Call it twice, with different thread sets.
11327
11328 2017-04-13  Pedro Alves  <palves@redhat.com>
11329
11330         * thread.c: Include <algorithm>.
11331         (thread_array_cleanup): Delete.
11332         (scoped_inc_dec_ref): New class.
11333         (live_threads_count): New function.
11334         (set_thread_refcount): Delete.
11335         (tp_array_compar_ascending): Now a bool.
11336         (tp_array_compar): Convert to a std::sort comparison function.
11337         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11338         and live_threads_count.
11339
11340 2017-04-13  Pedro Alves  <palves@redhat.com>
11341
11342         * infrun.c (follow_fork_inferior): Also switch the current
11343         inferior.
11344
11345 2017-04-13  Pedro Alves  <palves@redhat.com>
11346
11347         * breakpoint.c (watch_command_1): Save watchpoint-frame info
11348         before calling create_internal_breakpoint.
11349
11350 2017-04-13  Pedro Alves  <palves@redhat.com>
11351
11352         * fork-child.c (execv_argv): New class.
11353         (breakup_args): Refactored as ...
11354         (execv_argv::init_for_no_shell): .. this method of execv_argv.
11355         Copy arguments to storage and replace separators with NULL
11356         terminators in place.
11357         (escape_bang_in_quoted_argument): Adjust to return bool.
11358         (execv_argv::execv_argv): New ctor.
11359         (execv_argv::init_for_shell): New method, factored out from
11360         fork_inferior.  Don't strdup strings into the vector.
11361         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
11362         Remove free_vector_argv call.
11363
11364 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11365
11366         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11367         tdep->rx_psw_type.
11368
11369 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11370
11371         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11372         * rx-tdep.c (rx_gdbarch_init): Likewise.
11373
11374 2017-04-13  Pedro Alves  <palves@redhat.com>
11375
11376         * breakpoint.h (struct breakpoint): Reindent.
11377
11378 2017-04-13  Pedro Alves  <palves@redhat.com>
11379
11380         * breakpoint.c (bp_location): Rename to ...
11381         (bp_locations): ... this.  All references updated.
11382         (bp_location_count): Rename to ...
11383         (bp_locations_count): ... this.  All references updated.
11384         (bp_location_placed_address_before_address_max): Rename to ...
11385         (bp_locations_placed_address_before_address_max): ... this.  All
11386         references updated.
11387         (bp_location_shadow_len_after_address_max): Rename to ...
11388         (bp_locations_shadow_len_after_address_max): ... this.  All
11389         references updated.
11390         (bp_location_compare_addrs): Rename to ...
11391         (bp_locations_compare_addrs): ... this.  All references updated.
11392         (bp_location_compare):Rename to ...
11393         (bp_locations_compare): ... this.  All references updated.
11394         (bp_location_target_extensions_update): Rename to ...
11395         (bp_locations_target_extensions_update): ... this.  All references
11396         updated.
11397
11398 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11399
11400         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11401         * common/common.m4: Check headers 'termios.h', 'termio.h' and
11402         'sgtty.h'.
11403         * common/gdb_termios.h: New file, with parts of "terminal.h".
11404         * inflow.c: Include "gdb_termios.h".
11405         * ser-unix.c: Include "gdb_termios.h".
11406         * terminal.h: Move terminal-related defines to
11407         "common/gdb_termios.h".
11408
11409 2017-04-12  Tom Tromey  <tom@tromey.com>
11410
11411         * probe.c (parse_probes): Update.
11412         * location.h (delete_event_location): Don't declare.
11413         (event_location_deleter::operator()): Update.
11414         * location.c (event_location_deleter::operator()): Rename from
11415         delete_event_location.
11416         * linespec.h (linespec_result) <location>: Change type to
11417         event_location_up.
11418         * linespec.c (canonicalize_linespec, event_location_to_sals)
11419         (decode_objc): Update.
11420         (linespec_result): Don't call delete_event_location.
11421         * breakpoint.c (create_breakpoints_sal)
11422         (bkpt_probe_create_sals_from_location)
11423         (strace_marker_create_sals_from_location): Update.
11424
11425 2017-04-12  Tom Tromey  <tom@tromey.com>
11426
11427         * linespec.h (struct linespec_result): Add constructor and
11428         destructor.
11429         (init_linespec_result, destroy_linespec_result)
11430         (make_cleanup_destroy_linespec_result): Don't declare.
11431         * linespec.c (init_linespec_result): Remove.
11432         (linespec_result::~linespec_result): Rename from
11433         destroy_linespec_result.  Update.
11434         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11435         Remove.
11436         * breakpoint.c (create_breakpoint, break_range_command)
11437         (decode_location_default): Update.
11438         * ax-gdb.c (agent_command_1): Update.
11439
11440 2017-04-12  Tom Tromey  <tom@tromey.com>
11441
11442         * remote.c (remote_download_tracepoint): Update.
11443         * python/py-breakpoint.c (bppy_get_location): Update.
11444         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11445         (gdbscm_breakpoint_location): Update.
11446         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11447         * breakpoint.h (struct breakpoint) <location, location_range_end>:
11448         Change type to event_location_up.
11449         * breakpoint.c (create_overlay_event_breakpoint)
11450         (create_longjmp_master_breakpoint)
11451         (create_std_terminate_master_breakpoint)
11452         (create_exception_master_breakpoint)
11453         (breakpoint_event_location_empty_p, print_breakpoint_location)
11454         (print_one_breakpoint_location, create_thread_event_breakpoint)
11455         (init_breakpoint_sal, create_breakpoint)
11456         (print_recreate_ranged_breakpoint, break_range_command)
11457         (init_ada_exception_breakpoint, say_where): Update.
11458         (base_breakpoint_dtor): Don't call delete_event_location.
11459         (bkpt_print_recreate, tracepoint_print_recreate)
11460         (dprintf_print_recreate, update_static_tracepoint)
11461         (breakpoint_re_set_default): Update.
11462
11463 2017-04-12  Tom Tromey  <tom@tromey.com>
11464
11465         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11466         type of "to_do".  Update.
11467         (compute_stack_depth): Use std::vector.
11468
11469 2017-04-12  Tom Tromey  <tom@tromey.com>
11470
11471         * printcmd.c (find_instruction_backward): Use std::vector.
11472
11473 2017-04-12  Tom Tromey  <tom@tromey.com>
11474
11475         * symfile.c (objfilep): Remove typedef.
11476         (reread_symbols): Use a std::vector.
11477
11478 2017-04-12  Tom Tromey  <tom@tromey.com>
11479
11480         * mi/mi-main.c (exec_direction_forward): Remove.
11481         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11482         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11483         scoped_restore.
11484         * guile/guile.c (guile_repl_command, guile_command)
11485         (gdbscm_execute_gdb_command): Use scoped_restore.
11486         * go-exp.y (go_parse): Use scoped_restore.
11487         * d-exp.y (d_parse): Use scoped_restore.
11488         * cli/cli-decode.c (cmd_func): Use scoped_restore.
11489         * c-exp.y (c_parse): Use scoped_restore.
11490
11491 2017-04-12  Tom Tromey  <tom@tromey.com>
11492
11493         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11494         (mi_parse): Update return type.
11495         (mi_parse_free): Remove.
11496         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11497         (mi_parse::~mi_parse): Rename from mi_parse_free.
11498         (mi_parse_cleanup): Remove.
11499         (mi_parse): Return a unique_ptr.  Use new.
11500         * mi/mi-main.c (mi_execute_command): Update.
11501
11502 2017-04-12  Tom Tromey  <tom@tromey.com>
11503
11504         * location.c (explicit_location_lex_one): Return a
11505         unique_xmalloc_ptr.
11506         (string_to_explicit_location): Update.  Remove cleanups.
11507
11508 2017-04-12  Tom Tromey  <tom@tromey.com>
11509
11510         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11511         (compare_value_and_voffset): Change type.  Update.
11512         (compute_vtable_size): Change type of "offset_vec".
11513         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
11514         (gnuv3_get_typeid): Remove extraneous declaration.
11515
11516 2017-04-12  Tom Tromey  <tom@tromey.com>
11517
11518         * charset.h (wchar_iterator): Fix comment.
11519
11520 2017-04-12  Tom Tromey  <tom@tromey.com>
11521
11522         * charset.c (iconv_wrapper): New class.
11523         (cleanup_iconv): Remove.
11524         (convert_between_encodings): Use it.
11525
11526 2017-04-12  Tom Tromey  <tom@tromey.com>
11527
11528         * symfile.h (increment_reading_symtab): Update type.
11529         * symfile.c (decrement_reading_symtab): Remove.
11530         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11531         * psymtab.c (psymtab_to_symtab): Update.
11532         * dwarf2read.c (dw2_instantiate_symtab): Update.
11533
11534 2017-04-12  Tom Tromey  <tom@tromey.com>
11535
11536         * jit.c (struct jit_reader): Declare separately.  Add constructor
11537         and destructor.  Change type of "handle".
11538         (loaded_jit_reader): Define separately.
11539         (jit_reader_load): Update.  New "new".
11540         (jit_reader_unload_command): Use "delete".
11541         * gdb-dlfcn.h (struct dlclose_deleter): New.
11542         (gdb_dlhandle_up): New typedef.
11543         (gdb_dlopen, gdb_dlsym): Update types.
11544         (gdb_dlclose): Remove.
11545         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11546         (gdb_dlsym): Change type of "handle".
11547         (make_cleanup_dlclose): Remove.
11548         (dlclose_deleter::operator()): Rename from gdb_dlclose.
11549         * compile/compile-c-support.c (load_libcc): Update.
11550
11551 2017-04-12  Tom Tromey  <tom@tromey.com>
11552
11553         * symtab.h (find_pcs_for_symtab_line): Change return type.
11554         * symtab.c (find_pcs_for_symtab_line): Change return type.
11555         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11556         type of "vec".  Update.
11557         (ltpy_get_pcs_for_line): Update.
11558         * linespec.c (decode_digits_ordinary): Update.
11559
11560 2017-04-12  Tom Tromey  <tom@tromey.com>
11561
11562         * tracepoint.c (actions_command): Update.
11563         * python/python.c (python_command, python_interactive_command):
11564         Update.
11565         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11566         * guile/guile.c (guile_command): Update.
11567         * defs.h (read_command_lines, read_command_lines_1): Return
11568         command_line_up.
11569         (command_lines_deleter): New struct.
11570         (command_line_up): New typedef.
11571         * compile/compile.c (compile_code_command)
11572         (compile_print_command): Update.
11573         * cli/cli-script.h (get_command_line, copy_command_lines): Return
11574         command_line_up.
11575         (make_cleanup_free_command_lines): Remove.
11576         * cli/cli-script.c (get_command_line, read_command_lines_1)
11577         (copy_command_lines): Return command_line_up.
11578         (while_command, if_command, read_command_lines, define_command)
11579         (document_command): Update.
11580         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11581         Remove.
11582         * breakpoint.h (breakpoint_set_commands): Change type of
11583         "commands".
11584         * breakpoint.c (breakpoint_set_commands): Change type of
11585         "commands".  Update.
11586         (do_map_commands_command, update_dprintf_command_list)
11587         (create_tracepoint_from_upload): Update.
11588
11589 2017-04-12  Tom Tromey  <tom@tromey.com>
11590
11591         * tracepoint.c (scope_info): Update.
11592         * spu-tdep.c (spu_catch_start): Update.
11593         * python/python.c (gdbpy_decode_line): Update.
11594         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11595         * python/py-breakpoint.c (bppy_init): Update.
11596         * probe.c (parse_probes): Update.
11597         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11598         * location.h (event_location_deleter): New struct.
11599         (event_location_up): New typedef.
11600         (new_linespec_location, new_address_location, new_probe_location)
11601         (new_explicit_location, copy_event_location)
11602         (string_to_event_location, string_to_event_location_basic)
11603         (string_to_explicit_location): Update return type.
11604         (make_cleanup_delete_event_location): Remove.
11605         * location.c (new_linespec_location, new_address_location)
11606         (new_probe_location, new_explicit_location, copy_event_location):
11607         Return event_location_up.
11608         (delete_event_location_cleanup)
11609         (make_cleanup_delete_event_location): Remove.
11610         (string_to_explicit_location, string_to_event_location_basic)
11611         (string_to_event_location): Return event_location_up.
11612         * linespec.c (canonicalize_linespec, event_location_to_sals)
11613         (decode_line_with_current_source)
11614         (decode_line_with_last_displayed, decode_objc): Update.
11615         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11616         * completer.c (location_completer): Update.
11617         * cli/cli-cmds.c (edit_command, list_command): Update.
11618         * breakpoint.c (create_overlay_event_breakpoint)
11619         (create_longjmp_master_breakpoint)
11620         (create_std_terminate_master_breakpoint)
11621         (create_exception_master_breakpoint)
11622         (create_thread_event_breakpoint): Update.
11623         (init_breakpoint_sal): Update.  Remove some dead code.
11624         (create_breakpoint_sal): Change type of "location".  Update.
11625         (create_breakpoints_sal, create_breakpoint, break_command_1)
11626         (dprintf_command, break_range_command, until_break_command)
11627         (init_ada_exception_breakpoint)
11628         (strace_marker_create_sals_from_location)
11629         (update_static_tracepoint, trace_command, ftrace_command)
11630         (strace_command, create_tracepoint_from_upload): Update.
11631         * break-catch-throw.c (re_set_exception_catchpoint): Update.
11632         * ax-gdb.c (agent_command_1): Update.
11633
11634 2017-04-12  Pedro Alves  <palves@redhat.com>
11635
11636         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11637         * configure.tgt: Handle i[34567]86-*-go32* and
11638         i[34567]86-*-msdosdjgpp*.
11639         * i386-tdep.c (i386_svr4_reg_to_regnum):
11640         Make extern.
11641         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11642         i386-go32-tdep.c.
11643         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11644         * i386-go32-tdep.c: New file.
11645         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
11646         declarations.
11647
11648 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
11649
11650         * aix-thread.c (pd_status2str): Change return type to const char *.
11651
11652 2017-04-12  Pedro Alves  <palves@redhat.com>
11653
11654         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
11655         calls to set_gdbarch_gnu_triplet_regexp.
11656
11657 2017-04-12  Pedro Alves  <palves@redhat.com>
11658
11659         PR gdb/21323
11660         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
11661         New enum value.
11662         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
11663         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
11664         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
11665         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
11666         * gdbarch.h, gdbarch.c: Regenerate.
11667         * aarch64-tdep.c (aarch64_gdbarch_init): Override
11668         gdbarch_wchar_bit and gdbarch_wchar_signed.
11669         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
11670         * arm-tdep.c (arm_gdbarch_init): Likewise.
11671         * avr-tdep.c (avr_gdbarch_init): Likewise.
11672         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
11673         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
11674         * i386-tdep.c (i386_go32_init_abi): Likewise.
11675         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11676         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11677         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11678         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11679         * sh-tdep.c (sh_gdbarch_init): Likewise.
11680         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11681         * sparc64-tdep.c (sparc64_init_abi): Likewise.
11682         * windows-tdep.c (windows_init_abi): Likewise.
11683         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11684
11685 2017-04-12  Pedro Alves  <palves@redhat.com>
11686
11687         PR c++/21323
11688         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
11689         cplus_primitive_type_char32_t>: New enum values.
11690         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
11691         and cplus_primitive_type_char32_t.
11692         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
11693         32, use the archtecture's built-in type for char16_t and char32_t,
11694         respectively.  Otherwise, fallback to init_integer_type as before,
11695         but make the type unsigned, and issue a complaint.
11696         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
11697
11698 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
11699
11700         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
11701         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
11702
11703 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11704
11705         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
11706         'const char *'.
11707
11708 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11709
11710         * common/common-utils.c (free_vector_argv): New function.
11711         * common/common-utils.h: Include <vector>.
11712         (free_vector_argv): New prototype.
11713         * darwin-nat.c (darwin_create_inferior): Rewrite function
11714         prototype in order to constify "exec_file" and accept a
11715         "std::string" for "allargs".
11716         * fork-child.c: Include <vector>.
11717         (breakup_args): Rewrite function, using C++.
11718         (fork_inferior): Rewrite function header, constify "exec_file_arg"
11719         and accept "std::string" for "allargs".  Update the code to
11720         calculate "argv" based on "allargs".  Update calls to "exec_fun"
11721         and "execvp".
11722         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
11723         order to constify "exec_file" and accept a "std::string" for
11724         "allargs".
11725         * go32-nat.c (go32_create_inferior): Likewise.
11726         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
11727         * infcmd.c (run_command_1): Constify "exec_file".  Use
11728         "std::string" for inferior arguments.
11729         * inferior.h (fork_inferior): Update prototype.
11730         * linux-nat.c (linux_nat_create_inferior): Rewrite function
11731         prototype in order to constify "exec_file" and accept a
11732         "std::string" for "allargs".
11733         * nto-procfs.c (procfs_create_inferior): Likewise.
11734         * procfs.c (procfs_create_inferior): Likewise.
11735         * remote-sim.c (gdbsim_create_inferior): Likewise.
11736         * remote.c (extended_remote_run): Update code to accept
11737         "std::string" as argument.
11738         (extended_remote_create_inferior): Rewrite function prototype in
11739         order to constify "exec_file" and accept a "std::string" for
11740         "allargs".
11741         * rs6000-nat.c (super_create_inferior): Likewise.
11742         (rs6000_create_inferior): Likewise.
11743         * target.h (struct target_ops) <to_create_inferior>: Likewise.
11744         * windows-nat.c (windows_create_inferior): Likewise.
11745
11746 2017-04-11  Pedro Alves  <palves@redhat.com>
11747
11748         * thread.c: Fix whitespace throughout.
11749
11750 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11751
11752         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
11753
11754 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
11755
11756         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
11757
11758 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
11759
11760         PR gdb/21364
11761         * osdata.c (info_osdata): Check if 'type' is an empty string
11762         instead of NULL.
11763
11764 2017-04-10  Pedro Alves  <palves@redhat.com>
11765
11766         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
11767         (ptid_to_global_thread_id, in_thread_list)
11768         (do_captured_list_thread_ids, set_resumed, set_running)
11769         (set_executing, set_stop_requested, finish_thread_state)
11770         (validate_registers_access, can_access_registers_ptid)
11771         (print_thread_info_1, switch_to_thread)
11772         (do_restore_current_thread_cleanup)
11773         (make_cleanup_restore_current_thread, thread_command)
11774         (thread_name_command): Use operator== instead of ptid_equal.
11775
11776 2017-04-10  Pedro Alves  <palves@redhat.com>
11777
11778         * thread.c (struct current_thread_cleanup) <next>: Delete field.
11779         (current_thread_cleanup_chain): Delete.
11780         (restore_current_thread_cleanup_dtor)
11781         (make_cleanup_restore_current_thread): Remove references to
11782         current_thread_cleanup_chain.
11783
11784 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
11785
11786         * msp430-tdep.c (msp430_pseudo_register_read): Never return
11787         REG_UNKNOWN.
11788
11789 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11790
11791         PR gdb/19942
11792         * gdbthread.h (thread_info::deletable): New method.
11793         (thread_info::incref): New method.
11794         (thread_info::decref): New method.
11795         (thread_info::refcount): Move it to private.
11796         * infrun.c (save_stop_context): Call inc_refcount.
11797         (release_stop_context_cleanup): Likewise.
11798         * thread.c (set_thread_exited): New function.
11799         (init_thread_list): Delete "tp" only it is deletable, otherwise
11800         call set_thread_exited.
11801         (delete_thread_1): Call set_thread_exited.
11802         (current_thread_cleanup) <inferior_pid>: Remove.
11803         <thread>: New field.
11804         (restore_current_thread_ptid_changed): Removed.
11805         (do_restore_current_thread_cleanup): Adjust.
11806         (restore_current_thread_cleanup_dtor): Don't call
11807         find_thread_ptid.
11808         (set_thread_refcount): Use dec_refcount.
11809         (make_cleanup_restore_current_thread): Adjust.
11810         (thread_apply_all_command): Call inc_refcount.
11811         (_initialize_thread): Don't call
11812         observer_attach_thread_ptid_changed.
11813
11814 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11815
11816         * thread.c (delete_thread_1): Hoist code on marking thread as
11817         exited.
11818
11819 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11820
11821         * windows-nat.c (windows_detach): Initialize ptid with
11822         minus_one_ptid.
11823
11824 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11825
11826         * unittests/ptid-selftests.c: Fix erroneous assert messages.
11827
11828 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
11829
11830         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
11831         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
11832         (bfin_pseudo_register_write): Likewise
11833
11834 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
11835
11836         * common/ptid.h (struct ptid): Change to...
11837         (class ptid_t): ... this.
11838         <ptid_t>: New constructors.
11839         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
11840         matches>: New methods.
11841         <make_null, make_minus_one>: New static methods.
11842         <pid>: Rename to...
11843         <m_pid>: ...this.
11844         <lwp>: Rename to...
11845         <m_lwp>: ...this.
11846         <tid>: Rename to...
11847         <m_tid>: ...this.
11848         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
11849         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
11850         as references, move comment to class ptid_t.
11851         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
11852         ptid_t static methods.
11853         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
11854         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
11855         Take ptid arguments as references, implement using ptid_t methods.
11856         * unittests/ptid-selftests.c: New file.
11857         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11858         unittests/ptid-selftests.c.
11859         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
11860
11861 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
11862
11863         * python/python.c (python_run_simple_file): Cast mode literal to
11864         non-const char pointer as expected by PyFile_FromString.
11865
11866 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
11867
11868         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
11869         minus_one_ptid and null_ptid.
11870
11871 2017-04-05  Pedro Alves  <palves@redhat.com>
11872
11873         * warning.m4 (build_warnings): Remove -Wno-write-strings.
11874         * configure: Regenerate.
11875
11876 2017-04-05  Pedro Alves  <palves@redhat.com>
11877
11878         * ada-exp.y (yyerror): Constify.
11879         * ada-lang.c (bound_name, get_selections)
11880         (ada_variant_discrim_type)
11881         (ada_variant_discrim_name, ada_value_struct_elt)
11882         (ada_lookup_struct_elt_type, is_unchecked_variant)
11883         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
11884         (catch_ada_exception_command_split)
11885         (catch_ada_assert_command_split, catch_assert_command)
11886         (ada_op_name): Constify.
11887         * ada-lang.h (ada_yyerror, get_selections)
11888         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
11889         * arc-tdep.c (arc_print_frame_cache): Constify.
11890         * arm-tdep.c (arm_skip_stub): Constify.
11891         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
11892         (gen_aggregate_elt_ref): Constify.
11893         * bcache.c (print_bcache_statistics): Constify.
11894         * bcache.h (print_bcache_statistics): Constify.
11895         * break-catch-throw.c (catch_exception_command_1):
11896         * breakpoint.c (struct ep_type_description::description):
11897         Constify.
11898         (add_solib_catchpoint): Constify.
11899         (catch_fork_command_1): Add cast.
11900         (add_catch_command): Constify.
11901         * breakpoint.h (add_catch_command, add_solib_catchpoint):
11902         Constify.
11903         * bsd-uthread.c (bsd_uthread_state): Constify.
11904         * buildsym.c (patch_subfile_names): Constify.
11905         * buildsym.h (next_symbol_text_func, patch_subfile_names):
11906         Constify.
11907         * c-exp.y (yyerror): Constify.
11908         (token::oper): Constify.
11909         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
11910         * c-varobj.c (cplus_describe_child): Constify.
11911         * charset.c (find_charset_names): Add cast.
11912         (find_charset_names): Constify array and add const_cast.
11913         * cli/cli-cmds.c (complete_command, cd_command): Constify.
11914         (edit_command): Constify.
11915         * cli/cli-decode.c (lookup_cmd): Constify.
11916         * cli/cli-dump.c (dump_memory_command, dump_value_command):
11917         Constify.
11918         (struct dump_context): Constify.
11919         (add_dump_command, restore_command): Constify.
11920         * cli/cli-script.c (get_command_line): Constify.
11921         * cli/cli-script.h (get_command_line): Constify.
11922         * cli/cli-utils.c (check_for_argument): Constify.
11923         * cli/cli-utils.h (check_for_argument): Constify.
11924         * coff-pe-read.c (struct read_pe_section_data): Constify.
11925         * command.h (lookup_cmd): Constify.
11926         * common/print-utils.c (decimal2str): Constify.
11927         * completer.c (gdb_print_filename): Constify.
11928         * corefile.c (set_gnutarget): Constify.
11929         * cp-name-parser.y (yyerror): Constify.
11930         * cp-valprint.c (cp_print_class_member): Constify.
11931         * cris-tdep.c (cris_register_name, crisv32_register_name):
11932         Constify.
11933         * d-exp.y (yyerror): Constify.
11934         (struct token::oper): Constify.
11935         * d-lang.h (d_yyerror): Constify.
11936         * dbxread.c (struct header_file_location::name): Constify.
11937         (add_old_header_file, add_new_header_file, last_function_name)
11938         (dbx_next_symbol_text, add_bincl_to_list)
11939         (find_corresponding_bincl_psymtab, set_namestring)
11940         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
11941         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
11942         * defs.h (command_line_input, print_address_symbolic)
11943         (deprecated_readline_begin_hook): Constify.
11944         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
11945         Constify.
11946         * event-top.c (handle_line_of_input): Constify and add cast.
11947         * exceptions.c (catch_errors): Constify.
11948         * exceptions.h (catch_errors): Constify.
11949         * expprint.c (print_subexp_standard, op_string, op_name)
11950         (op_name_standard, dump_raw_expression, dump_raw_expression):
11951         * expression.h (op_name, op_string, dump_raw_expression):
11952         Constify.
11953         * f-exp.y (yyerror): Constify.
11954         (struct token::oper): Constify.
11955         (struct f77_boolean_val::name): Constify.
11956         * f-lang.c (f_word_break_characters): Constify.
11957         * f-lang.h (f_yyerror): Constify.
11958         * fork-child.c (fork_inferior): Add cast.
11959         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
11960         (new_variant): Constify.
11961         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
11962         * gdbarch.c: Regenerate.
11963         * gdbcore.h (set_gnutarget): Constify.
11964         * go-exp.y (yyerror): Constify.
11965         (token::oper): Constify.
11966         * go-lang.h (go_yyerror): Constify.
11967         * go32-nat.c (go32_sysinfo): Constify.
11968         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
11969         * guile/scm-cmd.c (cmdscm_function): Constify.
11970         * guile/scm-param.c (pascm_param_value): Constify.
11971         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
11972         (h8300sx_register_name): Constify.
11973         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
11974         Constify.
11975         * ia64-tdep.c (ia64_register_names): Constify.
11976         * infcmd.c (construct_inferior_arguments): Constify.
11977         (path_command, attach_post_wait): Constify.
11978         * language.c (show_range_command, show_case_command)
11979         (unk_lang_error): Constify.
11980         * language.h (language_defn::la_error)
11981         (language_defn::la_name_of_this): Constify.
11982         * linespec.c (decode_line_2): Constify.
11983         * linux-thread-db.c (thread_db_err_str): Constify.
11984         * lm32-tdep.c (lm32_register_name): Constify.
11985         * m2-exp.y (yyerror): Constify.
11986         * m2-lang.h (m2_yyerror): Constify.
11987         * m32r-tdep.c (m32r_register_names): Constify and make static.
11988         * m68hc11-tdep.c (m68hc11_register_names): Constify.
11989         * m88k-tdep.c (m88k_register_name): Constify.
11990         * macroexp.c (appendmem): Constify.
11991         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
11992         (upgrade_type, parse_external, parse_partial_symbols)
11993         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
11994         (new_symbol): Constify.
11995         * memattr.c (mem_info_command): Constify.
11996         * mep-tdep.c (register_name_from_keyword): Constify.
11997         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
11998         Constify.
11999         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12000         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12001         * mi/mi-main.c (captured_mi_execute_command): Constify and add
12002         cast.
12003         (mi_execute_async_cli_command): Constify.
12004         * mips-tdep.c (mips_register_name): Constify.
12005         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12006         (am33_register_name, am33_2_register_name)
12007         * moxie-tdep.c (moxie_register_names): Constify.
12008         * nat/linux-osdata.c (osdata_type): Constify fields.
12009         * nto-tdep.c (nto_parse_redirection): Constify.
12010         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12011         (lookup_child_selector): Constify.
12012         (objc_methcall::name): Constify.
12013         * objc-lang.h (lookup_objc_class, lookup_child_selector)
12014         (lookup_struct_typedef): Constify.
12015         * objfiles.c (pc_in_section): Constify.
12016         * objfiles.h (pc_in_section): Constify.
12017         * p-exp.y (struct token::oper): Constify.
12018         (yyerror): Constify.
12019         * p-lang.h (pascal_yyerror): Constify.
12020         * parser-defs.h (op_name_standard): Constify.
12021         (op_print::string): Constify.
12022         (exp_descriptor::op_name): Constify.
12023         * printcmd.c (print_address_symbolic): Constify.
12024         * psymtab.c (print_partial_symbols): Constify.
12025         * python/py-breakpoint.c (stop_func): Constify.
12026         (bppy_get_expression): Constify.
12027         * python/py-cmd.c (cmdpy_completer::name): Constify.
12028         (cmdpy_function): Constify.
12029         * python/py-event.c (evpy_add_attribute)
12030         (gdbpy_initialize_event_generic): Constify.
12031         * python/py-event.h (evpy_add_attribute)
12032         (gdbpy_initialize_event_generic): Constify.
12033         * python/py-evts.c (add_new_registry): Constify.
12034         * python/py-finishbreakpoint.c (outofscope_func): Constify.
12035         * python/py-framefilter.c (get_py_iter_from_func): Constify.
12036         * python/py-inferior.c (get_buffer): Add cast.
12037         * python/py-param.c (parm_constant::name): Constify.
12038         * python/py-unwind.c (fprint_frame_id): Constify.
12039         * python/python.c (gdbpy_parameter_value): Constify.
12040         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12041         * remote.c (memory_packet_config::name): Constify.
12042         (show_packet_config_cmd, remote_write_bytes)
12043         (remote_buffer_add_string):
12044         * reverse.c (exec_reverse_once): Constify.
12045         * rs6000-tdep.c (variant::name, variant::description): Constify.
12046         * rust-exp.y (rustyyerror): Constify.
12047         * rust-lang.c (rust_op_name): Constify.
12048         * rust-lang.h (rustyyerror): Constify.
12049         * serial.h (serial_ops::name): Constify.
12050         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12051         (sh_sh3e_register_name, sh_sh2e_register_name)
12052         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12053         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12054         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12055         (sh_sh4al_dsp_register_name): Constify.
12056         * sh64-tdep.c (sh64_register_name): Constify.
12057         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12058         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12059         * stabsread.c (patch_block_stabs, read_type_number)
12060         (ref_map::stabs, ref_add, process_reference)
12061         (symbol_reference_defined, define_symbol, define_symbol)
12062         (error_type, read_type, read_member_functions, read_cpp_abbrev)
12063         (read_one_struct_field, read_struct_fields, read_baseclasses)
12064         (read_tilde_fields, read_struct_type, read_array_type)
12065         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12066         (read_huge_number, read_range_type, read_args, common_block_start)
12067         (find_name_end): Constify.
12068         * stabsread.h (common_block_start, define_symbol)
12069         (process_one_symbol, symbol_reference_defined, ref_add):
12070         * symfile.c (get_section_index, add_symbol_file_command):
12071         * symfile.h (get_section_index): Constify.
12072         * target-descriptions.c (tdesc_type::name): Constify.
12073         (tdesc_free_type): Add cast.
12074         * target.c (find_default_run_target):
12075         (add_deprecated_target_alias, find_default_run_target)
12076         (target_announce_detach): Constify.
12077         (do_option): Constify.
12078         * target.h (add_deprecated_target_alias): Constify.
12079         * thread.c (print_thread_info_1): Constify.
12080         * top.c (deprecated_readline_begin_hook, command_line_input):
12081         Constify.
12082         (init_main): Add casts.
12083         * top.h (handle_line_of_input): Constify.
12084         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12085         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12086         (tfind_command): Rename to ...
12087         (tfind_command_1): ... this and constify.
12088         (tfind_command): New function.
12089         (tfind_end_command, tfind_start_command): Adjust.
12090         (encode_source_string): Constify.
12091         * tracepoint.h (encode_source_string): Constify.
12092         * tui/tui-data.c (tui_partial_win_by_name): Constify.
12093         * tui/tui-data.h (tui_partial_win_by_name): Constify.
12094         * tui/tui-source.c (tui_set_source_content_nil): Constify.
12095         * tui/tui-source.h (tui_set_source_content_nil): Constify.
12096         * tui/tui-win.c (parse_scrolling_args): Constify.
12097         * tui/tui-windata.c (tui_erase_data_content): Constify.
12098         * tui/tui-windata.h (tui_erase_data_content): Constify.
12099         * tui/tui-winsource.c (tui_erase_source_content): Constify.
12100         * tui/tui.c (tui_enable): Add cast.
12101         * utils.c (defaulted_query): Constify.
12102         (init_page_info): Add cast.
12103         (puts_debug, subset_compare): Constify.
12104         * utils.h (subset_compare): Constify.
12105         * varobj.c (varobj_format_string): Constify.
12106         * varobj.h (varobj_format_string): Constify.
12107         * vax-tdep.c (vax_register_name): Constify.
12108         * windows-nat.c (windows_detach): Constify.
12109         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12110         * xml-support.c (gdb_xml_end_element): Constify.
12111         * xml-tdesc.c (tdesc_start_reg): Constify.
12112         * xstormy16-tdep.c (xstormy16_register_name): Constify.
12113         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12114         * xtensa-tdep.h (xtensa_register_t::name): Constify.
12115
12116 2017-04-05  Pedro Alves  <palves@redhat.com>
12117
12118         * proc-api.c (struct trans): Constify.
12119         (procfs_note): Constify.
12120         * proc-events.c (struct trans, syscall_table):
12121         * proc-flags.c (struct trans): Constify.
12122         * proc-utils.h (procfs_note): Constify.
12123         * proc-why.c (struct trans): Constify.
12124         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12125         (procfs_detach): Constify.
12126         * sol-thread.c (struct string_map): Constify.
12127         (td_err_string, td_state_string): Constify.
12128
12129 2017-04-05  Pedro Alves  <palves@redhat.com>
12130
12131         * proc-api.c (procfs_filename): Don't initialize
12132         procfs_filename.
12133         (prepare_to_trace): Assume procfs_filename is non-NULL.
12134         (_initialize_proc_api): Give procfs_filename a default value here.
12135
12136 2017-04-05  Pedro Alves  <palves@redhat.com>
12137
12138         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12139         'cond_string' parameter.
12140         (extract_exception_regexp): Constify 'string' parameter.
12141         (catch_exception_command_1): Constify.
12142         * breakpoint.c (init_catchpoint)
12143         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12144         parameter.
12145         (ep_parse_optional_if_clause, catch_fork_command_1)
12146         (catch_exec_command_1): Constify.
12147         * breakpoint.h (init_catchpoint): Constify 'cond_string'
12148         parameter.
12149         (ep_parse_optional_if_clause): Constify.
12150         * cli/cli-utils.c (remove_trailing_whitespace)
12151         (check_for_argument): Constify.
12152         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12153         non-const overload.
12154         (check_for_argument): Likewise.
12155
12156 2017-04-05  Pedro Alves  <palves@redhat.com>
12157
12158         * event-top.c (command_line_handler): Add cast to execute_command
12159         call.
12160         * record-btrace.c (cmd_record_btrace_bts_start)
12161         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12162         (cmd_record_btrace_start): Add cast to execute_command call.
12163         * record-full.c (record_full_goto_insn):
12164         * record.c (record_start, record_stop): Add cast to
12165         execute_command_to_string calls.
12166         (cmd_record_start): Add cast to execute_command calls.
12167
12168 2017-04-05  Pedro Alves  <palves@redhat.com>
12169
12170         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12171         static inline function.
12172         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12173         array and use gdb_PyArg_ParseTupleAndKeywords.
12174         * python/py-cmd.c (cmdpy_init): Likewise.
12175         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12176         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12177         (infpy_search_memory): Likewise.
12178         * python/py-objfile.c (objfpy_add_separate_debug_file)
12179         (gdbpy_lookup_objfile): Likewise.
12180         * python/py-symbol.c (gdbpy_lookup_symbol)
12181         (gdbpy_lookup_global_symbol): Likewise.
12182         * python/py-type.c (gdbpy_lookup_type): Likewise.
12183         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12184         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12185         Likewise.
12186
12187 2017-04-05  Pedro Alves  <palves@redhat.com>
12188
12189         * python/python-internal.h (gdb_PyGetSetDef): New type.
12190         * python/py-block.c (block_object_getset)
12191         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12192         * python/py-event.c (event_object_getset)
12193         (finish_breakpoint_object_getset): Likewise.
12194         * python/py-inferior.c (inferior_object_getset): Likewise.
12195         * python/py-infthread.c (thread_object_getset): Likewise.
12196         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12197         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12198         * python/py-objfile.c (objfile_getset): Likewise.
12199         * python/py-progspace.c (pspace_getset): Likewise.
12200         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12201         Likewise.
12202         * python/py-record.c (recpy_record_getset): Likewise.
12203         * python/py-symbol.c (symbol_object_getset): Likewise.
12204         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12205         Likewise.
12206         * python/py-type.c (type_object_getset, field_object_getset):
12207         Likewise.
12208         * python/py-value.c (value_object_getset): Likewise.
12209
12210 2017-04-05  Pedro Alves  <palves@redhat.com>
12211
12212         * python/python-internal.h (gdb_PyObject_CallMethod)
12213         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12214         New functions.
12215         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12216         (PySys_GetObject, PySys_SetPath): New macros.
12217
12218 2017-04-05  Pedro Alves  <palves@redhat.com>
12219
12220         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12221         info_osdata_command.
12222         * osdata.c (info_osdata_command): Rename to ...
12223         (info_osdata): ... this.  Constify 'type' parameter, and remove
12224         the 'from_tty' parameter.  Accept NULL TYPE.
12225         (info_osdata_command): New function.
12226         * osdata.h (info_osdata_command): Remove declaration.
12227         (info_osdata): New declaration.
12228
12229 2017-04-05  Pedro Alves  <palves@redhat.com>
12230
12231         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12232         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12233         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12234         parameter.
12235         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12236         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12237         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12238         parameter.
12239         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12240         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12241         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12242         (mi_cmd_file_list_exec_source_files)
12243         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12244         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12245         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12246         parameter.
12247         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12248         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12249         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12250         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12251         (mi_cmd_stack_info_frame): Constify 'command' parameter.
12252         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12253         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12254         'command' parameter.
12255         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12256         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12257         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12258         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12259         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12260         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12261         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12262         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12263         (mi_cmd_var_set_update_range): Constify 'command' parameter.
12264         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12265         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12266         parameter.
12267         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12268         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12269         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12270         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12271         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12272         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12273         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12274         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12275         (mi_cmd_data_list_changed_registers)
12276         (mi_cmd_data_write_register_values)
12277         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12278         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12279         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12280         (mi_cmd_list_features, mi_cmd_list_target_features)
12281         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12282         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12283         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12284         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12285         (mi_cmd_trace_frame_collected): Constify 'command'
12286         parameter.
12287         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12288         'command' parameter.
12289
12290 2017-04-05  Pedro Alves  <palves@redhat.com>
12291
12292         * ada-lang.c (ada_completer_word_break_characters): Now a const
12293         array.
12294         (ada_get_gdb_completer_word_break_characters): Constify.
12295         * completer.c (gdb_completer_command_word_break_characters)
12296         (gdb_completer_file_name_break_characters)
12297         (gdb_completer_quote_characters): Now const arrays.
12298         (get_gdb_completer_quote_characters): Constify.
12299         (set_rl_completer_word_break_characters): New function.
12300         (set_gdb_completion_word_break_characters)
12301         (complete_line_internal): Use it.
12302         * completer.h (get_gdb_completer_quote_characters): Constify.
12303         (set_rl_completer_word_break_characters): Declare.
12304         * f-lang.c (f_word_break_characters): Constify.
12305         * language.c (default_word_break_characters): Constify.
12306         * language.h (language_defn::la_word_break_characters): Constify.
12307         (default_word_break_characters): Constify.
12308         * top.c (init_main): Use set_rl_completer_word_break_characters.
12309
12310 2017-04-05  Pedro Alves  <palves@redhat.com>
12311
12312         * aix-thread.c (aix_thread_pid_to_str)
12313         (aix_thread_extra_thread_info): Constify.
12314         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12315         * bsd-uthread.c (bsd_uthread_extra_thread_info)
12316         (bsd_uthread_pid_to_str): Constify.
12317         * corelow.c (core_pid_to_str): Constify.
12318         * darwin-nat.c (darwin_pid_to_str): Constify.
12319         * fbsd-nat.c (fbsd_pid_to_str): Constify.
12320         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12321         Constify.
12322         * gnu-nat.c (gnu_pid_to_str): Constify.
12323         * go32-nat.c (go32_pid_to_str): Constify.
12324         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12325         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12326         * inferior.c (inferior_pid_to_str): Constify.
12327         * linux-nat.c (linux_nat_pid_to_str): Constify.
12328         * linux-tdep.c (linux_core_pid_to_str): Constify.
12329         * linux-thread-db.c (thread_db_pid_to_str)
12330         (thread_db_extra_thread_info): Constify.
12331         * nto-tdep.c (nto_extra_thread_info): Constify.
12332         * nto-tdep.h (nto_extra_thread_info): Constify.
12333         * obsd-nat.c (obsd_pid_to_str): Constify.
12334         * procfs.c (procfs_pid_to_str): Constify.
12335         * ravenscar-thread.c (ravenscar_extra_thread_info)
12336         (ravenscar_pid_to_str): Constify.
12337         * remote-sim.c (gdbsim_pid_to_str): Constify.
12338         * remote.c (remote_threads_extra_info, remote_pid_to_str):
12339         Constify.
12340         * sol-thread.c (solaris_pid_to_str): Constify.
12341         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12342         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12343         * target.c (default_pid_to_str, target_pid_to_str)
12344         (normal_pid_to_str, default_pid_to_str): Constify.
12345         * target.h (target_ops::to_pid_to_str)
12346         (target_ops::to_extra_thread_info): Constify.
12347         (target_pid_to_str, normal_pid_to_str): Constify.
12348         * windows-nat.c (windows_pid_to_str): Constify.
12349         * gdbarch.sh (core_pid_to_str): Constify.
12350         * target-delegates.c: Regenerate.
12351         * gdbarch.h, gdbarch.c: Regenerate.
12352
12353 2017-04-05  Pedro Alves  <palves@redhat.com>
12354
12355         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12356         the memory of the temporary warning_pre_print override.
12357         * utils.c (warning_pre_print): Constify.
12358         * utils.h (warning_pre_print): Constify.
12359
12360 2017-04-05  Pedro Alves  <palves@redhat.com>
12361
12362         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12363         (shell_command): New function.
12364         (make_command): Use std::string.
12365         (init_cli_cmds): Register shell_command instead of shell_escape.
12366
12367 2017-04-05  Pedro Alves  <palves@redhat.com>
12368
12369         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12370         * tracepoint.c (default_collect): Don't initialize.
12371
12372 2017-04-05  Pedro Alves  <palves@redhat.com>
12373
12374         * macroexp.c (macro_buffer::shared): Now a bool.
12375         (init_buffer): Update.
12376         (init_shared_buffer): Constify 'addr' parameter.
12377         (substitute_args, expand, macro_expand, macro_expand_next): Remove
12378         casts.
12379
12380 2017-04-05  Pedro Alves  <palves@redhat.com>
12381
12382         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12383         * disasm.c (set_disassembler_options): Constify local.
12384         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12385
12386 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
12387
12388         PR gdb/21352
12389         * tracefile.c (tsave_command): Fix argument parsing for '-r'
12390         option.
12391
12392 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12393
12394         * frame.c (frame_unwind_register_unsigned): Call
12395         frame_unwind_register_value.
12396
12397 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12398
12399         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12400         Use gdb_test_multiple, and don't match anchor.
12401
12402 2017-04-05  Pedro Alves  <palves@redhat.com>
12403
12404         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12405         (Write After Approval): Remove Simon Marchi.
12406
12407 2017-04-05  Pedro Alves  <palves@redhat.com>
12408
12409         * common/gdb_optional.h (optional::optional): Make constexpr and
12410         initialize m_dummy.
12411
12412 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12413
12414         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12415         (amd64fbsd_jmp_buf_reg_offset): Remove.
12416         (amd64fbsd_supply_uthread): Remove function.
12417         (amd64fbsd_collect_uthread): Remove function.
12418         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12419         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12420         (x86_64-*-freebsd*): Remove bsd-uthread.o.
12421         (fbsd-nat.c): Update comment.
12422         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12423         (i386fbsd_jmp_buf_reg_offset): Remove.
12424         (i386fbsd_supply_uthread): Remove function.
12425         (i386fbsd_collect_uthread): Remove function.
12426         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12427
12428 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12429
12430         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12431         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12432         * NEWS: Mention that support for FreeBSD/alpha was removed.
12433         * alpha-fbsd-tdep.c: Delete file.
12434         * config/alpha/fbsd.mh: Delete file.
12435         * configure.host: Delete alpha*-*-freebsd* and
12436         alpha*-*-kfreebsd*-gnu.
12437         * configure.tgt: Delete alpha*-*-freebsd* and
12438         alpha*-*-kfreebsd*-gnu.
12439
12440 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12441
12442         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12443         amd64bsd_store_inferior_registers): Use ptid from regcache.
12444
12445 2017-04-04  Pedro Alves  <palves@redhat.com>
12446
12447         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
12448         data fields, make them private and add "m_" prefixes.
12449         (lnp_state_machine::lnp_state_machine): New ctor.
12450         (record_line, check_line_address, handle_set_discriminator)
12451         (handle_set_address, handle_advance_pc, handle_special_opcode)
12452         (handle_advance_line, handle_set_file, handle_negate_stmt)
12453         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12454         (end_sequence, advance_line): New methods.
12455         (m_gdbarch, m_record_lines_p): New fields.
12456         (lnp_reader_state): Delete.
12457         (dwarf_record_line): Rename to ...
12458         (lnp_state_machine::record_line): ... adjust.
12459         (init_lnp_state_machine): Delete.
12460         (lnp_state_machine::lnp_state_machine): New.
12461         (check_line_address): Rename to ...
12462         (lnp_state_machine::check_line_address): This.
12463         (dwarf_decode_lines_1): Remove reference to "reader_state".
12464         Adjust lnp_state_machine having a non-default ctor.  Use bool.
12465         State machine internal state manipulation moved to
12466         lnp_state_machine methods.
12467
12468 2017-04-04  Pedro Alves  <palves@redhat.com>
12469
12470         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12471         unittests/offset-type-selftests.c.
12472         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12473         * common/offset-type.h: New file.
12474         * common/preprocessor.h: New file.
12475         * common/traits.h: New file.
12476         * common/valid-expr.h: New file.
12477         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
12478         sect_offset and cu_offset strong typedefs throughout.
12479         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12480         typedefs throughout.
12481         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
12482         sect_offset and cu_offset strong typedefs throughout.
12483         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12484         typedefs throughout.
12485         * gdbtypes.h: Include "common/offset-type.h".
12486         (cu_offset): Now an offset type (strong typedef) instead of a
12487         struct.
12488         (sect_offset): Likewise.
12489         (union call_site_parameter_u): Rename "param_offset" field to
12490         "param_cu_off".
12491         * unittests/offset-type-selftests.c: New file.
12492
12493 2017-04-04  Pedro Alves  <palves@redhat.com>
12494
12495         * common/underlying.h: New file.
12496         * dwarf2read.c: Include "common/gdb_optional.h" and
12497         "common/underlying.h".
12498         (dir_index, file_name_index): New types.
12499         (file_entry): Use them.
12500         (file_entry::include): Use to_underlying.
12501         (line_header::add_file_name): Use dir_index.
12502         (read_formatted_entries): Use gdb::optional.  Read form before
12503         writting to file_entry.
12504         (dwarf_decode_line_header): Use dir_index.
12505         (lnp_state_machine::current_file): Use to_underlying.
12506         (lnp_state_machine::file): Change type to file_name_index.
12507         (dwarf_record_line): Use to_underlying.
12508         (init_lnp_state_machine): Use file_name_index.
12509         (dwarf_decode_lines_1): Use dir_index and file_name_index.
12510
12511 2017-04-04  Pedro Alves  <palves@redhat.com>
12512
12513         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12514         operator bool, has_value and get methods.
12515
12516 2017-04-04  Pedro Alves  <palves@redhat.com>
12517
12518         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12519         fields.
12520         (line_header): Initialize all data fields.  Change type of
12521         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12522         Change type of include_dirs to std::vector<const char *>.  Remove
12523         num_include_dirs, include_dirs_size.  Change type of file_names to
12524         std::vector<file_entry>.  Remove num_file_names, file_names_size.
12525         (line_header::line_header): New.
12526         (line_header::add_include_dir, line_header::add_file_name): New
12527         methods.
12528         (line_header::include_dir_at): Remove NULL check.
12529         (line_header::file_name_at): Add const overload.
12530         (line_header_up): New unique_ptr typedef.
12531         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
12532         std::vector.  Remove free_line_header call.
12533         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
12534         free_line_header call.
12535         (free_cu_line_header): Delete.
12536         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12537         (setup_type_unit_groups): Use line_header_up instead of cleanups.
12538         Adjust to use std::vector.
12539         (free_line_header): Delete.
12540         (free_line_header_voidp): Use delete.
12541         (add_include_dir): Replace with ...
12542         (line_header::add_include_dir): ... this method.  Use std::vector.
12543         (add_file_name): Replace with ...
12544         (line_header::add_file_name): ... this method.  Use std::vector.
12545         (add_include_dir_stub): Delete.
12546         (read_formatted_entries): Remove memset.
12547         (dwarf_decode_line_header): Return a line_header_up instead of a
12548         raw pointer.  Remove cleanup handling.  Pass lambdas to
12549         read_formatted_entries.  Adjust to use line_header methods.
12550         (dwarf_decode_lines_1): Adjust to use line_header methods.
12551         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12552         use std::vector.
12553
12554 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
12555
12556         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12557         instead of struct ptid.
12558
12559 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
12560
12561         * frame.c (get_frame_register_bytes): Unwind using value.
12562         (put_frame_register_bytes): Likewise.
12563
12564 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
12565
12566         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12567         aggregate-like.
12568
12569 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
12570
12571         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12572
12573 2017-03-29  Yao Qi  <yao.qi@linaro.org>
12574
12575         * gdbthread.h (struct thread_info): Declare constructor and
12576         destructor.  Add some in-class member initializers.
12577         * thread.c (free_thread): Remove.
12578         (init_thread_list): Call delete instead of free_thread.
12579         (new_thread): Call thread_info constructor.
12580         (thread_info::thread_info): New function.
12581         (thread_info::~thread_info): New function.
12582         (delete_thread_1): Call delete instead of free_thread.
12583         (make_cleanup_restore_current_thread): Move tp and frame to
12584         inner block.
12585
12586 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12587
12588         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12589         (arc_skip_prologue): Likewise.
12590         (arc_make_frame_cache): Likewise.
12591         (arc_pv_get_operand): New function.
12592         (arc_is_in_prologue): Likewise.
12593         (arc_analyze_prologue): Likewise.
12594         (arc_print_frame_cache): Likewise.
12595         (MAX_PROLOGUE_LENGTH): New constant.
12596
12597 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12598
12599         * configure.tgt: Add arc-insn.o.
12600         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12601         (dump_arc_instruction_command): New function.
12602         (arc_fprintf_disasm): Likewise.
12603         (arc_disassemble_info): Likewise.
12604         (arc_insn_get_operand_value): Likewise.
12605         (arc_insn_get_operand_value_signed): Likewise.
12606         (arc_insn_get_memory_base_reg): Likewise.
12607         (arc_insn_get_memory_offset): Likewise.
12608         (arc_insn_get_branch_target): Likewise.
12609         (arc_insn_dump): Likewise.
12610         (arc_insn_get_linear_next_pc): Likewise.
12611         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12612         (arc_disassemble_info): Likewise.
12613         (arc_insn_get_branch_target): Likewise.
12614         (arc_insn_get_linear_next_pc): Likewise.
12615         * NEWS: Mention new "maint print arc arc-instruction".
12616
12617 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12618
12619         * arc-tdep (maintenance_print_arc_list): New variable.
12620         (maintenance_print_arc_command): New function.
12621
12622 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12623
12624         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12625         Add "limm" and "reserved".
12626         (arc_cannot_fetch_register, arc_cannot_store_register): Add
12627         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12628         * arc-tdep.h (arc_regnum): Likewise.
12629
12630 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12631
12632         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12633         for THREADPTR register.
12634         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12635         register.
12636         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12637         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12638         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12639
12640 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12641
12642         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12643         registers above gdbarch_num_regs (gdbarch) as privileged in
12644         call0 ABI.
12645
12646 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12647
12648         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12649         for a single specified register or for all registers in
12650         a0_base..a0_base + C0_NREGS range.
12651         (supply_gregset_reg): Call regcache_raw_supply for a single
12652         specified register or for all registers in a0_base..a0_base +
12653         C0_NREGS range.
12654
12655 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12656
12657         * arch/xtensa.h (C0_NREGS): Add definition.
12658         * xtensa-tdep.c (C0_NREGS): Remove definition.
12659
12660 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12661
12662         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
12663         Drop xtensa_default_isa initialization.
12664         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
12665
12666 2017-03-27  Pedro Alves  <palves@redhat.com>
12667
12668         * dwarf2read.c (file_entry) <dir_index>: Add comment.
12669         (file_entry::include_dir): New method.
12670         (line_header::include_dir_at, line_header::file_name_at): New
12671         methods.
12672         (setup_type_unit_groups, setup_type_unit_groups)
12673         (psymtab_include_file_name): Simplify using the new methods.
12674         (lnp_state_machine) <the_line_header>: New field.
12675         <file>: Add comment.
12676         (lnp_state_machine::current_file): New method.
12677         (dwarf_record_line): Simplify using the new methods.
12678         (init_lnp_state_machine): Initialize the "the_line_header" field.
12679         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
12680         Simplify using the new methods.
12681
12682 2017-03-27  Pedro Alves  <palves@redhat.com>
12683
12684         * cp-name-parser.y (make_empty): Delete.
12685         (demangler_special, nested_name, ptr_operator, array_indicator)
12686         (direct_declarator, declarator_1): Use fill_comp instead of
12687         make_empty.
12688
12689 2017-03-27  Pedro Alves  <palves@redhat.com>
12690
12691         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
12692         to ATTRIBUTE_PRINTF.
12693         * solib-target.c (library_list_start_list): Print "string" not
12694         "version".
12695         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
12696         gdb_xml_error call.
12697
12698 2017-03-27  Pedro Alves  <palves@redhat.com>
12699
12700         * dwarf2read.c (struct file_and_directory): New.
12701         (dwarf2_get_dwz_file): Adjust to use std::string.
12702         (dw2_get_file_names_reader): Adjust to use file_and_directory.
12703         (find_file_and_directory): Adjust to return a file_and_directory
12704         object.
12705         (read_file_scope): Adjust to use file_and_directory.  Remove
12706         make_cleanup/do_cleanups calls.
12707         (open_and_init_dwp_file): Adjust to use std::string.  Remove
12708         make_cleanup/do_cleanups calls.
12709         * python/python.c (do_start_initialization): Adjust to ldirname
12710         returning a std::string.
12711         * utils.c (ldirname): Now returns a std::string.
12712         * utils.h (ldirname): Change return type to std::string.
12713         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
12714         returning a std::string.
12715         * xml-tdesc.c (file_read_description_xml): Likewise.
12716
12717 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
12718
12719         * regcache.c (regcache_debug_print_register): New function.
12720         * regcache.h (regcache_debug_print_register): New declaration.
12721         * target.c (debug_print_register): Remove.
12722         (target_fetch_registers): Call regcache_debug_print_register.
12723         (target_store_registers): Likewise.
12724
12725 2017-03-24  Pádraig Brady  <pbrady@fb.com>
12726
12727         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
12728         reference beyond the 'lh->include_dirs' array before accessing to
12729         it.
12730         (psymtab_include_file_name): Likewise.
12731         (dwarf_decode_lines_1): Likewise.
12732         (dwarf_decode_lines): Likewise.
12733         (file_file_name): Likewise.
12734
12735 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
12736
12737         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
12738         inferior_ptid.
12739         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12740         ps_lsetfpregs): Likewise.
12741         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
12742         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12743         ps_lsetfpregs): Likewise.
12744         * target.c (target_fetch_registers, target_store_registers):
12745         Remove asserts.
12746
12747 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
12748
12749         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
12750
12751 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12752
12753         * aarch64-tdep.c (aarch64_process_record_test): Declare.
12754         (_initialize_aarch64_tdep): Register it.
12755         (aarch64_record_load_store): Handle PRFM instruction.
12756         (aarch64_process_record_test): New function.
12757
12758 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12759
12760         * aarch64-tdep.c (aarch64_record_load_store): Fix code
12761         indentation.
12762
12763 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12764
12765         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
12766
12767 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12768
12769         python/python.c (do_start_initialization): Fix memory leak.
12770
12771 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12772
12773         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
12774         using get_ptrace_pid.
12775         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12776         inferior_ptid.
12777         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12778         inferior_ptid instead of pid.
12779
12780 2017-03-22  Yao Qi  <yao.qi@linaro.org>
12781
12782         * aarch64-tdep.c: Wrap locally used classes in anonymous
12783         namespace.
12784         * arm-tdep.c: Likewise.
12785         * linespec.c: Likewise.
12786         * ui-out.c: Likewise.
12787
12788 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
12789
12790         PR gdb/19637
12791         * python/lib/gdb/printer/bound_registers.py: Import sys.
12792
12793 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12794
12795         * windows-nat.c (do_windows_fetch_inferior_registers): Add
12796         windows_thread_info parameter and use it instead of
12797         current_thread.
12798         (windows_fetch_inferior_registers): Don't set current_thread,
12799         pass the thread to do_windows_fetch_inferior_registers.  Use
12800         ptid from regcache instead of inferior_ptid.
12801         (do_windows_store_inferior_registers): Add windows_thread_info
12802         parameter and use it instead of current_thread.
12803         (windows_store_inferior_registers): Don't set current_thread,
12804         pass the thread to do_windows_store_inferior_registers.  Use
12805         ptid from regcache instead of inferior_ptid.
12806
12807 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12808
12809         * ser-mingw.c (ser_windows_raw): Remove reference to
12810         struct serial::current_timeout.
12811
12812 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
12813
12814         PR tdep/20928
12815         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
12816         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
12817         (sparc64_fsr_type): Fix %fsr decoding.
12818
12819 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
12820
12821         * python/py-record-btrace.c (btpy_insn_data): Change return type
12822         for Python 2.
12823
12824 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12825
12826         * spu-linux-nat.c (spu_fetch_inferior_registers,
12827         spu_store_inferior_registers): Use ptid from regcache, set and
12828         restore inferior_ptid.
12829         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
12830         Likewise.
12831
12832 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12833
12834         * i386-linux-nat.c (fetch_register, store_register,
12835         i386_linux_fetch_inferior_registers,
12836         i386_linux_store_inferior_registers): Use ptid from regcache.
12837         * ia64-linux-nat.c (ia64_linux_fetch_register,
12838         ia64_linux_store_register): Likewise.
12839         * inf-ptrace.c (inf_ptrace_fetch_register,
12840         inf_ptrace_store_register): Likewise.
12841         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
12842         m32r_linux_store_inferior_registers): Likewise.
12843         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
12844         m68kbsd_store_inferior_registers): Likewise.
12845         * m68k-linux-nat.c (fetch_register, store_register,
12846         m68k_linux_fetch_inferior_registers,
12847         m68k_linux_store_inferior_registers): Likewise.
12848         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
12849         m88kbsd_store_inferior_registers): Likewise.
12850         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
12851         mips_fbsd_store_inferior_registers): Likewise.
12852         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
12853         mips64_linux_regsets_store_registers): Likewise.
12854         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
12855         mipsnbsd_store_inferior_registers): Likewise.
12856         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
12857         mips64obsd_store_inferior_registers): Likewise.
12858         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
12859         Likewise.
12860         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
12861         ppcfbsd_store_inferior_registers): Likewise.
12862         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
12863         ppc_linux_store_inferior_registers): Likewise.
12864         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
12865         ppcnbsd_store_inferior_registers): Likewise.
12866         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
12867         ppcobsd_store_registers): Likewise.
12868         * procfs.c (procfs_fetch_registers, procfs_store_registers):
12869         Likewise.
12870         * ravenscar-thread.c (ravenscar_fetch_registers,
12871         ravenscar_store_registers, ravenscar_prepare_to_store):
12872         Likewise.
12873         * record-btrace.c (record_btrace_fetch_registers,
12874         record_btrace_store_registers, record_btrace_prepare_to_store):
12875         Likewise.
12876         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
12877         Lookup inferior using ptid from regcache, instead of
12878         current_inferior.
12879         * remote.c (remote_fetch_registers, remote_store_registers): Use
12880         ptid from regcache.
12881         * rs6000-nat.c (fetch_register, store_register): Likewise.
12882         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
12883         s390_linux_store_inferior_registers): Likewise.
12884         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
12885         shnbsd_store_inferior_registers): Likewise.
12886         * sol-thread.c (sol_thread_fetch_registers,
12887         sol_thread_store_registers): Likewise.
12888         * sparc-nat.c (sparc_fetch_inferior_registers,
12889         sparc_store_inferior_registers): Likewise.
12890         * tilegx-linux-nat.c (fetch_inferior_registers,
12891         store_inferior_registers): Likewise.
12892         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
12893         vaxbsd_store_inferior_registers): Likewise.
12894         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
12895         store_xtregs): Likewise.
12896
12897 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12898
12899         PR gdb/14441
12900         * NEWS: Mention support for rvalue references in GDB and python.
12901         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
12902         supports both lvalue and rvalue references.
12903
12904 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12905
12906         PR gdb/14441
12907         * gdbtypes.c (rank_one_type): Implement overloading
12908         resolution rules regarding rvalue references.
12909
12910 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12911
12912         PR gdb/14441
12913         * aarch64-tdep.c (aarch64_type_align)
12914         (aarch64_extract_return_value, aarch64_store_return_value): Change
12915         lvalue reference type checks to general reference type checks.
12916         * amd64-tdep.c (amd64_classify): Likewise.
12917         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
12918         Likewise.
12919         * arm-tdep.c (arm_type_align, arm_extract_return_value)
12920         (arm_store_return_value): Likewise.
12921         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
12922         * c-typeprint.c (c_print_type): Likewise.
12923         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
12924         (cplus_number_of_children, cplus_describe_child): Likewise.
12925         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
12926         * completer.c (expression_completer): Likewise.
12927         * cp-support.c (make_symbol_overload_list_adl_namespace):
12928         Likewise.
12929         * darwin-nat-info.c (info_mach_region_command): Likewise.
12930         * dwarf2loc.c (entry_data_value_coerce_ref)
12931         (value_of_dwarf_reg_entry): Likewise.
12932         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
12933         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
12934         Likewise.
12935         * findvar.c (extract_typed_address, store_typed_address):
12936         Likewise.
12937         * gdbtypes.c (rank_one_type): Likewise.
12938         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
12939         * infcall.c (value_arg_coerce): Likewise.
12940         * language.c (pointer_type): Likewise.
12941         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
12942         Likewise.
12943         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
12944         * mn10300-tdep.c (mn10300_type_align): Likewise.
12945         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
12946         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
12947         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
12948         Likewise.
12949         * printcmd.c (print_formatted, x_command): Likewise.
12950         * python/py-type.c (typy_get_composite, typy_template_argument):
12951         Likewise.
12952         * python/py-value.c (valpy_referenced_value)
12953         (valpy_get_dynamic_type, value_has_field): Likewise.
12954         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
12955         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
12956         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
12957         * spu-tdep.c (spu_scalar_value_p): Likewise.
12958         * symtab.c (lookup_symbol_aux): Likewise.
12959         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
12960         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
12961         Likewise.
12962         * valops.c (value_cast_pointers, value_cast)
12963         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
12964         (value_struct_elt, value_struct_elt_bitpos)
12965         (value_find_oload_method_list, find_overload_match)
12966         (value_rtti_indirect_type): Likewise.
12967         * valprint.c (val_print_scalar_type_p, generic_val_print):
12968         Likewise.
12969         * value.c (value_actual_type, value_as_address, unpack_long)
12970         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
12971         (coerce_ref): Likewise.
12972         * varobj.c (varobj_get_value_type): Likewise.
12973
12974 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12975
12976         PR gdb/14441
12977         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
12978         table of constants.
12979         * python/lib/gdb/command/explore.py: Support exploring values
12980         of rvalue reference types.
12981         * python/lib/gdb/types.py: Implement get_basic_type() for
12982         rvalue reference types.
12983         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
12984         constant.
12985         * python/py-value.c (valpy_getitem): Add an rvalue reference
12986         check.
12987         (valpy_reference_value): Add new parameter "refcode".
12988         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
12989         New wrappers for valpy_reference_value().
12990         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12991         (gdbpy_invoke_xmethod): Likewise.
12992
12993 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12994
12995         PR gdb/14441
12996         * dwarf2read.c (process_die, read_type_die_1): Handle the
12997         DW_TAG_rvalue_reference_type DIE.
12998         (read_tag_reference_type): Add new parameter "refcode".
12999
13000 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13001
13002         PR gdb/14441
13003         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13004         (c_type_print_modifier, c_type_print_varspec_suffix)
13005         (c_type_print_base): Support printing rvalue reference types.
13006         * c-valprint.c (c_val_print, c_value_print): Support printing
13007         rvalue reference values.
13008
13009 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13010
13011         PR gdb/14441
13012         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13013         typename.
13014         * cp-support.c (replace_typedefs): Handle
13015         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13016         * python/py-type.c (typy_lookup_type): Likewise.
13017
13018 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13019
13020         PR gdb/14441
13021         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13022         * parse.c (insert_type): Change assert statement.
13023         (follow_types): Handle rvalue reference types.
13024         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13025         constant.
13026
13027 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13028
13029         PR gdb/14441
13030         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13031         value_ref() interface.
13032         * c-valprint.c (c_value_print): Likewise.
13033         * infcall.c (value_arg_coerce): Likewise.
13034         * python/py-value.c (valpy_reference_value): Likewise.
13035         * valops.c (value_cast, value_reinterpret_cast)
13036         (value_dynamic_cast, typecmp): Likewise.
13037         (value_ref): Parameterize by kind of return value reference type.
13038         * value.h (value_ref): Add new parameter "refcode".
13039
13040 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13041
13042         PR gdb/14441
13043         * dwarf2read.c (read_tag_reference_type): Use
13044         lookup_lvalue_reference_type() instead of lookup_reference_type().
13045         * eval.c (evaluate_subexp_standard): Likewise.
13046         * f-exp.y: Likewise.
13047         * gdbtypes.c (make_reference_type, lookup_reference_type):
13048         Generalize with rvalue reference types.
13049         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13050         convenience wrappers for lookup_reference_type().
13051         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13052         reference kind parameter.
13053         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13054         wrappers for lookup_reference_type().
13055         * guile/scm-type.c (gdbscm_type_reference): Use
13056         lookup_lvalue_reference_type() instead of lookup_reference_type().
13057         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13058         * parse.c (follow_types): Likewise.
13059         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13060         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13061         Likewise.
13062         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13063         (gdbpy_invoke_xmethod): Likewise.
13064         * stabsread.c: Provide extra argument to make_reference_type()
13065         call.
13066         * valops.c (value_ref, value_rtti_indirect_type): Use
13067         lookup_lvalue_reference_type() instead of lookup_reference_type().
13068
13069 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13070
13071         PR gdb/14441
13072         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13073         (TYPE_IS_REFERENCE): New macro.
13074         (struct type): Add rvalue_reference_type field.
13075         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13076
13077 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13078
13079         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13080         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13081         New function definition.
13082         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13083         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13084         New function declaration.
13085         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13086         * mi/mi-interp.h: New file.
13087         * solib.c (info_sharedlibrary_command): Replace for loop with
13088         ALL_SO_LIBS macro
13089         * solib.h (update_solib_list): New function declaration.
13090         (so_list_head): Move macro.
13091         * solist.h (ALL_SO_LIBS): New macro.
13092
13093 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13094
13095         * infcmd.c (post_create_inferior): Remove unused argument in
13096         call to solib_add.
13097         * remote.c (remote_start_remote): Likewise.
13098         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13099         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13100         (enable_break): Likewise.
13101         * solib.c (update_solib_list): Remove unused target argument
13102         and its documentation.
13103         (solib_add): Remove unused target argument.  Remove unused
13104         argument in call to update_solib_list.
13105         (info_sharedlibrary_command): Remove unused argument in call
13106         to update_solib_list.
13107         (sharedlibrary_command): Remove unused argument in call to
13108         solib_add.
13109         (handle_solib_event): Likewise.
13110         (reload_shared_libraries): Likewise.
13111         * solib.h (solib_add): Remove unused target argument.
13112
13113 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13114
13115         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13116         (s390_displaced_step_fixup): Cover relative branches with the
13117         default fixup handling.  This fixes lack of support for some
13118         relative branch instructions.
13119
13120 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13121
13122         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13123         ptid from regcache.
13124
13125 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13126
13127         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13128         i386_darwin_store_inferior_registers): Use ptid from regcache.
13129
13130 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13131
13132         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13133         i386bsd_store_inferior_registers): Use ptid from regcache.
13134
13135 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13136
13137         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13138         hppaobsd_store_registers): Use ptid from regcache.
13139
13140 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13141
13142         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13143         hppanbsd_store_registers): Use ptid from regcache.
13144
13145 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13146
13147         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13148         from regcache.  Use get_ptrace_pid.
13149
13150 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13151
13152         * corelow.c (get_core_register_section): Use ptid from regcache,
13153         update doc.
13154
13155 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13156
13157         * bsd-uthread.c (bsd_uthread_fetch_registers,
13158         bsd_uthread_store_registers): Use ptid from regcache, set and
13159         restore inferior_ptid.
13160
13161 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13162
13163         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13164         fetch_fp_regs, store_register, store_regs, store_fp_register,
13165         store_fp_regs): Use ptid from regcache.
13166
13167 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13168
13169         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13170         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13171         store_vfp_regs): Use ptid from regcache.
13172
13173 2017-03-17  Pedro Alves  <palves@redhat.com>
13174
13175         PR remote/21188
13176         * ser-base.c (ser_base_wait_for): Add comment.
13177         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13178         version.
13179         * ser-unix.c (hardwire_raw): Remove reference to
13180         scb->current_timeout.
13181         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13182         (hardwire_ops): Install ser_base_readchar instead of
13183         hardwire_readchar.
13184         * serial.h (struct serial) <current_timeout, timeout_remaining>:
13185         Remove fields.
13186
13187 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
13188
13189         PR gdb/19637
13190         * python/lib/gdb/printer/bound_registers.py: Add support for
13191         Python 3.
13192
13193 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13194
13195         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13196         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13197         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13198         byte_offset to subobj_byte_offset.  Fix the handling of
13199         DWARF_VALUE_STACK on big-endian targets when coming via an
13200         implicit pointer.
13201         (dwarf2_evaluate_loc_desc): Adjust call to
13202         dwarf2_evaluate_loc_desc_full.
13203         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13204         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13205
13206 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13207
13208         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13209         and REVSH instructions.
13210
13211 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13212
13213         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13214         (arm_record_test): Declare.
13215         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13216         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13217         align with the manual.
13218         (thumb_record_misc): Adjust the code order to align with the
13219         manual.
13220         (thumb2_record_decode_insn_handler): Fix instruction matching.
13221         (instruction_reader_thumb): New class.
13222         (arm_record_test): New function.
13223
13224 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13225
13226         * arm-tdep.c (abstract_memory_reader): New class.
13227         (instruction_reader): New class.
13228         (extract_arm_insn): Add argument 'reader'.  Callers updated.
13229         (decode_insn): Likewise.
13230
13231 2017-03-16  Doug Evans  <dje@google.com>
13232
13233         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13234         member.  Change type of TYPE member to SCM.  All uses updated.
13235         (lsscm_make_lazy_string_smob): Add assert.
13236         (lsscm_make_lazy_string): Flag bad length values.
13237         (lsscm_elt_type): New function.
13238         (gdbscm_lazy_string_to_value): Rewrite to use
13239         lsscm_safe_lazy_string_to_value.
13240         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13241         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13242         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
13243         in incoming type.
13244         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13245         * guile/scm-type.c (tyscm_scm_to_type): New function.
13246
13247 2017-03-15  Doug Evans  <dje@google.com>
13248
13249         PR python/17728, python/18439, python/18779
13250         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13251         member.  Change type of TYPE member to PyObject *.  All uses updated.
13252         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13253         (gdbpy_create_lazy_string_object): Flag bad length values.
13254         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13255         Handle typedefs in incoming type.
13256         (stpy_lazy_string_elt_type): New function.
13257         (gdbpy_extract_lazy_string): Call it.
13258         * python/py-value.c (valpy_lazy_string): Flag bad length values.
13259         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
13260         typedefs in incoming type.
13261
13262 2017-03-16  Doug Evans  <dje@google.com>
13263
13264         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13265         * guile/scm-type.c (tyscm_scm_to_type): New function.
13266
13267 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
13268
13269         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13270         "ULONGEST" for "skip".
13271
13272 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13273
13274         PR gdb/21220
13275         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13276         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13277         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
13278         over ptrace peek/poke until end of buffer or error.
13279
13280 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
13281
13282         * parse.c (length_of_subexp): Make static.
13283         * parser-defs.h (length_of_subexp): Remove.
13284
13285 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13286
13287         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13288         as well.
13289
13290 2017-03-14  Pedro Alves  <palves@redhat.com>
13291
13292         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13293         (main): Use std::unique_ptr.  Remove calls to
13294         cp_demangled_name_parse_free.
13295
13296 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13297
13298         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13299         alphabsd_store_inferior_registers): Use regcache->ptid instead
13300         of inferior_ptid.
13301
13302 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13303
13304         * aix-thread.c (aix_thread_fetch_registers,
13305         aix_thread_store_registers): Use regcache->ptid instead of
13306         inferior_ptid.
13307
13308 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13309
13310         * aarch64-linux-nat.c (fetch_gregs_from_thread,
13311         store_gregs_to_thread, fetch_fpregs_from_thread,
13312         store_fpregs_to_thread): Use regcache->ptid instead of
13313         inferior_ptid.
13314
13315 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13316
13317         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13318         amd64_linux_fetch_inferior_registers): Use regcache->ptid
13319         instead of inferior_ptid.
13320
13321 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13322
13323         * target.c (target_fetch_registers, target_store_registers): Add
13324         assert.
13325
13326 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13327
13328         * regcache.h (regcache_get_ptid): New function.
13329         * regcache.c (regcache_get_ptid): New function.
13330
13331 2017-03-13  Mark Wielaard  <mark@klomp.org>
13332
13333         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13334
13335 2017-03-10  Keith Seitz  <keiths@redhat.com>
13336
13337         PR c++/8218
13338         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13339
13340 2017-03-08  Pedro Alves  <palves@redhat.com>
13341
13342         PR gdb/18360
13343         * infrun.c (start_step_over, do_target_resume, resume)
13344         (restart_threads): Assert we're not resuming a thread that is
13345         meant to be stopped.
13346         (infrun_thread_stop_requested_callback): Delete.
13347         (infrun_thread_stop_requested): If the thread is internally
13348         stopped, queue a pending stop event and clear the thread's
13349         inline-frame state.
13350         (handle_stop_requested): New function.
13351         (handle_syscall_event, handle_inferior_event_1): Use
13352         handle_stop_requested.
13353         (handle_stop_requested): New function.
13354         (handle_signal_stop): Set the thread's stop_signal here instead of
13355         at caller.
13356         (finish_step_over): Clear step over info unconditionally.
13357         (handle_signal_stop): If the user had interrupted the event
13358         thread, consider the stop a random signal.
13359         (handle_signal_stop) <signal arrived while stepping over
13360         breakpoint>: Don't restart threads here.
13361         (stop_waiting): Don't clear step-over info here.
13362
13363 2017-03-08  Pedro Alves  <palves@redhat.com>
13364
13365         PR 21206
13366         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13367         goes to argument 2, not 1.
13368
13369 2017-03-08  Pedro Alves  <palves@redhat.com>
13370
13371         PR cli/21218
13372         * top.c (gdb_readline_wrapper): Avoid passing NULL to
13373         display_gdb_prompt.
13374         (command_line_input): Add comment.
13375
13376 2017-03-08  Pedro Alves  <palves@redhat.com>
13377
13378         PR tui/21216
13379         * tui/tui-file.c (tui_file::write): New.
13380         * tui/tui-file.h (tui_file): Override "write".
13381         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13382         factored out from ...
13383         (tui_puts): ... here.
13384         (tui_putc): Use them.
13385         (tui_write): New function.
13386         * tui/tui-io.h (tui_write): Declare.
13387
13388 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
13389
13390         * Makefile.in (SFILES): Replace "environ.c" with
13391         "common/environ.c".
13392         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13393         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
13394         to...
13395         * common/environ.c: ... here.
13396         * environ.h: Moved to...
13397         * common/environ.h: ... here.
13398
13399 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13400
13401         * gdbarch.sh (pstring_ptr): New static function.
13402         (gdbarch_disassembler_options): Use it.
13403         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13404         not valid_disassembler_option->name.
13405         * gdbarch.c: Regenerate.
13406
13407 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13408
13409         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13410
13411 2017-03-07  Pedro Alves  <palves@redhat.com>
13412
13413         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13414
13415 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13416
13417         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13418         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13419         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13420         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13421
13422 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
13423
13424         * xtensa-linux-nat.c (fetch_gregs): Remove const.
13425
13426 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
13427
13428         * remote.c (remote_add_target_side_commands): Use range-based
13429         for loop.
13430
13431 2017-03-03  Yao Qi  <yao.qi@linaro.org>
13432
13433         PR gdb/21165
13434         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13435         value is lazy.
13436         * valprint.c (common_val_print): Likewise.
13437
13438 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
13439
13440         * NEWS: Mention new set/show disassembler-options commands.
13441         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13442         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13443         (prospective_options): New static variable.
13444         (gdb_disassembler::gdb_disassembler): Initialize
13445         m_di.disassembler_options.
13446         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13447         (get_disassembler_options): New function.
13448         (set_disassembler_options): Likewise.
13449         (set_disassembler_options_sfunc): Likewise.
13450         (show_disassembler_options_sfunc): Likewise.
13451         (disassembler_options_completer): Likewise.
13452         (_initialize_disasm): Likewise.
13453         * disasm.h (get_disassembler_options): New prototype.
13454         (set_disassembler_options): Likewise.
13455         * gdbarch.sh (gdbarch_disassembler_options): New variable.
13456         (gdbarch_verify_disassembler_options): Likewise.
13457         * gdbarch.c: Regenerate.
13458         * gdbarch.h: Likewise.
13459         * arm-tdep.c (num_disassembly_options): Delete.
13460         (set_disassembly_style): Likewise.
13461         (arm_disassembler_options): New static variable.
13462         (set_disassembly_style_sfunc): Convert short style name into long
13463         option name.  Call set_disassembler_options.
13464         (show_disassembly_style_sfunc): New function.
13465         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13466         set_gdbarch_verify_disassembler_options.
13467         (_initialize_arm_tdep): Delete regnames variable and update callers.
13468         (arm_disassembler_options): Initialize.
13469         (disasm_options): New variable.
13470         (num_disassembly_options): Rename from this...
13471         (num_disassembly_styles): ...to this.  Compute by scanning through
13472         disasm_options.
13473         (valid_disassembly_styles): Initialize using disasm_options.
13474         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13475         set_arm_regname_option.
13476         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13477         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13478         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13479         set_gdbarch_verify_disassembler_options.
13480         * s390-tdep.c (s390_disassembler_options): New static variable.
13481         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13482         set_gdbarch_verify_disassembler_options.
13483
13484 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13485
13486         * remote.c (remote_add_target_side_condition): Remove "struct"
13487         keyword from range-based for loop.
13488
13489 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13490
13491         * remote.c (remote_add_target_side_condition): Use range-based
13492         for loop.  Update comment.
13493
13494 2017-02-27  Yao Qi  <yao.qi@linaro.org>
13495
13496         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13497
13498 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
13499
13500         * regcache.c (regcache_raw_update): New function.
13501         (regcache_raw_read): Move code to regcache_raw_update.
13502         * regcache.h (regcache_raw_update): New declaration.
13503         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13504
13505 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
13506
13507         * dwarf2read.c (create_debug_type_hash_table): Initialize
13508         header.signature and header.type_offset_in_tu.
13509
13510 2017-02-24  Pedro Alves  <palves@redhat.com>
13511
13512         * symtab.c (make_file_symbol_completion_list_1): Use
13513         add_symtab_completions.
13514
13515 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13516
13517         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13518
13519 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13520
13521         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13522         I386_MAX_REGISTER_SIZE.
13523         (i386_pseudo_register_write): Likewise.
13524         (i386_process_record): Likewise.
13525         * i387-tdep.c (i387_supply_xsave): Likewise.
13526         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13527         (store_register): Likewise.
13528
13529 2017-02-23  Pedro Alves  <palves@redhat.com>
13530
13531         * ada-lang.c: Include "common/function-view.h".
13532         (ada_iterate_over_symbols): Adjust to use function_view as
13533         callback type.
13534         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13535         (ada_make_symbol_completion_list): Use a lambda.
13536         (ada_exc_search_name_matches): Delete.
13537         (name_matches_regex): New.
13538         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13539         * compile/compile-c-support.c: Include "common/function-view.h".
13540         (print_one_macro): Change prototype to accept a ui_file pointer.
13541         (write_macro_definitions): Use a lambda.
13542         * dwarf2read.c: Include "common/function-view.h".
13543         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13544         (dw2_expand_symtabs_matching): Adjust to use function_view as
13545         callback type.
13546         * language.h: Include "common/function-view.h".
13547         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13548         function_view as callback type.
13549         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13550         * linespec.c: Include "common/function-view.h".
13551         (collect_info::add_symbol): New method.
13552         (struct symbol_and_data_callback, iterate_inline_only, struct
13553         symbol_matcher_data, iterate_name_matcher): Delete.
13554         (iterate_over_all_matching_symtabs): Adjust to use function_view
13555         as callback type and lambdas.
13556         (iterate_over_file_blocks): Adjust to use function_view as
13557         callback type.
13558         (decode_compound_collector): Now a class with private fields.
13559         (decode_compound_collector::release_symbols): New method.
13560         (collect_one_symbol): Rename to...
13561         (decode_compound_collector::operator()): ... this and adjust.
13562         (lookup_prefix_sym): decode_compound_collector construction bits
13563         move to decode_compound_collector ctor.  Pass the
13564         decode_compound_collector object directly as callback.  Remove
13565         cleanups and use decode_compound_collector::release_symbols
13566         instead.
13567         (symtab_collector): Now a class with private fields.
13568         (symtab_collector::release_symtabs): New method.
13569         (add_symtabs_to_list): Rename to...
13570         (symtab_collector::operator()): ... this and adjust.
13571         (collect_symtabs_from_filename): symtab_collector construction
13572         bits move to symtab_collector ctor.  Pass the symtab_collector
13573         object directly as callback.  Remove cleanups and use
13574         symtab_collector::release_symtabs instead.
13575         (collect_symbols): Delete.
13576         (add_matching_symbols_to_info): Use lambdas.
13577         * macrocmd.c (print_macro_callback): Delete.
13578         (info_macro_command): Use a lambda.
13579         (info_macros_command): Pass print_macro_definition as callable
13580         directly.
13581         (print_one_macro): Remove 'ignore' parameter.
13582         (macro_list_command): Adjust.
13583         * macrotab.c (macro_for_each_data::fn): Now a function_view.
13584         (macro_for_each_data::user_data): Delete field.
13585         (foreach_macro): Adjust to call the function_view.
13586         (macro_for_each): Adjust to use function_view as callback type.
13587         (foreach_macro_in_scope): Adjust to call the function_view.
13588         (macro_for_each_in_scope): Adjust to use function_view as callback
13589         type.
13590         * macrotab.h: Include "common/function-view.h".
13591         (macro_callback_fn): Declare a prototype instead of a pointer.
13592         Remove "user_data" parameter.
13593         (macro_for_each, macro_for_each_in_scope): Adjust to use
13594         function_view as callback type.
13595         * psymtab.c (partial_map_expand_apply)
13596         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13597         Adjust to use function_view as callback type and to return bool.
13598         (psym_expand_symtabs_matching): Adjust to use function_view as
13599         callback types.
13600         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13601         to use function_view as callback type and to return bool.
13602         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13603         callback types.
13604         * symfile.c (expand_symtabs_matching): Adjust to use function_view
13605         as callback types.
13606         * symfile.h: Include "common/function-view.h".
13607         (expand_symtabs_file_matcher_ftype)
13608         (expand_symtabs_symbol_matcher_ftype)
13609         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13610         return bool.
13611         (quick_symbol_functions::map_symtabs_matching_filename)
13612         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13613         function_view as callback type and return bool.
13614         (expand_symtabs_matching): Adjust to use function_view as callback
13615         type.
13616         (maintenance_expand_name_matcher)
13617         (maintenance_expand_file_matcher): Delete.
13618         (maintenance_expand_symtabs): Use lambdas.
13619         * symtab.c (iterate_over_some_symtabs): Adjust to use
13620         function_view as callback types and return bool.
13621         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
13622         of a cleanup.
13623         (lookup_symtab_callback): Delete.
13624         (lookup_symtab): Use a lambda.
13625         (iterate_over_symbols): Adjust to use function_view as callback
13626         type.
13627         (struct search_symbols_data, search_symbols_file_matches)
13628         (search_symbols_name_matches): Delete.
13629         (search_symbols): Use a pair of lambdas.
13630         (struct add_name_data, add_macro_name, symbol_completion_matcher)
13631         (symtab_expansion_callback): Delete.
13632         (default_make_symbol_completion_list_break_on_1): Use lambdas.
13633         * symtab.h: Include "common/function-view.h".
13634         (iterate_over_some_symtabs): Adjust to use function_view as
13635         callback type and return bool.
13636         (iterate_over_symtabs): Adjust to use function_view as callback
13637         type.
13638         (symbol_found_callback_ftype): Remove 'data' parameter and return
13639         bool.
13640         (iterate_over_symbols): Adjust to use function_view as callback
13641         type.
13642
13643 2017-02-23  Pedro Alves  <palves@redhat.com>
13644
13645         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
13646         (%.o) <unittests/%.c>: New pattern.
13647         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
13648         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
13649         * common/function-view.h: New file.
13650         * unittests/function-view-selftests.c: New file.
13651         * configure: Regenerate.
13652
13653 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
13654
13655         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
13656         inferior_ptid.
13657         * go32-nat.c (go32_thread_alive): Likewise.
13658
13659 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13660
13661         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
13662         delete.
13663
13664 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13665
13666         * varobj.c (varobj_clear_saved_item): Use delete instead of
13667         xfree.
13668         (update_dynamic_varobj_children): Likewise.
13669
13670 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13671
13672         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
13673
13674 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
13675
13676         * common/enum-flags.h (enum_flags::enum_flags): Initialize
13677         m_enum_value to 0 in default constructor.
13678
13679 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
13680
13681         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
13682         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
13683         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
13684         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
13685         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
13686         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
13687         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
13688         IS_STORE_CONDITIONAL_INSN.
13689
13690 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13691
13692         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
13693
13694 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13695
13696         * NEWS (Changes since GDB 7.12): Add DWARF-5.
13697
13698 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13699
13700         * dwarf2read.c (skip_one_die, read_attribute_value)
13701         (dwarf2_const_value_attr, dump_die_shallow)
13702         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
13703         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
13704
13705 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13706
13707         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
13708         (dwarf_parse_macro_header): Accept DWARF version 5.
13709         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
13710
13711 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13712
13713         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
13714         DW_AT_GNU_*.
13715         * common/common-exceptions.h (enum errors): Likewise.
13716         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
13717         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
13718         (dwarf_expr_context::execute_stack_op): Likewise.
13719         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
13720         Likewise.
13721         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
13722         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
13723         (show_entry_values_debug, call_site_to_target_addr)
13724         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
13725         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
13726         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
13727         (value_of_dwarf_block_entry, indirect_pieced_value)
13728         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
13729         (disassemble_dwarf_expression): Likewise.
13730         * dwarf2read.c (process_die, inherit_abstract_dies)
13731         (read_call_site_scope): Likewise.
13732         * gdbtypes.h (struct func_type, struct call_site_parameter)
13733         (struct call_site): Likewise.
13734         * stack.c (read_frame_arg): Likewise.
13735         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
13736
13737 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13738
13739         * defs.h (read_unsigned_leb128): New declaration.
13740         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
13741         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
13742         (dwarf2_find_location_expression): Call also
13743         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
13744         * dwarf2loc.h (dwarf2_version): New declaration.
13745         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
13746         rnglists.
13747         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
13748         .debug_rnglists.
13749         (struct dwop_section_names): Add loclists_dwo.
13750         (dwop_section_names): Add .debug_loclists.dwo.
13751         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
13752         (struct dwarf2_per_cu_data): Add dwarf_version.
13753         (struct dwo_sections): Add loclists.
13754         (struct attr_abbrev): Add implicit_const.
13755         (read_indirect_line_string): New declaration.
13756         (read_unsigned_leb128): Delete declaration.
13757         (rcuh_kind): New definition.
13758         (read_and_check_comp_unit_head): Change parameter
13759         is_debug_types_section to section_kind.
13760         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
13761         (read_comp_unit_head): Change parameter abfd to section, add parameter
13762         section_kind.  Handle DWARF-5.
13763         (error_check_comp_unit_head): Accept also DWARF version 5.
13764         (read_and_check_comp_unit_head): Change parameter
13765         is_debug_types_section to section_kind.
13766         (read_and_check_type_unit_head): Delete function.
13767         (read_abbrev_offset): Handle DWARF-5.
13768         (create_debug_type_hash_table): Add parameter section_kind.  Process
13769         only DW_UT_type.  Use signature and type_offset_in_tu from struct
13770         comp_unit_head.
13771         (create_debug_types_hash_table): Update create_debug_type_hash_table
13772         caller.
13773         (create_all_type_units): Call create_debug_type_hash_table.
13774         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
13775         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13776         caller.
13777         (skip_one_die): Handle DW_FORM_implicit_const.
13778         (dwarf2_rnglists_process): New function.
13779         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13780         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13781         (read_attribute_value): Handle DW_FORM_implicit_const,
13782         DW_FORM_line_strp.
13783         (read_attribute): Handle DW_FORM_implicit_const.
13784         (read_indirect_string_at_offset_from): New function from
13785         read_indirect_string_at_offset.
13786         (read_indirect_string_at_offset): Call
13787         read_indirect_string_at_offset_from.
13788         (read_indirect_line_string_at_offset): New function.
13789         (read_indirect_string): New function comment.
13790         (read_indirect_line_string): New function.
13791         (read_unsigned_leb128): Make it global.
13792         (dwarf2_string_attr): Handle DWARF-5.
13793         (add_include_dir_stub, read_formatted_entries): New functions.
13794         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
13795         Handle DWARF-5.
13796         (per_cu_header_read_in): Update read_comp_unit_head caller.
13797         (dwarf2_version): New function.
13798         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
13799         rnglists.
13800         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
13801         fields.
13802
13803 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13804
13805         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
13806
13807 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13808
13809         * dwarf2read.c (dwarf2_ranges_process): New function from
13810         dwarf2_ranges_read.
13811         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
13812         dwarf2_ranges_process.
13813
13814 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13815
13816         * dwarf2read.c (create_debug_type_hash_table): New function from
13817         create_debug_types_hash_table.
13818         (create_debug_types_hash_table): Call create_debug_type_hash_table.
13819         (create_all_type_units, open_and_init_dwo_file): Update
13820         create_debug_types_hash_table callers.
13821
13822 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13823
13824         PR gdb/16188
13825         * fork-child.c (trace_start_error): Fix thinko.  va_end should
13826         refer to 'ap', not 'args'.
13827
13828 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13829             Pedro Alves  <palves@redhat.com>
13830
13831         PR gdb/16188
13832         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
13833         calls succeeded.
13834         * fork-child.c (trace_start_error): New function.
13835         (trace_start_error_with_name): Likewise.
13836         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
13837         * inf-ptrace.c (inf_ptrace_me): Likewise.
13838         * inferior.h (trace_start_error): New prototype.
13839         (trace_start_error_with_name): Likewise.
13840
13841 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
13842
13843         PR gdb/21164
13844         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
13845         NULL before using it.
13846         * symmisc.c (maintenance_print_symbols): Likewise.
13847         (maintenance_print_msymbols): Likewise.
13848
13849 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13850
13851         * NEWS: Add record Python bindings entry.
13852
13853 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13854
13855         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
13856         py-record-full.o.
13857         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
13858         * python/py-record-btrace.c, python/py-record-btrace.h,
13859         python/py-record-full.c, python/py-record-full.h: New file.
13860         * python/py-record.c: Add include for py-record-btrace.h and
13861         py-record-full.h.
13862         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
13863         recpy_instruction_history, recpy_function_call_history, recpy_begin,
13864         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
13865         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
13866         New definition.
13867         (gdbpy_initialize_btrace): New export.
13868         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
13869
13870 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13871
13872         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
13873         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
13874         * python/py-record.c: New file.
13875         * python/python-internal.h (gdbpy_start_recording,
13876         gdbpy_current_recording, gdpy_stop_recording,
13877         gdbpy_initialize_record): New export.
13878         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
13879         (python_GdbMethods): Add gdbpy_start_recording,
13880         gdbpy_current_recording and gdbpy_stop_recording.
13881
13882 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13883
13884         * record-btrace.c (record_btrace_record_method): New function.
13885         (init_record_btrace_ops): Initialize to_record_method.
13886         * record-full.c (record_full_record_method): New function.
13887         (init_record_full_ops, init_record_full_core_ops): Add
13888         record_full_record_method.
13889         * record.h (enum record_method): New enum.
13890         * target-debug.h (target_debug_print_enum_record_method: New define.
13891         * target-delegates.c: Regenerate.
13892         * target.c (target_record_method): New function.
13893         * target.h: Include record.h.
13894         (struct target_ops) <to_record_method>: New field.
13895         (target_record_method): New export.
13896
13897 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13898
13899         * record.h (record_start, record_stop): New export.
13900         * record.c (record_start, record_stop): New function.
13901
13902 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13903
13904         * btrace.c (btrace_fetch): Copy function call segments pointer
13905         into a vector.
13906         (btrace_clear): Clear the vector.
13907         (btrace_find_insn_by_number): Use binary search to find the correct
13908         function call segment.
13909         * btrace.h (brace_fun_p): New typedef.
13910         (struct btrace_thread_info) <functions>: New field.
13911
13912 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13913
13914         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
13915         * btrace.c (btrace_decode_error): ... here.  New function.
13916         * btrace.h (btrace_decode_error): New export.
13917
13918 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13919
13920         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
13921         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
13922         btrace_find_insn_by_number): Remove special case for gaps.
13923         * btrace.h (btrace_insn_get_error): New export.
13924         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
13925         * record-btrace.c (btrace_insn_history): Print number for gaps.
13926         (record_btrace_info, record_btrace_goto): Handle gaps.
13927
13928 2017-02-14  Tom Tromey  <tom@tromey.com>
13929
13930         PR python/13598:
13931         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
13932         event.
13933         * python/py-evts.c (gdbpy_initialize_py_events): Add
13934         before_prompt registry.
13935         * python/py-events.h (events_object) <before_prompt>: New field.
13936
13937 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
13938
13939         * btrace.c (ftrace_new_switch): Preserve up link and flags.
13940
13941 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
13942
13943         * symfile (_initialize_symfile): Add usage text to the load command's
13944         help text.
13945
13946 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
13947
13948         * utils.c (defaulted_query): Don't query on secondary UIs.
13949
13950 2017-02-10  Tom Tromey  <tom@tromey.com>
13951
13952         * rust-lang.c (rust_get_disr_info): Remove unused variable.
13953
13954 2017-02-10  Tom Tromey  <tom@tromey.com>
13955
13956         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
13957         "cleanup" local.
13958         * python/py-type.c (typy_legacy_template_argument): Remove
13959         unnecessary "cleanup" local.
13960
13961 2017-02-10  Tom Tromey  <tom@tromey.com>
13962
13963         * python/python.c (do_start_initialization): New function, from
13964         _initialize_python.
13965         (_initialize_python): Call do_start_initialization.
13966         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
13967         goto.
13968
13969 2017-02-10  Tom Tromey  <tom@tromey.com>
13970
13971         * python/py-prettyprint.c (pretty_print_one_value): Use
13972         gdbpy_ref.
13973
13974 2017-02-10  Tom Tromey  <tom@tromey.com>
13975
13976         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
13977         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
13978         gdbpy_ref.
13979         * python/py-type.c (field_new): Use gdbpy_ref.
13980         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
13981         gdbpy_ref.
13982         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
13983         (py_free_pspace): Likewise.
13984         (pspace_to_pspace_object): Likewise.
13985         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
13986         (py_free_objfile): Likewise.
13987         (objfile_to_objfile_object): Likewise.
13988         * python/py-inferior.c (delete_thread_object): Use
13989         gdbpy_ref.
13990         (infpy_read_memory): Likewise.
13991         (py_free_inferior): Likewise.
13992         * python/py-evtregistry.c (create_eventregistry_object): Use
13993         gdbpy_ref.
13994         * python/py-event.c (create_event_object): Use gdbpy_ref.
13995
13996 2017-02-10  Tom Tromey  <tom@tromey.com>
13997
13998         * python/py-ref.h (gdbpy_ref_policy): Now a template.
13999         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14000         used.
14001         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14002         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14003         python/py-exitedevent.c, python/py-finishbreakpoint.c,
14004         python/py-framefilter.c, python/py-function.c,
14005         python/py-inferior.c, python/py-infevents.c,
14006         python/py-linetable.c, python/py-newobjfileevent.c,
14007         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14008         python/py-signalevent.c, python/py-stopevent.c,
14009         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14010         python/py-unwind.c, python/py-utils.c, python/py-value.c,
14011         python/py-varobj.c, python/py-xmethods.c, python/python.c,
14012         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14013
14014 2017-02-10  Tom Tromey  <tom@tromey.com>
14015
14016         * ui-out.h (ui_out_emit_type): New class.
14017         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14018         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14019         and ui_out_emit_tuple.
14020         (enumerate_locals): Likewise.
14021         (py_mi_print_variables, py_print_locals, py_print_args): Use
14022         ui_out_emit_list.
14023         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14024         ui_out_emit_list.
14025         * common/gdb_optional.h: New file.
14026
14027 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14028
14029         * MAINTAINERS (Write After Approval): Update my e-mail address.
14030
14031 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14032
14033         PR gdb/21122
14034         * breakpoint.c (_initialize_breakpoint): Update the help description
14035         of the 'commands' command to indicate that it takes a list argument.
14036
14037 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
14038
14039         * interps.c (current_interp_set_logging): Remove "return".
14040
14041 2017-02-09  Gary Benson  <gbenson@redhat.com>
14042
14043         * symtab.c (add_symtab_completions): Prevent NULL pointer
14044         dereference.
14045
14046 2017-02-08  Pedro Alves  <palves@redhat.com>
14047
14048         * interps.c (interp::interp): Remove reference to quiet_p.
14049         (interp_set): Make static.  Remove dead "Switching to" output
14050         code.
14051         (interp_quiet_p, interp_set_quiet): Delete.
14052         (interpreter_exec_cmd): Don't set the interpreter quiet.
14053         * interps.h (interp_quiet_p): Make static.
14054         (class interp) <quiet_p>: Remove field
14055
14056 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14057
14058         * cli/cli-decode.c (find_command_name_length): Make it extern.
14059         * cli/cli-decode.h (find_command_name_length): Declare.
14060         * cli/cli-script.c (command_name_equals, line_first_arg):
14061         New functions.
14062         (process_next_line): Use cli-decode to parse command names.
14063         (build_command_line): Make args a constant pointer.
14064
14065 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14066
14067         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14068         Remove case-insensitive search.
14069
14070 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
14071
14072         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14073         at the end of the line.  Avoids an ARI warning.
14074
14075 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
14076
14077         * NEWS: Mention support for record/replay of Intel 64 rdrand and
14078         rdseed instructions.
14079         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14080
14081 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
14082
14083         PR tdep/20936
14084         Provide and use sparc32 and sparc64 target description XML files.
14085         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14086         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14087         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14088         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14089         * features/sparc/sparc32-solaris.xml: New file.
14090         * features/sparc/sparc64-solaris.xml: New file.
14091         * features/sparc/sparc32-solaris.c: Generated.
14092         * features/sparc/sparc64-solaris.c: Generated.
14093         * sparc-tdep.h: Account for differences in target descriptions.
14094         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14095         (sparc32_register_type): Use target provided registers.
14096         (validate_tdesc_registers): New function.
14097         (sparc32_gdbarch_init): Use tdesc_has_registers.
14098         Set pseudoregister functions.
14099         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14100         (sparc64_register_type): Use target provided registers.
14101         (sparc64_init_abi): Set pseudoregister functions.
14102
14103 2017-02-03  Tom Tromey  <tom@tromey.com>
14104
14105         PR rust/21097:
14106         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14107         with a single member.
14108
14109 2017-02-03  Pedro Alves  <palves@redhat.com>
14110
14111         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14112         (cli_interp_base::~cli_interp_base): New.
14113         (cli_interp): New struct.
14114         (as_cli_interp): Cast the interp itself to cli_interp.
14115         (cli_interpreter_pre_command_loop): Rename to ...
14116         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
14117         parameter.
14118         (cli_interpreter_init): Rename to ...
14119         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
14120         boolean.  Make extern.
14121         (cli_interpreter_resume): Rename to ...
14122         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
14123         extern.
14124         (cli_interpreter_suspend): Rename to ...
14125         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
14126         extern.
14127         (cli_interpreter_exec): Rename to ...
14128         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
14129         extern.
14130         (cli_interpreter_supports_command_editing): Rename to ...
14131         (cli_interp_base::supports_command_editing): ... this.  Remove
14132         'interp' parameter.  Make extern.
14133         (cli_ui_out): Rename to ...
14134         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
14135         Make extern.
14136         (cli_set_logging): Rename to ...
14137         (cli_interp_base::set_logging): ... this.  Remove 'interp'
14138         parameter.  Make extern.
14139         (cli_interp_procs): Delete.
14140         (cli_interp_factory): Adjust to use "new".
14141         * cli/cli-interp.h: Include "interps.h".
14142         (struct cli_interp_base): New struct.
14143         * interps.c (struct interp): Delete.  Fields moved to interps.h.
14144         (interp_new): Delete.
14145         (interp::interp, interp::~interp): New.
14146         (interp_set): Use bool, and return void.  Assume the interpreter
14147         has suspend, init and resume methods, and that the all return
14148         void.
14149         (set_top_level_interpreter): interp_set returns void.
14150         (interp_ui_out): Adapt.
14151         (current_interp_set_logging): Adapt.
14152         (interp_data): Delete.
14153         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14154         (interp_exec): Adapt.
14155         (top_level_interpreter_data): Delete.
14156         * interps.h (interp_init_ftype, interp_resume_ftype)
14157         (interp_suspend_ftype, interp_exec_ftype)
14158         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14159         (class interp): New.
14160         (interp_new): Delete.
14161         (interp_set): Now returns void.  Use bool.
14162         (interp_data, top_level_interpreter_data): Delete.
14163         * mi/mi-common.h: Include interps.h.
14164         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
14165         init, resume, suspect, exec, interp_ui_out, set_logging and
14166         pre_command_loop methods.
14167         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14168         (mi_interpreter_init): Rename to ...
14169         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
14170         bool, return void and make extern.  Adjust.
14171         (mi_interpreter_resume): ... Rename to ...
14172         (mi_interp::resume): ... this.  Remove the 'data' parameter,
14173         return void and make extern.  Adjust.
14174         (mi_interpreter_suspend): ... Rename to ...
14175         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
14176         return void and make extern.  Adjust.
14177         (mi_interpreter_exec): ... Rename to ...
14178         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
14179         extern.  Adjust.
14180         (mi_interpreter_pre_command_loop): ... Rename to ...
14181         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
14182         parameter and make extern.
14183         (mi_on_normal_stop_1): Adjust.
14184         (mi_ui_out): Rename to ...
14185         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
14186         parameter and make extern.  Adjust.
14187         (mi_set_logging): Rename to ...
14188         (mi_interp::set_logging): ... this.  Remove the 'interp'
14189         parameter and make extern.  Adjust.
14190         (mi_interp_procs): Delete.
14191         (mi_interp_factory): Adjust to use 'new'.
14192         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14193         (mi_print_exception, mi_execute_command, mi_load_progress):
14194         Adjust.
14195         * tui/tui-interp.c (tui_interp): New class.
14196         (as_tui_interp): Return a tui_interp pointer.
14197         (tui_on_normal_stop, tui_on_signal_received)
14198         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14199         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14200         to use interp::interp_ui_out.
14201         (tui_init): Rename to ...
14202         (tui_interp::init): ... this.  Remove the 'self' parameter, use
14203         bool, return void and make extern.  Adjust.
14204         (tui_resume): Rename to ...
14205         (tui_interp::resume): ... this.  Remove the 'data' parameter,
14206         return void and make extern.  Adjust.
14207         (tui_suspend): Rename to ...
14208         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
14209         return void and make extern.  Adjust.
14210         (tui_ui_out): Rename to ...
14211         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
14212         parameter, and make extern.  Adjust.
14213         (tui_exec): Rename to ...
14214         (tui_interp::exec): ... this.  Remove the 'data' parameter and
14215         make extern.
14216         (tui_interp_procs): Delete.
14217         (tui_interp_factory): Use "new".
14218
14219 2017-02-02  Tom Tromey  <tom@tromey.com>
14220
14221         * rust-exp.y (ends_raw_string, space_then_number)
14222         (rust_identifier_start_p): Return bool.
14223         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14224         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14225         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14226         (rust_chartype_p): Return bool.
14227         (val_print_struct, rust_print_struct_def, rust_print_type):
14228         Update.
14229         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14230         Return bool.
14231
14232 2017-02-02  Tom Tromey  <tom@tromey.com>
14233
14234         * rust-lang.c: Reindent.
14235
14236 2017-02-02  Tom Tromey  <tom@tromey.com>
14237
14238         * rust-lang.h (rust_crate_for_block): Update.
14239         * rust-lang.c (rust_crate_for_block): Return std::string.
14240         (rust_get_disr_info): Use std:;string, not
14241         gdb::unique_xmalloc_ptr.
14242         * rust-exp.y (crate_name): Update.
14243
14244 2017-02-02  Pedro Alves  <palves@redhat.com>
14245
14246         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14247         field out of gdb_disassembler_test and make it static.
14248
14249 2017-02-02  Pedro Alves  <palves@redhat.com>
14250
14251         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14252         mi1_interp and mi_interp fields.
14253
14254 2017-02-02  Pedro Alves  <palves@redhat.com>
14255
14256         * cli/cli-interp.c (struct saved_output_files, saved_output):
14257         Moved from cli/cli-logging.c.
14258         (cli_set_logging): New function.
14259         (cli_interp_procs): Install cli_set_logging.
14260         * cli/cli-interp.h (make_logging_output, cli_set_logging):
14261         Declare.
14262         * cli/cli-logging.c (struct saved_output_files, saved_output):
14263         Moved to cli/cli-interp.c.
14264         (pop_output_files): Don't save outputs here.
14265         (make_logging_output): New function.
14266         (handle_redirections): Don't build tee nor save previous outputs
14267         here.
14268         * interps.c (current_interp_set_logging): Change prototype.
14269         Assume there's always a set_logging_proc method installed.
14270         * interps.h (interp_set_logging_ftype): Change prototype.
14271         (current_interp_set_logging): Change prototype and adjust comment.
14272         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
14273         use make_logging_output.
14274         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14275 2017-02-02  Pedro Alves  <palves@redhat.com>
14276
14277         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14278         from ...
14279         (set_logging_overwrite): ... here.
14280         (logging_no_redirect_file): Delete.
14281         (set_logging_redirect): Don't handle redirection on the fly.
14282         Instead warn that "logging off" / "logging on" is necessary.
14283         (pop_output_files): Delete references to logging_no_redirect_file.
14284         (show_logging_command): Always speak in terms of what will happen
14285         once logging is reenabled.
14286
14287 2017-02-02  Pedro Alves  <palves@redhat.com>
14288
14289         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14290
14291 2017-02-02  Pedro Alves  <palves@redhat.com>
14292
14293         * disasm.c (gdb_pretty_print_insn): Rename to ...
14294         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14295         Remove gdbarch parameter.  Adapt to clear the object's buffers
14296         instead of allocating new buffers, and to print using the object's
14297         gdb_disassembler instead of calling gdb_print_insn.
14298         (dump_insns): Use gdb_pretty_print_disassembler.
14299         * disasm.h (gdb_pretty_print_insn): Delete declaration.
14300         (gdb_pretty_print_disassembler): New class.
14301         * record-btrace.c (btrace_insn_history): Use
14302         gdb_pretty_print_disassembler.
14303
14304 2017-02-02  Pedro Alves  <palves@redhat.com>
14305
14306         * ada-lang.c (type_as_string): Use string_file.
14307         * ada-valprint.c (ada_print_floating): Use string_file.
14308         * ada-varobj.c (ada_varobj_scalar_image)
14309         (ada_varobj_get_value_image): Use string_file.
14310         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14311         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14312         * breakpoint.c (update_inserted_breakpoint_locations)
14313         (insert_breakpoint_locations, reattach_breakpoints)
14314         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14315         (print_it_watchpoint): Use string_file.
14316         (save_breakpoints): Use stdio_file.
14317         * c-exp.y (oper): Use string_file.
14318         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14319         tee_file.
14320         (pop_output_files): Use delete.
14321         (handle_redirections): Use stdio_file and tee_file.
14322         * cli/cli-setshow.c (do_show_command): Use string_file.
14323         * compile/compile-c-support.c (c_compute_program): Use
14324         string_file.
14325         * compile/compile-c-symbols.c (generate_vla_size): Take a
14326         'string_file &' instead of a 'ui_file *'.
14327         (generate_c_for_for_one_variable): Take a 'string_file &' instead
14328         of a 'ui_file *'.  Use string_file.
14329         (generate_c_for_variable_locations): Take a 'string_file &'
14330         instead of a 'ui_file *'.
14331         * compile/compile-internal.h (generate_c_for_for_one_variable):
14332         Take a 'string_file &' instead of a 'ui_file *'.
14333         * compile/compile-loc2c.c (push, pushf, unary, binary)
14334         (print_label, pushf_register_address, pushf_register)
14335         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14336         'ui_file *'.  Adjust.
14337         * compile/compile.c (compile_to_object): Use string_file.
14338         * compile/compile.h (compile_dwarf_expr_to_c)
14339         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14340         'ui_file *'.
14341         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14342         (replace_typedefs_qualified_name): Use string_file and
14343         obstack_copy0.
14344         * disasm.c (gdb_pretty_print_insn): Use string_file.
14345         (gdb_disassembly): Adjust reference the null_stream global.
14346         (do_ui_file_delete): Delete.
14347         (gdb_insn_length): Use null_stream.
14348         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14349         * dwarf2loc.c (dwarf2_compile_property_to_c)
14350         (locexpr_generate_c_location, loclist_generate_c_location): Take a
14351         'string_file &' instead of a 'ui_file *'.
14352         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14353         * dwarf2read.c (do_ui_file_peek_last): Delete.
14354         (dwarf2_compute_name): Use string_file.
14355         * event-top.c (gdb_setup_readline): Use stdio_file.
14356         * gdbarch.sh (verify_gdbarch): Use string_file.
14357         * gdbtypes.c (safe_parse_type): Use null_stream.
14358         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14359         string_file.
14360         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14361         'string_file *' instead of a 'ui_file *'.
14362         (gdbscm_arch_disassemble): Use string_file.
14363         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14364         * guile/scm-ports.c (class ioscm_file_port): Now a class that
14365         inherits from ui_file.
14366         (ioscm_file_port_delete, ioscm_file_port_rewind)
14367         (ioscm_file_port_put): Delete.
14368         (ioscm_file_port_write): Rename to ...
14369         (ioscm_file_port::write): ... this.  Remove file_port_magic
14370         checks.
14371         (ioscm_file_port_new): Delete.
14372         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14373         ui_file_up.
14374         * guile/scm-type.c (tyscm_type_name): Use string_file.
14375         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14376         Use string_file.
14377         * infcmd.c (print_return_value_1): Use string_file.
14378         * infrun.c (print_target_wait_results): Use string_file.
14379         * language.c (add_language): Use string_file.
14380         * location.c (explicit_to_string_internal): Use string_file.
14381         * main.c (captured_main_1): Use null_file.
14382         * maint.c (maintenance_print_architecture): Use stdio_file.
14383         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14384         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14385         event_channel>: Change type to mi_console_file pointer.
14386         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14387         (mi_console_file_delete): Delete.
14388         (struct mi_console_file): Delete.
14389         (mi_console_file_magic): Delete.
14390         (mi_console_file_new): Delete.
14391         (mi_console_file::mi_console_file): New.
14392         (mi_console_file_delete): Delete.
14393         (mi_console_file_fputs): Delete.
14394         (mi_console_file::write): New.
14395         (mi_console_raw_packet): Delete.
14396         (mi_console_file::flush): New.
14397         (mi_console_file_flush): Delete.
14398         (mi_console_set_raw): Rename to ...
14399         (mi_console_file::set_raw): ... this.
14400         * mi/mi-console.h (class mi_console_file): New class.
14401         (mi_console_file_new, mi_console_set_raw): Delete.
14402         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14403         (mi_set_logging): Use delete and tee_file.  Adjust.
14404         * mi/mi-main.c (output_register): Use string_file.
14405         (mi_cmd_data_evaluate_expression): Use string_file.
14406         (mi_cmd_data_read_memory): Use string_file.
14407         (mi_cmd_execute, print_variable_or_computed): Use string_file.
14408         * mi/mi-out.c (mi_ui_out::main_stream): New.
14409         (mi_ui_out::rewind): Use main_stream and
14410         string_file.
14411         (mi_ui_out::put): Use main_stream and string_file.
14412         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14413         Allocate a 'string_file' instead.
14414         (mi_out_new): Don't allocate a mem_fileopen stream here.
14415         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14416         (mi_ui_out::main_stream): Declare method.
14417         * printcmd.c (eval_command): Use string_file.
14418         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14419         * python/py-arch.c (archpy_disassemble): Use string_file.
14420         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14421         * python/py-frame.c (frapy_str): Use string_file.
14422         * python/py-framefilter.c (py_print_type, py_print_single_arg):
14423         Use string_file.
14424         * python/py-type.c (typy_str): Use string_file.
14425         * python/py-unwind.c (unwind_infopy_str): Use string_file.
14426         * python/py-value.c (valpy_str): Use string_file.
14427         * record-btrace.c (btrace_insn_history): Use string_file.
14428         * regcache.c (regcache_print): Use stdio_file.
14429         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14430         * remote.c (escape_buffer): Use string_file.
14431         * rust-lang.c (rust_get_disr_info): Use string_file.
14432         * serial.c (serial_open_ops_1): Use stdio_file.
14433         (do_serial_close): Use delete.
14434         * stack.c (print_frame_arg): Use string_file.
14435         (print_frame_args): Remove local mem_fileopen stream, not used.
14436         (print_frame): Use string_file.
14437         * symmisc.c (maintenance_print_symbols): Use stdio_file.
14438         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14439         Take a 'string_file *' instead of a 'ui_file *'.
14440         * top.c (new_ui): Use stdio_file and stderr_file.
14441         (free_ui): Use delete.
14442         (execute_command_to_string): Use string_file.
14443         (quit_confirm): Use string_file.
14444         * tracepoint.c (collection_list::append_exp): Use string_file.
14445         * tui/tui-disasm.c (tui_disassemble): Use string_file.
14446         * tui/tui-file.c: Don't include "ui-file.h".
14447         (enum streamtype, struct tui_stream): Delete.
14448         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14449         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14450         (tui_file::tui_file): New method.
14451         (tui_file_fputs): Delete.
14452         (tui_file_get_strbuf): Delete.
14453         (tui_file::puts): New method.
14454         (tui_file_adjust_strbuf): Delete.
14455         (tui_file_flush): Delete.
14456         (tui_file::flush): New method.
14457         * tui/tui-file.h: Tweak intro comment.
14458         Include ui-file.h.
14459         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14460         (tui_file_adjust_strbuf): Delete declarations.
14461         (class tui_file): New class.
14462         * tui/tui-io.c (tui_initialize_io): Use tui_file.
14463         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14464         (tui_register_format): Use string_stream.
14465         * tui/tui-stack.c (tui_make_status_line): Use string_file.
14466         (tui_get_function_from_frame): Use string_file.
14467         * typeprint.c (type_to_string): Use string_file.
14468         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14469         (null_stream): New global.
14470         (ui_file_delete): Delete.
14471         (ui_file::ui_file): New.
14472         (null_file_isatty): Delete.
14473         (ui_file::~ui_file): New.
14474         (null_file_rewind): Delete.
14475         (ui_file::printf): New.
14476         (null_file_put): Delete.
14477         (null_file_flush): Delete.
14478         (ui_file::putstr): New.
14479         (null_file_write): Delete.
14480         (ui_file::putstrn): New.
14481         (null_file_read): Delete.
14482         (ui_file::putc): New.
14483         (null_file_fputs): Delete.
14484         (null_file_write_async_safe): Delete.
14485         (ui_file::vprintf): New.
14486         (null_file_delete): Delete.
14487         (null_file::write): New.
14488         (null_file_fseek): Delete.
14489         (null_file::puts): New.
14490         (ui_file_data): Delete.
14491         (null_file::write_async_safe): New.
14492         (gdb_flush, ui_file_isatty): Adjust.
14493         (ui_file_put, ui_file_rewind): Delete.
14494         (ui_file_write): Adjust.
14495         (ui_file_write_for_put): Delete.
14496         (ui_file_write_async_safe, ui_file_read): Adjust.
14497         (ui_file_fseek): Delete.
14498         (fputs_unfiltered): Adjust.
14499         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14500         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14501         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14502         (set_ui_file_data): Delete.
14503         (string_file::~string_file, string_file::write)
14504         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14505         (do_ui_file_as_string, ui_file_as_string): Delete.
14506         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14507         (struct mem_file): Delete.
14508         (mem_file_new): Delete.
14509         (stdio_file::stdio_file): New.
14510         (mem_file_delete): Delete.
14511         (stdio_file::stdio_file): New.
14512         (mem_fileopen): Delete.
14513         (stdio_file::~stdio_file): New.
14514         (mem_file_rewind): Delete.
14515         (stdio_file::set_stream): New.
14516         (mem_file_put): Delete.
14517         (stdio_file::open): New.
14518         (mem_file_write): Delete.
14519         (stdio_file_magic, struct stdio_file): Delete.
14520         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14521         (stdio_file::flush): New.
14522         (stdio_file_read): Rename to ...
14523         (stdio_file::read): ... this.  Adjust.
14524         (stdio_file_write): Rename to ...
14525         (stdio_file::write): ... this.  Adjust.
14526         (stdio_file_write_async_safe): Rename to ...
14527         (stdio_file::write_async_safe) ... this.  Adjust.
14528         (stdio_file_fputs): Rename to ...
14529         (stdio_file::puts) ... this.  Adjust.
14530         (stdio_file_isatty): Delete.
14531         (stdio_file_fseek): Delete.
14532         (stdio_file::isatty): New.
14533         (stderr_file_write): Rename to ...
14534         (stderr_file::write) ... this.  Adjust.
14535         (stderr_file_fputs): Rename to ...
14536         (stderr_file::puts) ... this.  Adjust.
14537         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14538         (stderr_file::stderr_file): New.
14539         (tee_file_magic): Delete.
14540         (struct tee_file): Delete.
14541         (tee_file::tee_file): New.
14542         (tee_file_new): Delete.
14543         (tee_file::~tee_file): New.
14544         (tee_file_delete): Delete.
14545         (tee_file_flush): Rename to ...
14546         (tee_file::flush): ... this.  Adjust.
14547         (tee_file_write): Rename to ...
14548         (tee_file::write): ... this.  Adjust.
14549         (tee_file::write_async_safe): New.
14550         (tee_file_fputs): Rename to ...
14551         (tee_file::puts): ... this.  Adjust.
14552         (tee_file_isatty): Rename to ...
14553         (tee_file::isatty): ... this.  Adjust.
14554         * ui-file.h (struct obstack, struct ui_file): Don't
14555         forward-declare.
14556         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14557         (ui_file_write_ftype)
14558         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14559         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14560         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14561         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14562         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14563         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14564         (set_ui_file_fseek): Delete.
14565         (ui_file_data, ui_file_delete, ui_file_rewind)
14566         (struct ui_file): New.
14567         (ui_file_up): New.
14568         (class null_file): New.
14569         (null_stream): Declare.
14570         (ui_file_write_for_put, ui_file_put): Delete.
14571         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14572         Delete.
14573         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14574         (gdb_fopen, tee_file_new): Delete.
14575         (struct string_file): New.
14576         (struct stdio_file): New.
14577         (stdio_file_up): New.
14578         (struct stderr_file): New.
14579         (class tee_file): New.
14580         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14581         of a 'ui_file *'.  Adjust.
14582         * ui-out.h (class ui_out) <field_stream>: Likewise.
14583         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14584         (null_stream): Delete.
14585         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14586         Adjust.
14587         * utils.h (struct ui_file): Delete forward declaration..
14588         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14589         (error_stream): Take a 'string_file &' instead of a
14590         'ui_file *'.
14591         * varobj.c (varobj_value_get_print_value): Use string_file.
14592         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14593         * gdbarch.c: Regenerate.
14594
14595 2017-02-02  Pedro Alves  <palves@redhat.com>
14596
14597         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14598         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
14599         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
14600         Adjust to call gdb_print_insn instead of
14601         gdb_disassembler::print_insn.
14602         (dump_insns, do_mixed_source_and_assembly_deprecated)
14603         (do_mixed_source_and_assembly, do_assembly_only): Add back a
14604         'gdbarch' parameter.  Remove gdb_disassembler parameter.
14605         (gdb_disassembly): Don't allocate a gdb_disassembler here.
14606         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14607         declaration.
14608         (gdb_pretty_print_insn): Re-add declaration.
14609         * record-btrace.c (btrace_insn_history): Don't allocate a
14610         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
14611
14612 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
14613
14614         * disasm.h (gdb_disassembly): Remove file_string parameter.
14615         * disasm.c (gdb_disassembly): Likewise.
14616         * cli/cli-cmds.c (print_disassembly): Adapt.
14617         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14618         * stack.c (do_gdb_disassembly): Likewise.
14619
14620 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14621
14622         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14623         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14624         targets.  And if the implicit value is longer than needed, extract
14625         the first bytes instead of the "least significant" ones.
14626
14627 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14628
14629         * btrace.c (btrace_enable): Do not call btrace_add_pc for
14630         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14631         (btrace_fetch): Assert can_access_registers_ptid.
14632         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14633         validate_registers_access.
14634
14635 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14636
14637         * gdbthread.h (can_access_registers_ptid): New.
14638         * thread.c (can_access_registers_ptid): New.
14639
14640 2017-02-01  Pedro Alves  <palves@redhat.com>
14641
14642         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14643
14644 2017-01-31  Pedro Alves  <palves@redhat.com>
14645
14646         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
14647         Fix typos.
14648
14649 2017-01-31  Pedro Alves  <palves@redhat.com>
14650
14651         * stack.c (print_frame_args): Remove local mem_fileopen stream,
14652         not used.
14653
14654 2017-01-31  Pedro Alves  <palves@redhat.com>
14655
14656         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
14657
14658 2017-01-31  Pedro Alves  <palves@redhat.com>
14659
14660         * common/scoped_restore.h
14661         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
14662         change the value's parameter type to T2.
14663         (make_scoped_restore): Likewise.
14664
14665 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14666             Richard Henderson  <rth@redhat.com>
14667
14668         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
14669         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
14670         GS_BASE for older kernels.
14671         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
14672         GS_BASE for older kernels.
14673         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
14674         and GS_BASE to the offset table.
14675         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
14676         system register group.
14677         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
14678         for older kernels.
14679         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
14680         amd64 ABI.
14681         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
14682         AMD64_GSBASE_REGNUM.
14683         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
14684         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
14685         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
14686         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
14687         i386/64bit-segments.xml in those rules.
14688         * features/i386/64bit-segments.xml: New file.
14689         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
14690         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
14691         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
14692         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
14693         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
14694         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
14695         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
14696         * features/i386/amd64-avx-linux.c: Regenerated.
14697         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
14698         * features/i386/amd64-avx-mpx.c: Regenerated.
14699         * features/i386/amd64-avx512-linux.c: Regenerated.
14700         * features/i386/amd64-linux.c: Regenerated.
14701         * features/i386/amd64-mpx-linux.c: Regenerated.
14702         * features/i386/i386-avx-mpx-linux.c: Regenerated.
14703         * features/i386/i386-avx-mpx.c: Regenerated.
14704         * features/i386/x32-avx-linux.c: Regenerated.
14705         * features/i386/x32-avx512-linux.c: Regenerated.
14706         * regformats/i386/amd64-avx-linux.dat: Regenerated.
14707         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
14708         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
14709         * regformats/i386/amd64-linux.dat: Regenerated.
14710         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
14711         * regformats/i386/x32-avx-linux.dat: Regenerated.
14712         * regformats/i386/x32-avx512-linux.dat: Regenerated.
14713         * regformats/i386/x32-linux.dat: Regenerated.
14714
14715 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14716
14717         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
14718         Set to AMD64_NUM_REGS.
14719
14720 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14721
14722         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
14723         that checks validity of a register number.
14724
14725 2017-01-27  Kees Cook  <keescook@google.com>
14726
14727         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
14728         fetch_fpregs if target has fpa registers.
14729         (arm_linux_store_inferior_registers): Call store_fpregs if target
14730         has fpa registers.
14731
14732 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14733
14734         * cris-tdep.c (cris_gdbarch_init): Remove check for
14735         info.byte_order and force it to BFD_ENDIAN_LITTLE.
14736
14737 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
14738
14739         * corelow.c (get_core_register_section): Check for regset
14740         existence before checking for REGSET_VARIABLE_SIZE.
14741
14742 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14743             Pedro Alves  <palves@redhat.com>
14744
14745         PR gdb/20939
14746         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
14747         call memory_error, save memaddr instead.
14748         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
14749         negative, cal memory_error.
14750         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
14751
14752 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14753
14754         * disasm-selftests.c (memory_error_test): New function.
14755         (_initialize_disasm_selftests): Register memory_error_test.
14756
14757 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14758
14759         * Makefile.in (SFILES): Add disasm-selftests.c and
14760         selftest-arch.c.
14761         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
14762         * disasm-selftests.c: New file.
14763         * selftest-arch.c: New file.
14764         * selftest-arch.h: New file.
14765
14766 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14767
14768         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
14769         to bfd_arch_mep.  Don't return 0 if section is not
14770         found.  Call print_insn_mep.
14771
14772 2017-01-26  Pedro Alves  <palves@redhat.com>
14773             Yao Qi  <yao.qi@linaro.org>
14774
14775         * arm-tdep.c: Include "disasm.h".
14776         (gdb_print_insn_arm): Update code to get gdbarch.
14777         * disasm.c (dis_asm_read_memory): Change it to
14778         gdb_disassembler::dis_asm_read_memory.
14779         (dis_asm_memory_error): Likewise.
14780         (dis_asm_print_address): Likewise.
14781         (gdb_pretty_print_insn): Change it to
14782         gdb_disassembler::pretty_print_insn.
14783         (dump_insns): Add one argument gdb_disassemlber.  All
14784         callers updated.
14785         (do_mixed_source_and_assembly_deprecated): Likewise.
14786         (do_mixed_source_and_assembly): Likewise.
14787         (do_assembly_only): Likewise.
14788         (gdb_disassembler::gdb_disassembler): New.
14789         (gdb_disassembler::print_insn): New.
14790         * disasm.h (class gdb_disassembler): New.
14791         (gdb_pretty_print_insn): Remove declaration.
14792         (gdb_disassemble_info): Likewise.
14793         * guile/scm-disasm.c (class gdbscm_disassembler): New.
14794         (gdbscm_disasm_read_memory_worker): Update.
14795         (gdbscm_disasm_read_memory): Update.
14796         (gdbscm_disasm_memory_error): Remove.
14797         (gdbscm_disasm_print_address): Remove.
14798         (gdbscm_disassembler::gdbscm_disassembler): New.
14799         (gdbscm_print_insn_from_port): Update.
14800         * mips-tdep.c: Include disasm.h.
14801         (gdb_print_insn_mips): Update code to get gdbarch.
14802         * record-btrace.c (btrace_insn_history): Update.
14803         * spu-tdep.c: Include disasm.h.
14804         (struct spu_dis_asm_data): Remove.
14805         (struct spu_dis_asm_info): New.
14806         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
14807         SPU id.
14808         (gdb_print_insn_spu): Cast disassemble_info to
14809         spu_dis_asm_info.
14810
14811 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14812
14813         * disasm.c (do_ui_file_delete): Delete.
14814         (gdb_insn_length): Move code creating stream to ...
14815         * utils.c (null_stream): ... here.  New function.
14816         * utils.h (null_stream): Declare.
14817
14818 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
14819
14820         * python/py-inferior.c (find_thread_object): Return directly
14821         from the loop.  Remove "found" variable.
14822
14823 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
14824
14825         GDB 7.12.1 released.
14826
14827 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14828
14829         * python/py-function.c (fnpy_call): Reorder declarations to have
14830         the gdbpy_enter object declared first.
14831         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
14832
14833 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14834
14835         PR python/21068
14836         * python/python-internal.h (PyMem_RawMalloc): Define for
14837         Python < 3.4.
14838         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
14839         PyMem_RawMalloc instead of PyMem_Malloc.
14840
14841 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
14842             Luis Machado  <lgustavo@codesourcery.com>
14843
14844         * NEWS (New commands): Mention flash-erase.
14845         (New MI commands): Mention target-flash-erase.
14846         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
14847         command.
14848         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
14849         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
14850         * target.c (flash_erase_command): New function.
14851         (initialize_targets): Add new flash-erase command.
14852         * target.h (flash_erase_command): New declaration.
14853
14854 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
14855
14856         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
14857         HAVE_SYS_PROCFS_H is defined.
14858
14859 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14860
14861         * remote.c (struct cached_reg): Change data into a pointer.
14862         * (stop_reply_dtr): Free data pointers before deleting vector.
14863         (process_stop_reply): Likewise.
14864         (remote_parse_stop_reply): Allocate space for data
14865
14866 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14867
14868         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
14869         MAX_REGISTER_SIZE.
14870         (amd64_pseudo_register_read_value): Likewise.
14871         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
14872         (store_register_using_P): Likewise.
14873         * regcache.c (regcache_xfer_part): Likewise.
14874
14875 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
14876
14877         Split real and pseudo registers.
14878         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
14879         (sparc32_pseudo_regnum): New enum.
14880         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
14881         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
14882         (SPARC32_CP0_REGISTERS): New macro.
14883         (sparc32_pseudo_register_name): New function.
14884         (sparc32_register_name): Use sparc32_pseudo_register_name.
14885         (sparc32_pseudo_register_type): New function.
14886         (sparc32_register_type): Use sparc32_pseudo_register_type.
14887         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
14888         pseudo register numbers.
14889         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
14890         (SPARC64_CP0_REGISTERS): New macro.
14891         (sparc64_pseudo_register_name): New function.
14892         (sparc64_register_name): Use sparc64_pseudo_register_name.
14893         (sparc64_pseudo_register_type): New function.
14894         (sparc64_register_type): Use sparc64_pseudo_register_type.
14895         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
14896         pseudo register numbers.
14897         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
14898         sparc64_store_arguments): Handle pseudo register numbers.
14899
14900 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14901
14902         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
14903         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
14904         output.
14905         (getpkt_or_notif_sane_1): Likewise.
14906
14907 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14908
14909         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
14910         of CC.  Pass "-x c++-header" instead of "-x c".
14911
14912 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14913
14914         * remote.c (remote_can_async_p): Update comment.
14915
14916 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14917
14918         * linux-nat.c (linux_nat_can_async_p): Update comment.
14919
14920 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14921
14922         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
14923
14924 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
14925
14926         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
14927
14928 2017-01-10  Tom Tromey  <tom@tromey.com>
14929
14930         * python/py-type.c (typy_legacy_template_argument): Update.
14931         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
14932         ~demangle_parse_info): Declare new members.
14933         (cp_demangled_name_to_comp): Return unique_ptr.
14934         (cp_demangled_name_parse_free)
14935         (make_cleanup_cp_demangled_name_parse_free)
14936         (cp_new_demangle_parse_info): Remove.
14937         * cp-support.c (do_demangled_name_parse_free_cleanup)
14938         (make_cleanup_cp_demangled_name_parse_free): Remove.
14939         (inspect_type, cp_canonicalize_string_full)
14940         (cp_canonicalize_string): Update.
14941         (mangled_name_to_comp): Change return type.
14942         (cp_class_name_from_physname, method_name_from_physname)
14943         (cp_func_name, cp_remove_params): Update.
14944         * cp-name-parser.y (demangle_parse_info): New constructor, from
14945         cp_new_demangle_parse_info.
14946         (~demangle_parse_info): New destructor, from
14947         cp_demangled_name_parse_free.
14948         (cp_merge_demangle_parse_infos): Update.
14949         (cp_demangled_name_to_comp): Change return type.
14950
14951 2017-01-10  Tom Tromey  <tom@tromey.com>
14952
14953         * top.c (prevent_dont_repeat): Change return type.
14954         * python/python.c (execute_gdb_command): Use std::string.
14955         Update.
14956         * guile/guile.c (gdbscm_execute_gdb_command): Update.
14957         * command.h (prevent_dont_repeat): Change return type.
14958         * breakpoint.c (bpstat_do_actions_1): Update.
14959
14960 2017-01-10  Tom Tromey  <tom@tromey.com>
14961
14962         * value.h (scoped_value_mark::~scoped_value_mark): Call
14963         free_to_mark.
14964         (scoped_value_mark::free_to_mark): New method.
14965         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
14966         scoped_value_mark.
14967
14968 2017-01-10  Tom Tromey  <tom@tromey.com>
14969
14970         * python/py-value.c (valpy_dereference, valpy_referenced_value)
14971         (valpy_reference_value, valpy_const_value, valpy_get_address)
14972         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
14973         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
14974         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
14975         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
14976         scoped_value_mark.
14977         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
14978         * value.h (scoped_value_mark): New class.
14979
14980 2017-01-10  Tom Tromey  <tom@tromey.com>
14981
14982         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
14983         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
14984         * psymtab.c (discard_psymtabs_upto): Remove.
14985         (make_cleanup_discard_psymtabs): Remove.
14986         (struct psymtab_state): Remove.
14987
14988 2017-01-10  Tom Tromey  <tom@tromey.com>
14989
14990         * record-full.c (record_full_save_cleanups): Remove.
14991         (record_full_save): Use gdb::unlinker.
14992         * gcore.c (do_bfd_delete_cleanup): Remove.
14993         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
14994         cleanups.
14995         * dwarf2read.c (unlink_if_set): Remove.
14996         (write_psymtabs_to_index): Use gdb::unlinker.
14997         * common/gdb_unlinker.h: New file.
14998
14999 2017-01-10  Tom Tromey  <tom@tromey.com>
15000
15001         * windows-tdep.c (windows_xfer_shared_library): Update.
15002         * windows-nat.c (windows_make_so): Update.
15003         * utils.h (make_cleanup_bfd_unref): Remove.
15004         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15005         * symfile.h (symfile_bfd_open)
15006         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15007         * symfile.c (read_symbols, symbol_file_add)
15008         (separate_debug_file_exists): Update.
15009         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15010         (generic_load, reread_symbols): Update.
15011         * symfile-mem.c (symbol_file_add_from_memory): Update.
15012         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15013         (spu_symbol_file_add_from_memory): Update.
15014         * solist.h (struct target_so_ops) <bfd_open>: Return
15015         gdb_bfd_ref_ptr.
15016         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15017         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15018         gdb_bfd_ref_ptr.
15019         (solib_map_sections, reload_shared_libraries_1): Update.
15020         * solib-svr4.c (enable_break): Update.
15021         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15022         * solib-frv.c (enable_break2): Update.
15023         * solib-dsbt.c (enable_break): Update.
15024         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15025         gdb_bfd_ref_ptr.
15026         (darwin_solib_get_all_image_info_addr_at_init): Update.
15027         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15028         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15029         * record-full.c (record_full_save): Update.
15030         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15031         * procfs.c (insert_dbx_link_bpt_in_file): Update.
15032         * minidebug.c (find_separate_debug_file_in_section): Return
15033         gdb_bfd_ref_ptr.
15034         * machoread.c (macho_add_oso_symfile): Change abfd to
15035         gdb_bfd_ref_ptr.
15036         (macho_symfile_read_all_oso): Update.
15037         (macho_check_dsym): Return gdb_bfd_ref_ptr.
15038         (macho_symfile_read): Update.
15039         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15040         (jit_bfd_try_read_symtab): Update.
15041         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15042         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15043         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15044         gdb_bfd_ref_ptr.
15045         (gdb_bfd_ref_policy): New struct.
15046         (gdb_bfd_ref_ptr): New typedef.
15047         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15048         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15049         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15050         gdb_bfd_ref_ptr.
15051         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15052         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15053         (gcore_command): Update.
15054         * exec.c (exec_file_attach): Update.
15055         * elfread.c (elf_symfile_read): Update.
15056         * dwarf2read.c (dwarf2_get_dwz_file): Update.
15057         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15058         (open_and_init_dwo_file): Update.
15059         (open_dwp_file): Return gdb_bfd_ref_ptr.
15060         (open_and_init_dwp_file): Update.
15061         * corelow.c (core_open): Update.
15062         * compile/compile-object-load.c (compile_object_load): Update.
15063         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15064         * coffread.c (coff_symfile_read): Update.
15065         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15066         gdb_bfd_ref_ptr.  Rename.
15067         (dump_bfd_file, restore_command): Update.
15068         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15069         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15070         (find_separate_debug_file_by_buildid): Update.
15071
15072 2017-01-10  Tom Tromey  <tom@tromey.com>
15073
15074         * common/gdb_ref_ptr.h: New file.
15075         * python/py-ref.h (struct gdbpy_ref_policy): New.
15076         (gdbpy_ref): Now a typedef.
15077
15078 2017-01-10  Tom Tromey  <tom@tromey.com>
15079
15080         * utils.h (make_cleanup_htab_delete): Don't declare.
15081         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15082         Remove.
15083         * linespec.c (decode_compound_collector): Add constructor,
15084         destructor.
15085         (lookup_prefix_sym): Remove cleanup.
15086         (symtab_collector): Add constructor, destructor.
15087         (collect_symtabs_from_filename): Remove cleanup.
15088         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15089         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15090         Use htab_up.
15091         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15092         * dwarf2read.c (dw2_expand_symtabs_matching)
15093         (dw2_map_symbol_filenames, dwarf_decode_macros)
15094         (write_psymtabs_to_index): Use htab_up.
15095         * dwarf2loc.c (func_verify_no_selftailcall)
15096         (call_site_find_chain_1, func_verify_no_selftailcall)
15097         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15098         std::vector, gdb::unique_xmalloc_ptr.
15099         (call_sitep): Remove typedef.
15100         (dwarf2_locexpr_baton_eval): Remove unused variable.
15101
15102 2017-01-10  Tom Tromey  <tom@tromey.com>
15103
15104         * python/python-internal.h (make_cleanup_py_decref)
15105         (make_cleanup_py_xdecref): Don't declare.
15106         * python/py-utils.c (py_decref, make_cleanup_py_decref)
15107         (py_xdecref, make_cleanup_py_xdecref): Remove.
15108
15109 2017-01-10  Tom Tromey  <tom@tromey.com>
15110
15111         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15112         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15113
15114 2017-01-10  Tom Tromey  <tom@tromey.com>
15115
15116         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15117
15118 2017-01-10  Tom Tromey  <tom@tromey.com>
15119
15120         * python/py-utils.c (unicode_to_encoded_string)
15121         (python_string_to_target_string)
15122         (python_string_to_target_python_string)
15123         (python_string_to_host_string, gdbpy_obj_to_string)
15124         (get_addr_from_python): Use gdbpy_ref.
15125
15126 2017-01-10  Tom Tromey  <tom@tromey.com>
15127
15128         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15129         gdbpy_ref.
15130
15131 2017-01-10  Tom Tromey  <tom@tromey.com>
15132
15133         * python/python.c (eval_python_command, gdbpy_decode_line)
15134         (gdbpy_run_events, gdbpy_start_type_printers)
15135         (gdbpy_apply_type_printers): Use gdbpy_ref.
15136
15137 2017-01-10  Tom Tromey  <tom@tromey.com>
15138
15139         * python/py-param.c (get_doc_string, compute_enum_values): Use
15140         gdbpy_ref.
15141
15142 2017-01-10  Tom Tromey  <tom@tromey.com>
15143
15144         * python/py-inferior.c (find_thread_object, build_inferior_list):
15145         Use gdbpy_ref.
15146
15147 2017-01-10  Tom Tromey  <tom@tromey.com>
15148
15149         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15150
15151 2017-01-10  Tom Tromey  <tom@tromey.com>
15152
15153         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15154         gdbpy_ref.
15155
15156 2017-01-10  Tom Tromey  <tom@tromey.com>
15157
15158         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
15159         extra incref.
15160         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15161         Use gdbpy_ref.
15162
15163 2017-01-10  Tom Tromey  <tom@tromey.com>
15164
15165         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15166         gdbpy_ref.
15167
15168 2017-01-10  Tom Tromey  <tom@tromey.com>
15169
15170         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
15171         decref results of PyArg_ParseTupleAndKeywords.
15172
15173 2017-01-10  Tom Tromey  <tom@tromey.com>
15174
15175         * python/python.c (python_run_simple_file): Use
15176         unique_xmalloc_ptr, gdbpy_ref.
15177
15178 2017-01-10  Tom Tromey  <tom@tromey.com>
15179
15180         * python/py-prettyprint.c (print_stack_unless_memory_error)
15181         (print_string_repr, print_children): Use gdbpy_ref.
15182         (dummy_python_frame): New class.
15183         (dummy_python_frame::dummy_python_frame): Rename from
15184         push_dummy_python_frame.
15185         (py_restore_tstate): Remove.
15186
15187 2017-01-10  Tom Tromey  <tom@tromey.com>
15188
15189         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15190
15191 2017-01-10  Tom Tromey  <tom@tromey.com>
15192
15193         * python/python.c (ensure_python_env, restore_python_env):
15194         Remove.
15195         * python/python-internal.h (ensure_python_env): Don't declare.
15196         * varobj.h (varobj_ensure_python_env): Don't declare.
15197         * varobj.c (varobj_ensure_python_env): Remove.
15198
15199 2017-01-10  Tom Tromey  <tom@tromey.com>
15200
15201         * varobj.c (varobj_value_get_print_value): Use
15202         gdbpy_enter_varobj.
15203
15204 2017-01-10  Tom Tromey  <tom@tromey.com>
15205
15206         * python/py-prettyprint.c (print_string_repr, print_children):
15207         Update.
15208         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15209         of "encoding".
15210         * varobj.c (varobj_value_get_print_value): Update.
15211         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15212
15213 2017-01-10  Tom Tromey  <tom@tromey.com>
15214
15215         * varobj.c (varobj_get_display_hint)
15216         (dynamic_varobj_has_child_method, install_new_value_visualizer)
15217         (varobj_set_visualizer, free_variable): Use
15218         gdbpy_enter_varobj.
15219
15220 2017-01-10  Tom Tromey  <tom@tromey.com>
15221
15222         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15223         (do_finish_initialization): New function.  Use gdbpy_ref.
15224         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
15225         do_finish_initialization.
15226
15227 2017-01-10  Tom Tromey  <tom@tromey.com>
15228
15229         * python/py-param.c (get_set_value, get_show_value): Use
15230         gdbpy_enter, gdbpy_ref.
15231
15232 2017-01-10  Tom Tromey  <tom@tromey.com>
15233
15234         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15235
15236 2017-01-10  Tom Tromey  <tom@tromey.com>
15237
15238         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15239
15240 2017-01-10  Tom Tromey  <tom@tromey.com>
15241
15242         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15243         Use gdbpy_enter_varobj.
15244
15245 2017-01-10  Tom Tromey  <tom@tromey.com>
15246
15247         * varobj.c (gdbpy_enter_varobj): New constructor.
15248         * python/python-internal.h (gdbpy_enter_varobj): New class.
15249         * python/py-varobj.c (py_varobj_get_iterator): Use
15250         gdbpy_enter_varobj.
15251
15252 2017-01-10  Tom Tromey  <tom@tromey.com>
15253
15254         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15255         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15256         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15257         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15258         unique_xmalloc_ptr.
15259         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15260
15261 2017-01-10  Tom Tromey  <tom@tromey.com>
15262
15263         * python/py-xmethods.c (invoke_match_method): Use
15264         gdbpy_ref.
15265
15266 2017-01-10  Tom Tromey  <tom@tromey.com>
15267
15268         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15269         gdbpy_enter, gdbpy_ref.
15270
15271 2017-01-10  Tom Tromey  <tom@tromey.com>
15272
15273         * python/python.c (python_interactive_command): Use gdbpy_enter.
15274
15275 2017-01-10  Tom Tromey  <tom@tromey.com>
15276
15277         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15278         gdbpy_ref.
15279
15280 2017-01-10  Tom Tromey  <tom@tromey.com>
15281
15282         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15283         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15284
15285 2017-01-10  Tom Tromey  <tom@tromey.com>
15286
15287         * utils.h (htab_deleter): New struct.
15288         (htab_up): New typedef.
15289         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15290         gdbpy_enter, gdbpy_ref, htab_up.
15291
15292 2017-01-10  Tom Tromey  <tom@tromey.com>
15293
15294         * python/py-unwind.c (pending_frame_invalidate): Remove.
15295         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15296
15297 2017-01-10  Tom Tromey  <tom@tromey.com>
15298
15299         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15300         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15301
15302 2017-01-10  Tom Tromey  <tom@tromey.com>
15303
15304         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15305
15306 2017-01-10  Tom Tromey  <tom@tromey.com>
15307
15308         * python/python.c (gdbpy_eval_from_control_command)
15309         (gdbpy_source_script, gdbpy_run_events)
15310         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15311         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15312         gdbpy_enter.
15313
15314 2017-01-10  Tom Tromey  <tom@tromey.com>
15315
15316         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15317
15318 2017-01-10  Tom Tromey  <tom@tromey.com>
15319
15320         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15321
15322 2017-01-10  Tom Tromey  <tom@tromey.com>
15323
15324         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15325         (python_on_inferior_call_pre, python_on_inferior_call_post)
15326         (python_on_memory_change, python_on_register_change)
15327         (python_inferior_exit, python_new_objfile, add_thread_object)
15328         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15329
15330 2017-01-10  Tom Tromey  <tom@tromey.com>
15331
15332         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15333         (bpfinishpy_handle_exit): Use gdbpy_enter.
15334
15335 2017-01-10  Tom Tromey  <tom@tromey.com>
15336
15337         * python/py-cmd.c (cmdpy_destroyer)
15338         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15339         gdbpy_enter.
15340
15341 2017-01-10  Tom Tromey  <tom@tromey.com>
15342
15343         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15344         gdbpy_enter.
15345         (gdbpy_breakpoint_has_cond): Likewise.
15346
15347 2017-01-10  Tom Tromey  <tom@tromey.com>
15348
15349         * python/python.c (gdbpy_enter): New constructor.
15350         (~gdbpy_enter): New destructor.
15351         (restore_python_env, ensure_python_env): Rewrite.
15352         * python/python-internal.h (gdbpy_enter): New class.
15353
15354 2017-01-10  Tom Tromey  <tom@tromey.com>
15355
15356         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15357
15358 2017-01-10  Tom Tromey  <tom@tromey.com>
15359
15360         * python/py-value.c (value_has_field, get_field_flag)
15361         (get_field_type, valpy_getitem, convert_value_from_python): Use
15362         gdbpy_ref.
15363
15364 2017-01-10  Tom Tromey  <tom@tromey.com>
15365
15366         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15367         gdbpy_ref.
15368
15369 2017-01-10  Tom Tromey  <tom@tromey.com>
15370
15371         * python/py-prettyprint.c (search_pp_list)
15372         (find_pretty_printer_from_objfiles)
15373         (find_pretty_printer_from_progspace)
15374         (find_pretty_printer_from_gdb, find_pretty_printer)
15375         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15376         gdbpy_ref.
15377
15378 2017-01-10  Tom Tromey  <tom@tromey.com>
15379
15380         * python/py-param.c (call_doc_function): Use gdbpy_ref.
15381
15382 2017-01-10  Tom Tromey  <tom@tromey.com>
15383
15384         * python/py-linetable.c (build_line_table_tuple_from_pcs)
15385         (ltpy_get_all_source_lines): Use gdbpy_ref.
15386
15387 2017-01-10  Tom Tromey  <tom@tromey.com>
15388
15389         * python/py-framefilter.c (extract_sym, extract_value)
15390         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15391         gdbpy_ref.
15392
15393 2017-01-10  Tom Tromey  <tom@tromey.com>
15394
15395         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15396
15397 2017-01-10  Tom Tromey  <tom@tromey.com>
15398
15399         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15400
15401 2017-01-10  Tom Tromey  <tom@tromey.com>
15402
15403         * python/py-function.c (convert_values_to_python, fnpy_init): Use
15404         gdbpy_ref.
15405
15406 2017-01-10  Tom Tromey  <tom@tromey.com>
15407
15408         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15409
15410 2017-01-10  Tom Tromey  <tom@tromey.com>
15411
15412         * python/py-type.c (convert_field, make_fielditem, typy_fields)
15413         (typy_range): Use gdbpy_ref.
15414
15415 2017-01-10  Tom Tromey  <tom@tromey.com>
15416
15417         * python/py-threadevent.c (create_thread_event_object): Use
15418         gdbpy_ref.
15419         * python/py-stopevent.c (create_stop_event_object): Simplify.
15420         (emit_stop_event): Use gdbpy_ref.
15421         * python/py-signalevent.c (create_signal_event_object): Use
15422         gdbpy_ref.
15423         * python/py-newobjfileevent.c (create_new_objfile_event_object)
15424         (emit_new_objfile_event, create_clear_objfiles_event_object)
15425         (emit_clear_objfiles_event): Use gdbpy_ref.
15426         * python/py-infevents.c (create_inferior_call_event_object)
15427         (create_register_changed_event_object)
15428         (create_memory_changed_event_object, emit_inferior_call_event)
15429         (emit_memory_changed_event, emit_register_changed_event): Use
15430         gdbpy_ref.
15431         * python/py-exitedevent.c (create_exited_event_object)
15432         (emit_exited_event): Use gdbpy_ref.
15433         * python/py-event.h (evpy_emit_event): Remove
15434         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15435         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15436         * python/py-continueevent.c (emit_continue_event): Use
15437         gdbpy_ref.
15438         * python/py-breakpoint.c (gdbpy_breakpoint_created)
15439         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15440         gdbpy_ref.
15441         * python/py-bpevent.c (create_breakpoint_event_object): Use
15442         gdbpy_ref.
15443
15444 2017-01-10  Tom Tromey  <tom@tromey.com>
15445
15446         * python/py-ref.h: New file.
15447
15448 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15449
15450         * cli-out.c (cli_ui_out::do_redirect): Change return type to
15451         void.
15452         * cli-out.h (cli_ui_out::do_redirect): Likewise.
15453         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15454         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15455         * ui-out.c (ui_out::redirect): Likewise.
15456         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15457         * cli/cli-logging.c (set_logging_redirect): Update call site of
15458         ui_out::redirect.
15459         (handle_redirections): Likewise.
15460         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15461         * top.c (execute_command_to_string): Likewise.
15462         * utils.c (do_ui_out_redirect_pop): Likewise.
15463
15464 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15465
15466         * stack.c (_initialize_stack): Update "frame" command help message.
15467
15468 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
15469
15470         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15471
15472 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15473
15474         * x86-linux-nat.h: Include gdb_proc_service.h.
15475
15476 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15477
15478         * ser-base.h: Include serial.h.
15479
15480 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15481
15482         * ppc-linux-tdep.h: Include ppc-tdep.h.
15483
15484 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15485
15486         * nat/amd64-linux-siginfo.h: Include signal.h.
15487
15488 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15489
15490         * nat/aarch64-linux-hw-point.h: Include break-common.h.
15491
15492 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15493
15494         * mi/mi-parse.h: Include mi-cmds.h.
15495
15496 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15497
15498         * inf-loop.c: Don't include "target.h".
15499         * inf-loop.h: Include it here.
15500
15501 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15502
15503         * dfp.h: Include "dboulest.h" and "expression.h".
15504
15505 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15506
15507         * ax-gdb.h: Include "ax.h".
15508
15509 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15510
15511         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15512         with nat/gdb_ptrace.h.
15513
15514 2017-01-05  Yao Qi  <yao.qi@linaro.org>
15515
15516         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15517         new line.
15518         (mips64_fbsd_sigframe_init): Likewise.
15519
15520 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15521
15522         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15523         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15524
15525 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15526
15527         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15528         * NEWS: Mention new FreeBSD/mips native configuration.
15529         * config/mips/fbsd.mh: New file.
15530         * configure.host: Add mips*-*-freebsd*.
15531         * mips-fbsd-nat.c: New file.
15532
15533 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15534
15535         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15536         (ALLDEPFILES): Add mips-fbsd-tdep.c.
15537         * NEWS: Mention new FreeBSD/mips target.
15538         * configure.tgt: Add mips*-*-freebsd*.
15539         * mips-fbsd-tdep.c: New file.
15540         * mips-fbsd-tdep.h: New file.
15541
15542 2017-01-04  Yao Qi  <yao.qi@linaro.org>
15543
15544         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15545         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15546
15547 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15548
15549         Update copyright year range in all GDB files.
15550
15551 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15552
15553         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15554
15555 For older changes see ChangeLog-2016.
15556 \f
15557 Local Variables:
15558 mode: change-log
15559 left-margin: 8
15560 fill-column: 74
15561 version-control: never
15562 coding: utf-8
15563 End: