Simplify completion_list_add_name | remove sym_text / sym_text_len
[external/binutils.git] / gdb / ChangeLog
1 2017-11-08  Pedro Alves  <palves@redhat.com>
2
3         * ada-lang.c (ada_make_symbol_completion_list): Remove text and
4         text_len locals and don't pass them down.
5         * symtab.c (completion_list_add_name): Remove
6         sym_text/sym_text_len parameters and adjust.
7         (completion_list_add_symbol, completion_list_add_msymbol)
8         (completion_list_objc_symbol, completion_list_add_fields)
9         (add_symtab_completions): Likewise.
10         (default_collect_symbol_completion_matches_break_on)
11         (collect_file_symbol_completion_matches): Remove sym_text_len
12         local and don't pass it down.
13         * symtab.h (completion_list_add_name): Remove
14         sym_text/sym_text_len parameters.
15
16 2017-11-08  Pedro Alves  <palves@redhat.com>
17
18         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
19         unittests/lookup_name_info-selftests.c.
20         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
21         * cp-support.c: Include "selftest.h".
22         (cp_remove_params_1): Rename from cp_remove_params.  Add
23         'require_param' parameter, and handle it.
24         (cp_remove_params): Reimplement.
25         (cp_remove_params_if_any): New.
26         (selftests::quote): New.
27         (selftests::check_remove_params): New.
28         (selftests::test_cp_remove_params): New.
29         (_initialize_cp_support): Install
30         selftests::test_cp_remove_params.
31         * cp-support.h (cp_remove_params_if_any): Declare.
32         * dwarf2read.c :Include "selftest.h".
33         (dw2_expand_symtabs_matching_symbol): Use
34         lookup_name_info::make_ignore_params.
35         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
36         (selftests::dw2_expand_symtabs_matching::string_or_null)
37         (selftests::dw2_expand_symtabs_matching::check_match)
38         (selftests::dw2_expand_symtabs_matching::test_symbols)
39         (selftests::dw2_expand_symtabs_matching::run_test): New.
40         (_initialize_dwarf2_read): Register
41         selftests::dw2_expand_symtabs_matching::run_test.
42         * psymtab.c (psym_expand_symtabs_matching): Use
43         lookup_name_info::make_ignore_params.
44         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
45         If the lookup name wants to ignore parameters, strip them.
46         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
47         code handling '('.
48         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
49         (default_collect_symbol_completion_matches_break_on): Don't try to
50         strip parameters.
51         * symtab.h (lookup_name_info::lookup_name_info): Add
52         'ignore_parameters' parameter.
53         (lookup_name_info::ignore_parameters)
54         (lookup_name_info::make_ignore_params): New methods.
55         (lookup_name_info::m_ignore_parameters): New field.
56         * unittests/lookup_name_info-selftests.c: New file.
57
58 2017-11-08  Pedro Alves  <palves@redhat.com>
59
60         * dwarf2read.c (dw2_expand_marked_cus)
61         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
62         (dw2_expand_symtabs_matching): Move further below.
63         (dw2_expand_marked_cus): Reindent.
64
65 2017-11-08  Pedro Alves  <palves@redhat.com>
66
67         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
68         (struct name_component): New.
69         (mapped_index::name_components): New field.
70         (mapped_index::symbol_name_at): New method.
71         (dwarf2_read_index): Call mapped_index ctor.
72         (dw2_map_matching_symbols): Add comment about name_components
73         table.
74         (dw2_expand_symtabs_matching): Factor part to...
75         (dw2_expand_symtabs_matching_symbol): ... this new function.
76         Build name components table, and lookup symbols in it before
77         calling the name matcher.
78         (dw2_expand_marked_cus): New, factored out from
79         dw2_expand_symtabs_matching.
80         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
81
82 2017-11-08   Pedro Alves  <palves@redhat.com>
83
84         * ada-lang.c (ada_encode): Rename to ..
85         (ada_encode_1): ... this.  Add throw_errors parameter and handle
86         it.
87         (ada_encode): Reimplement.
88         (match_name): Delete, folded into full_name.
89         (resolve_subexp): No longer pass the encoded name to
90         ada_lookup_symbol_list.
91         (should_use_wild_match): Delete.
92         (name_match_type_from_name): New.
93         (ada_lookup_simple_minsym): Use lookup_name_info and the
94         language's symbol_name_matcher_ftype.
95         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
96         (ada_add_block_renamings): Adjust to use lookup_name_info.
97         (ada_lookup_name): New.
98         (add_nonlocal_symbols, ada_add_all_symbols)
99         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
100         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
101         (ada_name_for_lookup): Delete.
102         (ada_lookup_encoded_symbol): Construct a verbatim name.
103         (wild_match): Reverse sense of return type.  Use bool.
104         (full_match): Reverse sense of return type.  Inline bits of old
105         match_name here.
106         (ada_add_block_symbols): Adjust to use lookup_name_info.
107         (symbol_completion_match): Delete, folded into...
108         (ada_lookup_name_info::matches): ... .this new method.
109         (symbol_completion_add): Delete.
110         (ada_collect_symbol_completion_matches): Add name_match_type
111         parameter.  Adjust to use lookup_name_info and
112         completion_list_add_name.
113         (get_var_value, ada_add_global_exceptions): Adjust to use
114         lookup_name_info.
115         (ada_get_symbol_name_cmp): Delete.
116         (do_wild_match, do_full_match): New functions.
117         (ada_lookup_name_info::ada_lookup_name_info): New method.
118         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
119         functions.
120         (ada_language_defn): Install ada_get_symbol_name_matcher.
121         * ada-lex.l (processId): If name starts with '<', copy it
122         verbatim.
123         * block.c (block_iter_match_step, block_iter_match_first)
124         (block_iter_match_next, block_lookup_symbol)
125         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
126         lookup_name_info.
127         * block.h (block_iter_match_first, block_iter_match_next)
128         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
129         * c-lang.c (c_language_defn, cplus_language_defn)
130         (asm_language_defn, minimal_language_defn): Adjust comments to
131         refer to la_get_symbol_name_matcher.
132         * completer.c (complete_files_symbols)
133         (collect_explicit_location_matches, symbol_completer): Pass a
134         symbol_name_match_type down.
135         * completer.h (class completion_match, completion_match_result):
136         New classes.
137         (completion_tracker::reset_completion_match_result): New method.
138         (completion_tracker::m_completion_match_result): New field.
139         * cp-support.c (make_symbol_overload_list_block): Adjust to use
140         lookup_name_info.
141         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
142         functions.
143         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
144         * d-lang.c: Adjust comments to refer to
145         la_get_symbol_name_matcher.
146         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
147         Adjust to use lookup_name_info.
148         (dict_iter_match_first, dict_iter_match_next)
149         (iter_match_first_hashed, iter_match_next_hashed)
150         (iter_match_first_linear, iter_match_next_linear): Adjust to work
151         with a lookup_name_info.
152         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
153         Likewise.
154         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
155         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
156         (gdb_index_symbol_name_matcher): New class.
157         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
158         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
159         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
160         with a symbol_name_match_type.
161         (f_language_defn): Adjust comments to refer to
162         la_get_symbol_name_matcher.
163         * go-lang.c (go_language_defn): Adjust comments to refer to
164         la_get_symbol_name_matcher.
165         * language.c (default_symbol_name_matcher)
166         (language_get_symbol_name_matcher): New functions.
167         (unknown_language_defn, auto_language_defn): Adjust comments to
168         refer to la_get_symbol_name_matcher.
169         * language.h (symbol_name_cmp_ftype): Delete.
170         (language_defn) <la_collect_symbol_completion_matches>: Add match
171         type parameter.
172         <la_get_symbol_name_cmp>: Delete field.
173         <la_get_symbol_name_matcher>: New field.
174         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
175         (default_symbol_name_matcher, language_get_symbol_name_matcher):
176         Declare.
177         * linespec.c (iterate_over_all_matching_symtabs)
178         (iterate_over_file_blocks): Adjust to use lookup_name_info.
179         (find_methods): Add language parameter, and use lookup_name_info
180         and the language's symbol_name_matcher_ftype.
181         (linespec_complete_function): Adjust.
182         (lookup_prefix_sym): Use lookup_name_info.
183         (add_all_symbol_names_from_pspace): Adjust.
184         (find_superclass_methods): Add language parameter and pass it
185         down.
186         (find_method): Pass symbol language down.
187         (find_linespec_symbols): Don't demangle or Ada encode here.
188         (search_minsyms_for_name): Add lookup_name_info parameter.
189         (add_matching_symbols_to_info): Add name_match_type parameter.
190         Use lookup_name_info.
191         * m2-lang.c (m2_language_defn): Adjust comments to refer to
192         la_get_symbol_name_matcher.
193         * minsyms.c: Include <algorithm>.
194         (add_minsym_to_demangled_hash_table): Remove table parameter and
195         add objfile parameter.  Use search_name_hash, and add language to
196         demangled languages vector.
197         (struct found_minimal_symbols): New struct.
198         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
199         New functions.
200         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
201         input names here.  Use lookup_name_info instead.  Lookup up
202         demangled names once for each language in the demangled names
203         vector.
204         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
205         demangled names once for each language in the demangled names
206         vector.
207         (build_minimal_symbol_hash_tables): Adjust.
208         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
209         lookup_name_info.
210         * objc-lang.c (objc_language_defn): Adjust comment to refer to
211         la_get_symbol_name_matcher.
212         * objfiles.h: Include <vector>.
213         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
214         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
215         la_get_symbol_name_matcher.
216         * p-lang.c (pascal_language_defn): Adjust comment to refer to
217         la_get_symbol_name_matcher.
218         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
219         (match_partial_symbol): Use symbol_name_match_type,
220         lookup_name_info and psymbol_name_matches.
221         (lookup_partial_symbol): Use lookup_name_info.
222         (map_block): Use symbol_name_match_type and lookup_name_info.
223         (psym_map_matching_symbols): Use symbol_name_match_type.
224         (psymbol_name_matches): New.
225         (recursively_search_psymtabs): Use lookup_name_info and
226         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
227         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
228         'kind' parameter to 'domain'.
229         * rust-lang.c (rust_language_defn): Adjust comment to refer to
230         la_get_symbol_name_matcher.
231         * symfile-debug.c (debug_qf_map_matching_symbols)
232         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
233         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
234         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
235         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
236         Adjust to use symbol_name_match_type.
237         <expand_symtabs_matching>: Adjust to use lookup_name_info.
238         (expand_symtabs_matching): Adjust to use lookup_name_info.
239         * symmisc.c (maintenance_expand_symtabs): Use
240         lookup_name_info::match_any ().
241         * symtab.c (symbol_matches_search_name): New.
242         (eq_symbol_entry): Adjust to use lookup_name_info and the
243         language's matcher.
244         (demangle_for_lookup_info::demangle_for_lookup_info): New.
245         (lookup_name_info::match_any): New.
246         (iterate_over_symbols, search_symbols): Use lookup_name_info.
247         (compare_symbol_name): Add language, lookup_name_info and
248         completion_match_result parameters, and use them.
249         (completion_list_add_name): Make extern.  Add language and
250         lookup_name_info parameters.  Use them.
251         (completion_list_add_symbol, completion_list_add_msymbol)
252         (completion_list_objc_symbol): Add lookup_name_info parameters and
253         adjust.  Pass down language.
254         (completion_list_add_fields): Add lookup_name_info parameters and
255         adjust.  Pass down language.
256         (add_symtab_completions): Add lookup_name_info parameters and
257         adjust.
258         (default_collect_symbol_completion_matches_break_on): Add
259         name_match_type parameter, and use it.  Use lookup_name_info.
260         (default_collect_symbol_completion_matches)
261         (collect_symbol_completion_matches): Add name_match_type
262         parameter, and pass it down.
263         (collect_symbol_completion_matches_type): Adjust.
264         (collect_file_symbol_completion_matches): Add name_match_type
265         parameter, and use lookup_name_info.
266         * symtab.h: Include <string> and "common/gdb_optional.h".
267         (enum class symbol_name_match_type): New.
268         (class ada_lookup_name_info): New.
269         (struct demangle_for_lookup_info): New.
270         (class lookup_name_info): New.
271         (symbol_name_matcher_ftype): New.
272         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
273         (symbol_matches_search_name): Declare.
274         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
275         (default_collect_symbol_completion_matches)
276         (collect_symbol_completion_matches)
277         (collect_file_symbol_completion_matches): Add name_match_type
278         parameter.
279         (iterate_over_symbols): Use lookup_name_info.
280         (completion_list_add_name): Declare.
281         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
282         (strncmp_iw_with_mode): Now extern.
283         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
284         (strncmp_iw_with_mode): Declare.
285
286 2017-11-08  Keith Seitz  <keiths@redhat.com>
287             Pedro Alves  <palves@redhat.com>
288
289         * ada-lang.c (ada_language_defn): Install
290         default_search_name_hash.
291         * buildsym.c (struct buildsym_compunit): <language>: New field.
292         (finish_block_internal): Pass language when creating dictionaries.
293         (start_buildsym_compunit, start_symtab): New language parameters.
294         Use them.
295         (restart_symtab): Pass down compilation unit's language.
296         * buildsym.h (enum language): Forward declare.
297         (start_symtab): New 'language' parameter.
298         * c-lang.c (c_language_defn, cplus_language_defn)
299         (asm_language_defn, minimal_language_defn): Install
300         default_search_name_hash.
301         * coffread.c (coff_start_symtab): Adjust.
302         * d-lang.c (d_language_defn): Install default_search_name_hash.
303         * dbxread.c (struct symloc): Add 'pst_language' field.
304         (PST_LANGUAGE): Define.
305         (start_psymtab, read_ofile_symtab): Use it.
306         (process_one_symbol): New 'language' parameter.  Pass it down.
307         * dictionary.c (struct dictionary) <language>: New field.
308         (DICT_LANGUAGE): Define.
309         (dict_create_hashed, dict_create_hashed_expandable)
310         (dict_create_linear, dict_create_linear_expandable): New parameter
311         'language'.  Set the dictionary's language.
312         (iter_match_first_hashed): Adjust to rename.
313         (insert_symbol_hashed): Assert we don't see mismatching
314         languages.  Adjust to rename.
315         (dict_hash): Rename to ...
316         (default_search_name_hash): ... this and make extern.
317         * dictionary.h (struct language_defn): Forward declare.
318         (dict_create_hashed): New parameter 'language'.
319         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
320         * f-lang.c (f_language_defn): Install default_search_name_hash.
321         * go-lang.c (go_language_defn): Install default_search_name_hash.
322         * jit.c (finalize_symtab): Pass compunit's language to dictionary
323         creation.
324         * language.c (unknown_language_defn, auto_language_defn):
325         * language.h (language_defn::la_search_name_hash): New field.
326         (default_search_name_hash): Declare.
327         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
328         * mdebugread.c (new_block): New parameter 'language'.
329         * mdebugread.c (parse_symbol): Pass symbol language to block
330         allocation.
331         (psymtab_to_symtab_1): Pass down language.
332         (new_symtab): Pass compunit's language to block allocation.
333         * objc-lang.c (objc_language_defn): Install
334         default_search_name_hash.
335         * opencl-lang.c (opencl_language_defn):
336         * p-lang.c (pascal_language_defn): Install
337         default_search_name_hash.
338         * rust-lang.c (rust_language_defn): Install
339         default_search_name_hash.
340         * stabsread.h (enum language): Forward declare.
341         (process_one_symbol): Add 'language' parameter.
342         * symtab.c (search_name_hash): New function.
343         * symtab.h (search_name_hash): Declare.
344         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
345
346 2017-11-08  Pedro Alves  <palves@redhat.com>
347
348         * cp-name-parser.y (main): Don't initialize extra_chars.
349
350 2017-11-07  Tom Tromey  <tom@tromey.com>
351
352         * event-top.h (command_handler): Constify.
353         * record-full.c (cmd_record_full_start): Update.
354         * thread.c (thread_apply_all_command): Update.
355         * printcmd.c (eval_command): Update.
356         * mi/mi-main.c (mi_execute_cli_command): Update.
357         (mi_execute_async_cli_command): Update.
358         * tui/tui-stack.c (tui_update_command): Update.
359         * cli/cli-interp.c (safe_execute_command): Constify.
360         * record.c (record_start): Update.
361         (record_start, record_stop, cmd_record_start): Update.
362         * record-btrace.c (cmd_record_btrace_bts_start): Update.
363         (cmd_record_btrace_pt_start): Update.
364         (cmd_record_btrace_start): Update.
365         (cmd_record_btrace_start): Update.
366         * reverse.c (exec_reverse_once): Update.
367         * python/python.c (execute_gdb_command): Don't copy the command.
368         * event-top.c (command_line_handler): Update.
369         (command_handler): Constify.
370         * defs.h (deprecated_call_command_hook): Constify.
371         * cli/cli-script.h (execute_user_command): Constify.
372         * cli/cli-script.c (execute_user_command): Constify.
373         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
374         (enum command_control_type): Update.
375         * main.c (catch_command_errors): Remove non-const overload.
376         (catch_command_errors_ftype): Remove.
377         * python/py-cmd.c (cmdpy_function): Constify.
378         * guile/scm-cmd.c (cmdscm_function): Constify.
379         * cli/cli-dump.c (call_dump_func): Constify.
380         * cli/cli-decode.c (do_const_cfunc): Constify.
381         (do_sfunc): Constify.
382         (cmd_func): Constify.
383         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
384         * top.h (execute_command): Constify.
385         * top.c (execute_command): Constify.
386         (execute_command_to_string): Constify.
387         (deprecated_call_command_hook): Constify.
388         * command.h (cmd_func): Constify.
389         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
390
391 2017-11-07  Tom Tromey  <tom@tromey.com>
392
393         * ada-lang.c (catch_ada_exception_command): Constify.
394         (catch_assert_command): Constify.
395         * break-catch-throw.c (catch_catch_command, catch_throw_command)
396         (catch_rethrow_command): Constify.
397         (catch_exception_command_1): Constify.
398         * breakpoint.h (add_catch_command): Constify.
399         * break-catch-syscall.c (catch_syscall_command_1): Constify.
400         (catch_syscall_split_args): Constify.
401         * break-catch-sig.c (catch_signal_command): Constify.
402         (catch_signal_split_args): Constify.
403         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
404         cmd_const_sfunc_ftype.
405         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
406         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
407         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
408         (add_setshow_string_cmd, struct cmd_list_element)
409         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
410         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
411         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
412         Constify.
413         (set_cmd_sfunc): Constify.
414         (empty_sfunc): Constify.
415         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
416         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
417         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
418         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
419         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
420         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
421         Constify.
422         (set_cmd_sfunc): Constify.
423         (cmd_sfunc_ftype): Remove.
424         * compile/compile.c (set_compile_args): Constify.
425         * infrun.c (set_disable_randomization): Constify.
426         * infcmd.c (set_args_command, set_cwd_command): Constify.
427         * breakpoint.c (set_condition_evaluation_mode): Constify.
428         (add_catch_command): Constify.
429         (catch_fork_command_1, catch_exec_command_1)
430         (catch_load_command_1, catch_unload_command_1): Constify.
431         (catch_load_or_unload): Constify.
432         * guile/scm-param.c (pascm_set_func): Constify.
433         (add_setshow_generic): Constify.
434         * python/py-param.c (get_set_value): Constify.
435         * top.h (set_verbose): Constify.
436         * tui/tui-win.c (tui_set_var_cmd): Constify.
437         * mi/mi-main.c (set_mi_async_command): Constify.
438         * cli/cli-logging.c (set_logging_overwrite)
439         (set_logging_redirect): Constify.
440         * value.c (set_max_value_size): Constify.
441         * valprint.c (set_input_radix, set_output_radix): Constify.
442         * utils.c (set_width_command, set_height_command): Constify.
443         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
444         * tracepoint.c (set_disconnected_tracing)
445         (set_circular_trace_buffer, set_trace_buffer_size)
446         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
447         * top.c (set_history_size_command, set_verbose, set_editing)
448         (set_gdb_datadir, set_history_filename): Constify.
449         * target.c (set_targetdebug, maint_set_target_async_command)
450         (maint_set_target_non_stop_command, set_target_permissions)
451         (set_write_memory_permission): Constify.
452         (open_target): Constify.
453         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
454         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
455         * symtab.c (set_symbol_cache_size_handler): Constify.
456         * symfile.c (set_ext_lang_command): Constify.
457         * symfile-debug.c (set_debug_symfile): Constify.
458         * source.c (set_directories_command): Constify.
459         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
460         * serial.c (set_parity): Constify.
461         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
462         * remote.c (set_remote_exec_file, set_remotebreak)
463         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
464         * record.c (set_record_insn_history_size)
465         (set_record_call_history_size): Constify.
466         * record-full.c (set_record_full_insn_max_num): Constify.
467         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
468         * osabi.c (set_osabi): Constify.
469         * mips-tdep.c (set_mips64_transfers_32bit_regs)
470         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
471         * maint.c (maintenance_set_profile_cmd): Constify.
472         * linux-thread-db.c (set_libthread_db_search_path): Constify.
473         * language.c (set_language_command, set_range_command)
474         (set_case_command): Constify.
475         * infrun.c (set_non_stop, set_observer_mode)
476         (set_stop_on_solib_events, set_schedlock_func)
477         (set_exec_direction_func): Constify.
478         * infcmd.c (set_inferior_tty_command): Constify.
479         * disasm.c (set_disassembler_options_sfunc): Constify.
480         * demangle.c (set_demangling_command): Constify.
481         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
482         * cris-tdep.c (set_cris_version, set_cris_mode)
483         (set_cris_dwarf2_cfi): Constify.
484         * corefile.c (set_gnutarget_command): Constify.
485         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
486         (set_target_wide_charset_sfunc): Constify.
487         * breakpoint.c (update_dprintf_commands): Constify.
488         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
489         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
490         (set_disassembly_style_sfunc): Constify.
491         * arch-utils.c (set_endian, set_architecture): Constify.
492         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
493         * agent.c (set_can_use_agent): Constify.
494
495 2017-11-07  Tom Tromey  <tom@tromey.com>
496
497         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
498         (go32_pde, go32_pte, go32_pte_for_address): Constify.
499         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
500         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
501         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
502         (parse_int_arg, show_thread_default_detach_sc_cmd)
503         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
504         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
505         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
506         (show_task_pause_cmd, set_task_detach_sc_cmd)
507         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
508         (set_noninvasive_cmd, set_thread_pause_cmd)
509         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
510         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
511         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
512         * windows-nat.c (display_selectors): Constify.
513         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
514         non-const "cfunc".
515         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
516         (cmd_cfunc_eq): Likewise.
517         (struct cmd_list_element): Likewise.
518         (do_cfunc): Remove.
519         (cli_user_command_p): Update.
520         * command.h (add_cmd): Remove non-const overload.
521         (cmd_cfunc_ftype): Remove typedef.
522         (cmd_cfunc_eq): Remove non-const overload.
523         * value.c (show_values): Constify.
524         * thread.c (thread_apply_all_command): Constify.
525         * symfile.c (load_command): Constify.
526         * source.c (directory_command): Constify.
527         * maint.c (maintenance_internal_error)
528         (maintenance_demangler_warning, maintenance_space_display)
529         (maintenance_print_architecture, maintenance_translate_address)
530         (maintenance_info_selftests, maintenance_internal_warning):
531         Constify.
532         * breakpoint.c (disable_trace_command, enable_trace_command):
533         Constify.
534         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
535         Constify.
536         (add_auto_load_safe_path): Constify.
537         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
538         * top.h (show_commands): Constify.
539         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
540         * sparc64-tdep.c (adi_examine_command): Constify.
541         (adi_assign_command): Constify.
542
543 2017-11-07  Tom Tromey  <tom@tromey.com>
544
545         * frame.h (info_locals_command, info_args_command): Constify.
546         * auto-load.h (auto_load_info_scripts): Constify.
547         * inferior.h (registers_info): Constify.
548         * copying.c: Rebuild.
549         * copying.awk: Constify generated commands.
550         * auto-load.c (auto_load_info_scripts)
551         (info_auto_load_gdb_scripts): Constify.
552         * cli/cli-decode.c (struct cmd_list_element): Take a
553         cmd_const_cfunc_ftype.
554         * command.h (add_info): Take a cmd_const_cfunc_ftype.
555         * tui/tui-win.c (tui_all_windows_info): Constify.
556         * python/py-auto-load.c (info_auto_load_python_scripts):
557         Constify.
558         * cli/cli-cmds.c (show_command): Remove non-const overload.
559         * tracepoint.c (info_tvariables_command, info_scope_command):
560         Constify.
561         (info_static_tracepoint_markers_command): Constify.
562         * thread.c (info_threads_command): Constify.
563         (print_thread_info_1): Constify.
564         * target.c (info_target_command): Constify.
565         * symtab.c (info_sources_command, info_functions_command)
566         (info_types_command): Constify.
567         (info_variables_command): Remove non-const overload.
568         * symfile.c (info_ext_lang_command): Constify.
569         * stack.c (info_frame_command, info_locals_command)
570         (info_args_command): Constify.
571         (backtrace_command): Remove non-const overload.
572         * source.c (info_source_command, info_line_command): Constify.
573         * solib.c (info_sharedlibrary_command): Constify.
574         * skip.c (info_skip_command): Constify.
575         * ser-go32.c (info_serial_command): Constify.
576         * reverse.c (info_bookmarks_command): Constify.
577         * printcmd.c (info_symbol_command, info_address_command)
578         (info_display_command): Constify.
579         * osdata.c (info_osdata_command): Constify.
580         * objc-lang.c (info_selectors_command, info_classes_command):
581         Constify.
582         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
583         * memattr.c (info_mem_command): Constify.
584         * macrocmd.c (info_macro_command, info_macros_command): Constify.
585         * linux-fork.c (info_checkpoints_command): Constify.
586         * infrun.c (info_signals_command): Constify.
587         * inflow.c (info_terminal_command): Constify.
588         * inferior.c (info_inferiors_command): Constify.
589         (print_inferior): Constify.
590         * infcmd.c (info_program_command, info_all_registers_command)
591         (info_registers_command, info_vector_command)
592         (info_float_command): Constify.
593         (registers_info): Constify.
594         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
595         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
596         Constify.
597         * f-valprint.c (info_common_command): Constify.
598         * dcache.c (info_dcache_command): Constify.
599         (dcache_info_1): Constify.
600         * darwin-nat-info.c (info_mach_tasks_command)
601         (info_mach_task_command, info_mach_ports_command)
602         (info_mach_port_command, info_mach_threads_command)
603         (info_mach_thread_command, info_mach_regions_command)
604         (info_mach_regions_recurse_command, info_mach_region_command)
605         (info_mach_exceptions_command): Constify.
606         (get_task_from_args): Constify.
607         * cp-support.c (info_vtbl_command): Constify.
608         * breakpoint.c (info_watchpoints_command)
609         (info_tracepoints_command): Constify.
610         (info_breakpoints_command): Remove non-const overload.
611         * avr-tdep.c (avr_io_reg_read_command): Constify.
612         * auxv.c (info_auxv_command): Constify.
613         * ada-tasks.c (info_tasks_command): Constify.
614         (info_task): Constify.
615         * ada-lang.c (info_exceptions_command): Constify.
616
617 2017-11-07  Tom Tromey  <tom@tromey.com>
618
619         * solib.h (no_shared_libraries): Constify.
620         * frame.h (return_command): Constify.
621         * cli/cli-cmds.h (quit_command): Constify.
622         * top.h (quit_command, execute_command): Constify.
623         * target.h (flash_erase_command): Constify.
624         * inferior.h (set_inferior_args, attach_command): Constify.
625         * tracepoint.h (start_tracing, stop_tracing): Constify.
626         * breakpoint.h (break_command, tbreak_command)
627         (hbreak_command_wrapper, thbreak_command_wrapper)
628         (rbreak_command_wrapper, watch_command_wrapper)
629         (awatch_command_wrapper, rwatch_command_wrapper)
630         (get_tracepoint_by_number): Constify.
631         * symtab.c (info_variables_command, rbreak_command)
632         (symtab_symbol_info): Constify.
633         (info_variables_command): Add non-const overload.
634         * top.c (dont_repeat_command): Constify.
635         * breakpoint.c (ignore_command, commands_command)
636         (condition_command, tbreak_command, hbreak_command)
637         (thbreak_command, clear_command, break_command)
638         (info_breakpoints_command, watch_command, rwatch_command)
639         (awatch_command, trace_command, ftrace_command, strace_command)
640         (trace_pass_command, break_range_command, dprintf_command)
641         (agent_printf_command, get_tracepoint_by_number)
642         (watch_maybe_just_location, trace_pass_command): Constify.
643         (info_breakpoints_command): Add non-const overload.
644         * tracefile.c (tsave_command): Constify.
645         * infcmd.c (attach_command, disconnect_command, signal_command)
646         (queue_signal_command, stepi_command, nexti_command)
647         (finish_command, next_command, step_command, until_command)
648         (advance_command, jump_command, continue_command, run_command)
649         (start_command, starti_command, interrupt_command)
650         (run_command_1, set_inferior_args, step_1): Constify.
651         * inferior.c (add_inferior_command, remove_inferior_command)
652         (clone_inferior_command): Constify.
653         * linux-fork.c (checkpoint_command, restart_command): Constify.
654         * windows-nat.c (signal_event_command): Constify.
655         * guile/guile.c (guile_repl_command, guile_command): Constify.
656         * printcmd.c (x_command, display_command, printf_command)
657         (output_command, set_command, call_command, print_command)
658         (eval_command): Constify.
659         (non_const_set_command): Remove.
660         (_initialize_printcmd): Update.
661         * source.c (forward_search_command, reverse_search_command):
662         Constify.
663         * jit.c (jit_reader_load_command, jit_reader_unload_command):
664         Constify.
665         * infrun.c (handle_command): Constify.
666         * memattr.c (mem_command): Constify.
667         * stack.c (return_command, up_command, up_silently_command)
668         (down_command, down_silently_command, frame_command)
669         (backtrace_command, func_command, backtrace_command_1): Constify.
670         (backtrace_command): Add non-const overload.
671         * remote-sim.c (simulator_command): Constify.
672         * exec.c (set_section_command): Constify.
673         * tracepoint.c (tdump_command, trace_variable_command)
674         (tstatus_command, tstop_command, tstart_command)
675         (end_actions_pseudocommand, while_stepping_pseudocommand)
676         (collect_pseudocommand, teval_pseudocommand, actions_command)
677         (start_tracing, stop_tracing): Constify.
678         * value.c (init_if_undefined_command): Constify.
679         * tui/tui-stack.c (tui_update_command): Constify.
680         * tui/tui-win.c (tui_refresh_all_command)
681         (tui_set_tab_width_command, tui_set_win_height_command)
682         (tui_set_focus_command, tui_scroll_forward_command)
683         (tui_scroll_backward_command, tui_scroll_left_command)
684         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
685         (tui_set_win_height): Constify.
686         * tui/tui-layout.c (tui_layout_command): Constify.
687         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
688         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
689         (proc_untrace_sysexit_cmd): Constify.
690         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
691         (threadset_test_cmd, threadlist_update_test_cmd)
692         (threadalive_test): Constify.
693         * objc-lang.c (print_object_command): Constify.
694         * command.h (add_com): Constify.
695         * cli/cli-dump.c (restore_command): Constify.
696         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
697         (help_command, complete_command, shell_command, edit_command)
698         (list_command, disassemble_command, make_command)
699         (apropos_command, alias_command): Constify.
700         * cli/cli-script.c (document_command, define_command)
701         (while_command, if_command, validate_comname): Constify.
702         * cli/cli-decode.c (struct cmd_list_element): Change type of
703         "fun".
704         * target.c (do_monitor_command, flash_erase_command): Constify.
705         * regcache.c (reg_flush_command): Constify.
706         * reverse.c (reverse_step, reverse_next, reverse_stepi)
707         (reverse_nexti, reverse_continue, reverse_finish)
708         (save_bookmark_command, goto_bookmark_command)
709         (exec_reverse_once): Constify.
710         * python/python.c (python_interactive_command, python_command):
711         Constify.
712         * typeprint.c (ptype_command, whatis_command, whatis_exp):
713         Constify.
714         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
715         * gcore.c (gcore_command): Constify.
716
717 2017-11-07  Tom Tromey  <tom@tromey.com>
718
719         * printcmd.c (x_command): Call set_repeat_arguments.
720         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
721         * top.c (repeat_arguments): New global.
722         (set_repeat_arguments): New function.
723         (execute_command): Handle repeat_arguments.
724         (show_commands): Calls set_repeat_arguments.
725         * command.h (set_repeat_arguments): Declare.
726
727 2017-11-07  Tom Tromey  <tom@tromey.com>
728
729         * stack.c (backtrace_command): Use std::string.
730         (backtrace_command_1): Make "count_exp" const.
731
732 2017-11-07  Tom Tromey  <tom@tromey.com>
733
734         * source.c (directory_switch, mod_path, add_path): Constify.
735         * defs.h (add_path, mod_path, directory_switch): Constify.
736         * mi/mi-cmd-env.c (env_mod_path): Constify.
737
738 2017-11-07  Tom Tromey  <tom@tromey.com>
739
740         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
741         (run_command_1, continue_command, step_1, jump_command)
742         (signal_command, until_command, advance_command, finish_command)
743         (attach_command): Update.
744
745 2017-11-07  Tom Tromey  <tom@tromey.com>
746
747         * command.h (set_cmd_cfunc): Don't declare.
748         * cli/cli-decode.c (set_cmd_cfunc): Now static.
749
750 2017-11-07  Tom Tromey  <tom@tromey.com>
751
752         * stack.c (select_frame_command): Constify.
753         * cli/cli-decode.c (add_com_suppress_notification): Constify.
754         * command.h (add_com_suppress_notification): Constify.
755
756 2017-11-07  Tom Tromey  <tom@tromey.com>
757
758         * breakpoint.c (stop_command): Constify.
759         * cli/cli-decode.c (struct cmd_list_element): Constify.
760         * command.h (add_abbrev_prefix_cmd): Constify.
761
762 2017-11-07  Pedro Alves  <palves@redhat.com>
763
764         * breakpoint.c (extract_bp_kind): New enum.
765         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
766         factored out from ...
767         (extract_bp_number_and_location): ... here.
768         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
769
770 2017-11-07  Pedro Alves  <palves@redhat.com>
771
772         * breakpoint.c (extract_bp_number_and_location): Change return
773         type to void.  Throw error instead of warning.
774         (enable_disable_command): Adjust.
775
776 2017-11-07  Xavier Roirand  <roirand@adacore.com>
777             Pedro Alves  <palves@redhat.com>
778
779         * breakpoint.c (map_breakpoint_number_range): New, factored out
780         from ...
781         (map_breakpoint_numbers): ... here.
782         (find_location_by_number): Change parameters from string to
783         breakpoint number and location.
784         (extract_bp_number_and_location): New function.
785         (enable_disable_bp_num_loc)
786         (enable_disable_breakpoint_location_range)
787         (enable_disable_command): New functions, factored out ...
788         (enable_command, disable_command): ... these functions, and
789         adjusted to support ranges.
790         * NEWS: Document enable/disable breakpoint location range feature.
791
792 2017-11-06  Luis Machado  <luis.machado@linaro.org>
793
794         * MAINTAINERS (Write After Approval): Update my e-mail address.
795
796 2017-11-06  Pedro Alves  <palves@redhat.com>
797
798         * gnu-nat.c (gnu_terminal_init): Delete.
799         (gnu_target): Don't install gnu_terminal_init.
800         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
801         (child_terminal_init): ... this function.
802
803 2017-11-06  Pedro Alves  <palves@redhat.com>
804
805         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
806         sgtty.h.
807         * config.in, configure: Regenerate.
808
809 2017-11-06  Pedro Alves  <palves@redhat.com>
810
811         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
812         (async_init_signals): Adjust.
813         (handle_stop_sig): Rename to ...
814         (handle_sigtstp): ... this.
815         (async_stop_sig): Rename to ...
816         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
817         SIGTSTP path.
818         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
819         instead of STOP_SIGNAL thoughout.
820         (handle_stop_sig): Rename to ...
821         (handle_sigtstp): ... this.
822         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
823
824 2017-11-06  Pedro Alves  <palves@redhat.com>
825
826         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
827         longer set flags twice in row.
828
829 2017-11-06  Pedro Alves  <palves@redhat.com>
830
831         * Makefile.in (SER_HARDWIRE): Update comment.
832         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
833         * common/gdb_termios.h: Delete file.
834         * common/job-control.c: Include termios.h and unistd.h instead of
835         gdb_termios.h.
836         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
837         check.
838         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
839         Remove sgtty code.
840         * configure.ac: No longer check for termio.h and sgtty.h.
841         * configure: Regenerate.
842         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
843         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
844         Replace PROCESS_GROUP_TYPE references with pid_t references
845         throughout.
846         (gdb_getpgrp): Delete.
847         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
848         (child_terminal_inferior): Remove comment.  Remove sgtty code.
849         (child_terminal_ours_1): Use tcgetpgrp directly instead of
850         gdb_getpgrp.  Use serial_set_tty_state instead aof
851         serial_noflush_set_tty_state.  Remove sgtty code.
852         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
853         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
854         (inferior_process_group): Now returns pid_t.
855         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
856         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
857         * ser-event.c (serial_event_ops): Update.
858         * ser-go32.c (dos_noflush_set_tty_state): Delete.
859         (dos_ops): Update.
860         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
861         * ser-pipe.c (pipe_ops): Update.
862         * ser-tcp.c (tcp_ops): Update.
863         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
864         HAVE_TERMIOS checks.
865         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
866         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
867         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
868         assume termios.
869         (hardwire_noflush_set_tty_state): Delete.
870         (hardwire_print_tty_state, hardwire_drain_output)
871         (hardwire_flush_output, hardwire_flush_input)
872         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
873         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
874         code, and assume termios.
875         (hardwire_ops): Update.
876         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
877         * serial.c (serial_noflush_set_tty_state): Delete.
878         * serial.h (serial_noflush_set_tty_state): Delete.
879         (serial_ops::noflush_set_tty_state): Delete.
880
881 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
882
883         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
884         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
885         (COMMON_OBS): Remove doublest.o and dfp.o.
886         Do not build target-float.c (instead of doublest.c)
887         with -Wformat-nonliteral.
888
889         * doublest.c: Remove file.
890         * doublest.h: Remove file.
891         * dfp.c: Remove file.
892         * dfp.h: Remove file.
893
894         * target-float.c: Do not include "doublest.h" and "dfp.h".
895         (DOUBLEST): Move here from doublest.h.
896         (enum float_kind): Likewise.
897         (FLOATFORMAT_CHAR_BIT): Likewise.
898         (FLOATFORMAT_LARGEST_BYTES): Likewise.
899         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
900         (floatformat_precision): Likewise.
901         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
902         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
903         Likewise.
904         (host_float_format, host_double_format, host_long_double_format):
905         Likewise.
906         (floatformat_to_string, floatformat_from_string): Likewise.
907         (floatformat_to_doublest): Likewise.  Also, inline the original
908         convert_floatformat_to_doublest.
909         (floatformat_from_doublest): Likewise.  Also, inline the original
910         convert_floatformat_from_doublest.
911
912         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
913         (MAX_DECIMAL_STRING): Move here from dfp.c.
914         (match_endianness): Likewise.
915         (set_decnumber_context, decimal_check_errors): Likewise.
916         (decimal_from_number, decimal_to_number): Likewise.
917         (decimal_to_string, decimal_from_string): Likewise.  Make static.
918         (decimal_from_longest, decimal_from_ulongest): Likewise.
919         (decimal_to_longest): Likewise.
920         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
921         (decimal_convert): Likewise.
922
923 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
924
925         * doublest.c: Do not include "gdbtypes.h".
926         (extract_typed_floating): Remove.
927         (store_typed_floating): Remove.
928         (convert_typed_floating): Remove.
929         * doublest.h (struct type): Remove.
930         (DOUBLEST_PRINT_FORMAT): Remove.
931         (DOUBLEST_SCAN_FORMAT): Remove.
932         (extract_typed_floating): Remove.
933         (store_typed_floating): Remove.
934         (convert_typed_floating): Remove.
935
936         * dfp.c (decimal_from_doublest): Remove.
937         (decimal_to_doublest): Remove.
938         * dfp.h: Do not include "doublest.h".
939         (decimal_from_doublest): Remove.
940         (decimal_to_doublest): Remove.
941
942         * value.c: Do not include "doublest.h" and "dfp.h".
943         (value_as_double): Remove.
944         (unpack_double): Remove.
945         (value_from_double): Remove.
946         (value_from_decfloat): Remove.
947         * value.h: Do not include "doublest.h".
948         (value_as_double): Remove.
949         (unpack_double): Remove.
950         (value_from_double): Remove.
951         (value_from_decfloat): Remove.
952
953 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
954
955         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
956         (i386_extract_return_value): Use target_float_convert.
957         (i386_store_return_value): Likewise.
958         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
959         (i387_value_to_register): Likewise.
960         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
961         (ia64_register_to_value): Use target_float_convert.
962         (ia64_value_to_register): Likewise.
963         (ia64_extract_return_value): Likewise.
964         (ia64_store_return_value): Likewise.
965         (ia64_push_dummy_call): Likewise.
966         * m68k-tdep.c: Include "target-float.h".
967         (m68k_register_to_value): Use target_float_convert.
968         (m68k_value_to_register): Likewise.
969         (m68k_svr4_extract_return_value): Likewise.
970         (m68k_svr4_store_return_value): Likewise.
971         * ppc-sysv-tdep.c: Include "target-float.h".
972         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
973         (do_ppc_sysv_return_value): Likewise.
974         (ppc64_sysv_abi_push_freg): Likewise.
975         (ppc64_sysv_abi_return_value_base): Likewise.
976         * rs6000-aix-tdep.c: Include "target-float.h".
977         (rs6000_push_dummy_call): Use target_float_convert.
978         (rs6000_return_value): Likewise.
979         * rs6000-lynx178-tdep.c: Include "target-float.h".
980         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
981         (rs6000_lynx178_return_value): Likewise.
982         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
983         (rs6000_register_to_value): Use target_float_convert.
984         (rs6000_value_to_register): Likewise.
985         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
986         (arm_extract_return_value): Use target_float_convert.
987         (arm_store_return_value): Likewise.
988         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
989         (sh_register_convert_to_virtual): Use target_float_convert.
990         (sh_register_convert_to_raw): Likewise.
991         * sh64-tdep.c: Include "target-float.h".
992         (sh64_extract_return_value): Use target_float_convert.
993         (sh64_register_convert_to_virtual): Likewise.
994         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
995
996 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
997
998         * target-float.c (floatformat_to_host_double): New function.
999         (floatformat_from_host_double): Likewise.
1000         (target_float_to_host_double): Likewise.
1001         (target_float_from_host_double): Likewise.
1002         * target-float.h (target_float_to_host_double): Add prototype.
1003         (target_float_from_host_double): Likewise.
1004
1005         * guile/scm-value.c: Include "target-float.h".
1006         (gdbscm_value_to_real): Use target_float_to_host_double.
1007         Handle integer source values via value_as_long.
1008         * guile/scm-math.c: Include "target-float.h".  Do not include
1009         "doublest.h", "dfp.h", and "expression.h".
1010         (vlscm_convert_typed_number): Use target_float_from_host_double.
1011         (vlscm_convert_number): Likewise.
1012
1013         * python/py-value.c (valpy_float): Use target_float_to_host_double.
1014         (convert_value_from_python): Use target_float_from_host_double.
1015
1016 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1017
1018         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1019         (cast_from_fixed): Likewise.
1020         (ada_scaling_type): New function.
1021         (ada_delta): Return value instead of DOUBLEST.  Perform target
1022         arithmetic instead of host arithmetic.
1023         (scaling_factor): Rename to ...
1024         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
1025         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
1026         (ada_fixed_to_float): Remove.
1027         (ada_float_to_fixed): Remove.
1028         * ada-lang.h (ada_fixed_to_float): Remove.
1029         (ada_float_to_fixed): Remove.
1030         (ada_delta): Return value instead of DOUBLEST.
1031         (ada_scaling_factor): Add prototype.
1032
1033         * ada-typeprint.c: Include "target-float.h".
1034         (print_fixed_point_type): Perform target arithmetic instead of
1035         host arithmetic.
1036         * ada-valprint.c: Include "target-float.h".
1037         (ada_val_print_num): Perform target arithmetic instead of
1038         host arithmetic for fixed-point types.
1039
1040 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1041
1042         * target-float.c: Include <math.h>.
1043         (floatformat_binop): New function.
1044         (floatformat_compare): Likewise.
1045         (target_float_binop): Likewise.
1046         (target_float_compare): Likewise.
1047         * target-float.h: Include "expression.h".
1048         (target_float_binop): Add prototype.
1049         (target_float_compare): Likewise.
1050
1051         * valarith.c: Do not include "doublest.h" and "dfp.h".
1052         Include "common/byte-vector.h".
1053         (value_args_as_decimal): Remove, replace by ...
1054         (value_args_as_target_float): ... this function.  Handle both
1055         binary and decimal target floating-point formats.
1056         (scalar_binop): Handle both binary and decimal FP using
1057         value_args_as_target_float and target_float_binop.
1058         (value_equal): Handle both binary and decimal FP using
1059         value_args_as_target_float and target_float_compare.
1060         (value_less): Likewise.
1061         (value_pos): Handle all scalar types as simple copy.
1062         (value_neg): Handle all scalar types via BINOP_SUB from 0.
1063         * dfp.c (decimal_binop): Throw error instead of internal_error
1064         when called with an unsupported operation code.
1065
1066 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1067
1068         * target-float.c (target_float_to_string): New function.
1069         (target_float_from_string): New function.
1070         * target-float.h (target_float_to_string): Add prototype.
1071         (target_float_from_string): Add prototype.
1072
1073         * valprint.c: Include "target-float.h".  Do not include
1074         "doublest.h" and "dfp.h".
1075         (print_floating): Use target_float_to_string.
1076         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
1077         (printf_floating): Use target_float_to_string.
1078         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1079         (print_i387_value): Use target_float_to_string.
1080         * mips-tdep.c: Include "target-float.h".
1081         (mips_print_fp_register): Use target_float_to_string.
1082         * sh64-tdep.c: Include "target-float.h".
1083         (sh64_do_fp_register): Use target_float_to_string.
1084
1085         * parse.c: Include "target-float.h".  Do not include
1086         "doublest.h" and "dfp.h".
1087         (parse_float): Use target_float_from_string.
1088         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
1089         (define_symbol): Use target_float_from_string.
1090         * gdbarch-selftests.c: Include "target-float.h".
1091         (register_to_value_test): Use target_float_from_string.
1092
1093 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1094
1095         * Makefile.c (SFILES): Add target-float.c.
1096         (HFILES_NO_SRCDIR): Add target-float.h.
1097         (COMMON_OBS): Add target-float.o.
1098         * target-float.h: New file.
1099         * target-float.c: New file.
1100
1101         * doublest.c (floatformat_classify): Fix detection of float_zero.
1102
1103         * gdbtypes.c (is_floating_type): New function.
1104         * gdbtypes.h (is_floating_type): Add prototype.
1105
1106         * value.c: Do not include "floatformat.h".
1107         (unpack_double): Use target_float_is_valid.
1108         (is_floating_value): New function.
1109         * value.h (is_floating_value): Add prototype-
1110
1111         * valarith.c: Include "target-float.h".
1112         (value_logical_not): Use target_float_is_zero.
1113
1114         * python/py-value.c: Include "target-float.h".
1115         (valpy_nonzero): Use target_float_is_zero.
1116
1117 2017-11-04  Tom Tromey  <tom@tromey.com>
1118
1119         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1120
1121 2017-11-04  Tom Tromey  <tom@tromey.com>
1122
1123         * breakpoint.c (set_momentary_breakpoint): Return
1124         breakpoint_up.
1125         (until_break_command): Update.
1126         (new_until_break_fsm): Change argument types to
1127         breakpoint_up.
1128         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1129         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1130         Remove.
1131         * infcmd.c (finish_forward): Update.
1132         * breakpoint.h (set_momentary_breakpoint)
1133         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1134         (make_cleanup_delete_breakpoint): Remove.
1135         (struct breakpoint_deleter): New.
1136         (breakpoint_up): New typedef.
1137         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1138         (insert_exception_resume_breakpoint): Update.
1139         (insert_exception_resume_from_probe): Update.
1140         (insert_longjmp_resume_breakpoint): Update.
1141         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1142         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1143         * infcall.c (call_function_by_hand_dummy): Update
1144
1145 2017-11-04  Tom Tromey  <tom@tromey.com>
1146
1147         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1148
1149 2017-11-04  Tom Tromey  <tom@tromey.com>
1150
1151         * linux-tdep.c (linux_core_info_proc_mappings): Use
1152         gdb::def_vector.
1153         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
1154         "size" argument.
1155         (linux_corefile_thread): Update.
1156         (linux_make_corefile_notes): Remove unused variable.
1157
1158 2017-11-04  Tom Tromey  <tom@tromey.com>
1159
1160         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1161         gdb::byte_vector.
1162
1163 2017-11-04  Tom Tromey  <tom@tromey.com>
1164
1165         * objfiles.c (do_free_objfile_cleanup): Remove.
1166         * compile/compile-object-load.c (compile_object_load): Update.
1167         * objfiles.h (make_cleanup_free_objfile): Remove.
1168
1169 2017-11-04  Tom Tromey  <tom@tromey.com>
1170
1171         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1172         (adi_read_versions): Change "tags" to "gdb_byte *".
1173         (adi_print_versions): Likewise.
1174
1175 2017-11-04  Tom Tromey  <tom@tromey.com>
1176
1177         * breakpoint.c
1178         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1179         from start_rbreak_breakpoints.
1180         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1181         * breakpoint.h (class scoped_rbreak_breakpoints): New.
1182         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1183         * symtab.c (do_end_rbreak_breakpoints): Remove.
1184         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1185
1186 2017-11-04  Tom Tromey  <tom@tromey.com>
1187
1188         * cp-namespace.c (reset_directive_searched): Remove.
1189         (cp_lookup_symbol_via_imports): Use scoped_restore.
1190         * cp-support.c (reset_directive_searched): Remove.
1191         (make_symbol_overload_list_using): Use scoped_restore.
1192         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1193         (reset_directive_searched): Remove.
1194
1195 2017-11-04  Tom Tromey  <tom@tromey.com>
1196
1197         * symfile.c (find_separate_debug_file_by_debuglink): Use
1198         unique_xmalloc_ptr.
1199
1200 2017-11-04  Tom Tromey  <tom@tromey.com>
1201
1202         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1203         type of "info".
1204         (compute_stack_depth): Likewise.
1205         (do_compile_dwarf_expr_to_c): Use std::vector.
1206
1207 2017-11-04  Tom Tromey  <tom@tromey.com>
1208
1209         * compile/compile-object-load.c (link_callbacks_einfo): Use
1210         std::string.
1211
1212 2017-11-04  Tom Tromey  <tom@tromey.com>
1213
1214         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1215         Use scoped_free_pendings.
1216         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1217         scoped_free_pendings.
1218         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1219         (xcoff_initial_scan): Likewise.
1220         * buildsym.c (reset_symtab_globals): Update comment.
1221         (scoped_free_pendings): Rename from really_free_pendings.
1222         (prepare_for_building): Update comment.
1223         (buildsym_init): Likewise.
1224         * buildsym.h (class scoped_free_pendings): New class.
1225         (really_free_pendings): Don't declare.
1226
1227 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
1228
1229         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1230         output when converting a zero value to a special byteorder format.
1231
1232 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1233
1234         * frame.c (do_frame_register_read): Remove aspace.
1235         * jit.c (jit_frame_sniffer): Likwise.
1236         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1237         * regcache.c (regcache::regcache): Pass nullptr.
1238         (regcache_print): Caller updated.
1239         * regcache.h (regcache::regcache): Remove one constructor
1240         parameter aspace.
1241
1242 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1243
1244         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1245
1246 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1247
1248         * breakpoint.c (insert_single_step_breakpoints): Update.
1249         * frame.c (struct frame_info) <aspace>: Add const.
1250         (frame_save_as_regcache): Add const.
1251         (get_frame_address_space): Return const address_space *.
1252         * frame.h (get_frame_address_space): Update declaration.
1253         * infrun.c (struct step_over_info) <aspace>: Add const.
1254         (set_step_over_info): Make aspace const.
1255         (displaced_step_prepare_throw): Change variable const.
1256         (resume): Likewise.
1257         (proceed): Likewise.
1258         (adjust_pc_after_break): Likewise.
1259         (save_waitstatus): Likewise.
1260         (handle_signal_stop): Likewise.
1261         (keep_going_pass_signal): Likewise.
1262         * jit.c (jit_frame_sniffer): Add const.
1263         * mips-tdep.c (mips_single_step_through_delay): Likewise.
1264         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1265         * record-full.c (record_full_wait_1): Likewise.
1266         * regcache.c (regcache::regcache): Change parameter to const.
1267         * regcache.h (regcache::regcache): Likewise.
1268         (regcache::aspace): Return const address_space *.
1269         (regcache) <m_aspace>: Add const.
1270
1271 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1272
1273         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1274         * frame.c (create_sentinel_frame): Likewise.
1275         * infrun.c (displaced_step_prepare_throw): Likewise.
1276         (resume): Likewise.
1277         (thread_still_needs_step_over_bp): Likewise.
1278         (proceed): Likewise.
1279         (do_target_wait): Likewise.
1280         (adjust_pc_after_break): Likewise.
1281         (handle_syscall_event): Likewise.
1282         (save_waitstatus): Likewise.
1283         (handle_inferior_event_1): Likewise.
1284         (handle_signal_stop): Likewise.
1285         (keep_going_pass_signal): Likewise.
1286         * linux-nat.c (status_callback): Likewise.
1287         (save_stop_reason): Likewise.
1288         (resume_stopped_resumed_lwps): Likewise.
1289         * record-full.c (record_full_exec_insn): Likewise.
1290         (record_full_wait_1): Likewise.
1291         * regcache.c (get_regcache_aspace): Remove.
1292         * regcache.h (get_regcache_aspace): Remove.
1293
1294 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1295
1296         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1297         (init_regcache_descr): Use gdbarch_num_regs.
1298         (regcache::regcache): Likewise.
1299         (regcache::get_register_status): Likewise.
1300         (regcache::assert_raw_regnum): Likewise.
1301         (regcache::cooked_read): Likewise.
1302         (regcache::cooked_read_value): Likewise.
1303         (regcache::cooked_write): Likewise.
1304         (regcache::dump): Likewise.
1305         (regcache::num_raw_registers): New method.
1306         * regcache.h (class regcache) <num_raw_registers>: New.
1307
1308 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1309
1310         * regcache.c (regcache::assert_regnum): New method.
1311         (regcache::invalidate): Call assert_regnum.
1312         (regcache::raw_update): Likewise.
1313         (regcache::raw_write): Likewise.
1314         (regcache::raw_read_part): Likewise.
1315         (regcache::raw_write_part): Likewise.
1316         (regcache::raw_supply): Likewise.
1317         (regcache::raw_supply_integer): Likewise.
1318         (regcache::raw_supply_zeroed): Likewise.
1319         (regcache::raw_collect): Likewise.
1320         (regcache::raw_collect_integer): Likewise.
1321         * regcache.h (regcache::assert_regnum): Declare.
1322
1323 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1324
1325         * regcache.c (regcache::dump): Remove code.
1326
1327 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1328
1329         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1330         Remove.
1331         <sizeof_cooked_register_status>: Remove.
1332         (init_regcache_descr): Update.
1333         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1334         (regcache::save): Likewise.
1335         (regcache::dump): Likewise.
1336
1337 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
1338
1339         * ft32-tdep.c (ft32_fetch_instruction): New function.
1340         (ft32_analyze_prologue): Use ft32_fetch_instruction().
1341
1342 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
1343
1344         * cli/cli-script.c (execute_control_command): Rename to ...
1345         (execute_control_command_1): ... this.
1346         (execute_control_command): New function.
1347
1348 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
1349
1350         * tracepoint.c (tfind_command): Remove const_cast.
1351
1352 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
1353
1354         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1355
1356 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
1357
1358         * common/common-utils.h (in_inclusive_range): New function.
1359         * arm-tdep.c (arm_record_extension_space): Use
1360         in_inclusive_range.
1361         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1362         * cris-tdep.c (cris_spec_reg_applicable): Use
1363         in_inclusive_range.
1364
1365 2017-10-30  Pedro Alves  <palves@redhat.com>
1366             Simon Marchi <simon.marchi@ericsson.com>
1367
1368         * remote.c (remote_set_syscall_catchpoint): Build a std::string
1369         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1370
1371 2017-10-30  Pedro Alves  <palves@redhat.com>
1372
1373         * common/common-utils.c (string_appendf, string_vappendf): New
1374         functions.
1375         * common/common-utils.h (string_appendf, string_vappendf): New
1376         declarations.
1377         * unittests/common-utils-selftests.c (string_appendf_func)
1378         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1379         (string_vappendf_tests): New functions.
1380         (_initialize_common_utils_selftests): Register "string_appendf" and
1381         "string_vappendf tests".
1382
1383 2017-10-30  Pedro Alves  <palves@redhat.com>
1384
1385         * unittests/common-utils-selftests.c (format_func): New typedef.
1386         (string_printf_tests, string_vprintf_tests): Tests factored out
1387         and merged to ...
1388         (test_format_func): ... this new function.
1389         (string_printf_tests, string_vprintf_tests): Reimplement on top of
1390         test_format_func.
1391
1392 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1393
1394         * darwin-nat.c: Remove include of gdb.h.
1395
1396 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1397
1398         * xtensa-xtregs.c: Fix formatting issues.
1399
1400 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1401
1402         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1403
1404 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
1405
1406         PR python/21213
1407         * python/py-infthread.c (thpy_get_inferior): Increment reference
1408         of inferior before returning it.
1409
1410 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1411
1412         * unittests/common-utils-selftests.c (format): Add
1413         ATTRIBUTE_PRINTF.
1414
1415 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1416
1417         * xml-syscall.c (struct syscall_desc): Add constructor.
1418         <name>: Change type to std::string.
1419         (syscall_desc_up): New typedef.
1420         (syscall_desc_p): Remove typeder.
1421         (DEF_VEC_P(syscall_desc_p)): Remove.
1422         (struct syscall_group_desc): Add constructor.
1423         <name>: Change type to std::string.
1424         <syscalls>: Change type to std::vector.
1425         (syscall_group_desc_up): New typedef.
1426         (syscall_group_desc_p): Remove typedef.
1427         (DEF_VEC_P(syscall_group_desc_p)): Remove.
1428         (struct syscalls_info) <syscalls>: Change type to std::vector of
1429         unique_ptr.
1430         <groups>: Likewise.
1431         <my_gdb_datadir>: Change type to std::string.
1432         (syscalls_info_up): New typedef.
1433         (allocate_syscalls_info): Remove.
1434         (syscalls_info_free_syscalls_desc): Remove.
1435         (syscalls_info_free_syscall_group_desc): Remove.
1436         (free_syscalls_info): Remove.
1437         (make_cleanup_free_syscalls_info): Remove.
1438         (syscall_group_create_syscall_group_desc): Adjust.
1439         (syscall_group_add_syscall): Adjust.
1440         (syscall_create_syscall_desc): Adjust.
1441         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1442         (init_syscalls_info): Adjust.
1443         (syscall_group_get_group_by_name): Adjust.
1444         (xml_get_syscall_number): Adjust.
1445         (xml_get_syscall_name): Adjust.
1446         (xml_list_of_syscalls): Adjust.
1447         (xml_list_syscalls_by_group): Adjust.
1448         (xml_list_of_groups): Adjust.
1449
1450 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1451
1452         * probe.h: Don't include gdb_vecs.h.
1453         (DEF_VEC_P (probe_p)): Remove.
1454         (find_probes_in_objfile): Return an std::vector.
1455         * probe.c (find_probes_in_objfile): Likewise.
1456         * breakpoint.c (breakpoint_objfile_data)
1457         <longjmp_probes>: Change type to std::vector.
1458         <exception_probes>: Likewise.
1459         (free_breakpoint_probes): Don't manually free vectors.
1460         (create_longjmp_master_breakpoint): Adjust.
1461         (create_exception_master_breakpoint): Adjust.
1462         * solib-svr4.c (svr4_create_probe_breakpoints): Change
1463         parameter type, adjust.
1464         (svr4_create_solib_event_breakpoints): Adjust.
1465
1466 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1467
1468         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1469         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1470         with new.
1471         (free_breakpoint_probes): Rename to ...
1472         (free_breakpoint_objfile_data): ... this, and call delete on
1473         bp_objfile_data..
1474
1475 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1476
1477         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1478         (loaded_script_ptr): Remove typedef.
1479         (DEF_VEC_P (loaded_script_ptr)): Remove.
1480         (struct collect_matching_scripts_data): Add constructor.
1481         <scripts_p>: Change type to (pointer to) std::vector.
1482         (collect_matching_scripts_data): Adjust.
1483         (sort_scripts_by_name): Make suitable for std::sort.
1484         (print_scripts): Don't sort vector, adjust to std::vector.
1485         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1486
1487 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1488
1489         * symfile.c (filename_language): Make struct, not typedef.  Add
1490         constructor.
1491         <ext>: Change type to std::string.
1492         (DEF_VEC_O (filename_language)): Remove.
1493         (filename_language_table): Change type to std::vector.
1494         (add_filename_language): Adjust.
1495         (set_ext_lang_command): Adjust.
1496         (info_ext_lang_command): Adjust.
1497         (deduce_language_from_filename): Adjust.
1498         (class scoped_restore_filename_language_table): Remove.
1499         (test_filename_language): Use scoped_restore.
1500         (test_set_ext_lang_command): Use scoped_restore, adjust to
1501         std::vector change.
1502
1503 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1504
1505         * symfile.c: Include selftest.h.
1506         (class scoped_restore_filename_language_table): New.
1507         (test_filename_language): New test.
1508         (test_set_ext_lang_command): New test.
1509         (_initialize_symfile): Register tests.
1510
1511 2017-10-27  Keith Seitz  <keiths@redhat.com>
1512
1513         * breakpoint.c (print_breakpoint_location): Use the symbol saved
1514         in the bp_location, falling back to find_pc_sect_function when
1515         needed.
1516         (add_location_to_breakpoint): Save sal->symbol.
1517         * breakpoint.h (struct bp_location) <symbol>: New field.
1518         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1519         * symtab.h (struct symtab_and_line) <symbol>: New field.
1520
1521 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
1522
1523         PR gdb/13669
1524         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1525         to rewind obstack.
1526
1527 2017-10-26  Pedro Alves  <palves@redhat.com>
1528
1529         * remote.c (remote_async_terminal_ours_p): Delete.
1530         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1531         Remove references to 'remote_async_terminal_ours_p'.
1532
1533 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1534
1535         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1536
1537 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1538
1539         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1540         aspace const.
1541         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1542         Likewise.
1543         * breakpoint.c (bpstat_check_location): Remove cast.
1544         (breakpoint_hit_catch_fork): Make aspce const.
1545         (breakpoint_hit_catch_solib): Likewise.
1546         (breakpoint_hit_catch_exec): Likewise.
1547         (breakpoint_hit_ranged_breakpoint): Likewise.
1548         (breakpoint_hit_watchpoint): Likewise.
1549         (base_breakpoint_breakpoint_hit): Likewise.
1550         (bkpt_breakpoint_hit): Likewise.
1551         (dprintf_breakpoint_hit): Likewise.
1552         (tracepoint_breakpoint_hit): Likewise.
1553         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1554
1555 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1556
1557         * breakpoint.c (breakpoint_location_address_match): Change
1558         "struct address_space *" to "const address_space".
1559         (breakpoint_location_address_range_overlap): Likewise.
1560         (breakpoint_here_p): Likewise.
1561         (breakpoint_in_range_p): Likewise.
1562         (moribund_breakpoint_here_p): Likewise.
1563         (bp_location_inserted_here_p): Likewise.
1564         (software_breakpoint_inserted_here_p): Likewise.
1565         (hardware_breakpoint_inserted_here_p): Likewise.
1566         (hardware_watchpoint_inserted_in_range): Likewise.
1567         (bpstat_check_location): Likewise.
1568         (bpstat_stop_status): Likewise.
1569         (breakpoint_address_match): Likewise.
1570         (breakpoint_address_match_range): Likewise.
1571         (breakpoint_location_address_match): Likewise.
1572         (breakpoint_location_address_range_overlap): Likewise.
1573         (insert_single_step_breakpoint): Likewise.
1574         (breakpoint_has_location_inserted_here): Likewise.
1575         (single_step_breakpoint_inserted_here_p): Likewise.
1576         (pc_at_non_inline_function): Likewise.
1577         * breakpoint.h (bpstat_stop_status): Update declaration.
1578         (breakpoint_here_p): Likewise.
1579         (breakpoint_in_range_p): Likewise.
1580         (moribund_breakpoint_here_p): Likewise.
1581         (breakpoint_inserted_here_p): Likewise.
1582         (software_breakpoint_inserted_here_p): Likewise.
1583         (hardware_breakpoint_inserted_here_p): Likewise.
1584         (breakpoint_has_location_inserted_here): Likewise.
1585         (single_step_breakpoint_inserted_here_p): Likewise.
1586         (hardware_watchpoint_inserted_in_range): Likewise.
1587         (breakpoint_address_match): Likewise.
1588         (insert_single_step_breakpoint): Likewise.
1589         (pc_at_non_inline_function): Likewise.
1590         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1591         * record.c (record_check_stopped_by_breakpoint): Likewise.
1592         * record.h (record_check_stopped_by_breakpoint): Likewise.
1593         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1594
1595 2017-10-25  Yao Qi  <yao.qi@linaro.org>
1596
1597         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1598         regcache->arch () instead get_regcache_arch.
1599         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1600         Likewise.
1601         (aarch64_fbsd_store_inferior_registers): Likewise.
1602         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1603         (store_gregs_to_thread): Likewise.
1604         (fetch_fpregs_from_thread): Likewise.
1605         (store_fpregs_to_thread): Likewise.
1606         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1607         (aarch64_store_return_value): Likewise.
1608         (aarch64_software_single_step): Likewise.
1609         * aix-thread.c (aix_thread_wait): Likewise.
1610         (supply_reg32): Likewise.
1611         (supply_sprs64): Likewise.
1612         (supply_sprs32): Likewise.
1613         (fill_gprs64): Likewise.
1614         (fill_gprs32): Likewise.
1615         (fill_sprs64): Likewise.
1616         (fill_sprs32): Likewise.
1617         (store_regs_user_thread): Likewise.
1618         (store_regs_kernel_thread): Likewise.
1619         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1620         (alphabsd_store_inferior_registers): Likewise.
1621         * alpha-tdep.c (alpha_extract_return_value): Likewise.
1622         (alpha_store_return_value): Likewise.
1623         (alpha_deal_with_atomic_sequence): Likewise.
1624         (alpha_next_pc): Likewise.
1625         (alpha_software_single_step): Likewise.
1626         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1627         (amd64bsd_store_inferior_registers): Likewise.
1628         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1629         Likewise.
1630         (amd64_linux_store_inferior_registers): Likewise.
1631         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1632         (amd64_collect_native_gregset): Likewise.
1633         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1634         (amd64obsd_collect_uthread): Likewise.
1635         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1636         (amd64_collect_fpregset): Likewise.
1637         (amd64_supply_fxsave): Likewise.
1638         (amd64_supply_xsave): Likewise.
1639         (amd64_collect_fxsave): Likewise.
1640         (amd64_collect_xsave): Likewise.
1641         * arc-tdep.c (arc_write_pc): Likewise.
1642         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1643         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1644         (arm_fbsd_store_inferior_registers): Likewise.
1645         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1646         (store_vfp_regs): Likewise.
1647         (arm_linux_fetch_inferior_registers): Likewise.
1648         (arm_linux_store_inferior_registers): Likewise.
1649         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1650         (arm_linux_sigreturn_next_pc): Likewise.
1651         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1652         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1653         (fetch_register): Likewise.
1654         (store_register): Likewise.
1655         * arm-tdep.c (arm_is_thumb): Likewise.
1656         (displaced_in_arm_mode): Likewise.
1657         (bx_write_pc): Likewise.
1658         (arm_get_next_pcs_addr_bits_remove): Likewise.
1659         (arm_software_single_step): Likewise.
1660         (arm_extract_return_value): Likewise.
1661         (arm_store_return_value): Likewise.
1662         (arm_write_pc): Likewise.
1663         * bfin-tdep.c (bfin_extract_return_value): Likewise.
1664         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
1665         (bsd_uthread_store_registers): Likewise.
1666         * core-regset.c (fetch_core_registers): Likewise.
1667         * corelow.c (get_core_registers): Likewise.
1668         * cris-tdep.c (cris_store_return_value): Likewise.
1669         (cris_extract_return_value): Likewise.
1670         (find_step_target): Likewise.
1671         (find_step_target): Likewise.
1672         (cris_software_single_step): Likewise.
1673         * ctf.c (ctf_fetch_registers): Likewise.
1674         * darwin-nat.c (cancel_breakpoint): Likewise.
1675         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
1676         * frv-tdep.c (frv_extract_return_value): Likewise.
1677         * ft32-tdep.c (ft32_store_return_value): Likewise.
1678         (ft32_extract_return_value): Likewise.
1679         * go32-nat.c (fetch_register): Likewise.
1680         (go32_fetch_registers): Likewise.
1681         (go32_store_registers): Likewise.
1682         (store_register): Likewise.
1683         * h8300-tdep.c (h8300_extract_return_value): Likewise.
1684         (h8300_store_return_value): Likewise.
1685         * hppa-linux-nat.c (fetch_register): Likewise.
1686         (store_register): Likewise.
1687         (hppa_linux_fetch_inferior_registers): Likewise.
1688         (hppa_linux_store_inferior_registers): Likewise.
1689         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
1690         (i386_darwin_store_inferior_registers): Likewise.
1691         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
1692         (gnu_store_registers): Likewise.
1693         * i386-linux-nat.c (fetch_register): Likewise.
1694         (store_register): Likewise.
1695         (supply_gregset): Likewise.
1696         (fill_gregset): Likewise.
1697         (i386_linux_fetch_inferior_registers): Likewise.
1698         (i386_linux_store_inferior_registers): Likewise.
1699         (i386_linux_resume): Likewise.
1700         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
1701         Likewise.
1702         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
1703         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
1704         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
1705         (i386obsd_collect_uthread): Likewise.
1706         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1707         (i386_supply_gregset): Likewise.
1708         (i386_collect_gregset): Likewise.
1709         (i386_supply_fpregset): Likewise.
1710         (i386_collect_fpregset): Likewise.
1711         (i386_mpx_bd_base): Likewise.
1712         * i386-v4-nat.c (supply_fpregset): Likewise.
1713         (fill_fpregset): Likewise.
1714         * i387-tdep.c (i387_supply_fsave): Likewise.
1715         (i387_collect_fsave): Likewise.
1716         (i387_supply_fxsave): Likewise.
1717         (i387_collect_fxsave): Likewise.
1718         (i387_supply_xsave): Likewise.
1719         (i387_collect_xsave): Likewise.
1720         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
1721         (ia64_linux_store_registers): Likewise.
1722         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
1723         (ia64_extract_return_value): Likewise.
1724         (ia64_store_return_value): Likewise.
1725         (find_func_descr): Likewise.
1726         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
1727         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
1728         (inf_ptrace_store_registers): Likewise.
1729         * infrun.c (use_displaced_stepping): Likewise.
1730         (displaced_step_prepare_throw): Likewise.
1731         (resume): Likewise.
1732         (proceed): Likewise.
1733         (do_target_wait): Likewise.
1734         (adjust_pc_after_break): Likewise.
1735         (handle_inferior_event_1): Likewise.
1736         (handle_signal_stop): Likewise.
1737         (save_infcall_suspend_state): Likewise.
1738         (restore_infcall_suspend_state): Likewise.
1739         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
1740         * jit.c (jit_frame_prev_register): Likewise.
1741         * linux-nat.c (save_stop_reason): Likewise.
1742         (linux_nat_wait_1): Likewise.
1743         (resume_stopped_resumed_lwps): Likewise.
1744         * linux-record.c (record_linux_sockaddr): Likewise.
1745         (record_linux_msghdr): Likewise.
1746         (record_linux_system_call): Likewise.
1747         * linux-tdep.c (linux_collect_thread_registers): Likewise.
1748         * lm32-tdep.c (lm32_extract_return_value): Likewise.
1749         (lm32_store_return_value): Likewise.
1750         * m32c-tdep.c (m32c_read_flg): Likewise.
1751         (m32c_pseudo_register_read): Likewise.
1752         (m32c_pseudo_register_write): Likewise.
1753         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
1754         (m32r_linux_collect_gregset): Likewise.
1755         * m32r-tdep.c (m32r_store_return_value): Likewise.
1756         (m32r_extract_return_value): Likewise.
1757         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1758         (m68kbsd_collect_fpregset): Likewise.
1759         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
1760         * m68k-linux-nat.c (fetch_register): Likewise.
1761         (old_fetch_inferior_registers): Likewise.
1762         (old_store_inferior_registers): Likewise.
1763         (store_regs): Likewise.
1764         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
1765         (m68k_svr4_store_return_value): Likewise.
1766         * m88k-tdep.c (m88k_store_arguments): Likewise.
1767         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
1768         (mi_cmd_data_write_register_values): Likewise.
1769         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
1770         (mips_fbsd_store_inferior_registers): Likewise.
1771         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
1772         (mips_fbsd_supply_gregs): Likewise.
1773         (mips_fbsd_collect_fpregs): Likewise.
1774         (mips_fbsd_collect_gregs): Likewise.
1775         (mips_fbsd_supply_fpregset): Likewise.
1776         (mips_fbsd_collect_fpregset): Likewise.
1777         (mips_fbsd_supply_gregset): Likewise.
1778         (mips_fbsd_collect_gregset): Likewise.
1779         * mips-linux-nat.c (supply_gregset): Likewise.
1780         (fill_gregset): Likewise.
1781         (supply_fpregset): Likewise.
1782         (fill_fpregset): Likewise.
1783         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
1784         (mips_fill_gregset): Likewise.
1785         (mips_supply_fpregset): Likewise.
1786         (mips_fill_fpregset): Likewise.
1787         (mips64_supply_gregset): Likewise.
1788         (micromips_linux_sigframe_validate): Likewise.
1789         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
1790         (mipsnbsd_fetch_inferior_registers): Likewise.
1791         (mipsnbsd_store_inferior_registers): Likewise.
1792         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1793         (mipsnbsd_supply_gregset): Likewise.
1794         (mipsnbsd_iterate_over_regset_sections): Likewise.
1795         (mipsnbsd_supply_reg): Likewise.
1796         (mipsnbsd_supply_fpreg): Likewise.
1797         * mips-tdep.c (mips_in_frame_stub): Likewise.
1798         (mips_dummy_id): Likewise.
1799         (is_octeon_bbit_op): Likewise.
1800         (micromips_bc1_pc): Likewise.
1801         (extended_mips16_next_pc): Likewise.
1802         (mips16_next_pc): Likewise.
1803         (deal_with_atomic_sequence): Likewise.
1804         * moxie-tdep.c (moxie_process_readu): Likewise.
1805         * nios2-tdep.c (nios2_get_next_pc): Likewise.
1806         * nto-procfs.c (procfs_store_registers): Likewise.
1807         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
1808         (ppcfbsd_store_inferior_registers): Likewise.
1809         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
1810         (fetch_altivec_register): Likewise.
1811         (get_spe_registers): Likewise.
1812         (fetch_spe_register): Likewise.
1813         (fetch_altivec_registers): Likewise.
1814         (fetch_all_gp_regs): Likewise.
1815         (fetch_all_fp_regs): Likewise.
1816         (store_vsx_register): Likewise.
1817         (store_altivec_register): Likewise.
1818         (set_spe_registers): Likewise.
1819         (store_spe_register): Likewise.
1820         (store_altivec_registers): Likewise.
1821         (store_all_gp_regs): Likewise.
1822         (store_all_fp_regs): Likewise.
1823         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
1824         (ppc_linux_collect_gregset): Likewise.
1825         (ppc_canonicalize_syscall): Likewise.
1826         (ppc_linux_record_signal): Likewise.
1827         (ppu2spu_prev_register): Likewise.
1828         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
1829         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
1830         (ppcobsd_store_registers): Likewise.
1831         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
1832         Likewise.
1833         (ppc_ravenscar_generic_store_registers): Likewise.
1834         * procfs.c (procfs_fetch_registers): Likewise.
1835         (procfs_store_registers): Likewise.
1836         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
1837         (ravenscar_store_registers): Likewise.
1838         (ravenscar_prepare_to_store): Likewise.
1839         * record-btrace.c (record_btrace_fetch_registers): Likewise.
1840         * record-full.c (record_full_wait_1): Likewise.
1841         (record_full_registers_change): Likewise.
1842         (record_full_store_registers): Likewise.
1843         (record_full_core_fetch_registers): Likewise.
1844         (record_full_save): Likewise.
1845         (record_full_goto_insn): Likewise.
1846         * regcache.c (regcache_register_size): Likewise.
1847         (get_regcache_arch): Remove.
1848         (regcache_read_pc): Likewise.
1849         * regcache.h (get_regcache_arch): Remove.
1850         * remote-sim.c (gdbsim_fetch_register): Likewise.
1851         (gdbsim_store_register): Likewise.
1852         * remote.c (fetch_register_using_p): Likewise.
1853         (send_g_packet): Likewise.
1854         (remote_prepare_to_store): Likewise.
1855         (store_registers_using_G): Likewise.
1856         * reverse.c (save_bookmark_command): Likewise.
1857         (goto_bookmark_command): Likewise.
1858         * rs6000-aix-tdep.c (branch_dest): Likewise.
1859         * rs6000-nat.c (rs6000_ptrace64): Likewise.
1860         (fetch_register): Likewise.
1861         * rs6000-tdep.c (ppc_supply_reg): Likewise.
1862         (ppc_collect_reg): Likewise.
1863         (ppc_collect_gregset): Likewise.
1864         (ppc_collect_fpregset): Likewise.
1865         (ppc_collect_vsxregset): Likewise.
1866         (ppc_collect_vrregset): Likewise.
1867         (ppc_displaced_step_hw_singlestep): Likewise.
1868         (rs6000_pseudo_register_read): Likewise.
1869         (rs6000_pseudo_register_write): Likewise.
1870         * s390-linux-nat.c (supply_gregset): Likewise.
1871         (fill_gregset): Likewise.
1872         (s390_linux_fetch_inferior_registers): Likewise.
1873         * s390-linux-tdep.c (s390_write_pc): Likewise.
1874         (s390_software_single_step): Likewise.
1875         (s390_all_but_pc_registers_record): Likewise.
1876         (s390_linux_syscall_record): Likewise.
1877         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
1878         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
1879         (shnbsd_store_inferior_registers): Likewise.
1880         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
1881         (sh_extract_return_value_fpu): Likewise.
1882         (sh_store_return_value_nofpu): Likewise.
1883         (sh_corefile_supply_regset): Likewise.
1884         (sh_corefile_collect_regset): Likewise.
1885         * sh64-tdep.c (sh64_extract_return_value): Likewise.
1886         (sh64_store_return_value): Likewise.
1887         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
1888         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
1889         (sparc_store_inferior_registers): Likewise.
1890         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
1891         (sparc_ravenscar_prepare_to_store): Likewise.
1892         * sparc-tdep.c (sparc32_store_arguments): Likewise.
1893         (sparc_analyze_control_transfer): Likewise.
1894         (sparc_step_trap): Likewise.
1895         (sparc_software_single_step): Likewise.
1896         (sparc32_gdbarch_init): Likewise.
1897         (sparc_supply_rwindow): Likewise.
1898         (sparc_collect_rwindow): Likewise.
1899         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
1900         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
1901         (sparc64nbsd_collect_gregset): Likewise.
1902         (sparc64nbsd_supply_fpregset): Likewise.
1903         (sparc64nbsd_collect_fpregset): Likewise.
1904         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1905         (sparc64_supply_gregset): Likewise.
1906         (sparc64_collect_gregset): Likewise.
1907         (sparc64_supply_fpregset): Likewise.
1908         (sparc64_collect_fpregset): Likewise.
1909         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
1910         * spu-tdep.c (spu_unwind_sp): Likewise.
1911         (spu2ppu_prev_register): Likewise.
1912         (spu_memory_remove_breakpoint): Likewise.
1913         * stack.c (return_command): Likewise.
1914         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
1915         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
1916         * tracefile.c (trace_save_ctf): Likewise.
1917         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
1918         (do_windows_store_inferior_registers): Likewise.
1919         (windows_resume): Likewise.
1920         * xtensa-linux-nat.c (fill_gregset): Likewise.
1921         (supply_gregset_reg): Likewise.
1922         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
1923         (xtensa_register_read_masked): Likewise.
1924         (xtensa_supply_gregset): Likewise.
1925         (xtensa_extract_return_value): Likewise.
1926         (xtensa_store_return_value): Likewise.
1927
1928 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
1929
1930         * doublest.c (floatformat_from_string): New function.
1931         * doublest.h (floatformat_from_string): Add prototype.
1932
1933         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
1934         (OP_FLOAT): ... this.
1935         * expression.h: Do not include "doublest.h".
1936         (union exp_element): Replace doubleconst and decfloatconst by
1937         new element floatconst.
1938         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
1939         (ada_evaluate_subexp): Likewise.
1940         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
1941         OP_DOUBLE and OP_DECFLOAT.
1942         * expprint.c (print_subexp_standard): Likewise.
1943         (dump_subexp_body_standard): Likewise.
1944         * breakpoint.c (watchpoint_exp_is_const): Likewise.
1945
1946         * parse.c: Include "dfp.h".
1947         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1948         (write_exp_elt_floatcst): New function.
1949         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
1950         and OP_DECFLOAT.
1951         (operator_check_standard): Likewise.
1952         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
1953         Return target format buffer instead of host DOUBLEST.
1954         Use floatformat_from_string and decimal_from_string to parse
1955         either binary or decimal floating-point types.
1956         (parse_c_float): Remove.
1957         * parser-defs.h: Do not include "doublest.h".
1958         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1959         (write_exp_elt_floatcst): Add prototype.
1960         (parse_float): Update prototype.
1961         (parse_c_float): Remove.
1962
1963         * c-exp.y: Do not include "dfp.h".
1964         (typed_val_float): Use byte buffer instead of DOUBLEST.
1965         (typed_val_decfloat): Remove.
1966         (DECFLOAT): Remove.
1967         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1968         (parse_number): Update to new parse_float interface.
1969         Parse suffixes and determine type before calling parse_float.
1970         Handle decimal and binary FP types the same way.
1971
1972         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1973         (FLOAT_LITERAL): 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         * f-exp.y: Replace dval by typed_val_float.
1978         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1979         (parse_number): Use parse_float instead of atof.
1980
1981         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1982         (parse_go_float): Remove.
1983         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1984         (parse_number): Call parse_float instead of parse_go_float.
1985         Parse suffixes and determine type before calling parse_float.
1986
1987         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1988         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1989         (parse_number): Update to new parse_float interface.
1990         Parse suffixes and determine type before calling parse_float.
1991
1992         * m2-exp.y: Replace dval by byte buffer val.
1993         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1994         (parse_number): Call parse_float instead of atof.
1995
1996         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1997         (lex_number): Call parse_float instead of strtod.
1998         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
1999         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2000         Use write_exp_elt_floatcst.
2001         (unit_testing): Remove static variable.
2002         (rust_type): Do not check unit_testing.
2003         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
2004
2005         * ada-exp.y (type_float, type_double): Remove.
2006         (typed_val_float): Use byte buffer instead of DOUBLEST.
2007         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2008         * ada-lex.l (processReal): Use parse_float instead of sscanf.
2009
2010 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
2011
2012         * aarch64-tdep.h (enum aarch64_regnum): Remove.
2013         * arch/aarch64.h: New file.
2014
2015 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2016
2017         * dfp.h (decimal_from_string): Use const reference for argument.
2018         * dfp.c (decimal_from_string): Likewise.
2019
2020 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2021
2022         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2023         * sh64-tdep.c (sh64_do_fp_register): Likewise.
2024         * mips-tdep.c (mips_print_fp_register): Likewise.
2025
2026 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2027
2028         * common/format.h (enum argclass): Replace decfloat_arg by
2029         dec32float_arg, dec64float_arg, and dec128float_arg.
2030         * common/format.c (parse_format_string): Update to return
2031         new decimal float argument classes.
2032
2033         * printcmd.c (printf_decfloat): Rename to ...
2034         (printf_floating): ... this.  Add argclass argument, and use it
2035         instead of parsing the format string again.  Add support for
2036         binary floating-point values, using floatformat_to_string.
2037         Convert value to the target format if it doesn't already match.
2038         (ui_printf): Call printf_floating instead of printf_decfloat,
2039         also for double_arg / long_double_arg.  Pass argclass.
2040
2041         * dfp.c (decimal_to_string): Add format string argument.
2042         * dfp.h (decimal_to_string): Likewise.
2043
2044         * doublest.c (floatformat_to_string): Add format string argument.
2045         * doublest.h (floatformat_to_string): Likewise.
2046
2047 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2048
2049         * doublest.c (floatformat_precision): New routine.
2050         (floatformat_to_string): Likewise.
2051         * doublest.c (floatformat_to_string): Add prototype.
2052
2053         * printcmd.c (print_scalar_formatted): Only call print_floating
2054         on floating-point types.
2055         * valprint.c: Do not include "floatformat.h".
2056         (generic_val_print_decfloat): Remove.
2057         (generic_val_print): Call generic_val_print_float for both
2058         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2059         (print_floating): Use floatformat_to_string.  Handle decimal float.
2060         (print_decimal_floating): Remove, merge into floatformat_to_string.
2061         * value.h (print_decimal_floating): Remove.
2062
2063         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2064
2065 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2066
2067         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2068
2069 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2070
2071         * memattr.h: Don't include vec.h.
2072         (struct mem_attrib): Initialize fields.
2073         <unknown>: New static method.
2074         (struct mem_region): Add constructors, operator<, initialize
2075         fields.
2076         * memattr.c: Include algorithm.
2077         (default_mem_attrib, unknown_mem_attrib): Remove.
2078         (user_mem_region_list): New global.
2079         (target_mem_region_list, mem_region_list): Change type to
2080         std::vector<mem_region>.
2081         (mem_use_target): Now a function.
2082         (target_mem_regions_valid): Change type to bool.
2083         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2084         (require_user_regions): Adjust.
2085         (require_target_regions): Adjust.
2086         (create_mem_region): Adjust.
2087         (lookup_mem_region): Adjust.
2088         (invalidate_target_mem_regions): Adjust.
2089         (mem_clear): Rename to...
2090         (user_mem_clear): ... this, and adjust.
2091         (mem_command): Adjust.
2092         (info_mem_command): Adjust.
2093         (mem_enable, enable_mem_command, mem_disable,
2094         disable_mem_command): Adjust.
2095         (mem_delete): Adjust.
2096         (delete_mem_command): Adjust.
2097         * memory-map.h (parse_memory_map): Return an std::vector.
2098         * memory-map.c (parse_memory_map): Likewise.
2099         (struct memory_map_parsing_data): Add constructor.
2100         <memory_map>: Point to std::vector.
2101         (memory_map_start_memory): Adjust.
2102         (memory_map_end_memory): Adjust.
2103         (memory_map_end_property): Adjust.
2104         (clear_result): Remove.
2105         * remote.c (remote_memory_map): Return an std::vector.
2106         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2107         Remove.
2108         (target_debug_print_mem_region_vector): New.
2109         * target-delegates.c: Regenerate.
2110         * target.h (mem_region_vector): New typedef.
2111         (to_memory_map): Return mem_region_vector.
2112         (target_memory_map): Return an std::vector.
2113         * target.c (target_memory_map): Return an std::vector.
2114         (flash_erase_command): Adjust.
2115
2116 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2117
2118         * memory-map.c (struct memory_map_parsing_data) <property_name>:
2119         Change type to std::string.
2120         (memory_map_start_property): Adjust.
2121         (memory_map_end_property): Adjust.
2122
2123 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2124
2125         * infrun.h: Include common/byte-vector.h.
2126         (struct displaced_step_closure): New struct.
2127         (struct buf_displaced_step_closure): New struct.
2128         * infrun.c (displaced_step_closure::~displaced_step_closure):
2129         Provide default implementation.
2130         (displaced_step_clear): Deallocate step closure with delete.
2131         * aarch64-tdep.c (displaced_step_closure): Rename to ...
2132         (aarch64_displaced_step_closure): ... this, extend
2133         displaced_step_closure.
2134         (aarch64_displaced_step_data) <dsc>: Change type to
2135         aarch64_displaced_step_closure.
2136         (aarch64_displaced_step_copy_insn): Adjust to type change, use
2137         unique_ptr.
2138         (aarch64_displaced_step_fixup): Add cast for displaced step
2139         closure.
2140         * amd64-tdep.c (displaced_step_closure): Rename to ...
2141         (amd64_displaced_step_closure): ... this, extend
2142         displaced_step_closure.
2143         <insn_buf>: Change type to std::vector<gdb_byte>.
2144         <max_len>: Remove.
2145         (fixup_riprel): Change type of DSC parameter, adjust to type
2146         change of insn_buf.
2147         (fixup_displaced_copy): Change type of DSC parameter.
2148         (amd64_displaced_step_copy_insn): Instantiate
2149         amd64_displaced_step_closure.
2150         (amd64_displaced_step_fixup): Add cast for closure type, adjust
2151         to type change of insn_buf.
2152         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2153         parameter DSC.
2154         (arm_linux_copy_svc): Likewise.
2155         (cleanup_kernel_helper_return): Likewise.
2156         (arm_catch_kernel_helper_return): Likewise.
2157         (arm_linux_displaced_step_copy_insn): Instantiate
2158         arm_displaced_step_closure.
2159         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2160         (displaced_read_reg): Change type of parameter DSC.
2161         (branch_write_pc): Likewise.
2162         (load_write_pc): Likewise.
2163         (alu_write_pc): Likewise.
2164         (displaced_write_reg): Likewise.
2165         (arm_copy_unmodified): Likewise.
2166         (thumb_copy_unmodified_32bit): Likewise.
2167         (thumb_copy_unmodified_16bit): Likewise.
2168         (cleanup_preload): Likewise.
2169         (install_preload): Likewise.
2170         (arm_copy_preload): Likewise.
2171         (thumb2_copy_preload): Likewise.
2172         (install_preload_reg): Likewise.
2173         (arm_copy_preload_reg): Likewise.
2174         (cleanup_copro_load_store): Likewise.
2175         (install_copro_load_store): Likewise.
2176         (arm_copy_copro_load_store) Likewise.
2177         (thumb2_copy_copro_load_store): Likewise.
2178         (cleanup_branch): Likewise.
2179         (install_b_bl_blx): Likewise.
2180         (arm_copy_b_bl_blx): Likewise.
2181         (thumb2_copy_b_bl_blx): Likewise.
2182         (thumb_copy_b): Likewise.
2183         (install_bx_blx_reg): Likewise.
2184         (arm_copy_bx_blx_reg): Likewise.
2185         (thumb_copy_bx_blx_reg): Likewise.
2186         (cleanup_alu_imm): Likewise.
2187         (arm_copy_alu_imm): Likewise.
2188         (thumb2_copy_alu_imm): Likewise.
2189         (cleanup_alu_reg): Likewise.
2190         (install_alu_reg): Likewise.
2191         (arm_copy_alu_reg): Likewise.
2192         (thumb_copy_alu_reg): Likewise.
2193         (cleanup_alu_shifted_reg): Likewise.
2194         (install_alu_shifted_reg): Likewise.
2195         (arm_copy_alu_shifted_reg): Likewise.
2196         (cleanup_load): Likewise.
2197         (cleanup_store): Likewise.
2198         (arm_copy_extra_ld_st): Likewise.
2199         (install_load_store): Likewise.
2200         (thumb2_copy_load_literal): Likewise.
2201         (thumb2_copy_load_reg_imm): Likewise.
2202         (arm_copy_ldr_str_ldrb_strb): Likewise.
2203         (cleanup_block_load_all): Likewise.
2204         (cleanup_block_store_pc): Likewise.
2205         (cleanup_block_load_pc): Likewise.
2206         (arm_copy_block_xfer): Likewise.
2207         (thumb2_copy_block_xfer): Likewise.
2208         (cleanup_svc): Likewise.
2209         (install_svc): Likewise.
2210         (arm_copy_svc): Likewise.
2211         (thumb_copy_svc): Likewise.
2212         (arm_copy_undef): Likewise.
2213         (thumb_32bit_copy_undef): Likewise.
2214         (arm_copy_unpred): Likewise.
2215         (arm_decode_misc_memhint_neon): Likewise.
2216         (arm_decode_unconditional): Likewise.
2217         (arm_decode_miscellaneous): Likewise.
2218         (arm_decode_dp_misc): Likewise.
2219         (arm_decode_ld_st_word_ubyte): Likewise.
2220         (arm_decode_media): Likewise.
2221         (arm_decode_b_bl_ldmstm): Likewise.
2222         (arm_decode_ext_reg_ld_st): Likewise.
2223         (thumb2_decode_dp_shift_reg): Likewise.
2224         (thumb2_decode_ext_reg_ld_st): Likewise.
2225         (arm_decode_svc_copro): Likewise.
2226         (thumb2_decode_svc_copro): Likewise.
2227         (install_pc_relative): Likewise.
2228         (thumb_copy_pc_relative_16bit): Likewise.
2229         (thumb_decode_pc_relative_16bit): Likewise.
2230         (thumb_copy_pc_relative_32bit): Likewise.
2231         (thumb_copy_16bit_ldr_literal): Likewise.
2232         (thumb_copy_cbnz_cbz): Likewise.
2233         (thumb2_copy_table_branch): Likewise.
2234         (cleanup_pop_pc_16bit_all): Likewise.
2235         (thumb_copy_pop_pc_16bit): Likewise.
2236         (thumb_process_displaced_16bit_insn): Likewise.
2237         (decode_thumb_32bit_ld_mem_hints): Likewise.
2238         (thumb_process_displaced_32bit_insn): Likewise.
2239         (thumb_process_displaced_insn): Likewise.
2240         (arm_process_displaced_insn): Likewise.
2241         (arm_displaced_init_closure): Likewise.
2242         (arm_displaced_step_fixup): Add cast for closure.
2243         * arm-tdep.h: Include infrun.h.
2244         (displaced_step_closure): Rename to ...
2245         (arm_displaced_step_closure): ... this, extend
2246         displaced_step_closure.
2247         <u::svc::copy_svc_os>: Change type of parameter DSC.
2248         <cleanup>: Likewise.
2249         (arm_process_displaced_insn): Likewise.
2250         (arm_displaced_init_closure): Likewise.
2251         (displaced_read_reg): Likewise.
2252         (displaced_write_reg): Likewise.
2253         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2254         Adjust.
2255         * i386-tdep.h: Include infrun.h.
2256         (i386_displaced_step_closure): New typedef.
2257         * i386-tdep.c (i386_displaced_step_copy_insn): Use
2258         i386_displaced_step_closure.
2259         (i386_displaced_step_fixup): Adjust.
2260         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2261         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2262         and unique_ptr.
2263         (ppc_displaced_step_fixup): Adjust.
2264         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2265         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2266         and unique_ptr.
2267         (s390_displaced_step_fixup): Adjust.
2268
2269 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2270
2271         * interps.h (interp_resume, interp_suspend, interp_set_temp):
2272         Remove declarations.
2273
2274 2017-10-20  Tom Tromey  <tom@tromey.com>
2275
2276         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2277         std::vector.
2278         (gdb_bfd_record_inclusion): Update.
2279         (bfdp): Remove typedef.
2280
2281 2017-10-20  Tom Tromey  <tom@tromey.com>
2282
2283         * gdb_bfd.c (gdb_bfd_ref): Use new.
2284         (struct gdb_bfd_data): Add constructor, destructor, and member
2285         initializers.
2286         (gdb_bfd_unref): Use delete.
2287
2288 2017-10-20  Tom Tromey  <tom@tromey.com>
2289
2290         * exec.c (exec_file_attach): Use new_bfd_ref.
2291         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2292         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2293         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2294         new_bfd_ref.
2295         * gdb_bfd.h (new_bfd_ref): New function.
2296
2297 2017-10-20  Pedro Alves  <palves@redhat.com>
2298
2299         * main.c (captured_command_loop): Add attribute noinline.
2300
2301 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
2302
2303         * interps.c (struct interp_factory): Add constructor.
2304         (interp_factory_p): Remove typedef.
2305         (DEF_VEC_P(interp_factory_p)): Remove.
2306         (interpreter_factories): Change type to std::vector.
2307         (interp_factory_register): Adjust.
2308         (interp_lookup): Adjust.
2309         (interpreter_completer): Adjust.
2310
2311 2017-10-19  Tom Tromey  <tom@tromey.com>
2312
2313         * break-catch-syscall.c (catch_syscall_completer): Use
2314         std::string, gdb::unique_xmalloc_ptr.
2315
2316 2017-10-19  Tom Tromey  <tom@tromey.com>
2317
2318         * infcall.c (call_function_by_hand_dummy): Use std::string.
2319
2320 2017-10-19  Tom Tromey  <tom@tromey.com>
2321
2322         * mi/mi-main.c (mi_cmd_execute): Update.
2323         * top.h (prepare_execute_command): Return scoped_value_mark.
2324         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2325         Add move constructor.
2326         * top.c (prepare_execute_command): Return scoped_value_mark.
2327         (execute_command): Update.
2328
2329 2017-10-19  Pedro Alves  <palves@redhat.com>
2330
2331         * xml-support.c (xml_fetch_content_from_file): Check fread's
2332         return.
2333
2334 2017-10-19  Pedro Alves  <palves@redhat.com>
2335
2336         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2337         async.
2338         (handle_error_fd): New function.
2339         (ser_base_async): Add/delete an event loop file handler for
2340         error_fd.
2341
2342 2017-10-19  Pedro Alves  <palves@redhat.com>
2343
2344         * xml-support.c (xml_fetch_content_from_file): Don't read in
2345         chunks.  Instead use fseek to determine the file's size, and read
2346         it in one go.
2347
2348 2017-11-18  Keith Seitz  <keiths@redhat.com>
2349
2350         * c-exp.y (oper): Canonicalize conversion operators of user-defined
2351         types.
2352         Add whitespace to front of type name.
2353
2354 2017-10-18  Keith Seitz  <keiths@redhat.com>
2355
2356         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2357         DW_AT_accessibility.
2358
2359 2017-10-18  Yao Qi  <yao.qi@linaro.org>
2360
2361         * features/tic6x-c62x-linux.c: Remove.
2362
2363 2017-10-17  Tom Tromey  <tom@tromey.com>
2364
2365         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2366         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2367         (do_mixed_source_and_assembly): Likewise.
2368
2369 2017-10-17  Tom Tromey  <tom@tromey.com>
2370
2371         * regcache.c (regcache::xfer_part): Remove assertion.
2372
2373 2017-10-17  Pedro Alves  <palves@redhat.com>
2374
2375         * xml-support.c (xml_fetch_content_from_file): Call
2376         unique_ptr::release() instead unique_ptr::get() when passing
2377         through xrealloc.
2378
2379 2017-10-17  Yao Qi  <yao.qi@linaro.org>
2380
2381         * regcache.c (regcache::xfer_part): Remove parameters read and
2382         write, add parameter is_raw.  All callers are updated.
2383
2384 2017-10-16  Keith Seitz  <keiths@redhat.com>
2385
2386         * c-typeprint.c (enum access_specifier): Moved here from
2387         c_type_print_base.
2388         (output_access_specifier): New function.
2389         (c_type_print_base): Consider typedefs when assessing
2390         whether access labels are needed.
2391         Use output_access_specifier as needed.
2392         Output access specifier for typedefs, if needed.
2393         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2394         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2395         fields.
2396         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2397         accessor macros.
2398
2399 2017-10-16  Tom Tromey  <tom@tromey.com>
2400
2401         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2402         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2403         * target.c (target_fileio_read_stralloc): Update.
2404         * sparc64-tdep.c (adi_is_addr_mapped): Update.
2405         * target.h (target_fileio_read_stralloc): Return
2406         unique_xmalloc_ptr.
2407
2408 2017-10-16  Tom Tromey  <tom@tromey.com>
2409
2410         * xml-syscall.c (xml_init_syscalls_info): Update.
2411         * xml-support.c (xinclude_start_include): Update.
2412         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2413         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2414         (xml_fetch_content_from_file): Likewise.
2415         * osdata.c (get_osdata): Update.
2416         * target.h (target_read_stralloc, target_get_osdata): Return
2417         unique_xmalloc_ptr.
2418         * solib-aix.c (solib_aix_get_library_list): Update.
2419         * solib-target.c (solib_target_current_sos): Update.
2420         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2421         * xml-tdesc.c (fetch_available_features_from_target): Update.
2422         (target_fetch_description_xml): Update.
2423         (file_read_description_xml): Update.
2424         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2425         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2426         (remote_pid_to_exec_file): Update.
2427         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2428         (target_get_osdata): Likewise.
2429
2430 2017-10-16  Tom Tromey  <tom@tromey.com>
2431
2432         * remote.c (remote_register_number_and_offset): Use std::vector.
2433         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2434         (putpkt_binary): Use gdb::def_vector.
2435         (compare_sections_command): Use gdb::byte_vector.
2436
2437 2017-10-16  Tom Tromey  <tom@tromey.com>
2438
2439         * ppc-linux-nat.c (hwdebug_insert_point): Use
2440         gdb::unique_xmalloc_ptr, XDUP.
2441
2442 2017-10-16  Tom Tromey  <tom@tromey.com>
2443
2444         * probe.c (parse_probes): Use std::string.
2445         (info_probes_for_ops, enable_probes_command)
2446         (disable_probes_command): Remove cleanups.
2447
2448 2017-10-16  Tom Tromey  <tom@tromey.com>
2449
2450         * buildsym.c (block_compar): Remove.
2451         (end_symtab_get_static_block): Use std::vector.
2452
2453 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
2454
2455         * memrange.h (struct mem_range): Define operator< and operator==.
2456         (mem_range_s): Remove.
2457         (DEF_VEC_O (mem_range_s)): Remove.
2458         (normalize_mem_ranges): Change parameter type to std::vector.
2459         * memrange.c (compare_mem_ranges): Remove.
2460         (normalize_mem_ranges): Change parameter type to std::vector,
2461         adjust to vector change.
2462         * exec.c (section_table_available_memory): Return vector, remove
2463         parameter.
2464         (section_table_read_available_memory): Adjust to std::vector
2465         change.
2466         * remote.c (remote_read_bytes): Adjust to std::vector
2467         change.
2468         * tracepoint.h (traceframe_available_memory): Change parameter
2469         type to std::vector.
2470         * tracepoint.c (traceframe_available_memory): Change parameter
2471         type to std::vector, adjust.
2472         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2473         std::vector change.
2474         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2475         unittests/memrange-selftests.c.
2476         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2477         * gdb/unittests/memrange-selftests.c: New file.
2478
2479 2017-10-16  Pedro Alves  <palves@redhat.com>
2480
2481         * elfread.c (probe_key_free): Rename range-for variable.
2482         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2483         (find_probe_by_pc, collect_probes): Rename range-for variable.
2484
2485 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2486
2487         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2488         * features/tic6x-c62x.c: Remove.
2489         * features/tic6x-c64x-linux.c: Remove.
2490         * features/tic6x-c64x.c: Remove.
2491         * features/tic6x-c64xp-linux.c: Remove.
2492         * features/tic6x-c64xp.c: Remove.
2493         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2494         initialize_tdesc_tic6x_*_linux functions.
2495         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2496         initialize_tdesc_tic6x_* functions.
2497
2498 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2499
2500         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2501         tic6x-c62x.
2502         * regformats/tic6x-c62x.dat: Remove.
2503         * regformats/tic6x-c64x.dat: Remove.
2504         * regformats/tic6x-c64xp.dat: Remove.
2505
2506 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2507
2508         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2509         (the !HAVE_LIBEXPAT version).
2510
2511 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2512
2513         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2514         const.
2515
2516 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2517
2518         * target.h: Include tracepoint.h.
2519         (enum trace_find_type): Move to tracepoint.h.
2520         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2521         * tracepoint.h: Don't include target.h
2522         (enum trace_find_type): Move from target.h.
2523         (parse_traceframe_info): Return a unique ptr.
2524         * tracepoint.c (current_traceframe_info): Change type to unique
2525         ptr.
2526         (free_traceframe_info): Remove.
2527         (clear_traceframe_info): Don't manually free
2528         current_traceframe_info.
2529         (free_result): Remove.
2530         (parse_traceframe_info): Return a unique ptr.
2531         (get_traceframe_info): Adjust to unique ptr.
2532         * ctf.c (ctf_traceframe_info): Return a unique ptr.
2533         * remote.c (remote_traceframe_info): Return a unique ptr.
2534         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2535         ptr.
2536         * target-debug.h (target_debug_print_traceframe_info_up): New
2537         macro.
2538         * target-delegates.c: Regenerate.
2539
2540 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2541
2542         * memrange.h (struct mem_range): Add constructors.
2543         * tracepoint.h (struct traceframe_info) <memory>: Change type to
2544         std::vector<mem_range>.
2545         * tracepoint.c (free_traceframe_info): Don't manually free
2546         vector.
2547         (traceframe_info_start_memory): Adjust to vector change.
2548         (traceframe_available_memory): Likewise.
2549         * tracefile-tfile.c (build_traceframe_info): Likewise.
2550         * ctf.c (ctf_traceframe_info): Likewise.
2551
2552 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2553
2554         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2555         std::vector<int>.
2556         * tracepoint.c (free_traceframe_info): Deallocate with delete.
2557         (traceframe_info_start_tvar): Adjust to vector change.
2558         (parse_traceframe_info): Allocate with new.
2559         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2560         vector change.
2561         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2562         change.
2563         tfile_traceframe_info): Allocate with new.
2564         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2565         change.
2566
2567 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2568
2569         * tracepoint.c (traceframe_info): Rename to...
2570         (current_traceframe_info): ...this.
2571         (clear_traceframe_info): Adjust.
2572         (get_traceframe_info): Adjust.
2573
2574 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2575
2576         * nat/linux-osdata.c: Include algorithm.
2577         (compare_processes): Remove.
2578         (struct pid_pgid_entry): New struct.
2579         (linux_xfer_osdata_processgroups): Use std::vector instead of
2580         XNEWVEC.
2581
2582 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2583
2584         * objfiles.h: Don't include symfile.h.
2585         (struct partial_symbol): Remove forward-declaration.
2586         (struct objfile) <global_psymbols, static_psymbols>: Change type
2587         to std::vector<partial_symbol *>.
2588         * objfiles.c (objfile::objfile): Don't memset those fields.
2589         (objfile::~objfile): Don't free those fields.
2590         * psympriv.h (struct psymbol_allocation_list): Remove
2591         forward-declaration.
2592         (add_psymbol_to_list): Change psymbol_allocation_list parameter
2593         to std::vector.
2594         (start_psymtab_common): Change parameters to std::vector.
2595         * psymtab.c: Include algorithm.
2596         (require_partial_symbols): Call shrink_to_fit.
2597         (find_pc_sect_psymbol): Adjust to vector change.
2598         (match_partial_symbol): Likewise.
2599         (lookup_partial_symbol): Likewise.
2600         (psym_relocate): Likewise.
2601         (dump_psymtab): Likewise.
2602         (recursively_search_psymtabs): Likewise.
2603         (compare_psymbols): Remove.
2604         (sort_pst_symbols): Adjust to vector change.
2605         (start_psymtab_common): Likewise.
2606         (end_psymtab_common): Likewise.
2607         (psymbol_bcache_full): De-constify return value.
2608         (add_psymbol_to_bcache): Likewise.
2609         (extend_psymbol_list): Remove.
2610         (append_psymbol_to_list): Adjust to vector change.
2611         (add_psymbol_to_list): Likewise.
2612         (init_psymbol_list): Likewise.
2613         (maintenance_info_psymtabs): Likewise.
2614         (maintenance_check_psymtabs): Likewise.
2615         * symfile.h (struct psymbol_allocation_list): Remove.
2616         * symfile.c (reread_symbols): Adjust to vector change.
2617         * dbxread.c (start_psymtab): Change type of parameters.
2618         (dbx_symfile_read): Adjust to vector change.
2619         (read_dbx_symtab): Likewise.
2620         (start_psymtab): Change type of parameters.
2621         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2622         (create_partial_symtab): Likewise.
2623         (add_partial_symbol): Likewise.
2624         (write_one_signatured_type): Likewise.
2625         (recursively_write_psymbols): Likewise.
2626         * mdebugread.c (parse_partial_symbols): Likewise.
2627         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2628         (scan_xcoff_symtab): Adjust to vector change.
2629         (xcoff_initial_scan): Likewise.
2630
2631 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
2632
2633         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2634
2635 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2636
2637         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2638         Remove s390x-*-expedite, add s390x-expedite.
2639
2640 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2641
2642         * features/s390-gs-linux64.c: Regenerated.
2643         * features/s390x-gs-linux64.c: Regenerated.
2644
2645 2017-10-13  Tom Tromey  <tom@tromey.com>
2646
2647         * compile/compile-object-run.c (do_module_cleanup): Use delete.
2648         * solib.c (update_solib_list, reload_shared_libraries_1): Use
2649         delete.
2650         * symfile.c (symbol_file_add_with_addrs): Use new.
2651         (symbol_file_add_separate): Update comment.
2652         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2653         * jit.c (jit_object_close_impl): Use new.
2654         (jit_unregister_code): Use delete.
2655         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2656         (~objfile): Rename from free_objfile.
2657         (free_objfile_separate_debug, do_free_objfile_cleanup)
2658         (free_all_objfiles, objfile_purge_solibs): Use delete.
2659         * objfiles.h (struct objfile): Add constructor and destructor.
2660         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
2661         (allocate_objfile, free_objfile): Don't declare.
2662         (struct objstats): Add initializers.
2663
2664 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2665
2666         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
2667         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
2668         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
2669         * gdbarch.h: Regenerate.
2670         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2671         Adjust comment.
2672         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
2673         (i386_displaced_step_fixup): Adjust comment.
2674         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
2675
2676 2017-10-12  Tom Tromey  <tom@tromey.com>
2677
2678         * prologue-value.h (pv_area::store_would_trash): Return bool.
2679         (pv_area::find_reg): Likewise.
2680         * prologue-value.c (pv_area::store_would_trash): Return bool.
2681         (pv_area::find_reg): Likewise.
2682
2683 2017-10-12  Tom Tromey  <tom@tromey.com>
2684
2685         * s390-linux-tdep.c (s390_store, s390_load)
2686         (s390_check_for_saved, s390_analyze_prologue): Update.
2687         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
2688         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
2689         * prologue-value.h (class pv_area): Move from prologue-value.c.
2690         Change names of members.  Add constructor, destructor, member
2691         functions.
2692         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
2693         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
2694         (pv_area_fetch, pv_area_scan): Don't declare.
2695         * prologue-value.c (struct pv_area::area_entry): Now member of
2696         pv_area.
2697         (struct pv_area): Move to prologue-value.h.
2698         (pv_area::pv_area): Rename from make_pv_area.
2699         (pv_area::~pv_area): Rename from free_pv_area.
2700         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
2701         (clear_entries, find_entry, overlaps, store_would_trash, store)
2702         (fetch, find_reg, scan): Now member of pv_area.
2703         Remove "area" argument.  Update.
2704         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
2705         Update.
2706         * mn10300-tdep.c (push_reg, check_for_saved)
2707         (mn10300_analyze_prologue): Update.
2708         * mep-tdep.c (is_arg_spill, check_for_saved)
2709         (mep_analyze_prologue): Update.
2710         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
2711         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
2712         (m32c_is_struct_return, m32c_analyze_prologue): Update.
2713         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
2714         Update.
2715         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
2716         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
2717
2718 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2719
2720         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
2721         * linux-nat.c (linux_nat_delete_thread): New variable.
2722         (lwp_free): Invoke linux_nat_delete_thread if set.
2723         (linux_nat_set_delete_thread): New function.
2724         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
2725         thread delete callback.
2726         * arm-linux-nat.c (arm_linux_delete_thread): New function.
2727         (_initialize_arm_linux_nat): Assign thread delete callback.
2728         * s390-linux-nat.c (s390_delete_thread): New function.
2729         (_initialize_s390_nat): Assign thread delete callback.
2730         * x86-linux-nat.c (x86_linux_add_target): Likewise.
2731         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
2732         function.
2733         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
2734         declaration.
2735         * nat/x86-linux.c (x86_linux_delete_thread): New function.
2736         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
2737
2738 2017-10-09  Tom Tromey  <tom@tromey.com>
2739
2740         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
2741         std::string.
2742         * tui/tui-layout.c (enum tui_status): Use std::string.
2743
2744 2017-10-11  Tom Tromey  <tom@tromey.com>
2745
2746         * gdbthread.h (thread_command): Constify.
2747         * inferior.h (detach_command): Constify.
2748         * top.h (set_history, show_history): Constify.
2749         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
2750         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
2751         * bsd-kvm.c (bsd_kvm_cmd): Constify.
2752         * printcmd.c (set_command): Constify.
2753         (non_const_set_command): New function.
2754         * dcache.c (set_dcache_command, show_dcache_command): Constify.
2755         * breakpoint.c (enable_command, disable_command, delete_command)
2756         (catch_command, tcatch_command, set_breakpoint_cmd)
2757         (show_breakpoint_cmd): Constify.
2758         * macrocmd.c (macro_command): Constify.
2759         * infcmd.c (unset_command, kill_command, detach_command)
2760         (info_proc_cmd): Constify.
2761         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
2762         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
2763         (info_auto_load_cmd): Constify.
2764         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
2765         (unset_tdesc_cmd): Constify.
2766         * ada-lang.c (set_ada_command, show_ada_command)
2767         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
2768         * guile/guile.c (set_guile_command, show_guile_command)
2769         (info_guile_command): Constify.
2770         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
2771         Constify.
2772         * skip.c (skip_command): Constify.
2773         * compile/compile.c (_initialize_compile): Constify.
2774         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
2775         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
2776         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
2777         (maint_btrace_pt_show_cmd): Constify.
2778         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
2779         Constify.
2780         * python/python.c (user_show_python, user_set_python): Constify.
2781         * mips-tdep.c (set_mips_command, show_mips_command)
2782         (set_mipsfpu_command): Constify.
2783         * record-btrace.c (cmd_record_btrace_start)
2784         (cmd_set_record_btrace, cmd_show_record_btrace)
2785         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
2786         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
2787         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
2788         Constify.
2789         * symfile.c (overlay_command): Constify.
2790         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2791         * cli/cli-logging.c (set_logging_command, show_logging_command):
2792         Constify.
2793         * cli/cli-dump.c (dump_command, append_command)
2794         (srec_dump_command, ihex_dump_command, verilog_dump_command)
2795         (tekhex_dump_command, binary_dump_command)
2796         (binary_append_command): Constify.
2797         * cli/cli-decode.c (struct cmd_list_element): Change type of
2798         "fun".
2799         * cli/cli-cmds.c (info_command, show_command, set_debug)
2800         (show_debug): Constify.
2801         (show_command): Add non-const overload.
2802         * top.c (set_history, show_history): Constify.
2803         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
2804         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
2805         * target.c (target_command): Constify.
2806         * sparc64-tdep.c (info_adi_command): Constify.
2807         * record-full.c (cmd_record_full_start): Constify.
2808         (set_record_full_command): Constify.  Fix typo.
2809         (show_record_full_command): Constify.
2810         * thread.c (thread_command, thread_apply_command): Constify.
2811         * memattr.c (dummy_cmd): Constify.
2812         * value.c (function_command): Constify.
2813         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
2814         * probe.c (info_probes_command): Constify.
2815         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
2816         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
2817         (show_thread_cmd, set_thread_default_cmd)
2818         (show_thread_default_cmd): Constify.
2819         (check_empty): Constify.
2820         * tracepoint.c (tfind_command): Constify.
2821         * cp-support.c (maint_cplus_command): Constify.
2822         * windows-tdep.c (info_w32_command): Constify.
2823         * record.c (cmd_record_start, set_record_command)
2824         (show_record_command, info_record_command, cmd_record_goto):
2825         Constify.
2826         * ravenscar-thread.c (set_ravenscar_command)
2827         (show_ravenscar_command): Constify.
2828         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
2829         Constify.
2830         (add_internal_problem_command): Remove casts.
2831         * arc-tdep.c (maintenance_print_arc_command): Constify.
2832         * valprint.c (set_print, show_print, set_print_raw)
2833         (show_print_raw): Constify.
2834         * maint.c (maintenance_command, maintenance_info_command)
2835         (maintenance_print_command, maintenance_set_cmd)
2836         (maintenance_show_cmd, set_per_command_cmd)
2837         (show_per_command_cmd, maintenance_check_command): Constify.
2838         * language.c (set_check, show_check): Constify.
2839         * typeprint.c (show_print_type, set_print_type): Constify.
2840         * go32-nat.c (go32_info_dos_command): Constify.
2841
2842 2017-10-11  Tom Tromey  <tom@tromey.com>
2843
2844         * breakpoint.c (prepare_re_set_context): Remove.
2845         (breakpoint_re_set_one): Update.  Don't use cleanups.
2846         (breakpoint_re_set): Use scoped_restore, std::string, and
2847         scoped_restore_current_language.
2848
2849 2017-10-11  Tom Tromey  <tom@tromey.com>
2850
2851         * breakpoint.c (commands_command_1): Use std::string.
2852         (cleanup_executing_breakpoints): Remove.
2853         (bpstat_do_actions_1): Use scoped_restore.
2854         (bpstat_check_watchpoint): Use std::string.
2855         (decode_static_tracepoint_spec): Likewise.
2856         (break_range_command): Likewise.
2857         (watch_command_1): Likewise.
2858         (compare_breakpoints): Change argument types.
2859         (clear_command): Use std::vector.
2860         (cleanup_executing_breakpoints): Remove.
2861         (update_global_location_list): Use unique_xmalloc_ptr.
2862         (strace_command): Remove unused declaration.
2863
2864 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2865
2866         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
2867         * NEWS: Mention new FreeBSD/arm native configuration.
2868         * configure.host: Add arm*-*-freebsd*.
2869         * configure.nat: Likewise.
2870         * arm-fbsd-nat.c: New file.
2871
2872 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2873
2874         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
2875         (ALLDEPFILES): Add arm-fbsd-tdep.c.
2876         * NEWS: Mention new FreeBSD/arm target.
2877         * configure.tgt: Add arm*-*-freebsd*.
2878         * arm-fbsd-tdep.c: New file.
2879         * arm-fbsd-tdep.h: New file.
2880
2881 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2882
2883         * linux-tdep.c (linux_make_corefile_notes): Remove call to
2884         `gdbarch_elfcore_write_linux_prpsinfo'.
2885         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
2886         method.
2887         (elf_internal_linux_prpsinfo): Remove declaration.
2888         * gdbarch.h: Regenerate.
2889         * gdbarch.c: Regenerate.
2890
2891 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2892
2893         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
2894         `set_gdbarch_elfcore_write_linux_prpsinfo'.
2895
2896 2017-10-11  Pedro Alves  <palves@redhat.com>
2897
2898         * breakpoint.c (reattach_breakpoints): Delete.
2899         * breakpoint.h (reattach_breakpoints): Delete.
2900
2901 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
2902
2903         * symfile.c (registered_sym_fns): Make struct, not typedef.
2904         (DEF_VEC_O (registered_sym_fns)): Remove.
2905         (symtab_fns): Change type to std::vector.
2906         (add_symtab_fns): Adjust.
2907         (find_sym_fns): Adjust.
2908
2909 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
2910
2911         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
2912         * arc-tdep.h (arc_arch_is_em): New function.
2913         (arc_arch_is_hs): Likewise.
2914
2915 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
2916
2917         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
2918         parentheses in the declaration.
2919         (macro_lookup_inclusion): Likewise.
2920         (macro_lookup_definition): Likewise.
2921         * p-lang.h (pascal_builtin_types): Likewise.
2922         * tui/tui-data.c (tui_win_list): Likewise.
2923         * tui/tui-data.h (tui_win_list): Likewise.
2924         * utils.h (make_cleanup_free_section_addr_info): Likewise.
2925
2926 2017-10-11  Mark Rages  <markrages@gmail.com>
2927
2928         * target-memory.c (block_boundaries): Fix for block address not
2929         aligned on block size.
2930
2931 2017-10-10  Pedro Alves <palves@redhat.com>
2932             Tom Tromey  <tom@tromey.com>
2933
2934         * breakpoint.c (struct captured_breakpoint_query_args)
2935         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
2936         (print_breakpoint): New.
2937         * breakpoint.h (print_breakpoint): Declare.
2938         * common/common-exceptions.h (enum return_reason): Remove
2939         references to catch_exceptions.
2940         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
2941         Delete.
2942         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
2943         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
2944         * gdb.h: Delete.
2945         * gdbthread.h (thread_select): Declare.
2946         * mi/mi-cmd-break.c: Don't include gdb.h.
2947         (breakpoint_notify): Use print_breakpoint.
2948         * mi/mi-cmd-catch.c: Don't include gdb.h.
2949         * mi/mi-interp.c: Don't include gdb.h.
2950         (mi_print_breakpoint_for_event): New.
2951         (mi_breakpoint_created, mi_breakpoint_modified): Use
2952         mi_print_breakpoint_for_event.
2953         * mi/mi-main.c: Don't include gdb.h.
2954         (mi_cmd_thread_select): Parse the global thread ID here.  Use
2955         thread_select instead of gdb_thread_select.
2956         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
2957         of using gdb_list_thread_ids.
2958         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
2959         FILEIO_ENOSYS here.
2960         (remote_fileio_request): Use TRY/CATCH instead of
2961         catch_exceptions.
2962         * symfile-mem.c (struct symbol_file_add_from_memory_args)
2963         (symbol_file_add_from_memory_wrapper): Delete.
2964         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
2965         * thread.c: Don't include gdb.h.
2966         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
2967         (thread_alive): Use thread_select.
2968         (do_captured_thread_select): Delete, parts salvaged as ...
2969         (thread_select): ... this new function.
2970         (gdb_thread_select): Delete.
2971
2972 2017-10-10  Pedro Alves  <palves@redhat.com>
2973             Tom Tromey  <tom@tromey.com>
2974
2975         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
2976         and reverse logic.
2977         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
2978         No longer macros.  Instead ...
2979         (enum wp_check_result): They're now values of this new
2980         enumeration.
2981         (watchpoint_check): Change return type to wp_check_result and
2982         parameter type to bpstat.
2983         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
2984         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
2985         catch_errors.  Reverse logic of watchpoint_check call.
2986         (breakpoint_re_set_one): Now returns void and takes a breakpoint
2987         pointer as parameter.
2988         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
2989         * common/common-exceptions.c (throw_exception_sjlj): Update
2990         comments to avoid mentioning catch_errors.
2991         * exceptions.c (catch_errors): Delete.
2992         * exceptions.h: Update comments to avoid mentioning catch_errors.
2993         (catch_errors_ftype, catch_errors): Delete.
2994         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
2995         (hook_stop_stub): Delete.
2996         (restore_selected_frame): Change return type to void, and
2997         parameter type to const frame_id &.
2998         (restore_infcall_control_state): Use TRY/CATCH instead of
2999         catch_errors.
3000         * main.c (captured_command_loop): Return void and remove
3001         parameter.  Remove references to catch_errors.
3002         (captured_main): Use TRY/CATCH instead of catch_errors.
3003         * objc-lang.c (objc_submethod_helper_data)
3004         (find_objc_msgcall_submethod_helper): Delete.
3005         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3006         catch_errors.
3007         * record-full.c (record_full_message): Return void.
3008         (record_full_message_args, record_full_message_wrapper): Delete.
3009         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3010         instead of catch_errors.
3011         * solib-aix.c (solib_aix_open_symbol_file_object): Change
3012         parameter type to int.
3013         * solib-darwin.c (open_symbol_file_object): Ditto.
3014         * solib-dsbt.c (open_symbol_file_object): Ditto.
3015         * solib-frv.c (open_symbol_file_object): Ditto.
3016         * solib-svr4.c (open_symbol_file_object): Ditto.
3017         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3018         * solib.c (update_solib_list): Use TRY/CATCH instead of
3019         catch_errors.
3020         * solist.h (struct target_so_ops) <open_symbol_file_object>:
3021         Change type.
3022         * symmisc.c (struct print_symbol_args): Remove.
3023         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3024         (print_symbol): Change type.
3025         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3026         and remove parameters.
3027         (catch_errors): New.
3028         (get_windows_debug_event): Adjust.
3029
3030 2017-10-09  Tom Tromey  <tom@tromey.com>
3031
3032         * mi/mi-main.c (free_splay_tree): Remove.
3033         (list_available_thread_groups): Use splay_tree_up.
3034         * common/gdb_splay_tree.h: New file.
3035
3036 2017-10-09  Tom Tromey  <tom@tromey.com>
3037
3038         * mi/mi-main.c (do_nothing): Remove.
3039         (list_available_thread_groups): Update.
3040
3041 2017-10-09  Pedro Alves  <palves@redhat.com>
3042
3043         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3044         reading registers when switching context.
3045
3046 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
3047
3048         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3049         (fbsd_convert_siginfo): Likewise.
3050         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3051
3052 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
3053
3054         * configure.ac (try_guile_versions): Remove guile-2.2.
3055         * configure: Regenerate.
3056
3057 2017-10-09  Tom Tromey  <tom@tromey.com>
3058
3059         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3060         (COMPILE.pre): Use $(CXX).
3061
3062 2017-10-09  Pedro Alves  <palves@redhat.com>
3063
3064         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3065         Use bool.
3066         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3067         * cp-support.h (cp_remove_params): Now returns a
3068         gdb::unique_xmalloc_ptr.
3069         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3070         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3071         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3072         returning a gdb::unique_xmalloc_ptr.
3073         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3074         * stack.c (find_frame_funname): Adjust to cp_remove_params
3075         returning a gdb::unique_xmalloc_ptr.
3076
3077 2017-10-08  Tom Tromey  <tom@tromey.com>
3078
3079         * dwarf2read.c (dwarf2_get_dwz_file): Use
3080         gdb::unique_xmalloc_ptr.
3081         (find_slot_in_mapped_hash): Likewise.
3082         (dwarf2_physname): Likewise.
3083         (create_dwo_unit_in_dwp_v1): Use std::string.
3084         (create_dwo_unit_in_dwp_v2): Likewise.
3085         (lookup_dwo_cutu): Likewise.
3086         (inherit_abstract_dies): Use std::vector.
3087         (read_array_type): Likewise.
3088         (dwarf_decode_macros): Remove unused declaration.
3089         (unsigned_int_compar): Remove.
3090         (dwarf2_build_psymtabs_hard): Use scoped_restore.
3091         (psymtabs_addrmap_cleanup): Remove.
3092
3093 2017-10-08  Tom Tromey  <tom@tromey.com>
3094
3095         * frame-unwind.c (frame_unwind_try_unwinder): Update.
3096         * frame.h (frame_cleanup_after_sniffer): Declare.
3097         (frame_prepare_for_sniffer): Return void.
3098         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
3099         type of argument.
3100         (frame_prepare_for_sniffer): Return void.
3101
3102 2017-10-08  Tom Tromey  <tom@tromey.com>
3103
3104         * utils.h (make_cleanup_value_free): Remove.
3105         * utils.c (do_value_free, struct cleanup): Remove.
3106         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3107         Use gdb_value_up.
3108         * value.h (struct value_deleter): New.
3109         (gdb_value_up): New typedef.
3110
3111 2017-10-08  Tom Tromey  <tom@tromey.com>
3112
3113         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3114         (make_cleanup_free_search_symbols): Remove.
3115         (search_symbols): Return std::vector.
3116         (symbol_search::compare_search_syms): Now member of
3117         symbol_search.  Change arguments.
3118         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
3119         (symtab_symbol_info, rbreak_command): Update.
3120         * symtab.h (struct symbol_search) <next>: Remove.
3121         Add constructors.
3122         (symbol_search::operator<): New function.
3123         (symbol_search::operator==): New function.
3124         (search_symbols): Remove std::vector.
3125         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3126         (symbol_search::compare_search_syms): Declare.
3127
3128 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3129
3130         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3131         arch/aarch64-insn.o.
3132         Remove one rule.
3133         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3134
3135 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3136
3137         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3138         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3139         arch/arm-linux.o respectively.
3140         * configure.tgt: Likewise.
3141
3142 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3143
3144         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3145         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3146
3147 2017-10-06  Pedro Alves  <palves@redhat.com>
3148
3149         * windows-nat.c: Include <algorithm>.
3150
3151 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3152
3153         * configure.tgt (i386_tobjs): New variable.
3154         (amd64_tobjs): New variable.
3155         Set $cpu_obs and $os_obs.
3156
3157 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3158
3159         * Makefile.in (CONFIG_SRC_SUBDIR): New.
3160         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3161         (clean): Remove object files and dependency files.
3162         (distclean): Remove the directory.
3163         * configure.ac: Invoke AC_CONFIG_COMMANDS.
3164         * configure: Re-generated.
3165         * configure.tgt: Replace amd64.o with arch/amd64.o.
3166
3167 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
3168
3169         PR build/22188
3170         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3171         and SETEND.
3172
3173 2017-10-05  Pedro Alves  <palves@redhat.com>
3174
3175         * linux-nat.c (linux_child_follow_fork): When following the parent
3176         and detaching the child, consult the parent thread's architecture
3177         instead of the child's.
3178
3179 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3180
3181         * ax.h: Do not include "doublest.h".
3182         (union agent_val): Remove.
3183
3184 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3185
3186         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3187         (decimal_to_string): Return std::string object.
3188         (decimal_from_string): Accept std::string object.  Return bool.
3189         (decimal_from_integral, decimal_from_doublest): Remove.
3190         (decimal_from_longest): Add prototype.
3191         (decimal_from_ulongest): Likewise.
3192         (decimal_to_longest): Likewise.
3193         (decimal_from_doublest): Likewise.
3194         * dfp.c: Do not include "gdbtypes.h" or "value.h".
3195         (MAX_DECIMAL_STRING): Move here.
3196         (decimal_to_string): Return std::string object.
3197         (decimal_from_string): Accept std::string object.  Return bool.
3198         (decimal_from_integral): Remove, replace by ...
3199         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3200         (decimal_to_longest): New function.
3201         (decimal_from_floating): Remove, replace by ...
3202         (decimal_from_doublest): ... this new function.
3203         (decimal_to_doublest): Update to new decimal_to_string interface.
3204
3205         * value.c (unpack_long): Use decimal_to_longest.
3206         * valops.c (value_cast): Use decimal_from_doublest instead of
3207         decimal_from_floating.  Use decimal_from_[u]longest isntead of
3208         decimal_from_integral.
3209         * valarith.c (value_args_as_decimal): Likewise.
3210         * valprint.c (print_decimal_floating): Update to new
3211         decimal_to_string interface.
3212         * printcmd.c (printf_decfloat): Likewise.
3213         * c-exp.y (parse_number): Update to new decimal_from_string interface.
3214
3215 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3216
3217         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
3218         * gdbtypes.c: Include "floatformat.h".
3219         * value.c: Likewise.
3220         * m68k-tdep.c: Likewise.
3221
3222         * findvar.c: Do not include "floatformat.h".
3223         * amd64-darwin-tdep.c: Likewise.
3224         * arm-linux-tdep.c: Likewise.
3225         * i386-darwin-tdep.c: Likewise.
3226         * i387-tdep.c: Likewise.
3227         * m68k-linux-tdep.c: Likewise.
3228         * mep-tdep.c: Likewise.
3229         * mips-tdep.c: Likewise.
3230         * nios2-tdep.c: Likewise.
3231         * s390-linux-tdep.c: Likewise.
3232         * sparc-obsd-tdep.c: Likewise.
3233         * sparc-tdep.c: Likewise.
3234         * sparc64-tdep.c: Likewise.
3235         * spu-tdep.c: Likewise.
3236         * tic6x-tdep.c: Likewise.
3237         * tilegx-tdep.c: Likewise.
3238         * vax-tdep.c: Likewise.
3239         * xstormy16-tdep.c: Likewise.
3240         * xtensa-tdep.c: Likewise.
3241
3242         * top.c: Do not include "doublest.h".
3243         * aarch64-tdep.c: Likewise.
3244         * alpha-tdep.c: Likewise.
3245         * arm-linux-tdep.c: Likewise.
3246         * m68k-linux-tdep.c: Likewise.
3247         * tilegx-tdep.c: Likewise.
3248         * xstormy16-tdep.c: Likewise.
3249
3250 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3251
3252         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3253         (mipsn32_fbsd_sigframe): Define.
3254         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3255         for FreeBSD/mipsn32.
3256
3257 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3258
3259         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3260         AT_HWCAP.
3261
3262 2017-10-05  Tristan Gingold  <tgingold@free.fr>
3263
3264         * MAINTAINERS (Misc): Update my email address.
3265
3266 2017-10-04  Pedro Alves  <palves@redhat.com>
3267
3268         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
3269         it instead of target_gdbarch.
3270         (get_remote_state, get_remote_packet_size): Adjust
3271         get_remote_arch_state calls, passing down target_gdbarch
3272         explicitly.
3273         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3274         'gdbarch' and use it instead of target_gdbarch.
3275         (get_memory_packet_size): Adjust get_remote_arch_state calls,
3276         passing down target_gdbarch explicitly.
3277         (struct stop_reply) <arch>: New field.
3278         (remote_parse_stop_reply): Use the stopped thread's architecture,
3279         not the current inferior's.  Save the architecture in the
3280         stop_reply.
3281         (process_stop_reply): Use the stop reply's architecture.
3282         (process_g_packet, remote_fetch_registers)
3283         (remote_prepare_to_store, store_registers_using_G)
3284         (remote_store_registers): Adjust get_remote_arch_state calls,
3285         using the regcache's architecture.
3286         (remote_get_trace_status): Adjust get_remote_arch_state calls,
3287         passing down target_gdbarch explicitly.
3288         * spu-multiarch.c (spu_thread_architecture): Defer to the target
3289         beneath instead of calling target_gdbarch.
3290         * target.c (default_thread_architecture): Use the specified
3291         inferior's architecture, instead of the current inferior's
3292         architecture (via target_gdbarch).
3293
3294 2017-10-04  Pedro Alves  <palves@redhat.com>
3295
3296         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3297         case.
3298         (regcache_print): Handle !target_has_registers here instead.
3299
3300 2017-10-04  Pedro Alves  <palves@redhat.com>
3301
3302         * frame.c (create_test_frame): Delete.
3303         * frame.h (create_test_frame): Delete.
3304         * gdbarch-selftests.c: Include gdbthread.h and target.h.
3305         (class regcache_test): Delete.
3306         (test_target_has_registers, test_target_has_stack)
3307         (test_target_has_memory, test_target_prepare_to_store)
3308         (test_target_store_registers): New functions.
3309         (test_target_ops): New class.
3310         (register_to_value_test): Error out if there's already a
3311         process_stratum (or higher) target pushed.  Create a fuller mock
3312         environment, with mock target_ops, inferior, address space, thread
3313         and inferior_ptid.
3314         * progspace.c (struct address_space): Move to ...
3315         * progspace.h (struct address_space): ... here.
3316         * regcache.h (regcache::~regcache, regcache::raw_write)
3317         [GDB_SELF_TEST]: No longer virtual.
3318
3319 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
3320
3321         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3322
3323 2017-10-04  Pedro Alves  <palves@redhat.com>
3324
3325         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3326         out of 'between TRY and CATCH'.
3327
3328 2017-10-04  Pedro Alves  <palves@redhat.com>
3329
3330         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3331         * common/common-exceptions.h (TRY): Open an outermost scope.
3332         Expand intro comment.
3333         (CATCH): Reindent.
3334         (END_CATCH): Close the outermost scope.
3335         * completer.c (complete_line_internal): Add missing END_CATCH.
3336
3337 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3338
3339         * NEWS (Changes since GDB 8.0): Add entry about new
3340         'set-cwd-on-gdbserver' feature.
3341         (New remote packets): Add entry for QSetWorkingDir.
3342         * common/common-inferior.h (set_inferior_cwd): New prototype.
3343         * infcmd.c (set_inferior_cwd): Remove "static".
3344         (show_cwd_command): Expand text to include remote debugging.
3345         * remote.c: Add PACKET_QSetWorkingDir.
3346         (remote_protocol_features) <QSetWorkingDir>: New entry for
3347         PACKET_QSetWorkingDir.
3348         (extended_remote_set_inferior_cwd): New function.
3349         (extended_remote_create_inferior): Call
3350         "extended_remote_set_inferior_cwd".
3351         (_initialize_remote): Call "add_packet_config_cmd" for
3352         QSetWorkingDir.
3353
3354 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3355
3356         * NEWS (New commands): Mention "set/show cwd".
3357         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3358         "cd" command's help text.
3359         * common/common-inferior.h (get_inferior_cwd): New prototype.
3360         * infcmd.c (inferior_cwd_scratch): New global variable.
3361         (set_inferior_cwd): New function.
3362         (get_inferior_cwd): Likewise.
3363         (set_cwd_command): Likewise.
3364         (show_cwd_command): Likewise.
3365         (_initialize_infcmd): Add "set/show cwd" commands.
3366         * inferior.h (class inferior) <cwd>: New field.
3367         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3368         (fork_inferior): Change inferior's cwd before its execution.
3369         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3370         to CreateProcess.
3371
3372 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3373
3374         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3375         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3376         (COMMON_OBS): Add gdb_tilde_expand.o.
3377         * common/gdb_tilde_expand.c: New file.
3378         * common/gdb_tilde_expand.h: Likewise.
3379
3380 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
3381
3382         * gdbarch.sh (objfile): Remove duplicate declaration.
3383         * gdbarch.h: Regenerate.
3384
3385 2017-10-03  Tom Tromey  <tom@tromey.com>
3386
3387         * utils.c (internal_vproblem): Use string_vprintf.
3388
3389 2017-10-03  Tom Tromey  <tom@tromey.com>
3390
3391         * printcmd.c (info_symbol_command): Use std::string.
3392
3393 2017-10-03  Tom Tromey  <tom@tromey.com>
3394
3395         * top.c (gdb_safe_append_history): Use std::string.
3396
3397 2017-10-03  Tom Tromey  <tom@tromey.com>
3398
3399         * event-top.c (stdin_event_handler): Update.
3400         * main.c (captured_main_1): Update.
3401         * top.h (make_delete_ui_cleanup): Remove.
3402         (struct ui): Add constructor and destructor.
3403         (new_ui, delete_ui): Remove.
3404         * top.c (make_delete_ui_cleanup): Remove.
3405         (new_ui_command): Use std::unique_ptr.
3406         (delete_ui_cleanup): Remove.
3407         (ui::ui): Rename from new_ui.  Update.
3408         (free_ui): Remove.
3409         (ui::~ui): Rename from delete_ui.  Update.
3410
3411 2017-10-03  Tom Tromey  <tom@tromey.com>
3412
3413         * symfile.c (load_progress): Use gdb::byte_vector.
3414
3415 2017-10-03  Tom Tromey  <tom@tromey.com>
3416
3417         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3418         declaration.
3419         * printcmd.c (x_command): Remove unused declaration.
3420         * symfile.c (symbol_file_command): Remove unused declaration.
3421
3422 2017-10-03  Tom Tromey  <tom@tromey.com>
3423
3424         * utils.c (internal_vproblem): Use std::string.
3425         (defaulted_query): Likewise.
3426
3427 2017-10-03  Tom Tromey  <tom@tromey.com>
3428
3429         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3430         * top.c (execute_command_to_string): Update.
3431         * utils.c (make_cleanup_restore_page_info): Remove.
3432         (do_restore_page_info_cleanup): Remove.
3433         (set_batch_flag_and_restore_page_info):
3434         New.
3435         (make_cleanup_restore_page_info): Remove.
3436         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3437         (~set_batch_flag_and_restore_page_info): New
3438         (make_cleanup_restore_uinteger): Remove.
3439         (make_cleanup_restore_integer): Remove.
3440         (struct restore_integer_closure): Remove.
3441         (restore_integer): Remove.
3442         * utils.h (struct set_batch_flag_and_restore_page_info): New
3443         class.
3444         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3445         (make_cleanup_restore_page_info): Remove.
3446         (make_cleanup_restore_uinteger) Remove.
3447         (make_cleanup_restore_integer) Remove.
3448
3449 2017-10-03  Tom Tromey  <tom@tromey.com>
3450
3451         * record-full.h (record_full_gdb_operation_disable_set): Return
3452         scoped_restore_tmpl<int>.
3453         * infrun.c (adjust_pc_after_break): Update.
3454         (handle_signal_stop): Update.
3455         * record-full.c (record_full_gdb_operation_disable_set): Return
3456         scoped_restore_tmpl<int>.
3457         (record_full_wait_1, record_full_insert_breakpoint)
3458         (record_full_remove_breakpoint, record_full_save)
3459         (record_full_goto_insn): Update.
3460
3461 2017-10-02  Tom Tromey  <tom@tromey.com>
3462
3463         PR rust/22236:
3464         * rust-lang.c (rust_val_print_str): New function.
3465         (val_print_struct): Call it.
3466         (rust_subscript): Preserve name of slice type.
3467
3468 2017-10-02  Tom Tromey  <tom@tromey.com>
3469
3470         * rust-lang.c (rust_subscript): Handle slices in
3471         EVAL_AVOID_SIDE_EFFECTS case.
3472
3473 2017-10-02  Tom Tromey  <tom@tromey.com>
3474
3475         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3476
3477 2017-10-02  Tom Tromey  <tom@tromey.com>
3478
3479         * rust-lang.h (rust_slice_type): Add "extern".
3480
3481 2017-10-02  Tom Tromey  <tom@tromey.com>
3482             Pedro Alves  <palves@redhat.com>
3483
3484         * ada-lang.h (ada_exc_info::operator<): Make const.
3485         (ada_exc_info::operator==): Make const.
3486         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3487         Make const.
3488
3489 2017-09-29  Tom Tromey  <tom@tromey.com>
3490
3491         * target.c (read_whatever_is_readable): Change type of "result".
3492         Update.
3493         (free_memory_read_result_vector): Remove.
3494         (read_memory_robust): Change return type.  Update.
3495         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
3496         bin2hex, std::string.
3497         * target.h (memory_read_result_s): Remove typedef.
3498         (free_memory_read_result_vector): Remove.
3499         (read_memory_robust): Return std::vector.
3500
3501 2017-09-29  Tom Tromey  <tom@tromey.com>
3502
3503         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3504
3505 2017-09-29  Tom Tromey  <tom@tromey.com>
3506
3507         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3508         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
3509         operator< and operator==.
3510         (ada_exceptions_list): Return a std::vector.
3511         * ada-lang.c (ada_exc_info::operator<): Rename from
3512         compare_ada_exception_info.
3513         (ada_exc_info::operator==): New.
3514         (sort_remove_dups_ada_exceptions_list): Change type of
3515         "exceptions".
3516         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3517         (ada_add_global_exceptions): Likewise.
3518         (ada_exceptions_list_1): Return a std::vector.
3519         (ada_exceptions_list): Likewise.
3520
3521 2017-09-29  Tom Tromey  <tom@tromey.com>
3522
3523         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3524         'std::set *'.
3525         (print_one_inferior): Update.
3526         (free_vector_of_ints): Remove.
3527         (list_available_thread_groups): Change "ids" to std::set.
3528         (mi_cmd_list_thread_groups): Update.
3529         (struct collect_cores_data) <core>: Now a std::set.
3530         (collect_cores): Update.
3531         (unique): Remove.
3532         (print_one_inferior): Update.
3533
3534 2017-09-29  Tom Tromey  <tom@tromey.com>
3535
3536         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3537         (mi_execute_async_cli_command): Likewise.
3538         (mi_cmd_trace_frame_collected): Use field_fmt.
3539
3540 2017-09-29  Tom Tromey  <tom@tromey.com>
3541
3542         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3543         gdb::byte_vector.
3544
3545 2017-09-29  Tom Tromey  <tom@tromey.com>
3546
3547         * mi/mi-parse.c (mi_parse): Remove unused declaration.
3548
3549 2017-09-29  Tom Tromey  <tom@tromey.com>
3550
3551         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3552
3553 2017-09-29  Tom Tromey  <tom@tromey.com>
3554
3555         * varobj.h (varobj_gen_name): Return std::string.
3556         * varobj.c (varobj_gen_name): Return std::string.
3557         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3558         (mi_cmd_var_delete): Don't copy "name".
3559
3560 2017-09-29  Tom Tromey  <tom@tromey.com>
3561
3562         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3563         (mi_cmd_break_insert_1): Update.
3564
3565 2017-09-29  Tom Tromey  <tom@tromey.com>
3566
3567         * target.h (make_scoped_defer_target_commit_resume): Update.
3568         * target.c (make_scoped_defer_target_commit_resume): Rename from
3569         make_cleanup_defer_target_commit_resume.  Return a
3570         scoped_restore.
3571         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3572
3573 2017-09-29  Tom Tromey  <tom@tromey.com>
3574
3575         * main.c (captured_main_1): Remove unused declaration.
3576         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3577
3578 2017-09-29  Tom Tromey  <tom@tromey.com>
3579
3580         * symtab.c (search_symbols): Remove unused outer cleanup.
3581         (make_source_files_completion_list): Remove unused declaration.
3582
3583 2017-09-29  Tom Tromey  <tom@tromey.com>
3584
3585         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3586
3587 2017-09-29  Tom Tromey  <tom@tromey.com>
3588
3589         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3590         gdb::byte_vector.
3591
3592 2017-09-29  Tom Tromey  <tom@tromey.com>
3593
3594         * complaints.c (vcomplaint): Use std::string.
3595
3596 2017-09-29  Tom Tromey  <tom@tromey.com>
3597
3598         * tracepoint.c (trace_variable_command): Use std::string.
3599         (encode_actions_1): Remove unused declarations.
3600         (create_tsv_from_upload): Use std::string.
3601
3602 2017-09-29  Tom Tromey  <tom@tromey.com>
3603
3604         * cp-support.c (gdb_demangle): Use std::string.
3605
3606 2017-09-29  Tom Tromey  <tom@tromey.com>
3607
3608         * stack.c (parse_frame_specification): Use std::string
3609         (info_frame_command): Use gdb::unique_xmalloc_ptr.
3610
3611 2017-09-29  Tom Tromey  <tom@tromey.com>
3612
3613         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3614
3615 2017-09-29  Tom Tromey  <tom@tromey.com>
3616
3617         * utils.c (vfprintf_maybe_filtered): Use std::string.
3618         (vfprintf_unfiltered): Likewise.
3619
3620 2017-09-29  Tom Tromey  <tom@tromey.com>
3621
3622         * event-top.c (top_level_prompt): Return std::string.
3623         (display_gdb_prompt): Update.
3624
3625 2017-09-29  Tom Tromey  <tom@tromey.com>
3626
3627         * unittests/common-utils-selftests.c (format): New function.
3628         (string_vprintf_tests): New function.
3629         (_initialize_common_utils_selftests): Register new tests.
3630         * common/common-utils.c (string_vprintf): New function.
3631         * common/common-utils.h (string_vprintf): Declare.
3632
3633 2017-09-29  Pedro Alves  <palves@redhat.com>
3634
3635         * common/rsp-low.c (unpack_varlen_hex): Constify.
3636         * common/rsp-low.h (unpack_varlen_hex): Constify.
3637         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3638         Constify.
3639         * remote.c (remote_set_permissions, read_ptid)
3640         (remote_current_thread, remote_get_threads_with_qthreadinfo)
3641         (remote_static_tracepoint_marker_at)
3642         (remote_static_tracepoint_markers_by_strid)
3643         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3644         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3645         (parse_tracepoint_definition, parse_tsv_definition)
3646         (parse_static_tracepoint_marker_definition): Constify.
3647         * tracepoint.h (parse_static_tracepoint_marker_definition)
3648         (parse_trace_status, parse_tracepoint_status)
3649         (parse_tracepoint_definition, parse_tsv_definition): Constify.
3650
3651 2017-09-29  Pedro Alves  <palves@redhat.com>
3652
3653         * remote.c (target_buf, target_buf_size): Delete.
3654         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3655         Use the connection's packet buffer instead.
3656         All callers adjusted.
3657         (_initialize_remote): Remove references to target_buf and
3658         target_buf_size.
3659
3660 2017-09-28  Pedro Alves  <palves@redhat.com>
3661
3662         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3663         unittests/common-utils-selftests.c.
3664         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
3665         (COMMON_OBS): Remove utils-selftests.o.
3666         * utils-selftests.c: Move to ...
3667         * unittests/common-utils-selftests.c: ... here and rename self
3668         test to "string_printf".
3669
3670 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
3671
3672         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
3673         having NULL cus or tus.
3674
3675 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3676
3677         * arm-tdep.c: (convert_from_extended): Remove.
3678         (convert_to_extended): Likewise.
3679         (arm_extract_return_value): Use convert_typed_floating.
3680         (arm_store_return_value): Likewise.
3681
3682         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3683         * sh-tdep.c: Do not include "floatformat.h".
3684         (sh_littlebyte_bigword_type): New function.
3685         (sh_register_convert_to_virtual): Use convert_typed_floating.
3686         (sh_register_convert_to_raw): Likewise.
3687         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3688         (sh64_littlebyte_bigword_type): New function.
3689         (sh64_extract_return_value): Use convert_typed_floating.
3690         (sh64_register_convert_to_virtual): Likewise.
3691         (sh64_register_convert_to_raw): Likewise.
3692
3693 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3694
3695         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
3696         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
3697
3698         * gdbtypes.h (union type_specific): Make field floatformat hold
3699         just a single struct floatformat, not an array.
3700         (floatformat_from_type): Move here.
3701         * gdbtypes.c (floatformat_from_type): Move here.  Update to
3702         changed TYPE_FLOATFORMAT definition.
3703         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
3704         (recursive_dump_type): Likewise.
3705         (init_float_type): Install correct floatformat for byte order.
3706         (arch_float_type): Likewise.
3707
3708 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3709
3710         * gdbtypes.c (init_type): Change incoming argument from
3711         length-in-bytes to length-in-bits.  Assert length is a
3712         multiple of TARGET_CHAR_BITS.
3713         (arch_type, arch_flags_type): Likewise.
3714         (init_integer_type): Update call to init_type.
3715         (init_character_type): Likewise.
3716         (init_boolean_type): Likewise.
3717         (init_float_type): Likewise.
3718         (init_decfloat_type): Likewise.
3719         (init_complex_type): Likewise.
3720         (init_pointer_type): Likewise.
3721         (objfile_type): Likewise.
3722         (arch_integer_type): Update call to arch_type.
3723         (arch_character_type): Likewise.
3724         (arch_boolean_type): Likewise.
3725         (arch_float_type): Likewise.
3726         (arch_decfloat_type): Likewise.
3727         (arch_complex_type): Likewise.
3728         (arch_pointer_type): Likewise.
3729         (gdbtypes_post_init): Likewise.
3730
3731         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
3732         (read_base_type): Likewise.
3733         * mdebugread.c (basic_type): Likewise.
3734         * stabsread.c (dbx_init_float_type): Likewise.
3735         (rs6000_builtin_type): Likewise.
3736         (read_range_type): Likewise.  Also, fix call to init_integer_type
3737         with erroneous length argument.
3738
3739         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
3740         * d-lang.c (build_d_types): Likewise.
3741         * f-lang.c (build_fortran_types): Likewise.
3742         * go-lang.c (build_go_types): Likewise.
3743         * opencl-lang.c (build_opencl_types): Likewise.
3744         * jit.c (finalize_symtab): Likewise.
3745         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
3746         (build_std_type_info_type): Likewise.
3747         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
3748         update call to arch_flags_type.
3749
3750         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
3751         arch_type.
3752         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
3753         * windows-tdep.c (windows_get_tlb_type): Likewise.
3754
3755         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
3756         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3757         * m32c-tdep.c (make_types): Likewise.
3758         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
3759         (rl78_psw_type): Update call to arch_flags_type.
3760         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
3761         * rx-tdep.c (rx_psw_type): Likewise.
3762         (rx_fpsw_type): Likewise.
3763         * sparc-tdep.c (sparc_psr_type): Likewise.
3764         (sparc_fsr_type): Likewise.
3765         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
3766         (sparc64_ccr_type): Likewise.
3767         (sparc64_fsr_type): Likewise.
3768         (sparc64_fprs_type): Likewise.
3769
3770 2017-09-27  Tom Tromey  <tom@tromey.com>
3771
3772         * findcmd.c (find_command): Constify.
3773
3774 2017-09-27  Tom Tromey  <tom@tromey.com>
3775
3776         * ada-tasks.c (task_command_1, task_command): Constify.
3777
3778 2017-09-27  Tom Tromey  <tom@tromey.com>
3779
3780         * symtab.c (maintenance_print_symbol_cache)
3781         (maintenance_flush_symbol_cache)
3782         (maintenance_print_symbol_cache_statistics): Constify.
3783
3784 2017-09-27  Tom Tromey  <tom@tromey.com>
3785
3786         * inferior.c (detach_inferior_command, kill_inferior_command)
3787         (inferior_command): Constify.
3788
3789 2017-09-27  Tom Tromey  <tom@tromey.com>
3790
3791         * regcache.c (regcache_print, maintenance_print_registers)
3792         (maintenance_print_raw_registers)
3793         (maintenance_print_cooked_registers)
3794         (maintenance_print_register_groups)
3795         (maintenance_print_remote_registers): Constify.
3796
3797 2017-09-27  Tom Tromey  <tom@tromey.com>
3798
3799         * printcmd.c (map_display_numbers, undisplay_command)
3800         (enable_disable_display_command, enable_display_command)
3801         (disable_display_command): Constify.
3802
3803 2017-09-27  Tom Tromey  <tom@tromey.com>
3804
3805         * breakpoint.h (delete_command): Don't declare.
3806         * breakpoint.c (delete_command, enable_once_command)
3807         (enable_count_command, enable_delete_command, breakpoint_1)
3808         (maintenance_info_breakpoints, stopin_command, stopat_command)
3809         (delete_command, delete_trace_command, save_breakpoints)
3810         (save_breakpoints_command, save_tracepoints_command): Constify.
3811
3812 2017-09-27  Tom Tromey  <tom@tromey.com>
3813
3814         * macrocmd.c (macro_expand_command, macro_expand_once_command)
3815         (skip_ws, extract_identifier, macro_define_command)
3816         (macro_undef_command, macro_list_command): Constify.
3817
3818 2017-09-27  Tom Tromey  <tom@tromey.com>
3819
3820         * infcmd.c (environment_info, set_environment_command)
3821         (unset_environment_command, path_info, info_proc_cmd_1)
3822         (info_proc_cmd_mappings, info_proc_cmd_stat)
3823         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
3824         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
3825
3826 2017-09-27  Tom Tromey  <tom@tromey.com>
3827
3828         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
3829         Constify.
3830
3831 2017-09-27  Tom Tromey  <tom@tromey.com>
3832
3833         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
3834
3835 2017-09-27  Tom Tromey  <tom@tromey.com>
3836
3837         * demangle.c (demangle_command): Constify.
3838
3839 2017-09-27  Tom Tromey  <tom@tromey.com>
3840
3841         * progspace.c (maintenance_info_program_spaces_command):
3842         Constify.
3843
3844 2017-09-27  Tom Tromey  <tom@tromey.com>
3845
3846         * compile/compile.c (check_raw_argument, compile_file_command)
3847         (compile_code_command, compile_print_command): Constify.
3848
3849 2017-09-27  Tom Tromey  <tom@tromey.com>
3850
3851         * reggroups.c (maintenance_print_reggroups): Constify.
3852
3853 2017-09-27  Tom Tromey  <tom@tromey.com>
3854
3855         * dwarf2read.c (save_gdb_index_command): Constify.
3856
3857 2017-09-27  Tom Tromey  <tom@tromey.com>
3858
3859         * stap-probe.c (info_probes_stap_command): Constify.
3860
3861 2017-09-27  Tom Tromey  <tom@tromey.com>
3862
3863         * fork-child.c (unset_exec_wrapper_command): Constify.
3864
3865 2017-09-27  Tom Tromey  <tom@tromey.com>
3866
3867         * btrace.c (get_uint, get_context_size, no_chunk)
3868         (maint_btrace_packet_history_cmd)
3869         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
3870         (maint_info_btrace_cmd): Constify.
3871
3872 2017-09-27  Tom Tromey  <tom@tromey.com>
3873
3874         * reverse.c (delete_bookmark_command): Constify.
3875
3876 2017-09-27  Tom Tromey  <tom@tromey.com>
3877
3878         * remote.c (set_memory_packet_size)
3879         (set_memory_write_packet_size, show_memory_write_packet_size)
3880         (set_memory_read_packet_size, show_memory_read_packet_size)
3881         (compare_sections_command, packet_command, remote_put_command)
3882         (remote_get_command, remote_delete_command): Constify.
3883
3884 2017-09-27  Tom Tromey  <tom@tromey.com>
3885
3886         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
3887         (set_mipsfpu_double_command, set_mipsfpu_none_command)
3888         (set_mipsfpu_auto_command): Constify.
3889
3890 2017-09-27  Tom Tromey  <tom@tromey.com>
3891
3892         * cli/cli-cmds.h (cd_command): Constify.
3893         * cli/cli-cmds.c (cd_command): Constify.
3894
3895 2017-09-27  Tom Tromey  <tom@tromey.com>
3896
3897         * thread.c (thread_name_command, thread_find_command): Constify.
3898
3899 2017-09-27  Tom Tromey  <tom@tromey.com>
3900
3901         * probe.c (enable_probes_command, disable_probes_command):
3902         Constify.
3903
3904 2017-09-27  Tom Tromey  <tom@tromey.com>
3905
3906         * symfile.c (symbol_file_command): Constify.
3907         * gdbcore.h (deprecated_file_changed_hook): Constify.
3908         * exec.c (deprecated_file_changed_hook, exec_file_command)
3909         (file_command): Constify.
3910         * defs.h (symbol_file_command): Constify.
3911
3912 2017-09-27  Tom Tromey  <tom@tromey.com>
3913
3914         * remote-fileio.c (set_system_call_allowed)
3915         (show_system_call_allowed): Constify.
3916
3917 2017-09-27  Tom Tromey  <tom@tromey.com>
3918
3919         * tracepoint.c (delete_trace_variable_command)
3920         (tfind_end_command, tfind_start_command, tfind_pc_command)
3921         (tfind_tracepoint_command, tfind_line_command)
3922         (tfind_range_command, tfind_outside_command): Constify.
3923
3924 2017-09-27  Tom Tromey  <tom@tromey.com>
3925
3926         * ax-gdb.c (maint_agent_printf_command, agent_command)
3927         (agent_eval_command): Constify.
3928
3929 2017-09-27  Tom Tromey  <tom@tromey.com>
3930
3931         * tracepoint.c (info_scope_command): Constify.
3932         * python/python.c (gdbpy_decode_line): Constify.
3933         * python/py-breakpoint.c (bppy_init): Constify.
3934         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
3935         * location.h: (new_linespec_location)
3936         (string_to_event_location_basic, string_to_event_location):
3937         Constify.
3938         * location.c (new_linespec_location)
3939         (string_to_event_location_basic, string_to_event_location):
3940         Constify.
3941         * linespec.h (decode_line_with_current_source)
3942         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
3943         * linespec.c (linespec_lex_to_end)
3944         (decode_line_with_current_source)
3945         (decode_line_with_last_displayed): Constify.
3946         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
3947         Constify.
3948         * cli/cli-cmds.c (edit_command, list_command): Constify.
3949         * breakpoint.h (until_break_command, watch_command_wrapper)
3950         (awatch_command_wrapper, rwatch_command_wrapper)
3951         (init_ada_exception_breakpoint): Constify.
3952         * breakpoint.c (break_command_1, dprintf_command)
3953         (break_range_command, watch_command_wrapper)
3954         (rwatch_command_wrapper, awatch_command_wrapper)
3955         (until_break_command, init_ada_exception_breakpoint)
3956         (strace_marker_create_sals_from_location, trace_command)
3957         (ftrace_command, strace_command, struct tracepoint): Constify.
3958         * ax-gdb.c (agent_command_1): Constify.
3959         * ada-lang.c (ada_exception_sal): Constify.
3960
3961 2017-09-27  Tom Tromey  <tom@tromey.com>
3962
3963         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
3964         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
3965         (get_context_size, no_chunk, get_insn_history_modifiers)
3966         (cmd_record_insn_history, get_call_history_modifiers)
3967         (cmd_record_call_history): Constify.
3968
3969 2017-09-27  Tom Tromey  <tom@tromey.com>
3970
3971         * source.c (show_substitute_path_command)
3972         (unset_substitute_path_command, set_substitute_path_command):
3973         Constify.
3974
3975 2017-09-27  Tom Tromey  <tom@tromey.com>
3976
3977         * typeprint.c (maintenance_print_type): Constify.
3978         * maint.c (maintenance_dump_me, maintenance_demangle)
3979         (maintenance_time_display, maintenance_info_sections)
3980         (maintenance_print_statistics, maintenance_deprecate)
3981         (maintenance_undeprecate): Constify.
3982         (maintenance_do_deprecate): Constify.  Use std::string.
3983         (maintenance_selftest): Constify.
3984         * gdbtypes.h (maintenance_print_type): Constify.
3985
3986 2017-09-27  Tom Tromey  <tom@tromey.com>
3987
3988         * hppa-tdep.c (unwind_command): Constify.
3989
3990 2017-09-27  Tom Tromey  <tom@tromey.com>
3991
3992         * target-descriptions.c (unset_tdesc_filename_cmd)
3993         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
3994         Constify.
3995
3996 2017-09-27  Tom Tromey  <tom@tromey.com>
3997
3998         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
3999
4000 2017-09-27  Tom Tromey  <tom@tromey.com>
4001
4002         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4003
4004 2017-09-27  Tom Tromey  <tom@tromey.com>
4005
4006         * tui/tui-regs.c (tui_reg_command): Constify.
4007
4008 2017-09-27  Tom Tromey  <tom@tromey.com>
4009
4010         * skip.c (skip_file_command, skip_function_command)
4011         (skip_enable_command, skip_disable_command, skip_delete_command):
4012         Constify.
4013
4014 2017-09-27  Tom Tromey  <tom@tromey.com>
4015
4016         * record-btrace.c (cmd_record_btrace_bts_start)
4017         (cmd_record_btrace_pt_start): Constify.
4018
4019 2017-09-27  Tom Tromey  <tom@tromey.com>
4020
4021         * symmisc.c (maintenance_print_symbols)
4022         (maintenance_print_msymbols, maintenance_print_objfiles)
4023         (maintenance_info_symtabs, maintenance_check_symtabs)
4024         (maintenance_expand_symtabs, maintenance_info_line_tables):
4025         Constify.
4026
4027 2017-09-27  Tom Tromey  <tom@tromey.com>
4028
4029         * top.c (new_ui_command): Constify.
4030
4031 2017-09-27  Tom Tromey  <tom@tromey.com>
4032
4033         * symfile.c (add_symbol_file_command)
4034         (remove_symbol_file_command, list_overlays_command)
4035         (map_overlay_command, unmap_overlay_command)
4036         (overlay_auto_command, overlay_manual_command)
4037         (overlay_off_command, overlay_load_command): Constify.
4038
4039 2017-09-27  Tom Tromey  <tom@tromey.com>
4040
4041         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4042         (info_spu_mailbox_command, info_spu_dma_command)
4043         (info_spu_proxydma_command): Constify.
4044
4045 2017-09-27  Tom Tromey  <tom@tromey.com>
4046
4047         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4048
4049 2017-09-27  Tom Tromey  <tom@tromey.com>
4050
4051         * cli/cli-script.c (user_defined_command): Constify.
4052
4053 2017-09-27  Tom Tromey  <tom@tromey.com>
4054
4055         * cli/cli-dump.c (dump_memory_command, dump_value_command)
4056         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4057         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4058         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4059         (dump_binary_value, append_binary_memory, append_binary_value):
4060         Constify.
4061         (struct dump_context) <func>: Constify.
4062         (add_dump_command): Update.
4063
4064 2017-09-27  Tom Tromey  <tom@tromey.com>
4065
4066         * cli/cli-cmds.c (show_version, show_configuration)
4067         (source_command, show_user): Constify.
4068
4069 2017-09-27  Tom Tromey  <tom@tromey.com>
4070
4071         * target.c (maintenance_print_target_stack): Constify.
4072
4073 2017-09-27  Tom Tromey  <tom@tromey.com>
4074
4075         * interps.c (interpreter_exec_cmd): Constify.
4076
4077 2017-09-27  Tom Tromey  <tom@tromey.com>
4078
4079         * record-full.c (cmd_record_full_restore): Constify.
4080
4081 2017-09-27  Tom Tromey  <tom@tromey.com>
4082
4083         * memattr.c (enable_mem_command, disable_mem_command)
4084         (delete_mem_command): Constify.
4085
4086 2017-09-27  Tom Tromey  <tom@tromey.com>
4087
4088         * value.c (show_convenience): Constify.
4089
4090 2017-09-27  Tom Tromey  <tom@tromey.com>
4091
4092         * gdbcore.h (core_file_command): Update.
4093         * corefile.c (core_file_command): Constify.
4094
4095 2017-09-27  Tom Tromey  <tom@tromey.com>
4096
4097         * user-regs.c (maintenance_print_user_registers): Constify.
4098
4099 2017-09-27  Tom Tromey  <tom@tromey.com>
4100
4101         * cp-namespace.c (maintenance_cplus_namespace): Constify.
4102
4103 2017-09-27  Tom Tromey  <tom@tromey.com>
4104
4105         * cp-support.c (first_component_command): Constify.
4106
4107 2017-09-27  Tom Tromey  <tom@tromey.com>
4108
4109         * psymtab.c (maintenance_print_psymbols)
4110         (maintenance_info_psymtabs, maintenance_check_psymtabs):
4111         Constify.
4112
4113 2017-09-27  Tom Tromey  <tom@tromey.com>
4114
4115         * windows-tdep.c (display_tib): Constify.
4116
4117 2017-09-27  Tom Tromey  <tom@tromey.com>
4118
4119         * linux-fork.c (delete_checkpoint_command)
4120         (detach_checkpoint_command): Constify.
4121
4122 2017-09-27  Tom Tromey  <tom@tromey.com>
4123
4124         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4125
4126 2017-09-27  Tom Tromey  <tom@tromey.com>
4127
4128         * arc-tdep.c (dump_arc_instruction_command): Constify.
4129
4130 2017-09-27  Tom Tromey  <tom@tromey.com>
4131
4132         * valprint.c (set_radix, show_radix): Constify.
4133
4134 2017-09-27  Tom Tromey  <tom@tromey.com>
4135
4136         * dtrace-probe.c (info_probes_dtrace_command): Constify.
4137
4138 2017-09-27  Tom Tromey  <tom@tromey.com>
4139
4140         * command.h (not_just_help_class_command): Update.
4141         * cli/cli-decode.h (not_just_help_class_command): Update.
4142         * cli/cli-decode.c (not_just_help_class_command): Constify.
4143
4144 2017-09-27  Tom Tromey  <tom@tromey.com>
4145
4146         * gdb_bfd.c (maintenance_info_bfds): Constify.
4147
4148 2017-09-27  Tom Tromey  <tom@tromey.com>
4149
4150         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4151         overloads.
4152         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
4153         (do_const_cfunc): New function.
4154         (cmd_cfunc_eq): New overload.
4155         (cli_user_command_p): Check do_const_cfunc.
4156         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4157         const_cfunc.
4158         * command.h (add_cmd): Add const overload and no-function
4159         overload.
4160         (set_cmd_cfunc): Add const overload.
4161         (cmd_const_cfunc_ftype): Declare.
4162         (cmd_cfunc_eq): Add const overload.
4163         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4164         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4165         overload.
4166
4167 2017-09-27  Tom Tromey  <tom@tromey.com>
4168
4169         * macroexp.c (get_next_token_for_substitution): New function.
4170         (substitute_args): Call it.  Check for __VA_OPT__.
4171
4172 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4173             Pedro Alves <palves@redhat.com>
4174
4175         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4176         producer_is_icc_lt_14.
4177         (producer_is_icc_lt_14): New function.
4178         (check_producer): Add code for checking version of ICC.
4179         (producer_is_icc): Move to producer.c.
4180         (read_structure_type): Restrict ICC workaround to ICC<14.
4181         * producer.c: Include selftest.h.
4182         (producer_is_icc, producer_parsing_tests, _initialize_producer):
4183         New functions.
4184         * producer.h (producer_is_icc): New declaration.
4185
4186 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4187
4188         * Makefile.in (SFILES): Add producer.c.
4189         (COMMON_OBS): Add producer.o
4190         * amd64-tdep.c (producer.h): Add new include.
4191         * dwarf2read.c (producer.h): Add new include.
4192         * producer.c: New file.
4193         * producer.h: New file.
4194         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4195         producer.c.
4196         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4197         producer.h.
4198
4199 2017-09-26  Matthias Klose  <doko@ubuntu.com>
4200
4201         * configure.ac: Search ncursesw before ncurses.
4202         Check ncursesw/ncurses.h before ncurses/ncurses.h.
4203         * gdb_curses.h: Include <ncursesw/ncurses.h>
4204         * config.in, configure: Regenerate.
4205
4206 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4207
4208         PR gdb/22185
4209         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4210         obsolete.
4211         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4212         Remove i386sol2 support.
4213         * configure.nat <i386sol2>: Remove.
4214         <sol2-64>: Fold into ...
4215         <sol2>: ... this.
4216         Move common settings to default section.
4217         Add sol-thread.o.
4218         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4219         x86_64-*-solaris2.1[0-9]*>: Rename to ...
4220         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4221         <i[34567]86-*-solaris*>: Remove.
4222         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4223
4224         * configure.ac: Remove wctype in libw check.
4225         (_MSE_INT_H): Don't define on Solaris 7-9.
4226         <solaris*>: Remove libthread_db.so.1 check.
4227         * configure: Regenerate.
4228         * config.in: Regenerate.
4229
4230         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4231         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4232         (gdb_ps_size_t): Remove.
4233         Use base types in users.
4234         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4235
4236         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4237
4238 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4239
4240         PR build/22206
4241         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4242         (adi_is_addr_mapped): Likewise.
4243         (PSR_ICC): Don't redefine.
4244         (PSR_IMPL): Likewise.
4245
4246 2017-09-25  Tom Tromey  <tom@tromey.com>
4247
4248         * regcache.c (regcache::dump): Use string_printf.
4249
4250 2017-09-25  Tom Tromey  <tom@tromey.com>
4251
4252         * regcache.c (class regcache_invalidator): New.
4253         (struct register_to_invalidate): Remove.
4254         (make_cleanup_regcache_invalidate): Remove.
4255         (regcache::raw_write): Use regcache_invalidator.
4256
4257 2017-09-25  Tom Tromey  <tom@tromey.com>
4258
4259         * spu-tdep.c (spu2ppu_sniffer): Update.
4260         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4261         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4262         Remove.
4263         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4264         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4265         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4266         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4267         (frame_pop): Update.
4268
4269 2017-09-25  Tom Tromey  <tom@tromey.com>
4270
4271         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4272         * regcache.h (regcache_xfree): Don't declare.
4273         * regcache.c (regcache_xfree): Remove.
4274         (do_regcache_xfree): Use delete.
4275         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4276         * linux-fork.c (free_fork): Use delete.
4277         (fork_save_infrun_state): Likewise.
4278         * jit.c (jit_dealloc_cache): Use delete.
4279         * infrun.c (discard_infcall_suspend_state): Use delete.
4280
4281 2017-09-25  Tom Tromey  <tom@tromey.com>
4282
4283         * regcache.h (regcache_xmalloc): Don't declare.
4284         (regcache_raw_set_cached_value): Update comment.
4285         * regcache.c (regcache_xmalloc): Remove.
4286         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4287         * jit.c (jit_frame_sniffer): Use new.
4288         * frame.c (frame_save_as_regcache): Use new.
4289
4290 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4291
4292         * NEWS: Advertise support for guarded-storage registers on IBM z.
4293
4294 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4295
4296         * s390-linux-nat.c (have_regset_gs): New static variable.
4297         (s390_linux_fetch_inferior_registers): Handle guarded-storage
4298         control block and guarded-storage broadcast control regsets.
4299         (s390_read_description): Detect whether the target has
4300         guarded-storage support, return appropriate tdesc.
4301         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4302         (features/s390x-gs-linux64.c): Likewise.
4303         (struct gdbarch_tdep) <have_gs>: New field.
4304         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4305         (s390_gsbc_regset): New variables.
4306         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4307         and s390_gsbc_regset, if applicable.
4308         (s390_core_read_description): Check whether core file was from a
4309         target with guarded-storage support; include appropriate regsets.
4310         (s390_gdbarch_init): Add registers for guarded-storage support.
4311         (_initialize_s390_tdep): Initialize new target descriptions that
4312         include registers for guarded-storage support.
4313         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4314         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4315         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4316         (S390_NUM_REGS): Adjust macro definition.
4317         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4318         (tdesc_s390x_gs_linux64): New declarations.
4319
4320 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4321
4322         * features/s390-gs-linux64.xml: New file.
4323         * features/s390-gs.xml: New file.
4324         * features/s390-gsbc.xml: New file.
4325         * features/s390x-gs-linux64.xml: New file.
4326         * features/Makefile (WHICH): Add s390-gs-linux64 and
4327         s390x-gs-linux64.
4328         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4329         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4330         * features/s390-gs-linux64.c: New generated file.
4331         * features/s390x-gs-linux64.c: New file.
4332         * regformats/s390-gs-linux64.dat: New file.
4333         * regformats/s390x-gs-linux64.dat: New file.
4334
4335 2017-09-23  Tom Tromey  <tom@tromey.com>
4336
4337         * defs.h (make_cleanup_override_quit_handler): Don't declare.
4338
4339 2017-09-22  Tom Tromey  <tom@tromey.com>
4340
4341         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4342         type to scoped_restore_tmpl.
4343         <scoped_input_handler>: Initialize m_quit_handler directly.
4344
4345 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4346
4347         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4348         (cd_command): Likewise.  Free "current_directory" before
4349         assigning to it.
4350         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4351         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4352         * top.c (gdb_dirbuf): Remove global declaration.
4353         * top.h (gdb_dirbuf): Likewise.
4354
4355 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4356
4357         * gnulib/aclocal.m4: Regenerate.
4358         * gnulib/config.in: Regenerate.
4359         * gnulib/configure: Regenerate.
4360         * gnulib/import/Makefile.am: Regenerate.
4361         * gnulib/import/Makefile.in: Regenerate.
4362         * gnulib/import/assure.h: New file.
4363         * gnulib/import/at-func.c: Likewise
4364         * gnulib/import/chdir-long.c: New file.
4365         * gnulib/import/chdir-long.h: New file.
4366         * gnulib/import/cloexec.c: New file.
4367         * gnulib/import/cloexec.h: New file.
4368         * gnulib/import/close.c: New file.
4369         * gnulib/import/closedir.c: New file.
4370         * gnulib/import/dirent-private.h: New file.
4371         * gnulib/import/dup-safer.c: New file.
4372         * gnulib/import/dup.c: New file.
4373         * gnulib/import/dup2.c: New file.
4374         * gnulib/import/error.c: New file.
4375         * gnulib/import/error.h: New file.
4376         * gnulib/import/exitfail.c: New file.
4377         * gnulib/import/exitfail.h: New file.
4378         * gnulib/import/fchdir.c: New file.
4379         * gnulib/import/fcntl.c: New file.
4380         * gnulib/import/fcntl.in.h: New file.
4381         * gnulib/import/fd-hook.c: New file.
4382         * gnulib/import/fd-hook.h: New file.
4383         * gnulib/import/fd-safer.c: New file.
4384         * gnulib/import/fdopendir.c: New file.
4385         * gnulib/import/filename.h: New file.
4386         * gnulib/import/filenamecat-lgpl.c: New file.
4387         * gnulib/import/filenamecat.h: New file.
4388         * gnulib/import/fstat.c: New file.
4389         * gnulib/import/fstatat.c: New file.
4390         * gnulib/import/getcwd-lgpl.c: New file.
4391         * gnulib/import/getcwd.c: New file.
4392         * gnulib/import/getdtablesize.c: New file.
4393         * gnulib/import/getlogin_r.c: New file.
4394         * gnulib/import/getprogname.c: New file.
4395         * gnulib/import/getprogname.h: New file.
4396         * gnulib/import/gettext.h: New file.
4397         * gnulib/import/glob-libc.h: New file.
4398         * gnulib/import/glob.c: New file.
4399         * gnulib/import/glob.in.h: New file.
4400         * gnulib/import/intprops.h: New file.
4401         * gnulib/import/m4/chdir-long.m4: New file.
4402         * gnulib/import/m4/close.m4: New file.
4403         * gnulib/import/m4/closedir.m4: New file.
4404         * gnulib/import/m4/d-ino.m4: New file.
4405         * gnulib/import/m4/d-type.m4: New file.
4406         * gnulib/import/m4/dup.m4: New file.
4407         * gnulib/import/m4/dup2.m4: New file.
4408         * gnulib/import/m4/error.m4: New file.
4409         * gnulib/import/m4/fchdir.m4: New file.
4410         * gnulib/import/m4/fcntl.m4: New file.
4411         * gnulib/import/m4/fcntl_h.m4: New file.
4412         * gnulib/import/m4/fdopendir.m4: New file.
4413         * gnulib/import/m4/filenamecat.m4: New file.
4414         * gnulib/import/m4/fstat.m4: New file.
4415         * gnulib/import/m4/fstatat.m4: New file.
4416         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4417         * gnulib/import/m4/getcwd-path-max.m4: New file.
4418         * gnulib/import/m4/getcwd.m4: New file.
4419         * gnulib/import/m4/getdtablesize.m4: New file.
4420         * gnulib/import/m4/getlogin_r.m4: New file.
4421         * gnulib/import/m4/getprogname.m4: New file.
4422         * gnulib/import/m4/glob.m4: New file.
4423         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4424         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4425         * gnulib/import/m4/mempcpy.m4: New file.
4426         * gnulib/import/m4/memrchr.m4: New file.
4427         * gnulib/import/m4/mode_t.m4: New file.
4428         * gnulib/import/m4/msvc-inval.m4: New file.
4429         * gnulib/import/m4/msvc-nothrow.m4: New file.
4430         * gnulib/import/m4/open.m4: New file.
4431         * gnulib/import/m4/openat.m4: New file.
4432         * gnulib/import/m4/opendir.m4: New file.
4433         * gnulib/import/m4/readdir.m4: New file.
4434         * gnulib/import/m4/realloc.m4: New file.
4435         * gnulib/import/m4/rewinddir.m4: New file.
4436         * gnulib/import/m4/save-cwd.m4: New file.
4437         * gnulib/import/m4/strdup.m4: New file.
4438         * gnulib/import/m4/strerror.m4: New file.
4439         * gnulib/import/m4/unistd-safer.m4: New file.
4440         * gnulib/import/mempcpy.c: New file.
4441         * gnulib/import/memrchr.c: New file.
4442         * gnulib/import/msvc-inval.c: New file.
4443         * gnulib/import/msvc-inval.h: New file.
4444         * gnulib/import/msvc-nothrow.c: New file.
4445         * gnulib/import/msvc-nothrow.h: New file.
4446         * gnulib/import/open.c: New file.
4447         * gnulib/import/openat-die.c: New file.
4448         * gnulib/import/openat-priv.h: New file.
4449         * gnulib/import/openat-proc.c: New file.
4450         * gnulib/import/openat.c: New file.
4451         * gnulib/import/openat.h: New file.
4452         * gnulib/import/opendir.c: New file.
4453         * gnulib/import/pipe-safer.c: New file.
4454         * gnulib/import/readdir.c: New file.
4455         * gnulib/import/realloc.c: New file.
4456         * gnulib/import/rewinddir.c: New file.
4457         * gnulib/import/save-cwd.c: New file.
4458         * gnulib/import/save-cwd.h: New file.
4459         * gnulib/import/strdup.c: New file.
4460         * gnulib/import/strerror-override.c: New file.
4461         * gnulib/import/strerror-override.h: New file.
4462         * gnulib/import/strerror.c: New file.
4463         * gnulib/import/unistd--.h: New file.
4464         * gnulib/import/unistd-safer.h: New file.
4465         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4466         "getcwd" and "glob".
4467         * ser-tcp.c: Undefine "close" before redefining it.
4468
4469 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4470
4471         * guile/scm-value.c (gdbscm_value_address): Initialize address,
4472         get rid of res_val.
4473
4474 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4475
4476         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4477         <sol2,sparc>: Likewise.
4478         <sol2-64,i386>: Likewise.
4479
4480         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4481         -Wdeprecated-declarations on *-*-solaris*.
4482         * configure: Regenerate.
4483
4484         * procfs.c: Include "nat/inferior.h".
4485         (procfs_info_proc): Fix typo.
4486
4487 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4488
4489         * remote.c (vector): Include.
4490         (struct private_thread_info): Add field, thread_handle.
4491         (free_private_thread_info): Deallocate storage associated with
4492         thread handle.
4493         (get_private_info_thread): Initialize `thread_handle' field.
4494         (struct thread_item): Add field, thread_handle.
4495         (clear_threads_listing_context): Deallocate storage associated
4496         with thread handle.
4497         (start_thread): Add support for "handle" attribute.
4498         (thread_attributes): Add "handle".
4499         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4500         field.
4501         (remote_update_thread_list): Update thread_handle.
4502         (remote_thread_handle_to_thread_info): New function.
4503         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4504
4505 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4506
4507         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4508         function.
4509         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4510         * python/python-internal.h (thread_object_type): Declare.
4511
4512 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4513
4514         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4515         (target_thread_handle_to_thread_info): Declare.
4516         * target.c (target_thread_handle_to_thread_info): New function.
4517         * target-delegates.c: Regenerate.
4518         * gdbthread.h (find_thread_by_handle): Declare.
4519         * thread.c (find_thread_by_handle): New function.
4520         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4521         function.
4522         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4523
4524 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4525
4526         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4527
4528 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4529
4530         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4531
4532 2017-09-21  Yao Qi  <yao.qi@linaro.org>
4533
4534         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4535         to gdb_target_obs.
4536
4537 2017-09-20  Tom Tromey  <tom@tromey.com>
4538
4539         * breakpoint.c (struct counted_command_line): Remove.
4540         (breakpoint_commands): Update.
4541         (alloc_counted_command_line, incref_counted_command_line)
4542         (decref_counted_command_line, do_cleanup_counted_command_line)
4543         (make_cleanup_decref_counted_command_line): Remove.
4544         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4545         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4546         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4547         (save_breakpoints): Update.
4548         * breakpoint.h (counted_command_line): Now a typedef to
4549         shared_ptr.
4550         (struct breakpoint) <commands>: Now a counted_command_line.
4551         (struct bpstats) <command>: Likewise.
4552
4553 2017-09-20  Tom Tromey  <tom@tromey.com>
4554
4555         * breakpoint.c (struct commands_info, do_map_commands_command):
4556         Remove.
4557         (commands_command_1): Update.
4558         (iterate_over_related_breakpoints): Take a function_view.
4559         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4560         (delete_command): Update.
4561         (map_breakpoint_numbers): Take a function_view.
4562         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4563         (disable_command): Update.
4564         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4565         (enable_command): Update.
4566         (struct disp_data, do_enable_breakpoint_disp)
4567         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4568         (do_map_enable_delete_breakpoint): Remove.
4569         (enable_once_command, enable_count_command, enable_delete_command)
4570         (delete_trace_variable_command): Update.
4571
4572 2017-09-20  Tom Tromey  <tom@tromey.com>
4573
4574         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
4575         (bpstat_clear): Use delete.
4576         (bpstats): New constructors.
4577         (bpstat_copy, bpstat_stop_status): Use new.
4578         (dprintf_after_condition_true): Update.
4579         * breakpoint.h (bpstats::bpstats): Add constructors.
4580         (bpstats::~bpstats): Add destructor.
4581
4582 2017-09-20  Pedro Alves  <palves@redhat.com>
4583
4584         * eval.c (make_params): Delete, refactored as ...
4585         (class fake_method): ... this new type's ctor.
4586         (fake_method::~fake_method): New.
4587         (evaluate_subexp_standard): Use 'fake_method'.
4588
4589 2017-09-20  Tom Tromey  <tom@tromey.com>
4590
4591         * windows-nat.c (get_windows_debug_event, windows_wait)
4592         (do_initial_windows_stuff, windows_attach): Update.
4593         * utils.c (vwarning, internal_vproblem): Update.
4594         (ui_unregister_input_event_handler_cleanup)
4595         (prepare_to_handle_input): Remove.
4596         (class scoped_input_handler): New.
4597         (defaulted_query, prompt_for_continue): Update.
4598         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4599         Update.
4600         * top.c (undo_terminal_modifications_before_exit): Update.
4601         * target/target.h (target_terminal_init, target_terminal_inferior)
4602         (target_terminal_ours): Don't declare.
4603         (class target_terminal): New.
4604         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4605         (target_terminal_ours_for_output)
4606         (make_cleanup_restore_target_terminal): Don't declare.
4607         (target_terminal_info): Remove.
4608         * target.c (enum terminal_state, terminal_state): Remove.
4609         (target_terminal::terminal_state): Define.
4610         (target_terminal::init): Rename from target_terminal_init.
4611         (target_terminal::inferior): Rename from
4612         target_terminal_inferior.
4613         (target_terminal::ours): Rename from target_terminal_ours.
4614         (target_terminal::ours_for_output): Rename from
4615         target_terminal_ours_for_output.
4616         (target_terminal::info): New method.
4617         (cleanup_restore_target_terminal)
4618         (make_cleanup_restore_target_terminal): Remove.
4619         * solib.c (handle_solib_event): Update.
4620         * remote.c (remote_serial_quit_handler): Update.
4621         (remote_terminal_inferior, remote_wait_as): Update.
4622         * record-full.c (record_full_wait_1): Update.
4623         * nto-procfs.c (procfs_create_inferior): Update.
4624         * nat/fork-inferior.c (startup_inferior): Update.
4625         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4626         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4627         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4628         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4629         (mi_breakpoint_created, mi_breakpoint_deleted)
4630         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4631         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4632         (mi_user_selected_context_changed, report_initial_inferior):
4633         Update.
4634         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4635         (linux_nat_terminal_inferior): Update.
4636         * infrun.c (follow_fork_inferior)
4637         (handle_vfork_child_exec_or_exit, do_target_resume)
4638         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4639         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4640         Update.
4641         * inflow.c (child_terminal_init, info_terminal_command): Update.
4642         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4643         (attach_command): Update.
4644         * infcall.c (call_thread_fsm_should_stop): Update.
4645         * gnu-nat.c (gnu_attach): Update.
4646         * extension.c (struct active_ext_lang_state)
4647         (restore_active_ext_lang): Update.
4648         * exceptions.c (print_flush): Update.
4649         * event-top.c (async_enable_stdin, default_quit_handler): Update.
4650         (struct quit_handler_cleanup_data, restore_quit_handler)
4651         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4652         Remove.
4653         * cp-support.c (gdb_demangle): Update.
4654         * breakpoint.c (update_inserted_breakpoint_locations)
4655         (insert_breakpoint_locations, handle_jit_event)
4656         (disable_breakpoints_in_unloaded_shlib): Update.
4657         * annotate.c (annotate_breakpoints_invalid)
4658         (annotate_frames_invalid): Update.
4659
4660 2017-09-20  Tom Tromey  <tom@tromey.com>
4661
4662         * main.c (catch_command_errors): Rename from
4663         catch_command_errors_const.
4664         (captured_main_1): Update.
4665
4666 2017-09-20  Pedro Alves  <palves@redhat.com>
4667
4668         * cli/cli-cmds.c (list_command): Use print_sal_location.
4669         (print_sal_location): New function.
4670         (ambiguous_line_spec): Use print_sal_location.
4671         * linespec.c (symbol_to_sal): Record the symbol in the sal.
4672         * symtab.c (find_function_start_sal): Likewise.
4673         * symtab.h (symtab_and_line::symbol): New field.
4674
4675 2017-09-20  Pedro Alves  <palves@redhat.com>
4676
4677         * linespec.c (minsym_found): Handle non-text minsyms.
4678         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
4679
4680 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4681
4682         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
4683         backslash.
4684
4685 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4686
4687         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
4688         vmovups instead vmovaps.
4689         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
4690
4691 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
4692
4693         * NEWS (Changes since GDB 8.0): Add starti.
4694         * infcmd.c (enum run_break): New.
4695         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
4696         case.
4697         (run_command): Use enum run_how.
4698         (start_command): Likewise.
4699         (starti_command): New function.
4700         (RUN_ARGS_HELP): New macro.
4701         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
4702         commands.  Add starti command.
4703
4704 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4705
4706         * Makefile.in (monitor.o): Remove the rule.
4707
4708 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4709
4710         * annotate.h (struct annotate_arg_emitter): Use
4711         DISABLE_COPY_AND_ASSIGN.
4712         * common/refcounted-object.h (refcounted_object): Likewise.
4713         * completer.h (struct completion_result): Likewise.
4714         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
4715         * filename-seen-cache.h (filename_seen_cache): Likewise.
4716         * gdbcore.h (thread_section_name): Likewise.
4717         * gdb_regex.h (compiled_regex): Likewise.
4718         * gdbthread.h (scoped_restore_current_thread): Likewise.
4719         * inferior.h (scoped_restore_current_inferior): Likewise.
4720         * jit.c (jit_reader): Likewise.
4721         * linespec.h (struct linespec_result): Likewise.
4722         * mi/mi-parse.h (struct mi_parse): Likewise.
4723         * nat/fork-inferior.c (execv_argv): Likewise.
4724         * progspace.h (scoped_restore_current_program_space): Likewise.
4725         * python/python-internal.h (class gdbpy_enter): Likewise.
4726         * regcache.h (regcache): Likewise.
4727         * target-descriptions.c (struct tdesc_reg): Likewise.
4728         (struct tdesc_type): Likewise.
4729         (struct tdesc_feature): Likewise.
4730         * ui-out.h (ui_out_emit_type): Likewise.
4731
4732 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
4733
4734         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
4735         label abort_expression.
4736
4737 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4738
4739         * common/buffer.c (buffer_xml_printf): Adjust.
4740         * common/xml-utils.c (xml_escape_text): Change return type to
4741         std::string, update code accordingly.
4742         * common/xml-utils.h (xml_escape_text): Change return type to
4743         std::string.
4744         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
4745         * windows-tdep.c (windows_xfer_shared_library): Adjust.
4746         * unittests/xml-utils-selftests.c (test_xml_escape_text):
4747         Adjust.
4748
4749 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4750
4751         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
4752         (SUBDIR_UNITTESTS_OBS): Add new object file.
4753         * unittests/xml-utils-selftests.c: New file.
4754
4755 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4756
4757         * common/selftest.h (selftest): New struct/interface.
4758         (register_test): Add name parameter, add new overload.
4759         (run_tests): Add filter parameter.
4760         (for_each_selftest_ftype): New typedef.
4761         (for_each_selftest): New declaration.
4762         * common/selftest.c (tests): Change type to
4763         map<string, unique_ptr<selftest>>.
4764         (simple_selftest): New struct.
4765         (register_test): New function.
4766         (register_test): Add name parameter and use it.
4767         (run_tests): Add filter parameter and use it.  Add prints.
4768         Adjust to vector -> map change.
4769         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
4770         registering selftests.
4771         * arm-tdep.c (_initialize_arm_tdep): Likewise.
4772         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
4773         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
4774         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
4775         * findvar.c (_initialize_findvar): Likewise.
4776         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
4777         * maint.c (maintenance_selftest): Update call to run_tests.
4778         (maintenance_info_selftests): New function.
4779         (_initialize_maint_cmds): Register "maintenance info selftests"
4780         command.  Update "maintenance selftest" doc.
4781         * regcache.c (_initialize_regcache): Add names when registering
4782         selftests.
4783         * rust-exp.y (_initialize_rust_exp): Likewise.
4784         * selftest-arch.c (gdbarch_selftest): New struct.
4785         (gdbarch_tests): Remove.
4786         (register_test_foreach_arch): Add name parameter.  Call
4787         register_test.
4788         (tests_with_arch): Remove, move most content to
4789         gdbarch_selftest::operator().
4790         (_initialize_selftests_foreach_arch): Remove.
4791         * selftest-arch.h (register_test_foreach_arch): Add name
4792         parameter.
4793         (run_tests_with_arch): New declaration.
4794         * utils-selftests.c (_initialize_utils_selftests): Add names
4795         when registering selftests.
4796         * utils.c (_initialize_utils): Likewise.
4797         * unittests/array-view-selftests.c
4798         (_initialize_array_view_selftests): Likewise.
4799         * unittests/environ-selftests.c (_initialize_environ_selftests):
4800         Likewise.
4801         * unittests/function-view-selftests.c
4802         (_initialize_function_view_selftests): Likewise.
4803         * unittests/offset-type-selftests.c
4804         (_initialize_offset_type_selftests): Likewise.
4805         * unittests/optional-selftests.c
4806         (_initialize_optional_selftests): Likewise.
4807         * unittests/scoped_restore-selftests.c
4808         (_initialize_scoped_restore_selftests): Likewise.
4809         * NEWS: Document "maintenance selftest" and "maint info
4810         selftests".
4811
4812 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4813
4814         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
4815         scoped_restore.
4816
4817 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4818
4819         * mi/mi-main.c (mi_load_progress): Make uiout variable
4820         a unique_ptr.
4821
4822 2017-09-15  Pedro Alves  <palves@redhat.com>
4823
4824         * compile/compile-c-types.c (convert_enum, convert_int)
4825         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
4826
4827 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
4828
4829         * dwarf2read.c (copy_string): Remove.
4830         (parse_macro_definition): Replace copy_string with savestring.
4831
4832 2017-09-15  Yao Qi  <yao.qi@linaro.org>
4833
4834         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
4835         gdb_target_obs.
4836         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
4837         Likewise.
4838         (i[34567]86-*-linux*): Likewise.
4839
4840 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4841
4842         * dwarf2expr.h (dwarf_stack_value): Add constructor.
4843         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
4844         <stack>: Change type to std::vector.
4845         <stack_len, stack_allocated>: Remove.
4846         <grow_stack>: Remove.
4847         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4848         (dwarf_expr_context::~dwarf_expr_context): Remove.
4849         (dwarf_expr_context::grow_stack): Remove.
4850         (dwarf_expr_context::push): Adjust.
4851         (dwarf_expr_context::pop): Adjust.
4852         (dwarf_expr_context::fetch): Adjust.
4853         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
4854         (dwarf_expr_context::stack_empty_p): Adjust.
4855         (dwarf_expr_context::execute_stack_op): Adjust.
4856
4857 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4858
4859         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
4860         return type to bool.
4861         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
4862
4863 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4864
4865         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
4866         Change type to bool.
4867         (dwarf_stack_value) <in_stack_memory>: Likewise.
4868         (dwarf_expr_context) <push_address>: Change parameter type to
4869         bool.
4870         <fetch_in_stack_memory>: Change return type to bool.
4871         <push>: Change parameter type to bool.
4872         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
4873         to bool.
4874         (dwarf_expr_context::push_address): Likewise.
4875         (dwarf_expr_context::fetch_in_stack_memory): Change return type
4876         to bool.
4877         (dwarf_expr_context::execute_stack_op): Adjust.
4878         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
4879
4880 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4881
4882         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
4883         (struct dwarf_expr_context) <n_pieces>: Remove.
4884         <pieces>: Change type to std::vector.
4885         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4886         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
4887         pieces.
4888         (dwarf_expr_context::add_piece): Adjust.
4889         * dwarf2loc.c (struct piece_closure): Initialize fields.
4890         <n_pieces>: Remove.
4891         <pieces>: Change type to std::vector.
4892         (allocate_piece_closure): Adjust, change parameter to
4893         std::vector rvalue and std::move it to piece_closure.
4894         (rw_pieced_value): Adjust.
4895         (check_pieced_synthetic_pointer): Adjust.
4896         (indirect_synthetic_pointer): Adjust.
4897         (coerce_pieced_ref): Adjust.
4898         (free_pieced_value_closure):  Adjust.  Use delete to free
4899         piece_closure.
4900         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
4901         to allocate_piece_closure.
4902         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
4903
4904 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4905
4906         * probe.h (probe_ops_cp): Remove typedef.
4907         (DEF_VEC_P (probe_ops_cp)): Remove.
4908         (all_probe_ops): Change type to std::vector.
4909         * probe.c (info_probes_for_ops): Adjust to vector change.
4910         (probe_linespec_to_ops): Likewise.
4911         (all_probe_ops): Change type to std::vector.
4912         (_initialize_probe): Adjust to vector change.
4913         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
4914         * elfread.c (elf_get_probes): Likewise.
4915         * stap-probe.c (_initialize_stap_probe): Likewise.
4916
4917 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4918
4919         * probe.h (struct bound_probe): Define constructors.
4920         * probe.c (bound_probe_s): Remove typedef.
4921         (DEF_VEC_O (bound_probe_s)): Remove VEC.
4922         (collect_probes): Change return type to std::vector, remove
4923         cleanup.
4924         (compare_probes): Return bool, change parameter type.  Change
4925         semantic to "less than".
4926         (gen_ui_out_table_header_info): Change parameter to std::vector
4927         and update.
4928         (exists_probe_with_pops): Likewise.
4929         (info_probes_for_ops): Update to std::vector change.
4930         (enable_probes_command): Likewise.
4931         (disable_probes_command): Likewise.
4932
4933 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4934
4935         * probe.h (struct probe_ops) <get_probes>: Change parameter from
4936         vec to std::vector.
4937         * probe.c (parse_probes_in_pspace): Update.
4938         (find_probes_in_objfile): Update.
4939         (find_probe_by_pc): Update.
4940         (collect_probes): Update.
4941         (probe_any_get_probes): Update.
4942         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
4943         return type to reference to std::vector.
4944         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
4945         std::vector and update.
4946         (dtrace_process_dof): Likewise.
4947         (dtrace_get_probes): Likewise.
4948         * elfread.c (elf_get_probes): Change return type to std::vector,
4949         store an std::vector in bfd_data.
4950         (probe_key_free): Update to std::vector.
4951         * stap-probe.c (handle_stap_probe): Change parameter to
4952         std::vector and update.
4953         (stap_get_probes): Likewise.
4954         * symfile-debug.c (debug_sym_get_probes): Change return type to
4955         std::vector and update.
4956
4957 2017-09-11  Tom Tromey  <tom@tromey.com>
4958
4959         * breakpoint.c (program_breakpoint_here_p): Update.
4960         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
4961         from make_show_memory_breakpoints_cleanup.  Return a
4962         scoped_restore_tmpl<int>.
4963         (restore_show_memory_breakpoints): Remove.
4964         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
4965         * mem-break.c (memory_validate_breakpoint): Update.
4966         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
4967         (ia64_memory_remove_breakpoint): Update.
4968         (ia64_breakpoint_from_pc): Update.
4969         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
4970         from make_show_memory_breakpoints_cleanup.
4971
4972 2017-09-11  Tom Tromey  <tom@tromey.com>
4973
4974         * d-namespace.c (d_lookup_symbol): Use std::string.
4975         (find_symbol_in_baseclass): Likewise.
4976
4977 2017-09-11  Tom Tromey  <tom@tromey.com>
4978
4979         * ctf.c (ctf_start): Use std::string.
4980
4981 2017-09-11  Tom Tromey  <tom@tromey.com>
4982
4983         * ada-lang.c (is_known_support_routine): Update.
4984         (ada_unhandled_exception_name_addr_from_raise): Update.
4985         * guile/scm-frame.c (gdbscm_frame_name): Update.
4986         * python/py-frame.c (frapy_name): Update.
4987         (frapy_function): Update.
4988         * stack.h (find_frame_funname): Update.
4989         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
4990         (print_frame): Update.
4991
4992 2017-09-11  Tom Tromey  <tom@tromey.com>
4993
4994         * findcmd.c (put_bits): Take a gdb::byte_vector.
4995         (parse_find_args): Return gdb::byte_vector.  "args" now const.
4996         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
4997         cleanups.
4998         (find_command): Update.
4999
5000 2017-09-11  Tom Tromey  <tom@tromey.com>
5001
5002         * cli/cli-script.c (class scoped_restore_hook_in): New.
5003         (clear_hook_in_cleanup): Remove.
5004         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5005         scoped_restore_hook_in.
5006
5007 2017-09-11  Tom Tromey  <tom@tromey.com>
5008
5009         * cli/cli-script.c (restore_interp): Remove.
5010         (read_command_lines): Use scoped_restore_interp.
5011         * interps.c (scoped_restore_interp::set_temp): Rename from
5012         interp_set_temp.
5013         * interps.h (class scoped_restore_interp): New.
5014         (interp_set_temp): Remove.
5015
5016 2017-09-11  Tom Tromey  <tom@tromey.com>
5017
5018         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5019         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5020         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5021         scoped_restore.
5022         (mi_cmd_break_insert_1): Update.
5023         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5024         scoped_restore.
5025
5026 2017-09-11  Tom Tromey  <tom@tromey.com>
5027
5028         * demangle.c (demangle_command): Update.
5029         * breakpoint.c (disable_command): Update.
5030         (enable_command): Update.
5031         (find_location_by_number): Make "number" const.  Use
5032         get_number_trailer.
5033         * cli/cli-utils.c (extract_arg): Return std::string.
5034         * probe.c (parse_probe_linespec): Update.  Change types.
5035         (collect_probes): Take string arguments.
5036         (parse_probe_linespec): Likewise.
5037         (info_probes_for_ops): Update.
5038         (enable_probes_command): Update.
5039         (disable_probes_command): Update.
5040         * break-catch-sig.c (catch_signal_split_args): Update.
5041         * mi/mi-parse.c (mi_parse): Update.
5042
5043 2017-09-11  Tom Tromey  <tom@tromey.com>
5044
5045         * language.h (language_enum): Make argument const.
5046         * language.c (language_enum): Make argument const.
5047
5048 2017-09-11  Tom Tromey  <tom@tromey.com>
5049
5050         * common/common-utils.h (skip_to_space): Remove macro, redeclare
5051         as function.
5052         (skip_to_space): Rename from skip_to_space_const.
5053         * common/common-utils.c (skip_to_space): New function.
5054         (skip_to_space): Rename from skip_to_space_const.
5055         * cli/cli-utils.h (get_number): Rename from get_number_const.
5056         (extract_arg): Rename from extract_arg_const.
5057         * cli/cli-utils.c (get_number): Rename from get_number_const.
5058         (extract_arg): Rename from extract_arg_const.
5059         (number_or_range_parser::get_number): Use ::get_number.
5060         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5061         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5062         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5063         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5064         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5065         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5066         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5067         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5068
5069 2017-09-11  Tom Tromey  <tom@tromey.com>
5070
5071         * python/python.c (do_start_initialization): Use
5072         py-event-types.def to initialize types.
5073         Define all object type structures.
5074         * python/python-internal.h: Don't declare event initialization
5075         functions.
5076         * python/py-threadevent.c (thread_event_object_type): Don't
5077         define.
5078         * python/py-stopevent.c (stop_event_object_type): Don't define.
5079         * python/py-signalevent.c (signal_event_object_type): Don't
5080         declare or define.
5081         * python/py-newobjfileevent.c (new_objfile_event_object_type)
5082         (clear_objfiles_event_object_type): Don't declare or define.
5083         * python/py-infevents.c (inferior_call_pre_event_object_type)
5084         (inferior_call_post_event_object_type)
5085         (register_changed_event_object_type)
5086         (memory_changed_event_object_type): Don't declare or define.
5087         * python/py-inferior.c (new_thread_event_object_type)
5088         (new_inferior_event_object_type)
5089         (inferior_deleted_event_object_type): Don't declare or define.
5090         * python/py-exitedevent.c (exited_event_object_type): Don't
5091         declare or define.
5092         * python/py-evts.c (gdbpy_initialize_py_events): Use
5093         py-all-events.def.
5094         * python/py-events.h (thread_event_object_type): Don't declare.
5095         (events_object): Use py-all-events.def.
5096         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
5097         py-event-types.def.
5098         * python/py-event-types.def: New file.
5099         * python/py-continueevent.c (create_continue_event_object): Don't
5100         declare or define.
5101         * python/py-bpevent.c (breakpoint_event_object_type): Don't
5102         declare or define.
5103         * python/py-all-events.def: New file.
5104
5105 2017-09-11  Tom Tromey  <tom@tromey.com>
5106
5107         * python/py-threadevent.c (create_thread_event_object): Return
5108         gdbpy_ref.
5109         * python/py-stopevent.h (create_stop_event_object)
5110         (create_breakpoint_event_object, create_signal_event_object):
5111         Update.
5112         * python/py-stopevent.c (create_stop_event_object): Return
5113         gdbpy_ref.
5114         (emit_stop_event): Update.
5115         * python/py-signalevent.c (create_signal_event_object): Return
5116         gdbpy_ref.
5117         * python/py-infevents.c (create_inferior_call_event_object):
5118         Update.
5119         * python/py-event.h (create_event_object)
5120         (create_thread_event_object): Update.
5121         * python/py-event.c (create_event_object): Return gdbpy_ref.
5122         * python/py-continueevent.c: Return gdbpy_ref.
5123         * python/py-bpevent.c (create_breakpoint_event_object): Return
5124         gdbpy_ref.
5125
5126 2017-09-11  Tom Tromey  <tom@tromey.com>
5127
5128         PR python/15622:
5129         * NEWS: Add entry.
5130         * python/python.c (do_start_initialization): Initialize new event
5131         types.
5132         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5133         (gdbpy_initialize_inferior_deleted_event)
5134         (gdbpy_initialize_new_thread_event): Declare.
5135         * python/py-threadevent.c (create_thread_event_object): Add option
5136         "thread" parameter.
5137         * python/py-inferior.c (new_thread_event_object_type)
5138         (new_inferior_event_object_type)
5139         (inferior_deleted_event_object_type): Declare.
5140         (python_new_inferior, python_inferior_deleted): New functions.
5141         (add_thread_object): Emit new_thread event.
5142         (gdbpy_initialize_inferior): Attach new functions to corresponding
5143         observers.
5144         (new_thread, new_inferior, inferior_deleted): Define new event
5145         types.
5146         * python/py-evts.c (gdbpy_initialize_py_events): Add new
5147         registries.
5148         * python/py-events.h (events_object) <new_inferior,
5149         inferior_deleted, new_thread>: New fields.
5150         * python/py-event.h (create_thread_event_breakpoint): Add optional
5151         "thread" parameter.
5152
5153 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5154
5155         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5156         check current_ui instead.
5157         (internal_vproblem): Likewise.
5158
5159 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
5160
5161         * thread.c (print_thread_info_1): Remove unnecessary calls to
5162         uiout->is_mi_like_p.
5163
5164 2017-09-09  Tom Tromey  <tom@tromey.com>
5165
5166         * namespace.h (add_using_directive): Update.
5167         * namespace.c (add_using_directive): Change type of excludes to
5168         std::vector.
5169         * dwarf2read.c (read_import_statement): Use std::vector.
5170         (read_namespace): Update.
5171         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5172
5173 2017-09-09  Tom Tromey  <tom@tromey.com>
5174
5175         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5176
5177 2017-09-09  Tom Tromey  <tom@tromey.com>
5178
5179         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5180
5181 2017-09-09  Tom Tromey  <tom@tromey.com>
5182
5183         * stack.c (func_command): Use gdb::def_vector.
5184
5185 2017-09-09  Tom Tromey  <tom@tromey.com>
5186
5187         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5188         ui_out_emit_list, ui_out_emit_tuple.
5189         (mi_cmd_var_update): Likewise.
5190
5191 2017-09-09  Tom Tromey  <tom@tromey.com>
5192
5193         * mi/mi-interp.c (mi_user_selected_context_changed): Use
5194         ui_out_redirect_pop.
5195         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5196         ui_out_redirect_pop.
5197         * utils.c (do_ui_out_redirect_pop)
5198         (make_cleanup_ui_out_redirect_pop): Remove.
5199         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5200         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5201         * ui-out.h (ui_out_redirect_pop): New class.
5202
5203 2017-09-09  Tom Tromey  <tom@tromey.com>
5204
5205         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5206         (list_available_thread_groups, mi_cmd_list_thread_groups)
5207         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5208         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5209         Likewise.
5210
5211 2017-09-09  Tom Tromey  <tom@tromey.com>
5212
5213         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5214         ui_out_emit_tuple.
5215
5216 2017-09-09  Tom Tromey  <tom@tromey.com>
5217
5218         * target.c (flash_erase_command): Use ui_out_emit_tuple.
5219         * stack.c (print_frame): Use ui_out_emit_tuple.
5220         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5221         (info_spu_mailbox_command, info_spu_dma_command)
5222         (info_spu_proxydma_command): Likewise.
5223         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5224         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5225         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5226         ui_out_emit_tuple.
5227         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5228
5229 2017-09-09  Tom Tromey  <tom@tromey.com>
5230
5231         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5232         (class ui_out_emit_table): Update comment.
5233         * ui-out.c (do_cleanup_table_end)
5234         (make_cleanup_ui_out_table_begin_end): Remove.
5235         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5236         (info_spu_dma_cmdlist): Likewise.
5237         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5238         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5239         ui_out_emit_table.
5240
5241 2017-09-09  Tom Tromey  <tom@tromey.com>
5242
5243         * thread.c (print_thread_info_1): Use ui_out_emit_table,
5244         ui_out_emit_list, gdb::optional.
5245
5246 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
5247
5248         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5249         prototype.
5250         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5251         prototype.
5252         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5253         prototype.
5254         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5255         * ada-exp.y: Remove _initialize_ada_exp prototype.
5256         * ada-lang.c: Remove _initialize_ada_language prototype.
5257         * ada-tasks.c: Remove _initialize_tasks prototype.
5258         * addrmap.c: Remove _initialize_addrmap prototype.
5259         * agent.c: Remove _initialize_agent prototype.
5260         * aix-thread.c: Remove _initialize_aix_thread prototype.
5261         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5262         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5263         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5264         prototype.
5265         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5266         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5267         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5268         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5269         prototype.
5270         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5271         prototype.
5272         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5273         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5274         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5275         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5276         prototype.
5277         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5278         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5279         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5280         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5281         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5282         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5283         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5284         prototype.
5285         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5286         prototype.
5287         * annotate.c: Remove _initialize_annotate prototype.
5288         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5289         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5290         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5291         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5292         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5293         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5294         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5295         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5296         prototype.
5297         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5298         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5299         * auto-load.c: Remove _initialize_auto_load prototype.
5300         * auxv.c: Remove _initialize_auxv prototype.
5301         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5302         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5303         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5304         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5305         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5306         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5307         prototype.
5308         * break-catch-throw.c: Remove _initialize_break_catch_throw
5309         prototype.
5310         * breakpoint.c: Remove _initialize_breakpoint prototype.
5311         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5312         * btrace.c: Remove _initialize_btrace prototype.
5313         * charset.c: Remove _initialize_charset prototype.
5314         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5315         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5316         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5317         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5318         * cli/cli-script.c: Remove _initialize_cli_script prototype.
5319         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5320         * coffread.c: Remove _initialize_coffread prototype.
5321         * compile/compile.c: Remove _initialize_compile prototype.
5322         * complaints.c: Remove _initialize_complaints prototype.
5323         * completer.c: Remove _initialize_completer prototype.
5324         * copying.awk: Remove _initialize_copying prototype.
5325         * copying.c: Regenerate.
5326         * core-regset.c: Remove _initialize_core_regset prototype.
5327         * corefile.c: Remove _initialize_core prototype.
5328         * corelow.c: Remove _initialize_corelow prototype.
5329         * cp-abi.c: Remove _initialize_cp_abi prototype.
5330         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5331         * cp-support.c: Remove _initialize_cp_support prototype.
5332         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5333         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5334         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5335         * ctf.c: Remove _initialize_ctf prototype.
5336         * d-lang.c: Remove _initialize_d_language prototype.
5337         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5338         prototype.
5339         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5340         * dbxread.c: Remove _initialize_dbxread prototype.
5341         * dcache.c: Remove _initialize_dcache prototype.
5342         * demangle.c: Remove _initialize_demangler prototype.
5343         * disasm-selftests.c: Remove _initialize_disasm_selftests
5344         prototype.
5345         * disasm.c: Remove _initialize_disasm prototype.
5346         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5347         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5348         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5349         prototype.
5350         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5351         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5352         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5353         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5354         * elfread.c: Remove _initialize_elfread prototype.
5355         * exec.c: Remove _initialize_exec prototype.
5356         * extension.c: Remove _initialize_extension prototype.
5357         * f-lang.c: Remove _initialize_f_language prototype.
5358         * f-valprint.c: Remove _initialize_f_valprint prototype.
5359         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5360         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5361         * filesystem.c: Remove _initialize_filesystem prototype.
5362         * findcmd.c: Remove _initialize_mem_search prototype.
5363         * fork-child.c: Remove _initialize_fork_child prototype.
5364         * frame-base.c: Remove _initialize_frame_base prototype.
5365         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5366         * frame.c: Remove _initialize_frame prototype.
5367         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5368         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5369         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5370         * gcore.c: Remove _initialize_gcore prototype.
5371         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5372         * gdbarch.c: Regenerate.
5373         * gdbarch.sh: Remove _initialize_gdbarch prototype.
5374         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5375         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5376         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5377         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5378         * go-lang.c: Remove _initialize_go_language prototype.
5379         * go32-nat.c: Remove _initialize_go32_nat prototype.
5380         * guile/guile.c: Remove _initialize_guile prototype.
5381         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5382         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5383         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5384         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5385         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5386         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5387         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5388         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5389         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5390         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5391         prototype.
5392         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5393         prototype.
5394         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5395         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5396         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5397         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5398         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5399         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5400         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5401         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5402         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5403         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5404         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5405         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5406         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5407         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5408         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5409         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5410         prototype.
5411         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5412         prototype.
5413         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5414         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5415         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5416         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5417         * infcall.c: Remove _initialize_infcall prototype.
5418         * infcmd.c: Remove _initialize_infcmd prototype.
5419         * inferior.c: Remove _initialize_inferiors prototype.
5420         * inflow.c: Remove _initialize_inflow prototype.
5421         * infrun.c: Remove _initialize_infrun prototype.
5422         * interps.c: Remove _initialize_interpreter prototype.
5423         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5424         * jit.c: Remove _initialize_jit prototype.
5425         * language.c: Remove _initialize_language prototype.
5426         * linux-fork.c: Remove _initialize_linux_fork prototype.
5427         * linux-nat.c: Remove _initialize_linux_nat prototype.
5428         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5429         * linux-thread-db.c: Remove _initialize_thread_db prototype.
5430         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5431         * m2-lang.c: Remove _initialize_m2_language prototype.
5432         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5433         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5434         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5435         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5436         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5437         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5438         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5439         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5440         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5441         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5442         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5443         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5444         * machoread.c: Remove _initialize_machoread prototype.
5445         * macrocmd.c: Remove _initialize_macrocmd prototype.
5446         * macroscope.c: Remove _initialize_macroscope prototype.
5447         * maint.c: Remove _initialize_maint_cmds prototype.
5448         * mdebugread.c: Remove _initialize_mdebugread prototype.
5449         * memattr.c: Remove _initialize_mem prototype.
5450         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5451         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5452         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5453         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5454         * mi/mi-main.c: Remove _initialize_mi_main prototype.
5455         * microblaze-linux-tdep.c: Remove
5456         _initialize_microblaze_linux_tdep prototype.
5457         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5458         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5459         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5460         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5461         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5462         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5463         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5464         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5465         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5466         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5467         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5468         prototype.
5469         * mipsread.c: Remove _initialize_mipsread prototype.
5470         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5471         prototype.
5472         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5473         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5474         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5475         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5476         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5477         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5478         prototype.
5479         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5480         * nto-procfs.c: Remove _initialize_procfs prototype.
5481         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5482         * objc-lang.c: Remove _initialize_objc_language prototype.
5483         * objfiles.c: Remove _initialize_objfiles prototype.
5484         * observer.c: Remove observer_test_first_notification_function,
5485         observer_test_second_notification_function,
5486         observer_test_third_notification_function, and
5487         _initialize_observer prototypes.
5488         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5489         * osabi.c: Remove _initialize_gdb_osabi prototype.
5490         * osdata.c: Remove _initialize_osdata prototype.
5491         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5492         * parse.c: Remove _initialize_parse prototype.
5493         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5494         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5495         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5496         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5497         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5498         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5499         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5500         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5501         * printcmd.c: Remove _initialize_printcmd prototype.
5502         * probe.c: Remove _initialize_probe prototype.
5503         * proc-api.c: Remove _initialize_proc_api prototype.
5504         * proc-events.c: Remove _initialize_proc_events prototype.
5505         * proc-service.c: Remove _initialize_proc_service prototype.
5506         * procfs.c: Remove _initialize_procfs prototype.
5507         * psymtab.c: Remove _initialize_psymtab prototype.
5508         * python/python.c: Remove _initialize_python prototype.
5509         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5510         * record-btrace.c: Remove _initialize_record_btrace prototype.
5511         * record-full.c: Remove _initialize_record_full prototype.
5512         * record.c: Remove _initialize_record prototype.
5513         * regcache.c: Remove _initialize_regcache prototype.
5514         * reggroups.c: Remove _initialize_reggroup prototype.
5515         * remote-notif.c: Remove _initialize_notif prototype.
5516         * remote-sim.c: Remove _initialize_remote_sim prototype.
5517         * remote.c: Remove _initialize_remote prototype.
5518         * reverse.c: Remove _initialize_reverse prototype.
5519         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5520         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5521         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5522         prototype.
5523         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5524         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5525         * rust-exp.y: Remove _initialize_rust_exp prototype.
5526         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5527         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5528         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5529         * score-tdep.c: Remove _initialize_score_tdep prototype.
5530         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5531         prototype.
5532         * ser-go32.c: Remove _initialize_ser_dos prototype.
5533         * ser-mingw.c: Remove _initialize_ser_windows prototype.
5534         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5535         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5536         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5537         * serial.c: Remove _initialize_serial prototype.
5538         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5539         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5540         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5541         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5542         * skip.c: Remove _initialize_step_skip prototype.
5543         * sol-thread.c: Remove _initialize_sol_thread prototype.
5544         * solib-aix.c: Remove _initialize_solib_aix prototype.
5545         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5546         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5547         * solib-frv.c: Remove _initialize_frv_solib prototype.
5548         * solib-spu.c: Remove _initialize_spu_solib prototype.
5549         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5550         * solib-target.c: Remove _initialize_solib_target prototype.
5551         * solib.c: Remove _initialize_solib prototype.
5552         * source.c: Remove _initialize_source prototype.
5553         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5554         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5555         prototype.
5556         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5557         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5558         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5559         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5560         prototype.
5561         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5562         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5563         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5564         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5565         prototype.
5566         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5567         prototype.
5568         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5569         prototype.
5570         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5571         prototype.
5572         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5573         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5574         prototype.
5575         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5576         prototype.
5577         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5578         prototype.
5579         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5580         prototype.
5581         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5582         prototype.
5583         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5584         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5585         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5586         * stabsread.c: Remove _initialize_stabsread prototype.
5587         * stack.c: Remove _initialize_stack prototype.
5588         * stap-probe.c: Remove _initialize_stap_probe prototype.
5589         * std-regs.c: Remove _initialize_frame_reg prototype.
5590         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5591         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5592         * symfile.c: Remove _initialize_symfile prototype.
5593         * symmisc.c: Remove _initialize_symmisc prototype.
5594         * symtab.c: Remove _initialize_symtab prototype.
5595         * target-dcache.c: Remove _initialize_target_dcache prototype.
5596         * target-descriptions.c: Remove _initialize_target_descriptions
5597         prototype.
5598         * thread.c: Remove _initialize_thread prototype.
5599         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5600         prototype.
5601         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5602         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5603         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5604         prototype.
5605         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5606         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5607         * tracefile.c: Remove _initialize_tracefile prototype.
5608         * tracepoint.c: Remove _initialize_tracepoint prototype.
5609         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5610         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5611         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5612         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5613         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5614         * tui/tui-win.c: Remove _initialize_tui_win prototype.
5615         * tui/tui.c: Remove _initialize_tui prototype.
5616         * typeprint.c: Remove _initialize_typeprint prototype.
5617         * user-regs.c: Remove _initialize_user_regs prototype.
5618         * utils.c: Remove _initialize_utils prototype.
5619         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5620         * valarith.c: Remove _initialize_valarith prototype.
5621         * valops.c: Remove _initialize_valops prototype.
5622         * valprint.c: Remove _initialize_valprint prototype.
5623         * value.c: Remove _initialize_values prototype.
5624         * varobj.c: Remove _initialize_varobj prototype.
5625         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5626         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5627         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5628         * windows-nat.c: Remove _initialize_windows_nat,
5629         _initialize_check_for_gdb_ini, and _initialize_loadable
5630         prototypes.
5631         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5632         * xcoffread.c: Remove _initialize_xcoffread prototype.
5633         * xml-support.c: Remove _initialize_xml_support prototype.
5634         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5635         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5636         prototype.
5637         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5638         prototype.
5639         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5640
5641 2017-09-08  Keith Seitz  <keiths@redhat.com>
5642
5643         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5644         field.
5645
5646 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
5647
5648         * f-valprint.c (f_val_print): Remove check for one byte
5649         sized integers. Remove printing of character type.
5650
5651 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
5652             Christoph Weinmann  <christoph.t.weinmann@intel.com>
5653             Bernhard Heckel  <bernhard.heckel@intel.com>
5654
5655         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5656         to maintain proper indentation when printing pointers/refs.
5657
5658 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5659
5660         GDB 8.0.1 released.
5661
5662 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5663
5664         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
5665
5666 2017-09-05  Tom Tromey  <tom@tromey.com>
5667
5668         * parse.c (funcall_chain): Now a std::vector.
5669         (start_arglist, end_arglist): Simplify.
5670         (free_funcalls): Remove.
5671         (parse_exp_in_context_1): Remove cleanup.
5672
5673 2017-09-05  Tom Tromey  <tom@tromey.com>
5674
5675         * go-exp.y (go_parse): Don't create a cleanup.
5676
5677 2017-09-05  Tom Tromey  <tom@tromey.com>
5678
5679         * d-exp.y (PrimaryExpression): Use std::string.
5680         (d_parse): Don't create a cleanup.
5681
5682 2017-09-05  Tom Tromey  <tom@tromey.com>
5683
5684         * utils.c (do_clear_parser_state): Remove.
5685         (make_cleanup_clear_parser_state): Remove.
5686         * p-exp.y (pascal_parse): Use scoped_restore.
5687         * m2-exp.y (m2_parse): Use scoped_restore.
5688         * f-exp.y (f_parse): Use scoped_restore.
5689         * d-exp.y (d_parse): Use scoped_restore.
5690         * c-exp.y (c_parse): Use scoped_restore.
5691         * ada-exp.y (ada_parse): Use scoped_restore.
5692         * utils.h (make_cleanup_clear_parser_state): Remove.
5693
5694 2017-09-06  Keith Seitz  <keiths@redhat.com>
5695
5696         * dwarf2read.c (dw2_linkage_name_attr): New function.
5697         (dw2_linkage_name): New function.
5698         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
5699         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
5700         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
5701
5702 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5703
5704         * config/djgpp/djconfig.sh: Correct shell portability issue.
5705
5706 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5707
5708         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
5709
5710 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5711
5712         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
5713         * NEWS: Mention new FreeBSD/mips native configuration.
5714         * configure.host: Add aarch64*-*-freebsd*.
5715         * configure.nat: Likewise.
5716         * aarch64-fbsd-nat.c: New file.
5717
5718 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5719
5720         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
5721         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
5722         * NEWS: Mention new FreeBSD/aarch64 target.
5723         * configure.tgt: Add aarch64*-*-freebsd*.
5724         * aarch64-fbsd-tdep.c: New file.
5725         * aarch64-fbsd-tdep.h: New file.
5726
5727 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5728
5729         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
5730
5731 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
5732
5733         * parse.c (find_minsym_type_and_address): Don't relocate addresses
5734         of TLS symbols.
5735
5736 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5737
5738         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
5739         call.
5740
5741 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5742
5743         * infrun.c (follow_exec): Call add_thread after
5744         target_find_description.
5745
5746 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5747
5748         * infrun.c (handle_inferior_event_1): When exec'ing, read
5749         stop_pc after follow_exec.
5750
5751 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5752
5753         * remote.c (process_g_packet): Update error message.
5754
5755 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5756
5757         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
5758         targets.
5759
5760 2017-09-05  Pedro Alves  <palves@redhat.com>
5761
5762         * eval.c (eval_call, evaluate_funcall): New functions, factored
5763         out from ...
5764         (evaluate_subexp_standard): ... this.
5765
5766 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5767
5768         * amd64-tdep.c (amd64_target_description): Create target
5769         descriptions.
5770         (_initialize_amd64_tdep): Don't call functions
5771         initialize_tdesc_amd64_*.  Add self tests.
5772         * arch/amd64.c (amd64_create_target_description): Add parameter
5773         is_linux.  Call set_tdesc_osabi if is_linux is true.
5774         * arch/amd64.h (amd64_create_target_description): Update the
5775         declaration.
5776         * arch/i386.c (i386_create_target_description): Add parameter
5777         is_linux.  Call set_tdesc_osabi if is_linux is true.
5778         * arch/i386.h (i386_create_target_description): Update
5779         declaration.
5780         * configure.tgt: Add i386.o to gdb_target_obs.
5781         * features/Makefile (XMLTOC): Remove i386/*.xml.
5782         * features/i386/amd64-avx-avx512.c: Remove.
5783         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
5784         * features/i386/amd64-avx-mpx.c: Remove.
5785         * features/i386/amd64-avx.c: Remove.
5786         * features/i386/amd64-mpx.c: Remove.
5787         * features/i386/amd64.c: Remove.
5788         * features/i386/i386-avx-avx512.c: Remove.
5789         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
5790         * features/i386/i386-avx-mpx.c: Remove.
5791         * features/i386/i386-avx.c: Remove.
5792         * features/i386/i386-mmx.c: Remove.
5793         * features/i386/i386-mpx.c: Remove.
5794         * features/i386/i386.c: Remove.
5795         * i386-tdep.c: Don't include features/i386/i386*.c., include
5796         target-descriptions.h and arch/i386.h.
5797         (i386_target_description): Create target descriptions.
5798         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
5799         functions.  Do self tests.
5800
5801 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5802
5803         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
5804         * features/i386/amd64-avx-avx512-linux.c: Removed.
5805         * features/i386/amd64-avx-linux.c: Removed.
5806         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
5807         * features/i386/amd64-avx-mpx-linux.c: Removed.
5808         * features/i386/amd64-linux.c: Removed.
5809         * features/i386/amd64-mpx-linux.c: Removed.
5810         * features/i386/x32-avx-avx512-linux.c: Removed.
5811         * features/i386/x32-avx-linux.c: Removed.
5812         * features/i386/x32-linux.c: Removed.
5813
5814 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5815
5816         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
5817         features/i386/*.c.
5818         (amd64_linux_read_description): Call
5819         amd64_create_target_description.
5820         * arch/amd64.c: New file.
5821         * arch/amd64.h: New file.
5822         * configure.tgt (x86_64-*-linux*): Append amd64.o.
5823         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
5824
5825 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5826
5827         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
5828         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
5829         (amd64_linux_read_description): Create target descriptions.
5830         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
5831         functions.  Add unit tests.
5832         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
5833         x32-core.xml.
5834         * features/i386/64bit-avx.c: Generated.
5835         * features/i386/64bit-avx512.c: Generated.
5836         * features/i386/64bit-core.c: Generated.
5837         * features/i386/64bit-linux.c: Generated.
5838         * features/i386/64bit-mpx.c: Generated.
5839         * features/i386/64bit-pkeys.c: Generated.
5840         * features/i386/64bit-segments.c: Generated.
5841         * features/i386/64bit-sse.c: Generated.
5842         * features/i386/x32-core.c: Generated.
5843         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
5844         c files for amd64-linux and x32-linux.
5845
5846 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5847
5848         * amd64-linux-tdep.c (amd64_linux_read_description): New
5849         function.
5850         (amd64_linux_core_read_description): Call
5851         amd64_linux_read_description.
5852         (amd64_linux_init_abi): Likewise.
5853         (amd64_x32_linux_init_abi): Likewise.
5854         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
5855         * x86-linux-nat.c (x86_linux_read_description): Call
5856         amd64_linux_read_description.
5857
5858 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5859
5860         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
5861         comments.
5862
5863 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5864
5865         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
5866         * features/i386/i386-avx-avx512-linux.c: Remove.
5867         * features/i386/i386-avx-linux.c: Remove.
5868         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
5869         * features/i386/i386-avx-mpx-linux.c: Remove.
5870         * features/i386/i386-linux.c: Remove.
5871         * features/i386/i386-mmx-linux.c: Remove.
5872         * features/i386/i386-mpx-linux.c: Remove.
5873
5874 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5875
5876         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
5877         (SFILES): Add arch/i386.c.
5878         (HFILES_NO_SRCDIR): Add arch/i386.h.
5879         * arch/i386.c: New file.
5880         * arch/i386.h: New file.
5881         * arch/tdesc.h (allocate_target_description): Declare.
5882         (set_tdesc_architecture): Declare.
5883         (set_tdesc_osabi): Declare.
5884         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
5885         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
5886         include arch/i386.h.
5887         (i386_linux_read_description): Remove code and call
5888         i386_create_target_description.
5889         (set_tdesc_architecture): New function.
5890         (set_tdesc_osabi): New function.
5891         * target-descriptions.h (allocate_target_description): Remove.
5892
5893 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5894
5895         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
5896         * target-descriptions.c (tdesc_create_feature): Likewise, and
5897         adjust code.
5898         * features/i386/32bit-avx.c: Re-generated.
5899         * features/i386/32bit-avx512.c: Re-generated.
5900         * features/i386/32bit-core.c: Re-generated.
5901         * features/i386/32bit-linux.c: Re-generated.
5902         * features/i386/32bit-mpx.c: Re-generated.
5903         * features/i386/32bit-pkeys.c: Re-generated.
5904         * features/i386/32bit-sse.c: Re-generated.
5905
5906 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5907
5908         * regformats/regdef.h (struct reg): Override operator == and !=.
5909
5910 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5911
5912         * arch/tdesc.h: New file.
5913         * regformats/regdat.sh: Generate code using tdesc_create_reg.
5914         * target-descriptions.c: Update comments.
5915         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
5916         declarations.
5917         * features/i386/32bit-avx.c: Re-generated.
5918         * features/i386/32bit-avx512.c: Re-generated.
5919         * features/i386/32bit-core.c: Re-generated.
5920         * features/i386/32bit-linux.c: Re-generated.
5921         * features/i386/32bit-mpx.c: Re-generated.
5922         * features/i386/32bit-pkeys.c: Re-generated.
5923         * features/i386/32bit-sse.c: Re-generated.
5924
5925 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5926
5927         * regformats/regdat.sh: Update generated code.
5928
5929 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5930
5931         * regformats/regdat.sh: Adjust code order.
5932
5933 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5934
5935         * expprint.c (dump_subexp_body_standard): Use constant format
5936         string in fprintf_filtered call.
5937
5938 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5939
5940         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
5941         NetBSD/i386.
5942         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
5943
5944 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5945
5946         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
5947
5948 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5949
5950         * bsd-kvm.o: Define _KMEMUSER.
5951         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
5952         * configure: Regenerate.
5953
5954 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5955
5956         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
5957         * i386-fbsd-nat.c: Likewise.
5958
5959 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5960
5961         * unittests/array-view-selftests.c: Add include of <array>.
5962
5963 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5964
5965         * spu-tdep.c (flush_ea_cache): Add missing argument to
5966         call_function_by_hand.
5967
5968 2017-09-04  Pedro Alves  <palves@redhat.com>
5969
5970         * NEWS (Safer support for debugging with no debug info): New.
5971
5972 2017-09-04  Pedro Alves  <palves@redhat.com>
5973
5974         * c-exp.y (function_method, function_method_void): Add current
5975         instance flags to TYPE_INSTANCE.
5976         * dwarf2read.c (check_modifier): New.
5977         (compute_delayed_physnames): Assert that only C++ adds delayed
5978         physnames.  Mark fn_fields as const/volatile depending on
5979         physname.
5980         * eval.c (make_params): New type_instance_flags parameter.  Use
5981         it as the new type's instance flags.
5982         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
5983         flags element and pass it to make_params.
5984         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
5985         instance flags element.
5986         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
5987         * gdbtypes.h: Include "enum-flags.h".
5988         (type_instance_flags): New enum-flags type.
5989         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
5990         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
5991         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
5992         (follow_type_instance_flags): New function.
5993         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
5994         * parser-defs.h (follow_type_instance_flags): Declare.
5995         * valops.c (value_struct_elt_for_reference): const/volatile must
5996         match too.
5997
5998 2017-09-04  Pedro Alves  <palves@redhat.com>
5999
6000         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6001         function/method scopes; lookup the nested name as a function local
6002         static variable.
6003
6004 2017-09-04  Pedro Alves  <palves@redhat.com>
6005
6006         (%type <voidval>): Add function_method.
6007         * c-exp.y (exp): New production for calls with no arguments.
6008         (function_method, function_method_void_or_typelist): New
6009         productions.
6010         (exp): New production for "method()::static_var".
6011         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6012         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6013         Handle OP_FUNC_STATIC_VAR.
6014         * parse.c (operator_length_standard):
6015         Handle OP_FUNC_STATIC_VAR.
6016
6017 2017-09-04  Pedro Alves  <palves@redhat.com>
6018
6019         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6020         handling.
6021         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6022         Ditto.
6023         * parse.c (operator_length_standard, operator_check_standard):
6024         Ditto.
6025         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6026
6027 2017-09-04  Pedro Alves  <palves@redhat.com>
6028
6029         * ax-gdb.c: Include "typeprint.h".
6030         (gen_expr_for_cast): New function.
6031         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6032         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6033         type is unknown.
6034         * dwarf2read.c (new_symbol_full): Fallback to int instead of
6035         nodebug_data_symbol.
6036         * eval.c: Include "typeprint.h".
6037         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6038         Error out if symbol has unknown type.
6039         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6040         evaluate_subexp_for_cast.
6041         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6042         OP_VAR_MSYM_VALUE.
6043         (evaluate_subexp_for_cast): New function.
6044         * gdbtypes.c (init_nodebug_var_type): New function.
6045         (objfile_type): Use it to initialize types of variables with no
6046         debug info.
6047         * typeprint.c (error_unknown_type): New.
6048         * typeprint.h (error_unknown_type): New declaration.
6049         * compile/compile-c-types.c (convert_type_basic): Handle
6050         TYPE_CODE_ERROR; warn and fallback to int for variables with
6051         unknown type.
6052
6053 2017-09-04  Pedro Alves  <palves@redhat.com>
6054
6055         * eval.c (evaluate_var_value): New function, factored out from ...
6056         (evaluate_subexp_standard): ... here.
6057
6058 2017-09-04  Pedro Alves  <palves@redhat.com>
6059
6060         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6061         Remove useless assignments to 'op'.
6062
6063 2017-09-04  Pedro Alves  <palves@redhat.com>
6064
6065         * eval.c (eval_skip_value): New function.
6066         (evaluate_subexp_standard): Use it.
6067
6068 2017-09-04  Pedro Alves  <palves@redhat.com>
6069
6070         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6071         function name from symbol/minsym and pass it to
6072         error_call_unknown_return_type.
6073
6074 2017-09-04  Pedro Alves  <palves@redhat.com>
6075
6076         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6077         * ax-gdb.c (gen_msym_var_ref): New function.
6078         (gen_expr): Handle OP_VAR_MSYM_VALUE.
6079         * eval.c (evaluate_var_msym_value): New function.
6080         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6081         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6082         to call_function_by_hand.
6083         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6084         Handle OP_VAR_MSYM_VALUE.
6085         (union exp_element) <msymbol>: New field.
6086         * minsyms.h (struct type): Forward declare.
6087         (find_minsym_type_and_address): Declare.
6088         * parse.c (write_exp_elt_msym): New function.
6089         (write_exp_msymbol): Delete, refactored as ...
6090         (find_minsym_type_and_address): ... this new function.
6091         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6092         (operator_length_standard, operator_check_standard): Handle
6093         OP_VAR_MSYM_VALUE.
6094         * std-operator.def (OP_VAR_MSYM_VALUE): New.
6095
6096 2017-09-04  Pedro Alves  <palves@redhat.com>
6097
6098         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6099         TYPE_GNU_IFUNC specially here.  Throw error if return type is
6100         unknown.
6101         * ada-typeprint.c (print_func_type): Handle functions with unknown
6102         return type.
6103         * c-typeprint.c (c_type_print_base): Handle functions and methods
6104         with unknown return type.
6105         * compile/compile-c-symbols.c (convert_symbol_bmsym)
6106         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6107         * compile/compile-c-types.c: Include "objfiles.h".
6108         (convert_func): For functions with unknown return type, warn and
6109         default to int.
6110         * compile/compile-object-run.c (compile_object_run): Adjust call
6111         to call_function_by_hand_dummy.
6112         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6113         call_function_by_hand.
6114         * eval.c (evaluate_subexp_standard): Adjust calls to
6115         call_function_by_hand.  Handle functions and methods with unknown
6116         return type.  Pass expect_type to call_function_by_hand.
6117         * f-typeprint.c (f_type_print_base): Handle functions with unknown
6118         return type.
6119         * gcore.c (call_target_sbrk): Adjust call to
6120         call_function_by_hand.
6121         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6122         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
6123         an integer address type instead of nodebug.
6124         * guile/scm-value.c (gdbscm_value_call): Adjust call to
6125         call_function_by_hand.
6126         * infcall.c (error_call_unknown_return_type): New function.
6127         (call_function_by_hand): New "default_return_type" parameter.
6128         Pass it down.
6129         (call_function_by_hand_dummy): New "default_return_type"
6130         parameter.  Use it instead of defaulting to int.  If there's no
6131         default and the return type is unknown, throw an error.  If
6132         there's a default return type, and the called function has no
6133         debug info, then assume the function is prototyped.
6134         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6135         New "default_return_type" parameter.
6136         (error_call_unknown_return_type): New declaration.
6137         * linux-fork.c (call_lseek): Cast return type of lseek.
6138         (inferior_call_waitpid, checkpoint_command): Adjust calls to
6139         call_function_by_hand.
6140         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6141         calls to call_function_by_hand.
6142         * m2-typeprint.c (m2_procedure): Handle functions with unknown
6143         return type.
6144         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6145         (value_nsstring, print_object_command): Adjust calls to
6146         call_function_by_hand.
6147         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6148         functions with unknown return type.
6149         (pascal_type_print_func_varspec_suffix): New function.
6150         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6151         TYPE_CODE_METHOD>: Use it.
6152         * python/py-value.c (valpy_call): Adjust call to
6153         call_function_by_hand.
6154         * rust-lang.c (rust_evaluate_funcall): Adjust call to
6155         call_function_by_hand.
6156         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6157         call_function_by_hand.
6158         * valops.c (value_allocate_space_in_inferior): Adjust call to
6159         call_function_by_hand.
6160         * typeprint.c (type_print_unknown_return_type): New function.
6161         * typeprint.h (type_print_unknown_return_type): New declaration.
6162
6163 2017-09-04  Pedro Alves  <palves@redhat.com>
6164
6165         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6166         types with more than one parameter as prototyped.
6167
6168 2017-09-04  Pedro Alves  <palves@redhat.com>
6169
6170         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6171         (disassemble_command): Use gdb_disassembly_flags instead of bare
6172         int.
6173         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6174         (dump_insns, do_mixed_source_and_assembly_deprecated)
6175         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6176         Use gdb_disassembly_flags instead of bare int.
6177         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6178         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6179         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6180         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
6181         (enum gdb_disassembly_flag): ... values of this new enumeration.
6182         (gdb_disassembly_flags): Define.
6183         (gdb_disassembly)
6184         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6185         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6186         gdb_disassembly_flags instead of bare int.
6187         * record-btrace.c (btrace_insn_history)
6188         (record_btrace_insn_history, record_btrace_insn_history_range)
6189         (record_btrace_insn_history_from): Use gdb_disassembly_flags
6190         instead of bare int.
6191         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6192         Use gdb_disassembly_flags instead of bare int.
6193         * target-debug.h (target_debug_print_gdb_disassembly_flags):
6194         Define.
6195         * target-delegates.c: Regenerate.
6196         * target.c (target_insn_history, target_insn_history_from)
6197         (target_insn_history_range): Use gdb_disassembly_flags instead of
6198         bare int.
6199         * target.h: Include "disasm.h".
6200         (struct target_ops) <to_insn_history, to_insn_history_from,
6201         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6202         int.
6203         (target_insn_history, target_insn_history_from)
6204         (target_insn_history_range): Use gdb_disassembly_flags instead of
6205         bare int.
6206
6207 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6208
6209         * cli/cli-script.c (build_command_line): For if/while commands,
6210         check whether args is empty.
6211
6212 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6213
6214         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6215         (enum command_control_type): Likewise.
6216         (struct command_line): Likewise.
6217         (free_command_lines): Likewise.
6218         (struct command_lines_deleter): Likewise.
6219         (command_line_up): Likewise.
6220         (read_command_lines): Likewise.
6221         (read_command_lines_1): Likewise.
6222         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6223         (enum command_control_type): Likewise.
6224         (struct command_line): Likewise.
6225         (free_command_lines): Likewise.
6226         (struct command_lines_deleter): Likewise.
6227         (command_line_up): Likewise.
6228         (read_command_lines): Likewise.
6229         (read_command_lines_1): Likewise.
6230         * breakpoint.h: Include cli/cli-script.h.
6231         * extension-priv.h: Likewise.
6232         * gdbcmd.h: Likewise.
6233
6234 2017-09-04  Pedro Alves  <palves@redhat.com>
6235
6236         * ada-lang.c (is_known_support_routine): Move sal declaration to
6237         where it is initialized.
6238         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6239         (parse_breakpoint_sals, decode_static_tracepoint_spec)
6240         (clear_command, update_static_tracepoint): Remove init_sal
6241         references.  Move declarations closer to initializations.
6242         * cli/cli-cmds.c (list_command): Move sal declarations closer to
6243         initializations.
6244         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6245         references.  Move sal declarations closer to initializations.
6246         * frame.c (find_frame_sal): Return a symtab_and_line via function
6247         return instead of output parameter.  Remove init_sal references.
6248         * frame.h (find_frame_sal): Return a symtab_and_line via function
6249         return instead of output parameter.
6250         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6251         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6252         instead of memset.
6253         (gdbscm_find_pc_line): Remove init_sal reference.
6254         * infcall.c (call_function_by_hand_dummy): Remove init_sal
6255         references.  Move declarations closer to initializations.
6256         * infcmd.c (set_step_frame): Update.  Move declarations closer to
6257         initializations.
6258         (finish_backward): Remove init_sal references.  Move declarations
6259         closer to initializations.
6260         * infrun.c (process_event_stop_test, handle_step_into_function)
6261         (insert_hp_step_resume_breakpoint_at_frame)
6262         (insert_step_resume_breakpoint_at_caller): Likewise.
6263         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6264         (symbol_to_sal): Likewise.
6265         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6266         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6267         to its initialization.
6268         * reverse.c (save_bookmark_command): Use new/delete.  Remove
6269         init_sal references.  Move declarations closer to initializations.
6270         * source.c (get_current_source_symtab_and_line): Remove brace
6271         initialization.
6272         (set_current_source_symtab_and_line): Now takes the sal by const
6273         reference.  Remove brace initialization.
6274         (line_info): Remove init_sal reference.
6275         * source.h (set_current_source_symtab_and_line): Now takes a
6276         symtab_and_line via const reference.
6277         * stack.c (set_current_sal_from_frame): Adjust.
6278         (print_frame_info): Adjust.
6279         (get_last_displayed_sal): Return the sal via function return
6280         instead of via output parameter.  Simplify.
6281         (frame_info): Adjust.
6282         * stack.h (get_last_displayed_sal): Return the sal via function
6283         return instead of via output parameter.
6284         * symtab.c (init_sal): Delete.
6285         (find_pc_sect_line): Remove init_sal references.  Move
6286         declarations closer to initializations.
6287         (find_function_start_sal): Remove init_sal references.  Move
6288         declarations closer to initializations.
6289         * symtab.h (struct symtab_and_line): In-class initialize all
6290         fields.
6291         * tracepoint.c (set_traceframe_context)
6292         (print_one_static_tracepoint_marker): Remove init_sal references.
6293         Move declarations closer to initializations.
6294         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6295         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
6296         declarations closer to initializations.
6297         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6298         init_sal references.  Adjust.
6299
6300 2017-09-04  Pedro Alves  <palves@redhat.com>
6301
6302         * ax-gdb.c (agent_command_1): Use range-for.
6303         * break-catch-throw.c (re_set_exception_catchpoint): Update.
6304         * breakpoint.c: Include "common/array-view.h".
6305         (init_breakpoint_sal, create_breakpoint_sal): Change sals
6306         parameter from struct symtabs_and_lines to
6307         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
6308         (breakpoint_sals_to_pc): Change sals parameter from struct
6309         symtabs_and_lines to std::vector reference.
6310         (check_fast_tracepoint_sals): Change sals parameter from struct
6311         symtabs_and_lines to std::array_view.  Use range-for.
6312         (decode_static_tracepoint_spec): Return a std::vector instead of
6313         symtabs_and_lines.  Update.
6314         (create_breakpoint): Update.
6315         (break_range_command, until_break_command, clear_command): Update.
6316         (base_breakpoint_decode_location, bkpt_decode_location)
6317         (bkpt_probe_create_sals_from_location)
6318         (bkpt_probe_decode_location, tracepoint_decode_location)
6319         (tracepoint_probe_decode_location)
6320         (strace_marker_create_sals_from_location): Return a std::vector
6321         instead of symtabs_and_lines.
6322         (strace_marker_create_breakpoints_sal): Update.
6323         (strace_marker_decode_location): Return a std::vector instead of
6324         symtabs_and_lines.  Update.
6325         (update_breakpoint_locations): Change struct symtabs_and_lines
6326         parameters to gdb::array_view.  Adjust.
6327         (location_to_sals): Return a std::vector instead of
6328         symtabs_and_lines.  Update.
6329         (breakpoint_re_set_default): Use std::vector instead of struct
6330         symtabs_and_lines.
6331         (decode_location_default): Return a std::vector instead of
6332         symtabs_and_lines.  Update.
6333         * breakpoint.h: Include "common/array-view.h".
6334         (struct breakpoint_ops) <decode_location>: Now returns a
6335         std::vector instead of returning a symtabs_and_lines via output
6336         parameter.
6337         (update_breakpoint_locations): Change sals parameters to use
6338         gdb::array_view.
6339         * cli/cli-cmds.c (edit_command, list_command): Update to use
6340         std::vector and gdb::array_view.
6341         (ambiguous_line_spec): Adjust to use gdb::array_view and
6342         range-for.
6343         (compare_symtabs): Rename to ...
6344         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
6345         const reference and adjust.
6346         (filter_sals): Rewrite using std::vector and standard algorithms.
6347         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6348         (jump_command): Update to use std::vector.
6349         * linespec.c (struct linespec_state) <canonical_names>: Update
6350         comment.
6351         (add_sal_to_sals_basic): Delete.
6352         (add_sal_to_sals, filter_results, convert_results_to_lsals)
6353         (decode_line_2, create_sals_line_offset)
6354         (convert_address_location_to_sals, convert_linespec_to_sals)
6355         (convert_explicit_location_to_sals, parse_linespec)
6356         (event_location_to_sals, decode_line_full, decode_line_1)
6357         (decode_line_with_current_source)
6358         (decode_line_with_last_displayed, decode_objc)
6359         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6360         (linespec_result::~linespec_result): Adjust to use std::vector
6361         instead of symtabs_and_lines.
6362         * linespec.h (linespec_sals::sals): Now a std::vector.
6363         (struct linespec_result): Use std::vector, bool, and in-class
6364         initialization.
6365         (decode_line_1, decode_line_with_current_source)
6366         (decode_line_with_last_displayed): Return std::vector.
6367         * macrocmd.c (info_macros_command): Use std::vector.
6368         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6369         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6370         std::vector.
6371         * probe.h (parse_probes): Return a std::vector.
6372         * python/python.c (gdbpy_decode_line): Use std::vector and
6373         gdb::array_view.
6374         * source.c (select_source_symtab, line_info): Use std::vector.
6375         * stack.c (func_command): Use std::vector.
6376         * symtab.h (struct symtabs_and_lines): Delete.
6377         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6378
6379 2017-09-04  Pedro Alves  <palves@redhat.com>
6380
6381         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6382         unittests/array-view-selftests.c.
6383         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6384         * common/array-view.h: New file.
6385         * unittests/array-view-selftests.c: New file.
6386
6387 2017-09-04  Pedro Alves  <palves@redhat.com>
6388
6389         * cli/cli-cmds.c (edit_command): Pass message to
6390         ambiguous_line_spec.
6391         (list_command): Pass message to ambiguous_line_spec.  Say
6392         "first"/"last" instead of "start" and "end" to be consistent with
6393         the manual.
6394         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
6395         them to print formatted message.
6396
6397 2017-09-04  Pedro Alves  <palves@redhat.com>
6398
6399         * btrace.c (ftrace_add_pt): Pass btrace_insn to
6400         ftrace_update_insns by reference instead of pointer.
6401
6402 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6403
6404         * i386-go32-tdep.c: Include x86-xstate.h.
6405         (i386_go32_init_abi): Call i386_target_description.
6406         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6407         if xcr0 is X86_XSTATE_X87_MASK.
6408         * i386-tdep.h (tdesc_i386): Remove the declaration.
6409         (tdesc_i386_mmx): Likewise.
6410
6411 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6412
6413         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6414         X86_XSTATE_SSE_MASK instead of 0.
6415
6416 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6417
6418         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6419         i386_target_description.
6420         * i386-fbsd-nat.c (i386fbsd_read_description): Call
6421         i386_target_description.
6422         * i386-tdep.c (i386_gdbarch_init): Likewise.
6423
6424 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6425
6426         * amd64-darwin-tdep.c: Include "x86-xstate.h".
6427         (x86_darwin_init_abi_64): Call amd64_target_description.
6428         * amd64-dicos-tdep.c: Likewise.
6429         * amd64-fbsd-nat.c: Likewise.
6430         * amd64-fbsd-tdep.c: Likewise.
6431         * amd64-nbsd-tdep.c: Likewise.
6432         * amd64-obsd-tdep.c: Likewise.
6433         * amd64-sol2-tdep.c: Likewise.
6434         * amd64-windows-tdep.c: Likewise.
6435         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6436
6437 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6438
6439         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6440         (btrace_function) <insn>: Change type to use std::vector.
6441         * btrace.c (ftrace_debug, ftrace_call_num_insn,
6442         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6443         ftrace_update_insns, ftrace_compute_global_level_offset,
6444         btrace_stitch_bts, btrace_clear, btrace_insn_get,
6445         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6446         change to std::vector.
6447         (ftrace_update_insns): Adjust to change to std::vector, change
6448         type of INSN parameter.
6449         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6450         * record-btrace.c (btrace_call_history_insn_range,
6451         btrace_compute_src_line_range,
6452         record_btrace_frame_prev_register): Adjust to change to
6453         std::vector.
6454         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6455         to change to std::vector.
6456
6457 2017-09-03  Tom Tromey  <tom@tromey.com>
6458
6459         * corefile.c (reopen_exec_file): Use std::string.
6460
6461 2017-09-03  Tom Tromey  <tom@tromey.com>
6462
6463         * compile/compile.c (compile_register_name_mangled): Return
6464         std::string.
6465         * compile/compile-loc2c.c (pushf_register_address): Update.
6466         (pushf_register): Update.
6467         * compile/compile-c-types.c (convert_array): Update.
6468         * compile/compile-c-symbols.c (generate_vla_size): Update.
6469         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6470         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6471         (convert_one_symbol): Update.
6472         (generate_c_for_for_one_variable): Update.
6473         * compile/compile-c-support.c (c_get_range_decl_name): Return a
6474         std::string.
6475         (generate_register_struct): Update.
6476         * compile/compile-internal.h (c_get_range_decl_name): Return a
6477         std::string.
6478         (compile_register_name_mangled): Return std::string.
6479
6480 2017-09-03  Tom Tromey  <tom@tromey.com>
6481
6482         * utils.c (perror_string): Return a std::string.
6483         (throw_perror_with_name, perror_warning_with_name): Update.
6484
6485 2017-09-03  Tom Tromey  <tom@tromey.com>
6486
6487         * demangle.c (demangle_command): Use std::string,
6488         unique_xmalloc_ptr.
6489
6490 2017-09-03  Tom Tromey  <tom@tromey.com>
6491
6492         * cli/cli-setshow.c (do_set_command): Use std::string.
6493
6494 2017-09-03  Tom Tromey  <tom@tromey.com>
6495
6496         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6497
6498 2017-09-03  Tom Tromey  <tom@tromey.com>
6499
6500         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6501
6502 2017-09-03  Tom Tromey  <tom@tromey.com>
6503
6504         * mi/mi-cmd-env.c (env_execute_cli_command): Use
6505         gdb::unique_xmalloc_ptr.
6506
6507 2017-09-03  Tom Tromey  <tom@tromey.com>
6508
6509         * thread.c (print_thread_info_1): Use string_printf.
6510         (thread_apply_command, thread_apply_all_command): Use
6511         std::string.
6512
6513 2017-09-03  Tom Tromey  <tom@tromey.com>
6514
6515         * valprint.c (val_print_string): Update.
6516         * gdbcore.h (memory_error_message): Return std::string.
6517         * corefile.c (memory_error_message): Return std::string.
6518         (memory_error): Update.
6519         * breakpoint.c (insert_bp_location): Update.
6520
6521 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
6522
6523         * target/waitstatus.h (target_waitstatus_to_string): Change
6524         return type to std::string.
6525         * target/waitstatus.c (target_waitstatus_to_string): Return
6526         std::string.
6527         * target.h (target_waitstatus_to_string): Remove declaration.
6528         * infrun.c (resume, clear_proceed_status_thread,
6529         print_target_wait_results, do_target_wait, save_waitstatus,
6530         stop_all_threads): Adjust.
6531         * record-btrace.c (record_btrace_wait): Adjust.
6532         * target-debug.h
6533         (target_debug_print_struct_target_waitstatus_p): Adjust.
6534
6535 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6536
6537         PR gdb/22046
6538         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6539         detection.
6540
6541 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
6542
6543         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6544         for setting/unsetting environment variables on the remote target.
6545         (New remote packets): Add entries for QEnvironmentHexEncoded,
6546         QEnvironmentUnset and QEnvironmentReset.
6547         * common/environ.c (gdb_environ::operator=): Extend method to
6548         handle m_user_set_env_list and m_user_unset_env_list.
6549         (gdb_environ::clear): Likewise.
6550         (match_var_in_string): Change type of first parameter from 'char
6551         *' to 'const char *'.
6552         (gdb_environ::set): Extend method to handle
6553         m_user_set_env_list and m_user_unset_env_list.
6554         (gdb_environ::unset): Likewise.
6555         (gdb_environ::clear_user_set_env): New method.
6556         (gdb_environ::user_set_envp): Likewise.
6557         (gdb_environ::user_unset_envp): Likewise.
6558         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6559         m_user_unset_env_list on move constructor/assignment.
6560         (unset): Add new default parameter 'update_unset_list = true'.
6561         (clear_user_set_env): New method.
6562         (user_set_envp): Likewise.
6563         (user_unset_envp): Likewise.
6564         (m_user_set_env_list): New std::set.
6565         (m_user_unset_env_list): Likewise.
6566         * common/rsp-low.c (hex2str): New function.
6567         (bin2hex): New overload for bin2hex function.
6568         * common/rsp-low.c (hex2str): New prototype.
6569         (str2hex): New overload prototype.
6570         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6571         QEnvironmentUnset and QEnvironmentReset.
6572         (remote_protocol_features): Add QEnvironmentHexEncoded,
6573         QEnvironmentUnset and QEnvironmentReset packets.
6574         (send_environment_packet): New function.
6575         (extended_remote_environment_support): Likewise.
6576         (extended_remote_create_inferior): Call
6577         extended_remote_environment_support.
6578         (_initialize_remote): Add QEnvironmentHexEncoded,
6579         QEnvironmentUnset and QEnvironmentReset packet configs.
6580         * unittests/environ-selftests.c (gdb_selftest_env_var):
6581         New variable.
6582         (test_vector_initialization): New function.
6583         (test_init_from_host_environ): Likewise.
6584         (test_reinit_from_host_environ): Likewise.
6585         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6586         Likewise.
6587         (test_unset_set_empty_vector): Likewise.
6588         (test_vector_clear): Likewise.
6589         (test_std_move): Likewise.
6590         (test_move_constructor):
6591         (test_self_move): Likewise.
6592         (test_set_unset_reset): Likewise.
6593         (run_tests): Rewrite in terms of the functions above.
6594
6595 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
6596
6597         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6598         (adi_available): Use a temp variable of type CORE_ADDR as argument
6599         3 when calling target_auxv_search.
6600         (adi_normalize_address): Use masks and xor operators to calculate
6601         normalized address.
6602         (adi_read_versions, adi_write_versions, adi_print_versions)
6603         (do_examine, do_assign): Use paddress.
6604
6605 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
6606
6607         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6608         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6609         out of loop and add supply of FIR.
6610         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6611         add collect of FIR.
6612
6613 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
6614
6615         PR gdb/21827
6616         * cli/cli-script.c (define_command): Don't convert command name
6617         to lower case.
6618
6619 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
6620
6621         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6622         Update all callers accordingly. Remove all code blocks handling
6623         the case where DISPP is not NULL.
6624
6625 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6626
6627         PR symtab/22003
6628         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6629         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6630         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6631
6632 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6633
6634         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6635         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6636         (read_comp_units_from_section): New parameter abbrev_section, use
6637         read_and_check_comp_unit_head, allocate signatured_type if needed.
6638         (create_all_comp_units): Update read_comp_units_from_section caller.
6639
6640 2017-08-23  Pedro Alves  <palves@redhat.com>
6641
6642         PR remote/21852
6643         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6644         to null_ptid and switch to thread without reading the registers
6645         after adding the inferior.
6646
6647 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6648
6649         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6650         compile-gcc.
6651         * compile/compile.c (compile_gcc, show_compile_gcc): New.
6652         (compile_to_object): Implement compile_gcc.
6653         (_initialize_compile): Install "set compile-gcc".  Initialize
6654         compile_gcc.
6655
6656 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6657
6658         * compile/compile.c (compile_to_object): Conditionally call
6659         set_verbose.  Conditionally call compile or compile_v0.
6660
6661 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
6662
6663         * sparc64-tdep.h: (adi_normalize_address): New export.
6664         * sparc-nat.h: (open_adi_tag_fd): New export.
6665         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
6666         * sparc64-linux-tdep.c:
6667         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
6668         (sparc64_linux_handle_segmentation_fault): New function.
6669         (sparc64_linux_init_abi): Register
6670         sparc64_linux_handle_segmentation_fault
6671         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
6672         (sparc64_addr_bits_remove): New function.
6673         (sparc64_init_abi): Register sparc64_addr_bits_remove.
6674         (MAX_PROC_NAME_SIZE): New macro.
6675         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
6676         (sparc64adilist): New variable.
6677         (adi_proc_list): New variable.
6678         (find_adi_info): New function.
6679         (add_adi_info): New function.
6680         (get_adi_info_proc): New function.
6681         (get_adi_info): New function.
6682         (info_adi_command): New function.
6683         (read_maps_entry): New function.
6684         (adi_available): New function.
6685         (adi_normalize_address): New function.
6686         (adi_align_address): New function.
6687         (adi_convert_byte_count): New function.
6688         (adi_tag_fd): New function.
6689         (adi_is_addr_mapped): New function.
6690         (adi_read_versions): New function.
6691         (adi_write_versions): New function.
6692         (adi_print_versions): New function.
6693         (do_examine): New function.
6694         (do_assign): New function.
6695         (adi_examine_command): New function.
6696         (adi_assign_command): New function.
6697         (_initialize_sparc64_adi_tdep): New function.
6698
6699 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
6700
6701         * breakpoint.c (breakpoints_info): Rename to ...
6702         (info_breakpoints_command): ... this.
6703         (watchpoints_info): Rename to ...
6704         (info_watchpoints_command): ... this.
6705         (tracepoints_info): Rename to ...
6706         (info_tracepoints_command): ... this.
6707         (_initialize_breakpoint): Adjust.
6708         * dcache.c (dcache_info): Rename to ...
6709         (info_display_command): ... this.
6710         (_initialize_dcache): Adjust.
6711         * frame.h (args_info): Rename to ...
6712         (info_args_command): ... this.
6713         (locals_info): Rename to ...
6714         (info_locals_command): ... this.
6715         * infcmd.c (nofp_registers_info): Rename to ...
6716         (info_registers_command): ... this.
6717         (float_info): Rename to ...
6718         (info_float_command): ... this.
6719         (program_info): Rename to ...
6720         (info_program_command): ... this.
6721         (all_registers_info): Rename to ...
6722         (info_all_registers_command): ... this.
6723         (vector_info): Rename to ...
6724         (info_vector_command): ... this.
6725         (float_info): Rename to ...
6726         (info_float_command): ... this.
6727         (_initialize_infcmd): Adjust.
6728         * inferior.h (term_info): Rename to ...
6729         (info_terminal_command): ... this.
6730         * inflow.c (term_info): Rename to ...
6731         (info_terminal_command): ... this.
6732         (_initialize_inflow): Adjust.
6733         * infrun.c (signals_info): Rename to ...
6734         (info_signals_command): ... this.
6735         (_initialize_infrun): Adjust.
6736         * objc-lang.c (classes_info): Rename to ...
6737         (info_classes_command): ... this.
6738         (selectors_info): Rename to ...
6739         (info_selectors_command): ... this.
6740         (_initialize_objc_language): Adjust.
6741         * printcmd.c (sym_info): Rename to ...
6742         (info_symbol_command): ... this.
6743         (address_info): Rename to ...
6744         (info_address_command): ... this.
6745         (display_info): Rename to ...
6746         (info_display_command): ... this.
6747         (_initialize_printcmd): Adjust.
6748         * reverse.c (bookmarks_info): Rename to ...
6749         (info_breakpoints_command): ... this.
6750         (_initialize_reverse): Adjust.
6751         * ser-go32.c (dos_info): Rename to ...
6752         (info_serial_command): ... this.
6753         (_initialize_ser_dos): Adjust.
6754         * skip.c (skip_info): Rename to ...
6755         (info_skip_command): ... this.
6756         (_initialize_step_skip): Adjust.
6757         * source.c (line_info): Rename to ...
6758         (info_line_command): ... this.
6759         (source_info): Rename to ...
6760         (info_source_command)
6761         * stack.c (frame_info): Rename to ...
6762         (info_frame_command): ... this.
6763         (locals_info): Rename to ...
6764         (info_locals_command): ... this.
6765         (args_info): Rename to ...
6766         (info_args_command): ... this.
6767         (_initialize_stack): Adjust.
6768         * symtab.c (sources_info): Rename to ...
6769         (info_sources_command): ... this.
6770         (variables_info): Rename to ...
6771         (info_variables_command): ... this.
6772         (functions_info): Rename to ...
6773         (info_functions_command): ... this.
6774         (types_info): Rename to ...
6775         (info_types_command): ... this.
6776         (_initialize_symtab): Adjust.
6777         * target.c (target_info): Rename to ...
6778         (info_target_command): ... this.
6779         (initialize_targets): Adjust.
6780         * tracepoint.c (tvariables_info): Rename to ...
6781         (info_tvariables_command): ... this.
6782         (scope_info): Rename to ...
6783         (info_scope_command): ... this.
6784         (trace_dump_actions): Adjust.
6785         (_initialize_tracepoint): Adjust.
6786
6787 2017-08-22  Tom Tromey  <tom@tromey.com>
6788
6789         * breakpoint.h (install_breakpoint): Update.
6790         * breakpoint.c (add_solib_catchpoint): Update.
6791         (install_breakpoint): Change argument to a std::unique_ptr.
6792         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6793         (create_breakpoint_sal, create_breakpoint): Update.
6794         (watch_command_1, catch_exec_command_1)
6795         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6796         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6797         Return the breakpoint.
6798         (set_raw_breakpoint_without_location, set_raw_breakpoint)
6799         (new_single_step_breakpoint): Update.
6800         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
6801         std::unique_ptr.
6802         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6803         std::unique_ptr.
6804         * break-catch-sig.c (create_signal_catchpoint): Use
6805         std::unique_ptr.
6806         * ada-lang.c (create_ada_exception_catchpoint): Use
6807         std::unique_ptr.
6808
6809 2017-08-22  Tom Tromey  <tom@tromey.com>
6810
6811         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
6812
6813 2017-08-22  Tom Tromey  <tom@tromey.com>
6814
6815         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
6816         (lookup_partial_symbol): Update.
6817
6818 2017-08-22  Tom Tromey  <tom@tromey.com>
6819
6820         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
6821         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
6822         (find_and_open_source, symtab_to_fullname): Update.
6823         * psymtab.c (psymtab_to_fullname): Update.
6824
6825 2017-08-22  Tom Tromey  <tom@tromey.com>
6826
6827         * exec.c (exec_file_attach): Update.
6828         * linux-thread-db.c (try_thread_db_load): Update.
6829         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
6830         * utils.c (gdb_realpath): Change return type.
6831         (gdb_realpath_keepfile): Update.
6832         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
6833         (_initialize_utils): Register the new self test.
6834         * source.c (openp): Update.
6835         (find_and_open_source): Update.
6836         * nto-tdep.c (nto_find_and_open_solib): Update.
6837         * main.c (set_gdb_data_directory): Update.
6838         (captured_main_1): Update.
6839         * dwarf2read.c (dwarf2_get_dwz_file): Update
6840         (dw2_map_symbol_filenames): Update.
6841         * auto-load.c (auto_load_safe_path_vec_update): Update.
6842         (filename_is_in_auto_load_safe_path_vec): Change type of
6843         "filename_realp".
6844         (auto_load_objfile_script): Update.
6845         (file_is_auto_load_safe): Update.  Use std::string.
6846         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
6847
6848 2017-08-22  Tom Tromey  <tom@tromey.com>
6849
6850         * utils.c (gdb_realpath_keepfile): Return a
6851         gdb::unique_xmalloc_ptr.
6852         * exec.c (exec_file_attach): Update.
6853         * utils.h (gdb_realpath_keepfile): Return a
6854         gdb::unique_xmalloc_ptr.
6855
6856 2017-08-22  Tom Tromey  <tom@tromey.com>
6857
6858         * compile/compile.c (compile_file_command): Use
6859         gdb::unique_xmalloc_ptr, std::string.
6860         * utils.c (gdb_abspath): Change return type.
6861         * source.c (openp): Update.
6862         * objfiles.c (allocate_objfile): Update.
6863         * main.c (set_gdb_data_directory): Update.
6864         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
6865
6866 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
6867
6868         * cli-cmds.c (list_commands): List actual code around more than
6869         one location.
6870
6871 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
6872
6873         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
6874
6875 2017-08-21  Pedro Alves  <palves@redhat.com>
6876
6877         PR gdb/19487
6878         * c-exp.y (variable production): Handle function aliases.
6879         * minsyms.c (msymbol_is_text): New function.
6880         * minsyms.h (msymbol_is_text): Declare.
6881         * symtab.c (find_function_alias_target): New function.
6882         * symtab.h (find_function_alias_target): Declare.
6883
6884 2017-08-21  Pedro Alves  <palves@redhat.com>
6885
6886         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
6887         typedefs.
6888         * typeprint.c (whatis_exp): If handling "whatis", and expression
6889         is OP_TYPE, strip one typedef level.  Otherwise don't strip
6890         typedefs here.
6891         * valops.c (value_cast): Save "to" type before resolving
6892         stubs/typedefs.  Use that type as resulting value's type.
6893
6894 2017-08-18  Tom Tromey  <tom@tromey.com>
6895             Pedro Alves  <palves@redhat.com>
6896
6897         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
6898         * sol-thread.c (sol_thread_resume, sol_thread_wait)
6899         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
6900         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
6901         * proc-service.c (ps_xfer_memory): Use scoped_restore.
6902         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
6903         (linux_get_siginfo_data): Add "thread" argument.  Use
6904         scoped_restore.
6905         * linux-nat.c (linux_child_follow_fork)
6906         (check_stopped_by_watchpoint): Use scoped_restore.
6907         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
6908         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
6909         (restore_inferior_ptid, save_inferior_ptid): Remove.
6910         * btrace.c (btrace_fetch): Use scoped_restore.
6911         * bsd-uthread.c (bsd_uthread_fetch_registers)
6912         (bsd_uthread_store_registers): Use scoped_restore.
6913         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
6914         scoped_restore.
6915         * aix-thread.c (aix_thread_resume, aix_thread_wait)
6916         (aix_thread_xfer_partial): Use scoped_restore.
6917         * inferior.h (save_inferior_ptid): Remove.
6918
6919 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6920
6921         PR tdep/21818
6922         * arm-tdep.c (gdb_print_insn_arm): Mark
6923         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
6924
6925 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6926
6927         * NEWS: Mention GDBserver's new option "--selftest".
6928         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
6929         * selftest.c: Move it to common/selftest.c.
6930         * selftest.h: Move it to common/selftest.h.
6931         * selftest-arch.c (reset): New function.
6932         (tests_with_arch): Call reset.
6933
6934 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6935
6936         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
6937         instead of exception_fprintf and printf_filtered.
6938
6939 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6940
6941         * selftest.c (register_self_test): Rename it to
6942         selftests::register_test.
6943         (run_self_tests): selftest::run_tests.
6944         * selftest.h: Update declarations.
6945         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
6946         selftests::register_test_foreach_arch.
6947         * selftest-arch.h: Update declaration.
6948         * aarch64-tdep.c: Update.
6949         * arm-tdep.c: Likewise.
6950         * disasm-selftests.c: Likewise.
6951         * dwarf2loc.c: Likewise.
6952         * dwarf2-frame.c: Likewise.
6953         * findvar.c: Likewise.
6954         * gdbarch-selftests.c: Likewise.
6955         * maint.c (maintenance_selftest): Likewise.
6956         * regcache.c: Likewise.
6957         * rust-exp.y: Likewise.
6958         * selftest-arch.c: Likewise.
6959         * unittests/environ-selftests.c: Likewise.
6960         * unittests/function-view-selftests.c: Likewise.
6961         * unittests/offset-type-selftests.c: Likewise.
6962         * unittests/optional-selftests.c: Likewise.
6963         * unittests/scoped_restore-selftests.c: Likewise.
6964         * utils-selftests.c: Likewise.
6965
6966 2017-08-17  Pedro Alves  <palves@redhat.com>
6967
6968         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
6969         local.
6970
6971 2017-08-17  Pedro Alves  <palves@redhat.com>
6972
6973         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
6974         field.
6975         (reset_die_in_process): Delete, replaced by ...
6976         (process_die_scope): ... this new class.  Make it responsible for
6977         freeing cu->line_header too.
6978         (process_die): Use process_die_scope.
6979         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
6980         cu->line_header_die_owner.  Don't release the line header if it's
6981         owned by the CU.
6982         (setup_type_unit_groups): Make the CU/DIE own the line header.
6983         Don't release the line header here.
6984
6985 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
6986
6987         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
6988
6989 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6990
6991         * NEWS: Mention new shortcuts for nexti and stepi in TUI
6992         Single-Key mode
6993
6994 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6995
6996         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
6997         mode command list.
6998
6999 2017-08-15  Stafford Horne  <shorne@gmail.com>
7000
7001         * MAINTAINERS (Write After Approval): Add Stafford Horne.
7002
7003 2017-08-15  Stafford Horne  <shorne@gmail.com>
7004
7005         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7006
7007 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
7008
7009         PR gdb/21954
7010         * infcmd.c (unset_environment_command): Use the 'clear' method on
7011         the environment instead of resetting it.
7012
7013 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
7014
7015         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7016         platforms.
7017
7018 2017-08-14  Tom Tromey  <tom@tromey.com>
7019
7020         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7021         (print_binary_chars): Likewise.
7022         (BITS_IN_BYTES): Remove.
7023
7024 2017-08-14  Tom Tromey  <tom@tromey.com>
7025
7026         PR gdb/21675
7027         * valprint.c (LOW_ZERO): Change value to 034.
7028         (print_octal_chars): Add static_asserts for octal constants.
7029         * printcmd.c (print_scalar_formatted): Add 'd' case.
7030
7031 2017-08-11  Tom Tromey  <tom@tromey.com>
7032
7033         * symfile.c (add_symbol_file_command): Use std::vector.
7034
7035 2017-08-14  Tom Tromey  <tom@tromey.com>
7036
7037         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7038         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7039         std::move.
7040         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7041
7042 2017-08-11  Pedro Alves  <palves@redhat.com>
7043
7044         * infrun.c (process_event_stop_test): Adjust
7045         function_name_is_marked_for_skip call.
7046         * skip.c: Include <list>.
7047         (skiplist_entry): Make it a class with private fields, and
7048         getters/setters.
7049         (skiplist_entry_chain): Delete.
7050         (skiplist_entries): New.
7051         (skiplist_entry_count): Delete.
7052         (highest_skiplist_entry_num): New.
7053         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7054         (add_skiplist_entry): Delete.
7055         (skiplist_entry::skiplist_entry): New.
7056         (skiplist_entry::add_entry): New.
7057         (skip_file_command, skip_function): Adjust.
7058         (compile_skip_regexp): Delete.
7059         (skip_command): Don't compile regexp here.  Adjust to use
7060         skiplist_entry::add_entry.
7061         (skip_info): Adjust to use range-for and getters.
7062         (skip_enable_command, skip_disable_command): Adjust to use
7063         range-for and setters.
7064         (skip_delete_command): Adjust to use std::list.
7065         (add_skiplist_entry): Delete.
7066         (skip_file_p): Delete, refactored as ...
7067         (skiplist_entry::do_skip_file_p): ... this new method.
7068         (skip_gfile_p): Delete, refactored as ...
7069         (skiplist_entry::do_gskip_file_p): ... this new method.
7070         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7071         (skiplist_entry::skip_function_p): ... this new method.
7072         (function_name_is_marked_for_skip): Now returns bool, and takes
7073         the function sal by const reference.  Adjust to use range-for and
7074         skiplist_entry methods.
7075         (_initialize_step_skip): Remove references to
7076         skiplist_entry_chain, skiplist_entry_count.
7077         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7078         takes the function sal by const reference.
7079
7080 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7081
7082         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7083         (dwarf2_frame_cache): Remove reset_cache_cleanup.
7084         (dwarf2_frame_cache):
7085         * frame-unwind.c (frame_unwind_try_unwinder): Catch
7086         RETURN_MASK_ALL and set *this_case to NULL.
7087         * frame-unwind.h: Update comments.
7088
7089 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7090
7091         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7092         (dwarf2_frame_state_copy_regs): Remove.
7093         (dwarf2_frame_state_free_regs): Remove.
7094         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7095         (dwarf2_restore_rule): Call method .alloc_regs instead of
7096         dwarf2_frame_state_alloc_regs.
7097         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
7098         constructor.  Call std::move.
7099         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7100         (dwarf2_frame_cache): Likewise.
7101
7102         [GDB_SELF_TEST]: Include selftest.h and
7103         selftest-arch.h.
7104         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7105         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7106         execute_cfa_program_test.
7107
7108         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7109         copy ctor, assignment operator, move assignment.
7110         <alloc_regs>: New method.
7111         <swap>: New method.
7112         (struct dwarf2_frame_state): Delete dtor.
7113         (dwarf2_frame_state_alloc_regs): Remove declaration.
7114         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7115         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7116
7117 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7118
7119         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7120         (dwarf2_frame_state::dwarf2_frame_state): New.
7121         (dwarf2_frame_state::~dwarf2_frame_state): New.
7122         (dwarf2_fetch_cfa_info): Update.
7123         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
7124         rather than a pointer.  Update code.
7125         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7126         dtor.
7127         <data_align, code_align, retaddr_column>: Change them to const.
7128         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7129         to bool.
7130
7131 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7132
7133         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7134         <loc.exp>: New field.
7135         * dwarf2-frame.c (execute_cfa_program): Update.
7136         (dwarf2_frame_prev_register): Update.
7137
7138 2017-08-10  Pedro Alves  <palves@redhat.com>
7139
7140         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7141
7142 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7143
7144         * fbsd-nat.c (struct fbsd_fork_info): Remove.
7145         (fbsd_pending_children): Use std::list.
7146         (fbsd_remember_child): Likewise.
7147         (fbsd_is_child_pending): Likewise.
7148         (fbsd_pending_vfork_done): Use std::forward_list.
7149         (fbsd_add_vfork_done): Likewise.
7150         (fbsd_is_vfork_done_pending): Likewise.
7151         (fbsd_next_vfork_done): Likewise.
7152
7153 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7154
7155         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7156         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7157         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7158         for `mapfilename'.
7159         (fbsd_xfer_partial): Use gdb::byte_vector.
7160         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7161
7162 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7163
7164         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7165         "filestuff.h".
7166         (fbsd_find_memory_regions): Fix `mapfile' initialization.
7167
7168 2017-08-09  Tom Tromey  <tom@tromey.com>
7169
7170         * skip.c (skiplist_entry): New constructor.
7171         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7172         (skiplist_entry::file_is_glob): Now bool.
7173         (skiplist_entry::file, skiplist_entry::function): Now
7174         std::string.
7175         (make_skip_entry): Return a unique_ptr.  Use new.
7176         (free_skiplist_entry, free_skiplist_entry_cleanup)
7177         (make_free_skiplist_entry_cleanup): Remove.
7178         (skip_command, skip_disable_command, add_skiplist_entry)
7179         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7180         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7181         (function_name_is_marked_for_skip): Update.
7182         (skip_delete_command): Update.  Use delete.
7183
7184 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
7185
7186         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7187         (aarch64_linux_core_read_description): New function.
7188         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7189
7190 2017-08-09  Pedro Alves  <palves@redhat.com>
7191
7192         * cp-name-parser.y (cp_comp_to_string): Return a
7193         gdb::unique_xmalloc_ptr<char>.
7194         * cp-support.c (replace_typedefs_qualified_name)
7195         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7196         (cp_canonicalize_string_full): Use op= instead of explicit
7197         convertion.
7198         (cp_class_name_from_physname, method_name_from_physname)
7199         (cp_func_name, cp_remove_params): Adjust to use
7200         gdb::unique_xmalloc_ptr<char>.
7201         * cp-support.h (cp_comp_to_string): Return a
7202         gdb::unique_xmalloc_ptr<char>.
7203         * python/py-type.c (typy_lookup_type): Adjust to use
7204         gdb::unique_xmalloc_ptr<char>.
7205
7206 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
7207
7208         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7209
7210 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
7211             Yao Qi  <yao.qi@linaro.org>
7212
7213         * cp-support.c (cp_canonicalize_string_full): Use
7214         gdb::unique_xmalloc_ptr<char>.
7215         (cp_canonicalize_string): Likewise.
7216
7217 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7218
7219         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7220         * regformats/i386/amd64-avx-avx512.dat: Remove.
7221         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7222         * regformats/i386/amd64-avx-mpx.dat:Remove.
7223         * regformats/i386/amd64-avx.dat: Remove.
7224         * regformats/i386/amd64-mpx.dat: Remove.
7225         * regformats/i386/i386-avx-avx512.dat: Remove.
7226         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7227         * regformats/i386/i386-avx-mpx.dat: Remove.
7228         * regformats/i386/i386-mmx.dat: Remove.
7229         * regformats/i386/i386-mpx.dat: Remove.
7230
7231 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7232
7233         * amd64-tdep.h (tdesc_x32): Remove the declaration.
7234         * amd64-tdep.c: Don't include features/i386/x32*.c.
7235         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7236         functions.
7237         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7238         and i386/x32-avx-avx512.
7239         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7240         and i386/x32.xml.
7241         * features/i386/x32-avx-avx512.c: Removed.
7242         * features/i386/x32-avx-avx512.xml: Removed.
7243         * features/i386/x32-avx.c: Removed.
7244         * features/i386/x32-avx.xml: Removed.
7245         * features/i386/x32.c: Removed.
7246         * features/i386/x32.xml: Removed.
7247         * regformats/i386/x32-avx-avx512.dat: Removed.
7248         * regformats/i386/x32-avx.dat: Removed.
7249         * regformats/i386/x32.dat: Removed.
7250
7251 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7252
7253         PR breakpoints/21886
7254         * mem-break.c (default_memory_insert_breakpoint): Use
7255         `->placed_address' rather than `->reqstd_address' for the
7256         breakpoint location.
7257
7258 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7259
7260         * arch-utils.c (default_print_insn): Remove arch/mach/endian
7261         assertions.
7262
7263 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7264
7265         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7266         a union of `tdep_info', `tdesc_data' and `id'.
7267         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7268         rather than `info.tdep_info'.
7269         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7270         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7271         * i386-tdep.c (i386_gdbarch_init): Likewise.
7272         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7273         * mips-tdep.c (mips_gdbarch_init): Likewise.
7274         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7275         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7276         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7277         `info.tdep_info'.
7278         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7279         `info.tdep_info'.
7280         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7281         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7282         `info.tdep_info'.
7283         * spu-tdep.c (spu_gdbarch_init): Likewise.
7284         * gdbarch.h: Regenerate.
7285
7286 2017-08-07  Leszek Swirski  <leszeks@google.com>
7287
7288         PR symtab/20899
7289         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7290
7291 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
7292
7293         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7294         (gdbsim_open): Rename gdb_argv args object to argv.
7295
7296 2017-08-05  Tom Tromey  <tom@tromey.com>
7297
7298         * compile/compile-object-load.c (compile_object_load): Use
7299         gdb::unique_xmalloc_ptr.
7300         * cli/cli-dump.c (scan_filename): Rename from
7301         scan_filename_with_cleanup.  Change return type.
7302         (scan_expression): Rename from scan_expression_with_cleanup.
7303         Change return type.
7304         (dump_memory_to_file, dump_value_to_file, restore_command):
7305         Use gdb::unique_xmalloc_ptr.  Update.
7306         * cli/cli-cmds.c (find_and_open_script): Use
7307         gdb::unique_xmalloc_ptr.
7308         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7309         * symmisc.c (maintenance_print_symbols)
7310         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7311         * symfile.c (symfile_bfd_open, generic_load)
7312         (add_symbol_file_command, remove_symbol_file_command): Use
7313         gdb::unique_xmalloc_ptr.
7314         * source.c (openp): Use gdb::unique_xmalloc_ptr.
7315         * psymtab.c (maintenance_print_psymbols): Use
7316         gdb::unique_xmalloc_ptr.
7317         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7318         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7319         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7320         (reload_shared_libraries_1): Likewise.
7321
7322 2017-08-05  Tom Tromey  <tom@tromey.com>
7323
7324         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7325         (rust_op_vector, rust_set_vector): New typedefs.
7326         (current_parser): New global.
7327         (work_obstack): Change to pointer type.  Update all users.
7328         (rust_ast, pstate): Remove globals.
7329         (struct rust_parser): New.
7330         (%union) <params, field_inits>: Change type.
7331         (start, tuple_expr, unit_expr, struct_expr_list, literal)
7332         (field_expr, expr_list, maybe_expr_list, type_list): Update.
7333         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7334         (convert_params_to_types, convert_params_to_expression): Change
7335         type of "params".
7336         (ast_string): Change type of "fields".
7337         (rust_parse): Make a rust_parser.  Remove cleanups.
7338         (rust_lex_tests): Make and install an auto_obstack.
7339
7340 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7341
7342         * configure.srv (ipa_x32_linux_regobj): New.
7343         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7344         instead of X86_TDESC_AVX512.
7345         (initialize_low_tracepoint): Call
7346         init_registers_x32_avx_avx512_linux.
7347
7348 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7349
7350         * utils.h (gdb_argv): Add namespace std for nullptr_t.
7351
7352 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7353
7354         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7355
7356 2017-08-03  Tom Tromey  <tom@tromey.com>
7357
7358         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7359         Remove.
7360         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7361
7362 2017-08-03  Tom Tromey  <tom@tromey.com>
7363
7364         * python/py-param.c (compute_enum_values): Use gdb_argv.
7365
7366 2017-08-03  Tom Tromey  <tom@tromey.com>
7367
7368         * utils.h (struct gdb_argv_deleter): New.
7369         (gdb_argv): New class.
7370         * utils.c (gdb_argv::reset): New method.
7371         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7372         * tracefile.c (tsave_command): Use gdb_argv.
7373         * top.c (new_ui_command): Use gdb_argv.
7374         * symmisc.c (maintenance_print_symbols)
7375         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7376         * symfile.c (symbol_file_command, generic_load)
7377         (remove_symbol_file_command): Use gdb_argv.
7378         * stack.c (backtrace_command): Use gdb_argv.
7379         * source.c (add_path, show_substitute_path_command)
7380         (unset_substitute_path_command, set_substitute_path_command):
7381         Use gdb_argv.
7382         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
7383         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7384         * remote.c (extended_remote_run, remote_put_command)
7385         (remote_get_command, remote_delete_command): Use gdb_argv.
7386         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7387         (gdbsim_open): Use gdb_argv.
7388         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7389         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7390         * procfs.c (procfs_info_proc): Use gdb_argv.
7391         * interps.c (interpreter_exec_cmd): Use gdb_argv.
7392         * infrun.c (handle_command): Use gdb_argv.
7393         * inferior.c (add_inferior_command, clone_inferior_command):
7394         Use gdb_argv.
7395         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7396         * exec.c (exec_file_command): Use gdb_argv.
7397         * cli/cli-cmds.c (alias_command): Use gdb_argv.
7398         * compile/compile.c (build_argc_argv): Use gdb_argv.
7399
7400 2017-08-03  Tom Tromey  <tom@tromey.com>
7401
7402         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7403
7404 2017-08-03  Tom Tromey  <tom@tromey.com>
7405
7406         * python/python.c (compute_python_string): Return std::string.
7407         (gdbpy_eval_from_control_command): Update.
7408         (do_start_initialization): Use std::string.
7409         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7410         xstrprintf.
7411         * python/py-breakpoint.c (local_setattro): Use string_printf, not
7412         xstrprintf.
7413
7414 2017-08-03  Tom Tromey  <tom@tromey.com>
7415
7416         * top.h (do_restore_instream_cleanup): Remove.
7417         * top.c (do_restore_instream_cleanup): Remove.
7418         (read_command_file): Use scoped_restore.
7419         * cli/cli-script.c (execute_user_command): Use scoped_restore.
7420
7421 2017-08-03  Tom Tromey  <tom@tromey.com>
7422
7423         * cli/cli-script.c (execute_user_command)
7424         (execute_control_command): Use scoped_restore.
7425
7426 2017-08-03  Tom Tromey  <tom@tromey.com>
7427
7428         * cli/cli-script.c (do_restore_user_call_depth): Remove.
7429         (execute_user_command): Remove user_call_depth; use
7430         user_args_stack's size instead.
7431
7432 2017-08-03  Tom Tromey  <tom@tromey.com>
7433
7434         * top.h (in_user_command): Remove.
7435         * top.c (in_user_command): Remove.
7436         * cli/cli-script.c (do_restore_user_call_depth)
7437         (execute_user_command): Update.
7438
7439 2017-08-03  Tom Tromey  <tom@tromey.com>
7440
7441         * valops.c (search_struct_method): Use gdb::byte_vector.
7442         * valarith.c (value_concat): Use std::vector.
7443         * target.c (memory_xfer_partial): Use gdb::byte_vector.
7444         (simple_search_memory): Likewise.
7445         * printcmd.c (find_string_backward): Use gdb::byte_vector.
7446         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7447         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7448         * elfread.c (elf_rel_plt_read): Use std::string.
7449         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7450         * cli/cli-dump.c (restore_section_callback): Use
7451         gdb::byte_vector.
7452
7453 2017-08-03  Tom Tromey  <tom@tromey.com>
7454
7455         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7456
7457 2017-08-03  Tom Tromey  <tom@tromey.com>
7458
7459         * tui/tui-regs.c (tui_restore_gdbout): Remove.
7460         (tui_register_format): Use scoped_restore.
7461
7462 2017-08-03  Tom Tromey  <tom@tromey.com>
7463
7464         * reverse.c (exec_direction_default): Remove.
7465         (exec_reverse_once): Use scoped_restore.
7466         * remote.c (restore_remote_timeout): Remove.
7467         (remote_flash_erase, remote_flash_write, remote_flash_done)
7468         (readchar, remote_serial_write): Use scoped_restore.
7469         * cli/cli-script.c (struct source_cleanup_lines_args)
7470         (source_cleanup_lines): Remove.
7471         (script_from_file): Use scoped_restore.
7472         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7473         (source_command): Use scoped_restore.
7474
7475 2017-08-03  Tom Tromey  <tom@tromey.com>
7476
7477         * utils.h (make_cleanup_free_so): Remove.
7478         * utils.c (do_free_so, make_cleanup_free_so): Remove.
7479         * solist.h (struct so_deleter): New.
7480         (so_list_up): New typedef.
7481         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7482
7483 2017-08-03  Tom Tromey  <tom@tromey.com>
7484
7485         * utils.h (make_cleanup_restore_current_language): Remove.
7486         * utils.c (do_restore_current_language)
7487         (make_cleanup_restore_current_language): Remove.
7488         * parse.c (parse_exp_in_context_1)
7489         (parse_expression_with_language): Use
7490         scoped_restore_current_language.
7491         * mi/mi-main.c (mi_cmd_execute): Use
7492         scoped_restore_current_language.
7493         * language.h (scoped_restore_current_language): New class.
7494
7495 2017-08-03  Tom Tromey  <tom@tromey.com>
7496
7497         * compile/compile.c (cleanup_unlink_file): Remove.
7498         (compile_to_object): Use gdb::unlinker.
7499         (eval_compile_command): Likewise.
7500
7501 2017-08-03  Tom Tromey  <tom@tromey.com>
7502
7503         * utils.h (make_cleanup_fclose): Remove.
7504         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7505
7506 2017-08-03  Tom Tromey  <tom@tromey.com>
7507
7508         * top.c (open_terminal_stream): Return gdb_file_up.
7509         (new_ui_command): Update.
7510
7511 2017-08-03  Tom Tromey  <tom@tromey.com>
7512
7513         * source.c (print_source_lines_base, forward_search_command)
7514         (reverse_search_command): Use gdb_file_up.
7515
7516 2017-08-03  Tom Tromey  <tom@tromey.com>
7517
7518         * fbsd-nat.c (fbsd_find_memory_regions): Update.
7519
7520 2017-08-03  Tom Tromey  <tom@tromey.com>
7521
7522         * cli/cli-cmds.c (find_and_open_script): Change return type.
7523         Remove "streamp" and "full_path" parameters.
7524         (source_script_with_search): Update.
7525         * auto-load.c (source_script_file): Update.
7526         * cli/cli-cmds.h (find_and_open_script): Change type.
7527         (open_script): New struct.
7528
7529 2017-08-03  Tom Tromey  <tom@tromey.com>
7530
7531         * xml-support.c (xml_fetch_content_from_file): Update.
7532         * ui-file.c (stdio_file::open): Update.
7533         * tracefile-tfile.c (tfile_start): Update.
7534         * remote.c (remote_file_put, remote_file_get): Update.
7535         * nat/linux-procfs.c (linux_proc_get_int)
7536         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7537         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7538         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7539         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7540         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7541         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7542         * linux-nat.c (linux_proc_pending_signals): Update.
7543         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7544         (file_closer): Remove.
7545         * compile/compile.c (compile_to_object): Update.
7546         * common/filestuff.h (struct gdb_file_deleter): New.
7547         (gdb_file_up): New typedef.
7548         (gdb_fopen_cloexec): Change return type.
7549         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7550         * cli/cli-dump.c (fopen_with_cleanup): Remove.
7551         (dump_binary_file, restore_binary_file): Update.
7552         * auto-load.c (auto_load_objfile_script_1): Update.
7553
7554 2017-08-03  Tom Tromey  <tom@tromey.com>
7555
7556         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7557         (info_static_tracepoint_markers_command): Likewise.
7558         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7559         * skip.c (skip_info): Use ui_out_emit_table.
7560         * progspace.c (print_program_space): Use ui_out_emit_table.
7561         * osdata.c (info_osdata): Use ui_out_emit_table.
7562         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7563         ui_out_emit_table.
7564         * linux-thread-db.c (info_auto_load_libthread_db): Use
7565         ui_out_emit_table.
7566         * inferior.c (print_inferior): Use ui_out_emit_table.
7567         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7568         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7569         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7570         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7571         * ui-out.h (class ui_out_emit_table): New.
7572
7573 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
7574
7575         * mips-tdep.c (mips_fpu_type_str): New function.
7576         (mips_dump_tdep): Call it.
7577
7578 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
7579
7580         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7581         `->mips_fpu_type'.
7582
7583 2017-07-31  Xavier Roirand  <roirand@adacore.com>
7584
7585         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7586
7587 2017-07-27  Xavier Roirand  <roirand@adacore.com>
7588
7589         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7590
7591 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7592
7593         * cli/cli-cmds.c (maintenancechecklist): New variable.
7594         * gdbcmd.h (maintenancechecklist): Declare it.
7595         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7596         Call i386_linux_read_description with different masks.
7597         * maint.c (maintenance_check_command): New function.
7598         (_initialize_maint_cmds): Call add_prefix_cmd.
7599         * target-descriptions.c (tdesc_reg): override operator != and ==.
7600         (tdesc_type): Likewise.
7601         (tdesc_feature): Likewise.
7602         (target_desc): Likewise.
7603         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7604         (maintenance_check_xml_descriptions): New function.
7605         (_initialize_target_descriptions) Add command "xml-descriptions".
7606         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7607
7608 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7609
7610         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7611         Include features/i386/32bit-*.c.
7612         (i386_linux_read_description): Generate target description if it
7613         doesn't exist.
7614         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7615         functions.
7616         * features/i386/32bit-linux.c: Re-generated.
7617         * features/i386/32bit-sse.c: Likewise.
7618         * target-descriptions.c (print_c_feature::visit): Print code to
7619         set register number if needed.
7620         (print_c_feature) <m_next_regnum>: New field.
7621
7622 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7623
7624         * features/Makefile (CFILES): Rename with TDESC_CFILES.
7625         (FEATURE_XMLFILES): New.
7626         (FEATURE_CFILES): New.
7627         New rules.
7628         (clean-cfiles): Remove generated c files.
7629         * features/i386/32bit-avx.c: Generated.
7630         * features/i386/32bit-avx512.c: Generated.
7631         * features/i386/32bit-core.c: Generated.
7632         * features/i386/32bit-linux.c: Generated.
7633         * features/i386/32bit-mpx.c: Generated.
7634         * features/i386/32bit-pkeys.c: Generated.
7635         * features/i386/32bit-sse.c: Generated.
7636         * target-descriptions.c: Include algorithm.
7637         (tdesc_element_visitor): Add method visit_end.
7638         (print_c_tdesc): Implement visit_end.
7639         (print_c_tdesc:: m_filename_after_features): Move it to
7640         protected.
7641         (print_c_feature): New class.
7642         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7643         name starts with "i386/32bit-".
7644
7645 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7646
7647         * target-descriptions.c (tdesc_element_visitor): New class.
7648         (tdesc_element): New class.
7649         (tdesc_reg): Inherit from tdesc_element.
7650         (tdesc_reg::accept): New function.
7651         (tdesc_type): Inherit from tdesc_element.
7652         (tdesc_type::accept): New function.
7653         (tdesc_feature): Inherit from tdesc_element.
7654         (tdesc_feature::accept): New function.
7655         (target_desc): Inherit from tdesc_element.
7656         (target_desc::target_desc): New.
7657         (target_desc::~target_desc): New.
7658         (target_desc::accept): New.
7659         (allocate_target_description): Use new.
7660         (free_target_description): Use delete.
7661         (print_c_tdesc): New class.
7662         (maint_print_c_tdesc_cmd): Adjust.
7663
7664         * features/aarch64.c: Re-generated.
7665         * features/arc-arcompact.c: Re-generated.
7666         * features/arc-v2.c: Re-generated.
7667         * features/arm/arm-with-iwmmxt.c: Re-generated.
7668         * features/arm/arm-with-m.c: Re-generated.
7669         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
7670         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
7671         * features/arm/arm-with-neon.c: Re-generated.
7672         * features/arm/arm-with-vfpv2.c: Re-generated.
7673         * features/arm/arm-with-vfpv3.c: Re-generated.
7674         * features/i386/amd64-avx-avx512.c: Re-generated.
7675         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7676         * features/i386/amd64-avx.c: Re-generated.
7677         * features/i386/amd64-avx-linux.c: Re-generated.
7678         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
7679         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7680         * features/i386/amd64-avx-mpx.c: Re-generated.
7681         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
7682         * features/i386/amd64.c: Re-generated.
7683         * features/i386/amd64-linux.c: Re-generated.
7684         * features/i386/amd64-mpx.c: Re-generated.
7685         * features/i386/amd64-mpx-linux.c: Re-generated.
7686         * features/i386/i386-avx-avx512.c: Re-generated.
7687         * features/i386/i386-avx-avx512-linux.c: Re-generated.
7688         * features/i386/i386-avx.c: Re-generated.
7689         * features/i386/i386-avx-linux.c: Re-generated.
7690         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
7691         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
7692         * features/i386/i386-avx-mpx.c: Re-generated.
7693         * features/i386/i386-avx-mpx-linux.c: Re-generated.
7694         * features/i386/i386.c: Re-generated.
7695         * features/i386/i386-linux.c: Re-generated.
7696         * features/i386/i386-mmx.c: Re-generated.
7697         * features/i386/i386-mmx-linux.c: Re-generated.
7698         * features/i386/i386-mpx.c: Re-generated.
7699         * features/i386/i386-mpx-linux.c: Re-generated.
7700         * features/i386/x32-avx-avx512.c: Re-generated.
7701         * features/i386/x32-avx-avx512-linux.c: Re-generated.
7702         * features/i386/x32-avx.c: Re-generated.
7703         * features/i386/x32-avx-linux.c: Re-generated.
7704         * features/i386/x32.c: Re-generated.
7705         * features/i386/x32-linux.c: Re-generated.
7706         * features/microblaze.c: Re-generated.
7707         * features/microblaze-with-stack-protect.c: Re-generated.
7708         * features/mips64-dsp-linux.c: Re-generated.
7709         * features/mips64-linux.c: Re-generated.
7710         * features/mips-dsp-linux.c: Re-generated.
7711         * features/mips-linux.c: Re-generated.
7712         * features/nds32.c: Re-generated.
7713         * features/nios2.c: Re-generated.
7714         * features/nios2-linux.c: Re-generated.
7715         * features/rs6000/powerpc-32.c: Re-generated.
7716         * features/rs6000/powerpc-32l.c: Re-generated.
7717         * features/rs6000/powerpc-403.c: Re-generated.
7718         * features/rs6000/powerpc-403gc.c : Re-generated.
7719         * features/rs6000/powerpc-405.c: Re-generated.
7720         * features/rs6000/powerpc-505.c: Re-generated.
7721         * features/rs6000/powerpc-601.c: Re-generated.
7722         * features/rs6000/powerpc-602.c: Re-generated.
7723         * features/rs6000/powerpc-603.c: Re-generated.
7724         * features/rs6000/powerpc-604.c: Re-generated.
7725         * features/rs6000/powerpc-64.c: Re-generated.
7726         * features/rs6000/powerpc-64l.c: Re-generated.
7727         * features/rs6000/powerpc-7400.c: Re-generated.
7728         * features/rs6000/powerpc-750.c: Re-generated.
7729         * features/rs6000/powerpc-860.c: Re-generated.
7730         * features/rs6000/powerpc-altivec32.c: Re-generated.
7731         * features/rs6000/powerpc-altivec32l.c: Re-generated.
7732         * features/rs6000/powerpc-altivec64.c: Re-generated.
7733         * features/rs6000/powerpc-altivec64l.c: Re-generated.
7734         * features/rs6000/powerpc-cell32l.c: Re-generated.
7735         * features/rs6000/powerpc-cell64l.c: Re-generated.
7736         * features/rs6000/powerpc-e500.c: Re-generated.
7737         * features/rs6000/powerpc-e500l.c: Re-generated.
7738         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
7739         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
7740         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
7741         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
7742         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
7743         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
7744         * features/rs6000/powerpc-vsx32.c: Re-generated.
7745         * features/rs6000/powerpc-vsx32l.c: Re-generated.
7746         * features/rs6000/powerpc-vsx64.c: Re-generated.
7747         * features/rs6000/powerpc-vsx64l.c: Re-generated.
7748         * features/rs6000/rs6000.c: Re-generated.
7749         * features/s390-linux32.c: Re-generated.
7750         * features/s390-linux32v1.c: Re-generated.
7751         * features/s390-linux32v2.c: Re-generated.
7752         * features/s390-linux64.c: Re-generated.
7753         * features/s390-linux64v1.c: Re-generated.
7754         * features/s390-linux64v2.c: Re-generated.
7755         * features/s390-te-linux64.c: Re-generated.
7756         * features/s390-tevx-linux64.c: Re-generated.
7757         * features/s390-vx-linux64.c: Re-generated.
7758         * features/s390x-linux64.c: Re-generated.
7759         * features/s390x-linux64v1.c: Re-generated.
7760         * features/s390x-linux64v2.c: Re-generated.
7761         * features/s390x-te-linux64.c: Re-generated.
7762         * features/s390x-tevx-linux64.c: Re-generated.
7763         * features/s390x-vx-linux64.c: Re-generated.
7764         * features/sparc/sparc32-solaris.c: Re-generated.
7765         * features/sparc/sparc64-solaris.c: Re-generated.
7766         * features/tic6x-c62x.c: Re-generated.
7767         * features/tic6x-c62x-linux.c: Re-generated.
7768         * features/tic6x-c64x.c: Re-generated.
7769         * features/tic6x-c64x-linux.c: Re-generated.
7770         * features/tic6x-c64xp.c: Re-generated.
7771         * features/tic6x-c64xp-linux.c: Re-generated.
7772
7773 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7774
7775         * i386-linux-tdep.c (i386_linux_read_description): New function.
7776         (i386_linux_core_read_description): Call
7777         i386_linux_read_description.
7778         * i386-linux-tdep.h (i386_linux_read_description): Declare.
7779         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
7780         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
7781         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
7782         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
7783         * x86-linux-nat.c (x86_linux_read_description): Call
7784         i386_linux_read_description.
7785
7786 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7787
7788         * NEWS: Mention it.
7789         * features/Makefile (%.c: %.xml): Pass the xml file name to
7790         command "maint print c-tdesc".
7791         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7792         name from 'arg'.
7793
7794 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7795
7796         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
7797         in-class initialization.
7798         (tdesc_create_feature): Call new instead of XCNEW.
7799         (free_target_description): Ue delete.
7800
7801 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
7802
7803         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
7804
7805 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7806
7807         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
7808         constant.
7809         (amd64_x32_init_abi): Likewise.
7810         * amd64-tdep.h (amd64_init_abi): Update declaration.
7811         (amd64_x32_init_abi): Likewise.
7812
7813 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7814
7815         PR tdep/21717
7816         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
7817         condition for FPSCR.
7818         (arm_linux_store_inferior_registers): Likewise.
7819
7820 2017-07-22  Tom Tromey  <tom@tromey.com>
7821
7822         * break-catch-syscall.c (struct catch_syscall_inferior_data)
7823         <syscalls_counts>: Now a std::vector.
7824         (get_catch_syscall_inferior_data): Use "new".
7825         (catch_syscall_inferior_data_cleanup): Use "delete".
7826         (insert_catch_syscall, remove_catch_syscall)
7827         (clear_syscall_counts): Update.
7828
7829 2017-07-22  Tom Tromey  <tom@tromey.com>
7830
7831         * break-catch-syscall.c (syscall_catchpoint)
7832         <syscalls_to_be_caught>: Now a std::vector<int>
7833         (~syscall_catchpoint): Remove.
7834         (insert_catch_syscall, remove_catch_syscall)
7835         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
7836         (print_mention_catch_syscall, print_recreate_catch_syscall):
7837         Update.
7838         (create_syscall_event_catchpoint): Change type of "filter"
7839         parameter.
7840         (catch_syscall_split_args): Return a std::vector.
7841         (catch_syscall_command_1, catching_syscall_number_1): Update.
7842
7843 2017-07-22  Tom Tromey  <tom@tromey.com>
7844
7845         * break-catch-throw.c (struct exception_catchpoint)
7846         <exception_rx>: Now a std::string.
7847         (~exception_catchpoint): Remove.
7848         (print_one_detail_exception_catchpoint): Update.
7849         (handle_gnu_v3_exceptions): Change type of except_rx.
7850         (extract_exception_regexp): Return a std::string.
7851         (catch_exception_command_1): Update.
7852
7853 2017-07-22  Tom Tromey  <tom@tromey.com>
7854
7855         * break-catch-sig.c (gdb_signal_type): Remove typedef.
7856         (struct signal_catchpoint) <signals_to_be_caught>: Now a
7857         std::vector.
7858         <catch_all>: Now a bool.
7859         (~signal_catchpoint): Remove.
7860         (signal_catchpoint_insert_location)
7861         (signal_catchpoint_remove_location)
7862         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
7863         (signal_catchpoint_print_mention)
7864         (signal_catchpoint_print_recreate)
7865         (signal_catchpoint_explains_signal): Update.
7866         (create_signal_catchpoint): Change type of "filter" and
7867         "catch_all".
7868         (catch_signal_split_args): Return a std::vector.  Change type of
7869         "catch_all".
7870         (catch_signal_command): Update.
7871
7872 2017-07-20  Pedro Alves  <palves@redhat.com>
7873
7874         * ada-lang.c (ada_language_defn): Make extern.
7875         (_initialize_ada_language): Remove add_language call.
7876         * c-lang.c (c_language_defn, cplus_language_defn)
7877         (asm_language_defn, minimal_language_defn): Make extern.
7878         (_initialize_c_language): Delete.
7879         * completer.c (compare_cstrings): Delete, moved to utils.h.
7880         * d-lang.c (d_language_defn): Make extern.
7881         (_initialize_d_language): Remove add_language calls.
7882         * defs.h (enum language): Add comment.
7883         * f-lang.c (f_language_defn): Make extern.
7884         (_initialize_f_language): Remove add_language call.
7885         * go-lang.c (go_language_defn): Make extern.
7886         (_initialize_go_language): Remove add_language call.
7887         * language.c: Include <algorithm>.
7888         (languages): Redefine as const array.
7889         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
7890         (set_language_command): Handle "local".  Use for-range loop.
7891         (set_language): Remove loop.
7892         (language_enum): Rewrite.
7893         (language_def, language_str): Remove loops.
7894         (add_language): Delete.
7895         (add_set_language_command): New, based on add_languages.
7896         (skip_language_trampoline): Adjust.
7897         (local_language_defn): Delete.
7898         (language_gdbarch_post_init): Adjust.
7899         (_initialize_language): Remove add_language calls.  Call
7900         add_set_language_command.
7901         * language.h (add_language): Delete.
7902         (auto_language_defn)
7903         (unknown_language_defn, minimal_language_defn, ada_language_defn)
7904         (asm_language_defn, c_language_defn, cplus_language_defn)
7905         (d_language_defn, f_language_defn, go_language_defn)
7906         (m2_language_defn, objc_language_defn, opencl_language_defn)
7907         (pascal_language_defn, rust_language_defn): Declare.
7908         * m2-lang.c (m2_language_defn): Make extern.
7909         (_initialize_m2_language): Remove add_language call.
7910         * objc-lang.c (objc_language_defn): Make extern.
7911         (_initialize_objc_language): Remove add_language call.
7912         * opencl-lang.c (opencl_language_defn): Make extern.
7913         (_initialize_opencl_language): Remove add_language call.
7914         * p-lang.c (pascal_language_defn): Make extern.
7915         (_initialize_pascal_language): Delete.
7916         * rust-lang.c (rust_language_defn): Make extern.
7917         (_initialize_rust_language): Delete.
7918         * utils.h (compare_cstrings): New static inline function.
7919
7920 2017-07-20  Pedro Alves  <palves@redhat.com>
7921
7922         * ada-lang.c (ada_to_fixed_type_1): Adjust.
7923         (get_var_value): Constify parameters.
7924         (get_int_var_value): Change prototype.
7925         (to_fixed_range_type): Adjust.
7926         * ada-lang.h (get_int_var_value): Change prototype.
7927
7928 2017-07-20  Pedro Alves  <palves@redhat.com>
7929
7930         * dwarf2read.c (dw2_lookup_symbol): Use
7931         SYMBOL_MATCHES_SEARCH_NAME.
7932         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
7933
7934 2017-07-20  Pedro Alves  <palves@redhat.com>
7935
7936         * block.c (block_iter_name_step, block_iter_name_first)
7937         (block_iter_name_next): Delete.
7938         (block_lookup_symbol_primary): Adjust to use
7939         dict_iter_match_first/dict_iter_match_next.
7940         * block.h (block_iter_name_first, block_iter_name_next): Delete
7941         declarations.
7942         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
7943         dict_iter_match_first/dict_iter_match_next.
7944
7945 2017-07-20  Pedro Alves  <palves@redhat.com>
7946
7947         * cp-support.c (cp_find_first_component_aux): Add missing case for
7948         end of string.
7949
7950 2017-07-18  David Blaikie  <dblaikie@gmail.com>
7951
7952         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
7953         of dwo_cu's dwo_file.
7954
7955 2017-07-18  Yao Qi  <yao.qi@linaro.org>
7956
7957         * remote.c (store_registers_using_G): Remove one line comment.
7958
7959 2017-07-18  Yao Qi  <yao.qi@linaro.org>
7960
7961         * regcache.c (regcache_cpy): Simplify it.
7962         (regcache::cpy_no_passthrough): Remove it.
7963         * regcache.h (cpy_no_passthrough): Remove it.
7964         (regcache_dup, regcache_cpy): Update comments.
7965
7966 2017-07-18  Pedro Alves  <palves@redhat.com>
7967
7968         * remote-sim.c (sim_command_completer): Adjust to work with a
7969         completion_tracker instead of a VEC.
7970
7971 2017-07-17  Pedro Alves  <palves@redhat.com>
7972
7973         * completer.c (complete_source_filenames): New function.
7974         (complete_address_and_linespec_locations): New function.
7975         (location_completer): Use complete_address_and_linespec_locations.
7976         (completion_tracker::build_completion_result): Honor the tracker's
7977         request to suppress append.
7978         * completer.h (completion_tracker::suppress_append_ws)
7979         (completion_tracker::set_suppress_append_ws): New methods.
7980         (completion_tracker::m_suppress_append_ws): New field.
7981         (complete_source_filenames): New declaration.
7982         * linespec.c (linespec_complete_what): New.
7983         (struct ls_parser) <complete_what, completion_word,
7984         completion_quote_char, completion_quote_end, completion_tracker>:
7985         New fields.
7986         (string_find_incomplete_keyword_at_end): New.
7987         (linespec_lexer_lex_string): Record quote char.  If in completion
7988         mode, don't throw.
7989         (linespec_lexer_consume_token): Advance the completion word point.
7990         (linespec_lexer_peek_token): Save/restore completion info.
7991         (save_stream_and_consume_token): New.
7992         (set_completion_after_number): New.
7993         (linespec_parse_basic): Set what to complete next depending on
7994         token.  Handle function and label completions specially.
7995         (parse_linespec): Disable objc shortcut in completion mode.  Set
7996         what to complete next depending on token type.  Skip keyword if in
7997         completion mode.
7998         (complete_linespec_component, linespec_complete): New.
7999         * linespec.h (linespec_complete): Declare.
8000
8001 2017-07-17  Pedro Alves  <palves@redhat.com>
8002
8003         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8004         Handle 'operator<' / 'operator<<'.
8005
8006 2017-07-17  Pedro Alves  <palves@redhat.com>
8007
8008         * completer.c (collect_explicit_location_matches): Handle
8009         MATCH_LABEL.
8010         (convert_explicit_location_to_linespec): New, factored out from
8011         ...
8012         (convert_explicit_location_to_sals): ... this.
8013         (complete_label): New.
8014         (linespec_complete_label, find_label_symbols_in_block): New.
8015         (find_label_symbols): Add completion_mode parameter and adjust to
8016         call find_label_symbols_in_block.
8017         * linespec.h (linespec_complete_label): Declare.
8018
8019 2017-07-17  Pedro Alves  <palves@redhat.com>
8020
8021         * ada-lang.c (ada_collect_symbol_completion_matches): Add
8022         complete_symbol_mode parameter.
8023         * cli/cli-cmds.c (complete_command): Get the completion result out
8024         of the handle_brkchars tracker if used a custom word point.
8025         * completer.c: Include "linespec.h".
8026         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8027         (advance_to_expression_complete_word_point): New.
8028         (completion_tracker::completes_to_completion_word): New.
8029         (complete_files_symbols): Pass down
8030         complete_symbol_mode::EXPRESSION.
8031         (explicit_options, probe_options): New.
8032         (collect_explicit_location_matches): Complete on the
8033         explictit_loc->foo instead of word.  Use
8034         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
8035         keyword and options completions.
8036         (backup_text_ptr): Delete.
8037         (skip_keyword): New.
8038         (complete_explicit_location): Remove 'word' parameter.  Add
8039         language, quoted_arg_start and quoted_arg_end parameters.
8040         Rewrite, parsing left to right.
8041         (location_completer): Rewrite.
8042         (location_completer_handle_brkchars): New function.
8043         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8044         (enum complete_line_internal_reason): Adjust comments.
8045         (completion_tracker::discard_completions): New.
8046         (completer_handle_brkchars_func_for_completer): Handle
8047         location_completer.
8048         (gdb_custom_word_point_brkchars)
8049         (gdb_org_rl_basic_quote_characters): New.
8050         (gdb_completion_word_break_characters_throw)
8051         (completion_find_completion_word): Handle trackers that use a
8052         custom word point.
8053         (completion_tracker::advance_custom_word_point_by): New.
8054         (completion_tracker::build_completion_result): Don't rely on
8055         readline appending the quote char.
8056         (gdb_rl_attempted_completion_function_throw): Handle trackers that
8057         use a custom word point.
8058         (gdb_rl_attempted_completion_function): Restore
8059         rl_basic_quote_characters.
8060         * completer.h (class completion_tracker): Extend intro comment.
8061         (completion_tracker::set_quote_char)
8062         (completion_tracker::quote_char)
8063         (completion_tracker::set_use_custom_word_point)
8064         (completion_tracker::use_custom_word_point)
8065         (completion_tracker::custom_word_point)
8066         (completion_tracker::set_custom_word_point)
8067         (completion_tracker::advance_custom_word_point_by)
8068         (completion_tracker::completes_to_completion_word)
8069         (completion_tracker::discard_completions): New methods.
8070         (completion_tracker::m_quote_char)
8071         (completion_tracker::m_use_custom_word_point)
8072         (completion_tracker::m_custom_word_point): New fields.
8073         (advance_to_expression_complete_word_point): Declare.
8074         * f-lang.c (f_collect_symbol_completion_matches): Add
8075         complete_symbol_mode parameter.
8076         * language.h (struct language_defn)
8077         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8078         parameter.
8079         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
8080         (linespec_complete_function): New function.
8081         (linespec_lexer_lex_keyword): Adjust.
8082         * linespec.h (linespec_keywords, linespec_complete_function): New
8083         declarations.
8084         * location.c (find_end_quote): New function.
8085         (explicit_location_lex_one): Add explicit_completion_info
8086         parameter.  Save quoting info.  Don't throw if being called for
8087         completion.  Don't handle Ada operators here.
8088         (is_cp_operator, skip_op_false_positives, first_of)
8089         (explicit_location_lex_one_function): New function.
8090         (string_to_explicit_location): Replace 'dont_throw' parameter with
8091         an explicit_completion_info pointer parameter.  Handle it.  Don't
8092         use explicit_location_lex_one to lex function names.  Use
8093         explicit_location_lex_one_function instead.
8094         * location.h (struct explicit_completion_info): New.
8095         (string_to_explicit_location): Replace 'dont_throw' parameter with
8096         an explicit_completion_info pointer parameter.
8097         * symtab.c (default_collect_symbol_completion_matches_break_on):
8098         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
8099         (default_collect_symbol_completion_matches)
8100         (collect_symbol_completion_matches): Add complete_symbol_mode
8101         parameter.
8102         (collect_symbol_completion_matches_type): Pass down
8103         complete_symbol_mode::EXPRESSION.
8104         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8105         parameter.  Handle LINESPEC mode.
8106         * symtab.h (complete_symbol_mode): New.
8107         (default_collect_symbol_completion_matches_break_on)
8108         (default_collect_symbol_completion_matches)
8109         (collect_symbol_completion_matches)
8110         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8111         parameter.
8112
8113 2017-07-17  Pedro Alves  <palves@redhat.com>
8114
8115         * utils.c (enum class strncmp_iw_mode): New.
8116         (strcmp_iw): Rename to ...
8117         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
8118         parameters.  Handle them.
8119         (strncmp_iw): New.
8120         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8121         * utils.h (strncmp_iw): Declare.
8122         (strcmp_iw): Move describing comments here.
8123
8124 2017-07-17  Pedro Alves  <palves@redhat.com>
8125
8126         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8127         CP_OPERATOR_STR.
8128         * c-typeprint.c (is_type_conversion_operator): Use
8129         CP_OPERATOR_STR.
8130         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8131         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8132         CP_OPERATOR_LEN.
8133         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8134         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8135         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8136         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8137         CP_OPERATOR_STR.
8138         * location.c: Include "cp-support.h".
8139         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8140         CP_OPERATOR_STR.
8141         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8142         CP_OPERATOR_LEN.
8143
8144 2017-07-17  Pedro Alves  <palves@redhat.com>
8145
8146         * cli/cli-cmds.c (complete_command): Use a completion tracker
8147         along with completion_find_completion_word for handle_brkchars
8148         phase.
8149         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8150         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8151         (struct gdb_rl_completion_word_info): New.
8152         (gdb_rl_find_completion_word): New.
8153         (completion_find_completion_word): New.
8154         * completer.h (completion_find_completion_word): Declare.
8155
8156 2017-07-17  Pedro Alves  <palves@redhat.com>
8157
8158         * ada-lang.c (symbol_completion_match): Adjust comments.
8159         (symbol_completion_add): Replace vector parameter with
8160         completion_tracker parameter.  Use it.
8161         (ada_make_symbol_completion_list): Rename to...
8162         (ada_collect_symbol_completion_matches): ... this.  Add
8163         completion_tracker parameter and use it.
8164         (ada_language_defn): Adjust.
8165         * break-catch-syscall.c (catch_syscall_completer): Adjust
8166         prototype and work with completion_tracker instead of VEC.
8167         * breakpoint.c (condition_completer): Adjust prototype and work
8168         with completion_tracker instead of VEC.
8169         * c-lang.c (c_language_defn, cplus_language_defn)
8170         (asm_language_defn, minimal_language_defn): Adjust to renames.
8171         * cli/cli-cmds.c (complete_command): Rework using
8172         completion_tracker.  Catch exceptions when completing.
8173         * cli/cli-decode.c (integer_unlimited_completer)
8174         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8175         with completion_tracker instead of VEC.
8176         * command.h (struct completion_tracker): Forward declare.
8177         (completer_ftype, completer_handle_brkchars_ftype): Change
8178         types.
8179         (complete_on_cmdlist, complete_on_enum): Adjust.
8180         * completer.c: Include <algorithm>.
8181         (struct gdb_completer_state): New.
8182         (current_completion): New global.
8183         (readline_line_completion_function): Delete.
8184         (noop_completer, filename_completer)
8185         (filename_completer_handle_brkchars, complete_files_symbols)
8186         (linespec_location_completer): Adjust to work with a
8187         completion_tracker instead of a VEC.
8188         (string_or_empty): New.
8189         (collect_explicit_location_matches): Adjust to work with a
8190         completion_tracker instead of a VEC.
8191         (explicit_location_completer): Rename to ...
8192         (complete_explicit_location): ... this and adjust to work with a
8193         completion_tracker instead of a VEC.
8194         (location_completer): Adjust to work with a completion_tracker
8195         instead of a VEC.
8196         (add_struct_fields): Adjust to work with a completion_list instead
8197         of VEC.
8198         (expression_completer): Rename to ...
8199         (complete_expression): ... this and adjust to work with a
8200         completion_tracker instead of a VEC.  Use complete_files_symbols.
8201         (expression_completer): Reimplement on top of complete_expression.
8202         (symbol_completer): Adjust to work with a completion_tracker
8203         instead of a VEC.
8204         (enum complete_line_internal_reason): Add describing comments.
8205         (complete_line_internal_normal_command): Adjust to work with a
8206         completion_tracker instead of a VEC.
8207         (complete_line_internal): Rename to ...
8208         (complete_line_internal_1): ... this and adjust to work with a
8209         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
8210         handle_brkchars phase.
8211         (new_completion_tracker): Delete.
8212         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8213         complete_line_internal_1.
8214         (free_completion_tracker): Delete.
8215         (INITIAL_COMPLETION_HTAB_SIZE): New.
8216         (completion_tracker::completion_tracker)
8217         (completion_tracker::~completion_tracker): New.
8218         (maybe_add_completion): Delete.
8219         (completion_tracker::maybe_add_completion)
8220         (completion_tracker::add_completion)
8221         (completion_tracker::add_completions): New.
8222         (throw_max_completions_reached_error): Delete.
8223         (complete_line): Adjust to work with a completion_tracker instead
8224         of a VEC.  Don't create a completion_tracker_t or check for max
8225         completions here.
8226         (command_completer, command_completer_handle_brkchars)
8227         (signal_completer, reg_or_group_completer_1)
8228         (reg_or_group_completer, default_completer_handle_brkchars):
8229         Adjust to work with a completion_tracker.
8230         (gdb_completion_word_break_characters_throw): New.
8231         (gdb_completion_word_break_characters): Reimplement.
8232         (line_completion_function): Delete.
8233         (completion_tracker::recompute_lowest_common_denominator)
8234         (expand_preserving_ws)
8235         (completion_tracker::build_completion_result)
8236         (completion_result::completion_result)
8237         (completion_result::completion_result)
8238         (completion_result::~completion_result)
8239         (completion_result::completion_result)
8240         (completion_result::release_match_list, compare_cstrings)
8241         (completion_result::sort_match_list)
8242         (completion_result::reset_match_list)
8243         (gdb_rl_attempted_completion_function_throw)
8244         (gdb_rl_attempted_completion_function): New.
8245         * completer.h (completion_list, struct completion_result)
8246         (class completion_tracker): New.
8247         (complete_line): Add completion_tracker parameter.
8248         (readline_line_completion_function): Delete.
8249         (gdb_rl_attempted_completion_function): New.
8250         (noop_completer, filename_completer, expression_completer)
8251         (location_completer, symbol_completer, command_completer)
8252         (signal_completer, reg_or_group_completer): Update prototypes.
8253         (completion_tracker_t, new_completion_tracker)
8254         (make_cleanup_free_completion_tracker): Delete.
8255         (enum maybe_add_completion_enum): Delete.
8256         (maybe_add_completion): Delete.
8257         (throw_max_completions_reached_error): Delete.
8258         * corefile.c (complete_set_gnutarget): Adjust to work with a
8259         completion_tracker instead of a VEC.
8260         * cp-abi.c (cp_abi_completer): Adjust to work with a
8261         completion_tracker instead of a VEC.
8262         * d-lang.c (d_language_defn): Adjust.
8263         * disasm.c (disassembler_options_completer): Adjust to work with a
8264         completion_tracker instead of a VEC.
8265         * f-lang.c (f_make_symbol_completion_list): Rename to ...
8266         (f_collect_symbol_completion_matches): ... this.  Adjust to work
8267         with a completion_tracker instead of a VEC.
8268         (f_language_defn): Adjust.
8269         * go-lang.c (go_language_defn): Adjust.
8270         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8271         Adjust to work with a completion_tracker instead of a VEC.
8272         * infrun.c (handle_completer): Likewise.
8273         * interps.c (interpreter_completer): Likewise.
8274         * interps.h (interpreter_completer): Likewise.
8275         * language.c (unknown_language_defn, auto_language_defn)
8276         (local_language_defn): Adjust.
8277         * language.h (language_defn::la_make_symbol_completion_list):
8278         Rename to ...
8279         (language_defn::la_collect_symbol_completion_matches): ... this
8280         and adjust to work with a completion_tracker instead of a VEC.
8281         * m2-lang.c (m2_language_defn): Adjust.
8282         * objc-lang.c (objc_language_defn): Adjust.
8283         * opencl-lang.c (opencl_language_defn): Adjust.
8284         * p-lang.c (pascal_language_defn): Adjust.
8285         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8286         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8287         with a completion_tracker.
8288         * rust-lang.c (rust_language_defn): Adjust.
8289         * symtab.c (free_completion_list, do_free_completion_list)
8290         (return_val, completion_tracker): Delete.
8291         (completion_list_add_name, completion_list_add_symbol)
8292         (completion_list_add_msymbol, completion_list_objc_symbol)
8293         (completion_list_add_fields, add_symtab_completions): Add
8294         completion_tracker parameter and use it.
8295         (default_make_symbol_completion_list_break_on_1): Rename to...
8296         (default_collect_symbol_completion_matches_break_on): ... this.
8297         Add completion_tracker parameter and use it instead of allocating
8298         a completion tracker here.
8299         (default_make_symbol_completion_list_break_on): Delete old
8300         implementation.
8301         (default_make_symbol_completion_list): Delete.
8302         (default_collect_symbol_completion_matches): New.
8303         (make_symbol_completion_list): Delete.
8304         (collect_symbol_completion_matches): New.
8305         (make_symbol_completion_type): Rename to ...
8306         (collect_symbol_completion_matches_type): ... this.  Add
8307         completion_tracker parameter and use it instead of VEC.
8308         (make_file_symbol_completion_list_1): Rename to...
8309         (collect_file_symbol_completion_matches): ... this.  Add
8310         completion_tracker parameter and use it instead of VEC.
8311         (make_file_symbol_completion_list): Delete.
8312         (add_filename_to_list): Use completion_list instead of a VEC.
8313         (add_partial_filename_data::list): Now a completion_list.
8314         (make_source_files_completion_list): Work with a completion_list
8315         instead of a VEC.
8316         * symtab.h: Include "completer.h".
8317         (default_make_symbol_completion_list_break_on)
8318         (default_make_symbol_completion_list, make_symbol_completion_list)
8319         (make_symbol_completion_type, make_file_symbol_completion_list)
8320         (make_source_files_completion_list): Delete.
8321         (default_collect_symbol_completion_matches_break_on)
8322         (default_collect_symbol_completion_matches)
8323         (collect_symbol_completion_matches)
8324         (collect_symbol_completion_matches_type)
8325         (collect_file_symbol_completion_matches)
8326         (make_source_files_completion_list): New.
8327         * top.c (init_main): Don't install a rl_completion_entry_function
8328         hook.  Install a rl_attempted_completion_function hook instead.
8329         * tui/tui-layout.c (layout_completer): Adjust to work with a
8330         completion_tracker.
8331         * tui/tui-regs.c (tui_reggroup_completer):
8332         * tui/tui-win.c (window_name_completer, focus_completer)
8333         (winheight_completer): Adjust to work with a completion_tracker.
8334         * value.c: Include "completer.h".
8335         (complete_internalvar): Adjust to work with a completion_tracker.
8336         * value.h (complete_internalvar): Likewise.
8337
8338 2017-07-17  Pedro Alves  <palves@redhat.com>
8339
8340         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8341         renames.
8342         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8343         comments to completer_ftype's declaration.
8344         <completer_handle_brkchars>: Change type to
8345         completer_handle_brkchars_ftype.
8346         * command.h (completer_ftype): Add describing comment and give
8347         names to parameters.
8348         (completer_ftype_void): Rename to ...
8349         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
8350         (set_cmd_completer_handle_brkchars): Adjust.
8351         * completer.c (filename_completer_handle_brkchars): New function.
8352         (complete_line_internal_normal_command): New function, factored
8353         out from ...
8354         (complete_line_internal): ... here.
8355         (command_completer_handle_brkchars)
8356         (default_completer_handle_brkchars)
8357         (completer_handle_brkchars_func_for_completer): New functions.
8358         * completer.h (set_gdb_completion_word_break_characters): Delete
8359         declaration.
8360         (completer_handle_brkchars_func_for_completer): New declaration.
8361         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8362         completer_handle_brkchars_func_for_completer.
8363
8364 2017-07-17  Pedro Alves  <palves@redhat.com>
8365
8366         * completer.c (symbol_completer): New function, based on
8367         make_symbol_completion_list_fn.
8368         * completer.h (symbol_completer): New declaration.
8369         * guile/scm-cmd.c (cmdscm_completers): Adjust.
8370         * python/py-cmd.c (completers): Adjust.
8371         * symtab.c (make_symbol_completion_list_fn): Delete.
8372         * symtab.h (make_symbol_completion_list_fn): Delete.
8373         * cli/cli-decode.c (add_cmd): Adjust.
8374
8375 2017-07-17  Pedro Alves  <palves@redhat.com>
8376
8377         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8378         * dwarf2read.c: Include "filename-seen-cache.h".
8379         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8380         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8381         * filename-seen-cache.c: New file.
8382         * filename-seen-cache.h: New file.
8383         * symtab.c: Include "filename-seen-cache.h".
8384         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8385         (create_filename_seen_cache, clear_filename_seen_cache)
8386         (delete_filename_seen_cache, filename_seen): Delete, parts moved
8387         to filename-seen-cache.h/filename-seen-cache.c.
8388         (output_source_filename, sources_info)
8389         (maybe_add_partial_symtab_filename)
8390         (make_source_files_completion_list): Adjust to use
8391         filename_seen_cache.
8392
8393 2017-07-17  Pedro Alves  <palves@redhat.com>
8394
8395         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8396         fields.
8397         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8398         dwarf2_debug_sections*)): New.
8399         (dwarf2_per_objfile::dwarf2_per_objfile(const
8400         dwarf2_per_objfile&)): Declare as deleted.
8401         (dwarf2_per_objfile::operator=): Declare as deleted.
8402         (dwarf2_per_objfile::dwarf2_per_objfile)
8403         (dwarf2_per_objfile::~dwarf2_per_objfile)
8404         (dwarf2_per_objfile::free_cached_comp_units): New.
8405         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8406         ctor.  Call dwarf2_per_objfile's ctor manually.
8407         (dwarf2_locate_sections): Deleted/refactored as ...
8408         (dwarf2_per_objfile::locate_sections): ... this new method.
8409         (free_cached_comp_units): Defer to
8410         dwarf2_per_objfile::free_cached_comp_units.
8411         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8412
8413 2017-07-14  Tom Tromey  <tom@tromey.com>
8414
8415         PR rust/21764:
8416         * rust-exp.y (convert_ast_to_expression): Add "want_type"
8417         parameter.
8418         <UNOP_SIZEOF>: Split into separate case.
8419         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
8420
8421 2017-07-14  Tom Tromey  <tom@tromey.com>
8422
8423         PR rust/21763:
8424         * symtab.c (symbol_matches_domain): Add language_rust to special
8425         case.
8426         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8427         treat LOC_TYPEDEF symbols as variables.
8428
8429 2017-07-14  Pedro Alves  <palves@redhat.com>
8430
8431         * symtab.c (make_file_symbol_completion_list_1): Iterate over
8432         symtabs matching all symtabs with SRCFILE as file name instead of
8433         only considering the first hit, with lookup_symtab.
8434
8435 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8436
8437         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8438         operator_name parameters.
8439         (gen_expr): Update function call.
8440
8441 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8442
8443         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8444         parameter.
8445         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8446         Likewise.
8447         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8448         parameter, use agent_expr::gdbarch instead, update function
8449         calls.
8450         (locexpr_tracepoint_var_ref): Likewise.
8451         (loclist_tracepoint_var_ref): Likewise.
8452         * ax-gdb.c (gen_trace_static_fields): Likewise.
8453         (gen_traced_pop): Likewise.
8454         (gen_frame_args_address): Likewise.
8455         (gen_frame_locals_address): Likewise.
8456         (gen_var_ref): Likewise.
8457         (gen_struct_ref_recursive): Likewise.
8458         (gen_static_field): Likewise.
8459         (gen_maybe_namespace_elt): Likewise.
8460         (gen_expr): Likewise.
8461         (gen_trace_for_var): Likewise.
8462         (gen_trace_for_expr): Likewise.
8463         (gen_trace_for_return_address): Likewise.
8464
8465 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8466
8467         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8468         parameter.
8469         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8470
8471 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8472
8473         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8474         from ax, update calls.
8475         (gen_usual_arithmetic): Likewise.
8476         (gen_integral_promotions): Likewise.
8477         (gen_bitfield_ref): Likewise.
8478         (gen_primitive_field): Likewise.
8479         (gen_struct_ref_recursive): Likewise.
8480         (gen_struct_ref): Likewise.
8481         (gen_maybe_namespace_elt): Likewise.
8482         (gen_struct_elt_for_reference): Likewise.
8483         (gen_namespace_elt): Likewise.
8484         (gen_aggregate_elt_ref): Likewise.
8485         (gen_expr): Get gdbarch from ax, update calls.
8486         (gen_expr_binop_rest): Likewise.
8487
8488 2017-07-13  Pedro Alves  <palves@redhat.com>
8489
8490         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8491         as default tdesc.
8492         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8493         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8494         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8495         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
8496         tdep.
8497         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8498         Get final tdesc from the tdep.
8499         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8500         default tdesc.
8501         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8502         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8503         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8504         Use it as default tdesc.
8505         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8506         down to amd_init_abi.  No longer handle fallback tdesc here.
8507         * amd64-tdep.h (tdesc_x32): Declare.
8508         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8509         parameter.
8510         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8511         as default tdesc.
8512
8513 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8514
8515         * s390-linux-tdep.c (s390_process_record): Add support for
8516         instructions new in arch12.
8517
8518 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8519
8520         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8521         PT_GETFSBASE and PT_GETGSBASE.
8522         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8523         PT_SETGSBASE.
8524
8525 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8526
8527         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8528         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8529         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8530         those rules.
8531         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8532         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8533         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8534         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8535         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8536         * features/i386/amd64.xml: Add 64bit-segments.xml.
8537         * features/i386/amd64-avx-avx512.c: Regenerated.
8538         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8539         * features/i386/amd64-avx-mpx.c: Regenerated.
8540         * features/i386/amd64-avx.c: Regenerated.
8541         * features/i386/amd64-mpx.c: Regenerated.
8542         * features/i386/amd64.c: Regenerated.
8543         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8544         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8545         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8546         * regformats/i386/amd64-avx.dat: Regenerated.
8547         * regformats/i386/amd64-mpx.dat: Regenerated.
8548         * regformats/i386/amd64.dat: Regenerated.
8549
8550 2017-07-10  Yao Qi  <yao.qi@linaro.org>
8551
8552         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8553         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8554
8555 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
8556
8557         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8558         unsetenv.
8559         * gnulib/aclocal.m4: Regenerate.
8560         * gnulib/config.in: Regenerate.
8561         * gnulib/configure: Regenerate.
8562         * gnulib/import/Makefile.am: Regenerate.
8563         * gnulib/import/Makefile.in: Regenerate.
8564         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8565         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8566         * gnulib/import/m4/environ.m4: New file.
8567         * gnulib/import/m4/setenv.m4: New file.
8568         * gnulib/import/setenv.c: New file.
8569         * gnulib/import/unsetenv.c: New file.
8570
8571 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
8572
8573         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8574         address when op is DW_OP_addr.
8575
8576 2017-07-09  Tom Tromey  <tom@tromey.com>
8577
8578         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8579         check and apply to outer type.
8580
8581 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8582
8583         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8584         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8585         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8586         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8587
8588 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8589
8590         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8591
8592 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8593
8594         * corelow.c (get_core_siginfo): Remove.
8595         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8596         instead of get_core_siginfo.
8597         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8598         * gdbarch.h: Re-generate.
8599         * gdbarch.c: Re-generate.
8600         * linux-tdep.c (linux_core_xfer_siginfo): New.
8601         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8602
8603 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8604
8605         * corelow.c (thread_section_name): Move to ...
8606         * gdbcore.h (thread_section_name): ... here.
8607
8608 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8609
8610         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8611         (struct siginfo32): New.
8612         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8613         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8614         via ptrace(PT_LWPINFO).
8615
8616 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8617
8618         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8619         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8620         (fbsd_get_siginfo_type): New.
8621         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8622         (_initialize_fbsd_tdep): New.
8623
8624 2017-07-06  David Blaikie  <dblaikie@gmail.com>
8625
8626         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8627         a singular dwo_unit*) to support multiple CUs in the same way that
8628         multiple TUs are supported.
8629         (create_cus_hash_table): Replace create_dwo_cu with a function for
8630         parsing multiple CUs from a DWO file.
8631         (open_and_init_dwo_file): Use create_cus_hash_table rather than
8632         create_dwo_cu.
8633         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8634         htab_find, rather than comparing the signature to a singleton CU in
8635         the dwo_file.
8636
8637 2017-07-06  Pedro Alves  <palves@redhat.com>
8638
8639         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8640
8641 2017-07-04  Pedro Alves  <palves@redhat.com>
8642
8643         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8644         * gdbtypes.h (TYPE_STATIC): Delete.
8645         (struct fn_field) <is_public, is_abstract, is_static, is_final,
8646         is_synchronized, is_native>: Delete.
8647         <dummy>: Bump.
8648         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8649         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8650         (TYPE_FN_FIELD_ABSTRACT): Delete.
8651
8652 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
8653
8654         * buffer.h (buffer_finish): Fix spelling mistakes.
8655
8656 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
8657
8658         * .dir-locals.el: Automatically switch to C-style comments in
8659         versions of Emacs that support the feature.
8660
8661 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8662             Pedro Alves  <palves@redhat.com>
8663
8664         PR cli/21688
8665         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
8666         (process_next_line): New variable 'inline_cmd'.
8667         Adjust 'if' clauses for "python", "compile" and "guile" to use
8668         'command_name_equals' and check for '!inline_cmd'.
8669
8670 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8671
8672         PR cli/21688
8673         * cli/cli-script.c (command_name_equals_not_inline): New function.
8674         (process_next_line): Adjust 'if' clauses for "python", "compile"
8675         and "guile" to use command_name_equals_not_inline.
8676
8677 2017-06-29  Pedro Alves  <palves@redhat.com>
8678
8679         * completer.c (expression_completer): Call
8680         linespec_location_completer instead of location_completer.
8681
8682 2017-06-29  Pedro Alves  <palves@redhat.com>
8683
8684         * completer.c (expression_completer): Remove code that recomputes
8685         'text' from 'word'.
8686
8687 2017-06-29  Yao Qi  <yao.qi@linaro.org>
8688
8689         * regformats/regdat.sh: Generate code with
8690         "ifndef IN_PROCESS_AGENT".
8691
8692 2017-06-28  Pedro Alves  <palves@redhat.com>
8693
8694         * command.h: Include "common/scoped_restore.h".
8695
8696 2017-06-28  Yao Qi  <yao.qi@linaro.org>
8697
8698         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
8699         instead of obstack_grow.
8700
8701 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
8702
8703         PR gdb/21337
8704         * symfile.c (reread_symbols): Call objfiles_changed just before
8705         read_symbols.
8706
8707 2017-06-27  Pedro Alves  <palves@redhat.com>
8708
8709         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
8710         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
8711         (completion_list_add_symbol, completion_list_add_msymbol):
8712         ... these new functions.
8713         (add_symtab_completions)
8714         (default_make_symbol_completion_list_break_on_1): Adjust.
8715
8716 2017-06-27  Pedro Alves  <palves@redhat.com>
8717
8718         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
8719         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
8720         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
8721         dtor.
8722         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
8723         'storage_obstack' field an auto_obstack.  In-class initialize all
8724         non-bitfield fields.  Make minsyms_read bool.
8725         * symfile.c (read_symbols): Adjust.
8726
8727 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
8728
8729         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
8730         (gdbsim_store_register): Likewise.
8731
8732 2017-06-27  Pedro Alves  <palves@redhat.com>
8733
8734         * c-exp.y (name_obstack): Now an auto_obstack.
8735         (yylex): Use auto_obstack::clear.
8736         (c_parse): Use auto_obstack::clear instead of reinitializing and
8737         freeing the obstack.
8738         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
8739         * d-exp.y (name_obstack): Now an auto_obstack.
8740         (yylex): Use auto_obstack::clear.
8741         (d_parse): Use auto_obstack::clear instead of reinitializing and
8742         freeing the obstack.
8743         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
8744         auto_obstack.
8745         * dwarf2read.c (create_addrmap_from_index)
8746         (dwarf2_build_psymtabs_hard)
8747         (update_enumeration_type_from_children): Likewise.
8748         * gdb_obstack.h (auto_obstack): New type.
8749         * go-exp.y (name_obstack): Now an auto_obstack.
8750         (build_packaged_name): Use auto_obstack::clear.
8751         (go_parse): Use auto_obstack::clear instead of reinitializing and
8752         freeing the obstack.
8753         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
8754         auto_obstack.
8755         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
8756         * rust-exp.y (work_obstack): Now an auto_obstack.
8757         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
8758         reinitializing and freeing the obstack.
8759         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
8760         (host_char_to_target): Use auto_obstack.
8761         * utils.h (make_cleanup_obstack_free): Delete declaration.
8762         * valprint.c (generic_emit_char, generic_printstr): Use
8763         auto_obstack.
8764
8765 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
8766
8767         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
8768         thread.
8769         (darwin_init_thread_list): Don't update dummy thread.
8770         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
8771
8772 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8773
8774         * record-full.c (netorder16): Remove.
8775
8776 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8777
8778         * common/diagnostics.h: Define macros for GCC.
8779         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
8780         * common/vec.h: Include diagnostics.h.
8781         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
8782         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
8783         warning.
8784
8785 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8786
8787         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
8788         New macro.
8789         * ada-lex.l: Ignore deprecated register warnings.
8790
8791 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8792
8793         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8794         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8795
8796 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8797
8798         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
8799         its own line.
8800
8801 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8802
8803         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
8804
8805 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
8806
8807         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
8808         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
8809         (xtensa_register_read_masked): Likewise.
8810
8811 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
8812
8813         * common/environ.c (gdb_environ::unset): Update comment.
8814
8815 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8816
8817         * python/py-unwind.c (pyuw_sniffer): Allocate space for
8818         registers.
8819
8820 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8821
8822         * record-full.c (record_full_exec_insn): Use byte_vector.
8823
8824 2017-06-22  Yao Qi  <yao.qi@linaro.org>
8825
8826         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
8827         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8828
8829 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8830
8831         * remote.c (cached_reg): Move from here...
8832         * regcache.h (cached_reg): ...to here.
8833         * python/py-unwind.c (struct reg_info): Remove.
8834         (cached_frame_info): Use cached_reg_t.
8835         (pyuw_prev_register): Likewise.
8836         (pyuw_sniffer): Use cached_reg_t and allocate registers.
8837         (pyuw_dealloc_cache): Free all registers.
8838
8839 2017-06-22  Pedro Alves  <palves@redhat.com>
8840             Simon Marchi  <simon.marchi@ericsson.com>
8841
8842         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
8843         warning.
8844         * common/diagnostics.h: New file.
8845
8846 2017-06-22  Pedro Alves  <palves@redhat.com>
8847
8848         * common/agent.h: Add include guards.
8849
8850 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
8851
8852         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
8853         talk about addressable units instead of bytes.
8854
8855 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8856
8857         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
8858         of '::const_iterator'.
8859
8860 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8861
8862         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8863         'unittests/environ-selftests.c'.
8864         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
8865         * charset.c (find_charset_names): Declare object 'iconv_env'.
8866         Update code to use 'iconv_env' object.  Remove call to
8867         'free_environ'.
8868         * common/environ.c: Include <utility>.
8869         (make_environ): Delete function.
8870         (free_environ): Delete function.
8871         (gdb_environ::clear): New function.
8872         (gdb_environ::operator=): New function.
8873         (gdb_environ::get): Likewise.
8874         (environ_vector): Delete function.
8875         (set_in_environ): Delete function.
8876         (gdb_environ::set): New function.
8877         (unset_in_environ): Delete function.
8878         (gdb_environ::unset): New function.
8879         (gdb_environ::envp): Likewise.
8880         * common/environ.h: Include <vector>.
8881         (struct gdb_environ): Delete; transform into...
8882         (class gdb_environ): ... this class.
8883         (free_environ): Delete prototype.
8884         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
8885         environ_vector): Likewise.
8886         * infcmd.c (run_command_1): Update code to call
8887         'envp' from 'gdb_environ' class.
8888         (environment_info): Update code to call methods from 'gdb_environ'
8889         class.
8890         (unset_environment_command): Likewise.
8891         (path_info): Likewise.
8892         (path_command): Likewise.
8893         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
8894         (inferior::inferior): Initialize 'environment' using the host's
8895         information.
8896         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
8897         Include "environ.h".
8898         (class inferior) <environment>: Change type from 'struct
8899         gdb_environ' to 'gdb_environ'.
8900         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
8901         methods from 'gdb_environ' class.
8902         * solib.c (solib_find_1): Likewise
8903         * unittests/environ-selftests.c: New file.
8904
8905 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8906
8907         * features/i386/i386-linux.xml: Exchange the order of including
8908         32bit-linux.xml and 32bit-sse.xml.
8909         * features/i386/i386-linux.c: Regenerated.
8910
8911 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8912
8913         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
8914         Delete copy ctor and assignment operator.
8915         (tdesc_type): Likewise.
8916         (tdesc_feature): Likewise.
8917         (tdesc_free_reg): Remove.
8918         (tdesc_create_reg): Use new.
8919         (tdesc_free_type): Remove.
8920         (tdesc_create_vector): Use new.
8921         (tdesc_create_union): Likewise.
8922         (tdesc_create_flags): Likewise.
8923         (tdesc_create_enum): Likewise.
8924         (tdesc_free_feature): Delete.
8925         (free_target_description): Use delete.
8926
8927 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
8928
8929         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
8930         registers.
8931
8932 2017-06-19  Pedro Alves  <palves@redhat.com>
8933
8934         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
8935         after gdb::unlinker.
8936
8937 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
8938
8939         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
8940         gdb_environ to access an environment variable.
8941
8942 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
8943
8944         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
8945         gdb_byte*.
8946
8947 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8948
8949         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
8950
8951 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8952
8953         * configure: Re-generate.
8954         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
8955
8956 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8957
8958         * configure: Re-generate.
8959         * warning.m4: Pass -Werror to compiler when checking for
8960         supported warning flags.
8961
8962 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8963
8964         * Makefile.in (COMPILE.pre): Add "-x c++".
8965
8966 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
8967             Pedro Alves  <palves@redhat.com>
8968             Yao Qi  <yao.qi@linaro.org>
8969
8970         * defs.h (RequireLongest): New.
8971         (extract_integer): Declare function template.
8972         (extract_signed_integer): Remove the declaration, but define it
8973         static inline.
8974         (extract_unsigned_integer): Likewise.
8975         (store_integer): Declare function template.
8976         (store_signed_integer): Remove the declaration, but define it
8977         static inline.
8978         (store_unsigned_integer): Likewise.
8979         * findvar.c (extract_integer): New function template.
8980         (extract_signed_integer): Remove.
8981         (extract_unsigned_integer): Remove.
8982         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
8983         instantiations.
8984         (store_integer): New function template.
8985         (store_signed_integer): Remove.
8986         (store_unsigned_integer): Remove.
8987         (store_integer): Explicit instantiations.
8988         * regcache.c (regcache_raw_read_signed): Update.
8989         (regcache::raw_read): New function.
8990         (regcache::raw_read_signed): Remove.
8991         (regcache::raw_read_unsigned): Remove.
8992         (regcache_raw_read_unsigned): Update.
8993         (regcache_raw_write_unsigned): Update.
8994         (regcache::raw_write_signed): Remove.
8995         (regcache::raw_write): New function.
8996         (regcache_cooked_read_signed): Update.
8997         (regcache::raw_write_unsigned): Remove.
8998         (regcache::cooked_read_signed): Remove.
8999         (regcache_cooked_read_unsigned): Update.
9000         (regcache::cooked_read_unsigned): Remove.
9001         (regcache_cooked_write_signed): Update.
9002         (regcache_cooked_write_unsigned): Update.
9003         * regcache.h (regcache) <raw_read_signed>: Remove.
9004         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9005         <raw_read, raw_write>: New.
9006         <cooked_read_signed, cooked_write_signed>: Remove.
9007         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9008         <cooked_read, cooked_write>: New.
9009         * sh64-tdep.c (sh64_pseudo_register_read): Update.
9010         (sh64_pseudo_register_write): Update.
9011
9012 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
9013
9014         * arc-tdep.c (arc_disassembler_options): New variable.
9015         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9016         of default_print_insn.
9017         (arc_delayed_print_insn): Set info->section when needed,
9018         use default_print_insn to retrieve a disassembler.
9019
9020 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
9021
9022         PR gdb/21574
9023         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9024         to mention $SHELL and startup-with-shell.
9025
9026 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
9027
9028         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9029
9030 2017-06-14  Yao Qi  <yao.qi@linaro.org>
9031
9032         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9033         default_print_insn instead of print_insn_aarch64.
9034         * arm-tdep.c (gdb_print_insn_arm): Call
9035         default_print_insn instead of print_insn_big_arm
9036         and print_insn_little_arm.
9037         * i386-tdep.c (i386_print_insn): Call default_print_insn
9038         instead of print_insn_i386.
9039         * ia64-tdep.c (ia64_print_insn): Call
9040         default_print_insn instead of print_insn_ia64.
9041         * mips-tdep.c (gdb_print_insn_mips): Call
9042         default_print_insn instead of print_insn_big_mips
9043         and print_insn_little_mips.
9044         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9045         instead of print_insn_spu.
9046
9047 2017-06-14  Pedro Alves  <palves@redhat.com>
9048
9049         * ada-lang.c: Include "common/byte-vector.h".
9050         (ada_value_primitive_packed_val): Use gdb::byte_vector.
9051         * charset.c (wchar_iterator::iterate): Resize the vector instead
9052         of reserving it.
9053         * common/byte-vector.h: Include "common/def-vector.h".
9054         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9055         * cli/cli-dump.c: Include "common/byte-vector.h".
9056         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9057         * common/byte-vector.h: New file.
9058         * common/def-vector.h: New file.
9059         * common/default-init-alloc.h: New file.
9060         * dwarf2loc.c: Include "common/byte-vector.h".
9061         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9062         instead of reserving it.
9063         * dwarf2read.c: Include "common/byte-vector.h".
9064         (data_buf::m_vec): Now a gdb::byte_vector.
9065         * gdb_regex.c: Include "common/def-vector.h".
9066         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9067         * mi/mi-main.c: Include "common/byte-vector.h".
9068         (mi_cmd_data_read_memory): Use gdb::byte_vector.
9069         * printcmd.c: Include "common/byte-vector.h".
9070         (print_scalar_formatted): Use gdb::byte_vector.
9071         * valprint.c: Include "common/byte-vector.h".
9072         (maybe_negate_by_bytes, print_decimal_chars): Use
9073         gdb::byte_vector.
9074
9075 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9076
9077         * darwin-nat.c: Include "nat/fork-inferior.h".
9078
9079 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9080
9081         * configure.nat: Factor out Darwin bits that are not
9082         architecture-specific.  Add fork-inferior.o.
9083
9084 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9085
9086         * configure.nat: Factor out AIX bits that are not
9087         architecture-specific.  Add fork-inferior.o.
9088
9089 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9090
9091         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
9092         (read_pieced_value, write_pieced_value): ...here.  Reduce to
9093         wrappers that just call rw_pieced_value.
9094
9095 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9096
9097         * dwarf2loc.c (write_pieced_value): When writing the data for a
9098         memory piece, use write_memory_with_notification instead of
9099         write_memory.
9100
9101 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9102
9103         * valops.c (read_value_memory): Change embedded_offset to
9104         represent a bit offset instead of a byte offset.
9105         * value.h (read_value_memory): Adjust comment.
9106
9107 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9108
9109         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9110         dest_offset_bits and source_offset_bits.
9111         (write_pieced_value): Likewise.
9112
9113 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9114
9115         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9116         given by DW_OP_bit_piece.
9117         (write_pieced_value): Likewise.
9118
9119 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9120
9121         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9122         some other preparations to the places where sufficient information
9123         is available.
9124         (write_pieced_value): Likewise.
9125
9126 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9127
9128         * dwarf2loc.c (bits_to_bytes): New function.
9129         (read_pieced_value): Fix offset calculations for register pieces
9130         on big-endian targets.
9131         (write_pieced_value): Likewise.
9132
9133 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9134
9135         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9136         (write_pieced_value): Likewise.
9137
9138 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9139
9140         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9141         transfer the source value's least significant bits, instead of its
9142         lowest-addressed ones.  Rename type_len to max_offset.
9143         (read_pieced_value): Mirror above changes to write_pieced_value as
9144         applicable.
9145
9146 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9147
9148         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9149         truncate full bytes from dest_offset_bits before using it as an
9150         offset into the buffer.
9151
9152 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9153
9154         * dwarf2loc.c (write_pieced_value): Include transfer size in
9155         byte-wise check.
9156
9157 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9158
9159         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9160         calculation of this_size.
9161
9162 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9163
9164         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9165         when targeting a bit-field.
9166         (write_pieced_value): Likewise.
9167
9168 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9169
9170         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9171         (allocate_piece_closure): Drop addr_size parameter.
9172         (dwarf2_evaluate_loc_desc_full): Adjust call to
9173         allocate_piece_closure.
9174
9175 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9176
9177         PR gdb/21226
9178         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9179         the LSB end, independent of endianness.
9180
9181 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9182
9183         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9184         size capping.
9185
9186 2017-06-13  Yao Qi  <yao.qi@linaro.org>
9187
9188         * mips-linux-nat.c: Move include features/mips*-linux.c to
9189         mips-linux-tdep.c.
9190         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9191         to mips-linux-tdep.c.
9192         * mips-linux-tdep.c: Include features/mips*-linux.c
9193         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9194         functions.
9195         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9196         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9197         (tdesc_mips64_dsp_linux): Declare.
9198
9199 2017-06-12  Tom Tromey  <tom@tromey.com>
9200
9201         * valprint.h (val_print_type_code_int): Remove.
9202         * valprint.c (generic_val_print_int): Always call
9203         val_print_scalar_formatted.
9204         (val_print_type_code_int): Remove.
9205         * printcmd.c (print_scalar_formatted): Handle options->format==0.
9206         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9207         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9208         * ada-valprint.c (ada_val_print_num): Use
9209         val_print_scalar_formatted.
9210
9211 2017-06-12  Tom Tromey  <tom@tromey.com>
9212
9213         * printcmd.c (print_scalar_formatted): Unify the two switches.
9214         Don't convert scalars to LONGEST.
9215
9216 2017-06-12  Tom Tromey  <tom@tromey.com>
9217
9218         PR exp/16225:
9219         * valprint.h (print_decimal_chars): Update.
9220         * valprint.c (maybe_negate_by_bytes): New function.
9221         (print_decimal_chars): Add "is_signed" argument.
9222         * printcmd.c (print_scalar_formatted): Update.
9223
9224 2017-06-12  Tom Tromey  <tom@tromey.com>
9225
9226         PR exp/16225:
9227         * valprint.h (print_binary_chars, print_hex_chars): Update.
9228         * valprint.c (val_print_type_code_int): Update.
9229         (print_binary_chars): Add "zero_pad" argument.
9230         (emit_octal_digit): New function.
9231         (print_octal_chars): Don't zero-pad.
9232         (print_decimal_chars): Likewise.
9233         (print_hex_chars): Add "zero_pad" argument.
9234         * sh64-tdep.c (sh64_do_fp_register): Update.
9235         * regcache.c (regcache::dump): Update.
9236         * printcmd.c (print_scalar_formatted): Update.
9237         * infcmd.c (default_print_one_register_info): Update.
9238
9239 2017-06-12  Pedro Alves  <palves@redhat.com>
9240             Alan Hayward  <alan.hayward@arm.com>
9241
9242         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9243         (mips_eabi_push_dummy_call): Rename local 'regsize' to
9244         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
9245         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9246         Assert that abi_regsize bytes fit in 'ref_valbuf'.
9247
9248 2017-06-12  Pedro Alves  <palves@redhat.com>
9249
9250         * dwarf2read.c (mapped_symtab::data): Now a vector of
9251         symtab_index_entry instead of vector of
9252         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
9253         whether an element's name is NULL instead of checking whether the
9254         element itself is NULL.
9255         (find_slot): Change return type.  Adjust.
9256         (hash_expand, , add_index_entry, uniquify_cu_indices)
9257         (write_hash_table): Adjust.
9258
9259 2017-06-12  Pedro Alves  <palves@redhat.com>
9260
9261         * dwarf2read.c (recursively_count_psymbols): New function.
9262         (write_psymtabs_to_index): Call it to compute number of psyms and
9263         pass estimate size of psyms_seen to unordered_set's ctor.
9264
9265 2017-06-12  Pedro Alves  <palves@redhat.com>
9266
9267         * dwarf2read.c (write_hash_table): Check if key already exists
9268         before emplacing.
9269
9270 2017-06-12  Pedro Alves  <palves@redhat.com>
9271
9272         * dwarf2read.c (data_buf::append_space): Rename to...
9273         (data_buf::grow): ... this, and make private.  Adjust all callers.
9274         (data_buf::append_uint): New method.
9275         (add_address_entry, write_one_signatured_type)
9276         (write_psymtabs_to_index): Use it.
9277
9278 2017-06-12  Pedro Alves  <palves@redhat.com>
9279
9280         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9281         (file_write (FILE *, const std::vector<Elem>&)): Delete.
9282         (data_buf::file_write): Call ::fwrite directly.
9283
9284 2017-06-12  Pedro Alves  <palves@redhat.com>
9285
9286         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9287         std::vector::erase.
9288
9289 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9290
9291         Code cleanup: C++ify .gdb_index producer.
9292         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9293         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9294         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9295         (create_strtab, add_string): Remove.
9296         (file_write, data_buf): New.
9297         (struct symtab_index_entry): Use std::vector for cu_indices.
9298         (struct mapped_symtab): Use std::vector for data.
9299         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9300         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9301         Remove.
9302         (find_slot): Change return type.  Update it to the new data structures.
9303         (hash_expand, add_index_entry): Update it to the new data structures.
9304         (offset_type_compare): Remove.
9305         (uniquify_cu_indices): Update it to the new data structures.
9306         (c_str_view, c_str_view_hasher, vector_hasher): New.
9307         (add_indices_to_cpool): Remove.
9308         (write_hash_table): Update it to the new data structures.
9309         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9310         (eq_psymtab_cu_index): Remove.
9311         (psym_index_map): New typedef.
9312         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9313         reference and std::unordered_map for cu_index_htab.
9314         (add_address_entry, add_address_entry_worker, write_address_map)
9315         (write_psymbols): Update it to the new data structures.
9316         (write_obstack): Remove.
9317         (struct signatured_type_index_data): Change types_list to a data_buf
9318         reference and psyms_seen to a std::unordered_set reference.
9319         (write_one_signatured_type, recursively_write_psymbols)
9320         (write_psymtabs_to_index): Update it to the new data structures.
9321
9322 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
9323
9324         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9325         separate-debug-file commands.
9326         * symfile.h (separate_debug_file_debug): New global.
9327         * symfile.c (separate_debug_file_debug): New global.
9328         (separate_debug_file_exists, find_separate_debug_file): Add
9329         debug output.
9330         (_initialize_symfile): Add "set debug separate-debug-file"
9331         command.
9332         * build-id.c (build_id_to_debug_bfd,
9333         find_separate_debug_file_by_buildid): Add debug output.
9334
9335 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
9336
9337         * gdbarch.sh (displaced_step_free_closure): Remove.
9338         * gdbarch.h, gdbarch.c: Re-generate.
9339         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9340         displaced_step_free_closure.
9341         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9342         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9343         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9344         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9345         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9346         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9347         * arch-utils.h (simple_displaced_step_free_closure): Remove.
9348         * arch-utils.c (simple_displaced_step_free_closure): Remove.
9349         * infrun.c (displaced_step_clear): Call xfree instead of
9350         gdbarch_displaced_step_free_closure.
9351
9352 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
9353
9354         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9355         NULL".
9356
9357 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
9358
9359         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9360         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9361         (mn10300_push_dummy_call): Likewise.
9362
9363 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9364
9365         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9366
9367 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9368
9369         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9370
9371 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9372
9373         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9374         able to start inferiors using a shell.
9375         (New remote packets): Announce new packet "QStartupWithShell".
9376         * remote.c: Add PACKET_QStartupWithShell.
9377         (extended_remote_create_inferior): Handle new
9378         PACKET_QStartupWithShell.
9379         (remote_protocol_features) <QStartupWithShell>: New entry for
9380         PACKET_QStartupWithShell.
9381         (_initialize_remote): Call "add_packet_config_cmd" for
9382         QStartupShell.
9383
9384 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9385             Pedro Alves  <palves@redhat.com>
9386
9387         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9388         and "nat/fork-inferior.h".
9389         * common/common-inferior.h: New file, with contents from
9390         "gdb/inferior.h".
9391         * commom/common-utils.c: Include "common-utils.h".
9392         (stringify_argv): New function.
9393         * common/common-utils.h (stringify_argv): New prototype.
9394         * configure.nat: Add "fork-inferior.o" as a dependency for
9395         "*linux*", "fbsd*" and "nbsd*" hosts.
9396         * corefile.c (get_exec_file): Update comment.
9397         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9398         instead of "startup_inferior".
9399         (darwin_create_inferior): Call "add_thread_silent" after
9400         "fork_inferior".
9401         * fork-child.c: Cleanup unnecessary includes.
9402         (SHELL_FILE): Move to "common/common-fork-child.c".
9403         (environ): Likewise.
9404         (exec_wrapper): Initialize.
9405         (get_exec_wrapper): New function.
9406         (breakup_args): Move to "common/common-fork-child.c"; rename to
9407         "breakup_args_for_exec".
9408         (escape_bang_in_quoted_argument): Move to
9409         "common/common-fork-child.c".
9410         (saved_ui): New variable.
9411         (prefork_hook): New function.
9412         (postfork_hook): Likewise.
9413         (postfork_child_hook): Likewise.
9414         (gdb_startup_inferior): Likewise.
9415         (fork_inferior): Move to "common/common-fork-child.c".  Update
9416         function to support gdbserver.
9417         (startup_inferior): Likewise.
9418         * gdbcore.h (get_exec_file): Remove declaration.
9419         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9420         instead of "startup_inferior".  Call "add_thread_silent" after
9421         "fork_inferior".
9422         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9423         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9424         instead of "startup_inferior".  Call "add_thread_silent" after
9425         "fork_inferior".
9426         * inferior.h: Include "common-inferior.h".
9427         (trace_start_error): Move to "common/common-utils.h".
9428         (trace_start_error_with_name): Likewise.
9429         (fork_inferior): Move prototype to "nat/fork-inferior.h".
9430         (startup_inferior): Likewise.
9431         (gdb_startup_inferior): New prototype.
9432         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9433         * nat/fork-inferior.h: New file.
9434         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9435         instead of "startup_inferior".  Call "add_thread_silent" after
9436         "fork_inferior".
9437         * target.h (target_terminal_init): Move prototype to
9438         "target/target.h".
9439         (target_terminal_inferior): Likewise.
9440         (target_terminal_ours): Likewise.
9441         * target/target.h (target_terminal_init): New prototype, moved
9442         from "target.h".
9443         (target_terminal_inferior): Likewise.
9444         (target_terminal_ours): Likewise.
9445         * utils.c (gdb_flush_out_err): New function.
9446
9447 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9448
9449         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9450         * common/common-gdbthread.h: New file, with parts from
9451         "gdb/gdbthread.h".
9452         * gdbthread.h: Include "common-gdbthread.h".
9453         (switch_to_thread): Moved to "common/common-gdbthread.h".
9454
9455 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9456
9457         * Makefile.in (SFILES): Add "common/job-control.c".
9458         (HFILES_NO_SRCDIR): Add "common/job-control.h".
9459         (COMMON_OBS): Add "job-control.o".
9460         * common/job-control.c: New file, with contents from
9461         "gdb/inflow.c".
9462         * common/job-control.h: New file, with contents from "terminal.h".
9463         * fork-child.c: Include "job-control.h".
9464         * inflow.c: Include "job-control.h".
9465         (gdb_setpgid): Move to "common/common-inflow.c".
9466         (_initialize_inflow): Move setting of "job_control" to
9467         "handle_job_control".
9468         * terminal.h (job_control): Moved to "common/common-terminal.h".
9469         (gdb_setpgid): Likewise.
9470         * top.c: Include "job_control.h".
9471         * utils.c: Likewise.
9472         (job_control): Moved to "job-control.c".
9473
9474 2017-06-07  Pedro Alves  <palves@redhat.com>
9475
9476         * Makefile.in (SFILES): Add gdb_regex.c.
9477         (COMMON_OBS): Add gdb_regex.o.
9478         * ada-lang.c (ada_add_standard_exceptions)
9479         (ada_add_exceptions_from_frame, name_matches_regex)
9480         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9481         parameter type to compiled_regex.  Adjust.
9482         (ada_exceptions_list): Use compiled_regex.
9483         * break-catch-throw.c (exception_catchpoint::pattern): Now a
9484         std::unique_ptr<compiled_regex>.
9485         (exception_catchpoint::~exception_catchpoint): Remove regfree
9486         call.
9487         (check_status_exception_catchpoint): Adjust to use compiled_regex.
9488         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9489         * breakpoint.c (solib_catchpoint::compiled): Now a
9490         std::unique_ptr<compiled_regex>.
9491         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9492         (check_status_catch_solib): Adjust to use compiled_regex.
9493         (add_solib_catchpoint): Adjust to use compiled_regex.
9494         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9495         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9496         compiled_regex reference.  Adjust to use it.
9497         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9498         declaration.  Include "gdb_regex.h".
9499         (apropos_cmd): Change regex parameter to compiled_regex reference.
9500         * gdb_regex.c: New file.
9501         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9502         declarations.
9503         (class compiled_regex): New.
9504         * linux-tdep.c: Include "common/gdb_optional.h".
9505         (struct mapping_regexes): New, factored out from
9506         mapping_is_anonymous_p, and adjusted to use compiled_regex.
9507         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9508         gdb::optional and remove cleanups.  Adjust to compiled_regex.
9509         * probe.c: Include "common/gdb_optional.h".
9510         (collect_probes): Use compiled_regex and gdb::optional and remove
9511         cleanups.
9512         * skip.c: Include "common/gdb_optional.h".
9513         (skiplist_entry::compiled_function_regexp): Now a
9514         gdb::optional<compiled_regex>.
9515         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9516         (free_skiplist_entry): Remove regfree call.
9517         (compile_skip_regexp, skip_rfunction_p): Adjust to use
9518         compiled_regex and gdb::optional.
9519         * symtab.c: Include "common/gdb_optional.h".
9520         (search_symbols): Use compiled_regex and gdb::optional.
9521         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9522         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
9523         to gdb_regex.c.
9524
9525 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9526
9527         * regcache.c (regcache::save): Avoid buffer use.
9528         (regcache::dump): Likewise.
9529
9530 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9531
9532         * sh-tdep.c (sh_pseudo_register_read): Remove
9533         MAX_REGISTER_SIZE.
9534         (sh_pseudo_register_write): Likewise.
9535         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9536         (sh64_pseudo_register_write): Likewise
9537
9538 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9539
9540         * aarch64-tdep.c (aarch64_store_return_value): Use
9541         V_REGISTER_SIZE.
9542         (aarch64_pseudo_read_value): Likewise.
9543         (aarch64_pseudo_write): Likewise.
9544
9545 2017-06-06  Yao Qi  <yao.qi@linaro.org>
9546
9547         * regformats/regdef.h (set_register_cache): Remove the
9548         declaration.
9549
9550 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
9551
9552         * frame.c (frame_unwind_register_signed): Use
9553         frame_unwind_register_value.
9554
9555 2017-06-06  Pedro Alves  <palves@redhat.com>
9556
9557         PR breakpoints/21553
9558         * breakpoint.c (create_breakpoints_sal_default)
9559         (init_breakpoint_sal, create_breakpoint_sal): Use
9560         gdb::unique_xmalloc_ptr for string parameters.
9561         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9562         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
9563         (base_breakpoint_create_breakpoints_sal)
9564         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9565         (strace_marker_create_breakpoints_sal)
9566         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9567         string parameters.
9568         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9569         gdb::unique_xmalloc_ptr for string parameters.
9570         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9571         parameters.
9572
9573 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9574
9575         * alpha-tdep.c (alpha_register_to_value): Use
9576         get_frame_register_value.
9577         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9578
9579 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9580
9581         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9582         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9583         (ia64_value_to_register): Likewise.
9584         (ia64_extract_return_value): Likewise.
9585         (ia64_store_return_value): Likewise.
9586         (ia64_push_dummy_call): Likewise.
9587
9588 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
9589
9590         GDB 8.0 released.
9591
9592 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
9593
9594         * x86-linux-nat.c (struct arch_lwp_info): Remove.
9595
9596 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
9597
9598         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9599         parameter.
9600         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9601
9602 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
9603
9604         * event-loop.c (poll_timers): Unallocate timer using delete
9605         instead of xfree.
9606
9607 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9608
9609         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9610         (struct breakpoint) <~breakpoint>: New.
9611         (struct watchpoint): Inherit from breakpoint.
9612         <~watchpoint>: New.
9613         <base>: Remove.
9614         (struct tracepoint): Inherit from breakpoint.
9615         <base>: Remove.
9616         * breakpoint.c (longjmp_breakpoint_ops): Remove.
9617         (struct longjmp_breakpoint): Inherit from breakpoint.
9618         <~longjmp_breakpoint>: New.
9619         <base>: Remove.
9620         (new_breakpoint_from_type): Remove casts.
9621         (watchpoint_in_thread_scope): Remove reference to base field.
9622         (watchpoint_del_at_next_stop): Likewise.
9623         (update_watchpoint): Likewise.
9624         (watchpoint_check): Likewise.
9625         (bpstat_check_watchpoint): Likewise.
9626         (set_longjmp_breakpoint): Likewise.
9627         (struct fork_catchpoint): Inherit from breakpoint.
9628         <base>: Remove.
9629         (struct solib_catchpoint): Inherit from breakpoint.
9630         <~solib_catchpoint>: New.
9631         <base>: Remove.
9632         (dtor_catch_solib): Change to ...
9633         (solib_catchpoint::~solib_catchpoint): ... this.
9634         (breakpoint_hit_catch_solib): Remove reference to base field.
9635         (add_solib_catchpoint): Likewise.
9636         (create_fork_vfork_event_catchpoint): Likewise.
9637         (struct exec_catchpoint): Inherit from breakpoint.
9638         <~exec_catchpoint>: New.
9639         <base>: Remove.
9640         (dtor_catch_exec): Change to ...
9641         (exec_catchpoint::~exec_catchpoint): ... this.
9642         (dtor_watchpoint): Change to ...
9643         (watchpoint::~watchpoint): ... this.
9644         (watch_command_1): Remove reference to base field.
9645         (catch_exec_command_1): Likewise.
9646         (base_breakpoint_dtor): Change to ...
9647         (breakpoint::~breakpoint): ... this.
9648         (base_breakpoint_ops): Remove dtor field value.
9649         (longjmp_bkpt_dtor): Change to ...
9650         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9651         (strace_marker_create_breakpoints_sal): Remove reference to base
9652         field.
9653         (delete_breakpoint): Don't manually call breakpoint destructor.
9654         (create_tracepoint_from_upload): Remove reference to base field.
9655         (trace_pass_set_count): Likewise.
9656         (initialize_breakpoint_ops): Don't initialize
9657         momentary_breakpoint_ops, don't set dtors.
9658         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9659         <~ada_catchpoint>: New.
9660         <base>: Remove.
9661         (create_excep_cond_exprs): Remove reference to base field.
9662         (dtor_exception): Change to ...
9663         (ada_catchpoint::~ada_catchpoint): ... this.
9664         (dtor_catch_exception): Remove.
9665         (dtor_catch_exception_unhandled): Remove.
9666         (dtor_catch_assert): Remove.
9667         (create_ada_exception_catchpoint): Remove reference to base
9668         field.
9669         (initialize_ada_catchpoint_ops): Don't set dtors.
9670         * break-catch-sig.c (struct signal_catchpoint): Inherit from
9671         breakpoint.
9672         <~signal_catchpoint>: New.
9673         <base>: Remove.
9674         (signal_catchpoint_dtor): Change to ...
9675         (signal_catchpoint::~signal_catchpoint): ... this.
9676         (create_signal_catchpoint): Remove reference to base field.
9677         (initialize_signal_catchpoint_ops): Don't set dtor.
9678         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
9679         from breakpoint.
9680         <~syscall_catchpoint>: New.
9681         <base>: Remove.
9682         (dtor_catch_syscall): Change to ...
9683         (syscall_catchpoint::~syscall_catchpoint): ... this.
9684         (create_syscall_event_catchpoint): Remove reference to base
9685         field.
9686         (initialize_syscall_catchpoint_ops): Don't set dtor.
9687         * break-catch-throw.c (struct exception_catchpoint): Inherit
9688         from breakpoint.
9689         <~exception_catchpoint>: New.
9690         <base>: Remove.
9691         (dtor_exception_catchpoint): Change to ...
9692         (exception_catchpoint::~exception_catchpoint): ... this.
9693         (handle_gnu_v3_exceptions): Remove reference to base field.
9694         (initialize_throw_catchpoint_ops): Don't set dtor.
9695         * ctf.c (ctf_get_traceframe_address): Remove reference to base
9696         field.
9697         * remote.c (remote_get_tracepoint_status): Likewise.
9698         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
9699         * tracefile.c (tracefile_fetch_registers): Likewise.
9700         * tracepoint.c (actions_command): Likewise.
9701         (validate_actionline): Likewise.
9702         (tfind_1): Likewise.
9703         (get_traceframe_location): Likewise.
9704         (find_matching_tracepoint_location): Likewise.
9705         (parse_tracepoint_status): Likewise.
9706         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
9707
9708 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9709
9710         * breakpoint.c (struct longjmp_breakpoint): New struct.
9711         (is_tracepoint_type): Change return type to bool.
9712         (is_longjmp_type): New function.
9713         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
9714         (set_raw_breakpoint_without_location): Use
9715         new_breakpoint_from_type.
9716         (set_raw_breakpoint): Likewise.
9717
9718 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9719
9720         * breakpoint.c (new_breakpoint_from_type): New function.
9721         (create_breakpoint_sal): Use new_breakpoint_from_type and
9722         unique_ptr.
9723         (create_breakpoint): Likewise.
9724
9725 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
9726
9727         * memattr.c (mem_info_command): Rename to ...
9728         (info_mem_command): ... this.
9729         (mem_enable_command): Rename to ...
9730         (enable_mem_command): ... this.
9731         (mem_disable_command): Rename to ...
9732         (disable_mem_command): ... this.
9733         (mem_delete_command): Rename to ...
9734         (delete_mem_command): ... this.
9735         (_initialize_mem): Adjust function names.
9736
9737 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9738
9739         * btrace.c (handle_pt_insn_events): New.
9740         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
9741         STATUS.  Split into this and ...
9742         (handle_pt_insn_event_flags): ... this.
9743
9744 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9745
9746         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
9747         and struct pt_insn.resynced.
9748         * configure: Regenerated.
9749         * config.in: Regenerated.
9750
9751 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9752
9753         * btrace.c (ftrace_find_call_by_number): New function.
9754         (ftrace_new_function): Store objects, not pointers.
9755         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
9756         ftrace_new_gap, ftrace_update_function,
9757         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
9758         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
9759         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
9760         btrace_ends_with_single_insn, btrace_call_get): Account for
9761         btrace_thread_info::functions now storing objects.
9762         * btrace.h (struct btrace_thread_info): Add constructor.
9763         (struct btrace_thread_info) <functions>: Make std::vector.
9764         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
9765         Initialize with default values.
9766         * record-btrace.c (record_btrace_frame_sniffer): Account for
9767         btrace_thread_info::functions now storing objects.
9768
9769 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9770
9771         * btrace.c: Remove typedef bfun_s.
9772         (ftrace_new_gap): Directly add gaps to the list of gaps.
9773         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
9774         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
9775         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
9776         instead of gdb VEC.
9777
9778 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9779
9780         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
9781         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
9782         with btrace_thread_info::next_segment and
9783         btrace_thread_info::prev_segment.
9784         * btrace.h: Remove struct btrace_func_link.
9785         (struct btrace_function): Replace pair of function segment pointers
9786         with pair of indices.
9787         * python/py-record-btrace.c (btpy_call_prev_sibling,
9788         btpy_call_next_sibling): Replace references to
9789         btrace_thread_info::segment with btrace_thread_info::next_segment and
9790         btrace_thread_info::prev_segment.
9791         * record-btrace.c (record_btrace_frame_this_id): Use
9792         btrace_find_call_by_number.
9793
9794 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9795
9796         * btrace.c (ftrace_new_function, ftrace_fixup_level,
9797         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9798         btrace_insn_next, btrace_insn_prev): Remove references to
9799         btrace_thread_info::flow.
9800         * btrace.h (struct btrace_function): Remove FLOW.
9801
9802 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9803
9804         * btrace.c (ftrace_find_call_by_number): New function.
9805         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
9806         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
9807         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
9808         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
9809         index.
9810         * btrace.h (struct btrace_function): Turn UP into an index.
9811         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
9812         as an index.
9813         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
9814         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
9815         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
9816
9817 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9818
9819         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9820         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9821         ftrace_update_function, ftrace_compute_global_level_offset,
9822         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
9823         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
9824         btrace_insn_end, btrace_is_empty): Remove references to
9825         btrace_thread_info::begin and btrace_thread_info::end.
9826         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
9827         (struct btrace_thread_info) <functions>: Adjust comment.
9828         * record-btrace.c (record_btrace_start_replaying): Remove reference to
9829         btrace_thread_info::begin.
9830
9831 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9832
9833         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9834         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9835         ftrace_update_function): Remove arguments that implicitly were always
9836         BTINFO->END.
9837         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
9838         Don't pass BTINFO->END.
9839
9840 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9841
9842         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
9843         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
9844         btrace_find_insn_by_number): Replace function segment pointer with
9845         index.
9846         (btrace_insn_cmp): Simplify.
9847         * btrace.h: (struct btrace_insn_iterator) Rename index to
9848         insn_index.  Replace function segment pointer with index into function
9849         segment vector.
9850         * record-btrace.c (record_btrace_call_history): Replace function
9851         segment pointer use with index.
9852         (record_btrace_frame_sniffer): Retrieve function call segment through
9853         vector.
9854         (record_btrace_set_replay): Remove defunc't safety check.
9855
9856 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9857
9858         * btrace.c (btrace_ends_with_single_insn): New function.
9859         (btrace_call_get, btrace_call_number, btrace_call_begin,
9860         btrace_call_end, btrace_call_next, btrace_call_prev,
9861         btrace_find_call_by_number): Use index into call segment vector
9862         instead of pointer.
9863         (btrace_call_cmp): Simplify.
9864         * btrace.h (struct btrace_call_iterator): Replace function call segment
9865         pointer with index into vector.
9866         * record-btrace.c (record_btrace_call_history): Use index instead of
9867         pointer.
9868
9869 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9870
9871         * btrace.c (btrace_insn_begin, btrace_insn_end,
9872         btrace_find_insn_by_number): Add btinfo to iterator.
9873         * btrace.h (struct btrace_insn_iterator): Add btinfo.
9874
9875 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9876
9877         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
9878         and save pointers directly.
9879         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
9880         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
9881         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
9882         changed signature of functions.
9883         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
9884         (btrace_fetch): Remove code that adds btrace_function pointers to
9885         vector of btrace_functions.
9886         (btrace_clear): Simplify freeing vector of btrace_functions.
9887
9888 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9889
9890         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
9891         Replace VEC_* with std::vector functions.
9892         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
9893         (struct btrace_thread_info)<functions>: Change type to std::vector.
9894
9895 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9896
9897         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
9898         "Removed targets and native configurations" up.  Merge duplicate
9899         "New commands" sub-sections.  Add "New options" sub-sections.
9900
9901 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
9902
9903         * defs.h (copy_integer_to_size): New declaration.
9904         * findvar.c (copy_integer_to_size): New function.
9905         (do_cint_test): New selftest function.
9906         (copy_integer_to_size_test): Likewise.
9907         (_initialize_findvar): Likewise.
9908         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
9909         (mips_fbsd_collect_reg): Use raw_collect_integer.
9910         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
9911         (mips64_fill_gregset): Use raw_collect_integer
9912         (mips64_fill_fpregset): Use raw_supply_integer.
9913         * regcache.c (regcache::raw_supply_integer): New function.
9914         (regcache::raw_collect_integer): Likewise.
9915         * regcache.h: (regcache::raw_supply_integer): New declaration.
9916         (regcache::raw_collect_integer): Likewise.
9917
9918 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9919
9920         * Makefile.in (SFILES): Add gdbarch-selftests.c.
9921         (COMMON_OBS): Add gdbarch-selftests.o.
9922         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
9923         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
9924         * gdbarch-selftests.c: New file.
9925         * regcache.h (regcache) <~regcache>: Mark it virtual if
9926         GDB_SELF_TEST.
9927         <raw_write>: Likewise.
9928
9929 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9930
9931         * regcache.c (current_regcache): Change it to
9932         regcache::current_regcache.
9933         (regcache_observer_target_changed): Update.
9934         (regcache_thread_ptid_changed): Make it a regcache static
9935         method.
9936         (regcache_thread_ptid_changed): Update.
9937         (class regcache_access): New.
9938         (current_regcache_test): Update.
9939         (_initialize_regcache): Update.
9940         * regcache.h: Include forward_list.
9941         (regcache): Declare regcache_thread_ptid_changed and declare
9942         registers_changed_ptid as friend.
9943
9944 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9945
9946         * i387-tdep.c (i387_register_to_value): Use register_size
9947         instead of TYPE_LENGTH.
9948         * m68k-tdep.c (m68k_register_to_value): Likewise.
9949
9950 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9951
9952         * i387-tdep.c (i387_convert_register_p): Return false if type
9953         code isn't TYPE_CODE_FLT.
9954
9955 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9956
9957         * alpha-tdep.c (alpha_convert_register_p): Return true if type
9958         length is 4.
9959         (alpha_register_to_value): Remove type length check.
9960         (alpha_value_to_register): Likewise.
9961
9962 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9963
9964         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
9965         TYPE_CODE_FLT.
9966
9967 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9968
9969         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
9970         TYPE_CODE_FLT or not.
9971
9972 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9973
9974         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
9975         * avr-tdep.c (avr_gdbarch_init): Likewise.
9976         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9977         * cris-tdep.c (cris_gdbarch_init): Likewise.
9978         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9979         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9980         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9981         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
9982         * mep-tdep.c (mep_gdbarch_init): Likewise.
9983         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9984         * mips-tdep.c (mips_gdbarch_init): Likewise.
9985         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9986         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9987         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9988         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9989         * v850-tdep.c (v850_gdbarch_init): Likewise.
9990
9991 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9992
9993         * selftest-arch.c (tests_with_arch): Call registers_changed
9994         and reinit_frame_cache.
9995         * selftest.c (run_self_tests): Likewise.
9996
9997 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9998
9999         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10000         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10001
10002 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10003
10004         * rl78-tdep.c (rl78_gdbarch_init): Don't call
10005         set_gdbarch_print_insn.
10006
10007 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10008
10009         * h8300-tdep.c (h8300_gdbarch_init): Don't call
10010         set_gdbarch_print_insn.
10011
10012 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10013
10014         * alpha-tdep.c (alpha_gdbarch_init): Don't call
10015         set_gdbarch_print_insn.
10016         * arc-tdep.c (arc_gdbarch_init): Likewise.
10017         * arch-utils.c: include dis-asm.h.
10018         (default_print_insn): New function.
10019         * arch-utils.h (default_print_insn): Declare.
10020         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10021         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10022         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10023         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10024         * frv-tdep.c (frv_gdbarch_init): Likewise.
10025         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10026         * gdbarch.sh (print_insn): Use default_print_insn.
10027         * gdbarch.c: Regenerated.
10028         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10029         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10030         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10031         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10032         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10033         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10034         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10035         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10036         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10037         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10038         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10039         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10040         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10041         * mt-tdep.c (mt_gdbarch_init): Likewise.
10042         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10043         * nios2-tdep.c (nios2_print_insn): Remove.
10044         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10045         * rx-tdep.c (rx_gdbarch_init): Likewise.
10046         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10047         * score-tdep.c (score_print_insn): Remove.
10048         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10049         * sh-tdep.c (sh_gdbarch_init): Likewise.
10050         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10051         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10052         * tic6x-tdep.c (tic6x_print_insn): Remove.
10053         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10054         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10055         * v850-tdep.c (v850_gdbarch_init): Likewise.
10056         * vax-tdep.c (vax_gdbarch_init): Likewise.
10057         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10058         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10059
10060 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10061
10062         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10063         (MIPS_FP0_REGNUM): Remove.
10064         (MIPS_FSR_REGNUM): Remove.
10065         (mips_fbsd_supply_fpregs): Use mips_regnum.
10066         (mips_fbsd_supply_gregs): Likewise.
10067         (mips_fbsd_collect_fpregs): Likewise.
10068         (mips_fbsd_collect_gregs): Likewise.
10069
10070 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10071
10072         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10073         (getpfpregs_supplies): New function.
10074         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10075         getfpregs_supplies.
10076         (mips_fbsd_store_inferior_registers): Likewise.
10077
10078 2017-05-22  Pedro Alves <palves@redhat.com>
10079
10080         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10081         maintainer.
10082
10083 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
10084
10085         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10086         (store_register): Likewise.
10087         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10088         (get_decimal_float_return_value): Likewise.
10089         (do_ppc_sysv_return_value): Likewise.
10090         (ppc64_sysv_abi_push_integer): Likewise.
10091         (ppc64_sysv_abi_push_freg): Likewise.
10092         (ppc64_sysv_abi_return_value_base): Likewise.
10093         (ppc64_sysv_abi_return_value): Likewise.
10094         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10095         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10096         * rs6000-nat.c: Likewise.
10097         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10098         (rs6000_value_to_register): Likewise.
10099         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10100
10101 2017-05-21  Tom Tromey  <tom@tromey.com>
10102
10103         PR rust/21466:
10104         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10105         arrays as "[T]", not "[T; ]".
10106
10107 2017-05-19  Tom Tromey  <tom@tromey.com>
10108
10109         PR rust/21484:
10110         * rust-lang.c (exp_descriptor_rust): New function.
10111         (rust_language_defn): Use it.
10112         * p-lang.c (pascal_language_defn): Update.
10113         * opencl-lang.c (opencl_language_defn): Update.
10114         * objc-lang.c (objc_language_defn): Update.
10115         * m2-lang.c (m2_language_defn): Update.
10116         * language.h (struct language_defn)
10117         <la_watch_location_expression>: New member.
10118         * language.c (unknown_language_defn, auto_language_defn)
10119         (local_language_defn): Update.
10120         * go-lang.c (go_language_defn): Update.
10121         * f-lang.c (f_language_defn): Update.
10122         * d-lang.c (d_language_defn): Update.
10123         * c-lang.h (c_watch_location_expression): Declare.
10124         * c-lang.c (c_watch_location_expression): New function.
10125         (c_language_defn, cplus_language_defn, asm_language_defn)
10126         (minimal_language_defn): Use it.
10127         * breakpoint.c (watch_command_1): Call
10128         la_watch_location_expression.
10129         * ada-lang.c (ada_language_defn): Update.
10130
10131 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10132
10133         PR tui/21482
10134         * gdb_curses.h (NOMACROS): Define.
10135         (NCURSES_NOMACROS): Define.
10136
10137 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10138
10139         PR tui/21482
10140         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10141         arg to char *.
10142         * tui/tui-wingeneral.c (box_win): Likewise.
10143         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10144         (tui_show_source_line): Likewise.
10145         (tui_show_exec_info_content): Likewise.
10146
10147 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10148
10149         * sparc-tdep.c (sparc_structure_return_p)
10150         (sparc_arg_on_registers_p): New functions.
10151         (sparc32_store_arguments): Use them.
10152         * sparc64-tdep.c (sparc64_16_byte_align_p)
10153         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10154         Handle TYPE_CODE_ARRAY.
10155
10156 2017-05-17  Yao Qi  <yao.qi@linaro.org>
10157
10158         * cli/cli-decode.c (add_alias_cmd): New function.
10159         * command.h (add_alias_cmd): Declare.
10160         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10161         instead call add_alias_cmd.
10162
10163 2017-05-17  Pedro Alves  <palves@redhat.com>
10164
10165         * Makefile.in (nat_extra_makefile_frag): Rename to ...
10166         (nat_makefile_frag): ... this.  All references updated.
10167         * configure.ac: Likewise.
10168         * configure.nat: Likewise.  Enhance comments.
10169         * configure: Regenerate.
10170
10171 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10172
10173         * procfs.c (procfs_create_inferior): Change prototype to match
10174         definition.
10175
10176 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
10177
10178         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10179         C++ compiler warning.
10180
10181 2017-05-12  Tom Tromey  <tom@tromey.com>
10182
10183         PR rust/21483:
10184         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10185         recurse, just call value_struct_elt directly.
10186
10187 2017-05-12  Tom Tromey  <tom@tromey.com>
10188
10189         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10190         OP_RUST_ARRAY>: Fix.
10191
10192 2017-05-12  Tom Tromey  <tom@tromey.com>
10193
10194         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10195
10196 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10197
10198         * regcache.c: Include <forward_list>.
10199         (struct regcache_list): Remove.
10200         (current_regcache): Update.
10201         (get_thread_arch_aspace_regcache): Update for std::forward_list.
10202         (regcache_thread_ptid_changed): Likewise.
10203         (registers_changed_ptid): Likewise.
10204         (current_regcache_size): Likewise.
10205
10206 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10207
10208         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10209         (current_regcache_size): New function.
10210         (current_regcache_test): New function.
10211         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10212
10213 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10214
10215         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10216         (print_gp_register_row): Use get_frame_register_value.
10217
10218 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10219
10220         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10221         (mips_supply_fpregset): Likewise.
10222         (mips64_supply_gregset): Likewise.
10223
10224 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10225
10226         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
10227         regcache->raw_supply_zeroed.
10228
10229 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10230
10231         * configure.nat: Rearrange 'case' statements to match
10232         host before cpu.
10233
10234 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10235
10236         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
10237         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10238         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
10239         "@nat_extra_makefile_frag@".
10240         (Makefile): Remove dependency on "@frags@".
10241         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10242         (data-directory/Makefile): Likewise.
10243         * config/aarch64/linux.mh: Deleted; moved contents to
10244         "gdb/configure.nat".
10245         * config/alpha/alpha-linux.mh: Likewise.
10246         * config/alpha/nbsd.mh: Likewise.
10247         * config/arm/linux.mh: Likewise.
10248         * config/arm/nbsdelf.mh: Likewise.
10249         * config/i386/cygwin.mh: Likewise.
10250         * config/i386/cygwin64.mh: Likewise.
10251         * config/i386/darwin.mh: Likewise.
10252         * config/i386/fbsd.mh: Likewise.
10253         * config/i386/fbsd64.mh: Likewise.
10254         * config/i386/go32.mh: Likewise.
10255         * config/i386/i386gnu.mh: Likewise.
10256         * config/i386/i386sol2.mh: Likewise.
10257         * config/i386/linux.mh: Likewise.
10258         * config/i386/linux64.mh: Likewise.
10259         * config/i386/mingw.mh: Likewise.
10260         * config/i386/mingw64.mh: Likewise.
10261         * config/i386/nbsd64.mh: Likewise.
10262         * config/i386/nbsdelf.mh: Likewise.
10263         * config/i386/nto.mh: Likewise.
10264         * config/i386/obsd.mh: Likewise.
10265         * config/i386/obsd64.mh: Likewise.
10266         * config/i386/sol2-64.mh: Likewise.
10267         * config/ia64/linux.mh: Likewise.
10268         * config/m32r/linux.mh: Likewise.
10269         * config/m68k/linux.mh: Likewise.
10270         * config/m68k/nbsdelf.mh: Likewise.
10271         * config/m68k/obsd.mh: Likewise.
10272         * config/m88k/obsd.mh: Likewise.
10273         * config/mips/fbsd.mh: Likewise.
10274         * config/mips/linux.mh: Likewise.
10275         * config/mips/nbsd.mh: Likewise.
10276         * config/mips/obsd64.mh: Likewise.
10277         * config/pa/linux.mh: Likewise.
10278         * config/pa/nbsd.mh: Likewise.
10279         * config/pa/obsd.mh: Likewise.
10280         * config/powerpc/aix.mh: Likewise.
10281         * config/powerpc/fbsd.mh: Likewise.
10282         * config/powerpc/linux.mh: Likewise.
10283         * config/powerpc/nbsd.mh: Likewise.
10284         * config/powerpc/obsd.mh: Likewise.
10285         * config/powerpc/ppc64-linux.mh: Likewise.
10286         * config/powerpc/spu-linux.mh: Likewise.
10287         * config/s390/linux.mh: Likewise.
10288         * config/sh/nbsd.mh: Likewise.
10289         * config/sparc/fbsd.mh: Likewise.
10290         * config/sparc/linux.mh: Likewise.
10291         * config/sparc/linux64.mh: Likewise.
10292         * config/sparc/nbsd64.mh: Likewise.
10293         * config/sparc/nbsdelf.mh: Likewise.
10294         * config/sparc/obsd64.mh: Likewise.
10295         * config/sparc/sol2.mh: Likewise.
10296         * config/tilegx/linux.mh: Likewise.
10297         * config/vax/nbsdelf.mh: Likewise.
10298         * config/vax/obsd.mh: Likewise.
10299         * config/xtensa/linux.mh: Likewise.
10300         * config/i386/i386gnu.mn: New file, with excerpts from
10301         "config/i386/i386gnu.mh".
10302         * configure: Regenerate.
10303         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10304         *.mh files under "gdb/config".
10305         * configure.nat: New file, with contents from the
10306         "gdb/config/*/*.mh" files.
10307
10308 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
10309
10310         * btrace.c (btrace_clear): Free insn vector.
10311
10312 2017-05-05  Pedro Alves  <palves@redhat.com>
10313
10314         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10315         * configure: Regenerate.
10316
10317 2017-05-04  Pedro Alves  <palves@redhat.com>
10318
10319         * Makefile.in (SFILES): Add progspace-and-thread.c.
10320         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10321         (COMMON_OBS): Add progspace-and-thread.o.
10322         * breakpoint.c: Include "progspace-and-thread.h".
10323         (update_inserted_breakpoint_locations)
10324         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10325         Use scoped_restore_current_pspace_and_thread.
10326         (create_std_terminate_master_breakpoint): Use
10327         scoped_restore_current_program_space.
10328         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10329         (print_breakpoint_location): Use
10330         scoped_restore_current_program_space.
10331         (bp_loc_is_permanent): Use
10332         scoped_restore_current_pspace_and_thread.
10333         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10334         (download_tracepoint_locations): Use
10335         scoped_restore_current_pspace_and_thread.
10336         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10337         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10338         (enum step_over_calls_kind): Moved from inferior.h.
10339         (class scoped_restore_current_thread): New class.
10340         * gdbthread.h (make_cleanup_restore_current_thread): Delete
10341         declaration.
10342         (scoped_restore_current_thread): New class.
10343         * infcmd.c: Include "common/gdb_optional.h".
10344         (continue_1, proceed_after_attach): Use
10345         scoped_restore_current_thread.
10346         (notice_new_inferior): Use scoped_restore_current_thread.
10347         * inferior.c: Include "progspace-and-thread.h".
10348         (restore_inferior, save_current_inferior): Delete.
10349         (add_inferior_command, clone_inferior_command): Use
10350         scoped_restore_current_pspace_and_thread.
10351         * inferior.h (scoped_restore_current_inferior): New class.
10352         * infrun.c: Include "progspace-and-thread.h" and
10353         "common/gdb_optional.h".
10354         (follow_fork_inferior): Use
10355         scoped_restore_current_pspace_and_thread.
10356         (scoped_restore_exited_inferior): New class.
10357         (handle_vfork_child_exec_or_exit): Use
10358         scoped_restore_exited_inferior,
10359         scoped_restore_current_pspace_and_thread,
10360         scoped_restore_current_thread and scoped_restore.
10361         (fetch_inferior_event): Use scoped_restore_current_thread.
10362         * linespec.c (decode_line_full, decode_line_1): Use
10363         scoped_restore_current_program_space.
10364         * mi/mi-main.c: Include "progspace-and-thread.h".
10365         (exec_continue): Use scoped_restore_current_thread.
10366         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10367         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10368         * proc-service.c (ps_pglobal_lookup): Use
10369         scoped_restore_current_program_space.
10370         * progspace-and-thread.c: New file.
10371         * progspace-and-thread.h: New file.
10372         * progspace.c (release_program_space, clone_program_space): Use
10373         scoped_restore_current_program_space.
10374         (restore_program_space, save_current_program_space)
10375         (save_current_space_and_thread): Delete.
10376         (switch_to_program_space_and_thread): Moved to
10377         progspace-and-thread.c.
10378         * progspace.h (save_current_program_space)
10379         (save_current_space_and_thread): Delete declarations.
10380         (scoped_restore_current_program_space): New class.
10381         * remote.c (remote_btrace_maybe_reopen): Use
10382         scoped_restore_current_thread.
10383         * symtab.c: Include "progspace-and-thread.h".
10384         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10385         * thread.c (print_thread_info_1): Use
10386         scoped_restore_current_thread.
10387         (struct current_thread_cleanup): Delete.
10388         (do_restore_current_thread_cleanup)
10389         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10390         (scoped_restore_current_thread::~scoped_restore_current_thread):
10391         ... this new dtor.
10392         (make_cleanup_restore_current_thread): Rename/convert to ...
10393         (scoped_restore_current_thread::scoped_restore_current_thread):
10394         ... this new ctor.
10395         (thread_apply_all_command): Use scoped_restore_current_thread.
10396         (thread_apply_command): Use scoped_restore_current_thread.
10397         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10398         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10399
10400 2017-05-04  Pedro Alves  <palves@redhat.com>
10401
10402         * thread.c (make_cleanup_restore_current_thread): Move
10403         find_thread_ptid call before the is_stopped call.  Assert that the
10404         thread is found.  Replace is_stopped call by checking the thread's
10405         state directly.  Remove unnecessary NULL-thread check.
10406
10407 2017-05-04  Pedro Alves  <palves@redhat.com>
10408
10409         * corelow.c (thread_section_name): New class.
10410         (get_core_register_section, get_core_siginfo): Use it.
10411
10412 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10413
10414         * corelow.c (sniff_core_bfd): Remove extra semicolon.
10415         (get_core_register_section): Remove xfree of NULL pointer.
10416
10417 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
10418
10419         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10420         * regcache.c (regcache::raw_supply_zeroed): New function.
10421         * regcache.h (regcache::raw_supply_zeroed): New declaration.
10422
10423 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10424
10425         * gdbarch.sh: Remove commented out definition of
10426         TARGET_CHAR_BIT.
10427         * gdbarch.h: Re-generate.
10428
10429 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
10430
10431         * configure: Regenerate.
10432
10433 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
10434
10435         * solib-target.c (solib_target_relocate_section_addresses):
10436         Remove num_section_bases, num_bases, segment_bases variables.
10437
10438 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10439
10440         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10441
10442 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10443
10444         * solib-target.c: Include <vector>
10445         (struct lm_info_target) <~lm_info_target>: Remove.
10446         <segment_bases, section_bases>: Change type to
10447         std::vector<CORE_ADDR>.
10448         (library_list_start_segment, library_list_start_section,
10449         library_list_end_library,
10450         solib_target_relocate_section_addresses): Adjust.
10451
10452 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10453
10454         * gdbarch.sh (software_single_step): Change return type to
10455         std::vector<CORE_ADDR>.
10456         * gdbarch.c, gdbarch.h: Re-generate.
10457         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10458         Adjust.
10459         (arm_deal_with_atomic_sequence_raw): Adjust.
10460         (thumb_get_next_pcs_raw): Adjust.
10461         (arm_get_next_pcs_raw): Adjust.
10462         (arm_get_next_pcs): Adjust.
10463         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10464         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10465         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10466         (alpha_software_single_step): Adjust.
10467         * alpha-tdep.h (alpha_software_single_step): Adjust.
10468         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10469         * arm-tdep.c (arm_software_single_step): Adjust.
10470         (arm_breakpoint_kind_from_current_state): Adjust.
10471         * arm-tdep.h (arm_software_single_step): Adjust.
10472         * breakpoint.c (insert_single_step_breakpoint): Adjust.
10473         * cris-tdep.c (cris_software_single_step): Adjust.
10474         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10475         (micromips_deal_with_atomic_sequence): Adjust.
10476         (deal_with_atomic_sequence): Adjust.
10477         (mips_software_single_step): Adjust.
10478         * mips-tdep.h (mips_software_single_step): Adjust.
10479         * moxie-tdep.c (moxie_software_single_step): Adjust.
10480         * nios2-tdep.c (nios2_software_single_step): Adjust.
10481         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10482         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10483         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10484         * s390-linux-tdep.c (s390_software_single_step): Adjust.
10485         * sparc-tdep.c (sparc_software_single_step): Adjust.
10486         * spu-tdep.c (spu_software_single_step): Adjust.
10487         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10488
10489 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10490
10491         * gdbarch.sh: Use semi-colon as field separator instead of colon.
10492         * gdbarch.h: Re-generate.
10493
10494 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10495
10496         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10497         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10498         * python/py-instruction.c, python/py-instruction.h: New file.
10499         * python/py-record.c: Add py-instruction.h include.
10500         (gdbpy_initialize_record): Make gdb.Instruction a super class of
10501         gdb.RecordInstruction.
10502         * python/python-internal.h: Add gdbpy_initialize_instruction
10503         declaration.
10504         * python/python.c (do_start_initialization): Add
10505         gdbpy_initialize_instruction.
10506
10507 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10508
10509         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10510         Remove.
10511         (btrace_func_from_recpy_func): New function.
10512         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10513         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10514         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10515         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10516         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10517         Also, use new helper functions.
10518         (btpy_list_item): Use new helper functions.
10519         (recpy_bt_function_call_history): Use new type name.
10520         (btpy_call_getset): Remove.
10521         (gdbpy_initialize_btrace): Remove code to initialize
10522         gdb.BtraceFunctionCall.
10523         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10524         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10525         recpy_bt_func_prev, recpy_bt_func_next): New export.
10526         * python/py-record.c (recpy_func_type): New static object.
10527         (recpy_func_new, recpy_func_level, recpy_func_symbol,
10528         recpy_func_instructions, recpy_func_up, recpy_func_prev,
10529         recpy_func_next): New function.
10530         (recpy_element_hash, recpy_element_richcompare): Updated comment.
10531         (recpy_func_getset): New static object.
10532         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10533         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10534
10535 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10536
10537         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10538         (btpy_object, btpy_insn_type, btpy_new): Remove.
10539         (btpy_list_object): Use gdb.RecordInstruction type instead of
10540         gdb.BtraceInstruction type.
10541         (btrace_insn_from_recpy_insn): New function.
10542         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10543         btpy_new.
10544         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10545         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10546         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10547         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10548         instead of btpy_object.
10549         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10550         btpy_insn_data, btpy_insn_decode): Rename to ...
10551         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10552         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10553         recpy_bt_insn_decode): This.  Also, use new helper functions.
10554         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10555         recpy_insn_type.
10556         (btpy_insn_getset): Remove.
10557         (gdbpy_initialize_btrace): Remove code to initialize
10558         gdb.BtraceInstruction.  Use recpy_element_object.
10559         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10560         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10561         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10562         * python/py-record.c (recpy_insn_type): New static object.
10563         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10564         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10565         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10566         New function.
10567         (recpy_insn_getset): New static object.
10568         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10569         * python/py-record.h (recpy_element_object): New typedef.
10570         (recpy_insn_type, recpy_insn_new): New export.
10571
10572 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10573
10574         * py-record-btrace.c (btpy_insn_new): Removed.
10575         (btpy_insn_or_gap_new): New function.
10576         (btpy_insn_error): Removed.
10577         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10578         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10579         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10580         btpy_insn_or_gap_new instead of btpy_insn_new.
10581         (btpy_insn_getset): Remove btpy_insn_error.
10582         * py-record.c (recpy_gap_type): New static object.
10583         (recpy_gap_object): New typedef.
10584         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10585         recpy_gap_reason_string): New function.
10586         (recpy_gap_getset): New static object.
10587         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10588         * py-record.h (recpy_gap_new): New export.
10589
10590 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10591
10592         * python/py-record.c (recpy_ptid): Remove.
10593         (recpy_record_getset): Remove recpy_ptid.
10594
10595 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10596
10597         * btrace.c (btrace_fetch): Set inferior_ptid.
10598         * python/py-record-btrace.c: Add "py-record.h" include.
10599         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10600         recpy_bt_end, recpy_bt_instruction_history,
10601         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10602         in gdb.Record object instead of current ptid.
10603         * python/py-record.c: Include new "py-record.h" file.
10604         (recpy_record_object): Moved to py-record.h.
10605         * python/py-record.h: New file.
10606
10607 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10608
10609         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10610         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10611         indentation.
10612
10613 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
10614
10615         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10616         the past maintainers section.
10617
10618 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10619
10620         * infcmd.c (get_return_value): Use regcache ctor, and remove
10621         cleanup.
10622
10623 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10624             Pedro Alves  <palves@redhat.com>
10625
10626         * regcache.c (regcache::regcache): New tag dispatch ctor.
10627         (do_cooked_read): Moved above.
10628         (regcache_dup): Use the tag dispatch ctor..
10629         * regcache.h (regcache): Declare ctor, delete copy ctor and
10630         assignment operator, remove friend regcache_dup.
10631
10632 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10633
10634         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10635         call method save instead of regcache_cpy.
10636         * regcache.h (struct regcache): Make regcache_dup a friend.
10637
10638 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10639
10640         * regcache.c (struct regcache): Move to regcache.h
10641         (regcache::arch): New method.
10642         (regcache_get_ptid): Update.
10643         (get_regcache_arch): Call arch method.
10644         (get_regcache_aspace): Call method aspace.
10645         (register_buffer): Change it to method.
10646         (regcache_save): Change it to regcache::save.
10647         (regcache_restore): Likewise.
10648         (regcache_cpy_no_passthrough): Remove the declaration.
10649         (regcache_cpy): Call methods restore and cpy_no_passthrough.
10650         (regcache_cpy_no_passthrough): Change it to method
10651         cpy_no_passthrough.
10652         (regcache_register_status): Change it to method
10653         get_register_status.
10654         (regcache_invalidate): Change it to method invalidate.
10655         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10656         (regcache_raw_update): Change it to method raw_update.
10657         (regcache_raw_read): Likewise.
10658         (regcache_raw_read_signed): Likewise.
10659         (regcache_raw_read_unsigned): Likewise.
10660         (regcache_raw_write_signed): Likewise.
10661         (regcache_raw_write_unsigned): Likewise.
10662         (regcache_cooked_read): Likewise.
10663         (regcache_cooked_read_value): Likewise.
10664         (regcache_cooked_read_signed): Likewise.
10665         (regcache_cooked_read_unsigned): Likewise.
10666         (regcache_cooked_write_signed): Likewise.
10667         (regcache_cooked_write_unsigned): Likewise.
10668         (regcache_raw_set_cached_value): Likewise.
10669         (regcache_raw_write): Likewise.
10670         (regcache_cooked_write): Likewise.
10671         (regcache_xfer_part): Likewise.
10672         (regcache_raw_read_part): Likewise.
10673         (regcache_raw_write_part): Likewise.
10674         (regcache_cooked_read_part): Likewise.
10675         (regcache_cooked_write_part): Likewise.
10676         (regcache_raw_supply): Likewise.
10677         (regcache_raw_collect): Likewise.
10678         (regcache_transfer_regset): Likewise.
10679         (regcache_supply_regset): Likewise.
10680         (regcache_collect_regset): Likewise.
10681         (regcache_debug_print_register): Likewise.
10682         (enum regcache_dump_what): Move it to regcache.h.
10683         (regcache_dump): Change it to method dump.
10684         * regcache.h (enum regcache_dump_what): New.
10685         (class regcache): New.
10686         * target.c (target_fetch_registers): Call method
10687         debug_print_register.
10688         (target_store_registers): Likewise.
10689
10690 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10691
10692         * windows-nat.c (struct lm_info_windows): Initialize field.
10693         (windows_make_so): Allocate lm_info_windows with new.
10694         (windows_free_so): Free lm_info_windows with delete.
10695
10696 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10697
10698         * solib-darwin.c (struct lm_info_darwin): Initialize field.
10699         (darwin_current_sos): Allocate lm_info_darwin with new, remove
10700         cleanup.
10701         (darwin_free_so): Free lm_info_darwin with delete.
10702
10703 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10704
10705         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
10706         <l_addr_p>: Change type to bool.
10707         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
10708         (svr4_free_so): Free lm_info_svr4 with delete.
10709         (svr4_copy_library_list): Replace memcpy with call to copy
10710         constructor.
10711         (library_list_start_library, svr4_default_sos): Allocate
10712         lm_info_svr4 with new.
10713
10714 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10715
10716         * solib-target.c (struct lm_info_target): Add destructor,
10717         initialize fields.
10718         <name>: Change type to std::string.
10719         (library_list_start_library): Allocate lm_info_target with new.
10720         (solib_target_free_library_list): Free lm_info_target with
10721         delete.
10722         (solib_target_current_sos): Adapt to std::string.
10723         (solib_target_free_so): Free lm_info_target with delete.
10724
10725 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10726
10727         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
10728         fields.
10729         (frv_current_sos): Allocate lm_info_frv with new.
10730         (frv_relocate_main_executable): Free lm_info_frv with delete,
10731         allocate with new.
10732         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
10733
10734 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10735
10736         * solib-frv.c (struct lm_info_frv): Fix indentation.
10737
10738 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10739
10740         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
10741         map field.
10742         (dsbt_current_sos): Allocate lm_info_dsbt with new.
10743         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
10744         and allocate with new.
10745         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
10746
10747 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10748
10749         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
10750         <filename, member_name>: Change type to std::string.
10751         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
10752         (library_list_start_library): Allocate lm_info_aix with new.
10753         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
10754         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
10755         with copy constructor.
10756
10757 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10758
10759         * solist.h (struct lm_info): Remove.
10760         (struct lm_info_base): New class.
10761         (struct so_list) <lm_info>: Change type to lm_info_base *.
10762         * nto-tdep.c (struct lm_info): Remove.
10763         (lm_addr): Adjust.
10764         * solib-aix.c (struct lm_info): Rename to ...
10765         (struct lm_info_aix): ... this.  Extend lm_info_base.
10766         (lm_info_p): Rename to ...
10767         (lm_info_aix_p): ... this, and adjust.
10768         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
10769         solib_aix_parse_libraries, library_list_start_library,
10770         solib_aix_free_library_list, solib_aix_parse_libraries,
10771         solib_aix_get_library_list,
10772         solib_aix_relocate_section_addresses, solib_aix_free_so,
10773         solib_aix_get_section_offsets,
10774         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
10775         Adjust.
10776         (struct solib_aix_inferior_data) <library_list>: Adjust.
10777         * solib-darwin.c (struct lm_info): Rename to ...
10778         (struct lm_info_darwin): ... this.  Extend lm_info_base.
10779         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
10780         * solib-dsbt.c (struct lm_info): Rename to ...
10781         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
10782         (struct dsbt_info) <main_executable_lm_info): Adjust.
10783         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
10784         dsbt_relocate_section_addresses): Adjust.
10785         * solib-frv.c (struct lm_info): Rename to ...
10786         (struct lm_info_frv): ... this.  Extend lm_info_base.
10787         (main_executable_lm_info): Adjust.
10788         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
10789         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
10790         find_canonical_descriptor_in_load_object,
10791         frv_fdpic_find_canonical_descriptor): Adjust.
10792         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10793         to lm_info_svr4.
10794         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10795         svr4_clear_so, svr4_copy_library_list,
10796         library_list_start_library, svr4_default_sos, svr4_read_so_list,
10797         svr4_current_sos, svr4_fetch_objfile_link_map,
10798         solist_update_incremental): Adjust.
10799         * solib-svr4.h (struct lm_info_svr4): Move here from
10800         solib-svr4.c.
10801         * solib-target.c (struct lm_info): Rename to ...
10802         (struct lm_info_target): ... this.  Extend lm_info_base.
10803         (lm_info_p): Rename to ...
10804         (lm_info_target_p): ... this.
10805         (solib_target_parse_libraries, library_list_start_segment,
10806         library_list_start_section, library_list_start_library,
10807         library_list_end_library, solib_target_free_library_list,
10808         solib_target_current_sos, solib_target_free_so,
10809         solib_target_relocate_section_addresses): Adjust.
10810         * windows-nat.c (struct lm_info): Rename to ...
10811         (struct lm_info_windows): ... this.  Extend lm_info_base.
10812         (windows_make_so, handle_load_dll, handle_unload_dll,
10813         windows_xfer_shared_libraries): Adjust.
10814
10815 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10816
10817         * solib-darwin.c (struct darwin_so_list): Remove.
10818         (darwin_current_sos): Allocate an so_list object instead of a
10819         darwin_so_list, separately allocate an lm_info object.
10820         (darwin_free_so): Free lm_info.
10821
10822 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
10823
10824         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
10825         with fprintf_filtered.
10826
10827 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10828
10829         * regcache.c (regcache::regcache): New function.
10830         (regcache::~regcache): New function.
10831         (regcache_xmalloc_1): Remove.
10832         (regcache_xmalloc): Call new regcache.
10833         (regcache_xfree): Call delete regcache.
10834         (get_thread_arch_aspace_regcache): Call new regcache.
10835
10836 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10837
10838         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
10839         lwp instead of ptid_get_lwp.
10840
10841 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10842
10843         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
10844         lwp_info instead of getting from inferior_ptid.
10845
10846 2017-04-27  Keith Seitz  <keiths@redhat.com>
10847
10848         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
10849         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
10850         (CV_CONVERSION_BADNESS): Define.
10851         (rank_one_type): Remove overly restrictive rvalue reference
10852         rank checks.
10853         Add cv-qualifier checks and subranks for type equality.
10854         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
10855         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
10856         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
10857
10858 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
10859
10860         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
10861         count when creating the object.
10862
10863 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
10864             Ulrich Weigand  <uweigand@de.ibm.com>
10865
10866         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
10867         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
10868         is used in AIX.
10869         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
10870         (process_xcoff_symbol): Likewise.
10871         (scan_xcoff_symtab): Likewise.
10872
10873 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10874
10875         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
10876         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
10877         (ia64_access_reg): Use get_frame_register_unsigned.
10878         (ia64_access_rse_reg): Likewise.
10879         (ia64_libunwind_frame_prev_register): Likewise.
10880
10881 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
10882
10883         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
10884         * gdbarch.c: Regenerated.
10885         * gdbarch.h: Regenerated.
10886         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
10887         visibility external.
10888         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
10889         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
10890         (enum cfa_how_kind): Move to ...
10891         (struct dwarf2_frame_state_reg_info): Likewise.
10892         (struct dwarf2_frame_state): Likewise.
10893         * dwarf2-frame.h: ... here.
10894         (dwarf2_frame_state_alloc_regs): New declaration.
10895         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
10896         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
10897
10898 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10899
10900         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
10901         regcache_raw_read_unsigned.
10902         (xtensa_pseudo_register_write): Likewise.
10903
10904 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10905
10906         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
10907         (nds32_pseudo_register_write): Likewise.
10908
10909 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10910
10911         * regcache.c (struct regcache) <readonly_p>: Change its type
10912         to bool.
10913         (regcache_xmalloc_1): Update parameter type and callers update.
10914
10915 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10916
10917         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
10918         set_gdbarch_wchar_bit.
10919         * arm-tdep.c (arm_gdbarch_init): Likewise.
10920
10921 2017-04-25  Pedro Alves  <palves@redhat.com>
10922
10923         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
10924         (BothAreRelocatable, memcopy, memmove): Don't define.
10925         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
10926         macros.
10927
10928 2017-04-25  Pedro Alves  <palves@redhat.com>
10929
10930         * common/common-defs.h: Include "common/poison.h".
10931         * common/function-view.h: (Not, Or, Requires): Move to traits.h
10932         and adjust.
10933         * common/poison.h: New file.
10934         * common/traits.h: Include <type_traits>.
10935         (Not, Or, Requires): New, moved from common/function-view.h.
10936
10937 2017-04-25  Pedro Alves  <palves@redhat.com>
10938
10939         * breakpoint.h (struct breakpoint): In-class initialize all
10940         fields.  Make boolean fields "bool".
10941         * breakpoint.c (init_raw_breakpoint_without_location): Remove
10942         memset call and initializations no longer necessary.
10943
10944 2017-04-25  Pedro Alves  <palves@redhat.com>
10945
10946         * btrace.c (pt_btrace_insn_flags): Change parameter type to
10947         reference.
10948         (pt_btrace_insn): New function.
10949         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
10950
10951 2017-04-25  Pedro Alves  <palves@redhat.com>
10952
10953         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
10954         "base" field and inherit from "bp_location" instead.  Add
10955         non-default ctor.
10956         (allocate_location_exception): Use new non-default ctor.
10957         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
10958         (init_bp_location): Convert to ...
10959         (bp_location::bp_location): ... this new ctor, and remove memset
10960         call.
10961         (base_breakpoint_allocate_location): Use the new non-default ctor.
10962         * breakpoint.h (bp_location): Now a class.  Declare default and
10963         non-default ctors.  In-class initialize all members.
10964         (init_bp_location): Remove declaration.
10965
10966 2017-04-25  Pedro Alves  <palves@redhat.com>
10967
10968         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
10969         assignment operator.
10970
10971 2017-04-24  Yao Qi  <yao.qi@linaro.org>
10972
10973         * doublest.c (convert_doublest_to_floatformat): Call
10974         floatformat_totalsize_bytes.
10975
10976 2017-04-22  Tom Tromey  <tom@tromey.com>
10977
10978         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
10979         ui_out_emit_list.
10980         * stack.c (print_frame): Use ui_out_emit_list.
10981         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10982         ui_out_emit_list.
10983         * mi/mi-main.c (print_one_inferior)
10984         (mi_cmd_data_list_register_names)
10985         (mi_cmd_data_list_register_values, mi_cmd_list_features)
10986         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
10987         ui_out_emit_list.
10988         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
10989         (mi_output_solib_attribs): Use ui_out_emit_list,
10990         ui_out_emit_tuple.
10991         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
10992         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
10993         (mi_cmd_stack_list_args, list_args_or_locals): Use
10994         ui_out_emit_list.
10995         * disasm.c (do_assembly_only): Use ui_out_emit_list.
10996         * breakpoint.c (print_solib_event, output_thread_groups): Use
10997         ui_out_emit_list.
10998
10999 2017-04-22  Tom Tromey  <tom@tromey.com>
11000
11001         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11002         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11003         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11004
11005 2017-04-22  Tom Tromey  <tom@tromey.com>
11006
11007         * tracepoint.c (tvariables_info_1)
11008         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11009
11010 2017-04-22  Tom Tromey  <tom@tromey.com>
11011
11012         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11013         annotate_arg_emitter.
11014         * breakpoint.c (print_mention_watchpoint)
11015         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11016         * annotate.h (struct annotate_arg_emitter): New.
11017
11018 2017-04-22  Tom Tromey  <tom@tromey.com>
11019
11020         * record-btrace.c (record_btrace_insn_history)
11021         (record_btrace_insn_history_range, record_btrace_call_history)
11022         (record_btrace_call_history_range): Use ui_out_emit_tuple.
11023         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11024         ui_out_emit_tuple.
11025         * stack.c (print_frame_info): Use ui_out_emit_tuple.
11026         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11027         * skip.c (skip_info): Use ui_out_emit_tuple.
11028         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11029         * progspace.c (print_program_space): Use ui_out_emit_tuple.
11030         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11031         * osdata.c (info_osdata): Use ui_out_emit_tuple.
11032         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11033         ui_out_emit_tuple.
11034         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11035         (output_register, mi_cmd_data_read_memory)
11036         (mi_cmd_data_read_memory_bytes, mi_load_progress)
11037         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11038         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11039         Use ui_out_emit_tuple.
11040         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11041         ui_out_emit_tuple.
11042         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11043         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11044         * linux-thread-db.c (info_auto_load_libthread_db): Use
11045         ui_out_emit_tuple.
11046         * inferior.c (print_inferior): Use ui_out_emit_tuple.
11047         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11048         * disasm.c (do_mixed_source_and_assembly_deprecated)
11049         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11050         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11051         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11052         * breakpoint.c (print_one_breakpoint_location)
11053         (print_one_breakpoint): Use ui_out_emit_tuple.
11054         * auto-load.c (print_script, info_auto_load_cmd): Use
11055         ui_out_emit_tuple.
11056         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11057
11058 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
11059
11060         * thread.c (print_thread_info_1): Remove dead code.
11061
11062 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11063
11064         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11065         GDB_SELF_TEST.
11066         * arm-tdep.c (selftests::arm_record_test): Likewise.
11067
11068 2017-04-21  Yao Qi  <yao.qi@linaro.org>
11069
11070         * regcache.c (regcache_restore): Remove argument 2.  Replace
11071         argument 3 with regcache.  Get register status from
11072         src->register_status and get register contents from
11073         register_buffer (src, regnum).
11074         (regcache_cpy): Update.
11075
11076 2017-04-19  Pedro Alves  <palves@redhat.com>
11077
11078         * gdbthread.h (thread): Add missing closing parenthesis in
11079         comment.
11080
11081 2017-04-19  Pedro Alves  <palves@redhat.com>
11082
11083         * common/refcounted-object.h: New file.
11084         * gdbthread.h: Include "common/refcounted-object.h".
11085         (thread_info): Inherit from refcounted_object and add comments.
11086         (thread_info::incref, thread_info::decref)
11087         (thread_info::m_refcount): Delete.
11088         (thread_info::deletable): Use the refcounted_object::refcount()
11089         method.
11090         * inferior.c (current_inferior_): Add comment.
11091         (set_current_inferior): Increment/decrement refcounts.
11092         (prune_inferiors, remove_inferior_command): Skip inferiors marked
11093         not-deletable instead of comparing with the current inferior.
11094         (initialize_inferiors): Increment the initial inferior's refcount.
11095         * inferior.h (struct inferior): Forward declare.
11096         Include "common/refcounted-object.h".
11097         (current_inferior, set_current_inferior): Move declaration to
11098         before struct inferior's definition, and fix comment.
11099         (inferior): Inherit from refcounted_object.  Add comments.
11100         * thread.c (switch_to_thread_no_regs): Reference the thread's
11101         inferior pointer directly instead of doing a ptid lookup.
11102         (switch_to_no_thread): New function.
11103         (switch_to_thread(thread_info *)): New function, factored out
11104         from ...
11105         (switch_to_thread(ptid_t)): ... this.
11106         (restore_current_thread): Delete.
11107         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11108         fields, and add 'inf' field.
11109         (do_restore_current_thread_cleanup): Check whether old->inf is
11110         alive instead of looking up an inferior by ptid.  Use
11111         switch_to_thread and switch_to_no_thread.
11112         (restore_current_thread_cleanup_dtor): Use old->inf directly
11113         instead of lookup up an inferior by id.  Decref the inferior.
11114         Don't restore 'removable'.
11115         (make_cleanup_restore_current_thread): Same the inferior pointer
11116         in old, instead of the inferior number.  Incref the inferior.
11117         Don't save/clear 'removable'.
11118
11119 2017-04-19  Pedro Alves  <palves@redhat.com>
11120
11121         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11122         unittests/scoped_restore-selftests.c.
11123         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11124         * common/scoped_restore.h (scoped_restore_base): Make "class".
11125         (scoped_restore_base::release): New public method.
11126         (scoped_restore_base::scoped_restore_base): New protected ctor.
11127         (scoped_restore_base::m_saved_var): New protected field.
11128         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11129         scoped_restore_base base class instead of m_saved_var directly.
11130         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11131         (scoped_restore_tmpl::scoped_restore_tmpl(const
11132         scoped_restore_tmpl<T>&)): Likewise.
11133         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11134         method.
11135         (scoped_restore_tmpl::saved_var): New method.
11136         (scoped_restore_tmpl::m_saved_var): Delete.
11137         * inferior.h (inferior::detaching): Now a bool.
11138         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11139         cleanup.
11140         * unittests/scoped_restore-selftests.c: New file.
11141
11142 2017-04-19  Pedro Alves  <palves@redhat.com>
11143
11144         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11145         Re-sort in alphabetic order.
11146
11147 2017-04-18  Pedro Alves  <palves@redhat.com>
11148
11149         * xml-support.c (obstack_xml_printf): Delete.
11150         * xml-support.h (obstack_xml_printf): Delete.
11151
11152 2017-04-18  Pedro Alves  <palves@redhat.com>
11153
11154         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11155         vdebug, verror, body_text, start_element, end_element, name,
11156         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11157         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11158         is_xinclude>: Make private and add m_ prefix.
11159         (gdb_xml_parser::body_text): New method, based on ...
11160         (gdb_xml_body_text): ... this.  Adjust.
11161         (gdb_xml_parser::vdebug): New method, based on ...
11162         (gdb_xml_debug): ... this.  Adjust.
11163         (gdb_xml_parser::verror): New method, based on ...
11164         (gdb_xml_error): ... this.  Adjust.
11165         (gdb_xml_parser::start_element): New method, based on ...
11166         (gdb_xml_start_element): ... this.  Adjust.
11167         (gdb_xml_start_element_wrapper): Defer to
11168         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11169         (gdb_xml_parser::end_element): New method, based on ...
11170         (gdb_xml_end_element_wrapper): ... this.  Adjust.
11171         (gdb_xml_parser::~gdb_xml_parser): Adjust.
11172         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11173         (gdb_xml_parser::use_dtd): New method, based on ...
11174         (gdb_xml_use_dtd): ... this.  Adjust.
11175         (gdb_xml_parser::parse): New method, based on ...
11176         (gdb_xml_parse): ... this.  Adjust.
11177         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11178         (xinclude_start_include): Adjust to call the parser's name method.
11179         (xml_xinclude_default, xml_xinclude_start_doctype)
11180         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11181         method.
11182         (xml_process_xincludes): Adjust to call parser methods.
11183         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11184         declarations.
11185
11186 2017-04-18  Pedro Alves  <palves@redhat.com>
11187
11188         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11189         gdb::optional<std::string>.
11190         * xml-support.c: Include <string>.
11191         (scope_level::scope_level(scope_level &&))
11192         (scope_level::~scope_level): Delete.
11193         (scope_level::body): Now a std::string.
11194         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11195         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11196         parameter.
11197         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11198         (xinclude_parsing_data::output): Now a std::string reference.
11199         (xinclude_start_include): Adjust.
11200         (xml_xinclude_default): Adjust.
11201         (xml_process_xincludes): Add 'output' parameter, and return bool.
11202         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11203         and return bool.
11204         * xml-tdesc.c: Include <unordered_map> and <string>.
11205         (tdesc_xml_cache): Delete.
11206         (tdesc_xml_cache_s): Delete.
11207         (xml_cache): Now an std::unordered_map.
11208         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11209         (target_fetch_description_xml): Change return type to
11210         gdb::optional<std::string>, and adjust.
11211         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11212         (target_fetch_description_xml): Change return type to
11213         gdb::optional<std::string>.
11214
11215 2017-04-18  Pedro Alves  <palves@redhat.com>
11216
11217         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11218         unittests/optional-selftests.c.
11219         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11220         * unittests/optional-selftests.c: New file.
11221         * unittests/optional/assignment/1.cc: New file.
11222         * unittests/optional/assignment/2.cc: New file.
11223         * unittests/optional/assignment/3.cc: New file.
11224         * unittests/optional/assignment/4.cc: New file.
11225         * unittests/optional/assignment/5.cc: New file.
11226         * unittests/optional/assignment/6.cc: New file.
11227         * unittests/optional/assignment/7.cc: New file.
11228         * unittests/optional/cons/copy.cc: New file.
11229         * unittests/optional/cons/default.cc: New file.
11230         * unittests/optional/cons/move.cc: New file.
11231         * unittests/optional/cons/value.cc: New file.
11232         * unittests/optional/in_place.cc: New file.
11233         * unittests/optional/observers/1.cc: New file.
11234         * unittests/optional/observers/2.cc: New file.
11235
11236 2017-04-18  Pedro Alves  <palves@redhat.com>
11237
11238         * common/gdb_optional.h: Include common/traits.h.
11239         (in_place_t): New type.
11240         (in_place): New constexpr variable.
11241         (optional::optional): Remove member initialization of
11242         m_instantiated.
11243         (optional::optional(in_place_t...)): New constructor.
11244         (optional::~optional): Use reset.
11245         (optional::optional(const optional&)): New.
11246         (optional::optional(const optional&&)): New.
11247         (optional::optional(T &)): New.
11248         (optional::optional(T &&)): New.
11249         (operator::operator=(const optional &)): New.
11250         (operator::operator=(optional &&)): New.
11251         (operator::operator= (const T &))
11252         (operator::operator= (T &&))
11253         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
11254         (operator::reset): New.
11255         (operator::m_instantiated):: Add in-class initializer.
11256         * common/traits.h: Include <type_traits>.
11257         (struct And): New types.
11258
11259 2017-04-18  Pedro Alves  <palves@redhat.com>
11260
11261         * xml-support.c: Include <vector>.
11262         (scope_level::scope_level(const gdb_xml_element *))
11263         (scope_level::scope_level(scope_level&&)): New.
11264         (scope_level::~scope_level): New.
11265         (scope_level_s): Delete.
11266         (gdb_xml_parser::scopes): Now a std::vector.
11267         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11268         Use std::vector.
11269         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11270         scope cleanup code.
11271         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11272         of the scopes member.  Use std::vector::emplace_back.
11273
11274 2017-04-18  Pedro Alves  <palves@redhat.com>
11275
11276         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
11277         a bool.
11278         (gdb_xml_end_element): Change type of first parameter.
11279         (gdb_xml_cleanup): Rename to ...
11280         (gdb_xml_parser::~gdb_xml_parser): ... this.
11281         (gdb_xml_create_parser_and_cleanup): Delete with ...
11282         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11283         to this new ctor.
11284         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11285         using gdb_xml_create_parser_and_cleanup.
11286         (xinclude_parsing_data): Add ctor/dtor.
11287         (xml_xinclude_cleanup): Delete.
11288         (xml_process_xincludes): Create a local xinclude_parsing_data
11289         instead of heap-allocating one.  Create a local gdb_xml_parser
11290         instead of heap-allocating one with
11291         gdb_xml_create_parser_and_cleanup.
11292
11293 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
11294
11295         PR threads/20743
11296         * fbsd-nat.c (resume_one_thread_cb): Remove.
11297         (resume_all_threads_cb): Remove.
11298         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11299         iterate_over_threads.
11300
11301 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11302
11303         * NEWS: Create a new section for the next release branch.
11304         Rename the section of the current branch, now that it has
11305         been cut.
11306
11307 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11308
11309         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11310         * version.in: Bump version to 8.0.50.DATE-git.
11311
11312 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
11313
11314         PR gdb/21385
11315         * windows-nat.c (windows_create_inferior): Declare 'allargs'
11316         independently of the host, and fix build breakage on Cygwin.
11317
11318 2017-04-13  Pedro Alves  <palves@redhat.com>
11319
11320         * inferior.c (free_inferior): Convert to ...
11321         (inferior::~inferior): ... this dtor.
11322         (inferior::inferior): New ctor, factored out from ...
11323         (add_inferior_silent): ... here.  Allocate the inferior with a new
11324         expression.
11325         (delete_inferior): Call delete instead of free_inferior.
11326         * inferior.h (gdb_environ, continuation): Forward declare.
11327         (inferior): Now a class.  Add in-class initialization to all
11328         members.  Make boolean fields bool, except 'detaching'.
11329         (inferior::inferior): New explicit ctor.
11330         (inferior::~inferior): New.
11331
11332 2017-04-13  Pedro Alves  <palves@redhat.com>
11333
11334         * inferior.c (init_inferior_list): Delete.
11335         * inferior.h (init_inferior_list): Delete.
11336
11337 2017-04-13  Pedro Alves  <palves@redhat.com>
11338
11339         PR threads/13217
11340         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11341         (top level): Call it twice, with different thread sets.
11342
11343 2017-04-13  Pedro Alves  <palves@redhat.com>
11344
11345         * thread.c: Include <algorithm>.
11346         (thread_array_cleanup): Delete.
11347         (scoped_inc_dec_ref): New class.
11348         (live_threads_count): New function.
11349         (set_thread_refcount): Delete.
11350         (tp_array_compar_ascending): Now a bool.
11351         (tp_array_compar): Convert to a std::sort comparison function.
11352         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11353         and live_threads_count.
11354
11355 2017-04-13  Pedro Alves  <palves@redhat.com>
11356
11357         * infrun.c (follow_fork_inferior): Also switch the current
11358         inferior.
11359
11360 2017-04-13  Pedro Alves  <palves@redhat.com>
11361
11362         * breakpoint.c (watch_command_1): Save watchpoint-frame info
11363         before calling create_internal_breakpoint.
11364
11365 2017-04-13  Pedro Alves  <palves@redhat.com>
11366
11367         * fork-child.c (execv_argv): New class.
11368         (breakup_args): Refactored as ...
11369         (execv_argv::init_for_no_shell): .. this method of execv_argv.
11370         Copy arguments to storage and replace separators with NULL
11371         terminators in place.
11372         (escape_bang_in_quoted_argument): Adjust to return bool.
11373         (execv_argv::execv_argv): New ctor.
11374         (execv_argv::init_for_shell): New method, factored out from
11375         fork_inferior.  Don't strdup strings into the vector.
11376         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
11377         Remove free_vector_argv call.
11378
11379 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11380
11381         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11382         tdep->rx_psw_type.
11383
11384 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11385
11386         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11387         * rx-tdep.c (rx_gdbarch_init): Likewise.
11388
11389 2017-04-13  Pedro Alves  <palves@redhat.com>
11390
11391         * breakpoint.h (struct breakpoint): Reindent.
11392
11393 2017-04-13  Pedro Alves  <palves@redhat.com>
11394
11395         * breakpoint.c (bp_location): Rename to ...
11396         (bp_locations): ... this.  All references updated.
11397         (bp_location_count): Rename to ...
11398         (bp_locations_count): ... this.  All references updated.
11399         (bp_location_placed_address_before_address_max): Rename to ...
11400         (bp_locations_placed_address_before_address_max): ... this.  All
11401         references updated.
11402         (bp_location_shadow_len_after_address_max): Rename to ...
11403         (bp_locations_shadow_len_after_address_max): ... this.  All
11404         references updated.
11405         (bp_location_compare_addrs): Rename to ...
11406         (bp_locations_compare_addrs): ... this.  All references updated.
11407         (bp_location_compare):Rename to ...
11408         (bp_locations_compare): ... this.  All references updated.
11409         (bp_location_target_extensions_update): Rename to ...
11410         (bp_locations_target_extensions_update): ... this.  All references
11411         updated.
11412
11413 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11414
11415         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11416         * common/common.m4: Check headers 'termios.h', 'termio.h' and
11417         'sgtty.h'.
11418         * common/gdb_termios.h: New file, with parts of "terminal.h".
11419         * inflow.c: Include "gdb_termios.h".
11420         * ser-unix.c: Include "gdb_termios.h".
11421         * terminal.h: Move terminal-related defines to
11422         "common/gdb_termios.h".
11423
11424 2017-04-12  Tom Tromey  <tom@tromey.com>
11425
11426         * probe.c (parse_probes): Update.
11427         * location.h (delete_event_location): Don't declare.
11428         (event_location_deleter::operator()): Update.
11429         * location.c (event_location_deleter::operator()): Rename from
11430         delete_event_location.
11431         * linespec.h (linespec_result) <location>: Change type to
11432         event_location_up.
11433         * linespec.c (canonicalize_linespec, event_location_to_sals)
11434         (decode_objc): Update.
11435         (linespec_result): Don't call delete_event_location.
11436         * breakpoint.c (create_breakpoints_sal)
11437         (bkpt_probe_create_sals_from_location)
11438         (strace_marker_create_sals_from_location): Update.
11439
11440 2017-04-12  Tom Tromey  <tom@tromey.com>
11441
11442         * linespec.h (struct linespec_result): Add constructor and
11443         destructor.
11444         (init_linespec_result, destroy_linespec_result)
11445         (make_cleanup_destroy_linespec_result): Don't declare.
11446         * linespec.c (init_linespec_result): Remove.
11447         (linespec_result::~linespec_result): Rename from
11448         destroy_linespec_result.  Update.
11449         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11450         Remove.
11451         * breakpoint.c (create_breakpoint, break_range_command)
11452         (decode_location_default): Update.
11453         * ax-gdb.c (agent_command_1): Update.
11454
11455 2017-04-12  Tom Tromey  <tom@tromey.com>
11456
11457         * remote.c (remote_download_tracepoint): Update.
11458         * python/py-breakpoint.c (bppy_get_location): Update.
11459         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11460         (gdbscm_breakpoint_location): Update.
11461         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11462         * breakpoint.h (struct breakpoint) <location, location_range_end>:
11463         Change type to event_location_up.
11464         * breakpoint.c (create_overlay_event_breakpoint)
11465         (create_longjmp_master_breakpoint)
11466         (create_std_terminate_master_breakpoint)
11467         (create_exception_master_breakpoint)
11468         (breakpoint_event_location_empty_p, print_breakpoint_location)
11469         (print_one_breakpoint_location, create_thread_event_breakpoint)
11470         (init_breakpoint_sal, create_breakpoint)
11471         (print_recreate_ranged_breakpoint, break_range_command)
11472         (init_ada_exception_breakpoint, say_where): Update.
11473         (base_breakpoint_dtor): Don't call delete_event_location.
11474         (bkpt_print_recreate, tracepoint_print_recreate)
11475         (dprintf_print_recreate, update_static_tracepoint)
11476         (breakpoint_re_set_default): Update.
11477
11478 2017-04-12  Tom Tromey  <tom@tromey.com>
11479
11480         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11481         type of "to_do".  Update.
11482         (compute_stack_depth): Use std::vector.
11483
11484 2017-04-12  Tom Tromey  <tom@tromey.com>
11485
11486         * printcmd.c (find_instruction_backward): Use std::vector.
11487
11488 2017-04-12  Tom Tromey  <tom@tromey.com>
11489
11490         * symfile.c (objfilep): Remove typedef.
11491         (reread_symbols): Use a std::vector.
11492
11493 2017-04-12  Tom Tromey  <tom@tromey.com>
11494
11495         * mi/mi-main.c (exec_direction_forward): Remove.
11496         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11497         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11498         scoped_restore.
11499         * guile/guile.c (guile_repl_command, guile_command)
11500         (gdbscm_execute_gdb_command): Use scoped_restore.
11501         * go-exp.y (go_parse): Use scoped_restore.
11502         * d-exp.y (d_parse): Use scoped_restore.
11503         * cli/cli-decode.c (cmd_func): Use scoped_restore.
11504         * c-exp.y (c_parse): Use scoped_restore.
11505
11506 2017-04-12  Tom Tromey  <tom@tromey.com>
11507
11508         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11509         (mi_parse): Update return type.
11510         (mi_parse_free): Remove.
11511         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11512         (mi_parse::~mi_parse): Rename from mi_parse_free.
11513         (mi_parse_cleanup): Remove.
11514         (mi_parse): Return a unique_ptr.  Use new.
11515         * mi/mi-main.c (mi_execute_command): Update.
11516
11517 2017-04-12  Tom Tromey  <tom@tromey.com>
11518
11519         * location.c (explicit_location_lex_one): Return a
11520         unique_xmalloc_ptr.
11521         (string_to_explicit_location): Update.  Remove cleanups.
11522
11523 2017-04-12  Tom Tromey  <tom@tromey.com>
11524
11525         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11526         (compare_value_and_voffset): Change type.  Update.
11527         (compute_vtable_size): Change type of "offset_vec".
11528         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
11529         (gnuv3_get_typeid): Remove extraneous declaration.
11530
11531 2017-04-12  Tom Tromey  <tom@tromey.com>
11532
11533         * charset.h (wchar_iterator): Fix comment.
11534
11535 2017-04-12  Tom Tromey  <tom@tromey.com>
11536
11537         * charset.c (iconv_wrapper): New class.
11538         (cleanup_iconv): Remove.
11539         (convert_between_encodings): Use it.
11540
11541 2017-04-12  Tom Tromey  <tom@tromey.com>
11542
11543         * symfile.h (increment_reading_symtab): Update type.
11544         * symfile.c (decrement_reading_symtab): Remove.
11545         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11546         * psymtab.c (psymtab_to_symtab): Update.
11547         * dwarf2read.c (dw2_instantiate_symtab): Update.
11548
11549 2017-04-12  Tom Tromey  <tom@tromey.com>
11550
11551         * jit.c (struct jit_reader): Declare separately.  Add constructor
11552         and destructor.  Change type of "handle".
11553         (loaded_jit_reader): Define separately.
11554         (jit_reader_load): Update.  New "new".
11555         (jit_reader_unload_command): Use "delete".
11556         * gdb-dlfcn.h (struct dlclose_deleter): New.
11557         (gdb_dlhandle_up): New typedef.
11558         (gdb_dlopen, gdb_dlsym): Update types.
11559         (gdb_dlclose): Remove.
11560         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11561         (gdb_dlsym): Change type of "handle".
11562         (make_cleanup_dlclose): Remove.
11563         (dlclose_deleter::operator()): Rename from gdb_dlclose.
11564         * compile/compile-c-support.c (load_libcc): Update.
11565
11566 2017-04-12  Tom Tromey  <tom@tromey.com>
11567
11568         * symtab.h (find_pcs_for_symtab_line): Change return type.
11569         * symtab.c (find_pcs_for_symtab_line): Change return type.
11570         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11571         type of "vec".  Update.
11572         (ltpy_get_pcs_for_line): Update.
11573         * linespec.c (decode_digits_ordinary): Update.
11574
11575 2017-04-12  Tom Tromey  <tom@tromey.com>
11576
11577         * tracepoint.c (actions_command): Update.
11578         * python/python.c (python_command, python_interactive_command):
11579         Update.
11580         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11581         * guile/guile.c (guile_command): Update.
11582         * defs.h (read_command_lines, read_command_lines_1): Return
11583         command_line_up.
11584         (command_lines_deleter): New struct.
11585         (command_line_up): New typedef.
11586         * compile/compile.c (compile_code_command)
11587         (compile_print_command): Update.
11588         * cli/cli-script.h (get_command_line, copy_command_lines): Return
11589         command_line_up.
11590         (make_cleanup_free_command_lines): Remove.
11591         * cli/cli-script.c (get_command_line, read_command_lines_1)
11592         (copy_command_lines): Return command_line_up.
11593         (while_command, if_command, read_command_lines, define_command)
11594         (document_command): Update.
11595         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11596         Remove.
11597         * breakpoint.h (breakpoint_set_commands): Change type of
11598         "commands".
11599         * breakpoint.c (breakpoint_set_commands): Change type of
11600         "commands".  Update.
11601         (do_map_commands_command, update_dprintf_command_list)
11602         (create_tracepoint_from_upload): Update.
11603
11604 2017-04-12  Tom Tromey  <tom@tromey.com>
11605
11606         * tracepoint.c (scope_info): Update.
11607         * spu-tdep.c (spu_catch_start): Update.
11608         * python/python.c (gdbpy_decode_line): Update.
11609         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11610         * python/py-breakpoint.c (bppy_init): Update.
11611         * probe.c (parse_probes): Update.
11612         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11613         * location.h (event_location_deleter): New struct.
11614         (event_location_up): New typedef.
11615         (new_linespec_location, new_address_location, new_probe_location)
11616         (new_explicit_location, copy_event_location)
11617         (string_to_event_location, string_to_event_location_basic)
11618         (string_to_explicit_location): Update return type.
11619         (make_cleanup_delete_event_location): Remove.
11620         * location.c (new_linespec_location, new_address_location)
11621         (new_probe_location, new_explicit_location, copy_event_location):
11622         Return event_location_up.
11623         (delete_event_location_cleanup)
11624         (make_cleanup_delete_event_location): Remove.
11625         (string_to_explicit_location, string_to_event_location_basic)
11626         (string_to_event_location): Return event_location_up.
11627         * linespec.c (canonicalize_linespec, event_location_to_sals)
11628         (decode_line_with_current_source)
11629         (decode_line_with_last_displayed, decode_objc): Update.
11630         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11631         * completer.c (location_completer): Update.
11632         * cli/cli-cmds.c (edit_command, list_command): Update.
11633         * breakpoint.c (create_overlay_event_breakpoint)
11634         (create_longjmp_master_breakpoint)
11635         (create_std_terminate_master_breakpoint)
11636         (create_exception_master_breakpoint)
11637         (create_thread_event_breakpoint): Update.
11638         (init_breakpoint_sal): Update.  Remove some dead code.
11639         (create_breakpoint_sal): Change type of "location".  Update.
11640         (create_breakpoints_sal, create_breakpoint, break_command_1)
11641         (dprintf_command, break_range_command, until_break_command)
11642         (init_ada_exception_breakpoint)
11643         (strace_marker_create_sals_from_location)
11644         (update_static_tracepoint, trace_command, ftrace_command)
11645         (strace_command, create_tracepoint_from_upload): Update.
11646         * break-catch-throw.c (re_set_exception_catchpoint): Update.
11647         * ax-gdb.c (agent_command_1): Update.
11648
11649 2017-04-12  Pedro Alves  <palves@redhat.com>
11650
11651         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11652         * configure.tgt: Handle i[34567]86-*-go32* and
11653         i[34567]86-*-msdosdjgpp*.
11654         * i386-tdep.c (i386_svr4_reg_to_regnum):
11655         Make extern.
11656         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11657         i386-go32-tdep.c.
11658         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11659         * i386-go32-tdep.c: New file.
11660         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
11661         declarations.
11662
11663 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
11664
11665         * aix-thread.c (pd_status2str): Change return type to const char *.
11666
11667 2017-04-12  Pedro Alves  <palves@redhat.com>
11668
11669         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
11670         calls to set_gdbarch_gnu_triplet_regexp.
11671
11672 2017-04-12  Pedro Alves  <palves@redhat.com>
11673
11674         PR gdb/21323
11675         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
11676         New enum value.
11677         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
11678         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
11679         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
11680         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
11681         * gdbarch.h, gdbarch.c: Regenerate.
11682         * aarch64-tdep.c (aarch64_gdbarch_init): Override
11683         gdbarch_wchar_bit and gdbarch_wchar_signed.
11684         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
11685         * arm-tdep.c (arm_gdbarch_init): Likewise.
11686         * avr-tdep.c (avr_gdbarch_init): Likewise.
11687         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
11688         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
11689         * i386-tdep.c (i386_go32_init_abi): Likewise.
11690         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11691         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11692         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11693         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11694         * sh-tdep.c (sh_gdbarch_init): Likewise.
11695         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11696         * sparc64-tdep.c (sparc64_init_abi): Likewise.
11697         * windows-tdep.c (windows_init_abi): Likewise.
11698         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11699
11700 2017-04-12  Pedro Alves  <palves@redhat.com>
11701
11702         PR c++/21323
11703         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
11704         cplus_primitive_type_char32_t>: New enum values.
11705         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
11706         and cplus_primitive_type_char32_t.
11707         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
11708         32, use the archtecture's built-in type for char16_t and char32_t,
11709         respectively.  Otherwise, fallback to init_integer_type as before,
11710         but make the type unsigned, and issue a complaint.
11711         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
11712
11713 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
11714
11715         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
11716         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
11717
11718 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11719
11720         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
11721         'const char *'.
11722
11723 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11724
11725         * common/common-utils.c (free_vector_argv): New function.
11726         * common/common-utils.h: Include <vector>.
11727         (free_vector_argv): New prototype.
11728         * darwin-nat.c (darwin_create_inferior): Rewrite function
11729         prototype in order to constify "exec_file" and accept a
11730         "std::string" for "allargs".
11731         * fork-child.c: Include <vector>.
11732         (breakup_args): Rewrite function, using C++.
11733         (fork_inferior): Rewrite function header, constify "exec_file_arg"
11734         and accept "std::string" for "allargs".  Update the code to
11735         calculate "argv" based on "allargs".  Update calls to "exec_fun"
11736         and "execvp".
11737         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
11738         order to constify "exec_file" and accept a "std::string" for
11739         "allargs".
11740         * go32-nat.c (go32_create_inferior): Likewise.
11741         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
11742         * infcmd.c (run_command_1): Constify "exec_file".  Use
11743         "std::string" for inferior arguments.
11744         * inferior.h (fork_inferior): Update prototype.
11745         * linux-nat.c (linux_nat_create_inferior): Rewrite function
11746         prototype in order to constify "exec_file" and accept a
11747         "std::string" for "allargs".
11748         * nto-procfs.c (procfs_create_inferior): Likewise.
11749         * procfs.c (procfs_create_inferior): Likewise.
11750         * remote-sim.c (gdbsim_create_inferior): Likewise.
11751         * remote.c (extended_remote_run): Update code to accept
11752         "std::string" as argument.
11753         (extended_remote_create_inferior): Rewrite function prototype in
11754         order to constify "exec_file" and accept a "std::string" for
11755         "allargs".
11756         * rs6000-nat.c (super_create_inferior): Likewise.
11757         (rs6000_create_inferior): Likewise.
11758         * target.h (struct target_ops) <to_create_inferior>: Likewise.
11759         * windows-nat.c (windows_create_inferior): Likewise.
11760
11761 2017-04-11  Pedro Alves  <palves@redhat.com>
11762
11763         * thread.c: Fix whitespace throughout.
11764
11765 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11766
11767         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
11768
11769 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
11770
11771         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
11772
11773 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
11774
11775         PR gdb/21364
11776         * osdata.c (info_osdata): Check if 'type' is an empty string
11777         instead of NULL.
11778
11779 2017-04-10  Pedro Alves  <palves@redhat.com>
11780
11781         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
11782         (ptid_to_global_thread_id, in_thread_list)
11783         (do_captured_list_thread_ids, set_resumed, set_running)
11784         (set_executing, set_stop_requested, finish_thread_state)
11785         (validate_registers_access, can_access_registers_ptid)
11786         (print_thread_info_1, switch_to_thread)
11787         (do_restore_current_thread_cleanup)
11788         (make_cleanup_restore_current_thread, thread_command)
11789         (thread_name_command): Use operator== instead of ptid_equal.
11790
11791 2017-04-10  Pedro Alves  <palves@redhat.com>
11792
11793         * thread.c (struct current_thread_cleanup) <next>: Delete field.
11794         (current_thread_cleanup_chain): Delete.
11795         (restore_current_thread_cleanup_dtor)
11796         (make_cleanup_restore_current_thread): Remove references to
11797         current_thread_cleanup_chain.
11798
11799 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
11800
11801         * msp430-tdep.c (msp430_pseudo_register_read): Never return
11802         REG_UNKNOWN.
11803
11804 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11805
11806         PR gdb/19942
11807         * gdbthread.h (thread_info::deletable): New method.
11808         (thread_info::incref): New method.
11809         (thread_info::decref): New method.
11810         (thread_info::refcount): Move it to private.
11811         * infrun.c (save_stop_context): Call inc_refcount.
11812         (release_stop_context_cleanup): Likewise.
11813         * thread.c (set_thread_exited): New function.
11814         (init_thread_list): Delete "tp" only it is deletable, otherwise
11815         call set_thread_exited.
11816         (delete_thread_1): Call set_thread_exited.
11817         (current_thread_cleanup) <inferior_pid>: Remove.
11818         <thread>: New field.
11819         (restore_current_thread_ptid_changed): Removed.
11820         (do_restore_current_thread_cleanup): Adjust.
11821         (restore_current_thread_cleanup_dtor): Don't call
11822         find_thread_ptid.
11823         (set_thread_refcount): Use dec_refcount.
11824         (make_cleanup_restore_current_thread): Adjust.
11825         (thread_apply_all_command): Call inc_refcount.
11826         (_initialize_thread): Don't call
11827         observer_attach_thread_ptid_changed.
11828
11829 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11830
11831         * thread.c (delete_thread_1): Hoist code on marking thread as
11832         exited.
11833
11834 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11835
11836         * windows-nat.c (windows_detach): Initialize ptid with
11837         minus_one_ptid.
11838
11839 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11840
11841         * unittests/ptid-selftests.c: Fix erroneous assert messages.
11842
11843 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
11844
11845         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
11846         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
11847         (bfin_pseudo_register_write): Likewise
11848
11849 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
11850
11851         * common/ptid.h (struct ptid): Change to...
11852         (class ptid_t): ... this.
11853         <ptid_t>: New constructors.
11854         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
11855         matches>: New methods.
11856         <make_null, make_minus_one>: New static methods.
11857         <pid>: Rename to...
11858         <m_pid>: ...this.
11859         <lwp>: Rename to...
11860         <m_lwp>: ...this.
11861         <tid>: Rename to...
11862         <m_tid>: ...this.
11863         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
11864         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
11865         as references, move comment to class ptid_t.
11866         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
11867         ptid_t static methods.
11868         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
11869         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
11870         Take ptid arguments as references, implement using ptid_t methods.
11871         * unittests/ptid-selftests.c: New file.
11872         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11873         unittests/ptid-selftests.c.
11874         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
11875
11876 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
11877
11878         * python/python.c (python_run_simple_file): Cast mode literal to
11879         non-const char pointer as expected by PyFile_FromString.
11880
11881 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
11882
11883         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
11884         minus_one_ptid and null_ptid.
11885
11886 2017-04-05  Pedro Alves  <palves@redhat.com>
11887
11888         * warning.m4 (build_warnings): Remove -Wno-write-strings.
11889         * configure: Regenerate.
11890
11891 2017-04-05  Pedro Alves  <palves@redhat.com>
11892
11893         * ada-exp.y (yyerror): Constify.
11894         * ada-lang.c (bound_name, get_selections)
11895         (ada_variant_discrim_type)
11896         (ada_variant_discrim_name, ada_value_struct_elt)
11897         (ada_lookup_struct_elt_type, is_unchecked_variant)
11898         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
11899         (catch_ada_exception_command_split)
11900         (catch_ada_assert_command_split, catch_assert_command)
11901         (ada_op_name): Constify.
11902         * ada-lang.h (ada_yyerror, get_selections)
11903         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
11904         * arc-tdep.c (arc_print_frame_cache): Constify.
11905         * arm-tdep.c (arm_skip_stub): Constify.
11906         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
11907         (gen_aggregate_elt_ref): Constify.
11908         * bcache.c (print_bcache_statistics): Constify.
11909         * bcache.h (print_bcache_statistics): Constify.
11910         * break-catch-throw.c (catch_exception_command_1):
11911         * breakpoint.c (struct ep_type_description::description):
11912         Constify.
11913         (add_solib_catchpoint): Constify.
11914         (catch_fork_command_1): Add cast.
11915         (add_catch_command): Constify.
11916         * breakpoint.h (add_catch_command, add_solib_catchpoint):
11917         Constify.
11918         * bsd-uthread.c (bsd_uthread_state): Constify.
11919         * buildsym.c (patch_subfile_names): Constify.
11920         * buildsym.h (next_symbol_text_func, patch_subfile_names):
11921         Constify.
11922         * c-exp.y (yyerror): Constify.
11923         (token::oper): Constify.
11924         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
11925         * c-varobj.c (cplus_describe_child): Constify.
11926         * charset.c (find_charset_names): Add cast.
11927         (find_charset_names): Constify array and add const_cast.
11928         * cli/cli-cmds.c (complete_command, cd_command): Constify.
11929         (edit_command): Constify.
11930         * cli/cli-decode.c (lookup_cmd): Constify.
11931         * cli/cli-dump.c (dump_memory_command, dump_value_command):
11932         Constify.
11933         (struct dump_context): Constify.
11934         (add_dump_command, restore_command): Constify.
11935         * cli/cli-script.c (get_command_line): Constify.
11936         * cli/cli-script.h (get_command_line): Constify.
11937         * cli/cli-utils.c (check_for_argument): Constify.
11938         * cli/cli-utils.h (check_for_argument): Constify.
11939         * coff-pe-read.c (struct read_pe_section_data): Constify.
11940         * command.h (lookup_cmd): Constify.
11941         * common/print-utils.c (decimal2str): Constify.
11942         * completer.c (gdb_print_filename): Constify.
11943         * corefile.c (set_gnutarget): Constify.
11944         * cp-name-parser.y (yyerror): Constify.
11945         * cp-valprint.c (cp_print_class_member): Constify.
11946         * cris-tdep.c (cris_register_name, crisv32_register_name):
11947         Constify.
11948         * d-exp.y (yyerror): Constify.
11949         (struct token::oper): Constify.
11950         * d-lang.h (d_yyerror): Constify.
11951         * dbxread.c (struct header_file_location::name): Constify.
11952         (add_old_header_file, add_new_header_file, last_function_name)
11953         (dbx_next_symbol_text, add_bincl_to_list)
11954         (find_corresponding_bincl_psymtab, set_namestring)
11955         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
11956         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
11957         * defs.h (command_line_input, print_address_symbolic)
11958         (deprecated_readline_begin_hook): Constify.
11959         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
11960         Constify.
11961         * event-top.c (handle_line_of_input): Constify and add cast.
11962         * exceptions.c (catch_errors): Constify.
11963         * exceptions.h (catch_errors): Constify.
11964         * expprint.c (print_subexp_standard, op_string, op_name)
11965         (op_name_standard, dump_raw_expression, dump_raw_expression):
11966         * expression.h (op_name, op_string, dump_raw_expression):
11967         Constify.
11968         * f-exp.y (yyerror): Constify.
11969         (struct token::oper): Constify.
11970         (struct f77_boolean_val::name): Constify.
11971         * f-lang.c (f_word_break_characters): Constify.
11972         * f-lang.h (f_yyerror): Constify.
11973         * fork-child.c (fork_inferior): Add cast.
11974         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
11975         (new_variant): Constify.
11976         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
11977         * gdbarch.c: Regenerate.
11978         * gdbcore.h (set_gnutarget): Constify.
11979         * go-exp.y (yyerror): Constify.
11980         (token::oper): Constify.
11981         * go-lang.h (go_yyerror): Constify.
11982         * go32-nat.c (go32_sysinfo): Constify.
11983         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
11984         * guile/scm-cmd.c (cmdscm_function): Constify.
11985         * guile/scm-param.c (pascm_param_value): Constify.
11986         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
11987         (h8300sx_register_name): Constify.
11988         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
11989         Constify.
11990         * ia64-tdep.c (ia64_register_names): Constify.
11991         * infcmd.c (construct_inferior_arguments): Constify.
11992         (path_command, attach_post_wait): Constify.
11993         * language.c (show_range_command, show_case_command)
11994         (unk_lang_error): Constify.
11995         * language.h (language_defn::la_error)
11996         (language_defn::la_name_of_this): Constify.
11997         * linespec.c (decode_line_2): Constify.
11998         * linux-thread-db.c (thread_db_err_str): Constify.
11999         * lm32-tdep.c (lm32_register_name): Constify.
12000         * m2-exp.y (yyerror): Constify.
12001         * m2-lang.h (m2_yyerror): Constify.
12002         * m32r-tdep.c (m32r_register_names): Constify and make static.
12003         * m68hc11-tdep.c (m68hc11_register_names): Constify.
12004         * m88k-tdep.c (m88k_register_name): Constify.
12005         * macroexp.c (appendmem): Constify.
12006         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12007         (upgrade_type, parse_external, parse_partial_symbols)
12008         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12009         (new_symbol): Constify.
12010         * memattr.c (mem_info_command): Constify.
12011         * mep-tdep.c (register_name_from_keyword): Constify.
12012         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12013         Constify.
12014         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12015         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12016         * mi/mi-main.c (captured_mi_execute_command): Constify and add
12017         cast.
12018         (mi_execute_async_cli_command): Constify.
12019         * mips-tdep.c (mips_register_name): Constify.
12020         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12021         (am33_register_name, am33_2_register_name)
12022         * moxie-tdep.c (moxie_register_names): Constify.
12023         * nat/linux-osdata.c (osdata_type): Constify fields.
12024         * nto-tdep.c (nto_parse_redirection): Constify.
12025         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12026         (lookup_child_selector): Constify.
12027         (objc_methcall::name): Constify.
12028         * objc-lang.h (lookup_objc_class, lookup_child_selector)
12029         (lookup_struct_typedef): Constify.
12030         * objfiles.c (pc_in_section): Constify.
12031         * objfiles.h (pc_in_section): Constify.
12032         * p-exp.y (struct token::oper): Constify.
12033         (yyerror): Constify.
12034         * p-lang.h (pascal_yyerror): Constify.
12035         * parser-defs.h (op_name_standard): Constify.
12036         (op_print::string): Constify.
12037         (exp_descriptor::op_name): Constify.
12038         * printcmd.c (print_address_symbolic): Constify.
12039         * psymtab.c (print_partial_symbols): Constify.
12040         * python/py-breakpoint.c (stop_func): Constify.
12041         (bppy_get_expression): Constify.
12042         * python/py-cmd.c (cmdpy_completer::name): Constify.
12043         (cmdpy_function): Constify.
12044         * python/py-event.c (evpy_add_attribute)
12045         (gdbpy_initialize_event_generic): Constify.
12046         * python/py-event.h (evpy_add_attribute)
12047         (gdbpy_initialize_event_generic): Constify.
12048         * python/py-evts.c (add_new_registry): Constify.
12049         * python/py-finishbreakpoint.c (outofscope_func): Constify.
12050         * python/py-framefilter.c (get_py_iter_from_func): Constify.
12051         * python/py-inferior.c (get_buffer): Add cast.
12052         * python/py-param.c (parm_constant::name): Constify.
12053         * python/py-unwind.c (fprint_frame_id): Constify.
12054         * python/python.c (gdbpy_parameter_value): Constify.
12055         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12056         * remote.c (memory_packet_config::name): Constify.
12057         (show_packet_config_cmd, remote_write_bytes)
12058         (remote_buffer_add_string):
12059         * reverse.c (exec_reverse_once): Constify.
12060         * rs6000-tdep.c (variant::name, variant::description): Constify.
12061         * rust-exp.y (rustyyerror): Constify.
12062         * rust-lang.c (rust_op_name): Constify.
12063         * rust-lang.h (rustyyerror): Constify.
12064         * serial.h (serial_ops::name): Constify.
12065         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12066         (sh_sh3e_register_name, sh_sh2e_register_name)
12067         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12068         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12069         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12070         (sh_sh4al_dsp_register_name): Constify.
12071         * sh64-tdep.c (sh64_register_name): Constify.
12072         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12073         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12074         * stabsread.c (patch_block_stabs, read_type_number)
12075         (ref_map::stabs, ref_add, process_reference)
12076         (symbol_reference_defined, define_symbol, define_symbol)
12077         (error_type, read_type, read_member_functions, read_cpp_abbrev)
12078         (read_one_struct_field, read_struct_fields, read_baseclasses)
12079         (read_tilde_fields, read_struct_type, read_array_type)
12080         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12081         (read_huge_number, read_range_type, read_args, common_block_start)
12082         (find_name_end): Constify.
12083         * stabsread.h (common_block_start, define_symbol)
12084         (process_one_symbol, symbol_reference_defined, ref_add):
12085         * symfile.c (get_section_index, add_symbol_file_command):
12086         * symfile.h (get_section_index): Constify.
12087         * target-descriptions.c (tdesc_type::name): Constify.
12088         (tdesc_free_type): Add cast.
12089         * target.c (find_default_run_target):
12090         (add_deprecated_target_alias, find_default_run_target)
12091         (target_announce_detach): Constify.
12092         (do_option): Constify.
12093         * target.h (add_deprecated_target_alias): Constify.
12094         * thread.c (print_thread_info_1): Constify.
12095         * top.c (deprecated_readline_begin_hook, command_line_input):
12096         Constify.
12097         (init_main): Add casts.
12098         * top.h (handle_line_of_input): Constify.
12099         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12100         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12101         (tfind_command): Rename to ...
12102         (tfind_command_1): ... this and constify.
12103         (tfind_command): New function.
12104         (tfind_end_command, tfind_start_command): Adjust.
12105         (encode_source_string): Constify.
12106         * tracepoint.h (encode_source_string): Constify.
12107         * tui/tui-data.c (tui_partial_win_by_name): Constify.
12108         * tui/tui-data.h (tui_partial_win_by_name): Constify.
12109         * tui/tui-source.c (tui_set_source_content_nil): Constify.
12110         * tui/tui-source.h (tui_set_source_content_nil): Constify.
12111         * tui/tui-win.c (parse_scrolling_args): Constify.
12112         * tui/tui-windata.c (tui_erase_data_content): Constify.
12113         * tui/tui-windata.h (tui_erase_data_content): Constify.
12114         * tui/tui-winsource.c (tui_erase_source_content): Constify.
12115         * tui/tui.c (tui_enable): Add cast.
12116         * utils.c (defaulted_query): Constify.
12117         (init_page_info): Add cast.
12118         (puts_debug, subset_compare): Constify.
12119         * utils.h (subset_compare): Constify.
12120         * varobj.c (varobj_format_string): Constify.
12121         * varobj.h (varobj_format_string): Constify.
12122         * vax-tdep.c (vax_register_name): Constify.
12123         * windows-nat.c (windows_detach): Constify.
12124         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12125         * xml-support.c (gdb_xml_end_element): Constify.
12126         * xml-tdesc.c (tdesc_start_reg): Constify.
12127         * xstormy16-tdep.c (xstormy16_register_name): Constify.
12128         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12129         * xtensa-tdep.h (xtensa_register_t::name): Constify.
12130
12131 2017-04-05  Pedro Alves  <palves@redhat.com>
12132
12133         * proc-api.c (struct trans): Constify.
12134         (procfs_note): Constify.
12135         * proc-events.c (struct trans, syscall_table):
12136         * proc-flags.c (struct trans): Constify.
12137         * proc-utils.h (procfs_note): Constify.
12138         * proc-why.c (struct trans): Constify.
12139         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12140         (procfs_detach): Constify.
12141         * sol-thread.c (struct string_map): Constify.
12142         (td_err_string, td_state_string): Constify.
12143
12144 2017-04-05  Pedro Alves  <palves@redhat.com>
12145
12146         * proc-api.c (procfs_filename): Don't initialize
12147         procfs_filename.
12148         (prepare_to_trace): Assume procfs_filename is non-NULL.
12149         (_initialize_proc_api): Give procfs_filename a default value here.
12150
12151 2017-04-05  Pedro Alves  <palves@redhat.com>
12152
12153         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12154         'cond_string' parameter.
12155         (extract_exception_regexp): Constify 'string' parameter.
12156         (catch_exception_command_1): Constify.
12157         * breakpoint.c (init_catchpoint)
12158         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12159         parameter.
12160         (ep_parse_optional_if_clause, catch_fork_command_1)
12161         (catch_exec_command_1): Constify.
12162         * breakpoint.h (init_catchpoint): Constify 'cond_string'
12163         parameter.
12164         (ep_parse_optional_if_clause): Constify.
12165         * cli/cli-utils.c (remove_trailing_whitespace)
12166         (check_for_argument): Constify.
12167         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12168         non-const overload.
12169         (check_for_argument): Likewise.
12170
12171 2017-04-05  Pedro Alves  <palves@redhat.com>
12172
12173         * event-top.c (command_line_handler): Add cast to execute_command
12174         call.
12175         * record-btrace.c (cmd_record_btrace_bts_start)
12176         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12177         (cmd_record_btrace_start): Add cast to execute_command call.
12178         * record-full.c (record_full_goto_insn):
12179         * record.c (record_start, record_stop): Add cast to
12180         execute_command_to_string calls.
12181         (cmd_record_start): Add cast to execute_command calls.
12182
12183 2017-04-05  Pedro Alves  <palves@redhat.com>
12184
12185         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12186         static inline function.
12187         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12188         array and use gdb_PyArg_ParseTupleAndKeywords.
12189         * python/py-cmd.c (cmdpy_init): Likewise.
12190         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12191         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12192         (infpy_search_memory): Likewise.
12193         * python/py-objfile.c (objfpy_add_separate_debug_file)
12194         (gdbpy_lookup_objfile): Likewise.
12195         * python/py-symbol.c (gdbpy_lookup_symbol)
12196         (gdbpy_lookup_global_symbol): Likewise.
12197         * python/py-type.c (gdbpy_lookup_type): Likewise.
12198         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12199         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12200         Likewise.
12201
12202 2017-04-05  Pedro Alves  <palves@redhat.com>
12203
12204         * python/python-internal.h (gdb_PyGetSetDef): New type.
12205         * python/py-block.c (block_object_getset)
12206         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12207         * python/py-event.c (event_object_getset)
12208         (finish_breakpoint_object_getset): Likewise.
12209         * python/py-inferior.c (inferior_object_getset): Likewise.
12210         * python/py-infthread.c (thread_object_getset): Likewise.
12211         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12212         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12213         * python/py-objfile.c (objfile_getset): Likewise.
12214         * python/py-progspace.c (pspace_getset): Likewise.
12215         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12216         Likewise.
12217         * python/py-record.c (recpy_record_getset): Likewise.
12218         * python/py-symbol.c (symbol_object_getset): Likewise.
12219         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12220         Likewise.
12221         * python/py-type.c (type_object_getset, field_object_getset):
12222         Likewise.
12223         * python/py-value.c (value_object_getset): Likewise.
12224
12225 2017-04-05  Pedro Alves  <palves@redhat.com>
12226
12227         * python/python-internal.h (gdb_PyObject_CallMethod)
12228         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12229         New functions.
12230         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12231         (PySys_GetObject, PySys_SetPath): New macros.
12232
12233 2017-04-05  Pedro Alves  <palves@redhat.com>
12234
12235         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12236         info_osdata_command.
12237         * osdata.c (info_osdata_command): Rename to ...
12238         (info_osdata): ... this.  Constify 'type' parameter, and remove
12239         the 'from_tty' parameter.  Accept NULL TYPE.
12240         (info_osdata_command): New function.
12241         * osdata.h (info_osdata_command): Remove declaration.
12242         (info_osdata): New declaration.
12243
12244 2017-04-05  Pedro Alves  <palves@redhat.com>
12245
12246         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12247         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12248         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12249         parameter.
12250         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12251         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12252         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12253         parameter.
12254         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12255         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12256         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12257         (mi_cmd_file_list_exec_source_files)
12258         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12259         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12260         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12261         parameter.
12262         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12263         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12264         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12265         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12266         (mi_cmd_stack_info_frame): Constify 'command' parameter.
12267         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12268         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12269         'command' parameter.
12270         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12271         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12272         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12273         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12274         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12275         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12276         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12277         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12278         (mi_cmd_var_set_update_range): Constify 'command' parameter.
12279         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12280         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12281         parameter.
12282         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12283         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12284         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12285         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12286         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12287         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12288         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12289         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12290         (mi_cmd_data_list_changed_registers)
12291         (mi_cmd_data_write_register_values)
12292         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12293         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12294         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12295         (mi_cmd_list_features, mi_cmd_list_target_features)
12296         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12297         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12298         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12299         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12300         (mi_cmd_trace_frame_collected): Constify 'command'
12301         parameter.
12302         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12303         'command' parameter.
12304
12305 2017-04-05  Pedro Alves  <palves@redhat.com>
12306
12307         * ada-lang.c (ada_completer_word_break_characters): Now a const
12308         array.
12309         (ada_get_gdb_completer_word_break_characters): Constify.
12310         * completer.c (gdb_completer_command_word_break_characters)
12311         (gdb_completer_file_name_break_characters)
12312         (gdb_completer_quote_characters): Now const arrays.
12313         (get_gdb_completer_quote_characters): Constify.
12314         (set_rl_completer_word_break_characters): New function.
12315         (set_gdb_completion_word_break_characters)
12316         (complete_line_internal): Use it.
12317         * completer.h (get_gdb_completer_quote_characters): Constify.
12318         (set_rl_completer_word_break_characters): Declare.
12319         * f-lang.c (f_word_break_characters): Constify.
12320         * language.c (default_word_break_characters): Constify.
12321         * language.h (language_defn::la_word_break_characters): Constify.
12322         (default_word_break_characters): Constify.
12323         * top.c (init_main): Use set_rl_completer_word_break_characters.
12324
12325 2017-04-05  Pedro Alves  <palves@redhat.com>
12326
12327         * aix-thread.c (aix_thread_pid_to_str)
12328         (aix_thread_extra_thread_info): Constify.
12329         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12330         * bsd-uthread.c (bsd_uthread_extra_thread_info)
12331         (bsd_uthread_pid_to_str): Constify.
12332         * corelow.c (core_pid_to_str): Constify.
12333         * darwin-nat.c (darwin_pid_to_str): Constify.
12334         * fbsd-nat.c (fbsd_pid_to_str): Constify.
12335         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12336         Constify.
12337         * gnu-nat.c (gnu_pid_to_str): Constify.
12338         * go32-nat.c (go32_pid_to_str): Constify.
12339         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12340         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12341         * inferior.c (inferior_pid_to_str): Constify.
12342         * linux-nat.c (linux_nat_pid_to_str): Constify.
12343         * linux-tdep.c (linux_core_pid_to_str): Constify.
12344         * linux-thread-db.c (thread_db_pid_to_str)
12345         (thread_db_extra_thread_info): Constify.
12346         * nto-tdep.c (nto_extra_thread_info): Constify.
12347         * nto-tdep.h (nto_extra_thread_info): Constify.
12348         * obsd-nat.c (obsd_pid_to_str): Constify.
12349         * procfs.c (procfs_pid_to_str): Constify.
12350         * ravenscar-thread.c (ravenscar_extra_thread_info)
12351         (ravenscar_pid_to_str): Constify.
12352         * remote-sim.c (gdbsim_pid_to_str): Constify.
12353         * remote.c (remote_threads_extra_info, remote_pid_to_str):
12354         Constify.
12355         * sol-thread.c (solaris_pid_to_str): Constify.
12356         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12357         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12358         * target.c (default_pid_to_str, target_pid_to_str)
12359         (normal_pid_to_str, default_pid_to_str): Constify.
12360         * target.h (target_ops::to_pid_to_str)
12361         (target_ops::to_extra_thread_info): Constify.
12362         (target_pid_to_str, normal_pid_to_str): Constify.
12363         * windows-nat.c (windows_pid_to_str): Constify.
12364         * gdbarch.sh (core_pid_to_str): Constify.
12365         * target-delegates.c: Regenerate.
12366         * gdbarch.h, gdbarch.c: Regenerate.
12367
12368 2017-04-05  Pedro Alves  <palves@redhat.com>
12369
12370         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12371         the memory of the temporary warning_pre_print override.
12372         * utils.c (warning_pre_print): Constify.
12373         * utils.h (warning_pre_print): Constify.
12374
12375 2017-04-05  Pedro Alves  <palves@redhat.com>
12376
12377         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12378         (shell_command): New function.
12379         (make_command): Use std::string.
12380         (init_cli_cmds): Register shell_command instead of shell_escape.
12381
12382 2017-04-05  Pedro Alves  <palves@redhat.com>
12383
12384         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12385         * tracepoint.c (default_collect): Don't initialize.
12386
12387 2017-04-05  Pedro Alves  <palves@redhat.com>
12388
12389         * macroexp.c (macro_buffer::shared): Now a bool.
12390         (init_buffer): Update.
12391         (init_shared_buffer): Constify 'addr' parameter.
12392         (substitute_args, expand, macro_expand, macro_expand_next): Remove
12393         casts.
12394
12395 2017-04-05  Pedro Alves  <palves@redhat.com>
12396
12397         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12398         * disasm.c (set_disassembler_options): Constify local.
12399         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12400
12401 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
12402
12403         PR gdb/21352
12404         * tracefile.c (tsave_command): Fix argument parsing for '-r'
12405         option.
12406
12407 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12408
12409         * frame.c (frame_unwind_register_unsigned): Call
12410         frame_unwind_register_value.
12411
12412 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12413
12414         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12415         Use gdb_test_multiple, and don't match anchor.
12416
12417 2017-04-05  Pedro Alves  <palves@redhat.com>
12418
12419         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12420         (Write After Approval): Remove Simon Marchi.
12421
12422 2017-04-05  Pedro Alves  <palves@redhat.com>
12423
12424         * common/gdb_optional.h (optional::optional): Make constexpr and
12425         initialize m_dummy.
12426
12427 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12428
12429         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12430         (amd64fbsd_jmp_buf_reg_offset): Remove.
12431         (amd64fbsd_supply_uthread): Remove function.
12432         (amd64fbsd_collect_uthread): Remove function.
12433         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12434         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12435         (x86_64-*-freebsd*): Remove bsd-uthread.o.
12436         (fbsd-nat.c): Update comment.
12437         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12438         (i386fbsd_jmp_buf_reg_offset): Remove.
12439         (i386fbsd_supply_uthread): Remove function.
12440         (i386fbsd_collect_uthread): Remove function.
12441         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12442
12443 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12444
12445         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12446         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12447         * NEWS: Mention that support for FreeBSD/alpha was removed.
12448         * alpha-fbsd-tdep.c: Delete file.
12449         * config/alpha/fbsd.mh: Delete file.
12450         * configure.host: Delete alpha*-*-freebsd* and
12451         alpha*-*-kfreebsd*-gnu.
12452         * configure.tgt: Delete alpha*-*-freebsd* and
12453         alpha*-*-kfreebsd*-gnu.
12454
12455 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12456
12457         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12458         amd64bsd_store_inferior_registers): Use ptid from regcache.
12459
12460 2017-04-04  Pedro Alves  <palves@redhat.com>
12461
12462         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
12463         data fields, make them private and add "m_" prefixes.
12464         (lnp_state_machine::lnp_state_machine): New ctor.
12465         (record_line, check_line_address, handle_set_discriminator)
12466         (handle_set_address, handle_advance_pc, handle_special_opcode)
12467         (handle_advance_line, handle_set_file, handle_negate_stmt)
12468         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12469         (end_sequence, advance_line): New methods.
12470         (m_gdbarch, m_record_lines_p): New fields.
12471         (lnp_reader_state): Delete.
12472         (dwarf_record_line): Rename to ...
12473         (lnp_state_machine::record_line): ... adjust.
12474         (init_lnp_state_machine): Delete.
12475         (lnp_state_machine::lnp_state_machine): New.
12476         (check_line_address): Rename to ...
12477         (lnp_state_machine::check_line_address): This.
12478         (dwarf_decode_lines_1): Remove reference to "reader_state".
12479         Adjust lnp_state_machine having a non-default ctor.  Use bool.
12480         State machine internal state manipulation moved to
12481         lnp_state_machine methods.
12482
12483 2017-04-04  Pedro Alves  <palves@redhat.com>
12484
12485         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12486         unittests/offset-type-selftests.c.
12487         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12488         * common/offset-type.h: New file.
12489         * common/preprocessor.h: New file.
12490         * common/traits.h: New file.
12491         * common/valid-expr.h: New file.
12492         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
12493         sect_offset and cu_offset strong typedefs throughout.
12494         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12495         typedefs throughout.
12496         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
12497         sect_offset and cu_offset strong typedefs throughout.
12498         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12499         typedefs throughout.
12500         * gdbtypes.h: Include "common/offset-type.h".
12501         (cu_offset): Now an offset type (strong typedef) instead of a
12502         struct.
12503         (sect_offset): Likewise.
12504         (union call_site_parameter_u): Rename "param_offset" field to
12505         "param_cu_off".
12506         * unittests/offset-type-selftests.c: New file.
12507
12508 2017-04-04  Pedro Alves  <palves@redhat.com>
12509
12510         * common/underlying.h: New file.
12511         * dwarf2read.c: Include "common/gdb_optional.h" and
12512         "common/underlying.h".
12513         (dir_index, file_name_index): New types.
12514         (file_entry): Use them.
12515         (file_entry::include): Use to_underlying.
12516         (line_header::add_file_name): Use dir_index.
12517         (read_formatted_entries): Use gdb::optional.  Read form before
12518         writting to file_entry.
12519         (dwarf_decode_line_header): Use dir_index.
12520         (lnp_state_machine::current_file): Use to_underlying.
12521         (lnp_state_machine::file): Change type to file_name_index.
12522         (dwarf_record_line): Use to_underlying.
12523         (init_lnp_state_machine): Use file_name_index.
12524         (dwarf_decode_lines_1): Use dir_index and file_name_index.
12525
12526 2017-04-04  Pedro Alves  <palves@redhat.com>
12527
12528         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12529         operator bool, has_value and get methods.
12530
12531 2017-04-04  Pedro Alves  <palves@redhat.com>
12532
12533         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12534         fields.
12535         (line_header): Initialize all data fields.  Change type of
12536         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12537         Change type of include_dirs to std::vector<const char *>.  Remove
12538         num_include_dirs, include_dirs_size.  Change type of file_names to
12539         std::vector<file_entry>.  Remove num_file_names, file_names_size.
12540         (line_header::line_header): New.
12541         (line_header::add_include_dir, line_header::add_file_name): New
12542         methods.
12543         (line_header::include_dir_at): Remove NULL check.
12544         (line_header::file_name_at): Add const overload.
12545         (line_header_up): New unique_ptr typedef.
12546         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
12547         std::vector.  Remove free_line_header call.
12548         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
12549         free_line_header call.
12550         (free_cu_line_header): Delete.
12551         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12552         (setup_type_unit_groups): Use line_header_up instead of cleanups.
12553         Adjust to use std::vector.
12554         (free_line_header): Delete.
12555         (free_line_header_voidp): Use delete.
12556         (add_include_dir): Replace with ...
12557         (line_header::add_include_dir): ... this method.  Use std::vector.
12558         (add_file_name): Replace with ...
12559         (line_header::add_file_name): ... this method.  Use std::vector.
12560         (add_include_dir_stub): Delete.
12561         (read_formatted_entries): Remove memset.
12562         (dwarf_decode_line_header): Return a line_header_up instead of a
12563         raw pointer.  Remove cleanup handling.  Pass lambdas to
12564         read_formatted_entries.  Adjust to use line_header methods.
12565         (dwarf_decode_lines_1): Adjust to use line_header methods.
12566         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12567         use std::vector.
12568
12569 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
12570
12571         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12572         instead of struct ptid.
12573
12574 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
12575
12576         * frame.c (get_frame_register_bytes): Unwind using value.
12577         (put_frame_register_bytes): Likewise.
12578
12579 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
12580
12581         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12582         aggregate-like.
12583
12584 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
12585
12586         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12587
12588 2017-03-29  Yao Qi  <yao.qi@linaro.org>
12589
12590         * gdbthread.h (struct thread_info): Declare constructor and
12591         destructor.  Add some in-class member initializers.
12592         * thread.c (free_thread): Remove.
12593         (init_thread_list): Call delete instead of free_thread.
12594         (new_thread): Call thread_info constructor.
12595         (thread_info::thread_info): New function.
12596         (thread_info::~thread_info): New function.
12597         (delete_thread_1): Call delete instead of free_thread.
12598         (make_cleanup_restore_current_thread): Move tp and frame to
12599         inner block.
12600
12601 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12602
12603         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12604         (arc_skip_prologue): Likewise.
12605         (arc_make_frame_cache): Likewise.
12606         (arc_pv_get_operand): New function.
12607         (arc_is_in_prologue): Likewise.
12608         (arc_analyze_prologue): Likewise.
12609         (arc_print_frame_cache): Likewise.
12610         (MAX_PROLOGUE_LENGTH): New constant.
12611
12612 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12613
12614         * configure.tgt: Add arc-insn.o.
12615         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12616         (dump_arc_instruction_command): New function.
12617         (arc_fprintf_disasm): Likewise.
12618         (arc_disassemble_info): Likewise.
12619         (arc_insn_get_operand_value): Likewise.
12620         (arc_insn_get_operand_value_signed): Likewise.
12621         (arc_insn_get_memory_base_reg): Likewise.
12622         (arc_insn_get_memory_offset): Likewise.
12623         (arc_insn_get_branch_target): Likewise.
12624         (arc_insn_dump): Likewise.
12625         (arc_insn_get_linear_next_pc): Likewise.
12626         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12627         (arc_disassemble_info): Likewise.
12628         (arc_insn_get_branch_target): Likewise.
12629         (arc_insn_get_linear_next_pc): Likewise.
12630         * NEWS: Mention new "maint print arc arc-instruction".
12631
12632 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12633
12634         * arc-tdep (maintenance_print_arc_list): New variable.
12635         (maintenance_print_arc_command): New function.
12636
12637 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12638
12639         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12640         Add "limm" and "reserved".
12641         (arc_cannot_fetch_register, arc_cannot_store_register): Add
12642         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12643         * arc-tdep.h (arc_regnum): Likewise.
12644
12645 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12646
12647         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12648         for THREADPTR register.
12649         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12650         register.
12651         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12652         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12653         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12654
12655 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12656
12657         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12658         registers above gdbarch_num_regs (gdbarch) as privileged in
12659         call0 ABI.
12660
12661 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12662
12663         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12664         for a single specified register or for all registers in
12665         a0_base..a0_base + C0_NREGS range.
12666         (supply_gregset_reg): Call regcache_raw_supply for a single
12667         specified register or for all registers in a0_base..a0_base +
12668         C0_NREGS range.
12669
12670 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12671
12672         * arch/xtensa.h (C0_NREGS): Add definition.
12673         * xtensa-tdep.c (C0_NREGS): Remove definition.
12674
12675 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12676
12677         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
12678         Drop xtensa_default_isa initialization.
12679         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
12680
12681 2017-03-27  Pedro Alves  <palves@redhat.com>
12682
12683         * dwarf2read.c (file_entry) <dir_index>: Add comment.
12684         (file_entry::include_dir): New method.
12685         (line_header::include_dir_at, line_header::file_name_at): New
12686         methods.
12687         (setup_type_unit_groups, setup_type_unit_groups)
12688         (psymtab_include_file_name): Simplify using the new methods.
12689         (lnp_state_machine) <the_line_header>: New field.
12690         <file>: Add comment.
12691         (lnp_state_machine::current_file): New method.
12692         (dwarf_record_line): Simplify using the new methods.
12693         (init_lnp_state_machine): Initialize the "the_line_header" field.
12694         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
12695         Simplify using the new methods.
12696
12697 2017-03-27  Pedro Alves  <palves@redhat.com>
12698
12699         * cp-name-parser.y (make_empty): Delete.
12700         (demangler_special, nested_name, ptr_operator, array_indicator)
12701         (direct_declarator, declarator_1): Use fill_comp instead of
12702         make_empty.
12703
12704 2017-03-27  Pedro Alves  <palves@redhat.com>
12705
12706         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
12707         to ATTRIBUTE_PRINTF.
12708         * solib-target.c (library_list_start_list): Print "string" not
12709         "version".
12710         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
12711         gdb_xml_error call.
12712
12713 2017-03-27  Pedro Alves  <palves@redhat.com>
12714
12715         * dwarf2read.c (struct file_and_directory): New.
12716         (dwarf2_get_dwz_file): Adjust to use std::string.
12717         (dw2_get_file_names_reader): Adjust to use file_and_directory.
12718         (find_file_and_directory): Adjust to return a file_and_directory
12719         object.
12720         (read_file_scope): Adjust to use file_and_directory.  Remove
12721         make_cleanup/do_cleanups calls.
12722         (open_and_init_dwp_file): Adjust to use std::string.  Remove
12723         make_cleanup/do_cleanups calls.
12724         * python/python.c (do_start_initialization): Adjust to ldirname
12725         returning a std::string.
12726         * utils.c (ldirname): Now returns a std::string.
12727         * utils.h (ldirname): Change return type to std::string.
12728         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
12729         returning a std::string.
12730         * xml-tdesc.c (file_read_description_xml): Likewise.
12731
12732 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
12733
12734         * regcache.c (regcache_debug_print_register): New function.
12735         * regcache.h (regcache_debug_print_register): New declaration.
12736         * target.c (debug_print_register): Remove.
12737         (target_fetch_registers): Call regcache_debug_print_register.
12738         (target_store_registers): Likewise.
12739
12740 2017-03-24  Pádraig Brady  <pbrady@fb.com>
12741
12742         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
12743         reference beyond the 'lh->include_dirs' array before accessing to
12744         it.
12745         (psymtab_include_file_name): Likewise.
12746         (dwarf_decode_lines_1): Likewise.
12747         (dwarf_decode_lines): Likewise.
12748         (file_file_name): Likewise.
12749
12750 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
12751
12752         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
12753         inferior_ptid.
12754         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12755         ps_lsetfpregs): Likewise.
12756         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
12757         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12758         ps_lsetfpregs): Likewise.
12759         * target.c (target_fetch_registers, target_store_registers):
12760         Remove asserts.
12761
12762 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
12763
12764         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
12765
12766 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12767
12768         * aarch64-tdep.c (aarch64_process_record_test): Declare.
12769         (_initialize_aarch64_tdep): Register it.
12770         (aarch64_record_load_store): Handle PRFM instruction.
12771         (aarch64_process_record_test): New function.
12772
12773 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12774
12775         * aarch64-tdep.c (aarch64_record_load_store): Fix code
12776         indentation.
12777
12778 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12779
12780         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
12781
12782 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12783
12784         python/python.c (do_start_initialization): Fix memory leak.
12785
12786 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12787
12788         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
12789         using get_ptrace_pid.
12790         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12791         inferior_ptid.
12792         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12793         inferior_ptid instead of pid.
12794
12795 2017-03-22  Yao Qi  <yao.qi@linaro.org>
12796
12797         * aarch64-tdep.c: Wrap locally used classes in anonymous
12798         namespace.
12799         * arm-tdep.c: Likewise.
12800         * linespec.c: Likewise.
12801         * ui-out.c: Likewise.
12802
12803 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
12804
12805         PR gdb/19637
12806         * python/lib/gdb/printer/bound_registers.py: Import sys.
12807
12808 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12809
12810         * windows-nat.c (do_windows_fetch_inferior_registers): Add
12811         windows_thread_info parameter and use it instead of
12812         current_thread.
12813         (windows_fetch_inferior_registers): Don't set current_thread,
12814         pass the thread to do_windows_fetch_inferior_registers.  Use
12815         ptid from regcache instead of inferior_ptid.
12816         (do_windows_store_inferior_registers): Add windows_thread_info
12817         parameter and use it instead of current_thread.
12818         (windows_store_inferior_registers): Don't set current_thread,
12819         pass the thread to do_windows_store_inferior_registers.  Use
12820         ptid from regcache instead of inferior_ptid.
12821
12822 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12823
12824         * ser-mingw.c (ser_windows_raw): Remove reference to
12825         struct serial::current_timeout.
12826
12827 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
12828
12829         PR tdep/20928
12830         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
12831         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
12832         (sparc64_fsr_type): Fix %fsr decoding.
12833
12834 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
12835
12836         * python/py-record-btrace.c (btpy_insn_data): Change return type
12837         for Python 2.
12838
12839 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12840
12841         * spu-linux-nat.c (spu_fetch_inferior_registers,
12842         spu_store_inferior_registers): Use ptid from regcache, set and
12843         restore inferior_ptid.
12844         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
12845         Likewise.
12846
12847 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12848
12849         * i386-linux-nat.c (fetch_register, store_register,
12850         i386_linux_fetch_inferior_registers,
12851         i386_linux_store_inferior_registers): Use ptid from regcache.
12852         * ia64-linux-nat.c (ia64_linux_fetch_register,
12853         ia64_linux_store_register): Likewise.
12854         * inf-ptrace.c (inf_ptrace_fetch_register,
12855         inf_ptrace_store_register): Likewise.
12856         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
12857         m32r_linux_store_inferior_registers): Likewise.
12858         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
12859         m68kbsd_store_inferior_registers): Likewise.
12860         * m68k-linux-nat.c (fetch_register, store_register,
12861         m68k_linux_fetch_inferior_registers,
12862         m68k_linux_store_inferior_registers): Likewise.
12863         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
12864         m88kbsd_store_inferior_registers): Likewise.
12865         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
12866         mips_fbsd_store_inferior_registers): Likewise.
12867         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
12868         mips64_linux_regsets_store_registers): Likewise.
12869         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
12870         mipsnbsd_store_inferior_registers): Likewise.
12871         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
12872         mips64obsd_store_inferior_registers): Likewise.
12873         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
12874         Likewise.
12875         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
12876         ppcfbsd_store_inferior_registers): Likewise.
12877         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
12878         ppc_linux_store_inferior_registers): Likewise.
12879         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
12880         ppcnbsd_store_inferior_registers): Likewise.
12881         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
12882         ppcobsd_store_registers): Likewise.
12883         * procfs.c (procfs_fetch_registers, procfs_store_registers):
12884         Likewise.
12885         * ravenscar-thread.c (ravenscar_fetch_registers,
12886         ravenscar_store_registers, ravenscar_prepare_to_store):
12887         Likewise.
12888         * record-btrace.c (record_btrace_fetch_registers,
12889         record_btrace_store_registers, record_btrace_prepare_to_store):
12890         Likewise.
12891         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
12892         Lookup inferior using ptid from regcache, instead of
12893         current_inferior.
12894         * remote.c (remote_fetch_registers, remote_store_registers): Use
12895         ptid from regcache.
12896         * rs6000-nat.c (fetch_register, store_register): Likewise.
12897         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
12898         s390_linux_store_inferior_registers): Likewise.
12899         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
12900         shnbsd_store_inferior_registers): Likewise.
12901         * sol-thread.c (sol_thread_fetch_registers,
12902         sol_thread_store_registers): Likewise.
12903         * sparc-nat.c (sparc_fetch_inferior_registers,
12904         sparc_store_inferior_registers): Likewise.
12905         * tilegx-linux-nat.c (fetch_inferior_registers,
12906         store_inferior_registers): Likewise.
12907         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
12908         vaxbsd_store_inferior_registers): Likewise.
12909         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
12910         store_xtregs): Likewise.
12911
12912 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12913
12914         PR gdb/14441
12915         * NEWS: Mention support for rvalue references in GDB and python.
12916         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
12917         supports both lvalue and rvalue references.
12918
12919 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12920
12921         PR gdb/14441
12922         * gdbtypes.c (rank_one_type): Implement overloading
12923         resolution rules regarding rvalue references.
12924
12925 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12926
12927         PR gdb/14441
12928         * aarch64-tdep.c (aarch64_type_align)
12929         (aarch64_extract_return_value, aarch64_store_return_value): Change
12930         lvalue reference type checks to general reference type checks.
12931         * amd64-tdep.c (amd64_classify): Likewise.
12932         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
12933         Likewise.
12934         * arm-tdep.c (arm_type_align, arm_extract_return_value)
12935         (arm_store_return_value): Likewise.
12936         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
12937         * c-typeprint.c (c_print_type): Likewise.
12938         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
12939         (cplus_number_of_children, cplus_describe_child): Likewise.
12940         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
12941         * completer.c (expression_completer): Likewise.
12942         * cp-support.c (make_symbol_overload_list_adl_namespace):
12943         Likewise.
12944         * darwin-nat-info.c (info_mach_region_command): Likewise.
12945         * dwarf2loc.c (entry_data_value_coerce_ref)
12946         (value_of_dwarf_reg_entry): Likewise.
12947         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
12948         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
12949         Likewise.
12950         * findvar.c (extract_typed_address, store_typed_address):
12951         Likewise.
12952         * gdbtypes.c (rank_one_type): Likewise.
12953         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
12954         * infcall.c (value_arg_coerce): Likewise.
12955         * language.c (pointer_type): Likewise.
12956         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
12957         Likewise.
12958         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
12959         * mn10300-tdep.c (mn10300_type_align): Likewise.
12960         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
12961         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
12962         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
12963         Likewise.
12964         * printcmd.c (print_formatted, x_command): Likewise.
12965         * python/py-type.c (typy_get_composite, typy_template_argument):
12966         Likewise.
12967         * python/py-value.c (valpy_referenced_value)
12968         (valpy_get_dynamic_type, value_has_field): Likewise.
12969         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
12970         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
12971         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
12972         * spu-tdep.c (spu_scalar_value_p): Likewise.
12973         * symtab.c (lookup_symbol_aux): Likewise.
12974         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
12975         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
12976         Likewise.
12977         * valops.c (value_cast_pointers, value_cast)
12978         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
12979         (value_struct_elt, value_struct_elt_bitpos)
12980         (value_find_oload_method_list, find_overload_match)
12981         (value_rtti_indirect_type): Likewise.
12982         * valprint.c (val_print_scalar_type_p, generic_val_print):
12983         Likewise.
12984         * value.c (value_actual_type, value_as_address, unpack_long)
12985         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
12986         (coerce_ref): Likewise.
12987         * varobj.c (varobj_get_value_type): Likewise.
12988
12989 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12990
12991         PR gdb/14441
12992         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
12993         table of constants.
12994         * python/lib/gdb/command/explore.py: Support exploring values
12995         of rvalue reference types.
12996         * python/lib/gdb/types.py: Implement get_basic_type() for
12997         rvalue reference types.
12998         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
12999         constant.
13000         * python/py-value.c (valpy_getitem): Add an rvalue reference
13001         check.
13002         (valpy_reference_value): Add new parameter "refcode".
13003         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13004         New wrappers for valpy_reference_value().
13005         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13006         (gdbpy_invoke_xmethod): Likewise.
13007
13008 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13009
13010         PR gdb/14441
13011         * dwarf2read.c (process_die, read_type_die_1): Handle the
13012         DW_TAG_rvalue_reference_type DIE.
13013         (read_tag_reference_type): Add new parameter "refcode".
13014
13015 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13016
13017         PR gdb/14441
13018         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13019         (c_type_print_modifier, c_type_print_varspec_suffix)
13020         (c_type_print_base): Support printing rvalue reference types.
13021         * c-valprint.c (c_val_print, c_value_print): Support printing
13022         rvalue reference values.
13023
13024 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13025
13026         PR gdb/14441
13027         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13028         typename.
13029         * cp-support.c (replace_typedefs): Handle
13030         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13031         * python/py-type.c (typy_lookup_type): Likewise.
13032
13033 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13034
13035         PR gdb/14441
13036         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13037         * parse.c (insert_type): Change assert statement.
13038         (follow_types): Handle rvalue reference types.
13039         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13040         constant.
13041
13042 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13043
13044         PR gdb/14441
13045         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13046         value_ref() interface.
13047         * c-valprint.c (c_value_print): Likewise.
13048         * infcall.c (value_arg_coerce): Likewise.
13049         * python/py-value.c (valpy_reference_value): Likewise.
13050         * valops.c (value_cast, value_reinterpret_cast)
13051         (value_dynamic_cast, typecmp): Likewise.
13052         (value_ref): Parameterize by kind of return value reference type.
13053         * value.h (value_ref): Add new parameter "refcode".
13054
13055 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13056
13057         PR gdb/14441
13058         * dwarf2read.c (read_tag_reference_type): Use
13059         lookup_lvalue_reference_type() instead of lookup_reference_type().
13060         * eval.c (evaluate_subexp_standard): Likewise.
13061         * f-exp.y: Likewise.
13062         * gdbtypes.c (make_reference_type, lookup_reference_type):
13063         Generalize with rvalue reference types.
13064         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13065         convenience wrappers for lookup_reference_type().
13066         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13067         reference kind parameter.
13068         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13069         wrappers for lookup_reference_type().
13070         * guile/scm-type.c (gdbscm_type_reference): Use
13071         lookup_lvalue_reference_type() instead of lookup_reference_type().
13072         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13073         * parse.c (follow_types): Likewise.
13074         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13075         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13076         Likewise.
13077         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13078         (gdbpy_invoke_xmethod): Likewise.
13079         * stabsread.c: Provide extra argument to make_reference_type()
13080         call.
13081         * valops.c (value_ref, value_rtti_indirect_type): Use
13082         lookup_lvalue_reference_type() instead of lookup_reference_type().
13083
13084 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13085
13086         PR gdb/14441
13087         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13088         (TYPE_IS_REFERENCE): New macro.
13089         (struct type): Add rvalue_reference_type field.
13090         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13091
13092 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13093
13094         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13095         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13096         New function definition.
13097         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13098         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13099         New function declaration.
13100         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13101         * mi/mi-interp.h: New file.
13102         * solib.c (info_sharedlibrary_command): Replace for loop with
13103         ALL_SO_LIBS macro
13104         * solib.h (update_solib_list): New function declaration.
13105         (so_list_head): Move macro.
13106         * solist.h (ALL_SO_LIBS): New macro.
13107
13108 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13109
13110         * infcmd.c (post_create_inferior): Remove unused argument in
13111         call to solib_add.
13112         * remote.c (remote_start_remote): Likewise.
13113         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13114         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13115         (enable_break): Likewise.
13116         * solib.c (update_solib_list): Remove unused target argument
13117         and its documentation.
13118         (solib_add): Remove unused target argument.  Remove unused
13119         argument in call to update_solib_list.
13120         (info_sharedlibrary_command): Remove unused argument in call
13121         to update_solib_list.
13122         (sharedlibrary_command): Remove unused argument in call to
13123         solib_add.
13124         (handle_solib_event): Likewise.
13125         (reload_shared_libraries): Likewise.
13126         * solib.h (solib_add): Remove unused target argument.
13127
13128 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13129
13130         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13131         (s390_displaced_step_fixup): Cover relative branches with the
13132         default fixup handling.  This fixes lack of support for some
13133         relative branch instructions.
13134
13135 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13136
13137         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13138         ptid from regcache.
13139
13140 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13141
13142         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13143         i386_darwin_store_inferior_registers): Use ptid from regcache.
13144
13145 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13146
13147         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13148         i386bsd_store_inferior_registers): Use ptid from regcache.
13149
13150 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13151
13152         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13153         hppaobsd_store_registers): Use ptid from regcache.
13154
13155 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13156
13157         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13158         hppanbsd_store_registers): Use ptid from regcache.
13159
13160 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13161
13162         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13163         from regcache.  Use get_ptrace_pid.
13164
13165 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13166
13167         * corelow.c (get_core_register_section): Use ptid from regcache,
13168         update doc.
13169
13170 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13171
13172         * bsd-uthread.c (bsd_uthread_fetch_registers,
13173         bsd_uthread_store_registers): Use ptid from regcache, set and
13174         restore inferior_ptid.
13175
13176 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13177
13178         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13179         fetch_fp_regs, store_register, store_regs, store_fp_register,
13180         store_fp_regs): Use ptid from regcache.
13181
13182 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13183
13184         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13185         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13186         store_vfp_regs): Use ptid from regcache.
13187
13188 2017-03-17  Pedro Alves  <palves@redhat.com>
13189
13190         PR remote/21188
13191         * ser-base.c (ser_base_wait_for): Add comment.
13192         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13193         version.
13194         * ser-unix.c (hardwire_raw): Remove reference to
13195         scb->current_timeout.
13196         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13197         (hardwire_ops): Install ser_base_readchar instead of
13198         hardwire_readchar.
13199         * serial.h (struct serial) <current_timeout, timeout_remaining>:
13200         Remove fields.
13201
13202 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
13203
13204         PR gdb/19637
13205         * python/lib/gdb/printer/bound_registers.py: Add support for
13206         Python 3.
13207
13208 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13209
13210         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13211         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13212         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13213         byte_offset to subobj_byte_offset.  Fix the handling of
13214         DWARF_VALUE_STACK on big-endian targets when coming via an
13215         implicit pointer.
13216         (dwarf2_evaluate_loc_desc): Adjust call to
13217         dwarf2_evaluate_loc_desc_full.
13218         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13219         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13220
13221 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13222
13223         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13224         and REVSH instructions.
13225
13226 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13227
13228         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13229         (arm_record_test): Declare.
13230         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13231         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13232         align with the manual.
13233         (thumb_record_misc): Adjust the code order to align with the
13234         manual.
13235         (thumb2_record_decode_insn_handler): Fix instruction matching.
13236         (instruction_reader_thumb): New class.
13237         (arm_record_test): New function.
13238
13239 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13240
13241         * arm-tdep.c (abstract_memory_reader): New class.
13242         (instruction_reader): New class.
13243         (extract_arm_insn): Add argument 'reader'.  Callers updated.
13244         (decode_insn): Likewise.
13245
13246 2017-03-16  Doug Evans  <dje@google.com>
13247
13248         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13249         member.  Change type of TYPE member to SCM.  All uses updated.
13250         (lsscm_make_lazy_string_smob): Add assert.
13251         (lsscm_make_lazy_string): Flag bad length values.
13252         (lsscm_elt_type): New function.
13253         (gdbscm_lazy_string_to_value): Rewrite to use
13254         lsscm_safe_lazy_string_to_value.
13255         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13256         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13257         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
13258         in incoming type.
13259         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13260         * guile/scm-type.c (tyscm_scm_to_type): New function.
13261
13262 2017-03-15  Doug Evans  <dje@google.com>
13263
13264         PR python/17728, python/18439, python/18779
13265         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13266         member.  Change type of TYPE member to PyObject *.  All uses updated.
13267         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13268         (gdbpy_create_lazy_string_object): Flag bad length values.
13269         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13270         Handle typedefs in incoming type.
13271         (stpy_lazy_string_elt_type): New function.
13272         (gdbpy_extract_lazy_string): Call it.
13273         * python/py-value.c (valpy_lazy_string): Flag bad length values.
13274         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
13275         typedefs in incoming type.
13276
13277 2017-03-16  Doug Evans  <dje@google.com>
13278
13279         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13280         * guile/scm-type.c (tyscm_scm_to_type): New function.
13281
13282 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
13283
13284         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13285         "ULONGEST" for "skip".
13286
13287 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13288
13289         PR gdb/21220
13290         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13291         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13292         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
13293         over ptrace peek/poke until end of buffer or error.
13294
13295 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
13296
13297         * parse.c (length_of_subexp): Make static.
13298         * parser-defs.h (length_of_subexp): Remove.
13299
13300 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13301
13302         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13303         as well.
13304
13305 2017-03-14  Pedro Alves  <palves@redhat.com>
13306
13307         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13308         (main): Use std::unique_ptr.  Remove calls to
13309         cp_demangled_name_parse_free.
13310
13311 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13312
13313         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13314         alphabsd_store_inferior_registers): Use regcache->ptid instead
13315         of inferior_ptid.
13316
13317 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13318
13319         * aix-thread.c (aix_thread_fetch_registers,
13320         aix_thread_store_registers): Use regcache->ptid instead of
13321         inferior_ptid.
13322
13323 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13324
13325         * aarch64-linux-nat.c (fetch_gregs_from_thread,
13326         store_gregs_to_thread, fetch_fpregs_from_thread,
13327         store_fpregs_to_thread): Use regcache->ptid instead of
13328         inferior_ptid.
13329
13330 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13331
13332         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13333         amd64_linux_fetch_inferior_registers): Use regcache->ptid
13334         instead of inferior_ptid.
13335
13336 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13337
13338         * target.c (target_fetch_registers, target_store_registers): Add
13339         assert.
13340
13341 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13342
13343         * regcache.h (regcache_get_ptid): New function.
13344         * regcache.c (regcache_get_ptid): New function.
13345
13346 2017-03-13  Mark Wielaard  <mark@klomp.org>
13347
13348         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13349
13350 2017-03-10  Keith Seitz  <keiths@redhat.com>
13351
13352         PR c++/8218
13353         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13354
13355 2017-03-08  Pedro Alves  <palves@redhat.com>
13356
13357         PR gdb/18360
13358         * infrun.c (start_step_over, do_target_resume, resume)
13359         (restart_threads): Assert we're not resuming a thread that is
13360         meant to be stopped.
13361         (infrun_thread_stop_requested_callback): Delete.
13362         (infrun_thread_stop_requested): If the thread is internally
13363         stopped, queue a pending stop event and clear the thread's
13364         inline-frame state.
13365         (handle_stop_requested): New function.
13366         (handle_syscall_event, handle_inferior_event_1): Use
13367         handle_stop_requested.
13368         (handle_stop_requested): New function.
13369         (handle_signal_stop): Set the thread's stop_signal here instead of
13370         at caller.
13371         (finish_step_over): Clear step over info unconditionally.
13372         (handle_signal_stop): If the user had interrupted the event
13373         thread, consider the stop a random signal.
13374         (handle_signal_stop) <signal arrived while stepping over
13375         breakpoint>: Don't restart threads here.
13376         (stop_waiting): Don't clear step-over info here.
13377
13378 2017-03-08  Pedro Alves  <palves@redhat.com>
13379
13380         PR 21206
13381         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13382         goes to argument 2, not 1.
13383
13384 2017-03-08  Pedro Alves  <palves@redhat.com>
13385
13386         PR cli/21218
13387         * top.c (gdb_readline_wrapper): Avoid passing NULL to
13388         display_gdb_prompt.
13389         (command_line_input): Add comment.
13390
13391 2017-03-08  Pedro Alves  <palves@redhat.com>
13392
13393         PR tui/21216
13394         * tui/tui-file.c (tui_file::write): New.
13395         * tui/tui-file.h (tui_file): Override "write".
13396         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13397         factored out from ...
13398         (tui_puts): ... here.
13399         (tui_putc): Use them.
13400         (tui_write): New function.
13401         * tui/tui-io.h (tui_write): Declare.
13402
13403 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
13404
13405         * Makefile.in (SFILES): Replace "environ.c" with
13406         "common/environ.c".
13407         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13408         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
13409         to...
13410         * common/environ.c: ... here.
13411         * environ.h: Moved to...
13412         * common/environ.h: ... here.
13413
13414 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13415
13416         * gdbarch.sh (pstring_ptr): New static function.
13417         (gdbarch_disassembler_options): Use it.
13418         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13419         not valid_disassembler_option->name.
13420         * gdbarch.c: Regenerate.
13421
13422 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13423
13424         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13425
13426 2017-03-07  Pedro Alves  <palves@redhat.com>
13427
13428         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13429
13430 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13431
13432         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13433         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13434         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13435         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13436
13437 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
13438
13439         * xtensa-linux-nat.c (fetch_gregs): Remove const.
13440
13441 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
13442
13443         * remote.c (remote_add_target_side_commands): Use range-based
13444         for loop.
13445
13446 2017-03-03  Yao Qi  <yao.qi@linaro.org>
13447
13448         PR gdb/21165
13449         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13450         value is lazy.
13451         * valprint.c (common_val_print): Likewise.
13452
13453 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
13454
13455         * NEWS: Mention new set/show disassembler-options commands.
13456         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13457         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13458         (prospective_options): New static variable.
13459         (gdb_disassembler::gdb_disassembler): Initialize
13460         m_di.disassembler_options.
13461         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13462         (get_disassembler_options): New function.
13463         (set_disassembler_options): Likewise.
13464         (set_disassembler_options_sfunc): Likewise.
13465         (show_disassembler_options_sfunc): Likewise.
13466         (disassembler_options_completer): Likewise.
13467         (_initialize_disasm): Likewise.
13468         * disasm.h (get_disassembler_options): New prototype.
13469         (set_disassembler_options): Likewise.
13470         * gdbarch.sh (gdbarch_disassembler_options): New variable.
13471         (gdbarch_verify_disassembler_options): Likewise.
13472         * gdbarch.c: Regenerate.
13473         * gdbarch.h: Likewise.
13474         * arm-tdep.c (num_disassembly_options): Delete.
13475         (set_disassembly_style): Likewise.
13476         (arm_disassembler_options): New static variable.
13477         (set_disassembly_style_sfunc): Convert short style name into long
13478         option name.  Call set_disassembler_options.
13479         (show_disassembly_style_sfunc): New function.
13480         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13481         set_gdbarch_verify_disassembler_options.
13482         (_initialize_arm_tdep): Delete regnames variable and update callers.
13483         (arm_disassembler_options): Initialize.
13484         (disasm_options): New variable.
13485         (num_disassembly_options): Rename from this...
13486         (num_disassembly_styles): ...to this.  Compute by scanning through
13487         disasm_options.
13488         (valid_disassembly_styles): Initialize using disasm_options.
13489         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13490         set_arm_regname_option.
13491         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13492         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13493         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13494         set_gdbarch_verify_disassembler_options.
13495         * s390-tdep.c (s390_disassembler_options): New static variable.
13496         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13497         set_gdbarch_verify_disassembler_options.
13498
13499 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13500
13501         * remote.c (remote_add_target_side_condition): Remove "struct"
13502         keyword from range-based for loop.
13503
13504 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13505
13506         * remote.c (remote_add_target_side_condition): Use range-based
13507         for loop.  Update comment.
13508
13509 2017-02-27  Yao Qi  <yao.qi@linaro.org>
13510
13511         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13512
13513 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
13514
13515         * regcache.c (regcache_raw_update): New function.
13516         (regcache_raw_read): Move code to regcache_raw_update.
13517         * regcache.h (regcache_raw_update): New declaration.
13518         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13519
13520 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
13521
13522         * dwarf2read.c (create_debug_type_hash_table): Initialize
13523         header.signature and header.type_offset_in_tu.
13524
13525 2017-02-24  Pedro Alves  <palves@redhat.com>
13526
13527         * symtab.c (make_file_symbol_completion_list_1): Use
13528         add_symtab_completions.
13529
13530 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13531
13532         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13533
13534 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13535
13536         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13537         I386_MAX_REGISTER_SIZE.
13538         (i386_pseudo_register_write): Likewise.
13539         (i386_process_record): Likewise.
13540         * i387-tdep.c (i387_supply_xsave): Likewise.
13541         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13542         (store_register): Likewise.
13543
13544 2017-02-23  Pedro Alves  <palves@redhat.com>
13545
13546         * ada-lang.c: Include "common/function-view.h".
13547         (ada_iterate_over_symbols): Adjust to use function_view as
13548         callback type.
13549         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13550         (ada_make_symbol_completion_list): Use a lambda.
13551         (ada_exc_search_name_matches): Delete.
13552         (name_matches_regex): New.
13553         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13554         * compile/compile-c-support.c: Include "common/function-view.h".
13555         (print_one_macro): Change prototype to accept a ui_file pointer.
13556         (write_macro_definitions): Use a lambda.
13557         * dwarf2read.c: Include "common/function-view.h".
13558         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13559         (dw2_expand_symtabs_matching): Adjust to use function_view as
13560         callback type.
13561         * language.h: Include "common/function-view.h".
13562         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13563         function_view as callback type.
13564         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13565         * linespec.c: Include "common/function-view.h".
13566         (collect_info::add_symbol): New method.
13567         (struct symbol_and_data_callback, iterate_inline_only, struct
13568         symbol_matcher_data, iterate_name_matcher): Delete.
13569         (iterate_over_all_matching_symtabs): Adjust to use function_view
13570         as callback type and lambdas.
13571         (iterate_over_file_blocks): Adjust to use function_view as
13572         callback type.
13573         (decode_compound_collector): Now a class with private fields.
13574         (decode_compound_collector::release_symbols): New method.
13575         (collect_one_symbol): Rename to...
13576         (decode_compound_collector::operator()): ... this and adjust.
13577         (lookup_prefix_sym): decode_compound_collector construction bits
13578         move to decode_compound_collector ctor.  Pass the
13579         decode_compound_collector object directly as callback.  Remove
13580         cleanups and use decode_compound_collector::release_symbols
13581         instead.
13582         (symtab_collector): Now a class with private fields.
13583         (symtab_collector::release_symtabs): New method.
13584         (add_symtabs_to_list): Rename to...
13585         (symtab_collector::operator()): ... this and adjust.
13586         (collect_symtabs_from_filename): symtab_collector construction
13587         bits move to symtab_collector ctor.  Pass the symtab_collector
13588         object directly as callback.  Remove cleanups and use
13589         symtab_collector::release_symtabs instead.
13590         (collect_symbols): Delete.
13591         (add_matching_symbols_to_info): Use lambdas.
13592         * macrocmd.c (print_macro_callback): Delete.
13593         (info_macro_command): Use a lambda.
13594         (info_macros_command): Pass print_macro_definition as callable
13595         directly.
13596         (print_one_macro): Remove 'ignore' parameter.
13597         (macro_list_command): Adjust.
13598         * macrotab.c (macro_for_each_data::fn): Now a function_view.
13599         (macro_for_each_data::user_data): Delete field.
13600         (foreach_macro): Adjust to call the function_view.
13601         (macro_for_each): Adjust to use function_view as callback type.
13602         (foreach_macro_in_scope): Adjust to call the function_view.
13603         (macro_for_each_in_scope): Adjust to use function_view as callback
13604         type.
13605         * macrotab.h: Include "common/function-view.h".
13606         (macro_callback_fn): Declare a prototype instead of a pointer.
13607         Remove "user_data" parameter.
13608         (macro_for_each, macro_for_each_in_scope): Adjust to use
13609         function_view as callback type.
13610         * psymtab.c (partial_map_expand_apply)
13611         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13612         Adjust to use function_view as callback type and to return bool.
13613         (psym_expand_symtabs_matching): Adjust to use function_view as
13614         callback types.
13615         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13616         to use function_view as callback type and to return bool.
13617         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13618         callback types.
13619         * symfile.c (expand_symtabs_matching): Adjust to use function_view
13620         as callback types.
13621         * symfile.h: Include "common/function-view.h".
13622         (expand_symtabs_file_matcher_ftype)
13623         (expand_symtabs_symbol_matcher_ftype)
13624         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13625         return bool.
13626         (quick_symbol_functions::map_symtabs_matching_filename)
13627         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13628         function_view as callback type and return bool.
13629         (expand_symtabs_matching): Adjust to use function_view as callback
13630         type.
13631         (maintenance_expand_name_matcher)
13632         (maintenance_expand_file_matcher): Delete.
13633         (maintenance_expand_symtabs): Use lambdas.
13634         * symtab.c (iterate_over_some_symtabs): Adjust to use
13635         function_view as callback types and return bool.
13636         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
13637         of a cleanup.
13638         (lookup_symtab_callback): Delete.
13639         (lookup_symtab): Use a lambda.
13640         (iterate_over_symbols): Adjust to use function_view as callback
13641         type.
13642         (struct search_symbols_data, search_symbols_file_matches)
13643         (search_symbols_name_matches): Delete.
13644         (search_symbols): Use a pair of lambdas.
13645         (struct add_name_data, add_macro_name, symbol_completion_matcher)
13646         (symtab_expansion_callback): Delete.
13647         (default_make_symbol_completion_list_break_on_1): Use lambdas.
13648         * symtab.h: Include "common/function-view.h".
13649         (iterate_over_some_symtabs): Adjust to use function_view as
13650         callback type and return bool.
13651         (iterate_over_symtabs): Adjust to use function_view as callback
13652         type.
13653         (symbol_found_callback_ftype): Remove 'data' parameter and return
13654         bool.
13655         (iterate_over_symbols): Adjust to use function_view as callback
13656         type.
13657
13658 2017-02-23  Pedro Alves  <palves@redhat.com>
13659
13660         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
13661         (%.o) <unittests/%.c>: New pattern.
13662         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
13663         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
13664         * common/function-view.h: New file.
13665         * unittests/function-view-selftests.c: New file.
13666         * configure: Regenerate.
13667
13668 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
13669
13670         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
13671         inferior_ptid.
13672         * go32-nat.c (go32_thread_alive): Likewise.
13673
13674 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13675
13676         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
13677         delete.
13678
13679 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13680
13681         * varobj.c (varobj_clear_saved_item): Use delete instead of
13682         xfree.
13683         (update_dynamic_varobj_children): Likewise.
13684
13685 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13686
13687         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
13688
13689 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
13690
13691         * common/enum-flags.h (enum_flags::enum_flags): Initialize
13692         m_enum_value to 0 in default constructor.
13693
13694 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
13695
13696         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
13697         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
13698         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
13699         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
13700         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
13701         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
13702         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
13703         IS_STORE_CONDITIONAL_INSN.
13704
13705 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13706
13707         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
13708
13709 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13710
13711         * NEWS (Changes since GDB 7.12): Add DWARF-5.
13712
13713 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13714
13715         * dwarf2read.c (skip_one_die, read_attribute_value)
13716         (dwarf2_const_value_attr, dump_die_shallow)
13717         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
13718         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
13719
13720 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13721
13722         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
13723         (dwarf_parse_macro_header): Accept DWARF version 5.
13724         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
13725
13726 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13727
13728         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
13729         DW_AT_GNU_*.
13730         * common/common-exceptions.h (enum errors): Likewise.
13731         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
13732         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
13733         (dwarf_expr_context::execute_stack_op): Likewise.
13734         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
13735         Likewise.
13736         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
13737         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
13738         (show_entry_values_debug, call_site_to_target_addr)
13739         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
13740         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
13741         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
13742         (value_of_dwarf_block_entry, indirect_pieced_value)
13743         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
13744         (disassemble_dwarf_expression): Likewise.
13745         * dwarf2read.c (process_die, inherit_abstract_dies)
13746         (read_call_site_scope): Likewise.
13747         * gdbtypes.h (struct func_type, struct call_site_parameter)
13748         (struct call_site): Likewise.
13749         * stack.c (read_frame_arg): Likewise.
13750         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
13751
13752 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13753
13754         * defs.h (read_unsigned_leb128): New declaration.
13755         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
13756         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
13757         (dwarf2_find_location_expression): Call also
13758         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
13759         * dwarf2loc.h (dwarf2_version): New declaration.
13760         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
13761         rnglists.
13762         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
13763         .debug_rnglists.
13764         (struct dwop_section_names): Add loclists_dwo.
13765         (dwop_section_names): Add .debug_loclists.dwo.
13766         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
13767         (struct dwarf2_per_cu_data): Add dwarf_version.
13768         (struct dwo_sections): Add loclists.
13769         (struct attr_abbrev): Add implicit_const.
13770         (read_indirect_line_string): New declaration.
13771         (read_unsigned_leb128): Delete declaration.
13772         (rcuh_kind): New definition.
13773         (read_and_check_comp_unit_head): Change parameter
13774         is_debug_types_section to section_kind.
13775         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
13776         (read_comp_unit_head): Change parameter abfd to section, add parameter
13777         section_kind.  Handle DWARF-5.
13778         (error_check_comp_unit_head): Accept also DWARF version 5.
13779         (read_and_check_comp_unit_head): Change parameter
13780         is_debug_types_section to section_kind.
13781         (read_and_check_type_unit_head): Delete function.
13782         (read_abbrev_offset): Handle DWARF-5.
13783         (create_debug_type_hash_table): Add parameter section_kind.  Process
13784         only DW_UT_type.  Use signature and type_offset_in_tu from struct
13785         comp_unit_head.
13786         (create_debug_types_hash_table): Update create_debug_type_hash_table
13787         caller.
13788         (create_all_type_units): Call create_debug_type_hash_table.
13789         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
13790         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13791         caller.
13792         (skip_one_die): Handle DW_FORM_implicit_const.
13793         (dwarf2_rnglists_process): New function.
13794         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13795         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13796         (read_attribute_value): Handle DW_FORM_implicit_const,
13797         DW_FORM_line_strp.
13798         (read_attribute): Handle DW_FORM_implicit_const.
13799         (read_indirect_string_at_offset_from): New function from
13800         read_indirect_string_at_offset.
13801         (read_indirect_string_at_offset): Call
13802         read_indirect_string_at_offset_from.
13803         (read_indirect_line_string_at_offset): New function.
13804         (read_indirect_string): New function comment.
13805         (read_indirect_line_string): New function.
13806         (read_unsigned_leb128): Make it global.
13807         (dwarf2_string_attr): Handle DWARF-5.
13808         (add_include_dir_stub, read_formatted_entries): New functions.
13809         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
13810         Handle DWARF-5.
13811         (per_cu_header_read_in): Update read_comp_unit_head caller.
13812         (dwarf2_version): New function.
13813         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
13814         rnglists.
13815         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
13816         fields.
13817
13818 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13819
13820         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
13821
13822 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13823
13824         * dwarf2read.c (dwarf2_ranges_process): New function from
13825         dwarf2_ranges_read.
13826         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
13827         dwarf2_ranges_process.
13828
13829 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13830
13831         * dwarf2read.c (create_debug_type_hash_table): New function from
13832         create_debug_types_hash_table.
13833         (create_debug_types_hash_table): Call create_debug_type_hash_table.
13834         (create_all_type_units, open_and_init_dwo_file): Update
13835         create_debug_types_hash_table callers.
13836
13837 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13838
13839         PR gdb/16188
13840         * fork-child.c (trace_start_error): Fix thinko.  va_end should
13841         refer to 'ap', not 'args'.
13842
13843 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13844             Pedro Alves  <palves@redhat.com>
13845
13846         PR gdb/16188
13847         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
13848         calls succeeded.
13849         * fork-child.c (trace_start_error): New function.
13850         (trace_start_error_with_name): Likewise.
13851         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
13852         * inf-ptrace.c (inf_ptrace_me): Likewise.
13853         * inferior.h (trace_start_error): New prototype.
13854         (trace_start_error_with_name): Likewise.
13855
13856 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
13857
13858         PR gdb/21164
13859         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
13860         NULL before using it.
13861         * symmisc.c (maintenance_print_symbols): Likewise.
13862         (maintenance_print_msymbols): Likewise.
13863
13864 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13865
13866         * NEWS: Add record Python bindings entry.
13867
13868 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13869
13870         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
13871         py-record-full.o.
13872         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
13873         * python/py-record-btrace.c, python/py-record-btrace.h,
13874         python/py-record-full.c, python/py-record-full.h: New file.
13875         * python/py-record.c: Add include for py-record-btrace.h and
13876         py-record-full.h.
13877         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
13878         recpy_instruction_history, recpy_function_call_history, recpy_begin,
13879         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
13880         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
13881         New definition.
13882         (gdbpy_initialize_btrace): New export.
13883         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
13884
13885 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13886
13887         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
13888         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
13889         * python/py-record.c: New file.
13890         * python/python-internal.h (gdbpy_start_recording,
13891         gdbpy_current_recording, gdpy_stop_recording,
13892         gdbpy_initialize_record): New export.
13893         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
13894         (python_GdbMethods): Add gdbpy_start_recording,
13895         gdbpy_current_recording and gdbpy_stop_recording.
13896
13897 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13898
13899         * record-btrace.c (record_btrace_record_method): New function.
13900         (init_record_btrace_ops): Initialize to_record_method.
13901         * record-full.c (record_full_record_method): New function.
13902         (init_record_full_ops, init_record_full_core_ops): Add
13903         record_full_record_method.
13904         * record.h (enum record_method): New enum.
13905         * target-debug.h (target_debug_print_enum_record_method: New define.
13906         * target-delegates.c: Regenerate.
13907         * target.c (target_record_method): New function.
13908         * target.h: Include record.h.
13909         (struct target_ops) <to_record_method>: New field.
13910         (target_record_method): New export.
13911
13912 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13913
13914         * record.h (record_start, record_stop): New export.
13915         * record.c (record_start, record_stop): New function.
13916
13917 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13918
13919         * btrace.c (btrace_fetch): Copy function call segments pointer
13920         into a vector.
13921         (btrace_clear): Clear the vector.
13922         (btrace_find_insn_by_number): Use binary search to find the correct
13923         function call segment.
13924         * btrace.h (brace_fun_p): New typedef.
13925         (struct btrace_thread_info) <functions>: New field.
13926
13927 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13928
13929         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
13930         * btrace.c (btrace_decode_error): ... here.  New function.
13931         * btrace.h (btrace_decode_error): New export.
13932
13933 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13934
13935         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
13936         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
13937         btrace_find_insn_by_number): Remove special case for gaps.
13938         * btrace.h (btrace_insn_get_error): New export.
13939         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
13940         * record-btrace.c (btrace_insn_history): Print number for gaps.
13941         (record_btrace_info, record_btrace_goto): Handle gaps.
13942
13943 2017-02-14  Tom Tromey  <tom@tromey.com>
13944
13945         PR python/13598:
13946         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
13947         event.
13948         * python/py-evts.c (gdbpy_initialize_py_events): Add
13949         before_prompt registry.
13950         * python/py-events.h (events_object) <before_prompt>: New field.
13951
13952 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
13953
13954         * btrace.c (ftrace_new_switch): Preserve up link and flags.
13955
13956 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
13957
13958         * symfile (_initialize_symfile): Add usage text to the load command's
13959         help text.
13960
13961 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
13962
13963         * utils.c (defaulted_query): Don't query on secondary UIs.
13964
13965 2017-02-10  Tom Tromey  <tom@tromey.com>
13966
13967         * rust-lang.c (rust_get_disr_info): Remove unused variable.
13968
13969 2017-02-10  Tom Tromey  <tom@tromey.com>
13970
13971         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
13972         "cleanup" local.
13973         * python/py-type.c (typy_legacy_template_argument): Remove
13974         unnecessary "cleanup" local.
13975
13976 2017-02-10  Tom Tromey  <tom@tromey.com>
13977
13978         * python/python.c (do_start_initialization): New function, from
13979         _initialize_python.
13980         (_initialize_python): Call do_start_initialization.
13981         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
13982         goto.
13983
13984 2017-02-10  Tom Tromey  <tom@tromey.com>
13985
13986         * python/py-prettyprint.c (pretty_print_one_value): Use
13987         gdbpy_ref.
13988
13989 2017-02-10  Tom Tromey  <tom@tromey.com>
13990
13991         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
13992         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
13993         gdbpy_ref.
13994         * python/py-type.c (field_new): Use gdbpy_ref.
13995         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
13996         gdbpy_ref.
13997         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
13998         (py_free_pspace): Likewise.
13999         (pspace_to_pspace_object): Likewise.
14000         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14001         (py_free_objfile): Likewise.
14002         (objfile_to_objfile_object): Likewise.
14003         * python/py-inferior.c (delete_thread_object): Use
14004         gdbpy_ref.
14005         (infpy_read_memory): Likewise.
14006         (py_free_inferior): Likewise.
14007         * python/py-evtregistry.c (create_eventregistry_object): Use
14008         gdbpy_ref.
14009         * python/py-event.c (create_event_object): Use gdbpy_ref.
14010
14011 2017-02-10  Tom Tromey  <tom@tromey.com>
14012
14013         * python/py-ref.h (gdbpy_ref_policy): Now a template.
14014         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14015         used.
14016         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14017         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14018         python/py-exitedevent.c, python/py-finishbreakpoint.c,
14019         python/py-framefilter.c, python/py-function.c,
14020         python/py-inferior.c, python/py-infevents.c,
14021         python/py-linetable.c, python/py-newobjfileevent.c,
14022         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14023         python/py-signalevent.c, python/py-stopevent.c,
14024         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14025         python/py-unwind.c, python/py-utils.c, python/py-value.c,
14026         python/py-varobj.c, python/py-xmethods.c, python/python.c,
14027         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14028
14029 2017-02-10  Tom Tromey  <tom@tromey.com>
14030
14031         * ui-out.h (ui_out_emit_type): New class.
14032         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14033         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14034         and ui_out_emit_tuple.
14035         (enumerate_locals): Likewise.
14036         (py_mi_print_variables, py_print_locals, py_print_args): Use
14037         ui_out_emit_list.
14038         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14039         ui_out_emit_list.
14040         * common/gdb_optional.h: New file.
14041
14042 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14043
14044         * MAINTAINERS (Write After Approval): Update my e-mail address.
14045
14046 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14047
14048         PR gdb/21122
14049         * breakpoint.c (_initialize_breakpoint): Update the help description
14050         of the 'commands' command to indicate that it takes a list argument.
14051
14052 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
14053
14054         * interps.c (current_interp_set_logging): Remove "return".
14055
14056 2017-02-09  Gary Benson  <gbenson@redhat.com>
14057
14058         * symtab.c (add_symtab_completions): Prevent NULL pointer
14059         dereference.
14060
14061 2017-02-08  Pedro Alves  <palves@redhat.com>
14062
14063         * interps.c (interp::interp): Remove reference to quiet_p.
14064         (interp_set): Make static.  Remove dead "Switching to" output
14065         code.
14066         (interp_quiet_p, interp_set_quiet): Delete.
14067         (interpreter_exec_cmd): Don't set the interpreter quiet.
14068         * interps.h (interp_quiet_p): Make static.
14069         (class interp) <quiet_p>: Remove field
14070
14071 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14072
14073         * cli/cli-decode.c (find_command_name_length): Make it extern.
14074         * cli/cli-decode.h (find_command_name_length): Declare.
14075         * cli/cli-script.c (command_name_equals, line_first_arg):
14076         New functions.
14077         (process_next_line): Use cli-decode to parse command names.
14078         (build_command_line): Make args a constant pointer.
14079
14080 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14081
14082         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14083         Remove case-insensitive search.
14084
14085 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
14086
14087         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14088         at the end of the line.  Avoids an ARI warning.
14089
14090 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
14091
14092         * NEWS: Mention support for record/replay of Intel 64 rdrand and
14093         rdseed instructions.
14094         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14095
14096 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
14097
14098         PR tdep/20936
14099         Provide and use sparc32 and sparc64 target description XML files.
14100         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14101         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14102         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14103         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14104         * features/sparc/sparc32-solaris.xml: New file.
14105         * features/sparc/sparc64-solaris.xml: New file.
14106         * features/sparc/sparc32-solaris.c: Generated.
14107         * features/sparc/sparc64-solaris.c: Generated.
14108         * sparc-tdep.h: Account for differences in target descriptions.
14109         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14110         (sparc32_register_type): Use target provided registers.
14111         (validate_tdesc_registers): New function.
14112         (sparc32_gdbarch_init): Use tdesc_has_registers.
14113         Set pseudoregister functions.
14114         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14115         (sparc64_register_type): Use target provided registers.
14116         (sparc64_init_abi): Set pseudoregister functions.
14117
14118 2017-02-03  Tom Tromey  <tom@tromey.com>
14119
14120         PR rust/21097:
14121         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14122         with a single member.
14123
14124 2017-02-03  Pedro Alves  <palves@redhat.com>
14125
14126         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14127         (cli_interp_base::~cli_interp_base): New.
14128         (cli_interp): New struct.
14129         (as_cli_interp): Cast the interp itself to cli_interp.
14130         (cli_interpreter_pre_command_loop): Rename to ...
14131         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
14132         parameter.
14133         (cli_interpreter_init): Rename to ...
14134         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
14135         boolean.  Make extern.
14136         (cli_interpreter_resume): Rename to ...
14137         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
14138         extern.
14139         (cli_interpreter_suspend): Rename to ...
14140         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
14141         extern.
14142         (cli_interpreter_exec): Rename to ...
14143         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
14144         extern.
14145         (cli_interpreter_supports_command_editing): Rename to ...
14146         (cli_interp_base::supports_command_editing): ... this.  Remove
14147         'interp' parameter.  Make extern.
14148         (cli_ui_out): Rename to ...
14149         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
14150         Make extern.
14151         (cli_set_logging): Rename to ...
14152         (cli_interp_base::set_logging): ... this.  Remove 'interp'
14153         parameter.  Make extern.
14154         (cli_interp_procs): Delete.
14155         (cli_interp_factory): Adjust to use "new".
14156         * cli/cli-interp.h: Include "interps.h".
14157         (struct cli_interp_base): New struct.
14158         * interps.c (struct interp): Delete.  Fields moved to interps.h.
14159         (interp_new): Delete.
14160         (interp::interp, interp::~interp): New.
14161         (interp_set): Use bool, and return void.  Assume the interpreter
14162         has suspend, init and resume methods, and that the all return
14163         void.
14164         (set_top_level_interpreter): interp_set returns void.
14165         (interp_ui_out): Adapt.
14166         (current_interp_set_logging): Adapt.
14167         (interp_data): Delete.
14168         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14169         (interp_exec): Adapt.
14170         (top_level_interpreter_data): Delete.
14171         * interps.h (interp_init_ftype, interp_resume_ftype)
14172         (interp_suspend_ftype, interp_exec_ftype)
14173         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14174         (class interp): New.
14175         (interp_new): Delete.
14176         (interp_set): Now returns void.  Use bool.
14177         (interp_data, top_level_interpreter_data): Delete.
14178         * mi/mi-common.h: Include interps.h.
14179         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
14180         init, resume, suspect, exec, interp_ui_out, set_logging and
14181         pre_command_loop methods.
14182         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14183         (mi_interpreter_init): Rename to ...
14184         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
14185         bool, return void and make extern.  Adjust.
14186         (mi_interpreter_resume): ... Rename to ...
14187         (mi_interp::resume): ... this.  Remove the 'data' parameter,
14188         return void and make extern.  Adjust.
14189         (mi_interpreter_suspend): ... Rename to ...
14190         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
14191         return void and make extern.  Adjust.
14192         (mi_interpreter_exec): ... Rename to ...
14193         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
14194         extern.  Adjust.
14195         (mi_interpreter_pre_command_loop): ... Rename to ...
14196         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
14197         parameter and make extern.
14198         (mi_on_normal_stop_1): Adjust.
14199         (mi_ui_out): Rename to ...
14200         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
14201         parameter and make extern.  Adjust.
14202         (mi_set_logging): Rename to ...
14203         (mi_interp::set_logging): ... this.  Remove the 'interp'
14204         parameter and make extern.  Adjust.
14205         (mi_interp_procs): Delete.
14206         (mi_interp_factory): Adjust to use 'new'.
14207         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14208         (mi_print_exception, mi_execute_command, mi_load_progress):
14209         Adjust.
14210         * tui/tui-interp.c (tui_interp): New class.
14211         (as_tui_interp): Return a tui_interp pointer.
14212         (tui_on_normal_stop, tui_on_signal_received)
14213         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14214         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14215         to use interp::interp_ui_out.
14216         (tui_init): Rename to ...
14217         (tui_interp::init): ... this.  Remove the 'self' parameter, use
14218         bool, return void and make extern.  Adjust.
14219         (tui_resume): Rename to ...
14220         (tui_interp::resume): ... this.  Remove the 'data' parameter,
14221         return void and make extern.  Adjust.
14222         (tui_suspend): Rename to ...
14223         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
14224         return void and make extern.  Adjust.
14225         (tui_ui_out): Rename to ...
14226         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
14227         parameter, and make extern.  Adjust.
14228         (tui_exec): Rename to ...
14229         (tui_interp::exec): ... this.  Remove the 'data' parameter and
14230         make extern.
14231         (tui_interp_procs): Delete.
14232         (tui_interp_factory): Use "new".
14233
14234 2017-02-02  Tom Tromey  <tom@tromey.com>
14235
14236         * rust-exp.y (ends_raw_string, space_then_number)
14237         (rust_identifier_start_p): Return bool.
14238         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14239         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14240         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14241         (rust_chartype_p): Return bool.
14242         (val_print_struct, rust_print_struct_def, rust_print_type):
14243         Update.
14244         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14245         Return bool.
14246
14247 2017-02-02  Tom Tromey  <tom@tromey.com>
14248
14249         * rust-lang.c: Reindent.
14250
14251 2017-02-02  Tom Tromey  <tom@tromey.com>
14252
14253         * rust-lang.h (rust_crate_for_block): Update.
14254         * rust-lang.c (rust_crate_for_block): Return std::string.
14255         (rust_get_disr_info): Use std:;string, not
14256         gdb::unique_xmalloc_ptr.
14257         * rust-exp.y (crate_name): Update.
14258
14259 2017-02-02  Pedro Alves  <palves@redhat.com>
14260
14261         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14262         field out of gdb_disassembler_test and make it static.
14263
14264 2017-02-02  Pedro Alves  <palves@redhat.com>
14265
14266         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14267         mi1_interp and mi_interp fields.
14268
14269 2017-02-02  Pedro Alves  <palves@redhat.com>
14270
14271         * cli/cli-interp.c (struct saved_output_files, saved_output):
14272         Moved from cli/cli-logging.c.
14273         (cli_set_logging): New function.
14274         (cli_interp_procs): Install cli_set_logging.
14275         * cli/cli-interp.h (make_logging_output, cli_set_logging):
14276         Declare.
14277         * cli/cli-logging.c (struct saved_output_files, saved_output):
14278         Moved to cli/cli-interp.c.
14279         (pop_output_files): Don't save outputs here.
14280         (make_logging_output): New function.
14281         (handle_redirections): Don't build tee nor save previous outputs
14282         here.
14283         * interps.c (current_interp_set_logging): Change prototype.
14284         Assume there's always a set_logging_proc method installed.
14285         * interps.h (interp_set_logging_ftype): Change prototype.
14286         (current_interp_set_logging): Change prototype and adjust comment.
14287         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
14288         use make_logging_output.
14289         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14290 2017-02-02  Pedro Alves  <palves@redhat.com>
14291
14292         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14293         from ...
14294         (set_logging_overwrite): ... here.
14295         (logging_no_redirect_file): Delete.
14296         (set_logging_redirect): Don't handle redirection on the fly.
14297         Instead warn that "logging off" / "logging on" is necessary.
14298         (pop_output_files): Delete references to logging_no_redirect_file.
14299         (show_logging_command): Always speak in terms of what will happen
14300         once logging is reenabled.
14301
14302 2017-02-02  Pedro Alves  <palves@redhat.com>
14303
14304         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14305
14306 2017-02-02  Pedro Alves  <palves@redhat.com>
14307
14308         * disasm.c (gdb_pretty_print_insn): Rename to ...
14309         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14310         Remove gdbarch parameter.  Adapt to clear the object's buffers
14311         instead of allocating new buffers, and to print using the object's
14312         gdb_disassembler instead of calling gdb_print_insn.
14313         (dump_insns): Use gdb_pretty_print_disassembler.
14314         * disasm.h (gdb_pretty_print_insn): Delete declaration.
14315         (gdb_pretty_print_disassembler): New class.
14316         * record-btrace.c (btrace_insn_history): Use
14317         gdb_pretty_print_disassembler.
14318
14319 2017-02-02  Pedro Alves  <palves@redhat.com>
14320
14321         * ada-lang.c (type_as_string): Use string_file.
14322         * ada-valprint.c (ada_print_floating): Use string_file.
14323         * ada-varobj.c (ada_varobj_scalar_image)
14324         (ada_varobj_get_value_image): Use string_file.
14325         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14326         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14327         * breakpoint.c (update_inserted_breakpoint_locations)
14328         (insert_breakpoint_locations, reattach_breakpoints)
14329         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14330         (print_it_watchpoint): Use string_file.
14331         (save_breakpoints): Use stdio_file.
14332         * c-exp.y (oper): Use string_file.
14333         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14334         tee_file.
14335         (pop_output_files): Use delete.
14336         (handle_redirections): Use stdio_file and tee_file.
14337         * cli/cli-setshow.c (do_show_command): Use string_file.
14338         * compile/compile-c-support.c (c_compute_program): Use
14339         string_file.
14340         * compile/compile-c-symbols.c (generate_vla_size): Take a
14341         'string_file &' instead of a 'ui_file *'.
14342         (generate_c_for_for_one_variable): Take a 'string_file &' instead
14343         of a 'ui_file *'.  Use string_file.
14344         (generate_c_for_variable_locations): Take a 'string_file &'
14345         instead of a 'ui_file *'.
14346         * compile/compile-internal.h (generate_c_for_for_one_variable):
14347         Take a 'string_file &' instead of a 'ui_file *'.
14348         * compile/compile-loc2c.c (push, pushf, unary, binary)
14349         (print_label, pushf_register_address, pushf_register)
14350         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14351         'ui_file *'.  Adjust.
14352         * compile/compile.c (compile_to_object): Use string_file.
14353         * compile/compile.h (compile_dwarf_expr_to_c)
14354         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14355         'ui_file *'.
14356         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14357         (replace_typedefs_qualified_name): Use string_file and
14358         obstack_copy0.
14359         * disasm.c (gdb_pretty_print_insn): Use string_file.
14360         (gdb_disassembly): Adjust reference the null_stream global.
14361         (do_ui_file_delete): Delete.
14362         (gdb_insn_length): Use null_stream.
14363         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14364         * dwarf2loc.c (dwarf2_compile_property_to_c)
14365         (locexpr_generate_c_location, loclist_generate_c_location): Take a
14366         'string_file &' instead of a 'ui_file *'.
14367         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14368         * dwarf2read.c (do_ui_file_peek_last): Delete.
14369         (dwarf2_compute_name): Use string_file.
14370         * event-top.c (gdb_setup_readline): Use stdio_file.
14371         * gdbarch.sh (verify_gdbarch): Use string_file.
14372         * gdbtypes.c (safe_parse_type): Use null_stream.
14373         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14374         string_file.
14375         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14376         'string_file *' instead of a 'ui_file *'.
14377         (gdbscm_arch_disassemble): Use string_file.
14378         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14379         * guile/scm-ports.c (class ioscm_file_port): Now a class that
14380         inherits from ui_file.
14381         (ioscm_file_port_delete, ioscm_file_port_rewind)
14382         (ioscm_file_port_put): Delete.
14383         (ioscm_file_port_write): Rename to ...
14384         (ioscm_file_port::write): ... this.  Remove file_port_magic
14385         checks.
14386         (ioscm_file_port_new): Delete.
14387         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14388         ui_file_up.
14389         * guile/scm-type.c (tyscm_type_name): Use string_file.
14390         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14391         Use string_file.
14392         * infcmd.c (print_return_value_1): Use string_file.
14393         * infrun.c (print_target_wait_results): Use string_file.
14394         * language.c (add_language): Use string_file.
14395         * location.c (explicit_to_string_internal): Use string_file.
14396         * main.c (captured_main_1): Use null_file.
14397         * maint.c (maintenance_print_architecture): Use stdio_file.
14398         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14399         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14400         event_channel>: Change type to mi_console_file pointer.
14401         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14402         (mi_console_file_delete): Delete.
14403         (struct mi_console_file): Delete.
14404         (mi_console_file_magic): Delete.
14405         (mi_console_file_new): Delete.
14406         (mi_console_file::mi_console_file): New.
14407         (mi_console_file_delete): Delete.
14408         (mi_console_file_fputs): Delete.
14409         (mi_console_file::write): New.
14410         (mi_console_raw_packet): Delete.
14411         (mi_console_file::flush): New.
14412         (mi_console_file_flush): Delete.
14413         (mi_console_set_raw): Rename to ...
14414         (mi_console_file::set_raw): ... this.
14415         * mi/mi-console.h (class mi_console_file): New class.
14416         (mi_console_file_new, mi_console_set_raw): Delete.
14417         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14418         (mi_set_logging): Use delete and tee_file.  Adjust.
14419         * mi/mi-main.c (output_register): Use string_file.
14420         (mi_cmd_data_evaluate_expression): Use string_file.
14421         (mi_cmd_data_read_memory): Use string_file.
14422         (mi_cmd_execute, print_variable_or_computed): Use string_file.
14423         * mi/mi-out.c (mi_ui_out::main_stream): New.
14424         (mi_ui_out::rewind): Use main_stream and
14425         string_file.
14426         (mi_ui_out::put): Use main_stream and string_file.
14427         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14428         Allocate a 'string_file' instead.
14429         (mi_out_new): Don't allocate a mem_fileopen stream here.
14430         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14431         (mi_ui_out::main_stream): Declare method.
14432         * printcmd.c (eval_command): Use string_file.
14433         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14434         * python/py-arch.c (archpy_disassemble): Use string_file.
14435         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14436         * python/py-frame.c (frapy_str): Use string_file.
14437         * python/py-framefilter.c (py_print_type, py_print_single_arg):
14438         Use string_file.
14439         * python/py-type.c (typy_str): Use string_file.
14440         * python/py-unwind.c (unwind_infopy_str): Use string_file.
14441         * python/py-value.c (valpy_str): Use string_file.
14442         * record-btrace.c (btrace_insn_history): Use string_file.
14443         * regcache.c (regcache_print): Use stdio_file.
14444         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14445         * remote.c (escape_buffer): Use string_file.
14446         * rust-lang.c (rust_get_disr_info): Use string_file.
14447         * serial.c (serial_open_ops_1): Use stdio_file.
14448         (do_serial_close): Use delete.
14449         * stack.c (print_frame_arg): Use string_file.
14450         (print_frame_args): Remove local mem_fileopen stream, not used.
14451         (print_frame): Use string_file.
14452         * symmisc.c (maintenance_print_symbols): Use stdio_file.
14453         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14454         Take a 'string_file *' instead of a 'ui_file *'.
14455         * top.c (new_ui): Use stdio_file and stderr_file.
14456         (free_ui): Use delete.
14457         (execute_command_to_string): Use string_file.
14458         (quit_confirm): Use string_file.
14459         * tracepoint.c (collection_list::append_exp): Use string_file.
14460         * tui/tui-disasm.c (tui_disassemble): Use string_file.
14461         * tui/tui-file.c: Don't include "ui-file.h".
14462         (enum streamtype, struct tui_stream): Delete.
14463         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14464         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14465         (tui_file::tui_file): New method.
14466         (tui_file_fputs): Delete.
14467         (tui_file_get_strbuf): Delete.
14468         (tui_file::puts): New method.
14469         (tui_file_adjust_strbuf): Delete.
14470         (tui_file_flush): Delete.
14471         (tui_file::flush): New method.
14472         * tui/tui-file.h: Tweak intro comment.
14473         Include ui-file.h.
14474         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14475         (tui_file_adjust_strbuf): Delete declarations.
14476         (class tui_file): New class.
14477         * tui/tui-io.c (tui_initialize_io): Use tui_file.
14478         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14479         (tui_register_format): Use string_stream.
14480         * tui/tui-stack.c (tui_make_status_line): Use string_file.
14481         (tui_get_function_from_frame): Use string_file.
14482         * typeprint.c (type_to_string): Use string_file.
14483         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14484         (null_stream): New global.
14485         (ui_file_delete): Delete.
14486         (ui_file::ui_file): New.
14487         (null_file_isatty): Delete.
14488         (ui_file::~ui_file): New.
14489         (null_file_rewind): Delete.
14490         (ui_file::printf): New.
14491         (null_file_put): Delete.
14492         (null_file_flush): Delete.
14493         (ui_file::putstr): New.
14494         (null_file_write): Delete.
14495         (ui_file::putstrn): New.
14496         (null_file_read): Delete.
14497         (ui_file::putc): New.
14498         (null_file_fputs): Delete.
14499         (null_file_write_async_safe): Delete.
14500         (ui_file::vprintf): New.
14501         (null_file_delete): Delete.
14502         (null_file::write): New.
14503         (null_file_fseek): Delete.
14504         (null_file::puts): New.
14505         (ui_file_data): Delete.
14506         (null_file::write_async_safe): New.
14507         (gdb_flush, ui_file_isatty): Adjust.
14508         (ui_file_put, ui_file_rewind): Delete.
14509         (ui_file_write): Adjust.
14510         (ui_file_write_for_put): Delete.
14511         (ui_file_write_async_safe, ui_file_read): Adjust.
14512         (ui_file_fseek): Delete.
14513         (fputs_unfiltered): Adjust.
14514         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14515         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14516         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14517         (set_ui_file_data): Delete.
14518         (string_file::~string_file, string_file::write)
14519         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14520         (do_ui_file_as_string, ui_file_as_string): Delete.
14521         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14522         (struct mem_file): Delete.
14523         (mem_file_new): Delete.
14524         (stdio_file::stdio_file): New.
14525         (mem_file_delete): Delete.
14526         (stdio_file::stdio_file): New.
14527         (mem_fileopen): Delete.
14528         (stdio_file::~stdio_file): New.
14529         (mem_file_rewind): Delete.
14530         (stdio_file::set_stream): New.
14531         (mem_file_put): Delete.
14532         (stdio_file::open): New.
14533         (mem_file_write): Delete.
14534         (stdio_file_magic, struct stdio_file): Delete.
14535         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14536         (stdio_file::flush): New.
14537         (stdio_file_read): Rename to ...
14538         (stdio_file::read): ... this.  Adjust.
14539         (stdio_file_write): Rename to ...
14540         (stdio_file::write): ... this.  Adjust.
14541         (stdio_file_write_async_safe): Rename to ...
14542         (stdio_file::write_async_safe) ... this.  Adjust.
14543         (stdio_file_fputs): Rename to ...
14544         (stdio_file::puts) ... this.  Adjust.
14545         (stdio_file_isatty): Delete.
14546         (stdio_file_fseek): Delete.
14547         (stdio_file::isatty): New.
14548         (stderr_file_write): Rename to ...
14549         (stderr_file::write) ... this.  Adjust.
14550         (stderr_file_fputs): Rename to ...
14551         (stderr_file::puts) ... this.  Adjust.
14552         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14553         (stderr_file::stderr_file): New.
14554         (tee_file_magic): Delete.
14555         (struct tee_file): Delete.
14556         (tee_file::tee_file): New.
14557         (tee_file_new): Delete.
14558         (tee_file::~tee_file): New.
14559         (tee_file_delete): Delete.
14560         (tee_file_flush): Rename to ...
14561         (tee_file::flush): ... this.  Adjust.
14562         (tee_file_write): Rename to ...
14563         (tee_file::write): ... this.  Adjust.
14564         (tee_file::write_async_safe): New.
14565         (tee_file_fputs): Rename to ...
14566         (tee_file::puts): ... this.  Adjust.
14567         (tee_file_isatty): Rename to ...
14568         (tee_file::isatty): ... this.  Adjust.
14569         * ui-file.h (struct obstack, struct ui_file): Don't
14570         forward-declare.
14571         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14572         (ui_file_write_ftype)
14573         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14574         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14575         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14576         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14577         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14578         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14579         (set_ui_file_fseek): Delete.
14580         (ui_file_data, ui_file_delete, ui_file_rewind)
14581         (struct ui_file): New.
14582         (ui_file_up): New.
14583         (class null_file): New.
14584         (null_stream): Declare.
14585         (ui_file_write_for_put, ui_file_put): Delete.
14586         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14587         Delete.
14588         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14589         (gdb_fopen, tee_file_new): Delete.
14590         (struct string_file): New.
14591         (struct stdio_file): New.
14592         (stdio_file_up): New.
14593         (struct stderr_file): New.
14594         (class tee_file): New.
14595         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14596         of a 'ui_file *'.  Adjust.
14597         * ui-out.h (class ui_out) <field_stream>: Likewise.
14598         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14599         (null_stream): Delete.
14600         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14601         Adjust.
14602         * utils.h (struct ui_file): Delete forward declaration..
14603         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14604         (error_stream): Take a 'string_file &' instead of a
14605         'ui_file *'.
14606         * varobj.c (varobj_value_get_print_value): Use string_file.
14607         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14608         * gdbarch.c: Regenerate.
14609
14610 2017-02-02  Pedro Alves  <palves@redhat.com>
14611
14612         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14613         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
14614         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
14615         Adjust to call gdb_print_insn instead of
14616         gdb_disassembler::print_insn.
14617         (dump_insns, do_mixed_source_and_assembly_deprecated)
14618         (do_mixed_source_and_assembly, do_assembly_only): Add back a
14619         'gdbarch' parameter.  Remove gdb_disassembler parameter.
14620         (gdb_disassembly): Don't allocate a gdb_disassembler here.
14621         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14622         declaration.
14623         (gdb_pretty_print_insn): Re-add declaration.
14624         * record-btrace.c (btrace_insn_history): Don't allocate a
14625         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
14626
14627 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
14628
14629         * disasm.h (gdb_disassembly): Remove file_string parameter.
14630         * disasm.c (gdb_disassembly): Likewise.
14631         * cli/cli-cmds.c (print_disassembly): Adapt.
14632         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14633         * stack.c (do_gdb_disassembly): Likewise.
14634
14635 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14636
14637         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14638         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14639         targets.  And if the implicit value is longer than needed, extract
14640         the first bytes instead of the "least significant" ones.
14641
14642 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14643
14644         * btrace.c (btrace_enable): Do not call btrace_add_pc for
14645         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14646         (btrace_fetch): Assert can_access_registers_ptid.
14647         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14648         validate_registers_access.
14649
14650 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14651
14652         * gdbthread.h (can_access_registers_ptid): New.
14653         * thread.c (can_access_registers_ptid): New.
14654
14655 2017-02-01  Pedro Alves  <palves@redhat.com>
14656
14657         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14658
14659 2017-01-31  Pedro Alves  <palves@redhat.com>
14660
14661         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
14662         Fix typos.
14663
14664 2017-01-31  Pedro Alves  <palves@redhat.com>
14665
14666         * stack.c (print_frame_args): Remove local mem_fileopen stream,
14667         not used.
14668
14669 2017-01-31  Pedro Alves  <palves@redhat.com>
14670
14671         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
14672
14673 2017-01-31  Pedro Alves  <palves@redhat.com>
14674
14675         * common/scoped_restore.h
14676         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
14677         change the value's parameter type to T2.
14678         (make_scoped_restore): Likewise.
14679
14680 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14681             Richard Henderson  <rth@redhat.com>
14682
14683         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
14684         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
14685         GS_BASE for older kernels.
14686         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
14687         GS_BASE for older kernels.
14688         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
14689         and GS_BASE to the offset table.
14690         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
14691         system register group.
14692         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
14693         for older kernels.
14694         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
14695         amd64 ABI.
14696         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
14697         AMD64_GSBASE_REGNUM.
14698         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
14699         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
14700         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
14701         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
14702         i386/64bit-segments.xml in those rules.
14703         * features/i386/64bit-segments.xml: New file.
14704         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
14705         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
14706         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
14707         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
14708         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
14709         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
14710         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
14711         * features/i386/amd64-avx-linux.c: Regenerated.
14712         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
14713         * features/i386/amd64-avx-mpx.c: Regenerated.
14714         * features/i386/amd64-avx512-linux.c: Regenerated.
14715         * features/i386/amd64-linux.c: Regenerated.
14716         * features/i386/amd64-mpx-linux.c: Regenerated.
14717         * features/i386/i386-avx-mpx-linux.c: Regenerated.
14718         * features/i386/i386-avx-mpx.c: Regenerated.
14719         * features/i386/x32-avx-linux.c: Regenerated.
14720         * features/i386/x32-avx512-linux.c: Regenerated.
14721         * regformats/i386/amd64-avx-linux.dat: Regenerated.
14722         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
14723         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
14724         * regformats/i386/amd64-linux.dat: Regenerated.
14725         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
14726         * regformats/i386/x32-avx-linux.dat: Regenerated.
14727         * regformats/i386/x32-avx512-linux.dat: Regenerated.
14728         * regformats/i386/x32-linux.dat: Regenerated.
14729
14730 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14731
14732         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
14733         Set to AMD64_NUM_REGS.
14734
14735 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14736
14737         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
14738         that checks validity of a register number.
14739
14740 2017-01-27  Kees Cook  <keescook@google.com>
14741
14742         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
14743         fetch_fpregs if target has fpa registers.
14744         (arm_linux_store_inferior_registers): Call store_fpregs if target
14745         has fpa registers.
14746
14747 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14748
14749         * cris-tdep.c (cris_gdbarch_init): Remove check for
14750         info.byte_order and force it to BFD_ENDIAN_LITTLE.
14751
14752 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
14753
14754         * corelow.c (get_core_register_section): Check for regset
14755         existence before checking for REGSET_VARIABLE_SIZE.
14756
14757 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14758             Pedro Alves  <palves@redhat.com>
14759
14760         PR gdb/20939
14761         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
14762         call memory_error, save memaddr instead.
14763         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
14764         negative, cal memory_error.
14765         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
14766
14767 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14768
14769         * disasm-selftests.c (memory_error_test): New function.
14770         (_initialize_disasm_selftests): Register memory_error_test.
14771
14772 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14773
14774         * Makefile.in (SFILES): Add disasm-selftests.c and
14775         selftest-arch.c.
14776         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
14777         * disasm-selftests.c: New file.
14778         * selftest-arch.c: New file.
14779         * selftest-arch.h: New file.
14780
14781 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14782
14783         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
14784         to bfd_arch_mep.  Don't return 0 if section is not
14785         found.  Call print_insn_mep.
14786
14787 2017-01-26  Pedro Alves  <palves@redhat.com>
14788             Yao Qi  <yao.qi@linaro.org>
14789
14790         * arm-tdep.c: Include "disasm.h".
14791         (gdb_print_insn_arm): Update code to get gdbarch.
14792         * disasm.c (dis_asm_read_memory): Change it to
14793         gdb_disassembler::dis_asm_read_memory.
14794         (dis_asm_memory_error): Likewise.
14795         (dis_asm_print_address): Likewise.
14796         (gdb_pretty_print_insn): Change it to
14797         gdb_disassembler::pretty_print_insn.
14798         (dump_insns): Add one argument gdb_disassemlber.  All
14799         callers updated.
14800         (do_mixed_source_and_assembly_deprecated): Likewise.
14801         (do_mixed_source_and_assembly): Likewise.
14802         (do_assembly_only): Likewise.
14803         (gdb_disassembler::gdb_disassembler): New.
14804         (gdb_disassembler::print_insn): New.
14805         * disasm.h (class gdb_disassembler): New.
14806         (gdb_pretty_print_insn): Remove declaration.
14807         (gdb_disassemble_info): Likewise.
14808         * guile/scm-disasm.c (class gdbscm_disassembler): New.
14809         (gdbscm_disasm_read_memory_worker): Update.
14810         (gdbscm_disasm_read_memory): Update.
14811         (gdbscm_disasm_memory_error): Remove.
14812         (gdbscm_disasm_print_address): Remove.
14813         (gdbscm_disassembler::gdbscm_disassembler): New.
14814         (gdbscm_print_insn_from_port): Update.
14815         * mips-tdep.c: Include disasm.h.
14816         (gdb_print_insn_mips): Update code to get gdbarch.
14817         * record-btrace.c (btrace_insn_history): Update.
14818         * spu-tdep.c: Include disasm.h.
14819         (struct spu_dis_asm_data): Remove.
14820         (struct spu_dis_asm_info): New.
14821         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
14822         SPU id.
14823         (gdb_print_insn_spu): Cast disassemble_info to
14824         spu_dis_asm_info.
14825
14826 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14827
14828         * disasm.c (do_ui_file_delete): Delete.
14829         (gdb_insn_length): Move code creating stream to ...
14830         * utils.c (null_stream): ... here.  New function.
14831         * utils.h (null_stream): Declare.
14832
14833 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
14834
14835         * python/py-inferior.c (find_thread_object): Return directly
14836         from the loop.  Remove "found" variable.
14837
14838 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
14839
14840         GDB 7.12.1 released.
14841
14842 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14843
14844         * python/py-function.c (fnpy_call): Reorder declarations to have
14845         the gdbpy_enter object declared first.
14846         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
14847
14848 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14849
14850         PR python/21068
14851         * python/python-internal.h (PyMem_RawMalloc): Define for
14852         Python < 3.4.
14853         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
14854         PyMem_RawMalloc instead of PyMem_Malloc.
14855
14856 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
14857             Luis Machado  <lgustavo@codesourcery.com>
14858
14859         * NEWS (New commands): Mention flash-erase.
14860         (New MI commands): Mention target-flash-erase.
14861         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
14862         command.
14863         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
14864         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
14865         * target.c (flash_erase_command): New function.
14866         (initialize_targets): Add new flash-erase command.
14867         * target.h (flash_erase_command): New declaration.
14868
14869 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
14870
14871         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
14872         HAVE_SYS_PROCFS_H is defined.
14873
14874 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14875
14876         * remote.c (struct cached_reg): Change data into a pointer.
14877         * (stop_reply_dtr): Free data pointers before deleting vector.
14878         (process_stop_reply): Likewise.
14879         (remote_parse_stop_reply): Allocate space for data
14880
14881 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14882
14883         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
14884         MAX_REGISTER_SIZE.
14885         (amd64_pseudo_register_read_value): Likewise.
14886         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
14887         (store_register_using_P): Likewise.
14888         * regcache.c (regcache_xfer_part): Likewise.
14889
14890 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
14891
14892         Split real and pseudo registers.
14893         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
14894         (sparc32_pseudo_regnum): New enum.
14895         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
14896         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
14897         (SPARC32_CP0_REGISTERS): New macro.
14898         (sparc32_pseudo_register_name): New function.
14899         (sparc32_register_name): Use sparc32_pseudo_register_name.
14900         (sparc32_pseudo_register_type): New function.
14901         (sparc32_register_type): Use sparc32_pseudo_register_type.
14902         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
14903         pseudo register numbers.
14904         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
14905         (SPARC64_CP0_REGISTERS): New macro.
14906         (sparc64_pseudo_register_name): New function.
14907         (sparc64_register_name): Use sparc64_pseudo_register_name.
14908         (sparc64_pseudo_register_type): New function.
14909         (sparc64_register_type): Use sparc64_pseudo_register_type.
14910         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
14911         pseudo register numbers.
14912         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
14913         sparc64_store_arguments): Handle pseudo register numbers.
14914
14915 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14916
14917         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
14918         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
14919         output.
14920         (getpkt_or_notif_sane_1): Likewise.
14921
14922 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14923
14924         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
14925         of CC.  Pass "-x c++-header" instead of "-x c".
14926
14927 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14928
14929         * remote.c (remote_can_async_p): Update comment.
14930
14931 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14932
14933         * linux-nat.c (linux_nat_can_async_p): Update comment.
14934
14935 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14936
14937         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
14938
14939 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
14940
14941         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
14942
14943 2017-01-10  Tom Tromey  <tom@tromey.com>
14944
14945         * python/py-type.c (typy_legacy_template_argument): Update.
14946         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
14947         ~demangle_parse_info): Declare new members.
14948         (cp_demangled_name_to_comp): Return unique_ptr.
14949         (cp_demangled_name_parse_free)
14950         (make_cleanup_cp_demangled_name_parse_free)
14951         (cp_new_demangle_parse_info): Remove.
14952         * cp-support.c (do_demangled_name_parse_free_cleanup)
14953         (make_cleanup_cp_demangled_name_parse_free): Remove.
14954         (inspect_type, cp_canonicalize_string_full)
14955         (cp_canonicalize_string): Update.
14956         (mangled_name_to_comp): Change return type.
14957         (cp_class_name_from_physname, method_name_from_physname)
14958         (cp_func_name, cp_remove_params): Update.
14959         * cp-name-parser.y (demangle_parse_info): New constructor, from
14960         cp_new_demangle_parse_info.
14961         (~demangle_parse_info): New destructor, from
14962         cp_demangled_name_parse_free.
14963         (cp_merge_demangle_parse_infos): Update.
14964         (cp_demangled_name_to_comp): Change return type.
14965
14966 2017-01-10  Tom Tromey  <tom@tromey.com>
14967
14968         * top.c (prevent_dont_repeat): Change return type.
14969         * python/python.c (execute_gdb_command): Use std::string.
14970         Update.
14971         * guile/guile.c (gdbscm_execute_gdb_command): Update.
14972         * command.h (prevent_dont_repeat): Change return type.
14973         * breakpoint.c (bpstat_do_actions_1): Update.
14974
14975 2017-01-10  Tom Tromey  <tom@tromey.com>
14976
14977         * value.h (scoped_value_mark::~scoped_value_mark): Call
14978         free_to_mark.
14979         (scoped_value_mark::free_to_mark): New method.
14980         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
14981         scoped_value_mark.
14982
14983 2017-01-10  Tom Tromey  <tom@tromey.com>
14984
14985         * python/py-value.c (valpy_dereference, valpy_referenced_value)
14986         (valpy_reference_value, valpy_const_value, valpy_get_address)
14987         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
14988         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
14989         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
14990         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
14991         scoped_value_mark.
14992         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
14993         * value.h (scoped_value_mark): New class.
14994
14995 2017-01-10  Tom Tromey  <tom@tromey.com>
14996
14997         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
14998         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
14999         * psymtab.c (discard_psymtabs_upto): Remove.
15000         (make_cleanup_discard_psymtabs): Remove.
15001         (struct psymtab_state): Remove.
15002
15003 2017-01-10  Tom Tromey  <tom@tromey.com>
15004
15005         * record-full.c (record_full_save_cleanups): Remove.
15006         (record_full_save): Use gdb::unlinker.
15007         * gcore.c (do_bfd_delete_cleanup): Remove.
15008         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
15009         cleanups.
15010         * dwarf2read.c (unlink_if_set): Remove.
15011         (write_psymtabs_to_index): Use gdb::unlinker.
15012         * common/gdb_unlinker.h: New file.
15013
15014 2017-01-10  Tom Tromey  <tom@tromey.com>
15015
15016         * windows-tdep.c (windows_xfer_shared_library): Update.
15017         * windows-nat.c (windows_make_so): Update.
15018         * utils.h (make_cleanup_bfd_unref): Remove.
15019         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15020         * symfile.h (symfile_bfd_open)
15021         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15022         * symfile.c (read_symbols, symbol_file_add)
15023         (separate_debug_file_exists): Update.
15024         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15025         (generic_load, reread_symbols): Update.
15026         * symfile-mem.c (symbol_file_add_from_memory): Update.
15027         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15028         (spu_symbol_file_add_from_memory): Update.
15029         * solist.h (struct target_so_ops) <bfd_open>: Return
15030         gdb_bfd_ref_ptr.
15031         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15032         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15033         gdb_bfd_ref_ptr.
15034         (solib_map_sections, reload_shared_libraries_1): Update.
15035         * solib-svr4.c (enable_break): Update.
15036         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15037         * solib-frv.c (enable_break2): Update.
15038         * solib-dsbt.c (enable_break): Update.
15039         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15040         gdb_bfd_ref_ptr.
15041         (darwin_solib_get_all_image_info_addr_at_init): Update.
15042         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15043         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15044         * record-full.c (record_full_save): Update.
15045         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15046         * procfs.c (insert_dbx_link_bpt_in_file): Update.
15047         * minidebug.c (find_separate_debug_file_in_section): Return
15048         gdb_bfd_ref_ptr.
15049         * machoread.c (macho_add_oso_symfile): Change abfd to
15050         gdb_bfd_ref_ptr.
15051         (macho_symfile_read_all_oso): Update.
15052         (macho_check_dsym): Return gdb_bfd_ref_ptr.
15053         (macho_symfile_read): Update.
15054         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15055         (jit_bfd_try_read_symtab): Update.
15056         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15057         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15058         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15059         gdb_bfd_ref_ptr.
15060         (gdb_bfd_ref_policy): New struct.
15061         (gdb_bfd_ref_ptr): New typedef.
15062         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15063         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15064         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15065         gdb_bfd_ref_ptr.
15066         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15067         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15068         (gcore_command): Update.
15069         * exec.c (exec_file_attach): Update.
15070         * elfread.c (elf_symfile_read): Update.
15071         * dwarf2read.c (dwarf2_get_dwz_file): Update.
15072         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15073         (open_and_init_dwo_file): Update.
15074         (open_dwp_file): Return gdb_bfd_ref_ptr.
15075         (open_and_init_dwp_file): Update.
15076         * corelow.c (core_open): Update.
15077         * compile/compile-object-load.c (compile_object_load): Update.
15078         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15079         * coffread.c (coff_symfile_read): Update.
15080         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15081         gdb_bfd_ref_ptr.  Rename.
15082         (dump_bfd_file, restore_command): Update.
15083         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15084         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15085         (find_separate_debug_file_by_buildid): Update.
15086
15087 2017-01-10  Tom Tromey  <tom@tromey.com>
15088
15089         * common/gdb_ref_ptr.h: New file.
15090         * python/py-ref.h (struct gdbpy_ref_policy): New.
15091         (gdbpy_ref): Now a typedef.
15092
15093 2017-01-10  Tom Tromey  <tom@tromey.com>
15094
15095         * utils.h (make_cleanup_htab_delete): Don't declare.
15096         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15097         Remove.
15098         * linespec.c (decode_compound_collector): Add constructor,
15099         destructor.
15100         (lookup_prefix_sym): Remove cleanup.
15101         (symtab_collector): Add constructor, destructor.
15102         (collect_symtabs_from_filename): Remove cleanup.
15103         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15104         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15105         Use htab_up.
15106         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15107         * dwarf2read.c (dw2_expand_symtabs_matching)
15108         (dw2_map_symbol_filenames, dwarf_decode_macros)
15109         (write_psymtabs_to_index): Use htab_up.
15110         * dwarf2loc.c (func_verify_no_selftailcall)
15111         (call_site_find_chain_1, func_verify_no_selftailcall)
15112         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15113         std::vector, gdb::unique_xmalloc_ptr.
15114         (call_sitep): Remove typedef.
15115         (dwarf2_locexpr_baton_eval): Remove unused variable.
15116
15117 2017-01-10  Tom Tromey  <tom@tromey.com>
15118
15119         * python/python-internal.h (make_cleanup_py_decref)
15120         (make_cleanup_py_xdecref): Don't declare.
15121         * python/py-utils.c (py_decref, make_cleanup_py_decref)
15122         (py_xdecref, make_cleanup_py_xdecref): Remove.
15123
15124 2017-01-10  Tom Tromey  <tom@tromey.com>
15125
15126         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15127         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15128
15129 2017-01-10  Tom Tromey  <tom@tromey.com>
15130
15131         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15132
15133 2017-01-10  Tom Tromey  <tom@tromey.com>
15134
15135         * python/py-utils.c (unicode_to_encoded_string)
15136         (python_string_to_target_string)
15137         (python_string_to_target_python_string)
15138         (python_string_to_host_string, gdbpy_obj_to_string)
15139         (get_addr_from_python): Use gdbpy_ref.
15140
15141 2017-01-10  Tom Tromey  <tom@tromey.com>
15142
15143         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15144         gdbpy_ref.
15145
15146 2017-01-10  Tom Tromey  <tom@tromey.com>
15147
15148         * python/python.c (eval_python_command, gdbpy_decode_line)
15149         (gdbpy_run_events, gdbpy_start_type_printers)
15150         (gdbpy_apply_type_printers): Use gdbpy_ref.
15151
15152 2017-01-10  Tom Tromey  <tom@tromey.com>
15153
15154         * python/py-param.c (get_doc_string, compute_enum_values): Use
15155         gdbpy_ref.
15156
15157 2017-01-10  Tom Tromey  <tom@tromey.com>
15158
15159         * python/py-inferior.c (find_thread_object, build_inferior_list):
15160         Use gdbpy_ref.
15161
15162 2017-01-10  Tom Tromey  <tom@tromey.com>
15163
15164         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15165
15166 2017-01-10  Tom Tromey  <tom@tromey.com>
15167
15168         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15169         gdbpy_ref.
15170
15171 2017-01-10  Tom Tromey  <tom@tromey.com>
15172
15173         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
15174         extra incref.
15175         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15176         Use gdbpy_ref.
15177
15178 2017-01-10  Tom Tromey  <tom@tromey.com>
15179
15180         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15181         gdbpy_ref.
15182
15183 2017-01-10  Tom Tromey  <tom@tromey.com>
15184
15185         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
15186         decref results of PyArg_ParseTupleAndKeywords.
15187
15188 2017-01-10  Tom Tromey  <tom@tromey.com>
15189
15190         * python/python.c (python_run_simple_file): Use
15191         unique_xmalloc_ptr, gdbpy_ref.
15192
15193 2017-01-10  Tom Tromey  <tom@tromey.com>
15194
15195         * python/py-prettyprint.c (print_stack_unless_memory_error)
15196         (print_string_repr, print_children): Use gdbpy_ref.
15197         (dummy_python_frame): New class.
15198         (dummy_python_frame::dummy_python_frame): Rename from
15199         push_dummy_python_frame.
15200         (py_restore_tstate): Remove.
15201
15202 2017-01-10  Tom Tromey  <tom@tromey.com>
15203
15204         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15205
15206 2017-01-10  Tom Tromey  <tom@tromey.com>
15207
15208         * python/python.c (ensure_python_env, restore_python_env):
15209         Remove.
15210         * python/python-internal.h (ensure_python_env): Don't declare.
15211         * varobj.h (varobj_ensure_python_env): Don't declare.
15212         * varobj.c (varobj_ensure_python_env): Remove.
15213
15214 2017-01-10  Tom Tromey  <tom@tromey.com>
15215
15216         * varobj.c (varobj_value_get_print_value): Use
15217         gdbpy_enter_varobj.
15218
15219 2017-01-10  Tom Tromey  <tom@tromey.com>
15220
15221         * python/py-prettyprint.c (print_string_repr, print_children):
15222         Update.
15223         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15224         of "encoding".
15225         * varobj.c (varobj_value_get_print_value): Update.
15226         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15227
15228 2017-01-10  Tom Tromey  <tom@tromey.com>
15229
15230         * varobj.c (varobj_get_display_hint)
15231         (dynamic_varobj_has_child_method, install_new_value_visualizer)
15232         (varobj_set_visualizer, free_variable): Use
15233         gdbpy_enter_varobj.
15234
15235 2017-01-10  Tom Tromey  <tom@tromey.com>
15236
15237         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15238         (do_finish_initialization): New function.  Use gdbpy_ref.
15239         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
15240         do_finish_initialization.
15241
15242 2017-01-10  Tom Tromey  <tom@tromey.com>
15243
15244         * python/py-param.c (get_set_value, get_show_value): Use
15245         gdbpy_enter, gdbpy_ref.
15246
15247 2017-01-10  Tom Tromey  <tom@tromey.com>
15248
15249         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15250
15251 2017-01-10  Tom Tromey  <tom@tromey.com>
15252
15253         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15254
15255 2017-01-10  Tom Tromey  <tom@tromey.com>
15256
15257         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15258         Use gdbpy_enter_varobj.
15259
15260 2017-01-10  Tom Tromey  <tom@tromey.com>
15261
15262         * varobj.c (gdbpy_enter_varobj): New constructor.
15263         * python/python-internal.h (gdbpy_enter_varobj): New class.
15264         * python/py-varobj.c (py_varobj_get_iterator): Use
15265         gdbpy_enter_varobj.
15266
15267 2017-01-10  Tom Tromey  <tom@tromey.com>
15268
15269         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15270         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15271         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15272         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15273         unique_xmalloc_ptr.
15274         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15275
15276 2017-01-10  Tom Tromey  <tom@tromey.com>
15277
15278         * python/py-xmethods.c (invoke_match_method): Use
15279         gdbpy_ref.
15280
15281 2017-01-10  Tom Tromey  <tom@tromey.com>
15282
15283         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15284         gdbpy_enter, gdbpy_ref.
15285
15286 2017-01-10  Tom Tromey  <tom@tromey.com>
15287
15288         * python/python.c (python_interactive_command): Use gdbpy_enter.
15289
15290 2017-01-10  Tom Tromey  <tom@tromey.com>
15291
15292         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15293         gdbpy_ref.
15294
15295 2017-01-10  Tom Tromey  <tom@tromey.com>
15296
15297         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15298         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15299
15300 2017-01-10  Tom Tromey  <tom@tromey.com>
15301
15302         * utils.h (htab_deleter): New struct.
15303         (htab_up): New typedef.
15304         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15305         gdbpy_enter, gdbpy_ref, htab_up.
15306
15307 2017-01-10  Tom Tromey  <tom@tromey.com>
15308
15309         * python/py-unwind.c (pending_frame_invalidate): Remove.
15310         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15311
15312 2017-01-10  Tom Tromey  <tom@tromey.com>
15313
15314         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15315         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15316
15317 2017-01-10  Tom Tromey  <tom@tromey.com>
15318
15319         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15320
15321 2017-01-10  Tom Tromey  <tom@tromey.com>
15322
15323         * python/python.c (gdbpy_eval_from_control_command)
15324         (gdbpy_source_script, gdbpy_run_events)
15325         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15326         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15327         gdbpy_enter.
15328
15329 2017-01-10  Tom Tromey  <tom@tromey.com>
15330
15331         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15332
15333 2017-01-10  Tom Tromey  <tom@tromey.com>
15334
15335         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15336
15337 2017-01-10  Tom Tromey  <tom@tromey.com>
15338
15339         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15340         (python_on_inferior_call_pre, python_on_inferior_call_post)
15341         (python_on_memory_change, python_on_register_change)
15342         (python_inferior_exit, python_new_objfile, add_thread_object)
15343         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15344
15345 2017-01-10  Tom Tromey  <tom@tromey.com>
15346
15347         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15348         (bpfinishpy_handle_exit): Use gdbpy_enter.
15349
15350 2017-01-10  Tom Tromey  <tom@tromey.com>
15351
15352         * python/py-cmd.c (cmdpy_destroyer)
15353         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15354         gdbpy_enter.
15355
15356 2017-01-10  Tom Tromey  <tom@tromey.com>
15357
15358         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15359         gdbpy_enter.
15360         (gdbpy_breakpoint_has_cond): Likewise.
15361
15362 2017-01-10  Tom Tromey  <tom@tromey.com>
15363
15364         * python/python.c (gdbpy_enter): New constructor.
15365         (~gdbpy_enter): New destructor.
15366         (restore_python_env, ensure_python_env): Rewrite.
15367         * python/python-internal.h (gdbpy_enter): New class.
15368
15369 2017-01-10  Tom Tromey  <tom@tromey.com>
15370
15371         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15372
15373 2017-01-10  Tom Tromey  <tom@tromey.com>
15374
15375         * python/py-value.c (value_has_field, get_field_flag)
15376         (get_field_type, valpy_getitem, convert_value_from_python): Use
15377         gdbpy_ref.
15378
15379 2017-01-10  Tom Tromey  <tom@tromey.com>
15380
15381         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15382         gdbpy_ref.
15383
15384 2017-01-10  Tom Tromey  <tom@tromey.com>
15385
15386         * python/py-prettyprint.c (search_pp_list)
15387         (find_pretty_printer_from_objfiles)
15388         (find_pretty_printer_from_progspace)
15389         (find_pretty_printer_from_gdb, find_pretty_printer)
15390         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15391         gdbpy_ref.
15392
15393 2017-01-10  Tom Tromey  <tom@tromey.com>
15394
15395         * python/py-param.c (call_doc_function): Use gdbpy_ref.
15396
15397 2017-01-10  Tom Tromey  <tom@tromey.com>
15398
15399         * python/py-linetable.c (build_line_table_tuple_from_pcs)
15400         (ltpy_get_all_source_lines): Use gdbpy_ref.
15401
15402 2017-01-10  Tom Tromey  <tom@tromey.com>
15403
15404         * python/py-framefilter.c (extract_sym, extract_value)
15405         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15406         gdbpy_ref.
15407
15408 2017-01-10  Tom Tromey  <tom@tromey.com>
15409
15410         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15411
15412 2017-01-10  Tom Tromey  <tom@tromey.com>
15413
15414         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15415
15416 2017-01-10  Tom Tromey  <tom@tromey.com>
15417
15418         * python/py-function.c (convert_values_to_python, fnpy_init): Use
15419         gdbpy_ref.
15420
15421 2017-01-10  Tom Tromey  <tom@tromey.com>
15422
15423         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15424
15425 2017-01-10  Tom Tromey  <tom@tromey.com>
15426
15427         * python/py-type.c (convert_field, make_fielditem, typy_fields)
15428         (typy_range): Use gdbpy_ref.
15429
15430 2017-01-10  Tom Tromey  <tom@tromey.com>
15431
15432         * python/py-threadevent.c (create_thread_event_object): Use
15433         gdbpy_ref.
15434         * python/py-stopevent.c (create_stop_event_object): Simplify.
15435         (emit_stop_event): Use gdbpy_ref.
15436         * python/py-signalevent.c (create_signal_event_object): Use
15437         gdbpy_ref.
15438         * python/py-newobjfileevent.c (create_new_objfile_event_object)
15439         (emit_new_objfile_event, create_clear_objfiles_event_object)
15440         (emit_clear_objfiles_event): Use gdbpy_ref.
15441         * python/py-infevents.c (create_inferior_call_event_object)
15442         (create_register_changed_event_object)
15443         (create_memory_changed_event_object, emit_inferior_call_event)
15444         (emit_memory_changed_event, emit_register_changed_event): Use
15445         gdbpy_ref.
15446         * python/py-exitedevent.c (create_exited_event_object)
15447         (emit_exited_event): Use gdbpy_ref.
15448         * python/py-event.h (evpy_emit_event): Remove
15449         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15450         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15451         * python/py-continueevent.c (emit_continue_event): Use
15452         gdbpy_ref.
15453         * python/py-breakpoint.c (gdbpy_breakpoint_created)
15454         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15455         gdbpy_ref.
15456         * python/py-bpevent.c (create_breakpoint_event_object): Use
15457         gdbpy_ref.
15458
15459 2017-01-10  Tom Tromey  <tom@tromey.com>
15460
15461         * python/py-ref.h: New file.
15462
15463 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15464
15465         * cli-out.c (cli_ui_out::do_redirect): Change return type to
15466         void.
15467         * cli-out.h (cli_ui_out::do_redirect): Likewise.
15468         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15469         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15470         * ui-out.c (ui_out::redirect): Likewise.
15471         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15472         * cli/cli-logging.c (set_logging_redirect): Update call site of
15473         ui_out::redirect.
15474         (handle_redirections): Likewise.
15475         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15476         * top.c (execute_command_to_string): Likewise.
15477         * utils.c (do_ui_out_redirect_pop): Likewise.
15478
15479 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15480
15481         * stack.c (_initialize_stack): Update "frame" command help message.
15482
15483 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
15484
15485         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15486
15487 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15488
15489         * x86-linux-nat.h: Include gdb_proc_service.h.
15490
15491 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15492
15493         * ser-base.h: Include serial.h.
15494
15495 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15496
15497         * ppc-linux-tdep.h: Include ppc-tdep.h.
15498
15499 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15500
15501         * nat/amd64-linux-siginfo.h: Include signal.h.
15502
15503 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15504
15505         * nat/aarch64-linux-hw-point.h: Include break-common.h.
15506
15507 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15508
15509         * mi/mi-parse.h: Include mi-cmds.h.
15510
15511 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15512
15513         * inf-loop.c: Don't include "target.h".
15514         * inf-loop.h: Include it here.
15515
15516 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15517
15518         * dfp.h: Include "dboulest.h" and "expression.h".
15519
15520 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15521
15522         * ax-gdb.h: Include "ax.h".
15523
15524 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15525
15526         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15527         with nat/gdb_ptrace.h.
15528
15529 2017-01-05  Yao Qi  <yao.qi@linaro.org>
15530
15531         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15532         new line.
15533         (mips64_fbsd_sigframe_init): Likewise.
15534
15535 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15536
15537         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15538         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15539
15540 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15541
15542         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15543         * NEWS: Mention new FreeBSD/mips native configuration.
15544         * config/mips/fbsd.mh: New file.
15545         * configure.host: Add mips*-*-freebsd*.
15546         * mips-fbsd-nat.c: New file.
15547
15548 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15549
15550         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15551         (ALLDEPFILES): Add mips-fbsd-tdep.c.
15552         * NEWS: Mention new FreeBSD/mips target.
15553         * configure.tgt: Add mips*-*-freebsd*.
15554         * mips-fbsd-tdep.c: New file.
15555         * mips-fbsd-tdep.h: New file.
15556
15557 2017-01-04  Yao Qi  <yao.qi@linaro.org>
15558
15559         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15560         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15561
15562 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15563
15564         Update copyright year range in all GDB files.
15565
15566 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15567
15568         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15569
15570 For older changes see ChangeLog-2016.
15571 \f
15572 Local Variables:
15573 mode: change-log
15574 left-margin: 8
15575 fill-column: 74
15576 version-control: never
15577 coding: utf-8
15578 End: