Make encode_actions_rsp use std::vector
[external/binutils.git] / gdb / ChangeLog
1 2017-11-08  Simon Marchi  <simon.marchi@ericsson.com>
2
3         * tracepoint.h (class collection_list) <stringify>: Return
4         std::vector<std::string>.
5         (encode_actions_rsp): Change parameters to
6         std::vector<std::string> *.
7         * tracepoint.c (collection_list::stringify): Return
8         std::vector<std::string> and adjust accordingly.
9         (encode_actions_rsp): Changee parameters to
10         std::vector<std::string> and adjust accordingly.
11         * remote.c (free_actions_list),
12         free_actions_list_cleanup_wrapper): Remove.
13         (remote_download_tracepoint): Adjust to std::vector.
14
15 2017-11-08  Tom Tromey  <tom@tromey.com>
16
17         * dwarf2read.c (symbolp): Remove typedef.
18         (read_func_scope): Use std::vector.
19         (process_structure_scope): Use std::vector.
20
21 2017-11-08  Pedro Alves  <palves@redhat.com>
22
23         * ada-lang.c (ada_make_symbol_completion_list): Use
24         completion_skip_symbol.
25         * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
26         (symbol_is_function_or_method(symbol*)): New.
27         (add_symtab_completions): Add complete_symbol_mode parameter.  Use
28         completion_skip_symbol.
29         (default_collect_symbol_completion_matches_break_on): Use
30         completion_skip_symbol.  Pass down mode.
31         (collect_file_symbol_completion_matches): Pass down mode.
32         * symtab.h (symbol_is_function_or_method): New declarations.
33         (completion_skip_symbol): New template function.
34
35 2017-11-08  Pedro Alves  <palves@redhat.com>
36
37         * linespec.c (iterate_over_all_matching_symtabs): Add
38         search_domain parameter.  Pass it down to expand_symtabs_matching.
39         (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
40         (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
41         search_domain.
42         (add_all_symbol_names_from_pspace): Add search_domain parameter.
43         Pass it down.
44         (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
45         symbols.
46         (add_matching_symbols_to_info): Add search_domain parameter.  Pass
47         it down.
48
49 2017-11-08  Pedro Alves  <palves@redhat.com>
50
51         * ada-lang.c (ada_make_symbol_completion_list): Remove text and
52         text_len locals and don't pass them down.
53         * symtab.c (completion_list_add_name): Remove
54         sym_text/sym_text_len parameters and adjust.
55         (completion_list_add_symbol, completion_list_add_msymbol)
56         (completion_list_objc_symbol, completion_list_add_fields)
57         (add_symtab_completions): Likewise.
58         (default_collect_symbol_completion_matches_break_on)
59         (collect_file_symbol_completion_matches): Remove sym_text_len
60         local and don't pass it down.
61         * symtab.h (completion_list_add_name): Remove
62         sym_text/sym_text_len parameters.
63
64 2017-11-08  Pedro Alves  <palves@redhat.com>
65
66         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
67         unittests/lookup_name_info-selftests.c.
68         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
69         * cp-support.c: Include "selftest.h".
70         (cp_remove_params_1): Rename from cp_remove_params.  Add
71         'require_param' parameter, and handle it.
72         (cp_remove_params): Reimplement.
73         (cp_remove_params_if_any): New.
74         (selftests::quote): New.
75         (selftests::check_remove_params): New.
76         (selftests::test_cp_remove_params): New.
77         (_initialize_cp_support): Install
78         selftests::test_cp_remove_params.
79         * cp-support.h (cp_remove_params_if_any): Declare.
80         * dwarf2read.c :Include "selftest.h".
81         (dw2_expand_symtabs_matching_symbol): Use
82         lookup_name_info::make_ignore_params.
83         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
84         (selftests::dw2_expand_symtabs_matching::string_or_null)
85         (selftests::dw2_expand_symtabs_matching::check_match)
86         (selftests::dw2_expand_symtabs_matching::test_symbols)
87         (selftests::dw2_expand_symtabs_matching::run_test): New.
88         (_initialize_dwarf2_read): Register
89         selftests::dw2_expand_symtabs_matching::run_test.
90         * psymtab.c (psym_expand_symtabs_matching): Use
91         lookup_name_info::make_ignore_params.
92         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
93         If the lookup name wants to ignore parameters, strip them.
94         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
95         code handling '('.
96         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
97         (default_collect_symbol_completion_matches_break_on): Don't try to
98         strip parameters.
99         * symtab.h (lookup_name_info::lookup_name_info): Add
100         'ignore_parameters' parameter.
101         (lookup_name_info::ignore_parameters)
102         (lookup_name_info::make_ignore_params): New methods.
103         (lookup_name_info::m_ignore_parameters): New field.
104         * unittests/lookup_name_info-selftests.c: New file.
105
106 2017-11-08  Pedro Alves  <palves@redhat.com>
107
108         * dwarf2read.c (dw2_expand_marked_cus)
109         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
110         (dw2_expand_symtabs_matching): Move further below.
111         (dw2_expand_marked_cus): Reindent.
112
113 2017-11-08  Pedro Alves  <palves@redhat.com>
114
115         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
116         (struct name_component): New.
117         (mapped_index::name_components): New field.
118         (mapped_index::symbol_name_at): New method.
119         (dwarf2_read_index): Call mapped_index ctor.
120         (dw2_map_matching_symbols): Add comment about name_components
121         table.
122         (dw2_expand_symtabs_matching): Factor part to...
123         (dw2_expand_symtabs_matching_symbol): ... this new function.
124         Build name components table, and lookup symbols in it before
125         calling the name matcher.
126         (dw2_expand_marked_cus): New, factored out from
127         dw2_expand_symtabs_matching.
128         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
129
130 2017-11-08   Pedro Alves  <palves@redhat.com>
131
132         * ada-lang.c (ada_encode): Rename to ..
133         (ada_encode_1): ... this.  Add throw_errors parameter and handle
134         it.
135         (ada_encode): Reimplement.
136         (match_name): Delete, folded into full_name.
137         (resolve_subexp): No longer pass the encoded name to
138         ada_lookup_symbol_list.
139         (should_use_wild_match): Delete.
140         (name_match_type_from_name): New.
141         (ada_lookup_simple_minsym): Use lookup_name_info and the
142         language's symbol_name_matcher_ftype.
143         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
144         (ada_add_block_renamings): Adjust to use lookup_name_info.
145         (ada_lookup_name): New.
146         (add_nonlocal_symbols, ada_add_all_symbols)
147         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
148         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
149         (ada_name_for_lookup): Delete.
150         (ada_lookup_encoded_symbol): Construct a verbatim name.
151         (wild_match): Reverse sense of return type.  Use bool.
152         (full_match): Reverse sense of return type.  Inline bits of old
153         match_name here.
154         (ada_add_block_symbols): Adjust to use lookup_name_info.
155         (symbol_completion_match): Delete, folded into...
156         (ada_lookup_name_info::matches): ... .this new method.
157         (symbol_completion_add): Delete.
158         (ada_collect_symbol_completion_matches): Add name_match_type
159         parameter.  Adjust to use lookup_name_info and
160         completion_list_add_name.
161         (get_var_value, ada_add_global_exceptions): Adjust to use
162         lookup_name_info.
163         (ada_get_symbol_name_cmp): Delete.
164         (do_wild_match, do_full_match): New functions.
165         (ada_lookup_name_info::ada_lookup_name_info): New method.
166         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
167         functions.
168         (ada_language_defn): Install ada_get_symbol_name_matcher.
169         * ada-lex.l (processId): If name starts with '<', copy it
170         verbatim.
171         * block.c (block_iter_match_step, block_iter_match_first)
172         (block_iter_match_next, block_lookup_symbol)
173         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
174         lookup_name_info.
175         * block.h (block_iter_match_first, block_iter_match_next)
176         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
177         * c-lang.c (c_language_defn, cplus_language_defn)
178         (asm_language_defn, minimal_language_defn): Adjust comments to
179         refer to la_get_symbol_name_matcher.
180         * completer.c (complete_files_symbols)
181         (collect_explicit_location_matches, symbol_completer): Pass a
182         symbol_name_match_type down.
183         * completer.h (class completion_match, completion_match_result):
184         New classes.
185         (completion_tracker::reset_completion_match_result): New method.
186         (completion_tracker::m_completion_match_result): New field.
187         * cp-support.c (make_symbol_overload_list_block): Adjust to use
188         lookup_name_info.
189         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
190         functions.
191         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
192         * d-lang.c: Adjust comments to refer to
193         la_get_symbol_name_matcher.
194         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
195         Adjust to use lookup_name_info.
196         (dict_iter_match_first, dict_iter_match_next)
197         (iter_match_first_hashed, iter_match_next_hashed)
198         (iter_match_first_linear, iter_match_next_linear): Adjust to work
199         with a lookup_name_info.
200         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
201         Likewise.
202         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
203         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
204         (gdb_index_symbol_name_matcher): New class.
205         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
206         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
207         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
208         with a symbol_name_match_type.
209         (f_language_defn): Adjust comments to refer to
210         la_get_symbol_name_matcher.
211         * go-lang.c (go_language_defn): Adjust comments to refer to
212         la_get_symbol_name_matcher.
213         * language.c (default_symbol_name_matcher)
214         (language_get_symbol_name_matcher): New functions.
215         (unknown_language_defn, auto_language_defn): Adjust comments to
216         refer to la_get_symbol_name_matcher.
217         * language.h (symbol_name_cmp_ftype): Delete.
218         (language_defn) <la_collect_symbol_completion_matches>: Add match
219         type parameter.
220         <la_get_symbol_name_cmp>: Delete field.
221         <la_get_symbol_name_matcher>: New field.
222         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
223         (default_symbol_name_matcher, language_get_symbol_name_matcher):
224         Declare.
225         * linespec.c (iterate_over_all_matching_symtabs)
226         (iterate_over_file_blocks): Adjust to use lookup_name_info.
227         (find_methods): Add language parameter, and use lookup_name_info
228         and the language's symbol_name_matcher_ftype.
229         (linespec_complete_function): Adjust.
230         (lookup_prefix_sym): Use lookup_name_info.
231         (add_all_symbol_names_from_pspace): Adjust.
232         (find_superclass_methods): Add language parameter and pass it
233         down.
234         (find_method): Pass symbol language down.
235         (find_linespec_symbols): Don't demangle or Ada encode here.
236         (search_minsyms_for_name): Add lookup_name_info parameter.
237         (add_matching_symbols_to_info): Add name_match_type parameter.
238         Use lookup_name_info.
239         * m2-lang.c (m2_language_defn): Adjust comments to refer to
240         la_get_symbol_name_matcher.
241         * minsyms.c: Include <algorithm>.
242         (add_minsym_to_demangled_hash_table): Remove table parameter and
243         add objfile parameter.  Use search_name_hash, and add language to
244         demangled languages vector.
245         (struct found_minimal_symbols): New struct.
246         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
247         New functions.
248         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
249         input names here.  Use lookup_name_info instead.  Lookup up
250         demangled names once for each language in the demangled names
251         vector.
252         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
253         demangled names once for each language in the demangled names
254         vector.
255         (build_minimal_symbol_hash_tables): Adjust.
256         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
257         lookup_name_info.
258         * objc-lang.c (objc_language_defn): Adjust comment to refer to
259         la_get_symbol_name_matcher.
260         * objfiles.h: Include <vector>.
261         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
262         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
263         la_get_symbol_name_matcher.
264         * p-lang.c (pascal_language_defn): Adjust comment to refer to
265         la_get_symbol_name_matcher.
266         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
267         (match_partial_symbol): Use symbol_name_match_type,
268         lookup_name_info and psymbol_name_matches.
269         (lookup_partial_symbol): Use lookup_name_info.
270         (map_block): Use symbol_name_match_type and lookup_name_info.
271         (psym_map_matching_symbols): Use symbol_name_match_type.
272         (psymbol_name_matches): New.
273         (recursively_search_psymtabs): Use lookup_name_info and
274         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
275         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
276         'kind' parameter to 'domain'.
277         * rust-lang.c (rust_language_defn): Adjust comment to refer to
278         la_get_symbol_name_matcher.
279         * symfile-debug.c (debug_qf_map_matching_symbols)
280         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
281         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
282         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
283         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
284         Adjust to use symbol_name_match_type.
285         <expand_symtabs_matching>: Adjust to use lookup_name_info.
286         (expand_symtabs_matching): Adjust to use lookup_name_info.
287         * symmisc.c (maintenance_expand_symtabs): Use
288         lookup_name_info::match_any ().
289         * symtab.c (symbol_matches_search_name): New.
290         (eq_symbol_entry): Adjust to use lookup_name_info and the
291         language's matcher.
292         (demangle_for_lookup_info::demangle_for_lookup_info): New.
293         (lookup_name_info::match_any): New.
294         (iterate_over_symbols, search_symbols): Use lookup_name_info.
295         (compare_symbol_name): Add language, lookup_name_info and
296         completion_match_result parameters, and use them.
297         (completion_list_add_name): Make extern.  Add language and
298         lookup_name_info parameters.  Use them.
299         (completion_list_add_symbol, completion_list_add_msymbol)
300         (completion_list_objc_symbol): Add lookup_name_info parameters and
301         adjust.  Pass down language.
302         (completion_list_add_fields): Add lookup_name_info parameters and
303         adjust.  Pass down language.
304         (add_symtab_completions): Add lookup_name_info parameters and
305         adjust.
306         (default_collect_symbol_completion_matches_break_on): Add
307         name_match_type parameter, and use it.  Use lookup_name_info.
308         (default_collect_symbol_completion_matches)
309         (collect_symbol_completion_matches): Add name_match_type
310         parameter, and pass it down.
311         (collect_symbol_completion_matches_type): Adjust.
312         (collect_file_symbol_completion_matches): Add name_match_type
313         parameter, and use lookup_name_info.
314         * symtab.h: Include <string> and "common/gdb_optional.h".
315         (enum class symbol_name_match_type): New.
316         (class ada_lookup_name_info): New.
317         (struct demangle_for_lookup_info): New.
318         (class lookup_name_info): New.
319         (symbol_name_matcher_ftype): New.
320         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
321         (symbol_matches_search_name): Declare.
322         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
323         (default_collect_symbol_completion_matches)
324         (collect_symbol_completion_matches)
325         (collect_file_symbol_completion_matches): Add name_match_type
326         parameter.
327         (iterate_over_symbols): Use lookup_name_info.
328         (completion_list_add_name): Declare.
329         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
330         (strncmp_iw_with_mode): Now extern.
331         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
332         (strncmp_iw_with_mode): Declare.
333
334 2017-11-08  Keith Seitz  <keiths@redhat.com>
335             Pedro Alves  <palves@redhat.com>
336
337         * ada-lang.c (ada_language_defn): Install
338         default_search_name_hash.
339         * buildsym.c (struct buildsym_compunit): <language>: New field.
340         (finish_block_internal): Pass language when creating dictionaries.
341         (start_buildsym_compunit, start_symtab): New language parameters.
342         Use them.
343         (restart_symtab): Pass down compilation unit's language.
344         * buildsym.h (enum language): Forward declare.
345         (start_symtab): New 'language' parameter.
346         * c-lang.c (c_language_defn, cplus_language_defn)
347         (asm_language_defn, minimal_language_defn): Install
348         default_search_name_hash.
349         * coffread.c (coff_start_symtab): Adjust.
350         * d-lang.c (d_language_defn): Install default_search_name_hash.
351         * dbxread.c (struct symloc): Add 'pst_language' field.
352         (PST_LANGUAGE): Define.
353         (start_psymtab, read_ofile_symtab): Use it.
354         (process_one_symbol): New 'language' parameter.  Pass it down.
355         * dictionary.c (struct dictionary) <language>: New field.
356         (DICT_LANGUAGE): Define.
357         (dict_create_hashed, dict_create_hashed_expandable)
358         (dict_create_linear, dict_create_linear_expandable): New parameter
359         'language'.  Set the dictionary's language.
360         (iter_match_first_hashed): Adjust to rename.
361         (insert_symbol_hashed): Assert we don't see mismatching
362         languages.  Adjust to rename.
363         (dict_hash): Rename to ...
364         (default_search_name_hash): ... this and make extern.
365         * dictionary.h (struct language_defn): Forward declare.
366         (dict_create_hashed): New parameter 'language'.
367         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
368         * f-lang.c (f_language_defn): Install default_search_name_hash.
369         * go-lang.c (go_language_defn): Install default_search_name_hash.
370         * jit.c (finalize_symtab): Pass compunit's language to dictionary
371         creation.
372         * language.c (unknown_language_defn, auto_language_defn):
373         * language.h (language_defn::la_search_name_hash): New field.
374         (default_search_name_hash): Declare.
375         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
376         * mdebugread.c (new_block): New parameter 'language'.
377         * mdebugread.c (parse_symbol): Pass symbol language to block
378         allocation.
379         (psymtab_to_symtab_1): Pass down language.
380         (new_symtab): Pass compunit's language to block allocation.
381         * objc-lang.c (objc_language_defn): Install
382         default_search_name_hash.
383         * opencl-lang.c (opencl_language_defn):
384         * p-lang.c (pascal_language_defn): Install
385         default_search_name_hash.
386         * rust-lang.c (rust_language_defn): Install
387         default_search_name_hash.
388         * stabsread.h (enum language): Forward declare.
389         (process_one_symbol): Add 'language' parameter.
390         * symtab.c (search_name_hash): New function.
391         * symtab.h (search_name_hash): Declare.
392         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
393
394 2017-11-08  Pedro Alves  <palves@redhat.com>
395
396         * cp-name-parser.y (main): Don't initialize extra_chars.
397
398 2017-11-07  Tom Tromey  <tom@tromey.com>
399
400         * event-top.h (command_handler): Constify.
401         * record-full.c (cmd_record_full_start): Update.
402         * thread.c (thread_apply_all_command): Update.
403         * printcmd.c (eval_command): Update.
404         * mi/mi-main.c (mi_execute_cli_command): Update.
405         (mi_execute_async_cli_command): Update.
406         * tui/tui-stack.c (tui_update_command): Update.
407         * cli/cli-interp.c (safe_execute_command): Constify.
408         * record.c (record_start): Update.
409         (record_start, record_stop, cmd_record_start): Update.
410         * record-btrace.c (cmd_record_btrace_bts_start): Update.
411         (cmd_record_btrace_pt_start): Update.
412         (cmd_record_btrace_start): Update.
413         (cmd_record_btrace_start): Update.
414         * reverse.c (exec_reverse_once): Update.
415         * python/python.c (execute_gdb_command): Don't copy the command.
416         * event-top.c (command_line_handler): Update.
417         (command_handler): Constify.
418         * defs.h (deprecated_call_command_hook): Constify.
419         * cli/cli-script.h (execute_user_command): Constify.
420         * cli/cli-script.c (execute_user_command): Constify.
421         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
422         (enum command_control_type): Update.
423         * main.c (catch_command_errors): Remove non-const overload.
424         (catch_command_errors_ftype): Remove.
425         * python/py-cmd.c (cmdpy_function): Constify.
426         * guile/scm-cmd.c (cmdscm_function): Constify.
427         * cli/cli-dump.c (call_dump_func): Constify.
428         * cli/cli-decode.c (do_const_cfunc): Constify.
429         (do_sfunc): Constify.
430         (cmd_func): Constify.
431         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
432         * top.h (execute_command): Constify.
433         * top.c (execute_command): Constify.
434         (execute_command_to_string): Constify.
435         (deprecated_call_command_hook): Constify.
436         * command.h (cmd_func): Constify.
437         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
438
439 2017-11-07  Tom Tromey  <tom@tromey.com>
440
441         * ada-lang.c (catch_ada_exception_command): Constify.
442         (catch_assert_command): Constify.
443         * break-catch-throw.c (catch_catch_command, catch_throw_command)
444         (catch_rethrow_command): Constify.
445         (catch_exception_command_1): Constify.
446         * breakpoint.h (add_catch_command): Constify.
447         * break-catch-syscall.c (catch_syscall_command_1): Constify.
448         (catch_syscall_split_args): Constify.
449         * break-catch-sig.c (catch_signal_command): Constify.
450         (catch_signal_split_args): Constify.
451         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
452         cmd_const_sfunc_ftype.
453         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
454         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
455         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
456         (add_setshow_string_cmd, struct cmd_list_element)
457         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
458         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
459         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
460         Constify.
461         (set_cmd_sfunc): Constify.
462         (empty_sfunc): Constify.
463         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
464         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
465         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
466         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
467         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
468         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
469         Constify.
470         (set_cmd_sfunc): Constify.
471         (cmd_sfunc_ftype): Remove.
472         * compile/compile.c (set_compile_args): Constify.
473         * infrun.c (set_disable_randomization): Constify.
474         * infcmd.c (set_args_command, set_cwd_command): Constify.
475         * breakpoint.c (set_condition_evaluation_mode): Constify.
476         (add_catch_command): Constify.
477         (catch_fork_command_1, catch_exec_command_1)
478         (catch_load_command_1, catch_unload_command_1): Constify.
479         (catch_load_or_unload): Constify.
480         * guile/scm-param.c (pascm_set_func): Constify.
481         (add_setshow_generic): Constify.
482         * python/py-param.c (get_set_value): Constify.
483         * top.h (set_verbose): Constify.
484         * tui/tui-win.c (tui_set_var_cmd): Constify.
485         * mi/mi-main.c (set_mi_async_command): Constify.
486         * cli/cli-logging.c (set_logging_overwrite)
487         (set_logging_redirect): Constify.
488         * value.c (set_max_value_size): Constify.
489         * valprint.c (set_input_radix, set_output_radix): Constify.
490         * utils.c (set_width_command, set_height_command): Constify.
491         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
492         * tracepoint.c (set_disconnected_tracing)
493         (set_circular_trace_buffer, set_trace_buffer_size)
494         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
495         * top.c (set_history_size_command, set_verbose, set_editing)
496         (set_gdb_datadir, set_history_filename): Constify.
497         * target.c (set_targetdebug, maint_set_target_async_command)
498         (maint_set_target_non_stop_command, set_target_permissions)
499         (set_write_memory_permission): Constify.
500         (open_target): Constify.
501         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
502         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
503         * symtab.c (set_symbol_cache_size_handler): Constify.
504         * symfile.c (set_ext_lang_command): Constify.
505         * symfile-debug.c (set_debug_symfile): Constify.
506         * source.c (set_directories_command): Constify.
507         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
508         * serial.c (set_parity): Constify.
509         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
510         * remote.c (set_remote_exec_file, set_remotebreak)
511         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
512         * record.c (set_record_insn_history_size)
513         (set_record_call_history_size): Constify.
514         * record-full.c (set_record_full_insn_max_num): Constify.
515         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
516         * osabi.c (set_osabi): Constify.
517         * mips-tdep.c (set_mips64_transfers_32bit_regs)
518         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
519         * maint.c (maintenance_set_profile_cmd): Constify.
520         * linux-thread-db.c (set_libthread_db_search_path): Constify.
521         * language.c (set_language_command, set_range_command)
522         (set_case_command): Constify.
523         * infrun.c (set_non_stop, set_observer_mode)
524         (set_stop_on_solib_events, set_schedlock_func)
525         (set_exec_direction_func): Constify.
526         * infcmd.c (set_inferior_tty_command): Constify.
527         * disasm.c (set_disassembler_options_sfunc): Constify.
528         * demangle.c (set_demangling_command): Constify.
529         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
530         * cris-tdep.c (set_cris_version, set_cris_mode)
531         (set_cris_dwarf2_cfi): Constify.
532         * corefile.c (set_gnutarget_command): Constify.
533         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
534         (set_target_wide_charset_sfunc): Constify.
535         * breakpoint.c (update_dprintf_commands): Constify.
536         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
537         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
538         (set_disassembly_style_sfunc): Constify.
539         * arch-utils.c (set_endian, set_architecture): Constify.
540         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
541         * agent.c (set_can_use_agent): Constify.
542
543 2017-11-07  Tom Tromey  <tom@tromey.com>
544
545         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
546         (go32_pde, go32_pte, go32_pte_for_address): Constify.
547         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
548         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
549         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
550         (parse_int_arg, show_thread_default_detach_sc_cmd)
551         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
552         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
553         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
554         (show_task_pause_cmd, set_task_detach_sc_cmd)
555         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
556         (set_noninvasive_cmd, set_thread_pause_cmd)
557         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
558         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
559         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
560         * windows-nat.c (display_selectors): Constify.
561         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
562         non-const "cfunc".
563         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
564         (cmd_cfunc_eq): Likewise.
565         (struct cmd_list_element): Likewise.
566         (do_cfunc): Remove.
567         (cli_user_command_p): Update.
568         * command.h (add_cmd): Remove non-const overload.
569         (cmd_cfunc_ftype): Remove typedef.
570         (cmd_cfunc_eq): Remove non-const overload.
571         * value.c (show_values): Constify.
572         * thread.c (thread_apply_all_command): Constify.
573         * symfile.c (load_command): Constify.
574         * source.c (directory_command): Constify.
575         * maint.c (maintenance_internal_error)
576         (maintenance_demangler_warning, maintenance_space_display)
577         (maintenance_print_architecture, maintenance_translate_address)
578         (maintenance_info_selftests, maintenance_internal_warning):
579         Constify.
580         * breakpoint.c (disable_trace_command, enable_trace_command):
581         Constify.
582         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
583         Constify.
584         (add_auto_load_safe_path): Constify.
585         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
586         * top.h (show_commands): Constify.
587         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
588         * sparc64-tdep.c (adi_examine_command): Constify.
589         (adi_assign_command): Constify.
590
591 2017-11-07  Tom Tromey  <tom@tromey.com>
592
593         * frame.h (info_locals_command, info_args_command): Constify.
594         * auto-load.h (auto_load_info_scripts): Constify.
595         * inferior.h (registers_info): Constify.
596         * copying.c: Rebuild.
597         * copying.awk: Constify generated commands.
598         * auto-load.c (auto_load_info_scripts)
599         (info_auto_load_gdb_scripts): Constify.
600         * cli/cli-decode.c (struct cmd_list_element): Take a
601         cmd_const_cfunc_ftype.
602         * command.h (add_info): Take a cmd_const_cfunc_ftype.
603         * tui/tui-win.c (tui_all_windows_info): Constify.
604         * python/py-auto-load.c (info_auto_load_python_scripts):
605         Constify.
606         * cli/cli-cmds.c (show_command): Remove non-const overload.
607         * tracepoint.c (info_tvariables_command, info_scope_command):
608         Constify.
609         (info_static_tracepoint_markers_command): Constify.
610         * thread.c (info_threads_command): Constify.
611         (print_thread_info_1): Constify.
612         * target.c (info_target_command): Constify.
613         * symtab.c (info_sources_command, info_functions_command)
614         (info_types_command): Constify.
615         (info_variables_command): Remove non-const overload.
616         * symfile.c (info_ext_lang_command): Constify.
617         * stack.c (info_frame_command, info_locals_command)
618         (info_args_command): Constify.
619         (backtrace_command): Remove non-const overload.
620         * source.c (info_source_command, info_line_command): Constify.
621         * solib.c (info_sharedlibrary_command): Constify.
622         * skip.c (info_skip_command): Constify.
623         * ser-go32.c (info_serial_command): Constify.
624         * reverse.c (info_bookmarks_command): Constify.
625         * printcmd.c (info_symbol_command, info_address_command)
626         (info_display_command): Constify.
627         * osdata.c (info_osdata_command): Constify.
628         * objc-lang.c (info_selectors_command, info_classes_command):
629         Constify.
630         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
631         * memattr.c (info_mem_command): Constify.
632         * macrocmd.c (info_macro_command, info_macros_command): Constify.
633         * linux-fork.c (info_checkpoints_command): Constify.
634         * infrun.c (info_signals_command): Constify.
635         * inflow.c (info_terminal_command): Constify.
636         * inferior.c (info_inferiors_command): Constify.
637         (print_inferior): Constify.
638         * infcmd.c (info_program_command, info_all_registers_command)
639         (info_registers_command, info_vector_command)
640         (info_float_command): Constify.
641         (registers_info): Constify.
642         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
643         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
644         Constify.
645         * f-valprint.c (info_common_command): Constify.
646         * dcache.c (info_dcache_command): Constify.
647         (dcache_info_1): Constify.
648         * darwin-nat-info.c (info_mach_tasks_command)
649         (info_mach_task_command, info_mach_ports_command)
650         (info_mach_port_command, info_mach_threads_command)
651         (info_mach_thread_command, info_mach_regions_command)
652         (info_mach_regions_recurse_command, info_mach_region_command)
653         (info_mach_exceptions_command): Constify.
654         (get_task_from_args): Constify.
655         * cp-support.c (info_vtbl_command): Constify.
656         * breakpoint.c (info_watchpoints_command)
657         (info_tracepoints_command): Constify.
658         (info_breakpoints_command): Remove non-const overload.
659         * avr-tdep.c (avr_io_reg_read_command): Constify.
660         * auxv.c (info_auxv_command): Constify.
661         * ada-tasks.c (info_tasks_command): Constify.
662         (info_task): Constify.
663         * ada-lang.c (info_exceptions_command): Constify.
664
665 2017-11-07  Tom Tromey  <tom@tromey.com>
666
667         * solib.h (no_shared_libraries): Constify.
668         * frame.h (return_command): Constify.
669         * cli/cli-cmds.h (quit_command): Constify.
670         * top.h (quit_command, execute_command): Constify.
671         * target.h (flash_erase_command): Constify.
672         * inferior.h (set_inferior_args, attach_command): Constify.
673         * tracepoint.h (start_tracing, stop_tracing): Constify.
674         * breakpoint.h (break_command, tbreak_command)
675         (hbreak_command_wrapper, thbreak_command_wrapper)
676         (rbreak_command_wrapper, watch_command_wrapper)
677         (awatch_command_wrapper, rwatch_command_wrapper)
678         (get_tracepoint_by_number): Constify.
679         * symtab.c (info_variables_command, rbreak_command)
680         (symtab_symbol_info): Constify.
681         (info_variables_command): Add non-const overload.
682         * top.c (dont_repeat_command): Constify.
683         * breakpoint.c (ignore_command, commands_command)
684         (condition_command, tbreak_command, hbreak_command)
685         (thbreak_command, clear_command, break_command)
686         (info_breakpoints_command, watch_command, rwatch_command)
687         (awatch_command, trace_command, ftrace_command, strace_command)
688         (trace_pass_command, break_range_command, dprintf_command)
689         (agent_printf_command, get_tracepoint_by_number)
690         (watch_maybe_just_location, trace_pass_command): Constify.
691         (info_breakpoints_command): Add non-const overload.
692         * tracefile.c (tsave_command): Constify.
693         * infcmd.c (attach_command, disconnect_command, signal_command)
694         (queue_signal_command, stepi_command, nexti_command)
695         (finish_command, next_command, step_command, until_command)
696         (advance_command, jump_command, continue_command, run_command)
697         (start_command, starti_command, interrupt_command)
698         (run_command_1, set_inferior_args, step_1): Constify.
699         * inferior.c (add_inferior_command, remove_inferior_command)
700         (clone_inferior_command): Constify.
701         * linux-fork.c (checkpoint_command, restart_command): Constify.
702         * windows-nat.c (signal_event_command): Constify.
703         * guile/guile.c (guile_repl_command, guile_command): Constify.
704         * printcmd.c (x_command, display_command, printf_command)
705         (output_command, set_command, call_command, print_command)
706         (eval_command): Constify.
707         (non_const_set_command): Remove.
708         (_initialize_printcmd): Update.
709         * source.c (forward_search_command, reverse_search_command):
710         Constify.
711         * jit.c (jit_reader_load_command, jit_reader_unload_command):
712         Constify.
713         * infrun.c (handle_command): Constify.
714         * memattr.c (mem_command): Constify.
715         * stack.c (return_command, up_command, up_silently_command)
716         (down_command, down_silently_command, frame_command)
717         (backtrace_command, func_command, backtrace_command_1): Constify.
718         (backtrace_command): Add non-const overload.
719         * remote-sim.c (simulator_command): Constify.
720         * exec.c (set_section_command): Constify.
721         * tracepoint.c (tdump_command, trace_variable_command)
722         (tstatus_command, tstop_command, tstart_command)
723         (end_actions_pseudocommand, while_stepping_pseudocommand)
724         (collect_pseudocommand, teval_pseudocommand, actions_command)
725         (start_tracing, stop_tracing): Constify.
726         * value.c (init_if_undefined_command): Constify.
727         * tui/tui-stack.c (tui_update_command): Constify.
728         * tui/tui-win.c (tui_refresh_all_command)
729         (tui_set_tab_width_command, tui_set_win_height_command)
730         (tui_set_focus_command, tui_scroll_forward_command)
731         (tui_scroll_backward_command, tui_scroll_left_command)
732         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
733         (tui_set_win_height): Constify.
734         * tui/tui-layout.c (tui_layout_command): Constify.
735         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
736         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
737         (proc_untrace_sysexit_cmd): Constify.
738         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
739         (threadset_test_cmd, threadlist_update_test_cmd)
740         (threadalive_test): Constify.
741         * objc-lang.c (print_object_command): Constify.
742         * command.h (add_com): Constify.
743         * cli/cli-dump.c (restore_command): Constify.
744         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
745         (help_command, complete_command, shell_command, edit_command)
746         (list_command, disassemble_command, make_command)
747         (apropos_command, alias_command): Constify.
748         * cli/cli-script.c (document_command, define_command)
749         (while_command, if_command, validate_comname): Constify.
750         * cli/cli-decode.c (struct cmd_list_element): Change type of
751         "fun".
752         * target.c (do_monitor_command, flash_erase_command): Constify.
753         * regcache.c (reg_flush_command): Constify.
754         * reverse.c (reverse_step, reverse_next, reverse_stepi)
755         (reverse_nexti, reverse_continue, reverse_finish)
756         (save_bookmark_command, goto_bookmark_command)
757         (exec_reverse_once): Constify.
758         * python/python.c (python_interactive_command, python_command):
759         Constify.
760         * typeprint.c (ptype_command, whatis_command, whatis_exp):
761         Constify.
762         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
763         * gcore.c (gcore_command): Constify.
764
765 2017-11-07  Tom Tromey  <tom@tromey.com>
766
767         * printcmd.c (x_command): Call set_repeat_arguments.
768         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
769         * top.c (repeat_arguments): New global.
770         (set_repeat_arguments): New function.
771         (execute_command): Handle repeat_arguments.
772         (show_commands): Calls set_repeat_arguments.
773         * command.h (set_repeat_arguments): Declare.
774
775 2017-11-07  Tom Tromey  <tom@tromey.com>
776
777         * stack.c (backtrace_command): Use std::string.
778         (backtrace_command_1): Make "count_exp" const.
779
780 2017-11-07  Tom Tromey  <tom@tromey.com>
781
782         * source.c (directory_switch, mod_path, add_path): Constify.
783         * defs.h (add_path, mod_path, directory_switch): Constify.
784         * mi/mi-cmd-env.c (env_mod_path): Constify.
785
786 2017-11-07  Tom Tromey  <tom@tromey.com>
787
788         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
789         (run_command_1, continue_command, step_1, jump_command)
790         (signal_command, until_command, advance_command, finish_command)
791         (attach_command): Update.
792
793 2017-11-07  Tom Tromey  <tom@tromey.com>
794
795         * command.h (set_cmd_cfunc): Don't declare.
796         * cli/cli-decode.c (set_cmd_cfunc): Now static.
797
798 2017-11-07  Tom Tromey  <tom@tromey.com>
799
800         * stack.c (select_frame_command): Constify.
801         * cli/cli-decode.c (add_com_suppress_notification): Constify.
802         * command.h (add_com_suppress_notification): Constify.
803
804 2017-11-07  Tom Tromey  <tom@tromey.com>
805
806         * breakpoint.c (stop_command): Constify.
807         * cli/cli-decode.c (struct cmd_list_element): Constify.
808         * command.h (add_abbrev_prefix_cmd): Constify.
809
810 2017-11-07  Pedro Alves  <palves@redhat.com>
811
812         * breakpoint.c (extract_bp_kind): New enum.
813         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
814         factored out from ...
815         (extract_bp_number_and_location): ... here.
816         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
817
818 2017-11-07  Pedro Alves  <palves@redhat.com>
819
820         * breakpoint.c (extract_bp_number_and_location): Change return
821         type to void.  Throw error instead of warning.
822         (enable_disable_command): Adjust.
823
824 2017-11-07  Xavier Roirand  <roirand@adacore.com>
825             Pedro Alves  <palves@redhat.com>
826
827         * breakpoint.c (map_breakpoint_number_range): New, factored out
828         from ...
829         (map_breakpoint_numbers): ... here.
830         (find_location_by_number): Change parameters from string to
831         breakpoint number and location.
832         (extract_bp_number_and_location): New function.
833         (enable_disable_bp_num_loc)
834         (enable_disable_breakpoint_location_range)
835         (enable_disable_command): New functions, factored out ...
836         (enable_command, disable_command): ... these functions, and
837         adjusted to support ranges.
838         * NEWS: Document enable/disable breakpoint location range feature.
839
840 2017-11-06  Luis Machado  <luis.machado@linaro.org>
841
842         * MAINTAINERS (Write After Approval): Update my e-mail address.
843
844 2017-11-06  Pedro Alves  <palves@redhat.com>
845
846         * gnu-nat.c (gnu_terminal_init): Delete.
847         (gnu_target): Don't install gnu_terminal_init.
848         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
849         (child_terminal_init): ... this function.
850
851 2017-11-06  Pedro Alves  <palves@redhat.com>
852
853         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
854         sgtty.h.
855         * config.in, configure: Regenerate.
856
857 2017-11-06  Pedro Alves  <palves@redhat.com>
858
859         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
860         (async_init_signals): Adjust.
861         (handle_stop_sig): Rename to ...
862         (handle_sigtstp): ... this.
863         (async_stop_sig): Rename to ...
864         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
865         SIGTSTP path.
866         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
867         instead of STOP_SIGNAL thoughout.
868         (handle_stop_sig): Rename to ...
869         (handle_sigtstp): ... this.
870         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
871
872 2017-11-06  Pedro Alves  <palves@redhat.com>
873
874         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
875         longer set flags twice in row.
876
877 2017-11-06  Pedro Alves  <palves@redhat.com>
878
879         * Makefile.in (SER_HARDWIRE): Update comment.
880         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
881         * common/gdb_termios.h: Delete file.
882         * common/job-control.c: Include termios.h and unistd.h instead of
883         gdb_termios.h.
884         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
885         check.
886         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
887         Remove sgtty code.
888         * configure.ac: No longer check for termio.h and sgtty.h.
889         * configure: Regenerate.
890         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
891         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
892         Replace PROCESS_GROUP_TYPE references with pid_t references
893         throughout.
894         (gdb_getpgrp): Delete.
895         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
896         (child_terminal_inferior): Remove comment.  Remove sgtty code.
897         (child_terminal_ours_1): Use tcgetpgrp directly instead of
898         gdb_getpgrp.  Use serial_set_tty_state instead aof
899         serial_noflush_set_tty_state.  Remove sgtty code.
900         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
901         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
902         (inferior_process_group): Now returns pid_t.
903         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
904         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
905         * ser-event.c (serial_event_ops): Update.
906         * ser-go32.c (dos_noflush_set_tty_state): Delete.
907         (dos_ops): Update.
908         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
909         * ser-pipe.c (pipe_ops): Update.
910         * ser-tcp.c (tcp_ops): Update.
911         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
912         HAVE_TERMIOS checks.
913         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
914         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
915         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
916         assume termios.
917         (hardwire_noflush_set_tty_state): Delete.
918         (hardwire_print_tty_state, hardwire_drain_output)
919         (hardwire_flush_output, hardwire_flush_input)
920         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
921         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
922         code, and assume termios.
923         (hardwire_ops): Update.
924         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
925         * serial.c (serial_noflush_set_tty_state): Delete.
926         * serial.h (serial_noflush_set_tty_state): Delete.
927         (serial_ops::noflush_set_tty_state): Delete.
928
929 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
930
931         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
932         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
933         (COMMON_OBS): Remove doublest.o and dfp.o.
934         Do not build target-float.c (instead of doublest.c)
935         with -Wformat-nonliteral.
936
937         * doublest.c: Remove file.
938         * doublest.h: Remove file.
939         * dfp.c: Remove file.
940         * dfp.h: Remove file.
941
942         * target-float.c: Do not include "doublest.h" and "dfp.h".
943         (DOUBLEST): Move here from doublest.h.
944         (enum float_kind): Likewise.
945         (FLOATFORMAT_CHAR_BIT): Likewise.
946         (FLOATFORMAT_LARGEST_BYTES): Likewise.
947         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
948         (floatformat_precision): Likewise.
949         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
950         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
951         Likewise.
952         (host_float_format, host_double_format, host_long_double_format):
953         Likewise.
954         (floatformat_to_string, floatformat_from_string): Likewise.
955         (floatformat_to_doublest): Likewise.  Also, inline the original
956         convert_floatformat_to_doublest.
957         (floatformat_from_doublest): Likewise.  Also, inline the original
958         convert_floatformat_from_doublest.
959
960         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
961         (MAX_DECIMAL_STRING): Move here from dfp.c.
962         (match_endianness): Likewise.
963         (set_decnumber_context, decimal_check_errors): Likewise.
964         (decimal_from_number, decimal_to_number): Likewise.
965         (decimal_to_string, decimal_from_string): Likewise.  Make static.
966         (decimal_from_longest, decimal_from_ulongest): Likewise.
967         (decimal_to_longest): Likewise.
968         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
969         (decimal_convert): Likewise.
970
971 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
972
973         * doublest.c: Do not include "gdbtypes.h".
974         (extract_typed_floating): Remove.
975         (store_typed_floating): Remove.
976         (convert_typed_floating): Remove.
977         * doublest.h (struct type): Remove.
978         (DOUBLEST_PRINT_FORMAT): Remove.
979         (DOUBLEST_SCAN_FORMAT): Remove.
980         (extract_typed_floating): Remove.
981         (store_typed_floating): Remove.
982         (convert_typed_floating): Remove.
983
984         * dfp.c (decimal_from_doublest): Remove.
985         (decimal_to_doublest): Remove.
986         * dfp.h: Do not include "doublest.h".
987         (decimal_from_doublest): Remove.
988         (decimal_to_doublest): Remove.
989
990         * value.c: Do not include "doublest.h" and "dfp.h".
991         (value_as_double): Remove.
992         (unpack_double): Remove.
993         (value_from_double): Remove.
994         (value_from_decfloat): Remove.
995         * value.h: Do not include "doublest.h".
996         (value_as_double): Remove.
997         (unpack_double): Remove.
998         (value_from_double): Remove.
999         (value_from_decfloat): Remove.
1000
1001 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1002
1003         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1004         (i386_extract_return_value): Use target_float_convert.
1005         (i386_store_return_value): Likewise.
1006         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1007         (i387_value_to_register): Likewise.
1008         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1009         (ia64_register_to_value): Use target_float_convert.
1010         (ia64_value_to_register): Likewise.
1011         (ia64_extract_return_value): Likewise.
1012         (ia64_store_return_value): Likewise.
1013         (ia64_push_dummy_call): Likewise.
1014         * m68k-tdep.c: Include "target-float.h".
1015         (m68k_register_to_value): Use target_float_convert.
1016         (m68k_value_to_register): Likewise.
1017         (m68k_svr4_extract_return_value): Likewise.
1018         (m68k_svr4_store_return_value): Likewise.
1019         * ppc-sysv-tdep.c: Include "target-float.h".
1020         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1021         (do_ppc_sysv_return_value): Likewise.
1022         (ppc64_sysv_abi_push_freg): Likewise.
1023         (ppc64_sysv_abi_return_value_base): Likewise.
1024         * rs6000-aix-tdep.c: Include "target-float.h".
1025         (rs6000_push_dummy_call): Use target_float_convert.
1026         (rs6000_return_value): Likewise.
1027         * rs6000-lynx178-tdep.c: Include "target-float.h".
1028         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1029         (rs6000_lynx178_return_value): Likewise.
1030         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1031         (rs6000_register_to_value): Use target_float_convert.
1032         (rs6000_value_to_register): Likewise.
1033         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1034         (arm_extract_return_value): Use target_float_convert.
1035         (arm_store_return_value): Likewise.
1036         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1037         (sh_register_convert_to_virtual): Use target_float_convert.
1038         (sh_register_convert_to_raw): Likewise.
1039         * sh64-tdep.c: Include "target-float.h".
1040         (sh64_extract_return_value): Use target_float_convert.
1041         (sh64_register_convert_to_virtual): Likewise.
1042         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
1043
1044 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1045
1046         * target-float.c (floatformat_to_host_double): New function.
1047         (floatformat_from_host_double): Likewise.
1048         (target_float_to_host_double): Likewise.
1049         (target_float_from_host_double): Likewise.
1050         * target-float.h (target_float_to_host_double): Add prototype.
1051         (target_float_from_host_double): Likewise.
1052
1053         * guile/scm-value.c: Include "target-float.h".
1054         (gdbscm_value_to_real): Use target_float_to_host_double.
1055         Handle integer source values via value_as_long.
1056         * guile/scm-math.c: Include "target-float.h".  Do not include
1057         "doublest.h", "dfp.h", and "expression.h".
1058         (vlscm_convert_typed_number): Use target_float_from_host_double.
1059         (vlscm_convert_number): Likewise.
1060
1061         * python/py-value.c (valpy_float): Use target_float_to_host_double.
1062         (convert_value_from_python): Use target_float_from_host_double.
1063
1064 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1065
1066         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1067         (cast_from_fixed): Likewise.
1068         (ada_scaling_type): New function.
1069         (ada_delta): Return value instead of DOUBLEST.  Perform target
1070         arithmetic instead of host arithmetic.
1071         (scaling_factor): Rename to ...
1072         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
1073         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
1074         (ada_fixed_to_float): Remove.
1075         (ada_float_to_fixed): Remove.
1076         * ada-lang.h (ada_fixed_to_float): Remove.
1077         (ada_float_to_fixed): Remove.
1078         (ada_delta): Return value instead of DOUBLEST.
1079         (ada_scaling_factor): Add prototype.
1080
1081         * ada-typeprint.c: Include "target-float.h".
1082         (print_fixed_point_type): Perform target arithmetic instead of
1083         host arithmetic.
1084         * ada-valprint.c: Include "target-float.h".
1085         (ada_val_print_num): Perform target arithmetic instead of
1086         host arithmetic for fixed-point types.
1087
1088 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1089
1090         * target-float.c: Include <math.h>.
1091         (floatformat_binop): New function.
1092         (floatformat_compare): Likewise.
1093         (target_float_binop): Likewise.
1094         (target_float_compare): Likewise.
1095         * target-float.h: Include "expression.h".
1096         (target_float_binop): Add prototype.
1097         (target_float_compare): Likewise.
1098
1099         * valarith.c: Do not include "doublest.h" and "dfp.h".
1100         Include "common/byte-vector.h".
1101         (value_args_as_decimal): Remove, replace by ...
1102         (value_args_as_target_float): ... this function.  Handle both
1103         binary and decimal target floating-point formats.
1104         (scalar_binop): Handle both binary and decimal FP using
1105         value_args_as_target_float and target_float_binop.
1106         (value_equal): Handle both binary and decimal FP using
1107         value_args_as_target_float and target_float_compare.
1108         (value_less): Likewise.
1109         (value_pos): Handle all scalar types as simple copy.
1110         (value_neg): Handle all scalar types via BINOP_SUB from 0.
1111         * dfp.c (decimal_binop): Throw error instead of internal_error
1112         when called with an unsupported operation code.
1113
1114 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1115
1116         * target-float.c (target_float_to_string): New function.
1117         (target_float_from_string): New function.
1118         * target-float.h (target_float_to_string): Add prototype.
1119         (target_float_from_string): Add prototype.
1120
1121         * valprint.c: Include "target-float.h".  Do not include
1122         "doublest.h" and "dfp.h".
1123         (print_floating): Use target_float_to_string.
1124         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
1125         (printf_floating): Use target_float_to_string.
1126         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1127         (print_i387_value): Use target_float_to_string.
1128         * mips-tdep.c: Include "target-float.h".
1129         (mips_print_fp_register): Use target_float_to_string.
1130         * sh64-tdep.c: Include "target-float.h".
1131         (sh64_do_fp_register): Use target_float_to_string.
1132
1133         * parse.c: Include "target-float.h".  Do not include
1134         "doublest.h" and "dfp.h".
1135         (parse_float): Use target_float_from_string.
1136         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
1137         (define_symbol): Use target_float_from_string.
1138         * gdbarch-selftests.c: Include "target-float.h".
1139         (register_to_value_test): Use target_float_from_string.
1140
1141 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1142
1143         * Makefile.c (SFILES): Add target-float.c.
1144         (HFILES_NO_SRCDIR): Add target-float.h.
1145         (COMMON_OBS): Add target-float.o.
1146         * target-float.h: New file.
1147         * target-float.c: New file.
1148
1149         * doublest.c (floatformat_classify): Fix detection of float_zero.
1150
1151         * gdbtypes.c (is_floating_type): New function.
1152         * gdbtypes.h (is_floating_type): Add prototype.
1153
1154         * value.c: Do not include "floatformat.h".
1155         (unpack_double): Use target_float_is_valid.
1156         (is_floating_value): New function.
1157         * value.h (is_floating_value): Add prototype-
1158
1159         * valarith.c: Include "target-float.h".
1160         (value_logical_not): Use target_float_is_zero.
1161
1162         * python/py-value.c: Include "target-float.h".
1163         (valpy_nonzero): Use target_float_is_zero.
1164
1165 2017-11-04  Tom Tromey  <tom@tromey.com>
1166
1167         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1168
1169 2017-11-04  Tom Tromey  <tom@tromey.com>
1170
1171         * breakpoint.c (set_momentary_breakpoint): Return
1172         breakpoint_up.
1173         (until_break_command): Update.
1174         (new_until_break_fsm): Change argument types to
1175         breakpoint_up.
1176         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1177         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1178         Remove.
1179         * infcmd.c (finish_forward): Update.
1180         * breakpoint.h (set_momentary_breakpoint)
1181         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1182         (make_cleanup_delete_breakpoint): Remove.
1183         (struct breakpoint_deleter): New.
1184         (breakpoint_up): New typedef.
1185         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1186         (insert_exception_resume_breakpoint): Update.
1187         (insert_exception_resume_from_probe): Update.
1188         (insert_longjmp_resume_breakpoint): Update.
1189         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1190         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1191         * infcall.c (call_function_by_hand_dummy): Update
1192
1193 2017-11-04  Tom Tromey  <tom@tromey.com>
1194
1195         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1196
1197 2017-11-04  Tom Tromey  <tom@tromey.com>
1198
1199         * linux-tdep.c (linux_core_info_proc_mappings): Use
1200         gdb::def_vector.
1201         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
1202         "size" argument.
1203         (linux_corefile_thread): Update.
1204         (linux_make_corefile_notes): Remove unused variable.
1205
1206 2017-11-04  Tom Tromey  <tom@tromey.com>
1207
1208         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1209         gdb::byte_vector.
1210
1211 2017-11-04  Tom Tromey  <tom@tromey.com>
1212
1213         * objfiles.c (do_free_objfile_cleanup): Remove.
1214         * compile/compile-object-load.c (compile_object_load): Update.
1215         * objfiles.h (make_cleanup_free_objfile): Remove.
1216
1217 2017-11-04  Tom Tromey  <tom@tromey.com>
1218
1219         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1220         (adi_read_versions): Change "tags" to "gdb_byte *".
1221         (adi_print_versions): Likewise.
1222
1223 2017-11-04  Tom Tromey  <tom@tromey.com>
1224
1225         * breakpoint.c
1226         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1227         from start_rbreak_breakpoints.
1228         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1229         * breakpoint.h (class scoped_rbreak_breakpoints): New.
1230         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1231         * symtab.c (do_end_rbreak_breakpoints): Remove.
1232         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1233
1234 2017-11-04  Tom Tromey  <tom@tromey.com>
1235
1236         * cp-namespace.c (reset_directive_searched): Remove.
1237         (cp_lookup_symbol_via_imports): Use scoped_restore.
1238         * cp-support.c (reset_directive_searched): Remove.
1239         (make_symbol_overload_list_using): Use scoped_restore.
1240         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1241         (reset_directive_searched): Remove.
1242
1243 2017-11-04  Tom Tromey  <tom@tromey.com>
1244
1245         * symfile.c (find_separate_debug_file_by_debuglink): Use
1246         unique_xmalloc_ptr.
1247
1248 2017-11-04  Tom Tromey  <tom@tromey.com>
1249
1250         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1251         type of "info".
1252         (compute_stack_depth): Likewise.
1253         (do_compile_dwarf_expr_to_c): Use std::vector.
1254
1255 2017-11-04  Tom Tromey  <tom@tromey.com>
1256
1257         * compile/compile-object-load.c (link_callbacks_einfo): Use
1258         std::string.
1259
1260 2017-11-04  Tom Tromey  <tom@tromey.com>
1261
1262         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1263         Use scoped_free_pendings.
1264         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1265         scoped_free_pendings.
1266         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1267         (xcoff_initial_scan): Likewise.
1268         * buildsym.c (reset_symtab_globals): Update comment.
1269         (scoped_free_pendings): Rename from really_free_pendings.
1270         (prepare_for_building): Update comment.
1271         (buildsym_init): Likewise.
1272         * buildsym.h (class scoped_free_pendings): New class.
1273         (really_free_pendings): Don't declare.
1274
1275 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
1276
1277         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1278         output when converting a zero value to a special byteorder format.
1279
1280 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1281
1282         * frame.c (do_frame_register_read): Remove aspace.
1283         * jit.c (jit_frame_sniffer): Likwise.
1284         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1285         * regcache.c (regcache::regcache): Pass nullptr.
1286         (regcache_print): Caller updated.
1287         * regcache.h (regcache::regcache): Remove one constructor
1288         parameter aspace.
1289
1290 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1291
1292         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1293
1294 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1295
1296         * breakpoint.c (insert_single_step_breakpoints): Update.
1297         * frame.c (struct frame_info) <aspace>: Add const.
1298         (frame_save_as_regcache): Add const.
1299         (get_frame_address_space): Return const address_space *.
1300         * frame.h (get_frame_address_space): Update declaration.
1301         * infrun.c (struct step_over_info) <aspace>: Add const.
1302         (set_step_over_info): Make aspace const.
1303         (displaced_step_prepare_throw): Change variable const.
1304         (resume): Likewise.
1305         (proceed): Likewise.
1306         (adjust_pc_after_break): Likewise.
1307         (save_waitstatus): Likewise.
1308         (handle_signal_stop): Likewise.
1309         (keep_going_pass_signal): Likewise.
1310         * jit.c (jit_frame_sniffer): Add const.
1311         * mips-tdep.c (mips_single_step_through_delay): Likewise.
1312         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1313         * record-full.c (record_full_wait_1): Likewise.
1314         * regcache.c (regcache::regcache): Change parameter to const.
1315         * regcache.h (regcache::regcache): Likewise.
1316         (regcache::aspace): Return const address_space *.
1317         (regcache) <m_aspace>: Add const.
1318
1319 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1320
1321         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1322         * frame.c (create_sentinel_frame): Likewise.
1323         * infrun.c (displaced_step_prepare_throw): Likewise.
1324         (resume): Likewise.
1325         (thread_still_needs_step_over_bp): Likewise.
1326         (proceed): Likewise.
1327         (do_target_wait): Likewise.
1328         (adjust_pc_after_break): Likewise.
1329         (handle_syscall_event): Likewise.
1330         (save_waitstatus): Likewise.
1331         (handle_inferior_event_1): Likewise.
1332         (handle_signal_stop): Likewise.
1333         (keep_going_pass_signal): Likewise.
1334         * linux-nat.c (status_callback): Likewise.
1335         (save_stop_reason): Likewise.
1336         (resume_stopped_resumed_lwps): Likewise.
1337         * record-full.c (record_full_exec_insn): Likewise.
1338         (record_full_wait_1): Likewise.
1339         * regcache.c (get_regcache_aspace): Remove.
1340         * regcache.h (get_regcache_aspace): Remove.
1341
1342 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1343
1344         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1345         (init_regcache_descr): Use gdbarch_num_regs.
1346         (regcache::regcache): Likewise.
1347         (regcache::get_register_status): Likewise.
1348         (regcache::assert_raw_regnum): Likewise.
1349         (regcache::cooked_read): Likewise.
1350         (regcache::cooked_read_value): Likewise.
1351         (regcache::cooked_write): Likewise.
1352         (regcache::dump): Likewise.
1353         (regcache::num_raw_registers): New method.
1354         * regcache.h (class regcache) <num_raw_registers>: New.
1355
1356 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1357
1358         * regcache.c (regcache::assert_regnum): New method.
1359         (regcache::invalidate): Call assert_regnum.
1360         (regcache::raw_update): Likewise.
1361         (regcache::raw_write): Likewise.
1362         (regcache::raw_read_part): Likewise.
1363         (regcache::raw_write_part): Likewise.
1364         (regcache::raw_supply): Likewise.
1365         (regcache::raw_supply_integer): Likewise.
1366         (regcache::raw_supply_zeroed): Likewise.
1367         (regcache::raw_collect): Likewise.
1368         (regcache::raw_collect_integer): Likewise.
1369         * regcache.h (regcache::assert_regnum): Declare.
1370
1371 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1372
1373         * regcache.c (regcache::dump): Remove code.
1374
1375 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1376
1377         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1378         Remove.
1379         <sizeof_cooked_register_status>: Remove.
1380         (init_regcache_descr): Update.
1381         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1382         (regcache::save): Likewise.
1383         (regcache::dump): Likewise.
1384
1385 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
1386
1387         * ft32-tdep.c (ft32_fetch_instruction): New function.
1388         (ft32_analyze_prologue): Use ft32_fetch_instruction().
1389
1390 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
1391
1392         * cli/cli-script.c (execute_control_command): Rename to ...
1393         (execute_control_command_1): ... this.
1394         (execute_control_command): New function.
1395
1396 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
1397
1398         * tracepoint.c (tfind_command): Remove const_cast.
1399
1400 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
1401
1402         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1403
1404 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
1405
1406         * common/common-utils.h (in_inclusive_range): New function.
1407         * arm-tdep.c (arm_record_extension_space): Use
1408         in_inclusive_range.
1409         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1410         * cris-tdep.c (cris_spec_reg_applicable): Use
1411         in_inclusive_range.
1412
1413 2017-10-30  Pedro Alves  <palves@redhat.com>
1414             Simon Marchi <simon.marchi@ericsson.com>
1415
1416         * remote.c (remote_set_syscall_catchpoint): Build a std::string
1417         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1418
1419 2017-10-30  Pedro Alves  <palves@redhat.com>
1420
1421         * common/common-utils.c (string_appendf, string_vappendf): New
1422         functions.
1423         * common/common-utils.h (string_appendf, string_vappendf): New
1424         declarations.
1425         * unittests/common-utils-selftests.c (string_appendf_func)
1426         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1427         (string_vappendf_tests): New functions.
1428         (_initialize_common_utils_selftests): Register "string_appendf" and
1429         "string_vappendf tests".
1430
1431 2017-10-30  Pedro Alves  <palves@redhat.com>
1432
1433         * unittests/common-utils-selftests.c (format_func): New typedef.
1434         (string_printf_tests, string_vprintf_tests): Tests factored out
1435         and merged to ...
1436         (test_format_func): ... this new function.
1437         (string_printf_tests, string_vprintf_tests): Reimplement on top of
1438         test_format_func.
1439
1440 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1441
1442         * darwin-nat.c: Remove include of gdb.h.
1443
1444 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1445
1446         * xtensa-xtregs.c: Fix formatting issues.
1447
1448 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1449
1450         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1451
1452 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
1453
1454         PR python/21213
1455         * python/py-infthread.c (thpy_get_inferior): Increment reference
1456         of inferior before returning it.
1457
1458 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1459
1460         * unittests/common-utils-selftests.c (format): Add
1461         ATTRIBUTE_PRINTF.
1462
1463 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1464
1465         * xml-syscall.c (struct syscall_desc): Add constructor.
1466         <name>: Change type to std::string.
1467         (syscall_desc_up): New typedef.
1468         (syscall_desc_p): Remove typeder.
1469         (DEF_VEC_P(syscall_desc_p)): Remove.
1470         (struct syscall_group_desc): Add constructor.
1471         <name>: Change type to std::string.
1472         <syscalls>: Change type to std::vector.
1473         (syscall_group_desc_up): New typedef.
1474         (syscall_group_desc_p): Remove typedef.
1475         (DEF_VEC_P(syscall_group_desc_p)): Remove.
1476         (struct syscalls_info) <syscalls>: Change type to std::vector of
1477         unique_ptr.
1478         <groups>: Likewise.
1479         <my_gdb_datadir>: Change type to std::string.
1480         (syscalls_info_up): New typedef.
1481         (allocate_syscalls_info): Remove.
1482         (syscalls_info_free_syscalls_desc): Remove.
1483         (syscalls_info_free_syscall_group_desc): Remove.
1484         (free_syscalls_info): Remove.
1485         (make_cleanup_free_syscalls_info): Remove.
1486         (syscall_group_create_syscall_group_desc): Adjust.
1487         (syscall_group_add_syscall): Adjust.
1488         (syscall_create_syscall_desc): Adjust.
1489         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1490         (init_syscalls_info): Adjust.
1491         (syscall_group_get_group_by_name): Adjust.
1492         (xml_get_syscall_number): Adjust.
1493         (xml_get_syscall_name): Adjust.
1494         (xml_list_of_syscalls): Adjust.
1495         (xml_list_syscalls_by_group): Adjust.
1496         (xml_list_of_groups): Adjust.
1497
1498 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1499
1500         * probe.h: Don't include gdb_vecs.h.
1501         (DEF_VEC_P (probe_p)): Remove.
1502         (find_probes_in_objfile): Return an std::vector.
1503         * probe.c (find_probes_in_objfile): Likewise.
1504         * breakpoint.c (breakpoint_objfile_data)
1505         <longjmp_probes>: Change type to std::vector.
1506         <exception_probes>: Likewise.
1507         (free_breakpoint_probes): Don't manually free vectors.
1508         (create_longjmp_master_breakpoint): Adjust.
1509         (create_exception_master_breakpoint): Adjust.
1510         * solib-svr4.c (svr4_create_probe_breakpoints): Change
1511         parameter type, adjust.
1512         (svr4_create_solib_event_breakpoints): Adjust.
1513
1514 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1515
1516         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1517         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1518         with new.
1519         (free_breakpoint_probes): Rename to ...
1520         (free_breakpoint_objfile_data): ... this, and call delete on
1521         bp_objfile_data..
1522
1523 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1524
1525         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1526         (loaded_script_ptr): Remove typedef.
1527         (DEF_VEC_P (loaded_script_ptr)): Remove.
1528         (struct collect_matching_scripts_data): Add constructor.
1529         <scripts_p>: Change type to (pointer to) std::vector.
1530         (collect_matching_scripts_data): Adjust.
1531         (sort_scripts_by_name): Make suitable for std::sort.
1532         (print_scripts): Don't sort vector, adjust to std::vector.
1533         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1534
1535 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1536
1537         * symfile.c (filename_language): Make struct, not typedef.  Add
1538         constructor.
1539         <ext>: Change type to std::string.
1540         (DEF_VEC_O (filename_language)): Remove.
1541         (filename_language_table): Change type to std::vector.
1542         (add_filename_language): Adjust.
1543         (set_ext_lang_command): Adjust.
1544         (info_ext_lang_command): Adjust.
1545         (deduce_language_from_filename): Adjust.
1546         (class scoped_restore_filename_language_table): Remove.
1547         (test_filename_language): Use scoped_restore.
1548         (test_set_ext_lang_command): Use scoped_restore, adjust to
1549         std::vector change.
1550
1551 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1552
1553         * symfile.c: Include selftest.h.
1554         (class scoped_restore_filename_language_table): New.
1555         (test_filename_language): New test.
1556         (test_set_ext_lang_command): New test.
1557         (_initialize_symfile): Register tests.
1558
1559 2017-10-27  Keith Seitz  <keiths@redhat.com>
1560
1561         * breakpoint.c (print_breakpoint_location): Use the symbol saved
1562         in the bp_location, falling back to find_pc_sect_function when
1563         needed.
1564         (add_location_to_breakpoint): Save sal->symbol.
1565         * breakpoint.h (struct bp_location) <symbol>: New field.
1566         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1567         * symtab.h (struct symtab_and_line) <symbol>: New field.
1568
1569 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
1570
1571         PR gdb/13669
1572         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1573         to rewind obstack.
1574
1575 2017-10-26  Pedro Alves  <palves@redhat.com>
1576
1577         * remote.c (remote_async_terminal_ours_p): Delete.
1578         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1579         Remove references to 'remote_async_terminal_ours_p'.
1580
1581 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1582
1583         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1584
1585 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1586
1587         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1588         aspace const.
1589         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1590         Likewise.
1591         * breakpoint.c (bpstat_check_location): Remove cast.
1592         (breakpoint_hit_catch_fork): Make aspce const.
1593         (breakpoint_hit_catch_solib): Likewise.
1594         (breakpoint_hit_catch_exec): Likewise.
1595         (breakpoint_hit_ranged_breakpoint): Likewise.
1596         (breakpoint_hit_watchpoint): Likewise.
1597         (base_breakpoint_breakpoint_hit): Likewise.
1598         (bkpt_breakpoint_hit): Likewise.
1599         (dprintf_breakpoint_hit): Likewise.
1600         (tracepoint_breakpoint_hit): Likewise.
1601         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1602
1603 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1604
1605         * breakpoint.c (breakpoint_location_address_match): Change
1606         "struct address_space *" to "const address_space".
1607         (breakpoint_location_address_range_overlap): Likewise.
1608         (breakpoint_here_p): Likewise.
1609         (breakpoint_in_range_p): Likewise.
1610         (moribund_breakpoint_here_p): Likewise.
1611         (bp_location_inserted_here_p): Likewise.
1612         (software_breakpoint_inserted_here_p): Likewise.
1613         (hardware_breakpoint_inserted_here_p): Likewise.
1614         (hardware_watchpoint_inserted_in_range): Likewise.
1615         (bpstat_check_location): Likewise.
1616         (bpstat_stop_status): Likewise.
1617         (breakpoint_address_match): Likewise.
1618         (breakpoint_address_match_range): Likewise.
1619         (breakpoint_location_address_match): Likewise.
1620         (breakpoint_location_address_range_overlap): Likewise.
1621         (insert_single_step_breakpoint): Likewise.
1622         (breakpoint_has_location_inserted_here): Likewise.
1623         (single_step_breakpoint_inserted_here_p): Likewise.
1624         (pc_at_non_inline_function): Likewise.
1625         * breakpoint.h (bpstat_stop_status): Update declaration.
1626         (breakpoint_here_p): Likewise.
1627         (breakpoint_in_range_p): Likewise.
1628         (moribund_breakpoint_here_p): Likewise.
1629         (breakpoint_inserted_here_p): Likewise.
1630         (software_breakpoint_inserted_here_p): Likewise.
1631         (hardware_breakpoint_inserted_here_p): Likewise.
1632         (breakpoint_has_location_inserted_here): Likewise.
1633         (single_step_breakpoint_inserted_here_p): Likewise.
1634         (hardware_watchpoint_inserted_in_range): Likewise.
1635         (breakpoint_address_match): Likewise.
1636         (insert_single_step_breakpoint): Likewise.
1637         (pc_at_non_inline_function): Likewise.
1638         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1639         * record.c (record_check_stopped_by_breakpoint): Likewise.
1640         * record.h (record_check_stopped_by_breakpoint): Likewise.
1641         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1642
1643 2017-10-25  Yao Qi  <yao.qi@linaro.org>
1644
1645         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1646         regcache->arch () instead get_regcache_arch.
1647         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1648         Likewise.
1649         (aarch64_fbsd_store_inferior_registers): Likewise.
1650         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1651         (store_gregs_to_thread): Likewise.
1652         (fetch_fpregs_from_thread): Likewise.
1653         (store_fpregs_to_thread): Likewise.
1654         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1655         (aarch64_store_return_value): Likewise.
1656         (aarch64_software_single_step): Likewise.
1657         * aix-thread.c (aix_thread_wait): Likewise.
1658         (supply_reg32): Likewise.
1659         (supply_sprs64): Likewise.
1660         (supply_sprs32): Likewise.
1661         (fill_gprs64): Likewise.
1662         (fill_gprs32): Likewise.
1663         (fill_sprs64): Likewise.
1664         (fill_sprs32): Likewise.
1665         (store_regs_user_thread): Likewise.
1666         (store_regs_kernel_thread): Likewise.
1667         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1668         (alphabsd_store_inferior_registers): Likewise.
1669         * alpha-tdep.c (alpha_extract_return_value): Likewise.
1670         (alpha_store_return_value): Likewise.
1671         (alpha_deal_with_atomic_sequence): Likewise.
1672         (alpha_next_pc): Likewise.
1673         (alpha_software_single_step): Likewise.
1674         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1675         (amd64bsd_store_inferior_registers): Likewise.
1676         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1677         Likewise.
1678         (amd64_linux_store_inferior_registers): Likewise.
1679         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1680         (amd64_collect_native_gregset): Likewise.
1681         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1682         (amd64obsd_collect_uthread): Likewise.
1683         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1684         (amd64_collect_fpregset): Likewise.
1685         (amd64_supply_fxsave): Likewise.
1686         (amd64_supply_xsave): Likewise.
1687         (amd64_collect_fxsave): Likewise.
1688         (amd64_collect_xsave): Likewise.
1689         * arc-tdep.c (arc_write_pc): Likewise.
1690         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1691         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1692         (arm_fbsd_store_inferior_registers): Likewise.
1693         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1694         (store_vfp_regs): Likewise.
1695         (arm_linux_fetch_inferior_registers): Likewise.
1696         (arm_linux_store_inferior_registers): Likewise.
1697         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1698         (arm_linux_sigreturn_next_pc): Likewise.
1699         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1700         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1701         (fetch_register): Likewise.
1702         (store_register): Likewise.
1703         * arm-tdep.c (arm_is_thumb): Likewise.
1704         (displaced_in_arm_mode): Likewise.
1705         (bx_write_pc): Likewise.
1706         (arm_get_next_pcs_addr_bits_remove): Likewise.
1707         (arm_software_single_step): Likewise.
1708         (arm_extract_return_value): Likewise.
1709         (arm_store_return_value): Likewise.
1710         (arm_write_pc): Likewise.
1711         * bfin-tdep.c (bfin_extract_return_value): Likewise.
1712         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
1713         (bsd_uthread_store_registers): Likewise.
1714         * core-regset.c (fetch_core_registers): Likewise.
1715         * corelow.c (get_core_registers): Likewise.
1716         * cris-tdep.c (cris_store_return_value): Likewise.
1717         (cris_extract_return_value): Likewise.
1718         (find_step_target): Likewise.
1719         (find_step_target): Likewise.
1720         (cris_software_single_step): Likewise.
1721         * ctf.c (ctf_fetch_registers): Likewise.
1722         * darwin-nat.c (cancel_breakpoint): Likewise.
1723         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
1724         * frv-tdep.c (frv_extract_return_value): Likewise.
1725         * ft32-tdep.c (ft32_store_return_value): Likewise.
1726         (ft32_extract_return_value): Likewise.
1727         * go32-nat.c (fetch_register): Likewise.
1728         (go32_fetch_registers): Likewise.
1729         (go32_store_registers): Likewise.
1730         (store_register): Likewise.
1731         * h8300-tdep.c (h8300_extract_return_value): Likewise.
1732         (h8300_store_return_value): Likewise.
1733         * hppa-linux-nat.c (fetch_register): Likewise.
1734         (store_register): Likewise.
1735         (hppa_linux_fetch_inferior_registers): Likewise.
1736         (hppa_linux_store_inferior_registers): Likewise.
1737         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
1738         (i386_darwin_store_inferior_registers): Likewise.
1739         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
1740         (gnu_store_registers): Likewise.
1741         * i386-linux-nat.c (fetch_register): Likewise.
1742         (store_register): Likewise.
1743         (supply_gregset): Likewise.
1744         (fill_gregset): Likewise.
1745         (i386_linux_fetch_inferior_registers): Likewise.
1746         (i386_linux_store_inferior_registers): Likewise.
1747         (i386_linux_resume): Likewise.
1748         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
1749         Likewise.
1750         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
1751         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
1752         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
1753         (i386obsd_collect_uthread): Likewise.
1754         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1755         (i386_supply_gregset): Likewise.
1756         (i386_collect_gregset): Likewise.
1757         (i386_supply_fpregset): Likewise.
1758         (i386_collect_fpregset): Likewise.
1759         (i386_mpx_bd_base): Likewise.
1760         * i386-v4-nat.c (supply_fpregset): Likewise.
1761         (fill_fpregset): Likewise.
1762         * i387-tdep.c (i387_supply_fsave): Likewise.
1763         (i387_collect_fsave): Likewise.
1764         (i387_supply_fxsave): Likewise.
1765         (i387_collect_fxsave): Likewise.
1766         (i387_supply_xsave): Likewise.
1767         (i387_collect_xsave): Likewise.
1768         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
1769         (ia64_linux_store_registers): Likewise.
1770         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
1771         (ia64_extract_return_value): Likewise.
1772         (ia64_store_return_value): Likewise.
1773         (find_func_descr): Likewise.
1774         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
1775         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
1776         (inf_ptrace_store_registers): Likewise.
1777         * infrun.c (use_displaced_stepping): Likewise.
1778         (displaced_step_prepare_throw): Likewise.
1779         (resume): Likewise.
1780         (proceed): Likewise.
1781         (do_target_wait): Likewise.
1782         (adjust_pc_after_break): Likewise.
1783         (handle_inferior_event_1): Likewise.
1784         (handle_signal_stop): Likewise.
1785         (save_infcall_suspend_state): Likewise.
1786         (restore_infcall_suspend_state): Likewise.
1787         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
1788         * jit.c (jit_frame_prev_register): Likewise.
1789         * linux-nat.c (save_stop_reason): Likewise.
1790         (linux_nat_wait_1): Likewise.
1791         (resume_stopped_resumed_lwps): Likewise.
1792         * linux-record.c (record_linux_sockaddr): Likewise.
1793         (record_linux_msghdr): Likewise.
1794         (record_linux_system_call): Likewise.
1795         * linux-tdep.c (linux_collect_thread_registers): Likewise.
1796         * lm32-tdep.c (lm32_extract_return_value): Likewise.
1797         (lm32_store_return_value): Likewise.
1798         * m32c-tdep.c (m32c_read_flg): Likewise.
1799         (m32c_pseudo_register_read): Likewise.
1800         (m32c_pseudo_register_write): Likewise.
1801         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
1802         (m32r_linux_collect_gregset): Likewise.
1803         * m32r-tdep.c (m32r_store_return_value): Likewise.
1804         (m32r_extract_return_value): Likewise.
1805         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1806         (m68kbsd_collect_fpregset): Likewise.
1807         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
1808         * m68k-linux-nat.c (fetch_register): Likewise.
1809         (old_fetch_inferior_registers): Likewise.
1810         (old_store_inferior_registers): Likewise.
1811         (store_regs): Likewise.
1812         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
1813         (m68k_svr4_store_return_value): Likewise.
1814         * m88k-tdep.c (m88k_store_arguments): Likewise.
1815         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
1816         (mi_cmd_data_write_register_values): Likewise.
1817         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
1818         (mips_fbsd_store_inferior_registers): Likewise.
1819         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
1820         (mips_fbsd_supply_gregs): Likewise.
1821         (mips_fbsd_collect_fpregs): Likewise.
1822         (mips_fbsd_collect_gregs): Likewise.
1823         (mips_fbsd_supply_fpregset): Likewise.
1824         (mips_fbsd_collect_fpregset): Likewise.
1825         (mips_fbsd_supply_gregset): Likewise.
1826         (mips_fbsd_collect_gregset): Likewise.
1827         * mips-linux-nat.c (supply_gregset): Likewise.
1828         (fill_gregset): Likewise.
1829         (supply_fpregset): Likewise.
1830         (fill_fpregset): Likewise.
1831         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
1832         (mips_fill_gregset): Likewise.
1833         (mips_supply_fpregset): Likewise.
1834         (mips_fill_fpregset): Likewise.
1835         (mips64_supply_gregset): Likewise.
1836         (micromips_linux_sigframe_validate): Likewise.
1837         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
1838         (mipsnbsd_fetch_inferior_registers): Likewise.
1839         (mipsnbsd_store_inferior_registers): Likewise.
1840         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1841         (mipsnbsd_supply_gregset): Likewise.
1842         (mipsnbsd_iterate_over_regset_sections): Likewise.
1843         (mipsnbsd_supply_reg): Likewise.
1844         (mipsnbsd_supply_fpreg): Likewise.
1845         * mips-tdep.c (mips_in_frame_stub): Likewise.
1846         (mips_dummy_id): Likewise.
1847         (is_octeon_bbit_op): Likewise.
1848         (micromips_bc1_pc): Likewise.
1849         (extended_mips16_next_pc): Likewise.
1850         (mips16_next_pc): Likewise.
1851         (deal_with_atomic_sequence): Likewise.
1852         * moxie-tdep.c (moxie_process_readu): Likewise.
1853         * nios2-tdep.c (nios2_get_next_pc): Likewise.
1854         * nto-procfs.c (procfs_store_registers): Likewise.
1855         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
1856         (ppcfbsd_store_inferior_registers): Likewise.
1857         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
1858         (fetch_altivec_register): Likewise.
1859         (get_spe_registers): Likewise.
1860         (fetch_spe_register): Likewise.
1861         (fetch_altivec_registers): Likewise.
1862         (fetch_all_gp_regs): Likewise.
1863         (fetch_all_fp_regs): Likewise.
1864         (store_vsx_register): Likewise.
1865         (store_altivec_register): Likewise.
1866         (set_spe_registers): Likewise.
1867         (store_spe_register): Likewise.
1868         (store_altivec_registers): Likewise.
1869         (store_all_gp_regs): Likewise.
1870         (store_all_fp_regs): Likewise.
1871         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
1872         (ppc_linux_collect_gregset): Likewise.
1873         (ppc_canonicalize_syscall): Likewise.
1874         (ppc_linux_record_signal): Likewise.
1875         (ppu2spu_prev_register): Likewise.
1876         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
1877         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
1878         (ppcobsd_store_registers): Likewise.
1879         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
1880         Likewise.
1881         (ppc_ravenscar_generic_store_registers): Likewise.
1882         * procfs.c (procfs_fetch_registers): Likewise.
1883         (procfs_store_registers): Likewise.
1884         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
1885         (ravenscar_store_registers): Likewise.
1886         (ravenscar_prepare_to_store): Likewise.
1887         * record-btrace.c (record_btrace_fetch_registers): Likewise.
1888         * record-full.c (record_full_wait_1): Likewise.
1889         (record_full_registers_change): Likewise.
1890         (record_full_store_registers): Likewise.
1891         (record_full_core_fetch_registers): Likewise.
1892         (record_full_save): Likewise.
1893         (record_full_goto_insn): Likewise.
1894         * regcache.c (regcache_register_size): Likewise.
1895         (get_regcache_arch): Remove.
1896         (regcache_read_pc): Likewise.
1897         * regcache.h (get_regcache_arch): Remove.
1898         * remote-sim.c (gdbsim_fetch_register): Likewise.
1899         (gdbsim_store_register): Likewise.
1900         * remote.c (fetch_register_using_p): Likewise.
1901         (send_g_packet): Likewise.
1902         (remote_prepare_to_store): Likewise.
1903         (store_registers_using_G): Likewise.
1904         * reverse.c (save_bookmark_command): Likewise.
1905         (goto_bookmark_command): Likewise.
1906         * rs6000-aix-tdep.c (branch_dest): Likewise.
1907         * rs6000-nat.c (rs6000_ptrace64): Likewise.
1908         (fetch_register): Likewise.
1909         * rs6000-tdep.c (ppc_supply_reg): Likewise.
1910         (ppc_collect_reg): Likewise.
1911         (ppc_collect_gregset): Likewise.
1912         (ppc_collect_fpregset): Likewise.
1913         (ppc_collect_vsxregset): Likewise.
1914         (ppc_collect_vrregset): Likewise.
1915         (ppc_displaced_step_hw_singlestep): Likewise.
1916         (rs6000_pseudo_register_read): Likewise.
1917         (rs6000_pseudo_register_write): Likewise.
1918         * s390-linux-nat.c (supply_gregset): Likewise.
1919         (fill_gregset): Likewise.
1920         (s390_linux_fetch_inferior_registers): Likewise.
1921         * s390-linux-tdep.c (s390_write_pc): Likewise.
1922         (s390_software_single_step): Likewise.
1923         (s390_all_but_pc_registers_record): Likewise.
1924         (s390_linux_syscall_record): Likewise.
1925         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
1926         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
1927         (shnbsd_store_inferior_registers): Likewise.
1928         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
1929         (sh_extract_return_value_fpu): Likewise.
1930         (sh_store_return_value_nofpu): Likewise.
1931         (sh_corefile_supply_regset): Likewise.
1932         (sh_corefile_collect_regset): Likewise.
1933         * sh64-tdep.c (sh64_extract_return_value): Likewise.
1934         (sh64_store_return_value): Likewise.
1935         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
1936         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
1937         (sparc_store_inferior_registers): Likewise.
1938         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
1939         (sparc_ravenscar_prepare_to_store): Likewise.
1940         * sparc-tdep.c (sparc32_store_arguments): Likewise.
1941         (sparc_analyze_control_transfer): Likewise.
1942         (sparc_step_trap): Likewise.
1943         (sparc_software_single_step): Likewise.
1944         (sparc32_gdbarch_init): Likewise.
1945         (sparc_supply_rwindow): Likewise.
1946         (sparc_collect_rwindow): Likewise.
1947         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
1948         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
1949         (sparc64nbsd_collect_gregset): Likewise.
1950         (sparc64nbsd_supply_fpregset): Likewise.
1951         (sparc64nbsd_collect_fpregset): Likewise.
1952         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1953         (sparc64_supply_gregset): Likewise.
1954         (sparc64_collect_gregset): Likewise.
1955         (sparc64_supply_fpregset): Likewise.
1956         (sparc64_collect_fpregset): Likewise.
1957         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
1958         * spu-tdep.c (spu_unwind_sp): Likewise.
1959         (spu2ppu_prev_register): Likewise.
1960         (spu_memory_remove_breakpoint): Likewise.
1961         * stack.c (return_command): Likewise.
1962         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
1963         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
1964         * tracefile.c (trace_save_ctf): Likewise.
1965         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
1966         (do_windows_store_inferior_registers): Likewise.
1967         (windows_resume): Likewise.
1968         * xtensa-linux-nat.c (fill_gregset): Likewise.
1969         (supply_gregset_reg): Likewise.
1970         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
1971         (xtensa_register_read_masked): Likewise.
1972         (xtensa_supply_gregset): Likewise.
1973         (xtensa_extract_return_value): Likewise.
1974         (xtensa_store_return_value): Likewise.
1975
1976 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
1977
1978         * doublest.c (floatformat_from_string): New function.
1979         * doublest.h (floatformat_from_string): Add prototype.
1980
1981         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
1982         (OP_FLOAT): ... this.
1983         * expression.h: Do not include "doublest.h".
1984         (union exp_element): Replace doubleconst and decfloatconst by
1985         new element floatconst.
1986         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
1987         (ada_evaluate_subexp): Likewise.
1988         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
1989         OP_DOUBLE and OP_DECFLOAT.
1990         * expprint.c (print_subexp_standard): Likewise.
1991         (dump_subexp_body_standard): Likewise.
1992         * breakpoint.c (watchpoint_exp_is_const): Likewise.
1993
1994         * parse.c: Include "dfp.h".
1995         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1996         (write_exp_elt_floatcst): New function.
1997         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
1998         and OP_DECFLOAT.
1999         (operator_check_standard): Likewise.
2000         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
2001         Return target format buffer instead of host DOUBLEST.
2002         Use floatformat_from_string and decimal_from_string to parse
2003         either binary or decimal floating-point types.
2004         (parse_c_float): Remove.
2005         * parser-defs.h: Do not include "doublest.h".
2006         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2007         (write_exp_elt_floatcst): Add prototype.
2008         (parse_float): Update prototype.
2009         (parse_c_float): Remove.
2010
2011         * c-exp.y: Do not include "dfp.h".
2012         (typed_val_float): Use byte buffer instead of DOUBLEST.
2013         (typed_val_decfloat): Remove.
2014         (DECFLOAT): Remove.
2015         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2016         (parse_number): Update to new parse_float interface.
2017         Parse suffixes and determine type before calling parse_float.
2018         Handle decimal and binary FP types the same way.
2019
2020         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2021         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2022         (parse_number): Update to new parse_float interface.
2023         Parse suffixes and determine type before calling parse_float.
2024
2025         * f-exp.y: Replace dval by typed_val_float.
2026         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2027         (parse_number): Use parse_float instead of atof.
2028
2029         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2030         (parse_go_float): Remove.
2031         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2032         (parse_number): Call parse_float instead of parse_go_float.
2033         Parse suffixes and determine type before calling parse_float.
2034
2035         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2036         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2037         (parse_number): Update to new parse_float interface.
2038         Parse suffixes and determine type before calling parse_float.
2039
2040         * m2-exp.y: Replace dval by byte buffer val.
2041         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2042         (parse_number): Call parse_float instead of atof.
2043
2044         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2045         (lex_number): Call parse_float instead of strtod.
2046         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2047         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2048         Use write_exp_elt_floatcst.
2049         (unit_testing): Remove static variable.
2050         (rust_type): Do not check unit_testing.
2051         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
2052
2053         * ada-exp.y (type_float, type_double): Remove.
2054         (typed_val_float): Use byte buffer instead of DOUBLEST.
2055         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2056         * ada-lex.l (processReal): Use parse_float instead of sscanf.
2057
2058 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
2059
2060         * aarch64-tdep.h (enum aarch64_regnum): Remove.
2061         * arch/aarch64.h: New file.
2062
2063 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2064
2065         * dfp.h (decimal_from_string): Use const reference for argument.
2066         * dfp.c (decimal_from_string): Likewise.
2067
2068 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2069
2070         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2071         * sh64-tdep.c (sh64_do_fp_register): Likewise.
2072         * mips-tdep.c (mips_print_fp_register): Likewise.
2073
2074 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2075
2076         * common/format.h (enum argclass): Replace decfloat_arg by
2077         dec32float_arg, dec64float_arg, and dec128float_arg.
2078         * common/format.c (parse_format_string): Update to return
2079         new decimal float argument classes.
2080
2081         * printcmd.c (printf_decfloat): Rename to ...
2082         (printf_floating): ... this.  Add argclass argument, and use it
2083         instead of parsing the format string again.  Add support for
2084         binary floating-point values, using floatformat_to_string.
2085         Convert value to the target format if it doesn't already match.
2086         (ui_printf): Call printf_floating instead of printf_decfloat,
2087         also for double_arg / long_double_arg.  Pass argclass.
2088
2089         * dfp.c (decimal_to_string): Add format string argument.
2090         * dfp.h (decimal_to_string): Likewise.
2091
2092         * doublest.c (floatformat_to_string): Add format string argument.
2093         * doublest.h (floatformat_to_string): Likewise.
2094
2095 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2096
2097         * doublest.c (floatformat_precision): New routine.
2098         (floatformat_to_string): Likewise.
2099         * doublest.c (floatformat_to_string): Add prototype.
2100
2101         * printcmd.c (print_scalar_formatted): Only call print_floating
2102         on floating-point types.
2103         * valprint.c: Do not include "floatformat.h".
2104         (generic_val_print_decfloat): Remove.
2105         (generic_val_print): Call generic_val_print_float for both
2106         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2107         (print_floating): Use floatformat_to_string.  Handle decimal float.
2108         (print_decimal_floating): Remove, merge into floatformat_to_string.
2109         * value.h (print_decimal_floating): Remove.
2110
2111         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2112
2113 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2114
2115         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2116
2117 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2118
2119         * memattr.h: Don't include vec.h.
2120         (struct mem_attrib): Initialize fields.
2121         <unknown>: New static method.
2122         (struct mem_region): Add constructors, operator<, initialize
2123         fields.
2124         * memattr.c: Include algorithm.
2125         (default_mem_attrib, unknown_mem_attrib): Remove.
2126         (user_mem_region_list): New global.
2127         (target_mem_region_list, mem_region_list): Change type to
2128         std::vector<mem_region>.
2129         (mem_use_target): Now a function.
2130         (target_mem_regions_valid): Change type to bool.
2131         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2132         (require_user_regions): Adjust.
2133         (require_target_regions): Adjust.
2134         (create_mem_region): Adjust.
2135         (lookup_mem_region): Adjust.
2136         (invalidate_target_mem_regions): Adjust.
2137         (mem_clear): Rename to...
2138         (user_mem_clear): ... this, and adjust.
2139         (mem_command): Adjust.
2140         (info_mem_command): Adjust.
2141         (mem_enable, enable_mem_command, mem_disable,
2142         disable_mem_command): Adjust.
2143         (mem_delete): Adjust.
2144         (delete_mem_command): Adjust.
2145         * memory-map.h (parse_memory_map): Return an std::vector.
2146         * memory-map.c (parse_memory_map): Likewise.
2147         (struct memory_map_parsing_data): Add constructor.
2148         <memory_map>: Point to std::vector.
2149         (memory_map_start_memory): Adjust.
2150         (memory_map_end_memory): Adjust.
2151         (memory_map_end_property): Adjust.
2152         (clear_result): Remove.
2153         * remote.c (remote_memory_map): Return an std::vector.
2154         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2155         Remove.
2156         (target_debug_print_mem_region_vector): New.
2157         * target-delegates.c: Regenerate.
2158         * target.h (mem_region_vector): New typedef.
2159         (to_memory_map): Return mem_region_vector.
2160         (target_memory_map): Return an std::vector.
2161         * target.c (target_memory_map): Return an std::vector.
2162         (flash_erase_command): Adjust.
2163
2164 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2165
2166         * memory-map.c (struct memory_map_parsing_data) <property_name>:
2167         Change type to std::string.
2168         (memory_map_start_property): Adjust.
2169         (memory_map_end_property): Adjust.
2170
2171 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2172
2173         * infrun.h: Include common/byte-vector.h.
2174         (struct displaced_step_closure): New struct.
2175         (struct buf_displaced_step_closure): New struct.
2176         * infrun.c (displaced_step_closure::~displaced_step_closure):
2177         Provide default implementation.
2178         (displaced_step_clear): Deallocate step closure with delete.
2179         * aarch64-tdep.c (displaced_step_closure): Rename to ...
2180         (aarch64_displaced_step_closure): ... this, extend
2181         displaced_step_closure.
2182         (aarch64_displaced_step_data) <dsc>: Change type to
2183         aarch64_displaced_step_closure.
2184         (aarch64_displaced_step_copy_insn): Adjust to type change, use
2185         unique_ptr.
2186         (aarch64_displaced_step_fixup): Add cast for displaced step
2187         closure.
2188         * amd64-tdep.c (displaced_step_closure): Rename to ...
2189         (amd64_displaced_step_closure): ... this, extend
2190         displaced_step_closure.
2191         <insn_buf>: Change type to std::vector<gdb_byte>.
2192         <max_len>: Remove.
2193         (fixup_riprel): Change type of DSC parameter, adjust to type
2194         change of insn_buf.
2195         (fixup_displaced_copy): Change type of DSC parameter.
2196         (amd64_displaced_step_copy_insn): Instantiate
2197         amd64_displaced_step_closure.
2198         (amd64_displaced_step_fixup): Add cast for closure type, adjust
2199         to type change of insn_buf.
2200         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2201         parameter DSC.
2202         (arm_linux_copy_svc): Likewise.
2203         (cleanup_kernel_helper_return): Likewise.
2204         (arm_catch_kernel_helper_return): Likewise.
2205         (arm_linux_displaced_step_copy_insn): Instantiate
2206         arm_displaced_step_closure.
2207         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2208         (displaced_read_reg): Change type of parameter DSC.
2209         (branch_write_pc): Likewise.
2210         (load_write_pc): Likewise.
2211         (alu_write_pc): Likewise.
2212         (displaced_write_reg): Likewise.
2213         (arm_copy_unmodified): Likewise.
2214         (thumb_copy_unmodified_32bit): Likewise.
2215         (thumb_copy_unmodified_16bit): Likewise.
2216         (cleanup_preload): Likewise.
2217         (install_preload): Likewise.
2218         (arm_copy_preload): Likewise.
2219         (thumb2_copy_preload): Likewise.
2220         (install_preload_reg): Likewise.
2221         (arm_copy_preload_reg): Likewise.
2222         (cleanup_copro_load_store): Likewise.
2223         (install_copro_load_store): Likewise.
2224         (arm_copy_copro_load_store) Likewise.
2225         (thumb2_copy_copro_load_store): Likewise.
2226         (cleanup_branch): Likewise.
2227         (install_b_bl_blx): Likewise.
2228         (arm_copy_b_bl_blx): Likewise.
2229         (thumb2_copy_b_bl_blx): Likewise.
2230         (thumb_copy_b): Likewise.
2231         (install_bx_blx_reg): Likewise.
2232         (arm_copy_bx_blx_reg): Likewise.
2233         (thumb_copy_bx_blx_reg): Likewise.
2234         (cleanup_alu_imm): Likewise.
2235         (arm_copy_alu_imm): Likewise.
2236         (thumb2_copy_alu_imm): Likewise.
2237         (cleanup_alu_reg): Likewise.
2238         (install_alu_reg): Likewise.
2239         (arm_copy_alu_reg): Likewise.
2240         (thumb_copy_alu_reg): Likewise.
2241         (cleanup_alu_shifted_reg): Likewise.
2242         (install_alu_shifted_reg): Likewise.
2243         (arm_copy_alu_shifted_reg): Likewise.
2244         (cleanup_load): Likewise.
2245         (cleanup_store): Likewise.
2246         (arm_copy_extra_ld_st): Likewise.
2247         (install_load_store): Likewise.
2248         (thumb2_copy_load_literal): Likewise.
2249         (thumb2_copy_load_reg_imm): Likewise.
2250         (arm_copy_ldr_str_ldrb_strb): Likewise.
2251         (cleanup_block_load_all): Likewise.
2252         (cleanup_block_store_pc): Likewise.
2253         (cleanup_block_load_pc): Likewise.
2254         (arm_copy_block_xfer): Likewise.
2255         (thumb2_copy_block_xfer): Likewise.
2256         (cleanup_svc): Likewise.
2257         (install_svc): Likewise.
2258         (arm_copy_svc): Likewise.
2259         (thumb_copy_svc): Likewise.
2260         (arm_copy_undef): Likewise.
2261         (thumb_32bit_copy_undef): Likewise.
2262         (arm_copy_unpred): Likewise.
2263         (arm_decode_misc_memhint_neon): Likewise.
2264         (arm_decode_unconditional): Likewise.
2265         (arm_decode_miscellaneous): Likewise.
2266         (arm_decode_dp_misc): Likewise.
2267         (arm_decode_ld_st_word_ubyte): Likewise.
2268         (arm_decode_media): Likewise.
2269         (arm_decode_b_bl_ldmstm): Likewise.
2270         (arm_decode_ext_reg_ld_st): Likewise.
2271         (thumb2_decode_dp_shift_reg): Likewise.
2272         (thumb2_decode_ext_reg_ld_st): Likewise.
2273         (arm_decode_svc_copro): Likewise.
2274         (thumb2_decode_svc_copro): Likewise.
2275         (install_pc_relative): Likewise.
2276         (thumb_copy_pc_relative_16bit): Likewise.
2277         (thumb_decode_pc_relative_16bit): Likewise.
2278         (thumb_copy_pc_relative_32bit): Likewise.
2279         (thumb_copy_16bit_ldr_literal): Likewise.
2280         (thumb_copy_cbnz_cbz): Likewise.
2281         (thumb2_copy_table_branch): Likewise.
2282         (cleanup_pop_pc_16bit_all): Likewise.
2283         (thumb_copy_pop_pc_16bit): Likewise.
2284         (thumb_process_displaced_16bit_insn): Likewise.
2285         (decode_thumb_32bit_ld_mem_hints): Likewise.
2286         (thumb_process_displaced_32bit_insn): Likewise.
2287         (thumb_process_displaced_insn): Likewise.
2288         (arm_process_displaced_insn): Likewise.
2289         (arm_displaced_init_closure): Likewise.
2290         (arm_displaced_step_fixup): Add cast for closure.
2291         * arm-tdep.h: Include infrun.h.
2292         (displaced_step_closure): Rename to ...
2293         (arm_displaced_step_closure): ... this, extend
2294         displaced_step_closure.
2295         <u::svc::copy_svc_os>: Change type of parameter DSC.
2296         <cleanup>: Likewise.
2297         (arm_process_displaced_insn): Likewise.
2298         (arm_displaced_init_closure): Likewise.
2299         (displaced_read_reg): Likewise.
2300         (displaced_write_reg): Likewise.
2301         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2302         Adjust.
2303         * i386-tdep.h: Include infrun.h.
2304         (i386_displaced_step_closure): New typedef.
2305         * i386-tdep.c (i386_displaced_step_copy_insn): Use
2306         i386_displaced_step_closure.
2307         (i386_displaced_step_fixup): Adjust.
2308         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2309         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2310         and unique_ptr.
2311         (ppc_displaced_step_fixup): Adjust.
2312         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2313         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2314         and unique_ptr.
2315         (s390_displaced_step_fixup): Adjust.
2316
2317 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2318
2319         * interps.h (interp_resume, interp_suspend, interp_set_temp):
2320         Remove declarations.
2321
2322 2017-10-20  Tom Tromey  <tom@tromey.com>
2323
2324         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2325         std::vector.
2326         (gdb_bfd_record_inclusion): Update.
2327         (bfdp): Remove typedef.
2328
2329 2017-10-20  Tom Tromey  <tom@tromey.com>
2330
2331         * gdb_bfd.c (gdb_bfd_ref): Use new.
2332         (struct gdb_bfd_data): Add constructor, destructor, and member
2333         initializers.
2334         (gdb_bfd_unref): Use delete.
2335
2336 2017-10-20  Tom Tromey  <tom@tromey.com>
2337
2338         * exec.c (exec_file_attach): Use new_bfd_ref.
2339         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2340         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2341         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2342         new_bfd_ref.
2343         * gdb_bfd.h (new_bfd_ref): New function.
2344
2345 2017-10-20  Pedro Alves  <palves@redhat.com>
2346
2347         * main.c (captured_command_loop): Add attribute noinline.
2348
2349 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
2350
2351         * interps.c (struct interp_factory): Add constructor.
2352         (interp_factory_p): Remove typedef.
2353         (DEF_VEC_P(interp_factory_p)): Remove.
2354         (interpreter_factories): Change type to std::vector.
2355         (interp_factory_register): Adjust.
2356         (interp_lookup): Adjust.
2357         (interpreter_completer): Adjust.
2358
2359 2017-10-19  Tom Tromey  <tom@tromey.com>
2360
2361         * break-catch-syscall.c (catch_syscall_completer): Use
2362         std::string, gdb::unique_xmalloc_ptr.
2363
2364 2017-10-19  Tom Tromey  <tom@tromey.com>
2365
2366         * infcall.c (call_function_by_hand_dummy): Use std::string.
2367
2368 2017-10-19  Tom Tromey  <tom@tromey.com>
2369
2370         * mi/mi-main.c (mi_cmd_execute): Update.
2371         * top.h (prepare_execute_command): Return scoped_value_mark.
2372         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2373         Add move constructor.
2374         * top.c (prepare_execute_command): Return scoped_value_mark.
2375         (execute_command): Update.
2376
2377 2017-10-19  Pedro Alves  <palves@redhat.com>
2378
2379         * xml-support.c (xml_fetch_content_from_file): Check fread's
2380         return.
2381
2382 2017-10-19  Pedro Alves  <palves@redhat.com>
2383
2384         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2385         async.
2386         (handle_error_fd): New function.
2387         (ser_base_async): Add/delete an event loop file handler for
2388         error_fd.
2389
2390 2017-10-19  Pedro Alves  <palves@redhat.com>
2391
2392         * xml-support.c (xml_fetch_content_from_file): Don't read in
2393         chunks.  Instead use fseek to determine the file's size, and read
2394         it in one go.
2395
2396 2017-11-18  Keith Seitz  <keiths@redhat.com>
2397
2398         * c-exp.y (oper): Canonicalize conversion operators of user-defined
2399         types.
2400         Add whitespace to front of type name.
2401
2402 2017-10-18  Keith Seitz  <keiths@redhat.com>
2403
2404         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2405         DW_AT_accessibility.
2406
2407 2017-10-18  Yao Qi  <yao.qi@linaro.org>
2408
2409         * features/tic6x-c62x-linux.c: Remove.
2410
2411 2017-10-17  Tom Tromey  <tom@tromey.com>
2412
2413         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2414         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2415         (do_mixed_source_and_assembly): Likewise.
2416
2417 2017-10-17  Tom Tromey  <tom@tromey.com>
2418
2419         * regcache.c (regcache::xfer_part): Remove assertion.
2420
2421 2017-10-17  Pedro Alves  <palves@redhat.com>
2422
2423         * xml-support.c (xml_fetch_content_from_file): Call
2424         unique_ptr::release() instead unique_ptr::get() when passing
2425         through xrealloc.
2426
2427 2017-10-17  Yao Qi  <yao.qi@linaro.org>
2428
2429         * regcache.c (regcache::xfer_part): Remove parameters read and
2430         write, add parameter is_raw.  All callers are updated.
2431
2432 2017-10-16  Keith Seitz  <keiths@redhat.com>
2433
2434         * c-typeprint.c (enum access_specifier): Moved here from
2435         c_type_print_base.
2436         (output_access_specifier): New function.
2437         (c_type_print_base): Consider typedefs when assessing
2438         whether access labels are needed.
2439         Use output_access_specifier as needed.
2440         Output access specifier for typedefs, if needed.
2441         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2442         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2443         fields.
2444         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2445         accessor macros.
2446
2447 2017-10-16  Tom Tromey  <tom@tromey.com>
2448
2449         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2450         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2451         * target.c (target_fileio_read_stralloc): Update.
2452         * sparc64-tdep.c (adi_is_addr_mapped): Update.
2453         * target.h (target_fileio_read_stralloc): Return
2454         unique_xmalloc_ptr.
2455
2456 2017-10-16  Tom Tromey  <tom@tromey.com>
2457
2458         * xml-syscall.c (xml_init_syscalls_info): Update.
2459         * xml-support.c (xinclude_start_include): Update.
2460         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2461         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2462         (xml_fetch_content_from_file): Likewise.
2463         * osdata.c (get_osdata): Update.
2464         * target.h (target_read_stralloc, target_get_osdata): Return
2465         unique_xmalloc_ptr.
2466         * solib-aix.c (solib_aix_get_library_list): Update.
2467         * solib-target.c (solib_target_current_sos): Update.
2468         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2469         * xml-tdesc.c (fetch_available_features_from_target): Update.
2470         (target_fetch_description_xml): Update.
2471         (file_read_description_xml): Update.
2472         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2473         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2474         (remote_pid_to_exec_file): Update.
2475         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2476         (target_get_osdata): Likewise.
2477
2478 2017-10-16  Tom Tromey  <tom@tromey.com>
2479
2480         * remote.c (remote_register_number_and_offset): Use std::vector.
2481         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2482         (putpkt_binary): Use gdb::def_vector.
2483         (compare_sections_command): Use gdb::byte_vector.
2484
2485 2017-10-16  Tom Tromey  <tom@tromey.com>
2486
2487         * ppc-linux-nat.c (hwdebug_insert_point): Use
2488         gdb::unique_xmalloc_ptr, XDUP.
2489
2490 2017-10-16  Tom Tromey  <tom@tromey.com>
2491
2492         * probe.c (parse_probes): Use std::string.
2493         (info_probes_for_ops, enable_probes_command)
2494         (disable_probes_command): Remove cleanups.
2495
2496 2017-10-16  Tom Tromey  <tom@tromey.com>
2497
2498         * buildsym.c (block_compar): Remove.
2499         (end_symtab_get_static_block): Use std::vector.
2500
2501 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
2502
2503         * memrange.h (struct mem_range): Define operator< and operator==.
2504         (mem_range_s): Remove.
2505         (DEF_VEC_O (mem_range_s)): Remove.
2506         (normalize_mem_ranges): Change parameter type to std::vector.
2507         * memrange.c (compare_mem_ranges): Remove.
2508         (normalize_mem_ranges): Change parameter type to std::vector,
2509         adjust to vector change.
2510         * exec.c (section_table_available_memory): Return vector, remove
2511         parameter.
2512         (section_table_read_available_memory): Adjust to std::vector
2513         change.
2514         * remote.c (remote_read_bytes): Adjust to std::vector
2515         change.
2516         * tracepoint.h (traceframe_available_memory): Change parameter
2517         type to std::vector.
2518         * tracepoint.c (traceframe_available_memory): Change parameter
2519         type to std::vector, adjust.
2520         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2521         std::vector change.
2522         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2523         unittests/memrange-selftests.c.
2524         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2525         * gdb/unittests/memrange-selftests.c: New file.
2526
2527 2017-10-16  Pedro Alves  <palves@redhat.com>
2528
2529         * elfread.c (probe_key_free): Rename range-for variable.
2530         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2531         (find_probe_by_pc, collect_probes): Rename range-for variable.
2532
2533 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2534
2535         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2536         * features/tic6x-c62x.c: Remove.
2537         * features/tic6x-c64x-linux.c: Remove.
2538         * features/tic6x-c64x.c: Remove.
2539         * features/tic6x-c64xp-linux.c: Remove.
2540         * features/tic6x-c64xp.c: Remove.
2541         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2542         initialize_tdesc_tic6x_*_linux functions.
2543         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2544         initialize_tdesc_tic6x_* functions.
2545
2546 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2547
2548         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2549         tic6x-c62x.
2550         * regformats/tic6x-c62x.dat: Remove.
2551         * regformats/tic6x-c64x.dat: Remove.
2552         * regformats/tic6x-c64xp.dat: Remove.
2553
2554 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2555
2556         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2557         (the !HAVE_LIBEXPAT version).
2558
2559 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2560
2561         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2562         const.
2563
2564 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2565
2566         * target.h: Include tracepoint.h.
2567         (enum trace_find_type): Move to tracepoint.h.
2568         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2569         * tracepoint.h: Don't include target.h
2570         (enum trace_find_type): Move from target.h.
2571         (parse_traceframe_info): Return a unique ptr.
2572         * tracepoint.c (current_traceframe_info): Change type to unique
2573         ptr.
2574         (free_traceframe_info): Remove.
2575         (clear_traceframe_info): Don't manually free
2576         current_traceframe_info.
2577         (free_result): Remove.
2578         (parse_traceframe_info): Return a unique ptr.
2579         (get_traceframe_info): Adjust to unique ptr.
2580         * ctf.c (ctf_traceframe_info): Return a unique ptr.
2581         * remote.c (remote_traceframe_info): Return a unique ptr.
2582         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2583         ptr.
2584         * target-debug.h (target_debug_print_traceframe_info_up): New
2585         macro.
2586         * target-delegates.c: Regenerate.
2587
2588 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2589
2590         * memrange.h (struct mem_range): Add constructors.
2591         * tracepoint.h (struct traceframe_info) <memory>: Change type to
2592         std::vector<mem_range>.
2593         * tracepoint.c (free_traceframe_info): Don't manually free
2594         vector.
2595         (traceframe_info_start_memory): Adjust to vector change.
2596         (traceframe_available_memory): Likewise.
2597         * tracefile-tfile.c (build_traceframe_info): Likewise.
2598         * ctf.c (ctf_traceframe_info): Likewise.
2599
2600 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2601
2602         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2603         std::vector<int>.
2604         * tracepoint.c (free_traceframe_info): Deallocate with delete.
2605         (traceframe_info_start_tvar): Adjust to vector change.
2606         (parse_traceframe_info): Allocate with new.
2607         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2608         vector change.
2609         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2610         change.
2611         tfile_traceframe_info): Allocate with new.
2612         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2613         change.
2614
2615 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2616
2617         * tracepoint.c (traceframe_info): Rename to...
2618         (current_traceframe_info): ...this.
2619         (clear_traceframe_info): Adjust.
2620         (get_traceframe_info): Adjust.
2621
2622 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2623
2624         * nat/linux-osdata.c: Include algorithm.
2625         (compare_processes): Remove.
2626         (struct pid_pgid_entry): New struct.
2627         (linux_xfer_osdata_processgroups): Use std::vector instead of
2628         XNEWVEC.
2629
2630 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2631
2632         * objfiles.h: Don't include symfile.h.
2633         (struct partial_symbol): Remove forward-declaration.
2634         (struct objfile) <global_psymbols, static_psymbols>: Change type
2635         to std::vector<partial_symbol *>.
2636         * objfiles.c (objfile::objfile): Don't memset those fields.
2637         (objfile::~objfile): Don't free those fields.
2638         * psympriv.h (struct psymbol_allocation_list): Remove
2639         forward-declaration.
2640         (add_psymbol_to_list): Change psymbol_allocation_list parameter
2641         to std::vector.
2642         (start_psymtab_common): Change parameters to std::vector.
2643         * psymtab.c: Include algorithm.
2644         (require_partial_symbols): Call shrink_to_fit.
2645         (find_pc_sect_psymbol): Adjust to vector change.
2646         (match_partial_symbol): Likewise.
2647         (lookup_partial_symbol): Likewise.
2648         (psym_relocate): Likewise.
2649         (dump_psymtab): Likewise.
2650         (recursively_search_psymtabs): Likewise.
2651         (compare_psymbols): Remove.
2652         (sort_pst_symbols): Adjust to vector change.
2653         (start_psymtab_common): Likewise.
2654         (end_psymtab_common): Likewise.
2655         (psymbol_bcache_full): De-constify return value.
2656         (add_psymbol_to_bcache): Likewise.
2657         (extend_psymbol_list): Remove.
2658         (append_psymbol_to_list): Adjust to vector change.
2659         (add_psymbol_to_list): Likewise.
2660         (init_psymbol_list): Likewise.
2661         (maintenance_info_psymtabs): Likewise.
2662         (maintenance_check_psymtabs): Likewise.
2663         * symfile.h (struct psymbol_allocation_list): Remove.
2664         * symfile.c (reread_symbols): Adjust to vector change.
2665         * dbxread.c (start_psymtab): Change type of parameters.
2666         (dbx_symfile_read): Adjust to vector change.
2667         (read_dbx_symtab): Likewise.
2668         (start_psymtab): Change type of parameters.
2669         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2670         (create_partial_symtab): Likewise.
2671         (add_partial_symbol): Likewise.
2672         (write_one_signatured_type): Likewise.
2673         (recursively_write_psymbols): Likewise.
2674         * mdebugread.c (parse_partial_symbols): Likewise.
2675         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2676         (scan_xcoff_symtab): Adjust to vector change.
2677         (xcoff_initial_scan): Likewise.
2678
2679 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
2680
2681         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2682
2683 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2684
2685         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2686         Remove s390x-*-expedite, add s390x-expedite.
2687
2688 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2689
2690         * features/s390-gs-linux64.c: Regenerated.
2691         * features/s390x-gs-linux64.c: Regenerated.
2692
2693 2017-10-13  Tom Tromey  <tom@tromey.com>
2694
2695         * compile/compile-object-run.c (do_module_cleanup): Use delete.
2696         * solib.c (update_solib_list, reload_shared_libraries_1): Use
2697         delete.
2698         * symfile.c (symbol_file_add_with_addrs): Use new.
2699         (symbol_file_add_separate): Update comment.
2700         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2701         * jit.c (jit_object_close_impl): Use new.
2702         (jit_unregister_code): Use delete.
2703         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2704         (~objfile): Rename from free_objfile.
2705         (free_objfile_separate_debug, do_free_objfile_cleanup)
2706         (free_all_objfiles, objfile_purge_solibs): Use delete.
2707         * objfiles.h (struct objfile): Add constructor and destructor.
2708         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
2709         (allocate_objfile, free_objfile): Don't declare.
2710         (struct objstats): Add initializers.
2711
2712 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2713
2714         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
2715         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
2716         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
2717         * gdbarch.h: Regenerate.
2718         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2719         Adjust comment.
2720         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
2721         (i386_displaced_step_fixup): Adjust comment.
2722         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
2723
2724 2017-10-12  Tom Tromey  <tom@tromey.com>
2725
2726         * prologue-value.h (pv_area::store_would_trash): Return bool.
2727         (pv_area::find_reg): Likewise.
2728         * prologue-value.c (pv_area::store_would_trash): Return bool.
2729         (pv_area::find_reg): Likewise.
2730
2731 2017-10-12  Tom Tromey  <tom@tromey.com>
2732
2733         * s390-linux-tdep.c (s390_store, s390_load)
2734         (s390_check_for_saved, s390_analyze_prologue): Update.
2735         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
2736         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
2737         * prologue-value.h (class pv_area): Move from prologue-value.c.
2738         Change names of members.  Add constructor, destructor, member
2739         functions.
2740         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
2741         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
2742         (pv_area_fetch, pv_area_scan): Don't declare.
2743         * prologue-value.c (struct pv_area::area_entry): Now member of
2744         pv_area.
2745         (struct pv_area): Move to prologue-value.h.
2746         (pv_area::pv_area): Rename from make_pv_area.
2747         (pv_area::~pv_area): Rename from free_pv_area.
2748         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
2749         (clear_entries, find_entry, overlaps, store_would_trash, store)
2750         (fetch, find_reg, scan): Now member of pv_area.
2751         Remove "area" argument.  Update.
2752         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
2753         Update.
2754         * mn10300-tdep.c (push_reg, check_for_saved)
2755         (mn10300_analyze_prologue): Update.
2756         * mep-tdep.c (is_arg_spill, check_for_saved)
2757         (mep_analyze_prologue): Update.
2758         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
2759         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
2760         (m32c_is_struct_return, m32c_analyze_prologue): Update.
2761         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
2762         Update.
2763         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
2764         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
2765
2766 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2767
2768         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
2769         * linux-nat.c (linux_nat_delete_thread): New variable.
2770         (lwp_free): Invoke linux_nat_delete_thread if set.
2771         (linux_nat_set_delete_thread): New function.
2772         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
2773         thread delete callback.
2774         * arm-linux-nat.c (arm_linux_delete_thread): New function.
2775         (_initialize_arm_linux_nat): Assign thread delete callback.
2776         * s390-linux-nat.c (s390_delete_thread): New function.
2777         (_initialize_s390_nat): Assign thread delete callback.
2778         * x86-linux-nat.c (x86_linux_add_target): Likewise.
2779         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
2780         function.
2781         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
2782         declaration.
2783         * nat/x86-linux.c (x86_linux_delete_thread): New function.
2784         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
2785
2786 2017-10-09  Tom Tromey  <tom@tromey.com>
2787
2788         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
2789         std::string.
2790         * tui/tui-layout.c (enum tui_status): Use std::string.
2791
2792 2017-10-11  Tom Tromey  <tom@tromey.com>
2793
2794         * gdbthread.h (thread_command): Constify.
2795         * inferior.h (detach_command): Constify.
2796         * top.h (set_history, show_history): Constify.
2797         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
2798         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
2799         * bsd-kvm.c (bsd_kvm_cmd): Constify.
2800         * printcmd.c (set_command): Constify.
2801         (non_const_set_command): New function.
2802         * dcache.c (set_dcache_command, show_dcache_command): Constify.
2803         * breakpoint.c (enable_command, disable_command, delete_command)
2804         (catch_command, tcatch_command, set_breakpoint_cmd)
2805         (show_breakpoint_cmd): Constify.
2806         * macrocmd.c (macro_command): Constify.
2807         * infcmd.c (unset_command, kill_command, detach_command)
2808         (info_proc_cmd): Constify.
2809         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
2810         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
2811         (info_auto_load_cmd): Constify.
2812         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
2813         (unset_tdesc_cmd): Constify.
2814         * ada-lang.c (set_ada_command, show_ada_command)
2815         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
2816         * guile/guile.c (set_guile_command, show_guile_command)
2817         (info_guile_command): Constify.
2818         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
2819         Constify.
2820         * skip.c (skip_command): Constify.
2821         * compile/compile.c (_initialize_compile): Constify.
2822         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
2823         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
2824         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
2825         (maint_btrace_pt_show_cmd): Constify.
2826         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
2827         Constify.
2828         * python/python.c (user_show_python, user_set_python): Constify.
2829         * mips-tdep.c (set_mips_command, show_mips_command)
2830         (set_mipsfpu_command): Constify.
2831         * record-btrace.c (cmd_record_btrace_start)
2832         (cmd_set_record_btrace, cmd_show_record_btrace)
2833         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
2834         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
2835         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
2836         Constify.
2837         * symfile.c (overlay_command): Constify.
2838         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2839         * cli/cli-logging.c (set_logging_command, show_logging_command):
2840         Constify.
2841         * cli/cli-dump.c (dump_command, append_command)
2842         (srec_dump_command, ihex_dump_command, verilog_dump_command)
2843         (tekhex_dump_command, binary_dump_command)
2844         (binary_append_command): Constify.
2845         * cli/cli-decode.c (struct cmd_list_element): Change type of
2846         "fun".
2847         * cli/cli-cmds.c (info_command, show_command, set_debug)
2848         (show_debug): Constify.
2849         (show_command): Add non-const overload.
2850         * top.c (set_history, show_history): Constify.
2851         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
2852         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
2853         * target.c (target_command): Constify.
2854         * sparc64-tdep.c (info_adi_command): Constify.
2855         * record-full.c (cmd_record_full_start): Constify.
2856         (set_record_full_command): Constify.  Fix typo.
2857         (show_record_full_command): Constify.
2858         * thread.c (thread_command, thread_apply_command): Constify.
2859         * memattr.c (dummy_cmd): Constify.
2860         * value.c (function_command): Constify.
2861         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
2862         * probe.c (info_probes_command): Constify.
2863         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
2864         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
2865         (show_thread_cmd, set_thread_default_cmd)
2866         (show_thread_default_cmd): Constify.
2867         (check_empty): Constify.
2868         * tracepoint.c (tfind_command): Constify.
2869         * cp-support.c (maint_cplus_command): Constify.
2870         * windows-tdep.c (info_w32_command): Constify.
2871         * record.c (cmd_record_start, set_record_command)
2872         (show_record_command, info_record_command, cmd_record_goto):
2873         Constify.
2874         * ravenscar-thread.c (set_ravenscar_command)
2875         (show_ravenscar_command): Constify.
2876         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
2877         Constify.
2878         (add_internal_problem_command): Remove casts.
2879         * arc-tdep.c (maintenance_print_arc_command): Constify.
2880         * valprint.c (set_print, show_print, set_print_raw)
2881         (show_print_raw): Constify.
2882         * maint.c (maintenance_command, maintenance_info_command)
2883         (maintenance_print_command, maintenance_set_cmd)
2884         (maintenance_show_cmd, set_per_command_cmd)
2885         (show_per_command_cmd, maintenance_check_command): Constify.
2886         * language.c (set_check, show_check): Constify.
2887         * typeprint.c (show_print_type, set_print_type): Constify.
2888         * go32-nat.c (go32_info_dos_command): Constify.
2889
2890 2017-10-11  Tom Tromey  <tom@tromey.com>
2891
2892         * breakpoint.c (prepare_re_set_context): Remove.
2893         (breakpoint_re_set_one): Update.  Don't use cleanups.
2894         (breakpoint_re_set): Use scoped_restore, std::string, and
2895         scoped_restore_current_language.
2896
2897 2017-10-11  Tom Tromey  <tom@tromey.com>
2898
2899         * breakpoint.c (commands_command_1): Use std::string.
2900         (cleanup_executing_breakpoints): Remove.
2901         (bpstat_do_actions_1): Use scoped_restore.
2902         (bpstat_check_watchpoint): Use std::string.
2903         (decode_static_tracepoint_spec): Likewise.
2904         (break_range_command): Likewise.
2905         (watch_command_1): Likewise.
2906         (compare_breakpoints): Change argument types.
2907         (clear_command): Use std::vector.
2908         (cleanup_executing_breakpoints): Remove.
2909         (update_global_location_list): Use unique_xmalloc_ptr.
2910         (strace_command): Remove unused declaration.
2911
2912 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2913
2914         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
2915         * NEWS: Mention new FreeBSD/arm native configuration.
2916         * configure.host: Add arm*-*-freebsd*.
2917         * configure.nat: Likewise.
2918         * arm-fbsd-nat.c: New file.
2919
2920 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2921
2922         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
2923         (ALLDEPFILES): Add arm-fbsd-tdep.c.
2924         * NEWS: Mention new FreeBSD/arm target.
2925         * configure.tgt: Add arm*-*-freebsd*.
2926         * arm-fbsd-tdep.c: New file.
2927         * arm-fbsd-tdep.h: New file.
2928
2929 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2930
2931         * linux-tdep.c (linux_make_corefile_notes): Remove call to
2932         `gdbarch_elfcore_write_linux_prpsinfo'.
2933         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
2934         method.
2935         (elf_internal_linux_prpsinfo): Remove declaration.
2936         * gdbarch.h: Regenerate.
2937         * gdbarch.c: Regenerate.
2938
2939 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2940
2941         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
2942         `set_gdbarch_elfcore_write_linux_prpsinfo'.
2943
2944 2017-10-11  Pedro Alves  <palves@redhat.com>
2945
2946         * breakpoint.c (reattach_breakpoints): Delete.
2947         * breakpoint.h (reattach_breakpoints): Delete.
2948
2949 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
2950
2951         * symfile.c (registered_sym_fns): Make struct, not typedef.
2952         (DEF_VEC_O (registered_sym_fns)): Remove.
2953         (symtab_fns): Change type to std::vector.
2954         (add_symtab_fns): Adjust.
2955         (find_sym_fns): Adjust.
2956
2957 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
2958
2959         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
2960         * arc-tdep.h (arc_arch_is_em): New function.
2961         (arc_arch_is_hs): Likewise.
2962
2963 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
2964
2965         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
2966         parentheses in the declaration.
2967         (macro_lookup_inclusion): Likewise.
2968         (macro_lookup_definition): Likewise.
2969         * p-lang.h (pascal_builtin_types): Likewise.
2970         * tui/tui-data.c (tui_win_list): Likewise.
2971         * tui/tui-data.h (tui_win_list): Likewise.
2972         * utils.h (make_cleanup_free_section_addr_info): Likewise.
2973
2974 2017-10-11  Mark Rages  <markrages@gmail.com>
2975
2976         * target-memory.c (block_boundaries): Fix for block address not
2977         aligned on block size.
2978
2979 2017-10-10  Pedro Alves <palves@redhat.com>
2980             Tom Tromey  <tom@tromey.com>
2981
2982         * breakpoint.c (struct captured_breakpoint_query_args)
2983         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
2984         (print_breakpoint): New.
2985         * breakpoint.h (print_breakpoint): Declare.
2986         * common/common-exceptions.h (enum return_reason): Remove
2987         references to catch_exceptions.
2988         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
2989         Delete.
2990         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
2991         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
2992         * gdb.h: Delete.
2993         * gdbthread.h (thread_select): Declare.
2994         * mi/mi-cmd-break.c: Don't include gdb.h.
2995         (breakpoint_notify): Use print_breakpoint.
2996         * mi/mi-cmd-catch.c: Don't include gdb.h.
2997         * mi/mi-interp.c: Don't include gdb.h.
2998         (mi_print_breakpoint_for_event): New.
2999         (mi_breakpoint_created, mi_breakpoint_modified): Use
3000         mi_print_breakpoint_for_event.
3001         * mi/mi-main.c: Don't include gdb.h.
3002         (mi_cmd_thread_select): Parse the global thread ID here.  Use
3003         thread_select instead of gdb_thread_select.
3004         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3005         of using gdb_list_thread_ids.
3006         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
3007         FILEIO_ENOSYS here.
3008         (remote_fileio_request): Use TRY/CATCH instead of
3009         catch_exceptions.
3010         * symfile-mem.c (struct symbol_file_add_from_memory_args)
3011         (symbol_file_add_from_memory_wrapper): Delete.
3012         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3013         * thread.c: Don't include gdb.h.
3014         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3015         (thread_alive): Use thread_select.
3016         (do_captured_thread_select): Delete, parts salvaged as ...
3017         (thread_select): ... this new function.
3018         (gdb_thread_select): Delete.
3019
3020 2017-10-10  Pedro Alves  <palves@redhat.com>
3021             Tom Tromey  <tom@tromey.com>
3022
3023         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3024         and reverse logic.
3025         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3026         No longer macros.  Instead ...
3027         (enum wp_check_result): They're now values of this new
3028         enumeration.
3029         (watchpoint_check): Change return type to wp_check_result and
3030         parameter type to bpstat.
3031         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3032         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3033         catch_errors.  Reverse logic of watchpoint_check call.
3034         (breakpoint_re_set_one): Now returns void and takes a breakpoint
3035         pointer as parameter.
3036         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3037         * common/common-exceptions.c (throw_exception_sjlj): Update
3038         comments to avoid mentioning catch_errors.
3039         * exceptions.c (catch_errors): Delete.
3040         * exceptions.h: Update comments to avoid mentioning catch_errors.
3041         (catch_errors_ftype, catch_errors): Delete.
3042         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3043         (hook_stop_stub): Delete.
3044         (restore_selected_frame): Change return type to void, and
3045         parameter type to const frame_id &.
3046         (restore_infcall_control_state): Use TRY/CATCH instead of
3047         catch_errors.
3048         * main.c (captured_command_loop): Return void and remove
3049         parameter.  Remove references to catch_errors.
3050         (captured_main): Use TRY/CATCH instead of catch_errors.
3051         * objc-lang.c (objc_submethod_helper_data)
3052         (find_objc_msgcall_submethod_helper): Delete.
3053         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3054         catch_errors.
3055         * record-full.c (record_full_message): Return void.
3056         (record_full_message_args, record_full_message_wrapper): Delete.
3057         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3058         instead of catch_errors.
3059         * solib-aix.c (solib_aix_open_symbol_file_object): Change
3060         parameter type to int.
3061         * solib-darwin.c (open_symbol_file_object): Ditto.
3062         * solib-dsbt.c (open_symbol_file_object): Ditto.
3063         * solib-frv.c (open_symbol_file_object): Ditto.
3064         * solib-svr4.c (open_symbol_file_object): Ditto.
3065         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3066         * solib.c (update_solib_list): Use TRY/CATCH instead of
3067         catch_errors.
3068         * solist.h (struct target_so_ops) <open_symbol_file_object>:
3069         Change type.
3070         * symmisc.c (struct print_symbol_args): Remove.
3071         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3072         (print_symbol): Change type.
3073         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3074         and remove parameters.
3075         (catch_errors): New.
3076         (get_windows_debug_event): Adjust.
3077
3078 2017-10-09  Tom Tromey  <tom@tromey.com>
3079
3080         * mi/mi-main.c (free_splay_tree): Remove.
3081         (list_available_thread_groups): Use splay_tree_up.
3082         * common/gdb_splay_tree.h: New file.
3083
3084 2017-10-09  Tom Tromey  <tom@tromey.com>
3085
3086         * mi/mi-main.c (do_nothing): Remove.
3087         (list_available_thread_groups): Update.
3088
3089 2017-10-09  Pedro Alves  <palves@redhat.com>
3090
3091         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3092         reading registers when switching context.
3093
3094 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
3095
3096         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3097         (fbsd_convert_siginfo): Likewise.
3098         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3099
3100 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
3101
3102         * configure.ac (try_guile_versions): Remove guile-2.2.
3103         * configure: Regenerate.
3104
3105 2017-10-09  Tom Tromey  <tom@tromey.com>
3106
3107         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3108         (COMPILE.pre): Use $(CXX).
3109
3110 2017-10-09  Pedro Alves  <palves@redhat.com>
3111
3112         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3113         Use bool.
3114         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3115         * cp-support.h (cp_remove_params): Now returns a
3116         gdb::unique_xmalloc_ptr.
3117         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3118         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3119         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3120         returning a gdb::unique_xmalloc_ptr.
3121         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3122         * stack.c (find_frame_funname): Adjust to cp_remove_params
3123         returning a gdb::unique_xmalloc_ptr.
3124
3125 2017-10-08  Tom Tromey  <tom@tromey.com>
3126
3127         * dwarf2read.c (dwarf2_get_dwz_file): Use
3128         gdb::unique_xmalloc_ptr.
3129         (find_slot_in_mapped_hash): Likewise.
3130         (dwarf2_physname): Likewise.
3131         (create_dwo_unit_in_dwp_v1): Use std::string.
3132         (create_dwo_unit_in_dwp_v2): Likewise.
3133         (lookup_dwo_cutu): Likewise.
3134         (inherit_abstract_dies): Use std::vector.
3135         (read_array_type): Likewise.
3136         (dwarf_decode_macros): Remove unused declaration.
3137         (unsigned_int_compar): Remove.
3138         (dwarf2_build_psymtabs_hard): Use scoped_restore.
3139         (psymtabs_addrmap_cleanup): Remove.
3140
3141 2017-10-08  Tom Tromey  <tom@tromey.com>
3142
3143         * frame-unwind.c (frame_unwind_try_unwinder): Update.
3144         * frame.h (frame_cleanup_after_sniffer): Declare.
3145         (frame_prepare_for_sniffer): Return void.
3146         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
3147         type of argument.
3148         (frame_prepare_for_sniffer): Return void.
3149
3150 2017-10-08  Tom Tromey  <tom@tromey.com>
3151
3152         * utils.h (make_cleanup_value_free): Remove.
3153         * utils.c (do_value_free, struct cleanup): Remove.
3154         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3155         Use gdb_value_up.
3156         * value.h (struct value_deleter): New.
3157         (gdb_value_up): New typedef.
3158
3159 2017-10-08  Tom Tromey  <tom@tromey.com>
3160
3161         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3162         (make_cleanup_free_search_symbols): Remove.
3163         (search_symbols): Return std::vector.
3164         (symbol_search::compare_search_syms): Now member of
3165         symbol_search.  Change arguments.
3166         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
3167         (symtab_symbol_info, rbreak_command): Update.
3168         * symtab.h (struct symbol_search) <next>: Remove.
3169         Add constructors.
3170         (symbol_search::operator<): New function.
3171         (symbol_search::operator==): New function.
3172         (search_symbols): Remove std::vector.
3173         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3174         (symbol_search::compare_search_syms): Declare.
3175
3176 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3177
3178         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3179         arch/aarch64-insn.o.
3180         Remove one rule.
3181         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3182
3183 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3184
3185         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3186         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3187         arch/arm-linux.o respectively.
3188         * configure.tgt: Likewise.
3189
3190 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3191
3192         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3193         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3194
3195 2017-10-06  Pedro Alves  <palves@redhat.com>
3196
3197         * windows-nat.c: Include <algorithm>.
3198
3199 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3200
3201         * configure.tgt (i386_tobjs): New variable.
3202         (amd64_tobjs): New variable.
3203         Set $cpu_obs and $os_obs.
3204
3205 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3206
3207         * Makefile.in (CONFIG_SRC_SUBDIR): New.
3208         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3209         (clean): Remove object files and dependency files.
3210         (distclean): Remove the directory.
3211         * configure.ac: Invoke AC_CONFIG_COMMANDS.
3212         * configure: Re-generated.
3213         * configure.tgt: Replace amd64.o with arch/amd64.o.
3214
3215 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
3216
3217         PR build/22188
3218         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3219         and SETEND.
3220
3221 2017-10-05  Pedro Alves  <palves@redhat.com>
3222
3223         * linux-nat.c (linux_child_follow_fork): When following the parent
3224         and detaching the child, consult the parent thread's architecture
3225         instead of the child's.
3226
3227 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3228
3229         * ax.h: Do not include "doublest.h".
3230         (union agent_val): Remove.
3231
3232 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3233
3234         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3235         (decimal_to_string): Return std::string object.
3236         (decimal_from_string): Accept std::string object.  Return bool.
3237         (decimal_from_integral, decimal_from_doublest): Remove.
3238         (decimal_from_longest): Add prototype.
3239         (decimal_from_ulongest): Likewise.
3240         (decimal_to_longest): Likewise.
3241         (decimal_from_doublest): Likewise.
3242         * dfp.c: Do not include "gdbtypes.h" or "value.h".
3243         (MAX_DECIMAL_STRING): Move here.
3244         (decimal_to_string): Return std::string object.
3245         (decimal_from_string): Accept std::string object.  Return bool.
3246         (decimal_from_integral): Remove, replace by ...
3247         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3248         (decimal_to_longest): New function.
3249         (decimal_from_floating): Remove, replace by ...
3250         (decimal_from_doublest): ... this new function.
3251         (decimal_to_doublest): Update to new decimal_to_string interface.
3252
3253         * value.c (unpack_long): Use decimal_to_longest.
3254         * valops.c (value_cast): Use decimal_from_doublest instead of
3255         decimal_from_floating.  Use decimal_from_[u]longest isntead of
3256         decimal_from_integral.
3257         * valarith.c (value_args_as_decimal): Likewise.
3258         * valprint.c (print_decimal_floating): Update to new
3259         decimal_to_string interface.
3260         * printcmd.c (printf_decfloat): Likewise.
3261         * c-exp.y (parse_number): Update to new decimal_from_string interface.
3262
3263 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3264
3265         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
3266         * gdbtypes.c: Include "floatformat.h".
3267         * value.c: Likewise.
3268         * m68k-tdep.c: Likewise.
3269
3270         * findvar.c: Do not include "floatformat.h".
3271         * amd64-darwin-tdep.c: Likewise.
3272         * arm-linux-tdep.c: Likewise.
3273         * i386-darwin-tdep.c: Likewise.
3274         * i387-tdep.c: Likewise.
3275         * m68k-linux-tdep.c: Likewise.
3276         * mep-tdep.c: Likewise.
3277         * mips-tdep.c: Likewise.
3278         * nios2-tdep.c: Likewise.
3279         * s390-linux-tdep.c: Likewise.
3280         * sparc-obsd-tdep.c: Likewise.
3281         * sparc-tdep.c: Likewise.
3282         * sparc64-tdep.c: Likewise.
3283         * spu-tdep.c: Likewise.
3284         * tic6x-tdep.c: Likewise.
3285         * tilegx-tdep.c: Likewise.
3286         * vax-tdep.c: Likewise.
3287         * xstormy16-tdep.c: Likewise.
3288         * xtensa-tdep.c: Likewise.
3289
3290         * top.c: Do not include "doublest.h".
3291         * aarch64-tdep.c: Likewise.
3292         * alpha-tdep.c: Likewise.
3293         * arm-linux-tdep.c: Likewise.
3294         * m68k-linux-tdep.c: Likewise.
3295         * tilegx-tdep.c: Likewise.
3296         * xstormy16-tdep.c: Likewise.
3297
3298 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3299
3300         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3301         (mipsn32_fbsd_sigframe): Define.
3302         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3303         for FreeBSD/mipsn32.
3304
3305 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3306
3307         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3308         AT_HWCAP.
3309
3310 2017-10-05  Tristan Gingold  <tgingold@free.fr>
3311
3312         * MAINTAINERS (Misc): Update my email address.
3313
3314 2017-10-04  Pedro Alves  <palves@redhat.com>
3315
3316         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
3317         it instead of target_gdbarch.
3318         (get_remote_state, get_remote_packet_size): Adjust
3319         get_remote_arch_state calls, passing down target_gdbarch
3320         explicitly.
3321         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3322         'gdbarch' and use it instead of target_gdbarch.
3323         (get_memory_packet_size): Adjust get_remote_arch_state calls,
3324         passing down target_gdbarch explicitly.
3325         (struct stop_reply) <arch>: New field.
3326         (remote_parse_stop_reply): Use the stopped thread's architecture,
3327         not the current inferior's.  Save the architecture in the
3328         stop_reply.
3329         (process_stop_reply): Use the stop reply's architecture.
3330         (process_g_packet, remote_fetch_registers)
3331         (remote_prepare_to_store, store_registers_using_G)
3332         (remote_store_registers): Adjust get_remote_arch_state calls,
3333         using the regcache's architecture.
3334         (remote_get_trace_status): Adjust get_remote_arch_state calls,
3335         passing down target_gdbarch explicitly.
3336         * spu-multiarch.c (spu_thread_architecture): Defer to the target
3337         beneath instead of calling target_gdbarch.
3338         * target.c (default_thread_architecture): Use the specified
3339         inferior's architecture, instead of the current inferior's
3340         architecture (via target_gdbarch).
3341
3342 2017-10-04  Pedro Alves  <palves@redhat.com>
3343
3344         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3345         case.
3346         (regcache_print): Handle !target_has_registers here instead.
3347
3348 2017-10-04  Pedro Alves  <palves@redhat.com>
3349
3350         * frame.c (create_test_frame): Delete.
3351         * frame.h (create_test_frame): Delete.
3352         * gdbarch-selftests.c: Include gdbthread.h and target.h.
3353         (class regcache_test): Delete.
3354         (test_target_has_registers, test_target_has_stack)
3355         (test_target_has_memory, test_target_prepare_to_store)
3356         (test_target_store_registers): New functions.
3357         (test_target_ops): New class.
3358         (register_to_value_test): Error out if there's already a
3359         process_stratum (or higher) target pushed.  Create a fuller mock
3360         environment, with mock target_ops, inferior, address space, thread
3361         and inferior_ptid.
3362         * progspace.c (struct address_space): Move to ...
3363         * progspace.h (struct address_space): ... here.
3364         * regcache.h (regcache::~regcache, regcache::raw_write)
3365         [GDB_SELF_TEST]: No longer virtual.
3366
3367 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
3368
3369         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3370
3371 2017-10-04  Pedro Alves  <palves@redhat.com>
3372
3373         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3374         out of 'between TRY and CATCH'.
3375
3376 2017-10-04  Pedro Alves  <palves@redhat.com>
3377
3378         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3379         * common/common-exceptions.h (TRY): Open an outermost scope.
3380         Expand intro comment.
3381         (CATCH): Reindent.
3382         (END_CATCH): Close the outermost scope.
3383         * completer.c (complete_line_internal): Add missing END_CATCH.
3384
3385 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3386
3387         * NEWS (Changes since GDB 8.0): Add entry about new
3388         'set-cwd-on-gdbserver' feature.
3389         (New remote packets): Add entry for QSetWorkingDir.
3390         * common/common-inferior.h (set_inferior_cwd): New prototype.
3391         * infcmd.c (set_inferior_cwd): Remove "static".
3392         (show_cwd_command): Expand text to include remote debugging.
3393         * remote.c: Add PACKET_QSetWorkingDir.
3394         (remote_protocol_features) <QSetWorkingDir>: New entry for
3395         PACKET_QSetWorkingDir.
3396         (extended_remote_set_inferior_cwd): New function.
3397         (extended_remote_create_inferior): Call
3398         "extended_remote_set_inferior_cwd".
3399         (_initialize_remote): Call "add_packet_config_cmd" for
3400         QSetWorkingDir.
3401
3402 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3403
3404         * NEWS (New commands): Mention "set/show cwd".
3405         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3406         "cd" command's help text.
3407         * common/common-inferior.h (get_inferior_cwd): New prototype.
3408         * infcmd.c (inferior_cwd_scratch): New global variable.
3409         (set_inferior_cwd): New function.
3410         (get_inferior_cwd): Likewise.
3411         (set_cwd_command): Likewise.
3412         (show_cwd_command): Likewise.
3413         (_initialize_infcmd): Add "set/show cwd" commands.
3414         * inferior.h (class inferior) <cwd>: New field.
3415         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3416         (fork_inferior): Change inferior's cwd before its execution.
3417         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3418         to CreateProcess.
3419
3420 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3421
3422         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3423         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3424         (COMMON_OBS): Add gdb_tilde_expand.o.
3425         * common/gdb_tilde_expand.c: New file.
3426         * common/gdb_tilde_expand.h: Likewise.
3427
3428 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
3429
3430         * gdbarch.sh (objfile): Remove duplicate declaration.
3431         * gdbarch.h: Regenerate.
3432
3433 2017-10-03  Tom Tromey  <tom@tromey.com>
3434
3435         * utils.c (internal_vproblem): Use string_vprintf.
3436
3437 2017-10-03  Tom Tromey  <tom@tromey.com>
3438
3439         * printcmd.c (info_symbol_command): Use std::string.
3440
3441 2017-10-03  Tom Tromey  <tom@tromey.com>
3442
3443         * top.c (gdb_safe_append_history): Use std::string.
3444
3445 2017-10-03  Tom Tromey  <tom@tromey.com>
3446
3447         * event-top.c (stdin_event_handler): Update.
3448         * main.c (captured_main_1): Update.
3449         * top.h (make_delete_ui_cleanup): Remove.
3450         (struct ui): Add constructor and destructor.
3451         (new_ui, delete_ui): Remove.
3452         * top.c (make_delete_ui_cleanup): Remove.
3453         (new_ui_command): Use std::unique_ptr.
3454         (delete_ui_cleanup): Remove.
3455         (ui::ui): Rename from new_ui.  Update.
3456         (free_ui): Remove.
3457         (ui::~ui): Rename from delete_ui.  Update.
3458
3459 2017-10-03  Tom Tromey  <tom@tromey.com>
3460
3461         * symfile.c (load_progress): Use gdb::byte_vector.
3462
3463 2017-10-03  Tom Tromey  <tom@tromey.com>
3464
3465         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3466         declaration.
3467         * printcmd.c (x_command): Remove unused declaration.
3468         * symfile.c (symbol_file_command): Remove unused declaration.
3469
3470 2017-10-03  Tom Tromey  <tom@tromey.com>
3471
3472         * utils.c (internal_vproblem): Use std::string.
3473         (defaulted_query): Likewise.
3474
3475 2017-10-03  Tom Tromey  <tom@tromey.com>
3476
3477         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3478         * top.c (execute_command_to_string): Update.
3479         * utils.c (make_cleanup_restore_page_info): Remove.
3480         (do_restore_page_info_cleanup): Remove.
3481         (set_batch_flag_and_restore_page_info):
3482         New.
3483         (make_cleanup_restore_page_info): Remove.
3484         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3485         (~set_batch_flag_and_restore_page_info): New
3486         (make_cleanup_restore_uinteger): Remove.
3487         (make_cleanup_restore_integer): Remove.
3488         (struct restore_integer_closure): Remove.
3489         (restore_integer): Remove.
3490         * utils.h (struct set_batch_flag_and_restore_page_info): New
3491         class.
3492         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3493         (make_cleanup_restore_page_info): Remove.
3494         (make_cleanup_restore_uinteger) Remove.
3495         (make_cleanup_restore_integer) Remove.
3496
3497 2017-10-03  Tom Tromey  <tom@tromey.com>
3498
3499         * record-full.h (record_full_gdb_operation_disable_set): Return
3500         scoped_restore_tmpl<int>.
3501         * infrun.c (adjust_pc_after_break): Update.
3502         (handle_signal_stop): Update.
3503         * record-full.c (record_full_gdb_operation_disable_set): Return
3504         scoped_restore_tmpl<int>.
3505         (record_full_wait_1, record_full_insert_breakpoint)
3506         (record_full_remove_breakpoint, record_full_save)
3507         (record_full_goto_insn): Update.
3508
3509 2017-10-02  Tom Tromey  <tom@tromey.com>
3510
3511         PR rust/22236:
3512         * rust-lang.c (rust_val_print_str): New function.
3513         (val_print_struct): Call it.
3514         (rust_subscript): Preserve name of slice type.
3515
3516 2017-10-02  Tom Tromey  <tom@tromey.com>
3517
3518         * rust-lang.c (rust_subscript): Handle slices in
3519         EVAL_AVOID_SIDE_EFFECTS case.
3520
3521 2017-10-02  Tom Tromey  <tom@tromey.com>
3522
3523         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3524
3525 2017-10-02  Tom Tromey  <tom@tromey.com>
3526
3527         * rust-lang.h (rust_slice_type): Add "extern".
3528
3529 2017-10-02  Tom Tromey  <tom@tromey.com>
3530             Pedro Alves  <palves@redhat.com>
3531
3532         * ada-lang.h (ada_exc_info::operator<): Make const.
3533         (ada_exc_info::operator==): Make const.
3534         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3535         Make const.
3536
3537 2017-09-29  Tom Tromey  <tom@tromey.com>
3538
3539         * target.c (read_whatever_is_readable): Change type of "result".
3540         Update.
3541         (free_memory_read_result_vector): Remove.
3542         (read_memory_robust): Change return type.  Update.
3543         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
3544         bin2hex, std::string.
3545         * target.h (memory_read_result_s): Remove typedef.
3546         (free_memory_read_result_vector): Remove.
3547         (read_memory_robust): Return std::vector.
3548
3549 2017-09-29  Tom Tromey  <tom@tromey.com>
3550
3551         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3552
3553 2017-09-29  Tom Tromey  <tom@tromey.com>
3554
3555         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3556         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
3557         operator< and operator==.
3558         (ada_exceptions_list): Return a std::vector.
3559         * ada-lang.c (ada_exc_info::operator<): Rename from
3560         compare_ada_exception_info.
3561         (ada_exc_info::operator==): New.
3562         (sort_remove_dups_ada_exceptions_list): Change type of
3563         "exceptions".
3564         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3565         (ada_add_global_exceptions): Likewise.
3566         (ada_exceptions_list_1): Return a std::vector.
3567         (ada_exceptions_list): Likewise.
3568
3569 2017-09-29  Tom Tromey  <tom@tromey.com>
3570
3571         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3572         'std::set *'.
3573         (print_one_inferior): Update.
3574         (free_vector_of_ints): Remove.
3575         (list_available_thread_groups): Change "ids" to std::set.
3576         (mi_cmd_list_thread_groups): Update.
3577         (struct collect_cores_data) <core>: Now a std::set.
3578         (collect_cores): Update.
3579         (unique): Remove.
3580         (print_one_inferior): Update.
3581
3582 2017-09-29  Tom Tromey  <tom@tromey.com>
3583
3584         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3585         (mi_execute_async_cli_command): Likewise.
3586         (mi_cmd_trace_frame_collected): Use field_fmt.
3587
3588 2017-09-29  Tom Tromey  <tom@tromey.com>
3589
3590         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3591         gdb::byte_vector.
3592
3593 2017-09-29  Tom Tromey  <tom@tromey.com>
3594
3595         * mi/mi-parse.c (mi_parse): Remove unused declaration.
3596
3597 2017-09-29  Tom Tromey  <tom@tromey.com>
3598
3599         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3600
3601 2017-09-29  Tom Tromey  <tom@tromey.com>
3602
3603         * varobj.h (varobj_gen_name): Return std::string.
3604         * varobj.c (varobj_gen_name): Return std::string.
3605         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3606         (mi_cmd_var_delete): Don't copy "name".
3607
3608 2017-09-29  Tom Tromey  <tom@tromey.com>
3609
3610         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3611         (mi_cmd_break_insert_1): Update.
3612
3613 2017-09-29  Tom Tromey  <tom@tromey.com>
3614
3615         * target.h (make_scoped_defer_target_commit_resume): Update.
3616         * target.c (make_scoped_defer_target_commit_resume): Rename from
3617         make_cleanup_defer_target_commit_resume.  Return a
3618         scoped_restore.
3619         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3620
3621 2017-09-29  Tom Tromey  <tom@tromey.com>
3622
3623         * main.c (captured_main_1): Remove unused declaration.
3624         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3625
3626 2017-09-29  Tom Tromey  <tom@tromey.com>
3627
3628         * symtab.c (search_symbols): Remove unused outer cleanup.
3629         (make_source_files_completion_list): Remove unused declaration.
3630
3631 2017-09-29  Tom Tromey  <tom@tromey.com>
3632
3633         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3634
3635 2017-09-29  Tom Tromey  <tom@tromey.com>
3636
3637         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3638         gdb::byte_vector.
3639
3640 2017-09-29  Tom Tromey  <tom@tromey.com>
3641
3642         * complaints.c (vcomplaint): Use std::string.
3643
3644 2017-09-29  Tom Tromey  <tom@tromey.com>
3645
3646         * tracepoint.c (trace_variable_command): Use std::string.
3647         (encode_actions_1): Remove unused declarations.
3648         (create_tsv_from_upload): Use std::string.
3649
3650 2017-09-29  Tom Tromey  <tom@tromey.com>
3651
3652         * cp-support.c (gdb_demangle): Use std::string.
3653
3654 2017-09-29  Tom Tromey  <tom@tromey.com>
3655
3656         * stack.c (parse_frame_specification): Use std::string
3657         (info_frame_command): Use gdb::unique_xmalloc_ptr.
3658
3659 2017-09-29  Tom Tromey  <tom@tromey.com>
3660
3661         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3662
3663 2017-09-29  Tom Tromey  <tom@tromey.com>
3664
3665         * utils.c (vfprintf_maybe_filtered): Use std::string.
3666         (vfprintf_unfiltered): Likewise.
3667
3668 2017-09-29  Tom Tromey  <tom@tromey.com>
3669
3670         * event-top.c (top_level_prompt): Return std::string.
3671         (display_gdb_prompt): Update.
3672
3673 2017-09-29  Tom Tromey  <tom@tromey.com>
3674
3675         * unittests/common-utils-selftests.c (format): New function.
3676         (string_vprintf_tests): New function.
3677         (_initialize_common_utils_selftests): Register new tests.
3678         * common/common-utils.c (string_vprintf): New function.
3679         * common/common-utils.h (string_vprintf): Declare.
3680
3681 2017-09-29  Pedro Alves  <palves@redhat.com>
3682
3683         * common/rsp-low.c (unpack_varlen_hex): Constify.
3684         * common/rsp-low.h (unpack_varlen_hex): Constify.
3685         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3686         Constify.
3687         * remote.c (remote_set_permissions, read_ptid)
3688         (remote_current_thread, remote_get_threads_with_qthreadinfo)
3689         (remote_static_tracepoint_marker_at)
3690         (remote_static_tracepoint_markers_by_strid)
3691         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3692         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3693         (parse_tracepoint_definition, parse_tsv_definition)
3694         (parse_static_tracepoint_marker_definition): Constify.
3695         * tracepoint.h (parse_static_tracepoint_marker_definition)
3696         (parse_trace_status, parse_tracepoint_status)
3697         (parse_tracepoint_definition, parse_tsv_definition): Constify.
3698
3699 2017-09-29  Pedro Alves  <palves@redhat.com>
3700
3701         * remote.c (target_buf, target_buf_size): Delete.
3702         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3703         Use the connection's packet buffer instead.
3704         All callers adjusted.
3705         (_initialize_remote): Remove references to target_buf and
3706         target_buf_size.
3707
3708 2017-09-28  Pedro Alves  <palves@redhat.com>
3709
3710         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3711         unittests/common-utils-selftests.c.
3712         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
3713         (COMMON_OBS): Remove utils-selftests.o.
3714         * utils-selftests.c: Move to ...
3715         * unittests/common-utils-selftests.c: ... here and rename self
3716         test to "string_printf".
3717
3718 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
3719
3720         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
3721         having NULL cus or tus.
3722
3723 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3724
3725         * arm-tdep.c: (convert_from_extended): Remove.
3726         (convert_to_extended): Likewise.
3727         (arm_extract_return_value): Use convert_typed_floating.
3728         (arm_store_return_value): Likewise.
3729
3730         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3731         * sh-tdep.c: Do not include "floatformat.h".
3732         (sh_littlebyte_bigword_type): New function.
3733         (sh_register_convert_to_virtual): Use convert_typed_floating.
3734         (sh_register_convert_to_raw): Likewise.
3735         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3736         (sh64_littlebyte_bigword_type): New function.
3737         (sh64_extract_return_value): Use convert_typed_floating.
3738         (sh64_register_convert_to_virtual): Likewise.
3739         (sh64_register_convert_to_raw): Likewise.
3740
3741 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3742
3743         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
3744         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
3745
3746         * gdbtypes.h (union type_specific): Make field floatformat hold
3747         just a single struct floatformat, not an array.
3748         (floatformat_from_type): Move here.
3749         * gdbtypes.c (floatformat_from_type): Move here.  Update to
3750         changed TYPE_FLOATFORMAT definition.
3751         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
3752         (recursive_dump_type): Likewise.
3753         (init_float_type): Install correct floatformat for byte order.
3754         (arch_float_type): Likewise.
3755
3756 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3757
3758         * gdbtypes.c (init_type): Change incoming argument from
3759         length-in-bytes to length-in-bits.  Assert length is a
3760         multiple of TARGET_CHAR_BITS.
3761         (arch_type, arch_flags_type): Likewise.
3762         (init_integer_type): Update call to init_type.
3763         (init_character_type): Likewise.
3764         (init_boolean_type): Likewise.
3765         (init_float_type): Likewise.
3766         (init_decfloat_type): Likewise.
3767         (init_complex_type): Likewise.
3768         (init_pointer_type): Likewise.
3769         (objfile_type): Likewise.
3770         (arch_integer_type): Update call to arch_type.
3771         (arch_character_type): Likewise.
3772         (arch_boolean_type): Likewise.
3773         (arch_float_type): Likewise.
3774         (arch_decfloat_type): Likewise.
3775         (arch_complex_type): Likewise.
3776         (arch_pointer_type): Likewise.
3777         (gdbtypes_post_init): Likewise.
3778
3779         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
3780         (read_base_type): Likewise.
3781         * mdebugread.c (basic_type): Likewise.
3782         * stabsread.c (dbx_init_float_type): Likewise.
3783         (rs6000_builtin_type): Likewise.
3784         (read_range_type): Likewise.  Also, fix call to init_integer_type
3785         with erroneous length argument.
3786
3787         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
3788         * d-lang.c (build_d_types): Likewise.
3789         * f-lang.c (build_fortran_types): Likewise.
3790         * go-lang.c (build_go_types): Likewise.
3791         * opencl-lang.c (build_opencl_types): Likewise.
3792         * jit.c (finalize_symtab): Likewise.
3793         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
3794         (build_std_type_info_type): Likewise.
3795         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
3796         update call to arch_flags_type.
3797
3798         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
3799         arch_type.
3800         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
3801         * windows-tdep.c (windows_get_tlb_type): Likewise.
3802
3803         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
3804         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3805         * m32c-tdep.c (make_types): Likewise.
3806         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
3807         (rl78_psw_type): Update call to arch_flags_type.
3808         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
3809         * rx-tdep.c (rx_psw_type): Likewise.
3810         (rx_fpsw_type): Likewise.
3811         * sparc-tdep.c (sparc_psr_type): Likewise.
3812         (sparc_fsr_type): Likewise.
3813         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
3814         (sparc64_ccr_type): Likewise.
3815         (sparc64_fsr_type): Likewise.
3816         (sparc64_fprs_type): Likewise.
3817
3818 2017-09-27  Tom Tromey  <tom@tromey.com>
3819
3820         * findcmd.c (find_command): Constify.
3821
3822 2017-09-27  Tom Tromey  <tom@tromey.com>
3823
3824         * ada-tasks.c (task_command_1, task_command): Constify.
3825
3826 2017-09-27  Tom Tromey  <tom@tromey.com>
3827
3828         * symtab.c (maintenance_print_symbol_cache)
3829         (maintenance_flush_symbol_cache)
3830         (maintenance_print_symbol_cache_statistics): Constify.
3831
3832 2017-09-27  Tom Tromey  <tom@tromey.com>
3833
3834         * inferior.c (detach_inferior_command, kill_inferior_command)
3835         (inferior_command): Constify.
3836
3837 2017-09-27  Tom Tromey  <tom@tromey.com>
3838
3839         * regcache.c (regcache_print, maintenance_print_registers)
3840         (maintenance_print_raw_registers)
3841         (maintenance_print_cooked_registers)
3842         (maintenance_print_register_groups)
3843         (maintenance_print_remote_registers): Constify.
3844
3845 2017-09-27  Tom Tromey  <tom@tromey.com>
3846
3847         * printcmd.c (map_display_numbers, undisplay_command)
3848         (enable_disable_display_command, enable_display_command)
3849         (disable_display_command): Constify.
3850
3851 2017-09-27  Tom Tromey  <tom@tromey.com>
3852
3853         * breakpoint.h (delete_command): Don't declare.
3854         * breakpoint.c (delete_command, enable_once_command)
3855         (enable_count_command, enable_delete_command, breakpoint_1)
3856         (maintenance_info_breakpoints, stopin_command, stopat_command)
3857         (delete_command, delete_trace_command, save_breakpoints)
3858         (save_breakpoints_command, save_tracepoints_command): Constify.
3859
3860 2017-09-27  Tom Tromey  <tom@tromey.com>
3861
3862         * macrocmd.c (macro_expand_command, macro_expand_once_command)
3863         (skip_ws, extract_identifier, macro_define_command)
3864         (macro_undef_command, macro_list_command): Constify.
3865
3866 2017-09-27  Tom Tromey  <tom@tromey.com>
3867
3868         * infcmd.c (environment_info, set_environment_command)
3869         (unset_environment_command, path_info, info_proc_cmd_1)
3870         (info_proc_cmd_mappings, info_proc_cmd_stat)
3871         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
3872         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
3873
3874 2017-09-27  Tom Tromey  <tom@tromey.com>
3875
3876         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
3877         Constify.
3878
3879 2017-09-27  Tom Tromey  <tom@tromey.com>
3880
3881         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
3882
3883 2017-09-27  Tom Tromey  <tom@tromey.com>
3884
3885         * demangle.c (demangle_command): Constify.
3886
3887 2017-09-27  Tom Tromey  <tom@tromey.com>
3888
3889         * progspace.c (maintenance_info_program_spaces_command):
3890         Constify.
3891
3892 2017-09-27  Tom Tromey  <tom@tromey.com>
3893
3894         * compile/compile.c (check_raw_argument, compile_file_command)
3895         (compile_code_command, compile_print_command): Constify.
3896
3897 2017-09-27  Tom Tromey  <tom@tromey.com>
3898
3899         * reggroups.c (maintenance_print_reggroups): Constify.
3900
3901 2017-09-27  Tom Tromey  <tom@tromey.com>
3902
3903         * dwarf2read.c (save_gdb_index_command): Constify.
3904
3905 2017-09-27  Tom Tromey  <tom@tromey.com>
3906
3907         * stap-probe.c (info_probes_stap_command): Constify.
3908
3909 2017-09-27  Tom Tromey  <tom@tromey.com>
3910
3911         * fork-child.c (unset_exec_wrapper_command): Constify.
3912
3913 2017-09-27  Tom Tromey  <tom@tromey.com>
3914
3915         * btrace.c (get_uint, get_context_size, no_chunk)
3916         (maint_btrace_packet_history_cmd)
3917         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
3918         (maint_info_btrace_cmd): Constify.
3919
3920 2017-09-27  Tom Tromey  <tom@tromey.com>
3921
3922         * reverse.c (delete_bookmark_command): Constify.
3923
3924 2017-09-27  Tom Tromey  <tom@tromey.com>
3925
3926         * remote.c (set_memory_packet_size)
3927         (set_memory_write_packet_size, show_memory_write_packet_size)
3928         (set_memory_read_packet_size, show_memory_read_packet_size)
3929         (compare_sections_command, packet_command, remote_put_command)
3930         (remote_get_command, remote_delete_command): Constify.
3931
3932 2017-09-27  Tom Tromey  <tom@tromey.com>
3933
3934         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
3935         (set_mipsfpu_double_command, set_mipsfpu_none_command)
3936         (set_mipsfpu_auto_command): Constify.
3937
3938 2017-09-27  Tom Tromey  <tom@tromey.com>
3939
3940         * cli/cli-cmds.h (cd_command): Constify.
3941         * cli/cli-cmds.c (cd_command): Constify.
3942
3943 2017-09-27  Tom Tromey  <tom@tromey.com>
3944
3945         * thread.c (thread_name_command, thread_find_command): Constify.
3946
3947 2017-09-27  Tom Tromey  <tom@tromey.com>
3948
3949         * probe.c (enable_probes_command, disable_probes_command):
3950         Constify.
3951
3952 2017-09-27  Tom Tromey  <tom@tromey.com>
3953
3954         * symfile.c (symbol_file_command): Constify.
3955         * gdbcore.h (deprecated_file_changed_hook): Constify.
3956         * exec.c (deprecated_file_changed_hook, exec_file_command)
3957         (file_command): Constify.
3958         * defs.h (symbol_file_command): Constify.
3959
3960 2017-09-27  Tom Tromey  <tom@tromey.com>
3961
3962         * remote-fileio.c (set_system_call_allowed)
3963         (show_system_call_allowed): Constify.
3964
3965 2017-09-27  Tom Tromey  <tom@tromey.com>
3966
3967         * tracepoint.c (delete_trace_variable_command)
3968         (tfind_end_command, tfind_start_command, tfind_pc_command)
3969         (tfind_tracepoint_command, tfind_line_command)
3970         (tfind_range_command, tfind_outside_command): Constify.
3971
3972 2017-09-27  Tom Tromey  <tom@tromey.com>
3973
3974         * ax-gdb.c (maint_agent_printf_command, agent_command)
3975         (agent_eval_command): Constify.
3976
3977 2017-09-27  Tom Tromey  <tom@tromey.com>
3978
3979         * tracepoint.c (info_scope_command): Constify.
3980         * python/python.c (gdbpy_decode_line): Constify.
3981         * python/py-breakpoint.c (bppy_init): Constify.
3982         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
3983         * location.h: (new_linespec_location)
3984         (string_to_event_location_basic, string_to_event_location):
3985         Constify.
3986         * location.c (new_linespec_location)
3987         (string_to_event_location_basic, string_to_event_location):
3988         Constify.
3989         * linespec.h (decode_line_with_current_source)
3990         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
3991         * linespec.c (linespec_lex_to_end)
3992         (decode_line_with_current_source)
3993         (decode_line_with_last_displayed): Constify.
3994         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
3995         Constify.
3996         * cli/cli-cmds.c (edit_command, list_command): Constify.
3997         * breakpoint.h (until_break_command, watch_command_wrapper)
3998         (awatch_command_wrapper, rwatch_command_wrapper)
3999         (init_ada_exception_breakpoint): Constify.
4000         * breakpoint.c (break_command_1, dprintf_command)
4001         (break_range_command, watch_command_wrapper)
4002         (rwatch_command_wrapper, awatch_command_wrapper)
4003         (until_break_command, init_ada_exception_breakpoint)
4004         (strace_marker_create_sals_from_location, trace_command)
4005         (ftrace_command, strace_command, struct tracepoint): Constify.
4006         * ax-gdb.c (agent_command_1): Constify.
4007         * ada-lang.c (ada_exception_sal): Constify.
4008
4009 2017-09-27  Tom Tromey  <tom@tromey.com>
4010
4011         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4012         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4013         (get_context_size, no_chunk, get_insn_history_modifiers)
4014         (cmd_record_insn_history, get_call_history_modifiers)
4015         (cmd_record_call_history): Constify.
4016
4017 2017-09-27  Tom Tromey  <tom@tromey.com>
4018
4019         * source.c (show_substitute_path_command)
4020         (unset_substitute_path_command, set_substitute_path_command):
4021         Constify.
4022
4023 2017-09-27  Tom Tromey  <tom@tromey.com>
4024
4025         * typeprint.c (maintenance_print_type): Constify.
4026         * maint.c (maintenance_dump_me, maintenance_demangle)
4027         (maintenance_time_display, maintenance_info_sections)
4028         (maintenance_print_statistics, maintenance_deprecate)
4029         (maintenance_undeprecate): Constify.
4030         (maintenance_do_deprecate): Constify.  Use std::string.
4031         (maintenance_selftest): Constify.
4032         * gdbtypes.h (maintenance_print_type): Constify.
4033
4034 2017-09-27  Tom Tromey  <tom@tromey.com>
4035
4036         * hppa-tdep.c (unwind_command): Constify.
4037
4038 2017-09-27  Tom Tromey  <tom@tromey.com>
4039
4040         * target-descriptions.c (unset_tdesc_filename_cmd)
4041         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4042         Constify.
4043
4044 2017-09-27  Tom Tromey  <tom@tromey.com>
4045
4046         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4047
4048 2017-09-27  Tom Tromey  <tom@tromey.com>
4049
4050         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4051
4052 2017-09-27  Tom Tromey  <tom@tromey.com>
4053
4054         * tui/tui-regs.c (tui_reg_command): Constify.
4055
4056 2017-09-27  Tom Tromey  <tom@tromey.com>
4057
4058         * skip.c (skip_file_command, skip_function_command)
4059         (skip_enable_command, skip_disable_command, skip_delete_command):
4060         Constify.
4061
4062 2017-09-27  Tom Tromey  <tom@tromey.com>
4063
4064         * record-btrace.c (cmd_record_btrace_bts_start)
4065         (cmd_record_btrace_pt_start): Constify.
4066
4067 2017-09-27  Tom Tromey  <tom@tromey.com>
4068
4069         * symmisc.c (maintenance_print_symbols)
4070         (maintenance_print_msymbols, maintenance_print_objfiles)
4071         (maintenance_info_symtabs, maintenance_check_symtabs)
4072         (maintenance_expand_symtabs, maintenance_info_line_tables):
4073         Constify.
4074
4075 2017-09-27  Tom Tromey  <tom@tromey.com>
4076
4077         * top.c (new_ui_command): Constify.
4078
4079 2017-09-27  Tom Tromey  <tom@tromey.com>
4080
4081         * symfile.c (add_symbol_file_command)
4082         (remove_symbol_file_command, list_overlays_command)
4083         (map_overlay_command, unmap_overlay_command)
4084         (overlay_auto_command, overlay_manual_command)
4085         (overlay_off_command, overlay_load_command): Constify.
4086
4087 2017-09-27  Tom Tromey  <tom@tromey.com>
4088
4089         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4090         (info_spu_mailbox_command, info_spu_dma_command)
4091         (info_spu_proxydma_command): Constify.
4092
4093 2017-09-27  Tom Tromey  <tom@tromey.com>
4094
4095         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4096
4097 2017-09-27  Tom Tromey  <tom@tromey.com>
4098
4099         * cli/cli-script.c (user_defined_command): Constify.
4100
4101 2017-09-27  Tom Tromey  <tom@tromey.com>
4102
4103         * cli/cli-dump.c (dump_memory_command, dump_value_command)
4104         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4105         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4106         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4107         (dump_binary_value, append_binary_memory, append_binary_value):
4108         Constify.
4109         (struct dump_context) <func>: Constify.
4110         (add_dump_command): Update.
4111
4112 2017-09-27  Tom Tromey  <tom@tromey.com>
4113
4114         * cli/cli-cmds.c (show_version, show_configuration)
4115         (source_command, show_user): Constify.
4116
4117 2017-09-27  Tom Tromey  <tom@tromey.com>
4118
4119         * target.c (maintenance_print_target_stack): Constify.
4120
4121 2017-09-27  Tom Tromey  <tom@tromey.com>
4122
4123         * interps.c (interpreter_exec_cmd): Constify.
4124
4125 2017-09-27  Tom Tromey  <tom@tromey.com>
4126
4127         * record-full.c (cmd_record_full_restore): Constify.
4128
4129 2017-09-27  Tom Tromey  <tom@tromey.com>
4130
4131         * memattr.c (enable_mem_command, disable_mem_command)
4132         (delete_mem_command): Constify.
4133
4134 2017-09-27  Tom Tromey  <tom@tromey.com>
4135
4136         * value.c (show_convenience): Constify.
4137
4138 2017-09-27  Tom Tromey  <tom@tromey.com>
4139
4140         * gdbcore.h (core_file_command): Update.
4141         * corefile.c (core_file_command): Constify.
4142
4143 2017-09-27  Tom Tromey  <tom@tromey.com>
4144
4145         * user-regs.c (maintenance_print_user_registers): Constify.
4146
4147 2017-09-27  Tom Tromey  <tom@tromey.com>
4148
4149         * cp-namespace.c (maintenance_cplus_namespace): Constify.
4150
4151 2017-09-27  Tom Tromey  <tom@tromey.com>
4152
4153         * cp-support.c (first_component_command): Constify.
4154
4155 2017-09-27  Tom Tromey  <tom@tromey.com>
4156
4157         * psymtab.c (maintenance_print_psymbols)
4158         (maintenance_info_psymtabs, maintenance_check_psymtabs):
4159         Constify.
4160
4161 2017-09-27  Tom Tromey  <tom@tromey.com>
4162
4163         * windows-tdep.c (display_tib): Constify.
4164
4165 2017-09-27  Tom Tromey  <tom@tromey.com>
4166
4167         * linux-fork.c (delete_checkpoint_command)
4168         (detach_checkpoint_command): Constify.
4169
4170 2017-09-27  Tom Tromey  <tom@tromey.com>
4171
4172         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4173
4174 2017-09-27  Tom Tromey  <tom@tromey.com>
4175
4176         * arc-tdep.c (dump_arc_instruction_command): Constify.
4177
4178 2017-09-27  Tom Tromey  <tom@tromey.com>
4179
4180         * valprint.c (set_radix, show_radix): Constify.
4181
4182 2017-09-27  Tom Tromey  <tom@tromey.com>
4183
4184         * dtrace-probe.c (info_probes_dtrace_command): Constify.
4185
4186 2017-09-27  Tom Tromey  <tom@tromey.com>
4187
4188         * command.h (not_just_help_class_command): Update.
4189         * cli/cli-decode.h (not_just_help_class_command): Update.
4190         * cli/cli-decode.c (not_just_help_class_command): Constify.
4191
4192 2017-09-27  Tom Tromey  <tom@tromey.com>
4193
4194         * gdb_bfd.c (maintenance_info_bfds): Constify.
4195
4196 2017-09-27  Tom Tromey  <tom@tromey.com>
4197
4198         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4199         overloads.
4200         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
4201         (do_const_cfunc): New function.
4202         (cmd_cfunc_eq): New overload.
4203         (cli_user_command_p): Check do_const_cfunc.
4204         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4205         const_cfunc.
4206         * command.h (add_cmd): Add const overload and no-function
4207         overload.
4208         (set_cmd_cfunc): Add const overload.
4209         (cmd_const_cfunc_ftype): Declare.
4210         (cmd_cfunc_eq): Add const overload.
4211         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4212         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4213         overload.
4214
4215 2017-09-27  Tom Tromey  <tom@tromey.com>
4216
4217         * macroexp.c (get_next_token_for_substitution): New function.
4218         (substitute_args): Call it.  Check for __VA_OPT__.
4219
4220 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4221             Pedro Alves <palves@redhat.com>
4222
4223         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4224         producer_is_icc_lt_14.
4225         (producer_is_icc_lt_14): New function.
4226         (check_producer): Add code for checking version of ICC.
4227         (producer_is_icc): Move to producer.c.
4228         (read_structure_type): Restrict ICC workaround to ICC<14.
4229         * producer.c: Include selftest.h.
4230         (producer_is_icc, producer_parsing_tests, _initialize_producer):
4231         New functions.
4232         * producer.h (producer_is_icc): New declaration.
4233
4234 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4235
4236         * Makefile.in (SFILES): Add producer.c.
4237         (COMMON_OBS): Add producer.o
4238         * amd64-tdep.c (producer.h): Add new include.
4239         * dwarf2read.c (producer.h): Add new include.
4240         * producer.c: New file.
4241         * producer.h: New file.
4242         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4243         producer.c.
4244         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4245         producer.h.
4246
4247 2017-09-26  Matthias Klose  <doko@ubuntu.com>
4248
4249         * configure.ac: Search ncursesw before ncurses.
4250         Check ncursesw/ncurses.h before ncurses/ncurses.h.
4251         * gdb_curses.h: Include <ncursesw/ncurses.h>
4252         * config.in, configure: Regenerate.
4253
4254 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4255
4256         PR gdb/22185
4257         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4258         obsolete.
4259         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4260         Remove i386sol2 support.
4261         * configure.nat <i386sol2>: Remove.
4262         <sol2-64>: Fold into ...
4263         <sol2>: ... this.
4264         Move common settings to default section.
4265         Add sol-thread.o.
4266         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4267         x86_64-*-solaris2.1[0-9]*>: Rename to ...
4268         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4269         <i[34567]86-*-solaris*>: Remove.
4270         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4271
4272         * configure.ac: Remove wctype in libw check.
4273         (_MSE_INT_H): Don't define on Solaris 7-9.
4274         <solaris*>: Remove libthread_db.so.1 check.
4275         * configure: Regenerate.
4276         * config.in: Regenerate.
4277
4278         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4279         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4280         (gdb_ps_size_t): Remove.
4281         Use base types in users.
4282         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4283
4284         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4285
4286 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4287
4288         PR build/22206
4289         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4290         (adi_is_addr_mapped): Likewise.
4291         (PSR_ICC): Don't redefine.
4292         (PSR_IMPL): Likewise.
4293
4294 2017-09-25  Tom Tromey  <tom@tromey.com>
4295
4296         * regcache.c (regcache::dump): Use string_printf.
4297
4298 2017-09-25  Tom Tromey  <tom@tromey.com>
4299
4300         * regcache.c (class regcache_invalidator): New.
4301         (struct register_to_invalidate): Remove.
4302         (make_cleanup_regcache_invalidate): Remove.
4303         (regcache::raw_write): Use regcache_invalidator.
4304
4305 2017-09-25  Tom Tromey  <tom@tromey.com>
4306
4307         * spu-tdep.c (spu2ppu_sniffer): Update.
4308         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4309         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4310         Remove.
4311         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4312         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4313         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4314         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4315         (frame_pop): Update.
4316
4317 2017-09-25  Tom Tromey  <tom@tromey.com>
4318
4319         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4320         * regcache.h (regcache_xfree): Don't declare.
4321         * regcache.c (regcache_xfree): Remove.
4322         (do_regcache_xfree): Use delete.
4323         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4324         * linux-fork.c (free_fork): Use delete.
4325         (fork_save_infrun_state): Likewise.
4326         * jit.c (jit_dealloc_cache): Use delete.
4327         * infrun.c (discard_infcall_suspend_state): Use delete.
4328
4329 2017-09-25  Tom Tromey  <tom@tromey.com>
4330
4331         * regcache.h (regcache_xmalloc): Don't declare.
4332         (regcache_raw_set_cached_value): Update comment.
4333         * regcache.c (regcache_xmalloc): Remove.
4334         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4335         * jit.c (jit_frame_sniffer): Use new.
4336         * frame.c (frame_save_as_regcache): Use new.
4337
4338 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4339
4340         * NEWS: Advertise support for guarded-storage registers on IBM z.
4341
4342 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4343
4344         * s390-linux-nat.c (have_regset_gs): New static variable.
4345         (s390_linux_fetch_inferior_registers): Handle guarded-storage
4346         control block and guarded-storage broadcast control regsets.
4347         (s390_read_description): Detect whether the target has
4348         guarded-storage support, return appropriate tdesc.
4349         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4350         (features/s390x-gs-linux64.c): Likewise.
4351         (struct gdbarch_tdep) <have_gs>: New field.
4352         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4353         (s390_gsbc_regset): New variables.
4354         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4355         and s390_gsbc_regset, if applicable.
4356         (s390_core_read_description): Check whether core file was from a
4357         target with guarded-storage support; include appropriate regsets.
4358         (s390_gdbarch_init): Add registers for guarded-storage support.
4359         (_initialize_s390_tdep): Initialize new target descriptions that
4360         include registers for guarded-storage support.
4361         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4362         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4363         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4364         (S390_NUM_REGS): Adjust macro definition.
4365         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4366         (tdesc_s390x_gs_linux64): New declarations.
4367
4368 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4369
4370         * features/s390-gs-linux64.xml: New file.
4371         * features/s390-gs.xml: New file.
4372         * features/s390-gsbc.xml: New file.
4373         * features/s390x-gs-linux64.xml: New file.
4374         * features/Makefile (WHICH): Add s390-gs-linux64 and
4375         s390x-gs-linux64.
4376         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4377         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4378         * features/s390-gs-linux64.c: New generated file.
4379         * features/s390x-gs-linux64.c: New file.
4380         * regformats/s390-gs-linux64.dat: New file.
4381         * regformats/s390x-gs-linux64.dat: New file.
4382
4383 2017-09-23  Tom Tromey  <tom@tromey.com>
4384
4385         * defs.h (make_cleanup_override_quit_handler): Don't declare.
4386
4387 2017-09-22  Tom Tromey  <tom@tromey.com>
4388
4389         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4390         type to scoped_restore_tmpl.
4391         <scoped_input_handler>: Initialize m_quit_handler directly.
4392
4393 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4394
4395         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4396         (cd_command): Likewise.  Free "current_directory" before
4397         assigning to it.
4398         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4399         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4400         * top.c (gdb_dirbuf): Remove global declaration.
4401         * top.h (gdb_dirbuf): Likewise.
4402
4403 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4404
4405         * gnulib/aclocal.m4: Regenerate.
4406         * gnulib/config.in: Regenerate.
4407         * gnulib/configure: Regenerate.
4408         * gnulib/import/Makefile.am: Regenerate.
4409         * gnulib/import/Makefile.in: Regenerate.
4410         * gnulib/import/assure.h: New file.
4411         * gnulib/import/at-func.c: Likewise
4412         * gnulib/import/chdir-long.c: New file.
4413         * gnulib/import/chdir-long.h: New file.
4414         * gnulib/import/cloexec.c: New file.
4415         * gnulib/import/cloexec.h: New file.
4416         * gnulib/import/close.c: New file.
4417         * gnulib/import/closedir.c: New file.
4418         * gnulib/import/dirent-private.h: New file.
4419         * gnulib/import/dup-safer.c: New file.
4420         * gnulib/import/dup.c: New file.
4421         * gnulib/import/dup2.c: New file.
4422         * gnulib/import/error.c: New file.
4423         * gnulib/import/error.h: New file.
4424         * gnulib/import/exitfail.c: New file.
4425         * gnulib/import/exitfail.h: New file.
4426         * gnulib/import/fchdir.c: New file.
4427         * gnulib/import/fcntl.c: New file.
4428         * gnulib/import/fcntl.in.h: New file.
4429         * gnulib/import/fd-hook.c: New file.
4430         * gnulib/import/fd-hook.h: New file.
4431         * gnulib/import/fd-safer.c: New file.
4432         * gnulib/import/fdopendir.c: New file.
4433         * gnulib/import/filename.h: New file.
4434         * gnulib/import/filenamecat-lgpl.c: New file.
4435         * gnulib/import/filenamecat.h: New file.
4436         * gnulib/import/fstat.c: New file.
4437         * gnulib/import/fstatat.c: New file.
4438         * gnulib/import/getcwd-lgpl.c: New file.
4439         * gnulib/import/getcwd.c: New file.
4440         * gnulib/import/getdtablesize.c: New file.
4441         * gnulib/import/getlogin_r.c: New file.
4442         * gnulib/import/getprogname.c: New file.
4443         * gnulib/import/getprogname.h: New file.
4444         * gnulib/import/gettext.h: New file.
4445         * gnulib/import/glob-libc.h: New file.
4446         * gnulib/import/glob.c: New file.
4447         * gnulib/import/glob.in.h: New file.
4448         * gnulib/import/intprops.h: New file.
4449         * gnulib/import/m4/chdir-long.m4: New file.
4450         * gnulib/import/m4/close.m4: New file.
4451         * gnulib/import/m4/closedir.m4: New file.
4452         * gnulib/import/m4/d-ino.m4: New file.
4453         * gnulib/import/m4/d-type.m4: New file.
4454         * gnulib/import/m4/dup.m4: New file.
4455         * gnulib/import/m4/dup2.m4: New file.
4456         * gnulib/import/m4/error.m4: New file.
4457         * gnulib/import/m4/fchdir.m4: New file.
4458         * gnulib/import/m4/fcntl.m4: New file.
4459         * gnulib/import/m4/fcntl_h.m4: New file.
4460         * gnulib/import/m4/fdopendir.m4: New file.
4461         * gnulib/import/m4/filenamecat.m4: New file.
4462         * gnulib/import/m4/fstat.m4: New file.
4463         * gnulib/import/m4/fstatat.m4: New file.
4464         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4465         * gnulib/import/m4/getcwd-path-max.m4: New file.
4466         * gnulib/import/m4/getcwd.m4: New file.
4467         * gnulib/import/m4/getdtablesize.m4: New file.
4468         * gnulib/import/m4/getlogin_r.m4: New file.
4469         * gnulib/import/m4/getprogname.m4: New file.
4470         * gnulib/import/m4/glob.m4: New file.
4471         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4472         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4473         * gnulib/import/m4/mempcpy.m4: New file.
4474         * gnulib/import/m4/memrchr.m4: New file.
4475         * gnulib/import/m4/mode_t.m4: New file.
4476         * gnulib/import/m4/msvc-inval.m4: New file.
4477         * gnulib/import/m4/msvc-nothrow.m4: New file.
4478         * gnulib/import/m4/open.m4: New file.
4479         * gnulib/import/m4/openat.m4: New file.
4480         * gnulib/import/m4/opendir.m4: New file.
4481         * gnulib/import/m4/readdir.m4: New file.
4482         * gnulib/import/m4/realloc.m4: New file.
4483         * gnulib/import/m4/rewinddir.m4: New file.
4484         * gnulib/import/m4/save-cwd.m4: New file.
4485         * gnulib/import/m4/strdup.m4: New file.
4486         * gnulib/import/m4/strerror.m4: New file.
4487         * gnulib/import/m4/unistd-safer.m4: New file.
4488         * gnulib/import/mempcpy.c: New file.
4489         * gnulib/import/memrchr.c: New file.
4490         * gnulib/import/msvc-inval.c: New file.
4491         * gnulib/import/msvc-inval.h: New file.
4492         * gnulib/import/msvc-nothrow.c: New file.
4493         * gnulib/import/msvc-nothrow.h: New file.
4494         * gnulib/import/open.c: New file.
4495         * gnulib/import/openat-die.c: New file.
4496         * gnulib/import/openat-priv.h: New file.
4497         * gnulib/import/openat-proc.c: New file.
4498         * gnulib/import/openat.c: New file.
4499         * gnulib/import/openat.h: New file.
4500         * gnulib/import/opendir.c: New file.
4501         * gnulib/import/pipe-safer.c: New file.
4502         * gnulib/import/readdir.c: New file.
4503         * gnulib/import/realloc.c: New file.
4504         * gnulib/import/rewinddir.c: New file.
4505         * gnulib/import/save-cwd.c: New file.
4506         * gnulib/import/save-cwd.h: New file.
4507         * gnulib/import/strdup.c: New file.
4508         * gnulib/import/strerror-override.c: New file.
4509         * gnulib/import/strerror-override.h: New file.
4510         * gnulib/import/strerror.c: New file.
4511         * gnulib/import/unistd--.h: New file.
4512         * gnulib/import/unistd-safer.h: New file.
4513         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4514         "getcwd" and "glob".
4515         * ser-tcp.c: Undefine "close" before redefining it.
4516
4517 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4518
4519         * guile/scm-value.c (gdbscm_value_address): Initialize address,
4520         get rid of res_val.
4521
4522 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4523
4524         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4525         <sol2,sparc>: Likewise.
4526         <sol2-64,i386>: Likewise.
4527
4528         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4529         -Wdeprecated-declarations on *-*-solaris*.
4530         * configure: Regenerate.
4531
4532         * procfs.c: Include "nat/inferior.h".
4533         (procfs_info_proc): Fix typo.
4534
4535 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4536
4537         * remote.c (vector): Include.
4538         (struct private_thread_info): Add field, thread_handle.
4539         (free_private_thread_info): Deallocate storage associated with
4540         thread handle.
4541         (get_private_info_thread): Initialize `thread_handle' field.
4542         (struct thread_item): Add field, thread_handle.
4543         (clear_threads_listing_context): Deallocate storage associated
4544         with thread handle.
4545         (start_thread): Add support for "handle" attribute.
4546         (thread_attributes): Add "handle".
4547         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4548         field.
4549         (remote_update_thread_list): Update thread_handle.
4550         (remote_thread_handle_to_thread_info): New function.
4551         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4552
4553 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4554
4555         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4556         function.
4557         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4558         * python/python-internal.h (thread_object_type): Declare.
4559
4560 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4561
4562         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4563         (target_thread_handle_to_thread_info): Declare.
4564         * target.c (target_thread_handle_to_thread_info): New function.
4565         * target-delegates.c: Regenerate.
4566         * gdbthread.h (find_thread_by_handle): Declare.
4567         * thread.c (find_thread_by_handle): New function.
4568         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4569         function.
4570         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4571
4572 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4573
4574         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4575
4576 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4577
4578         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4579
4580 2017-09-21  Yao Qi  <yao.qi@linaro.org>
4581
4582         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4583         to gdb_target_obs.
4584
4585 2017-09-20  Tom Tromey  <tom@tromey.com>
4586
4587         * breakpoint.c (struct counted_command_line): Remove.
4588         (breakpoint_commands): Update.
4589         (alloc_counted_command_line, incref_counted_command_line)
4590         (decref_counted_command_line, do_cleanup_counted_command_line)
4591         (make_cleanup_decref_counted_command_line): Remove.
4592         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4593         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4594         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4595         (save_breakpoints): Update.
4596         * breakpoint.h (counted_command_line): Now a typedef to
4597         shared_ptr.
4598         (struct breakpoint) <commands>: Now a counted_command_line.
4599         (struct bpstats) <command>: Likewise.
4600
4601 2017-09-20  Tom Tromey  <tom@tromey.com>
4602
4603         * breakpoint.c (struct commands_info, do_map_commands_command):
4604         Remove.
4605         (commands_command_1): Update.
4606         (iterate_over_related_breakpoints): Take a function_view.
4607         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4608         (delete_command): Update.
4609         (map_breakpoint_numbers): Take a function_view.
4610         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4611         (disable_command): Update.
4612         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4613         (enable_command): Update.
4614         (struct disp_data, do_enable_breakpoint_disp)
4615         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4616         (do_map_enable_delete_breakpoint): Remove.
4617         (enable_once_command, enable_count_command, enable_delete_command)
4618         (delete_trace_variable_command): Update.
4619
4620 2017-09-20  Tom Tromey  <tom@tromey.com>
4621
4622         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
4623         (bpstat_clear): Use delete.
4624         (bpstats): New constructors.
4625         (bpstat_copy, bpstat_stop_status): Use new.
4626         (dprintf_after_condition_true): Update.
4627         * breakpoint.h (bpstats::bpstats): Add constructors.
4628         (bpstats::~bpstats): Add destructor.
4629
4630 2017-09-20  Pedro Alves  <palves@redhat.com>
4631
4632         * eval.c (make_params): Delete, refactored as ...
4633         (class fake_method): ... this new type's ctor.
4634         (fake_method::~fake_method): New.
4635         (evaluate_subexp_standard): Use 'fake_method'.
4636
4637 2017-09-20  Tom Tromey  <tom@tromey.com>
4638
4639         * windows-nat.c (get_windows_debug_event, windows_wait)
4640         (do_initial_windows_stuff, windows_attach): Update.
4641         * utils.c (vwarning, internal_vproblem): Update.
4642         (ui_unregister_input_event_handler_cleanup)
4643         (prepare_to_handle_input): Remove.
4644         (class scoped_input_handler): New.
4645         (defaulted_query, prompt_for_continue): Update.
4646         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4647         Update.
4648         * top.c (undo_terminal_modifications_before_exit): Update.
4649         * target/target.h (target_terminal_init, target_terminal_inferior)
4650         (target_terminal_ours): Don't declare.
4651         (class target_terminal): New.
4652         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4653         (target_terminal_ours_for_output)
4654         (make_cleanup_restore_target_terminal): Don't declare.
4655         (target_terminal_info): Remove.
4656         * target.c (enum terminal_state, terminal_state): Remove.
4657         (target_terminal::terminal_state): Define.
4658         (target_terminal::init): Rename from target_terminal_init.
4659         (target_terminal::inferior): Rename from
4660         target_terminal_inferior.
4661         (target_terminal::ours): Rename from target_terminal_ours.
4662         (target_terminal::ours_for_output): Rename from
4663         target_terminal_ours_for_output.
4664         (target_terminal::info): New method.
4665         (cleanup_restore_target_terminal)
4666         (make_cleanup_restore_target_terminal): Remove.
4667         * solib.c (handle_solib_event): Update.
4668         * remote.c (remote_serial_quit_handler): Update.
4669         (remote_terminal_inferior, remote_wait_as): Update.
4670         * record-full.c (record_full_wait_1): Update.
4671         * nto-procfs.c (procfs_create_inferior): Update.
4672         * nat/fork-inferior.c (startup_inferior): Update.
4673         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4674         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4675         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4676         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4677         (mi_breakpoint_created, mi_breakpoint_deleted)
4678         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4679         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4680         (mi_user_selected_context_changed, report_initial_inferior):
4681         Update.
4682         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4683         (linux_nat_terminal_inferior): Update.
4684         * infrun.c (follow_fork_inferior)
4685         (handle_vfork_child_exec_or_exit, do_target_resume)
4686         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4687         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4688         Update.
4689         * inflow.c (child_terminal_init, info_terminal_command): Update.
4690         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4691         (attach_command): Update.
4692         * infcall.c (call_thread_fsm_should_stop): Update.
4693         * gnu-nat.c (gnu_attach): Update.
4694         * extension.c (struct active_ext_lang_state)
4695         (restore_active_ext_lang): Update.
4696         * exceptions.c (print_flush): Update.
4697         * event-top.c (async_enable_stdin, default_quit_handler): Update.
4698         (struct quit_handler_cleanup_data, restore_quit_handler)
4699         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4700         Remove.
4701         * cp-support.c (gdb_demangle): Update.
4702         * breakpoint.c (update_inserted_breakpoint_locations)
4703         (insert_breakpoint_locations, handle_jit_event)
4704         (disable_breakpoints_in_unloaded_shlib): Update.
4705         * annotate.c (annotate_breakpoints_invalid)
4706         (annotate_frames_invalid): Update.
4707
4708 2017-09-20  Tom Tromey  <tom@tromey.com>
4709
4710         * main.c (catch_command_errors): Rename from
4711         catch_command_errors_const.
4712         (captured_main_1): Update.
4713
4714 2017-09-20  Pedro Alves  <palves@redhat.com>
4715
4716         * cli/cli-cmds.c (list_command): Use print_sal_location.
4717         (print_sal_location): New function.
4718         (ambiguous_line_spec): Use print_sal_location.
4719         * linespec.c (symbol_to_sal): Record the symbol in the sal.
4720         * symtab.c (find_function_start_sal): Likewise.
4721         * symtab.h (symtab_and_line::symbol): New field.
4722
4723 2017-09-20  Pedro Alves  <palves@redhat.com>
4724
4725         * linespec.c (minsym_found): Handle non-text minsyms.
4726         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
4727
4728 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4729
4730         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
4731         backslash.
4732
4733 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4734
4735         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
4736         vmovups instead vmovaps.
4737         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
4738
4739 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
4740
4741         * NEWS (Changes since GDB 8.0): Add starti.
4742         * infcmd.c (enum run_break): New.
4743         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
4744         case.
4745         (run_command): Use enum run_how.
4746         (start_command): Likewise.
4747         (starti_command): New function.
4748         (RUN_ARGS_HELP): New macro.
4749         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
4750         commands.  Add starti command.
4751
4752 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4753
4754         * Makefile.in (monitor.o): Remove the rule.
4755
4756 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4757
4758         * annotate.h (struct annotate_arg_emitter): Use
4759         DISABLE_COPY_AND_ASSIGN.
4760         * common/refcounted-object.h (refcounted_object): Likewise.
4761         * completer.h (struct completion_result): Likewise.
4762         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
4763         * filename-seen-cache.h (filename_seen_cache): Likewise.
4764         * gdbcore.h (thread_section_name): Likewise.
4765         * gdb_regex.h (compiled_regex): Likewise.
4766         * gdbthread.h (scoped_restore_current_thread): Likewise.
4767         * inferior.h (scoped_restore_current_inferior): Likewise.
4768         * jit.c (jit_reader): Likewise.
4769         * linespec.h (struct linespec_result): Likewise.
4770         * mi/mi-parse.h (struct mi_parse): Likewise.
4771         * nat/fork-inferior.c (execv_argv): Likewise.
4772         * progspace.h (scoped_restore_current_program_space): Likewise.
4773         * python/python-internal.h (class gdbpy_enter): Likewise.
4774         * regcache.h (regcache): Likewise.
4775         * target-descriptions.c (struct tdesc_reg): Likewise.
4776         (struct tdesc_type): Likewise.
4777         (struct tdesc_feature): Likewise.
4778         * ui-out.h (ui_out_emit_type): Likewise.
4779
4780 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
4781
4782         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
4783         label abort_expression.
4784
4785 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4786
4787         * common/buffer.c (buffer_xml_printf): Adjust.
4788         * common/xml-utils.c (xml_escape_text): Change return type to
4789         std::string, update code accordingly.
4790         * common/xml-utils.h (xml_escape_text): Change return type to
4791         std::string.
4792         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
4793         * windows-tdep.c (windows_xfer_shared_library): Adjust.
4794         * unittests/xml-utils-selftests.c (test_xml_escape_text):
4795         Adjust.
4796
4797 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4798
4799         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
4800         (SUBDIR_UNITTESTS_OBS): Add new object file.
4801         * unittests/xml-utils-selftests.c: New file.
4802
4803 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4804
4805         * common/selftest.h (selftest): New struct/interface.
4806         (register_test): Add name parameter, add new overload.
4807         (run_tests): Add filter parameter.
4808         (for_each_selftest_ftype): New typedef.
4809         (for_each_selftest): New declaration.
4810         * common/selftest.c (tests): Change type to
4811         map<string, unique_ptr<selftest>>.
4812         (simple_selftest): New struct.
4813         (register_test): New function.
4814         (register_test): Add name parameter and use it.
4815         (run_tests): Add filter parameter and use it.  Add prints.
4816         Adjust to vector -> map change.
4817         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
4818         registering selftests.
4819         * arm-tdep.c (_initialize_arm_tdep): Likewise.
4820         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
4821         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
4822         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
4823         * findvar.c (_initialize_findvar): Likewise.
4824         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
4825         * maint.c (maintenance_selftest): Update call to run_tests.
4826         (maintenance_info_selftests): New function.
4827         (_initialize_maint_cmds): Register "maintenance info selftests"
4828         command.  Update "maintenance selftest" doc.
4829         * regcache.c (_initialize_regcache): Add names when registering
4830         selftests.
4831         * rust-exp.y (_initialize_rust_exp): Likewise.
4832         * selftest-arch.c (gdbarch_selftest): New struct.
4833         (gdbarch_tests): Remove.
4834         (register_test_foreach_arch): Add name parameter.  Call
4835         register_test.
4836         (tests_with_arch): Remove, move most content to
4837         gdbarch_selftest::operator().
4838         (_initialize_selftests_foreach_arch): Remove.
4839         * selftest-arch.h (register_test_foreach_arch): Add name
4840         parameter.
4841         (run_tests_with_arch): New declaration.
4842         * utils-selftests.c (_initialize_utils_selftests): Add names
4843         when registering selftests.
4844         * utils.c (_initialize_utils): Likewise.
4845         * unittests/array-view-selftests.c
4846         (_initialize_array_view_selftests): Likewise.
4847         * unittests/environ-selftests.c (_initialize_environ_selftests):
4848         Likewise.
4849         * unittests/function-view-selftests.c
4850         (_initialize_function_view_selftests): Likewise.
4851         * unittests/offset-type-selftests.c
4852         (_initialize_offset_type_selftests): Likewise.
4853         * unittests/optional-selftests.c
4854         (_initialize_optional_selftests): Likewise.
4855         * unittests/scoped_restore-selftests.c
4856         (_initialize_scoped_restore_selftests): Likewise.
4857         * NEWS: Document "maintenance selftest" and "maint info
4858         selftests".
4859
4860 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4861
4862         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
4863         scoped_restore.
4864
4865 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4866
4867         * mi/mi-main.c (mi_load_progress): Make uiout variable
4868         a unique_ptr.
4869
4870 2017-09-15  Pedro Alves  <palves@redhat.com>
4871
4872         * compile/compile-c-types.c (convert_enum, convert_int)
4873         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
4874
4875 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
4876
4877         * dwarf2read.c (copy_string): Remove.
4878         (parse_macro_definition): Replace copy_string with savestring.
4879
4880 2017-09-15  Yao Qi  <yao.qi@linaro.org>
4881
4882         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
4883         gdb_target_obs.
4884         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
4885         Likewise.
4886         (i[34567]86-*-linux*): Likewise.
4887
4888 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4889
4890         * dwarf2expr.h (dwarf_stack_value): Add constructor.
4891         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
4892         <stack>: Change type to std::vector.
4893         <stack_len, stack_allocated>: Remove.
4894         <grow_stack>: Remove.
4895         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4896         (dwarf_expr_context::~dwarf_expr_context): Remove.
4897         (dwarf_expr_context::grow_stack): Remove.
4898         (dwarf_expr_context::push): Adjust.
4899         (dwarf_expr_context::pop): Adjust.
4900         (dwarf_expr_context::fetch): Adjust.
4901         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
4902         (dwarf_expr_context::stack_empty_p): Adjust.
4903         (dwarf_expr_context::execute_stack_op): Adjust.
4904
4905 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4906
4907         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
4908         return type to bool.
4909         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
4910
4911 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4912
4913         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
4914         Change type to bool.
4915         (dwarf_stack_value) <in_stack_memory>: Likewise.
4916         (dwarf_expr_context) <push_address>: Change parameter type to
4917         bool.
4918         <fetch_in_stack_memory>: Change return type to bool.
4919         <push>: Change parameter type to bool.
4920         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
4921         to bool.
4922         (dwarf_expr_context::push_address): Likewise.
4923         (dwarf_expr_context::fetch_in_stack_memory): Change return type
4924         to bool.
4925         (dwarf_expr_context::execute_stack_op): Adjust.
4926         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
4927
4928 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4929
4930         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
4931         (struct dwarf_expr_context) <n_pieces>: Remove.
4932         <pieces>: Change type to std::vector.
4933         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4934         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
4935         pieces.
4936         (dwarf_expr_context::add_piece): Adjust.
4937         * dwarf2loc.c (struct piece_closure): Initialize fields.
4938         <n_pieces>: Remove.
4939         <pieces>: Change type to std::vector.
4940         (allocate_piece_closure): Adjust, change parameter to
4941         std::vector rvalue and std::move it to piece_closure.
4942         (rw_pieced_value): Adjust.
4943         (check_pieced_synthetic_pointer): Adjust.
4944         (indirect_synthetic_pointer): Adjust.
4945         (coerce_pieced_ref): Adjust.
4946         (free_pieced_value_closure):  Adjust.  Use delete to free
4947         piece_closure.
4948         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
4949         to allocate_piece_closure.
4950         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
4951
4952 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4953
4954         * probe.h (probe_ops_cp): Remove typedef.
4955         (DEF_VEC_P (probe_ops_cp)): Remove.
4956         (all_probe_ops): Change type to std::vector.
4957         * probe.c (info_probes_for_ops): Adjust to vector change.
4958         (probe_linespec_to_ops): Likewise.
4959         (all_probe_ops): Change type to std::vector.
4960         (_initialize_probe): Adjust to vector change.
4961         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
4962         * elfread.c (elf_get_probes): Likewise.
4963         * stap-probe.c (_initialize_stap_probe): Likewise.
4964
4965 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4966
4967         * probe.h (struct bound_probe): Define constructors.
4968         * probe.c (bound_probe_s): Remove typedef.
4969         (DEF_VEC_O (bound_probe_s)): Remove VEC.
4970         (collect_probes): Change return type to std::vector, remove
4971         cleanup.
4972         (compare_probes): Return bool, change parameter type.  Change
4973         semantic to "less than".
4974         (gen_ui_out_table_header_info): Change parameter to std::vector
4975         and update.
4976         (exists_probe_with_pops): Likewise.
4977         (info_probes_for_ops): Update to std::vector change.
4978         (enable_probes_command): Likewise.
4979         (disable_probes_command): Likewise.
4980
4981 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4982
4983         * probe.h (struct probe_ops) <get_probes>: Change parameter from
4984         vec to std::vector.
4985         * probe.c (parse_probes_in_pspace): Update.
4986         (find_probes_in_objfile): Update.
4987         (find_probe_by_pc): Update.
4988         (collect_probes): Update.
4989         (probe_any_get_probes): Update.
4990         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
4991         return type to reference to std::vector.
4992         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
4993         std::vector and update.
4994         (dtrace_process_dof): Likewise.
4995         (dtrace_get_probes): Likewise.
4996         * elfread.c (elf_get_probes): Change return type to std::vector,
4997         store an std::vector in bfd_data.
4998         (probe_key_free): Update to std::vector.
4999         * stap-probe.c (handle_stap_probe): Change parameter to
5000         std::vector and update.
5001         (stap_get_probes): Likewise.
5002         * symfile-debug.c (debug_sym_get_probes): Change return type to
5003         std::vector and update.
5004
5005 2017-09-11  Tom Tromey  <tom@tromey.com>
5006
5007         * breakpoint.c (program_breakpoint_here_p): Update.
5008         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5009         from make_show_memory_breakpoints_cleanup.  Return a
5010         scoped_restore_tmpl<int>.
5011         (restore_show_memory_breakpoints): Remove.
5012         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5013         * mem-break.c (memory_validate_breakpoint): Update.
5014         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5015         (ia64_memory_remove_breakpoint): Update.
5016         (ia64_breakpoint_from_pc): Update.
5017         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5018         from make_show_memory_breakpoints_cleanup.
5019
5020 2017-09-11  Tom Tromey  <tom@tromey.com>
5021
5022         * d-namespace.c (d_lookup_symbol): Use std::string.
5023         (find_symbol_in_baseclass): Likewise.
5024
5025 2017-09-11  Tom Tromey  <tom@tromey.com>
5026
5027         * ctf.c (ctf_start): Use std::string.
5028
5029 2017-09-11  Tom Tromey  <tom@tromey.com>
5030
5031         * ada-lang.c (is_known_support_routine): Update.
5032         (ada_unhandled_exception_name_addr_from_raise): Update.
5033         * guile/scm-frame.c (gdbscm_frame_name): Update.
5034         * python/py-frame.c (frapy_name): Update.
5035         (frapy_function): Update.
5036         * stack.h (find_frame_funname): Update.
5037         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5038         (print_frame): Update.
5039
5040 2017-09-11  Tom Tromey  <tom@tromey.com>
5041
5042         * findcmd.c (put_bits): Take a gdb::byte_vector.
5043         (parse_find_args): Return gdb::byte_vector.  "args" now const.
5044         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
5045         cleanups.
5046         (find_command): Update.
5047
5048 2017-09-11  Tom Tromey  <tom@tromey.com>
5049
5050         * cli/cli-script.c (class scoped_restore_hook_in): New.
5051         (clear_hook_in_cleanup): Remove.
5052         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5053         scoped_restore_hook_in.
5054
5055 2017-09-11  Tom Tromey  <tom@tromey.com>
5056
5057         * cli/cli-script.c (restore_interp): Remove.
5058         (read_command_lines): Use scoped_restore_interp.
5059         * interps.c (scoped_restore_interp::set_temp): Rename from
5060         interp_set_temp.
5061         * interps.h (class scoped_restore_interp): New.
5062         (interp_set_temp): Remove.
5063
5064 2017-09-11  Tom Tromey  <tom@tromey.com>
5065
5066         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5067         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5068         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5069         scoped_restore.
5070         (mi_cmd_break_insert_1): Update.
5071         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5072         scoped_restore.
5073
5074 2017-09-11  Tom Tromey  <tom@tromey.com>
5075
5076         * demangle.c (demangle_command): Update.
5077         * breakpoint.c (disable_command): Update.
5078         (enable_command): Update.
5079         (find_location_by_number): Make "number" const.  Use
5080         get_number_trailer.
5081         * cli/cli-utils.c (extract_arg): Return std::string.
5082         * probe.c (parse_probe_linespec): Update.  Change types.
5083         (collect_probes): Take string arguments.
5084         (parse_probe_linespec): Likewise.
5085         (info_probes_for_ops): Update.
5086         (enable_probes_command): Update.
5087         (disable_probes_command): Update.
5088         * break-catch-sig.c (catch_signal_split_args): Update.
5089         * mi/mi-parse.c (mi_parse): Update.
5090
5091 2017-09-11  Tom Tromey  <tom@tromey.com>
5092
5093         * language.h (language_enum): Make argument const.
5094         * language.c (language_enum): Make argument const.
5095
5096 2017-09-11  Tom Tromey  <tom@tromey.com>
5097
5098         * common/common-utils.h (skip_to_space): Remove macro, redeclare
5099         as function.
5100         (skip_to_space): Rename from skip_to_space_const.
5101         * common/common-utils.c (skip_to_space): New function.
5102         (skip_to_space): Rename from skip_to_space_const.
5103         * cli/cli-utils.h (get_number): Rename from get_number_const.
5104         (extract_arg): Rename from extract_arg_const.
5105         * cli/cli-utils.c (get_number): Rename from get_number_const.
5106         (extract_arg): Rename from extract_arg_const.
5107         (number_or_range_parser::get_number): Use ::get_number.
5108         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5109         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5110         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5111         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5112         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5113         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5114         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5115         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5116
5117 2017-09-11  Tom Tromey  <tom@tromey.com>
5118
5119         * python/python.c (do_start_initialization): Use
5120         py-event-types.def to initialize types.
5121         Define all object type structures.
5122         * python/python-internal.h: Don't declare event initialization
5123         functions.
5124         * python/py-threadevent.c (thread_event_object_type): Don't
5125         define.
5126         * python/py-stopevent.c (stop_event_object_type): Don't define.
5127         * python/py-signalevent.c (signal_event_object_type): Don't
5128         declare or define.
5129         * python/py-newobjfileevent.c (new_objfile_event_object_type)
5130         (clear_objfiles_event_object_type): Don't declare or define.
5131         * python/py-infevents.c (inferior_call_pre_event_object_type)
5132         (inferior_call_post_event_object_type)
5133         (register_changed_event_object_type)
5134         (memory_changed_event_object_type): Don't declare or define.
5135         * python/py-inferior.c (new_thread_event_object_type)
5136         (new_inferior_event_object_type)
5137         (inferior_deleted_event_object_type): Don't declare or define.
5138         * python/py-exitedevent.c (exited_event_object_type): Don't
5139         declare or define.
5140         * python/py-evts.c (gdbpy_initialize_py_events): Use
5141         py-all-events.def.
5142         * python/py-events.h (thread_event_object_type): Don't declare.
5143         (events_object): Use py-all-events.def.
5144         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
5145         py-event-types.def.
5146         * python/py-event-types.def: New file.
5147         * python/py-continueevent.c (create_continue_event_object): Don't
5148         declare or define.
5149         * python/py-bpevent.c (breakpoint_event_object_type): Don't
5150         declare or define.
5151         * python/py-all-events.def: New file.
5152
5153 2017-09-11  Tom Tromey  <tom@tromey.com>
5154
5155         * python/py-threadevent.c (create_thread_event_object): Return
5156         gdbpy_ref.
5157         * python/py-stopevent.h (create_stop_event_object)
5158         (create_breakpoint_event_object, create_signal_event_object):
5159         Update.
5160         * python/py-stopevent.c (create_stop_event_object): Return
5161         gdbpy_ref.
5162         (emit_stop_event): Update.
5163         * python/py-signalevent.c (create_signal_event_object): Return
5164         gdbpy_ref.
5165         * python/py-infevents.c (create_inferior_call_event_object):
5166         Update.
5167         * python/py-event.h (create_event_object)
5168         (create_thread_event_object): Update.
5169         * python/py-event.c (create_event_object): Return gdbpy_ref.
5170         * python/py-continueevent.c: Return gdbpy_ref.
5171         * python/py-bpevent.c (create_breakpoint_event_object): Return
5172         gdbpy_ref.
5173
5174 2017-09-11  Tom Tromey  <tom@tromey.com>
5175
5176         PR python/15622:
5177         * NEWS: Add entry.
5178         * python/python.c (do_start_initialization): Initialize new event
5179         types.
5180         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5181         (gdbpy_initialize_inferior_deleted_event)
5182         (gdbpy_initialize_new_thread_event): Declare.
5183         * python/py-threadevent.c (create_thread_event_object): Add option
5184         "thread" parameter.
5185         * python/py-inferior.c (new_thread_event_object_type)
5186         (new_inferior_event_object_type)
5187         (inferior_deleted_event_object_type): Declare.
5188         (python_new_inferior, python_inferior_deleted): New functions.
5189         (add_thread_object): Emit new_thread event.
5190         (gdbpy_initialize_inferior): Attach new functions to corresponding
5191         observers.
5192         (new_thread, new_inferior, inferior_deleted): Define new event
5193         types.
5194         * python/py-evts.c (gdbpy_initialize_py_events): Add new
5195         registries.
5196         * python/py-events.h (events_object) <new_inferior,
5197         inferior_deleted, new_thread>: New fields.
5198         * python/py-event.h (create_thread_event_breakpoint): Add optional
5199         "thread" parameter.
5200
5201 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5202
5203         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5204         check current_ui instead.
5205         (internal_vproblem): Likewise.
5206
5207 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
5208
5209         * thread.c (print_thread_info_1): Remove unnecessary calls to
5210         uiout->is_mi_like_p.
5211
5212 2017-09-09  Tom Tromey  <tom@tromey.com>
5213
5214         * namespace.h (add_using_directive): Update.
5215         * namespace.c (add_using_directive): Change type of excludes to
5216         std::vector.
5217         * dwarf2read.c (read_import_statement): Use std::vector.
5218         (read_namespace): Update.
5219         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5220
5221 2017-09-09  Tom Tromey  <tom@tromey.com>
5222
5223         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5224
5225 2017-09-09  Tom Tromey  <tom@tromey.com>
5226
5227         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5228
5229 2017-09-09  Tom Tromey  <tom@tromey.com>
5230
5231         * stack.c (func_command): Use gdb::def_vector.
5232
5233 2017-09-09  Tom Tromey  <tom@tromey.com>
5234
5235         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5236         ui_out_emit_list, ui_out_emit_tuple.
5237         (mi_cmd_var_update): Likewise.
5238
5239 2017-09-09  Tom Tromey  <tom@tromey.com>
5240
5241         * mi/mi-interp.c (mi_user_selected_context_changed): Use
5242         ui_out_redirect_pop.
5243         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5244         ui_out_redirect_pop.
5245         * utils.c (do_ui_out_redirect_pop)
5246         (make_cleanup_ui_out_redirect_pop): Remove.
5247         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5248         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5249         * ui-out.h (ui_out_redirect_pop): New class.
5250
5251 2017-09-09  Tom Tromey  <tom@tromey.com>
5252
5253         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5254         (list_available_thread_groups, mi_cmd_list_thread_groups)
5255         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5256         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5257         Likewise.
5258
5259 2017-09-09  Tom Tromey  <tom@tromey.com>
5260
5261         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5262         ui_out_emit_tuple.
5263
5264 2017-09-09  Tom Tromey  <tom@tromey.com>
5265
5266         * target.c (flash_erase_command): Use ui_out_emit_tuple.
5267         * stack.c (print_frame): Use ui_out_emit_tuple.
5268         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5269         (info_spu_mailbox_command, info_spu_dma_command)
5270         (info_spu_proxydma_command): Likewise.
5271         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5272         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5273         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5274         ui_out_emit_tuple.
5275         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5276
5277 2017-09-09  Tom Tromey  <tom@tromey.com>
5278
5279         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5280         (class ui_out_emit_table): Update comment.
5281         * ui-out.c (do_cleanup_table_end)
5282         (make_cleanup_ui_out_table_begin_end): Remove.
5283         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5284         (info_spu_dma_cmdlist): Likewise.
5285         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5286         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5287         ui_out_emit_table.
5288
5289 2017-09-09  Tom Tromey  <tom@tromey.com>
5290
5291         * thread.c (print_thread_info_1): Use ui_out_emit_table,
5292         ui_out_emit_list, gdb::optional.
5293
5294 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
5295
5296         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5297         prototype.
5298         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5299         prototype.
5300         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5301         prototype.
5302         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5303         * ada-exp.y: Remove _initialize_ada_exp prototype.
5304         * ada-lang.c: Remove _initialize_ada_language prototype.
5305         * ada-tasks.c: Remove _initialize_tasks prototype.
5306         * addrmap.c: Remove _initialize_addrmap prototype.
5307         * agent.c: Remove _initialize_agent prototype.
5308         * aix-thread.c: Remove _initialize_aix_thread prototype.
5309         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5310         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5311         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5312         prototype.
5313         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5314         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5315         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5316         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5317         prototype.
5318         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5319         prototype.
5320         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5321         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5322         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5323         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5324         prototype.
5325         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5326         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5327         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5328         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5329         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5330         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5331         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5332         prototype.
5333         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5334         prototype.
5335         * annotate.c: Remove _initialize_annotate prototype.
5336         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5337         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5338         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5339         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5340         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5341         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5342         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5343         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5344         prototype.
5345         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5346         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5347         * auto-load.c: Remove _initialize_auto_load prototype.
5348         * auxv.c: Remove _initialize_auxv prototype.
5349         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5350         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5351         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5352         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5353         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5354         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5355         prototype.
5356         * break-catch-throw.c: Remove _initialize_break_catch_throw
5357         prototype.
5358         * breakpoint.c: Remove _initialize_breakpoint prototype.
5359         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5360         * btrace.c: Remove _initialize_btrace prototype.
5361         * charset.c: Remove _initialize_charset prototype.
5362         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5363         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5364         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5365         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5366         * cli/cli-script.c: Remove _initialize_cli_script prototype.
5367         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5368         * coffread.c: Remove _initialize_coffread prototype.
5369         * compile/compile.c: Remove _initialize_compile prototype.
5370         * complaints.c: Remove _initialize_complaints prototype.
5371         * completer.c: Remove _initialize_completer prototype.
5372         * copying.awk: Remove _initialize_copying prototype.
5373         * copying.c: Regenerate.
5374         * core-regset.c: Remove _initialize_core_regset prototype.
5375         * corefile.c: Remove _initialize_core prototype.
5376         * corelow.c: Remove _initialize_corelow prototype.
5377         * cp-abi.c: Remove _initialize_cp_abi prototype.
5378         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5379         * cp-support.c: Remove _initialize_cp_support prototype.
5380         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5381         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5382         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5383         * ctf.c: Remove _initialize_ctf prototype.
5384         * d-lang.c: Remove _initialize_d_language prototype.
5385         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5386         prototype.
5387         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5388         * dbxread.c: Remove _initialize_dbxread prototype.
5389         * dcache.c: Remove _initialize_dcache prototype.
5390         * demangle.c: Remove _initialize_demangler prototype.
5391         * disasm-selftests.c: Remove _initialize_disasm_selftests
5392         prototype.
5393         * disasm.c: Remove _initialize_disasm prototype.
5394         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5395         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5396         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5397         prototype.
5398         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5399         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5400         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5401         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5402         * elfread.c: Remove _initialize_elfread prototype.
5403         * exec.c: Remove _initialize_exec prototype.
5404         * extension.c: Remove _initialize_extension prototype.
5405         * f-lang.c: Remove _initialize_f_language prototype.
5406         * f-valprint.c: Remove _initialize_f_valprint prototype.
5407         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5408         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5409         * filesystem.c: Remove _initialize_filesystem prototype.
5410         * findcmd.c: Remove _initialize_mem_search prototype.
5411         * fork-child.c: Remove _initialize_fork_child prototype.
5412         * frame-base.c: Remove _initialize_frame_base prototype.
5413         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5414         * frame.c: Remove _initialize_frame prototype.
5415         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5416         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5417         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5418         * gcore.c: Remove _initialize_gcore prototype.
5419         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5420         * gdbarch.c: Regenerate.
5421         * gdbarch.sh: Remove _initialize_gdbarch prototype.
5422         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5423         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5424         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5425         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5426         * go-lang.c: Remove _initialize_go_language prototype.
5427         * go32-nat.c: Remove _initialize_go32_nat prototype.
5428         * guile/guile.c: Remove _initialize_guile prototype.
5429         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5430         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5431         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5432         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5433         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5434         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5435         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5436         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5437         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5438         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5439         prototype.
5440         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5441         prototype.
5442         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5443         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5444         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5445         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5446         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5447         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5448         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5449         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5450         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5451         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5452         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5453         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5454         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5455         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5456         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5457         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5458         prototype.
5459         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5460         prototype.
5461         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5462         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5463         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5464         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5465         * infcall.c: Remove _initialize_infcall prototype.
5466         * infcmd.c: Remove _initialize_infcmd prototype.
5467         * inferior.c: Remove _initialize_inferiors prototype.
5468         * inflow.c: Remove _initialize_inflow prototype.
5469         * infrun.c: Remove _initialize_infrun prototype.
5470         * interps.c: Remove _initialize_interpreter prototype.
5471         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5472         * jit.c: Remove _initialize_jit prototype.
5473         * language.c: Remove _initialize_language prototype.
5474         * linux-fork.c: Remove _initialize_linux_fork prototype.
5475         * linux-nat.c: Remove _initialize_linux_nat prototype.
5476         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5477         * linux-thread-db.c: Remove _initialize_thread_db prototype.
5478         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5479         * m2-lang.c: Remove _initialize_m2_language prototype.
5480         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5481         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5482         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5483         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5484         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5485         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5486         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5487         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5488         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5489         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5490         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5491         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5492         * machoread.c: Remove _initialize_machoread prototype.
5493         * macrocmd.c: Remove _initialize_macrocmd prototype.
5494         * macroscope.c: Remove _initialize_macroscope prototype.
5495         * maint.c: Remove _initialize_maint_cmds prototype.
5496         * mdebugread.c: Remove _initialize_mdebugread prototype.
5497         * memattr.c: Remove _initialize_mem prototype.
5498         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5499         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5500         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5501         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5502         * mi/mi-main.c: Remove _initialize_mi_main prototype.
5503         * microblaze-linux-tdep.c: Remove
5504         _initialize_microblaze_linux_tdep prototype.
5505         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5506         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5507         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5508         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5509         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5510         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5511         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5512         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5513         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5514         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5515         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5516         prototype.
5517         * mipsread.c: Remove _initialize_mipsread prototype.
5518         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5519         prototype.
5520         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5521         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5522         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5523         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5524         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5525         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5526         prototype.
5527         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5528         * nto-procfs.c: Remove _initialize_procfs prototype.
5529         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5530         * objc-lang.c: Remove _initialize_objc_language prototype.
5531         * objfiles.c: Remove _initialize_objfiles prototype.
5532         * observer.c: Remove observer_test_first_notification_function,
5533         observer_test_second_notification_function,
5534         observer_test_third_notification_function, and
5535         _initialize_observer prototypes.
5536         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5537         * osabi.c: Remove _initialize_gdb_osabi prototype.
5538         * osdata.c: Remove _initialize_osdata prototype.
5539         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5540         * parse.c: Remove _initialize_parse prototype.
5541         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5542         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5543         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5544         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5545         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5546         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5547         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5548         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5549         * printcmd.c: Remove _initialize_printcmd prototype.
5550         * probe.c: Remove _initialize_probe prototype.
5551         * proc-api.c: Remove _initialize_proc_api prototype.
5552         * proc-events.c: Remove _initialize_proc_events prototype.
5553         * proc-service.c: Remove _initialize_proc_service prototype.
5554         * procfs.c: Remove _initialize_procfs prototype.
5555         * psymtab.c: Remove _initialize_psymtab prototype.
5556         * python/python.c: Remove _initialize_python prototype.
5557         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5558         * record-btrace.c: Remove _initialize_record_btrace prototype.
5559         * record-full.c: Remove _initialize_record_full prototype.
5560         * record.c: Remove _initialize_record prototype.
5561         * regcache.c: Remove _initialize_regcache prototype.
5562         * reggroups.c: Remove _initialize_reggroup prototype.
5563         * remote-notif.c: Remove _initialize_notif prototype.
5564         * remote-sim.c: Remove _initialize_remote_sim prototype.
5565         * remote.c: Remove _initialize_remote prototype.
5566         * reverse.c: Remove _initialize_reverse prototype.
5567         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5568         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5569         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5570         prototype.
5571         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5572         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5573         * rust-exp.y: Remove _initialize_rust_exp prototype.
5574         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5575         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5576         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5577         * score-tdep.c: Remove _initialize_score_tdep prototype.
5578         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5579         prototype.
5580         * ser-go32.c: Remove _initialize_ser_dos prototype.
5581         * ser-mingw.c: Remove _initialize_ser_windows prototype.
5582         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5583         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5584         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5585         * serial.c: Remove _initialize_serial prototype.
5586         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5587         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5588         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5589         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5590         * skip.c: Remove _initialize_step_skip prototype.
5591         * sol-thread.c: Remove _initialize_sol_thread prototype.
5592         * solib-aix.c: Remove _initialize_solib_aix prototype.
5593         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5594         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5595         * solib-frv.c: Remove _initialize_frv_solib prototype.
5596         * solib-spu.c: Remove _initialize_spu_solib prototype.
5597         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5598         * solib-target.c: Remove _initialize_solib_target prototype.
5599         * solib.c: Remove _initialize_solib prototype.
5600         * source.c: Remove _initialize_source prototype.
5601         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5602         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5603         prototype.
5604         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5605         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5606         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5607         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5608         prototype.
5609         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5610         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5611         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5612         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5613         prototype.
5614         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5615         prototype.
5616         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5617         prototype.
5618         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5619         prototype.
5620         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5621         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5622         prototype.
5623         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5624         prototype.
5625         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5626         prototype.
5627         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5628         prototype.
5629         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5630         prototype.
5631         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5632         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5633         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5634         * stabsread.c: Remove _initialize_stabsread prototype.
5635         * stack.c: Remove _initialize_stack prototype.
5636         * stap-probe.c: Remove _initialize_stap_probe prototype.
5637         * std-regs.c: Remove _initialize_frame_reg prototype.
5638         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5639         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5640         * symfile.c: Remove _initialize_symfile prototype.
5641         * symmisc.c: Remove _initialize_symmisc prototype.
5642         * symtab.c: Remove _initialize_symtab prototype.
5643         * target-dcache.c: Remove _initialize_target_dcache prototype.
5644         * target-descriptions.c: Remove _initialize_target_descriptions
5645         prototype.
5646         * thread.c: Remove _initialize_thread prototype.
5647         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5648         prototype.
5649         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5650         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5651         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5652         prototype.
5653         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5654         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5655         * tracefile.c: Remove _initialize_tracefile prototype.
5656         * tracepoint.c: Remove _initialize_tracepoint prototype.
5657         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5658         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5659         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5660         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5661         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5662         * tui/tui-win.c: Remove _initialize_tui_win prototype.
5663         * tui/tui.c: Remove _initialize_tui prototype.
5664         * typeprint.c: Remove _initialize_typeprint prototype.
5665         * user-regs.c: Remove _initialize_user_regs prototype.
5666         * utils.c: Remove _initialize_utils prototype.
5667         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5668         * valarith.c: Remove _initialize_valarith prototype.
5669         * valops.c: Remove _initialize_valops prototype.
5670         * valprint.c: Remove _initialize_valprint prototype.
5671         * value.c: Remove _initialize_values prototype.
5672         * varobj.c: Remove _initialize_varobj prototype.
5673         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5674         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5675         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5676         * windows-nat.c: Remove _initialize_windows_nat,
5677         _initialize_check_for_gdb_ini, and _initialize_loadable
5678         prototypes.
5679         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5680         * xcoffread.c: Remove _initialize_xcoffread prototype.
5681         * xml-support.c: Remove _initialize_xml_support prototype.
5682         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5683         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5684         prototype.
5685         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5686         prototype.
5687         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5688
5689 2017-09-08  Keith Seitz  <keiths@redhat.com>
5690
5691         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5692         field.
5693
5694 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
5695
5696         * f-valprint.c (f_val_print): Remove check for one byte
5697         sized integers. Remove printing of character type.
5698
5699 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
5700             Christoph Weinmann  <christoph.t.weinmann@intel.com>
5701             Bernhard Heckel  <bernhard.heckel@intel.com>
5702
5703         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5704         to maintain proper indentation when printing pointers/refs.
5705
5706 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5707
5708         GDB 8.0.1 released.
5709
5710 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5711
5712         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
5713
5714 2017-09-05  Tom Tromey  <tom@tromey.com>
5715
5716         * parse.c (funcall_chain): Now a std::vector.
5717         (start_arglist, end_arglist): Simplify.
5718         (free_funcalls): Remove.
5719         (parse_exp_in_context_1): Remove cleanup.
5720
5721 2017-09-05  Tom Tromey  <tom@tromey.com>
5722
5723         * go-exp.y (go_parse): Don't create a cleanup.
5724
5725 2017-09-05  Tom Tromey  <tom@tromey.com>
5726
5727         * d-exp.y (PrimaryExpression): Use std::string.
5728         (d_parse): Don't create a cleanup.
5729
5730 2017-09-05  Tom Tromey  <tom@tromey.com>
5731
5732         * utils.c (do_clear_parser_state): Remove.
5733         (make_cleanup_clear_parser_state): Remove.
5734         * p-exp.y (pascal_parse): Use scoped_restore.
5735         * m2-exp.y (m2_parse): Use scoped_restore.
5736         * f-exp.y (f_parse): Use scoped_restore.
5737         * d-exp.y (d_parse): Use scoped_restore.
5738         * c-exp.y (c_parse): Use scoped_restore.
5739         * ada-exp.y (ada_parse): Use scoped_restore.
5740         * utils.h (make_cleanup_clear_parser_state): Remove.
5741
5742 2017-09-06  Keith Seitz  <keiths@redhat.com>
5743
5744         * dwarf2read.c (dw2_linkage_name_attr): New function.
5745         (dw2_linkage_name): New function.
5746         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
5747         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
5748         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
5749
5750 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5751
5752         * config/djgpp/djconfig.sh: Correct shell portability issue.
5753
5754 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5755
5756         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
5757
5758 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5759
5760         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
5761         * NEWS: Mention new FreeBSD/mips native configuration.
5762         * configure.host: Add aarch64*-*-freebsd*.
5763         * configure.nat: Likewise.
5764         * aarch64-fbsd-nat.c: New file.
5765
5766 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5767
5768         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
5769         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
5770         * NEWS: Mention new FreeBSD/aarch64 target.
5771         * configure.tgt: Add aarch64*-*-freebsd*.
5772         * aarch64-fbsd-tdep.c: New file.
5773         * aarch64-fbsd-tdep.h: New file.
5774
5775 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5776
5777         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
5778
5779 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
5780
5781         * parse.c (find_minsym_type_and_address): Don't relocate addresses
5782         of TLS symbols.
5783
5784 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5785
5786         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
5787         call.
5788
5789 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5790
5791         * infrun.c (follow_exec): Call add_thread after
5792         target_find_description.
5793
5794 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5795
5796         * infrun.c (handle_inferior_event_1): When exec'ing, read
5797         stop_pc after follow_exec.
5798
5799 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5800
5801         * remote.c (process_g_packet): Update error message.
5802
5803 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5804
5805         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
5806         targets.
5807
5808 2017-09-05  Pedro Alves  <palves@redhat.com>
5809
5810         * eval.c (eval_call, evaluate_funcall): New functions, factored
5811         out from ...
5812         (evaluate_subexp_standard): ... this.
5813
5814 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5815
5816         * amd64-tdep.c (amd64_target_description): Create target
5817         descriptions.
5818         (_initialize_amd64_tdep): Don't call functions
5819         initialize_tdesc_amd64_*.  Add self tests.
5820         * arch/amd64.c (amd64_create_target_description): Add parameter
5821         is_linux.  Call set_tdesc_osabi if is_linux is true.
5822         * arch/amd64.h (amd64_create_target_description): Update the
5823         declaration.
5824         * arch/i386.c (i386_create_target_description): Add parameter
5825         is_linux.  Call set_tdesc_osabi if is_linux is true.
5826         * arch/i386.h (i386_create_target_description): Update
5827         declaration.
5828         * configure.tgt: Add i386.o to gdb_target_obs.
5829         * features/Makefile (XMLTOC): Remove i386/*.xml.
5830         * features/i386/amd64-avx-avx512.c: Remove.
5831         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
5832         * features/i386/amd64-avx-mpx.c: Remove.
5833         * features/i386/amd64-avx.c: Remove.
5834         * features/i386/amd64-mpx.c: Remove.
5835         * features/i386/amd64.c: Remove.
5836         * features/i386/i386-avx-avx512.c: Remove.
5837         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
5838         * features/i386/i386-avx-mpx.c: Remove.
5839         * features/i386/i386-avx.c: Remove.
5840         * features/i386/i386-mmx.c: Remove.
5841         * features/i386/i386-mpx.c: Remove.
5842         * features/i386/i386.c: Remove.
5843         * i386-tdep.c: Don't include features/i386/i386*.c., include
5844         target-descriptions.h and arch/i386.h.
5845         (i386_target_description): Create target descriptions.
5846         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
5847         functions.  Do self tests.
5848
5849 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5850
5851         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
5852         * features/i386/amd64-avx-avx512-linux.c: Removed.
5853         * features/i386/amd64-avx-linux.c: Removed.
5854         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
5855         * features/i386/amd64-avx-mpx-linux.c: Removed.
5856         * features/i386/amd64-linux.c: Removed.
5857         * features/i386/amd64-mpx-linux.c: Removed.
5858         * features/i386/x32-avx-avx512-linux.c: Removed.
5859         * features/i386/x32-avx-linux.c: Removed.
5860         * features/i386/x32-linux.c: Removed.
5861
5862 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5863
5864         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
5865         features/i386/*.c.
5866         (amd64_linux_read_description): Call
5867         amd64_create_target_description.
5868         * arch/amd64.c: New file.
5869         * arch/amd64.h: New file.
5870         * configure.tgt (x86_64-*-linux*): Append amd64.o.
5871         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
5872
5873 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5874
5875         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
5876         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
5877         (amd64_linux_read_description): Create target descriptions.
5878         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
5879         functions.  Add unit tests.
5880         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
5881         x32-core.xml.
5882         * features/i386/64bit-avx.c: Generated.
5883         * features/i386/64bit-avx512.c: Generated.
5884         * features/i386/64bit-core.c: Generated.
5885         * features/i386/64bit-linux.c: Generated.
5886         * features/i386/64bit-mpx.c: Generated.
5887         * features/i386/64bit-pkeys.c: Generated.
5888         * features/i386/64bit-segments.c: Generated.
5889         * features/i386/64bit-sse.c: Generated.
5890         * features/i386/x32-core.c: Generated.
5891         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
5892         c files for amd64-linux and x32-linux.
5893
5894 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5895
5896         * amd64-linux-tdep.c (amd64_linux_read_description): New
5897         function.
5898         (amd64_linux_core_read_description): Call
5899         amd64_linux_read_description.
5900         (amd64_linux_init_abi): Likewise.
5901         (amd64_x32_linux_init_abi): Likewise.
5902         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
5903         * x86-linux-nat.c (x86_linux_read_description): Call
5904         amd64_linux_read_description.
5905
5906 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5907
5908         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
5909         comments.
5910
5911 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5912
5913         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
5914         * features/i386/i386-avx-avx512-linux.c: Remove.
5915         * features/i386/i386-avx-linux.c: Remove.
5916         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
5917         * features/i386/i386-avx-mpx-linux.c: Remove.
5918         * features/i386/i386-linux.c: Remove.
5919         * features/i386/i386-mmx-linux.c: Remove.
5920         * features/i386/i386-mpx-linux.c: Remove.
5921
5922 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5923
5924         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
5925         (SFILES): Add arch/i386.c.
5926         (HFILES_NO_SRCDIR): Add arch/i386.h.
5927         * arch/i386.c: New file.
5928         * arch/i386.h: New file.
5929         * arch/tdesc.h (allocate_target_description): Declare.
5930         (set_tdesc_architecture): Declare.
5931         (set_tdesc_osabi): Declare.
5932         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
5933         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
5934         include arch/i386.h.
5935         (i386_linux_read_description): Remove code and call
5936         i386_create_target_description.
5937         (set_tdesc_architecture): New function.
5938         (set_tdesc_osabi): New function.
5939         * target-descriptions.h (allocate_target_description): Remove.
5940
5941 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5942
5943         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
5944         * target-descriptions.c (tdesc_create_feature): Likewise, and
5945         adjust code.
5946         * features/i386/32bit-avx.c: Re-generated.
5947         * features/i386/32bit-avx512.c: Re-generated.
5948         * features/i386/32bit-core.c: Re-generated.
5949         * features/i386/32bit-linux.c: Re-generated.
5950         * features/i386/32bit-mpx.c: Re-generated.
5951         * features/i386/32bit-pkeys.c: Re-generated.
5952         * features/i386/32bit-sse.c: Re-generated.
5953
5954 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5955
5956         * regformats/regdef.h (struct reg): Override operator == and !=.
5957
5958 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5959
5960         * arch/tdesc.h: New file.
5961         * regformats/regdat.sh: Generate code using tdesc_create_reg.
5962         * target-descriptions.c: Update comments.
5963         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
5964         declarations.
5965         * features/i386/32bit-avx.c: Re-generated.
5966         * features/i386/32bit-avx512.c: Re-generated.
5967         * features/i386/32bit-core.c: Re-generated.
5968         * features/i386/32bit-linux.c: Re-generated.
5969         * features/i386/32bit-mpx.c: Re-generated.
5970         * features/i386/32bit-pkeys.c: Re-generated.
5971         * features/i386/32bit-sse.c: Re-generated.
5972
5973 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5974
5975         * regformats/regdat.sh: Update generated code.
5976
5977 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5978
5979         * regformats/regdat.sh: Adjust code order.
5980
5981 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5982
5983         * expprint.c (dump_subexp_body_standard): Use constant format
5984         string in fprintf_filtered call.
5985
5986 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5987
5988         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
5989         NetBSD/i386.
5990         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
5991
5992 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5993
5994         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
5995
5996 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5997
5998         * bsd-kvm.o: Define _KMEMUSER.
5999         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6000         * configure: Regenerate.
6001
6002 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6003
6004         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6005         * i386-fbsd-nat.c: Likewise.
6006
6007 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6008
6009         * unittests/array-view-selftests.c: Add include of <array>.
6010
6011 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6012
6013         * spu-tdep.c (flush_ea_cache): Add missing argument to
6014         call_function_by_hand.
6015
6016 2017-09-04  Pedro Alves  <palves@redhat.com>
6017
6018         * NEWS (Safer support for debugging with no debug info): New.
6019
6020 2017-09-04  Pedro Alves  <palves@redhat.com>
6021
6022         * c-exp.y (function_method, function_method_void): Add current
6023         instance flags to TYPE_INSTANCE.
6024         * dwarf2read.c (check_modifier): New.
6025         (compute_delayed_physnames): Assert that only C++ adds delayed
6026         physnames.  Mark fn_fields as const/volatile depending on
6027         physname.
6028         * eval.c (make_params): New type_instance_flags parameter.  Use
6029         it as the new type's instance flags.
6030         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6031         flags element and pass it to make_params.
6032         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6033         instance flags element.
6034         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6035         * gdbtypes.h: Include "enum-flags.h".
6036         (type_instance_flags): New enum-flags type.
6037         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6038         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6039         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6040         (follow_type_instance_flags): New function.
6041         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6042         * parser-defs.h (follow_type_instance_flags): Declare.
6043         * valops.c (value_struct_elt_for_reference): const/volatile must
6044         match too.
6045
6046 2017-09-04  Pedro Alves  <palves@redhat.com>
6047
6048         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6049         function/method scopes; lookup the nested name as a function local
6050         static variable.
6051
6052 2017-09-04  Pedro Alves  <palves@redhat.com>
6053
6054         (%type <voidval>): Add function_method.
6055         * c-exp.y (exp): New production for calls with no arguments.
6056         (function_method, function_method_void_or_typelist): New
6057         productions.
6058         (exp): New production for "method()::static_var".
6059         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6060         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6061         Handle OP_FUNC_STATIC_VAR.
6062         * parse.c (operator_length_standard):
6063         Handle OP_FUNC_STATIC_VAR.
6064
6065 2017-09-04  Pedro Alves  <palves@redhat.com>
6066
6067         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6068         handling.
6069         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6070         Ditto.
6071         * parse.c (operator_length_standard, operator_check_standard):
6072         Ditto.
6073         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6074
6075 2017-09-04  Pedro Alves  <palves@redhat.com>
6076
6077         * ax-gdb.c: Include "typeprint.h".
6078         (gen_expr_for_cast): New function.
6079         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6080         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6081         type is unknown.
6082         * dwarf2read.c (new_symbol_full): Fallback to int instead of
6083         nodebug_data_symbol.
6084         * eval.c: Include "typeprint.h".
6085         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6086         Error out if symbol has unknown type.
6087         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6088         evaluate_subexp_for_cast.
6089         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6090         OP_VAR_MSYM_VALUE.
6091         (evaluate_subexp_for_cast): New function.
6092         * gdbtypes.c (init_nodebug_var_type): New function.
6093         (objfile_type): Use it to initialize types of variables with no
6094         debug info.
6095         * typeprint.c (error_unknown_type): New.
6096         * typeprint.h (error_unknown_type): New declaration.
6097         * compile/compile-c-types.c (convert_type_basic): Handle
6098         TYPE_CODE_ERROR; warn and fallback to int for variables with
6099         unknown type.
6100
6101 2017-09-04  Pedro Alves  <palves@redhat.com>
6102
6103         * eval.c (evaluate_var_value): New function, factored out from ...
6104         (evaluate_subexp_standard): ... here.
6105
6106 2017-09-04  Pedro Alves  <palves@redhat.com>
6107
6108         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6109         Remove useless assignments to 'op'.
6110
6111 2017-09-04  Pedro Alves  <palves@redhat.com>
6112
6113         * eval.c (eval_skip_value): New function.
6114         (evaluate_subexp_standard): Use it.
6115
6116 2017-09-04  Pedro Alves  <palves@redhat.com>
6117
6118         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6119         function name from symbol/minsym and pass it to
6120         error_call_unknown_return_type.
6121
6122 2017-09-04  Pedro Alves  <palves@redhat.com>
6123
6124         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6125         * ax-gdb.c (gen_msym_var_ref): New function.
6126         (gen_expr): Handle OP_VAR_MSYM_VALUE.
6127         * eval.c (evaluate_var_msym_value): New function.
6128         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6129         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6130         to call_function_by_hand.
6131         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6132         Handle OP_VAR_MSYM_VALUE.
6133         (union exp_element) <msymbol>: New field.
6134         * minsyms.h (struct type): Forward declare.
6135         (find_minsym_type_and_address): Declare.
6136         * parse.c (write_exp_elt_msym): New function.
6137         (write_exp_msymbol): Delete, refactored as ...
6138         (find_minsym_type_and_address): ... this new function.
6139         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6140         (operator_length_standard, operator_check_standard): Handle
6141         OP_VAR_MSYM_VALUE.
6142         * std-operator.def (OP_VAR_MSYM_VALUE): New.
6143
6144 2017-09-04  Pedro Alves  <palves@redhat.com>
6145
6146         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6147         TYPE_GNU_IFUNC specially here.  Throw error if return type is
6148         unknown.
6149         * ada-typeprint.c (print_func_type): Handle functions with unknown
6150         return type.
6151         * c-typeprint.c (c_type_print_base): Handle functions and methods
6152         with unknown return type.
6153         * compile/compile-c-symbols.c (convert_symbol_bmsym)
6154         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6155         * compile/compile-c-types.c: Include "objfiles.h".
6156         (convert_func): For functions with unknown return type, warn and
6157         default to int.
6158         * compile/compile-object-run.c (compile_object_run): Adjust call
6159         to call_function_by_hand_dummy.
6160         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6161         call_function_by_hand.
6162         * eval.c (evaluate_subexp_standard): Adjust calls to
6163         call_function_by_hand.  Handle functions and methods with unknown
6164         return type.  Pass expect_type to call_function_by_hand.
6165         * f-typeprint.c (f_type_print_base): Handle functions with unknown
6166         return type.
6167         * gcore.c (call_target_sbrk): Adjust call to
6168         call_function_by_hand.
6169         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6170         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
6171         an integer address type instead of nodebug.
6172         * guile/scm-value.c (gdbscm_value_call): Adjust call to
6173         call_function_by_hand.
6174         * infcall.c (error_call_unknown_return_type): New function.
6175         (call_function_by_hand): New "default_return_type" parameter.
6176         Pass it down.
6177         (call_function_by_hand_dummy): New "default_return_type"
6178         parameter.  Use it instead of defaulting to int.  If there's no
6179         default and the return type is unknown, throw an error.  If
6180         there's a default return type, and the called function has no
6181         debug info, then assume the function is prototyped.
6182         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6183         New "default_return_type" parameter.
6184         (error_call_unknown_return_type): New declaration.
6185         * linux-fork.c (call_lseek): Cast return type of lseek.
6186         (inferior_call_waitpid, checkpoint_command): Adjust calls to
6187         call_function_by_hand.
6188         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6189         calls to call_function_by_hand.
6190         * m2-typeprint.c (m2_procedure): Handle functions with unknown
6191         return type.
6192         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6193         (value_nsstring, print_object_command): Adjust calls to
6194         call_function_by_hand.
6195         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6196         functions with unknown return type.
6197         (pascal_type_print_func_varspec_suffix): New function.
6198         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6199         TYPE_CODE_METHOD>: Use it.
6200         * python/py-value.c (valpy_call): Adjust call to
6201         call_function_by_hand.
6202         * rust-lang.c (rust_evaluate_funcall): Adjust call to
6203         call_function_by_hand.
6204         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6205         call_function_by_hand.
6206         * valops.c (value_allocate_space_in_inferior): Adjust call to
6207         call_function_by_hand.
6208         * typeprint.c (type_print_unknown_return_type): New function.
6209         * typeprint.h (type_print_unknown_return_type): New declaration.
6210
6211 2017-09-04  Pedro Alves  <palves@redhat.com>
6212
6213         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6214         types with more than one parameter as prototyped.
6215
6216 2017-09-04  Pedro Alves  <palves@redhat.com>
6217
6218         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6219         (disassemble_command): Use gdb_disassembly_flags instead of bare
6220         int.
6221         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6222         (dump_insns, do_mixed_source_and_assembly_deprecated)
6223         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6224         Use gdb_disassembly_flags instead of bare int.
6225         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6226         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6227         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6228         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
6229         (enum gdb_disassembly_flag): ... values of this new enumeration.
6230         (gdb_disassembly_flags): Define.
6231         (gdb_disassembly)
6232         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6233         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6234         gdb_disassembly_flags instead of bare int.
6235         * record-btrace.c (btrace_insn_history)
6236         (record_btrace_insn_history, record_btrace_insn_history_range)
6237         (record_btrace_insn_history_from): Use gdb_disassembly_flags
6238         instead of bare int.
6239         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6240         Use gdb_disassembly_flags instead of bare int.
6241         * target-debug.h (target_debug_print_gdb_disassembly_flags):
6242         Define.
6243         * target-delegates.c: Regenerate.
6244         * target.c (target_insn_history, target_insn_history_from)
6245         (target_insn_history_range): Use gdb_disassembly_flags instead of
6246         bare int.
6247         * target.h: Include "disasm.h".
6248         (struct target_ops) <to_insn_history, to_insn_history_from,
6249         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6250         int.
6251         (target_insn_history, target_insn_history_from)
6252         (target_insn_history_range): Use gdb_disassembly_flags instead of
6253         bare int.
6254
6255 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6256
6257         * cli/cli-script.c (build_command_line): For if/while commands,
6258         check whether args is empty.
6259
6260 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6261
6262         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6263         (enum command_control_type): Likewise.
6264         (struct command_line): Likewise.
6265         (free_command_lines): Likewise.
6266         (struct command_lines_deleter): Likewise.
6267         (command_line_up): Likewise.
6268         (read_command_lines): Likewise.
6269         (read_command_lines_1): Likewise.
6270         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6271         (enum command_control_type): Likewise.
6272         (struct command_line): Likewise.
6273         (free_command_lines): Likewise.
6274         (struct command_lines_deleter): Likewise.
6275         (command_line_up): Likewise.
6276         (read_command_lines): Likewise.
6277         (read_command_lines_1): Likewise.
6278         * breakpoint.h: Include cli/cli-script.h.
6279         * extension-priv.h: Likewise.
6280         * gdbcmd.h: Likewise.
6281
6282 2017-09-04  Pedro Alves  <palves@redhat.com>
6283
6284         * ada-lang.c (is_known_support_routine): Move sal declaration to
6285         where it is initialized.
6286         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6287         (parse_breakpoint_sals, decode_static_tracepoint_spec)
6288         (clear_command, update_static_tracepoint): Remove init_sal
6289         references.  Move declarations closer to initializations.
6290         * cli/cli-cmds.c (list_command): Move sal declarations closer to
6291         initializations.
6292         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6293         references.  Move sal declarations closer to initializations.
6294         * frame.c (find_frame_sal): Return a symtab_and_line via function
6295         return instead of output parameter.  Remove init_sal references.
6296         * frame.h (find_frame_sal): Return a symtab_and_line via function
6297         return instead of output parameter.
6298         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6299         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6300         instead of memset.
6301         (gdbscm_find_pc_line): Remove init_sal reference.
6302         * infcall.c (call_function_by_hand_dummy): Remove init_sal
6303         references.  Move declarations closer to initializations.
6304         * infcmd.c (set_step_frame): Update.  Move declarations closer to
6305         initializations.
6306         (finish_backward): Remove init_sal references.  Move declarations
6307         closer to initializations.
6308         * infrun.c (process_event_stop_test, handle_step_into_function)
6309         (insert_hp_step_resume_breakpoint_at_frame)
6310         (insert_step_resume_breakpoint_at_caller): Likewise.
6311         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6312         (symbol_to_sal): Likewise.
6313         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6314         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6315         to its initialization.
6316         * reverse.c (save_bookmark_command): Use new/delete.  Remove
6317         init_sal references.  Move declarations closer to initializations.
6318         * source.c (get_current_source_symtab_and_line): Remove brace
6319         initialization.
6320         (set_current_source_symtab_and_line): Now takes the sal by const
6321         reference.  Remove brace initialization.
6322         (line_info): Remove init_sal reference.
6323         * source.h (set_current_source_symtab_and_line): Now takes a
6324         symtab_and_line via const reference.
6325         * stack.c (set_current_sal_from_frame): Adjust.
6326         (print_frame_info): Adjust.
6327         (get_last_displayed_sal): Return the sal via function return
6328         instead of via output parameter.  Simplify.
6329         (frame_info): Adjust.
6330         * stack.h (get_last_displayed_sal): Return the sal via function
6331         return instead of via output parameter.
6332         * symtab.c (init_sal): Delete.
6333         (find_pc_sect_line): Remove init_sal references.  Move
6334         declarations closer to initializations.
6335         (find_function_start_sal): Remove init_sal references.  Move
6336         declarations closer to initializations.
6337         * symtab.h (struct symtab_and_line): In-class initialize all
6338         fields.
6339         * tracepoint.c (set_traceframe_context)
6340         (print_one_static_tracepoint_marker): Remove init_sal references.
6341         Move declarations closer to initializations.
6342         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6343         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
6344         declarations closer to initializations.
6345         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6346         init_sal references.  Adjust.
6347
6348 2017-09-04  Pedro Alves  <palves@redhat.com>
6349
6350         * ax-gdb.c (agent_command_1): Use range-for.
6351         * break-catch-throw.c (re_set_exception_catchpoint): Update.
6352         * breakpoint.c: Include "common/array-view.h".
6353         (init_breakpoint_sal, create_breakpoint_sal): Change sals
6354         parameter from struct symtabs_and_lines to
6355         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
6356         (breakpoint_sals_to_pc): Change sals parameter from struct
6357         symtabs_and_lines to std::vector reference.
6358         (check_fast_tracepoint_sals): Change sals parameter from struct
6359         symtabs_and_lines to std::array_view.  Use range-for.
6360         (decode_static_tracepoint_spec): Return a std::vector instead of
6361         symtabs_and_lines.  Update.
6362         (create_breakpoint): Update.
6363         (break_range_command, until_break_command, clear_command): Update.
6364         (base_breakpoint_decode_location, bkpt_decode_location)
6365         (bkpt_probe_create_sals_from_location)
6366         (bkpt_probe_decode_location, tracepoint_decode_location)
6367         (tracepoint_probe_decode_location)
6368         (strace_marker_create_sals_from_location): Return a std::vector
6369         instead of symtabs_and_lines.
6370         (strace_marker_create_breakpoints_sal): Update.
6371         (strace_marker_decode_location): Return a std::vector instead of
6372         symtabs_and_lines.  Update.
6373         (update_breakpoint_locations): Change struct symtabs_and_lines
6374         parameters to gdb::array_view.  Adjust.
6375         (location_to_sals): Return a std::vector instead of
6376         symtabs_and_lines.  Update.
6377         (breakpoint_re_set_default): Use std::vector instead of struct
6378         symtabs_and_lines.
6379         (decode_location_default): Return a std::vector instead of
6380         symtabs_and_lines.  Update.
6381         * breakpoint.h: Include "common/array-view.h".
6382         (struct breakpoint_ops) <decode_location>: Now returns a
6383         std::vector instead of returning a symtabs_and_lines via output
6384         parameter.
6385         (update_breakpoint_locations): Change sals parameters to use
6386         gdb::array_view.
6387         * cli/cli-cmds.c (edit_command, list_command): Update to use
6388         std::vector and gdb::array_view.
6389         (ambiguous_line_spec): Adjust to use gdb::array_view and
6390         range-for.
6391         (compare_symtabs): Rename to ...
6392         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
6393         const reference and adjust.
6394         (filter_sals): Rewrite using std::vector and standard algorithms.
6395         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6396         (jump_command): Update to use std::vector.
6397         * linespec.c (struct linespec_state) <canonical_names>: Update
6398         comment.
6399         (add_sal_to_sals_basic): Delete.
6400         (add_sal_to_sals, filter_results, convert_results_to_lsals)
6401         (decode_line_2, create_sals_line_offset)
6402         (convert_address_location_to_sals, convert_linespec_to_sals)
6403         (convert_explicit_location_to_sals, parse_linespec)
6404         (event_location_to_sals, decode_line_full, decode_line_1)
6405         (decode_line_with_current_source)
6406         (decode_line_with_last_displayed, decode_objc)
6407         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6408         (linespec_result::~linespec_result): Adjust to use std::vector
6409         instead of symtabs_and_lines.
6410         * linespec.h (linespec_sals::sals): Now a std::vector.
6411         (struct linespec_result): Use std::vector, bool, and in-class
6412         initialization.
6413         (decode_line_1, decode_line_with_current_source)
6414         (decode_line_with_last_displayed): Return std::vector.
6415         * macrocmd.c (info_macros_command): Use std::vector.
6416         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6417         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6418         std::vector.
6419         * probe.h (parse_probes): Return a std::vector.
6420         * python/python.c (gdbpy_decode_line): Use std::vector and
6421         gdb::array_view.
6422         * source.c (select_source_symtab, line_info): Use std::vector.
6423         * stack.c (func_command): Use std::vector.
6424         * symtab.h (struct symtabs_and_lines): Delete.
6425         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6426
6427 2017-09-04  Pedro Alves  <palves@redhat.com>
6428
6429         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6430         unittests/array-view-selftests.c.
6431         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6432         * common/array-view.h: New file.
6433         * unittests/array-view-selftests.c: New file.
6434
6435 2017-09-04  Pedro Alves  <palves@redhat.com>
6436
6437         * cli/cli-cmds.c (edit_command): Pass message to
6438         ambiguous_line_spec.
6439         (list_command): Pass message to ambiguous_line_spec.  Say
6440         "first"/"last" instead of "start" and "end" to be consistent with
6441         the manual.
6442         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
6443         them to print formatted message.
6444
6445 2017-09-04  Pedro Alves  <palves@redhat.com>
6446
6447         * btrace.c (ftrace_add_pt): Pass btrace_insn to
6448         ftrace_update_insns by reference instead of pointer.
6449
6450 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6451
6452         * i386-go32-tdep.c: Include x86-xstate.h.
6453         (i386_go32_init_abi): Call i386_target_description.
6454         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6455         if xcr0 is X86_XSTATE_X87_MASK.
6456         * i386-tdep.h (tdesc_i386): Remove the declaration.
6457         (tdesc_i386_mmx): Likewise.
6458
6459 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6460
6461         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6462         X86_XSTATE_SSE_MASK instead of 0.
6463
6464 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6465
6466         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6467         i386_target_description.
6468         * i386-fbsd-nat.c (i386fbsd_read_description): Call
6469         i386_target_description.
6470         * i386-tdep.c (i386_gdbarch_init): Likewise.
6471
6472 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6473
6474         * amd64-darwin-tdep.c: Include "x86-xstate.h".
6475         (x86_darwin_init_abi_64): Call amd64_target_description.
6476         * amd64-dicos-tdep.c: Likewise.
6477         * amd64-fbsd-nat.c: Likewise.
6478         * amd64-fbsd-tdep.c: Likewise.
6479         * amd64-nbsd-tdep.c: Likewise.
6480         * amd64-obsd-tdep.c: Likewise.
6481         * amd64-sol2-tdep.c: Likewise.
6482         * amd64-windows-tdep.c: Likewise.
6483         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6484
6485 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6486
6487         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6488         (btrace_function) <insn>: Change type to use std::vector.
6489         * btrace.c (ftrace_debug, ftrace_call_num_insn,
6490         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6491         ftrace_update_insns, ftrace_compute_global_level_offset,
6492         btrace_stitch_bts, btrace_clear, btrace_insn_get,
6493         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6494         change to std::vector.
6495         (ftrace_update_insns): Adjust to change to std::vector, change
6496         type of INSN parameter.
6497         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6498         * record-btrace.c (btrace_call_history_insn_range,
6499         btrace_compute_src_line_range,
6500         record_btrace_frame_prev_register): Adjust to change to
6501         std::vector.
6502         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6503         to change to std::vector.
6504
6505 2017-09-03  Tom Tromey  <tom@tromey.com>
6506
6507         * corefile.c (reopen_exec_file): Use std::string.
6508
6509 2017-09-03  Tom Tromey  <tom@tromey.com>
6510
6511         * compile/compile.c (compile_register_name_mangled): Return
6512         std::string.
6513         * compile/compile-loc2c.c (pushf_register_address): Update.
6514         (pushf_register): Update.
6515         * compile/compile-c-types.c (convert_array): Update.
6516         * compile/compile-c-symbols.c (generate_vla_size): Update.
6517         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6518         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6519         (convert_one_symbol): Update.
6520         (generate_c_for_for_one_variable): Update.
6521         * compile/compile-c-support.c (c_get_range_decl_name): Return a
6522         std::string.
6523         (generate_register_struct): Update.
6524         * compile/compile-internal.h (c_get_range_decl_name): Return a
6525         std::string.
6526         (compile_register_name_mangled): Return std::string.
6527
6528 2017-09-03  Tom Tromey  <tom@tromey.com>
6529
6530         * utils.c (perror_string): Return a std::string.
6531         (throw_perror_with_name, perror_warning_with_name): Update.
6532
6533 2017-09-03  Tom Tromey  <tom@tromey.com>
6534
6535         * demangle.c (demangle_command): Use std::string,
6536         unique_xmalloc_ptr.
6537
6538 2017-09-03  Tom Tromey  <tom@tromey.com>
6539
6540         * cli/cli-setshow.c (do_set_command): Use std::string.
6541
6542 2017-09-03  Tom Tromey  <tom@tromey.com>
6543
6544         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6545
6546 2017-09-03  Tom Tromey  <tom@tromey.com>
6547
6548         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6549
6550 2017-09-03  Tom Tromey  <tom@tromey.com>
6551
6552         * mi/mi-cmd-env.c (env_execute_cli_command): Use
6553         gdb::unique_xmalloc_ptr.
6554
6555 2017-09-03  Tom Tromey  <tom@tromey.com>
6556
6557         * thread.c (print_thread_info_1): Use string_printf.
6558         (thread_apply_command, thread_apply_all_command): Use
6559         std::string.
6560
6561 2017-09-03  Tom Tromey  <tom@tromey.com>
6562
6563         * valprint.c (val_print_string): Update.
6564         * gdbcore.h (memory_error_message): Return std::string.
6565         * corefile.c (memory_error_message): Return std::string.
6566         (memory_error): Update.
6567         * breakpoint.c (insert_bp_location): Update.
6568
6569 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
6570
6571         * target/waitstatus.h (target_waitstatus_to_string): Change
6572         return type to std::string.
6573         * target/waitstatus.c (target_waitstatus_to_string): Return
6574         std::string.
6575         * target.h (target_waitstatus_to_string): Remove declaration.
6576         * infrun.c (resume, clear_proceed_status_thread,
6577         print_target_wait_results, do_target_wait, save_waitstatus,
6578         stop_all_threads): Adjust.
6579         * record-btrace.c (record_btrace_wait): Adjust.
6580         * target-debug.h
6581         (target_debug_print_struct_target_waitstatus_p): Adjust.
6582
6583 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6584
6585         PR gdb/22046
6586         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6587         detection.
6588
6589 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
6590
6591         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6592         for setting/unsetting environment variables on the remote target.
6593         (New remote packets): Add entries for QEnvironmentHexEncoded,
6594         QEnvironmentUnset and QEnvironmentReset.
6595         * common/environ.c (gdb_environ::operator=): Extend method to
6596         handle m_user_set_env_list and m_user_unset_env_list.
6597         (gdb_environ::clear): Likewise.
6598         (match_var_in_string): Change type of first parameter from 'char
6599         *' to 'const char *'.
6600         (gdb_environ::set): Extend method to handle
6601         m_user_set_env_list and m_user_unset_env_list.
6602         (gdb_environ::unset): Likewise.
6603         (gdb_environ::clear_user_set_env): New method.
6604         (gdb_environ::user_set_envp): Likewise.
6605         (gdb_environ::user_unset_envp): Likewise.
6606         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6607         m_user_unset_env_list on move constructor/assignment.
6608         (unset): Add new default parameter 'update_unset_list = true'.
6609         (clear_user_set_env): New method.
6610         (user_set_envp): Likewise.
6611         (user_unset_envp): Likewise.
6612         (m_user_set_env_list): New std::set.
6613         (m_user_unset_env_list): Likewise.
6614         * common/rsp-low.c (hex2str): New function.
6615         (bin2hex): New overload for bin2hex function.
6616         * common/rsp-low.c (hex2str): New prototype.
6617         (str2hex): New overload prototype.
6618         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6619         QEnvironmentUnset and QEnvironmentReset.
6620         (remote_protocol_features): Add QEnvironmentHexEncoded,
6621         QEnvironmentUnset and QEnvironmentReset packets.
6622         (send_environment_packet): New function.
6623         (extended_remote_environment_support): Likewise.
6624         (extended_remote_create_inferior): Call
6625         extended_remote_environment_support.
6626         (_initialize_remote): Add QEnvironmentHexEncoded,
6627         QEnvironmentUnset and QEnvironmentReset packet configs.
6628         * unittests/environ-selftests.c (gdb_selftest_env_var):
6629         New variable.
6630         (test_vector_initialization): New function.
6631         (test_init_from_host_environ): Likewise.
6632         (test_reinit_from_host_environ): Likewise.
6633         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6634         Likewise.
6635         (test_unset_set_empty_vector): Likewise.
6636         (test_vector_clear): Likewise.
6637         (test_std_move): Likewise.
6638         (test_move_constructor):
6639         (test_self_move): Likewise.
6640         (test_set_unset_reset): Likewise.
6641         (run_tests): Rewrite in terms of the functions above.
6642
6643 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
6644
6645         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6646         (adi_available): Use a temp variable of type CORE_ADDR as argument
6647         3 when calling target_auxv_search.
6648         (adi_normalize_address): Use masks and xor operators to calculate
6649         normalized address.
6650         (adi_read_versions, adi_write_versions, adi_print_versions)
6651         (do_examine, do_assign): Use paddress.
6652
6653 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
6654
6655         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6656         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6657         out of loop and add supply of FIR.
6658         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6659         add collect of FIR.
6660
6661 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
6662
6663         PR gdb/21827
6664         * cli/cli-script.c (define_command): Don't convert command name
6665         to lower case.
6666
6667 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
6668
6669         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6670         Update all callers accordingly. Remove all code blocks handling
6671         the case where DISPP is not NULL.
6672
6673 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6674
6675         PR symtab/22003
6676         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6677         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6678         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6679
6680 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6681
6682         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6683         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6684         (read_comp_units_from_section): New parameter abbrev_section, use
6685         read_and_check_comp_unit_head, allocate signatured_type if needed.
6686         (create_all_comp_units): Update read_comp_units_from_section caller.
6687
6688 2017-08-23  Pedro Alves  <palves@redhat.com>
6689
6690         PR remote/21852
6691         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6692         to null_ptid and switch to thread without reading the registers
6693         after adding the inferior.
6694
6695 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6696
6697         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6698         compile-gcc.
6699         * compile/compile.c (compile_gcc, show_compile_gcc): New.
6700         (compile_to_object): Implement compile_gcc.
6701         (_initialize_compile): Install "set compile-gcc".  Initialize
6702         compile_gcc.
6703
6704 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6705
6706         * compile/compile.c (compile_to_object): Conditionally call
6707         set_verbose.  Conditionally call compile or compile_v0.
6708
6709 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
6710
6711         * sparc64-tdep.h: (adi_normalize_address): New export.
6712         * sparc-nat.h: (open_adi_tag_fd): New export.
6713         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
6714         * sparc64-linux-tdep.c:
6715         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
6716         (sparc64_linux_handle_segmentation_fault): New function.
6717         (sparc64_linux_init_abi): Register
6718         sparc64_linux_handle_segmentation_fault
6719         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
6720         (sparc64_addr_bits_remove): New function.
6721         (sparc64_init_abi): Register sparc64_addr_bits_remove.
6722         (MAX_PROC_NAME_SIZE): New macro.
6723         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
6724         (sparc64adilist): New variable.
6725         (adi_proc_list): New variable.
6726         (find_adi_info): New function.
6727         (add_adi_info): New function.
6728         (get_adi_info_proc): New function.
6729         (get_adi_info): New function.
6730         (info_adi_command): New function.
6731         (read_maps_entry): New function.
6732         (adi_available): New function.
6733         (adi_normalize_address): New function.
6734         (adi_align_address): New function.
6735         (adi_convert_byte_count): New function.
6736         (adi_tag_fd): New function.
6737         (adi_is_addr_mapped): New function.
6738         (adi_read_versions): New function.
6739         (adi_write_versions): New function.
6740         (adi_print_versions): New function.
6741         (do_examine): New function.
6742         (do_assign): New function.
6743         (adi_examine_command): New function.
6744         (adi_assign_command): New function.
6745         (_initialize_sparc64_adi_tdep): New function.
6746
6747 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
6748
6749         * breakpoint.c (breakpoints_info): Rename to ...
6750         (info_breakpoints_command): ... this.
6751         (watchpoints_info): Rename to ...
6752         (info_watchpoints_command): ... this.
6753         (tracepoints_info): Rename to ...
6754         (info_tracepoints_command): ... this.
6755         (_initialize_breakpoint): Adjust.
6756         * dcache.c (dcache_info): Rename to ...
6757         (info_display_command): ... this.
6758         (_initialize_dcache): Adjust.
6759         * frame.h (args_info): Rename to ...
6760         (info_args_command): ... this.
6761         (locals_info): Rename to ...
6762         (info_locals_command): ... this.
6763         * infcmd.c (nofp_registers_info): Rename to ...
6764         (info_registers_command): ... this.
6765         (float_info): Rename to ...
6766         (info_float_command): ... this.
6767         (program_info): Rename to ...
6768         (info_program_command): ... this.
6769         (all_registers_info): Rename to ...
6770         (info_all_registers_command): ... this.
6771         (vector_info): Rename to ...
6772         (info_vector_command): ... this.
6773         (float_info): Rename to ...
6774         (info_float_command): ... this.
6775         (_initialize_infcmd): Adjust.
6776         * inferior.h (term_info): Rename to ...
6777         (info_terminal_command): ... this.
6778         * inflow.c (term_info): Rename to ...
6779         (info_terminal_command): ... this.
6780         (_initialize_inflow): Adjust.
6781         * infrun.c (signals_info): Rename to ...
6782         (info_signals_command): ... this.
6783         (_initialize_infrun): Adjust.
6784         * objc-lang.c (classes_info): Rename to ...
6785         (info_classes_command): ... this.
6786         (selectors_info): Rename to ...
6787         (info_selectors_command): ... this.
6788         (_initialize_objc_language): Adjust.
6789         * printcmd.c (sym_info): Rename to ...
6790         (info_symbol_command): ... this.
6791         (address_info): Rename to ...
6792         (info_address_command): ... this.
6793         (display_info): Rename to ...
6794         (info_display_command): ... this.
6795         (_initialize_printcmd): Adjust.
6796         * reverse.c (bookmarks_info): Rename to ...
6797         (info_breakpoints_command): ... this.
6798         (_initialize_reverse): Adjust.
6799         * ser-go32.c (dos_info): Rename to ...
6800         (info_serial_command): ... this.
6801         (_initialize_ser_dos): Adjust.
6802         * skip.c (skip_info): Rename to ...
6803         (info_skip_command): ... this.
6804         (_initialize_step_skip): Adjust.
6805         * source.c (line_info): Rename to ...
6806         (info_line_command): ... this.
6807         (source_info): Rename to ...
6808         (info_source_command)
6809         * stack.c (frame_info): Rename to ...
6810         (info_frame_command): ... this.
6811         (locals_info): Rename to ...
6812         (info_locals_command): ... this.
6813         (args_info): Rename to ...
6814         (info_args_command): ... this.
6815         (_initialize_stack): Adjust.
6816         * symtab.c (sources_info): Rename to ...
6817         (info_sources_command): ... this.
6818         (variables_info): Rename to ...
6819         (info_variables_command): ... this.
6820         (functions_info): Rename to ...
6821         (info_functions_command): ... this.
6822         (types_info): Rename to ...
6823         (info_types_command): ... this.
6824         (_initialize_symtab): Adjust.
6825         * target.c (target_info): Rename to ...
6826         (info_target_command): ... this.
6827         (initialize_targets): Adjust.
6828         * tracepoint.c (tvariables_info): Rename to ...
6829         (info_tvariables_command): ... this.
6830         (scope_info): Rename to ...
6831         (info_scope_command): ... this.
6832         (trace_dump_actions): Adjust.
6833         (_initialize_tracepoint): Adjust.
6834
6835 2017-08-22  Tom Tromey  <tom@tromey.com>
6836
6837         * breakpoint.h (install_breakpoint): Update.
6838         * breakpoint.c (add_solib_catchpoint): Update.
6839         (install_breakpoint): Change argument to a std::unique_ptr.
6840         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6841         (create_breakpoint_sal, create_breakpoint): Update.
6842         (watch_command_1, catch_exec_command_1)
6843         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6844         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6845         Return the breakpoint.
6846         (set_raw_breakpoint_without_location, set_raw_breakpoint)
6847         (new_single_step_breakpoint): Update.
6848         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
6849         std::unique_ptr.
6850         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6851         std::unique_ptr.
6852         * break-catch-sig.c (create_signal_catchpoint): Use
6853         std::unique_ptr.
6854         * ada-lang.c (create_ada_exception_catchpoint): Use
6855         std::unique_ptr.
6856
6857 2017-08-22  Tom Tromey  <tom@tromey.com>
6858
6859         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
6860
6861 2017-08-22  Tom Tromey  <tom@tromey.com>
6862
6863         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
6864         (lookup_partial_symbol): Update.
6865
6866 2017-08-22  Tom Tromey  <tom@tromey.com>
6867
6868         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
6869         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
6870         (find_and_open_source, symtab_to_fullname): Update.
6871         * psymtab.c (psymtab_to_fullname): Update.
6872
6873 2017-08-22  Tom Tromey  <tom@tromey.com>
6874
6875         * exec.c (exec_file_attach): Update.
6876         * linux-thread-db.c (try_thread_db_load): Update.
6877         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
6878         * utils.c (gdb_realpath): Change return type.
6879         (gdb_realpath_keepfile): Update.
6880         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
6881         (_initialize_utils): Register the new self test.
6882         * source.c (openp): Update.
6883         (find_and_open_source): Update.
6884         * nto-tdep.c (nto_find_and_open_solib): Update.
6885         * main.c (set_gdb_data_directory): Update.
6886         (captured_main_1): Update.
6887         * dwarf2read.c (dwarf2_get_dwz_file): Update
6888         (dw2_map_symbol_filenames): Update.
6889         * auto-load.c (auto_load_safe_path_vec_update): Update.
6890         (filename_is_in_auto_load_safe_path_vec): Change type of
6891         "filename_realp".
6892         (auto_load_objfile_script): Update.
6893         (file_is_auto_load_safe): Update.  Use std::string.
6894         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
6895
6896 2017-08-22  Tom Tromey  <tom@tromey.com>
6897
6898         * utils.c (gdb_realpath_keepfile): Return a
6899         gdb::unique_xmalloc_ptr.
6900         * exec.c (exec_file_attach): Update.
6901         * utils.h (gdb_realpath_keepfile): Return a
6902         gdb::unique_xmalloc_ptr.
6903
6904 2017-08-22  Tom Tromey  <tom@tromey.com>
6905
6906         * compile/compile.c (compile_file_command): Use
6907         gdb::unique_xmalloc_ptr, std::string.
6908         * utils.c (gdb_abspath): Change return type.
6909         * source.c (openp): Update.
6910         * objfiles.c (allocate_objfile): Update.
6911         * main.c (set_gdb_data_directory): Update.
6912         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
6913
6914 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
6915
6916         * cli-cmds.c (list_commands): List actual code around more than
6917         one location.
6918
6919 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
6920
6921         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
6922
6923 2017-08-21  Pedro Alves  <palves@redhat.com>
6924
6925         PR gdb/19487
6926         * c-exp.y (variable production): Handle function aliases.
6927         * minsyms.c (msymbol_is_text): New function.
6928         * minsyms.h (msymbol_is_text): Declare.
6929         * symtab.c (find_function_alias_target): New function.
6930         * symtab.h (find_function_alias_target): Declare.
6931
6932 2017-08-21  Pedro Alves  <palves@redhat.com>
6933
6934         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
6935         typedefs.
6936         * typeprint.c (whatis_exp): If handling "whatis", and expression
6937         is OP_TYPE, strip one typedef level.  Otherwise don't strip
6938         typedefs here.
6939         * valops.c (value_cast): Save "to" type before resolving
6940         stubs/typedefs.  Use that type as resulting value's type.
6941
6942 2017-08-18  Tom Tromey  <tom@tromey.com>
6943             Pedro Alves  <palves@redhat.com>
6944
6945         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
6946         * sol-thread.c (sol_thread_resume, sol_thread_wait)
6947         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
6948         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
6949         * proc-service.c (ps_xfer_memory): Use scoped_restore.
6950         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
6951         (linux_get_siginfo_data): Add "thread" argument.  Use
6952         scoped_restore.
6953         * linux-nat.c (linux_child_follow_fork)
6954         (check_stopped_by_watchpoint): Use scoped_restore.
6955         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
6956         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
6957         (restore_inferior_ptid, save_inferior_ptid): Remove.
6958         * btrace.c (btrace_fetch): Use scoped_restore.
6959         * bsd-uthread.c (bsd_uthread_fetch_registers)
6960         (bsd_uthread_store_registers): Use scoped_restore.
6961         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
6962         scoped_restore.
6963         * aix-thread.c (aix_thread_resume, aix_thread_wait)
6964         (aix_thread_xfer_partial): Use scoped_restore.
6965         * inferior.h (save_inferior_ptid): Remove.
6966
6967 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6968
6969         PR tdep/21818
6970         * arm-tdep.c (gdb_print_insn_arm): Mark
6971         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
6972
6973 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6974
6975         * NEWS: Mention GDBserver's new option "--selftest".
6976         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
6977         * selftest.c: Move it to common/selftest.c.
6978         * selftest.h: Move it to common/selftest.h.
6979         * selftest-arch.c (reset): New function.
6980         (tests_with_arch): Call reset.
6981
6982 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6983
6984         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
6985         instead of exception_fprintf and printf_filtered.
6986
6987 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6988
6989         * selftest.c (register_self_test): Rename it to
6990         selftests::register_test.
6991         (run_self_tests): selftest::run_tests.
6992         * selftest.h: Update declarations.
6993         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
6994         selftests::register_test_foreach_arch.
6995         * selftest-arch.h: Update declaration.
6996         * aarch64-tdep.c: Update.
6997         * arm-tdep.c: Likewise.
6998         * disasm-selftests.c: Likewise.
6999         * dwarf2loc.c: Likewise.
7000         * dwarf2-frame.c: Likewise.
7001         * findvar.c: Likewise.
7002         * gdbarch-selftests.c: Likewise.
7003         * maint.c (maintenance_selftest): Likewise.
7004         * regcache.c: Likewise.
7005         * rust-exp.y: Likewise.
7006         * selftest-arch.c: Likewise.
7007         * unittests/environ-selftests.c: Likewise.
7008         * unittests/function-view-selftests.c: Likewise.
7009         * unittests/offset-type-selftests.c: Likewise.
7010         * unittests/optional-selftests.c: Likewise.
7011         * unittests/scoped_restore-selftests.c: Likewise.
7012         * utils-selftests.c: Likewise.
7013
7014 2017-08-17  Pedro Alves  <palves@redhat.com>
7015
7016         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7017         local.
7018
7019 2017-08-17  Pedro Alves  <palves@redhat.com>
7020
7021         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7022         field.
7023         (reset_die_in_process): Delete, replaced by ...
7024         (process_die_scope): ... this new class.  Make it responsible for
7025         freeing cu->line_header too.
7026         (process_die): Use process_die_scope.
7027         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7028         cu->line_header_die_owner.  Don't release the line header if it's
7029         owned by the CU.
7030         (setup_type_unit_groups): Make the CU/DIE own the line header.
7031         Don't release the line header here.
7032
7033 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
7034
7035         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7036
7037 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7038
7039         * NEWS: Mention new shortcuts for nexti and stepi in TUI
7040         Single-Key mode
7041
7042 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7043
7044         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7045         mode command list.
7046
7047 2017-08-15  Stafford Horne  <shorne@gmail.com>
7048
7049         * MAINTAINERS (Write After Approval): Add Stafford Horne.
7050
7051 2017-08-15  Stafford Horne  <shorne@gmail.com>
7052
7053         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7054
7055 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
7056
7057         PR gdb/21954
7058         * infcmd.c (unset_environment_command): Use the 'clear' method on
7059         the environment instead of resetting it.
7060
7061 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
7062
7063         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7064         platforms.
7065
7066 2017-08-14  Tom Tromey  <tom@tromey.com>
7067
7068         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7069         (print_binary_chars): Likewise.
7070         (BITS_IN_BYTES): Remove.
7071
7072 2017-08-14  Tom Tromey  <tom@tromey.com>
7073
7074         PR gdb/21675
7075         * valprint.c (LOW_ZERO): Change value to 034.
7076         (print_octal_chars): Add static_asserts for octal constants.
7077         * printcmd.c (print_scalar_formatted): Add 'd' case.
7078
7079 2017-08-11  Tom Tromey  <tom@tromey.com>
7080
7081         * symfile.c (add_symbol_file_command): Use std::vector.
7082
7083 2017-08-14  Tom Tromey  <tom@tromey.com>
7084
7085         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7086         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7087         std::move.
7088         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7089
7090 2017-08-11  Pedro Alves  <palves@redhat.com>
7091
7092         * infrun.c (process_event_stop_test): Adjust
7093         function_name_is_marked_for_skip call.
7094         * skip.c: Include <list>.
7095         (skiplist_entry): Make it a class with private fields, and
7096         getters/setters.
7097         (skiplist_entry_chain): Delete.
7098         (skiplist_entries): New.
7099         (skiplist_entry_count): Delete.
7100         (highest_skiplist_entry_num): New.
7101         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7102         (add_skiplist_entry): Delete.
7103         (skiplist_entry::skiplist_entry): New.
7104         (skiplist_entry::add_entry): New.
7105         (skip_file_command, skip_function): Adjust.
7106         (compile_skip_regexp): Delete.
7107         (skip_command): Don't compile regexp here.  Adjust to use
7108         skiplist_entry::add_entry.
7109         (skip_info): Adjust to use range-for and getters.
7110         (skip_enable_command, skip_disable_command): Adjust to use
7111         range-for and setters.
7112         (skip_delete_command): Adjust to use std::list.
7113         (add_skiplist_entry): Delete.
7114         (skip_file_p): Delete, refactored as ...
7115         (skiplist_entry::do_skip_file_p): ... this new method.
7116         (skip_gfile_p): Delete, refactored as ...
7117         (skiplist_entry::do_gskip_file_p): ... this new method.
7118         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7119         (skiplist_entry::skip_function_p): ... this new method.
7120         (function_name_is_marked_for_skip): Now returns bool, and takes
7121         the function sal by const reference.  Adjust to use range-for and
7122         skiplist_entry methods.
7123         (_initialize_step_skip): Remove references to
7124         skiplist_entry_chain, skiplist_entry_count.
7125         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7126         takes the function sal by const reference.
7127
7128 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7129
7130         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7131         (dwarf2_frame_cache): Remove reset_cache_cleanup.
7132         (dwarf2_frame_cache):
7133         * frame-unwind.c (frame_unwind_try_unwinder): Catch
7134         RETURN_MASK_ALL and set *this_case to NULL.
7135         * frame-unwind.h: Update comments.
7136
7137 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7138
7139         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7140         (dwarf2_frame_state_copy_regs): Remove.
7141         (dwarf2_frame_state_free_regs): Remove.
7142         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7143         (dwarf2_restore_rule): Call method .alloc_regs instead of
7144         dwarf2_frame_state_alloc_regs.
7145         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
7146         constructor.  Call std::move.
7147         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7148         (dwarf2_frame_cache): Likewise.
7149
7150         [GDB_SELF_TEST]: Include selftest.h and
7151         selftest-arch.h.
7152         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7153         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7154         execute_cfa_program_test.
7155
7156         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7157         copy ctor, assignment operator, move assignment.
7158         <alloc_regs>: New method.
7159         <swap>: New method.
7160         (struct dwarf2_frame_state): Delete dtor.
7161         (dwarf2_frame_state_alloc_regs): Remove declaration.
7162         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7163         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7164
7165 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7166
7167         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7168         (dwarf2_frame_state::dwarf2_frame_state): New.
7169         (dwarf2_frame_state::~dwarf2_frame_state): New.
7170         (dwarf2_fetch_cfa_info): Update.
7171         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
7172         rather than a pointer.  Update code.
7173         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7174         dtor.
7175         <data_align, code_align, retaddr_column>: Change them to const.
7176         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7177         to bool.
7178
7179 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7180
7181         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7182         <loc.exp>: New field.
7183         * dwarf2-frame.c (execute_cfa_program): Update.
7184         (dwarf2_frame_prev_register): Update.
7185
7186 2017-08-10  Pedro Alves  <palves@redhat.com>
7187
7188         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7189
7190 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7191
7192         * fbsd-nat.c (struct fbsd_fork_info): Remove.
7193         (fbsd_pending_children): Use std::list.
7194         (fbsd_remember_child): Likewise.
7195         (fbsd_is_child_pending): Likewise.
7196         (fbsd_pending_vfork_done): Use std::forward_list.
7197         (fbsd_add_vfork_done): Likewise.
7198         (fbsd_is_vfork_done_pending): Likewise.
7199         (fbsd_next_vfork_done): Likewise.
7200
7201 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7202
7203         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7204         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7205         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7206         for `mapfilename'.
7207         (fbsd_xfer_partial): Use gdb::byte_vector.
7208         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7209
7210 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7211
7212         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7213         "filestuff.h".
7214         (fbsd_find_memory_regions): Fix `mapfile' initialization.
7215
7216 2017-08-09  Tom Tromey  <tom@tromey.com>
7217
7218         * skip.c (skiplist_entry): New constructor.
7219         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7220         (skiplist_entry::file_is_glob): Now bool.
7221         (skiplist_entry::file, skiplist_entry::function): Now
7222         std::string.
7223         (make_skip_entry): Return a unique_ptr.  Use new.
7224         (free_skiplist_entry, free_skiplist_entry_cleanup)
7225         (make_free_skiplist_entry_cleanup): Remove.
7226         (skip_command, skip_disable_command, add_skiplist_entry)
7227         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7228         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7229         (function_name_is_marked_for_skip): Update.
7230         (skip_delete_command): Update.  Use delete.
7231
7232 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
7233
7234         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7235         (aarch64_linux_core_read_description): New function.
7236         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7237
7238 2017-08-09  Pedro Alves  <palves@redhat.com>
7239
7240         * cp-name-parser.y (cp_comp_to_string): Return a
7241         gdb::unique_xmalloc_ptr<char>.
7242         * cp-support.c (replace_typedefs_qualified_name)
7243         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7244         (cp_canonicalize_string_full): Use op= instead of explicit
7245         convertion.
7246         (cp_class_name_from_physname, method_name_from_physname)
7247         (cp_func_name, cp_remove_params): Adjust to use
7248         gdb::unique_xmalloc_ptr<char>.
7249         * cp-support.h (cp_comp_to_string): Return a
7250         gdb::unique_xmalloc_ptr<char>.
7251         * python/py-type.c (typy_lookup_type): Adjust to use
7252         gdb::unique_xmalloc_ptr<char>.
7253
7254 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
7255
7256         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7257
7258 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
7259             Yao Qi  <yao.qi@linaro.org>
7260
7261         * cp-support.c (cp_canonicalize_string_full): Use
7262         gdb::unique_xmalloc_ptr<char>.
7263         (cp_canonicalize_string): Likewise.
7264
7265 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7266
7267         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7268         * regformats/i386/amd64-avx-avx512.dat: Remove.
7269         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7270         * regformats/i386/amd64-avx-mpx.dat:Remove.
7271         * regformats/i386/amd64-avx.dat: Remove.
7272         * regformats/i386/amd64-mpx.dat: Remove.
7273         * regformats/i386/i386-avx-avx512.dat: Remove.
7274         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7275         * regformats/i386/i386-avx-mpx.dat: Remove.
7276         * regformats/i386/i386-mmx.dat: Remove.
7277         * regformats/i386/i386-mpx.dat: Remove.
7278
7279 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7280
7281         * amd64-tdep.h (tdesc_x32): Remove the declaration.
7282         * amd64-tdep.c: Don't include features/i386/x32*.c.
7283         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7284         functions.
7285         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7286         and i386/x32-avx-avx512.
7287         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7288         and i386/x32.xml.
7289         * features/i386/x32-avx-avx512.c: Removed.
7290         * features/i386/x32-avx-avx512.xml: Removed.
7291         * features/i386/x32-avx.c: Removed.
7292         * features/i386/x32-avx.xml: Removed.
7293         * features/i386/x32.c: Removed.
7294         * features/i386/x32.xml: Removed.
7295         * regformats/i386/x32-avx-avx512.dat: Removed.
7296         * regformats/i386/x32-avx.dat: Removed.
7297         * regformats/i386/x32.dat: Removed.
7298
7299 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7300
7301         PR breakpoints/21886
7302         * mem-break.c (default_memory_insert_breakpoint): Use
7303         `->placed_address' rather than `->reqstd_address' for the
7304         breakpoint location.
7305
7306 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7307
7308         * arch-utils.c (default_print_insn): Remove arch/mach/endian
7309         assertions.
7310
7311 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7312
7313         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7314         a union of `tdep_info', `tdesc_data' and `id'.
7315         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7316         rather than `info.tdep_info'.
7317         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7318         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7319         * i386-tdep.c (i386_gdbarch_init): Likewise.
7320         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7321         * mips-tdep.c (mips_gdbarch_init): Likewise.
7322         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7323         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7324         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7325         `info.tdep_info'.
7326         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7327         `info.tdep_info'.
7328         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7329         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7330         `info.tdep_info'.
7331         * spu-tdep.c (spu_gdbarch_init): Likewise.
7332         * gdbarch.h: Regenerate.
7333
7334 2017-08-07  Leszek Swirski  <leszeks@google.com>
7335
7336         PR symtab/20899
7337         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7338
7339 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
7340
7341         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7342         (gdbsim_open): Rename gdb_argv args object to argv.
7343
7344 2017-08-05  Tom Tromey  <tom@tromey.com>
7345
7346         * compile/compile-object-load.c (compile_object_load): Use
7347         gdb::unique_xmalloc_ptr.
7348         * cli/cli-dump.c (scan_filename): Rename from
7349         scan_filename_with_cleanup.  Change return type.
7350         (scan_expression): Rename from scan_expression_with_cleanup.
7351         Change return type.
7352         (dump_memory_to_file, dump_value_to_file, restore_command):
7353         Use gdb::unique_xmalloc_ptr.  Update.
7354         * cli/cli-cmds.c (find_and_open_script): Use
7355         gdb::unique_xmalloc_ptr.
7356         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7357         * symmisc.c (maintenance_print_symbols)
7358         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7359         * symfile.c (symfile_bfd_open, generic_load)
7360         (add_symbol_file_command, remove_symbol_file_command): Use
7361         gdb::unique_xmalloc_ptr.
7362         * source.c (openp): Use gdb::unique_xmalloc_ptr.
7363         * psymtab.c (maintenance_print_psymbols): Use
7364         gdb::unique_xmalloc_ptr.
7365         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7366         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7367         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7368         (reload_shared_libraries_1): Likewise.
7369
7370 2017-08-05  Tom Tromey  <tom@tromey.com>
7371
7372         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7373         (rust_op_vector, rust_set_vector): New typedefs.
7374         (current_parser): New global.
7375         (work_obstack): Change to pointer type.  Update all users.
7376         (rust_ast, pstate): Remove globals.
7377         (struct rust_parser): New.
7378         (%union) <params, field_inits>: Change type.
7379         (start, tuple_expr, unit_expr, struct_expr_list, literal)
7380         (field_expr, expr_list, maybe_expr_list, type_list): Update.
7381         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7382         (convert_params_to_types, convert_params_to_expression): Change
7383         type of "params".
7384         (ast_string): Change type of "fields".
7385         (rust_parse): Make a rust_parser.  Remove cleanups.
7386         (rust_lex_tests): Make and install an auto_obstack.
7387
7388 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7389
7390         * configure.srv (ipa_x32_linux_regobj): New.
7391         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7392         instead of X86_TDESC_AVX512.
7393         (initialize_low_tracepoint): Call
7394         init_registers_x32_avx_avx512_linux.
7395
7396 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7397
7398         * utils.h (gdb_argv): Add namespace std for nullptr_t.
7399
7400 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7401
7402         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7403
7404 2017-08-03  Tom Tromey  <tom@tromey.com>
7405
7406         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7407         Remove.
7408         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7409
7410 2017-08-03  Tom Tromey  <tom@tromey.com>
7411
7412         * python/py-param.c (compute_enum_values): Use gdb_argv.
7413
7414 2017-08-03  Tom Tromey  <tom@tromey.com>
7415
7416         * utils.h (struct gdb_argv_deleter): New.
7417         (gdb_argv): New class.
7418         * utils.c (gdb_argv::reset): New method.
7419         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7420         * tracefile.c (tsave_command): Use gdb_argv.
7421         * top.c (new_ui_command): Use gdb_argv.
7422         * symmisc.c (maintenance_print_symbols)
7423         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7424         * symfile.c (symbol_file_command, generic_load)
7425         (remove_symbol_file_command): Use gdb_argv.
7426         * stack.c (backtrace_command): Use gdb_argv.
7427         * source.c (add_path, show_substitute_path_command)
7428         (unset_substitute_path_command, set_substitute_path_command):
7429         Use gdb_argv.
7430         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
7431         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7432         * remote.c (extended_remote_run, remote_put_command)
7433         (remote_get_command, remote_delete_command): Use gdb_argv.
7434         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7435         (gdbsim_open): Use gdb_argv.
7436         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7437         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7438         * procfs.c (procfs_info_proc): Use gdb_argv.
7439         * interps.c (interpreter_exec_cmd): Use gdb_argv.
7440         * infrun.c (handle_command): Use gdb_argv.
7441         * inferior.c (add_inferior_command, clone_inferior_command):
7442         Use gdb_argv.
7443         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7444         * exec.c (exec_file_command): Use gdb_argv.
7445         * cli/cli-cmds.c (alias_command): Use gdb_argv.
7446         * compile/compile.c (build_argc_argv): Use gdb_argv.
7447
7448 2017-08-03  Tom Tromey  <tom@tromey.com>
7449
7450         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7451
7452 2017-08-03  Tom Tromey  <tom@tromey.com>
7453
7454         * python/python.c (compute_python_string): Return std::string.
7455         (gdbpy_eval_from_control_command): Update.
7456         (do_start_initialization): Use std::string.
7457         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7458         xstrprintf.
7459         * python/py-breakpoint.c (local_setattro): Use string_printf, not
7460         xstrprintf.
7461
7462 2017-08-03  Tom Tromey  <tom@tromey.com>
7463
7464         * top.h (do_restore_instream_cleanup): Remove.
7465         * top.c (do_restore_instream_cleanup): Remove.
7466         (read_command_file): Use scoped_restore.
7467         * cli/cli-script.c (execute_user_command): Use scoped_restore.
7468
7469 2017-08-03  Tom Tromey  <tom@tromey.com>
7470
7471         * cli/cli-script.c (execute_user_command)
7472         (execute_control_command): Use scoped_restore.
7473
7474 2017-08-03  Tom Tromey  <tom@tromey.com>
7475
7476         * cli/cli-script.c (do_restore_user_call_depth): Remove.
7477         (execute_user_command): Remove user_call_depth; use
7478         user_args_stack's size instead.
7479
7480 2017-08-03  Tom Tromey  <tom@tromey.com>
7481
7482         * top.h (in_user_command): Remove.
7483         * top.c (in_user_command): Remove.
7484         * cli/cli-script.c (do_restore_user_call_depth)
7485         (execute_user_command): Update.
7486
7487 2017-08-03  Tom Tromey  <tom@tromey.com>
7488
7489         * valops.c (search_struct_method): Use gdb::byte_vector.
7490         * valarith.c (value_concat): Use std::vector.
7491         * target.c (memory_xfer_partial): Use gdb::byte_vector.
7492         (simple_search_memory): Likewise.
7493         * printcmd.c (find_string_backward): Use gdb::byte_vector.
7494         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7495         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7496         * elfread.c (elf_rel_plt_read): Use std::string.
7497         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7498         * cli/cli-dump.c (restore_section_callback): Use
7499         gdb::byte_vector.
7500
7501 2017-08-03  Tom Tromey  <tom@tromey.com>
7502
7503         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7504
7505 2017-08-03  Tom Tromey  <tom@tromey.com>
7506
7507         * tui/tui-regs.c (tui_restore_gdbout): Remove.
7508         (tui_register_format): Use scoped_restore.
7509
7510 2017-08-03  Tom Tromey  <tom@tromey.com>
7511
7512         * reverse.c (exec_direction_default): Remove.
7513         (exec_reverse_once): Use scoped_restore.
7514         * remote.c (restore_remote_timeout): Remove.
7515         (remote_flash_erase, remote_flash_write, remote_flash_done)
7516         (readchar, remote_serial_write): Use scoped_restore.
7517         * cli/cli-script.c (struct source_cleanup_lines_args)
7518         (source_cleanup_lines): Remove.
7519         (script_from_file): Use scoped_restore.
7520         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7521         (source_command): Use scoped_restore.
7522
7523 2017-08-03  Tom Tromey  <tom@tromey.com>
7524
7525         * utils.h (make_cleanup_free_so): Remove.
7526         * utils.c (do_free_so, make_cleanup_free_so): Remove.
7527         * solist.h (struct so_deleter): New.
7528         (so_list_up): New typedef.
7529         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7530
7531 2017-08-03  Tom Tromey  <tom@tromey.com>
7532
7533         * utils.h (make_cleanup_restore_current_language): Remove.
7534         * utils.c (do_restore_current_language)
7535         (make_cleanup_restore_current_language): Remove.
7536         * parse.c (parse_exp_in_context_1)
7537         (parse_expression_with_language): Use
7538         scoped_restore_current_language.
7539         * mi/mi-main.c (mi_cmd_execute): Use
7540         scoped_restore_current_language.
7541         * language.h (scoped_restore_current_language): New class.
7542
7543 2017-08-03  Tom Tromey  <tom@tromey.com>
7544
7545         * compile/compile.c (cleanup_unlink_file): Remove.
7546         (compile_to_object): Use gdb::unlinker.
7547         (eval_compile_command): Likewise.
7548
7549 2017-08-03  Tom Tromey  <tom@tromey.com>
7550
7551         * utils.h (make_cleanup_fclose): Remove.
7552         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7553
7554 2017-08-03  Tom Tromey  <tom@tromey.com>
7555
7556         * top.c (open_terminal_stream): Return gdb_file_up.
7557         (new_ui_command): Update.
7558
7559 2017-08-03  Tom Tromey  <tom@tromey.com>
7560
7561         * source.c (print_source_lines_base, forward_search_command)
7562         (reverse_search_command): Use gdb_file_up.
7563
7564 2017-08-03  Tom Tromey  <tom@tromey.com>
7565
7566         * fbsd-nat.c (fbsd_find_memory_regions): Update.
7567
7568 2017-08-03  Tom Tromey  <tom@tromey.com>
7569
7570         * cli/cli-cmds.c (find_and_open_script): Change return type.
7571         Remove "streamp" and "full_path" parameters.
7572         (source_script_with_search): Update.
7573         * auto-load.c (source_script_file): Update.
7574         * cli/cli-cmds.h (find_and_open_script): Change type.
7575         (open_script): New struct.
7576
7577 2017-08-03  Tom Tromey  <tom@tromey.com>
7578
7579         * xml-support.c (xml_fetch_content_from_file): Update.
7580         * ui-file.c (stdio_file::open): Update.
7581         * tracefile-tfile.c (tfile_start): Update.
7582         * remote.c (remote_file_put, remote_file_get): Update.
7583         * nat/linux-procfs.c (linux_proc_get_int)
7584         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7585         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7586         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7587         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7588         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7589         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7590         * linux-nat.c (linux_proc_pending_signals): Update.
7591         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7592         (file_closer): Remove.
7593         * compile/compile.c (compile_to_object): Update.
7594         * common/filestuff.h (struct gdb_file_deleter): New.
7595         (gdb_file_up): New typedef.
7596         (gdb_fopen_cloexec): Change return type.
7597         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7598         * cli/cli-dump.c (fopen_with_cleanup): Remove.
7599         (dump_binary_file, restore_binary_file): Update.
7600         * auto-load.c (auto_load_objfile_script_1): Update.
7601
7602 2017-08-03  Tom Tromey  <tom@tromey.com>
7603
7604         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7605         (info_static_tracepoint_markers_command): Likewise.
7606         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7607         * skip.c (skip_info): Use ui_out_emit_table.
7608         * progspace.c (print_program_space): Use ui_out_emit_table.
7609         * osdata.c (info_osdata): Use ui_out_emit_table.
7610         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7611         ui_out_emit_table.
7612         * linux-thread-db.c (info_auto_load_libthread_db): Use
7613         ui_out_emit_table.
7614         * inferior.c (print_inferior): Use ui_out_emit_table.
7615         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7616         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7617         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7618         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7619         * ui-out.h (class ui_out_emit_table): New.
7620
7621 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
7622
7623         * mips-tdep.c (mips_fpu_type_str): New function.
7624         (mips_dump_tdep): Call it.
7625
7626 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
7627
7628         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7629         `->mips_fpu_type'.
7630
7631 2017-07-31  Xavier Roirand  <roirand@adacore.com>
7632
7633         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7634
7635 2017-07-27  Xavier Roirand  <roirand@adacore.com>
7636
7637         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7638
7639 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7640
7641         * cli/cli-cmds.c (maintenancechecklist): New variable.
7642         * gdbcmd.h (maintenancechecklist): Declare it.
7643         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7644         Call i386_linux_read_description with different masks.
7645         * maint.c (maintenance_check_command): New function.
7646         (_initialize_maint_cmds): Call add_prefix_cmd.
7647         * target-descriptions.c (tdesc_reg): override operator != and ==.
7648         (tdesc_type): Likewise.
7649         (tdesc_feature): Likewise.
7650         (target_desc): Likewise.
7651         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7652         (maintenance_check_xml_descriptions): New function.
7653         (_initialize_target_descriptions) Add command "xml-descriptions".
7654         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7655
7656 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7657
7658         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7659         Include features/i386/32bit-*.c.
7660         (i386_linux_read_description): Generate target description if it
7661         doesn't exist.
7662         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7663         functions.
7664         * features/i386/32bit-linux.c: Re-generated.
7665         * features/i386/32bit-sse.c: Likewise.
7666         * target-descriptions.c (print_c_feature::visit): Print code to
7667         set register number if needed.
7668         (print_c_feature) <m_next_regnum>: New field.
7669
7670 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7671
7672         * features/Makefile (CFILES): Rename with TDESC_CFILES.
7673         (FEATURE_XMLFILES): New.
7674         (FEATURE_CFILES): New.
7675         New rules.
7676         (clean-cfiles): Remove generated c files.
7677         * features/i386/32bit-avx.c: Generated.
7678         * features/i386/32bit-avx512.c: Generated.
7679         * features/i386/32bit-core.c: Generated.
7680         * features/i386/32bit-linux.c: Generated.
7681         * features/i386/32bit-mpx.c: Generated.
7682         * features/i386/32bit-pkeys.c: Generated.
7683         * features/i386/32bit-sse.c: Generated.
7684         * target-descriptions.c: Include algorithm.
7685         (tdesc_element_visitor): Add method visit_end.
7686         (print_c_tdesc): Implement visit_end.
7687         (print_c_tdesc:: m_filename_after_features): Move it to
7688         protected.
7689         (print_c_feature): New class.
7690         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7691         name starts with "i386/32bit-".
7692
7693 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7694
7695         * target-descriptions.c (tdesc_element_visitor): New class.
7696         (tdesc_element): New class.
7697         (tdesc_reg): Inherit from tdesc_element.
7698         (tdesc_reg::accept): New function.
7699         (tdesc_type): Inherit from tdesc_element.
7700         (tdesc_type::accept): New function.
7701         (tdesc_feature): Inherit from tdesc_element.
7702         (tdesc_feature::accept): New function.
7703         (target_desc): Inherit from tdesc_element.
7704         (target_desc::target_desc): New.
7705         (target_desc::~target_desc): New.
7706         (target_desc::accept): New.
7707         (allocate_target_description): Use new.
7708         (free_target_description): Use delete.
7709         (print_c_tdesc): New class.
7710         (maint_print_c_tdesc_cmd): Adjust.
7711
7712         * features/aarch64.c: Re-generated.
7713         * features/arc-arcompact.c: Re-generated.
7714         * features/arc-v2.c: Re-generated.
7715         * features/arm/arm-with-iwmmxt.c: Re-generated.
7716         * features/arm/arm-with-m.c: Re-generated.
7717         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
7718         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
7719         * features/arm/arm-with-neon.c: Re-generated.
7720         * features/arm/arm-with-vfpv2.c: Re-generated.
7721         * features/arm/arm-with-vfpv3.c: Re-generated.
7722         * features/i386/amd64-avx-avx512.c: Re-generated.
7723         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7724         * features/i386/amd64-avx.c: Re-generated.
7725         * features/i386/amd64-avx-linux.c: Re-generated.
7726         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
7727         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7728         * features/i386/amd64-avx-mpx.c: Re-generated.
7729         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
7730         * features/i386/amd64.c: Re-generated.
7731         * features/i386/amd64-linux.c: Re-generated.
7732         * features/i386/amd64-mpx.c: Re-generated.
7733         * features/i386/amd64-mpx-linux.c: Re-generated.
7734         * features/i386/i386-avx-avx512.c: Re-generated.
7735         * features/i386/i386-avx-avx512-linux.c: Re-generated.
7736         * features/i386/i386-avx.c: Re-generated.
7737         * features/i386/i386-avx-linux.c: Re-generated.
7738         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
7739         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
7740         * features/i386/i386-avx-mpx.c: Re-generated.
7741         * features/i386/i386-avx-mpx-linux.c: Re-generated.
7742         * features/i386/i386.c: Re-generated.
7743         * features/i386/i386-linux.c: Re-generated.
7744         * features/i386/i386-mmx.c: Re-generated.
7745         * features/i386/i386-mmx-linux.c: Re-generated.
7746         * features/i386/i386-mpx.c: Re-generated.
7747         * features/i386/i386-mpx-linux.c: Re-generated.
7748         * features/i386/x32-avx-avx512.c: Re-generated.
7749         * features/i386/x32-avx-avx512-linux.c: Re-generated.
7750         * features/i386/x32-avx.c: Re-generated.
7751         * features/i386/x32-avx-linux.c: Re-generated.
7752         * features/i386/x32.c: Re-generated.
7753         * features/i386/x32-linux.c: Re-generated.
7754         * features/microblaze.c: Re-generated.
7755         * features/microblaze-with-stack-protect.c: Re-generated.
7756         * features/mips64-dsp-linux.c: Re-generated.
7757         * features/mips64-linux.c: Re-generated.
7758         * features/mips-dsp-linux.c: Re-generated.
7759         * features/mips-linux.c: Re-generated.
7760         * features/nds32.c: Re-generated.
7761         * features/nios2.c: Re-generated.
7762         * features/nios2-linux.c: Re-generated.
7763         * features/rs6000/powerpc-32.c: Re-generated.
7764         * features/rs6000/powerpc-32l.c: Re-generated.
7765         * features/rs6000/powerpc-403.c: Re-generated.
7766         * features/rs6000/powerpc-403gc.c : Re-generated.
7767         * features/rs6000/powerpc-405.c: Re-generated.
7768         * features/rs6000/powerpc-505.c: Re-generated.
7769         * features/rs6000/powerpc-601.c: Re-generated.
7770         * features/rs6000/powerpc-602.c: Re-generated.
7771         * features/rs6000/powerpc-603.c: Re-generated.
7772         * features/rs6000/powerpc-604.c: Re-generated.
7773         * features/rs6000/powerpc-64.c: Re-generated.
7774         * features/rs6000/powerpc-64l.c: Re-generated.
7775         * features/rs6000/powerpc-7400.c: Re-generated.
7776         * features/rs6000/powerpc-750.c: Re-generated.
7777         * features/rs6000/powerpc-860.c: Re-generated.
7778         * features/rs6000/powerpc-altivec32.c: Re-generated.
7779         * features/rs6000/powerpc-altivec32l.c: Re-generated.
7780         * features/rs6000/powerpc-altivec64.c: Re-generated.
7781         * features/rs6000/powerpc-altivec64l.c: Re-generated.
7782         * features/rs6000/powerpc-cell32l.c: Re-generated.
7783         * features/rs6000/powerpc-cell64l.c: Re-generated.
7784         * features/rs6000/powerpc-e500.c: Re-generated.
7785         * features/rs6000/powerpc-e500l.c: Re-generated.
7786         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
7787         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
7788         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
7789         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
7790         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
7791         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
7792         * features/rs6000/powerpc-vsx32.c: Re-generated.
7793         * features/rs6000/powerpc-vsx32l.c: Re-generated.
7794         * features/rs6000/powerpc-vsx64.c: Re-generated.
7795         * features/rs6000/powerpc-vsx64l.c: Re-generated.
7796         * features/rs6000/rs6000.c: Re-generated.
7797         * features/s390-linux32.c: Re-generated.
7798         * features/s390-linux32v1.c: Re-generated.
7799         * features/s390-linux32v2.c: Re-generated.
7800         * features/s390-linux64.c: Re-generated.
7801         * features/s390-linux64v1.c: Re-generated.
7802         * features/s390-linux64v2.c: Re-generated.
7803         * features/s390-te-linux64.c: Re-generated.
7804         * features/s390-tevx-linux64.c: Re-generated.
7805         * features/s390-vx-linux64.c: Re-generated.
7806         * features/s390x-linux64.c: Re-generated.
7807         * features/s390x-linux64v1.c: Re-generated.
7808         * features/s390x-linux64v2.c: Re-generated.
7809         * features/s390x-te-linux64.c: Re-generated.
7810         * features/s390x-tevx-linux64.c: Re-generated.
7811         * features/s390x-vx-linux64.c: Re-generated.
7812         * features/sparc/sparc32-solaris.c: Re-generated.
7813         * features/sparc/sparc64-solaris.c: Re-generated.
7814         * features/tic6x-c62x.c: Re-generated.
7815         * features/tic6x-c62x-linux.c: Re-generated.
7816         * features/tic6x-c64x.c: Re-generated.
7817         * features/tic6x-c64x-linux.c: Re-generated.
7818         * features/tic6x-c64xp.c: Re-generated.
7819         * features/tic6x-c64xp-linux.c: Re-generated.
7820
7821 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7822
7823         * i386-linux-tdep.c (i386_linux_read_description): New function.
7824         (i386_linux_core_read_description): Call
7825         i386_linux_read_description.
7826         * i386-linux-tdep.h (i386_linux_read_description): Declare.
7827         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
7828         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
7829         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
7830         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
7831         * x86-linux-nat.c (x86_linux_read_description): Call
7832         i386_linux_read_description.
7833
7834 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7835
7836         * NEWS: Mention it.
7837         * features/Makefile (%.c: %.xml): Pass the xml file name to
7838         command "maint print c-tdesc".
7839         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7840         name from 'arg'.
7841
7842 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7843
7844         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
7845         in-class initialization.
7846         (tdesc_create_feature): Call new instead of XCNEW.
7847         (free_target_description): Ue delete.
7848
7849 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
7850
7851         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
7852
7853 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7854
7855         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
7856         constant.
7857         (amd64_x32_init_abi): Likewise.
7858         * amd64-tdep.h (amd64_init_abi): Update declaration.
7859         (amd64_x32_init_abi): Likewise.
7860
7861 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7862
7863         PR tdep/21717
7864         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
7865         condition for FPSCR.
7866         (arm_linux_store_inferior_registers): Likewise.
7867
7868 2017-07-22  Tom Tromey  <tom@tromey.com>
7869
7870         * break-catch-syscall.c (struct catch_syscall_inferior_data)
7871         <syscalls_counts>: Now a std::vector.
7872         (get_catch_syscall_inferior_data): Use "new".
7873         (catch_syscall_inferior_data_cleanup): Use "delete".
7874         (insert_catch_syscall, remove_catch_syscall)
7875         (clear_syscall_counts): Update.
7876
7877 2017-07-22  Tom Tromey  <tom@tromey.com>
7878
7879         * break-catch-syscall.c (syscall_catchpoint)
7880         <syscalls_to_be_caught>: Now a std::vector<int>
7881         (~syscall_catchpoint): Remove.
7882         (insert_catch_syscall, remove_catch_syscall)
7883         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
7884         (print_mention_catch_syscall, print_recreate_catch_syscall):
7885         Update.
7886         (create_syscall_event_catchpoint): Change type of "filter"
7887         parameter.
7888         (catch_syscall_split_args): Return a std::vector.
7889         (catch_syscall_command_1, catching_syscall_number_1): Update.
7890
7891 2017-07-22  Tom Tromey  <tom@tromey.com>
7892
7893         * break-catch-throw.c (struct exception_catchpoint)
7894         <exception_rx>: Now a std::string.
7895         (~exception_catchpoint): Remove.
7896         (print_one_detail_exception_catchpoint): Update.
7897         (handle_gnu_v3_exceptions): Change type of except_rx.
7898         (extract_exception_regexp): Return a std::string.
7899         (catch_exception_command_1): Update.
7900
7901 2017-07-22  Tom Tromey  <tom@tromey.com>
7902
7903         * break-catch-sig.c (gdb_signal_type): Remove typedef.
7904         (struct signal_catchpoint) <signals_to_be_caught>: Now a
7905         std::vector.
7906         <catch_all>: Now a bool.
7907         (~signal_catchpoint): Remove.
7908         (signal_catchpoint_insert_location)
7909         (signal_catchpoint_remove_location)
7910         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
7911         (signal_catchpoint_print_mention)
7912         (signal_catchpoint_print_recreate)
7913         (signal_catchpoint_explains_signal): Update.
7914         (create_signal_catchpoint): Change type of "filter" and
7915         "catch_all".
7916         (catch_signal_split_args): Return a std::vector.  Change type of
7917         "catch_all".
7918         (catch_signal_command): Update.
7919
7920 2017-07-20  Pedro Alves  <palves@redhat.com>
7921
7922         * ada-lang.c (ada_language_defn): Make extern.
7923         (_initialize_ada_language): Remove add_language call.
7924         * c-lang.c (c_language_defn, cplus_language_defn)
7925         (asm_language_defn, minimal_language_defn): Make extern.
7926         (_initialize_c_language): Delete.
7927         * completer.c (compare_cstrings): Delete, moved to utils.h.
7928         * d-lang.c (d_language_defn): Make extern.
7929         (_initialize_d_language): Remove add_language calls.
7930         * defs.h (enum language): Add comment.
7931         * f-lang.c (f_language_defn): Make extern.
7932         (_initialize_f_language): Remove add_language call.
7933         * go-lang.c (go_language_defn): Make extern.
7934         (_initialize_go_language): Remove add_language call.
7935         * language.c: Include <algorithm>.
7936         (languages): Redefine as const array.
7937         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
7938         (set_language_command): Handle "local".  Use for-range loop.
7939         (set_language): Remove loop.
7940         (language_enum): Rewrite.
7941         (language_def, language_str): Remove loops.
7942         (add_language): Delete.
7943         (add_set_language_command): New, based on add_languages.
7944         (skip_language_trampoline): Adjust.
7945         (local_language_defn): Delete.
7946         (language_gdbarch_post_init): Adjust.
7947         (_initialize_language): Remove add_language calls.  Call
7948         add_set_language_command.
7949         * language.h (add_language): Delete.
7950         (auto_language_defn)
7951         (unknown_language_defn, minimal_language_defn, ada_language_defn)
7952         (asm_language_defn, c_language_defn, cplus_language_defn)
7953         (d_language_defn, f_language_defn, go_language_defn)
7954         (m2_language_defn, objc_language_defn, opencl_language_defn)
7955         (pascal_language_defn, rust_language_defn): Declare.
7956         * m2-lang.c (m2_language_defn): Make extern.
7957         (_initialize_m2_language): Remove add_language call.
7958         * objc-lang.c (objc_language_defn): Make extern.
7959         (_initialize_objc_language): Remove add_language call.
7960         * opencl-lang.c (opencl_language_defn): Make extern.
7961         (_initialize_opencl_language): Remove add_language call.
7962         * p-lang.c (pascal_language_defn): Make extern.
7963         (_initialize_pascal_language): Delete.
7964         * rust-lang.c (rust_language_defn): Make extern.
7965         (_initialize_rust_language): Delete.
7966         * utils.h (compare_cstrings): New static inline function.
7967
7968 2017-07-20  Pedro Alves  <palves@redhat.com>
7969
7970         * ada-lang.c (ada_to_fixed_type_1): Adjust.
7971         (get_var_value): Constify parameters.
7972         (get_int_var_value): Change prototype.
7973         (to_fixed_range_type): Adjust.
7974         * ada-lang.h (get_int_var_value): Change prototype.
7975
7976 2017-07-20  Pedro Alves  <palves@redhat.com>
7977
7978         * dwarf2read.c (dw2_lookup_symbol): Use
7979         SYMBOL_MATCHES_SEARCH_NAME.
7980         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
7981
7982 2017-07-20  Pedro Alves  <palves@redhat.com>
7983
7984         * block.c (block_iter_name_step, block_iter_name_first)
7985         (block_iter_name_next): Delete.
7986         (block_lookup_symbol_primary): Adjust to use
7987         dict_iter_match_first/dict_iter_match_next.
7988         * block.h (block_iter_name_first, block_iter_name_next): Delete
7989         declarations.
7990         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
7991         dict_iter_match_first/dict_iter_match_next.
7992
7993 2017-07-20  Pedro Alves  <palves@redhat.com>
7994
7995         * cp-support.c (cp_find_first_component_aux): Add missing case for
7996         end of string.
7997
7998 2017-07-18  David Blaikie  <dblaikie@gmail.com>
7999
8000         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8001         of dwo_cu's dwo_file.
8002
8003 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8004
8005         * remote.c (store_registers_using_G): Remove one line comment.
8006
8007 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8008
8009         * regcache.c (regcache_cpy): Simplify it.
8010         (regcache::cpy_no_passthrough): Remove it.
8011         * regcache.h (cpy_no_passthrough): Remove it.
8012         (regcache_dup, regcache_cpy): Update comments.
8013
8014 2017-07-18  Pedro Alves  <palves@redhat.com>
8015
8016         * remote-sim.c (sim_command_completer): Adjust to work with a
8017         completion_tracker instead of a VEC.
8018
8019 2017-07-17  Pedro Alves  <palves@redhat.com>
8020
8021         * completer.c (complete_source_filenames): New function.
8022         (complete_address_and_linespec_locations): New function.
8023         (location_completer): Use complete_address_and_linespec_locations.
8024         (completion_tracker::build_completion_result): Honor the tracker's
8025         request to suppress append.
8026         * completer.h (completion_tracker::suppress_append_ws)
8027         (completion_tracker::set_suppress_append_ws): New methods.
8028         (completion_tracker::m_suppress_append_ws): New field.
8029         (complete_source_filenames): New declaration.
8030         * linespec.c (linespec_complete_what): New.
8031         (struct ls_parser) <complete_what, completion_word,
8032         completion_quote_char, completion_quote_end, completion_tracker>:
8033         New fields.
8034         (string_find_incomplete_keyword_at_end): New.
8035         (linespec_lexer_lex_string): Record quote char.  If in completion
8036         mode, don't throw.
8037         (linespec_lexer_consume_token): Advance the completion word point.
8038         (linespec_lexer_peek_token): Save/restore completion info.
8039         (save_stream_and_consume_token): New.
8040         (set_completion_after_number): New.
8041         (linespec_parse_basic): Set what to complete next depending on
8042         token.  Handle function and label completions specially.
8043         (parse_linespec): Disable objc shortcut in completion mode.  Set
8044         what to complete next depending on token type.  Skip keyword if in
8045         completion mode.
8046         (complete_linespec_component, linespec_complete): New.
8047         * linespec.h (linespec_complete): Declare.
8048
8049 2017-07-17  Pedro Alves  <palves@redhat.com>
8050
8051         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8052         Handle 'operator<' / 'operator<<'.
8053
8054 2017-07-17  Pedro Alves  <palves@redhat.com>
8055
8056         * completer.c (collect_explicit_location_matches): Handle
8057         MATCH_LABEL.
8058         (convert_explicit_location_to_linespec): New, factored out from
8059         ...
8060         (convert_explicit_location_to_sals): ... this.
8061         (complete_label): New.
8062         (linespec_complete_label, find_label_symbols_in_block): New.
8063         (find_label_symbols): Add completion_mode parameter and adjust to
8064         call find_label_symbols_in_block.
8065         * linespec.h (linespec_complete_label): Declare.
8066
8067 2017-07-17  Pedro Alves  <palves@redhat.com>
8068
8069         * ada-lang.c (ada_collect_symbol_completion_matches): Add
8070         complete_symbol_mode parameter.
8071         * cli/cli-cmds.c (complete_command): Get the completion result out
8072         of the handle_brkchars tracker if used a custom word point.
8073         * completer.c: Include "linespec.h".
8074         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8075         (advance_to_expression_complete_word_point): New.
8076         (completion_tracker::completes_to_completion_word): New.
8077         (complete_files_symbols): Pass down
8078         complete_symbol_mode::EXPRESSION.
8079         (explicit_options, probe_options): New.
8080         (collect_explicit_location_matches): Complete on the
8081         explictit_loc->foo instead of word.  Use
8082         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
8083         keyword and options completions.
8084         (backup_text_ptr): Delete.
8085         (skip_keyword): New.
8086         (complete_explicit_location): Remove 'word' parameter.  Add
8087         language, quoted_arg_start and quoted_arg_end parameters.
8088         Rewrite, parsing left to right.
8089         (location_completer): Rewrite.
8090         (location_completer_handle_brkchars): New function.
8091         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8092         (enum complete_line_internal_reason): Adjust comments.
8093         (completion_tracker::discard_completions): New.
8094         (completer_handle_brkchars_func_for_completer): Handle
8095         location_completer.
8096         (gdb_custom_word_point_brkchars)
8097         (gdb_org_rl_basic_quote_characters): New.
8098         (gdb_completion_word_break_characters_throw)
8099         (completion_find_completion_word): Handle trackers that use a
8100         custom word point.
8101         (completion_tracker::advance_custom_word_point_by): New.
8102         (completion_tracker::build_completion_result): Don't rely on
8103         readline appending the quote char.
8104         (gdb_rl_attempted_completion_function_throw): Handle trackers that
8105         use a custom word point.
8106         (gdb_rl_attempted_completion_function): Restore
8107         rl_basic_quote_characters.
8108         * completer.h (class completion_tracker): Extend intro comment.
8109         (completion_tracker::set_quote_char)
8110         (completion_tracker::quote_char)
8111         (completion_tracker::set_use_custom_word_point)
8112         (completion_tracker::use_custom_word_point)
8113         (completion_tracker::custom_word_point)
8114         (completion_tracker::set_custom_word_point)
8115         (completion_tracker::advance_custom_word_point_by)
8116         (completion_tracker::completes_to_completion_word)
8117         (completion_tracker::discard_completions): New methods.
8118         (completion_tracker::m_quote_char)
8119         (completion_tracker::m_use_custom_word_point)
8120         (completion_tracker::m_custom_word_point): New fields.
8121         (advance_to_expression_complete_word_point): Declare.
8122         * f-lang.c (f_collect_symbol_completion_matches): Add
8123         complete_symbol_mode parameter.
8124         * language.h (struct language_defn)
8125         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8126         parameter.
8127         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
8128         (linespec_complete_function): New function.
8129         (linespec_lexer_lex_keyword): Adjust.
8130         * linespec.h (linespec_keywords, linespec_complete_function): New
8131         declarations.
8132         * location.c (find_end_quote): New function.
8133         (explicit_location_lex_one): Add explicit_completion_info
8134         parameter.  Save quoting info.  Don't throw if being called for
8135         completion.  Don't handle Ada operators here.
8136         (is_cp_operator, skip_op_false_positives, first_of)
8137         (explicit_location_lex_one_function): New function.
8138         (string_to_explicit_location): Replace 'dont_throw' parameter with
8139         an explicit_completion_info pointer parameter.  Handle it.  Don't
8140         use explicit_location_lex_one to lex function names.  Use
8141         explicit_location_lex_one_function instead.
8142         * location.h (struct explicit_completion_info): New.
8143         (string_to_explicit_location): Replace 'dont_throw' parameter with
8144         an explicit_completion_info pointer parameter.
8145         * symtab.c (default_collect_symbol_completion_matches_break_on):
8146         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
8147         (default_collect_symbol_completion_matches)
8148         (collect_symbol_completion_matches): Add complete_symbol_mode
8149         parameter.
8150         (collect_symbol_completion_matches_type): Pass down
8151         complete_symbol_mode::EXPRESSION.
8152         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8153         parameter.  Handle LINESPEC mode.
8154         * symtab.h (complete_symbol_mode): New.
8155         (default_collect_symbol_completion_matches_break_on)
8156         (default_collect_symbol_completion_matches)
8157         (collect_symbol_completion_matches)
8158         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8159         parameter.
8160
8161 2017-07-17  Pedro Alves  <palves@redhat.com>
8162
8163         * utils.c (enum class strncmp_iw_mode): New.
8164         (strcmp_iw): Rename to ...
8165         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
8166         parameters.  Handle them.
8167         (strncmp_iw): New.
8168         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8169         * utils.h (strncmp_iw): Declare.
8170         (strcmp_iw): Move describing comments here.
8171
8172 2017-07-17  Pedro Alves  <palves@redhat.com>
8173
8174         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8175         CP_OPERATOR_STR.
8176         * c-typeprint.c (is_type_conversion_operator): Use
8177         CP_OPERATOR_STR.
8178         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8179         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8180         CP_OPERATOR_LEN.
8181         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8182         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8183         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8184         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8185         CP_OPERATOR_STR.
8186         * location.c: Include "cp-support.h".
8187         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8188         CP_OPERATOR_STR.
8189         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8190         CP_OPERATOR_LEN.
8191
8192 2017-07-17  Pedro Alves  <palves@redhat.com>
8193
8194         * cli/cli-cmds.c (complete_command): Use a completion tracker
8195         along with completion_find_completion_word for handle_brkchars
8196         phase.
8197         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8198         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8199         (struct gdb_rl_completion_word_info): New.
8200         (gdb_rl_find_completion_word): New.
8201         (completion_find_completion_word): New.
8202         * completer.h (completion_find_completion_word): Declare.
8203
8204 2017-07-17  Pedro Alves  <palves@redhat.com>
8205
8206         * ada-lang.c (symbol_completion_match): Adjust comments.
8207         (symbol_completion_add): Replace vector parameter with
8208         completion_tracker parameter.  Use it.
8209         (ada_make_symbol_completion_list): Rename to...
8210         (ada_collect_symbol_completion_matches): ... this.  Add
8211         completion_tracker parameter and use it.
8212         (ada_language_defn): Adjust.
8213         * break-catch-syscall.c (catch_syscall_completer): Adjust
8214         prototype and work with completion_tracker instead of VEC.
8215         * breakpoint.c (condition_completer): Adjust prototype and work
8216         with completion_tracker instead of VEC.
8217         * c-lang.c (c_language_defn, cplus_language_defn)
8218         (asm_language_defn, minimal_language_defn): Adjust to renames.
8219         * cli/cli-cmds.c (complete_command): Rework using
8220         completion_tracker.  Catch exceptions when completing.
8221         * cli/cli-decode.c (integer_unlimited_completer)
8222         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8223         with completion_tracker instead of VEC.
8224         * command.h (struct completion_tracker): Forward declare.
8225         (completer_ftype, completer_handle_brkchars_ftype): Change
8226         types.
8227         (complete_on_cmdlist, complete_on_enum): Adjust.
8228         * completer.c: Include <algorithm>.
8229         (struct gdb_completer_state): New.
8230         (current_completion): New global.
8231         (readline_line_completion_function): Delete.
8232         (noop_completer, filename_completer)
8233         (filename_completer_handle_brkchars, complete_files_symbols)
8234         (linespec_location_completer): Adjust to work with a
8235         completion_tracker instead of a VEC.
8236         (string_or_empty): New.
8237         (collect_explicit_location_matches): Adjust to work with a
8238         completion_tracker instead of a VEC.
8239         (explicit_location_completer): Rename to ...
8240         (complete_explicit_location): ... this and adjust to work with a
8241         completion_tracker instead of a VEC.
8242         (location_completer): Adjust to work with a completion_tracker
8243         instead of a VEC.
8244         (add_struct_fields): Adjust to work with a completion_list instead
8245         of VEC.
8246         (expression_completer): Rename to ...
8247         (complete_expression): ... this and adjust to work with a
8248         completion_tracker instead of a VEC.  Use complete_files_symbols.
8249         (expression_completer): Reimplement on top of complete_expression.
8250         (symbol_completer): Adjust to work with a completion_tracker
8251         instead of a VEC.
8252         (enum complete_line_internal_reason): Add describing comments.
8253         (complete_line_internal_normal_command): Adjust to work with a
8254         completion_tracker instead of a VEC.
8255         (complete_line_internal): Rename to ...
8256         (complete_line_internal_1): ... this and adjust to work with a
8257         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
8258         handle_brkchars phase.
8259         (new_completion_tracker): Delete.
8260         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8261         complete_line_internal_1.
8262         (free_completion_tracker): Delete.
8263         (INITIAL_COMPLETION_HTAB_SIZE): New.
8264         (completion_tracker::completion_tracker)
8265         (completion_tracker::~completion_tracker): New.
8266         (maybe_add_completion): Delete.
8267         (completion_tracker::maybe_add_completion)
8268         (completion_tracker::add_completion)
8269         (completion_tracker::add_completions): New.
8270         (throw_max_completions_reached_error): Delete.
8271         (complete_line): Adjust to work with a completion_tracker instead
8272         of a VEC.  Don't create a completion_tracker_t or check for max
8273         completions here.
8274         (command_completer, command_completer_handle_brkchars)
8275         (signal_completer, reg_or_group_completer_1)
8276         (reg_or_group_completer, default_completer_handle_brkchars):
8277         Adjust to work with a completion_tracker.
8278         (gdb_completion_word_break_characters_throw): New.
8279         (gdb_completion_word_break_characters): Reimplement.
8280         (line_completion_function): Delete.
8281         (completion_tracker::recompute_lowest_common_denominator)
8282         (expand_preserving_ws)
8283         (completion_tracker::build_completion_result)
8284         (completion_result::completion_result)
8285         (completion_result::completion_result)
8286         (completion_result::~completion_result)
8287         (completion_result::completion_result)
8288         (completion_result::release_match_list, compare_cstrings)
8289         (completion_result::sort_match_list)
8290         (completion_result::reset_match_list)
8291         (gdb_rl_attempted_completion_function_throw)
8292         (gdb_rl_attempted_completion_function): New.
8293         * completer.h (completion_list, struct completion_result)
8294         (class completion_tracker): New.
8295         (complete_line): Add completion_tracker parameter.
8296         (readline_line_completion_function): Delete.
8297         (gdb_rl_attempted_completion_function): New.
8298         (noop_completer, filename_completer, expression_completer)
8299         (location_completer, symbol_completer, command_completer)
8300         (signal_completer, reg_or_group_completer): Update prototypes.
8301         (completion_tracker_t, new_completion_tracker)
8302         (make_cleanup_free_completion_tracker): Delete.
8303         (enum maybe_add_completion_enum): Delete.
8304         (maybe_add_completion): Delete.
8305         (throw_max_completions_reached_error): Delete.
8306         * corefile.c (complete_set_gnutarget): Adjust to work with a
8307         completion_tracker instead of a VEC.
8308         * cp-abi.c (cp_abi_completer): Adjust to work with a
8309         completion_tracker instead of a VEC.
8310         * d-lang.c (d_language_defn): Adjust.
8311         * disasm.c (disassembler_options_completer): Adjust to work with a
8312         completion_tracker instead of a VEC.
8313         * f-lang.c (f_make_symbol_completion_list): Rename to ...
8314         (f_collect_symbol_completion_matches): ... this.  Adjust to work
8315         with a completion_tracker instead of a VEC.
8316         (f_language_defn): Adjust.
8317         * go-lang.c (go_language_defn): Adjust.
8318         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8319         Adjust to work with a completion_tracker instead of a VEC.
8320         * infrun.c (handle_completer): Likewise.
8321         * interps.c (interpreter_completer): Likewise.
8322         * interps.h (interpreter_completer): Likewise.
8323         * language.c (unknown_language_defn, auto_language_defn)
8324         (local_language_defn): Adjust.
8325         * language.h (language_defn::la_make_symbol_completion_list):
8326         Rename to ...
8327         (language_defn::la_collect_symbol_completion_matches): ... this
8328         and adjust to work with a completion_tracker instead of a VEC.
8329         * m2-lang.c (m2_language_defn): Adjust.
8330         * objc-lang.c (objc_language_defn): Adjust.
8331         * opencl-lang.c (opencl_language_defn): Adjust.
8332         * p-lang.c (pascal_language_defn): Adjust.
8333         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8334         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8335         with a completion_tracker.
8336         * rust-lang.c (rust_language_defn): Adjust.
8337         * symtab.c (free_completion_list, do_free_completion_list)
8338         (return_val, completion_tracker): Delete.
8339         (completion_list_add_name, completion_list_add_symbol)
8340         (completion_list_add_msymbol, completion_list_objc_symbol)
8341         (completion_list_add_fields, add_symtab_completions): Add
8342         completion_tracker parameter and use it.
8343         (default_make_symbol_completion_list_break_on_1): Rename to...
8344         (default_collect_symbol_completion_matches_break_on): ... this.
8345         Add completion_tracker parameter and use it instead of allocating
8346         a completion tracker here.
8347         (default_make_symbol_completion_list_break_on): Delete old
8348         implementation.
8349         (default_make_symbol_completion_list): Delete.
8350         (default_collect_symbol_completion_matches): New.
8351         (make_symbol_completion_list): Delete.
8352         (collect_symbol_completion_matches): New.
8353         (make_symbol_completion_type): Rename to ...
8354         (collect_symbol_completion_matches_type): ... this.  Add
8355         completion_tracker parameter and use it instead of VEC.
8356         (make_file_symbol_completion_list_1): Rename to...
8357         (collect_file_symbol_completion_matches): ... this.  Add
8358         completion_tracker parameter and use it instead of VEC.
8359         (make_file_symbol_completion_list): Delete.
8360         (add_filename_to_list): Use completion_list instead of a VEC.
8361         (add_partial_filename_data::list): Now a completion_list.
8362         (make_source_files_completion_list): Work with a completion_list
8363         instead of a VEC.
8364         * symtab.h: Include "completer.h".
8365         (default_make_symbol_completion_list_break_on)
8366         (default_make_symbol_completion_list, make_symbol_completion_list)
8367         (make_symbol_completion_type, make_file_symbol_completion_list)
8368         (make_source_files_completion_list): Delete.
8369         (default_collect_symbol_completion_matches_break_on)
8370         (default_collect_symbol_completion_matches)
8371         (collect_symbol_completion_matches)
8372         (collect_symbol_completion_matches_type)
8373         (collect_file_symbol_completion_matches)
8374         (make_source_files_completion_list): New.
8375         * top.c (init_main): Don't install a rl_completion_entry_function
8376         hook.  Install a rl_attempted_completion_function hook instead.
8377         * tui/tui-layout.c (layout_completer): Adjust to work with a
8378         completion_tracker.
8379         * tui/tui-regs.c (tui_reggroup_completer):
8380         * tui/tui-win.c (window_name_completer, focus_completer)
8381         (winheight_completer): Adjust to work with a completion_tracker.
8382         * value.c: Include "completer.h".
8383         (complete_internalvar): Adjust to work with a completion_tracker.
8384         * value.h (complete_internalvar): Likewise.
8385
8386 2017-07-17  Pedro Alves  <palves@redhat.com>
8387
8388         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8389         renames.
8390         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8391         comments to completer_ftype's declaration.
8392         <completer_handle_brkchars>: Change type to
8393         completer_handle_brkchars_ftype.
8394         * command.h (completer_ftype): Add describing comment and give
8395         names to parameters.
8396         (completer_ftype_void): Rename to ...
8397         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
8398         (set_cmd_completer_handle_brkchars): Adjust.
8399         * completer.c (filename_completer_handle_brkchars): New function.
8400         (complete_line_internal_normal_command): New function, factored
8401         out from ...
8402         (complete_line_internal): ... here.
8403         (command_completer_handle_brkchars)
8404         (default_completer_handle_brkchars)
8405         (completer_handle_brkchars_func_for_completer): New functions.
8406         * completer.h (set_gdb_completion_word_break_characters): Delete
8407         declaration.
8408         (completer_handle_brkchars_func_for_completer): New declaration.
8409         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8410         completer_handle_brkchars_func_for_completer.
8411
8412 2017-07-17  Pedro Alves  <palves@redhat.com>
8413
8414         * completer.c (symbol_completer): New function, based on
8415         make_symbol_completion_list_fn.
8416         * completer.h (symbol_completer): New declaration.
8417         * guile/scm-cmd.c (cmdscm_completers): Adjust.
8418         * python/py-cmd.c (completers): Adjust.
8419         * symtab.c (make_symbol_completion_list_fn): Delete.
8420         * symtab.h (make_symbol_completion_list_fn): Delete.
8421         * cli/cli-decode.c (add_cmd): Adjust.
8422
8423 2017-07-17  Pedro Alves  <palves@redhat.com>
8424
8425         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8426         * dwarf2read.c: Include "filename-seen-cache.h".
8427         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8428         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8429         * filename-seen-cache.c: New file.
8430         * filename-seen-cache.h: New file.
8431         * symtab.c: Include "filename-seen-cache.h".
8432         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8433         (create_filename_seen_cache, clear_filename_seen_cache)
8434         (delete_filename_seen_cache, filename_seen): Delete, parts moved
8435         to filename-seen-cache.h/filename-seen-cache.c.
8436         (output_source_filename, sources_info)
8437         (maybe_add_partial_symtab_filename)
8438         (make_source_files_completion_list): Adjust to use
8439         filename_seen_cache.
8440
8441 2017-07-17  Pedro Alves  <palves@redhat.com>
8442
8443         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8444         fields.
8445         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8446         dwarf2_debug_sections*)): New.
8447         (dwarf2_per_objfile::dwarf2_per_objfile(const
8448         dwarf2_per_objfile&)): Declare as deleted.
8449         (dwarf2_per_objfile::operator=): Declare as deleted.
8450         (dwarf2_per_objfile::dwarf2_per_objfile)
8451         (dwarf2_per_objfile::~dwarf2_per_objfile)
8452         (dwarf2_per_objfile::free_cached_comp_units): New.
8453         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8454         ctor.  Call dwarf2_per_objfile's ctor manually.
8455         (dwarf2_locate_sections): Deleted/refactored as ...
8456         (dwarf2_per_objfile::locate_sections): ... this new method.
8457         (free_cached_comp_units): Defer to
8458         dwarf2_per_objfile::free_cached_comp_units.
8459         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8460
8461 2017-07-14  Tom Tromey  <tom@tromey.com>
8462
8463         PR rust/21764:
8464         * rust-exp.y (convert_ast_to_expression): Add "want_type"
8465         parameter.
8466         <UNOP_SIZEOF>: Split into separate case.
8467         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
8468
8469 2017-07-14  Tom Tromey  <tom@tromey.com>
8470
8471         PR rust/21763:
8472         * symtab.c (symbol_matches_domain): Add language_rust to special
8473         case.
8474         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8475         treat LOC_TYPEDEF symbols as variables.
8476
8477 2017-07-14  Pedro Alves  <palves@redhat.com>
8478
8479         * symtab.c (make_file_symbol_completion_list_1): Iterate over
8480         symtabs matching all symtabs with SRCFILE as file name instead of
8481         only considering the first hit, with lookup_symtab.
8482
8483 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8484
8485         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8486         operator_name parameters.
8487         (gen_expr): Update function call.
8488
8489 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8490
8491         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8492         parameter.
8493         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8494         Likewise.
8495         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8496         parameter, use agent_expr::gdbarch instead, update function
8497         calls.
8498         (locexpr_tracepoint_var_ref): Likewise.
8499         (loclist_tracepoint_var_ref): Likewise.
8500         * ax-gdb.c (gen_trace_static_fields): Likewise.
8501         (gen_traced_pop): Likewise.
8502         (gen_frame_args_address): Likewise.
8503         (gen_frame_locals_address): Likewise.
8504         (gen_var_ref): Likewise.
8505         (gen_struct_ref_recursive): Likewise.
8506         (gen_static_field): Likewise.
8507         (gen_maybe_namespace_elt): Likewise.
8508         (gen_expr): Likewise.
8509         (gen_trace_for_var): Likewise.
8510         (gen_trace_for_expr): Likewise.
8511         (gen_trace_for_return_address): Likewise.
8512
8513 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8514
8515         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8516         parameter.
8517         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8518
8519 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8520
8521         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8522         from ax, update calls.
8523         (gen_usual_arithmetic): Likewise.
8524         (gen_integral_promotions): Likewise.
8525         (gen_bitfield_ref): Likewise.
8526         (gen_primitive_field): Likewise.
8527         (gen_struct_ref_recursive): Likewise.
8528         (gen_struct_ref): Likewise.
8529         (gen_maybe_namespace_elt): Likewise.
8530         (gen_struct_elt_for_reference): Likewise.
8531         (gen_namespace_elt): Likewise.
8532         (gen_aggregate_elt_ref): Likewise.
8533         (gen_expr): Get gdbarch from ax, update calls.
8534         (gen_expr_binop_rest): Likewise.
8535
8536 2017-07-13  Pedro Alves  <palves@redhat.com>
8537
8538         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8539         as default tdesc.
8540         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8541         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8542         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8543         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
8544         tdep.
8545         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8546         Get final tdesc from the tdep.
8547         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8548         default tdesc.
8549         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8550         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8551         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8552         Use it as default tdesc.
8553         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8554         down to amd_init_abi.  No longer handle fallback tdesc here.
8555         * amd64-tdep.h (tdesc_x32): Declare.
8556         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8557         parameter.
8558         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8559         as default tdesc.
8560
8561 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8562
8563         * s390-linux-tdep.c (s390_process_record): Add support for
8564         instructions new in arch12.
8565
8566 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8567
8568         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8569         PT_GETFSBASE and PT_GETGSBASE.
8570         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8571         PT_SETGSBASE.
8572
8573 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8574
8575         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8576         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8577         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8578         those rules.
8579         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8580         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8581         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8582         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8583         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8584         * features/i386/amd64.xml: Add 64bit-segments.xml.
8585         * features/i386/amd64-avx-avx512.c: Regenerated.
8586         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8587         * features/i386/amd64-avx-mpx.c: Regenerated.
8588         * features/i386/amd64-avx.c: Regenerated.
8589         * features/i386/amd64-mpx.c: Regenerated.
8590         * features/i386/amd64.c: Regenerated.
8591         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8592         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8593         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8594         * regformats/i386/amd64-avx.dat: Regenerated.
8595         * regformats/i386/amd64-mpx.dat: Regenerated.
8596         * regformats/i386/amd64.dat: Regenerated.
8597
8598 2017-07-10  Yao Qi  <yao.qi@linaro.org>
8599
8600         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8601         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8602
8603 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
8604
8605         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8606         unsetenv.
8607         * gnulib/aclocal.m4: Regenerate.
8608         * gnulib/config.in: Regenerate.
8609         * gnulib/configure: Regenerate.
8610         * gnulib/import/Makefile.am: Regenerate.
8611         * gnulib/import/Makefile.in: Regenerate.
8612         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8613         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8614         * gnulib/import/m4/environ.m4: New file.
8615         * gnulib/import/m4/setenv.m4: New file.
8616         * gnulib/import/setenv.c: New file.
8617         * gnulib/import/unsetenv.c: New file.
8618
8619 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
8620
8621         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8622         address when op is DW_OP_addr.
8623
8624 2017-07-09  Tom Tromey  <tom@tromey.com>
8625
8626         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8627         check and apply to outer type.
8628
8629 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8630
8631         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8632         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8633         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8634         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8635
8636 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8637
8638         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8639
8640 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8641
8642         * corelow.c (get_core_siginfo): Remove.
8643         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8644         instead of get_core_siginfo.
8645         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8646         * gdbarch.h: Re-generate.
8647         * gdbarch.c: Re-generate.
8648         * linux-tdep.c (linux_core_xfer_siginfo): New.
8649         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8650
8651 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8652
8653         * corelow.c (thread_section_name): Move to ...
8654         * gdbcore.h (thread_section_name): ... here.
8655
8656 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8657
8658         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8659         (struct siginfo32): New.
8660         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8661         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8662         via ptrace(PT_LWPINFO).
8663
8664 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8665
8666         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8667         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8668         (fbsd_get_siginfo_type): New.
8669         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8670         (_initialize_fbsd_tdep): New.
8671
8672 2017-07-06  David Blaikie  <dblaikie@gmail.com>
8673
8674         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8675         a singular dwo_unit*) to support multiple CUs in the same way that
8676         multiple TUs are supported.
8677         (create_cus_hash_table): Replace create_dwo_cu with a function for
8678         parsing multiple CUs from a DWO file.
8679         (open_and_init_dwo_file): Use create_cus_hash_table rather than
8680         create_dwo_cu.
8681         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8682         htab_find, rather than comparing the signature to a singleton CU in
8683         the dwo_file.
8684
8685 2017-07-06  Pedro Alves  <palves@redhat.com>
8686
8687         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8688
8689 2017-07-04  Pedro Alves  <palves@redhat.com>
8690
8691         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8692         * gdbtypes.h (TYPE_STATIC): Delete.
8693         (struct fn_field) <is_public, is_abstract, is_static, is_final,
8694         is_synchronized, is_native>: Delete.
8695         <dummy>: Bump.
8696         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8697         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8698         (TYPE_FN_FIELD_ABSTRACT): Delete.
8699
8700 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
8701
8702         * buffer.h (buffer_finish): Fix spelling mistakes.
8703
8704 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
8705
8706         * .dir-locals.el: Automatically switch to C-style comments in
8707         versions of Emacs that support the feature.
8708
8709 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8710             Pedro Alves  <palves@redhat.com>
8711
8712         PR cli/21688
8713         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
8714         (process_next_line): New variable 'inline_cmd'.
8715         Adjust 'if' clauses for "python", "compile" and "guile" to use
8716         'command_name_equals' and check for '!inline_cmd'.
8717
8718 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8719
8720         PR cli/21688
8721         * cli/cli-script.c (command_name_equals_not_inline): New function.
8722         (process_next_line): Adjust 'if' clauses for "python", "compile"
8723         and "guile" to use command_name_equals_not_inline.
8724
8725 2017-06-29  Pedro Alves  <palves@redhat.com>
8726
8727         * completer.c (expression_completer): Call
8728         linespec_location_completer instead of location_completer.
8729
8730 2017-06-29  Pedro Alves  <palves@redhat.com>
8731
8732         * completer.c (expression_completer): Remove code that recomputes
8733         'text' from 'word'.
8734
8735 2017-06-29  Yao Qi  <yao.qi@linaro.org>
8736
8737         * regformats/regdat.sh: Generate code with
8738         "ifndef IN_PROCESS_AGENT".
8739
8740 2017-06-28  Pedro Alves  <palves@redhat.com>
8741
8742         * command.h: Include "common/scoped_restore.h".
8743
8744 2017-06-28  Yao Qi  <yao.qi@linaro.org>
8745
8746         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
8747         instead of obstack_grow.
8748
8749 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
8750
8751         PR gdb/21337
8752         * symfile.c (reread_symbols): Call objfiles_changed just before
8753         read_symbols.
8754
8755 2017-06-27  Pedro Alves  <palves@redhat.com>
8756
8757         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
8758         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
8759         (completion_list_add_symbol, completion_list_add_msymbol):
8760         ... these new functions.
8761         (add_symtab_completions)
8762         (default_make_symbol_completion_list_break_on_1): Adjust.
8763
8764 2017-06-27  Pedro Alves  <palves@redhat.com>
8765
8766         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
8767         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
8768         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
8769         dtor.
8770         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
8771         'storage_obstack' field an auto_obstack.  In-class initialize all
8772         non-bitfield fields.  Make minsyms_read bool.
8773         * symfile.c (read_symbols): Adjust.
8774
8775 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
8776
8777         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
8778         (gdbsim_store_register): Likewise.
8779
8780 2017-06-27  Pedro Alves  <palves@redhat.com>
8781
8782         * c-exp.y (name_obstack): Now an auto_obstack.
8783         (yylex): Use auto_obstack::clear.
8784         (c_parse): Use auto_obstack::clear instead of reinitializing and
8785         freeing the obstack.
8786         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
8787         * d-exp.y (name_obstack): Now an auto_obstack.
8788         (yylex): Use auto_obstack::clear.
8789         (d_parse): Use auto_obstack::clear instead of reinitializing and
8790         freeing the obstack.
8791         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
8792         auto_obstack.
8793         * dwarf2read.c (create_addrmap_from_index)
8794         (dwarf2_build_psymtabs_hard)
8795         (update_enumeration_type_from_children): Likewise.
8796         * gdb_obstack.h (auto_obstack): New type.
8797         * go-exp.y (name_obstack): Now an auto_obstack.
8798         (build_packaged_name): Use auto_obstack::clear.
8799         (go_parse): Use auto_obstack::clear instead of reinitializing and
8800         freeing the obstack.
8801         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
8802         auto_obstack.
8803         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
8804         * rust-exp.y (work_obstack): Now an auto_obstack.
8805         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
8806         reinitializing and freeing the obstack.
8807         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
8808         (host_char_to_target): Use auto_obstack.
8809         * utils.h (make_cleanup_obstack_free): Delete declaration.
8810         * valprint.c (generic_emit_char, generic_printstr): Use
8811         auto_obstack.
8812
8813 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
8814
8815         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
8816         thread.
8817         (darwin_init_thread_list): Don't update dummy thread.
8818         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
8819
8820 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8821
8822         * record-full.c (netorder16): Remove.
8823
8824 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8825
8826         * common/diagnostics.h: Define macros for GCC.
8827         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
8828         * common/vec.h: Include diagnostics.h.
8829         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
8830         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
8831         warning.
8832
8833 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8834
8835         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
8836         New macro.
8837         * ada-lex.l: Ignore deprecated register warnings.
8838
8839 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8840
8841         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8842         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8843
8844 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8845
8846         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
8847         its own line.
8848
8849 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8850
8851         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
8852
8853 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
8854
8855         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
8856         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
8857         (xtensa_register_read_masked): Likewise.
8858
8859 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
8860
8861         * common/environ.c (gdb_environ::unset): Update comment.
8862
8863 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8864
8865         * python/py-unwind.c (pyuw_sniffer): Allocate space for
8866         registers.
8867
8868 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8869
8870         * record-full.c (record_full_exec_insn): Use byte_vector.
8871
8872 2017-06-22  Yao Qi  <yao.qi@linaro.org>
8873
8874         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
8875         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8876
8877 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8878
8879         * remote.c (cached_reg): Move from here...
8880         * regcache.h (cached_reg): ...to here.
8881         * python/py-unwind.c (struct reg_info): Remove.
8882         (cached_frame_info): Use cached_reg_t.
8883         (pyuw_prev_register): Likewise.
8884         (pyuw_sniffer): Use cached_reg_t and allocate registers.
8885         (pyuw_dealloc_cache): Free all registers.
8886
8887 2017-06-22  Pedro Alves  <palves@redhat.com>
8888             Simon Marchi  <simon.marchi@ericsson.com>
8889
8890         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
8891         warning.
8892         * common/diagnostics.h: New file.
8893
8894 2017-06-22  Pedro Alves  <palves@redhat.com>
8895
8896         * common/agent.h: Add include guards.
8897
8898 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
8899
8900         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
8901         talk about addressable units instead of bytes.
8902
8903 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8904
8905         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
8906         of '::const_iterator'.
8907
8908 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8909
8910         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8911         'unittests/environ-selftests.c'.
8912         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
8913         * charset.c (find_charset_names): Declare object 'iconv_env'.
8914         Update code to use 'iconv_env' object.  Remove call to
8915         'free_environ'.
8916         * common/environ.c: Include <utility>.
8917         (make_environ): Delete function.
8918         (free_environ): Delete function.
8919         (gdb_environ::clear): New function.
8920         (gdb_environ::operator=): New function.
8921         (gdb_environ::get): Likewise.
8922         (environ_vector): Delete function.
8923         (set_in_environ): Delete function.
8924         (gdb_environ::set): New function.
8925         (unset_in_environ): Delete function.
8926         (gdb_environ::unset): New function.
8927         (gdb_environ::envp): Likewise.
8928         * common/environ.h: Include <vector>.
8929         (struct gdb_environ): Delete; transform into...
8930         (class gdb_environ): ... this class.
8931         (free_environ): Delete prototype.
8932         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
8933         environ_vector): Likewise.
8934         * infcmd.c (run_command_1): Update code to call
8935         'envp' from 'gdb_environ' class.
8936         (environment_info): Update code to call methods from 'gdb_environ'
8937         class.
8938         (unset_environment_command): Likewise.
8939         (path_info): Likewise.
8940         (path_command): Likewise.
8941         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
8942         (inferior::inferior): Initialize 'environment' using the host's
8943         information.
8944         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
8945         Include "environ.h".
8946         (class inferior) <environment>: Change type from 'struct
8947         gdb_environ' to 'gdb_environ'.
8948         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
8949         methods from 'gdb_environ' class.
8950         * solib.c (solib_find_1): Likewise
8951         * unittests/environ-selftests.c: New file.
8952
8953 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8954
8955         * features/i386/i386-linux.xml: Exchange the order of including
8956         32bit-linux.xml and 32bit-sse.xml.
8957         * features/i386/i386-linux.c: Regenerated.
8958
8959 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8960
8961         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
8962         Delete copy ctor and assignment operator.
8963         (tdesc_type): Likewise.
8964         (tdesc_feature): Likewise.
8965         (tdesc_free_reg): Remove.
8966         (tdesc_create_reg): Use new.
8967         (tdesc_free_type): Remove.
8968         (tdesc_create_vector): Use new.
8969         (tdesc_create_union): Likewise.
8970         (tdesc_create_flags): Likewise.
8971         (tdesc_create_enum): Likewise.
8972         (tdesc_free_feature): Delete.
8973         (free_target_description): Use delete.
8974
8975 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
8976
8977         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
8978         registers.
8979
8980 2017-06-19  Pedro Alves  <palves@redhat.com>
8981
8982         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
8983         after gdb::unlinker.
8984
8985 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
8986
8987         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
8988         gdb_environ to access an environment variable.
8989
8990 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
8991
8992         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
8993         gdb_byte*.
8994
8995 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8996
8997         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
8998
8999 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9000
9001         * configure: Re-generate.
9002         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9003
9004 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9005
9006         * configure: Re-generate.
9007         * warning.m4: Pass -Werror to compiler when checking for
9008         supported warning flags.
9009
9010 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9011
9012         * Makefile.in (COMPILE.pre): Add "-x c++".
9013
9014 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
9015             Pedro Alves  <palves@redhat.com>
9016             Yao Qi  <yao.qi@linaro.org>
9017
9018         * defs.h (RequireLongest): New.
9019         (extract_integer): Declare function template.
9020         (extract_signed_integer): Remove the declaration, but define it
9021         static inline.
9022         (extract_unsigned_integer): Likewise.
9023         (store_integer): Declare function template.
9024         (store_signed_integer): Remove the declaration, but define it
9025         static inline.
9026         (store_unsigned_integer): Likewise.
9027         * findvar.c (extract_integer): New function template.
9028         (extract_signed_integer): Remove.
9029         (extract_unsigned_integer): Remove.
9030         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9031         instantiations.
9032         (store_integer): New function template.
9033         (store_signed_integer): Remove.
9034         (store_unsigned_integer): Remove.
9035         (store_integer): Explicit instantiations.
9036         * regcache.c (regcache_raw_read_signed): Update.
9037         (regcache::raw_read): New function.
9038         (regcache::raw_read_signed): Remove.
9039         (regcache::raw_read_unsigned): Remove.
9040         (regcache_raw_read_unsigned): Update.
9041         (regcache_raw_write_unsigned): Update.
9042         (regcache::raw_write_signed): Remove.
9043         (regcache::raw_write): New function.
9044         (regcache_cooked_read_signed): Update.
9045         (regcache::raw_write_unsigned): Remove.
9046         (regcache::cooked_read_signed): Remove.
9047         (regcache_cooked_read_unsigned): Update.
9048         (regcache::cooked_read_unsigned): Remove.
9049         (regcache_cooked_write_signed): Update.
9050         (regcache_cooked_write_unsigned): Update.
9051         * regcache.h (regcache) <raw_read_signed>: Remove.
9052         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9053         <raw_read, raw_write>: New.
9054         <cooked_read_signed, cooked_write_signed>: Remove.
9055         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9056         <cooked_read, cooked_write>: New.
9057         * sh64-tdep.c (sh64_pseudo_register_read): Update.
9058         (sh64_pseudo_register_write): Update.
9059
9060 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
9061
9062         * arc-tdep.c (arc_disassembler_options): New variable.
9063         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9064         of default_print_insn.
9065         (arc_delayed_print_insn): Set info->section when needed,
9066         use default_print_insn to retrieve a disassembler.
9067
9068 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
9069
9070         PR gdb/21574
9071         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9072         to mention $SHELL and startup-with-shell.
9073
9074 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
9075
9076         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9077
9078 2017-06-14  Yao Qi  <yao.qi@linaro.org>
9079
9080         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9081         default_print_insn instead of print_insn_aarch64.
9082         * arm-tdep.c (gdb_print_insn_arm): Call
9083         default_print_insn instead of print_insn_big_arm
9084         and print_insn_little_arm.
9085         * i386-tdep.c (i386_print_insn): Call default_print_insn
9086         instead of print_insn_i386.
9087         * ia64-tdep.c (ia64_print_insn): Call
9088         default_print_insn instead of print_insn_ia64.
9089         * mips-tdep.c (gdb_print_insn_mips): Call
9090         default_print_insn instead of print_insn_big_mips
9091         and print_insn_little_mips.
9092         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9093         instead of print_insn_spu.
9094
9095 2017-06-14  Pedro Alves  <palves@redhat.com>
9096
9097         * ada-lang.c: Include "common/byte-vector.h".
9098         (ada_value_primitive_packed_val): Use gdb::byte_vector.
9099         * charset.c (wchar_iterator::iterate): Resize the vector instead
9100         of reserving it.
9101         * common/byte-vector.h: Include "common/def-vector.h".
9102         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9103         * cli/cli-dump.c: Include "common/byte-vector.h".
9104         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9105         * common/byte-vector.h: New file.
9106         * common/def-vector.h: New file.
9107         * common/default-init-alloc.h: New file.
9108         * dwarf2loc.c: Include "common/byte-vector.h".
9109         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9110         instead of reserving it.
9111         * dwarf2read.c: Include "common/byte-vector.h".
9112         (data_buf::m_vec): Now a gdb::byte_vector.
9113         * gdb_regex.c: Include "common/def-vector.h".
9114         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9115         * mi/mi-main.c: Include "common/byte-vector.h".
9116         (mi_cmd_data_read_memory): Use gdb::byte_vector.
9117         * printcmd.c: Include "common/byte-vector.h".
9118         (print_scalar_formatted): Use gdb::byte_vector.
9119         * valprint.c: Include "common/byte-vector.h".
9120         (maybe_negate_by_bytes, print_decimal_chars): Use
9121         gdb::byte_vector.
9122
9123 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9124
9125         * darwin-nat.c: Include "nat/fork-inferior.h".
9126
9127 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9128
9129         * configure.nat: Factor out Darwin bits that are not
9130         architecture-specific.  Add fork-inferior.o.
9131
9132 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9133
9134         * configure.nat: Factor out AIX bits that are not
9135         architecture-specific.  Add fork-inferior.o.
9136
9137 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9138
9139         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
9140         (read_pieced_value, write_pieced_value): ...here.  Reduce to
9141         wrappers that just call rw_pieced_value.
9142
9143 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9144
9145         * dwarf2loc.c (write_pieced_value): When writing the data for a
9146         memory piece, use write_memory_with_notification instead of
9147         write_memory.
9148
9149 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9150
9151         * valops.c (read_value_memory): Change embedded_offset to
9152         represent a bit offset instead of a byte offset.
9153         * value.h (read_value_memory): Adjust comment.
9154
9155 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9156
9157         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9158         dest_offset_bits and source_offset_bits.
9159         (write_pieced_value): Likewise.
9160
9161 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9162
9163         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9164         given by DW_OP_bit_piece.
9165         (write_pieced_value): Likewise.
9166
9167 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9168
9169         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9170         some other preparations to the places where sufficient information
9171         is available.
9172         (write_pieced_value): Likewise.
9173
9174 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9175
9176         * dwarf2loc.c (bits_to_bytes): New function.
9177         (read_pieced_value): Fix offset calculations for register pieces
9178         on big-endian targets.
9179         (write_pieced_value): Likewise.
9180
9181 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9182
9183         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9184         (write_pieced_value): Likewise.
9185
9186 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9187
9188         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9189         transfer the source value's least significant bits, instead of its
9190         lowest-addressed ones.  Rename type_len to max_offset.
9191         (read_pieced_value): Mirror above changes to write_pieced_value as
9192         applicable.
9193
9194 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9195
9196         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9197         truncate full bytes from dest_offset_bits before using it as an
9198         offset into the buffer.
9199
9200 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9201
9202         * dwarf2loc.c (write_pieced_value): Include transfer size in
9203         byte-wise check.
9204
9205 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9206
9207         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9208         calculation of this_size.
9209
9210 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9211
9212         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9213         when targeting a bit-field.
9214         (write_pieced_value): Likewise.
9215
9216 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9217
9218         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9219         (allocate_piece_closure): Drop addr_size parameter.
9220         (dwarf2_evaluate_loc_desc_full): Adjust call to
9221         allocate_piece_closure.
9222
9223 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9224
9225         PR gdb/21226
9226         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9227         the LSB end, independent of endianness.
9228
9229 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9230
9231         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9232         size capping.
9233
9234 2017-06-13  Yao Qi  <yao.qi@linaro.org>
9235
9236         * mips-linux-nat.c: Move include features/mips*-linux.c to
9237         mips-linux-tdep.c.
9238         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9239         to mips-linux-tdep.c.
9240         * mips-linux-tdep.c: Include features/mips*-linux.c
9241         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9242         functions.
9243         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9244         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9245         (tdesc_mips64_dsp_linux): Declare.
9246
9247 2017-06-12  Tom Tromey  <tom@tromey.com>
9248
9249         * valprint.h (val_print_type_code_int): Remove.
9250         * valprint.c (generic_val_print_int): Always call
9251         val_print_scalar_formatted.
9252         (val_print_type_code_int): Remove.
9253         * printcmd.c (print_scalar_formatted): Handle options->format==0.
9254         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9255         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9256         * ada-valprint.c (ada_val_print_num): Use
9257         val_print_scalar_formatted.
9258
9259 2017-06-12  Tom Tromey  <tom@tromey.com>
9260
9261         * printcmd.c (print_scalar_formatted): Unify the two switches.
9262         Don't convert scalars to LONGEST.
9263
9264 2017-06-12  Tom Tromey  <tom@tromey.com>
9265
9266         PR exp/16225:
9267         * valprint.h (print_decimal_chars): Update.
9268         * valprint.c (maybe_negate_by_bytes): New function.
9269         (print_decimal_chars): Add "is_signed" argument.
9270         * printcmd.c (print_scalar_formatted): Update.
9271
9272 2017-06-12  Tom Tromey  <tom@tromey.com>
9273
9274         PR exp/16225:
9275         * valprint.h (print_binary_chars, print_hex_chars): Update.
9276         * valprint.c (val_print_type_code_int): Update.
9277         (print_binary_chars): Add "zero_pad" argument.
9278         (emit_octal_digit): New function.
9279         (print_octal_chars): Don't zero-pad.
9280         (print_decimal_chars): Likewise.
9281         (print_hex_chars): Add "zero_pad" argument.
9282         * sh64-tdep.c (sh64_do_fp_register): Update.
9283         * regcache.c (regcache::dump): Update.
9284         * printcmd.c (print_scalar_formatted): Update.
9285         * infcmd.c (default_print_one_register_info): Update.
9286
9287 2017-06-12  Pedro Alves  <palves@redhat.com>
9288             Alan Hayward  <alan.hayward@arm.com>
9289
9290         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9291         (mips_eabi_push_dummy_call): Rename local 'regsize' to
9292         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
9293         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9294         Assert that abi_regsize bytes fit in 'ref_valbuf'.
9295
9296 2017-06-12  Pedro Alves  <palves@redhat.com>
9297
9298         * dwarf2read.c (mapped_symtab::data): Now a vector of
9299         symtab_index_entry instead of vector of
9300         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
9301         whether an element's name is NULL instead of checking whether the
9302         element itself is NULL.
9303         (find_slot): Change return type.  Adjust.
9304         (hash_expand, , add_index_entry, uniquify_cu_indices)
9305         (write_hash_table): Adjust.
9306
9307 2017-06-12  Pedro Alves  <palves@redhat.com>
9308
9309         * dwarf2read.c (recursively_count_psymbols): New function.
9310         (write_psymtabs_to_index): Call it to compute number of psyms and
9311         pass estimate size of psyms_seen to unordered_set's ctor.
9312
9313 2017-06-12  Pedro Alves  <palves@redhat.com>
9314
9315         * dwarf2read.c (write_hash_table): Check if key already exists
9316         before emplacing.
9317
9318 2017-06-12  Pedro Alves  <palves@redhat.com>
9319
9320         * dwarf2read.c (data_buf::append_space): Rename to...
9321         (data_buf::grow): ... this, and make private.  Adjust all callers.
9322         (data_buf::append_uint): New method.
9323         (add_address_entry, write_one_signatured_type)
9324         (write_psymtabs_to_index): Use it.
9325
9326 2017-06-12  Pedro Alves  <palves@redhat.com>
9327
9328         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9329         (file_write (FILE *, const std::vector<Elem>&)): Delete.
9330         (data_buf::file_write): Call ::fwrite directly.
9331
9332 2017-06-12  Pedro Alves  <palves@redhat.com>
9333
9334         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9335         std::vector::erase.
9336
9337 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9338
9339         Code cleanup: C++ify .gdb_index producer.
9340         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9341         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9342         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9343         (create_strtab, add_string): Remove.
9344         (file_write, data_buf): New.
9345         (struct symtab_index_entry): Use std::vector for cu_indices.
9346         (struct mapped_symtab): Use std::vector for data.
9347         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9348         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9349         Remove.
9350         (find_slot): Change return type.  Update it to the new data structures.
9351         (hash_expand, add_index_entry): Update it to the new data structures.
9352         (offset_type_compare): Remove.
9353         (uniquify_cu_indices): Update it to the new data structures.
9354         (c_str_view, c_str_view_hasher, vector_hasher): New.
9355         (add_indices_to_cpool): Remove.
9356         (write_hash_table): Update it to the new data structures.
9357         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9358         (eq_psymtab_cu_index): Remove.
9359         (psym_index_map): New typedef.
9360         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9361         reference and std::unordered_map for cu_index_htab.
9362         (add_address_entry, add_address_entry_worker, write_address_map)
9363         (write_psymbols): Update it to the new data structures.
9364         (write_obstack): Remove.
9365         (struct signatured_type_index_data): Change types_list to a data_buf
9366         reference and psyms_seen to a std::unordered_set reference.
9367         (write_one_signatured_type, recursively_write_psymbols)
9368         (write_psymtabs_to_index): Update it to the new data structures.
9369
9370 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
9371
9372         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9373         separate-debug-file commands.
9374         * symfile.h (separate_debug_file_debug): New global.
9375         * symfile.c (separate_debug_file_debug): New global.
9376         (separate_debug_file_exists, find_separate_debug_file): Add
9377         debug output.
9378         (_initialize_symfile): Add "set debug separate-debug-file"
9379         command.
9380         * build-id.c (build_id_to_debug_bfd,
9381         find_separate_debug_file_by_buildid): Add debug output.
9382
9383 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
9384
9385         * gdbarch.sh (displaced_step_free_closure): Remove.
9386         * gdbarch.h, gdbarch.c: Re-generate.
9387         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9388         displaced_step_free_closure.
9389         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9390         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9391         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9392         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9393         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9394         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9395         * arch-utils.h (simple_displaced_step_free_closure): Remove.
9396         * arch-utils.c (simple_displaced_step_free_closure): Remove.
9397         * infrun.c (displaced_step_clear): Call xfree instead of
9398         gdbarch_displaced_step_free_closure.
9399
9400 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
9401
9402         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9403         NULL".
9404
9405 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
9406
9407         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9408         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9409         (mn10300_push_dummy_call): Likewise.
9410
9411 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9412
9413         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9414
9415 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9416
9417         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9418
9419 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9420
9421         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9422         able to start inferiors using a shell.
9423         (New remote packets): Announce new packet "QStartupWithShell".
9424         * remote.c: Add PACKET_QStartupWithShell.
9425         (extended_remote_create_inferior): Handle new
9426         PACKET_QStartupWithShell.
9427         (remote_protocol_features) <QStartupWithShell>: New entry for
9428         PACKET_QStartupWithShell.
9429         (_initialize_remote): Call "add_packet_config_cmd" for
9430         QStartupShell.
9431
9432 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9433             Pedro Alves  <palves@redhat.com>
9434
9435         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9436         and "nat/fork-inferior.h".
9437         * common/common-inferior.h: New file, with contents from
9438         "gdb/inferior.h".
9439         * commom/common-utils.c: Include "common-utils.h".
9440         (stringify_argv): New function.
9441         * common/common-utils.h (stringify_argv): New prototype.
9442         * configure.nat: Add "fork-inferior.o" as a dependency for
9443         "*linux*", "fbsd*" and "nbsd*" hosts.
9444         * corefile.c (get_exec_file): Update comment.
9445         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9446         instead of "startup_inferior".
9447         (darwin_create_inferior): Call "add_thread_silent" after
9448         "fork_inferior".
9449         * fork-child.c: Cleanup unnecessary includes.
9450         (SHELL_FILE): Move to "common/common-fork-child.c".
9451         (environ): Likewise.
9452         (exec_wrapper): Initialize.
9453         (get_exec_wrapper): New function.
9454         (breakup_args): Move to "common/common-fork-child.c"; rename to
9455         "breakup_args_for_exec".
9456         (escape_bang_in_quoted_argument): Move to
9457         "common/common-fork-child.c".
9458         (saved_ui): New variable.
9459         (prefork_hook): New function.
9460         (postfork_hook): Likewise.
9461         (postfork_child_hook): Likewise.
9462         (gdb_startup_inferior): Likewise.
9463         (fork_inferior): Move to "common/common-fork-child.c".  Update
9464         function to support gdbserver.
9465         (startup_inferior): Likewise.
9466         * gdbcore.h (get_exec_file): Remove declaration.
9467         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9468         instead of "startup_inferior".  Call "add_thread_silent" after
9469         "fork_inferior".
9470         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9471         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9472         instead of "startup_inferior".  Call "add_thread_silent" after
9473         "fork_inferior".
9474         * inferior.h: Include "common-inferior.h".
9475         (trace_start_error): Move to "common/common-utils.h".
9476         (trace_start_error_with_name): Likewise.
9477         (fork_inferior): Move prototype to "nat/fork-inferior.h".
9478         (startup_inferior): Likewise.
9479         (gdb_startup_inferior): New prototype.
9480         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9481         * nat/fork-inferior.h: New file.
9482         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9483         instead of "startup_inferior".  Call "add_thread_silent" after
9484         "fork_inferior".
9485         * target.h (target_terminal_init): Move prototype to
9486         "target/target.h".
9487         (target_terminal_inferior): Likewise.
9488         (target_terminal_ours): Likewise.
9489         * target/target.h (target_terminal_init): New prototype, moved
9490         from "target.h".
9491         (target_terminal_inferior): Likewise.
9492         (target_terminal_ours): Likewise.
9493         * utils.c (gdb_flush_out_err): New function.
9494
9495 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9496
9497         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9498         * common/common-gdbthread.h: New file, with parts from
9499         "gdb/gdbthread.h".
9500         * gdbthread.h: Include "common-gdbthread.h".
9501         (switch_to_thread): Moved to "common/common-gdbthread.h".
9502
9503 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9504
9505         * Makefile.in (SFILES): Add "common/job-control.c".
9506         (HFILES_NO_SRCDIR): Add "common/job-control.h".
9507         (COMMON_OBS): Add "job-control.o".
9508         * common/job-control.c: New file, with contents from
9509         "gdb/inflow.c".
9510         * common/job-control.h: New file, with contents from "terminal.h".
9511         * fork-child.c: Include "job-control.h".
9512         * inflow.c: Include "job-control.h".
9513         (gdb_setpgid): Move to "common/common-inflow.c".
9514         (_initialize_inflow): Move setting of "job_control" to
9515         "handle_job_control".
9516         * terminal.h (job_control): Moved to "common/common-terminal.h".
9517         (gdb_setpgid): Likewise.
9518         * top.c: Include "job_control.h".
9519         * utils.c: Likewise.
9520         (job_control): Moved to "job-control.c".
9521
9522 2017-06-07  Pedro Alves  <palves@redhat.com>
9523
9524         * Makefile.in (SFILES): Add gdb_regex.c.
9525         (COMMON_OBS): Add gdb_regex.o.
9526         * ada-lang.c (ada_add_standard_exceptions)
9527         (ada_add_exceptions_from_frame, name_matches_regex)
9528         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9529         parameter type to compiled_regex.  Adjust.
9530         (ada_exceptions_list): Use compiled_regex.
9531         * break-catch-throw.c (exception_catchpoint::pattern): Now a
9532         std::unique_ptr<compiled_regex>.
9533         (exception_catchpoint::~exception_catchpoint): Remove regfree
9534         call.
9535         (check_status_exception_catchpoint): Adjust to use compiled_regex.
9536         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9537         * breakpoint.c (solib_catchpoint::compiled): Now a
9538         std::unique_ptr<compiled_regex>.
9539         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9540         (check_status_catch_solib): Adjust to use compiled_regex.
9541         (add_solib_catchpoint): Adjust to use compiled_regex.
9542         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9543         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9544         compiled_regex reference.  Adjust to use it.
9545         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9546         declaration.  Include "gdb_regex.h".
9547         (apropos_cmd): Change regex parameter to compiled_regex reference.
9548         * gdb_regex.c: New file.
9549         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9550         declarations.
9551         (class compiled_regex): New.
9552         * linux-tdep.c: Include "common/gdb_optional.h".
9553         (struct mapping_regexes): New, factored out from
9554         mapping_is_anonymous_p, and adjusted to use compiled_regex.
9555         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9556         gdb::optional and remove cleanups.  Adjust to compiled_regex.
9557         * probe.c: Include "common/gdb_optional.h".
9558         (collect_probes): Use compiled_regex and gdb::optional and remove
9559         cleanups.
9560         * skip.c: Include "common/gdb_optional.h".
9561         (skiplist_entry::compiled_function_regexp): Now a
9562         gdb::optional<compiled_regex>.
9563         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9564         (free_skiplist_entry): Remove regfree call.
9565         (compile_skip_regexp, skip_rfunction_p): Adjust to use
9566         compiled_regex and gdb::optional.
9567         * symtab.c: Include "common/gdb_optional.h".
9568         (search_symbols): Use compiled_regex and gdb::optional.
9569         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9570         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
9571         to gdb_regex.c.
9572
9573 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9574
9575         * regcache.c (regcache::save): Avoid buffer use.
9576         (regcache::dump): Likewise.
9577
9578 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9579
9580         * sh-tdep.c (sh_pseudo_register_read): Remove
9581         MAX_REGISTER_SIZE.
9582         (sh_pseudo_register_write): Likewise.
9583         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9584         (sh64_pseudo_register_write): Likewise
9585
9586 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9587
9588         * aarch64-tdep.c (aarch64_store_return_value): Use
9589         V_REGISTER_SIZE.
9590         (aarch64_pseudo_read_value): Likewise.
9591         (aarch64_pseudo_write): Likewise.
9592
9593 2017-06-06  Yao Qi  <yao.qi@linaro.org>
9594
9595         * regformats/regdef.h (set_register_cache): Remove the
9596         declaration.
9597
9598 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
9599
9600         * frame.c (frame_unwind_register_signed): Use
9601         frame_unwind_register_value.
9602
9603 2017-06-06  Pedro Alves  <palves@redhat.com>
9604
9605         PR breakpoints/21553
9606         * breakpoint.c (create_breakpoints_sal_default)
9607         (init_breakpoint_sal, create_breakpoint_sal): Use
9608         gdb::unique_xmalloc_ptr for string parameters.
9609         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9610         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
9611         (base_breakpoint_create_breakpoints_sal)
9612         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9613         (strace_marker_create_breakpoints_sal)
9614         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9615         string parameters.
9616         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9617         gdb::unique_xmalloc_ptr for string parameters.
9618         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9619         parameters.
9620
9621 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9622
9623         * alpha-tdep.c (alpha_register_to_value): Use
9624         get_frame_register_value.
9625         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9626
9627 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9628
9629         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9630         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9631         (ia64_value_to_register): Likewise.
9632         (ia64_extract_return_value): Likewise.
9633         (ia64_store_return_value): Likewise.
9634         (ia64_push_dummy_call): Likewise.
9635
9636 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
9637
9638         GDB 8.0 released.
9639
9640 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
9641
9642         * x86-linux-nat.c (struct arch_lwp_info): Remove.
9643
9644 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
9645
9646         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9647         parameter.
9648         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9649
9650 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
9651
9652         * event-loop.c (poll_timers): Unallocate timer using delete
9653         instead of xfree.
9654
9655 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9656
9657         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9658         (struct breakpoint) <~breakpoint>: New.
9659         (struct watchpoint): Inherit from breakpoint.
9660         <~watchpoint>: New.
9661         <base>: Remove.
9662         (struct tracepoint): Inherit from breakpoint.
9663         <base>: Remove.
9664         * breakpoint.c (longjmp_breakpoint_ops): Remove.
9665         (struct longjmp_breakpoint): Inherit from breakpoint.
9666         <~longjmp_breakpoint>: New.
9667         <base>: Remove.
9668         (new_breakpoint_from_type): Remove casts.
9669         (watchpoint_in_thread_scope): Remove reference to base field.
9670         (watchpoint_del_at_next_stop): Likewise.
9671         (update_watchpoint): Likewise.
9672         (watchpoint_check): Likewise.
9673         (bpstat_check_watchpoint): Likewise.
9674         (set_longjmp_breakpoint): Likewise.
9675         (struct fork_catchpoint): Inherit from breakpoint.
9676         <base>: Remove.
9677         (struct solib_catchpoint): Inherit from breakpoint.
9678         <~solib_catchpoint>: New.
9679         <base>: Remove.
9680         (dtor_catch_solib): Change to ...
9681         (solib_catchpoint::~solib_catchpoint): ... this.
9682         (breakpoint_hit_catch_solib): Remove reference to base field.
9683         (add_solib_catchpoint): Likewise.
9684         (create_fork_vfork_event_catchpoint): Likewise.
9685         (struct exec_catchpoint): Inherit from breakpoint.
9686         <~exec_catchpoint>: New.
9687         <base>: Remove.
9688         (dtor_catch_exec): Change to ...
9689         (exec_catchpoint::~exec_catchpoint): ... this.
9690         (dtor_watchpoint): Change to ...
9691         (watchpoint::~watchpoint): ... this.
9692         (watch_command_1): Remove reference to base field.
9693         (catch_exec_command_1): Likewise.
9694         (base_breakpoint_dtor): Change to ...
9695         (breakpoint::~breakpoint): ... this.
9696         (base_breakpoint_ops): Remove dtor field value.
9697         (longjmp_bkpt_dtor): Change to ...
9698         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9699         (strace_marker_create_breakpoints_sal): Remove reference to base
9700         field.
9701         (delete_breakpoint): Don't manually call breakpoint destructor.
9702         (create_tracepoint_from_upload): Remove reference to base field.
9703         (trace_pass_set_count): Likewise.
9704         (initialize_breakpoint_ops): Don't initialize
9705         momentary_breakpoint_ops, don't set dtors.
9706         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9707         <~ada_catchpoint>: New.
9708         <base>: Remove.
9709         (create_excep_cond_exprs): Remove reference to base field.
9710         (dtor_exception): Change to ...
9711         (ada_catchpoint::~ada_catchpoint): ... this.
9712         (dtor_catch_exception): Remove.
9713         (dtor_catch_exception_unhandled): Remove.
9714         (dtor_catch_assert): Remove.
9715         (create_ada_exception_catchpoint): Remove reference to base
9716         field.
9717         (initialize_ada_catchpoint_ops): Don't set dtors.
9718         * break-catch-sig.c (struct signal_catchpoint): Inherit from
9719         breakpoint.
9720         <~signal_catchpoint>: New.
9721         <base>: Remove.
9722         (signal_catchpoint_dtor): Change to ...
9723         (signal_catchpoint::~signal_catchpoint): ... this.
9724         (create_signal_catchpoint): Remove reference to base field.
9725         (initialize_signal_catchpoint_ops): Don't set dtor.
9726         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
9727         from breakpoint.
9728         <~syscall_catchpoint>: New.
9729         <base>: Remove.
9730         (dtor_catch_syscall): Change to ...
9731         (syscall_catchpoint::~syscall_catchpoint): ... this.
9732         (create_syscall_event_catchpoint): Remove reference to base
9733         field.
9734         (initialize_syscall_catchpoint_ops): Don't set dtor.
9735         * break-catch-throw.c (struct exception_catchpoint): Inherit
9736         from breakpoint.
9737         <~exception_catchpoint>: New.
9738         <base>: Remove.
9739         (dtor_exception_catchpoint): Change to ...
9740         (exception_catchpoint::~exception_catchpoint): ... this.
9741         (handle_gnu_v3_exceptions): Remove reference to base field.
9742         (initialize_throw_catchpoint_ops): Don't set dtor.
9743         * ctf.c (ctf_get_traceframe_address): Remove reference to base
9744         field.
9745         * remote.c (remote_get_tracepoint_status): Likewise.
9746         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
9747         * tracefile.c (tracefile_fetch_registers): Likewise.
9748         * tracepoint.c (actions_command): Likewise.
9749         (validate_actionline): Likewise.
9750         (tfind_1): Likewise.
9751         (get_traceframe_location): Likewise.
9752         (find_matching_tracepoint_location): Likewise.
9753         (parse_tracepoint_status): Likewise.
9754         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
9755
9756 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9757
9758         * breakpoint.c (struct longjmp_breakpoint): New struct.
9759         (is_tracepoint_type): Change return type to bool.
9760         (is_longjmp_type): New function.
9761         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
9762         (set_raw_breakpoint_without_location): Use
9763         new_breakpoint_from_type.
9764         (set_raw_breakpoint): Likewise.
9765
9766 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9767
9768         * breakpoint.c (new_breakpoint_from_type): New function.
9769         (create_breakpoint_sal): Use new_breakpoint_from_type and
9770         unique_ptr.
9771         (create_breakpoint): Likewise.
9772
9773 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
9774
9775         * memattr.c (mem_info_command): Rename to ...
9776         (info_mem_command): ... this.
9777         (mem_enable_command): Rename to ...
9778         (enable_mem_command): ... this.
9779         (mem_disable_command): Rename to ...
9780         (disable_mem_command): ... this.
9781         (mem_delete_command): Rename to ...
9782         (delete_mem_command): ... this.
9783         (_initialize_mem): Adjust function names.
9784
9785 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9786
9787         * btrace.c (handle_pt_insn_events): New.
9788         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
9789         STATUS.  Split into this and ...
9790         (handle_pt_insn_event_flags): ... this.
9791
9792 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9793
9794         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
9795         and struct pt_insn.resynced.
9796         * configure: Regenerated.
9797         * config.in: Regenerated.
9798
9799 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9800
9801         * btrace.c (ftrace_find_call_by_number): New function.
9802         (ftrace_new_function): Store objects, not pointers.
9803         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
9804         ftrace_new_gap, ftrace_update_function,
9805         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
9806         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
9807         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
9808         btrace_ends_with_single_insn, btrace_call_get): Account for
9809         btrace_thread_info::functions now storing objects.
9810         * btrace.h (struct btrace_thread_info): Add constructor.
9811         (struct btrace_thread_info) <functions>: Make std::vector.
9812         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
9813         Initialize with default values.
9814         * record-btrace.c (record_btrace_frame_sniffer): Account for
9815         btrace_thread_info::functions now storing objects.
9816
9817 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9818
9819         * btrace.c: Remove typedef bfun_s.
9820         (ftrace_new_gap): Directly add gaps to the list of gaps.
9821         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
9822         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
9823         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
9824         instead of gdb VEC.
9825
9826 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9827
9828         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
9829         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
9830         with btrace_thread_info::next_segment and
9831         btrace_thread_info::prev_segment.
9832         * btrace.h: Remove struct btrace_func_link.
9833         (struct btrace_function): Replace pair of function segment pointers
9834         with pair of indices.
9835         * python/py-record-btrace.c (btpy_call_prev_sibling,
9836         btpy_call_next_sibling): Replace references to
9837         btrace_thread_info::segment with btrace_thread_info::next_segment and
9838         btrace_thread_info::prev_segment.
9839         * record-btrace.c (record_btrace_frame_this_id): Use
9840         btrace_find_call_by_number.
9841
9842 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9843
9844         * btrace.c (ftrace_new_function, ftrace_fixup_level,
9845         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9846         btrace_insn_next, btrace_insn_prev): Remove references to
9847         btrace_thread_info::flow.
9848         * btrace.h (struct btrace_function): Remove FLOW.
9849
9850 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9851
9852         * btrace.c (ftrace_find_call_by_number): New function.
9853         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
9854         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
9855         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
9856         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
9857         index.
9858         * btrace.h (struct btrace_function): Turn UP into an index.
9859         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
9860         as an index.
9861         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
9862         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
9863         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
9864
9865 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9866
9867         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9868         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9869         ftrace_update_function, ftrace_compute_global_level_offset,
9870         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
9871         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
9872         btrace_insn_end, btrace_is_empty): Remove references to
9873         btrace_thread_info::begin and btrace_thread_info::end.
9874         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
9875         (struct btrace_thread_info) <functions>: Adjust comment.
9876         * record-btrace.c (record_btrace_start_replaying): Remove reference to
9877         btrace_thread_info::begin.
9878
9879 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9880
9881         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9882         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9883         ftrace_update_function): Remove arguments that implicitly were always
9884         BTINFO->END.
9885         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
9886         Don't pass BTINFO->END.
9887
9888 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9889
9890         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
9891         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
9892         btrace_find_insn_by_number): Replace function segment pointer with
9893         index.
9894         (btrace_insn_cmp): Simplify.
9895         * btrace.h: (struct btrace_insn_iterator) Rename index to
9896         insn_index.  Replace function segment pointer with index into function
9897         segment vector.
9898         * record-btrace.c (record_btrace_call_history): Replace function
9899         segment pointer use with index.
9900         (record_btrace_frame_sniffer): Retrieve function call segment through
9901         vector.
9902         (record_btrace_set_replay): Remove defunc't safety check.
9903
9904 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9905
9906         * btrace.c (btrace_ends_with_single_insn): New function.
9907         (btrace_call_get, btrace_call_number, btrace_call_begin,
9908         btrace_call_end, btrace_call_next, btrace_call_prev,
9909         btrace_find_call_by_number): Use index into call segment vector
9910         instead of pointer.
9911         (btrace_call_cmp): Simplify.
9912         * btrace.h (struct btrace_call_iterator): Replace function call segment
9913         pointer with index into vector.
9914         * record-btrace.c (record_btrace_call_history): Use index instead of
9915         pointer.
9916
9917 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9918
9919         * btrace.c (btrace_insn_begin, btrace_insn_end,
9920         btrace_find_insn_by_number): Add btinfo to iterator.
9921         * btrace.h (struct btrace_insn_iterator): Add btinfo.
9922
9923 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9924
9925         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
9926         and save pointers directly.
9927         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
9928         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
9929         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
9930         changed signature of functions.
9931         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
9932         (btrace_fetch): Remove code that adds btrace_function pointers to
9933         vector of btrace_functions.
9934         (btrace_clear): Simplify freeing vector of btrace_functions.
9935
9936 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9937
9938         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
9939         Replace VEC_* with std::vector functions.
9940         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
9941         (struct btrace_thread_info)<functions>: Change type to std::vector.
9942
9943 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9944
9945         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
9946         "Removed targets and native configurations" up.  Merge duplicate
9947         "New commands" sub-sections.  Add "New options" sub-sections.
9948
9949 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
9950
9951         * defs.h (copy_integer_to_size): New declaration.
9952         * findvar.c (copy_integer_to_size): New function.
9953         (do_cint_test): New selftest function.
9954         (copy_integer_to_size_test): Likewise.
9955         (_initialize_findvar): Likewise.
9956         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
9957         (mips_fbsd_collect_reg): Use raw_collect_integer.
9958         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
9959         (mips64_fill_gregset): Use raw_collect_integer
9960         (mips64_fill_fpregset): Use raw_supply_integer.
9961         * regcache.c (regcache::raw_supply_integer): New function.
9962         (regcache::raw_collect_integer): Likewise.
9963         * regcache.h: (regcache::raw_supply_integer): New declaration.
9964         (regcache::raw_collect_integer): Likewise.
9965
9966 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9967
9968         * Makefile.in (SFILES): Add gdbarch-selftests.c.
9969         (COMMON_OBS): Add gdbarch-selftests.o.
9970         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
9971         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
9972         * gdbarch-selftests.c: New file.
9973         * regcache.h (regcache) <~regcache>: Mark it virtual if
9974         GDB_SELF_TEST.
9975         <raw_write>: Likewise.
9976
9977 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9978
9979         * regcache.c (current_regcache): Change it to
9980         regcache::current_regcache.
9981         (regcache_observer_target_changed): Update.
9982         (regcache_thread_ptid_changed): Make it a regcache static
9983         method.
9984         (regcache_thread_ptid_changed): Update.
9985         (class regcache_access): New.
9986         (current_regcache_test): Update.
9987         (_initialize_regcache): Update.
9988         * regcache.h: Include forward_list.
9989         (regcache): Declare regcache_thread_ptid_changed and declare
9990         registers_changed_ptid as friend.
9991
9992 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9993
9994         * i387-tdep.c (i387_register_to_value): Use register_size
9995         instead of TYPE_LENGTH.
9996         * m68k-tdep.c (m68k_register_to_value): Likewise.
9997
9998 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9999
10000         * i387-tdep.c (i387_convert_register_p): Return false if type
10001         code isn't TYPE_CODE_FLT.
10002
10003 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10004
10005         * alpha-tdep.c (alpha_convert_register_p): Return true if type
10006         length is 4.
10007         (alpha_register_to_value): Remove type length check.
10008         (alpha_value_to_register): Likewise.
10009
10010 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10011
10012         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10013         TYPE_CODE_FLT.
10014
10015 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10016
10017         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10018         TYPE_CODE_FLT or not.
10019
10020 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10021
10022         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10023         * avr-tdep.c (avr_gdbarch_init): Likewise.
10024         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10025         * cris-tdep.c (cris_gdbarch_init): Likewise.
10026         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10027         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10028         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10029         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10030         * mep-tdep.c (mep_gdbarch_init): Likewise.
10031         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10032         * mips-tdep.c (mips_gdbarch_init): Likewise.
10033         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10034         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10035         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10036         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10037         * v850-tdep.c (v850_gdbarch_init): Likewise.
10038
10039 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10040
10041         * selftest-arch.c (tests_with_arch): Call registers_changed
10042         and reinit_frame_cache.
10043         * selftest.c (run_self_tests): Likewise.
10044
10045 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10046
10047         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10048         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10049
10050 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10051
10052         * rl78-tdep.c (rl78_gdbarch_init): Don't call
10053         set_gdbarch_print_insn.
10054
10055 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10056
10057         * h8300-tdep.c (h8300_gdbarch_init): Don't call
10058         set_gdbarch_print_insn.
10059
10060 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10061
10062         * alpha-tdep.c (alpha_gdbarch_init): Don't call
10063         set_gdbarch_print_insn.
10064         * arc-tdep.c (arc_gdbarch_init): Likewise.
10065         * arch-utils.c: include dis-asm.h.
10066         (default_print_insn): New function.
10067         * arch-utils.h (default_print_insn): Declare.
10068         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10069         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10070         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10071         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10072         * frv-tdep.c (frv_gdbarch_init): Likewise.
10073         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10074         * gdbarch.sh (print_insn): Use default_print_insn.
10075         * gdbarch.c: Regenerated.
10076         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10077         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10078         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10079         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10080         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10081         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10082         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10083         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10084         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10085         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10086         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10087         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10088         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10089         * mt-tdep.c (mt_gdbarch_init): Likewise.
10090         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10091         * nios2-tdep.c (nios2_print_insn): Remove.
10092         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10093         * rx-tdep.c (rx_gdbarch_init): Likewise.
10094         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10095         * score-tdep.c (score_print_insn): Remove.
10096         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10097         * sh-tdep.c (sh_gdbarch_init): Likewise.
10098         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10099         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10100         * tic6x-tdep.c (tic6x_print_insn): Remove.
10101         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10102         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10103         * v850-tdep.c (v850_gdbarch_init): Likewise.
10104         * vax-tdep.c (vax_gdbarch_init): Likewise.
10105         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10106         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10107
10108 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10109
10110         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10111         (MIPS_FP0_REGNUM): Remove.
10112         (MIPS_FSR_REGNUM): Remove.
10113         (mips_fbsd_supply_fpregs): Use mips_regnum.
10114         (mips_fbsd_supply_gregs): Likewise.
10115         (mips_fbsd_collect_fpregs): Likewise.
10116         (mips_fbsd_collect_gregs): Likewise.
10117
10118 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10119
10120         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10121         (getpfpregs_supplies): New function.
10122         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10123         getfpregs_supplies.
10124         (mips_fbsd_store_inferior_registers): Likewise.
10125
10126 2017-05-22  Pedro Alves <palves@redhat.com>
10127
10128         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10129         maintainer.
10130
10131 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
10132
10133         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10134         (store_register): Likewise.
10135         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10136         (get_decimal_float_return_value): Likewise.
10137         (do_ppc_sysv_return_value): Likewise.
10138         (ppc64_sysv_abi_push_integer): Likewise.
10139         (ppc64_sysv_abi_push_freg): Likewise.
10140         (ppc64_sysv_abi_return_value_base): Likewise.
10141         (ppc64_sysv_abi_return_value): Likewise.
10142         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10143         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10144         * rs6000-nat.c: Likewise.
10145         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10146         (rs6000_value_to_register): Likewise.
10147         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10148
10149 2017-05-21  Tom Tromey  <tom@tromey.com>
10150
10151         PR rust/21466:
10152         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10153         arrays as "[T]", not "[T; ]".
10154
10155 2017-05-19  Tom Tromey  <tom@tromey.com>
10156
10157         PR rust/21484:
10158         * rust-lang.c (exp_descriptor_rust): New function.
10159         (rust_language_defn): Use it.
10160         * p-lang.c (pascal_language_defn): Update.
10161         * opencl-lang.c (opencl_language_defn): Update.
10162         * objc-lang.c (objc_language_defn): Update.
10163         * m2-lang.c (m2_language_defn): Update.
10164         * language.h (struct language_defn)
10165         <la_watch_location_expression>: New member.
10166         * language.c (unknown_language_defn, auto_language_defn)
10167         (local_language_defn): Update.
10168         * go-lang.c (go_language_defn): Update.
10169         * f-lang.c (f_language_defn): Update.
10170         * d-lang.c (d_language_defn): Update.
10171         * c-lang.h (c_watch_location_expression): Declare.
10172         * c-lang.c (c_watch_location_expression): New function.
10173         (c_language_defn, cplus_language_defn, asm_language_defn)
10174         (minimal_language_defn): Use it.
10175         * breakpoint.c (watch_command_1): Call
10176         la_watch_location_expression.
10177         * ada-lang.c (ada_language_defn): Update.
10178
10179 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10180
10181         PR tui/21482
10182         * gdb_curses.h (NOMACROS): Define.
10183         (NCURSES_NOMACROS): Define.
10184
10185 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10186
10187         PR tui/21482
10188         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10189         arg to char *.
10190         * tui/tui-wingeneral.c (box_win): Likewise.
10191         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10192         (tui_show_source_line): Likewise.
10193         (tui_show_exec_info_content): Likewise.
10194
10195 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10196
10197         * sparc-tdep.c (sparc_structure_return_p)
10198         (sparc_arg_on_registers_p): New functions.
10199         (sparc32_store_arguments): Use them.
10200         * sparc64-tdep.c (sparc64_16_byte_align_p)
10201         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10202         Handle TYPE_CODE_ARRAY.
10203
10204 2017-05-17  Yao Qi  <yao.qi@linaro.org>
10205
10206         * cli/cli-decode.c (add_alias_cmd): New function.
10207         * command.h (add_alias_cmd): Declare.
10208         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10209         instead call add_alias_cmd.
10210
10211 2017-05-17  Pedro Alves  <palves@redhat.com>
10212
10213         * Makefile.in (nat_extra_makefile_frag): Rename to ...
10214         (nat_makefile_frag): ... this.  All references updated.
10215         * configure.ac: Likewise.
10216         * configure.nat: Likewise.  Enhance comments.
10217         * configure: Regenerate.
10218
10219 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10220
10221         * procfs.c (procfs_create_inferior): Change prototype to match
10222         definition.
10223
10224 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
10225
10226         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10227         C++ compiler warning.
10228
10229 2017-05-12  Tom Tromey  <tom@tromey.com>
10230
10231         PR rust/21483:
10232         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10233         recurse, just call value_struct_elt directly.
10234
10235 2017-05-12  Tom Tromey  <tom@tromey.com>
10236
10237         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10238         OP_RUST_ARRAY>: Fix.
10239
10240 2017-05-12  Tom Tromey  <tom@tromey.com>
10241
10242         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10243
10244 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10245
10246         * regcache.c: Include <forward_list>.
10247         (struct regcache_list): Remove.
10248         (current_regcache): Update.
10249         (get_thread_arch_aspace_regcache): Update for std::forward_list.
10250         (regcache_thread_ptid_changed): Likewise.
10251         (registers_changed_ptid): Likewise.
10252         (current_regcache_size): Likewise.
10253
10254 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10255
10256         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10257         (current_regcache_size): New function.
10258         (current_regcache_test): New function.
10259         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10260
10261 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10262
10263         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10264         (print_gp_register_row): Use get_frame_register_value.
10265
10266 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10267
10268         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10269         (mips_supply_fpregset): Likewise.
10270         (mips64_supply_gregset): Likewise.
10271
10272 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10273
10274         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
10275         regcache->raw_supply_zeroed.
10276
10277 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10278
10279         * configure.nat: Rearrange 'case' statements to match
10280         host before cpu.
10281
10282 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10283
10284         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
10285         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10286         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
10287         "@nat_extra_makefile_frag@".
10288         (Makefile): Remove dependency on "@frags@".
10289         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10290         (data-directory/Makefile): Likewise.
10291         * config/aarch64/linux.mh: Deleted; moved contents to
10292         "gdb/configure.nat".
10293         * config/alpha/alpha-linux.mh: Likewise.
10294         * config/alpha/nbsd.mh: Likewise.
10295         * config/arm/linux.mh: Likewise.
10296         * config/arm/nbsdelf.mh: Likewise.
10297         * config/i386/cygwin.mh: Likewise.
10298         * config/i386/cygwin64.mh: Likewise.
10299         * config/i386/darwin.mh: Likewise.
10300         * config/i386/fbsd.mh: Likewise.
10301         * config/i386/fbsd64.mh: Likewise.
10302         * config/i386/go32.mh: Likewise.
10303         * config/i386/i386gnu.mh: Likewise.
10304         * config/i386/i386sol2.mh: Likewise.
10305         * config/i386/linux.mh: Likewise.
10306         * config/i386/linux64.mh: Likewise.
10307         * config/i386/mingw.mh: Likewise.
10308         * config/i386/mingw64.mh: Likewise.
10309         * config/i386/nbsd64.mh: Likewise.
10310         * config/i386/nbsdelf.mh: Likewise.
10311         * config/i386/nto.mh: Likewise.
10312         * config/i386/obsd.mh: Likewise.
10313         * config/i386/obsd64.mh: Likewise.
10314         * config/i386/sol2-64.mh: Likewise.
10315         * config/ia64/linux.mh: Likewise.
10316         * config/m32r/linux.mh: Likewise.
10317         * config/m68k/linux.mh: Likewise.
10318         * config/m68k/nbsdelf.mh: Likewise.
10319         * config/m68k/obsd.mh: Likewise.
10320         * config/m88k/obsd.mh: Likewise.
10321         * config/mips/fbsd.mh: Likewise.
10322         * config/mips/linux.mh: Likewise.
10323         * config/mips/nbsd.mh: Likewise.
10324         * config/mips/obsd64.mh: Likewise.
10325         * config/pa/linux.mh: Likewise.
10326         * config/pa/nbsd.mh: Likewise.
10327         * config/pa/obsd.mh: Likewise.
10328         * config/powerpc/aix.mh: Likewise.
10329         * config/powerpc/fbsd.mh: Likewise.
10330         * config/powerpc/linux.mh: Likewise.
10331         * config/powerpc/nbsd.mh: Likewise.
10332         * config/powerpc/obsd.mh: Likewise.
10333         * config/powerpc/ppc64-linux.mh: Likewise.
10334         * config/powerpc/spu-linux.mh: Likewise.
10335         * config/s390/linux.mh: Likewise.
10336         * config/sh/nbsd.mh: Likewise.
10337         * config/sparc/fbsd.mh: Likewise.
10338         * config/sparc/linux.mh: Likewise.
10339         * config/sparc/linux64.mh: Likewise.
10340         * config/sparc/nbsd64.mh: Likewise.
10341         * config/sparc/nbsdelf.mh: Likewise.
10342         * config/sparc/obsd64.mh: Likewise.
10343         * config/sparc/sol2.mh: Likewise.
10344         * config/tilegx/linux.mh: Likewise.
10345         * config/vax/nbsdelf.mh: Likewise.
10346         * config/vax/obsd.mh: Likewise.
10347         * config/xtensa/linux.mh: Likewise.
10348         * config/i386/i386gnu.mn: New file, with excerpts from
10349         "config/i386/i386gnu.mh".
10350         * configure: Regenerate.
10351         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10352         *.mh files under "gdb/config".
10353         * configure.nat: New file, with contents from the
10354         "gdb/config/*/*.mh" files.
10355
10356 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
10357
10358         * btrace.c (btrace_clear): Free insn vector.
10359
10360 2017-05-05  Pedro Alves  <palves@redhat.com>
10361
10362         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10363         * configure: Regenerate.
10364
10365 2017-05-04  Pedro Alves  <palves@redhat.com>
10366
10367         * Makefile.in (SFILES): Add progspace-and-thread.c.
10368         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10369         (COMMON_OBS): Add progspace-and-thread.o.
10370         * breakpoint.c: Include "progspace-and-thread.h".
10371         (update_inserted_breakpoint_locations)
10372         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10373         Use scoped_restore_current_pspace_and_thread.
10374         (create_std_terminate_master_breakpoint): Use
10375         scoped_restore_current_program_space.
10376         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10377         (print_breakpoint_location): Use
10378         scoped_restore_current_program_space.
10379         (bp_loc_is_permanent): Use
10380         scoped_restore_current_pspace_and_thread.
10381         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10382         (download_tracepoint_locations): Use
10383         scoped_restore_current_pspace_and_thread.
10384         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10385         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10386         (enum step_over_calls_kind): Moved from inferior.h.
10387         (class scoped_restore_current_thread): New class.
10388         * gdbthread.h (make_cleanup_restore_current_thread): Delete
10389         declaration.
10390         (scoped_restore_current_thread): New class.
10391         * infcmd.c: Include "common/gdb_optional.h".
10392         (continue_1, proceed_after_attach): Use
10393         scoped_restore_current_thread.
10394         (notice_new_inferior): Use scoped_restore_current_thread.
10395         * inferior.c: Include "progspace-and-thread.h".
10396         (restore_inferior, save_current_inferior): Delete.
10397         (add_inferior_command, clone_inferior_command): Use
10398         scoped_restore_current_pspace_and_thread.
10399         * inferior.h (scoped_restore_current_inferior): New class.
10400         * infrun.c: Include "progspace-and-thread.h" and
10401         "common/gdb_optional.h".
10402         (follow_fork_inferior): Use
10403         scoped_restore_current_pspace_and_thread.
10404         (scoped_restore_exited_inferior): New class.
10405         (handle_vfork_child_exec_or_exit): Use
10406         scoped_restore_exited_inferior,
10407         scoped_restore_current_pspace_and_thread,
10408         scoped_restore_current_thread and scoped_restore.
10409         (fetch_inferior_event): Use scoped_restore_current_thread.
10410         * linespec.c (decode_line_full, decode_line_1): Use
10411         scoped_restore_current_program_space.
10412         * mi/mi-main.c: Include "progspace-and-thread.h".
10413         (exec_continue): Use scoped_restore_current_thread.
10414         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10415         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10416         * proc-service.c (ps_pglobal_lookup): Use
10417         scoped_restore_current_program_space.
10418         * progspace-and-thread.c: New file.
10419         * progspace-and-thread.h: New file.
10420         * progspace.c (release_program_space, clone_program_space): Use
10421         scoped_restore_current_program_space.
10422         (restore_program_space, save_current_program_space)
10423         (save_current_space_and_thread): Delete.
10424         (switch_to_program_space_and_thread): Moved to
10425         progspace-and-thread.c.
10426         * progspace.h (save_current_program_space)
10427         (save_current_space_and_thread): Delete declarations.
10428         (scoped_restore_current_program_space): New class.
10429         * remote.c (remote_btrace_maybe_reopen): Use
10430         scoped_restore_current_thread.
10431         * symtab.c: Include "progspace-and-thread.h".
10432         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10433         * thread.c (print_thread_info_1): Use
10434         scoped_restore_current_thread.
10435         (struct current_thread_cleanup): Delete.
10436         (do_restore_current_thread_cleanup)
10437         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10438         (scoped_restore_current_thread::~scoped_restore_current_thread):
10439         ... this new dtor.
10440         (make_cleanup_restore_current_thread): Rename/convert to ...
10441         (scoped_restore_current_thread::scoped_restore_current_thread):
10442         ... this new ctor.
10443         (thread_apply_all_command): Use scoped_restore_current_thread.
10444         (thread_apply_command): Use scoped_restore_current_thread.
10445         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10446         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10447
10448 2017-05-04  Pedro Alves  <palves@redhat.com>
10449
10450         * thread.c (make_cleanup_restore_current_thread): Move
10451         find_thread_ptid call before the is_stopped call.  Assert that the
10452         thread is found.  Replace is_stopped call by checking the thread's
10453         state directly.  Remove unnecessary NULL-thread check.
10454
10455 2017-05-04  Pedro Alves  <palves@redhat.com>
10456
10457         * corelow.c (thread_section_name): New class.
10458         (get_core_register_section, get_core_siginfo): Use it.
10459
10460 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10461
10462         * corelow.c (sniff_core_bfd): Remove extra semicolon.
10463         (get_core_register_section): Remove xfree of NULL pointer.
10464
10465 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
10466
10467         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10468         * regcache.c (regcache::raw_supply_zeroed): New function.
10469         * regcache.h (regcache::raw_supply_zeroed): New declaration.
10470
10471 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10472
10473         * gdbarch.sh: Remove commented out definition of
10474         TARGET_CHAR_BIT.
10475         * gdbarch.h: Re-generate.
10476
10477 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
10478
10479         * configure: Regenerate.
10480
10481 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
10482
10483         * solib-target.c (solib_target_relocate_section_addresses):
10484         Remove num_section_bases, num_bases, segment_bases variables.
10485
10486 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10487
10488         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10489
10490 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10491
10492         * solib-target.c: Include <vector>
10493         (struct lm_info_target) <~lm_info_target>: Remove.
10494         <segment_bases, section_bases>: Change type to
10495         std::vector<CORE_ADDR>.
10496         (library_list_start_segment, library_list_start_section,
10497         library_list_end_library,
10498         solib_target_relocate_section_addresses): Adjust.
10499
10500 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10501
10502         * gdbarch.sh (software_single_step): Change return type to
10503         std::vector<CORE_ADDR>.
10504         * gdbarch.c, gdbarch.h: Re-generate.
10505         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10506         Adjust.
10507         (arm_deal_with_atomic_sequence_raw): Adjust.
10508         (thumb_get_next_pcs_raw): Adjust.
10509         (arm_get_next_pcs_raw): Adjust.
10510         (arm_get_next_pcs): Adjust.
10511         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10512         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10513         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10514         (alpha_software_single_step): Adjust.
10515         * alpha-tdep.h (alpha_software_single_step): Adjust.
10516         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10517         * arm-tdep.c (arm_software_single_step): Adjust.
10518         (arm_breakpoint_kind_from_current_state): Adjust.
10519         * arm-tdep.h (arm_software_single_step): Adjust.
10520         * breakpoint.c (insert_single_step_breakpoint): Adjust.
10521         * cris-tdep.c (cris_software_single_step): Adjust.
10522         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10523         (micromips_deal_with_atomic_sequence): Adjust.
10524         (deal_with_atomic_sequence): Adjust.
10525         (mips_software_single_step): Adjust.
10526         * mips-tdep.h (mips_software_single_step): Adjust.
10527         * moxie-tdep.c (moxie_software_single_step): Adjust.
10528         * nios2-tdep.c (nios2_software_single_step): Adjust.
10529         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10530         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10531         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10532         * s390-linux-tdep.c (s390_software_single_step): Adjust.
10533         * sparc-tdep.c (sparc_software_single_step): Adjust.
10534         * spu-tdep.c (spu_software_single_step): Adjust.
10535         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10536
10537 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10538
10539         * gdbarch.sh: Use semi-colon as field separator instead of colon.
10540         * gdbarch.h: Re-generate.
10541
10542 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10543
10544         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10545         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10546         * python/py-instruction.c, python/py-instruction.h: New file.
10547         * python/py-record.c: Add py-instruction.h include.
10548         (gdbpy_initialize_record): Make gdb.Instruction a super class of
10549         gdb.RecordInstruction.
10550         * python/python-internal.h: Add gdbpy_initialize_instruction
10551         declaration.
10552         * python/python.c (do_start_initialization): Add
10553         gdbpy_initialize_instruction.
10554
10555 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10556
10557         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10558         Remove.
10559         (btrace_func_from_recpy_func): New function.
10560         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10561         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10562         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10563         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10564         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10565         Also, use new helper functions.
10566         (btpy_list_item): Use new helper functions.
10567         (recpy_bt_function_call_history): Use new type name.
10568         (btpy_call_getset): Remove.
10569         (gdbpy_initialize_btrace): Remove code to initialize
10570         gdb.BtraceFunctionCall.
10571         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10572         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10573         recpy_bt_func_prev, recpy_bt_func_next): New export.
10574         * python/py-record.c (recpy_func_type): New static object.
10575         (recpy_func_new, recpy_func_level, recpy_func_symbol,
10576         recpy_func_instructions, recpy_func_up, recpy_func_prev,
10577         recpy_func_next): New function.
10578         (recpy_element_hash, recpy_element_richcompare): Updated comment.
10579         (recpy_func_getset): New static object.
10580         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10581         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10582
10583 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10584
10585         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10586         (btpy_object, btpy_insn_type, btpy_new): Remove.
10587         (btpy_list_object): Use gdb.RecordInstruction type instead of
10588         gdb.BtraceInstruction type.
10589         (btrace_insn_from_recpy_insn): New function.
10590         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10591         btpy_new.
10592         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10593         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10594         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10595         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10596         instead of btpy_object.
10597         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10598         btpy_insn_data, btpy_insn_decode): Rename to ...
10599         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10600         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10601         recpy_bt_insn_decode): This.  Also, use new helper functions.
10602         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10603         recpy_insn_type.
10604         (btpy_insn_getset): Remove.
10605         (gdbpy_initialize_btrace): Remove code to initialize
10606         gdb.BtraceInstruction.  Use recpy_element_object.
10607         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10608         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10609         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10610         * python/py-record.c (recpy_insn_type): New static object.
10611         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10612         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10613         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10614         New function.
10615         (recpy_insn_getset): New static object.
10616         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10617         * python/py-record.h (recpy_element_object): New typedef.
10618         (recpy_insn_type, recpy_insn_new): New export.
10619
10620 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10621
10622         * py-record-btrace.c (btpy_insn_new): Removed.
10623         (btpy_insn_or_gap_new): New function.
10624         (btpy_insn_error): Removed.
10625         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10626         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10627         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10628         btpy_insn_or_gap_new instead of btpy_insn_new.
10629         (btpy_insn_getset): Remove btpy_insn_error.
10630         * py-record.c (recpy_gap_type): New static object.
10631         (recpy_gap_object): New typedef.
10632         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10633         recpy_gap_reason_string): New function.
10634         (recpy_gap_getset): New static object.
10635         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10636         * py-record.h (recpy_gap_new): New export.
10637
10638 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10639
10640         * python/py-record.c (recpy_ptid): Remove.
10641         (recpy_record_getset): Remove recpy_ptid.
10642
10643 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10644
10645         * btrace.c (btrace_fetch): Set inferior_ptid.
10646         * python/py-record-btrace.c: Add "py-record.h" include.
10647         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10648         recpy_bt_end, recpy_bt_instruction_history,
10649         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10650         in gdb.Record object instead of current ptid.
10651         * python/py-record.c: Include new "py-record.h" file.
10652         (recpy_record_object): Moved to py-record.h.
10653         * python/py-record.h: New file.
10654
10655 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10656
10657         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10658         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10659         indentation.
10660
10661 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
10662
10663         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10664         the past maintainers section.
10665
10666 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10667
10668         * infcmd.c (get_return_value): Use regcache ctor, and remove
10669         cleanup.
10670
10671 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10672             Pedro Alves  <palves@redhat.com>
10673
10674         * regcache.c (regcache::regcache): New tag dispatch ctor.
10675         (do_cooked_read): Moved above.
10676         (regcache_dup): Use the tag dispatch ctor..
10677         * regcache.h (regcache): Declare ctor, delete copy ctor and
10678         assignment operator, remove friend regcache_dup.
10679
10680 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10681
10682         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10683         call method save instead of regcache_cpy.
10684         * regcache.h (struct regcache): Make regcache_dup a friend.
10685
10686 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10687
10688         * regcache.c (struct regcache): Move to regcache.h
10689         (regcache::arch): New method.
10690         (regcache_get_ptid): Update.
10691         (get_regcache_arch): Call arch method.
10692         (get_regcache_aspace): Call method aspace.
10693         (register_buffer): Change it to method.
10694         (regcache_save): Change it to regcache::save.
10695         (regcache_restore): Likewise.
10696         (regcache_cpy_no_passthrough): Remove the declaration.
10697         (regcache_cpy): Call methods restore and cpy_no_passthrough.
10698         (regcache_cpy_no_passthrough): Change it to method
10699         cpy_no_passthrough.
10700         (regcache_register_status): Change it to method
10701         get_register_status.
10702         (regcache_invalidate): Change it to method invalidate.
10703         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10704         (regcache_raw_update): Change it to method raw_update.
10705         (regcache_raw_read): Likewise.
10706         (regcache_raw_read_signed): Likewise.
10707         (regcache_raw_read_unsigned): Likewise.
10708         (regcache_raw_write_signed): Likewise.
10709         (regcache_raw_write_unsigned): Likewise.
10710         (regcache_cooked_read): Likewise.
10711         (regcache_cooked_read_value): Likewise.
10712         (regcache_cooked_read_signed): Likewise.
10713         (regcache_cooked_read_unsigned): Likewise.
10714         (regcache_cooked_write_signed): Likewise.
10715         (regcache_cooked_write_unsigned): Likewise.
10716         (regcache_raw_set_cached_value): Likewise.
10717         (regcache_raw_write): Likewise.
10718         (regcache_cooked_write): Likewise.
10719         (regcache_xfer_part): Likewise.
10720         (regcache_raw_read_part): Likewise.
10721         (regcache_raw_write_part): Likewise.
10722         (regcache_cooked_read_part): Likewise.
10723         (regcache_cooked_write_part): Likewise.
10724         (regcache_raw_supply): Likewise.
10725         (regcache_raw_collect): Likewise.
10726         (regcache_transfer_regset): Likewise.
10727         (regcache_supply_regset): Likewise.
10728         (regcache_collect_regset): Likewise.
10729         (regcache_debug_print_register): Likewise.
10730         (enum regcache_dump_what): Move it to regcache.h.
10731         (regcache_dump): Change it to method dump.
10732         * regcache.h (enum regcache_dump_what): New.
10733         (class regcache): New.
10734         * target.c (target_fetch_registers): Call method
10735         debug_print_register.
10736         (target_store_registers): Likewise.
10737
10738 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10739
10740         * windows-nat.c (struct lm_info_windows): Initialize field.
10741         (windows_make_so): Allocate lm_info_windows with new.
10742         (windows_free_so): Free lm_info_windows with delete.
10743
10744 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10745
10746         * solib-darwin.c (struct lm_info_darwin): Initialize field.
10747         (darwin_current_sos): Allocate lm_info_darwin with new, remove
10748         cleanup.
10749         (darwin_free_so): Free lm_info_darwin with delete.
10750
10751 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10752
10753         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
10754         <l_addr_p>: Change type to bool.
10755         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
10756         (svr4_free_so): Free lm_info_svr4 with delete.
10757         (svr4_copy_library_list): Replace memcpy with call to copy
10758         constructor.
10759         (library_list_start_library, svr4_default_sos): Allocate
10760         lm_info_svr4 with new.
10761
10762 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10763
10764         * solib-target.c (struct lm_info_target): Add destructor,
10765         initialize fields.
10766         <name>: Change type to std::string.
10767         (library_list_start_library): Allocate lm_info_target with new.
10768         (solib_target_free_library_list): Free lm_info_target with
10769         delete.
10770         (solib_target_current_sos): Adapt to std::string.
10771         (solib_target_free_so): Free lm_info_target with delete.
10772
10773 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10774
10775         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
10776         fields.
10777         (frv_current_sos): Allocate lm_info_frv with new.
10778         (frv_relocate_main_executable): Free lm_info_frv with delete,
10779         allocate with new.
10780         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
10781
10782 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10783
10784         * solib-frv.c (struct lm_info_frv): Fix indentation.
10785
10786 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10787
10788         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
10789         map field.
10790         (dsbt_current_sos): Allocate lm_info_dsbt with new.
10791         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
10792         and allocate with new.
10793         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
10794
10795 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10796
10797         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
10798         <filename, member_name>: Change type to std::string.
10799         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
10800         (library_list_start_library): Allocate lm_info_aix with new.
10801         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
10802         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
10803         with copy constructor.
10804
10805 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10806
10807         * solist.h (struct lm_info): Remove.
10808         (struct lm_info_base): New class.
10809         (struct so_list) <lm_info>: Change type to lm_info_base *.
10810         * nto-tdep.c (struct lm_info): Remove.
10811         (lm_addr): Adjust.
10812         * solib-aix.c (struct lm_info): Rename to ...
10813         (struct lm_info_aix): ... this.  Extend lm_info_base.
10814         (lm_info_p): Rename to ...
10815         (lm_info_aix_p): ... this, and adjust.
10816         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
10817         solib_aix_parse_libraries, library_list_start_library,
10818         solib_aix_free_library_list, solib_aix_parse_libraries,
10819         solib_aix_get_library_list,
10820         solib_aix_relocate_section_addresses, solib_aix_free_so,
10821         solib_aix_get_section_offsets,
10822         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
10823         Adjust.
10824         (struct solib_aix_inferior_data) <library_list>: Adjust.
10825         * solib-darwin.c (struct lm_info): Rename to ...
10826         (struct lm_info_darwin): ... this.  Extend lm_info_base.
10827         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
10828         * solib-dsbt.c (struct lm_info): Rename to ...
10829         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
10830         (struct dsbt_info) <main_executable_lm_info): Adjust.
10831         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
10832         dsbt_relocate_section_addresses): Adjust.
10833         * solib-frv.c (struct lm_info): Rename to ...
10834         (struct lm_info_frv): ... this.  Extend lm_info_base.
10835         (main_executable_lm_info): Adjust.
10836         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
10837         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
10838         find_canonical_descriptor_in_load_object,
10839         frv_fdpic_find_canonical_descriptor): Adjust.
10840         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10841         to lm_info_svr4.
10842         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10843         svr4_clear_so, svr4_copy_library_list,
10844         library_list_start_library, svr4_default_sos, svr4_read_so_list,
10845         svr4_current_sos, svr4_fetch_objfile_link_map,
10846         solist_update_incremental): Adjust.
10847         * solib-svr4.h (struct lm_info_svr4): Move here from
10848         solib-svr4.c.
10849         * solib-target.c (struct lm_info): Rename to ...
10850         (struct lm_info_target): ... this.  Extend lm_info_base.
10851         (lm_info_p): Rename to ...
10852         (lm_info_target_p): ... this.
10853         (solib_target_parse_libraries, library_list_start_segment,
10854         library_list_start_section, library_list_start_library,
10855         library_list_end_library, solib_target_free_library_list,
10856         solib_target_current_sos, solib_target_free_so,
10857         solib_target_relocate_section_addresses): Adjust.
10858         * windows-nat.c (struct lm_info): Rename to ...
10859         (struct lm_info_windows): ... this.  Extend lm_info_base.
10860         (windows_make_so, handle_load_dll, handle_unload_dll,
10861         windows_xfer_shared_libraries): Adjust.
10862
10863 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10864
10865         * solib-darwin.c (struct darwin_so_list): Remove.
10866         (darwin_current_sos): Allocate an so_list object instead of a
10867         darwin_so_list, separately allocate an lm_info object.
10868         (darwin_free_so): Free lm_info.
10869
10870 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
10871
10872         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
10873         with fprintf_filtered.
10874
10875 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10876
10877         * regcache.c (regcache::regcache): New function.
10878         (regcache::~regcache): New function.
10879         (regcache_xmalloc_1): Remove.
10880         (regcache_xmalloc): Call new regcache.
10881         (regcache_xfree): Call delete regcache.
10882         (get_thread_arch_aspace_regcache): Call new regcache.
10883
10884 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10885
10886         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
10887         lwp instead of ptid_get_lwp.
10888
10889 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10890
10891         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
10892         lwp_info instead of getting from inferior_ptid.
10893
10894 2017-04-27  Keith Seitz  <keiths@redhat.com>
10895
10896         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
10897         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
10898         (CV_CONVERSION_BADNESS): Define.
10899         (rank_one_type): Remove overly restrictive rvalue reference
10900         rank checks.
10901         Add cv-qualifier checks and subranks for type equality.
10902         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
10903         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
10904         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
10905
10906 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
10907
10908         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
10909         count when creating the object.
10910
10911 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
10912             Ulrich Weigand  <uweigand@de.ibm.com>
10913
10914         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
10915         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
10916         is used in AIX.
10917         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
10918         (process_xcoff_symbol): Likewise.
10919         (scan_xcoff_symtab): Likewise.
10920
10921 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10922
10923         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
10924         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
10925         (ia64_access_reg): Use get_frame_register_unsigned.
10926         (ia64_access_rse_reg): Likewise.
10927         (ia64_libunwind_frame_prev_register): Likewise.
10928
10929 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
10930
10931         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
10932         * gdbarch.c: Regenerated.
10933         * gdbarch.h: Regenerated.
10934         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
10935         visibility external.
10936         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
10937         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
10938         (enum cfa_how_kind): Move to ...
10939         (struct dwarf2_frame_state_reg_info): Likewise.
10940         (struct dwarf2_frame_state): Likewise.
10941         * dwarf2-frame.h: ... here.
10942         (dwarf2_frame_state_alloc_regs): New declaration.
10943         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
10944         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
10945
10946 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10947
10948         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
10949         regcache_raw_read_unsigned.
10950         (xtensa_pseudo_register_write): Likewise.
10951
10952 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10953
10954         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
10955         (nds32_pseudo_register_write): Likewise.
10956
10957 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10958
10959         * regcache.c (struct regcache) <readonly_p>: Change its type
10960         to bool.
10961         (regcache_xmalloc_1): Update parameter type and callers update.
10962
10963 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10964
10965         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
10966         set_gdbarch_wchar_bit.
10967         * arm-tdep.c (arm_gdbarch_init): Likewise.
10968
10969 2017-04-25  Pedro Alves  <palves@redhat.com>
10970
10971         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
10972         (BothAreRelocatable, memcopy, memmove): Don't define.
10973         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
10974         macros.
10975
10976 2017-04-25  Pedro Alves  <palves@redhat.com>
10977
10978         * common/common-defs.h: Include "common/poison.h".
10979         * common/function-view.h: (Not, Or, Requires): Move to traits.h
10980         and adjust.
10981         * common/poison.h: New file.
10982         * common/traits.h: Include <type_traits>.
10983         (Not, Or, Requires): New, moved from common/function-view.h.
10984
10985 2017-04-25  Pedro Alves  <palves@redhat.com>
10986
10987         * breakpoint.h (struct breakpoint): In-class initialize all
10988         fields.  Make boolean fields "bool".
10989         * breakpoint.c (init_raw_breakpoint_without_location): Remove
10990         memset call and initializations no longer necessary.
10991
10992 2017-04-25  Pedro Alves  <palves@redhat.com>
10993
10994         * btrace.c (pt_btrace_insn_flags): Change parameter type to
10995         reference.
10996         (pt_btrace_insn): New function.
10997         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
10998
10999 2017-04-25  Pedro Alves  <palves@redhat.com>
11000
11001         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
11002         "base" field and inherit from "bp_location" instead.  Add
11003         non-default ctor.
11004         (allocate_location_exception): Use new non-default ctor.
11005         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11006         (init_bp_location): Convert to ...
11007         (bp_location::bp_location): ... this new ctor, and remove memset
11008         call.
11009         (base_breakpoint_allocate_location): Use the new non-default ctor.
11010         * breakpoint.h (bp_location): Now a class.  Declare default and
11011         non-default ctors.  In-class initialize all members.
11012         (init_bp_location): Remove declaration.
11013
11014 2017-04-25  Pedro Alves  <palves@redhat.com>
11015
11016         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11017         assignment operator.
11018
11019 2017-04-24  Yao Qi  <yao.qi@linaro.org>
11020
11021         * doublest.c (convert_doublest_to_floatformat): Call
11022         floatformat_totalsize_bytes.
11023
11024 2017-04-22  Tom Tromey  <tom@tromey.com>
11025
11026         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11027         ui_out_emit_list.
11028         * stack.c (print_frame): Use ui_out_emit_list.
11029         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11030         ui_out_emit_list.
11031         * mi/mi-main.c (print_one_inferior)
11032         (mi_cmd_data_list_register_names)
11033         (mi_cmd_data_list_register_values, mi_cmd_list_features)
11034         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11035         ui_out_emit_list.
11036         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11037         (mi_output_solib_attribs): Use ui_out_emit_list,
11038         ui_out_emit_tuple.
11039         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11040         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11041         (mi_cmd_stack_list_args, list_args_or_locals): Use
11042         ui_out_emit_list.
11043         * disasm.c (do_assembly_only): Use ui_out_emit_list.
11044         * breakpoint.c (print_solib_event, output_thread_groups): Use
11045         ui_out_emit_list.
11046
11047 2017-04-22  Tom Tromey  <tom@tromey.com>
11048
11049         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11050         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11051         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11052
11053 2017-04-22  Tom Tromey  <tom@tromey.com>
11054
11055         * tracepoint.c (tvariables_info_1)
11056         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11057
11058 2017-04-22  Tom Tromey  <tom@tromey.com>
11059
11060         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11061         annotate_arg_emitter.
11062         * breakpoint.c (print_mention_watchpoint)
11063         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11064         * annotate.h (struct annotate_arg_emitter): New.
11065
11066 2017-04-22  Tom Tromey  <tom@tromey.com>
11067
11068         * record-btrace.c (record_btrace_insn_history)
11069         (record_btrace_insn_history_range, record_btrace_call_history)
11070         (record_btrace_call_history_range): Use ui_out_emit_tuple.
11071         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11072         ui_out_emit_tuple.
11073         * stack.c (print_frame_info): Use ui_out_emit_tuple.
11074         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11075         * skip.c (skip_info): Use ui_out_emit_tuple.
11076         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11077         * progspace.c (print_program_space): Use ui_out_emit_tuple.
11078         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11079         * osdata.c (info_osdata): Use ui_out_emit_tuple.
11080         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11081         ui_out_emit_tuple.
11082         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11083         (output_register, mi_cmd_data_read_memory)
11084         (mi_cmd_data_read_memory_bytes, mi_load_progress)
11085         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11086         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11087         Use ui_out_emit_tuple.
11088         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11089         ui_out_emit_tuple.
11090         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11091         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11092         * linux-thread-db.c (info_auto_load_libthread_db): Use
11093         ui_out_emit_tuple.
11094         * inferior.c (print_inferior): Use ui_out_emit_tuple.
11095         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11096         * disasm.c (do_mixed_source_and_assembly_deprecated)
11097         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11098         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11099         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11100         * breakpoint.c (print_one_breakpoint_location)
11101         (print_one_breakpoint): Use ui_out_emit_tuple.
11102         * auto-load.c (print_script, info_auto_load_cmd): Use
11103         ui_out_emit_tuple.
11104         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11105
11106 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
11107
11108         * thread.c (print_thread_info_1): Remove dead code.
11109
11110 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11111
11112         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11113         GDB_SELF_TEST.
11114         * arm-tdep.c (selftests::arm_record_test): Likewise.
11115
11116 2017-04-21  Yao Qi  <yao.qi@linaro.org>
11117
11118         * regcache.c (regcache_restore): Remove argument 2.  Replace
11119         argument 3 with regcache.  Get register status from
11120         src->register_status and get register contents from
11121         register_buffer (src, regnum).
11122         (regcache_cpy): Update.
11123
11124 2017-04-19  Pedro Alves  <palves@redhat.com>
11125
11126         * gdbthread.h (thread): Add missing closing parenthesis in
11127         comment.
11128
11129 2017-04-19  Pedro Alves  <palves@redhat.com>
11130
11131         * common/refcounted-object.h: New file.
11132         * gdbthread.h: Include "common/refcounted-object.h".
11133         (thread_info): Inherit from refcounted_object and add comments.
11134         (thread_info::incref, thread_info::decref)
11135         (thread_info::m_refcount): Delete.
11136         (thread_info::deletable): Use the refcounted_object::refcount()
11137         method.
11138         * inferior.c (current_inferior_): Add comment.
11139         (set_current_inferior): Increment/decrement refcounts.
11140         (prune_inferiors, remove_inferior_command): Skip inferiors marked
11141         not-deletable instead of comparing with the current inferior.
11142         (initialize_inferiors): Increment the initial inferior's refcount.
11143         * inferior.h (struct inferior): Forward declare.
11144         Include "common/refcounted-object.h".
11145         (current_inferior, set_current_inferior): Move declaration to
11146         before struct inferior's definition, and fix comment.
11147         (inferior): Inherit from refcounted_object.  Add comments.
11148         * thread.c (switch_to_thread_no_regs): Reference the thread's
11149         inferior pointer directly instead of doing a ptid lookup.
11150         (switch_to_no_thread): New function.
11151         (switch_to_thread(thread_info *)): New function, factored out
11152         from ...
11153         (switch_to_thread(ptid_t)): ... this.
11154         (restore_current_thread): Delete.
11155         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11156         fields, and add 'inf' field.
11157         (do_restore_current_thread_cleanup): Check whether old->inf is
11158         alive instead of looking up an inferior by ptid.  Use
11159         switch_to_thread and switch_to_no_thread.
11160         (restore_current_thread_cleanup_dtor): Use old->inf directly
11161         instead of lookup up an inferior by id.  Decref the inferior.
11162         Don't restore 'removable'.
11163         (make_cleanup_restore_current_thread): Same the inferior pointer
11164         in old, instead of the inferior number.  Incref the inferior.
11165         Don't save/clear 'removable'.
11166
11167 2017-04-19  Pedro Alves  <palves@redhat.com>
11168
11169         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11170         unittests/scoped_restore-selftests.c.
11171         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11172         * common/scoped_restore.h (scoped_restore_base): Make "class".
11173         (scoped_restore_base::release): New public method.
11174         (scoped_restore_base::scoped_restore_base): New protected ctor.
11175         (scoped_restore_base::m_saved_var): New protected field.
11176         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11177         scoped_restore_base base class instead of m_saved_var directly.
11178         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11179         (scoped_restore_tmpl::scoped_restore_tmpl(const
11180         scoped_restore_tmpl<T>&)): Likewise.
11181         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11182         method.
11183         (scoped_restore_tmpl::saved_var): New method.
11184         (scoped_restore_tmpl::m_saved_var): Delete.
11185         * inferior.h (inferior::detaching): Now a bool.
11186         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11187         cleanup.
11188         * unittests/scoped_restore-selftests.c: New file.
11189
11190 2017-04-19  Pedro Alves  <palves@redhat.com>
11191
11192         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11193         Re-sort in alphabetic order.
11194
11195 2017-04-18  Pedro Alves  <palves@redhat.com>
11196
11197         * xml-support.c (obstack_xml_printf): Delete.
11198         * xml-support.h (obstack_xml_printf): Delete.
11199
11200 2017-04-18  Pedro Alves  <palves@redhat.com>
11201
11202         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11203         vdebug, verror, body_text, start_element, end_element, name,
11204         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11205         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11206         is_xinclude>: Make private and add m_ prefix.
11207         (gdb_xml_parser::body_text): New method, based on ...
11208         (gdb_xml_body_text): ... this.  Adjust.
11209         (gdb_xml_parser::vdebug): New method, based on ...
11210         (gdb_xml_debug): ... this.  Adjust.
11211         (gdb_xml_parser::verror): New method, based on ...
11212         (gdb_xml_error): ... this.  Adjust.
11213         (gdb_xml_parser::start_element): New method, based on ...
11214         (gdb_xml_start_element): ... this.  Adjust.
11215         (gdb_xml_start_element_wrapper): Defer to
11216         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11217         (gdb_xml_parser::end_element): New method, based on ...
11218         (gdb_xml_end_element_wrapper): ... this.  Adjust.
11219         (gdb_xml_parser::~gdb_xml_parser): Adjust.
11220         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11221         (gdb_xml_parser::use_dtd): New method, based on ...
11222         (gdb_xml_use_dtd): ... this.  Adjust.
11223         (gdb_xml_parser::parse): New method, based on ...
11224         (gdb_xml_parse): ... this.  Adjust.
11225         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11226         (xinclude_start_include): Adjust to call the parser's name method.
11227         (xml_xinclude_default, xml_xinclude_start_doctype)
11228         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11229         method.
11230         (xml_process_xincludes): Adjust to call parser methods.
11231         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11232         declarations.
11233
11234 2017-04-18  Pedro Alves  <palves@redhat.com>
11235
11236         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11237         gdb::optional<std::string>.
11238         * xml-support.c: Include <string>.
11239         (scope_level::scope_level(scope_level &&))
11240         (scope_level::~scope_level): Delete.
11241         (scope_level::body): Now a std::string.
11242         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11243         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11244         parameter.
11245         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11246         (xinclude_parsing_data::output): Now a std::string reference.
11247         (xinclude_start_include): Adjust.
11248         (xml_xinclude_default): Adjust.
11249         (xml_process_xincludes): Add 'output' parameter, and return bool.
11250         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11251         and return bool.
11252         * xml-tdesc.c: Include <unordered_map> and <string>.
11253         (tdesc_xml_cache): Delete.
11254         (tdesc_xml_cache_s): Delete.
11255         (xml_cache): Now an std::unordered_map.
11256         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11257         (target_fetch_description_xml): Change return type to
11258         gdb::optional<std::string>, and adjust.
11259         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11260         (target_fetch_description_xml): Change return type to
11261         gdb::optional<std::string>.
11262
11263 2017-04-18  Pedro Alves  <palves@redhat.com>
11264
11265         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11266         unittests/optional-selftests.c.
11267         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11268         * unittests/optional-selftests.c: New file.
11269         * unittests/optional/assignment/1.cc: New file.
11270         * unittests/optional/assignment/2.cc: New file.
11271         * unittests/optional/assignment/3.cc: New file.
11272         * unittests/optional/assignment/4.cc: New file.
11273         * unittests/optional/assignment/5.cc: New file.
11274         * unittests/optional/assignment/6.cc: New file.
11275         * unittests/optional/assignment/7.cc: New file.
11276         * unittests/optional/cons/copy.cc: New file.
11277         * unittests/optional/cons/default.cc: New file.
11278         * unittests/optional/cons/move.cc: New file.
11279         * unittests/optional/cons/value.cc: New file.
11280         * unittests/optional/in_place.cc: New file.
11281         * unittests/optional/observers/1.cc: New file.
11282         * unittests/optional/observers/2.cc: New file.
11283
11284 2017-04-18  Pedro Alves  <palves@redhat.com>
11285
11286         * common/gdb_optional.h: Include common/traits.h.
11287         (in_place_t): New type.
11288         (in_place): New constexpr variable.
11289         (optional::optional): Remove member initialization of
11290         m_instantiated.
11291         (optional::optional(in_place_t...)): New constructor.
11292         (optional::~optional): Use reset.
11293         (optional::optional(const optional&)): New.
11294         (optional::optional(const optional&&)): New.
11295         (optional::optional(T &)): New.
11296         (optional::optional(T &&)): New.
11297         (operator::operator=(const optional &)): New.
11298         (operator::operator=(optional &&)): New.
11299         (operator::operator= (const T &))
11300         (operator::operator= (T &&))
11301         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
11302         (operator::reset): New.
11303         (operator::m_instantiated):: Add in-class initializer.
11304         * common/traits.h: Include <type_traits>.
11305         (struct And): New types.
11306
11307 2017-04-18  Pedro Alves  <palves@redhat.com>
11308
11309         * xml-support.c: Include <vector>.
11310         (scope_level::scope_level(const gdb_xml_element *))
11311         (scope_level::scope_level(scope_level&&)): New.
11312         (scope_level::~scope_level): New.
11313         (scope_level_s): Delete.
11314         (gdb_xml_parser::scopes): Now a std::vector.
11315         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11316         Use std::vector.
11317         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11318         scope cleanup code.
11319         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11320         of the scopes member.  Use std::vector::emplace_back.
11321
11322 2017-04-18  Pedro Alves  <palves@redhat.com>
11323
11324         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
11325         a bool.
11326         (gdb_xml_end_element): Change type of first parameter.
11327         (gdb_xml_cleanup): Rename to ...
11328         (gdb_xml_parser::~gdb_xml_parser): ... this.
11329         (gdb_xml_create_parser_and_cleanup): Delete with ...
11330         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11331         to this new ctor.
11332         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11333         using gdb_xml_create_parser_and_cleanup.
11334         (xinclude_parsing_data): Add ctor/dtor.
11335         (xml_xinclude_cleanup): Delete.
11336         (xml_process_xincludes): Create a local xinclude_parsing_data
11337         instead of heap-allocating one.  Create a local gdb_xml_parser
11338         instead of heap-allocating one with
11339         gdb_xml_create_parser_and_cleanup.
11340
11341 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
11342
11343         PR threads/20743
11344         * fbsd-nat.c (resume_one_thread_cb): Remove.
11345         (resume_all_threads_cb): Remove.
11346         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11347         iterate_over_threads.
11348
11349 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11350
11351         * NEWS: Create a new section for the next release branch.
11352         Rename the section of the current branch, now that it has
11353         been cut.
11354
11355 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11356
11357         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11358         * version.in: Bump version to 8.0.50.DATE-git.
11359
11360 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
11361
11362         PR gdb/21385
11363         * windows-nat.c (windows_create_inferior): Declare 'allargs'
11364         independently of the host, and fix build breakage on Cygwin.
11365
11366 2017-04-13  Pedro Alves  <palves@redhat.com>
11367
11368         * inferior.c (free_inferior): Convert to ...
11369         (inferior::~inferior): ... this dtor.
11370         (inferior::inferior): New ctor, factored out from ...
11371         (add_inferior_silent): ... here.  Allocate the inferior with a new
11372         expression.
11373         (delete_inferior): Call delete instead of free_inferior.
11374         * inferior.h (gdb_environ, continuation): Forward declare.
11375         (inferior): Now a class.  Add in-class initialization to all
11376         members.  Make boolean fields bool, except 'detaching'.
11377         (inferior::inferior): New explicit ctor.
11378         (inferior::~inferior): New.
11379
11380 2017-04-13  Pedro Alves  <palves@redhat.com>
11381
11382         * inferior.c (init_inferior_list): Delete.
11383         * inferior.h (init_inferior_list): Delete.
11384
11385 2017-04-13  Pedro Alves  <palves@redhat.com>
11386
11387         PR threads/13217
11388         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11389         (top level): Call it twice, with different thread sets.
11390
11391 2017-04-13  Pedro Alves  <palves@redhat.com>
11392
11393         * thread.c: Include <algorithm>.
11394         (thread_array_cleanup): Delete.
11395         (scoped_inc_dec_ref): New class.
11396         (live_threads_count): New function.
11397         (set_thread_refcount): Delete.
11398         (tp_array_compar_ascending): Now a bool.
11399         (tp_array_compar): Convert to a std::sort comparison function.
11400         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11401         and live_threads_count.
11402
11403 2017-04-13  Pedro Alves  <palves@redhat.com>
11404
11405         * infrun.c (follow_fork_inferior): Also switch the current
11406         inferior.
11407
11408 2017-04-13  Pedro Alves  <palves@redhat.com>
11409
11410         * breakpoint.c (watch_command_1): Save watchpoint-frame info
11411         before calling create_internal_breakpoint.
11412
11413 2017-04-13  Pedro Alves  <palves@redhat.com>
11414
11415         * fork-child.c (execv_argv): New class.
11416         (breakup_args): Refactored as ...
11417         (execv_argv::init_for_no_shell): .. this method of execv_argv.
11418         Copy arguments to storage and replace separators with NULL
11419         terminators in place.
11420         (escape_bang_in_quoted_argument): Adjust to return bool.
11421         (execv_argv::execv_argv): New ctor.
11422         (execv_argv::init_for_shell): New method, factored out from
11423         fork_inferior.  Don't strdup strings into the vector.
11424         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
11425         Remove free_vector_argv call.
11426
11427 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11428
11429         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11430         tdep->rx_psw_type.
11431
11432 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11433
11434         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11435         * rx-tdep.c (rx_gdbarch_init): Likewise.
11436
11437 2017-04-13  Pedro Alves  <palves@redhat.com>
11438
11439         * breakpoint.h (struct breakpoint): Reindent.
11440
11441 2017-04-13  Pedro Alves  <palves@redhat.com>
11442
11443         * breakpoint.c (bp_location): Rename to ...
11444         (bp_locations): ... this.  All references updated.
11445         (bp_location_count): Rename to ...
11446         (bp_locations_count): ... this.  All references updated.
11447         (bp_location_placed_address_before_address_max): Rename to ...
11448         (bp_locations_placed_address_before_address_max): ... this.  All
11449         references updated.
11450         (bp_location_shadow_len_after_address_max): Rename to ...
11451         (bp_locations_shadow_len_after_address_max): ... this.  All
11452         references updated.
11453         (bp_location_compare_addrs): Rename to ...
11454         (bp_locations_compare_addrs): ... this.  All references updated.
11455         (bp_location_compare):Rename to ...
11456         (bp_locations_compare): ... this.  All references updated.
11457         (bp_location_target_extensions_update): Rename to ...
11458         (bp_locations_target_extensions_update): ... this.  All references
11459         updated.
11460
11461 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11462
11463         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11464         * common/common.m4: Check headers 'termios.h', 'termio.h' and
11465         'sgtty.h'.
11466         * common/gdb_termios.h: New file, with parts of "terminal.h".
11467         * inflow.c: Include "gdb_termios.h".
11468         * ser-unix.c: Include "gdb_termios.h".
11469         * terminal.h: Move terminal-related defines to
11470         "common/gdb_termios.h".
11471
11472 2017-04-12  Tom Tromey  <tom@tromey.com>
11473
11474         * probe.c (parse_probes): Update.
11475         * location.h (delete_event_location): Don't declare.
11476         (event_location_deleter::operator()): Update.
11477         * location.c (event_location_deleter::operator()): Rename from
11478         delete_event_location.
11479         * linespec.h (linespec_result) <location>: Change type to
11480         event_location_up.
11481         * linespec.c (canonicalize_linespec, event_location_to_sals)
11482         (decode_objc): Update.
11483         (linespec_result): Don't call delete_event_location.
11484         * breakpoint.c (create_breakpoints_sal)
11485         (bkpt_probe_create_sals_from_location)
11486         (strace_marker_create_sals_from_location): Update.
11487
11488 2017-04-12  Tom Tromey  <tom@tromey.com>
11489
11490         * linespec.h (struct linespec_result): Add constructor and
11491         destructor.
11492         (init_linespec_result, destroy_linespec_result)
11493         (make_cleanup_destroy_linespec_result): Don't declare.
11494         * linespec.c (init_linespec_result): Remove.
11495         (linespec_result::~linespec_result): Rename from
11496         destroy_linespec_result.  Update.
11497         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11498         Remove.
11499         * breakpoint.c (create_breakpoint, break_range_command)
11500         (decode_location_default): Update.
11501         * ax-gdb.c (agent_command_1): Update.
11502
11503 2017-04-12  Tom Tromey  <tom@tromey.com>
11504
11505         * remote.c (remote_download_tracepoint): Update.
11506         * python/py-breakpoint.c (bppy_get_location): Update.
11507         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11508         (gdbscm_breakpoint_location): Update.
11509         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11510         * breakpoint.h (struct breakpoint) <location, location_range_end>:
11511         Change type to event_location_up.
11512         * breakpoint.c (create_overlay_event_breakpoint)
11513         (create_longjmp_master_breakpoint)
11514         (create_std_terminate_master_breakpoint)
11515         (create_exception_master_breakpoint)
11516         (breakpoint_event_location_empty_p, print_breakpoint_location)
11517         (print_one_breakpoint_location, create_thread_event_breakpoint)
11518         (init_breakpoint_sal, create_breakpoint)
11519         (print_recreate_ranged_breakpoint, break_range_command)
11520         (init_ada_exception_breakpoint, say_where): Update.
11521         (base_breakpoint_dtor): Don't call delete_event_location.
11522         (bkpt_print_recreate, tracepoint_print_recreate)
11523         (dprintf_print_recreate, update_static_tracepoint)
11524         (breakpoint_re_set_default): Update.
11525
11526 2017-04-12  Tom Tromey  <tom@tromey.com>
11527
11528         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11529         type of "to_do".  Update.
11530         (compute_stack_depth): Use std::vector.
11531
11532 2017-04-12  Tom Tromey  <tom@tromey.com>
11533
11534         * printcmd.c (find_instruction_backward): Use std::vector.
11535
11536 2017-04-12  Tom Tromey  <tom@tromey.com>
11537
11538         * symfile.c (objfilep): Remove typedef.
11539         (reread_symbols): Use a std::vector.
11540
11541 2017-04-12  Tom Tromey  <tom@tromey.com>
11542
11543         * mi/mi-main.c (exec_direction_forward): Remove.
11544         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11545         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11546         scoped_restore.
11547         * guile/guile.c (guile_repl_command, guile_command)
11548         (gdbscm_execute_gdb_command): Use scoped_restore.
11549         * go-exp.y (go_parse): Use scoped_restore.
11550         * d-exp.y (d_parse): Use scoped_restore.
11551         * cli/cli-decode.c (cmd_func): Use scoped_restore.
11552         * c-exp.y (c_parse): Use scoped_restore.
11553
11554 2017-04-12  Tom Tromey  <tom@tromey.com>
11555
11556         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11557         (mi_parse): Update return type.
11558         (mi_parse_free): Remove.
11559         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11560         (mi_parse::~mi_parse): Rename from mi_parse_free.
11561         (mi_parse_cleanup): Remove.
11562         (mi_parse): Return a unique_ptr.  Use new.
11563         * mi/mi-main.c (mi_execute_command): Update.
11564
11565 2017-04-12  Tom Tromey  <tom@tromey.com>
11566
11567         * location.c (explicit_location_lex_one): Return a
11568         unique_xmalloc_ptr.
11569         (string_to_explicit_location): Update.  Remove cleanups.
11570
11571 2017-04-12  Tom Tromey  <tom@tromey.com>
11572
11573         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11574         (compare_value_and_voffset): Change type.  Update.
11575         (compute_vtable_size): Change type of "offset_vec".
11576         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
11577         (gnuv3_get_typeid): Remove extraneous declaration.
11578
11579 2017-04-12  Tom Tromey  <tom@tromey.com>
11580
11581         * charset.h (wchar_iterator): Fix comment.
11582
11583 2017-04-12  Tom Tromey  <tom@tromey.com>
11584
11585         * charset.c (iconv_wrapper): New class.
11586         (cleanup_iconv): Remove.
11587         (convert_between_encodings): Use it.
11588
11589 2017-04-12  Tom Tromey  <tom@tromey.com>
11590
11591         * symfile.h (increment_reading_symtab): Update type.
11592         * symfile.c (decrement_reading_symtab): Remove.
11593         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11594         * psymtab.c (psymtab_to_symtab): Update.
11595         * dwarf2read.c (dw2_instantiate_symtab): Update.
11596
11597 2017-04-12  Tom Tromey  <tom@tromey.com>
11598
11599         * jit.c (struct jit_reader): Declare separately.  Add constructor
11600         and destructor.  Change type of "handle".
11601         (loaded_jit_reader): Define separately.
11602         (jit_reader_load): Update.  New "new".
11603         (jit_reader_unload_command): Use "delete".
11604         * gdb-dlfcn.h (struct dlclose_deleter): New.
11605         (gdb_dlhandle_up): New typedef.
11606         (gdb_dlopen, gdb_dlsym): Update types.
11607         (gdb_dlclose): Remove.
11608         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11609         (gdb_dlsym): Change type of "handle".
11610         (make_cleanup_dlclose): Remove.
11611         (dlclose_deleter::operator()): Rename from gdb_dlclose.
11612         * compile/compile-c-support.c (load_libcc): Update.
11613
11614 2017-04-12  Tom Tromey  <tom@tromey.com>
11615
11616         * symtab.h (find_pcs_for_symtab_line): Change return type.
11617         * symtab.c (find_pcs_for_symtab_line): Change return type.
11618         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11619         type of "vec".  Update.
11620         (ltpy_get_pcs_for_line): Update.
11621         * linespec.c (decode_digits_ordinary): Update.
11622
11623 2017-04-12  Tom Tromey  <tom@tromey.com>
11624
11625         * tracepoint.c (actions_command): Update.
11626         * python/python.c (python_command, python_interactive_command):
11627         Update.
11628         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11629         * guile/guile.c (guile_command): Update.
11630         * defs.h (read_command_lines, read_command_lines_1): Return
11631         command_line_up.
11632         (command_lines_deleter): New struct.
11633         (command_line_up): New typedef.
11634         * compile/compile.c (compile_code_command)
11635         (compile_print_command): Update.
11636         * cli/cli-script.h (get_command_line, copy_command_lines): Return
11637         command_line_up.
11638         (make_cleanup_free_command_lines): Remove.
11639         * cli/cli-script.c (get_command_line, read_command_lines_1)
11640         (copy_command_lines): Return command_line_up.
11641         (while_command, if_command, read_command_lines, define_command)
11642         (document_command): Update.
11643         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11644         Remove.
11645         * breakpoint.h (breakpoint_set_commands): Change type of
11646         "commands".
11647         * breakpoint.c (breakpoint_set_commands): Change type of
11648         "commands".  Update.
11649         (do_map_commands_command, update_dprintf_command_list)
11650         (create_tracepoint_from_upload): Update.
11651
11652 2017-04-12  Tom Tromey  <tom@tromey.com>
11653
11654         * tracepoint.c (scope_info): Update.
11655         * spu-tdep.c (spu_catch_start): Update.
11656         * python/python.c (gdbpy_decode_line): Update.
11657         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11658         * python/py-breakpoint.c (bppy_init): Update.
11659         * probe.c (parse_probes): Update.
11660         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11661         * location.h (event_location_deleter): New struct.
11662         (event_location_up): New typedef.
11663         (new_linespec_location, new_address_location, new_probe_location)
11664         (new_explicit_location, copy_event_location)
11665         (string_to_event_location, string_to_event_location_basic)
11666         (string_to_explicit_location): Update return type.
11667         (make_cleanup_delete_event_location): Remove.
11668         * location.c (new_linespec_location, new_address_location)
11669         (new_probe_location, new_explicit_location, copy_event_location):
11670         Return event_location_up.
11671         (delete_event_location_cleanup)
11672         (make_cleanup_delete_event_location): Remove.
11673         (string_to_explicit_location, string_to_event_location_basic)
11674         (string_to_event_location): Return event_location_up.
11675         * linespec.c (canonicalize_linespec, event_location_to_sals)
11676         (decode_line_with_current_source)
11677         (decode_line_with_last_displayed, decode_objc): Update.
11678         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11679         * completer.c (location_completer): Update.
11680         * cli/cli-cmds.c (edit_command, list_command): Update.
11681         * breakpoint.c (create_overlay_event_breakpoint)
11682         (create_longjmp_master_breakpoint)
11683         (create_std_terminate_master_breakpoint)
11684         (create_exception_master_breakpoint)
11685         (create_thread_event_breakpoint): Update.
11686         (init_breakpoint_sal): Update.  Remove some dead code.
11687         (create_breakpoint_sal): Change type of "location".  Update.
11688         (create_breakpoints_sal, create_breakpoint, break_command_1)
11689         (dprintf_command, break_range_command, until_break_command)
11690         (init_ada_exception_breakpoint)
11691         (strace_marker_create_sals_from_location)
11692         (update_static_tracepoint, trace_command, ftrace_command)
11693         (strace_command, create_tracepoint_from_upload): Update.
11694         * break-catch-throw.c (re_set_exception_catchpoint): Update.
11695         * ax-gdb.c (agent_command_1): Update.
11696
11697 2017-04-12  Pedro Alves  <palves@redhat.com>
11698
11699         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11700         * configure.tgt: Handle i[34567]86-*-go32* and
11701         i[34567]86-*-msdosdjgpp*.
11702         * i386-tdep.c (i386_svr4_reg_to_regnum):
11703         Make extern.
11704         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11705         i386-go32-tdep.c.
11706         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11707         * i386-go32-tdep.c: New file.
11708         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
11709         declarations.
11710
11711 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
11712
11713         * aix-thread.c (pd_status2str): Change return type to const char *.
11714
11715 2017-04-12  Pedro Alves  <palves@redhat.com>
11716
11717         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
11718         calls to set_gdbarch_gnu_triplet_regexp.
11719
11720 2017-04-12  Pedro Alves  <palves@redhat.com>
11721
11722         PR gdb/21323
11723         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
11724         New enum value.
11725         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
11726         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
11727         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
11728         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
11729         * gdbarch.h, gdbarch.c: Regenerate.
11730         * aarch64-tdep.c (aarch64_gdbarch_init): Override
11731         gdbarch_wchar_bit and gdbarch_wchar_signed.
11732         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
11733         * arm-tdep.c (arm_gdbarch_init): Likewise.
11734         * avr-tdep.c (avr_gdbarch_init): Likewise.
11735         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
11736         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
11737         * i386-tdep.c (i386_go32_init_abi): Likewise.
11738         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11739         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11740         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11741         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11742         * sh-tdep.c (sh_gdbarch_init): Likewise.
11743         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11744         * sparc64-tdep.c (sparc64_init_abi): Likewise.
11745         * windows-tdep.c (windows_init_abi): Likewise.
11746         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11747
11748 2017-04-12  Pedro Alves  <palves@redhat.com>
11749
11750         PR c++/21323
11751         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
11752         cplus_primitive_type_char32_t>: New enum values.
11753         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
11754         and cplus_primitive_type_char32_t.
11755         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
11756         32, use the archtecture's built-in type for char16_t and char32_t,
11757         respectively.  Otherwise, fallback to init_integer_type as before,
11758         but make the type unsigned, and issue a complaint.
11759         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
11760
11761 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
11762
11763         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
11764         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
11765
11766 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11767
11768         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
11769         'const char *'.
11770
11771 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11772
11773         * common/common-utils.c (free_vector_argv): New function.
11774         * common/common-utils.h: Include <vector>.
11775         (free_vector_argv): New prototype.
11776         * darwin-nat.c (darwin_create_inferior): Rewrite function
11777         prototype in order to constify "exec_file" and accept a
11778         "std::string" for "allargs".
11779         * fork-child.c: Include <vector>.
11780         (breakup_args): Rewrite function, using C++.
11781         (fork_inferior): Rewrite function header, constify "exec_file_arg"
11782         and accept "std::string" for "allargs".  Update the code to
11783         calculate "argv" based on "allargs".  Update calls to "exec_fun"
11784         and "execvp".
11785         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
11786         order to constify "exec_file" and accept a "std::string" for
11787         "allargs".
11788         * go32-nat.c (go32_create_inferior): Likewise.
11789         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
11790         * infcmd.c (run_command_1): Constify "exec_file".  Use
11791         "std::string" for inferior arguments.
11792         * inferior.h (fork_inferior): Update prototype.
11793         * linux-nat.c (linux_nat_create_inferior): Rewrite function
11794         prototype in order to constify "exec_file" and accept a
11795         "std::string" for "allargs".
11796         * nto-procfs.c (procfs_create_inferior): Likewise.
11797         * procfs.c (procfs_create_inferior): Likewise.
11798         * remote-sim.c (gdbsim_create_inferior): Likewise.
11799         * remote.c (extended_remote_run): Update code to accept
11800         "std::string" as argument.
11801         (extended_remote_create_inferior): Rewrite function prototype in
11802         order to constify "exec_file" and accept a "std::string" for
11803         "allargs".
11804         * rs6000-nat.c (super_create_inferior): Likewise.
11805         (rs6000_create_inferior): Likewise.
11806         * target.h (struct target_ops) <to_create_inferior>: Likewise.
11807         * windows-nat.c (windows_create_inferior): Likewise.
11808
11809 2017-04-11  Pedro Alves  <palves@redhat.com>
11810
11811         * thread.c: Fix whitespace throughout.
11812
11813 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11814
11815         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
11816
11817 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
11818
11819         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
11820
11821 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
11822
11823         PR gdb/21364
11824         * osdata.c (info_osdata): Check if 'type' is an empty string
11825         instead of NULL.
11826
11827 2017-04-10  Pedro Alves  <palves@redhat.com>
11828
11829         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
11830         (ptid_to_global_thread_id, in_thread_list)
11831         (do_captured_list_thread_ids, set_resumed, set_running)
11832         (set_executing, set_stop_requested, finish_thread_state)
11833         (validate_registers_access, can_access_registers_ptid)
11834         (print_thread_info_1, switch_to_thread)
11835         (do_restore_current_thread_cleanup)
11836         (make_cleanup_restore_current_thread, thread_command)
11837         (thread_name_command): Use operator== instead of ptid_equal.
11838
11839 2017-04-10  Pedro Alves  <palves@redhat.com>
11840
11841         * thread.c (struct current_thread_cleanup) <next>: Delete field.
11842         (current_thread_cleanup_chain): Delete.
11843         (restore_current_thread_cleanup_dtor)
11844         (make_cleanup_restore_current_thread): Remove references to
11845         current_thread_cleanup_chain.
11846
11847 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
11848
11849         * msp430-tdep.c (msp430_pseudo_register_read): Never return
11850         REG_UNKNOWN.
11851
11852 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11853
11854         PR gdb/19942
11855         * gdbthread.h (thread_info::deletable): New method.
11856         (thread_info::incref): New method.
11857         (thread_info::decref): New method.
11858         (thread_info::refcount): Move it to private.
11859         * infrun.c (save_stop_context): Call inc_refcount.
11860         (release_stop_context_cleanup): Likewise.
11861         * thread.c (set_thread_exited): New function.
11862         (init_thread_list): Delete "tp" only it is deletable, otherwise
11863         call set_thread_exited.
11864         (delete_thread_1): Call set_thread_exited.
11865         (current_thread_cleanup) <inferior_pid>: Remove.
11866         <thread>: New field.
11867         (restore_current_thread_ptid_changed): Removed.
11868         (do_restore_current_thread_cleanup): Adjust.
11869         (restore_current_thread_cleanup_dtor): Don't call
11870         find_thread_ptid.
11871         (set_thread_refcount): Use dec_refcount.
11872         (make_cleanup_restore_current_thread): Adjust.
11873         (thread_apply_all_command): Call inc_refcount.
11874         (_initialize_thread): Don't call
11875         observer_attach_thread_ptid_changed.
11876
11877 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11878
11879         * thread.c (delete_thread_1): Hoist code on marking thread as
11880         exited.
11881
11882 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11883
11884         * windows-nat.c (windows_detach): Initialize ptid with
11885         minus_one_ptid.
11886
11887 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11888
11889         * unittests/ptid-selftests.c: Fix erroneous assert messages.
11890
11891 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
11892
11893         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
11894         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
11895         (bfin_pseudo_register_write): Likewise
11896
11897 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
11898
11899         * common/ptid.h (struct ptid): Change to...
11900         (class ptid_t): ... this.
11901         <ptid_t>: New constructors.
11902         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
11903         matches>: New methods.
11904         <make_null, make_minus_one>: New static methods.
11905         <pid>: Rename to...
11906         <m_pid>: ...this.
11907         <lwp>: Rename to...
11908         <m_lwp>: ...this.
11909         <tid>: Rename to...
11910         <m_tid>: ...this.
11911         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
11912         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
11913         as references, move comment to class ptid_t.
11914         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
11915         ptid_t static methods.
11916         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
11917         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
11918         Take ptid arguments as references, implement using ptid_t methods.
11919         * unittests/ptid-selftests.c: New file.
11920         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11921         unittests/ptid-selftests.c.
11922         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
11923
11924 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
11925
11926         * python/python.c (python_run_simple_file): Cast mode literal to
11927         non-const char pointer as expected by PyFile_FromString.
11928
11929 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
11930
11931         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
11932         minus_one_ptid and null_ptid.
11933
11934 2017-04-05  Pedro Alves  <palves@redhat.com>
11935
11936         * warning.m4 (build_warnings): Remove -Wno-write-strings.
11937         * configure: Regenerate.
11938
11939 2017-04-05  Pedro Alves  <palves@redhat.com>
11940
11941         * ada-exp.y (yyerror): Constify.
11942         * ada-lang.c (bound_name, get_selections)
11943         (ada_variant_discrim_type)
11944         (ada_variant_discrim_name, ada_value_struct_elt)
11945         (ada_lookup_struct_elt_type, is_unchecked_variant)
11946         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
11947         (catch_ada_exception_command_split)
11948         (catch_ada_assert_command_split, catch_assert_command)
11949         (ada_op_name): Constify.
11950         * ada-lang.h (ada_yyerror, get_selections)
11951         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
11952         * arc-tdep.c (arc_print_frame_cache): Constify.
11953         * arm-tdep.c (arm_skip_stub): Constify.
11954         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
11955         (gen_aggregate_elt_ref): Constify.
11956         * bcache.c (print_bcache_statistics): Constify.
11957         * bcache.h (print_bcache_statistics): Constify.
11958         * break-catch-throw.c (catch_exception_command_1):
11959         * breakpoint.c (struct ep_type_description::description):
11960         Constify.
11961         (add_solib_catchpoint): Constify.
11962         (catch_fork_command_1): Add cast.
11963         (add_catch_command): Constify.
11964         * breakpoint.h (add_catch_command, add_solib_catchpoint):
11965         Constify.
11966         * bsd-uthread.c (bsd_uthread_state): Constify.
11967         * buildsym.c (patch_subfile_names): Constify.
11968         * buildsym.h (next_symbol_text_func, patch_subfile_names):
11969         Constify.
11970         * c-exp.y (yyerror): Constify.
11971         (token::oper): Constify.
11972         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
11973         * c-varobj.c (cplus_describe_child): Constify.
11974         * charset.c (find_charset_names): Add cast.
11975         (find_charset_names): Constify array and add const_cast.
11976         * cli/cli-cmds.c (complete_command, cd_command): Constify.
11977         (edit_command): Constify.
11978         * cli/cli-decode.c (lookup_cmd): Constify.
11979         * cli/cli-dump.c (dump_memory_command, dump_value_command):
11980         Constify.
11981         (struct dump_context): Constify.
11982         (add_dump_command, restore_command): Constify.
11983         * cli/cli-script.c (get_command_line): Constify.
11984         * cli/cli-script.h (get_command_line): Constify.
11985         * cli/cli-utils.c (check_for_argument): Constify.
11986         * cli/cli-utils.h (check_for_argument): Constify.
11987         * coff-pe-read.c (struct read_pe_section_data): Constify.
11988         * command.h (lookup_cmd): Constify.
11989         * common/print-utils.c (decimal2str): Constify.
11990         * completer.c (gdb_print_filename): Constify.
11991         * corefile.c (set_gnutarget): Constify.
11992         * cp-name-parser.y (yyerror): Constify.
11993         * cp-valprint.c (cp_print_class_member): Constify.
11994         * cris-tdep.c (cris_register_name, crisv32_register_name):
11995         Constify.
11996         * d-exp.y (yyerror): Constify.
11997         (struct token::oper): Constify.
11998         * d-lang.h (d_yyerror): Constify.
11999         * dbxread.c (struct header_file_location::name): Constify.
12000         (add_old_header_file, add_new_header_file, last_function_name)
12001         (dbx_next_symbol_text, add_bincl_to_list)
12002         (find_corresponding_bincl_psymtab, set_namestring)
12003         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12004         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12005         * defs.h (command_line_input, print_address_symbolic)
12006         (deprecated_readline_begin_hook): Constify.
12007         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12008         Constify.
12009         * event-top.c (handle_line_of_input): Constify and add cast.
12010         * exceptions.c (catch_errors): Constify.
12011         * exceptions.h (catch_errors): Constify.
12012         * expprint.c (print_subexp_standard, op_string, op_name)
12013         (op_name_standard, dump_raw_expression, dump_raw_expression):
12014         * expression.h (op_name, op_string, dump_raw_expression):
12015         Constify.
12016         * f-exp.y (yyerror): Constify.
12017         (struct token::oper): Constify.
12018         (struct f77_boolean_val::name): Constify.
12019         * f-lang.c (f_word_break_characters): Constify.
12020         * f-lang.h (f_yyerror): Constify.
12021         * fork-child.c (fork_inferior): Add cast.
12022         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12023         (new_variant): Constify.
12024         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12025         * gdbarch.c: Regenerate.
12026         * gdbcore.h (set_gnutarget): Constify.
12027         * go-exp.y (yyerror): Constify.
12028         (token::oper): Constify.
12029         * go-lang.h (go_yyerror): Constify.
12030         * go32-nat.c (go32_sysinfo): Constify.
12031         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12032         * guile/scm-cmd.c (cmdscm_function): Constify.
12033         * guile/scm-param.c (pascm_param_value): Constify.
12034         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12035         (h8300sx_register_name): Constify.
12036         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12037         Constify.
12038         * ia64-tdep.c (ia64_register_names): Constify.
12039         * infcmd.c (construct_inferior_arguments): Constify.
12040         (path_command, attach_post_wait): Constify.
12041         * language.c (show_range_command, show_case_command)
12042         (unk_lang_error): Constify.
12043         * language.h (language_defn::la_error)
12044         (language_defn::la_name_of_this): Constify.
12045         * linespec.c (decode_line_2): Constify.
12046         * linux-thread-db.c (thread_db_err_str): Constify.
12047         * lm32-tdep.c (lm32_register_name): Constify.
12048         * m2-exp.y (yyerror): Constify.
12049         * m2-lang.h (m2_yyerror): Constify.
12050         * m32r-tdep.c (m32r_register_names): Constify and make static.
12051         * m68hc11-tdep.c (m68hc11_register_names): Constify.
12052         * m88k-tdep.c (m88k_register_name): Constify.
12053         * macroexp.c (appendmem): Constify.
12054         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12055         (upgrade_type, parse_external, parse_partial_symbols)
12056         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12057         (new_symbol): Constify.
12058         * memattr.c (mem_info_command): Constify.
12059         * mep-tdep.c (register_name_from_keyword): Constify.
12060         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12061         Constify.
12062         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12063         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12064         * mi/mi-main.c (captured_mi_execute_command): Constify and add
12065         cast.
12066         (mi_execute_async_cli_command): Constify.
12067         * mips-tdep.c (mips_register_name): Constify.
12068         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12069         (am33_register_name, am33_2_register_name)
12070         * moxie-tdep.c (moxie_register_names): Constify.
12071         * nat/linux-osdata.c (osdata_type): Constify fields.
12072         * nto-tdep.c (nto_parse_redirection): Constify.
12073         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12074         (lookup_child_selector): Constify.
12075         (objc_methcall::name): Constify.
12076         * objc-lang.h (lookup_objc_class, lookup_child_selector)
12077         (lookup_struct_typedef): Constify.
12078         * objfiles.c (pc_in_section): Constify.
12079         * objfiles.h (pc_in_section): Constify.
12080         * p-exp.y (struct token::oper): Constify.
12081         (yyerror): Constify.
12082         * p-lang.h (pascal_yyerror): Constify.
12083         * parser-defs.h (op_name_standard): Constify.
12084         (op_print::string): Constify.
12085         (exp_descriptor::op_name): Constify.
12086         * printcmd.c (print_address_symbolic): Constify.
12087         * psymtab.c (print_partial_symbols): Constify.
12088         * python/py-breakpoint.c (stop_func): Constify.
12089         (bppy_get_expression): Constify.
12090         * python/py-cmd.c (cmdpy_completer::name): Constify.
12091         (cmdpy_function): Constify.
12092         * python/py-event.c (evpy_add_attribute)
12093         (gdbpy_initialize_event_generic): Constify.
12094         * python/py-event.h (evpy_add_attribute)
12095         (gdbpy_initialize_event_generic): Constify.
12096         * python/py-evts.c (add_new_registry): Constify.
12097         * python/py-finishbreakpoint.c (outofscope_func): Constify.
12098         * python/py-framefilter.c (get_py_iter_from_func): Constify.
12099         * python/py-inferior.c (get_buffer): Add cast.
12100         * python/py-param.c (parm_constant::name): Constify.
12101         * python/py-unwind.c (fprint_frame_id): Constify.
12102         * python/python.c (gdbpy_parameter_value): Constify.
12103         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12104         * remote.c (memory_packet_config::name): Constify.
12105         (show_packet_config_cmd, remote_write_bytes)
12106         (remote_buffer_add_string):
12107         * reverse.c (exec_reverse_once): Constify.
12108         * rs6000-tdep.c (variant::name, variant::description): Constify.
12109         * rust-exp.y (rustyyerror): Constify.
12110         * rust-lang.c (rust_op_name): Constify.
12111         * rust-lang.h (rustyyerror): Constify.
12112         * serial.h (serial_ops::name): Constify.
12113         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12114         (sh_sh3e_register_name, sh_sh2e_register_name)
12115         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12116         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12117         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12118         (sh_sh4al_dsp_register_name): Constify.
12119         * sh64-tdep.c (sh64_register_name): Constify.
12120         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12121         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12122         * stabsread.c (patch_block_stabs, read_type_number)
12123         (ref_map::stabs, ref_add, process_reference)
12124         (symbol_reference_defined, define_symbol, define_symbol)
12125         (error_type, read_type, read_member_functions, read_cpp_abbrev)
12126         (read_one_struct_field, read_struct_fields, read_baseclasses)
12127         (read_tilde_fields, read_struct_type, read_array_type)
12128         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12129         (read_huge_number, read_range_type, read_args, common_block_start)
12130         (find_name_end): Constify.
12131         * stabsread.h (common_block_start, define_symbol)
12132         (process_one_symbol, symbol_reference_defined, ref_add):
12133         * symfile.c (get_section_index, add_symbol_file_command):
12134         * symfile.h (get_section_index): Constify.
12135         * target-descriptions.c (tdesc_type::name): Constify.
12136         (tdesc_free_type): Add cast.
12137         * target.c (find_default_run_target):
12138         (add_deprecated_target_alias, find_default_run_target)
12139         (target_announce_detach): Constify.
12140         (do_option): Constify.
12141         * target.h (add_deprecated_target_alias): Constify.
12142         * thread.c (print_thread_info_1): Constify.
12143         * top.c (deprecated_readline_begin_hook, command_line_input):
12144         Constify.
12145         (init_main): Add casts.
12146         * top.h (handle_line_of_input): Constify.
12147         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12148         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12149         (tfind_command): Rename to ...
12150         (tfind_command_1): ... this and constify.
12151         (tfind_command): New function.
12152         (tfind_end_command, tfind_start_command): Adjust.
12153         (encode_source_string): Constify.
12154         * tracepoint.h (encode_source_string): Constify.
12155         * tui/tui-data.c (tui_partial_win_by_name): Constify.
12156         * tui/tui-data.h (tui_partial_win_by_name): Constify.
12157         * tui/tui-source.c (tui_set_source_content_nil): Constify.
12158         * tui/tui-source.h (tui_set_source_content_nil): Constify.
12159         * tui/tui-win.c (parse_scrolling_args): Constify.
12160         * tui/tui-windata.c (tui_erase_data_content): Constify.
12161         * tui/tui-windata.h (tui_erase_data_content): Constify.
12162         * tui/tui-winsource.c (tui_erase_source_content): Constify.
12163         * tui/tui.c (tui_enable): Add cast.
12164         * utils.c (defaulted_query): Constify.
12165         (init_page_info): Add cast.
12166         (puts_debug, subset_compare): Constify.
12167         * utils.h (subset_compare): Constify.
12168         * varobj.c (varobj_format_string): Constify.
12169         * varobj.h (varobj_format_string): Constify.
12170         * vax-tdep.c (vax_register_name): Constify.
12171         * windows-nat.c (windows_detach): Constify.
12172         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12173         * xml-support.c (gdb_xml_end_element): Constify.
12174         * xml-tdesc.c (tdesc_start_reg): Constify.
12175         * xstormy16-tdep.c (xstormy16_register_name): Constify.
12176         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12177         * xtensa-tdep.h (xtensa_register_t::name): Constify.
12178
12179 2017-04-05  Pedro Alves  <palves@redhat.com>
12180
12181         * proc-api.c (struct trans): Constify.
12182         (procfs_note): Constify.
12183         * proc-events.c (struct trans, syscall_table):
12184         * proc-flags.c (struct trans): Constify.
12185         * proc-utils.h (procfs_note): Constify.
12186         * proc-why.c (struct trans): Constify.
12187         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12188         (procfs_detach): Constify.
12189         * sol-thread.c (struct string_map): Constify.
12190         (td_err_string, td_state_string): Constify.
12191
12192 2017-04-05  Pedro Alves  <palves@redhat.com>
12193
12194         * proc-api.c (procfs_filename): Don't initialize
12195         procfs_filename.
12196         (prepare_to_trace): Assume procfs_filename is non-NULL.
12197         (_initialize_proc_api): Give procfs_filename a default value here.
12198
12199 2017-04-05  Pedro Alves  <palves@redhat.com>
12200
12201         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12202         'cond_string' parameter.
12203         (extract_exception_regexp): Constify 'string' parameter.
12204         (catch_exception_command_1): Constify.
12205         * breakpoint.c (init_catchpoint)
12206         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12207         parameter.
12208         (ep_parse_optional_if_clause, catch_fork_command_1)
12209         (catch_exec_command_1): Constify.
12210         * breakpoint.h (init_catchpoint): Constify 'cond_string'
12211         parameter.
12212         (ep_parse_optional_if_clause): Constify.
12213         * cli/cli-utils.c (remove_trailing_whitespace)
12214         (check_for_argument): Constify.
12215         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12216         non-const overload.
12217         (check_for_argument): Likewise.
12218
12219 2017-04-05  Pedro Alves  <palves@redhat.com>
12220
12221         * event-top.c (command_line_handler): Add cast to execute_command
12222         call.
12223         * record-btrace.c (cmd_record_btrace_bts_start)
12224         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12225         (cmd_record_btrace_start): Add cast to execute_command call.
12226         * record-full.c (record_full_goto_insn):
12227         * record.c (record_start, record_stop): Add cast to
12228         execute_command_to_string calls.
12229         (cmd_record_start): Add cast to execute_command calls.
12230
12231 2017-04-05  Pedro Alves  <palves@redhat.com>
12232
12233         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12234         static inline function.
12235         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12236         array and use gdb_PyArg_ParseTupleAndKeywords.
12237         * python/py-cmd.c (cmdpy_init): Likewise.
12238         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12239         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12240         (infpy_search_memory): Likewise.
12241         * python/py-objfile.c (objfpy_add_separate_debug_file)
12242         (gdbpy_lookup_objfile): Likewise.
12243         * python/py-symbol.c (gdbpy_lookup_symbol)
12244         (gdbpy_lookup_global_symbol): Likewise.
12245         * python/py-type.c (gdbpy_lookup_type): Likewise.
12246         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12247         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12248         Likewise.
12249
12250 2017-04-05  Pedro Alves  <palves@redhat.com>
12251
12252         * python/python-internal.h (gdb_PyGetSetDef): New type.
12253         * python/py-block.c (block_object_getset)
12254         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12255         * python/py-event.c (event_object_getset)
12256         (finish_breakpoint_object_getset): Likewise.
12257         * python/py-inferior.c (inferior_object_getset): Likewise.
12258         * python/py-infthread.c (thread_object_getset): Likewise.
12259         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12260         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12261         * python/py-objfile.c (objfile_getset): Likewise.
12262         * python/py-progspace.c (pspace_getset): Likewise.
12263         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12264         Likewise.
12265         * python/py-record.c (recpy_record_getset): Likewise.
12266         * python/py-symbol.c (symbol_object_getset): Likewise.
12267         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12268         Likewise.
12269         * python/py-type.c (type_object_getset, field_object_getset):
12270         Likewise.
12271         * python/py-value.c (value_object_getset): Likewise.
12272
12273 2017-04-05  Pedro Alves  <palves@redhat.com>
12274
12275         * python/python-internal.h (gdb_PyObject_CallMethod)
12276         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12277         New functions.
12278         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12279         (PySys_GetObject, PySys_SetPath): New macros.
12280
12281 2017-04-05  Pedro Alves  <palves@redhat.com>
12282
12283         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12284         info_osdata_command.
12285         * osdata.c (info_osdata_command): Rename to ...
12286         (info_osdata): ... this.  Constify 'type' parameter, and remove
12287         the 'from_tty' parameter.  Accept NULL TYPE.
12288         (info_osdata_command): New function.
12289         * osdata.h (info_osdata_command): Remove declaration.
12290         (info_osdata): New declaration.
12291
12292 2017-04-05  Pedro Alves  <palves@redhat.com>
12293
12294         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12295         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12296         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12297         parameter.
12298         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12299         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12300         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12301         parameter.
12302         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12303         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12304         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12305         (mi_cmd_file_list_exec_source_files)
12306         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12307         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12308         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12309         parameter.
12310         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12311         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12312         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12313         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12314         (mi_cmd_stack_info_frame): Constify 'command' parameter.
12315         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12316         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12317         'command' parameter.
12318         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12319         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12320         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12321         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12322         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12323         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12324         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12325         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12326         (mi_cmd_var_set_update_range): Constify 'command' parameter.
12327         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12328         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12329         parameter.
12330         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12331         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12332         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12333         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12334         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12335         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12336         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12337         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12338         (mi_cmd_data_list_changed_registers)
12339         (mi_cmd_data_write_register_values)
12340         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12341         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12342         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12343         (mi_cmd_list_features, mi_cmd_list_target_features)
12344         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12345         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12346         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12347         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12348         (mi_cmd_trace_frame_collected): Constify 'command'
12349         parameter.
12350         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12351         'command' parameter.
12352
12353 2017-04-05  Pedro Alves  <palves@redhat.com>
12354
12355         * ada-lang.c (ada_completer_word_break_characters): Now a const
12356         array.
12357         (ada_get_gdb_completer_word_break_characters): Constify.
12358         * completer.c (gdb_completer_command_word_break_characters)
12359         (gdb_completer_file_name_break_characters)
12360         (gdb_completer_quote_characters): Now const arrays.
12361         (get_gdb_completer_quote_characters): Constify.
12362         (set_rl_completer_word_break_characters): New function.
12363         (set_gdb_completion_word_break_characters)
12364         (complete_line_internal): Use it.
12365         * completer.h (get_gdb_completer_quote_characters): Constify.
12366         (set_rl_completer_word_break_characters): Declare.
12367         * f-lang.c (f_word_break_characters): Constify.
12368         * language.c (default_word_break_characters): Constify.
12369         * language.h (language_defn::la_word_break_characters): Constify.
12370         (default_word_break_characters): Constify.
12371         * top.c (init_main): Use set_rl_completer_word_break_characters.
12372
12373 2017-04-05  Pedro Alves  <palves@redhat.com>
12374
12375         * aix-thread.c (aix_thread_pid_to_str)
12376         (aix_thread_extra_thread_info): Constify.
12377         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12378         * bsd-uthread.c (bsd_uthread_extra_thread_info)
12379         (bsd_uthread_pid_to_str): Constify.
12380         * corelow.c (core_pid_to_str): Constify.
12381         * darwin-nat.c (darwin_pid_to_str): Constify.
12382         * fbsd-nat.c (fbsd_pid_to_str): Constify.
12383         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12384         Constify.
12385         * gnu-nat.c (gnu_pid_to_str): Constify.
12386         * go32-nat.c (go32_pid_to_str): Constify.
12387         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12388         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12389         * inferior.c (inferior_pid_to_str): Constify.
12390         * linux-nat.c (linux_nat_pid_to_str): Constify.
12391         * linux-tdep.c (linux_core_pid_to_str): Constify.
12392         * linux-thread-db.c (thread_db_pid_to_str)
12393         (thread_db_extra_thread_info): Constify.
12394         * nto-tdep.c (nto_extra_thread_info): Constify.
12395         * nto-tdep.h (nto_extra_thread_info): Constify.
12396         * obsd-nat.c (obsd_pid_to_str): Constify.
12397         * procfs.c (procfs_pid_to_str): Constify.
12398         * ravenscar-thread.c (ravenscar_extra_thread_info)
12399         (ravenscar_pid_to_str): Constify.
12400         * remote-sim.c (gdbsim_pid_to_str): Constify.
12401         * remote.c (remote_threads_extra_info, remote_pid_to_str):
12402         Constify.
12403         * sol-thread.c (solaris_pid_to_str): Constify.
12404         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12405         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12406         * target.c (default_pid_to_str, target_pid_to_str)
12407         (normal_pid_to_str, default_pid_to_str): Constify.
12408         * target.h (target_ops::to_pid_to_str)
12409         (target_ops::to_extra_thread_info): Constify.
12410         (target_pid_to_str, normal_pid_to_str): Constify.
12411         * windows-nat.c (windows_pid_to_str): Constify.
12412         * gdbarch.sh (core_pid_to_str): Constify.
12413         * target-delegates.c: Regenerate.
12414         * gdbarch.h, gdbarch.c: Regenerate.
12415
12416 2017-04-05  Pedro Alves  <palves@redhat.com>
12417
12418         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12419         the memory of the temporary warning_pre_print override.
12420         * utils.c (warning_pre_print): Constify.
12421         * utils.h (warning_pre_print): Constify.
12422
12423 2017-04-05  Pedro Alves  <palves@redhat.com>
12424
12425         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12426         (shell_command): New function.
12427         (make_command): Use std::string.
12428         (init_cli_cmds): Register shell_command instead of shell_escape.
12429
12430 2017-04-05  Pedro Alves  <palves@redhat.com>
12431
12432         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12433         * tracepoint.c (default_collect): Don't initialize.
12434
12435 2017-04-05  Pedro Alves  <palves@redhat.com>
12436
12437         * macroexp.c (macro_buffer::shared): Now a bool.
12438         (init_buffer): Update.
12439         (init_shared_buffer): Constify 'addr' parameter.
12440         (substitute_args, expand, macro_expand, macro_expand_next): Remove
12441         casts.
12442
12443 2017-04-05  Pedro Alves  <palves@redhat.com>
12444
12445         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12446         * disasm.c (set_disassembler_options): Constify local.
12447         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12448
12449 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
12450
12451         PR gdb/21352
12452         * tracefile.c (tsave_command): Fix argument parsing for '-r'
12453         option.
12454
12455 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12456
12457         * frame.c (frame_unwind_register_unsigned): Call
12458         frame_unwind_register_value.
12459
12460 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12461
12462         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12463         Use gdb_test_multiple, and don't match anchor.
12464
12465 2017-04-05  Pedro Alves  <palves@redhat.com>
12466
12467         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12468         (Write After Approval): Remove Simon Marchi.
12469
12470 2017-04-05  Pedro Alves  <palves@redhat.com>
12471
12472         * common/gdb_optional.h (optional::optional): Make constexpr and
12473         initialize m_dummy.
12474
12475 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12476
12477         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12478         (amd64fbsd_jmp_buf_reg_offset): Remove.
12479         (amd64fbsd_supply_uthread): Remove function.
12480         (amd64fbsd_collect_uthread): Remove function.
12481         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12482         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12483         (x86_64-*-freebsd*): Remove bsd-uthread.o.
12484         (fbsd-nat.c): Update comment.
12485         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12486         (i386fbsd_jmp_buf_reg_offset): Remove.
12487         (i386fbsd_supply_uthread): Remove function.
12488         (i386fbsd_collect_uthread): Remove function.
12489         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12490
12491 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12492
12493         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12494         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12495         * NEWS: Mention that support for FreeBSD/alpha was removed.
12496         * alpha-fbsd-tdep.c: Delete file.
12497         * config/alpha/fbsd.mh: Delete file.
12498         * configure.host: Delete alpha*-*-freebsd* and
12499         alpha*-*-kfreebsd*-gnu.
12500         * configure.tgt: Delete alpha*-*-freebsd* and
12501         alpha*-*-kfreebsd*-gnu.
12502
12503 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12504
12505         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12506         amd64bsd_store_inferior_registers): Use ptid from regcache.
12507
12508 2017-04-04  Pedro Alves  <palves@redhat.com>
12509
12510         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
12511         data fields, make them private and add "m_" prefixes.
12512         (lnp_state_machine::lnp_state_machine): New ctor.
12513         (record_line, check_line_address, handle_set_discriminator)
12514         (handle_set_address, handle_advance_pc, handle_special_opcode)
12515         (handle_advance_line, handle_set_file, handle_negate_stmt)
12516         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12517         (end_sequence, advance_line): New methods.
12518         (m_gdbarch, m_record_lines_p): New fields.
12519         (lnp_reader_state): Delete.
12520         (dwarf_record_line): Rename to ...
12521         (lnp_state_machine::record_line): ... adjust.
12522         (init_lnp_state_machine): Delete.
12523         (lnp_state_machine::lnp_state_machine): New.
12524         (check_line_address): Rename to ...
12525         (lnp_state_machine::check_line_address): This.
12526         (dwarf_decode_lines_1): Remove reference to "reader_state".
12527         Adjust lnp_state_machine having a non-default ctor.  Use bool.
12528         State machine internal state manipulation moved to
12529         lnp_state_machine methods.
12530
12531 2017-04-04  Pedro Alves  <palves@redhat.com>
12532
12533         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12534         unittests/offset-type-selftests.c.
12535         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12536         * common/offset-type.h: New file.
12537         * common/preprocessor.h: New file.
12538         * common/traits.h: New file.
12539         * common/valid-expr.h: New file.
12540         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
12541         sect_offset and cu_offset strong typedefs throughout.
12542         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12543         typedefs throughout.
12544         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
12545         sect_offset and cu_offset strong typedefs throughout.
12546         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12547         typedefs throughout.
12548         * gdbtypes.h: Include "common/offset-type.h".
12549         (cu_offset): Now an offset type (strong typedef) instead of a
12550         struct.
12551         (sect_offset): Likewise.
12552         (union call_site_parameter_u): Rename "param_offset" field to
12553         "param_cu_off".
12554         * unittests/offset-type-selftests.c: New file.
12555
12556 2017-04-04  Pedro Alves  <palves@redhat.com>
12557
12558         * common/underlying.h: New file.
12559         * dwarf2read.c: Include "common/gdb_optional.h" and
12560         "common/underlying.h".
12561         (dir_index, file_name_index): New types.
12562         (file_entry): Use them.
12563         (file_entry::include): Use to_underlying.
12564         (line_header::add_file_name): Use dir_index.
12565         (read_formatted_entries): Use gdb::optional.  Read form before
12566         writting to file_entry.
12567         (dwarf_decode_line_header): Use dir_index.
12568         (lnp_state_machine::current_file): Use to_underlying.
12569         (lnp_state_machine::file): Change type to file_name_index.
12570         (dwarf_record_line): Use to_underlying.
12571         (init_lnp_state_machine): Use file_name_index.
12572         (dwarf_decode_lines_1): Use dir_index and file_name_index.
12573
12574 2017-04-04  Pedro Alves  <palves@redhat.com>
12575
12576         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12577         operator bool, has_value and get methods.
12578
12579 2017-04-04  Pedro Alves  <palves@redhat.com>
12580
12581         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12582         fields.
12583         (line_header): Initialize all data fields.  Change type of
12584         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12585         Change type of include_dirs to std::vector<const char *>.  Remove
12586         num_include_dirs, include_dirs_size.  Change type of file_names to
12587         std::vector<file_entry>.  Remove num_file_names, file_names_size.
12588         (line_header::line_header): New.
12589         (line_header::add_include_dir, line_header::add_file_name): New
12590         methods.
12591         (line_header::include_dir_at): Remove NULL check.
12592         (line_header::file_name_at): Add const overload.
12593         (line_header_up): New unique_ptr typedef.
12594         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
12595         std::vector.  Remove free_line_header call.
12596         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
12597         free_line_header call.
12598         (free_cu_line_header): Delete.
12599         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12600         (setup_type_unit_groups): Use line_header_up instead of cleanups.
12601         Adjust to use std::vector.
12602         (free_line_header): Delete.
12603         (free_line_header_voidp): Use delete.
12604         (add_include_dir): Replace with ...
12605         (line_header::add_include_dir): ... this method.  Use std::vector.
12606         (add_file_name): Replace with ...
12607         (line_header::add_file_name): ... this method.  Use std::vector.
12608         (add_include_dir_stub): Delete.
12609         (read_formatted_entries): Remove memset.
12610         (dwarf_decode_line_header): Return a line_header_up instead of a
12611         raw pointer.  Remove cleanup handling.  Pass lambdas to
12612         read_formatted_entries.  Adjust to use line_header methods.
12613         (dwarf_decode_lines_1): Adjust to use line_header methods.
12614         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12615         use std::vector.
12616
12617 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
12618
12619         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12620         instead of struct ptid.
12621
12622 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
12623
12624         * frame.c (get_frame_register_bytes): Unwind using value.
12625         (put_frame_register_bytes): Likewise.
12626
12627 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
12628
12629         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12630         aggregate-like.
12631
12632 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
12633
12634         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12635
12636 2017-03-29  Yao Qi  <yao.qi@linaro.org>
12637
12638         * gdbthread.h (struct thread_info): Declare constructor and
12639         destructor.  Add some in-class member initializers.
12640         * thread.c (free_thread): Remove.
12641         (init_thread_list): Call delete instead of free_thread.
12642         (new_thread): Call thread_info constructor.
12643         (thread_info::thread_info): New function.
12644         (thread_info::~thread_info): New function.
12645         (delete_thread_1): Call delete instead of free_thread.
12646         (make_cleanup_restore_current_thread): Move tp and frame to
12647         inner block.
12648
12649 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12650
12651         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12652         (arc_skip_prologue): Likewise.
12653         (arc_make_frame_cache): Likewise.
12654         (arc_pv_get_operand): New function.
12655         (arc_is_in_prologue): Likewise.
12656         (arc_analyze_prologue): Likewise.
12657         (arc_print_frame_cache): Likewise.
12658         (MAX_PROLOGUE_LENGTH): New constant.
12659
12660 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12661
12662         * configure.tgt: Add arc-insn.o.
12663         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12664         (dump_arc_instruction_command): New function.
12665         (arc_fprintf_disasm): Likewise.
12666         (arc_disassemble_info): Likewise.
12667         (arc_insn_get_operand_value): Likewise.
12668         (arc_insn_get_operand_value_signed): Likewise.
12669         (arc_insn_get_memory_base_reg): Likewise.
12670         (arc_insn_get_memory_offset): Likewise.
12671         (arc_insn_get_branch_target): Likewise.
12672         (arc_insn_dump): Likewise.
12673         (arc_insn_get_linear_next_pc): Likewise.
12674         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12675         (arc_disassemble_info): Likewise.
12676         (arc_insn_get_branch_target): Likewise.
12677         (arc_insn_get_linear_next_pc): Likewise.
12678         * NEWS: Mention new "maint print arc arc-instruction".
12679
12680 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12681
12682         * arc-tdep (maintenance_print_arc_list): New variable.
12683         (maintenance_print_arc_command): New function.
12684
12685 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12686
12687         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12688         Add "limm" and "reserved".
12689         (arc_cannot_fetch_register, arc_cannot_store_register): Add
12690         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12691         * arc-tdep.h (arc_regnum): Likewise.
12692
12693 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12694
12695         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12696         for THREADPTR register.
12697         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12698         register.
12699         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12700         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12701         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12702
12703 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12704
12705         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12706         registers above gdbarch_num_regs (gdbarch) as privileged in
12707         call0 ABI.
12708
12709 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12710
12711         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12712         for a single specified register or for all registers in
12713         a0_base..a0_base + C0_NREGS range.
12714         (supply_gregset_reg): Call regcache_raw_supply for a single
12715         specified register or for all registers in a0_base..a0_base +
12716         C0_NREGS range.
12717
12718 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12719
12720         * arch/xtensa.h (C0_NREGS): Add definition.
12721         * xtensa-tdep.c (C0_NREGS): Remove definition.
12722
12723 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12724
12725         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
12726         Drop xtensa_default_isa initialization.
12727         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
12728
12729 2017-03-27  Pedro Alves  <palves@redhat.com>
12730
12731         * dwarf2read.c (file_entry) <dir_index>: Add comment.
12732         (file_entry::include_dir): New method.
12733         (line_header::include_dir_at, line_header::file_name_at): New
12734         methods.
12735         (setup_type_unit_groups, setup_type_unit_groups)
12736         (psymtab_include_file_name): Simplify using the new methods.
12737         (lnp_state_machine) <the_line_header>: New field.
12738         <file>: Add comment.
12739         (lnp_state_machine::current_file): New method.
12740         (dwarf_record_line): Simplify using the new methods.
12741         (init_lnp_state_machine): Initialize the "the_line_header" field.
12742         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
12743         Simplify using the new methods.
12744
12745 2017-03-27  Pedro Alves  <palves@redhat.com>
12746
12747         * cp-name-parser.y (make_empty): Delete.
12748         (demangler_special, nested_name, ptr_operator, array_indicator)
12749         (direct_declarator, declarator_1): Use fill_comp instead of
12750         make_empty.
12751
12752 2017-03-27  Pedro Alves  <palves@redhat.com>
12753
12754         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
12755         to ATTRIBUTE_PRINTF.
12756         * solib-target.c (library_list_start_list): Print "string" not
12757         "version".
12758         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
12759         gdb_xml_error call.
12760
12761 2017-03-27  Pedro Alves  <palves@redhat.com>
12762
12763         * dwarf2read.c (struct file_and_directory): New.
12764         (dwarf2_get_dwz_file): Adjust to use std::string.
12765         (dw2_get_file_names_reader): Adjust to use file_and_directory.
12766         (find_file_and_directory): Adjust to return a file_and_directory
12767         object.
12768         (read_file_scope): Adjust to use file_and_directory.  Remove
12769         make_cleanup/do_cleanups calls.
12770         (open_and_init_dwp_file): Adjust to use std::string.  Remove
12771         make_cleanup/do_cleanups calls.
12772         * python/python.c (do_start_initialization): Adjust to ldirname
12773         returning a std::string.
12774         * utils.c (ldirname): Now returns a std::string.
12775         * utils.h (ldirname): Change return type to std::string.
12776         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
12777         returning a std::string.
12778         * xml-tdesc.c (file_read_description_xml): Likewise.
12779
12780 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
12781
12782         * regcache.c (regcache_debug_print_register): New function.
12783         * regcache.h (regcache_debug_print_register): New declaration.
12784         * target.c (debug_print_register): Remove.
12785         (target_fetch_registers): Call regcache_debug_print_register.
12786         (target_store_registers): Likewise.
12787
12788 2017-03-24  Pádraig Brady  <pbrady@fb.com>
12789
12790         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
12791         reference beyond the 'lh->include_dirs' array before accessing to
12792         it.
12793         (psymtab_include_file_name): Likewise.
12794         (dwarf_decode_lines_1): Likewise.
12795         (dwarf_decode_lines): Likewise.
12796         (file_file_name): Likewise.
12797
12798 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
12799
12800         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
12801         inferior_ptid.
12802         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12803         ps_lsetfpregs): Likewise.
12804         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
12805         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12806         ps_lsetfpregs): Likewise.
12807         * target.c (target_fetch_registers, target_store_registers):
12808         Remove asserts.
12809
12810 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
12811
12812         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
12813
12814 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12815
12816         * aarch64-tdep.c (aarch64_process_record_test): Declare.
12817         (_initialize_aarch64_tdep): Register it.
12818         (aarch64_record_load_store): Handle PRFM instruction.
12819         (aarch64_process_record_test): New function.
12820
12821 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12822
12823         * aarch64-tdep.c (aarch64_record_load_store): Fix code
12824         indentation.
12825
12826 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12827
12828         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
12829
12830 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12831
12832         python/python.c (do_start_initialization): Fix memory leak.
12833
12834 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12835
12836         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
12837         using get_ptrace_pid.
12838         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12839         inferior_ptid.
12840         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12841         inferior_ptid instead of pid.
12842
12843 2017-03-22  Yao Qi  <yao.qi@linaro.org>
12844
12845         * aarch64-tdep.c: Wrap locally used classes in anonymous
12846         namespace.
12847         * arm-tdep.c: Likewise.
12848         * linespec.c: Likewise.
12849         * ui-out.c: Likewise.
12850
12851 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
12852
12853         PR gdb/19637
12854         * python/lib/gdb/printer/bound_registers.py: Import sys.
12855
12856 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12857
12858         * windows-nat.c (do_windows_fetch_inferior_registers): Add
12859         windows_thread_info parameter and use it instead of
12860         current_thread.
12861         (windows_fetch_inferior_registers): Don't set current_thread,
12862         pass the thread to do_windows_fetch_inferior_registers.  Use
12863         ptid from regcache instead of inferior_ptid.
12864         (do_windows_store_inferior_registers): Add windows_thread_info
12865         parameter and use it instead of current_thread.
12866         (windows_store_inferior_registers): Don't set current_thread,
12867         pass the thread to do_windows_store_inferior_registers.  Use
12868         ptid from regcache instead of inferior_ptid.
12869
12870 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12871
12872         * ser-mingw.c (ser_windows_raw): Remove reference to
12873         struct serial::current_timeout.
12874
12875 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
12876
12877         PR tdep/20928
12878         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
12879         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
12880         (sparc64_fsr_type): Fix %fsr decoding.
12881
12882 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
12883
12884         * python/py-record-btrace.c (btpy_insn_data): Change return type
12885         for Python 2.
12886
12887 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12888
12889         * spu-linux-nat.c (spu_fetch_inferior_registers,
12890         spu_store_inferior_registers): Use ptid from regcache, set and
12891         restore inferior_ptid.
12892         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
12893         Likewise.
12894
12895 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12896
12897         * i386-linux-nat.c (fetch_register, store_register,
12898         i386_linux_fetch_inferior_registers,
12899         i386_linux_store_inferior_registers): Use ptid from regcache.
12900         * ia64-linux-nat.c (ia64_linux_fetch_register,
12901         ia64_linux_store_register): Likewise.
12902         * inf-ptrace.c (inf_ptrace_fetch_register,
12903         inf_ptrace_store_register): Likewise.
12904         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
12905         m32r_linux_store_inferior_registers): Likewise.
12906         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
12907         m68kbsd_store_inferior_registers): Likewise.
12908         * m68k-linux-nat.c (fetch_register, store_register,
12909         m68k_linux_fetch_inferior_registers,
12910         m68k_linux_store_inferior_registers): Likewise.
12911         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
12912         m88kbsd_store_inferior_registers): Likewise.
12913         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
12914         mips_fbsd_store_inferior_registers): Likewise.
12915         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
12916         mips64_linux_regsets_store_registers): Likewise.
12917         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
12918         mipsnbsd_store_inferior_registers): Likewise.
12919         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
12920         mips64obsd_store_inferior_registers): Likewise.
12921         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
12922         Likewise.
12923         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
12924         ppcfbsd_store_inferior_registers): Likewise.
12925         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
12926         ppc_linux_store_inferior_registers): Likewise.
12927         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
12928         ppcnbsd_store_inferior_registers): Likewise.
12929         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
12930         ppcobsd_store_registers): Likewise.
12931         * procfs.c (procfs_fetch_registers, procfs_store_registers):
12932         Likewise.
12933         * ravenscar-thread.c (ravenscar_fetch_registers,
12934         ravenscar_store_registers, ravenscar_prepare_to_store):
12935         Likewise.
12936         * record-btrace.c (record_btrace_fetch_registers,
12937         record_btrace_store_registers, record_btrace_prepare_to_store):
12938         Likewise.
12939         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
12940         Lookup inferior using ptid from regcache, instead of
12941         current_inferior.
12942         * remote.c (remote_fetch_registers, remote_store_registers): Use
12943         ptid from regcache.
12944         * rs6000-nat.c (fetch_register, store_register): Likewise.
12945         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
12946         s390_linux_store_inferior_registers): Likewise.
12947         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
12948         shnbsd_store_inferior_registers): Likewise.
12949         * sol-thread.c (sol_thread_fetch_registers,
12950         sol_thread_store_registers): Likewise.
12951         * sparc-nat.c (sparc_fetch_inferior_registers,
12952         sparc_store_inferior_registers): Likewise.
12953         * tilegx-linux-nat.c (fetch_inferior_registers,
12954         store_inferior_registers): Likewise.
12955         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
12956         vaxbsd_store_inferior_registers): Likewise.
12957         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
12958         store_xtregs): Likewise.
12959
12960 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12961
12962         PR gdb/14441
12963         * NEWS: Mention support for rvalue references in GDB and python.
12964         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
12965         supports both lvalue and rvalue references.
12966
12967 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12968
12969         PR gdb/14441
12970         * gdbtypes.c (rank_one_type): Implement overloading
12971         resolution rules regarding rvalue references.
12972
12973 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12974
12975         PR gdb/14441
12976         * aarch64-tdep.c (aarch64_type_align)
12977         (aarch64_extract_return_value, aarch64_store_return_value): Change
12978         lvalue reference type checks to general reference type checks.
12979         * amd64-tdep.c (amd64_classify): Likewise.
12980         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
12981         Likewise.
12982         * arm-tdep.c (arm_type_align, arm_extract_return_value)
12983         (arm_store_return_value): Likewise.
12984         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
12985         * c-typeprint.c (c_print_type): Likewise.
12986         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
12987         (cplus_number_of_children, cplus_describe_child): Likewise.
12988         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
12989         * completer.c (expression_completer): Likewise.
12990         * cp-support.c (make_symbol_overload_list_adl_namespace):
12991         Likewise.
12992         * darwin-nat-info.c (info_mach_region_command): Likewise.
12993         * dwarf2loc.c (entry_data_value_coerce_ref)
12994         (value_of_dwarf_reg_entry): Likewise.
12995         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
12996         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
12997         Likewise.
12998         * findvar.c (extract_typed_address, store_typed_address):
12999         Likewise.
13000         * gdbtypes.c (rank_one_type): Likewise.
13001         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13002         * infcall.c (value_arg_coerce): Likewise.
13003         * language.c (pointer_type): Likewise.
13004         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13005         Likewise.
13006         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13007         * mn10300-tdep.c (mn10300_type_align): Likewise.
13008         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13009         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13010         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13011         Likewise.
13012         * printcmd.c (print_formatted, x_command): Likewise.
13013         * python/py-type.c (typy_get_composite, typy_template_argument):
13014         Likewise.
13015         * python/py-value.c (valpy_referenced_value)
13016         (valpy_get_dynamic_type, value_has_field): Likewise.
13017         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13018         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13019         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13020         * spu-tdep.c (spu_scalar_value_p): Likewise.
13021         * symtab.c (lookup_symbol_aux): Likewise.
13022         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13023         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13024         Likewise.
13025         * valops.c (value_cast_pointers, value_cast)
13026         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13027         (value_struct_elt, value_struct_elt_bitpos)
13028         (value_find_oload_method_list, find_overload_match)
13029         (value_rtti_indirect_type): Likewise.
13030         * valprint.c (val_print_scalar_type_p, generic_val_print):
13031         Likewise.
13032         * value.c (value_actual_type, value_as_address, unpack_long)
13033         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13034         (coerce_ref): Likewise.
13035         * varobj.c (varobj_get_value_type): Likewise.
13036
13037 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13038
13039         PR gdb/14441
13040         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13041         table of constants.
13042         * python/lib/gdb/command/explore.py: Support exploring values
13043         of rvalue reference types.
13044         * python/lib/gdb/types.py: Implement get_basic_type() for
13045         rvalue reference types.
13046         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13047         constant.
13048         * python/py-value.c (valpy_getitem): Add an rvalue reference
13049         check.
13050         (valpy_reference_value): Add new parameter "refcode".
13051         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13052         New wrappers for valpy_reference_value().
13053         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13054         (gdbpy_invoke_xmethod): Likewise.
13055
13056 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13057
13058         PR gdb/14441
13059         * dwarf2read.c (process_die, read_type_die_1): Handle the
13060         DW_TAG_rvalue_reference_type DIE.
13061         (read_tag_reference_type): Add new parameter "refcode".
13062
13063 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13064
13065         PR gdb/14441
13066         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13067         (c_type_print_modifier, c_type_print_varspec_suffix)
13068         (c_type_print_base): Support printing rvalue reference types.
13069         * c-valprint.c (c_val_print, c_value_print): Support printing
13070         rvalue reference values.
13071
13072 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13073
13074         PR gdb/14441
13075         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13076         typename.
13077         * cp-support.c (replace_typedefs): Handle
13078         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13079         * python/py-type.c (typy_lookup_type): Likewise.
13080
13081 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13082
13083         PR gdb/14441
13084         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13085         * parse.c (insert_type): Change assert statement.
13086         (follow_types): Handle rvalue reference types.
13087         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13088         constant.
13089
13090 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13091
13092         PR gdb/14441
13093         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13094         value_ref() interface.
13095         * c-valprint.c (c_value_print): Likewise.
13096         * infcall.c (value_arg_coerce): Likewise.
13097         * python/py-value.c (valpy_reference_value): Likewise.
13098         * valops.c (value_cast, value_reinterpret_cast)
13099         (value_dynamic_cast, typecmp): Likewise.
13100         (value_ref): Parameterize by kind of return value reference type.
13101         * value.h (value_ref): Add new parameter "refcode".
13102
13103 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13104
13105         PR gdb/14441
13106         * dwarf2read.c (read_tag_reference_type): Use
13107         lookup_lvalue_reference_type() instead of lookup_reference_type().
13108         * eval.c (evaluate_subexp_standard): Likewise.
13109         * f-exp.y: Likewise.
13110         * gdbtypes.c (make_reference_type, lookup_reference_type):
13111         Generalize with rvalue reference types.
13112         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13113         convenience wrappers for lookup_reference_type().
13114         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13115         reference kind parameter.
13116         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13117         wrappers for lookup_reference_type().
13118         * guile/scm-type.c (gdbscm_type_reference): Use
13119         lookup_lvalue_reference_type() instead of lookup_reference_type().
13120         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13121         * parse.c (follow_types): Likewise.
13122         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13123         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13124         Likewise.
13125         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13126         (gdbpy_invoke_xmethod): Likewise.
13127         * stabsread.c: Provide extra argument to make_reference_type()
13128         call.
13129         * valops.c (value_ref, value_rtti_indirect_type): Use
13130         lookup_lvalue_reference_type() instead of lookup_reference_type().
13131
13132 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13133
13134         PR gdb/14441
13135         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13136         (TYPE_IS_REFERENCE): New macro.
13137         (struct type): Add rvalue_reference_type field.
13138         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13139
13140 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13141
13142         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13143         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13144         New function definition.
13145         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13146         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13147         New function declaration.
13148         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13149         * mi/mi-interp.h: New file.
13150         * solib.c (info_sharedlibrary_command): Replace for loop with
13151         ALL_SO_LIBS macro
13152         * solib.h (update_solib_list): New function declaration.
13153         (so_list_head): Move macro.
13154         * solist.h (ALL_SO_LIBS): New macro.
13155
13156 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13157
13158         * infcmd.c (post_create_inferior): Remove unused argument in
13159         call to solib_add.
13160         * remote.c (remote_start_remote): Likewise.
13161         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13162         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13163         (enable_break): Likewise.
13164         * solib.c (update_solib_list): Remove unused target argument
13165         and its documentation.
13166         (solib_add): Remove unused target argument.  Remove unused
13167         argument in call to update_solib_list.
13168         (info_sharedlibrary_command): Remove unused argument in call
13169         to update_solib_list.
13170         (sharedlibrary_command): Remove unused argument in call to
13171         solib_add.
13172         (handle_solib_event): Likewise.
13173         (reload_shared_libraries): Likewise.
13174         * solib.h (solib_add): Remove unused target argument.
13175
13176 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13177
13178         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13179         (s390_displaced_step_fixup): Cover relative branches with the
13180         default fixup handling.  This fixes lack of support for some
13181         relative branch instructions.
13182
13183 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13184
13185         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13186         ptid from regcache.
13187
13188 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13189
13190         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13191         i386_darwin_store_inferior_registers): Use ptid from regcache.
13192
13193 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13194
13195         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13196         i386bsd_store_inferior_registers): Use ptid from regcache.
13197
13198 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13199
13200         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13201         hppaobsd_store_registers): Use ptid from regcache.
13202
13203 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13204
13205         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13206         hppanbsd_store_registers): Use ptid from regcache.
13207
13208 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13209
13210         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13211         from regcache.  Use get_ptrace_pid.
13212
13213 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13214
13215         * corelow.c (get_core_register_section): Use ptid from regcache,
13216         update doc.
13217
13218 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13219
13220         * bsd-uthread.c (bsd_uthread_fetch_registers,
13221         bsd_uthread_store_registers): Use ptid from regcache, set and
13222         restore inferior_ptid.
13223
13224 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13225
13226         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13227         fetch_fp_regs, store_register, store_regs, store_fp_register,
13228         store_fp_regs): Use ptid from regcache.
13229
13230 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13231
13232         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13233         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13234         store_vfp_regs): Use ptid from regcache.
13235
13236 2017-03-17  Pedro Alves  <palves@redhat.com>
13237
13238         PR remote/21188
13239         * ser-base.c (ser_base_wait_for): Add comment.
13240         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13241         version.
13242         * ser-unix.c (hardwire_raw): Remove reference to
13243         scb->current_timeout.
13244         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13245         (hardwire_ops): Install ser_base_readchar instead of
13246         hardwire_readchar.
13247         * serial.h (struct serial) <current_timeout, timeout_remaining>:
13248         Remove fields.
13249
13250 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
13251
13252         PR gdb/19637
13253         * python/lib/gdb/printer/bound_registers.py: Add support for
13254         Python 3.
13255
13256 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13257
13258         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13259         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13260         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13261         byte_offset to subobj_byte_offset.  Fix the handling of
13262         DWARF_VALUE_STACK on big-endian targets when coming via an
13263         implicit pointer.
13264         (dwarf2_evaluate_loc_desc): Adjust call to
13265         dwarf2_evaluate_loc_desc_full.
13266         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13267         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13268
13269 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13270
13271         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13272         and REVSH instructions.
13273
13274 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13275
13276         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13277         (arm_record_test): Declare.
13278         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13279         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13280         align with the manual.
13281         (thumb_record_misc): Adjust the code order to align with the
13282         manual.
13283         (thumb2_record_decode_insn_handler): Fix instruction matching.
13284         (instruction_reader_thumb): New class.
13285         (arm_record_test): New function.
13286
13287 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13288
13289         * arm-tdep.c (abstract_memory_reader): New class.
13290         (instruction_reader): New class.
13291         (extract_arm_insn): Add argument 'reader'.  Callers updated.
13292         (decode_insn): Likewise.
13293
13294 2017-03-16  Doug Evans  <dje@google.com>
13295
13296         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13297         member.  Change type of TYPE member to SCM.  All uses updated.
13298         (lsscm_make_lazy_string_smob): Add assert.
13299         (lsscm_make_lazy_string): Flag bad length values.
13300         (lsscm_elt_type): New function.
13301         (gdbscm_lazy_string_to_value): Rewrite to use
13302         lsscm_safe_lazy_string_to_value.
13303         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13304         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13305         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
13306         in incoming type.
13307         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13308         * guile/scm-type.c (tyscm_scm_to_type): New function.
13309
13310 2017-03-15  Doug Evans  <dje@google.com>
13311
13312         PR python/17728, python/18439, python/18779
13313         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13314         member.  Change type of TYPE member to PyObject *.  All uses updated.
13315         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13316         (gdbpy_create_lazy_string_object): Flag bad length values.
13317         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13318         Handle typedefs in incoming type.
13319         (stpy_lazy_string_elt_type): New function.
13320         (gdbpy_extract_lazy_string): Call it.
13321         * python/py-value.c (valpy_lazy_string): Flag bad length values.
13322         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
13323         typedefs in incoming type.
13324
13325 2017-03-16  Doug Evans  <dje@google.com>
13326
13327         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13328         * guile/scm-type.c (tyscm_scm_to_type): New function.
13329
13330 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
13331
13332         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13333         "ULONGEST" for "skip".
13334
13335 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13336
13337         PR gdb/21220
13338         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13339         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13340         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
13341         over ptrace peek/poke until end of buffer or error.
13342
13343 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
13344
13345         * parse.c (length_of_subexp): Make static.
13346         * parser-defs.h (length_of_subexp): Remove.
13347
13348 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13349
13350         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13351         as well.
13352
13353 2017-03-14  Pedro Alves  <palves@redhat.com>
13354
13355         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13356         (main): Use std::unique_ptr.  Remove calls to
13357         cp_demangled_name_parse_free.
13358
13359 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13360
13361         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13362         alphabsd_store_inferior_registers): Use regcache->ptid instead
13363         of inferior_ptid.
13364
13365 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13366
13367         * aix-thread.c (aix_thread_fetch_registers,
13368         aix_thread_store_registers): Use regcache->ptid instead of
13369         inferior_ptid.
13370
13371 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13372
13373         * aarch64-linux-nat.c (fetch_gregs_from_thread,
13374         store_gregs_to_thread, fetch_fpregs_from_thread,
13375         store_fpregs_to_thread): Use regcache->ptid instead of
13376         inferior_ptid.
13377
13378 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13379
13380         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13381         amd64_linux_fetch_inferior_registers): Use regcache->ptid
13382         instead of inferior_ptid.
13383
13384 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13385
13386         * target.c (target_fetch_registers, target_store_registers): Add
13387         assert.
13388
13389 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13390
13391         * regcache.h (regcache_get_ptid): New function.
13392         * regcache.c (regcache_get_ptid): New function.
13393
13394 2017-03-13  Mark Wielaard  <mark@klomp.org>
13395
13396         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13397
13398 2017-03-10  Keith Seitz  <keiths@redhat.com>
13399
13400         PR c++/8218
13401         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13402
13403 2017-03-08  Pedro Alves  <palves@redhat.com>
13404
13405         PR gdb/18360
13406         * infrun.c (start_step_over, do_target_resume, resume)
13407         (restart_threads): Assert we're not resuming a thread that is
13408         meant to be stopped.
13409         (infrun_thread_stop_requested_callback): Delete.
13410         (infrun_thread_stop_requested): If the thread is internally
13411         stopped, queue a pending stop event and clear the thread's
13412         inline-frame state.
13413         (handle_stop_requested): New function.
13414         (handle_syscall_event, handle_inferior_event_1): Use
13415         handle_stop_requested.
13416         (handle_stop_requested): New function.
13417         (handle_signal_stop): Set the thread's stop_signal here instead of
13418         at caller.
13419         (finish_step_over): Clear step over info unconditionally.
13420         (handle_signal_stop): If the user had interrupted the event
13421         thread, consider the stop a random signal.
13422         (handle_signal_stop) <signal arrived while stepping over
13423         breakpoint>: Don't restart threads here.
13424         (stop_waiting): Don't clear step-over info here.
13425
13426 2017-03-08  Pedro Alves  <palves@redhat.com>
13427
13428         PR 21206
13429         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13430         goes to argument 2, not 1.
13431
13432 2017-03-08  Pedro Alves  <palves@redhat.com>
13433
13434         PR cli/21218
13435         * top.c (gdb_readline_wrapper): Avoid passing NULL to
13436         display_gdb_prompt.
13437         (command_line_input): Add comment.
13438
13439 2017-03-08  Pedro Alves  <palves@redhat.com>
13440
13441         PR tui/21216
13442         * tui/tui-file.c (tui_file::write): New.
13443         * tui/tui-file.h (tui_file): Override "write".
13444         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13445         factored out from ...
13446         (tui_puts): ... here.
13447         (tui_putc): Use them.
13448         (tui_write): New function.
13449         * tui/tui-io.h (tui_write): Declare.
13450
13451 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
13452
13453         * Makefile.in (SFILES): Replace "environ.c" with
13454         "common/environ.c".
13455         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13456         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
13457         to...
13458         * common/environ.c: ... here.
13459         * environ.h: Moved to...
13460         * common/environ.h: ... here.
13461
13462 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13463
13464         * gdbarch.sh (pstring_ptr): New static function.
13465         (gdbarch_disassembler_options): Use it.
13466         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13467         not valid_disassembler_option->name.
13468         * gdbarch.c: Regenerate.
13469
13470 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13471
13472         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13473
13474 2017-03-07  Pedro Alves  <palves@redhat.com>
13475
13476         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13477
13478 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13479
13480         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13481         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13482         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13483         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13484
13485 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
13486
13487         * xtensa-linux-nat.c (fetch_gregs): Remove const.
13488
13489 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
13490
13491         * remote.c (remote_add_target_side_commands): Use range-based
13492         for loop.
13493
13494 2017-03-03  Yao Qi  <yao.qi@linaro.org>
13495
13496         PR gdb/21165
13497         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13498         value is lazy.
13499         * valprint.c (common_val_print): Likewise.
13500
13501 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
13502
13503         * NEWS: Mention new set/show disassembler-options commands.
13504         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13505         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13506         (prospective_options): New static variable.
13507         (gdb_disassembler::gdb_disassembler): Initialize
13508         m_di.disassembler_options.
13509         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13510         (get_disassembler_options): New function.
13511         (set_disassembler_options): Likewise.
13512         (set_disassembler_options_sfunc): Likewise.
13513         (show_disassembler_options_sfunc): Likewise.
13514         (disassembler_options_completer): Likewise.
13515         (_initialize_disasm): Likewise.
13516         * disasm.h (get_disassembler_options): New prototype.
13517         (set_disassembler_options): Likewise.
13518         * gdbarch.sh (gdbarch_disassembler_options): New variable.
13519         (gdbarch_verify_disassembler_options): Likewise.
13520         * gdbarch.c: Regenerate.
13521         * gdbarch.h: Likewise.
13522         * arm-tdep.c (num_disassembly_options): Delete.
13523         (set_disassembly_style): Likewise.
13524         (arm_disassembler_options): New static variable.
13525         (set_disassembly_style_sfunc): Convert short style name into long
13526         option name.  Call set_disassembler_options.
13527         (show_disassembly_style_sfunc): New function.
13528         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13529         set_gdbarch_verify_disassembler_options.
13530         (_initialize_arm_tdep): Delete regnames variable and update callers.
13531         (arm_disassembler_options): Initialize.
13532         (disasm_options): New variable.
13533         (num_disassembly_options): Rename from this...
13534         (num_disassembly_styles): ...to this.  Compute by scanning through
13535         disasm_options.
13536         (valid_disassembly_styles): Initialize using disasm_options.
13537         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13538         set_arm_regname_option.
13539         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13540         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13541         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13542         set_gdbarch_verify_disassembler_options.
13543         * s390-tdep.c (s390_disassembler_options): New static variable.
13544         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13545         set_gdbarch_verify_disassembler_options.
13546
13547 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13548
13549         * remote.c (remote_add_target_side_condition): Remove "struct"
13550         keyword from range-based for loop.
13551
13552 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13553
13554         * remote.c (remote_add_target_side_condition): Use range-based
13555         for loop.  Update comment.
13556
13557 2017-02-27  Yao Qi  <yao.qi@linaro.org>
13558
13559         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13560
13561 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
13562
13563         * regcache.c (regcache_raw_update): New function.
13564         (regcache_raw_read): Move code to regcache_raw_update.
13565         * regcache.h (regcache_raw_update): New declaration.
13566         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13567
13568 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
13569
13570         * dwarf2read.c (create_debug_type_hash_table): Initialize
13571         header.signature and header.type_offset_in_tu.
13572
13573 2017-02-24  Pedro Alves  <palves@redhat.com>
13574
13575         * symtab.c (make_file_symbol_completion_list_1): Use
13576         add_symtab_completions.
13577
13578 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13579
13580         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13581
13582 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13583
13584         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13585         I386_MAX_REGISTER_SIZE.
13586         (i386_pseudo_register_write): Likewise.
13587         (i386_process_record): Likewise.
13588         * i387-tdep.c (i387_supply_xsave): Likewise.
13589         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13590         (store_register): Likewise.
13591
13592 2017-02-23  Pedro Alves  <palves@redhat.com>
13593
13594         * ada-lang.c: Include "common/function-view.h".
13595         (ada_iterate_over_symbols): Adjust to use function_view as
13596         callback type.
13597         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13598         (ada_make_symbol_completion_list): Use a lambda.
13599         (ada_exc_search_name_matches): Delete.
13600         (name_matches_regex): New.
13601         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13602         * compile/compile-c-support.c: Include "common/function-view.h".
13603         (print_one_macro): Change prototype to accept a ui_file pointer.
13604         (write_macro_definitions): Use a lambda.
13605         * dwarf2read.c: Include "common/function-view.h".
13606         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13607         (dw2_expand_symtabs_matching): Adjust to use function_view as
13608         callback type.
13609         * language.h: Include "common/function-view.h".
13610         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13611         function_view as callback type.
13612         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13613         * linespec.c: Include "common/function-view.h".
13614         (collect_info::add_symbol): New method.
13615         (struct symbol_and_data_callback, iterate_inline_only, struct
13616         symbol_matcher_data, iterate_name_matcher): Delete.
13617         (iterate_over_all_matching_symtabs): Adjust to use function_view
13618         as callback type and lambdas.
13619         (iterate_over_file_blocks): Adjust to use function_view as
13620         callback type.
13621         (decode_compound_collector): Now a class with private fields.
13622         (decode_compound_collector::release_symbols): New method.
13623         (collect_one_symbol): Rename to...
13624         (decode_compound_collector::operator()): ... this and adjust.
13625         (lookup_prefix_sym): decode_compound_collector construction bits
13626         move to decode_compound_collector ctor.  Pass the
13627         decode_compound_collector object directly as callback.  Remove
13628         cleanups and use decode_compound_collector::release_symbols
13629         instead.
13630         (symtab_collector): Now a class with private fields.
13631         (symtab_collector::release_symtabs): New method.
13632         (add_symtabs_to_list): Rename to...
13633         (symtab_collector::operator()): ... this and adjust.
13634         (collect_symtabs_from_filename): symtab_collector construction
13635         bits move to symtab_collector ctor.  Pass the symtab_collector
13636         object directly as callback.  Remove cleanups and use
13637         symtab_collector::release_symtabs instead.
13638         (collect_symbols): Delete.
13639         (add_matching_symbols_to_info): Use lambdas.
13640         * macrocmd.c (print_macro_callback): Delete.
13641         (info_macro_command): Use a lambda.
13642         (info_macros_command): Pass print_macro_definition as callable
13643         directly.
13644         (print_one_macro): Remove 'ignore' parameter.
13645         (macro_list_command): Adjust.
13646         * macrotab.c (macro_for_each_data::fn): Now a function_view.
13647         (macro_for_each_data::user_data): Delete field.
13648         (foreach_macro): Adjust to call the function_view.
13649         (macro_for_each): Adjust to use function_view as callback type.
13650         (foreach_macro_in_scope): Adjust to call the function_view.
13651         (macro_for_each_in_scope): Adjust to use function_view as callback
13652         type.
13653         * macrotab.h: Include "common/function-view.h".
13654         (macro_callback_fn): Declare a prototype instead of a pointer.
13655         Remove "user_data" parameter.
13656         (macro_for_each, macro_for_each_in_scope): Adjust to use
13657         function_view as callback type.
13658         * psymtab.c (partial_map_expand_apply)
13659         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13660         Adjust to use function_view as callback type and to return bool.
13661         (psym_expand_symtabs_matching): Adjust to use function_view as
13662         callback types.
13663         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13664         to use function_view as callback type and to return bool.
13665         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13666         callback types.
13667         * symfile.c (expand_symtabs_matching): Adjust to use function_view
13668         as callback types.
13669         * symfile.h: Include "common/function-view.h".
13670         (expand_symtabs_file_matcher_ftype)
13671         (expand_symtabs_symbol_matcher_ftype)
13672         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13673         return bool.
13674         (quick_symbol_functions::map_symtabs_matching_filename)
13675         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13676         function_view as callback type and return bool.
13677         (expand_symtabs_matching): Adjust to use function_view as callback
13678         type.
13679         (maintenance_expand_name_matcher)
13680         (maintenance_expand_file_matcher): Delete.
13681         (maintenance_expand_symtabs): Use lambdas.
13682         * symtab.c (iterate_over_some_symtabs): Adjust to use
13683         function_view as callback types and return bool.
13684         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
13685         of a cleanup.
13686         (lookup_symtab_callback): Delete.
13687         (lookup_symtab): Use a lambda.
13688         (iterate_over_symbols): Adjust to use function_view as callback
13689         type.
13690         (struct search_symbols_data, search_symbols_file_matches)
13691         (search_symbols_name_matches): Delete.
13692         (search_symbols): Use a pair of lambdas.
13693         (struct add_name_data, add_macro_name, symbol_completion_matcher)
13694         (symtab_expansion_callback): Delete.
13695         (default_make_symbol_completion_list_break_on_1): Use lambdas.
13696         * symtab.h: Include "common/function-view.h".
13697         (iterate_over_some_symtabs): Adjust to use function_view as
13698         callback type and return bool.
13699         (iterate_over_symtabs): Adjust to use function_view as callback
13700         type.
13701         (symbol_found_callback_ftype): Remove 'data' parameter and return
13702         bool.
13703         (iterate_over_symbols): Adjust to use function_view as callback
13704         type.
13705
13706 2017-02-23  Pedro Alves  <palves@redhat.com>
13707
13708         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
13709         (%.o) <unittests/%.c>: New pattern.
13710         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
13711         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
13712         * common/function-view.h: New file.
13713         * unittests/function-view-selftests.c: New file.
13714         * configure: Regenerate.
13715
13716 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
13717
13718         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
13719         inferior_ptid.
13720         * go32-nat.c (go32_thread_alive): Likewise.
13721
13722 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13723
13724         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
13725         delete.
13726
13727 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13728
13729         * varobj.c (varobj_clear_saved_item): Use delete instead of
13730         xfree.
13731         (update_dynamic_varobj_children): Likewise.
13732
13733 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13734
13735         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
13736
13737 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
13738
13739         * common/enum-flags.h (enum_flags::enum_flags): Initialize
13740         m_enum_value to 0 in default constructor.
13741
13742 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
13743
13744         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
13745         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
13746         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
13747         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
13748         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
13749         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
13750         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
13751         IS_STORE_CONDITIONAL_INSN.
13752
13753 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13754
13755         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
13756
13757 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13758
13759         * NEWS (Changes since GDB 7.12): Add DWARF-5.
13760
13761 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13762
13763         * dwarf2read.c (skip_one_die, read_attribute_value)
13764         (dwarf2_const_value_attr, dump_die_shallow)
13765         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
13766         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
13767
13768 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13769
13770         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
13771         (dwarf_parse_macro_header): Accept DWARF version 5.
13772         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
13773
13774 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13775
13776         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
13777         DW_AT_GNU_*.
13778         * common/common-exceptions.h (enum errors): Likewise.
13779         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
13780         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
13781         (dwarf_expr_context::execute_stack_op): Likewise.
13782         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
13783         Likewise.
13784         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
13785         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
13786         (show_entry_values_debug, call_site_to_target_addr)
13787         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
13788         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
13789         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
13790         (value_of_dwarf_block_entry, indirect_pieced_value)
13791         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
13792         (disassemble_dwarf_expression): Likewise.
13793         * dwarf2read.c (process_die, inherit_abstract_dies)
13794         (read_call_site_scope): Likewise.
13795         * gdbtypes.h (struct func_type, struct call_site_parameter)
13796         (struct call_site): Likewise.
13797         * stack.c (read_frame_arg): Likewise.
13798         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
13799
13800 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13801
13802         * defs.h (read_unsigned_leb128): New declaration.
13803         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
13804         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
13805         (dwarf2_find_location_expression): Call also
13806         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
13807         * dwarf2loc.h (dwarf2_version): New declaration.
13808         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
13809         rnglists.
13810         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
13811         .debug_rnglists.
13812         (struct dwop_section_names): Add loclists_dwo.
13813         (dwop_section_names): Add .debug_loclists.dwo.
13814         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
13815         (struct dwarf2_per_cu_data): Add dwarf_version.
13816         (struct dwo_sections): Add loclists.
13817         (struct attr_abbrev): Add implicit_const.
13818         (read_indirect_line_string): New declaration.
13819         (read_unsigned_leb128): Delete declaration.
13820         (rcuh_kind): New definition.
13821         (read_and_check_comp_unit_head): Change parameter
13822         is_debug_types_section to section_kind.
13823         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
13824         (read_comp_unit_head): Change parameter abfd to section, add parameter
13825         section_kind.  Handle DWARF-5.
13826         (error_check_comp_unit_head): Accept also DWARF version 5.
13827         (read_and_check_comp_unit_head): Change parameter
13828         is_debug_types_section to section_kind.
13829         (read_and_check_type_unit_head): Delete function.
13830         (read_abbrev_offset): Handle DWARF-5.
13831         (create_debug_type_hash_table): Add parameter section_kind.  Process
13832         only DW_UT_type.  Use signature and type_offset_in_tu from struct
13833         comp_unit_head.
13834         (create_debug_types_hash_table): Update create_debug_type_hash_table
13835         caller.
13836         (create_all_type_units): Call create_debug_type_hash_table.
13837         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
13838         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13839         caller.
13840         (skip_one_die): Handle DW_FORM_implicit_const.
13841         (dwarf2_rnglists_process): New function.
13842         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13843         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13844         (read_attribute_value): Handle DW_FORM_implicit_const,
13845         DW_FORM_line_strp.
13846         (read_attribute): Handle DW_FORM_implicit_const.
13847         (read_indirect_string_at_offset_from): New function from
13848         read_indirect_string_at_offset.
13849         (read_indirect_string_at_offset): Call
13850         read_indirect_string_at_offset_from.
13851         (read_indirect_line_string_at_offset): New function.
13852         (read_indirect_string): New function comment.
13853         (read_indirect_line_string): New function.
13854         (read_unsigned_leb128): Make it global.
13855         (dwarf2_string_attr): Handle DWARF-5.
13856         (add_include_dir_stub, read_formatted_entries): New functions.
13857         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
13858         Handle DWARF-5.
13859         (per_cu_header_read_in): Update read_comp_unit_head caller.
13860         (dwarf2_version): New function.
13861         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
13862         rnglists.
13863         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
13864         fields.
13865
13866 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13867
13868         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
13869
13870 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13871
13872         * dwarf2read.c (dwarf2_ranges_process): New function from
13873         dwarf2_ranges_read.
13874         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
13875         dwarf2_ranges_process.
13876
13877 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13878
13879         * dwarf2read.c (create_debug_type_hash_table): New function from
13880         create_debug_types_hash_table.
13881         (create_debug_types_hash_table): Call create_debug_type_hash_table.
13882         (create_all_type_units, open_and_init_dwo_file): Update
13883         create_debug_types_hash_table callers.
13884
13885 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13886
13887         PR gdb/16188
13888         * fork-child.c (trace_start_error): Fix thinko.  va_end should
13889         refer to 'ap', not 'args'.
13890
13891 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13892             Pedro Alves  <palves@redhat.com>
13893
13894         PR gdb/16188
13895         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
13896         calls succeeded.
13897         * fork-child.c (trace_start_error): New function.
13898         (trace_start_error_with_name): Likewise.
13899         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
13900         * inf-ptrace.c (inf_ptrace_me): Likewise.
13901         * inferior.h (trace_start_error): New prototype.
13902         (trace_start_error_with_name): Likewise.
13903
13904 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
13905
13906         PR gdb/21164
13907         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
13908         NULL before using it.
13909         * symmisc.c (maintenance_print_symbols): Likewise.
13910         (maintenance_print_msymbols): Likewise.
13911
13912 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13913
13914         * NEWS: Add record Python bindings entry.
13915
13916 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13917
13918         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
13919         py-record-full.o.
13920         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
13921         * python/py-record-btrace.c, python/py-record-btrace.h,
13922         python/py-record-full.c, python/py-record-full.h: New file.
13923         * python/py-record.c: Add include for py-record-btrace.h and
13924         py-record-full.h.
13925         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
13926         recpy_instruction_history, recpy_function_call_history, recpy_begin,
13927         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
13928         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
13929         New definition.
13930         (gdbpy_initialize_btrace): New export.
13931         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
13932
13933 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13934
13935         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
13936         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
13937         * python/py-record.c: New file.
13938         * python/python-internal.h (gdbpy_start_recording,
13939         gdbpy_current_recording, gdpy_stop_recording,
13940         gdbpy_initialize_record): New export.
13941         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
13942         (python_GdbMethods): Add gdbpy_start_recording,
13943         gdbpy_current_recording and gdbpy_stop_recording.
13944
13945 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13946
13947         * record-btrace.c (record_btrace_record_method): New function.
13948         (init_record_btrace_ops): Initialize to_record_method.
13949         * record-full.c (record_full_record_method): New function.
13950         (init_record_full_ops, init_record_full_core_ops): Add
13951         record_full_record_method.
13952         * record.h (enum record_method): New enum.
13953         * target-debug.h (target_debug_print_enum_record_method: New define.
13954         * target-delegates.c: Regenerate.
13955         * target.c (target_record_method): New function.
13956         * target.h: Include record.h.
13957         (struct target_ops) <to_record_method>: New field.
13958         (target_record_method): New export.
13959
13960 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13961
13962         * record.h (record_start, record_stop): New export.
13963         * record.c (record_start, record_stop): New function.
13964
13965 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13966
13967         * btrace.c (btrace_fetch): Copy function call segments pointer
13968         into a vector.
13969         (btrace_clear): Clear the vector.
13970         (btrace_find_insn_by_number): Use binary search to find the correct
13971         function call segment.
13972         * btrace.h (brace_fun_p): New typedef.
13973         (struct btrace_thread_info) <functions>: New field.
13974
13975 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13976
13977         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
13978         * btrace.c (btrace_decode_error): ... here.  New function.
13979         * btrace.h (btrace_decode_error): New export.
13980
13981 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13982
13983         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
13984         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
13985         btrace_find_insn_by_number): Remove special case for gaps.
13986         * btrace.h (btrace_insn_get_error): New export.
13987         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
13988         * record-btrace.c (btrace_insn_history): Print number for gaps.
13989         (record_btrace_info, record_btrace_goto): Handle gaps.
13990
13991 2017-02-14  Tom Tromey  <tom@tromey.com>
13992
13993         PR python/13598:
13994         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
13995         event.
13996         * python/py-evts.c (gdbpy_initialize_py_events): Add
13997         before_prompt registry.
13998         * python/py-events.h (events_object) <before_prompt>: New field.
13999
14000 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
14001
14002         * btrace.c (ftrace_new_switch): Preserve up link and flags.
14003
14004 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
14005
14006         * symfile (_initialize_symfile): Add usage text to the load command's
14007         help text.
14008
14009 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
14010
14011         * utils.c (defaulted_query): Don't query on secondary UIs.
14012
14013 2017-02-10  Tom Tromey  <tom@tromey.com>
14014
14015         * rust-lang.c (rust_get_disr_info): Remove unused variable.
14016
14017 2017-02-10  Tom Tromey  <tom@tromey.com>
14018
14019         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14020         "cleanup" local.
14021         * python/py-type.c (typy_legacy_template_argument): Remove
14022         unnecessary "cleanup" local.
14023
14024 2017-02-10  Tom Tromey  <tom@tromey.com>
14025
14026         * python/python.c (do_start_initialization): New function, from
14027         _initialize_python.
14028         (_initialize_python): Call do_start_initialization.
14029         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14030         goto.
14031
14032 2017-02-10  Tom Tromey  <tom@tromey.com>
14033
14034         * python/py-prettyprint.c (pretty_print_one_value): Use
14035         gdbpy_ref.
14036
14037 2017-02-10  Tom Tromey  <tom@tromey.com>
14038
14039         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14040         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14041         gdbpy_ref.
14042         * python/py-type.c (field_new): Use gdbpy_ref.
14043         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14044         gdbpy_ref.
14045         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14046         (py_free_pspace): Likewise.
14047         (pspace_to_pspace_object): Likewise.
14048         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14049         (py_free_objfile): Likewise.
14050         (objfile_to_objfile_object): Likewise.
14051         * python/py-inferior.c (delete_thread_object): Use
14052         gdbpy_ref.
14053         (infpy_read_memory): Likewise.
14054         (py_free_inferior): Likewise.
14055         * python/py-evtregistry.c (create_eventregistry_object): Use
14056         gdbpy_ref.
14057         * python/py-event.c (create_event_object): Use gdbpy_ref.
14058
14059 2017-02-10  Tom Tromey  <tom@tromey.com>
14060
14061         * python/py-ref.h (gdbpy_ref_policy): Now a template.
14062         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14063         used.
14064         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14065         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14066         python/py-exitedevent.c, python/py-finishbreakpoint.c,
14067         python/py-framefilter.c, python/py-function.c,
14068         python/py-inferior.c, python/py-infevents.c,
14069         python/py-linetable.c, python/py-newobjfileevent.c,
14070         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14071         python/py-signalevent.c, python/py-stopevent.c,
14072         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14073         python/py-unwind.c, python/py-utils.c, python/py-value.c,
14074         python/py-varobj.c, python/py-xmethods.c, python/python.c,
14075         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14076
14077 2017-02-10  Tom Tromey  <tom@tromey.com>
14078
14079         * ui-out.h (ui_out_emit_type): New class.
14080         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14081         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14082         and ui_out_emit_tuple.
14083         (enumerate_locals): Likewise.
14084         (py_mi_print_variables, py_print_locals, py_print_args): Use
14085         ui_out_emit_list.
14086         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14087         ui_out_emit_list.
14088         * common/gdb_optional.h: New file.
14089
14090 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14091
14092         * MAINTAINERS (Write After Approval): Update my e-mail address.
14093
14094 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14095
14096         PR gdb/21122
14097         * breakpoint.c (_initialize_breakpoint): Update the help description
14098         of the 'commands' command to indicate that it takes a list argument.
14099
14100 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
14101
14102         * interps.c (current_interp_set_logging): Remove "return".
14103
14104 2017-02-09  Gary Benson  <gbenson@redhat.com>
14105
14106         * symtab.c (add_symtab_completions): Prevent NULL pointer
14107         dereference.
14108
14109 2017-02-08  Pedro Alves  <palves@redhat.com>
14110
14111         * interps.c (interp::interp): Remove reference to quiet_p.
14112         (interp_set): Make static.  Remove dead "Switching to" output
14113         code.
14114         (interp_quiet_p, interp_set_quiet): Delete.
14115         (interpreter_exec_cmd): Don't set the interpreter quiet.
14116         * interps.h (interp_quiet_p): Make static.
14117         (class interp) <quiet_p>: Remove field
14118
14119 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14120
14121         * cli/cli-decode.c (find_command_name_length): Make it extern.
14122         * cli/cli-decode.h (find_command_name_length): Declare.
14123         * cli/cli-script.c (command_name_equals, line_first_arg):
14124         New functions.
14125         (process_next_line): Use cli-decode to parse command names.
14126         (build_command_line): Make args a constant pointer.
14127
14128 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14129
14130         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14131         Remove case-insensitive search.
14132
14133 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
14134
14135         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14136         at the end of the line.  Avoids an ARI warning.
14137
14138 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
14139
14140         * NEWS: Mention support for record/replay of Intel 64 rdrand and
14141         rdseed instructions.
14142         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14143
14144 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
14145
14146         PR tdep/20936
14147         Provide and use sparc32 and sparc64 target description XML files.
14148         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14149         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14150         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14151         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14152         * features/sparc/sparc32-solaris.xml: New file.
14153         * features/sparc/sparc64-solaris.xml: New file.
14154         * features/sparc/sparc32-solaris.c: Generated.
14155         * features/sparc/sparc64-solaris.c: Generated.
14156         * sparc-tdep.h: Account for differences in target descriptions.
14157         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14158         (sparc32_register_type): Use target provided registers.
14159         (validate_tdesc_registers): New function.
14160         (sparc32_gdbarch_init): Use tdesc_has_registers.
14161         Set pseudoregister functions.
14162         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14163         (sparc64_register_type): Use target provided registers.
14164         (sparc64_init_abi): Set pseudoregister functions.
14165
14166 2017-02-03  Tom Tromey  <tom@tromey.com>
14167
14168         PR rust/21097:
14169         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14170         with a single member.
14171
14172 2017-02-03  Pedro Alves  <palves@redhat.com>
14173
14174         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14175         (cli_interp_base::~cli_interp_base): New.
14176         (cli_interp): New struct.
14177         (as_cli_interp): Cast the interp itself to cli_interp.
14178         (cli_interpreter_pre_command_loop): Rename to ...
14179         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
14180         parameter.
14181         (cli_interpreter_init): Rename to ...
14182         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
14183         boolean.  Make extern.
14184         (cli_interpreter_resume): Rename to ...
14185         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
14186         extern.
14187         (cli_interpreter_suspend): Rename to ...
14188         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
14189         extern.
14190         (cli_interpreter_exec): Rename to ...
14191         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
14192         extern.
14193         (cli_interpreter_supports_command_editing): Rename to ...
14194         (cli_interp_base::supports_command_editing): ... this.  Remove
14195         'interp' parameter.  Make extern.
14196         (cli_ui_out): Rename to ...
14197         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
14198         Make extern.
14199         (cli_set_logging): Rename to ...
14200         (cli_interp_base::set_logging): ... this.  Remove 'interp'
14201         parameter.  Make extern.
14202         (cli_interp_procs): Delete.
14203         (cli_interp_factory): Adjust to use "new".
14204         * cli/cli-interp.h: Include "interps.h".
14205         (struct cli_interp_base): New struct.
14206         * interps.c (struct interp): Delete.  Fields moved to interps.h.
14207         (interp_new): Delete.
14208         (interp::interp, interp::~interp): New.
14209         (interp_set): Use bool, and return void.  Assume the interpreter
14210         has suspend, init and resume methods, and that the all return
14211         void.
14212         (set_top_level_interpreter): interp_set returns void.
14213         (interp_ui_out): Adapt.
14214         (current_interp_set_logging): Adapt.
14215         (interp_data): Delete.
14216         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14217         (interp_exec): Adapt.
14218         (top_level_interpreter_data): Delete.
14219         * interps.h (interp_init_ftype, interp_resume_ftype)
14220         (interp_suspend_ftype, interp_exec_ftype)
14221         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14222         (class interp): New.
14223         (interp_new): Delete.
14224         (interp_set): Now returns void.  Use bool.
14225         (interp_data, top_level_interpreter_data): Delete.
14226         * mi/mi-common.h: Include interps.h.
14227         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
14228         init, resume, suspect, exec, interp_ui_out, set_logging and
14229         pre_command_loop methods.
14230         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14231         (mi_interpreter_init): Rename to ...
14232         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
14233         bool, return void and make extern.  Adjust.
14234         (mi_interpreter_resume): ... Rename to ...
14235         (mi_interp::resume): ... this.  Remove the 'data' parameter,
14236         return void and make extern.  Adjust.
14237         (mi_interpreter_suspend): ... Rename to ...
14238         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
14239         return void and make extern.  Adjust.
14240         (mi_interpreter_exec): ... Rename to ...
14241         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
14242         extern.  Adjust.
14243         (mi_interpreter_pre_command_loop): ... Rename to ...
14244         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
14245         parameter and make extern.
14246         (mi_on_normal_stop_1): Adjust.
14247         (mi_ui_out): Rename to ...
14248         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
14249         parameter and make extern.  Adjust.
14250         (mi_set_logging): Rename to ...
14251         (mi_interp::set_logging): ... this.  Remove the 'interp'
14252         parameter and make extern.  Adjust.
14253         (mi_interp_procs): Delete.
14254         (mi_interp_factory): Adjust to use 'new'.
14255         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14256         (mi_print_exception, mi_execute_command, mi_load_progress):
14257         Adjust.
14258         * tui/tui-interp.c (tui_interp): New class.
14259         (as_tui_interp): Return a tui_interp pointer.
14260         (tui_on_normal_stop, tui_on_signal_received)
14261         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14262         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14263         to use interp::interp_ui_out.
14264         (tui_init): Rename to ...
14265         (tui_interp::init): ... this.  Remove the 'self' parameter, use
14266         bool, return void and make extern.  Adjust.
14267         (tui_resume): Rename to ...
14268         (tui_interp::resume): ... this.  Remove the 'data' parameter,
14269         return void and make extern.  Adjust.
14270         (tui_suspend): Rename to ...
14271         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
14272         return void and make extern.  Adjust.
14273         (tui_ui_out): Rename to ...
14274         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
14275         parameter, and make extern.  Adjust.
14276         (tui_exec): Rename to ...
14277         (tui_interp::exec): ... this.  Remove the 'data' parameter and
14278         make extern.
14279         (tui_interp_procs): Delete.
14280         (tui_interp_factory): Use "new".
14281
14282 2017-02-02  Tom Tromey  <tom@tromey.com>
14283
14284         * rust-exp.y (ends_raw_string, space_then_number)
14285         (rust_identifier_start_p): Return bool.
14286         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14287         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14288         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14289         (rust_chartype_p): Return bool.
14290         (val_print_struct, rust_print_struct_def, rust_print_type):
14291         Update.
14292         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14293         Return bool.
14294
14295 2017-02-02  Tom Tromey  <tom@tromey.com>
14296
14297         * rust-lang.c: Reindent.
14298
14299 2017-02-02  Tom Tromey  <tom@tromey.com>
14300
14301         * rust-lang.h (rust_crate_for_block): Update.
14302         * rust-lang.c (rust_crate_for_block): Return std::string.
14303         (rust_get_disr_info): Use std:;string, not
14304         gdb::unique_xmalloc_ptr.
14305         * rust-exp.y (crate_name): Update.
14306
14307 2017-02-02  Pedro Alves  <palves@redhat.com>
14308
14309         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14310         field out of gdb_disassembler_test and make it static.
14311
14312 2017-02-02  Pedro Alves  <palves@redhat.com>
14313
14314         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14315         mi1_interp and mi_interp fields.
14316
14317 2017-02-02  Pedro Alves  <palves@redhat.com>
14318
14319         * cli/cli-interp.c (struct saved_output_files, saved_output):
14320         Moved from cli/cli-logging.c.
14321         (cli_set_logging): New function.
14322         (cli_interp_procs): Install cli_set_logging.
14323         * cli/cli-interp.h (make_logging_output, cli_set_logging):
14324         Declare.
14325         * cli/cli-logging.c (struct saved_output_files, saved_output):
14326         Moved to cli/cli-interp.c.
14327         (pop_output_files): Don't save outputs here.
14328         (make_logging_output): New function.
14329         (handle_redirections): Don't build tee nor save previous outputs
14330         here.
14331         * interps.c (current_interp_set_logging): Change prototype.
14332         Assume there's always a set_logging_proc method installed.
14333         * interps.h (interp_set_logging_ftype): Change prototype.
14334         (current_interp_set_logging): Change prototype and adjust comment.
14335         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
14336         use make_logging_output.
14337         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14338 2017-02-02  Pedro Alves  <palves@redhat.com>
14339
14340         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14341         from ...
14342         (set_logging_overwrite): ... here.
14343         (logging_no_redirect_file): Delete.
14344         (set_logging_redirect): Don't handle redirection on the fly.
14345         Instead warn that "logging off" / "logging on" is necessary.
14346         (pop_output_files): Delete references to logging_no_redirect_file.
14347         (show_logging_command): Always speak in terms of what will happen
14348         once logging is reenabled.
14349
14350 2017-02-02  Pedro Alves  <palves@redhat.com>
14351
14352         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14353
14354 2017-02-02  Pedro Alves  <palves@redhat.com>
14355
14356         * disasm.c (gdb_pretty_print_insn): Rename to ...
14357         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14358         Remove gdbarch parameter.  Adapt to clear the object's buffers
14359         instead of allocating new buffers, and to print using the object's
14360         gdb_disassembler instead of calling gdb_print_insn.
14361         (dump_insns): Use gdb_pretty_print_disassembler.
14362         * disasm.h (gdb_pretty_print_insn): Delete declaration.
14363         (gdb_pretty_print_disassembler): New class.
14364         * record-btrace.c (btrace_insn_history): Use
14365         gdb_pretty_print_disassembler.
14366
14367 2017-02-02  Pedro Alves  <palves@redhat.com>
14368
14369         * ada-lang.c (type_as_string): Use string_file.
14370         * ada-valprint.c (ada_print_floating): Use string_file.
14371         * ada-varobj.c (ada_varobj_scalar_image)
14372         (ada_varobj_get_value_image): Use string_file.
14373         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14374         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14375         * breakpoint.c (update_inserted_breakpoint_locations)
14376         (insert_breakpoint_locations, reattach_breakpoints)
14377         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14378         (print_it_watchpoint): Use string_file.
14379         (save_breakpoints): Use stdio_file.
14380         * c-exp.y (oper): Use string_file.
14381         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14382         tee_file.
14383         (pop_output_files): Use delete.
14384         (handle_redirections): Use stdio_file and tee_file.
14385         * cli/cli-setshow.c (do_show_command): Use string_file.
14386         * compile/compile-c-support.c (c_compute_program): Use
14387         string_file.
14388         * compile/compile-c-symbols.c (generate_vla_size): Take a
14389         'string_file &' instead of a 'ui_file *'.
14390         (generate_c_for_for_one_variable): Take a 'string_file &' instead
14391         of a 'ui_file *'.  Use string_file.
14392         (generate_c_for_variable_locations): Take a 'string_file &'
14393         instead of a 'ui_file *'.
14394         * compile/compile-internal.h (generate_c_for_for_one_variable):
14395         Take a 'string_file &' instead of a 'ui_file *'.
14396         * compile/compile-loc2c.c (push, pushf, unary, binary)
14397         (print_label, pushf_register_address, pushf_register)
14398         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14399         'ui_file *'.  Adjust.
14400         * compile/compile.c (compile_to_object): Use string_file.
14401         * compile/compile.h (compile_dwarf_expr_to_c)
14402         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14403         'ui_file *'.
14404         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14405         (replace_typedefs_qualified_name): Use string_file and
14406         obstack_copy0.
14407         * disasm.c (gdb_pretty_print_insn): Use string_file.
14408         (gdb_disassembly): Adjust reference the null_stream global.
14409         (do_ui_file_delete): Delete.
14410         (gdb_insn_length): Use null_stream.
14411         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14412         * dwarf2loc.c (dwarf2_compile_property_to_c)
14413         (locexpr_generate_c_location, loclist_generate_c_location): Take a
14414         'string_file &' instead of a 'ui_file *'.
14415         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14416         * dwarf2read.c (do_ui_file_peek_last): Delete.
14417         (dwarf2_compute_name): Use string_file.
14418         * event-top.c (gdb_setup_readline): Use stdio_file.
14419         * gdbarch.sh (verify_gdbarch): Use string_file.
14420         * gdbtypes.c (safe_parse_type): Use null_stream.
14421         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14422         string_file.
14423         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14424         'string_file *' instead of a 'ui_file *'.
14425         (gdbscm_arch_disassemble): Use string_file.
14426         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14427         * guile/scm-ports.c (class ioscm_file_port): Now a class that
14428         inherits from ui_file.
14429         (ioscm_file_port_delete, ioscm_file_port_rewind)
14430         (ioscm_file_port_put): Delete.
14431         (ioscm_file_port_write): Rename to ...
14432         (ioscm_file_port::write): ... this.  Remove file_port_magic
14433         checks.
14434         (ioscm_file_port_new): Delete.
14435         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14436         ui_file_up.
14437         * guile/scm-type.c (tyscm_type_name): Use string_file.
14438         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14439         Use string_file.
14440         * infcmd.c (print_return_value_1): Use string_file.
14441         * infrun.c (print_target_wait_results): Use string_file.
14442         * language.c (add_language): Use string_file.
14443         * location.c (explicit_to_string_internal): Use string_file.
14444         * main.c (captured_main_1): Use null_file.
14445         * maint.c (maintenance_print_architecture): Use stdio_file.
14446         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14447         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14448         event_channel>: Change type to mi_console_file pointer.
14449         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14450         (mi_console_file_delete): Delete.
14451         (struct mi_console_file): Delete.
14452         (mi_console_file_magic): Delete.
14453         (mi_console_file_new): Delete.
14454         (mi_console_file::mi_console_file): New.
14455         (mi_console_file_delete): Delete.
14456         (mi_console_file_fputs): Delete.
14457         (mi_console_file::write): New.
14458         (mi_console_raw_packet): Delete.
14459         (mi_console_file::flush): New.
14460         (mi_console_file_flush): Delete.
14461         (mi_console_set_raw): Rename to ...
14462         (mi_console_file::set_raw): ... this.
14463         * mi/mi-console.h (class mi_console_file): New class.
14464         (mi_console_file_new, mi_console_set_raw): Delete.
14465         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14466         (mi_set_logging): Use delete and tee_file.  Adjust.
14467         * mi/mi-main.c (output_register): Use string_file.
14468         (mi_cmd_data_evaluate_expression): Use string_file.
14469         (mi_cmd_data_read_memory): Use string_file.
14470         (mi_cmd_execute, print_variable_or_computed): Use string_file.
14471         * mi/mi-out.c (mi_ui_out::main_stream): New.
14472         (mi_ui_out::rewind): Use main_stream and
14473         string_file.
14474         (mi_ui_out::put): Use main_stream and string_file.
14475         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14476         Allocate a 'string_file' instead.
14477         (mi_out_new): Don't allocate a mem_fileopen stream here.
14478         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14479         (mi_ui_out::main_stream): Declare method.
14480         * printcmd.c (eval_command): Use string_file.
14481         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14482         * python/py-arch.c (archpy_disassemble): Use string_file.
14483         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14484         * python/py-frame.c (frapy_str): Use string_file.
14485         * python/py-framefilter.c (py_print_type, py_print_single_arg):
14486         Use string_file.
14487         * python/py-type.c (typy_str): Use string_file.
14488         * python/py-unwind.c (unwind_infopy_str): Use string_file.
14489         * python/py-value.c (valpy_str): Use string_file.
14490         * record-btrace.c (btrace_insn_history): Use string_file.
14491         * regcache.c (regcache_print): Use stdio_file.
14492         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14493         * remote.c (escape_buffer): Use string_file.
14494         * rust-lang.c (rust_get_disr_info): Use string_file.
14495         * serial.c (serial_open_ops_1): Use stdio_file.
14496         (do_serial_close): Use delete.
14497         * stack.c (print_frame_arg): Use string_file.
14498         (print_frame_args): Remove local mem_fileopen stream, not used.
14499         (print_frame): Use string_file.
14500         * symmisc.c (maintenance_print_symbols): Use stdio_file.
14501         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14502         Take a 'string_file *' instead of a 'ui_file *'.
14503         * top.c (new_ui): Use stdio_file and stderr_file.
14504         (free_ui): Use delete.
14505         (execute_command_to_string): Use string_file.
14506         (quit_confirm): Use string_file.
14507         * tracepoint.c (collection_list::append_exp): Use string_file.
14508         * tui/tui-disasm.c (tui_disassemble): Use string_file.
14509         * tui/tui-file.c: Don't include "ui-file.h".
14510         (enum streamtype, struct tui_stream): Delete.
14511         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14512         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14513         (tui_file::tui_file): New method.
14514         (tui_file_fputs): Delete.
14515         (tui_file_get_strbuf): Delete.
14516         (tui_file::puts): New method.
14517         (tui_file_adjust_strbuf): Delete.
14518         (tui_file_flush): Delete.
14519         (tui_file::flush): New method.
14520         * tui/tui-file.h: Tweak intro comment.
14521         Include ui-file.h.
14522         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14523         (tui_file_adjust_strbuf): Delete declarations.
14524         (class tui_file): New class.
14525         * tui/tui-io.c (tui_initialize_io): Use tui_file.
14526         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14527         (tui_register_format): Use string_stream.
14528         * tui/tui-stack.c (tui_make_status_line): Use string_file.
14529         (tui_get_function_from_frame): Use string_file.
14530         * typeprint.c (type_to_string): Use string_file.
14531         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14532         (null_stream): New global.
14533         (ui_file_delete): Delete.
14534         (ui_file::ui_file): New.
14535         (null_file_isatty): Delete.
14536         (ui_file::~ui_file): New.
14537         (null_file_rewind): Delete.
14538         (ui_file::printf): New.
14539         (null_file_put): Delete.
14540         (null_file_flush): Delete.
14541         (ui_file::putstr): New.
14542         (null_file_write): Delete.
14543         (ui_file::putstrn): New.
14544         (null_file_read): Delete.
14545         (ui_file::putc): New.
14546         (null_file_fputs): Delete.
14547         (null_file_write_async_safe): Delete.
14548         (ui_file::vprintf): New.
14549         (null_file_delete): Delete.
14550         (null_file::write): New.
14551         (null_file_fseek): Delete.
14552         (null_file::puts): New.
14553         (ui_file_data): Delete.
14554         (null_file::write_async_safe): New.
14555         (gdb_flush, ui_file_isatty): Adjust.
14556         (ui_file_put, ui_file_rewind): Delete.
14557         (ui_file_write): Adjust.
14558         (ui_file_write_for_put): Delete.
14559         (ui_file_write_async_safe, ui_file_read): Adjust.
14560         (ui_file_fseek): Delete.
14561         (fputs_unfiltered): Adjust.
14562         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14563         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14564         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14565         (set_ui_file_data): Delete.
14566         (string_file::~string_file, string_file::write)
14567         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14568         (do_ui_file_as_string, ui_file_as_string): Delete.
14569         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14570         (struct mem_file): Delete.
14571         (mem_file_new): Delete.
14572         (stdio_file::stdio_file): New.
14573         (mem_file_delete): Delete.
14574         (stdio_file::stdio_file): New.
14575         (mem_fileopen): Delete.
14576         (stdio_file::~stdio_file): New.
14577         (mem_file_rewind): Delete.
14578         (stdio_file::set_stream): New.
14579         (mem_file_put): Delete.
14580         (stdio_file::open): New.
14581         (mem_file_write): Delete.
14582         (stdio_file_magic, struct stdio_file): Delete.
14583         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14584         (stdio_file::flush): New.
14585         (stdio_file_read): Rename to ...
14586         (stdio_file::read): ... this.  Adjust.
14587         (stdio_file_write): Rename to ...
14588         (stdio_file::write): ... this.  Adjust.
14589         (stdio_file_write_async_safe): Rename to ...
14590         (stdio_file::write_async_safe) ... this.  Adjust.
14591         (stdio_file_fputs): Rename to ...
14592         (stdio_file::puts) ... this.  Adjust.
14593         (stdio_file_isatty): Delete.
14594         (stdio_file_fseek): Delete.
14595         (stdio_file::isatty): New.
14596         (stderr_file_write): Rename to ...
14597         (stderr_file::write) ... this.  Adjust.
14598         (stderr_file_fputs): Rename to ...
14599         (stderr_file::puts) ... this.  Adjust.
14600         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14601         (stderr_file::stderr_file): New.
14602         (tee_file_magic): Delete.
14603         (struct tee_file): Delete.
14604         (tee_file::tee_file): New.
14605         (tee_file_new): Delete.
14606         (tee_file::~tee_file): New.
14607         (tee_file_delete): Delete.
14608         (tee_file_flush): Rename to ...
14609         (tee_file::flush): ... this.  Adjust.
14610         (tee_file_write): Rename to ...
14611         (tee_file::write): ... this.  Adjust.
14612         (tee_file::write_async_safe): New.
14613         (tee_file_fputs): Rename to ...
14614         (tee_file::puts): ... this.  Adjust.
14615         (tee_file_isatty): Rename to ...
14616         (tee_file::isatty): ... this.  Adjust.
14617         * ui-file.h (struct obstack, struct ui_file): Don't
14618         forward-declare.
14619         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14620         (ui_file_write_ftype)
14621         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14622         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14623         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14624         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14625         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14626         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14627         (set_ui_file_fseek): Delete.
14628         (ui_file_data, ui_file_delete, ui_file_rewind)
14629         (struct ui_file): New.
14630         (ui_file_up): New.
14631         (class null_file): New.
14632         (null_stream): Declare.
14633         (ui_file_write_for_put, ui_file_put): Delete.
14634         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14635         Delete.
14636         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14637         (gdb_fopen, tee_file_new): Delete.
14638         (struct string_file): New.
14639         (struct stdio_file): New.
14640         (stdio_file_up): New.
14641         (struct stderr_file): New.
14642         (class tee_file): New.
14643         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14644         of a 'ui_file *'.  Adjust.
14645         * ui-out.h (class ui_out) <field_stream>: Likewise.
14646         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14647         (null_stream): Delete.
14648         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14649         Adjust.
14650         * utils.h (struct ui_file): Delete forward declaration..
14651         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14652         (error_stream): Take a 'string_file &' instead of a
14653         'ui_file *'.
14654         * varobj.c (varobj_value_get_print_value): Use string_file.
14655         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14656         * gdbarch.c: Regenerate.
14657
14658 2017-02-02  Pedro Alves  <palves@redhat.com>
14659
14660         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14661         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
14662         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
14663         Adjust to call gdb_print_insn instead of
14664         gdb_disassembler::print_insn.
14665         (dump_insns, do_mixed_source_and_assembly_deprecated)
14666         (do_mixed_source_and_assembly, do_assembly_only): Add back a
14667         'gdbarch' parameter.  Remove gdb_disassembler parameter.
14668         (gdb_disassembly): Don't allocate a gdb_disassembler here.
14669         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14670         declaration.
14671         (gdb_pretty_print_insn): Re-add declaration.
14672         * record-btrace.c (btrace_insn_history): Don't allocate a
14673         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
14674
14675 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
14676
14677         * disasm.h (gdb_disassembly): Remove file_string parameter.
14678         * disasm.c (gdb_disassembly): Likewise.
14679         * cli/cli-cmds.c (print_disassembly): Adapt.
14680         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14681         * stack.c (do_gdb_disassembly): Likewise.
14682
14683 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14684
14685         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14686         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14687         targets.  And if the implicit value is longer than needed, extract
14688         the first bytes instead of the "least significant" ones.
14689
14690 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14691
14692         * btrace.c (btrace_enable): Do not call btrace_add_pc for
14693         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14694         (btrace_fetch): Assert can_access_registers_ptid.
14695         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14696         validate_registers_access.
14697
14698 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14699
14700         * gdbthread.h (can_access_registers_ptid): New.
14701         * thread.c (can_access_registers_ptid): New.
14702
14703 2017-02-01  Pedro Alves  <palves@redhat.com>
14704
14705         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14706
14707 2017-01-31  Pedro Alves  <palves@redhat.com>
14708
14709         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
14710         Fix typos.
14711
14712 2017-01-31  Pedro Alves  <palves@redhat.com>
14713
14714         * stack.c (print_frame_args): Remove local mem_fileopen stream,
14715         not used.
14716
14717 2017-01-31  Pedro Alves  <palves@redhat.com>
14718
14719         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
14720
14721 2017-01-31  Pedro Alves  <palves@redhat.com>
14722
14723         * common/scoped_restore.h
14724         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
14725         change the value's parameter type to T2.
14726         (make_scoped_restore): Likewise.
14727
14728 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14729             Richard Henderson  <rth@redhat.com>
14730
14731         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
14732         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
14733         GS_BASE for older kernels.
14734         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
14735         GS_BASE for older kernels.
14736         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
14737         and GS_BASE to the offset table.
14738         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
14739         system register group.
14740         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
14741         for older kernels.
14742         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
14743         amd64 ABI.
14744         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
14745         AMD64_GSBASE_REGNUM.
14746         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
14747         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
14748         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
14749         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
14750         i386/64bit-segments.xml in those rules.
14751         * features/i386/64bit-segments.xml: New file.
14752         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
14753         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
14754         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
14755         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
14756         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
14757         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
14758         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
14759         * features/i386/amd64-avx-linux.c: Regenerated.
14760         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
14761         * features/i386/amd64-avx-mpx.c: Regenerated.
14762         * features/i386/amd64-avx512-linux.c: Regenerated.
14763         * features/i386/amd64-linux.c: Regenerated.
14764         * features/i386/amd64-mpx-linux.c: Regenerated.
14765         * features/i386/i386-avx-mpx-linux.c: Regenerated.
14766         * features/i386/i386-avx-mpx.c: Regenerated.
14767         * features/i386/x32-avx-linux.c: Regenerated.
14768         * features/i386/x32-avx512-linux.c: Regenerated.
14769         * regformats/i386/amd64-avx-linux.dat: Regenerated.
14770         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
14771         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
14772         * regformats/i386/amd64-linux.dat: Regenerated.
14773         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
14774         * regformats/i386/x32-avx-linux.dat: Regenerated.
14775         * regformats/i386/x32-avx512-linux.dat: Regenerated.
14776         * regformats/i386/x32-linux.dat: Regenerated.
14777
14778 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14779
14780         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
14781         Set to AMD64_NUM_REGS.
14782
14783 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14784
14785         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
14786         that checks validity of a register number.
14787
14788 2017-01-27  Kees Cook  <keescook@google.com>
14789
14790         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
14791         fetch_fpregs if target has fpa registers.
14792         (arm_linux_store_inferior_registers): Call store_fpregs if target
14793         has fpa registers.
14794
14795 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14796
14797         * cris-tdep.c (cris_gdbarch_init): Remove check for
14798         info.byte_order and force it to BFD_ENDIAN_LITTLE.
14799
14800 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
14801
14802         * corelow.c (get_core_register_section): Check for regset
14803         existence before checking for REGSET_VARIABLE_SIZE.
14804
14805 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14806             Pedro Alves  <palves@redhat.com>
14807
14808         PR gdb/20939
14809         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
14810         call memory_error, save memaddr instead.
14811         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
14812         negative, cal memory_error.
14813         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
14814
14815 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14816
14817         * disasm-selftests.c (memory_error_test): New function.
14818         (_initialize_disasm_selftests): Register memory_error_test.
14819
14820 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14821
14822         * Makefile.in (SFILES): Add disasm-selftests.c and
14823         selftest-arch.c.
14824         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
14825         * disasm-selftests.c: New file.
14826         * selftest-arch.c: New file.
14827         * selftest-arch.h: New file.
14828
14829 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14830
14831         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
14832         to bfd_arch_mep.  Don't return 0 if section is not
14833         found.  Call print_insn_mep.
14834
14835 2017-01-26  Pedro Alves  <palves@redhat.com>
14836             Yao Qi  <yao.qi@linaro.org>
14837
14838         * arm-tdep.c: Include "disasm.h".
14839         (gdb_print_insn_arm): Update code to get gdbarch.
14840         * disasm.c (dis_asm_read_memory): Change it to
14841         gdb_disassembler::dis_asm_read_memory.
14842         (dis_asm_memory_error): Likewise.
14843         (dis_asm_print_address): Likewise.
14844         (gdb_pretty_print_insn): Change it to
14845         gdb_disassembler::pretty_print_insn.
14846         (dump_insns): Add one argument gdb_disassemlber.  All
14847         callers updated.
14848         (do_mixed_source_and_assembly_deprecated): Likewise.
14849         (do_mixed_source_and_assembly): Likewise.
14850         (do_assembly_only): Likewise.
14851         (gdb_disassembler::gdb_disassembler): New.
14852         (gdb_disassembler::print_insn): New.
14853         * disasm.h (class gdb_disassembler): New.
14854         (gdb_pretty_print_insn): Remove declaration.
14855         (gdb_disassemble_info): Likewise.
14856         * guile/scm-disasm.c (class gdbscm_disassembler): New.
14857         (gdbscm_disasm_read_memory_worker): Update.
14858         (gdbscm_disasm_read_memory): Update.
14859         (gdbscm_disasm_memory_error): Remove.
14860         (gdbscm_disasm_print_address): Remove.
14861         (gdbscm_disassembler::gdbscm_disassembler): New.
14862         (gdbscm_print_insn_from_port): Update.
14863         * mips-tdep.c: Include disasm.h.
14864         (gdb_print_insn_mips): Update code to get gdbarch.
14865         * record-btrace.c (btrace_insn_history): Update.
14866         * spu-tdep.c: Include disasm.h.
14867         (struct spu_dis_asm_data): Remove.
14868         (struct spu_dis_asm_info): New.
14869         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
14870         SPU id.
14871         (gdb_print_insn_spu): Cast disassemble_info to
14872         spu_dis_asm_info.
14873
14874 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14875
14876         * disasm.c (do_ui_file_delete): Delete.
14877         (gdb_insn_length): Move code creating stream to ...
14878         * utils.c (null_stream): ... here.  New function.
14879         * utils.h (null_stream): Declare.
14880
14881 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
14882
14883         * python/py-inferior.c (find_thread_object): Return directly
14884         from the loop.  Remove "found" variable.
14885
14886 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
14887
14888         GDB 7.12.1 released.
14889
14890 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14891
14892         * python/py-function.c (fnpy_call): Reorder declarations to have
14893         the gdbpy_enter object declared first.
14894         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
14895
14896 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14897
14898         PR python/21068
14899         * python/python-internal.h (PyMem_RawMalloc): Define for
14900         Python < 3.4.
14901         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
14902         PyMem_RawMalloc instead of PyMem_Malloc.
14903
14904 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
14905             Luis Machado  <lgustavo@codesourcery.com>
14906
14907         * NEWS (New commands): Mention flash-erase.
14908         (New MI commands): Mention target-flash-erase.
14909         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
14910         command.
14911         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
14912         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
14913         * target.c (flash_erase_command): New function.
14914         (initialize_targets): Add new flash-erase command.
14915         * target.h (flash_erase_command): New declaration.
14916
14917 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
14918
14919         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
14920         HAVE_SYS_PROCFS_H is defined.
14921
14922 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14923
14924         * remote.c (struct cached_reg): Change data into a pointer.
14925         * (stop_reply_dtr): Free data pointers before deleting vector.
14926         (process_stop_reply): Likewise.
14927         (remote_parse_stop_reply): Allocate space for data
14928
14929 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14930
14931         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
14932         MAX_REGISTER_SIZE.
14933         (amd64_pseudo_register_read_value): Likewise.
14934         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
14935         (store_register_using_P): Likewise.
14936         * regcache.c (regcache_xfer_part): Likewise.
14937
14938 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
14939
14940         Split real and pseudo registers.
14941         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
14942         (sparc32_pseudo_regnum): New enum.
14943         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
14944         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
14945         (SPARC32_CP0_REGISTERS): New macro.
14946         (sparc32_pseudo_register_name): New function.
14947         (sparc32_register_name): Use sparc32_pseudo_register_name.
14948         (sparc32_pseudo_register_type): New function.
14949         (sparc32_register_type): Use sparc32_pseudo_register_type.
14950         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
14951         pseudo register numbers.
14952         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
14953         (SPARC64_CP0_REGISTERS): New macro.
14954         (sparc64_pseudo_register_name): New function.
14955         (sparc64_register_name): Use sparc64_pseudo_register_name.
14956         (sparc64_pseudo_register_type): New function.
14957         (sparc64_register_type): Use sparc64_pseudo_register_type.
14958         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
14959         pseudo register numbers.
14960         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
14961         sparc64_store_arguments): Handle pseudo register numbers.
14962
14963 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14964
14965         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
14966         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
14967         output.
14968         (getpkt_or_notif_sane_1): Likewise.
14969
14970 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14971
14972         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
14973         of CC.  Pass "-x c++-header" instead of "-x c".
14974
14975 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14976
14977         * remote.c (remote_can_async_p): Update comment.
14978
14979 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14980
14981         * linux-nat.c (linux_nat_can_async_p): Update comment.
14982
14983 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14984
14985         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
14986
14987 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
14988
14989         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
14990
14991 2017-01-10  Tom Tromey  <tom@tromey.com>
14992
14993         * python/py-type.c (typy_legacy_template_argument): Update.
14994         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
14995         ~demangle_parse_info): Declare new members.
14996         (cp_demangled_name_to_comp): Return unique_ptr.
14997         (cp_demangled_name_parse_free)
14998         (make_cleanup_cp_demangled_name_parse_free)
14999         (cp_new_demangle_parse_info): Remove.
15000         * cp-support.c (do_demangled_name_parse_free_cleanup)
15001         (make_cleanup_cp_demangled_name_parse_free): Remove.
15002         (inspect_type, cp_canonicalize_string_full)
15003         (cp_canonicalize_string): Update.
15004         (mangled_name_to_comp): Change return type.
15005         (cp_class_name_from_physname, method_name_from_physname)
15006         (cp_func_name, cp_remove_params): Update.
15007         * cp-name-parser.y (demangle_parse_info): New constructor, from
15008         cp_new_demangle_parse_info.
15009         (~demangle_parse_info): New destructor, from
15010         cp_demangled_name_parse_free.
15011         (cp_merge_demangle_parse_infos): Update.
15012         (cp_demangled_name_to_comp): Change return type.
15013
15014 2017-01-10  Tom Tromey  <tom@tromey.com>
15015
15016         * top.c (prevent_dont_repeat): Change return type.
15017         * python/python.c (execute_gdb_command): Use std::string.
15018         Update.
15019         * guile/guile.c (gdbscm_execute_gdb_command): Update.
15020         * command.h (prevent_dont_repeat): Change return type.
15021         * breakpoint.c (bpstat_do_actions_1): Update.
15022
15023 2017-01-10  Tom Tromey  <tom@tromey.com>
15024
15025         * value.h (scoped_value_mark::~scoped_value_mark): Call
15026         free_to_mark.
15027         (scoped_value_mark::free_to_mark): New method.
15028         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15029         scoped_value_mark.
15030
15031 2017-01-10  Tom Tromey  <tom@tromey.com>
15032
15033         * python/py-value.c (valpy_dereference, valpy_referenced_value)
15034         (valpy_reference_value, valpy_const_value, valpy_get_address)
15035         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15036         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15037         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15038         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15039         scoped_value_mark.
15040         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15041         * value.h (scoped_value_mark): New class.
15042
15043 2017-01-10  Tom Tromey  <tom@tromey.com>
15044
15045         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15046         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15047         * psymtab.c (discard_psymtabs_upto): Remove.
15048         (make_cleanup_discard_psymtabs): Remove.
15049         (struct psymtab_state): Remove.
15050
15051 2017-01-10  Tom Tromey  <tom@tromey.com>
15052
15053         * record-full.c (record_full_save_cleanups): Remove.
15054         (record_full_save): Use gdb::unlinker.
15055         * gcore.c (do_bfd_delete_cleanup): Remove.
15056         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
15057         cleanups.
15058         * dwarf2read.c (unlink_if_set): Remove.
15059         (write_psymtabs_to_index): Use gdb::unlinker.
15060         * common/gdb_unlinker.h: New file.
15061
15062 2017-01-10  Tom Tromey  <tom@tromey.com>
15063
15064         * windows-tdep.c (windows_xfer_shared_library): Update.
15065         * windows-nat.c (windows_make_so): Update.
15066         * utils.h (make_cleanup_bfd_unref): Remove.
15067         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15068         * symfile.h (symfile_bfd_open)
15069         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15070         * symfile.c (read_symbols, symbol_file_add)
15071         (separate_debug_file_exists): Update.
15072         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15073         (generic_load, reread_symbols): Update.
15074         * symfile-mem.c (symbol_file_add_from_memory): Update.
15075         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15076         (spu_symbol_file_add_from_memory): Update.
15077         * solist.h (struct target_so_ops) <bfd_open>: Return
15078         gdb_bfd_ref_ptr.
15079         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15080         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15081         gdb_bfd_ref_ptr.
15082         (solib_map_sections, reload_shared_libraries_1): Update.
15083         * solib-svr4.c (enable_break): Update.
15084         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15085         * solib-frv.c (enable_break2): Update.
15086         * solib-dsbt.c (enable_break): Update.
15087         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15088         gdb_bfd_ref_ptr.
15089         (darwin_solib_get_all_image_info_addr_at_init): Update.
15090         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15091         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15092         * record-full.c (record_full_save): Update.
15093         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15094         * procfs.c (insert_dbx_link_bpt_in_file): Update.
15095         * minidebug.c (find_separate_debug_file_in_section): Return
15096         gdb_bfd_ref_ptr.
15097         * machoread.c (macho_add_oso_symfile): Change abfd to
15098         gdb_bfd_ref_ptr.
15099         (macho_symfile_read_all_oso): Update.
15100         (macho_check_dsym): Return gdb_bfd_ref_ptr.
15101         (macho_symfile_read): Update.
15102         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15103         (jit_bfd_try_read_symtab): Update.
15104         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15105         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15106         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15107         gdb_bfd_ref_ptr.
15108         (gdb_bfd_ref_policy): New struct.
15109         (gdb_bfd_ref_ptr): New typedef.
15110         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15111         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15112         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15113         gdb_bfd_ref_ptr.
15114         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15115         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15116         (gcore_command): Update.
15117         * exec.c (exec_file_attach): Update.
15118         * elfread.c (elf_symfile_read): Update.
15119         * dwarf2read.c (dwarf2_get_dwz_file): Update.
15120         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15121         (open_and_init_dwo_file): Update.
15122         (open_dwp_file): Return gdb_bfd_ref_ptr.
15123         (open_and_init_dwp_file): Update.
15124         * corelow.c (core_open): Update.
15125         * compile/compile-object-load.c (compile_object_load): Update.
15126         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15127         * coffread.c (coff_symfile_read): Update.
15128         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15129         gdb_bfd_ref_ptr.  Rename.
15130         (dump_bfd_file, restore_command): Update.
15131         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15132         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15133         (find_separate_debug_file_by_buildid): Update.
15134
15135 2017-01-10  Tom Tromey  <tom@tromey.com>
15136
15137         * common/gdb_ref_ptr.h: New file.
15138         * python/py-ref.h (struct gdbpy_ref_policy): New.
15139         (gdbpy_ref): Now a typedef.
15140
15141 2017-01-10  Tom Tromey  <tom@tromey.com>
15142
15143         * utils.h (make_cleanup_htab_delete): Don't declare.
15144         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15145         Remove.
15146         * linespec.c (decode_compound_collector): Add constructor,
15147         destructor.
15148         (lookup_prefix_sym): Remove cleanup.
15149         (symtab_collector): Add constructor, destructor.
15150         (collect_symtabs_from_filename): Remove cleanup.
15151         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15152         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15153         Use htab_up.
15154         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15155         * dwarf2read.c (dw2_expand_symtabs_matching)
15156         (dw2_map_symbol_filenames, dwarf_decode_macros)
15157         (write_psymtabs_to_index): Use htab_up.
15158         * dwarf2loc.c (func_verify_no_selftailcall)
15159         (call_site_find_chain_1, func_verify_no_selftailcall)
15160         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15161         std::vector, gdb::unique_xmalloc_ptr.
15162         (call_sitep): Remove typedef.
15163         (dwarf2_locexpr_baton_eval): Remove unused variable.
15164
15165 2017-01-10  Tom Tromey  <tom@tromey.com>
15166
15167         * python/python-internal.h (make_cleanup_py_decref)
15168         (make_cleanup_py_xdecref): Don't declare.
15169         * python/py-utils.c (py_decref, make_cleanup_py_decref)
15170         (py_xdecref, make_cleanup_py_xdecref): Remove.
15171
15172 2017-01-10  Tom Tromey  <tom@tromey.com>
15173
15174         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15175         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15176
15177 2017-01-10  Tom Tromey  <tom@tromey.com>
15178
15179         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15180
15181 2017-01-10  Tom Tromey  <tom@tromey.com>
15182
15183         * python/py-utils.c (unicode_to_encoded_string)
15184         (python_string_to_target_string)
15185         (python_string_to_target_python_string)
15186         (python_string_to_host_string, gdbpy_obj_to_string)
15187         (get_addr_from_python): Use gdbpy_ref.
15188
15189 2017-01-10  Tom Tromey  <tom@tromey.com>
15190
15191         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15192         gdbpy_ref.
15193
15194 2017-01-10  Tom Tromey  <tom@tromey.com>
15195
15196         * python/python.c (eval_python_command, gdbpy_decode_line)
15197         (gdbpy_run_events, gdbpy_start_type_printers)
15198         (gdbpy_apply_type_printers): Use gdbpy_ref.
15199
15200 2017-01-10  Tom Tromey  <tom@tromey.com>
15201
15202         * python/py-param.c (get_doc_string, compute_enum_values): Use
15203         gdbpy_ref.
15204
15205 2017-01-10  Tom Tromey  <tom@tromey.com>
15206
15207         * python/py-inferior.c (find_thread_object, build_inferior_list):
15208         Use gdbpy_ref.
15209
15210 2017-01-10  Tom Tromey  <tom@tromey.com>
15211
15212         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15213
15214 2017-01-10  Tom Tromey  <tom@tromey.com>
15215
15216         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15217         gdbpy_ref.
15218
15219 2017-01-10  Tom Tromey  <tom@tromey.com>
15220
15221         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
15222         extra incref.
15223         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15224         Use gdbpy_ref.
15225
15226 2017-01-10  Tom Tromey  <tom@tromey.com>
15227
15228         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15229         gdbpy_ref.
15230
15231 2017-01-10  Tom Tromey  <tom@tromey.com>
15232
15233         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
15234         decref results of PyArg_ParseTupleAndKeywords.
15235
15236 2017-01-10  Tom Tromey  <tom@tromey.com>
15237
15238         * python/python.c (python_run_simple_file): Use
15239         unique_xmalloc_ptr, gdbpy_ref.
15240
15241 2017-01-10  Tom Tromey  <tom@tromey.com>
15242
15243         * python/py-prettyprint.c (print_stack_unless_memory_error)
15244         (print_string_repr, print_children): Use gdbpy_ref.
15245         (dummy_python_frame): New class.
15246         (dummy_python_frame::dummy_python_frame): Rename from
15247         push_dummy_python_frame.
15248         (py_restore_tstate): Remove.
15249
15250 2017-01-10  Tom Tromey  <tom@tromey.com>
15251
15252         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15253
15254 2017-01-10  Tom Tromey  <tom@tromey.com>
15255
15256         * python/python.c (ensure_python_env, restore_python_env):
15257         Remove.
15258         * python/python-internal.h (ensure_python_env): Don't declare.
15259         * varobj.h (varobj_ensure_python_env): Don't declare.
15260         * varobj.c (varobj_ensure_python_env): Remove.
15261
15262 2017-01-10  Tom Tromey  <tom@tromey.com>
15263
15264         * varobj.c (varobj_value_get_print_value): Use
15265         gdbpy_enter_varobj.
15266
15267 2017-01-10  Tom Tromey  <tom@tromey.com>
15268
15269         * python/py-prettyprint.c (print_string_repr, print_children):
15270         Update.
15271         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15272         of "encoding".
15273         * varobj.c (varobj_value_get_print_value): Update.
15274         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15275
15276 2017-01-10  Tom Tromey  <tom@tromey.com>
15277
15278         * varobj.c (varobj_get_display_hint)
15279         (dynamic_varobj_has_child_method, install_new_value_visualizer)
15280         (varobj_set_visualizer, free_variable): Use
15281         gdbpy_enter_varobj.
15282
15283 2017-01-10  Tom Tromey  <tom@tromey.com>
15284
15285         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15286         (do_finish_initialization): New function.  Use gdbpy_ref.
15287         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
15288         do_finish_initialization.
15289
15290 2017-01-10  Tom Tromey  <tom@tromey.com>
15291
15292         * python/py-param.c (get_set_value, get_show_value): Use
15293         gdbpy_enter, gdbpy_ref.
15294
15295 2017-01-10  Tom Tromey  <tom@tromey.com>
15296
15297         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15298
15299 2017-01-10  Tom Tromey  <tom@tromey.com>
15300
15301         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15302
15303 2017-01-10  Tom Tromey  <tom@tromey.com>
15304
15305         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15306         Use gdbpy_enter_varobj.
15307
15308 2017-01-10  Tom Tromey  <tom@tromey.com>
15309
15310         * varobj.c (gdbpy_enter_varobj): New constructor.
15311         * python/python-internal.h (gdbpy_enter_varobj): New class.
15312         * python/py-varobj.c (py_varobj_get_iterator): Use
15313         gdbpy_enter_varobj.
15314
15315 2017-01-10  Tom Tromey  <tom@tromey.com>
15316
15317         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15318         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15319         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15320         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15321         unique_xmalloc_ptr.
15322         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15323
15324 2017-01-10  Tom Tromey  <tom@tromey.com>
15325
15326         * python/py-xmethods.c (invoke_match_method): Use
15327         gdbpy_ref.
15328
15329 2017-01-10  Tom Tromey  <tom@tromey.com>
15330
15331         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15332         gdbpy_enter, gdbpy_ref.
15333
15334 2017-01-10  Tom Tromey  <tom@tromey.com>
15335
15336         * python/python.c (python_interactive_command): Use gdbpy_enter.
15337
15338 2017-01-10  Tom Tromey  <tom@tromey.com>
15339
15340         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15341         gdbpy_ref.
15342
15343 2017-01-10  Tom Tromey  <tom@tromey.com>
15344
15345         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15346         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15347
15348 2017-01-10  Tom Tromey  <tom@tromey.com>
15349
15350         * utils.h (htab_deleter): New struct.
15351         (htab_up): New typedef.
15352         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15353         gdbpy_enter, gdbpy_ref, htab_up.
15354
15355 2017-01-10  Tom Tromey  <tom@tromey.com>
15356
15357         * python/py-unwind.c (pending_frame_invalidate): Remove.
15358         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15359
15360 2017-01-10  Tom Tromey  <tom@tromey.com>
15361
15362         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15363         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15364
15365 2017-01-10  Tom Tromey  <tom@tromey.com>
15366
15367         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15368
15369 2017-01-10  Tom Tromey  <tom@tromey.com>
15370
15371         * python/python.c (gdbpy_eval_from_control_command)
15372         (gdbpy_source_script, gdbpy_run_events)
15373         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15374         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15375         gdbpy_enter.
15376
15377 2017-01-10  Tom Tromey  <tom@tromey.com>
15378
15379         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15380
15381 2017-01-10  Tom Tromey  <tom@tromey.com>
15382
15383         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15384
15385 2017-01-10  Tom Tromey  <tom@tromey.com>
15386
15387         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15388         (python_on_inferior_call_pre, python_on_inferior_call_post)
15389         (python_on_memory_change, python_on_register_change)
15390         (python_inferior_exit, python_new_objfile, add_thread_object)
15391         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15392
15393 2017-01-10  Tom Tromey  <tom@tromey.com>
15394
15395         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15396         (bpfinishpy_handle_exit): Use gdbpy_enter.
15397
15398 2017-01-10  Tom Tromey  <tom@tromey.com>
15399
15400         * python/py-cmd.c (cmdpy_destroyer)
15401         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15402         gdbpy_enter.
15403
15404 2017-01-10  Tom Tromey  <tom@tromey.com>
15405
15406         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15407         gdbpy_enter.
15408         (gdbpy_breakpoint_has_cond): Likewise.
15409
15410 2017-01-10  Tom Tromey  <tom@tromey.com>
15411
15412         * python/python.c (gdbpy_enter): New constructor.
15413         (~gdbpy_enter): New destructor.
15414         (restore_python_env, ensure_python_env): Rewrite.
15415         * python/python-internal.h (gdbpy_enter): New class.
15416
15417 2017-01-10  Tom Tromey  <tom@tromey.com>
15418
15419         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15420
15421 2017-01-10  Tom Tromey  <tom@tromey.com>
15422
15423         * python/py-value.c (value_has_field, get_field_flag)
15424         (get_field_type, valpy_getitem, convert_value_from_python): Use
15425         gdbpy_ref.
15426
15427 2017-01-10  Tom Tromey  <tom@tromey.com>
15428
15429         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15430         gdbpy_ref.
15431
15432 2017-01-10  Tom Tromey  <tom@tromey.com>
15433
15434         * python/py-prettyprint.c (search_pp_list)
15435         (find_pretty_printer_from_objfiles)
15436         (find_pretty_printer_from_progspace)
15437         (find_pretty_printer_from_gdb, find_pretty_printer)
15438         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15439         gdbpy_ref.
15440
15441 2017-01-10  Tom Tromey  <tom@tromey.com>
15442
15443         * python/py-param.c (call_doc_function): Use gdbpy_ref.
15444
15445 2017-01-10  Tom Tromey  <tom@tromey.com>
15446
15447         * python/py-linetable.c (build_line_table_tuple_from_pcs)
15448         (ltpy_get_all_source_lines): Use gdbpy_ref.
15449
15450 2017-01-10  Tom Tromey  <tom@tromey.com>
15451
15452         * python/py-framefilter.c (extract_sym, extract_value)
15453         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15454         gdbpy_ref.
15455
15456 2017-01-10  Tom Tromey  <tom@tromey.com>
15457
15458         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15459
15460 2017-01-10  Tom Tromey  <tom@tromey.com>
15461
15462         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15463
15464 2017-01-10  Tom Tromey  <tom@tromey.com>
15465
15466         * python/py-function.c (convert_values_to_python, fnpy_init): Use
15467         gdbpy_ref.
15468
15469 2017-01-10  Tom Tromey  <tom@tromey.com>
15470
15471         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15472
15473 2017-01-10  Tom Tromey  <tom@tromey.com>
15474
15475         * python/py-type.c (convert_field, make_fielditem, typy_fields)
15476         (typy_range): Use gdbpy_ref.
15477
15478 2017-01-10  Tom Tromey  <tom@tromey.com>
15479
15480         * python/py-threadevent.c (create_thread_event_object): Use
15481         gdbpy_ref.
15482         * python/py-stopevent.c (create_stop_event_object): Simplify.
15483         (emit_stop_event): Use gdbpy_ref.
15484         * python/py-signalevent.c (create_signal_event_object): Use
15485         gdbpy_ref.
15486         * python/py-newobjfileevent.c (create_new_objfile_event_object)
15487         (emit_new_objfile_event, create_clear_objfiles_event_object)
15488         (emit_clear_objfiles_event): Use gdbpy_ref.
15489         * python/py-infevents.c (create_inferior_call_event_object)
15490         (create_register_changed_event_object)
15491         (create_memory_changed_event_object, emit_inferior_call_event)
15492         (emit_memory_changed_event, emit_register_changed_event): Use
15493         gdbpy_ref.
15494         * python/py-exitedevent.c (create_exited_event_object)
15495         (emit_exited_event): Use gdbpy_ref.
15496         * python/py-event.h (evpy_emit_event): Remove
15497         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15498         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15499         * python/py-continueevent.c (emit_continue_event): Use
15500         gdbpy_ref.
15501         * python/py-breakpoint.c (gdbpy_breakpoint_created)
15502         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15503         gdbpy_ref.
15504         * python/py-bpevent.c (create_breakpoint_event_object): Use
15505         gdbpy_ref.
15506
15507 2017-01-10  Tom Tromey  <tom@tromey.com>
15508
15509         * python/py-ref.h: New file.
15510
15511 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15512
15513         * cli-out.c (cli_ui_out::do_redirect): Change return type to
15514         void.
15515         * cli-out.h (cli_ui_out::do_redirect): Likewise.
15516         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15517         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15518         * ui-out.c (ui_out::redirect): Likewise.
15519         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15520         * cli/cli-logging.c (set_logging_redirect): Update call site of
15521         ui_out::redirect.
15522         (handle_redirections): Likewise.
15523         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15524         * top.c (execute_command_to_string): Likewise.
15525         * utils.c (do_ui_out_redirect_pop): Likewise.
15526
15527 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15528
15529         * stack.c (_initialize_stack): Update "frame" command help message.
15530
15531 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
15532
15533         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15534
15535 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15536
15537         * x86-linux-nat.h: Include gdb_proc_service.h.
15538
15539 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15540
15541         * ser-base.h: Include serial.h.
15542
15543 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15544
15545         * ppc-linux-tdep.h: Include ppc-tdep.h.
15546
15547 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15548
15549         * nat/amd64-linux-siginfo.h: Include signal.h.
15550
15551 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15552
15553         * nat/aarch64-linux-hw-point.h: Include break-common.h.
15554
15555 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15556
15557         * mi/mi-parse.h: Include mi-cmds.h.
15558
15559 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15560
15561         * inf-loop.c: Don't include "target.h".
15562         * inf-loop.h: Include it here.
15563
15564 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15565
15566         * dfp.h: Include "dboulest.h" and "expression.h".
15567
15568 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15569
15570         * ax-gdb.h: Include "ax.h".
15571
15572 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15573
15574         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15575         with nat/gdb_ptrace.h.
15576
15577 2017-01-05  Yao Qi  <yao.qi@linaro.org>
15578
15579         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15580         new line.
15581         (mips64_fbsd_sigframe_init): Likewise.
15582
15583 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15584
15585         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15586         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15587
15588 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15589
15590         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15591         * NEWS: Mention new FreeBSD/mips native configuration.
15592         * config/mips/fbsd.mh: New file.
15593         * configure.host: Add mips*-*-freebsd*.
15594         * mips-fbsd-nat.c: New file.
15595
15596 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15597
15598         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15599         (ALLDEPFILES): Add mips-fbsd-tdep.c.
15600         * NEWS: Mention new FreeBSD/mips target.
15601         * configure.tgt: Add mips*-*-freebsd*.
15602         * mips-fbsd-tdep.c: New file.
15603         * mips-fbsd-tdep.h: New file.
15604
15605 2017-01-04  Yao Qi  <yao.qi@linaro.org>
15606
15607         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15608         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15609
15610 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15611
15612         Update copyright year range in all GDB files.
15613
15614 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15615
15616         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15617
15618 For older changes see ChangeLog-2016.
15619 \f
15620 Local Variables:
15621 mode: change-log
15622 left-margin: 8
15623 fill-column: 74
15624 version-control: never
15625 coding: utf-8
15626 End: