Speed up dict_hash
[external/binutils.git] / gdb / ChangeLog
1 2017-11-09  Tom Tromey  <tom@tromey.com>
2
3         * dictionary.c (dict_hash): Move "TKB" check into the "switch".
4
5 2017-11-08  Joel Brobecker  <brobecker@adacore.com>
6
7         * ada-exp.y (write_var_from_sym): Remove parameter
8         "orig_left_context".  Update all callers.
9
10 2017-11-08  Simon Marchi  <simon.marchi@ericsson.com>
11
12         * tracepoint.h (class collection_list) <stringify>: Return
13         std::vector<std::string>.
14         (encode_actions_rsp): Change parameters to
15         std::vector<std::string> *.
16         * tracepoint.c (collection_list::stringify): Return
17         std::vector<std::string> and adjust accordingly.
18         (encode_actions_rsp): Changee parameters to
19         std::vector<std::string> and adjust accordingly.
20         * remote.c (free_actions_list),
21         free_actions_list_cleanup_wrapper): Remove.
22         (remote_download_tracepoint): Adjust to std::vector.
23
24 2017-11-08  Tom Tromey  <tom@tromey.com>
25
26         * dwarf2read.c (symbolp): Remove typedef.
27         (read_func_scope): Use std::vector.
28         (process_structure_scope): Use std::vector.
29
30 2017-11-08  Pedro Alves  <palves@redhat.com>
31
32         * ada-lang.c (ada_make_symbol_completion_list): Use
33         completion_skip_symbol.
34         * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
35         (symbol_is_function_or_method(symbol*)): New.
36         (add_symtab_completions): Add complete_symbol_mode parameter.  Use
37         completion_skip_symbol.
38         (default_collect_symbol_completion_matches_break_on): Use
39         completion_skip_symbol.  Pass down mode.
40         (collect_file_symbol_completion_matches): Pass down mode.
41         * symtab.h (symbol_is_function_or_method): New declarations.
42         (completion_skip_symbol): New template function.
43
44 2017-11-08  Pedro Alves  <palves@redhat.com>
45
46         * linespec.c (iterate_over_all_matching_symtabs): Add
47         search_domain parameter.  Pass it down to expand_symtabs_matching.
48         (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
49         (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
50         search_domain.
51         (add_all_symbol_names_from_pspace): Add search_domain parameter.
52         Pass it down.
53         (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
54         symbols.
55         (add_matching_symbols_to_info): Add search_domain parameter.  Pass
56         it down.
57
58 2017-11-08  Pedro Alves  <palves@redhat.com>
59
60         * ada-lang.c (ada_make_symbol_completion_list): Remove text and
61         text_len locals and don't pass them down.
62         * symtab.c (completion_list_add_name): Remove
63         sym_text/sym_text_len parameters and adjust.
64         (completion_list_add_symbol, completion_list_add_msymbol)
65         (completion_list_objc_symbol, completion_list_add_fields)
66         (add_symtab_completions): Likewise.
67         (default_collect_symbol_completion_matches_break_on)
68         (collect_file_symbol_completion_matches): Remove sym_text_len
69         local and don't pass it down.
70         * symtab.h (completion_list_add_name): Remove
71         sym_text/sym_text_len parameters.
72
73 2017-11-08  Pedro Alves  <palves@redhat.com>
74
75         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
76         unittests/lookup_name_info-selftests.c.
77         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
78         * cp-support.c: Include "selftest.h".
79         (cp_remove_params_1): Rename from cp_remove_params.  Add
80         'require_param' parameter, and handle it.
81         (cp_remove_params): Reimplement.
82         (cp_remove_params_if_any): New.
83         (selftests::quote): New.
84         (selftests::check_remove_params): New.
85         (selftests::test_cp_remove_params): New.
86         (_initialize_cp_support): Install
87         selftests::test_cp_remove_params.
88         * cp-support.h (cp_remove_params_if_any): Declare.
89         * dwarf2read.c :Include "selftest.h".
90         (dw2_expand_symtabs_matching_symbol): Use
91         lookup_name_info::make_ignore_params.
92         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
93         (selftests::dw2_expand_symtabs_matching::string_or_null)
94         (selftests::dw2_expand_symtabs_matching::check_match)
95         (selftests::dw2_expand_symtabs_matching::test_symbols)
96         (selftests::dw2_expand_symtabs_matching::run_test): New.
97         (_initialize_dwarf2_read): Register
98         selftests::dw2_expand_symtabs_matching::run_test.
99         * psymtab.c (psym_expand_symtabs_matching): Use
100         lookup_name_info::make_ignore_params.
101         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
102         If the lookup name wants to ignore parameters, strip them.
103         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
104         code handling '('.
105         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
106         (default_collect_symbol_completion_matches_break_on): Don't try to
107         strip parameters.
108         * symtab.h (lookup_name_info::lookup_name_info): Add
109         'ignore_parameters' parameter.
110         (lookup_name_info::ignore_parameters)
111         (lookup_name_info::make_ignore_params): New methods.
112         (lookup_name_info::m_ignore_parameters): New field.
113         * unittests/lookup_name_info-selftests.c: New file.
114
115 2017-11-08  Pedro Alves  <palves@redhat.com>
116
117         * dwarf2read.c (dw2_expand_marked_cus)
118         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
119         (dw2_expand_symtabs_matching): Move further below.
120         (dw2_expand_marked_cus): Reindent.
121
122 2017-11-08  Pedro Alves  <palves@redhat.com>
123
124         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
125         (struct name_component): New.
126         (mapped_index::name_components): New field.
127         (mapped_index::symbol_name_at): New method.
128         (dwarf2_read_index): Call mapped_index ctor.
129         (dw2_map_matching_symbols): Add comment about name_components
130         table.
131         (dw2_expand_symtabs_matching): Factor part to...
132         (dw2_expand_symtabs_matching_symbol): ... this new function.
133         Build name components table, and lookup symbols in it before
134         calling the name matcher.
135         (dw2_expand_marked_cus): New, factored out from
136         dw2_expand_symtabs_matching.
137         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
138
139 2017-11-08   Pedro Alves  <palves@redhat.com>
140
141         * ada-lang.c (ada_encode): Rename to ..
142         (ada_encode_1): ... this.  Add throw_errors parameter and handle
143         it.
144         (ada_encode): Reimplement.
145         (match_name): Delete, folded into full_name.
146         (resolve_subexp): No longer pass the encoded name to
147         ada_lookup_symbol_list.
148         (should_use_wild_match): Delete.
149         (name_match_type_from_name): New.
150         (ada_lookup_simple_minsym): Use lookup_name_info and the
151         language's symbol_name_matcher_ftype.
152         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
153         (ada_add_block_renamings): Adjust to use lookup_name_info.
154         (ada_lookup_name): New.
155         (add_nonlocal_symbols, ada_add_all_symbols)
156         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
157         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
158         (ada_name_for_lookup): Delete.
159         (ada_lookup_encoded_symbol): Construct a verbatim name.
160         (wild_match): Reverse sense of return type.  Use bool.
161         (full_match): Reverse sense of return type.  Inline bits of old
162         match_name here.
163         (ada_add_block_symbols): Adjust to use lookup_name_info.
164         (symbol_completion_match): Delete, folded into...
165         (ada_lookup_name_info::matches): ... .this new method.
166         (symbol_completion_add): Delete.
167         (ada_collect_symbol_completion_matches): Add name_match_type
168         parameter.  Adjust to use lookup_name_info and
169         completion_list_add_name.
170         (get_var_value, ada_add_global_exceptions): Adjust to use
171         lookup_name_info.
172         (ada_get_symbol_name_cmp): Delete.
173         (do_wild_match, do_full_match): New functions.
174         (ada_lookup_name_info::ada_lookup_name_info): New method.
175         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
176         functions.
177         (ada_language_defn): Install ada_get_symbol_name_matcher.
178         * ada-lex.l (processId): If name starts with '<', copy it
179         verbatim.
180         * block.c (block_iter_match_step, block_iter_match_first)
181         (block_iter_match_next, block_lookup_symbol)
182         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
183         lookup_name_info.
184         * block.h (block_iter_match_first, block_iter_match_next)
185         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
186         * c-lang.c (c_language_defn, cplus_language_defn)
187         (asm_language_defn, minimal_language_defn): Adjust comments to
188         refer to la_get_symbol_name_matcher.
189         * completer.c (complete_files_symbols)
190         (collect_explicit_location_matches, symbol_completer): Pass a
191         symbol_name_match_type down.
192         * completer.h (class completion_match, completion_match_result):
193         New classes.
194         (completion_tracker::reset_completion_match_result): New method.
195         (completion_tracker::m_completion_match_result): New field.
196         * cp-support.c (make_symbol_overload_list_block): Adjust to use
197         lookup_name_info.
198         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
199         functions.
200         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
201         * d-lang.c: Adjust comments to refer to
202         la_get_symbol_name_matcher.
203         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
204         Adjust to use lookup_name_info.
205         (dict_iter_match_first, dict_iter_match_next)
206         (iter_match_first_hashed, iter_match_next_hashed)
207         (iter_match_first_linear, iter_match_next_linear): Adjust to work
208         with a lookup_name_info.
209         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
210         Likewise.
211         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
212         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
213         (gdb_index_symbol_name_matcher): New class.
214         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
215         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
216         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
217         with a symbol_name_match_type.
218         (f_language_defn): Adjust comments to refer to
219         la_get_symbol_name_matcher.
220         * go-lang.c (go_language_defn): Adjust comments to refer to
221         la_get_symbol_name_matcher.
222         * language.c (default_symbol_name_matcher)
223         (language_get_symbol_name_matcher): New functions.
224         (unknown_language_defn, auto_language_defn): Adjust comments to
225         refer to la_get_symbol_name_matcher.
226         * language.h (symbol_name_cmp_ftype): Delete.
227         (language_defn) <la_collect_symbol_completion_matches>: Add match
228         type parameter.
229         <la_get_symbol_name_cmp>: Delete field.
230         <la_get_symbol_name_matcher>: New field.
231         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
232         (default_symbol_name_matcher, language_get_symbol_name_matcher):
233         Declare.
234         * linespec.c (iterate_over_all_matching_symtabs)
235         (iterate_over_file_blocks): Adjust to use lookup_name_info.
236         (find_methods): Add language parameter, and use lookup_name_info
237         and the language's symbol_name_matcher_ftype.
238         (linespec_complete_function): Adjust.
239         (lookup_prefix_sym): Use lookup_name_info.
240         (add_all_symbol_names_from_pspace): Adjust.
241         (find_superclass_methods): Add language parameter and pass it
242         down.
243         (find_method): Pass symbol language down.
244         (find_linespec_symbols): Don't demangle or Ada encode here.
245         (search_minsyms_for_name): Add lookup_name_info parameter.
246         (add_matching_symbols_to_info): Add name_match_type parameter.
247         Use lookup_name_info.
248         * m2-lang.c (m2_language_defn): Adjust comments to refer to
249         la_get_symbol_name_matcher.
250         * minsyms.c: Include <algorithm>.
251         (add_minsym_to_demangled_hash_table): Remove table parameter and
252         add objfile parameter.  Use search_name_hash, and add language to
253         demangled languages vector.
254         (struct found_minimal_symbols): New struct.
255         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
256         New functions.
257         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
258         input names here.  Use lookup_name_info instead.  Lookup up
259         demangled names once for each language in the demangled names
260         vector.
261         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
262         demangled names once for each language in the demangled names
263         vector.
264         (build_minimal_symbol_hash_tables): Adjust.
265         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
266         lookup_name_info.
267         * objc-lang.c (objc_language_defn): Adjust comment to refer to
268         la_get_symbol_name_matcher.
269         * objfiles.h: Include <vector>.
270         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
271         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
272         la_get_symbol_name_matcher.
273         * p-lang.c (pascal_language_defn): Adjust comment to refer to
274         la_get_symbol_name_matcher.
275         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
276         (match_partial_symbol): Use symbol_name_match_type,
277         lookup_name_info and psymbol_name_matches.
278         (lookup_partial_symbol): Use lookup_name_info.
279         (map_block): Use symbol_name_match_type and lookup_name_info.
280         (psym_map_matching_symbols): Use symbol_name_match_type.
281         (psymbol_name_matches): New.
282         (recursively_search_psymtabs): Use lookup_name_info and
283         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
284         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
285         'kind' parameter to 'domain'.
286         * rust-lang.c (rust_language_defn): Adjust comment to refer to
287         la_get_symbol_name_matcher.
288         * symfile-debug.c (debug_qf_map_matching_symbols)
289         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
290         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
291         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
292         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
293         Adjust to use symbol_name_match_type.
294         <expand_symtabs_matching>: Adjust to use lookup_name_info.
295         (expand_symtabs_matching): Adjust to use lookup_name_info.
296         * symmisc.c (maintenance_expand_symtabs): Use
297         lookup_name_info::match_any ().
298         * symtab.c (symbol_matches_search_name): New.
299         (eq_symbol_entry): Adjust to use lookup_name_info and the
300         language's matcher.
301         (demangle_for_lookup_info::demangle_for_lookup_info): New.
302         (lookup_name_info::match_any): New.
303         (iterate_over_symbols, search_symbols): Use lookup_name_info.
304         (compare_symbol_name): Add language, lookup_name_info and
305         completion_match_result parameters, and use them.
306         (completion_list_add_name): Make extern.  Add language and
307         lookup_name_info parameters.  Use them.
308         (completion_list_add_symbol, completion_list_add_msymbol)
309         (completion_list_objc_symbol): Add lookup_name_info parameters and
310         adjust.  Pass down language.
311         (completion_list_add_fields): Add lookup_name_info parameters and
312         adjust.  Pass down language.
313         (add_symtab_completions): Add lookup_name_info parameters and
314         adjust.
315         (default_collect_symbol_completion_matches_break_on): Add
316         name_match_type parameter, and use it.  Use lookup_name_info.
317         (default_collect_symbol_completion_matches)
318         (collect_symbol_completion_matches): Add name_match_type
319         parameter, and pass it down.
320         (collect_symbol_completion_matches_type): Adjust.
321         (collect_file_symbol_completion_matches): Add name_match_type
322         parameter, and use lookup_name_info.
323         * symtab.h: Include <string> and "common/gdb_optional.h".
324         (enum class symbol_name_match_type): New.
325         (class ada_lookup_name_info): New.
326         (struct demangle_for_lookup_info): New.
327         (class lookup_name_info): New.
328         (symbol_name_matcher_ftype): New.
329         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
330         (symbol_matches_search_name): Declare.
331         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
332         (default_collect_symbol_completion_matches)
333         (collect_symbol_completion_matches)
334         (collect_file_symbol_completion_matches): Add name_match_type
335         parameter.
336         (iterate_over_symbols): Use lookup_name_info.
337         (completion_list_add_name): Declare.
338         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
339         (strncmp_iw_with_mode): Now extern.
340         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
341         (strncmp_iw_with_mode): Declare.
342
343 2017-11-08  Keith Seitz  <keiths@redhat.com>
344             Pedro Alves  <palves@redhat.com>
345
346         * ada-lang.c (ada_language_defn): Install
347         default_search_name_hash.
348         * buildsym.c (struct buildsym_compunit): <language>: New field.
349         (finish_block_internal): Pass language when creating dictionaries.
350         (start_buildsym_compunit, start_symtab): New language parameters.
351         Use them.
352         (restart_symtab): Pass down compilation unit's language.
353         * buildsym.h (enum language): Forward declare.
354         (start_symtab): New 'language' parameter.
355         * c-lang.c (c_language_defn, cplus_language_defn)
356         (asm_language_defn, minimal_language_defn): Install
357         default_search_name_hash.
358         * coffread.c (coff_start_symtab): Adjust.
359         * d-lang.c (d_language_defn): Install default_search_name_hash.
360         * dbxread.c (struct symloc): Add 'pst_language' field.
361         (PST_LANGUAGE): Define.
362         (start_psymtab, read_ofile_symtab): Use it.
363         (process_one_symbol): New 'language' parameter.  Pass it down.
364         * dictionary.c (struct dictionary) <language>: New field.
365         (DICT_LANGUAGE): Define.
366         (dict_create_hashed, dict_create_hashed_expandable)
367         (dict_create_linear, dict_create_linear_expandable): New parameter
368         'language'.  Set the dictionary's language.
369         (iter_match_first_hashed): Adjust to rename.
370         (insert_symbol_hashed): Assert we don't see mismatching
371         languages.  Adjust to rename.
372         (dict_hash): Rename to ...
373         (default_search_name_hash): ... this and make extern.
374         * dictionary.h (struct language_defn): Forward declare.
375         (dict_create_hashed): New parameter 'language'.
376         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
377         * f-lang.c (f_language_defn): Install default_search_name_hash.
378         * go-lang.c (go_language_defn): Install default_search_name_hash.
379         * jit.c (finalize_symtab): Pass compunit's language to dictionary
380         creation.
381         * language.c (unknown_language_defn, auto_language_defn):
382         * language.h (language_defn::la_search_name_hash): New field.
383         (default_search_name_hash): Declare.
384         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
385         * mdebugread.c (new_block): New parameter 'language'.
386         * mdebugread.c (parse_symbol): Pass symbol language to block
387         allocation.
388         (psymtab_to_symtab_1): Pass down language.
389         (new_symtab): Pass compunit's language to block allocation.
390         * objc-lang.c (objc_language_defn): Install
391         default_search_name_hash.
392         * opencl-lang.c (opencl_language_defn):
393         * p-lang.c (pascal_language_defn): Install
394         default_search_name_hash.
395         * rust-lang.c (rust_language_defn): Install
396         default_search_name_hash.
397         * stabsread.h (enum language): Forward declare.
398         (process_one_symbol): Add 'language' parameter.
399         * symtab.c (search_name_hash): New function.
400         * symtab.h (search_name_hash): Declare.
401         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
402
403 2017-11-08  Pedro Alves  <palves@redhat.com>
404
405         * cp-name-parser.y (main): Don't initialize extra_chars.
406
407 2017-11-07  Tom Tromey  <tom@tromey.com>
408
409         * event-top.h (command_handler): Constify.
410         * record-full.c (cmd_record_full_start): Update.
411         * thread.c (thread_apply_all_command): Update.
412         * printcmd.c (eval_command): Update.
413         * mi/mi-main.c (mi_execute_cli_command): Update.
414         (mi_execute_async_cli_command): Update.
415         * tui/tui-stack.c (tui_update_command): Update.
416         * cli/cli-interp.c (safe_execute_command): Constify.
417         * record.c (record_start): Update.
418         (record_start, record_stop, cmd_record_start): Update.
419         * record-btrace.c (cmd_record_btrace_bts_start): Update.
420         (cmd_record_btrace_pt_start): Update.
421         (cmd_record_btrace_start): Update.
422         (cmd_record_btrace_start): Update.
423         * reverse.c (exec_reverse_once): Update.
424         * python/python.c (execute_gdb_command): Don't copy the command.
425         * event-top.c (command_line_handler): Update.
426         (command_handler): Constify.
427         * defs.h (deprecated_call_command_hook): Constify.
428         * cli/cli-script.h (execute_user_command): Constify.
429         * cli/cli-script.c (execute_user_command): Constify.
430         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
431         (enum command_control_type): Update.
432         * main.c (catch_command_errors): Remove non-const overload.
433         (catch_command_errors_ftype): Remove.
434         * python/py-cmd.c (cmdpy_function): Constify.
435         * guile/scm-cmd.c (cmdscm_function): Constify.
436         * cli/cli-dump.c (call_dump_func): Constify.
437         * cli/cli-decode.c (do_const_cfunc): Constify.
438         (do_sfunc): Constify.
439         (cmd_func): Constify.
440         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
441         * top.h (execute_command): Constify.
442         * top.c (execute_command): Constify.
443         (execute_command_to_string): Constify.
444         (deprecated_call_command_hook): Constify.
445         * command.h (cmd_func): Constify.
446         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
447
448 2017-11-07  Tom Tromey  <tom@tromey.com>
449
450         * ada-lang.c (catch_ada_exception_command): Constify.
451         (catch_assert_command): Constify.
452         * break-catch-throw.c (catch_catch_command, catch_throw_command)
453         (catch_rethrow_command): Constify.
454         (catch_exception_command_1): Constify.
455         * breakpoint.h (add_catch_command): Constify.
456         * break-catch-syscall.c (catch_syscall_command_1): Constify.
457         (catch_syscall_split_args): Constify.
458         * break-catch-sig.c (catch_signal_command): Constify.
459         (catch_signal_split_args): Constify.
460         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
461         cmd_const_sfunc_ftype.
462         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
463         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
464         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
465         (add_setshow_string_cmd, struct cmd_list_element)
466         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
467         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
468         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
469         Constify.
470         (set_cmd_sfunc): Constify.
471         (empty_sfunc): Constify.
472         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
473         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
474         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
475         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
476         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
477         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
478         Constify.
479         (set_cmd_sfunc): Constify.
480         (cmd_sfunc_ftype): Remove.
481         * compile/compile.c (set_compile_args): Constify.
482         * infrun.c (set_disable_randomization): Constify.
483         * infcmd.c (set_args_command, set_cwd_command): Constify.
484         * breakpoint.c (set_condition_evaluation_mode): Constify.
485         (add_catch_command): Constify.
486         (catch_fork_command_1, catch_exec_command_1)
487         (catch_load_command_1, catch_unload_command_1): Constify.
488         (catch_load_or_unload): Constify.
489         * guile/scm-param.c (pascm_set_func): Constify.
490         (add_setshow_generic): Constify.
491         * python/py-param.c (get_set_value): Constify.
492         * top.h (set_verbose): Constify.
493         * tui/tui-win.c (tui_set_var_cmd): Constify.
494         * mi/mi-main.c (set_mi_async_command): Constify.
495         * cli/cli-logging.c (set_logging_overwrite)
496         (set_logging_redirect): Constify.
497         * value.c (set_max_value_size): Constify.
498         * valprint.c (set_input_radix, set_output_radix): Constify.
499         * utils.c (set_width_command, set_height_command): Constify.
500         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
501         * tracepoint.c (set_disconnected_tracing)
502         (set_circular_trace_buffer, set_trace_buffer_size)
503         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
504         * top.c (set_history_size_command, set_verbose, set_editing)
505         (set_gdb_datadir, set_history_filename): Constify.
506         * target.c (set_targetdebug, maint_set_target_async_command)
507         (maint_set_target_non_stop_command, set_target_permissions)
508         (set_write_memory_permission): Constify.
509         (open_target): Constify.
510         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
511         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
512         * symtab.c (set_symbol_cache_size_handler): Constify.
513         * symfile.c (set_ext_lang_command): Constify.
514         * symfile-debug.c (set_debug_symfile): Constify.
515         * source.c (set_directories_command): Constify.
516         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
517         * serial.c (set_parity): Constify.
518         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
519         * remote.c (set_remote_exec_file, set_remotebreak)
520         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
521         * record.c (set_record_insn_history_size)
522         (set_record_call_history_size): Constify.
523         * record-full.c (set_record_full_insn_max_num): Constify.
524         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
525         * osabi.c (set_osabi): Constify.
526         * mips-tdep.c (set_mips64_transfers_32bit_regs)
527         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
528         * maint.c (maintenance_set_profile_cmd): Constify.
529         * linux-thread-db.c (set_libthread_db_search_path): Constify.
530         * language.c (set_language_command, set_range_command)
531         (set_case_command): Constify.
532         * infrun.c (set_non_stop, set_observer_mode)
533         (set_stop_on_solib_events, set_schedlock_func)
534         (set_exec_direction_func): Constify.
535         * infcmd.c (set_inferior_tty_command): Constify.
536         * disasm.c (set_disassembler_options_sfunc): Constify.
537         * demangle.c (set_demangling_command): Constify.
538         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
539         * cris-tdep.c (set_cris_version, set_cris_mode)
540         (set_cris_dwarf2_cfi): Constify.
541         * corefile.c (set_gnutarget_command): Constify.
542         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
543         (set_target_wide_charset_sfunc): Constify.
544         * breakpoint.c (update_dprintf_commands): Constify.
545         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
546         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
547         (set_disassembly_style_sfunc): Constify.
548         * arch-utils.c (set_endian, set_architecture): Constify.
549         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
550         * agent.c (set_can_use_agent): Constify.
551
552 2017-11-07  Tom Tromey  <tom@tromey.com>
553
554         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
555         (go32_pde, go32_pte, go32_pte_for_address): Constify.
556         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
557         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
558         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
559         (parse_int_arg, show_thread_default_detach_sc_cmd)
560         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
561         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
562         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
563         (show_task_pause_cmd, set_task_detach_sc_cmd)
564         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
565         (set_noninvasive_cmd, set_thread_pause_cmd)
566         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
567         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
568         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
569         * windows-nat.c (display_selectors): Constify.
570         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
571         non-const "cfunc".
572         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
573         (cmd_cfunc_eq): Likewise.
574         (struct cmd_list_element): Likewise.
575         (do_cfunc): Remove.
576         (cli_user_command_p): Update.
577         * command.h (add_cmd): Remove non-const overload.
578         (cmd_cfunc_ftype): Remove typedef.
579         (cmd_cfunc_eq): Remove non-const overload.
580         * value.c (show_values): Constify.
581         * thread.c (thread_apply_all_command): Constify.
582         * symfile.c (load_command): Constify.
583         * source.c (directory_command): Constify.
584         * maint.c (maintenance_internal_error)
585         (maintenance_demangler_warning, maintenance_space_display)
586         (maintenance_print_architecture, maintenance_translate_address)
587         (maintenance_info_selftests, maintenance_internal_warning):
588         Constify.
589         * breakpoint.c (disable_trace_command, enable_trace_command):
590         Constify.
591         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
592         Constify.
593         (add_auto_load_safe_path): Constify.
594         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
595         * top.h (show_commands): Constify.
596         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
597         * sparc64-tdep.c (adi_examine_command): Constify.
598         (adi_assign_command): Constify.
599
600 2017-11-07  Tom Tromey  <tom@tromey.com>
601
602         * frame.h (info_locals_command, info_args_command): Constify.
603         * auto-load.h (auto_load_info_scripts): Constify.
604         * inferior.h (registers_info): Constify.
605         * copying.c: Rebuild.
606         * copying.awk: Constify generated commands.
607         * auto-load.c (auto_load_info_scripts)
608         (info_auto_load_gdb_scripts): Constify.
609         * cli/cli-decode.c (struct cmd_list_element): Take a
610         cmd_const_cfunc_ftype.
611         * command.h (add_info): Take a cmd_const_cfunc_ftype.
612         * tui/tui-win.c (tui_all_windows_info): Constify.
613         * python/py-auto-load.c (info_auto_load_python_scripts):
614         Constify.
615         * cli/cli-cmds.c (show_command): Remove non-const overload.
616         * tracepoint.c (info_tvariables_command, info_scope_command):
617         Constify.
618         (info_static_tracepoint_markers_command): Constify.
619         * thread.c (info_threads_command): Constify.
620         (print_thread_info_1): Constify.
621         * target.c (info_target_command): Constify.
622         * symtab.c (info_sources_command, info_functions_command)
623         (info_types_command): Constify.
624         (info_variables_command): Remove non-const overload.
625         * symfile.c (info_ext_lang_command): Constify.
626         * stack.c (info_frame_command, info_locals_command)
627         (info_args_command): Constify.
628         (backtrace_command): Remove non-const overload.
629         * source.c (info_source_command, info_line_command): Constify.
630         * solib.c (info_sharedlibrary_command): Constify.
631         * skip.c (info_skip_command): Constify.
632         * ser-go32.c (info_serial_command): Constify.
633         * reverse.c (info_bookmarks_command): Constify.
634         * printcmd.c (info_symbol_command, info_address_command)
635         (info_display_command): Constify.
636         * osdata.c (info_osdata_command): Constify.
637         * objc-lang.c (info_selectors_command, info_classes_command):
638         Constify.
639         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
640         * memattr.c (info_mem_command): Constify.
641         * macrocmd.c (info_macro_command, info_macros_command): Constify.
642         * linux-fork.c (info_checkpoints_command): Constify.
643         * infrun.c (info_signals_command): Constify.
644         * inflow.c (info_terminal_command): Constify.
645         * inferior.c (info_inferiors_command): Constify.
646         (print_inferior): Constify.
647         * infcmd.c (info_program_command, info_all_registers_command)
648         (info_registers_command, info_vector_command)
649         (info_float_command): Constify.
650         (registers_info): Constify.
651         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
652         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
653         Constify.
654         * f-valprint.c (info_common_command): Constify.
655         * dcache.c (info_dcache_command): Constify.
656         (dcache_info_1): Constify.
657         * darwin-nat-info.c (info_mach_tasks_command)
658         (info_mach_task_command, info_mach_ports_command)
659         (info_mach_port_command, info_mach_threads_command)
660         (info_mach_thread_command, info_mach_regions_command)
661         (info_mach_regions_recurse_command, info_mach_region_command)
662         (info_mach_exceptions_command): Constify.
663         (get_task_from_args): Constify.
664         * cp-support.c (info_vtbl_command): Constify.
665         * breakpoint.c (info_watchpoints_command)
666         (info_tracepoints_command): Constify.
667         (info_breakpoints_command): Remove non-const overload.
668         * avr-tdep.c (avr_io_reg_read_command): Constify.
669         * auxv.c (info_auxv_command): Constify.
670         * ada-tasks.c (info_tasks_command): Constify.
671         (info_task): Constify.
672         * ada-lang.c (info_exceptions_command): Constify.
673
674 2017-11-07  Tom Tromey  <tom@tromey.com>
675
676         * solib.h (no_shared_libraries): Constify.
677         * frame.h (return_command): Constify.
678         * cli/cli-cmds.h (quit_command): Constify.
679         * top.h (quit_command, execute_command): Constify.
680         * target.h (flash_erase_command): Constify.
681         * inferior.h (set_inferior_args, attach_command): Constify.
682         * tracepoint.h (start_tracing, stop_tracing): Constify.
683         * breakpoint.h (break_command, tbreak_command)
684         (hbreak_command_wrapper, thbreak_command_wrapper)
685         (rbreak_command_wrapper, watch_command_wrapper)
686         (awatch_command_wrapper, rwatch_command_wrapper)
687         (get_tracepoint_by_number): Constify.
688         * symtab.c (info_variables_command, rbreak_command)
689         (symtab_symbol_info): Constify.
690         (info_variables_command): Add non-const overload.
691         * top.c (dont_repeat_command): Constify.
692         * breakpoint.c (ignore_command, commands_command)
693         (condition_command, tbreak_command, hbreak_command)
694         (thbreak_command, clear_command, break_command)
695         (info_breakpoints_command, watch_command, rwatch_command)
696         (awatch_command, trace_command, ftrace_command, strace_command)
697         (trace_pass_command, break_range_command, dprintf_command)
698         (agent_printf_command, get_tracepoint_by_number)
699         (watch_maybe_just_location, trace_pass_command): Constify.
700         (info_breakpoints_command): Add non-const overload.
701         * tracefile.c (tsave_command): Constify.
702         * infcmd.c (attach_command, disconnect_command, signal_command)
703         (queue_signal_command, stepi_command, nexti_command)
704         (finish_command, next_command, step_command, until_command)
705         (advance_command, jump_command, continue_command, run_command)
706         (start_command, starti_command, interrupt_command)
707         (run_command_1, set_inferior_args, step_1): Constify.
708         * inferior.c (add_inferior_command, remove_inferior_command)
709         (clone_inferior_command): Constify.
710         * linux-fork.c (checkpoint_command, restart_command): Constify.
711         * windows-nat.c (signal_event_command): Constify.
712         * guile/guile.c (guile_repl_command, guile_command): Constify.
713         * printcmd.c (x_command, display_command, printf_command)
714         (output_command, set_command, call_command, print_command)
715         (eval_command): Constify.
716         (non_const_set_command): Remove.
717         (_initialize_printcmd): Update.
718         * source.c (forward_search_command, reverse_search_command):
719         Constify.
720         * jit.c (jit_reader_load_command, jit_reader_unload_command):
721         Constify.
722         * infrun.c (handle_command): Constify.
723         * memattr.c (mem_command): Constify.
724         * stack.c (return_command, up_command, up_silently_command)
725         (down_command, down_silently_command, frame_command)
726         (backtrace_command, func_command, backtrace_command_1): Constify.
727         (backtrace_command): Add non-const overload.
728         * remote-sim.c (simulator_command): Constify.
729         * exec.c (set_section_command): Constify.
730         * tracepoint.c (tdump_command, trace_variable_command)
731         (tstatus_command, tstop_command, tstart_command)
732         (end_actions_pseudocommand, while_stepping_pseudocommand)
733         (collect_pseudocommand, teval_pseudocommand, actions_command)
734         (start_tracing, stop_tracing): Constify.
735         * value.c (init_if_undefined_command): Constify.
736         * tui/tui-stack.c (tui_update_command): Constify.
737         * tui/tui-win.c (tui_refresh_all_command)
738         (tui_set_tab_width_command, tui_set_win_height_command)
739         (tui_set_focus_command, tui_scroll_forward_command)
740         (tui_scroll_backward_command, tui_scroll_left_command)
741         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
742         (tui_set_win_height): Constify.
743         * tui/tui-layout.c (tui_layout_command): Constify.
744         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
745         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
746         (proc_untrace_sysexit_cmd): Constify.
747         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
748         (threadset_test_cmd, threadlist_update_test_cmd)
749         (threadalive_test): Constify.
750         * objc-lang.c (print_object_command): Constify.
751         * command.h (add_com): Constify.
752         * cli/cli-dump.c (restore_command): Constify.
753         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
754         (help_command, complete_command, shell_command, edit_command)
755         (list_command, disassemble_command, make_command)
756         (apropos_command, alias_command): Constify.
757         * cli/cli-script.c (document_command, define_command)
758         (while_command, if_command, validate_comname): Constify.
759         * cli/cli-decode.c (struct cmd_list_element): Change type of
760         "fun".
761         * target.c (do_monitor_command, flash_erase_command): Constify.
762         * regcache.c (reg_flush_command): Constify.
763         * reverse.c (reverse_step, reverse_next, reverse_stepi)
764         (reverse_nexti, reverse_continue, reverse_finish)
765         (save_bookmark_command, goto_bookmark_command)
766         (exec_reverse_once): Constify.
767         * python/python.c (python_interactive_command, python_command):
768         Constify.
769         * typeprint.c (ptype_command, whatis_command, whatis_exp):
770         Constify.
771         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
772         * gcore.c (gcore_command): Constify.
773
774 2017-11-07  Tom Tromey  <tom@tromey.com>
775
776         * printcmd.c (x_command): Call set_repeat_arguments.
777         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
778         * top.c (repeat_arguments): New global.
779         (set_repeat_arguments): New function.
780         (execute_command): Handle repeat_arguments.
781         (show_commands): Calls set_repeat_arguments.
782         * command.h (set_repeat_arguments): Declare.
783
784 2017-11-07  Tom Tromey  <tom@tromey.com>
785
786         * stack.c (backtrace_command): Use std::string.
787         (backtrace_command_1): Make "count_exp" const.
788
789 2017-11-07  Tom Tromey  <tom@tromey.com>
790
791         * source.c (directory_switch, mod_path, add_path): Constify.
792         * defs.h (add_path, mod_path, directory_switch): Constify.
793         * mi/mi-cmd-env.c (env_mod_path): Constify.
794
795 2017-11-07  Tom Tromey  <tom@tromey.com>
796
797         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
798         (run_command_1, continue_command, step_1, jump_command)
799         (signal_command, until_command, advance_command, finish_command)
800         (attach_command): Update.
801
802 2017-11-07  Tom Tromey  <tom@tromey.com>
803
804         * command.h (set_cmd_cfunc): Don't declare.
805         * cli/cli-decode.c (set_cmd_cfunc): Now static.
806
807 2017-11-07  Tom Tromey  <tom@tromey.com>
808
809         * stack.c (select_frame_command): Constify.
810         * cli/cli-decode.c (add_com_suppress_notification): Constify.
811         * command.h (add_com_suppress_notification): Constify.
812
813 2017-11-07  Tom Tromey  <tom@tromey.com>
814
815         * breakpoint.c (stop_command): Constify.
816         * cli/cli-decode.c (struct cmd_list_element): Constify.
817         * command.h (add_abbrev_prefix_cmd): Constify.
818
819 2017-11-07  Pedro Alves  <palves@redhat.com>
820
821         * breakpoint.c (extract_bp_kind): New enum.
822         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
823         factored out from ...
824         (extract_bp_number_and_location): ... here.
825         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
826
827 2017-11-07  Pedro Alves  <palves@redhat.com>
828
829         * breakpoint.c (extract_bp_number_and_location): Change return
830         type to void.  Throw error instead of warning.
831         (enable_disable_command): Adjust.
832
833 2017-11-07  Xavier Roirand  <roirand@adacore.com>
834             Pedro Alves  <palves@redhat.com>
835
836         * breakpoint.c (map_breakpoint_number_range): New, factored out
837         from ...
838         (map_breakpoint_numbers): ... here.
839         (find_location_by_number): Change parameters from string to
840         breakpoint number and location.
841         (extract_bp_number_and_location): New function.
842         (enable_disable_bp_num_loc)
843         (enable_disable_breakpoint_location_range)
844         (enable_disable_command): New functions, factored out ...
845         (enable_command, disable_command): ... these functions, and
846         adjusted to support ranges.
847         * NEWS: Document enable/disable breakpoint location range feature.
848
849 2017-11-06  Luis Machado  <luis.machado@linaro.org>
850
851         * MAINTAINERS (Write After Approval): Update my e-mail address.
852
853 2017-11-06  Pedro Alves  <palves@redhat.com>
854
855         * gnu-nat.c (gnu_terminal_init): Delete.
856         (gnu_target): Don't install gnu_terminal_init.
857         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
858         (child_terminal_init): ... this function.
859
860 2017-11-06  Pedro Alves  <palves@redhat.com>
861
862         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
863         sgtty.h.
864         * config.in, configure: Regenerate.
865
866 2017-11-06  Pedro Alves  <palves@redhat.com>
867
868         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
869         (async_init_signals): Adjust.
870         (handle_stop_sig): Rename to ...
871         (handle_sigtstp): ... this.
872         (async_stop_sig): Rename to ...
873         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
874         SIGTSTP path.
875         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
876         instead of STOP_SIGNAL thoughout.
877         (handle_stop_sig): Rename to ...
878         (handle_sigtstp): ... this.
879         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
880
881 2017-11-06  Pedro Alves  <palves@redhat.com>
882
883         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
884         longer set flags twice in row.
885
886 2017-11-06  Pedro Alves  <palves@redhat.com>
887
888         * Makefile.in (SER_HARDWIRE): Update comment.
889         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
890         * common/gdb_termios.h: Delete file.
891         * common/job-control.c: Include termios.h and unistd.h instead of
892         gdb_termios.h.
893         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
894         check.
895         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
896         Remove sgtty code.
897         * configure.ac: No longer check for termio.h and sgtty.h.
898         * configure: Regenerate.
899         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
900         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
901         Replace PROCESS_GROUP_TYPE references with pid_t references
902         throughout.
903         (gdb_getpgrp): Delete.
904         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
905         (child_terminal_inferior): Remove comment.  Remove sgtty code.
906         (child_terminal_ours_1): Use tcgetpgrp directly instead of
907         gdb_getpgrp.  Use serial_set_tty_state instead aof
908         serial_noflush_set_tty_state.  Remove sgtty code.
909         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
910         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
911         (inferior_process_group): Now returns pid_t.
912         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
913         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
914         * ser-event.c (serial_event_ops): Update.
915         * ser-go32.c (dos_noflush_set_tty_state): Delete.
916         (dos_ops): Update.
917         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
918         * ser-pipe.c (pipe_ops): Update.
919         * ser-tcp.c (tcp_ops): Update.
920         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
921         HAVE_TERMIOS checks.
922         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
923         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
924         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
925         assume termios.
926         (hardwire_noflush_set_tty_state): Delete.
927         (hardwire_print_tty_state, hardwire_drain_output)
928         (hardwire_flush_output, hardwire_flush_input)
929         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
930         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
931         code, and assume termios.
932         (hardwire_ops): Update.
933         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
934         * serial.c (serial_noflush_set_tty_state): Delete.
935         * serial.h (serial_noflush_set_tty_state): Delete.
936         (serial_ops::noflush_set_tty_state): Delete.
937
938 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
939
940         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
941         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
942         (COMMON_OBS): Remove doublest.o and dfp.o.
943         Do not build target-float.c (instead of doublest.c)
944         with -Wformat-nonliteral.
945
946         * doublest.c: Remove file.
947         * doublest.h: Remove file.
948         * dfp.c: Remove file.
949         * dfp.h: Remove file.
950
951         * target-float.c: Do not include "doublest.h" and "dfp.h".
952         (DOUBLEST): Move here from doublest.h.
953         (enum float_kind): Likewise.
954         (FLOATFORMAT_CHAR_BIT): Likewise.
955         (FLOATFORMAT_LARGEST_BYTES): Likewise.
956         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
957         (floatformat_precision): Likewise.
958         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
959         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
960         Likewise.
961         (host_float_format, host_double_format, host_long_double_format):
962         Likewise.
963         (floatformat_to_string, floatformat_from_string): Likewise.
964         (floatformat_to_doublest): Likewise.  Also, inline the original
965         convert_floatformat_to_doublest.
966         (floatformat_from_doublest): Likewise.  Also, inline the original
967         convert_floatformat_from_doublest.
968
969         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
970         (MAX_DECIMAL_STRING): Move here from dfp.c.
971         (match_endianness): Likewise.
972         (set_decnumber_context, decimal_check_errors): Likewise.
973         (decimal_from_number, decimal_to_number): Likewise.
974         (decimal_to_string, decimal_from_string): Likewise.  Make static.
975         (decimal_from_longest, decimal_from_ulongest): Likewise.
976         (decimal_to_longest): Likewise.
977         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
978         (decimal_convert): Likewise.
979
980 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
981
982         * doublest.c: Do not include "gdbtypes.h".
983         (extract_typed_floating): Remove.
984         (store_typed_floating): Remove.
985         (convert_typed_floating): Remove.
986         * doublest.h (struct type): Remove.
987         (DOUBLEST_PRINT_FORMAT): Remove.
988         (DOUBLEST_SCAN_FORMAT): Remove.
989         (extract_typed_floating): Remove.
990         (store_typed_floating): Remove.
991         (convert_typed_floating): Remove.
992
993         * dfp.c (decimal_from_doublest): Remove.
994         (decimal_to_doublest): Remove.
995         * dfp.h: Do not include "doublest.h".
996         (decimal_from_doublest): Remove.
997         (decimal_to_doublest): Remove.
998
999         * value.c: Do not include "doublest.h" and "dfp.h".
1000         (value_as_double): Remove.
1001         (unpack_double): Remove.
1002         (value_from_double): Remove.
1003         (value_from_decfloat): Remove.
1004         * value.h: Do not include "doublest.h".
1005         (value_as_double): Remove.
1006         (unpack_double): Remove.
1007         (value_from_double): Remove.
1008         (value_from_decfloat): Remove.
1009
1010 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1011
1012         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1013         (i386_extract_return_value): Use target_float_convert.
1014         (i386_store_return_value): Likewise.
1015         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1016         (i387_value_to_register): Likewise.
1017         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1018         (ia64_register_to_value): Use target_float_convert.
1019         (ia64_value_to_register): Likewise.
1020         (ia64_extract_return_value): Likewise.
1021         (ia64_store_return_value): Likewise.
1022         (ia64_push_dummy_call): Likewise.
1023         * m68k-tdep.c: Include "target-float.h".
1024         (m68k_register_to_value): Use target_float_convert.
1025         (m68k_value_to_register): Likewise.
1026         (m68k_svr4_extract_return_value): Likewise.
1027         (m68k_svr4_store_return_value): Likewise.
1028         * ppc-sysv-tdep.c: Include "target-float.h".
1029         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1030         (do_ppc_sysv_return_value): Likewise.
1031         (ppc64_sysv_abi_push_freg): Likewise.
1032         (ppc64_sysv_abi_return_value_base): Likewise.
1033         * rs6000-aix-tdep.c: Include "target-float.h".
1034         (rs6000_push_dummy_call): Use target_float_convert.
1035         (rs6000_return_value): Likewise.
1036         * rs6000-lynx178-tdep.c: Include "target-float.h".
1037         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1038         (rs6000_lynx178_return_value): Likewise.
1039         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1040         (rs6000_register_to_value): Use target_float_convert.
1041         (rs6000_value_to_register): Likewise.
1042         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1043         (arm_extract_return_value): Use target_float_convert.
1044         (arm_store_return_value): Likewise.
1045         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1046         (sh_register_convert_to_virtual): Use target_float_convert.
1047         (sh_register_convert_to_raw): Likewise.
1048         * sh64-tdep.c: Include "target-float.h".
1049         (sh64_extract_return_value): Use target_float_convert.
1050         (sh64_register_convert_to_virtual): Likewise.
1051         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
1052
1053 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1054
1055         * target-float.c (floatformat_to_host_double): New function.
1056         (floatformat_from_host_double): Likewise.
1057         (target_float_to_host_double): Likewise.
1058         (target_float_from_host_double): Likewise.
1059         * target-float.h (target_float_to_host_double): Add prototype.
1060         (target_float_from_host_double): Likewise.
1061
1062         * guile/scm-value.c: Include "target-float.h".
1063         (gdbscm_value_to_real): Use target_float_to_host_double.
1064         Handle integer source values via value_as_long.
1065         * guile/scm-math.c: Include "target-float.h".  Do not include
1066         "doublest.h", "dfp.h", and "expression.h".
1067         (vlscm_convert_typed_number): Use target_float_from_host_double.
1068         (vlscm_convert_number): Likewise.
1069
1070         * python/py-value.c (valpy_float): Use target_float_to_host_double.
1071         (convert_value_from_python): Use target_float_from_host_double.
1072
1073 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1074
1075         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1076         (cast_from_fixed): Likewise.
1077         (ada_scaling_type): New function.
1078         (ada_delta): Return value instead of DOUBLEST.  Perform target
1079         arithmetic instead of host arithmetic.
1080         (scaling_factor): Rename to ...
1081         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
1082         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
1083         (ada_fixed_to_float): Remove.
1084         (ada_float_to_fixed): Remove.
1085         * ada-lang.h (ada_fixed_to_float): Remove.
1086         (ada_float_to_fixed): Remove.
1087         (ada_delta): Return value instead of DOUBLEST.
1088         (ada_scaling_factor): Add prototype.
1089
1090         * ada-typeprint.c: Include "target-float.h".
1091         (print_fixed_point_type): Perform target arithmetic instead of
1092         host arithmetic.
1093         * ada-valprint.c: Include "target-float.h".
1094         (ada_val_print_num): Perform target arithmetic instead of
1095         host arithmetic for fixed-point types.
1096
1097 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1098
1099         * target-float.c: Include <math.h>.
1100         (floatformat_binop): New function.
1101         (floatformat_compare): Likewise.
1102         (target_float_binop): Likewise.
1103         (target_float_compare): Likewise.
1104         * target-float.h: Include "expression.h".
1105         (target_float_binop): Add prototype.
1106         (target_float_compare): Likewise.
1107
1108         * valarith.c: Do not include "doublest.h" and "dfp.h".
1109         Include "common/byte-vector.h".
1110         (value_args_as_decimal): Remove, replace by ...
1111         (value_args_as_target_float): ... this function.  Handle both
1112         binary and decimal target floating-point formats.
1113         (scalar_binop): Handle both binary and decimal FP using
1114         value_args_as_target_float and target_float_binop.
1115         (value_equal): Handle both binary and decimal FP using
1116         value_args_as_target_float and target_float_compare.
1117         (value_less): Likewise.
1118         (value_pos): Handle all scalar types as simple copy.
1119         (value_neg): Handle all scalar types via BINOP_SUB from 0.
1120         * dfp.c (decimal_binop): Throw error instead of internal_error
1121         when called with an unsupported operation code.
1122
1123 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1124
1125         * target-float.c (target_float_to_string): New function.
1126         (target_float_from_string): New function.
1127         * target-float.h (target_float_to_string): Add prototype.
1128         (target_float_from_string): Add prototype.
1129
1130         * valprint.c: Include "target-float.h".  Do not include
1131         "doublest.h" and "dfp.h".
1132         (print_floating): Use target_float_to_string.
1133         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
1134         (printf_floating): Use target_float_to_string.
1135         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1136         (print_i387_value): Use target_float_to_string.
1137         * mips-tdep.c: Include "target-float.h".
1138         (mips_print_fp_register): Use target_float_to_string.
1139         * sh64-tdep.c: Include "target-float.h".
1140         (sh64_do_fp_register): Use target_float_to_string.
1141
1142         * parse.c: Include "target-float.h".  Do not include
1143         "doublest.h" and "dfp.h".
1144         (parse_float): Use target_float_from_string.
1145         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
1146         (define_symbol): Use target_float_from_string.
1147         * gdbarch-selftests.c: Include "target-float.h".
1148         (register_to_value_test): Use target_float_from_string.
1149
1150 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1151
1152         * Makefile.c (SFILES): Add target-float.c.
1153         (HFILES_NO_SRCDIR): Add target-float.h.
1154         (COMMON_OBS): Add target-float.o.
1155         * target-float.h: New file.
1156         * target-float.c: New file.
1157
1158         * doublest.c (floatformat_classify): Fix detection of float_zero.
1159
1160         * gdbtypes.c (is_floating_type): New function.
1161         * gdbtypes.h (is_floating_type): Add prototype.
1162
1163         * value.c: Do not include "floatformat.h".
1164         (unpack_double): Use target_float_is_valid.
1165         (is_floating_value): New function.
1166         * value.h (is_floating_value): Add prototype-
1167
1168         * valarith.c: Include "target-float.h".
1169         (value_logical_not): Use target_float_is_zero.
1170
1171         * python/py-value.c: Include "target-float.h".
1172         (valpy_nonzero): Use target_float_is_zero.
1173
1174 2017-11-04  Tom Tromey  <tom@tromey.com>
1175
1176         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1177
1178 2017-11-04  Tom Tromey  <tom@tromey.com>
1179
1180         * breakpoint.c (set_momentary_breakpoint): Return
1181         breakpoint_up.
1182         (until_break_command): Update.
1183         (new_until_break_fsm): Change argument types to
1184         breakpoint_up.
1185         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1186         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1187         Remove.
1188         * infcmd.c (finish_forward): Update.
1189         * breakpoint.h (set_momentary_breakpoint)
1190         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1191         (make_cleanup_delete_breakpoint): Remove.
1192         (struct breakpoint_deleter): New.
1193         (breakpoint_up): New typedef.
1194         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1195         (insert_exception_resume_breakpoint): Update.
1196         (insert_exception_resume_from_probe): Update.
1197         (insert_longjmp_resume_breakpoint): Update.
1198         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1199         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1200         * infcall.c (call_function_by_hand_dummy): Update
1201
1202 2017-11-04  Tom Tromey  <tom@tromey.com>
1203
1204         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1205
1206 2017-11-04  Tom Tromey  <tom@tromey.com>
1207
1208         * linux-tdep.c (linux_core_info_proc_mappings): Use
1209         gdb::def_vector.
1210         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
1211         "size" argument.
1212         (linux_corefile_thread): Update.
1213         (linux_make_corefile_notes): Remove unused variable.
1214
1215 2017-11-04  Tom Tromey  <tom@tromey.com>
1216
1217         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1218         gdb::byte_vector.
1219
1220 2017-11-04  Tom Tromey  <tom@tromey.com>
1221
1222         * objfiles.c (do_free_objfile_cleanup): Remove.
1223         * compile/compile-object-load.c (compile_object_load): Update.
1224         * objfiles.h (make_cleanup_free_objfile): Remove.
1225
1226 2017-11-04  Tom Tromey  <tom@tromey.com>
1227
1228         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1229         (adi_read_versions): Change "tags" to "gdb_byte *".
1230         (adi_print_versions): Likewise.
1231
1232 2017-11-04  Tom Tromey  <tom@tromey.com>
1233
1234         * breakpoint.c
1235         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1236         from start_rbreak_breakpoints.
1237         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1238         * breakpoint.h (class scoped_rbreak_breakpoints): New.
1239         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1240         * symtab.c (do_end_rbreak_breakpoints): Remove.
1241         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1242
1243 2017-11-04  Tom Tromey  <tom@tromey.com>
1244
1245         * cp-namespace.c (reset_directive_searched): Remove.
1246         (cp_lookup_symbol_via_imports): Use scoped_restore.
1247         * cp-support.c (reset_directive_searched): Remove.
1248         (make_symbol_overload_list_using): Use scoped_restore.
1249         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1250         (reset_directive_searched): Remove.
1251
1252 2017-11-04  Tom Tromey  <tom@tromey.com>
1253
1254         * symfile.c (find_separate_debug_file_by_debuglink): Use
1255         unique_xmalloc_ptr.
1256
1257 2017-11-04  Tom Tromey  <tom@tromey.com>
1258
1259         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1260         type of "info".
1261         (compute_stack_depth): Likewise.
1262         (do_compile_dwarf_expr_to_c): Use std::vector.
1263
1264 2017-11-04  Tom Tromey  <tom@tromey.com>
1265
1266         * compile/compile-object-load.c (link_callbacks_einfo): Use
1267         std::string.
1268
1269 2017-11-04  Tom Tromey  <tom@tromey.com>
1270
1271         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1272         Use scoped_free_pendings.
1273         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1274         scoped_free_pendings.
1275         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1276         (xcoff_initial_scan): Likewise.
1277         * buildsym.c (reset_symtab_globals): Update comment.
1278         (scoped_free_pendings): Rename from really_free_pendings.
1279         (prepare_for_building): Update comment.
1280         (buildsym_init): Likewise.
1281         * buildsym.h (class scoped_free_pendings): New class.
1282         (really_free_pendings): Don't declare.
1283
1284 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
1285
1286         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1287         output when converting a zero value to a special byteorder format.
1288
1289 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1290
1291         * frame.c (do_frame_register_read): Remove aspace.
1292         * jit.c (jit_frame_sniffer): Likwise.
1293         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1294         * regcache.c (regcache::regcache): Pass nullptr.
1295         (regcache_print): Caller updated.
1296         * regcache.h (regcache::regcache): Remove one constructor
1297         parameter aspace.
1298
1299 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1300
1301         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1302
1303 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1304
1305         * breakpoint.c (insert_single_step_breakpoints): Update.
1306         * frame.c (struct frame_info) <aspace>: Add const.
1307         (frame_save_as_regcache): Add const.
1308         (get_frame_address_space): Return const address_space *.
1309         * frame.h (get_frame_address_space): Update declaration.
1310         * infrun.c (struct step_over_info) <aspace>: Add const.
1311         (set_step_over_info): Make aspace const.
1312         (displaced_step_prepare_throw): Change variable const.
1313         (resume): Likewise.
1314         (proceed): Likewise.
1315         (adjust_pc_after_break): Likewise.
1316         (save_waitstatus): Likewise.
1317         (handle_signal_stop): Likewise.
1318         (keep_going_pass_signal): Likewise.
1319         * jit.c (jit_frame_sniffer): Add const.
1320         * mips-tdep.c (mips_single_step_through_delay): Likewise.
1321         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1322         * record-full.c (record_full_wait_1): Likewise.
1323         * regcache.c (regcache::regcache): Change parameter to const.
1324         * regcache.h (regcache::regcache): Likewise.
1325         (regcache::aspace): Return const address_space *.
1326         (regcache) <m_aspace>: Add const.
1327
1328 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1329
1330         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1331         * frame.c (create_sentinel_frame): Likewise.
1332         * infrun.c (displaced_step_prepare_throw): Likewise.
1333         (resume): Likewise.
1334         (thread_still_needs_step_over_bp): Likewise.
1335         (proceed): Likewise.
1336         (do_target_wait): Likewise.
1337         (adjust_pc_after_break): Likewise.
1338         (handle_syscall_event): Likewise.
1339         (save_waitstatus): Likewise.
1340         (handle_inferior_event_1): Likewise.
1341         (handle_signal_stop): Likewise.
1342         (keep_going_pass_signal): Likewise.
1343         * linux-nat.c (status_callback): Likewise.
1344         (save_stop_reason): Likewise.
1345         (resume_stopped_resumed_lwps): Likewise.
1346         * record-full.c (record_full_exec_insn): Likewise.
1347         (record_full_wait_1): Likewise.
1348         * regcache.c (get_regcache_aspace): Remove.
1349         * regcache.h (get_regcache_aspace): Remove.
1350
1351 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1352
1353         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1354         (init_regcache_descr): Use gdbarch_num_regs.
1355         (regcache::regcache): Likewise.
1356         (regcache::get_register_status): Likewise.
1357         (regcache::assert_raw_regnum): Likewise.
1358         (regcache::cooked_read): Likewise.
1359         (regcache::cooked_read_value): Likewise.
1360         (regcache::cooked_write): Likewise.
1361         (regcache::dump): Likewise.
1362         (regcache::num_raw_registers): New method.
1363         * regcache.h (class regcache) <num_raw_registers>: New.
1364
1365 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1366
1367         * regcache.c (regcache::assert_regnum): New method.
1368         (regcache::invalidate): Call assert_regnum.
1369         (regcache::raw_update): Likewise.
1370         (regcache::raw_write): Likewise.
1371         (regcache::raw_read_part): Likewise.
1372         (regcache::raw_write_part): Likewise.
1373         (regcache::raw_supply): Likewise.
1374         (regcache::raw_supply_integer): Likewise.
1375         (regcache::raw_supply_zeroed): Likewise.
1376         (regcache::raw_collect): Likewise.
1377         (regcache::raw_collect_integer): Likewise.
1378         * regcache.h (regcache::assert_regnum): Declare.
1379
1380 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1381
1382         * regcache.c (regcache::dump): Remove code.
1383
1384 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1385
1386         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1387         Remove.
1388         <sizeof_cooked_register_status>: Remove.
1389         (init_regcache_descr): Update.
1390         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1391         (regcache::save): Likewise.
1392         (regcache::dump): Likewise.
1393
1394 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
1395
1396         * ft32-tdep.c (ft32_fetch_instruction): New function.
1397         (ft32_analyze_prologue): Use ft32_fetch_instruction().
1398
1399 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
1400
1401         * cli/cli-script.c (execute_control_command): Rename to ...
1402         (execute_control_command_1): ... this.
1403         (execute_control_command): New function.
1404
1405 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
1406
1407         * tracepoint.c (tfind_command): Remove const_cast.
1408
1409 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
1410
1411         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1412
1413 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
1414
1415         * common/common-utils.h (in_inclusive_range): New function.
1416         * arm-tdep.c (arm_record_extension_space): Use
1417         in_inclusive_range.
1418         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1419         * cris-tdep.c (cris_spec_reg_applicable): Use
1420         in_inclusive_range.
1421
1422 2017-10-30  Pedro Alves  <palves@redhat.com>
1423             Simon Marchi <simon.marchi@ericsson.com>
1424
1425         * remote.c (remote_set_syscall_catchpoint): Build a std::string
1426         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1427
1428 2017-10-30  Pedro Alves  <palves@redhat.com>
1429
1430         * common/common-utils.c (string_appendf, string_vappendf): New
1431         functions.
1432         * common/common-utils.h (string_appendf, string_vappendf): New
1433         declarations.
1434         * unittests/common-utils-selftests.c (string_appendf_func)
1435         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1436         (string_vappendf_tests): New functions.
1437         (_initialize_common_utils_selftests): Register "string_appendf" and
1438         "string_vappendf tests".
1439
1440 2017-10-30  Pedro Alves  <palves@redhat.com>
1441
1442         * unittests/common-utils-selftests.c (format_func): New typedef.
1443         (string_printf_tests, string_vprintf_tests): Tests factored out
1444         and merged to ...
1445         (test_format_func): ... this new function.
1446         (string_printf_tests, string_vprintf_tests): Reimplement on top of
1447         test_format_func.
1448
1449 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1450
1451         * darwin-nat.c: Remove include of gdb.h.
1452
1453 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1454
1455         * xtensa-xtregs.c: Fix formatting issues.
1456
1457 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1458
1459         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1460
1461 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
1462
1463         PR python/21213
1464         * python/py-infthread.c (thpy_get_inferior): Increment reference
1465         of inferior before returning it.
1466
1467 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1468
1469         * unittests/common-utils-selftests.c (format): Add
1470         ATTRIBUTE_PRINTF.
1471
1472 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1473
1474         * xml-syscall.c (struct syscall_desc): Add constructor.
1475         <name>: Change type to std::string.
1476         (syscall_desc_up): New typedef.
1477         (syscall_desc_p): Remove typeder.
1478         (DEF_VEC_P(syscall_desc_p)): Remove.
1479         (struct syscall_group_desc): Add constructor.
1480         <name>: Change type to std::string.
1481         <syscalls>: Change type to std::vector.
1482         (syscall_group_desc_up): New typedef.
1483         (syscall_group_desc_p): Remove typedef.
1484         (DEF_VEC_P(syscall_group_desc_p)): Remove.
1485         (struct syscalls_info) <syscalls>: Change type to std::vector of
1486         unique_ptr.
1487         <groups>: Likewise.
1488         <my_gdb_datadir>: Change type to std::string.
1489         (syscalls_info_up): New typedef.
1490         (allocate_syscalls_info): Remove.
1491         (syscalls_info_free_syscalls_desc): Remove.
1492         (syscalls_info_free_syscall_group_desc): Remove.
1493         (free_syscalls_info): Remove.
1494         (make_cleanup_free_syscalls_info): Remove.
1495         (syscall_group_create_syscall_group_desc): Adjust.
1496         (syscall_group_add_syscall): Adjust.
1497         (syscall_create_syscall_desc): Adjust.
1498         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1499         (init_syscalls_info): Adjust.
1500         (syscall_group_get_group_by_name): Adjust.
1501         (xml_get_syscall_number): Adjust.
1502         (xml_get_syscall_name): Adjust.
1503         (xml_list_of_syscalls): Adjust.
1504         (xml_list_syscalls_by_group): Adjust.
1505         (xml_list_of_groups): Adjust.
1506
1507 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1508
1509         * probe.h: Don't include gdb_vecs.h.
1510         (DEF_VEC_P (probe_p)): Remove.
1511         (find_probes_in_objfile): Return an std::vector.
1512         * probe.c (find_probes_in_objfile): Likewise.
1513         * breakpoint.c (breakpoint_objfile_data)
1514         <longjmp_probes>: Change type to std::vector.
1515         <exception_probes>: Likewise.
1516         (free_breakpoint_probes): Don't manually free vectors.
1517         (create_longjmp_master_breakpoint): Adjust.
1518         (create_exception_master_breakpoint): Adjust.
1519         * solib-svr4.c (svr4_create_probe_breakpoints): Change
1520         parameter type, adjust.
1521         (svr4_create_solib_event_breakpoints): Adjust.
1522
1523 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1524
1525         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1526         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1527         with new.
1528         (free_breakpoint_probes): Rename to ...
1529         (free_breakpoint_objfile_data): ... this, and call delete on
1530         bp_objfile_data..
1531
1532 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1533
1534         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1535         (loaded_script_ptr): Remove typedef.
1536         (DEF_VEC_P (loaded_script_ptr)): Remove.
1537         (struct collect_matching_scripts_data): Add constructor.
1538         <scripts_p>: Change type to (pointer to) std::vector.
1539         (collect_matching_scripts_data): Adjust.
1540         (sort_scripts_by_name): Make suitable for std::sort.
1541         (print_scripts): Don't sort vector, adjust to std::vector.
1542         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1543
1544 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1545
1546         * symfile.c (filename_language): Make struct, not typedef.  Add
1547         constructor.
1548         <ext>: Change type to std::string.
1549         (DEF_VEC_O (filename_language)): Remove.
1550         (filename_language_table): Change type to std::vector.
1551         (add_filename_language): Adjust.
1552         (set_ext_lang_command): Adjust.
1553         (info_ext_lang_command): Adjust.
1554         (deduce_language_from_filename): Adjust.
1555         (class scoped_restore_filename_language_table): Remove.
1556         (test_filename_language): Use scoped_restore.
1557         (test_set_ext_lang_command): Use scoped_restore, adjust to
1558         std::vector change.
1559
1560 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1561
1562         * symfile.c: Include selftest.h.
1563         (class scoped_restore_filename_language_table): New.
1564         (test_filename_language): New test.
1565         (test_set_ext_lang_command): New test.
1566         (_initialize_symfile): Register tests.
1567
1568 2017-10-27  Keith Seitz  <keiths@redhat.com>
1569
1570         * breakpoint.c (print_breakpoint_location): Use the symbol saved
1571         in the bp_location, falling back to find_pc_sect_function when
1572         needed.
1573         (add_location_to_breakpoint): Save sal->symbol.
1574         * breakpoint.h (struct bp_location) <symbol>: New field.
1575         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1576         * symtab.h (struct symtab_and_line) <symbol>: New field.
1577
1578 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
1579
1580         PR gdb/13669
1581         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1582         to rewind obstack.
1583
1584 2017-10-26  Pedro Alves  <palves@redhat.com>
1585
1586         * remote.c (remote_async_terminal_ours_p): Delete.
1587         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1588         Remove references to 'remote_async_terminal_ours_p'.
1589
1590 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1591
1592         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1593
1594 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1595
1596         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1597         aspace const.
1598         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1599         Likewise.
1600         * breakpoint.c (bpstat_check_location): Remove cast.
1601         (breakpoint_hit_catch_fork): Make aspce const.
1602         (breakpoint_hit_catch_solib): Likewise.
1603         (breakpoint_hit_catch_exec): Likewise.
1604         (breakpoint_hit_ranged_breakpoint): Likewise.
1605         (breakpoint_hit_watchpoint): Likewise.
1606         (base_breakpoint_breakpoint_hit): Likewise.
1607         (bkpt_breakpoint_hit): Likewise.
1608         (dprintf_breakpoint_hit): Likewise.
1609         (tracepoint_breakpoint_hit): Likewise.
1610         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1611
1612 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1613
1614         * breakpoint.c (breakpoint_location_address_match): Change
1615         "struct address_space *" to "const address_space".
1616         (breakpoint_location_address_range_overlap): Likewise.
1617         (breakpoint_here_p): Likewise.
1618         (breakpoint_in_range_p): Likewise.
1619         (moribund_breakpoint_here_p): Likewise.
1620         (bp_location_inserted_here_p): Likewise.
1621         (software_breakpoint_inserted_here_p): Likewise.
1622         (hardware_breakpoint_inserted_here_p): Likewise.
1623         (hardware_watchpoint_inserted_in_range): Likewise.
1624         (bpstat_check_location): Likewise.
1625         (bpstat_stop_status): Likewise.
1626         (breakpoint_address_match): Likewise.
1627         (breakpoint_address_match_range): Likewise.
1628         (breakpoint_location_address_match): Likewise.
1629         (breakpoint_location_address_range_overlap): Likewise.
1630         (insert_single_step_breakpoint): Likewise.
1631         (breakpoint_has_location_inserted_here): Likewise.
1632         (single_step_breakpoint_inserted_here_p): Likewise.
1633         (pc_at_non_inline_function): Likewise.
1634         * breakpoint.h (bpstat_stop_status): Update declaration.
1635         (breakpoint_here_p): Likewise.
1636         (breakpoint_in_range_p): Likewise.
1637         (moribund_breakpoint_here_p): Likewise.
1638         (breakpoint_inserted_here_p): Likewise.
1639         (software_breakpoint_inserted_here_p): Likewise.
1640         (hardware_breakpoint_inserted_here_p): Likewise.
1641         (breakpoint_has_location_inserted_here): Likewise.
1642         (single_step_breakpoint_inserted_here_p): Likewise.
1643         (hardware_watchpoint_inserted_in_range): Likewise.
1644         (breakpoint_address_match): Likewise.
1645         (insert_single_step_breakpoint): Likewise.
1646         (pc_at_non_inline_function): Likewise.
1647         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1648         * record.c (record_check_stopped_by_breakpoint): Likewise.
1649         * record.h (record_check_stopped_by_breakpoint): Likewise.
1650         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1651
1652 2017-10-25  Yao Qi  <yao.qi@linaro.org>
1653
1654         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1655         regcache->arch () instead get_regcache_arch.
1656         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1657         Likewise.
1658         (aarch64_fbsd_store_inferior_registers): Likewise.
1659         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1660         (store_gregs_to_thread): Likewise.
1661         (fetch_fpregs_from_thread): Likewise.
1662         (store_fpregs_to_thread): Likewise.
1663         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1664         (aarch64_store_return_value): Likewise.
1665         (aarch64_software_single_step): Likewise.
1666         * aix-thread.c (aix_thread_wait): Likewise.
1667         (supply_reg32): Likewise.
1668         (supply_sprs64): Likewise.
1669         (supply_sprs32): Likewise.
1670         (fill_gprs64): Likewise.
1671         (fill_gprs32): Likewise.
1672         (fill_sprs64): Likewise.
1673         (fill_sprs32): Likewise.
1674         (store_regs_user_thread): Likewise.
1675         (store_regs_kernel_thread): Likewise.
1676         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1677         (alphabsd_store_inferior_registers): Likewise.
1678         * alpha-tdep.c (alpha_extract_return_value): Likewise.
1679         (alpha_store_return_value): Likewise.
1680         (alpha_deal_with_atomic_sequence): Likewise.
1681         (alpha_next_pc): Likewise.
1682         (alpha_software_single_step): Likewise.
1683         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1684         (amd64bsd_store_inferior_registers): Likewise.
1685         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1686         Likewise.
1687         (amd64_linux_store_inferior_registers): Likewise.
1688         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1689         (amd64_collect_native_gregset): Likewise.
1690         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1691         (amd64obsd_collect_uthread): Likewise.
1692         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1693         (amd64_collect_fpregset): Likewise.
1694         (amd64_supply_fxsave): Likewise.
1695         (amd64_supply_xsave): Likewise.
1696         (amd64_collect_fxsave): Likewise.
1697         (amd64_collect_xsave): Likewise.
1698         * arc-tdep.c (arc_write_pc): Likewise.
1699         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1700         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1701         (arm_fbsd_store_inferior_registers): Likewise.
1702         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1703         (store_vfp_regs): Likewise.
1704         (arm_linux_fetch_inferior_registers): Likewise.
1705         (arm_linux_store_inferior_registers): Likewise.
1706         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1707         (arm_linux_sigreturn_next_pc): Likewise.
1708         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1709         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1710         (fetch_register): Likewise.
1711         (store_register): Likewise.
1712         * arm-tdep.c (arm_is_thumb): Likewise.
1713         (displaced_in_arm_mode): Likewise.
1714         (bx_write_pc): Likewise.
1715         (arm_get_next_pcs_addr_bits_remove): Likewise.
1716         (arm_software_single_step): Likewise.
1717         (arm_extract_return_value): Likewise.
1718         (arm_store_return_value): Likewise.
1719         (arm_write_pc): Likewise.
1720         * bfin-tdep.c (bfin_extract_return_value): Likewise.
1721         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
1722         (bsd_uthread_store_registers): Likewise.
1723         * core-regset.c (fetch_core_registers): Likewise.
1724         * corelow.c (get_core_registers): Likewise.
1725         * cris-tdep.c (cris_store_return_value): Likewise.
1726         (cris_extract_return_value): Likewise.
1727         (find_step_target): Likewise.
1728         (find_step_target): Likewise.
1729         (cris_software_single_step): Likewise.
1730         * ctf.c (ctf_fetch_registers): Likewise.
1731         * darwin-nat.c (cancel_breakpoint): Likewise.
1732         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
1733         * frv-tdep.c (frv_extract_return_value): Likewise.
1734         * ft32-tdep.c (ft32_store_return_value): Likewise.
1735         (ft32_extract_return_value): Likewise.
1736         * go32-nat.c (fetch_register): Likewise.
1737         (go32_fetch_registers): Likewise.
1738         (go32_store_registers): Likewise.
1739         (store_register): Likewise.
1740         * h8300-tdep.c (h8300_extract_return_value): Likewise.
1741         (h8300_store_return_value): Likewise.
1742         * hppa-linux-nat.c (fetch_register): Likewise.
1743         (store_register): Likewise.
1744         (hppa_linux_fetch_inferior_registers): Likewise.
1745         (hppa_linux_store_inferior_registers): Likewise.
1746         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
1747         (i386_darwin_store_inferior_registers): Likewise.
1748         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
1749         (gnu_store_registers): Likewise.
1750         * i386-linux-nat.c (fetch_register): Likewise.
1751         (store_register): Likewise.
1752         (supply_gregset): Likewise.
1753         (fill_gregset): Likewise.
1754         (i386_linux_fetch_inferior_registers): Likewise.
1755         (i386_linux_store_inferior_registers): Likewise.
1756         (i386_linux_resume): Likewise.
1757         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
1758         Likewise.
1759         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
1760         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
1761         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
1762         (i386obsd_collect_uthread): Likewise.
1763         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1764         (i386_supply_gregset): Likewise.
1765         (i386_collect_gregset): Likewise.
1766         (i386_supply_fpregset): Likewise.
1767         (i386_collect_fpregset): Likewise.
1768         (i386_mpx_bd_base): Likewise.
1769         * i386-v4-nat.c (supply_fpregset): Likewise.
1770         (fill_fpregset): Likewise.
1771         * i387-tdep.c (i387_supply_fsave): Likewise.
1772         (i387_collect_fsave): Likewise.
1773         (i387_supply_fxsave): Likewise.
1774         (i387_collect_fxsave): Likewise.
1775         (i387_supply_xsave): Likewise.
1776         (i387_collect_xsave): Likewise.
1777         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
1778         (ia64_linux_store_registers): Likewise.
1779         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
1780         (ia64_extract_return_value): Likewise.
1781         (ia64_store_return_value): Likewise.
1782         (find_func_descr): Likewise.
1783         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
1784         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
1785         (inf_ptrace_store_registers): Likewise.
1786         * infrun.c (use_displaced_stepping): Likewise.
1787         (displaced_step_prepare_throw): Likewise.
1788         (resume): Likewise.
1789         (proceed): Likewise.
1790         (do_target_wait): Likewise.
1791         (adjust_pc_after_break): Likewise.
1792         (handle_inferior_event_1): Likewise.
1793         (handle_signal_stop): Likewise.
1794         (save_infcall_suspend_state): Likewise.
1795         (restore_infcall_suspend_state): Likewise.
1796         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
1797         * jit.c (jit_frame_prev_register): Likewise.
1798         * linux-nat.c (save_stop_reason): Likewise.
1799         (linux_nat_wait_1): Likewise.
1800         (resume_stopped_resumed_lwps): Likewise.
1801         * linux-record.c (record_linux_sockaddr): Likewise.
1802         (record_linux_msghdr): Likewise.
1803         (record_linux_system_call): Likewise.
1804         * linux-tdep.c (linux_collect_thread_registers): Likewise.
1805         * lm32-tdep.c (lm32_extract_return_value): Likewise.
1806         (lm32_store_return_value): Likewise.
1807         * m32c-tdep.c (m32c_read_flg): Likewise.
1808         (m32c_pseudo_register_read): Likewise.
1809         (m32c_pseudo_register_write): Likewise.
1810         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
1811         (m32r_linux_collect_gregset): Likewise.
1812         * m32r-tdep.c (m32r_store_return_value): Likewise.
1813         (m32r_extract_return_value): Likewise.
1814         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1815         (m68kbsd_collect_fpregset): Likewise.
1816         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
1817         * m68k-linux-nat.c (fetch_register): Likewise.
1818         (old_fetch_inferior_registers): Likewise.
1819         (old_store_inferior_registers): Likewise.
1820         (store_regs): Likewise.
1821         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
1822         (m68k_svr4_store_return_value): Likewise.
1823         * m88k-tdep.c (m88k_store_arguments): Likewise.
1824         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
1825         (mi_cmd_data_write_register_values): Likewise.
1826         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
1827         (mips_fbsd_store_inferior_registers): Likewise.
1828         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
1829         (mips_fbsd_supply_gregs): Likewise.
1830         (mips_fbsd_collect_fpregs): Likewise.
1831         (mips_fbsd_collect_gregs): Likewise.
1832         (mips_fbsd_supply_fpregset): Likewise.
1833         (mips_fbsd_collect_fpregset): Likewise.
1834         (mips_fbsd_supply_gregset): Likewise.
1835         (mips_fbsd_collect_gregset): Likewise.
1836         * mips-linux-nat.c (supply_gregset): Likewise.
1837         (fill_gregset): Likewise.
1838         (supply_fpregset): Likewise.
1839         (fill_fpregset): Likewise.
1840         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
1841         (mips_fill_gregset): Likewise.
1842         (mips_supply_fpregset): Likewise.
1843         (mips_fill_fpregset): Likewise.
1844         (mips64_supply_gregset): Likewise.
1845         (micromips_linux_sigframe_validate): Likewise.
1846         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
1847         (mipsnbsd_fetch_inferior_registers): Likewise.
1848         (mipsnbsd_store_inferior_registers): Likewise.
1849         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1850         (mipsnbsd_supply_gregset): Likewise.
1851         (mipsnbsd_iterate_over_regset_sections): Likewise.
1852         (mipsnbsd_supply_reg): Likewise.
1853         (mipsnbsd_supply_fpreg): Likewise.
1854         * mips-tdep.c (mips_in_frame_stub): Likewise.
1855         (mips_dummy_id): Likewise.
1856         (is_octeon_bbit_op): Likewise.
1857         (micromips_bc1_pc): Likewise.
1858         (extended_mips16_next_pc): Likewise.
1859         (mips16_next_pc): Likewise.
1860         (deal_with_atomic_sequence): Likewise.
1861         * moxie-tdep.c (moxie_process_readu): Likewise.
1862         * nios2-tdep.c (nios2_get_next_pc): Likewise.
1863         * nto-procfs.c (procfs_store_registers): Likewise.
1864         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
1865         (ppcfbsd_store_inferior_registers): Likewise.
1866         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
1867         (fetch_altivec_register): Likewise.
1868         (get_spe_registers): Likewise.
1869         (fetch_spe_register): Likewise.
1870         (fetch_altivec_registers): Likewise.
1871         (fetch_all_gp_regs): Likewise.
1872         (fetch_all_fp_regs): Likewise.
1873         (store_vsx_register): Likewise.
1874         (store_altivec_register): Likewise.
1875         (set_spe_registers): Likewise.
1876         (store_spe_register): Likewise.
1877         (store_altivec_registers): Likewise.
1878         (store_all_gp_regs): Likewise.
1879         (store_all_fp_regs): Likewise.
1880         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
1881         (ppc_linux_collect_gregset): Likewise.
1882         (ppc_canonicalize_syscall): Likewise.
1883         (ppc_linux_record_signal): Likewise.
1884         (ppu2spu_prev_register): Likewise.
1885         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
1886         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
1887         (ppcobsd_store_registers): Likewise.
1888         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
1889         Likewise.
1890         (ppc_ravenscar_generic_store_registers): Likewise.
1891         * procfs.c (procfs_fetch_registers): Likewise.
1892         (procfs_store_registers): Likewise.
1893         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
1894         (ravenscar_store_registers): Likewise.
1895         (ravenscar_prepare_to_store): Likewise.
1896         * record-btrace.c (record_btrace_fetch_registers): Likewise.
1897         * record-full.c (record_full_wait_1): Likewise.
1898         (record_full_registers_change): Likewise.
1899         (record_full_store_registers): Likewise.
1900         (record_full_core_fetch_registers): Likewise.
1901         (record_full_save): Likewise.
1902         (record_full_goto_insn): Likewise.
1903         * regcache.c (regcache_register_size): Likewise.
1904         (get_regcache_arch): Remove.
1905         (regcache_read_pc): Likewise.
1906         * regcache.h (get_regcache_arch): Remove.
1907         * remote-sim.c (gdbsim_fetch_register): Likewise.
1908         (gdbsim_store_register): Likewise.
1909         * remote.c (fetch_register_using_p): Likewise.
1910         (send_g_packet): Likewise.
1911         (remote_prepare_to_store): Likewise.
1912         (store_registers_using_G): Likewise.
1913         * reverse.c (save_bookmark_command): Likewise.
1914         (goto_bookmark_command): Likewise.
1915         * rs6000-aix-tdep.c (branch_dest): Likewise.
1916         * rs6000-nat.c (rs6000_ptrace64): Likewise.
1917         (fetch_register): Likewise.
1918         * rs6000-tdep.c (ppc_supply_reg): Likewise.
1919         (ppc_collect_reg): Likewise.
1920         (ppc_collect_gregset): Likewise.
1921         (ppc_collect_fpregset): Likewise.
1922         (ppc_collect_vsxregset): Likewise.
1923         (ppc_collect_vrregset): Likewise.
1924         (ppc_displaced_step_hw_singlestep): Likewise.
1925         (rs6000_pseudo_register_read): Likewise.
1926         (rs6000_pseudo_register_write): Likewise.
1927         * s390-linux-nat.c (supply_gregset): Likewise.
1928         (fill_gregset): Likewise.
1929         (s390_linux_fetch_inferior_registers): Likewise.
1930         * s390-linux-tdep.c (s390_write_pc): Likewise.
1931         (s390_software_single_step): Likewise.
1932         (s390_all_but_pc_registers_record): Likewise.
1933         (s390_linux_syscall_record): Likewise.
1934         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
1935         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
1936         (shnbsd_store_inferior_registers): Likewise.
1937         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
1938         (sh_extract_return_value_fpu): Likewise.
1939         (sh_store_return_value_nofpu): Likewise.
1940         (sh_corefile_supply_regset): Likewise.
1941         (sh_corefile_collect_regset): Likewise.
1942         * sh64-tdep.c (sh64_extract_return_value): Likewise.
1943         (sh64_store_return_value): Likewise.
1944         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
1945         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
1946         (sparc_store_inferior_registers): Likewise.
1947         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
1948         (sparc_ravenscar_prepare_to_store): Likewise.
1949         * sparc-tdep.c (sparc32_store_arguments): Likewise.
1950         (sparc_analyze_control_transfer): Likewise.
1951         (sparc_step_trap): Likewise.
1952         (sparc_software_single_step): Likewise.
1953         (sparc32_gdbarch_init): Likewise.
1954         (sparc_supply_rwindow): Likewise.
1955         (sparc_collect_rwindow): Likewise.
1956         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
1957         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
1958         (sparc64nbsd_collect_gregset): Likewise.
1959         (sparc64nbsd_supply_fpregset): Likewise.
1960         (sparc64nbsd_collect_fpregset): Likewise.
1961         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1962         (sparc64_supply_gregset): Likewise.
1963         (sparc64_collect_gregset): Likewise.
1964         (sparc64_supply_fpregset): Likewise.
1965         (sparc64_collect_fpregset): Likewise.
1966         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
1967         * spu-tdep.c (spu_unwind_sp): Likewise.
1968         (spu2ppu_prev_register): Likewise.
1969         (spu_memory_remove_breakpoint): Likewise.
1970         * stack.c (return_command): Likewise.
1971         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
1972         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
1973         * tracefile.c (trace_save_ctf): Likewise.
1974         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
1975         (do_windows_store_inferior_registers): Likewise.
1976         (windows_resume): Likewise.
1977         * xtensa-linux-nat.c (fill_gregset): Likewise.
1978         (supply_gregset_reg): Likewise.
1979         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
1980         (xtensa_register_read_masked): Likewise.
1981         (xtensa_supply_gregset): Likewise.
1982         (xtensa_extract_return_value): Likewise.
1983         (xtensa_store_return_value): Likewise.
1984
1985 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
1986
1987         * doublest.c (floatformat_from_string): New function.
1988         * doublest.h (floatformat_from_string): Add prototype.
1989
1990         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
1991         (OP_FLOAT): ... this.
1992         * expression.h: Do not include "doublest.h".
1993         (union exp_element): Replace doubleconst and decfloatconst by
1994         new element floatconst.
1995         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
1996         (ada_evaluate_subexp): Likewise.
1997         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
1998         OP_DOUBLE and OP_DECFLOAT.
1999         * expprint.c (print_subexp_standard): Likewise.
2000         (dump_subexp_body_standard): Likewise.
2001         * breakpoint.c (watchpoint_exp_is_const): Likewise.
2002
2003         * parse.c: Include "dfp.h".
2004         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2005         (write_exp_elt_floatcst): New function.
2006         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2007         and OP_DECFLOAT.
2008         (operator_check_standard): Likewise.
2009         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
2010         Return target format buffer instead of host DOUBLEST.
2011         Use floatformat_from_string and decimal_from_string to parse
2012         either binary or decimal floating-point types.
2013         (parse_c_float): Remove.
2014         * parser-defs.h: Do not include "doublest.h".
2015         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2016         (write_exp_elt_floatcst): Add prototype.
2017         (parse_float): Update prototype.
2018         (parse_c_float): Remove.
2019
2020         * c-exp.y: Do not include "dfp.h".
2021         (typed_val_float): Use byte buffer instead of DOUBLEST.
2022         (typed_val_decfloat): Remove.
2023         (DECFLOAT): Remove.
2024         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2025         (parse_number): Update to new parse_float interface.
2026         Parse suffixes and determine type before calling parse_float.
2027         Handle decimal and binary FP types the same way.
2028
2029         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2030         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2031         (parse_number): Update to new parse_float interface.
2032         Parse suffixes and determine type before calling parse_float.
2033
2034         * f-exp.y: Replace dval by typed_val_float.
2035         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2036         (parse_number): Use parse_float instead of atof.
2037
2038         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2039         (parse_go_float): Remove.
2040         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2041         (parse_number): Call parse_float instead of parse_go_float.
2042         Parse suffixes and determine type before calling parse_float.
2043
2044         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2045         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2046         (parse_number): Update to new parse_float interface.
2047         Parse suffixes and determine type before calling parse_float.
2048
2049         * m2-exp.y: Replace dval by byte buffer val.
2050         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2051         (parse_number): Call parse_float instead of atof.
2052
2053         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2054         (lex_number): Call parse_float instead of strtod.
2055         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2056         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2057         Use write_exp_elt_floatcst.
2058         (unit_testing): Remove static variable.
2059         (rust_type): Do not check unit_testing.
2060         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
2061
2062         * ada-exp.y (type_float, type_double): Remove.
2063         (typed_val_float): Use byte buffer instead of DOUBLEST.
2064         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2065         * ada-lex.l (processReal): Use parse_float instead of sscanf.
2066
2067 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
2068
2069         * aarch64-tdep.h (enum aarch64_regnum): Remove.
2070         * arch/aarch64.h: New file.
2071
2072 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2073
2074         * dfp.h (decimal_from_string): Use const reference for argument.
2075         * dfp.c (decimal_from_string): Likewise.
2076
2077 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2078
2079         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2080         * sh64-tdep.c (sh64_do_fp_register): Likewise.
2081         * mips-tdep.c (mips_print_fp_register): Likewise.
2082
2083 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2084
2085         * common/format.h (enum argclass): Replace decfloat_arg by
2086         dec32float_arg, dec64float_arg, and dec128float_arg.
2087         * common/format.c (parse_format_string): Update to return
2088         new decimal float argument classes.
2089
2090         * printcmd.c (printf_decfloat): Rename to ...
2091         (printf_floating): ... this.  Add argclass argument, and use it
2092         instead of parsing the format string again.  Add support for
2093         binary floating-point values, using floatformat_to_string.
2094         Convert value to the target format if it doesn't already match.
2095         (ui_printf): Call printf_floating instead of printf_decfloat,
2096         also for double_arg / long_double_arg.  Pass argclass.
2097
2098         * dfp.c (decimal_to_string): Add format string argument.
2099         * dfp.h (decimal_to_string): Likewise.
2100
2101         * doublest.c (floatformat_to_string): Add format string argument.
2102         * doublest.h (floatformat_to_string): Likewise.
2103
2104 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2105
2106         * doublest.c (floatformat_precision): New routine.
2107         (floatformat_to_string): Likewise.
2108         * doublest.c (floatformat_to_string): Add prototype.
2109
2110         * printcmd.c (print_scalar_formatted): Only call print_floating
2111         on floating-point types.
2112         * valprint.c: Do not include "floatformat.h".
2113         (generic_val_print_decfloat): Remove.
2114         (generic_val_print): Call generic_val_print_float for both
2115         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2116         (print_floating): Use floatformat_to_string.  Handle decimal float.
2117         (print_decimal_floating): Remove, merge into floatformat_to_string.
2118         * value.h (print_decimal_floating): Remove.
2119
2120         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2121
2122 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2123
2124         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2125
2126 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2127
2128         * memattr.h: Don't include vec.h.
2129         (struct mem_attrib): Initialize fields.
2130         <unknown>: New static method.
2131         (struct mem_region): Add constructors, operator<, initialize
2132         fields.
2133         * memattr.c: Include algorithm.
2134         (default_mem_attrib, unknown_mem_attrib): Remove.
2135         (user_mem_region_list): New global.
2136         (target_mem_region_list, mem_region_list): Change type to
2137         std::vector<mem_region>.
2138         (mem_use_target): Now a function.
2139         (target_mem_regions_valid): Change type to bool.
2140         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2141         (require_user_regions): Adjust.
2142         (require_target_regions): Adjust.
2143         (create_mem_region): Adjust.
2144         (lookup_mem_region): Adjust.
2145         (invalidate_target_mem_regions): Adjust.
2146         (mem_clear): Rename to...
2147         (user_mem_clear): ... this, and adjust.
2148         (mem_command): Adjust.
2149         (info_mem_command): Adjust.
2150         (mem_enable, enable_mem_command, mem_disable,
2151         disable_mem_command): Adjust.
2152         (mem_delete): Adjust.
2153         (delete_mem_command): Adjust.
2154         * memory-map.h (parse_memory_map): Return an std::vector.
2155         * memory-map.c (parse_memory_map): Likewise.
2156         (struct memory_map_parsing_data): Add constructor.
2157         <memory_map>: Point to std::vector.
2158         (memory_map_start_memory): Adjust.
2159         (memory_map_end_memory): Adjust.
2160         (memory_map_end_property): Adjust.
2161         (clear_result): Remove.
2162         * remote.c (remote_memory_map): Return an std::vector.
2163         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2164         Remove.
2165         (target_debug_print_mem_region_vector): New.
2166         * target-delegates.c: Regenerate.
2167         * target.h (mem_region_vector): New typedef.
2168         (to_memory_map): Return mem_region_vector.
2169         (target_memory_map): Return an std::vector.
2170         * target.c (target_memory_map): Return an std::vector.
2171         (flash_erase_command): Adjust.
2172
2173 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2174
2175         * memory-map.c (struct memory_map_parsing_data) <property_name>:
2176         Change type to std::string.
2177         (memory_map_start_property): Adjust.
2178         (memory_map_end_property): Adjust.
2179
2180 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2181
2182         * infrun.h: Include common/byte-vector.h.
2183         (struct displaced_step_closure): New struct.
2184         (struct buf_displaced_step_closure): New struct.
2185         * infrun.c (displaced_step_closure::~displaced_step_closure):
2186         Provide default implementation.
2187         (displaced_step_clear): Deallocate step closure with delete.
2188         * aarch64-tdep.c (displaced_step_closure): Rename to ...
2189         (aarch64_displaced_step_closure): ... this, extend
2190         displaced_step_closure.
2191         (aarch64_displaced_step_data) <dsc>: Change type to
2192         aarch64_displaced_step_closure.
2193         (aarch64_displaced_step_copy_insn): Adjust to type change, use
2194         unique_ptr.
2195         (aarch64_displaced_step_fixup): Add cast for displaced step
2196         closure.
2197         * amd64-tdep.c (displaced_step_closure): Rename to ...
2198         (amd64_displaced_step_closure): ... this, extend
2199         displaced_step_closure.
2200         <insn_buf>: Change type to std::vector<gdb_byte>.
2201         <max_len>: Remove.
2202         (fixup_riprel): Change type of DSC parameter, adjust to type
2203         change of insn_buf.
2204         (fixup_displaced_copy): Change type of DSC parameter.
2205         (amd64_displaced_step_copy_insn): Instantiate
2206         amd64_displaced_step_closure.
2207         (amd64_displaced_step_fixup): Add cast for closure type, adjust
2208         to type change of insn_buf.
2209         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2210         parameter DSC.
2211         (arm_linux_copy_svc): Likewise.
2212         (cleanup_kernel_helper_return): Likewise.
2213         (arm_catch_kernel_helper_return): Likewise.
2214         (arm_linux_displaced_step_copy_insn): Instantiate
2215         arm_displaced_step_closure.
2216         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2217         (displaced_read_reg): Change type of parameter DSC.
2218         (branch_write_pc): Likewise.
2219         (load_write_pc): Likewise.
2220         (alu_write_pc): Likewise.
2221         (displaced_write_reg): Likewise.
2222         (arm_copy_unmodified): Likewise.
2223         (thumb_copy_unmodified_32bit): Likewise.
2224         (thumb_copy_unmodified_16bit): Likewise.
2225         (cleanup_preload): Likewise.
2226         (install_preload): Likewise.
2227         (arm_copy_preload): Likewise.
2228         (thumb2_copy_preload): Likewise.
2229         (install_preload_reg): Likewise.
2230         (arm_copy_preload_reg): Likewise.
2231         (cleanup_copro_load_store): Likewise.
2232         (install_copro_load_store): Likewise.
2233         (arm_copy_copro_load_store) Likewise.
2234         (thumb2_copy_copro_load_store): Likewise.
2235         (cleanup_branch): Likewise.
2236         (install_b_bl_blx): Likewise.
2237         (arm_copy_b_bl_blx): Likewise.
2238         (thumb2_copy_b_bl_blx): Likewise.
2239         (thumb_copy_b): Likewise.
2240         (install_bx_blx_reg): Likewise.
2241         (arm_copy_bx_blx_reg): Likewise.
2242         (thumb_copy_bx_blx_reg): Likewise.
2243         (cleanup_alu_imm): Likewise.
2244         (arm_copy_alu_imm): Likewise.
2245         (thumb2_copy_alu_imm): Likewise.
2246         (cleanup_alu_reg): Likewise.
2247         (install_alu_reg): Likewise.
2248         (arm_copy_alu_reg): Likewise.
2249         (thumb_copy_alu_reg): Likewise.
2250         (cleanup_alu_shifted_reg): Likewise.
2251         (install_alu_shifted_reg): Likewise.
2252         (arm_copy_alu_shifted_reg): Likewise.
2253         (cleanup_load): Likewise.
2254         (cleanup_store): Likewise.
2255         (arm_copy_extra_ld_st): Likewise.
2256         (install_load_store): Likewise.
2257         (thumb2_copy_load_literal): Likewise.
2258         (thumb2_copy_load_reg_imm): Likewise.
2259         (arm_copy_ldr_str_ldrb_strb): Likewise.
2260         (cleanup_block_load_all): Likewise.
2261         (cleanup_block_store_pc): Likewise.
2262         (cleanup_block_load_pc): Likewise.
2263         (arm_copy_block_xfer): Likewise.
2264         (thumb2_copy_block_xfer): Likewise.
2265         (cleanup_svc): Likewise.
2266         (install_svc): Likewise.
2267         (arm_copy_svc): Likewise.
2268         (thumb_copy_svc): Likewise.
2269         (arm_copy_undef): Likewise.
2270         (thumb_32bit_copy_undef): Likewise.
2271         (arm_copy_unpred): Likewise.
2272         (arm_decode_misc_memhint_neon): Likewise.
2273         (arm_decode_unconditional): Likewise.
2274         (arm_decode_miscellaneous): Likewise.
2275         (arm_decode_dp_misc): Likewise.
2276         (arm_decode_ld_st_word_ubyte): Likewise.
2277         (arm_decode_media): Likewise.
2278         (arm_decode_b_bl_ldmstm): Likewise.
2279         (arm_decode_ext_reg_ld_st): Likewise.
2280         (thumb2_decode_dp_shift_reg): Likewise.
2281         (thumb2_decode_ext_reg_ld_st): Likewise.
2282         (arm_decode_svc_copro): Likewise.
2283         (thumb2_decode_svc_copro): Likewise.
2284         (install_pc_relative): Likewise.
2285         (thumb_copy_pc_relative_16bit): Likewise.
2286         (thumb_decode_pc_relative_16bit): Likewise.
2287         (thumb_copy_pc_relative_32bit): Likewise.
2288         (thumb_copy_16bit_ldr_literal): Likewise.
2289         (thumb_copy_cbnz_cbz): Likewise.
2290         (thumb2_copy_table_branch): Likewise.
2291         (cleanup_pop_pc_16bit_all): Likewise.
2292         (thumb_copy_pop_pc_16bit): Likewise.
2293         (thumb_process_displaced_16bit_insn): Likewise.
2294         (decode_thumb_32bit_ld_mem_hints): Likewise.
2295         (thumb_process_displaced_32bit_insn): Likewise.
2296         (thumb_process_displaced_insn): Likewise.
2297         (arm_process_displaced_insn): Likewise.
2298         (arm_displaced_init_closure): Likewise.
2299         (arm_displaced_step_fixup): Add cast for closure.
2300         * arm-tdep.h: Include infrun.h.
2301         (displaced_step_closure): Rename to ...
2302         (arm_displaced_step_closure): ... this, extend
2303         displaced_step_closure.
2304         <u::svc::copy_svc_os>: Change type of parameter DSC.
2305         <cleanup>: Likewise.
2306         (arm_process_displaced_insn): Likewise.
2307         (arm_displaced_init_closure): Likewise.
2308         (displaced_read_reg): Likewise.
2309         (displaced_write_reg): Likewise.
2310         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2311         Adjust.
2312         * i386-tdep.h: Include infrun.h.
2313         (i386_displaced_step_closure): New typedef.
2314         * i386-tdep.c (i386_displaced_step_copy_insn): Use
2315         i386_displaced_step_closure.
2316         (i386_displaced_step_fixup): Adjust.
2317         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2318         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2319         and unique_ptr.
2320         (ppc_displaced_step_fixup): Adjust.
2321         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2322         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2323         and unique_ptr.
2324         (s390_displaced_step_fixup): Adjust.
2325
2326 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2327
2328         * interps.h (interp_resume, interp_suspend, interp_set_temp):
2329         Remove declarations.
2330
2331 2017-10-20  Tom Tromey  <tom@tromey.com>
2332
2333         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2334         std::vector.
2335         (gdb_bfd_record_inclusion): Update.
2336         (bfdp): Remove typedef.
2337
2338 2017-10-20  Tom Tromey  <tom@tromey.com>
2339
2340         * gdb_bfd.c (gdb_bfd_ref): Use new.
2341         (struct gdb_bfd_data): Add constructor, destructor, and member
2342         initializers.
2343         (gdb_bfd_unref): Use delete.
2344
2345 2017-10-20  Tom Tromey  <tom@tromey.com>
2346
2347         * exec.c (exec_file_attach): Use new_bfd_ref.
2348         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2349         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2350         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2351         new_bfd_ref.
2352         * gdb_bfd.h (new_bfd_ref): New function.
2353
2354 2017-10-20  Pedro Alves  <palves@redhat.com>
2355
2356         * main.c (captured_command_loop): Add attribute noinline.
2357
2358 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
2359
2360         * interps.c (struct interp_factory): Add constructor.
2361         (interp_factory_p): Remove typedef.
2362         (DEF_VEC_P(interp_factory_p)): Remove.
2363         (interpreter_factories): Change type to std::vector.
2364         (interp_factory_register): Adjust.
2365         (interp_lookup): Adjust.
2366         (interpreter_completer): Adjust.
2367
2368 2017-10-19  Tom Tromey  <tom@tromey.com>
2369
2370         * break-catch-syscall.c (catch_syscall_completer): Use
2371         std::string, gdb::unique_xmalloc_ptr.
2372
2373 2017-10-19  Tom Tromey  <tom@tromey.com>
2374
2375         * infcall.c (call_function_by_hand_dummy): Use std::string.
2376
2377 2017-10-19  Tom Tromey  <tom@tromey.com>
2378
2379         * mi/mi-main.c (mi_cmd_execute): Update.
2380         * top.h (prepare_execute_command): Return scoped_value_mark.
2381         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2382         Add move constructor.
2383         * top.c (prepare_execute_command): Return scoped_value_mark.
2384         (execute_command): Update.
2385
2386 2017-10-19  Pedro Alves  <palves@redhat.com>
2387
2388         * xml-support.c (xml_fetch_content_from_file): Check fread's
2389         return.
2390
2391 2017-10-19  Pedro Alves  <palves@redhat.com>
2392
2393         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2394         async.
2395         (handle_error_fd): New function.
2396         (ser_base_async): Add/delete an event loop file handler for
2397         error_fd.
2398
2399 2017-10-19  Pedro Alves  <palves@redhat.com>
2400
2401         * xml-support.c (xml_fetch_content_from_file): Don't read in
2402         chunks.  Instead use fseek to determine the file's size, and read
2403         it in one go.
2404
2405 2017-11-18  Keith Seitz  <keiths@redhat.com>
2406
2407         * c-exp.y (oper): Canonicalize conversion operators of user-defined
2408         types.
2409         Add whitespace to front of type name.
2410
2411 2017-10-18  Keith Seitz  <keiths@redhat.com>
2412
2413         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2414         DW_AT_accessibility.
2415
2416 2017-10-18  Yao Qi  <yao.qi@linaro.org>
2417
2418         * features/tic6x-c62x-linux.c: Remove.
2419
2420 2017-10-17  Tom Tromey  <tom@tromey.com>
2421
2422         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2423         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2424         (do_mixed_source_and_assembly): Likewise.
2425
2426 2017-10-17  Tom Tromey  <tom@tromey.com>
2427
2428         * regcache.c (regcache::xfer_part): Remove assertion.
2429
2430 2017-10-17  Pedro Alves  <palves@redhat.com>
2431
2432         * xml-support.c (xml_fetch_content_from_file): Call
2433         unique_ptr::release() instead unique_ptr::get() when passing
2434         through xrealloc.
2435
2436 2017-10-17  Yao Qi  <yao.qi@linaro.org>
2437
2438         * regcache.c (regcache::xfer_part): Remove parameters read and
2439         write, add parameter is_raw.  All callers are updated.
2440
2441 2017-10-16  Keith Seitz  <keiths@redhat.com>
2442
2443         * c-typeprint.c (enum access_specifier): Moved here from
2444         c_type_print_base.
2445         (output_access_specifier): New function.
2446         (c_type_print_base): Consider typedefs when assessing
2447         whether access labels are needed.
2448         Use output_access_specifier as needed.
2449         Output access specifier for typedefs, if needed.
2450         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2451         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2452         fields.
2453         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2454         accessor macros.
2455
2456 2017-10-16  Tom Tromey  <tom@tromey.com>
2457
2458         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2459         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2460         * target.c (target_fileio_read_stralloc): Update.
2461         * sparc64-tdep.c (adi_is_addr_mapped): Update.
2462         * target.h (target_fileio_read_stralloc): Return
2463         unique_xmalloc_ptr.
2464
2465 2017-10-16  Tom Tromey  <tom@tromey.com>
2466
2467         * xml-syscall.c (xml_init_syscalls_info): Update.
2468         * xml-support.c (xinclude_start_include): Update.
2469         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2470         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2471         (xml_fetch_content_from_file): Likewise.
2472         * osdata.c (get_osdata): Update.
2473         * target.h (target_read_stralloc, target_get_osdata): Return
2474         unique_xmalloc_ptr.
2475         * solib-aix.c (solib_aix_get_library_list): Update.
2476         * solib-target.c (solib_target_current_sos): Update.
2477         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2478         * xml-tdesc.c (fetch_available_features_from_target): Update.
2479         (target_fetch_description_xml): Update.
2480         (file_read_description_xml): Update.
2481         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2482         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2483         (remote_pid_to_exec_file): Update.
2484         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2485         (target_get_osdata): Likewise.
2486
2487 2017-10-16  Tom Tromey  <tom@tromey.com>
2488
2489         * remote.c (remote_register_number_and_offset): Use std::vector.
2490         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2491         (putpkt_binary): Use gdb::def_vector.
2492         (compare_sections_command): Use gdb::byte_vector.
2493
2494 2017-10-16  Tom Tromey  <tom@tromey.com>
2495
2496         * ppc-linux-nat.c (hwdebug_insert_point): Use
2497         gdb::unique_xmalloc_ptr, XDUP.
2498
2499 2017-10-16  Tom Tromey  <tom@tromey.com>
2500
2501         * probe.c (parse_probes): Use std::string.
2502         (info_probes_for_ops, enable_probes_command)
2503         (disable_probes_command): Remove cleanups.
2504
2505 2017-10-16  Tom Tromey  <tom@tromey.com>
2506
2507         * buildsym.c (block_compar): Remove.
2508         (end_symtab_get_static_block): Use std::vector.
2509
2510 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
2511
2512         * memrange.h (struct mem_range): Define operator< and operator==.
2513         (mem_range_s): Remove.
2514         (DEF_VEC_O (mem_range_s)): Remove.
2515         (normalize_mem_ranges): Change parameter type to std::vector.
2516         * memrange.c (compare_mem_ranges): Remove.
2517         (normalize_mem_ranges): Change parameter type to std::vector,
2518         adjust to vector change.
2519         * exec.c (section_table_available_memory): Return vector, remove
2520         parameter.
2521         (section_table_read_available_memory): Adjust to std::vector
2522         change.
2523         * remote.c (remote_read_bytes): Adjust to std::vector
2524         change.
2525         * tracepoint.h (traceframe_available_memory): Change parameter
2526         type to std::vector.
2527         * tracepoint.c (traceframe_available_memory): Change parameter
2528         type to std::vector, adjust.
2529         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2530         std::vector change.
2531         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2532         unittests/memrange-selftests.c.
2533         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2534         * gdb/unittests/memrange-selftests.c: New file.
2535
2536 2017-10-16  Pedro Alves  <palves@redhat.com>
2537
2538         * elfread.c (probe_key_free): Rename range-for variable.
2539         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2540         (find_probe_by_pc, collect_probes): Rename range-for variable.
2541
2542 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2543
2544         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2545         * features/tic6x-c62x.c: Remove.
2546         * features/tic6x-c64x-linux.c: Remove.
2547         * features/tic6x-c64x.c: Remove.
2548         * features/tic6x-c64xp-linux.c: Remove.
2549         * features/tic6x-c64xp.c: Remove.
2550         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2551         initialize_tdesc_tic6x_*_linux functions.
2552         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2553         initialize_tdesc_tic6x_* functions.
2554
2555 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2556
2557         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2558         tic6x-c62x.
2559         * regformats/tic6x-c62x.dat: Remove.
2560         * regformats/tic6x-c64x.dat: Remove.
2561         * regformats/tic6x-c64xp.dat: Remove.
2562
2563 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2564
2565         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2566         (the !HAVE_LIBEXPAT version).
2567
2568 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2569
2570         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2571         const.
2572
2573 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2574
2575         * target.h: Include tracepoint.h.
2576         (enum trace_find_type): Move to tracepoint.h.
2577         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2578         * tracepoint.h: Don't include target.h
2579         (enum trace_find_type): Move from target.h.
2580         (parse_traceframe_info): Return a unique ptr.
2581         * tracepoint.c (current_traceframe_info): Change type to unique
2582         ptr.
2583         (free_traceframe_info): Remove.
2584         (clear_traceframe_info): Don't manually free
2585         current_traceframe_info.
2586         (free_result): Remove.
2587         (parse_traceframe_info): Return a unique ptr.
2588         (get_traceframe_info): Adjust to unique ptr.
2589         * ctf.c (ctf_traceframe_info): Return a unique ptr.
2590         * remote.c (remote_traceframe_info): Return a unique ptr.
2591         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2592         ptr.
2593         * target-debug.h (target_debug_print_traceframe_info_up): New
2594         macro.
2595         * target-delegates.c: Regenerate.
2596
2597 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2598
2599         * memrange.h (struct mem_range): Add constructors.
2600         * tracepoint.h (struct traceframe_info) <memory>: Change type to
2601         std::vector<mem_range>.
2602         * tracepoint.c (free_traceframe_info): Don't manually free
2603         vector.
2604         (traceframe_info_start_memory): Adjust to vector change.
2605         (traceframe_available_memory): Likewise.
2606         * tracefile-tfile.c (build_traceframe_info): Likewise.
2607         * ctf.c (ctf_traceframe_info): Likewise.
2608
2609 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2610
2611         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2612         std::vector<int>.
2613         * tracepoint.c (free_traceframe_info): Deallocate with delete.
2614         (traceframe_info_start_tvar): Adjust to vector change.
2615         (parse_traceframe_info): Allocate with new.
2616         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2617         vector change.
2618         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2619         change.
2620         tfile_traceframe_info): Allocate with new.
2621         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2622         change.
2623
2624 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2625
2626         * tracepoint.c (traceframe_info): Rename to...
2627         (current_traceframe_info): ...this.
2628         (clear_traceframe_info): Adjust.
2629         (get_traceframe_info): Adjust.
2630
2631 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2632
2633         * nat/linux-osdata.c: Include algorithm.
2634         (compare_processes): Remove.
2635         (struct pid_pgid_entry): New struct.
2636         (linux_xfer_osdata_processgroups): Use std::vector instead of
2637         XNEWVEC.
2638
2639 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2640
2641         * objfiles.h: Don't include symfile.h.
2642         (struct partial_symbol): Remove forward-declaration.
2643         (struct objfile) <global_psymbols, static_psymbols>: Change type
2644         to std::vector<partial_symbol *>.
2645         * objfiles.c (objfile::objfile): Don't memset those fields.
2646         (objfile::~objfile): Don't free those fields.
2647         * psympriv.h (struct psymbol_allocation_list): Remove
2648         forward-declaration.
2649         (add_psymbol_to_list): Change psymbol_allocation_list parameter
2650         to std::vector.
2651         (start_psymtab_common): Change parameters to std::vector.
2652         * psymtab.c: Include algorithm.
2653         (require_partial_symbols): Call shrink_to_fit.
2654         (find_pc_sect_psymbol): Adjust to vector change.
2655         (match_partial_symbol): Likewise.
2656         (lookup_partial_symbol): Likewise.
2657         (psym_relocate): Likewise.
2658         (dump_psymtab): Likewise.
2659         (recursively_search_psymtabs): Likewise.
2660         (compare_psymbols): Remove.
2661         (sort_pst_symbols): Adjust to vector change.
2662         (start_psymtab_common): Likewise.
2663         (end_psymtab_common): Likewise.
2664         (psymbol_bcache_full): De-constify return value.
2665         (add_psymbol_to_bcache): Likewise.
2666         (extend_psymbol_list): Remove.
2667         (append_psymbol_to_list): Adjust to vector change.
2668         (add_psymbol_to_list): Likewise.
2669         (init_psymbol_list): Likewise.
2670         (maintenance_info_psymtabs): Likewise.
2671         (maintenance_check_psymtabs): Likewise.
2672         * symfile.h (struct psymbol_allocation_list): Remove.
2673         * symfile.c (reread_symbols): Adjust to vector change.
2674         * dbxread.c (start_psymtab): Change type of parameters.
2675         (dbx_symfile_read): Adjust to vector change.
2676         (read_dbx_symtab): Likewise.
2677         (start_psymtab): Change type of parameters.
2678         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2679         (create_partial_symtab): Likewise.
2680         (add_partial_symbol): Likewise.
2681         (write_one_signatured_type): Likewise.
2682         (recursively_write_psymbols): Likewise.
2683         * mdebugread.c (parse_partial_symbols): Likewise.
2684         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2685         (scan_xcoff_symtab): Adjust to vector change.
2686         (xcoff_initial_scan): Likewise.
2687
2688 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
2689
2690         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2691
2692 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2693
2694         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2695         Remove s390x-*-expedite, add s390x-expedite.
2696
2697 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2698
2699         * features/s390-gs-linux64.c: Regenerated.
2700         * features/s390x-gs-linux64.c: Regenerated.
2701
2702 2017-10-13  Tom Tromey  <tom@tromey.com>
2703
2704         * compile/compile-object-run.c (do_module_cleanup): Use delete.
2705         * solib.c (update_solib_list, reload_shared_libraries_1): Use
2706         delete.
2707         * symfile.c (symbol_file_add_with_addrs): Use new.
2708         (symbol_file_add_separate): Update comment.
2709         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2710         * jit.c (jit_object_close_impl): Use new.
2711         (jit_unregister_code): Use delete.
2712         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2713         (~objfile): Rename from free_objfile.
2714         (free_objfile_separate_debug, do_free_objfile_cleanup)
2715         (free_all_objfiles, objfile_purge_solibs): Use delete.
2716         * objfiles.h (struct objfile): Add constructor and destructor.
2717         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
2718         (allocate_objfile, free_objfile): Don't declare.
2719         (struct objstats): Add initializers.
2720
2721 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2722
2723         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
2724         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
2725         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
2726         * gdbarch.h: Regenerate.
2727         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2728         Adjust comment.
2729         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
2730         (i386_displaced_step_fixup): Adjust comment.
2731         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
2732
2733 2017-10-12  Tom Tromey  <tom@tromey.com>
2734
2735         * prologue-value.h (pv_area::store_would_trash): Return bool.
2736         (pv_area::find_reg): Likewise.
2737         * prologue-value.c (pv_area::store_would_trash): Return bool.
2738         (pv_area::find_reg): Likewise.
2739
2740 2017-10-12  Tom Tromey  <tom@tromey.com>
2741
2742         * s390-linux-tdep.c (s390_store, s390_load)
2743         (s390_check_for_saved, s390_analyze_prologue): Update.
2744         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
2745         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
2746         * prologue-value.h (class pv_area): Move from prologue-value.c.
2747         Change names of members.  Add constructor, destructor, member
2748         functions.
2749         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
2750         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
2751         (pv_area_fetch, pv_area_scan): Don't declare.
2752         * prologue-value.c (struct pv_area::area_entry): Now member of
2753         pv_area.
2754         (struct pv_area): Move to prologue-value.h.
2755         (pv_area::pv_area): Rename from make_pv_area.
2756         (pv_area::~pv_area): Rename from free_pv_area.
2757         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
2758         (clear_entries, find_entry, overlaps, store_would_trash, store)
2759         (fetch, find_reg, scan): Now member of pv_area.
2760         Remove "area" argument.  Update.
2761         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
2762         Update.
2763         * mn10300-tdep.c (push_reg, check_for_saved)
2764         (mn10300_analyze_prologue): Update.
2765         * mep-tdep.c (is_arg_spill, check_for_saved)
2766         (mep_analyze_prologue): Update.
2767         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
2768         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
2769         (m32c_is_struct_return, m32c_analyze_prologue): Update.
2770         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
2771         Update.
2772         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
2773         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
2774
2775 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2776
2777         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
2778         * linux-nat.c (linux_nat_delete_thread): New variable.
2779         (lwp_free): Invoke linux_nat_delete_thread if set.
2780         (linux_nat_set_delete_thread): New function.
2781         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
2782         thread delete callback.
2783         * arm-linux-nat.c (arm_linux_delete_thread): New function.
2784         (_initialize_arm_linux_nat): Assign thread delete callback.
2785         * s390-linux-nat.c (s390_delete_thread): New function.
2786         (_initialize_s390_nat): Assign thread delete callback.
2787         * x86-linux-nat.c (x86_linux_add_target): Likewise.
2788         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
2789         function.
2790         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
2791         declaration.
2792         * nat/x86-linux.c (x86_linux_delete_thread): New function.
2793         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
2794
2795 2017-10-09  Tom Tromey  <tom@tromey.com>
2796
2797         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
2798         std::string.
2799         * tui/tui-layout.c (enum tui_status): Use std::string.
2800
2801 2017-10-11  Tom Tromey  <tom@tromey.com>
2802
2803         * gdbthread.h (thread_command): Constify.
2804         * inferior.h (detach_command): Constify.
2805         * top.h (set_history, show_history): Constify.
2806         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
2807         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
2808         * bsd-kvm.c (bsd_kvm_cmd): Constify.
2809         * printcmd.c (set_command): Constify.
2810         (non_const_set_command): New function.
2811         * dcache.c (set_dcache_command, show_dcache_command): Constify.
2812         * breakpoint.c (enable_command, disable_command, delete_command)
2813         (catch_command, tcatch_command, set_breakpoint_cmd)
2814         (show_breakpoint_cmd): Constify.
2815         * macrocmd.c (macro_command): Constify.
2816         * infcmd.c (unset_command, kill_command, detach_command)
2817         (info_proc_cmd): Constify.
2818         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
2819         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
2820         (info_auto_load_cmd): Constify.
2821         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
2822         (unset_tdesc_cmd): Constify.
2823         * ada-lang.c (set_ada_command, show_ada_command)
2824         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
2825         * guile/guile.c (set_guile_command, show_guile_command)
2826         (info_guile_command): Constify.
2827         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
2828         Constify.
2829         * skip.c (skip_command): Constify.
2830         * compile/compile.c (_initialize_compile): Constify.
2831         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
2832         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
2833         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
2834         (maint_btrace_pt_show_cmd): Constify.
2835         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
2836         Constify.
2837         * python/python.c (user_show_python, user_set_python): Constify.
2838         * mips-tdep.c (set_mips_command, show_mips_command)
2839         (set_mipsfpu_command): Constify.
2840         * record-btrace.c (cmd_record_btrace_start)
2841         (cmd_set_record_btrace, cmd_show_record_btrace)
2842         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
2843         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
2844         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
2845         Constify.
2846         * symfile.c (overlay_command): Constify.
2847         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2848         * cli/cli-logging.c (set_logging_command, show_logging_command):
2849         Constify.
2850         * cli/cli-dump.c (dump_command, append_command)
2851         (srec_dump_command, ihex_dump_command, verilog_dump_command)
2852         (tekhex_dump_command, binary_dump_command)
2853         (binary_append_command): Constify.
2854         * cli/cli-decode.c (struct cmd_list_element): Change type of
2855         "fun".
2856         * cli/cli-cmds.c (info_command, show_command, set_debug)
2857         (show_debug): Constify.
2858         (show_command): Add non-const overload.
2859         * top.c (set_history, show_history): Constify.
2860         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
2861         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
2862         * target.c (target_command): Constify.
2863         * sparc64-tdep.c (info_adi_command): Constify.
2864         * record-full.c (cmd_record_full_start): Constify.
2865         (set_record_full_command): Constify.  Fix typo.
2866         (show_record_full_command): Constify.
2867         * thread.c (thread_command, thread_apply_command): Constify.
2868         * memattr.c (dummy_cmd): Constify.
2869         * value.c (function_command): Constify.
2870         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
2871         * probe.c (info_probes_command): Constify.
2872         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
2873         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
2874         (show_thread_cmd, set_thread_default_cmd)
2875         (show_thread_default_cmd): Constify.
2876         (check_empty): Constify.
2877         * tracepoint.c (tfind_command): Constify.
2878         * cp-support.c (maint_cplus_command): Constify.
2879         * windows-tdep.c (info_w32_command): Constify.
2880         * record.c (cmd_record_start, set_record_command)
2881         (show_record_command, info_record_command, cmd_record_goto):
2882         Constify.
2883         * ravenscar-thread.c (set_ravenscar_command)
2884         (show_ravenscar_command): Constify.
2885         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
2886         Constify.
2887         (add_internal_problem_command): Remove casts.
2888         * arc-tdep.c (maintenance_print_arc_command): Constify.
2889         * valprint.c (set_print, show_print, set_print_raw)
2890         (show_print_raw): Constify.
2891         * maint.c (maintenance_command, maintenance_info_command)
2892         (maintenance_print_command, maintenance_set_cmd)
2893         (maintenance_show_cmd, set_per_command_cmd)
2894         (show_per_command_cmd, maintenance_check_command): Constify.
2895         * language.c (set_check, show_check): Constify.
2896         * typeprint.c (show_print_type, set_print_type): Constify.
2897         * go32-nat.c (go32_info_dos_command): Constify.
2898
2899 2017-10-11  Tom Tromey  <tom@tromey.com>
2900
2901         * breakpoint.c (prepare_re_set_context): Remove.
2902         (breakpoint_re_set_one): Update.  Don't use cleanups.
2903         (breakpoint_re_set): Use scoped_restore, std::string, and
2904         scoped_restore_current_language.
2905
2906 2017-10-11  Tom Tromey  <tom@tromey.com>
2907
2908         * breakpoint.c (commands_command_1): Use std::string.
2909         (cleanup_executing_breakpoints): Remove.
2910         (bpstat_do_actions_1): Use scoped_restore.
2911         (bpstat_check_watchpoint): Use std::string.
2912         (decode_static_tracepoint_spec): Likewise.
2913         (break_range_command): Likewise.
2914         (watch_command_1): Likewise.
2915         (compare_breakpoints): Change argument types.
2916         (clear_command): Use std::vector.
2917         (cleanup_executing_breakpoints): Remove.
2918         (update_global_location_list): Use unique_xmalloc_ptr.
2919         (strace_command): Remove unused declaration.
2920
2921 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2922
2923         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
2924         * NEWS: Mention new FreeBSD/arm native configuration.
2925         * configure.host: Add arm*-*-freebsd*.
2926         * configure.nat: Likewise.
2927         * arm-fbsd-nat.c: New file.
2928
2929 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2930
2931         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
2932         (ALLDEPFILES): Add arm-fbsd-tdep.c.
2933         * NEWS: Mention new FreeBSD/arm target.
2934         * configure.tgt: Add arm*-*-freebsd*.
2935         * arm-fbsd-tdep.c: New file.
2936         * arm-fbsd-tdep.h: New file.
2937
2938 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2939
2940         * linux-tdep.c (linux_make_corefile_notes): Remove call to
2941         `gdbarch_elfcore_write_linux_prpsinfo'.
2942         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
2943         method.
2944         (elf_internal_linux_prpsinfo): Remove declaration.
2945         * gdbarch.h: Regenerate.
2946         * gdbarch.c: Regenerate.
2947
2948 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2949
2950         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
2951         `set_gdbarch_elfcore_write_linux_prpsinfo'.
2952
2953 2017-10-11  Pedro Alves  <palves@redhat.com>
2954
2955         * breakpoint.c (reattach_breakpoints): Delete.
2956         * breakpoint.h (reattach_breakpoints): Delete.
2957
2958 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
2959
2960         * symfile.c (registered_sym_fns): Make struct, not typedef.
2961         (DEF_VEC_O (registered_sym_fns)): Remove.
2962         (symtab_fns): Change type to std::vector.
2963         (add_symtab_fns): Adjust.
2964         (find_sym_fns): Adjust.
2965
2966 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
2967
2968         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
2969         * arc-tdep.h (arc_arch_is_em): New function.
2970         (arc_arch_is_hs): Likewise.
2971
2972 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
2973
2974         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
2975         parentheses in the declaration.
2976         (macro_lookup_inclusion): Likewise.
2977         (macro_lookup_definition): Likewise.
2978         * p-lang.h (pascal_builtin_types): Likewise.
2979         * tui/tui-data.c (tui_win_list): Likewise.
2980         * tui/tui-data.h (tui_win_list): Likewise.
2981         * utils.h (make_cleanup_free_section_addr_info): Likewise.
2982
2983 2017-10-11  Mark Rages  <markrages@gmail.com>
2984
2985         * target-memory.c (block_boundaries): Fix for block address not
2986         aligned on block size.
2987
2988 2017-10-10  Pedro Alves <palves@redhat.com>
2989             Tom Tromey  <tom@tromey.com>
2990
2991         * breakpoint.c (struct captured_breakpoint_query_args)
2992         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
2993         (print_breakpoint): New.
2994         * breakpoint.h (print_breakpoint): Declare.
2995         * common/common-exceptions.h (enum return_reason): Remove
2996         references to catch_exceptions.
2997         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
2998         Delete.
2999         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3000         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3001         * gdb.h: Delete.
3002         * gdbthread.h (thread_select): Declare.
3003         * mi/mi-cmd-break.c: Don't include gdb.h.
3004         (breakpoint_notify): Use print_breakpoint.
3005         * mi/mi-cmd-catch.c: Don't include gdb.h.
3006         * mi/mi-interp.c: Don't include gdb.h.
3007         (mi_print_breakpoint_for_event): New.
3008         (mi_breakpoint_created, mi_breakpoint_modified): Use
3009         mi_print_breakpoint_for_event.
3010         * mi/mi-main.c: Don't include gdb.h.
3011         (mi_cmd_thread_select): Parse the global thread ID here.  Use
3012         thread_select instead of gdb_thread_select.
3013         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3014         of using gdb_list_thread_ids.
3015         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
3016         FILEIO_ENOSYS here.
3017         (remote_fileio_request): Use TRY/CATCH instead of
3018         catch_exceptions.
3019         * symfile-mem.c (struct symbol_file_add_from_memory_args)
3020         (symbol_file_add_from_memory_wrapper): Delete.
3021         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3022         * thread.c: Don't include gdb.h.
3023         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3024         (thread_alive): Use thread_select.
3025         (do_captured_thread_select): Delete, parts salvaged as ...
3026         (thread_select): ... this new function.
3027         (gdb_thread_select): Delete.
3028
3029 2017-10-10  Pedro Alves  <palves@redhat.com>
3030             Tom Tromey  <tom@tromey.com>
3031
3032         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3033         and reverse logic.
3034         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3035         No longer macros.  Instead ...
3036         (enum wp_check_result): They're now values of this new
3037         enumeration.
3038         (watchpoint_check): Change return type to wp_check_result and
3039         parameter type to bpstat.
3040         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3041         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3042         catch_errors.  Reverse logic of watchpoint_check call.
3043         (breakpoint_re_set_one): Now returns void and takes a breakpoint
3044         pointer as parameter.
3045         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3046         * common/common-exceptions.c (throw_exception_sjlj): Update
3047         comments to avoid mentioning catch_errors.
3048         * exceptions.c (catch_errors): Delete.
3049         * exceptions.h: Update comments to avoid mentioning catch_errors.
3050         (catch_errors_ftype, catch_errors): Delete.
3051         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3052         (hook_stop_stub): Delete.
3053         (restore_selected_frame): Change return type to void, and
3054         parameter type to const frame_id &.
3055         (restore_infcall_control_state): Use TRY/CATCH instead of
3056         catch_errors.
3057         * main.c (captured_command_loop): Return void and remove
3058         parameter.  Remove references to catch_errors.
3059         (captured_main): Use TRY/CATCH instead of catch_errors.
3060         * objc-lang.c (objc_submethod_helper_data)
3061         (find_objc_msgcall_submethod_helper): Delete.
3062         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3063         catch_errors.
3064         * record-full.c (record_full_message): Return void.
3065         (record_full_message_args, record_full_message_wrapper): Delete.
3066         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3067         instead of catch_errors.
3068         * solib-aix.c (solib_aix_open_symbol_file_object): Change
3069         parameter type to int.
3070         * solib-darwin.c (open_symbol_file_object): Ditto.
3071         * solib-dsbt.c (open_symbol_file_object): Ditto.
3072         * solib-frv.c (open_symbol_file_object): Ditto.
3073         * solib-svr4.c (open_symbol_file_object): Ditto.
3074         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3075         * solib.c (update_solib_list): Use TRY/CATCH instead of
3076         catch_errors.
3077         * solist.h (struct target_so_ops) <open_symbol_file_object>:
3078         Change type.
3079         * symmisc.c (struct print_symbol_args): Remove.
3080         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3081         (print_symbol): Change type.
3082         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3083         and remove parameters.
3084         (catch_errors): New.
3085         (get_windows_debug_event): Adjust.
3086
3087 2017-10-09  Tom Tromey  <tom@tromey.com>
3088
3089         * mi/mi-main.c (free_splay_tree): Remove.
3090         (list_available_thread_groups): Use splay_tree_up.
3091         * common/gdb_splay_tree.h: New file.
3092
3093 2017-10-09  Tom Tromey  <tom@tromey.com>
3094
3095         * mi/mi-main.c (do_nothing): Remove.
3096         (list_available_thread_groups): Update.
3097
3098 2017-10-09  Pedro Alves  <palves@redhat.com>
3099
3100         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3101         reading registers when switching context.
3102
3103 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
3104
3105         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3106         (fbsd_convert_siginfo): Likewise.
3107         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3108
3109 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
3110
3111         * configure.ac (try_guile_versions): Remove guile-2.2.
3112         * configure: Regenerate.
3113
3114 2017-10-09  Tom Tromey  <tom@tromey.com>
3115
3116         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3117         (COMPILE.pre): Use $(CXX).
3118
3119 2017-10-09  Pedro Alves  <palves@redhat.com>
3120
3121         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3122         Use bool.
3123         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3124         * cp-support.h (cp_remove_params): Now returns a
3125         gdb::unique_xmalloc_ptr.
3126         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3127         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3128         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3129         returning a gdb::unique_xmalloc_ptr.
3130         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3131         * stack.c (find_frame_funname): Adjust to cp_remove_params
3132         returning a gdb::unique_xmalloc_ptr.
3133
3134 2017-10-08  Tom Tromey  <tom@tromey.com>
3135
3136         * dwarf2read.c (dwarf2_get_dwz_file): Use
3137         gdb::unique_xmalloc_ptr.
3138         (find_slot_in_mapped_hash): Likewise.
3139         (dwarf2_physname): Likewise.
3140         (create_dwo_unit_in_dwp_v1): Use std::string.
3141         (create_dwo_unit_in_dwp_v2): Likewise.
3142         (lookup_dwo_cutu): Likewise.
3143         (inherit_abstract_dies): Use std::vector.
3144         (read_array_type): Likewise.
3145         (dwarf_decode_macros): Remove unused declaration.
3146         (unsigned_int_compar): Remove.
3147         (dwarf2_build_psymtabs_hard): Use scoped_restore.
3148         (psymtabs_addrmap_cleanup): Remove.
3149
3150 2017-10-08  Tom Tromey  <tom@tromey.com>
3151
3152         * frame-unwind.c (frame_unwind_try_unwinder): Update.
3153         * frame.h (frame_cleanup_after_sniffer): Declare.
3154         (frame_prepare_for_sniffer): Return void.
3155         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
3156         type of argument.
3157         (frame_prepare_for_sniffer): Return void.
3158
3159 2017-10-08  Tom Tromey  <tom@tromey.com>
3160
3161         * utils.h (make_cleanup_value_free): Remove.
3162         * utils.c (do_value_free, struct cleanup): Remove.
3163         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3164         Use gdb_value_up.
3165         * value.h (struct value_deleter): New.
3166         (gdb_value_up): New typedef.
3167
3168 2017-10-08  Tom Tromey  <tom@tromey.com>
3169
3170         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3171         (make_cleanup_free_search_symbols): Remove.
3172         (search_symbols): Return std::vector.
3173         (symbol_search::compare_search_syms): Now member of
3174         symbol_search.  Change arguments.
3175         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
3176         (symtab_symbol_info, rbreak_command): Update.
3177         * symtab.h (struct symbol_search) <next>: Remove.
3178         Add constructors.
3179         (symbol_search::operator<): New function.
3180         (symbol_search::operator==): New function.
3181         (search_symbols): Remove std::vector.
3182         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3183         (symbol_search::compare_search_syms): Declare.
3184
3185 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3186
3187         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3188         arch/aarch64-insn.o.
3189         Remove one rule.
3190         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3191
3192 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3193
3194         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3195         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3196         arch/arm-linux.o respectively.
3197         * configure.tgt: Likewise.
3198
3199 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3200
3201         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3202         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3203
3204 2017-10-06  Pedro Alves  <palves@redhat.com>
3205
3206         * windows-nat.c: Include <algorithm>.
3207
3208 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3209
3210         * configure.tgt (i386_tobjs): New variable.
3211         (amd64_tobjs): New variable.
3212         Set $cpu_obs and $os_obs.
3213
3214 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3215
3216         * Makefile.in (CONFIG_SRC_SUBDIR): New.
3217         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3218         (clean): Remove object files and dependency files.
3219         (distclean): Remove the directory.
3220         * configure.ac: Invoke AC_CONFIG_COMMANDS.
3221         * configure: Re-generated.
3222         * configure.tgt: Replace amd64.o with arch/amd64.o.
3223
3224 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
3225
3226         PR build/22188
3227         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3228         and SETEND.
3229
3230 2017-10-05  Pedro Alves  <palves@redhat.com>
3231
3232         * linux-nat.c (linux_child_follow_fork): When following the parent
3233         and detaching the child, consult the parent thread's architecture
3234         instead of the child's.
3235
3236 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3237
3238         * ax.h: Do not include "doublest.h".
3239         (union agent_val): Remove.
3240
3241 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3242
3243         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3244         (decimal_to_string): Return std::string object.
3245         (decimal_from_string): Accept std::string object.  Return bool.
3246         (decimal_from_integral, decimal_from_doublest): Remove.
3247         (decimal_from_longest): Add prototype.
3248         (decimal_from_ulongest): Likewise.
3249         (decimal_to_longest): Likewise.
3250         (decimal_from_doublest): Likewise.
3251         * dfp.c: Do not include "gdbtypes.h" or "value.h".
3252         (MAX_DECIMAL_STRING): Move here.
3253         (decimal_to_string): Return std::string object.
3254         (decimal_from_string): Accept std::string object.  Return bool.
3255         (decimal_from_integral): Remove, replace by ...
3256         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3257         (decimal_to_longest): New function.
3258         (decimal_from_floating): Remove, replace by ...
3259         (decimal_from_doublest): ... this new function.
3260         (decimal_to_doublest): Update to new decimal_to_string interface.
3261
3262         * value.c (unpack_long): Use decimal_to_longest.
3263         * valops.c (value_cast): Use decimal_from_doublest instead of
3264         decimal_from_floating.  Use decimal_from_[u]longest isntead of
3265         decimal_from_integral.
3266         * valarith.c (value_args_as_decimal): Likewise.
3267         * valprint.c (print_decimal_floating): Update to new
3268         decimal_to_string interface.
3269         * printcmd.c (printf_decfloat): Likewise.
3270         * c-exp.y (parse_number): Update to new decimal_from_string interface.
3271
3272 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3273
3274         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
3275         * gdbtypes.c: Include "floatformat.h".
3276         * value.c: Likewise.
3277         * m68k-tdep.c: Likewise.
3278
3279         * findvar.c: Do not include "floatformat.h".
3280         * amd64-darwin-tdep.c: Likewise.
3281         * arm-linux-tdep.c: Likewise.
3282         * i386-darwin-tdep.c: Likewise.
3283         * i387-tdep.c: Likewise.
3284         * m68k-linux-tdep.c: Likewise.
3285         * mep-tdep.c: Likewise.
3286         * mips-tdep.c: Likewise.
3287         * nios2-tdep.c: Likewise.
3288         * s390-linux-tdep.c: Likewise.
3289         * sparc-obsd-tdep.c: Likewise.
3290         * sparc-tdep.c: Likewise.
3291         * sparc64-tdep.c: Likewise.
3292         * spu-tdep.c: Likewise.
3293         * tic6x-tdep.c: Likewise.
3294         * tilegx-tdep.c: Likewise.
3295         * vax-tdep.c: Likewise.
3296         * xstormy16-tdep.c: Likewise.
3297         * xtensa-tdep.c: Likewise.
3298
3299         * top.c: Do not include "doublest.h".
3300         * aarch64-tdep.c: Likewise.
3301         * alpha-tdep.c: Likewise.
3302         * arm-linux-tdep.c: Likewise.
3303         * m68k-linux-tdep.c: Likewise.
3304         * tilegx-tdep.c: Likewise.
3305         * xstormy16-tdep.c: Likewise.
3306
3307 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3308
3309         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3310         (mipsn32_fbsd_sigframe): Define.
3311         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3312         for FreeBSD/mipsn32.
3313
3314 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3315
3316         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3317         AT_HWCAP.
3318
3319 2017-10-05  Tristan Gingold  <tgingold@free.fr>
3320
3321         * MAINTAINERS (Misc): Update my email address.
3322
3323 2017-10-04  Pedro Alves  <palves@redhat.com>
3324
3325         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
3326         it instead of target_gdbarch.
3327         (get_remote_state, get_remote_packet_size): Adjust
3328         get_remote_arch_state calls, passing down target_gdbarch
3329         explicitly.
3330         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3331         'gdbarch' and use it instead of target_gdbarch.
3332         (get_memory_packet_size): Adjust get_remote_arch_state calls,
3333         passing down target_gdbarch explicitly.
3334         (struct stop_reply) <arch>: New field.
3335         (remote_parse_stop_reply): Use the stopped thread's architecture,
3336         not the current inferior's.  Save the architecture in the
3337         stop_reply.
3338         (process_stop_reply): Use the stop reply's architecture.
3339         (process_g_packet, remote_fetch_registers)
3340         (remote_prepare_to_store, store_registers_using_G)
3341         (remote_store_registers): Adjust get_remote_arch_state calls,
3342         using the regcache's architecture.
3343         (remote_get_trace_status): Adjust get_remote_arch_state calls,
3344         passing down target_gdbarch explicitly.
3345         * spu-multiarch.c (spu_thread_architecture): Defer to the target
3346         beneath instead of calling target_gdbarch.
3347         * target.c (default_thread_architecture): Use the specified
3348         inferior's architecture, instead of the current inferior's
3349         architecture (via target_gdbarch).
3350
3351 2017-10-04  Pedro Alves  <palves@redhat.com>
3352
3353         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3354         case.
3355         (regcache_print): Handle !target_has_registers here instead.
3356
3357 2017-10-04  Pedro Alves  <palves@redhat.com>
3358
3359         * frame.c (create_test_frame): Delete.
3360         * frame.h (create_test_frame): Delete.
3361         * gdbarch-selftests.c: Include gdbthread.h and target.h.
3362         (class regcache_test): Delete.
3363         (test_target_has_registers, test_target_has_stack)
3364         (test_target_has_memory, test_target_prepare_to_store)
3365         (test_target_store_registers): New functions.
3366         (test_target_ops): New class.
3367         (register_to_value_test): Error out if there's already a
3368         process_stratum (or higher) target pushed.  Create a fuller mock
3369         environment, with mock target_ops, inferior, address space, thread
3370         and inferior_ptid.
3371         * progspace.c (struct address_space): Move to ...
3372         * progspace.h (struct address_space): ... here.
3373         * regcache.h (regcache::~regcache, regcache::raw_write)
3374         [GDB_SELF_TEST]: No longer virtual.
3375
3376 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
3377
3378         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3379
3380 2017-10-04  Pedro Alves  <palves@redhat.com>
3381
3382         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3383         out of 'between TRY and CATCH'.
3384
3385 2017-10-04  Pedro Alves  <palves@redhat.com>
3386
3387         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3388         * common/common-exceptions.h (TRY): Open an outermost scope.
3389         Expand intro comment.
3390         (CATCH): Reindent.
3391         (END_CATCH): Close the outermost scope.
3392         * completer.c (complete_line_internal): Add missing END_CATCH.
3393
3394 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3395
3396         * NEWS (Changes since GDB 8.0): Add entry about new
3397         'set-cwd-on-gdbserver' feature.
3398         (New remote packets): Add entry for QSetWorkingDir.
3399         * common/common-inferior.h (set_inferior_cwd): New prototype.
3400         * infcmd.c (set_inferior_cwd): Remove "static".
3401         (show_cwd_command): Expand text to include remote debugging.
3402         * remote.c: Add PACKET_QSetWorkingDir.
3403         (remote_protocol_features) <QSetWorkingDir>: New entry for
3404         PACKET_QSetWorkingDir.
3405         (extended_remote_set_inferior_cwd): New function.
3406         (extended_remote_create_inferior): Call
3407         "extended_remote_set_inferior_cwd".
3408         (_initialize_remote): Call "add_packet_config_cmd" for
3409         QSetWorkingDir.
3410
3411 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3412
3413         * NEWS (New commands): Mention "set/show cwd".
3414         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3415         "cd" command's help text.
3416         * common/common-inferior.h (get_inferior_cwd): New prototype.
3417         * infcmd.c (inferior_cwd_scratch): New global variable.
3418         (set_inferior_cwd): New function.
3419         (get_inferior_cwd): Likewise.
3420         (set_cwd_command): Likewise.
3421         (show_cwd_command): Likewise.
3422         (_initialize_infcmd): Add "set/show cwd" commands.
3423         * inferior.h (class inferior) <cwd>: New field.
3424         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3425         (fork_inferior): Change inferior's cwd before its execution.
3426         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3427         to CreateProcess.
3428
3429 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3430
3431         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3432         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3433         (COMMON_OBS): Add gdb_tilde_expand.o.
3434         * common/gdb_tilde_expand.c: New file.
3435         * common/gdb_tilde_expand.h: Likewise.
3436
3437 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
3438
3439         * gdbarch.sh (objfile): Remove duplicate declaration.
3440         * gdbarch.h: Regenerate.
3441
3442 2017-10-03  Tom Tromey  <tom@tromey.com>
3443
3444         * utils.c (internal_vproblem): Use string_vprintf.
3445
3446 2017-10-03  Tom Tromey  <tom@tromey.com>
3447
3448         * printcmd.c (info_symbol_command): Use std::string.
3449
3450 2017-10-03  Tom Tromey  <tom@tromey.com>
3451
3452         * top.c (gdb_safe_append_history): Use std::string.
3453
3454 2017-10-03  Tom Tromey  <tom@tromey.com>
3455
3456         * event-top.c (stdin_event_handler): Update.
3457         * main.c (captured_main_1): Update.
3458         * top.h (make_delete_ui_cleanup): Remove.
3459         (struct ui): Add constructor and destructor.
3460         (new_ui, delete_ui): Remove.
3461         * top.c (make_delete_ui_cleanup): Remove.
3462         (new_ui_command): Use std::unique_ptr.
3463         (delete_ui_cleanup): Remove.
3464         (ui::ui): Rename from new_ui.  Update.
3465         (free_ui): Remove.
3466         (ui::~ui): Rename from delete_ui.  Update.
3467
3468 2017-10-03  Tom Tromey  <tom@tromey.com>
3469
3470         * symfile.c (load_progress): Use gdb::byte_vector.
3471
3472 2017-10-03  Tom Tromey  <tom@tromey.com>
3473
3474         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3475         declaration.
3476         * printcmd.c (x_command): Remove unused declaration.
3477         * symfile.c (symbol_file_command): Remove unused declaration.
3478
3479 2017-10-03  Tom Tromey  <tom@tromey.com>
3480
3481         * utils.c (internal_vproblem): Use std::string.
3482         (defaulted_query): Likewise.
3483
3484 2017-10-03  Tom Tromey  <tom@tromey.com>
3485
3486         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3487         * top.c (execute_command_to_string): Update.
3488         * utils.c (make_cleanup_restore_page_info): Remove.
3489         (do_restore_page_info_cleanup): Remove.
3490         (set_batch_flag_and_restore_page_info):
3491         New.
3492         (make_cleanup_restore_page_info): Remove.
3493         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3494         (~set_batch_flag_and_restore_page_info): New
3495         (make_cleanup_restore_uinteger): Remove.
3496         (make_cleanup_restore_integer): Remove.
3497         (struct restore_integer_closure): Remove.
3498         (restore_integer): Remove.
3499         * utils.h (struct set_batch_flag_and_restore_page_info): New
3500         class.
3501         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3502         (make_cleanup_restore_page_info): Remove.
3503         (make_cleanup_restore_uinteger) Remove.
3504         (make_cleanup_restore_integer) Remove.
3505
3506 2017-10-03  Tom Tromey  <tom@tromey.com>
3507
3508         * record-full.h (record_full_gdb_operation_disable_set): Return
3509         scoped_restore_tmpl<int>.
3510         * infrun.c (adjust_pc_after_break): Update.
3511         (handle_signal_stop): Update.
3512         * record-full.c (record_full_gdb_operation_disable_set): Return
3513         scoped_restore_tmpl<int>.
3514         (record_full_wait_1, record_full_insert_breakpoint)
3515         (record_full_remove_breakpoint, record_full_save)
3516         (record_full_goto_insn): Update.
3517
3518 2017-10-02  Tom Tromey  <tom@tromey.com>
3519
3520         PR rust/22236:
3521         * rust-lang.c (rust_val_print_str): New function.
3522         (val_print_struct): Call it.
3523         (rust_subscript): Preserve name of slice type.
3524
3525 2017-10-02  Tom Tromey  <tom@tromey.com>
3526
3527         * rust-lang.c (rust_subscript): Handle slices in
3528         EVAL_AVOID_SIDE_EFFECTS case.
3529
3530 2017-10-02  Tom Tromey  <tom@tromey.com>
3531
3532         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3533
3534 2017-10-02  Tom Tromey  <tom@tromey.com>
3535
3536         * rust-lang.h (rust_slice_type): Add "extern".
3537
3538 2017-10-02  Tom Tromey  <tom@tromey.com>
3539             Pedro Alves  <palves@redhat.com>
3540
3541         * ada-lang.h (ada_exc_info::operator<): Make const.
3542         (ada_exc_info::operator==): Make const.
3543         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3544         Make const.
3545
3546 2017-09-29  Tom Tromey  <tom@tromey.com>
3547
3548         * target.c (read_whatever_is_readable): Change type of "result".
3549         Update.
3550         (free_memory_read_result_vector): Remove.
3551         (read_memory_robust): Change return type.  Update.
3552         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
3553         bin2hex, std::string.
3554         * target.h (memory_read_result_s): Remove typedef.
3555         (free_memory_read_result_vector): Remove.
3556         (read_memory_robust): Return std::vector.
3557
3558 2017-09-29  Tom Tromey  <tom@tromey.com>
3559
3560         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3561
3562 2017-09-29  Tom Tromey  <tom@tromey.com>
3563
3564         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3565         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
3566         operator< and operator==.
3567         (ada_exceptions_list): Return a std::vector.
3568         * ada-lang.c (ada_exc_info::operator<): Rename from
3569         compare_ada_exception_info.
3570         (ada_exc_info::operator==): New.
3571         (sort_remove_dups_ada_exceptions_list): Change type of
3572         "exceptions".
3573         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3574         (ada_add_global_exceptions): Likewise.
3575         (ada_exceptions_list_1): Return a std::vector.
3576         (ada_exceptions_list): Likewise.
3577
3578 2017-09-29  Tom Tromey  <tom@tromey.com>
3579
3580         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3581         'std::set *'.
3582         (print_one_inferior): Update.
3583         (free_vector_of_ints): Remove.
3584         (list_available_thread_groups): Change "ids" to std::set.
3585         (mi_cmd_list_thread_groups): Update.
3586         (struct collect_cores_data) <core>: Now a std::set.
3587         (collect_cores): Update.
3588         (unique): Remove.
3589         (print_one_inferior): Update.
3590
3591 2017-09-29  Tom Tromey  <tom@tromey.com>
3592
3593         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3594         (mi_execute_async_cli_command): Likewise.
3595         (mi_cmd_trace_frame_collected): Use field_fmt.
3596
3597 2017-09-29  Tom Tromey  <tom@tromey.com>
3598
3599         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3600         gdb::byte_vector.
3601
3602 2017-09-29  Tom Tromey  <tom@tromey.com>
3603
3604         * mi/mi-parse.c (mi_parse): Remove unused declaration.
3605
3606 2017-09-29  Tom Tromey  <tom@tromey.com>
3607
3608         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3609
3610 2017-09-29  Tom Tromey  <tom@tromey.com>
3611
3612         * varobj.h (varobj_gen_name): Return std::string.
3613         * varobj.c (varobj_gen_name): Return std::string.
3614         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3615         (mi_cmd_var_delete): Don't copy "name".
3616
3617 2017-09-29  Tom Tromey  <tom@tromey.com>
3618
3619         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3620         (mi_cmd_break_insert_1): Update.
3621
3622 2017-09-29  Tom Tromey  <tom@tromey.com>
3623
3624         * target.h (make_scoped_defer_target_commit_resume): Update.
3625         * target.c (make_scoped_defer_target_commit_resume): Rename from
3626         make_cleanup_defer_target_commit_resume.  Return a
3627         scoped_restore.
3628         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3629
3630 2017-09-29  Tom Tromey  <tom@tromey.com>
3631
3632         * main.c (captured_main_1): Remove unused declaration.
3633         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3634
3635 2017-09-29  Tom Tromey  <tom@tromey.com>
3636
3637         * symtab.c (search_symbols): Remove unused outer cleanup.
3638         (make_source_files_completion_list): Remove unused declaration.
3639
3640 2017-09-29  Tom Tromey  <tom@tromey.com>
3641
3642         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3643
3644 2017-09-29  Tom Tromey  <tom@tromey.com>
3645
3646         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3647         gdb::byte_vector.
3648
3649 2017-09-29  Tom Tromey  <tom@tromey.com>
3650
3651         * complaints.c (vcomplaint): Use std::string.
3652
3653 2017-09-29  Tom Tromey  <tom@tromey.com>
3654
3655         * tracepoint.c (trace_variable_command): Use std::string.
3656         (encode_actions_1): Remove unused declarations.
3657         (create_tsv_from_upload): Use std::string.
3658
3659 2017-09-29  Tom Tromey  <tom@tromey.com>
3660
3661         * cp-support.c (gdb_demangle): Use std::string.
3662
3663 2017-09-29  Tom Tromey  <tom@tromey.com>
3664
3665         * stack.c (parse_frame_specification): Use std::string
3666         (info_frame_command): Use gdb::unique_xmalloc_ptr.
3667
3668 2017-09-29  Tom Tromey  <tom@tromey.com>
3669
3670         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3671
3672 2017-09-29  Tom Tromey  <tom@tromey.com>
3673
3674         * utils.c (vfprintf_maybe_filtered): Use std::string.
3675         (vfprintf_unfiltered): Likewise.
3676
3677 2017-09-29  Tom Tromey  <tom@tromey.com>
3678
3679         * event-top.c (top_level_prompt): Return std::string.
3680         (display_gdb_prompt): Update.
3681
3682 2017-09-29  Tom Tromey  <tom@tromey.com>
3683
3684         * unittests/common-utils-selftests.c (format): New function.
3685         (string_vprintf_tests): New function.
3686         (_initialize_common_utils_selftests): Register new tests.
3687         * common/common-utils.c (string_vprintf): New function.
3688         * common/common-utils.h (string_vprintf): Declare.
3689
3690 2017-09-29  Pedro Alves  <palves@redhat.com>
3691
3692         * common/rsp-low.c (unpack_varlen_hex): Constify.
3693         * common/rsp-low.h (unpack_varlen_hex): Constify.
3694         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3695         Constify.
3696         * remote.c (remote_set_permissions, read_ptid)
3697         (remote_current_thread, remote_get_threads_with_qthreadinfo)
3698         (remote_static_tracepoint_marker_at)
3699         (remote_static_tracepoint_markers_by_strid)
3700         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3701         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3702         (parse_tracepoint_definition, parse_tsv_definition)
3703         (parse_static_tracepoint_marker_definition): Constify.
3704         * tracepoint.h (parse_static_tracepoint_marker_definition)
3705         (parse_trace_status, parse_tracepoint_status)
3706         (parse_tracepoint_definition, parse_tsv_definition): Constify.
3707
3708 2017-09-29  Pedro Alves  <palves@redhat.com>
3709
3710         * remote.c (target_buf, target_buf_size): Delete.
3711         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3712         Use the connection's packet buffer instead.
3713         All callers adjusted.
3714         (_initialize_remote): Remove references to target_buf and
3715         target_buf_size.
3716
3717 2017-09-28  Pedro Alves  <palves@redhat.com>
3718
3719         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3720         unittests/common-utils-selftests.c.
3721         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
3722         (COMMON_OBS): Remove utils-selftests.o.
3723         * utils-selftests.c: Move to ...
3724         * unittests/common-utils-selftests.c: ... here and rename self
3725         test to "string_printf".
3726
3727 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
3728
3729         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
3730         having NULL cus or tus.
3731
3732 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3733
3734         * arm-tdep.c: (convert_from_extended): Remove.
3735         (convert_to_extended): Likewise.
3736         (arm_extract_return_value): Use convert_typed_floating.
3737         (arm_store_return_value): Likewise.
3738
3739         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3740         * sh-tdep.c: Do not include "floatformat.h".
3741         (sh_littlebyte_bigword_type): New function.
3742         (sh_register_convert_to_virtual): Use convert_typed_floating.
3743         (sh_register_convert_to_raw): Likewise.
3744         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3745         (sh64_littlebyte_bigword_type): New function.
3746         (sh64_extract_return_value): Use convert_typed_floating.
3747         (sh64_register_convert_to_virtual): Likewise.
3748         (sh64_register_convert_to_raw): Likewise.
3749
3750 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3751
3752         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
3753         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
3754
3755         * gdbtypes.h (union type_specific): Make field floatformat hold
3756         just a single struct floatformat, not an array.
3757         (floatformat_from_type): Move here.
3758         * gdbtypes.c (floatformat_from_type): Move here.  Update to
3759         changed TYPE_FLOATFORMAT definition.
3760         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
3761         (recursive_dump_type): Likewise.
3762         (init_float_type): Install correct floatformat for byte order.
3763         (arch_float_type): Likewise.
3764
3765 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3766
3767         * gdbtypes.c (init_type): Change incoming argument from
3768         length-in-bytes to length-in-bits.  Assert length is a
3769         multiple of TARGET_CHAR_BITS.
3770         (arch_type, arch_flags_type): Likewise.
3771         (init_integer_type): Update call to init_type.
3772         (init_character_type): Likewise.
3773         (init_boolean_type): Likewise.
3774         (init_float_type): Likewise.
3775         (init_decfloat_type): Likewise.
3776         (init_complex_type): Likewise.
3777         (init_pointer_type): Likewise.
3778         (objfile_type): Likewise.
3779         (arch_integer_type): Update call to arch_type.
3780         (arch_character_type): Likewise.
3781         (arch_boolean_type): Likewise.
3782         (arch_float_type): Likewise.
3783         (arch_decfloat_type): Likewise.
3784         (arch_complex_type): Likewise.
3785         (arch_pointer_type): Likewise.
3786         (gdbtypes_post_init): Likewise.
3787
3788         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
3789         (read_base_type): Likewise.
3790         * mdebugread.c (basic_type): Likewise.
3791         * stabsread.c (dbx_init_float_type): Likewise.
3792         (rs6000_builtin_type): Likewise.
3793         (read_range_type): Likewise.  Also, fix call to init_integer_type
3794         with erroneous length argument.
3795
3796         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
3797         * d-lang.c (build_d_types): Likewise.
3798         * f-lang.c (build_fortran_types): Likewise.
3799         * go-lang.c (build_go_types): Likewise.
3800         * opencl-lang.c (build_opencl_types): Likewise.
3801         * jit.c (finalize_symtab): Likewise.
3802         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
3803         (build_std_type_info_type): Likewise.
3804         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
3805         update call to arch_flags_type.
3806
3807         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
3808         arch_type.
3809         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
3810         * windows-tdep.c (windows_get_tlb_type): Likewise.
3811
3812         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
3813         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3814         * m32c-tdep.c (make_types): Likewise.
3815         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
3816         (rl78_psw_type): Update call to arch_flags_type.
3817         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
3818         * rx-tdep.c (rx_psw_type): Likewise.
3819         (rx_fpsw_type): Likewise.
3820         * sparc-tdep.c (sparc_psr_type): Likewise.
3821         (sparc_fsr_type): Likewise.
3822         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
3823         (sparc64_ccr_type): Likewise.
3824         (sparc64_fsr_type): Likewise.
3825         (sparc64_fprs_type): Likewise.
3826
3827 2017-09-27  Tom Tromey  <tom@tromey.com>
3828
3829         * findcmd.c (find_command): Constify.
3830
3831 2017-09-27  Tom Tromey  <tom@tromey.com>
3832
3833         * ada-tasks.c (task_command_1, task_command): Constify.
3834
3835 2017-09-27  Tom Tromey  <tom@tromey.com>
3836
3837         * symtab.c (maintenance_print_symbol_cache)
3838         (maintenance_flush_symbol_cache)
3839         (maintenance_print_symbol_cache_statistics): Constify.
3840
3841 2017-09-27  Tom Tromey  <tom@tromey.com>
3842
3843         * inferior.c (detach_inferior_command, kill_inferior_command)
3844         (inferior_command): Constify.
3845
3846 2017-09-27  Tom Tromey  <tom@tromey.com>
3847
3848         * regcache.c (regcache_print, maintenance_print_registers)
3849         (maintenance_print_raw_registers)
3850         (maintenance_print_cooked_registers)
3851         (maintenance_print_register_groups)
3852         (maintenance_print_remote_registers): Constify.
3853
3854 2017-09-27  Tom Tromey  <tom@tromey.com>
3855
3856         * printcmd.c (map_display_numbers, undisplay_command)
3857         (enable_disable_display_command, enable_display_command)
3858         (disable_display_command): Constify.
3859
3860 2017-09-27  Tom Tromey  <tom@tromey.com>
3861
3862         * breakpoint.h (delete_command): Don't declare.
3863         * breakpoint.c (delete_command, enable_once_command)
3864         (enable_count_command, enable_delete_command, breakpoint_1)
3865         (maintenance_info_breakpoints, stopin_command, stopat_command)
3866         (delete_command, delete_trace_command, save_breakpoints)
3867         (save_breakpoints_command, save_tracepoints_command): Constify.
3868
3869 2017-09-27  Tom Tromey  <tom@tromey.com>
3870
3871         * macrocmd.c (macro_expand_command, macro_expand_once_command)
3872         (skip_ws, extract_identifier, macro_define_command)
3873         (macro_undef_command, macro_list_command): Constify.
3874
3875 2017-09-27  Tom Tromey  <tom@tromey.com>
3876
3877         * infcmd.c (environment_info, set_environment_command)
3878         (unset_environment_command, path_info, info_proc_cmd_1)
3879         (info_proc_cmd_mappings, info_proc_cmd_stat)
3880         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
3881         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
3882
3883 2017-09-27  Tom Tromey  <tom@tromey.com>
3884
3885         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
3886         Constify.
3887
3888 2017-09-27  Tom Tromey  <tom@tromey.com>
3889
3890         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
3891
3892 2017-09-27  Tom Tromey  <tom@tromey.com>
3893
3894         * demangle.c (demangle_command): Constify.
3895
3896 2017-09-27  Tom Tromey  <tom@tromey.com>
3897
3898         * progspace.c (maintenance_info_program_spaces_command):
3899         Constify.
3900
3901 2017-09-27  Tom Tromey  <tom@tromey.com>
3902
3903         * compile/compile.c (check_raw_argument, compile_file_command)
3904         (compile_code_command, compile_print_command): Constify.
3905
3906 2017-09-27  Tom Tromey  <tom@tromey.com>
3907
3908         * reggroups.c (maintenance_print_reggroups): Constify.
3909
3910 2017-09-27  Tom Tromey  <tom@tromey.com>
3911
3912         * dwarf2read.c (save_gdb_index_command): Constify.
3913
3914 2017-09-27  Tom Tromey  <tom@tromey.com>
3915
3916         * stap-probe.c (info_probes_stap_command): Constify.
3917
3918 2017-09-27  Tom Tromey  <tom@tromey.com>
3919
3920         * fork-child.c (unset_exec_wrapper_command): Constify.
3921
3922 2017-09-27  Tom Tromey  <tom@tromey.com>
3923
3924         * btrace.c (get_uint, get_context_size, no_chunk)
3925         (maint_btrace_packet_history_cmd)
3926         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
3927         (maint_info_btrace_cmd): Constify.
3928
3929 2017-09-27  Tom Tromey  <tom@tromey.com>
3930
3931         * reverse.c (delete_bookmark_command): Constify.
3932
3933 2017-09-27  Tom Tromey  <tom@tromey.com>
3934
3935         * remote.c (set_memory_packet_size)
3936         (set_memory_write_packet_size, show_memory_write_packet_size)
3937         (set_memory_read_packet_size, show_memory_read_packet_size)
3938         (compare_sections_command, packet_command, remote_put_command)
3939         (remote_get_command, remote_delete_command): Constify.
3940
3941 2017-09-27  Tom Tromey  <tom@tromey.com>
3942
3943         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
3944         (set_mipsfpu_double_command, set_mipsfpu_none_command)
3945         (set_mipsfpu_auto_command): Constify.
3946
3947 2017-09-27  Tom Tromey  <tom@tromey.com>
3948
3949         * cli/cli-cmds.h (cd_command): Constify.
3950         * cli/cli-cmds.c (cd_command): Constify.
3951
3952 2017-09-27  Tom Tromey  <tom@tromey.com>
3953
3954         * thread.c (thread_name_command, thread_find_command): Constify.
3955
3956 2017-09-27  Tom Tromey  <tom@tromey.com>
3957
3958         * probe.c (enable_probes_command, disable_probes_command):
3959         Constify.
3960
3961 2017-09-27  Tom Tromey  <tom@tromey.com>
3962
3963         * symfile.c (symbol_file_command): Constify.
3964         * gdbcore.h (deprecated_file_changed_hook): Constify.
3965         * exec.c (deprecated_file_changed_hook, exec_file_command)
3966         (file_command): Constify.
3967         * defs.h (symbol_file_command): Constify.
3968
3969 2017-09-27  Tom Tromey  <tom@tromey.com>
3970
3971         * remote-fileio.c (set_system_call_allowed)
3972         (show_system_call_allowed): Constify.
3973
3974 2017-09-27  Tom Tromey  <tom@tromey.com>
3975
3976         * tracepoint.c (delete_trace_variable_command)
3977         (tfind_end_command, tfind_start_command, tfind_pc_command)
3978         (tfind_tracepoint_command, tfind_line_command)
3979         (tfind_range_command, tfind_outside_command): Constify.
3980
3981 2017-09-27  Tom Tromey  <tom@tromey.com>
3982
3983         * ax-gdb.c (maint_agent_printf_command, agent_command)
3984         (agent_eval_command): Constify.
3985
3986 2017-09-27  Tom Tromey  <tom@tromey.com>
3987
3988         * tracepoint.c (info_scope_command): Constify.
3989         * python/python.c (gdbpy_decode_line): Constify.
3990         * python/py-breakpoint.c (bppy_init): Constify.
3991         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
3992         * location.h: (new_linespec_location)
3993         (string_to_event_location_basic, string_to_event_location):
3994         Constify.
3995         * location.c (new_linespec_location)
3996         (string_to_event_location_basic, string_to_event_location):
3997         Constify.
3998         * linespec.h (decode_line_with_current_source)
3999         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4000         * linespec.c (linespec_lex_to_end)
4001         (decode_line_with_current_source)
4002         (decode_line_with_last_displayed): Constify.
4003         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4004         Constify.
4005         * cli/cli-cmds.c (edit_command, list_command): Constify.
4006         * breakpoint.h (until_break_command, watch_command_wrapper)
4007         (awatch_command_wrapper, rwatch_command_wrapper)
4008         (init_ada_exception_breakpoint): Constify.
4009         * breakpoint.c (break_command_1, dprintf_command)
4010         (break_range_command, watch_command_wrapper)
4011         (rwatch_command_wrapper, awatch_command_wrapper)
4012         (until_break_command, init_ada_exception_breakpoint)
4013         (strace_marker_create_sals_from_location, trace_command)
4014         (ftrace_command, strace_command, struct tracepoint): Constify.
4015         * ax-gdb.c (agent_command_1): Constify.
4016         * ada-lang.c (ada_exception_sal): Constify.
4017
4018 2017-09-27  Tom Tromey  <tom@tromey.com>
4019
4020         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4021         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4022         (get_context_size, no_chunk, get_insn_history_modifiers)
4023         (cmd_record_insn_history, get_call_history_modifiers)
4024         (cmd_record_call_history): Constify.
4025
4026 2017-09-27  Tom Tromey  <tom@tromey.com>
4027
4028         * source.c (show_substitute_path_command)
4029         (unset_substitute_path_command, set_substitute_path_command):
4030         Constify.
4031
4032 2017-09-27  Tom Tromey  <tom@tromey.com>
4033
4034         * typeprint.c (maintenance_print_type): Constify.
4035         * maint.c (maintenance_dump_me, maintenance_demangle)
4036         (maintenance_time_display, maintenance_info_sections)
4037         (maintenance_print_statistics, maintenance_deprecate)
4038         (maintenance_undeprecate): Constify.
4039         (maintenance_do_deprecate): Constify.  Use std::string.
4040         (maintenance_selftest): Constify.
4041         * gdbtypes.h (maintenance_print_type): Constify.
4042
4043 2017-09-27  Tom Tromey  <tom@tromey.com>
4044
4045         * hppa-tdep.c (unwind_command): Constify.
4046
4047 2017-09-27  Tom Tromey  <tom@tromey.com>
4048
4049         * target-descriptions.c (unset_tdesc_filename_cmd)
4050         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4051         Constify.
4052
4053 2017-09-27  Tom Tromey  <tom@tromey.com>
4054
4055         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4056
4057 2017-09-27  Tom Tromey  <tom@tromey.com>
4058
4059         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4060
4061 2017-09-27  Tom Tromey  <tom@tromey.com>
4062
4063         * tui/tui-regs.c (tui_reg_command): Constify.
4064
4065 2017-09-27  Tom Tromey  <tom@tromey.com>
4066
4067         * skip.c (skip_file_command, skip_function_command)
4068         (skip_enable_command, skip_disable_command, skip_delete_command):
4069         Constify.
4070
4071 2017-09-27  Tom Tromey  <tom@tromey.com>
4072
4073         * record-btrace.c (cmd_record_btrace_bts_start)
4074         (cmd_record_btrace_pt_start): Constify.
4075
4076 2017-09-27  Tom Tromey  <tom@tromey.com>
4077
4078         * symmisc.c (maintenance_print_symbols)
4079         (maintenance_print_msymbols, maintenance_print_objfiles)
4080         (maintenance_info_symtabs, maintenance_check_symtabs)
4081         (maintenance_expand_symtabs, maintenance_info_line_tables):
4082         Constify.
4083
4084 2017-09-27  Tom Tromey  <tom@tromey.com>
4085
4086         * top.c (new_ui_command): Constify.
4087
4088 2017-09-27  Tom Tromey  <tom@tromey.com>
4089
4090         * symfile.c (add_symbol_file_command)
4091         (remove_symbol_file_command, list_overlays_command)
4092         (map_overlay_command, unmap_overlay_command)
4093         (overlay_auto_command, overlay_manual_command)
4094         (overlay_off_command, overlay_load_command): Constify.
4095
4096 2017-09-27  Tom Tromey  <tom@tromey.com>
4097
4098         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4099         (info_spu_mailbox_command, info_spu_dma_command)
4100         (info_spu_proxydma_command): Constify.
4101
4102 2017-09-27  Tom Tromey  <tom@tromey.com>
4103
4104         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4105
4106 2017-09-27  Tom Tromey  <tom@tromey.com>
4107
4108         * cli/cli-script.c (user_defined_command): Constify.
4109
4110 2017-09-27  Tom Tromey  <tom@tromey.com>
4111
4112         * cli/cli-dump.c (dump_memory_command, dump_value_command)
4113         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4114         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4115         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4116         (dump_binary_value, append_binary_memory, append_binary_value):
4117         Constify.
4118         (struct dump_context) <func>: Constify.
4119         (add_dump_command): Update.
4120
4121 2017-09-27  Tom Tromey  <tom@tromey.com>
4122
4123         * cli/cli-cmds.c (show_version, show_configuration)
4124         (source_command, show_user): Constify.
4125
4126 2017-09-27  Tom Tromey  <tom@tromey.com>
4127
4128         * target.c (maintenance_print_target_stack): Constify.
4129
4130 2017-09-27  Tom Tromey  <tom@tromey.com>
4131
4132         * interps.c (interpreter_exec_cmd): Constify.
4133
4134 2017-09-27  Tom Tromey  <tom@tromey.com>
4135
4136         * record-full.c (cmd_record_full_restore): Constify.
4137
4138 2017-09-27  Tom Tromey  <tom@tromey.com>
4139
4140         * memattr.c (enable_mem_command, disable_mem_command)
4141         (delete_mem_command): Constify.
4142
4143 2017-09-27  Tom Tromey  <tom@tromey.com>
4144
4145         * value.c (show_convenience): Constify.
4146
4147 2017-09-27  Tom Tromey  <tom@tromey.com>
4148
4149         * gdbcore.h (core_file_command): Update.
4150         * corefile.c (core_file_command): Constify.
4151
4152 2017-09-27  Tom Tromey  <tom@tromey.com>
4153
4154         * user-regs.c (maintenance_print_user_registers): Constify.
4155
4156 2017-09-27  Tom Tromey  <tom@tromey.com>
4157
4158         * cp-namespace.c (maintenance_cplus_namespace): Constify.
4159
4160 2017-09-27  Tom Tromey  <tom@tromey.com>
4161
4162         * cp-support.c (first_component_command): Constify.
4163
4164 2017-09-27  Tom Tromey  <tom@tromey.com>
4165
4166         * psymtab.c (maintenance_print_psymbols)
4167         (maintenance_info_psymtabs, maintenance_check_psymtabs):
4168         Constify.
4169
4170 2017-09-27  Tom Tromey  <tom@tromey.com>
4171
4172         * windows-tdep.c (display_tib): Constify.
4173
4174 2017-09-27  Tom Tromey  <tom@tromey.com>
4175
4176         * linux-fork.c (delete_checkpoint_command)
4177         (detach_checkpoint_command): Constify.
4178
4179 2017-09-27  Tom Tromey  <tom@tromey.com>
4180
4181         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4182
4183 2017-09-27  Tom Tromey  <tom@tromey.com>
4184
4185         * arc-tdep.c (dump_arc_instruction_command): Constify.
4186
4187 2017-09-27  Tom Tromey  <tom@tromey.com>
4188
4189         * valprint.c (set_radix, show_radix): Constify.
4190
4191 2017-09-27  Tom Tromey  <tom@tromey.com>
4192
4193         * dtrace-probe.c (info_probes_dtrace_command): Constify.
4194
4195 2017-09-27  Tom Tromey  <tom@tromey.com>
4196
4197         * command.h (not_just_help_class_command): Update.
4198         * cli/cli-decode.h (not_just_help_class_command): Update.
4199         * cli/cli-decode.c (not_just_help_class_command): Constify.
4200
4201 2017-09-27  Tom Tromey  <tom@tromey.com>
4202
4203         * gdb_bfd.c (maintenance_info_bfds): Constify.
4204
4205 2017-09-27  Tom Tromey  <tom@tromey.com>
4206
4207         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4208         overloads.
4209         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
4210         (do_const_cfunc): New function.
4211         (cmd_cfunc_eq): New overload.
4212         (cli_user_command_p): Check do_const_cfunc.
4213         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4214         const_cfunc.
4215         * command.h (add_cmd): Add const overload and no-function
4216         overload.
4217         (set_cmd_cfunc): Add const overload.
4218         (cmd_const_cfunc_ftype): Declare.
4219         (cmd_cfunc_eq): Add const overload.
4220         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4221         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4222         overload.
4223
4224 2017-09-27  Tom Tromey  <tom@tromey.com>
4225
4226         * macroexp.c (get_next_token_for_substitution): New function.
4227         (substitute_args): Call it.  Check for __VA_OPT__.
4228
4229 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4230             Pedro Alves <palves@redhat.com>
4231
4232         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4233         producer_is_icc_lt_14.
4234         (producer_is_icc_lt_14): New function.
4235         (check_producer): Add code for checking version of ICC.
4236         (producer_is_icc): Move to producer.c.
4237         (read_structure_type): Restrict ICC workaround to ICC<14.
4238         * producer.c: Include selftest.h.
4239         (producer_is_icc, producer_parsing_tests, _initialize_producer):
4240         New functions.
4241         * producer.h (producer_is_icc): New declaration.
4242
4243 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4244
4245         * Makefile.in (SFILES): Add producer.c.
4246         (COMMON_OBS): Add producer.o
4247         * amd64-tdep.c (producer.h): Add new include.
4248         * dwarf2read.c (producer.h): Add new include.
4249         * producer.c: New file.
4250         * producer.h: New file.
4251         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4252         producer.c.
4253         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4254         producer.h.
4255
4256 2017-09-26  Matthias Klose  <doko@ubuntu.com>
4257
4258         * configure.ac: Search ncursesw before ncurses.
4259         Check ncursesw/ncurses.h before ncurses/ncurses.h.
4260         * gdb_curses.h: Include <ncursesw/ncurses.h>
4261         * config.in, configure: Regenerate.
4262
4263 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4264
4265         PR gdb/22185
4266         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4267         obsolete.
4268         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4269         Remove i386sol2 support.
4270         * configure.nat <i386sol2>: Remove.
4271         <sol2-64>: Fold into ...
4272         <sol2>: ... this.
4273         Move common settings to default section.
4274         Add sol-thread.o.
4275         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4276         x86_64-*-solaris2.1[0-9]*>: Rename to ...
4277         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4278         <i[34567]86-*-solaris*>: Remove.
4279         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4280
4281         * configure.ac: Remove wctype in libw check.
4282         (_MSE_INT_H): Don't define on Solaris 7-9.
4283         <solaris*>: Remove libthread_db.so.1 check.
4284         * configure: Regenerate.
4285         * config.in: Regenerate.
4286
4287         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4288         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4289         (gdb_ps_size_t): Remove.
4290         Use base types in users.
4291         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4292
4293         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4294
4295 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4296
4297         PR build/22206
4298         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4299         (adi_is_addr_mapped): Likewise.
4300         (PSR_ICC): Don't redefine.
4301         (PSR_IMPL): Likewise.
4302
4303 2017-09-25  Tom Tromey  <tom@tromey.com>
4304
4305         * regcache.c (regcache::dump): Use string_printf.
4306
4307 2017-09-25  Tom Tromey  <tom@tromey.com>
4308
4309         * regcache.c (class regcache_invalidator): New.
4310         (struct register_to_invalidate): Remove.
4311         (make_cleanup_regcache_invalidate): Remove.
4312         (regcache::raw_write): Use regcache_invalidator.
4313
4314 2017-09-25  Tom Tromey  <tom@tromey.com>
4315
4316         * spu-tdep.c (spu2ppu_sniffer): Update.
4317         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4318         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4319         Remove.
4320         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4321         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4322         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4323         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4324         (frame_pop): Update.
4325
4326 2017-09-25  Tom Tromey  <tom@tromey.com>
4327
4328         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4329         * regcache.h (regcache_xfree): Don't declare.
4330         * regcache.c (regcache_xfree): Remove.
4331         (do_regcache_xfree): Use delete.
4332         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4333         * linux-fork.c (free_fork): Use delete.
4334         (fork_save_infrun_state): Likewise.
4335         * jit.c (jit_dealloc_cache): Use delete.
4336         * infrun.c (discard_infcall_suspend_state): Use delete.
4337
4338 2017-09-25  Tom Tromey  <tom@tromey.com>
4339
4340         * regcache.h (regcache_xmalloc): Don't declare.
4341         (regcache_raw_set_cached_value): Update comment.
4342         * regcache.c (regcache_xmalloc): Remove.
4343         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4344         * jit.c (jit_frame_sniffer): Use new.
4345         * frame.c (frame_save_as_regcache): Use new.
4346
4347 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4348
4349         * NEWS: Advertise support for guarded-storage registers on IBM z.
4350
4351 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4352
4353         * s390-linux-nat.c (have_regset_gs): New static variable.
4354         (s390_linux_fetch_inferior_registers): Handle guarded-storage
4355         control block and guarded-storage broadcast control regsets.
4356         (s390_read_description): Detect whether the target has
4357         guarded-storage support, return appropriate tdesc.
4358         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4359         (features/s390x-gs-linux64.c): Likewise.
4360         (struct gdbarch_tdep) <have_gs>: New field.
4361         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4362         (s390_gsbc_regset): New variables.
4363         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4364         and s390_gsbc_regset, if applicable.
4365         (s390_core_read_description): Check whether core file was from a
4366         target with guarded-storage support; include appropriate regsets.
4367         (s390_gdbarch_init): Add registers for guarded-storage support.
4368         (_initialize_s390_tdep): Initialize new target descriptions that
4369         include registers for guarded-storage support.
4370         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4371         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4372         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4373         (S390_NUM_REGS): Adjust macro definition.
4374         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4375         (tdesc_s390x_gs_linux64): New declarations.
4376
4377 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4378
4379         * features/s390-gs-linux64.xml: New file.
4380         * features/s390-gs.xml: New file.
4381         * features/s390-gsbc.xml: New file.
4382         * features/s390x-gs-linux64.xml: New file.
4383         * features/Makefile (WHICH): Add s390-gs-linux64 and
4384         s390x-gs-linux64.
4385         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4386         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4387         * features/s390-gs-linux64.c: New generated file.
4388         * features/s390x-gs-linux64.c: New file.
4389         * regformats/s390-gs-linux64.dat: New file.
4390         * regformats/s390x-gs-linux64.dat: New file.
4391
4392 2017-09-23  Tom Tromey  <tom@tromey.com>
4393
4394         * defs.h (make_cleanup_override_quit_handler): Don't declare.
4395
4396 2017-09-22  Tom Tromey  <tom@tromey.com>
4397
4398         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4399         type to scoped_restore_tmpl.
4400         <scoped_input_handler>: Initialize m_quit_handler directly.
4401
4402 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4403
4404         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4405         (cd_command): Likewise.  Free "current_directory" before
4406         assigning to it.
4407         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4408         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4409         * top.c (gdb_dirbuf): Remove global declaration.
4410         * top.h (gdb_dirbuf): Likewise.
4411
4412 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4413
4414         * gnulib/aclocal.m4: Regenerate.
4415         * gnulib/config.in: Regenerate.
4416         * gnulib/configure: Regenerate.
4417         * gnulib/import/Makefile.am: Regenerate.
4418         * gnulib/import/Makefile.in: Regenerate.
4419         * gnulib/import/assure.h: New file.
4420         * gnulib/import/at-func.c: Likewise
4421         * gnulib/import/chdir-long.c: New file.
4422         * gnulib/import/chdir-long.h: New file.
4423         * gnulib/import/cloexec.c: New file.
4424         * gnulib/import/cloexec.h: New file.
4425         * gnulib/import/close.c: New file.
4426         * gnulib/import/closedir.c: New file.
4427         * gnulib/import/dirent-private.h: New file.
4428         * gnulib/import/dup-safer.c: New file.
4429         * gnulib/import/dup.c: New file.
4430         * gnulib/import/dup2.c: New file.
4431         * gnulib/import/error.c: New file.
4432         * gnulib/import/error.h: New file.
4433         * gnulib/import/exitfail.c: New file.
4434         * gnulib/import/exitfail.h: New file.
4435         * gnulib/import/fchdir.c: New file.
4436         * gnulib/import/fcntl.c: New file.
4437         * gnulib/import/fcntl.in.h: New file.
4438         * gnulib/import/fd-hook.c: New file.
4439         * gnulib/import/fd-hook.h: New file.
4440         * gnulib/import/fd-safer.c: New file.
4441         * gnulib/import/fdopendir.c: New file.
4442         * gnulib/import/filename.h: New file.
4443         * gnulib/import/filenamecat-lgpl.c: New file.
4444         * gnulib/import/filenamecat.h: New file.
4445         * gnulib/import/fstat.c: New file.
4446         * gnulib/import/fstatat.c: New file.
4447         * gnulib/import/getcwd-lgpl.c: New file.
4448         * gnulib/import/getcwd.c: New file.
4449         * gnulib/import/getdtablesize.c: New file.
4450         * gnulib/import/getlogin_r.c: New file.
4451         * gnulib/import/getprogname.c: New file.
4452         * gnulib/import/getprogname.h: New file.
4453         * gnulib/import/gettext.h: New file.
4454         * gnulib/import/glob-libc.h: New file.
4455         * gnulib/import/glob.c: New file.
4456         * gnulib/import/glob.in.h: New file.
4457         * gnulib/import/intprops.h: New file.
4458         * gnulib/import/m4/chdir-long.m4: New file.
4459         * gnulib/import/m4/close.m4: New file.
4460         * gnulib/import/m4/closedir.m4: New file.
4461         * gnulib/import/m4/d-ino.m4: New file.
4462         * gnulib/import/m4/d-type.m4: New file.
4463         * gnulib/import/m4/dup.m4: New file.
4464         * gnulib/import/m4/dup2.m4: New file.
4465         * gnulib/import/m4/error.m4: New file.
4466         * gnulib/import/m4/fchdir.m4: New file.
4467         * gnulib/import/m4/fcntl.m4: New file.
4468         * gnulib/import/m4/fcntl_h.m4: New file.
4469         * gnulib/import/m4/fdopendir.m4: New file.
4470         * gnulib/import/m4/filenamecat.m4: New file.
4471         * gnulib/import/m4/fstat.m4: New file.
4472         * gnulib/import/m4/fstatat.m4: New file.
4473         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4474         * gnulib/import/m4/getcwd-path-max.m4: New file.
4475         * gnulib/import/m4/getcwd.m4: New file.
4476         * gnulib/import/m4/getdtablesize.m4: New file.
4477         * gnulib/import/m4/getlogin_r.m4: New file.
4478         * gnulib/import/m4/getprogname.m4: New file.
4479         * gnulib/import/m4/glob.m4: New file.
4480         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4481         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4482         * gnulib/import/m4/mempcpy.m4: New file.
4483         * gnulib/import/m4/memrchr.m4: New file.
4484         * gnulib/import/m4/mode_t.m4: New file.
4485         * gnulib/import/m4/msvc-inval.m4: New file.
4486         * gnulib/import/m4/msvc-nothrow.m4: New file.
4487         * gnulib/import/m4/open.m4: New file.
4488         * gnulib/import/m4/openat.m4: New file.
4489         * gnulib/import/m4/opendir.m4: New file.
4490         * gnulib/import/m4/readdir.m4: New file.
4491         * gnulib/import/m4/realloc.m4: New file.
4492         * gnulib/import/m4/rewinddir.m4: New file.
4493         * gnulib/import/m4/save-cwd.m4: New file.
4494         * gnulib/import/m4/strdup.m4: New file.
4495         * gnulib/import/m4/strerror.m4: New file.
4496         * gnulib/import/m4/unistd-safer.m4: New file.
4497         * gnulib/import/mempcpy.c: New file.
4498         * gnulib/import/memrchr.c: New file.
4499         * gnulib/import/msvc-inval.c: New file.
4500         * gnulib/import/msvc-inval.h: New file.
4501         * gnulib/import/msvc-nothrow.c: New file.
4502         * gnulib/import/msvc-nothrow.h: New file.
4503         * gnulib/import/open.c: New file.
4504         * gnulib/import/openat-die.c: New file.
4505         * gnulib/import/openat-priv.h: New file.
4506         * gnulib/import/openat-proc.c: New file.
4507         * gnulib/import/openat.c: New file.
4508         * gnulib/import/openat.h: New file.
4509         * gnulib/import/opendir.c: New file.
4510         * gnulib/import/pipe-safer.c: New file.
4511         * gnulib/import/readdir.c: New file.
4512         * gnulib/import/realloc.c: New file.
4513         * gnulib/import/rewinddir.c: New file.
4514         * gnulib/import/save-cwd.c: New file.
4515         * gnulib/import/save-cwd.h: New file.
4516         * gnulib/import/strdup.c: New file.
4517         * gnulib/import/strerror-override.c: New file.
4518         * gnulib/import/strerror-override.h: New file.
4519         * gnulib/import/strerror.c: New file.
4520         * gnulib/import/unistd--.h: New file.
4521         * gnulib/import/unistd-safer.h: New file.
4522         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4523         "getcwd" and "glob".
4524         * ser-tcp.c: Undefine "close" before redefining it.
4525
4526 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4527
4528         * guile/scm-value.c (gdbscm_value_address): Initialize address,
4529         get rid of res_val.
4530
4531 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4532
4533         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4534         <sol2,sparc>: Likewise.
4535         <sol2-64,i386>: Likewise.
4536
4537         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4538         -Wdeprecated-declarations on *-*-solaris*.
4539         * configure: Regenerate.
4540
4541         * procfs.c: Include "nat/inferior.h".
4542         (procfs_info_proc): Fix typo.
4543
4544 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4545
4546         * remote.c (vector): Include.
4547         (struct private_thread_info): Add field, thread_handle.
4548         (free_private_thread_info): Deallocate storage associated with
4549         thread handle.
4550         (get_private_info_thread): Initialize `thread_handle' field.
4551         (struct thread_item): Add field, thread_handle.
4552         (clear_threads_listing_context): Deallocate storage associated
4553         with thread handle.
4554         (start_thread): Add support for "handle" attribute.
4555         (thread_attributes): Add "handle".
4556         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4557         field.
4558         (remote_update_thread_list): Update thread_handle.
4559         (remote_thread_handle_to_thread_info): New function.
4560         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4561
4562 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4563
4564         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4565         function.
4566         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4567         * python/python-internal.h (thread_object_type): Declare.
4568
4569 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4570
4571         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4572         (target_thread_handle_to_thread_info): Declare.
4573         * target.c (target_thread_handle_to_thread_info): New function.
4574         * target-delegates.c: Regenerate.
4575         * gdbthread.h (find_thread_by_handle): Declare.
4576         * thread.c (find_thread_by_handle): New function.
4577         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4578         function.
4579         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4580
4581 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4582
4583         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4584
4585 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4586
4587         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4588
4589 2017-09-21  Yao Qi  <yao.qi@linaro.org>
4590
4591         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4592         to gdb_target_obs.
4593
4594 2017-09-20  Tom Tromey  <tom@tromey.com>
4595
4596         * breakpoint.c (struct counted_command_line): Remove.
4597         (breakpoint_commands): Update.
4598         (alloc_counted_command_line, incref_counted_command_line)
4599         (decref_counted_command_line, do_cleanup_counted_command_line)
4600         (make_cleanup_decref_counted_command_line): Remove.
4601         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4602         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4603         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4604         (save_breakpoints): Update.
4605         * breakpoint.h (counted_command_line): Now a typedef to
4606         shared_ptr.
4607         (struct breakpoint) <commands>: Now a counted_command_line.
4608         (struct bpstats) <command>: Likewise.
4609
4610 2017-09-20  Tom Tromey  <tom@tromey.com>
4611
4612         * breakpoint.c (struct commands_info, do_map_commands_command):
4613         Remove.
4614         (commands_command_1): Update.
4615         (iterate_over_related_breakpoints): Take a function_view.
4616         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4617         (delete_command): Update.
4618         (map_breakpoint_numbers): Take a function_view.
4619         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4620         (disable_command): Update.
4621         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4622         (enable_command): Update.
4623         (struct disp_data, do_enable_breakpoint_disp)
4624         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4625         (do_map_enable_delete_breakpoint): Remove.
4626         (enable_once_command, enable_count_command, enable_delete_command)
4627         (delete_trace_variable_command): Update.
4628
4629 2017-09-20  Tom Tromey  <tom@tromey.com>
4630
4631         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
4632         (bpstat_clear): Use delete.
4633         (bpstats): New constructors.
4634         (bpstat_copy, bpstat_stop_status): Use new.
4635         (dprintf_after_condition_true): Update.
4636         * breakpoint.h (bpstats::bpstats): Add constructors.
4637         (bpstats::~bpstats): Add destructor.
4638
4639 2017-09-20  Pedro Alves  <palves@redhat.com>
4640
4641         * eval.c (make_params): Delete, refactored as ...
4642         (class fake_method): ... this new type's ctor.
4643         (fake_method::~fake_method): New.
4644         (evaluate_subexp_standard): Use 'fake_method'.
4645
4646 2017-09-20  Tom Tromey  <tom@tromey.com>
4647
4648         * windows-nat.c (get_windows_debug_event, windows_wait)
4649         (do_initial_windows_stuff, windows_attach): Update.
4650         * utils.c (vwarning, internal_vproblem): Update.
4651         (ui_unregister_input_event_handler_cleanup)
4652         (prepare_to_handle_input): Remove.
4653         (class scoped_input_handler): New.
4654         (defaulted_query, prompt_for_continue): Update.
4655         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4656         Update.
4657         * top.c (undo_terminal_modifications_before_exit): Update.
4658         * target/target.h (target_terminal_init, target_terminal_inferior)
4659         (target_terminal_ours): Don't declare.
4660         (class target_terminal): New.
4661         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4662         (target_terminal_ours_for_output)
4663         (make_cleanup_restore_target_terminal): Don't declare.
4664         (target_terminal_info): Remove.
4665         * target.c (enum terminal_state, terminal_state): Remove.
4666         (target_terminal::terminal_state): Define.
4667         (target_terminal::init): Rename from target_terminal_init.
4668         (target_terminal::inferior): Rename from
4669         target_terminal_inferior.
4670         (target_terminal::ours): Rename from target_terminal_ours.
4671         (target_terminal::ours_for_output): Rename from
4672         target_terminal_ours_for_output.
4673         (target_terminal::info): New method.
4674         (cleanup_restore_target_terminal)
4675         (make_cleanup_restore_target_terminal): Remove.
4676         * solib.c (handle_solib_event): Update.
4677         * remote.c (remote_serial_quit_handler): Update.
4678         (remote_terminal_inferior, remote_wait_as): Update.
4679         * record-full.c (record_full_wait_1): Update.
4680         * nto-procfs.c (procfs_create_inferior): Update.
4681         * nat/fork-inferior.c (startup_inferior): Update.
4682         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4683         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4684         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4685         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4686         (mi_breakpoint_created, mi_breakpoint_deleted)
4687         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4688         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4689         (mi_user_selected_context_changed, report_initial_inferior):
4690         Update.
4691         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4692         (linux_nat_terminal_inferior): Update.
4693         * infrun.c (follow_fork_inferior)
4694         (handle_vfork_child_exec_or_exit, do_target_resume)
4695         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4696         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4697         Update.
4698         * inflow.c (child_terminal_init, info_terminal_command): Update.
4699         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4700         (attach_command): Update.
4701         * infcall.c (call_thread_fsm_should_stop): Update.
4702         * gnu-nat.c (gnu_attach): Update.
4703         * extension.c (struct active_ext_lang_state)
4704         (restore_active_ext_lang): Update.
4705         * exceptions.c (print_flush): Update.
4706         * event-top.c (async_enable_stdin, default_quit_handler): Update.
4707         (struct quit_handler_cleanup_data, restore_quit_handler)
4708         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4709         Remove.
4710         * cp-support.c (gdb_demangle): Update.
4711         * breakpoint.c (update_inserted_breakpoint_locations)
4712         (insert_breakpoint_locations, handle_jit_event)
4713         (disable_breakpoints_in_unloaded_shlib): Update.
4714         * annotate.c (annotate_breakpoints_invalid)
4715         (annotate_frames_invalid): Update.
4716
4717 2017-09-20  Tom Tromey  <tom@tromey.com>
4718
4719         * main.c (catch_command_errors): Rename from
4720         catch_command_errors_const.
4721         (captured_main_1): Update.
4722
4723 2017-09-20  Pedro Alves  <palves@redhat.com>
4724
4725         * cli/cli-cmds.c (list_command): Use print_sal_location.
4726         (print_sal_location): New function.
4727         (ambiguous_line_spec): Use print_sal_location.
4728         * linespec.c (symbol_to_sal): Record the symbol in the sal.
4729         * symtab.c (find_function_start_sal): Likewise.
4730         * symtab.h (symtab_and_line::symbol): New field.
4731
4732 2017-09-20  Pedro Alves  <palves@redhat.com>
4733
4734         * linespec.c (minsym_found): Handle non-text minsyms.
4735         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
4736
4737 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4738
4739         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
4740         backslash.
4741
4742 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4743
4744         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
4745         vmovups instead vmovaps.
4746         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
4747
4748 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
4749
4750         * NEWS (Changes since GDB 8.0): Add starti.
4751         * infcmd.c (enum run_break): New.
4752         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
4753         case.
4754         (run_command): Use enum run_how.
4755         (start_command): Likewise.
4756         (starti_command): New function.
4757         (RUN_ARGS_HELP): New macro.
4758         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
4759         commands.  Add starti command.
4760
4761 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4762
4763         * Makefile.in (monitor.o): Remove the rule.
4764
4765 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4766
4767         * annotate.h (struct annotate_arg_emitter): Use
4768         DISABLE_COPY_AND_ASSIGN.
4769         * common/refcounted-object.h (refcounted_object): Likewise.
4770         * completer.h (struct completion_result): Likewise.
4771         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
4772         * filename-seen-cache.h (filename_seen_cache): Likewise.
4773         * gdbcore.h (thread_section_name): Likewise.
4774         * gdb_regex.h (compiled_regex): Likewise.
4775         * gdbthread.h (scoped_restore_current_thread): Likewise.
4776         * inferior.h (scoped_restore_current_inferior): Likewise.
4777         * jit.c (jit_reader): Likewise.
4778         * linespec.h (struct linespec_result): Likewise.
4779         * mi/mi-parse.h (struct mi_parse): Likewise.
4780         * nat/fork-inferior.c (execv_argv): Likewise.
4781         * progspace.h (scoped_restore_current_program_space): Likewise.
4782         * python/python-internal.h (class gdbpy_enter): Likewise.
4783         * regcache.h (regcache): Likewise.
4784         * target-descriptions.c (struct tdesc_reg): Likewise.
4785         (struct tdesc_type): Likewise.
4786         (struct tdesc_feature): Likewise.
4787         * ui-out.h (ui_out_emit_type): Likewise.
4788
4789 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
4790
4791         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
4792         label abort_expression.
4793
4794 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4795
4796         * common/buffer.c (buffer_xml_printf): Adjust.
4797         * common/xml-utils.c (xml_escape_text): Change return type to
4798         std::string, update code accordingly.
4799         * common/xml-utils.h (xml_escape_text): Change return type to
4800         std::string.
4801         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
4802         * windows-tdep.c (windows_xfer_shared_library): Adjust.
4803         * unittests/xml-utils-selftests.c (test_xml_escape_text):
4804         Adjust.
4805
4806 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4807
4808         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
4809         (SUBDIR_UNITTESTS_OBS): Add new object file.
4810         * unittests/xml-utils-selftests.c: New file.
4811
4812 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4813
4814         * common/selftest.h (selftest): New struct/interface.
4815         (register_test): Add name parameter, add new overload.
4816         (run_tests): Add filter parameter.
4817         (for_each_selftest_ftype): New typedef.
4818         (for_each_selftest): New declaration.
4819         * common/selftest.c (tests): Change type to
4820         map<string, unique_ptr<selftest>>.
4821         (simple_selftest): New struct.
4822         (register_test): New function.
4823         (register_test): Add name parameter and use it.
4824         (run_tests): Add filter parameter and use it.  Add prints.
4825         Adjust to vector -> map change.
4826         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
4827         registering selftests.
4828         * arm-tdep.c (_initialize_arm_tdep): Likewise.
4829         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
4830         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
4831         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
4832         * findvar.c (_initialize_findvar): Likewise.
4833         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
4834         * maint.c (maintenance_selftest): Update call to run_tests.
4835         (maintenance_info_selftests): New function.
4836         (_initialize_maint_cmds): Register "maintenance info selftests"
4837         command.  Update "maintenance selftest" doc.
4838         * regcache.c (_initialize_regcache): Add names when registering
4839         selftests.
4840         * rust-exp.y (_initialize_rust_exp): Likewise.
4841         * selftest-arch.c (gdbarch_selftest): New struct.
4842         (gdbarch_tests): Remove.
4843         (register_test_foreach_arch): Add name parameter.  Call
4844         register_test.
4845         (tests_with_arch): Remove, move most content to
4846         gdbarch_selftest::operator().
4847         (_initialize_selftests_foreach_arch): Remove.
4848         * selftest-arch.h (register_test_foreach_arch): Add name
4849         parameter.
4850         (run_tests_with_arch): New declaration.
4851         * utils-selftests.c (_initialize_utils_selftests): Add names
4852         when registering selftests.
4853         * utils.c (_initialize_utils): Likewise.
4854         * unittests/array-view-selftests.c
4855         (_initialize_array_view_selftests): Likewise.
4856         * unittests/environ-selftests.c (_initialize_environ_selftests):
4857         Likewise.
4858         * unittests/function-view-selftests.c
4859         (_initialize_function_view_selftests): Likewise.
4860         * unittests/offset-type-selftests.c
4861         (_initialize_offset_type_selftests): Likewise.
4862         * unittests/optional-selftests.c
4863         (_initialize_optional_selftests): Likewise.
4864         * unittests/scoped_restore-selftests.c
4865         (_initialize_scoped_restore_selftests): Likewise.
4866         * NEWS: Document "maintenance selftest" and "maint info
4867         selftests".
4868
4869 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4870
4871         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
4872         scoped_restore.
4873
4874 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4875
4876         * mi/mi-main.c (mi_load_progress): Make uiout variable
4877         a unique_ptr.
4878
4879 2017-09-15  Pedro Alves  <palves@redhat.com>
4880
4881         * compile/compile-c-types.c (convert_enum, convert_int)
4882         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
4883
4884 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
4885
4886         * dwarf2read.c (copy_string): Remove.
4887         (parse_macro_definition): Replace copy_string with savestring.
4888
4889 2017-09-15  Yao Qi  <yao.qi@linaro.org>
4890
4891         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
4892         gdb_target_obs.
4893         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
4894         Likewise.
4895         (i[34567]86-*-linux*): Likewise.
4896
4897 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4898
4899         * dwarf2expr.h (dwarf_stack_value): Add constructor.
4900         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
4901         <stack>: Change type to std::vector.
4902         <stack_len, stack_allocated>: Remove.
4903         <grow_stack>: Remove.
4904         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4905         (dwarf_expr_context::~dwarf_expr_context): Remove.
4906         (dwarf_expr_context::grow_stack): Remove.
4907         (dwarf_expr_context::push): Adjust.
4908         (dwarf_expr_context::pop): Adjust.
4909         (dwarf_expr_context::fetch): Adjust.
4910         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
4911         (dwarf_expr_context::stack_empty_p): Adjust.
4912         (dwarf_expr_context::execute_stack_op): Adjust.
4913
4914 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4915
4916         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
4917         return type to bool.
4918         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
4919
4920 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4921
4922         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
4923         Change type to bool.
4924         (dwarf_stack_value) <in_stack_memory>: Likewise.
4925         (dwarf_expr_context) <push_address>: Change parameter type to
4926         bool.
4927         <fetch_in_stack_memory>: Change return type to bool.
4928         <push>: Change parameter type to bool.
4929         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
4930         to bool.
4931         (dwarf_expr_context::push_address): Likewise.
4932         (dwarf_expr_context::fetch_in_stack_memory): Change return type
4933         to bool.
4934         (dwarf_expr_context::execute_stack_op): Adjust.
4935         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
4936
4937 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4938
4939         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
4940         (struct dwarf_expr_context) <n_pieces>: Remove.
4941         <pieces>: Change type to std::vector.
4942         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4943         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
4944         pieces.
4945         (dwarf_expr_context::add_piece): Adjust.
4946         * dwarf2loc.c (struct piece_closure): Initialize fields.
4947         <n_pieces>: Remove.
4948         <pieces>: Change type to std::vector.
4949         (allocate_piece_closure): Adjust, change parameter to
4950         std::vector rvalue and std::move it to piece_closure.
4951         (rw_pieced_value): Adjust.
4952         (check_pieced_synthetic_pointer): Adjust.
4953         (indirect_synthetic_pointer): Adjust.
4954         (coerce_pieced_ref): Adjust.
4955         (free_pieced_value_closure):  Adjust.  Use delete to free
4956         piece_closure.
4957         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
4958         to allocate_piece_closure.
4959         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
4960
4961 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4962
4963         * probe.h (probe_ops_cp): Remove typedef.
4964         (DEF_VEC_P (probe_ops_cp)): Remove.
4965         (all_probe_ops): Change type to std::vector.
4966         * probe.c (info_probes_for_ops): Adjust to vector change.
4967         (probe_linespec_to_ops): Likewise.
4968         (all_probe_ops): Change type to std::vector.
4969         (_initialize_probe): Adjust to vector change.
4970         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
4971         * elfread.c (elf_get_probes): Likewise.
4972         * stap-probe.c (_initialize_stap_probe): Likewise.
4973
4974 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4975
4976         * probe.h (struct bound_probe): Define constructors.
4977         * probe.c (bound_probe_s): Remove typedef.
4978         (DEF_VEC_O (bound_probe_s)): Remove VEC.
4979         (collect_probes): Change return type to std::vector, remove
4980         cleanup.
4981         (compare_probes): Return bool, change parameter type.  Change
4982         semantic to "less than".
4983         (gen_ui_out_table_header_info): Change parameter to std::vector
4984         and update.
4985         (exists_probe_with_pops): Likewise.
4986         (info_probes_for_ops): Update to std::vector change.
4987         (enable_probes_command): Likewise.
4988         (disable_probes_command): Likewise.
4989
4990 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4991
4992         * probe.h (struct probe_ops) <get_probes>: Change parameter from
4993         vec to std::vector.
4994         * probe.c (parse_probes_in_pspace): Update.
4995         (find_probes_in_objfile): Update.
4996         (find_probe_by_pc): Update.
4997         (collect_probes): Update.
4998         (probe_any_get_probes): Update.
4999         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5000         return type to reference to std::vector.
5001         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5002         std::vector and update.
5003         (dtrace_process_dof): Likewise.
5004         (dtrace_get_probes): Likewise.
5005         * elfread.c (elf_get_probes): Change return type to std::vector,
5006         store an std::vector in bfd_data.
5007         (probe_key_free): Update to std::vector.
5008         * stap-probe.c (handle_stap_probe): Change parameter to
5009         std::vector and update.
5010         (stap_get_probes): Likewise.
5011         * symfile-debug.c (debug_sym_get_probes): Change return type to
5012         std::vector and update.
5013
5014 2017-09-11  Tom Tromey  <tom@tromey.com>
5015
5016         * breakpoint.c (program_breakpoint_here_p): Update.
5017         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5018         from make_show_memory_breakpoints_cleanup.  Return a
5019         scoped_restore_tmpl<int>.
5020         (restore_show_memory_breakpoints): Remove.
5021         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5022         * mem-break.c (memory_validate_breakpoint): Update.
5023         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5024         (ia64_memory_remove_breakpoint): Update.
5025         (ia64_breakpoint_from_pc): Update.
5026         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5027         from make_show_memory_breakpoints_cleanup.
5028
5029 2017-09-11  Tom Tromey  <tom@tromey.com>
5030
5031         * d-namespace.c (d_lookup_symbol): Use std::string.
5032         (find_symbol_in_baseclass): Likewise.
5033
5034 2017-09-11  Tom Tromey  <tom@tromey.com>
5035
5036         * ctf.c (ctf_start): Use std::string.
5037
5038 2017-09-11  Tom Tromey  <tom@tromey.com>
5039
5040         * ada-lang.c (is_known_support_routine): Update.
5041         (ada_unhandled_exception_name_addr_from_raise): Update.
5042         * guile/scm-frame.c (gdbscm_frame_name): Update.
5043         * python/py-frame.c (frapy_name): Update.
5044         (frapy_function): Update.
5045         * stack.h (find_frame_funname): Update.
5046         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5047         (print_frame): Update.
5048
5049 2017-09-11  Tom Tromey  <tom@tromey.com>
5050
5051         * findcmd.c (put_bits): Take a gdb::byte_vector.
5052         (parse_find_args): Return gdb::byte_vector.  "args" now const.
5053         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
5054         cleanups.
5055         (find_command): Update.
5056
5057 2017-09-11  Tom Tromey  <tom@tromey.com>
5058
5059         * cli/cli-script.c (class scoped_restore_hook_in): New.
5060         (clear_hook_in_cleanup): Remove.
5061         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5062         scoped_restore_hook_in.
5063
5064 2017-09-11  Tom Tromey  <tom@tromey.com>
5065
5066         * cli/cli-script.c (restore_interp): Remove.
5067         (read_command_lines): Use scoped_restore_interp.
5068         * interps.c (scoped_restore_interp::set_temp): Rename from
5069         interp_set_temp.
5070         * interps.h (class scoped_restore_interp): New.
5071         (interp_set_temp): Remove.
5072
5073 2017-09-11  Tom Tromey  <tom@tromey.com>
5074
5075         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5076         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5077         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5078         scoped_restore.
5079         (mi_cmd_break_insert_1): Update.
5080         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5081         scoped_restore.
5082
5083 2017-09-11  Tom Tromey  <tom@tromey.com>
5084
5085         * demangle.c (demangle_command): Update.
5086         * breakpoint.c (disable_command): Update.
5087         (enable_command): Update.
5088         (find_location_by_number): Make "number" const.  Use
5089         get_number_trailer.
5090         * cli/cli-utils.c (extract_arg): Return std::string.
5091         * probe.c (parse_probe_linespec): Update.  Change types.
5092         (collect_probes): Take string arguments.
5093         (parse_probe_linespec): Likewise.
5094         (info_probes_for_ops): Update.
5095         (enable_probes_command): Update.
5096         (disable_probes_command): Update.
5097         * break-catch-sig.c (catch_signal_split_args): Update.
5098         * mi/mi-parse.c (mi_parse): Update.
5099
5100 2017-09-11  Tom Tromey  <tom@tromey.com>
5101
5102         * language.h (language_enum): Make argument const.
5103         * language.c (language_enum): Make argument const.
5104
5105 2017-09-11  Tom Tromey  <tom@tromey.com>
5106
5107         * common/common-utils.h (skip_to_space): Remove macro, redeclare
5108         as function.
5109         (skip_to_space): Rename from skip_to_space_const.
5110         * common/common-utils.c (skip_to_space): New function.
5111         (skip_to_space): Rename from skip_to_space_const.
5112         * cli/cli-utils.h (get_number): Rename from get_number_const.
5113         (extract_arg): Rename from extract_arg_const.
5114         * cli/cli-utils.c (get_number): Rename from get_number_const.
5115         (extract_arg): Rename from extract_arg_const.
5116         (number_or_range_parser::get_number): Use ::get_number.
5117         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5118         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5119         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5120         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5121         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5122         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5123         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5124         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5125
5126 2017-09-11  Tom Tromey  <tom@tromey.com>
5127
5128         * python/python.c (do_start_initialization): Use
5129         py-event-types.def to initialize types.
5130         Define all object type structures.
5131         * python/python-internal.h: Don't declare event initialization
5132         functions.
5133         * python/py-threadevent.c (thread_event_object_type): Don't
5134         define.
5135         * python/py-stopevent.c (stop_event_object_type): Don't define.
5136         * python/py-signalevent.c (signal_event_object_type): Don't
5137         declare or define.
5138         * python/py-newobjfileevent.c (new_objfile_event_object_type)
5139         (clear_objfiles_event_object_type): Don't declare or define.
5140         * python/py-infevents.c (inferior_call_pre_event_object_type)
5141         (inferior_call_post_event_object_type)
5142         (register_changed_event_object_type)
5143         (memory_changed_event_object_type): Don't declare or define.
5144         * python/py-inferior.c (new_thread_event_object_type)
5145         (new_inferior_event_object_type)
5146         (inferior_deleted_event_object_type): Don't declare or define.
5147         * python/py-exitedevent.c (exited_event_object_type): Don't
5148         declare or define.
5149         * python/py-evts.c (gdbpy_initialize_py_events): Use
5150         py-all-events.def.
5151         * python/py-events.h (thread_event_object_type): Don't declare.
5152         (events_object): Use py-all-events.def.
5153         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
5154         py-event-types.def.
5155         * python/py-event-types.def: New file.
5156         * python/py-continueevent.c (create_continue_event_object): Don't
5157         declare or define.
5158         * python/py-bpevent.c (breakpoint_event_object_type): Don't
5159         declare or define.
5160         * python/py-all-events.def: New file.
5161
5162 2017-09-11  Tom Tromey  <tom@tromey.com>
5163
5164         * python/py-threadevent.c (create_thread_event_object): Return
5165         gdbpy_ref.
5166         * python/py-stopevent.h (create_stop_event_object)
5167         (create_breakpoint_event_object, create_signal_event_object):
5168         Update.
5169         * python/py-stopevent.c (create_stop_event_object): Return
5170         gdbpy_ref.
5171         (emit_stop_event): Update.
5172         * python/py-signalevent.c (create_signal_event_object): Return
5173         gdbpy_ref.
5174         * python/py-infevents.c (create_inferior_call_event_object):
5175         Update.
5176         * python/py-event.h (create_event_object)
5177         (create_thread_event_object): Update.
5178         * python/py-event.c (create_event_object): Return gdbpy_ref.
5179         * python/py-continueevent.c: Return gdbpy_ref.
5180         * python/py-bpevent.c (create_breakpoint_event_object): Return
5181         gdbpy_ref.
5182
5183 2017-09-11  Tom Tromey  <tom@tromey.com>
5184
5185         PR python/15622:
5186         * NEWS: Add entry.
5187         * python/python.c (do_start_initialization): Initialize new event
5188         types.
5189         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5190         (gdbpy_initialize_inferior_deleted_event)
5191         (gdbpy_initialize_new_thread_event): Declare.
5192         * python/py-threadevent.c (create_thread_event_object): Add option
5193         "thread" parameter.
5194         * python/py-inferior.c (new_thread_event_object_type)
5195         (new_inferior_event_object_type)
5196         (inferior_deleted_event_object_type): Declare.
5197         (python_new_inferior, python_inferior_deleted): New functions.
5198         (add_thread_object): Emit new_thread event.
5199         (gdbpy_initialize_inferior): Attach new functions to corresponding
5200         observers.
5201         (new_thread, new_inferior, inferior_deleted): Define new event
5202         types.
5203         * python/py-evts.c (gdbpy_initialize_py_events): Add new
5204         registries.
5205         * python/py-events.h (events_object) <new_inferior,
5206         inferior_deleted, new_thread>: New fields.
5207         * python/py-event.h (create_thread_event_breakpoint): Add optional
5208         "thread" parameter.
5209
5210 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5211
5212         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5213         check current_ui instead.
5214         (internal_vproblem): Likewise.
5215
5216 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
5217
5218         * thread.c (print_thread_info_1): Remove unnecessary calls to
5219         uiout->is_mi_like_p.
5220
5221 2017-09-09  Tom Tromey  <tom@tromey.com>
5222
5223         * namespace.h (add_using_directive): Update.
5224         * namespace.c (add_using_directive): Change type of excludes to
5225         std::vector.
5226         * dwarf2read.c (read_import_statement): Use std::vector.
5227         (read_namespace): Update.
5228         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5229
5230 2017-09-09  Tom Tromey  <tom@tromey.com>
5231
5232         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5233
5234 2017-09-09  Tom Tromey  <tom@tromey.com>
5235
5236         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5237
5238 2017-09-09  Tom Tromey  <tom@tromey.com>
5239
5240         * stack.c (func_command): Use gdb::def_vector.
5241
5242 2017-09-09  Tom Tromey  <tom@tromey.com>
5243
5244         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5245         ui_out_emit_list, ui_out_emit_tuple.
5246         (mi_cmd_var_update): Likewise.
5247
5248 2017-09-09  Tom Tromey  <tom@tromey.com>
5249
5250         * mi/mi-interp.c (mi_user_selected_context_changed): Use
5251         ui_out_redirect_pop.
5252         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5253         ui_out_redirect_pop.
5254         * utils.c (do_ui_out_redirect_pop)
5255         (make_cleanup_ui_out_redirect_pop): Remove.
5256         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5257         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5258         * ui-out.h (ui_out_redirect_pop): New class.
5259
5260 2017-09-09  Tom Tromey  <tom@tromey.com>
5261
5262         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5263         (list_available_thread_groups, mi_cmd_list_thread_groups)
5264         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5265         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5266         Likewise.
5267
5268 2017-09-09  Tom Tromey  <tom@tromey.com>
5269
5270         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5271         ui_out_emit_tuple.
5272
5273 2017-09-09  Tom Tromey  <tom@tromey.com>
5274
5275         * target.c (flash_erase_command): Use ui_out_emit_tuple.
5276         * stack.c (print_frame): Use ui_out_emit_tuple.
5277         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5278         (info_spu_mailbox_command, info_spu_dma_command)
5279         (info_spu_proxydma_command): Likewise.
5280         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5281         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5282         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5283         ui_out_emit_tuple.
5284         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5285
5286 2017-09-09  Tom Tromey  <tom@tromey.com>
5287
5288         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5289         (class ui_out_emit_table): Update comment.
5290         * ui-out.c (do_cleanup_table_end)
5291         (make_cleanup_ui_out_table_begin_end): Remove.
5292         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5293         (info_spu_dma_cmdlist): Likewise.
5294         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5295         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5296         ui_out_emit_table.
5297
5298 2017-09-09  Tom Tromey  <tom@tromey.com>
5299
5300         * thread.c (print_thread_info_1): Use ui_out_emit_table,
5301         ui_out_emit_list, gdb::optional.
5302
5303 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
5304
5305         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5306         prototype.
5307         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5308         prototype.
5309         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5310         prototype.
5311         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5312         * ada-exp.y: Remove _initialize_ada_exp prototype.
5313         * ada-lang.c: Remove _initialize_ada_language prototype.
5314         * ada-tasks.c: Remove _initialize_tasks prototype.
5315         * addrmap.c: Remove _initialize_addrmap prototype.
5316         * agent.c: Remove _initialize_agent prototype.
5317         * aix-thread.c: Remove _initialize_aix_thread prototype.
5318         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5319         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5320         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5321         prototype.
5322         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5323         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5324         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5325         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5326         prototype.
5327         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5328         prototype.
5329         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5330         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5331         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5332         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5333         prototype.
5334         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5335         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5336         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5337         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5338         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5339         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5340         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5341         prototype.
5342         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5343         prototype.
5344         * annotate.c: Remove _initialize_annotate prototype.
5345         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5346         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5347         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5348         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5349         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5350         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5351         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5352         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5353         prototype.
5354         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5355         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5356         * auto-load.c: Remove _initialize_auto_load prototype.
5357         * auxv.c: Remove _initialize_auxv prototype.
5358         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5359         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5360         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5361         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5362         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5363         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5364         prototype.
5365         * break-catch-throw.c: Remove _initialize_break_catch_throw
5366         prototype.
5367         * breakpoint.c: Remove _initialize_breakpoint prototype.
5368         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5369         * btrace.c: Remove _initialize_btrace prototype.
5370         * charset.c: Remove _initialize_charset prototype.
5371         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5372         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5373         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5374         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5375         * cli/cli-script.c: Remove _initialize_cli_script prototype.
5376         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5377         * coffread.c: Remove _initialize_coffread prototype.
5378         * compile/compile.c: Remove _initialize_compile prototype.
5379         * complaints.c: Remove _initialize_complaints prototype.
5380         * completer.c: Remove _initialize_completer prototype.
5381         * copying.awk: Remove _initialize_copying prototype.
5382         * copying.c: Regenerate.
5383         * core-regset.c: Remove _initialize_core_regset prototype.
5384         * corefile.c: Remove _initialize_core prototype.
5385         * corelow.c: Remove _initialize_corelow prototype.
5386         * cp-abi.c: Remove _initialize_cp_abi prototype.
5387         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5388         * cp-support.c: Remove _initialize_cp_support prototype.
5389         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5390         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5391         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5392         * ctf.c: Remove _initialize_ctf prototype.
5393         * d-lang.c: Remove _initialize_d_language prototype.
5394         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5395         prototype.
5396         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5397         * dbxread.c: Remove _initialize_dbxread prototype.
5398         * dcache.c: Remove _initialize_dcache prototype.
5399         * demangle.c: Remove _initialize_demangler prototype.
5400         * disasm-selftests.c: Remove _initialize_disasm_selftests
5401         prototype.
5402         * disasm.c: Remove _initialize_disasm prototype.
5403         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5404         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5405         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5406         prototype.
5407         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5408         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5409         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5410         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5411         * elfread.c: Remove _initialize_elfread prototype.
5412         * exec.c: Remove _initialize_exec prototype.
5413         * extension.c: Remove _initialize_extension prototype.
5414         * f-lang.c: Remove _initialize_f_language prototype.
5415         * f-valprint.c: Remove _initialize_f_valprint prototype.
5416         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5417         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5418         * filesystem.c: Remove _initialize_filesystem prototype.
5419         * findcmd.c: Remove _initialize_mem_search prototype.
5420         * fork-child.c: Remove _initialize_fork_child prototype.
5421         * frame-base.c: Remove _initialize_frame_base prototype.
5422         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5423         * frame.c: Remove _initialize_frame prototype.
5424         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5425         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5426         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5427         * gcore.c: Remove _initialize_gcore prototype.
5428         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5429         * gdbarch.c: Regenerate.
5430         * gdbarch.sh: Remove _initialize_gdbarch prototype.
5431         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5432         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5433         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5434         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5435         * go-lang.c: Remove _initialize_go_language prototype.
5436         * go32-nat.c: Remove _initialize_go32_nat prototype.
5437         * guile/guile.c: Remove _initialize_guile prototype.
5438         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5439         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5440         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5441         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5442         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5443         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5444         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5445         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5446         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5447         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5448         prototype.
5449         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5450         prototype.
5451         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5452         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5453         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5454         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5455         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5456         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5457         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5458         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5459         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5460         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5461         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5462         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5463         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5464         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5465         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5466         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5467         prototype.
5468         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5469         prototype.
5470         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5471         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5472         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5473         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5474         * infcall.c: Remove _initialize_infcall prototype.
5475         * infcmd.c: Remove _initialize_infcmd prototype.
5476         * inferior.c: Remove _initialize_inferiors prototype.
5477         * inflow.c: Remove _initialize_inflow prototype.
5478         * infrun.c: Remove _initialize_infrun prototype.
5479         * interps.c: Remove _initialize_interpreter prototype.
5480         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5481         * jit.c: Remove _initialize_jit prototype.
5482         * language.c: Remove _initialize_language prototype.
5483         * linux-fork.c: Remove _initialize_linux_fork prototype.
5484         * linux-nat.c: Remove _initialize_linux_nat prototype.
5485         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5486         * linux-thread-db.c: Remove _initialize_thread_db prototype.
5487         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5488         * m2-lang.c: Remove _initialize_m2_language prototype.
5489         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5490         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5491         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5492         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5493         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5494         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5495         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5496         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5497         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5498         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5499         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5500         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5501         * machoread.c: Remove _initialize_machoread prototype.
5502         * macrocmd.c: Remove _initialize_macrocmd prototype.
5503         * macroscope.c: Remove _initialize_macroscope prototype.
5504         * maint.c: Remove _initialize_maint_cmds prototype.
5505         * mdebugread.c: Remove _initialize_mdebugread prototype.
5506         * memattr.c: Remove _initialize_mem prototype.
5507         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5508         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5509         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5510         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5511         * mi/mi-main.c: Remove _initialize_mi_main prototype.
5512         * microblaze-linux-tdep.c: Remove
5513         _initialize_microblaze_linux_tdep prototype.
5514         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5515         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5516         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5517         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5518         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5519         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5520         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5521         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5522         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5523         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5524         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5525         prototype.
5526         * mipsread.c: Remove _initialize_mipsread prototype.
5527         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5528         prototype.
5529         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5530         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5531         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5532         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5533         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5534         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5535         prototype.
5536         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5537         * nto-procfs.c: Remove _initialize_procfs prototype.
5538         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5539         * objc-lang.c: Remove _initialize_objc_language prototype.
5540         * objfiles.c: Remove _initialize_objfiles prototype.
5541         * observer.c: Remove observer_test_first_notification_function,
5542         observer_test_second_notification_function,
5543         observer_test_third_notification_function, and
5544         _initialize_observer prototypes.
5545         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5546         * osabi.c: Remove _initialize_gdb_osabi prototype.
5547         * osdata.c: Remove _initialize_osdata prototype.
5548         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5549         * parse.c: Remove _initialize_parse prototype.
5550         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5551         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5552         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5553         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5554         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5555         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5556         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5557         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5558         * printcmd.c: Remove _initialize_printcmd prototype.
5559         * probe.c: Remove _initialize_probe prototype.
5560         * proc-api.c: Remove _initialize_proc_api prototype.
5561         * proc-events.c: Remove _initialize_proc_events prototype.
5562         * proc-service.c: Remove _initialize_proc_service prototype.
5563         * procfs.c: Remove _initialize_procfs prototype.
5564         * psymtab.c: Remove _initialize_psymtab prototype.
5565         * python/python.c: Remove _initialize_python prototype.
5566         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5567         * record-btrace.c: Remove _initialize_record_btrace prototype.
5568         * record-full.c: Remove _initialize_record_full prototype.
5569         * record.c: Remove _initialize_record prototype.
5570         * regcache.c: Remove _initialize_regcache prototype.
5571         * reggroups.c: Remove _initialize_reggroup prototype.
5572         * remote-notif.c: Remove _initialize_notif prototype.
5573         * remote-sim.c: Remove _initialize_remote_sim prototype.
5574         * remote.c: Remove _initialize_remote prototype.
5575         * reverse.c: Remove _initialize_reverse prototype.
5576         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5577         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5578         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5579         prototype.
5580         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5581         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5582         * rust-exp.y: Remove _initialize_rust_exp prototype.
5583         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5584         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5585         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5586         * score-tdep.c: Remove _initialize_score_tdep prototype.
5587         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5588         prototype.
5589         * ser-go32.c: Remove _initialize_ser_dos prototype.
5590         * ser-mingw.c: Remove _initialize_ser_windows prototype.
5591         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5592         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5593         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5594         * serial.c: Remove _initialize_serial prototype.
5595         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5596         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5597         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5598         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5599         * skip.c: Remove _initialize_step_skip prototype.
5600         * sol-thread.c: Remove _initialize_sol_thread prototype.
5601         * solib-aix.c: Remove _initialize_solib_aix prototype.
5602         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5603         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5604         * solib-frv.c: Remove _initialize_frv_solib prototype.
5605         * solib-spu.c: Remove _initialize_spu_solib prototype.
5606         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5607         * solib-target.c: Remove _initialize_solib_target prototype.
5608         * solib.c: Remove _initialize_solib prototype.
5609         * source.c: Remove _initialize_source prototype.
5610         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5611         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5612         prototype.
5613         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5614         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5615         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5616         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5617         prototype.
5618         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5619         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5620         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5621         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5622         prototype.
5623         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5624         prototype.
5625         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5626         prototype.
5627         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5628         prototype.
5629         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5630         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5631         prototype.
5632         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5633         prototype.
5634         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5635         prototype.
5636         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5637         prototype.
5638         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5639         prototype.
5640         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5641         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5642         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5643         * stabsread.c: Remove _initialize_stabsread prototype.
5644         * stack.c: Remove _initialize_stack prototype.
5645         * stap-probe.c: Remove _initialize_stap_probe prototype.
5646         * std-regs.c: Remove _initialize_frame_reg prototype.
5647         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5648         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5649         * symfile.c: Remove _initialize_symfile prototype.
5650         * symmisc.c: Remove _initialize_symmisc prototype.
5651         * symtab.c: Remove _initialize_symtab prototype.
5652         * target-dcache.c: Remove _initialize_target_dcache prototype.
5653         * target-descriptions.c: Remove _initialize_target_descriptions
5654         prototype.
5655         * thread.c: Remove _initialize_thread prototype.
5656         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5657         prototype.
5658         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5659         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5660         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5661         prototype.
5662         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5663         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5664         * tracefile.c: Remove _initialize_tracefile prototype.
5665         * tracepoint.c: Remove _initialize_tracepoint prototype.
5666         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5667         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5668         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5669         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5670         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5671         * tui/tui-win.c: Remove _initialize_tui_win prototype.
5672         * tui/tui.c: Remove _initialize_tui prototype.
5673         * typeprint.c: Remove _initialize_typeprint prototype.
5674         * user-regs.c: Remove _initialize_user_regs prototype.
5675         * utils.c: Remove _initialize_utils prototype.
5676         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5677         * valarith.c: Remove _initialize_valarith prototype.
5678         * valops.c: Remove _initialize_valops prototype.
5679         * valprint.c: Remove _initialize_valprint prototype.
5680         * value.c: Remove _initialize_values prototype.
5681         * varobj.c: Remove _initialize_varobj prototype.
5682         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5683         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5684         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5685         * windows-nat.c: Remove _initialize_windows_nat,
5686         _initialize_check_for_gdb_ini, and _initialize_loadable
5687         prototypes.
5688         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5689         * xcoffread.c: Remove _initialize_xcoffread prototype.
5690         * xml-support.c: Remove _initialize_xml_support prototype.
5691         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5692         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5693         prototype.
5694         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5695         prototype.
5696         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5697
5698 2017-09-08  Keith Seitz  <keiths@redhat.com>
5699
5700         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5701         field.
5702
5703 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
5704
5705         * f-valprint.c (f_val_print): Remove check for one byte
5706         sized integers. Remove printing of character type.
5707
5708 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
5709             Christoph Weinmann  <christoph.t.weinmann@intel.com>
5710             Bernhard Heckel  <bernhard.heckel@intel.com>
5711
5712         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5713         to maintain proper indentation when printing pointers/refs.
5714
5715 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5716
5717         GDB 8.0.1 released.
5718
5719 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5720
5721         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
5722
5723 2017-09-05  Tom Tromey  <tom@tromey.com>
5724
5725         * parse.c (funcall_chain): Now a std::vector.
5726         (start_arglist, end_arglist): Simplify.
5727         (free_funcalls): Remove.
5728         (parse_exp_in_context_1): Remove cleanup.
5729
5730 2017-09-05  Tom Tromey  <tom@tromey.com>
5731
5732         * go-exp.y (go_parse): Don't create a cleanup.
5733
5734 2017-09-05  Tom Tromey  <tom@tromey.com>
5735
5736         * d-exp.y (PrimaryExpression): Use std::string.
5737         (d_parse): Don't create a cleanup.
5738
5739 2017-09-05  Tom Tromey  <tom@tromey.com>
5740
5741         * utils.c (do_clear_parser_state): Remove.
5742         (make_cleanup_clear_parser_state): Remove.
5743         * p-exp.y (pascal_parse): Use scoped_restore.
5744         * m2-exp.y (m2_parse): Use scoped_restore.
5745         * f-exp.y (f_parse): Use scoped_restore.
5746         * d-exp.y (d_parse): Use scoped_restore.
5747         * c-exp.y (c_parse): Use scoped_restore.
5748         * ada-exp.y (ada_parse): Use scoped_restore.
5749         * utils.h (make_cleanup_clear_parser_state): Remove.
5750
5751 2017-09-06  Keith Seitz  <keiths@redhat.com>
5752
5753         * dwarf2read.c (dw2_linkage_name_attr): New function.
5754         (dw2_linkage_name): New function.
5755         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
5756         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
5757         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
5758
5759 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5760
5761         * config/djgpp/djconfig.sh: Correct shell portability issue.
5762
5763 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5764
5765         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
5766
5767 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5768
5769         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
5770         * NEWS: Mention new FreeBSD/mips native configuration.
5771         * configure.host: Add aarch64*-*-freebsd*.
5772         * configure.nat: Likewise.
5773         * aarch64-fbsd-nat.c: New file.
5774
5775 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5776
5777         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
5778         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
5779         * NEWS: Mention new FreeBSD/aarch64 target.
5780         * configure.tgt: Add aarch64*-*-freebsd*.
5781         * aarch64-fbsd-tdep.c: New file.
5782         * aarch64-fbsd-tdep.h: New file.
5783
5784 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5785
5786         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
5787
5788 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
5789
5790         * parse.c (find_minsym_type_and_address): Don't relocate addresses
5791         of TLS symbols.
5792
5793 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5794
5795         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
5796         call.
5797
5798 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5799
5800         * infrun.c (follow_exec): Call add_thread after
5801         target_find_description.
5802
5803 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5804
5805         * infrun.c (handle_inferior_event_1): When exec'ing, read
5806         stop_pc after follow_exec.
5807
5808 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5809
5810         * remote.c (process_g_packet): Update error message.
5811
5812 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5813
5814         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
5815         targets.
5816
5817 2017-09-05  Pedro Alves  <palves@redhat.com>
5818
5819         * eval.c (eval_call, evaluate_funcall): New functions, factored
5820         out from ...
5821         (evaluate_subexp_standard): ... this.
5822
5823 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5824
5825         * amd64-tdep.c (amd64_target_description): Create target
5826         descriptions.
5827         (_initialize_amd64_tdep): Don't call functions
5828         initialize_tdesc_amd64_*.  Add self tests.
5829         * arch/amd64.c (amd64_create_target_description): Add parameter
5830         is_linux.  Call set_tdesc_osabi if is_linux is true.
5831         * arch/amd64.h (amd64_create_target_description): Update the
5832         declaration.
5833         * arch/i386.c (i386_create_target_description): Add parameter
5834         is_linux.  Call set_tdesc_osabi if is_linux is true.
5835         * arch/i386.h (i386_create_target_description): Update
5836         declaration.
5837         * configure.tgt: Add i386.o to gdb_target_obs.
5838         * features/Makefile (XMLTOC): Remove i386/*.xml.
5839         * features/i386/amd64-avx-avx512.c: Remove.
5840         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
5841         * features/i386/amd64-avx-mpx.c: Remove.
5842         * features/i386/amd64-avx.c: Remove.
5843         * features/i386/amd64-mpx.c: Remove.
5844         * features/i386/amd64.c: Remove.
5845         * features/i386/i386-avx-avx512.c: Remove.
5846         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
5847         * features/i386/i386-avx-mpx.c: Remove.
5848         * features/i386/i386-avx.c: Remove.
5849         * features/i386/i386-mmx.c: Remove.
5850         * features/i386/i386-mpx.c: Remove.
5851         * features/i386/i386.c: Remove.
5852         * i386-tdep.c: Don't include features/i386/i386*.c., include
5853         target-descriptions.h and arch/i386.h.
5854         (i386_target_description): Create target descriptions.
5855         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
5856         functions.  Do self tests.
5857
5858 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5859
5860         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
5861         * features/i386/amd64-avx-avx512-linux.c: Removed.
5862         * features/i386/amd64-avx-linux.c: Removed.
5863         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
5864         * features/i386/amd64-avx-mpx-linux.c: Removed.
5865         * features/i386/amd64-linux.c: Removed.
5866         * features/i386/amd64-mpx-linux.c: Removed.
5867         * features/i386/x32-avx-avx512-linux.c: Removed.
5868         * features/i386/x32-avx-linux.c: Removed.
5869         * features/i386/x32-linux.c: Removed.
5870
5871 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5872
5873         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
5874         features/i386/*.c.
5875         (amd64_linux_read_description): Call
5876         amd64_create_target_description.
5877         * arch/amd64.c: New file.
5878         * arch/amd64.h: New file.
5879         * configure.tgt (x86_64-*-linux*): Append amd64.o.
5880         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
5881
5882 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5883
5884         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
5885         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
5886         (amd64_linux_read_description): Create target descriptions.
5887         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
5888         functions.  Add unit tests.
5889         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
5890         x32-core.xml.
5891         * features/i386/64bit-avx.c: Generated.
5892         * features/i386/64bit-avx512.c: Generated.
5893         * features/i386/64bit-core.c: Generated.
5894         * features/i386/64bit-linux.c: Generated.
5895         * features/i386/64bit-mpx.c: Generated.
5896         * features/i386/64bit-pkeys.c: Generated.
5897         * features/i386/64bit-segments.c: Generated.
5898         * features/i386/64bit-sse.c: Generated.
5899         * features/i386/x32-core.c: Generated.
5900         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
5901         c files for amd64-linux and x32-linux.
5902
5903 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5904
5905         * amd64-linux-tdep.c (amd64_linux_read_description): New
5906         function.
5907         (amd64_linux_core_read_description): Call
5908         amd64_linux_read_description.
5909         (amd64_linux_init_abi): Likewise.
5910         (amd64_x32_linux_init_abi): Likewise.
5911         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
5912         * x86-linux-nat.c (x86_linux_read_description): Call
5913         amd64_linux_read_description.
5914
5915 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5916
5917         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
5918         comments.
5919
5920 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5921
5922         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
5923         * features/i386/i386-avx-avx512-linux.c: Remove.
5924         * features/i386/i386-avx-linux.c: Remove.
5925         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
5926         * features/i386/i386-avx-mpx-linux.c: Remove.
5927         * features/i386/i386-linux.c: Remove.
5928         * features/i386/i386-mmx-linux.c: Remove.
5929         * features/i386/i386-mpx-linux.c: Remove.
5930
5931 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5932
5933         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
5934         (SFILES): Add arch/i386.c.
5935         (HFILES_NO_SRCDIR): Add arch/i386.h.
5936         * arch/i386.c: New file.
5937         * arch/i386.h: New file.
5938         * arch/tdesc.h (allocate_target_description): Declare.
5939         (set_tdesc_architecture): Declare.
5940         (set_tdesc_osabi): Declare.
5941         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
5942         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
5943         include arch/i386.h.
5944         (i386_linux_read_description): Remove code and call
5945         i386_create_target_description.
5946         (set_tdesc_architecture): New function.
5947         (set_tdesc_osabi): New function.
5948         * target-descriptions.h (allocate_target_description): Remove.
5949
5950 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5951
5952         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
5953         * target-descriptions.c (tdesc_create_feature): Likewise, and
5954         adjust code.
5955         * features/i386/32bit-avx.c: Re-generated.
5956         * features/i386/32bit-avx512.c: Re-generated.
5957         * features/i386/32bit-core.c: Re-generated.
5958         * features/i386/32bit-linux.c: Re-generated.
5959         * features/i386/32bit-mpx.c: Re-generated.
5960         * features/i386/32bit-pkeys.c: Re-generated.
5961         * features/i386/32bit-sse.c: Re-generated.
5962
5963 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5964
5965         * regformats/regdef.h (struct reg): Override operator == and !=.
5966
5967 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5968
5969         * arch/tdesc.h: New file.
5970         * regformats/regdat.sh: Generate code using tdesc_create_reg.
5971         * target-descriptions.c: Update comments.
5972         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
5973         declarations.
5974         * features/i386/32bit-avx.c: Re-generated.
5975         * features/i386/32bit-avx512.c: Re-generated.
5976         * features/i386/32bit-core.c: Re-generated.
5977         * features/i386/32bit-linux.c: Re-generated.
5978         * features/i386/32bit-mpx.c: Re-generated.
5979         * features/i386/32bit-pkeys.c: Re-generated.
5980         * features/i386/32bit-sse.c: Re-generated.
5981
5982 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5983
5984         * regformats/regdat.sh: Update generated code.
5985
5986 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5987
5988         * regformats/regdat.sh: Adjust code order.
5989
5990 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5991
5992         * expprint.c (dump_subexp_body_standard): Use constant format
5993         string in fprintf_filtered call.
5994
5995 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5996
5997         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
5998         NetBSD/i386.
5999         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6000
6001 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6002
6003         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6004
6005 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6006
6007         * bsd-kvm.o: Define _KMEMUSER.
6008         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6009         * configure: Regenerate.
6010
6011 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6012
6013         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6014         * i386-fbsd-nat.c: Likewise.
6015
6016 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6017
6018         * unittests/array-view-selftests.c: Add include of <array>.
6019
6020 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6021
6022         * spu-tdep.c (flush_ea_cache): Add missing argument to
6023         call_function_by_hand.
6024
6025 2017-09-04  Pedro Alves  <palves@redhat.com>
6026
6027         * NEWS (Safer support for debugging with no debug info): New.
6028
6029 2017-09-04  Pedro Alves  <palves@redhat.com>
6030
6031         * c-exp.y (function_method, function_method_void): Add current
6032         instance flags to TYPE_INSTANCE.
6033         * dwarf2read.c (check_modifier): New.
6034         (compute_delayed_physnames): Assert that only C++ adds delayed
6035         physnames.  Mark fn_fields as const/volatile depending on
6036         physname.
6037         * eval.c (make_params): New type_instance_flags parameter.  Use
6038         it as the new type's instance flags.
6039         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6040         flags element and pass it to make_params.
6041         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6042         instance flags element.
6043         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6044         * gdbtypes.h: Include "enum-flags.h".
6045         (type_instance_flags): New enum-flags type.
6046         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6047         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6048         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6049         (follow_type_instance_flags): New function.
6050         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6051         * parser-defs.h (follow_type_instance_flags): Declare.
6052         * valops.c (value_struct_elt_for_reference): const/volatile must
6053         match too.
6054
6055 2017-09-04  Pedro Alves  <palves@redhat.com>
6056
6057         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6058         function/method scopes; lookup the nested name as a function local
6059         static variable.
6060
6061 2017-09-04  Pedro Alves  <palves@redhat.com>
6062
6063         (%type <voidval>): Add function_method.
6064         * c-exp.y (exp): New production for calls with no arguments.
6065         (function_method, function_method_void_or_typelist): New
6066         productions.
6067         (exp): New production for "method()::static_var".
6068         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6069         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6070         Handle OP_FUNC_STATIC_VAR.
6071         * parse.c (operator_length_standard):
6072         Handle OP_FUNC_STATIC_VAR.
6073
6074 2017-09-04  Pedro Alves  <palves@redhat.com>
6075
6076         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6077         handling.
6078         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6079         Ditto.
6080         * parse.c (operator_length_standard, operator_check_standard):
6081         Ditto.
6082         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6083
6084 2017-09-04  Pedro Alves  <palves@redhat.com>
6085
6086         * ax-gdb.c: Include "typeprint.h".
6087         (gen_expr_for_cast): New function.
6088         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6089         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6090         type is unknown.
6091         * dwarf2read.c (new_symbol_full): Fallback to int instead of
6092         nodebug_data_symbol.
6093         * eval.c: Include "typeprint.h".
6094         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6095         Error out if symbol has unknown type.
6096         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6097         evaluate_subexp_for_cast.
6098         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6099         OP_VAR_MSYM_VALUE.
6100         (evaluate_subexp_for_cast): New function.
6101         * gdbtypes.c (init_nodebug_var_type): New function.
6102         (objfile_type): Use it to initialize types of variables with no
6103         debug info.
6104         * typeprint.c (error_unknown_type): New.
6105         * typeprint.h (error_unknown_type): New declaration.
6106         * compile/compile-c-types.c (convert_type_basic): Handle
6107         TYPE_CODE_ERROR; warn and fallback to int for variables with
6108         unknown type.
6109
6110 2017-09-04  Pedro Alves  <palves@redhat.com>
6111
6112         * eval.c (evaluate_var_value): New function, factored out from ...
6113         (evaluate_subexp_standard): ... here.
6114
6115 2017-09-04  Pedro Alves  <palves@redhat.com>
6116
6117         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6118         Remove useless assignments to 'op'.
6119
6120 2017-09-04  Pedro Alves  <palves@redhat.com>
6121
6122         * eval.c (eval_skip_value): New function.
6123         (evaluate_subexp_standard): Use it.
6124
6125 2017-09-04  Pedro Alves  <palves@redhat.com>
6126
6127         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6128         function name from symbol/minsym and pass it to
6129         error_call_unknown_return_type.
6130
6131 2017-09-04  Pedro Alves  <palves@redhat.com>
6132
6133         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6134         * ax-gdb.c (gen_msym_var_ref): New function.
6135         (gen_expr): Handle OP_VAR_MSYM_VALUE.
6136         * eval.c (evaluate_var_msym_value): New function.
6137         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6138         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6139         to call_function_by_hand.
6140         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6141         Handle OP_VAR_MSYM_VALUE.
6142         (union exp_element) <msymbol>: New field.
6143         * minsyms.h (struct type): Forward declare.
6144         (find_minsym_type_and_address): Declare.
6145         * parse.c (write_exp_elt_msym): New function.
6146         (write_exp_msymbol): Delete, refactored as ...
6147         (find_minsym_type_and_address): ... this new function.
6148         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6149         (operator_length_standard, operator_check_standard): Handle
6150         OP_VAR_MSYM_VALUE.
6151         * std-operator.def (OP_VAR_MSYM_VALUE): New.
6152
6153 2017-09-04  Pedro Alves  <palves@redhat.com>
6154
6155         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6156         TYPE_GNU_IFUNC specially here.  Throw error if return type is
6157         unknown.
6158         * ada-typeprint.c (print_func_type): Handle functions with unknown
6159         return type.
6160         * c-typeprint.c (c_type_print_base): Handle functions and methods
6161         with unknown return type.
6162         * compile/compile-c-symbols.c (convert_symbol_bmsym)
6163         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6164         * compile/compile-c-types.c: Include "objfiles.h".
6165         (convert_func): For functions with unknown return type, warn and
6166         default to int.
6167         * compile/compile-object-run.c (compile_object_run): Adjust call
6168         to call_function_by_hand_dummy.
6169         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6170         call_function_by_hand.
6171         * eval.c (evaluate_subexp_standard): Adjust calls to
6172         call_function_by_hand.  Handle functions and methods with unknown
6173         return type.  Pass expect_type to call_function_by_hand.
6174         * f-typeprint.c (f_type_print_base): Handle functions with unknown
6175         return type.
6176         * gcore.c (call_target_sbrk): Adjust call to
6177         call_function_by_hand.
6178         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6179         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
6180         an integer address type instead of nodebug.
6181         * guile/scm-value.c (gdbscm_value_call): Adjust call to
6182         call_function_by_hand.
6183         * infcall.c (error_call_unknown_return_type): New function.
6184         (call_function_by_hand): New "default_return_type" parameter.
6185         Pass it down.
6186         (call_function_by_hand_dummy): New "default_return_type"
6187         parameter.  Use it instead of defaulting to int.  If there's no
6188         default and the return type is unknown, throw an error.  If
6189         there's a default return type, and the called function has no
6190         debug info, then assume the function is prototyped.
6191         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6192         New "default_return_type" parameter.
6193         (error_call_unknown_return_type): New declaration.
6194         * linux-fork.c (call_lseek): Cast return type of lseek.
6195         (inferior_call_waitpid, checkpoint_command): Adjust calls to
6196         call_function_by_hand.
6197         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6198         calls to call_function_by_hand.
6199         * m2-typeprint.c (m2_procedure): Handle functions with unknown
6200         return type.
6201         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6202         (value_nsstring, print_object_command): Adjust calls to
6203         call_function_by_hand.
6204         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6205         functions with unknown return type.
6206         (pascal_type_print_func_varspec_suffix): New function.
6207         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6208         TYPE_CODE_METHOD>: Use it.
6209         * python/py-value.c (valpy_call): Adjust call to
6210         call_function_by_hand.
6211         * rust-lang.c (rust_evaluate_funcall): Adjust call to
6212         call_function_by_hand.
6213         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6214         call_function_by_hand.
6215         * valops.c (value_allocate_space_in_inferior): Adjust call to
6216         call_function_by_hand.
6217         * typeprint.c (type_print_unknown_return_type): New function.
6218         * typeprint.h (type_print_unknown_return_type): New declaration.
6219
6220 2017-09-04  Pedro Alves  <palves@redhat.com>
6221
6222         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6223         types with more than one parameter as prototyped.
6224
6225 2017-09-04  Pedro Alves  <palves@redhat.com>
6226
6227         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6228         (disassemble_command): Use gdb_disassembly_flags instead of bare
6229         int.
6230         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6231         (dump_insns, do_mixed_source_and_assembly_deprecated)
6232         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6233         Use gdb_disassembly_flags instead of bare int.
6234         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6235         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6236         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6237         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
6238         (enum gdb_disassembly_flag): ... values of this new enumeration.
6239         (gdb_disassembly_flags): Define.
6240         (gdb_disassembly)
6241         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6242         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6243         gdb_disassembly_flags instead of bare int.
6244         * record-btrace.c (btrace_insn_history)
6245         (record_btrace_insn_history, record_btrace_insn_history_range)
6246         (record_btrace_insn_history_from): Use gdb_disassembly_flags
6247         instead of bare int.
6248         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6249         Use gdb_disassembly_flags instead of bare int.
6250         * target-debug.h (target_debug_print_gdb_disassembly_flags):
6251         Define.
6252         * target-delegates.c: Regenerate.
6253         * target.c (target_insn_history, target_insn_history_from)
6254         (target_insn_history_range): Use gdb_disassembly_flags instead of
6255         bare int.
6256         * target.h: Include "disasm.h".
6257         (struct target_ops) <to_insn_history, to_insn_history_from,
6258         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6259         int.
6260         (target_insn_history, target_insn_history_from)
6261         (target_insn_history_range): Use gdb_disassembly_flags instead of
6262         bare int.
6263
6264 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6265
6266         * cli/cli-script.c (build_command_line): For if/while commands,
6267         check whether args is empty.
6268
6269 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6270
6271         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6272         (enum command_control_type): Likewise.
6273         (struct command_line): Likewise.
6274         (free_command_lines): Likewise.
6275         (struct command_lines_deleter): Likewise.
6276         (command_line_up): Likewise.
6277         (read_command_lines): Likewise.
6278         (read_command_lines_1): Likewise.
6279         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6280         (enum command_control_type): Likewise.
6281         (struct command_line): Likewise.
6282         (free_command_lines): Likewise.
6283         (struct command_lines_deleter): Likewise.
6284         (command_line_up): Likewise.
6285         (read_command_lines): Likewise.
6286         (read_command_lines_1): Likewise.
6287         * breakpoint.h: Include cli/cli-script.h.
6288         * extension-priv.h: Likewise.
6289         * gdbcmd.h: Likewise.
6290
6291 2017-09-04  Pedro Alves  <palves@redhat.com>
6292
6293         * ada-lang.c (is_known_support_routine): Move sal declaration to
6294         where it is initialized.
6295         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6296         (parse_breakpoint_sals, decode_static_tracepoint_spec)
6297         (clear_command, update_static_tracepoint): Remove init_sal
6298         references.  Move declarations closer to initializations.
6299         * cli/cli-cmds.c (list_command): Move sal declarations closer to
6300         initializations.
6301         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6302         references.  Move sal declarations closer to initializations.
6303         * frame.c (find_frame_sal): Return a symtab_and_line via function
6304         return instead of output parameter.  Remove init_sal references.
6305         * frame.h (find_frame_sal): Return a symtab_and_line via function
6306         return instead of output parameter.
6307         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6308         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6309         instead of memset.
6310         (gdbscm_find_pc_line): Remove init_sal reference.
6311         * infcall.c (call_function_by_hand_dummy): Remove init_sal
6312         references.  Move declarations closer to initializations.
6313         * infcmd.c (set_step_frame): Update.  Move declarations closer to
6314         initializations.
6315         (finish_backward): Remove init_sal references.  Move declarations
6316         closer to initializations.
6317         * infrun.c (process_event_stop_test, handle_step_into_function)
6318         (insert_hp_step_resume_breakpoint_at_frame)
6319         (insert_step_resume_breakpoint_at_caller): Likewise.
6320         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6321         (symbol_to_sal): Likewise.
6322         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6323         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6324         to its initialization.
6325         * reverse.c (save_bookmark_command): Use new/delete.  Remove
6326         init_sal references.  Move declarations closer to initializations.
6327         * source.c (get_current_source_symtab_and_line): Remove brace
6328         initialization.
6329         (set_current_source_symtab_and_line): Now takes the sal by const
6330         reference.  Remove brace initialization.
6331         (line_info): Remove init_sal reference.
6332         * source.h (set_current_source_symtab_and_line): Now takes a
6333         symtab_and_line via const reference.
6334         * stack.c (set_current_sal_from_frame): Adjust.
6335         (print_frame_info): Adjust.
6336         (get_last_displayed_sal): Return the sal via function return
6337         instead of via output parameter.  Simplify.
6338         (frame_info): Adjust.
6339         * stack.h (get_last_displayed_sal): Return the sal via function
6340         return instead of via output parameter.
6341         * symtab.c (init_sal): Delete.
6342         (find_pc_sect_line): Remove init_sal references.  Move
6343         declarations closer to initializations.
6344         (find_function_start_sal): Remove init_sal references.  Move
6345         declarations closer to initializations.
6346         * symtab.h (struct symtab_and_line): In-class initialize all
6347         fields.
6348         * tracepoint.c (set_traceframe_context)
6349         (print_one_static_tracepoint_marker): Remove init_sal references.
6350         Move declarations closer to initializations.
6351         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6352         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
6353         declarations closer to initializations.
6354         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6355         init_sal references.  Adjust.
6356
6357 2017-09-04  Pedro Alves  <palves@redhat.com>
6358
6359         * ax-gdb.c (agent_command_1): Use range-for.
6360         * break-catch-throw.c (re_set_exception_catchpoint): Update.
6361         * breakpoint.c: Include "common/array-view.h".
6362         (init_breakpoint_sal, create_breakpoint_sal): Change sals
6363         parameter from struct symtabs_and_lines to
6364         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
6365         (breakpoint_sals_to_pc): Change sals parameter from struct
6366         symtabs_and_lines to std::vector reference.
6367         (check_fast_tracepoint_sals): Change sals parameter from struct
6368         symtabs_and_lines to std::array_view.  Use range-for.
6369         (decode_static_tracepoint_spec): Return a std::vector instead of
6370         symtabs_and_lines.  Update.
6371         (create_breakpoint): Update.
6372         (break_range_command, until_break_command, clear_command): Update.
6373         (base_breakpoint_decode_location, bkpt_decode_location)
6374         (bkpt_probe_create_sals_from_location)
6375         (bkpt_probe_decode_location, tracepoint_decode_location)
6376         (tracepoint_probe_decode_location)
6377         (strace_marker_create_sals_from_location): Return a std::vector
6378         instead of symtabs_and_lines.
6379         (strace_marker_create_breakpoints_sal): Update.
6380         (strace_marker_decode_location): Return a std::vector instead of
6381         symtabs_and_lines.  Update.
6382         (update_breakpoint_locations): Change struct symtabs_and_lines
6383         parameters to gdb::array_view.  Adjust.
6384         (location_to_sals): Return a std::vector instead of
6385         symtabs_and_lines.  Update.
6386         (breakpoint_re_set_default): Use std::vector instead of struct
6387         symtabs_and_lines.
6388         (decode_location_default): Return a std::vector instead of
6389         symtabs_and_lines.  Update.
6390         * breakpoint.h: Include "common/array-view.h".
6391         (struct breakpoint_ops) <decode_location>: Now returns a
6392         std::vector instead of returning a symtabs_and_lines via output
6393         parameter.
6394         (update_breakpoint_locations): Change sals parameters to use
6395         gdb::array_view.
6396         * cli/cli-cmds.c (edit_command, list_command): Update to use
6397         std::vector and gdb::array_view.
6398         (ambiguous_line_spec): Adjust to use gdb::array_view and
6399         range-for.
6400         (compare_symtabs): Rename to ...
6401         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
6402         const reference and adjust.
6403         (filter_sals): Rewrite using std::vector and standard algorithms.
6404         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6405         (jump_command): Update to use std::vector.
6406         * linespec.c (struct linespec_state) <canonical_names>: Update
6407         comment.
6408         (add_sal_to_sals_basic): Delete.
6409         (add_sal_to_sals, filter_results, convert_results_to_lsals)
6410         (decode_line_2, create_sals_line_offset)
6411         (convert_address_location_to_sals, convert_linespec_to_sals)
6412         (convert_explicit_location_to_sals, parse_linespec)
6413         (event_location_to_sals, decode_line_full, decode_line_1)
6414         (decode_line_with_current_source)
6415         (decode_line_with_last_displayed, decode_objc)
6416         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6417         (linespec_result::~linespec_result): Adjust to use std::vector
6418         instead of symtabs_and_lines.
6419         * linespec.h (linespec_sals::sals): Now a std::vector.
6420         (struct linespec_result): Use std::vector, bool, and in-class
6421         initialization.
6422         (decode_line_1, decode_line_with_current_source)
6423         (decode_line_with_last_displayed): Return std::vector.
6424         * macrocmd.c (info_macros_command): Use std::vector.
6425         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6426         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6427         std::vector.
6428         * probe.h (parse_probes): Return a std::vector.
6429         * python/python.c (gdbpy_decode_line): Use std::vector and
6430         gdb::array_view.
6431         * source.c (select_source_symtab, line_info): Use std::vector.
6432         * stack.c (func_command): Use std::vector.
6433         * symtab.h (struct symtabs_and_lines): Delete.
6434         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6435
6436 2017-09-04  Pedro Alves  <palves@redhat.com>
6437
6438         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6439         unittests/array-view-selftests.c.
6440         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6441         * common/array-view.h: New file.
6442         * unittests/array-view-selftests.c: New file.
6443
6444 2017-09-04  Pedro Alves  <palves@redhat.com>
6445
6446         * cli/cli-cmds.c (edit_command): Pass message to
6447         ambiguous_line_spec.
6448         (list_command): Pass message to ambiguous_line_spec.  Say
6449         "first"/"last" instead of "start" and "end" to be consistent with
6450         the manual.
6451         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
6452         them to print formatted message.
6453
6454 2017-09-04  Pedro Alves  <palves@redhat.com>
6455
6456         * btrace.c (ftrace_add_pt): Pass btrace_insn to
6457         ftrace_update_insns by reference instead of pointer.
6458
6459 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6460
6461         * i386-go32-tdep.c: Include x86-xstate.h.
6462         (i386_go32_init_abi): Call i386_target_description.
6463         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6464         if xcr0 is X86_XSTATE_X87_MASK.
6465         * i386-tdep.h (tdesc_i386): Remove the declaration.
6466         (tdesc_i386_mmx): Likewise.
6467
6468 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6469
6470         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6471         X86_XSTATE_SSE_MASK instead of 0.
6472
6473 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6474
6475         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6476         i386_target_description.
6477         * i386-fbsd-nat.c (i386fbsd_read_description): Call
6478         i386_target_description.
6479         * i386-tdep.c (i386_gdbarch_init): Likewise.
6480
6481 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6482
6483         * amd64-darwin-tdep.c: Include "x86-xstate.h".
6484         (x86_darwin_init_abi_64): Call amd64_target_description.
6485         * amd64-dicos-tdep.c: Likewise.
6486         * amd64-fbsd-nat.c: Likewise.
6487         * amd64-fbsd-tdep.c: Likewise.
6488         * amd64-nbsd-tdep.c: Likewise.
6489         * amd64-obsd-tdep.c: Likewise.
6490         * amd64-sol2-tdep.c: Likewise.
6491         * amd64-windows-tdep.c: Likewise.
6492         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6493
6494 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6495
6496         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6497         (btrace_function) <insn>: Change type to use std::vector.
6498         * btrace.c (ftrace_debug, ftrace_call_num_insn,
6499         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6500         ftrace_update_insns, ftrace_compute_global_level_offset,
6501         btrace_stitch_bts, btrace_clear, btrace_insn_get,
6502         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6503         change to std::vector.
6504         (ftrace_update_insns): Adjust to change to std::vector, change
6505         type of INSN parameter.
6506         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6507         * record-btrace.c (btrace_call_history_insn_range,
6508         btrace_compute_src_line_range,
6509         record_btrace_frame_prev_register): Adjust to change to
6510         std::vector.
6511         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6512         to change to std::vector.
6513
6514 2017-09-03  Tom Tromey  <tom@tromey.com>
6515
6516         * corefile.c (reopen_exec_file): Use std::string.
6517
6518 2017-09-03  Tom Tromey  <tom@tromey.com>
6519
6520         * compile/compile.c (compile_register_name_mangled): Return
6521         std::string.
6522         * compile/compile-loc2c.c (pushf_register_address): Update.
6523         (pushf_register): Update.
6524         * compile/compile-c-types.c (convert_array): Update.
6525         * compile/compile-c-symbols.c (generate_vla_size): Update.
6526         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6527         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6528         (convert_one_symbol): Update.
6529         (generate_c_for_for_one_variable): Update.
6530         * compile/compile-c-support.c (c_get_range_decl_name): Return a
6531         std::string.
6532         (generate_register_struct): Update.
6533         * compile/compile-internal.h (c_get_range_decl_name): Return a
6534         std::string.
6535         (compile_register_name_mangled): Return std::string.
6536
6537 2017-09-03  Tom Tromey  <tom@tromey.com>
6538
6539         * utils.c (perror_string): Return a std::string.
6540         (throw_perror_with_name, perror_warning_with_name): Update.
6541
6542 2017-09-03  Tom Tromey  <tom@tromey.com>
6543
6544         * demangle.c (demangle_command): Use std::string,
6545         unique_xmalloc_ptr.
6546
6547 2017-09-03  Tom Tromey  <tom@tromey.com>
6548
6549         * cli/cli-setshow.c (do_set_command): Use std::string.
6550
6551 2017-09-03  Tom Tromey  <tom@tromey.com>
6552
6553         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6554
6555 2017-09-03  Tom Tromey  <tom@tromey.com>
6556
6557         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6558
6559 2017-09-03  Tom Tromey  <tom@tromey.com>
6560
6561         * mi/mi-cmd-env.c (env_execute_cli_command): Use
6562         gdb::unique_xmalloc_ptr.
6563
6564 2017-09-03  Tom Tromey  <tom@tromey.com>
6565
6566         * thread.c (print_thread_info_1): Use string_printf.
6567         (thread_apply_command, thread_apply_all_command): Use
6568         std::string.
6569
6570 2017-09-03  Tom Tromey  <tom@tromey.com>
6571
6572         * valprint.c (val_print_string): Update.
6573         * gdbcore.h (memory_error_message): Return std::string.
6574         * corefile.c (memory_error_message): Return std::string.
6575         (memory_error): Update.
6576         * breakpoint.c (insert_bp_location): Update.
6577
6578 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
6579
6580         * target/waitstatus.h (target_waitstatus_to_string): Change
6581         return type to std::string.
6582         * target/waitstatus.c (target_waitstatus_to_string): Return
6583         std::string.
6584         * target.h (target_waitstatus_to_string): Remove declaration.
6585         * infrun.c (resume, clear_proceed_status_thread,
6586         print_target_wait_results, do_target_wait, save_waitstatus,
6587         stop_all_threads): Adjust.
6588         * record-btrace.c (record_btrace_wait): Adjust.
6589         * target-debug.h
6590         (target_debug_print_struct_target_waitstatus_p): Adjust.
6591
6592 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6593
6594         PR gdb/22046
6595         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6596         detection.
6597
6598 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
6599
6600         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6601         for setting/unsetting environment variables on the remote target.
6602         (New remote packets): Add entries for QEnvironmentHexEncoded,
6603         QEnvironmentUnset and QEnvironmentReset.
6604         * common/environ.c (gdb_environ::operator=): Extend method to
6605         handle m_user_set_env_list and m_user_unset_env_list.
6606         (gdb_environ::clear): Likewise.
6607         (match_var_in_string): Change type of first parameter from 'char
6608         *' to 'const char *'.
6609         (gdb_environ::set): Extend method to handle
6610         m_user_set_env_list and m_user_unset_env_list.
6611         (gdb_environ::unset): Likewise.
6612         (gdb_environ::clear_user_set_env): New method.
6613         (gdb_environ::user_set_envp): Likewise.
6614         (gdb_environ::user_unset_envp): Likewise.
6615         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6616         m_user_unset_env_list on move constructor/assignment.
6617         (unset): Add new default parameter 'update_unset_list = true'.
6618         (clear_user_set_env): New method.
6619         (user_set_envp): Likewise.
6620         (user_unset_envp): Likewise.
6621         (m_user_set_env_list): New std::set.
6622         (m_user_unset_env_list): Likewise.
6623         * common/rsp-low.c (hex2str): New function.
6624         (bin2hex): New overload for bin2hex function.
6625         * common/rsp-low.c (hex2str): New prototype.
6626         (str2hex): New overload prototype.
6627         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6628         QEnvironmentUnset and QEnvironmentReset.
6629         (remote_protocol_features): Add QEnvironmentHexEncoded,
6630         QEnvironmentUnset and QEnvironmentReset packets.
6631         (send_environment_packet): New function.
6632         (extended_remote_environment_support): Likewise.
6633         (extended_remote_create_inferior): Call
6634         extended_remote_environment_support.
6635         (_initialize_remote): Add QEnvironmentHexEncoded,
6636         QEnvironmentUnset and QEnvironmentReset packet configs.
6637         * unittests/environ-selftests.c (gdb_selftest_env_var):
6638         New variable.
6639         (test_vector_initialization): New function.
6640         (test_init_from_host_environ): Likewise.
6641         (test_reinit_from_host_environ): Likewise.
6642         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6643         Likewise.
6644         (test_unset_set_empty_vector): Likewise.
6645         (test_vector_clear): Likewise.
6646         (test_std_move): Likewise.
6647         (test_move_constructor):
6648         (test_self_move): Likewise.
6649         (test_set_unset_reset): Likewise.
6650         (run_tests): Rewrite in terms of the functions above.
6651
6652 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
6653
6654         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6655         (adi_available): Use a temp variable of type CORE_ADDR as argument
6656         3 when calling target_auxv_search.
6657         (adi_normalize_address): Use masks and xor operators to calculate
6658         normalized address.
6659         (adi_read_versions, adi_write_versions, adi_print_versions)
6660         (do_examine, do_assign): Use paddress.
6661
6662 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
6663
6664         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6665         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6666         out of loop and add supply of FIR.
6667         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6668         add collect of FIR.
6669
6670 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
6671
6672         PR gdb/21827
6673         * cli/cli-script.c (define_command): Don't convert command name
6674         to lower case.
6675
6676 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
6677
6678         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6679         Update all callers accordingly. Remove all code blocks handling
6680         the case where DISPP is not NULL.
6681
6682 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6683
6684         PR symtab/22003
6685         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6686         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6687         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6688
6689 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6690
6691         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6692         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6693         (read_comp_units_from_section): New parameter abbrev_section, use
6694         read_and_check_comp_unit_head, allocate signatured_type if needed.
6695         (create_all_comp_units): Update read_comp_units_from_section caller.
6696
6697 2017-08-23  Pedro Alves  <palves@redhat.com>
6698
6699         PR remote/21852
6700         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6701         to null_ptid and switch to thread without reading the registers
6702         after adding the inferior.
6703
6704 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6705
6706         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6707         compile-gcc.
6708         * compile/compile.c (compile_gcc, show_compile_gcc): New.
6709         (compile_to_object): Implement compile_gcc.
6710         (_initialize_compile): Install "set compile-gcc".  Initialize
6711         compile_gcc.
6712
6713 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6714
6715         * compile/compile.c (compile_to_object): Conditionally call
6716         set_verbose.  Conditionally call compile or compile_v0.
6717
6718 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
6719
6720         * sparc64-tdep.h: (adi_normalize_address): New export.
6721         * sparc-nat.h: (open_adi_tag_fd): New export.
6722         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
6723         * sparc64-linux-tdep.c:
6724         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
6725         (sparc64_linux_handle_segmentation_fault): New function.
6726         (sparc64_linux_init_abi): Register
6727         sparc64_linux_handle_segmentation_fault
6728         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
6729         (sparc64_addr_bits_remove): New function.
6730         (sparc64_init_abi): Register sparc64_addr_bits_remove.
6731         (MAX_PROC_NAME_SIZE): New macro.
6732         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
6733         (sparc64adilist): New variable.
6734         (adi_proc_list): New variable.
6735         (find_adi_info): New function.
6736         (add_adi_info): New function.
6737         (get_adi_info_proc): New function.
6738         (get_adi_info): New function.
6739         (info_adi_command): New function.
6740         (read_maps_entry): New function.
6741         (adi_available): New function.
6742         (adi_normalize_address): New function.
6743         (adi_align_address): New function.
6744         (adi_convert_byte_count): New function.
6745         (adi_tag_fd): New function.
6746         (adi_is_addr_mapped): New function.
6747         (adi_read_versions): New function.
6748         (adi_write_versions): New function.
6749         (adi_print_versions): New function.
6750         (do_examine): New function.
6751         (do_assign): New function.
6752         (adi_examine_command): New function.
6753         (adi_assign_command): New function.
6754         (_initialize_sparc64_adi_tdep): New function.
6755
6756 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
6757
6758         * breakpoint.c (breakpoints_info): Rename to ...
6759         (info_breakpoints_command): ... this.
6760         (watchpoints_info): Rename to ...
6761         (info_watchpoints_command): ... this.
6762         (tracepoints_info): Rename to ...
6763         (info_tracepoints_command): ... this.
6764         (_initialize_breakpoint): Adjust.
6765         * dcache.c (dcache_info): Rename to ...
6766         (info_display_command): ... this.
6767         (_initialize_dcache): Adjust.
6768         * frame.h (args_info): Rename to ...
6769         (info_args_command): ... this.
6770         (locals_info): Rename to ...
6771         (info_locals_command): ... this.
6772         * infcmd.c (nofp_registers_info): Rename to ...
6773         (info_registers_command): ... this.
6774         (float_info): Rename to ...
6775         (info_float_command): ... this.
6776         (program_info): Rename to ...
6777         (info_program_command): ... this.
6778         (all_registers_info): Rename to ...
6779         (info_all_registers_command): ... this.
6780         (vector_info): Rename to ...
6781         (info_vector_command): ... this.
6782         (float_info): Rename to ...
6783         (info_float_command): ... this.
6784         (_initialize_infcmd): Adjust.
6785         * inferior.h (term_info): Rename to ...
6786         (info_terminal_command): ... this.
6787         * inflow.c (term_info): Rename to ...
6788         (info_terminal_command): ... this.
6789         (_initialize_inflow): Adjust.
6790         * infrun.c (signals_info): Rename to ...
6791         (info_signals_command): ... this.
6792         (_initialize_infrun): Adjust.
6793         * objc-lang.c (classes_info): Rename to ...
6794         (info_classes_command): ... this.
6795         (selectors_info): Rename to ...
6796         (info_selectors_command): ... this.
6797         (_initialize_objc_language): Adjust.
6798         * printcmd.c (sym_info): Rename to ...
6799         (info_symbol_command): ... this.
6800         (address_info): Rename to ...
6801         (info_address_command): ... this.
6802         (display_info): Rename to ...
6803         (info_display_command): ... this.
6804         (_initialize_printcmd): Adjust.
6805         * reverse.c (bookmarks_info): Rename to ...
6806         (info_breakpoints_command): ... this.
6807         (_initialize_reverse): Adjust.
6808         * ser-go32.c (dos_info): Rename to ...
6809         (info_serial_command): ... this.
6810         (_initialize_ser_dos): Adjust.
6811         * skip.c (skip_info): Rename to ...
6812         (info_skip_command): ... this.
6813         (_initialize_step_skip): Adjust.
6814         * source.c (line_info): Rename to ...
6815         (info_line_command): ... this.
6816         (source_info): Rename to ...
6817         (info_source_command)
6818         * stack.c (frame_info): Rename to ...
6819         (info_frame_command): ... this.
6820         (locals_info): Rename to ...
6821         (info_locals_command): ... this.
6822         (args_info): Rename to ...
6823         (info_args_command): ... this.
6824         (_initialize_stack): Adjust.
6825         * symtab.c (sources_info): Rename to ...
6826         (info_sources_command): ... this.
6827         (variables_info): Rename to ...
6828         (info_variables_command): ... this.
6829         (functions_info): Rename to ...
6830         (info_functions_command): ... this.
6831         (types_info): Rename to ...
6832         (info_types_command): ... this.
6833         (_initialize_symtab): Adjust.
6834         * target.c (target_info): Rename to ...
6835         (info_target_command): ... this.
6836         (initialize_targets): Adjust.
6837         * tracepoint.c (tvariables_info): Rename to ...
6838         (info_tvariables_command): ... this.
6839         (scope_info): Rename to ...
6840         (info_scope_command): ... this.
6841         (trace_dump_actions): Adjust.
6842         (_initialize_tracepoint): Adjust.
6843
6844 2017-08-22  Tom Tromey  <tom@tromey.com>
6845
6846         * breakpoint.h (install_breakpoint): Update.
6847         * breakpoint.c (add_solib_catchpoint): Update.
6848         (install_breakpoint): Change argument to a std::unique_ptr.
6849         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6850         (create_breakpoint_sal, create_breakpoint): Update.
6851         (watch_command_1, catch_exec_command_1)
6852         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6853         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6854         Return the breakpoint.
6855         (set_raw_breakpoint_without_location, set_raw_breakpoint)
6856         (new_single_step_breakpoint): Update.
6857         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
6858         std::unique_ptr.
6859         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6860         std::unique_ptr.
6861         * break-catch-sig.c (create_signal_catchpoint): Use
6862         std::unique_ptr.
6863         * ada-lang.c (create_ada_exception_catchpoint): Use
6864         std::unique_ptr.
6865
6866 2017-08-22  Tom Tromey  <tom@tromey.com>
6867
6868         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
6869
6870 2017-08-22  Tom Tromey  <tom@tromey.com>
6871
6872         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
6873         (lookup_partial_symbol): Update.
6874
6875 2017-08-22  Tom Tromey  <tom@tromey.com>
6876
6877         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
6878         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
6879         (find_and_open_source, symtab_to_fullname): Update.
6880         * psymtab.c (psymtab_to_fullname): Update.
6881
6882 2017-08-22  Tom Tromey  <tom@tromey.com>
6883
6884         * exec.c (exec_file_attach): Update.
6885         * linux-thread-db.c (try_thread_db_load): Update.
6886         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
6887         * utils.c (gdb_realpath): Change return type.
6888         (gdb_realpath_keepfile): Update.
6889         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
6890         (_initialize_utils): Register the new self test.
6891         * source.c (openp): Update.
6892         (find_and_open_source): Update.
6893         * nto-tdep.c (nto_find_and_open_solib): Update.
6894         * main.c (set_gdb_data_directory): Update.
6895         (captured_main_1): Update.
6896         * dwarf2read.c (dwarf2_get_dwz_file): Update
6897         (dw2_map_symbol_filenames): Update.
6898         * auto-load.c (auto_load_safe_path_vec_update): Update.
6899         (filename_is_in_auto_load_safe_path_vec): Change type of
6900         "filename_realp".
6901         (auto_load_objfile_script): Update.
6902         (file_is_auto_load_safe): Update.  Use std::string.
6903         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
6904
6905 2017-08-22  Tom Tromey  <tom@tromey.com>
6906
6907         * utils.c (gdb_realpath_keepfile): Return a
6908         gdb::unique_xmalloc_ptr.
6909         * exec.c (exec_file_attach): Update.
6910         * utils.h (gdb_realpath_keepfile): Return a
6911         gdb::unique_xmalloc_ptr.
6912
6913 2017-08-22  Tom Tromey  <tom@tromey.com>
6914
6915         * compile/compile.c (compile_file_command): Use
6916         gdb::unique_xmalloc_ptr, std::string.
6917         * utils.c (gdb_abspath): Change return type.
6918         * source.c (openp): Update.
6919         * objfiles.c (allocate_objfile): Update.
6920         * main.c (set_gdb_data_directory): Update.
6921         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
6922
6923 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
6924
6925         * cli-cmds.c (list_commands): List actual code around more than
6926         one location.
6927
6928 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
6929
6930         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
6931
6932 2017-08-21  Pedro Alves  <palves@redhat.com>
6933
6934         PR gdb/19487
6935         * c-exp.y (variable production): Handle function aliases.
6936         * minsyms.c (msymbol_is_text): New function.
6937         * minsyms.h (msymbol_is_text): Declare.
6938         * symtab.c (find_function_alias_target): New function.
6939         * symtab.h (find_function_alias_target): Declare.
6940
6941 2017-08-21  Pedro Alves  <palves@redhat.com>
6942
6943         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
6944         typedefs.
6945         * typeprint.c (whatis_exp): If handling "whatis", and expression
6946         is OP_TYPE, strip one typedef level.  Otherwise don't strip
6947         typedefs here.
6948         * valops.c (value_cast): Save "to" type before resolving
6949         stubs/typedefs.  Use that type as resulting value's type.
6950
6951 2017-08-18  Tom Tromey  <tom@tromey.com>
6952             Pedro Alves  <palves@redhat.com>
6953
6954         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
6955         * sol-thread.c (sol_thread_resume, sol_thread_wait)
6956         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
6957         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
6958         * proc-service.c (ps_xfer_memory): Use scoped_restore.
6959         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
6960         (linux_get_siginfo_data): Add "thread" argument.  Use
6961         scoped_restore.
6962         * linux-nat.c (linux_child_follow_fork)
6963         (check_stopped_by_watchpoint): Use scoped_restore.
6964         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
6965         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
6966         (restore_inferior_ptid, save_inferior_ptid): Remove.
6967         * btrace.c (btrace_fetch): Use scoped_restore.
6968         * bsd-uthread.c (bsd_uthread_fetch_registers)
6969         (bsd_uthread_store_registers): Use scoped_restore.
6970         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
6971         scoped_restore.
6972         * aix-thread.c (aix_thread_resume, aix_thread_wait)
6973         (aix_thread_xfer_partial): Use scoped_restore.
6974         * inferior.h (save_inferior_ptid): Remove.
6975
6976 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6977
6978         PR tdep/21818
6979         * arm-tdep.c (gdb_print_insn_arm): Mark
6980         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
6981
6982 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6983
6984         * NEWS: Mention GDBserver's new option "--selftest".
6985         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
6986         * selftest.c: Move it to common/selftest.c.
6987         * selftest.h: Move it to common/selftest.h.
6988         * selftest-arch.c (reset): New function.
6989         (tests_with_arch): Call reset.
6990
6991 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6992
6993         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
6994         instead of exception_fprintf and printf_filtered.
6995
6996 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6997
6998         * selftest.c (register_self_test): Rename it to
6999         selftests::register_test.
7000         (run_self_tests): selftest::run_tests.
7001         * selftest.h: Update declarations.
7002         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7003         selftests::register_test_foreach_arch.
7004         * selftest-arch.h: Update declaration.
7005         * aarch64-tdep.c: Update.
7006         * arm-tdep.c: Likewise.
7007         * disasm-selftests.c: Likewise.
7008         * dwarf2loc.c: Likewise.
7009         * dwarf2-frame.c: Likewise.
7010         * findvar.c: Likewise.
7011         * gdbarch-selftests.c: Likewise.
7012         * maint.c (maintenance_selftest): Likewise.
7013         * regcache.c: Likewise.
7014         * rust-exp.y: Likewise.
7015         * selftest-arch.c: Likewise.
7016         * unittests/environ-selftests.c: Likewise.
7017         * unittests/function-view-selftests.c: Likewise.
7018         * unittests/offset-type-selftests.c: Likewise.
7019         * unittests/optional-selftests.c: Likewise.
7020         * unittests/scoped_restore-selftests.c: Likewise.
7021         * utils-selftests.c: Likewise.
7022
7023 2017-08-17  Pedro Alves  <palves@redhat.com>
7024
7025         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7026         local.
7027
7028 2017-08-17  Pedro Alves  <palves@redhat.com>
7029
7030         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7031         field.
7032         (reset_die_in_process): Delete, replaced by ...
7033         (process_die_scope): ... this new class.  Make it responsible for
7034         freeing cu->line_header too.
7035         (process_die): Use process_die_scope.
7036         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7037         cu->line_header_die_owner.  Don't release the line header if it's
7038         owned by the CU.
7039         (setup_type_unit_groups): Make the CU/DIE own the line header.
7040         Don't release the line header here.
7041
7042 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
7043
7044         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7045
7046 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7047
7048         * NEWS: Mention new shortcuts for nexti and stepi in TUI
7049         Single-Key mode
7050
7051 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7052
7053         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7054         mode command list.
7055
7056 2017-08-15  Stafford Horne  <shorne@gmail.com>
7057
7058         * MAINTAINERS (Write After Approval): Add Stafford Horne.
7059
7060 2017-08-15  Stafford Horne  <shorne@gmail.com>
7061
7062         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7063
7064 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
7065
7066         PR gdb/21954
7067         * infcmd.c (unset_environment_command): Use the 'clear' method on
7068         the environment instead of resetting it.
7069
7070 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
7071
7072         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7073         platforms.
7074
7075 2017-08-14  Tom Tromey  <tom@tromey.com>
7076
7077         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7078         (print_binary_chars): Likewise.
7079         (BITS_IN_BYTES): Remove.
7080
7081 2017-08-14  Tom Tromey  <tom@tromey.com>
7082
7083         PR gdb/21675
7084         * valprint.c (LOW_ZERO): Change value to 034.
7085         (print_octal_chars): Add static_asserts for octal constants.
7086         * printcmd.c (print_scalar_formatted): Add 'd' case.
7087
7088 2017-08-11  Tom Tromey  <tom@tromey.com>
7089
7090         * symfile.c (add_symbol_file_command): Use std::vector.
7091
7092 2017-08-14  Tom Tromey  <tom@tromey.com>
7093
7094         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7095         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7096         std::move.
7097         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7098
7099 2017-08-11  Pedro Alves  <palves@redhat.com>
7100
7101         * infrun.c (process_event_stop_test): Adjust
7102         function_name_is_marked_for_skip call.
7103         * skip.c: Include <list>.
7104         (skiplist_entry): Make it a class with private fields, and
7105         getters/setters.
7106         (skiplist_entry_chain): Delete.
7107         (skiplist_entries): New.
7108         (skiplist_entry_count): Delete.
7109         (highest_skiplist_entry_num): New.
7110         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7111         (add_skiplist_entry): Delete.
7112         (skiplist_entry::skiplist_entry): New.
7113         (skiplist_entry::add_entry): New.
7114         (skip_file_command, skip_function): Adjust.
7115         (compile_skip_regexp): Delete.
7116         (skip_command): Don't compile regexp here.  Adjust to use
7117         skiplist_entry::add_entry.
7118         (skip_info): Adjust to use range-for and getters.
7119         (skip_enable_command, skip_disable_command): Adjust to use
7120         range-for and setters.
7121         (skip_delete_command): Adjust to use std::list.
7122         (add_skiplist_entry): Delete.
7123         (skip_file_p): Delete, refactored as ...
7124         (skiplist_entry::do_skip_file_p): ... this new method.
7125         (skip_gfile_p): Delete, refactored as ...
7126         (skiplist_entry::do_gskip_file_p): ... this new method.
7127         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7128         (skiplist_entry::skip_function_p): ... this new method.
7129         (function_name_is_marked_for_skip): Now returns bool, and takes
7130         the function sal by const reference.  Adjust to use range-for and
7131         skiplist_entry methods.
7132         (_initialize_step_skip): Remove references to
7133         skiplist_entry_chain, skiplist_entry_count.
7134         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7135         takes the function sal by const reference.
7136
7137 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7138
7139         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7140         (dwarf2_frame_cache): Remove reset_cache_cleanup.
7141         (dwarf2_frame_cache):
7142         * frame-unwind.c (frame_unwind_try_unwinder): Catch
7143         RETURN_MASK_ALL and set *this_case to NULL.
7144         * frame-unwind.h: Update comments.
7145
7146 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7147
7148         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7149         (dwarf2_frame_state_copy_regs): Remove.
7150         (dwarf2_frame_state_free_regs): Remove.
7151         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7152         (dwarf2_restore_rule): Call method .alloc_regs instead of
7153         dwarf2_frame_state_alloc_regs.
7154         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
7155         constructor.  Call std::move.
7156         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7157         (dwarf2_frame_cache): Likewise.
7158
7159         [GDB_SELF_TEST]: Include selftest.h and
7160         selftest-arch.h.
7161         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7162         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7163         execute_cfa_program_test.
7164
7165         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7166         copy ctor, assignment operator, move assignment.
7167         <alloc_regs>: New method.
7168         <swap>: New method.
7169         (struct dwarf2_frame_state): Delete dtor.
7170         (dwarf2_frame_state_alloc_regs): Remove declaration.
7171         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7172         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7173
7174 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7175
7176         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7177         (dwarf2_frame_state::dwarf2_frame_state): New.
7178         (dwarf2_frame_state::~dwarf2_frame_state): New.
7179         (dwarf2_fetch_cfa_info): Update.
7180         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
7181         rather than a pointer.  Update code.
7182         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7183         dtor.
7184         <data_align, code_align, retaddr_column>: Change them to const.
7185         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7186         to bool.
7187
7188 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7189
7190         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7191         <loc.exp>: New field.
7192         * dwarf2-frame.c (execute_cfa_program): Update.
7193         (dwarf2_frame_prev_register): Update.
7194
7195 2017-08-10  Pedro Alves  <palves@redhat.com>
7196
7197         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7198
7199 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7200
7201         * fbsd-nat.c (struct fbsd_fork_info): Remove.
7202         (fbsd_pending_children): Use std::list.
7203         (fbsd_remember_child): Likewise.
7204         (fbsd_is_child_pending): Likewise.
7205         (fbsd_pending_vfork_done): Use std::forward_list.
7206         (fbsd_add_vfork_done): Likewise.
7207         (fbsd_is_vfork_done_pending): Likewise.
7208         (fbsd_next_vfork_done): Likewise.
7209
7210 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7211
7212         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7213         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7214         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7215         for `mapfilename'.
7216         (fbsd_xfer_partial): Use gdb::byte_vector.
7217         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7218
7219 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7220
7221         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7222         "filestuff.h".
7223         (fbsd_find_memory_regions): Fix `mapfile' initialization.
7224
7225 2017-08-09  Tom Tromey  <tom@tromey.com>
7226
7227         * skip.c (skiplist_entry): New constructor.
7228         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7229         (skiplist_entry::file_is_glob): Now bool.
7230         (skiplist_entry::file, skiplist_entry::function): Now
7231         std::string.
7232         (make_skip_entry): Return a unique_ptr.  Use new.
7233         (free_skiplist_entry, free_skiplist_entry_cleanup)
7234         (make_free_skiplist_entry_cleanup): Remove.
7235         (skip_command, skip_disable_command, add_skiplist_entry)
7236         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7237         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7238         (function_name_is_marked_for_skip): Update.
7239         (skip_delete_command): Update.  Use delete.
7240
7241 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
7242
7243         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7244         (aarch64_linux_core_read_description): New function.
7245         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7246
7247 2017-08-09  Pedro Alves  <palves@redhat.com>
7248
7249         * cp-name-parser.y (cp_comp_to_string): Return a
7250         gdb::unique_xmalloc_ptr<char>.
7251         * cp-support.c (replace_typedefs_qualified_name)
7252         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7253         (cp_canonicalize_string_full): Use op= instead of explicit
7254         convertion.
7255         (cp_class_name_from_physname, method_name_from_physname)
7256         (cp_func_name, cp_remove_params): Adjust to use
7257         gdb::unique_xmalloc_ptr<char>.
7258         * cp-support.h (cp_comp_to_string): Return a
7259         gdb::unique_xmalloc_ptr<char>.
7260         * python/py-type.c (typy_lookup_type): Adjust to use
7261         gdb::unique_xmalloc_ptr<char>.
7262
7263 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
7264
7265         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7266
7267 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
7268             Yao Qi  <yao.qi@linaro.org>
7269
7270         * cp-support.c (cp_canonicalize_string_full): Use
7271         gdb::unique_xmalloc_ptr<char>.
7272         (cp_canonicalize_string): Likewise.
7273
7274 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7275
7276         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7277         * regformats/i386/amd64-avx-avx512.dat: Remove.
7278         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7279         * regformats/i386/amd64-avx-mpx.dat:Remove.
7280         * regformats/i386/amd64-avx.dat: Remove.
7281         * regformats/i386/amd64-mpx.dat: Remove.
7282         * regformats/i386/i386-avx-avx512.dat: Remove.
7283         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7284         * regformats/i386/i386-avx-mpx.dat: Remove.
7285         * regformats/i386/i386-mmx.dat: Remove.
7286         * regformats/i386/i386-mpx.dat: Remove.
7287
7288 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7289
7290         * amd64-tdep.h (tdesc_x32): Remove the declaration.
7291         * amd64-tdep.c: Don't include features/i386/x32*.c.
7292         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7293         functions.
7294         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7295         and i386/x32-avx-avx512.
7296         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7297         and i386/x32.xml.
7298         * features/i386/x32-avx-avx512.c: Removed.
7299         * features/i386/x32-avx-avx512.xml: Removed.
7300         * features/i386/x32-avx.c: Removed.
7301         * features/i386/x32-avx.xml: Removed.
7302         * features/i386/x32.c: Removed.
7303         * features/i386/x32.xml: Removed.
7304         * regformats/i386/x32-avx-avx512.dat: Removed.
7305         * regformats/i386/x32-avx.dat: Removed.
7306         * regformats/i386/x32.dat: Removed.
7307
7308 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7309
7310         PR breakpoints/21886
7311         * mem-break.c (default_memory_insert_breakpoint): Use
7312         `->placed_address' rather than `->reqstd_address' for the
7313         breakpoint location.
7314
7315 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7316
7317         * arch-utils.c (default_print_insn): Remove arch/mach/endian
7318         assertions.
7319
7320 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7321
7322         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7323         a union of `tdep_info', `tdesc_data' and `id'.
7324         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7325         rather than `info.tdep_info'.
7326         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7327         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7328         * i386-tdep.c (i386_gdbarch_init): Likewise.
7329         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7330         * mips-tdep.c (mips_gdbarch_init): Likewise.
7331         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7332         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7333         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7334         `info.tdep_info'.
7335         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7336         `info.tdep_info'.
7337         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7338         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7339         `info.tdep_info'.
7340         * spu-tdep.c (spu_gdbarch_init): Likewise.
7341         * gdbarch.h: Regenerate.
7342
7343 2017-08-07  Leszek Swirski  <leszeks@google.com>
7344
7345         PR symtab/20899
7346         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7347
7348 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
7349
7350         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7351         (gdbsim_open): Rename gdb_argv args object to argv.
7352
7353 2017-08-05  Tom Tromey  <tom@tromey.com>
7354
7355         * compile/compile-object-load.c (compile_object_load): Use
7356         gdb::unique_xmalloc_ptr.
7357         * cli/cli-dump.c (scan_filename): Rename from
7358         scan_filename_with_cleanup.  Change return type.
7359         (scan_expression): Rename from scan_expression_with_cleanup.
7360         Change return type.
7361         (dump_memory_to_file, dump_value_to_file, restore_command):
7362         Use gdb::unique_xmalloc_ptr.  Update.
7363         * cli/cli-cmds.c (find_and_open_script): Use
7364         gdb::unique_xmalloc_ptr.
7365         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7366         * symmisc.c (maintenance_print_symbols)
7367         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7368         * symfile.c (symfile_bfd_open, generic_load)
7369         (add_symbol_file_command, remove_symbol_file_command): Use
7370         gdb::unique_xmalloc_ptr.
7371         * source.c (openp): Use gdb::unique_xmalloc_ptr.
7372         * psymtab.c (maintenance_print_psymbols): Use
7373         gdb::unique_xmalloc_ptr.
7374         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7375         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7376         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7377         (reload_shared_libraries_1): Likewise.
7378
7379 2017-08-05  Tom Tromey  <tom@tromey.com>
7380
7381         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7382         (rust_op_vector, rust_set_vector): New typedefs.
7383         (current_parser): New global.
7384         (work_obstack): Change to pointer type.  Update all users.
7385         (rust_ast, pstate): Remove globals.
7386         (struct rust_parser): New.
7387         (%union) <params, field_inits>: Change type.
7388         (start, tuple_expr, unit_expr, struct_expr_list, literal)
7389         (field_expr, expr_list, maybe_expr_list, type_list): Update.
7390         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7391         (convert_params_to_types, convert_params_to_expression): Change
7392         type of "params".
7393         (ast_string): Change type of "fields".
7394         (rust_parse): Make a rust_parser.  Remove cleanups.
7395         (rust_lex_tests): Make and install an auto_obstack.
7396
7397 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7398
7399         * configure.srv (ipa_x32_linux_regobj): New.
7400         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7401         instead of X86_TDESC_AVX512.
7402         (initialize_low_tracepoint): Call
7403         init_registers_x32_avx_avx512_linux.
7404
7405 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7406
7407         * utils.h (gdb_argv): Add namespace std for nullptr_t.
7408
7409 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7410
7411         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7412
7413 2017-08-03  Tom Tromey  <tom@tromey.com>
7414
7415         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7416         Remove.
7417         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7418
7419 2017-08-03  Tom Tromey  <tom@tromey.com>
7420
7421         * python/py-param.c (compute_enum_values): Use gdb_argv.
7422
7423 2017-08-03  Tom Tromey  <tom@tromey.com>
7424
7425         * utils.h (struct gdb_argv_deleter): New.
7426         (gdb_argv): New class.
7427         * utils.c (gdb_argv::reset): New method.
7428         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7429         * tracefile.c (tsave_command): Use gdb_argv.
7430         * top.c (new_ui_command): Use gdb_argv.
7431         * symmisc.c (maintenance_print_symbols)
7432         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7433         * symfile.c (symbol_file_command, generic_load)
7434         (remove_symbol_file_command): Use gdb_argv.
7435         * stack.c (backtrace_command): Use gdb_argv.
7436         * source.c (add_path, show_substitute_path_command)
7437         (unset_substitute_path_command, set_substitute_path_command):
7438         Use gdb_argv.
7439         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
7440         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7441         * remote.c (extended_remote_run, remote_put_command)
7442         (remote_get_command, remote_delete_command): Use gdb_argv.
7443         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7444         (gdbsim_open): Use gdb_argv.
7445         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7446         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7447         * procfs.c (procfs_info_proc): Use gdb_argv.
7448         * interps.c (interpreter_exec_cmd): Use gdb_argv.
7449         * infrun.c (handle_command): Use gdb_argv.
7450         * inferior.c (add_inferior_command, clone_inferior_command):
7451         Use gdb_argv.
7452         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7453         * exec.c (exec_file_command): Use gdb_argv.
7454         * cli/cli-cmds.c (alias_command): Use gdb_argv.
7455         * compile/compile.c (build_argc_argv): Use gdb_argv.
7456
7457 2017-08-03  Tom Tromey  <tom@tromey.com>
7458
7459         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7460
7461 2017-08-03  Tom Tromey  <tom@tromey.com>
7462
7463         * python/python.c (compute_python_string): Return std::string.
7464         (gdbpy_eval_from_control_command): Update.
7465         (do_start_initialization): Use std::string.
7466         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7467         xstrprintf.
7468         * python/py-breakpoint.c (local_setattro): Use string_printf, not
7469         xstrprintf.
7470
7471 2017-08-03  Tom Tromey  <tom@tromey.com>
7472
7473         * top.h (do_restore_instream_cleanup): Remove.
7474         * top.c (do_restore_instream_cleanup): Remove.
7475         (read_command_file): Use scoped_restore.
7476         * cli/cli-script.c (execute_user_command): Use scoped_restore.
7477
7478 2017-08-03  Tom Tromey  <tom@tromey.com>
7479
7480         * cli/cli-script.c (execute_user_command)
7481         (execute_control_command): Use scoped_restore.
7482
7483 2017-08-03  Tom Tromey  <tom@tromey.com>
7484
7485         * cli/cli-script.c (do_restore_user_call_depth): Remove.
7486         (execute_user_command): Remove user_call_depth; use
7487         user_args_stack's size instead.
7488
7489 2017-08-03  Tom Tromey  <tom@tromey.com>
7490
7491         * top.h (in_user_command): Remove.
7492         * top.c (in_user_command): Remove.
7493         * cli/cli-script.c (do_restore_user_call_depth)
7494         (execute_user_command): Update.
7495
7496 2017-08-03  Tom Tromey  <tom@tromey.com>
7497
7498         * valops.c (search_struct_method): Use gdb::byte_vector.
7499         * valarith.c (value_concat): Use std::vector.
7500         * target.c (memory_xfer_partial): Use gdb::byte_vector.
7501         (simple_search_memory): Likewise.
7502         * printcmd.c (find_string_backward): Use gdb::byte_vector.
7503         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7504         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7505         * elfread.c (elf_rel_plt_read): Use std::string.
7506         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7507         * cli/cli-dump.c (restore_section_callback): Use
7508         gdb::byte_vector.
7509
7510 2017-08-03  Tom Tromey  <tom@tromey.com>
7511
7512         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7513
7514 2017-08-03  Tom Tromey  <tom@tromey.com>
7515
7516         * tui/tui-regs.c (tui_restore_gdbout): Remove.
7517         (tui_register_format): Use scoped_restore.
7518
7519 2017-08-03  Tom Tromey  <tom@tromey.com>
7520
7521         * reverse.c (exec_direction_default): Remove.
7522         (exec_reverse_once): Use scoped_restore.
7523         * remote.c (restore_remote_timeout): Remove.
7524         (remote_flash_erase, remote_flash_write, remote_flash_done)
7525         (readchar, remote_serial_write): Use scoped_restore.
7526         * cli/cli-script.c (struct source_cleanup_lines_args)
7527         (source_cleanup_lines): Remove.
7528         (script_from_file): Use scoped_restore.
7529         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7530         (source_command): Use scoped_restore.
7531
7532 2017-08-03  Tom Tromey  <tom@tromey.com>
7533
7534         * utils.h (make_cleanup_free_so): Remove.
7535         * utils.c (do_free_so, make_cleanup_free_so): Remove.
7536         * solist.h (struct so_deleter): New.
7537         (so_list_up): New typedef.
7538         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7539
7540 2017-08-03  Tom Tromey  <tom@tromey.com>
7541
7542         * utils.h (make_cleanup_restore_current_language): Remove.
7543         * utils.c (do_restore_current_language)
7544         (make_cleanup_restore_current_language): Remove.
7545         * parse.c (parse_exp_in_context_1)
7546         (parse_expression_with_language): Use
7547         scoped_restore_current_language.
7548         * mi/mi-main.c (mi_cmd_execute): Use
7549         scoped_restore_current_language.
7550         * language.h (scoped_restore_current_language): New class.
7551
7552 2017-08-03  Tom Tromey  <tom@tromey.com>
7553
7554         * compile/compile.c (cleanup_unlink_file): Remove.
7555         (compile_to_object): Use gdb::unlinker.
7556         (eval_compile_command): Likewise.
7557
7558 2017-08-03  Tom Tromey  <tom@tromey.com>
7559
7560         * utils.h (make_cleanup_fclose): Remove.
7561         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7562
7563 2017-08-03  Tom Tromey  <tom@tromey.com>
7564
7565         * top.c (open_terminal_stream): Return gdb_file_up.
7566         (new_ui_command): Update.
7567
7568 2017-08-03  Tom Tromey  <tom@tromey.com>
7569
7570         * source.c (print_source_lines_base, forward_search_command)
7571         (reverse_search_command): Use gdb_file_up.
7572
7573 2017-08-03  Tom Tromey  <tom@tromey.com>
7574
7575         * fbsd-nat.c (fbsd_find_memory_regions): Update.
7576
7577 2017-08-03  Tom Tromey  <tom@tromey.com>
7578
7579         * cli/cli-cmds.c (find_and_open_script): Change return type.
7580         Remove "streamp" and "full_path" parameters.
7581         (source_script_with_search): Update.
7582         * auto-load.c (source_script_file): Update.
7583         * cli/cli-cmds.h (find_and_open_script): Change type.
7584         (open_script): New struct.
7585
7586 2017-08-03  Tom Tromey  <tom@tromey.com>
7587
7588         * xml-support.c (xml_fetch_content_from_file): Update.
7589         * ui-file.c (stdio_file::open): Update.
7590         * tracefile-tfile.c (tfile_start): Update.
7591         * remote.c (remote_file_put, remote_file_get): Update.
7592         * nat/linux-procfs.c (linux_proc_get_int)
7593         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7594         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7595         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7596         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7597         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7598         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7599         * linux-nat.c (linux_proc_pending_signals): Update.
7600         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7601         (file_closer): Remove.
7602         * compile/compile.c (compile_to_object): Update.
7603         * common/filestuff.h (struct gdb_file_deleter): New.
7604         (gdb_file_up): New typedef.
7605         (gdb_fopen_cloexec): Change return type.
7606         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7607         * cli/cli-dump.c (fopen_with_cleanup): Remove.
7608         (dump_binary_file, restore_binary_file): Update.
7609         * auto-load.c (auto_load_objfile_script_1): Update.
7610
7611 2017-08-03  Tom Tromey  <tom@tromey.com>
7612
7613         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7614         (info_static_tracepoint_markers_command): Likewise.
7615         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7616         * skip.c (skip_info): Use ui_out_emit_table.
7617         * progspace.c (print_program_space): Use ui_out_emit_table.
7618         * osdata.c (info_osdata): Use ui_out_emit_table.
7619         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7620         ui_out_emit_table.
7621         * linux-thread-db.c (info_auto_load_libthread_db): Use
7622         ui_out_emit_table.
7623         * inferior.c (print_inferior): Use ui_out_emit_table.
7624         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7625         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7626         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7627         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7628         * ui-out.h (class ui_out_emit_table): New.
7629
7630 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
7631
7632         * mips-tdep.c (mips_fpu_type_str): New function.
7633         (mips_dump_tdep): Call it.
7634
7635 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
7636
7637         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7638         `->mips_fpu_type'.
7639
7640 2017-07-31  Xavier Roirand  <roirand@adacore.com>
7641
7642         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7643
7644 2017-07-27  Xavier Roirand  <roirand@adacore.com>
7645
7646         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7647
7648 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7649
7650         * cli/cli-cmds.c (maintenancechecklist): New variable.
7651         * gdbcmd.h (maintenancechecklist): Declare it.
7652         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7653         Call i386_linux_read_description with different masks.
7654         * maint.c (maintenance_check_command): New function.
7655         (_initialize_maint_cmds): Call add_prefix_cmd.
7656         * target-descriptions.c (tdesc_reg): override operator != and ==.
7657         (tdesc_type): Likewise.
7658         (tdesc_feature): Likewise.
7659         (target_desc): Likewise.
7660         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7661         (maintenance_check_xml_descriptions): New function.
7662         (_initialize_target_descriptions) Add command "xml-descriptions".
7663         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7664
7665 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7666
7667         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7668         Include features/i386/32bit-*.c.
7669         (i386_linux_read_description): Generate target description if it
7670         doesn't exist.
7671         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7672         functions.
7673         * features/i386/32bit-linux.c: Re-generated.
7674         * features/i386/32bit-sse.c: Likewise.
7675         * target-descriptions.c (print_c_feature::visit): Print code to
7676         set register number if needed.
7677         (print_c_feature) <m_next_regnum>: New field.
7678
7679 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7680
7681         * features/Makefile (CFILES): Rename with TDESC_CFILES.
7682         (FEATURE_XMLFILES): New.
7683         (FEATURE_CFILES): New.
7684         New rules.
7685         (clean-cfiles): Remove generated c files.
7686         * features/i386/32bit-avx.c: Generated.
7687         * features/i386/32bit-avx512.c: Generated.
7688         * features/i386/32bit-core.c: Generated.
7689         * features/i386/32bit-linux.c: Generated.
7690         * features/i386/32bit-mpx.c: Generated.
7691         * features/i386/32bit-pkeys.c: Generated.
7692         * features/i386/32bit-sse.c: Generated.
7693         * target-descriptions.c: Include algorithm.
7694         (tdesc_element_visitor): Add method visit_end.
7695         (print_c_tdesc): Implement visit_end.
7696         (print_c_tdesc:: m_filename_after_features): Move it to
7697         protected.
7698         (print_c_feature): New class.
7699         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7700         name starts with "i386/32bit-".
7701
7702 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7703
7704         * target-descriptions.c (tdesc_element_visitor): New class.
7705         (tdesc_element): New class.
7706         (tdesc_reg): Inherit from tdesc_element.
7707         (tdesc_reg::accept): New function.
7708         (tdesc_type): Inherit from tdesc_element.
7709         (tdesc_type::accept): New function.
7710         (tdesc_feature): Inherit from tdesc_element.
7711         (tdesc_feature::accept): New function.
7712         (target_desc): Inherit from tdesc_element.
7713         (target_desc::target_desc): New.
7714         (target_desc::~target_desc): New.
7715         (target_desc::accept): New.
7716         (allocate_target_description): Use new.
7717         (free_target_description): Use delete.
7718         (print_c_tdesc): New class.
7719         (maint_print_c_tdesc_cmd): Adjust.
7720
7721         * features/aarch64.c: Re-generated.
7722         * features/arc-arcompact.c: Re-generated.
7723         * features/arc-v2.c: Re-generated.
7724         * features/arm/arm-with-iwmmxt.c: Re-generated.
7725         * features/arm/arm-with-m.c: Re-generated.
7726         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
7727         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
7728         * features/arm/arm-with-neon.c: Re-generated.
7729         * features/arm/arm-with-vfpv2.c: Re-generated.
7730         * features/arm/arm-with-vfpv3.c: Re-generated.
7731         * features/i386/amd64-avx-avx512.c: Re-generated.
7732         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7733         * features/i386/amd64-avx.c: Re-generated.
7734         * features/i386/amd64-avx-linux.c: Re-generated.
7735         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
7736         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7737         * features/i386/amd64-avx-mpx.c: Re-generated.
7738         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
7739         * features/i386/amd64.c: Re-generated.
7740         * features/i386/amd64-linux.c: Re-generated.
7741         * features/i386/amd64-mpx.c: Re-generated.
7742         * features/i386/amd64-mpx-linux.c: Re-generated.
7743         * features/i386/i386-avx-avx512.c: Re-generated.
7744         * features/i386/i386-avx-avx512-linux.c: Re-generated.
7745         * features/i386/i386-avx.c: Re-generated.
7746         * features/i386/i386-avx-linux.c: Re-generated.
7747         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
7748         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
7749         * features/i386/i386-avx-mpx.c: Re-generated.
7750         * features/i386/i386-avx-mpx-linux.c: Re-generated.
7751         * features/i386/i386.c: Re-generated.
7752         * features/i386/i386-linux.c: Re-generated.
7753         * features/i386/i386-mmx.c: Re-generated.
7754         * features/i386/i386-mmx-linux.c: Re-generated.
7755         * features/i386/i386-mpx.c: Re-generated.
7756         * features/i386/i386-mpx-linux.c: Re-generated.
7757         * features/i386/x32-avx-avx512.c: Re-generated.
7758         * features/i386/x32-avx-avx512-linux.c: Re-generated.
7759         * features/i386/x32-avx.c: Re-generated.
7760         * features/i386/x32-avx-linux.c: Re-generated.
7761         * features/i386/x32.c: Re-generated.
7762         * features/i386/x32-linux.c: Re-generated.
7763         * features/microblaze.c: Re-generated.
7764         * features/microblaze-with-stack-protect.c: Re-generated.
7765         * features/mips64-dsp-linux.c: Re-generated.
7766         * features/mips64-linux.c: Re-generated.
7767         * features/mips-dsp-linux.c: Re-generated.
7768         * features/mips-linux.c: Re-generated.
7769         * features/nds32.c: Re-generated.
7770         * features/nios2.c: Re-generated.
7771         * features/nios2-linux.c: Re-generated.
7772         * features/rs6000/powerpc-32.c: Re-generated.
7773         * features/rs6000/powerpc-32l.c: Re-generated.
7774         * features/rs6000/powerpc-403.c: Re-generated.
7775         * features/rs6000/powerpc-403gc.c : Re-generated.
7776         * features/rs6000/powerpc-405.c: Re-generated.
7777         * features/rs6000/powerpc-505.c: Re-generated.
7778         * features/rs6000/powerpc-601.c: Re-generated.
7779         * features/rs6000/powerpc-602.c: Re-generated.
7780         * features/rs6000/powerpc-603.c: Re-generated.
7781         * features/rs6000/powerpc-604.c: Re-generated.
7782         * features/rs6000/powerpc-64.c: Re-generated.
7783         * features/rs6000/powerpc-64l.c: Re-generated.
7784         * features/rs6000/powerpc-7400.c: Re-generated.
7785         * features/rs6000/powerpc-750.c: Re-generated.
7786         * features/rs6000/powerpc-860.c: Re-generated.
7787         * features/rs6000/powerpc-altivec32.c: Re-generated.
7788         * features/rs6000/powerpc-altivec32l.c: Re-generated.
7789         * features/rs6000/powerpc-altivec64.c: Re-generated.
7790         * features/rs6000/powerpc-altivec64l.c: Re-generated.
7791         * features/rs6000/powerpc-cell32l.c: Re-generated.
7792         * features/rs6000/powerpc-cell64l.c: Re-generated.
7793         * features/rs6000/powerpc-e500.c: Re-generated.
7794         * features/rs6000/powerpc-e500l.c: Re-generated.
7795         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
7796         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
7797         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
7798         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
7799         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
7800         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
7801         * features/rs6000/powerpc-vsx32.c: Re-generated.
7802         * features/rs6000/powerpc-vsx32l.c: Re-generated.
7803         * features/rs6000/powerpc-vsx64.c: Re-generated.
7804         * features/rs6000/powerpc-vsx64l.c: Re-generated.
7805         * features/rs6000/rs6000.c: Re-generated.
7806         * features/s390-linux32.c: Re-generated.
7807         * features/s390-linux32v1.c: Re-generated.
7808         * features/s390-linux32v2.c: Re-generated.
7809         * features/s390-linux64.c: Re-generated.
7810         * features/s390-linux64v1.c: Re-generated.
7811         * features/s390-linux64v2.c: Re-generated.
7812         * features/s390-te-linux64.c: Re-generated.
7813         * features/s390-tevx-linux64.c: Re-generated.
7814         * features/s390-vx-linux64.c: Re-generated.
7815         * features/s390x-linux64.c: Re-generated.
7816         * features/s390x-linux64v1.c: Re-generated.
7817         * features/s390x-linux64v2.c: Re-generated.
7818         * features/s390x-te-linux64.c: Re-generated.
7819         * features/s390x-tevx-linux64.c: Re-generated.
7820         * features/s390x-vx-linux64.c: Re-generated.
7821         * features/sparc/sparc32-solaris.c: Re-generated.
7822         * features/sparc/sparc64-solaris.c: Re-generated.
7823         * features/tic6x-c62x.c: Re-generated.
7824         * features/tic6x-c62x-linux.c: Re-generated.
7825         * features/tic6x-c64x.c: Re-generated.
7826         * features/tic6x-c64x-linux.c: Re-generated.
7827         * features/tic6x-c64xp.c: Re-generated.
7828         * features/tic6x-c64xp-linux.c: Re-generated.
7829
7830 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7831
7832         * i386-linux-tdep.c (i386_linux_read_description): New function.
7833         (i386_linux_core_read_description): Call
7834         i386_linux_read_description.
7835         * i386-linux-tdep.h (i386_linux_read_description): Declare.
7836         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
7837         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
7838         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
7839         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
7840         * x86-linux-nat.c (x86_linux_read_description): Call
7841         i386_linux_read_description.
7842
7843 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7844
7845         * NEWS: Mention it.
7846         * features/Makefile (%.c: %.xml): Pass the xml file name to
7847         command "maint print c-tdesc".
7848         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7849         name from 'arg'.
7850
7851 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7852
7853         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
7854         in-class initialization.
7855         (tdesc_create_feature): Call new instead of XCNEW.
7856         (free_target_description): Ue delete.
7857
7858 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
7859
7860         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
7861
7862 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7863
7864         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
7865         constant.
7866         (amd64_x32_init_abi): Likewise.
7867         * amd64-tdep.h (amd64_init_abi): Update declaration.
7868         (amd64_x32_init_abi): Likewise.
7869
7870 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7871
7872         PR tdep/21717
7873         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
7874         condition for FPSCR.
7875         (arm_linux_store_inferior_registers): Likewise.
7876
7877 2017-07-22  Tom Tromey  <tom@tromey.com>
7878
7879         * break-catch-syscall.c (struct catch_syscall_inferior_data)
7880         <syscalls_counts>: Now a std::vector.
7881         (get_catch_syscall_inferior_data): Use "new".
7882         (catch_syscall_inferior_data_cleanup): Use "delete".
7883         (insert_catch_syscall, remove_catch_syscall)
7884         (clear_syscall_counts): Update.
7885
7886 2017-07-22  Tom Tromey  <tom@tromey.com>
7887
7888         * break-catch-syscall.c (syscall_catchpoint)
7889         <syscalls_to_be_caught>: Now a std::vector<int>
7890         (~syscall_catchpoint): Remove.
7891         (insert_catch_syscall, remove_catch_syscall)
7892         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
7893         (print_mention_catch_syscall, print_recreate_catch_syscall):
7894         Update.
7895         (create_syscall_event_catchpoint): Change type of "filter"
7896         parameter.
7897         (catch_syscall_split_args): Return a std::vector.
7898         (catch_syscall_command_1, catching_syscall_number_1): Update.
7899
7900 2017-07-22  Tom Tromey  <tom@tromey.com>
7901
7902         * break-catch-throw.c (struct exception_catchpoint)
7903         <exception_rx>: Now a std::string.
7904         (~exception_catchpoint): Remove.
7905         (print_one_detail_exception_catchpoint): Update.
7906         (handle_gnu_v3_exceptions): Change type of except_rx.
7907         (extract_exception_regexp): Return a std::string.
7908         (catch_exception_command_1): Update.
7909
7910 2017-07-22  Tom Tromey  <tom@tromey.com>
7911
7912         * break-catch-sig.c (gdb_signal_type): Remove typedef.
7913         (struct signal_catchpoint) <signals_to_be_caught>: Now a
7914         std::vector.
7915         <catch_all>: Now a bool.
7916         (~signal_catchpoint): Remove.
7917         (signal_catchpoint_insert_location)
7918         (signal_catchpoint_remove_location)
7919         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
7920         (signal_catchpoint_print_mention)
7921         (signal_catchpoint_print_recreate)
7922         (signal_catchpoint_explains_signal): Update.
7923         (create_signal_catchpoint): Change type of "filter" and
7924         "catch_all".
7925         (catch_signal_split_args): Return a std::vector.  Change type of
7926         "catch_all".
7927         (catch_signal_command): Update.
7928
7929 2017-07-20  Pedro Alves  <palves@redhat.com>
7930
7931         * ada-lang.c (ada_language_defn): Make extern.
7932         (_initialize_ada_language): Remove add_language call.
7933         * c-lang.c (c_language_defn, cplus_language_defn)
7934         (asm_language_defn, minimal_language_defn): Make extern.
7935         (_initialize_c_language): Delete.
7936         * completer.c (compare_cstrings): Delete, moved to utils.h.
7937         * d-lang.c (d_language_defn): Make extern.
7938         (_initialize_d_language): Remove add_language calls.
7939         * defs.h (enum language): Add comment.
7940         * f-lang.c (f_language_defn): Make extern.
7941         (_initialize_f_language): Remove add_language call.
7942         * go-lang.c (go_language_defn): Make extern.
7943         (_initialize_go_language): Remove add_language call.
7944         * language.c: Include <algorithm>.
7945         (languages): Redefine as const array.
7946         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
7947         (set_language_command): Handle "local".  Use for-range loop.
7948         (set_language): Remove loop.
7949         (language_enum): Rewrite.
7950         (language_def, language_str): Remove loops.
7951         (add_language): Delete.
7952         (add_set_language_command): New, based on add_languages.
7953         (skip_language_trampoline): Adjust.
7954         (local_language_defn): Delete.
7955         (language_gdbarch_post_init): Adjust.
7956         (_initialize_language): Remove add_language calls.  Call
7957         add_set_language_command.
7958         * language.h (add_language): Delete.
7959         (auto_language_defn)
7960         (unknown_language_defn, minimal_language_defn, ada_language_defn)
7961         (asm_language_defn, c_language_defn, cplus_language_defn)
7962         (d_language_defn, f_language_defn, go_language_defn)
7963         (m2_language_defn, objc_language_defn, opencl_language_defn)
7964         (pascal_language_defn, rust_language_defn): Declare.
7965         * m2-lang.c (m2_language_defn): Make extern.
7966         (_initialize_m2_language): Remove add_language call.
7967         * objc-lang.c (objc_language_defn): Make extern.
7968         (_initialize_objc_language): Remove add_language call.
7969         * opencl-lang.c (opencl_language_defn): Make extern.
7970         (_initialize_opencl_language): Remove add_language call.
7971         * p-lang.c (pascal_language_defn): Make extern.
7972         (_initialize_pascal_language): Delete.
7973         * rust-lang.c (rust_language_defn): Make extern.
7974         (_initialize_rust_language): Delete.
7975         * utils.h (compare_cstrings): New static inline function.
7976
7977 2017-07-20  Pedro Alves  <palves@redhat.com>
7978
7979         * ada-lang.c (ada_to_fixed_type_1): Adjust.
7980         (get_var_value): Constify parameters.
7981         (get_int_var_value): Change prototype.
7982         (to_fixed_range_type): Adjust.
7983         * ada-lang.h (get_int_var_value): Change prototype.
7984
7985 2017-07-20  Pedro Alves  <palves@redhat.com>
7986
7987         * dwarf2read.c (dw2_lookup_symbol): Use
7988         SYMBOL_MATCHES_SEARCH_NAME.
7989         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
7990
7991 2017-07-20  Pedro Alves  <palves@redhat.com>
7992
7993         * block.c (block_iter_name_step, block_iter_name_first)
7994         (block_iter_name_next): Delete.
7995         (block_lookup_symbol_primary): Adjust to use
7996         dict_iter_match_first/dict_iter_match_next.
7997         * block.h (block_iter_name_first, block_iter_name_next): Delete
7998         declarations.
7999         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8000         dict_iter_match_first/dict_iter_match_next.
8001
8002 2017-07-20  Pedro Alves  <palves@redhat.com>
8003
8004         * cp-support.c (cp_find_first_component_aux): Add missing case for
8005         end of string.
8006
8007 2017-07-18  David Blaikie  <dblaikie@gmail.com>
8008
8009         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8010         of dwo_cu's dwo_file.
8011
8012 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8013
8014         * remote.c (store_registers_using_G): Remove one line comment.
8015
8016 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8017
8018         * regcache.c (regcache_cpy): Simplify it.
8019         (regcache::cpy_no_passthrough): Remove it.
8020         * regcache.h (cpy_no_passthrough): Remove it.
8021         (regcache_dup, regcache_cpy): Update comments.
8022
8023 2017-07-18  Pedro Alves  <palves@redhat.com>
8024
8025         * remote-sim.c (sim_command_completer): Adjust to work with a
8026         completion_tracker instead of a VEC.
8027
8028 2017-07-17  Pedro Alves  <palves@redhat.com>
8029
8030         * completer.c (complete_source_filenames): New function.
8031         (complete_address_and_linespec_locations): New function.
8032         (location_completer): Use complete_address_and_linespec_locations.
8033         (completion_tracker::build_completion_result): Honor the tracker's
8034         request to suppress append.
8035         * completer.h (completion_tracker::suppress_append_ws)
8036         (completion_tracker::set_suppress_append_ws): New methods.
8037         (completion_tracker::m_suppress_append_ws): New field.
8038         (complete_source_filenames): New declaration.
8039         * linespec.c (linespec_complete_what): New.
8040         (struct ls_parser) <complete_what, completion_word,
8041         completion_quote_char, completion_quote_end, completion_tracker>:
8042         New fields.
8043         (string_find_incomplete_keyword_at_end): New.
8044         (linespec_lexer_lex_string): Record quote char.  If in completion
8045         mode, don't throw.
8046         (linespec_lexer_consume_token): Advance the completion word point.
8047         (linespec_lexer_peek_token): Save/restore completion info.
8048         (save_stream_and_consume_token): New.
8049         (set_completion_after_number): New.
8050         (linespec_parse_basic): Set what to complete next depending on
8051         token.  Handle function and label completions specially.
8052         (parse_linespec): Disable objc shortcut in completion mode.  Set
8053         what to complete next depending on token type.  Skip keyword if in
8054         completion mode.
8055         (complete_linespec_component, linespec_complete): New.
8056         * linespec.h (linespec_complete): Declare.
8057
8058 2017-07-17  Pedro Alves  <palves@redhat.com>
8059
8060         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8061         Handle 'operator<' / 'operator<<'.
8062
8063 2017-07-17  Pedro Alves  <palves@redhat.com>
8064
8065         * completer.c (collect_explicit_location_matches): Handle
8066         MATCH_LABEL.
8067         (convert_explicit_location_to_linespec): New, factored out from
8068         ...
8069         (convert_explicit_location_to_sals): ... this.
8070         (complete_label): New.
8071         (linespec_complete_label, find_label_symbols_in_block): New.
8072         (find_label_symbols): Add completion_mode parameter and adjust to
8073         call find_label_symbols_in_block.
8074         * linespec.h (linespec_complete_label): Declare.
8075
8076 2017-07-17  Pedro Alves  <palves@redhat.com>
8077
8078         * ada-lang.c (ada_collect_symbol_completion_matches): Add
8079         complete_symbol_mode parameter.
8080         * cli/cli-cmds.c (complete_command): Get the completion result out
8081         of the handle_brkchars tracker if used a custom word point.
8082         * completer.c: Include "linespec.h".
8083         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8084         (advance_to_expression_complete_word_point): New.
8085         (completion_tracker::completes_to_completion_word): New.
8086         (complete_files_symbols): Pass down
8087         complete_symbol_mode::EXPRESSION.
8088         (explicit_options, probe_options): New.
8089         (collect_explicit_location_matches): Complete on the
8090         explictit_loc->foo instead of word.  Use
8091         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
8092         keyword and options completions.
8093         (backup_text_ptr): Delete.
8094         (skip_keyword): New.
8095         (complete_explicit_location): Remove 'word' parameter.  Add
8096         language, quoted_arg_start and quoted_arg_end parameters.
8097         Rewrite, parsing left to right.
8098         (location_completer): Rewrite.
8099         (location_completer_handle_brkchars): New function.
8100         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8101         (enum complete_line_internal_reason): Adjust comments.
8102         (completion_tracker::discard_completions): New.
8103         (completer_handle_brkchars_func_for_completer): Handle
8104         location_completer.
8105         (gdb_custom_word_point_brkchars)
8106         (gdb_org_rl_basic_quote_characters): New.
8107         (gdb_completion_word_break_characters_throw)
8108         (completion_find_completion_word): Handle trackers that use a
8109         custom word point.
8110         (completion_tracker::advance_custom_word_point_by): New.
8111         (completion_tracker::build_completion_result): Don't rely on
8112         readline appending the quote char.
8113         (gdb_rl_attempted_completion_function_throw): Handle trackers that
8114         use a custom word point.
8115         (gdb_rl_attempted_completion_function): Restore
8116         rl_basic_quote_characters.
8117         * completer.h (class completion_tracker): Extend intro comment.
8118         (completion_tracker::set_quote_char)
8119         (completion_tracker::quote_char)
8120         (completion_tracker::set_use_custom_word_point)
8121         (completion_tracker::use_custom_word_point)
8122         (completion_tracker::custom_word_point)
8123         (completion_tracker::set_custom_word_point)
8124         (completion_tracker::advance_custom_word_point_by)
8125         (completion_tracker::completes_to_completion_word)
8126         (completion_tracker::discard_completions): New methods.
8127         (completion_tracker::m_quote_char)
8128         (completion_tracker::m_use_custom_word_point)
8129         (completion_tracker::m_custom_word_point): New fields.
8130         (advance_to_expression_complete_word_point): Declare.
8131         * f-lang.c (f_collect_symbol_completion_matches): Add
8132         complete_symbol_mode parameter.
8133         * language.h (struct language_defn)
8134         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8135         parameter.
8136         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
8137         (linespec_complete_function): New function.
8138         (linespec_lexer_lex_keyword): Adjust.
8139         * linespec.h (linespec_keywords, linespec_complete_function): New
8140         declarations.
8141         * location.c (find_end_quote): New function.
8142         (explicit_location_lex_one): Add explicit_completion_info
8143         parameter.  Save quoting info.  Don't throw if being called for
8144         completion.  Don't handle Ada operators here.
8145         (is_cp_operator, skip_op_false_positives, first_of)
8146         (explicit_location_lex_one_function): New function.
8147         (string_to_explicit_location): Replace 'dont_throw' parameter with
8148         an explicit_completion_info pointer parameter.  Handle it.  Don't
8149         use explicit_location_lex_one to lex function names.  Use
8150         explicit_location_lex_one_function instead.
8151         * location.h (struct explicit_completion_info): New.
8152         (string_to_explicit_location): Replace 'dont_throw' parameter with
8153         an explicit_completion_info pointer parameter.
8154         * symtab.c (default_collect_symbol_completion_matches_break_on):
8155         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
8156         (default_collect_symbol_completion_matches)
8157         (collect_symbol_completion_matches): Add complete_symbol_mode
8158         parameter.
8159         (collect_symbol_completion_matches_type): Pass down
8160         complete_symbol_mode::EXPRESSION.
8161         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8162         parameter.  Handle LINESPEC mode.
8163         * symtab.h (complete_symbol_mode): New.
8164         (default_collect_symbol_completion_matches_break_on)
8165         (default_collect_symbol_completion_matches)
8166         (collect_symbol_completion_matches)
8167         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8168         parameter.
8169
8170 2017-07-17  Pedro Alves  <palves@redhat.com>
8171
8172         * utils.c (enum class strncmp_iw_mode): New.
8173         (strcmp_iw): Rename to ...
8174         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
8175         parameters.  Handle them.
8176         (strncmp_iw): New.
8177         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8178         * utils.h (strncmp_iw): Declare.
8179         (strcmp_iw): Move describing comments here.
8180
8181 2017-07-17  Pedro Alves  <palves@redhat.com>
8182
8183         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8184         CP_OPERATOR_STR.
8185         * c-typeprint.c (is_type_conversion_operator): Use
8186         CP_OPERATOR_STR.
8187         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8188         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8189         CP_OPERATOR_LEN.
8190         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8191         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8192         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8193         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8194         CP_OPERATOR_STR.
8195         * location.c: Include "cp-support.h".
8196         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8197         CP_OPERATOR_STR.
8198         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8199         CP_OPERATOR_LEN.
8200
8201 2017-07-17  Pedro Alves  <palves@redhat.com>
8202
8203         * cli/cli-cmds.c (complete_command): Use a completion tracker
8204         along with completion_find_completion_word for handle_brkchars
8205         phase.
8206         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8207         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8208         (struct gdb_rl_completion_word_info): New.
8209         (gdb_rl_find_completion_word): New.
8210         (completion_find_completion_word): New.
8211         * completer.h (completion_find_completion_word): Declare.
8212
8213 2017-07-17  Pedro Alves  <palves@redhat.com>
8214
8215         * ada-lang.c (symbol_completion_match): Adjust comments.
8216         (symbol_completion_add): Replace vector parameter with
8217         completion_tracker parameter.  Use it.
8218         (ada_make_symbol_completion_list): Rename to...
8219         (ada_collect_symbol_completion_matches): ... this.  Add
8220         completion_tracker parameter and use it.
8221         (ada_language_defn): Adjust.
8222         * break-catch-syscall.c (catch_syscall_completer): Adjust
8223         prototype and work with completion_tracker instead of VEC.
8224         * breakpoint.c (condition_completer): Adjust prototype and work
8225         with completion_tracker instead of VEC.
8226         * c-lang.c (c_language_defn, cplus_language_defn)
8227         (asm_language_defn, minimal_language_defn): Adjust to renames.
8228         * cli/cli-cmds.c (complete_command): Rework using
8229         completion_tracker.  Catch exceptions when completing.
8230         * cli/cli-decode.c (integer_unlimited_completer)
8231         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8232         with completion_tracker instead of VEC.
8233         * command.h (struct completion_tracker): Forward declare.
8234         (completer_ftype, completer_handle_brkchars_ftype): Change
8235         types.
8236         (complete_on_cmdlist, complete_on_enum): Adjust.
8237         * completer.c: Include <algorithm>.
8238         (struct gdb_completer_state): New.
8239         (current_completion): New global.
8240         (readline_line_completion_function): Delete.
8241         (noop_completer, filename_completer)
8242         (filename_completer_handle_brkchars, complete_files_symbols)
8243         (linespec_location_completer): Adjust to work with a
8244         completion_tracker instead of a VEC.
8245         (string_or_empty): New.
8246         (collect_explicit_location_matches): Adjust to work with a
8247         completion_tracker instead of a VEC.
8248         (explicit_location_completer): Rename to ...
8249         (complete_explicit_location): ... this and adjust to work with a
8250         completion_tracker instead of a VEC.
8251         (location_completer): Adjust to work with a completion_tracker
8252         instead of a VEC.
8253         (add_struct_fields): Adjust to work with a completion_list instead
8254         of VEC.
8255         (expression_completer): Rename to ...
8256         (complete_expression): ... this and adjust to work with a
8257         completion_tracker instead of a VEC.  Use complete_files_symbols.
8258         (expression_completer): Reimplement on top of complete_expression.
8259         (symbol_completer): Adjust to work with a completion_tracker
8260         instead of a VEC.
8261         (enum complete_line_internal_reason): Add describing comments.
8262         (complete_line_internal_normal_command): Adjust to work with a
8263         completion_tracker instead of a VEC.
8264         (complete_line_internal): Rename to ...
8265         (complete_line_internal_1): ... this and adjust to work with a
8266         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
8267         handle_brkchars phase.
8268         (new_completion_tracker): Delete.
8269         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8270         complete_line_internal_1.
8271         (free_completion_tracker): Delete.
8272         (INITIAL_COMPLETION_HTAB_SIZE): New.
8273         (completion_tracker::completion_tracker)
8274         (completion_tracker::~completion_tracker): New.
8275         (maybe_add_completion): Delete.
8276         (completion_tracker::maybe_add_completion)
8277         (completion_tracker::add_completion)
8278         (completion_tracker::add_completions): New.
8279         (throw_max_completions_reached_error): Delete.
8280         (complete_line): Adjust to work with a completion_tracker instead
8281         of a VEC.  Don't create a completion_tracker_t or check for max
8282         completions here.
8283         (command_completer, command_completer_handle_brkchars)
8284         (signal_completer, reg_or_group_completer_1)
8285         (reg_or_group_completer, default_completer_handle_brkchars):
8286         Adjust to work with a completion_tracker.
8287         (gdb_completion_word_break_characters_throw): New.
8288         (gdb_completion_word_break_characters): Reimplement.
8289         (line_completion_function): Delete.
8290         (completion_tracker::recompute_lowest_common_denominator)
8291         (expand_preserving_ws)
8292         (completion_tracker::build_completion_result)
8293         (completion_result::completion_result)
8294         (completion_result::completion_result)
8295         (completion_result::~completion_result)
8296         (completion_result::completion_result)
8297         (completion_result::release_match_list, compare_cstrings)
8298         (completion_result::sort_match_list)
8299         (completion_result::reset_match_list)
8300         (gdb_rl_attempted_completion_function_throw)
8301         (gdb_rl_attempted_completion_function): New.
8302         * completer.h (completion_list, struct completion_result)
8303         (class completion_tracker): New.
8304         (complete_line): Add completion_tracker parameter.
8305         (readline_line_completion_function): Delete.
8306         (gdb_rl_attempted_completion_function): New.
8307         (noop_completer, filename_completer, expression_completer)
8308         (location_completer, symbol_completer, command_completer)
8309         (signal_completer, reg_or_group_completer): Update prototypes.
8310         (completion_tracker_t, new_completion_tracker)
8311         (make_cleanup_free_completion_tracker): Delete.
8312         (enum maybe_add_completion_enum): Delete.
8313         (maybe_add_completion): Delete.
8314         (throw_max_completions_reached_error): Delete.
8315         * corefile.c (complete_set_gnutarget): Adjust to work with a
8316         completion_tracker instead of a VEC.
8317         * cp-abi.c (cp_abi_completer): Adjust to work with a
8318         completion_tracker instead of a VEC.
8319         * d-lang.c (d_language_defn): Adjust.
8320         * disasm.c (disassembler_options_completer): Adjust to work with a
8321         completion_tracker instead of a VEC.
8322         * f-lang.c (f_make_symbol_completion_list): Rename to ...
8323         (f_collect_symbol_completion_matches): ... this.  Adjust to work
8324         with a completion_tracker instead of a VEC.
8325         (f_language_defn): Adjust.
8326         * go-lang.c (go_language_defn): Adjust.
8327         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8328         Adjust to work with a completion_tracker instead of a VEC.
8329         * infrun.c (handle_completer): Likewise.
8330         * interps.c (interpreter_completer): Likewise.
8331         * interps.h (interpreter_completer): Likewise.
8332         * language.c (unknown_language_defn, auto_language_defn)
8333         (local_language_defn): Adjust.
8334         * language.h (language_defn::la_make_symbol_completion_list):
8335         Rename to ...
8336         (language_defn::la_collect_symbol_completion_matches): ... this
8337         and adjust to work with a completion_tracker instead of a VEC.
8338         * m2-lang.c (m2_language_defn): Adjust.
8339         * objc-lang.c (objc_language_defn): Adjust.
8340         * opencl-lang.c (opencl_language_defn): Adjust.
8341         * p-lang.c (pascal_language_defn): Adjust.
8342         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8343         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8344         with a completion_tracker.
8345         * rust-lang.c (rust_language_defn): Adjust.
8346         * symtab.c (free_completion_list, do_free_completion_list)
8347         (return_val, completion_tracker): Delete.
8348         (completion_list_add_name, completion_list_add_symbol)
8349         (completion_list_add_msymbol, completion_list_objc_symbol)
8350         (completion_list_add_fields, add_symtab_completions): Add
8351         completion_tracker parameter and use it.
8352         (default_make_symbol_completion_list_break_on_1): Rename to...
8353         (default_collect_symbol_completion_matches_break_on): ... this.
8354         Add completion_tracker parameter and use it instead of allocating
8355         a completion tracker here.
8356         (default_make_symbol_completion_list_break_on): Delete old
8357         implementation.
8358         (default_make_symbol_completion_list): Delete.
8359         (default_collect_symbol_completion_matches): New.
8360         (make_symbol_completion_list): Delete.
8361         (collect_symbol_completion_matches): New.
8362         (make_symbol_completion_type): Rename to ...
8363         (collect_symbol_completion_matches_type): ... this.  Add
8364         completion_tracker parameter and use it instead of VEC.
8365         (make_file_symbol_completion_list_1): Rename to...
8366         (collect_file_symbol_completion_matches): ... this.  Add
8367         completion_tracker parameter and use it instead of VEC.
8368         (make_file_symbol_completion_list): Delete.
8369         (add_filename_to_list): Use completion_list instead of a VEC.
8370         (add_partial_filename_data::list): Now a completion_list.
8371         (make_source_files_completion_list): Work with a completion_list
8372         instead of a VEC.
8373         * symtab.h: Include "completer.h".
8374         (default_make_symbol_completion_list_break_on)
8375         (default_make_symbol_completion_list, make_symbol_completion_list)
8376         (make_symbol_completion_type, make_file_symbol_completion_list)
8377         (make_source_files_completion_list): Delete.
8378         (default_collect_symbol_completion_matches_break_on)
8379         (default_collect_symbol_completion_matches)
8380         (collect_symbol_completion_matches)
8381         (collect_symbol_completion_matches_type)
8382         (collect_file_symbol_completion_matches)
8383         (make_source_files_completion_list): New.
8384         * top.c (init_main): Don't install a rl_completion_entry_function
8385         hook.  Install a rl_attempted_completion_function hook instead.
8386         * tui/tui-layout.c (layout_completer): Adjust to work with a
8387         completion_tracker.
8388         * tui/tui-regs.c (tui_reggroup_completer):
8389         * tui/tui-win.c (window_name_completer, focus_completer)
8390         (winheight_completer): Adjust to work with a completion_tracker.
8391         * value.c: Include "completer.h".
8392         (complete_internalvar): Adjust to work with a completion_tracker.
8393         * value.h (complete_internalvar): Likewise.
8394
8395 2017-07-17  Pedro Alves  <palves@redhat.com>
8396
8397         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8398         renames.
8399         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8400         comments to completer_ftype's declaration.
8401         <completer_handle_brkchars>: Change type to
8402         completer_handle_brkchars_ftype.
8403         * command.h (completer_ftype): Add describing comment and give
8404         names to parameters.
8405         (completer_ftype_void): Rename to ...
8406         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
8407         (set_cmd_completer_handle_brkchars): Adjust.
8408         * completer.c (filename_completer_handle_brkchars): New function.
8409         (complete_line_internal_normal_command): New function, factored
8410         out from ...
8411         (complete_line_internal): ... here.
8412         (command_completer_handle_brkchars)
8413         (default_completer_handle_brkchars)
8414         (completer_handle_brkchars_func_for_completer): New functions.
8415         * completer.h (set_gdb_completion_word_break_characters): Delete
8416         declaration.
8417         (completer_handle_brkchars_func_for_completer): New declaration.
8418         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8419         completer_handle_brkchars_func_for_completer.
8420
8421 2017-07-17  Pedro Alves  <palves@redhat.com>
8422
8423         * completer.c (symbol_completer): New function, based on
8424         make_symbol_completion_list_fn.
8425         * completer.h (symbol_completer): New declaration.
8426         * guile/scm-cmd.c (cmdscm_completers): Adjust.
8427         * python/py-cmd.c (completers): Adjust.
8428         * symtab.c (make_symbol_completion_list_fn): Delete.
8429         * symtab.h (make_symbol_completion_list_fn): Delete.
8430         * cli/cli-decode.c (add_cmd): Adjust.
8431
8432 2017-07-17  Pedro Alves  <palves@redhat.com>
8433
8434         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8435         * dwarf2read.c: Include "filename-seen-cache.h".
8436         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8437         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8438         * filename-seen-cache.c: New file.
8439         * filename-seen-cache.h: New file.
8440         * symtab.c: Include "filename-seen-cache.h".
8441         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8442         (create_filename_seen_cache, clear_filename_seen_cache)
8443         (delete_filename_seen_cache, filename_seen): Delete, parts moved
8444         to filename-seen-cache.h/filename-seen-cache.c.
8445         (output_source_filename, sources_info)
8446         (maybe_add_partial_symtab_filename)
8447         (make_source_files_completion_list): Adjust to use
8448         filename_seen_cache.
8449
8450 2017-07-17  Pedro Alves  <palves@redhat.com>
8451
8452         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8453         fields.
8454         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8455         dwarf2_debug_sections*)): New.
8456         (dwarf2_per_objfile::dwarf2_per_objfile(const
8457         dwarf2_per_objfile&)): Declare as deleted.
8458         (dwarf2_per_objfile::operator=): Declare as deleted.
8459         (dwarf2_per_objfile::dwarf2_per_objfile)
8460         (dwarf2_per_objfile::~dwarf2_per_objfile)
8461         (dwarf2_per_objfile::free_cached_comp_units): New.
8462         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8463         ctor.  Call dwarf2_per_objfile's ctor manually.
8464         (dwarf2_locate_sections): Deleted/refactored as ...
8465         (dwarf2_per_objfile::locate_sections): ... this new method.
8466         (free_cached_comp_units): Defer to
8467         dwarf2_per_objfile::free_cached_comp_units.
8468         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8469
8470 2017-07-14  Tom Tromey  <tom@tromey.com>
8471
8472         PR rust/21764:
8473         * rust-exp.y (convert_ast_to_expression): Add "want_type"
8474         parameter.
8475         <UNOP_SIZEOF>: Split into separate case.
8476         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
8477
8478 2017-07-14  Tom Tromey  <tom@tromey.com>
8479
8480         PR rust/21763:
8481         * symtab.c (symbol_matches_domain): Add language_rust to special
8482         case.
8483         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8484         treat LOC_TYPEDEF symbols as variables.
8485
8486 2017-07-14  Pedro Alves  <palves@redhat.com>
8487
8488         * symtab.c (make_file_symbol_completion_list_1): Iterate over
8489         symtabs matching all symtabs with SRCFILE as file name instead of
8490         only considering the first hit, with lookup_symtab.
8491
8492 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8493
8494         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8495         operator_name parameters.
8496         (gen_expr): Update function call.
8497
8498 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8499
8500         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8501         parameter.
8502         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8503         Likewise.
8504         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8505         parameter, use agent_expr::gdbarch instead, update function
8506         calls.
8507         (locexpr_tracepoint_var_ref): Likewise.
8508         (loclist_tracepoint_var_ref): Likewise.
8509         * ax-gdb.c (gen_trace_static_fields): Likewise.
8510         (gen_traced_pop): Likewise.
8511         (gen_frame_args_address): Likewise.
8512         (gen_frame_locals_address): Likewise.
8513         (gen_var_ref): Likewise.
8514         (gen_struct_ref_recursive): Likewise.
8515         (gen_static_field): Likewise.
8516         (gen_maybe_namespace_elt): Likewise.
8517         (gen_expr): Likewise.
8518         (gen_trace_for_var): Likewise.
8519         (gen_trace_for_expr): Likewise.
8520         (gen_trace_for_return_address): Likewise.
8521
8522 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8523
8524         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8525         parameter.
8526         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8527
8528 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8529
8530         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8531         from ax, update calls.
8532         (gen_usual_arithmetic): Likewise.
8533         (gen_integral_promotions): Likewise.
8534         (gen_bitfield_ref): Likewise.
8535         (gen_primitive_field): Likewise.
8536         (gen_struct_ref_recursive): Likewise.
8537         (gen_struct_ref): Likewise.
8538         (gen_maybe_namespace_elt): Likewise.
8539         (gen_struct_elt_for_reference): Likewise.
8540         (gen_namespace_elt): Likewise.
8541         (gen_aggregate_elt_ref): Likewise.
8542         (gen_expr): Get gdbarch from ax, update calls.
8543         (gen_expr_binop_rest): Likewise.
8544
8545 2017-07-13  Pedro Alves  <palves@redhat.com>
8546
8547         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8548         as default tdesc.
8549         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8550         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8551         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8552         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
8553         tdep.
8554         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8555         Get final tdesc from the tdep.
8556         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8557         default tdesc.
8558         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8559         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8560         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8561         Use it as default tdesc.
8562         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8563         down to amd_init_abi.  No longer handle fallback tdesc here.
8564         * amd64-tdep.h (tdesc_x32): Declare.
8565         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8566         parameter.
8567         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8568         as default tdesc.
8569
8570 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8571
8572         * s390-linux-tdep.c (s390_process_record): Add support for
8573         instructions new in arch12.
8574
8575 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8576
8577         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8578         PT_GETFSBASE and PT_GETGSBASE.
8579         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8580         PT_SETGSBASE.
8581
8582 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8583
8584         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8585         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8586         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8587         those rules.
8588         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8589         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8590         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8591         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8592         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8593         * features/i386/amd64.xml: Add 64bit-segments.xml.
8594         * features/i386/amd64-avx-avx512.c: Regenerated.
8595         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8596         * features/i386/amd64-avx-mpx.c: Regenerated.
8597         * features/i386/amd64-avx.c: Regenerated.
8598         * features/i386/amd64-mpx.c: Regenerated.
8599         * features/i386/amd64.c: Regenerated.
8600         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8601         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8602         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8603         * regformats/i386/amd64-avx.dat: Regenerated.
8604         * regformats/i386/amd64-mpx.dat: Regenerated.
8605         * regformats/i386/amd64.dat: Regenerated.
8606
8607 2017-07-10  Yao Qi  <yao.qi@linaro.org>
8608
8609         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8610         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8611
8612 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
8613
8614         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8615         unsetenv.
8616         * gnulib/aclocal.m4: Regenerate.
8617         * gnulib/config.in: Regenerate.
8618         * gnulib/configure: Regenerate.
8619         * gnulib/import/Makefile.am: Regenerate.
8620         * gnulib/import/Makefile.in: Regenerate.
8621         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8622         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8623         * gnulib/import/m4/environ.m4: New file.
8624         * gnulib/import/m4/setenv.m4: New file.
8625         * gnulib/import/setenv.c: New file.
8626         * gnulib/import/unsetenv.c: New file.
8627
8628 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
8629
8630         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8631         address when op is DW_OP_addr.
8632
8633 2017-07-09  Tom Tromey  <tom@tromey.com>
8634
8635         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8636         check and apply to outer type.
8637
8638 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8639
8640         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8641         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8642         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8643         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8644
8645 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8646
8647         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8648
8649 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8650
8651         * corelow.c (get_core_siginfo): Remove.
8652         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8653         instead of get_core_siginfo.
8654         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8655         * gdbarch.h: Re-generate.
8656         * gdbarch.c: Re-generate.
8657         * linux-tdep.c (linux_core_xfer_siginfo): New.
8658         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8659
8660 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8661
8662         * corelow.c (thread_section_name): Move to ...
8663         * gdbcore.h (thread_section_name): ... here.
8664
8665 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8666
8667         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8668         (struct siginfo32): New.
8669         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8670         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8671         via ptrace(PT_LWPINFO).
8672
8673 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8674
8675         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8676         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8677         (fbsd_get_siginfo_type): New.
8678         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8679         (_initialize_fbsd_tdep): New.
8680
8681 2017-07-06  David Blaikie  <dblaikie@gmail.com>
8682
8683         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8684         a singular dwo_unit*) to support multiple CUs in the same way that
8685         multiple TUs are supported.
8686         (create_cus_hash_table): Replace create_dwo_cu with a function for
8687         parsing multiple CUs from a DWO file.
8688         (open_and_init_dwo_file): Use create_cus_hash_table rather than
8689         create_dwo_cu.
8690         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8691         htab_find, rather than comparing the signature to a singleton CU in
8692         the dwo_file.
8693
8694 2017-07-06  Pedro Alves  <palves@redhat.com>
8695
8696         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8697
8698 2017-07-04  Pedro Alves  <palves@redhat.com>
8699
8700         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8701         * gdbtypes.h (TYPE_STATIC): Delete.
8702         (struct fn_field) <is_public, is_abstract, is_static, is_final,
8703         is_synchronized, is_native>: Delete.
8704         <dummy>: Bump.
8705         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8706         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8707         (TYPE_FN_FIELD_ABSTRACT): Delete.
8708
8709 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
8710
8711         * buffer.h (buffer_finish): Fix spelling mistakes.
8712
8713 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
8714
8715         * .dir-locals.el: Automatically switch to C-style comments in
8716         versions of Emacs that support the feature.
8717
8718 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8719             Pedro Alves  <palves@redhat.com>
8720
8721         PR cli/21688
8722         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
8723         (process_next_line): New variable 'inline_cmd'.
8724         Adjust 'if' clauses for "python", "compile" and "guile" to use
8725         'command_name_equals' and check for '!inline_cmd'.
8726
8727 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8728
8729         PR cli/21688
8730         * cli/cli-script.c (command_name_equals_not_inline): New function.
8731         (process_next_line): Adjust 'if' clauses for "python", "compile"
8732         and "guile" to use command_name_equals_not_inline.
8733
8734 2017-06-29  Pedro Alves  <palves@redhat.com>
8735
8736         * completer.c (expression_completer): Call
8737         linespec_location_completer instead of location_completer.
8738
8739 2017-06-29  Pedro Alves  <palves@redhat.com>
8740
8741         * completer.c (expression_completer): Remove code that recomputes
8742         'text' from 'word'.
8743
8744 2017-06-29  Yao Qi  <yao.qi@linaro.org>
8745
8746         * regformats/regdat.sh: Generate code with
8747         "ifndef IN_PROCESS_AGENT".
8748
8749 2017-06-28  Pedro Alves  <palves@redhat.com>
8750
8751         * command.h: Include "common/scoped_restore.h".
8752
8753 2017-06-28  Yao Qi  <yao.qi@linaro.org>
8754
8755         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
8756         instead of obstack_grow.
8757
8758 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
8759
8760         PR gdb/21337
8761         * symfile.c (reread_symbols): Call objfiles_changed just before
8762         read_symbols.
8763
8764 2017-06-27  Pedro Alves  <palves@redhat.com>
8765
8766         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
8767         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
8768         (completion_list_add_symbol, completion_list_add_msymbol):
8769         ... these new functions.
8770         (add_symtab_completions)
8771         (default_make_symbol_completion_list_break_on_1): Adjust.
8772
8773 2017-06-27  Pedro Alves  <palves@redhat.com>
8774
8775         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
8776         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
8777         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
8778         dtor.
8779         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
8780         'storage_obstack' field an auto_obstack.  In-class initialize all
8781         non-bitfield fields.  Make minsyms_read bool.
8782         * symfile.c (read_symbols): Adjust.
8783
8784 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
8785
8786         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
8787         (gdbsim_store_register): Likewise.
8788
8789 2017-06-27  Pedro Alves  <palves@redhat.com>
8790
8791         * c-exp.y (name_obstack): Now an auto_obstack.
8792         (yylex): Use auto_obstack::clear.
8793         (c_parse): Use auto_obstack::clear instead of reinitializing and
8794         freeing the obstack.
8795         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
8796         * d-exp.y (name_obstack): Now an auto_obstack.
8797         (yylex): Use auto_obstack::clear.
8798         (d_parse): Use auto_obstack::clear instead of reinitializing and
8799         freeing the obstack.
8800         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
8801         auto_obstack.
8802         * dwarf2read.c (create_addrmap_from_index)
8803         (dwarf2_build_psymtabs_hard)
8804         (update_enumeration_type_from_children): Likewise.
8805         * gdb_obstack.h (auto_obstack): New type.
8806         * go-exp.y (name_obstack): Now an auto_obstack.
8807         (build_packaged_name): Use auto_obstack::clear.
8808         (go_parse): Use auto_obstack::clear instead of reinitializing and
8809         freeing the obstack.
8810         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
8811         auto_obstack.
8812         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
8813         * rust-exp.y (work_obstack): Now an auto_obstack.
8814         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
8815         reinitializing and freeing the obstack.
8816         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
8817         (host_char_to_target): Use auto_obstack.
8818         * utils.h (make_cleanup_obstack_free): Delete declaration.
8819         * valprint.c (generic_emit_char, generic_printstr): Use
8820         auto_obstack.
8821
8822 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
8823
8824         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
8825         thread.
8826         (darwin_init_thread_list): Don't update dummy thread.
8827         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
8828
8829 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8830
8831         * record-full.c (netorder16): Remove.
8832
8833 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8834
8835         * common/diagnostics.h: Define macros for GCC.
8836         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
8837         * common/vec.h: Include diagnostics.h.
8838         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
8839         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
8840         warning.
8841
8842 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8843
8844         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
8845         New macro.
8846         * ada-lex.l: Ignore deprecated register warnings.
8847
8848 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8849
8850         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8851         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8852
8853 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8854
8855         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
8856         its own line.
8857
8858 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8859
8860         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
8861
8862 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
8863
8864         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
8865         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
8866         (xtensa_register_read_masked): Likewise.
8867
8868 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
8869
8870         * common/environ.c (gdb_environ::unset): Update comment.
8871
8872 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8873
8874         * python/py-unwind.c (pyuw_sniffer): Allocate space for
8875         registers.
8876
8877 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8878
8879         * record-full.c (record_full_exec_insn): Use byte_vector.
8880
8881 2017-06-22  Yao Qi  <yao.qi@linaro.org>
8882
8883         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
8884         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8885
8886 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8887
8888         * remote.c (cached_reg): Move from here...
8889         * regcache.h (cached_reg): ...to here.
8890         * python/py-unwind.c (struct reg_info): Remove.
8891         (cached_frame_info): Use cached_reg_t.
8892         (pyuw_prev_register): Likewise.
8893         (pyuw_sniffer): Use cached_reg_t and allocate registers.
8894         (pyuw_dealloc_cache): Free all registers.
8895
8896 2017-06-22  Pedro Alves  <palves@redhat.com>
8897             Simon Marchi  <simon.marchi@ericsson.com>
8898
8899         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
8900         warning.
8901         * common/diagnostics.h: New file.
8902
8903 2017-06-22  Pedro Alves  <palves@redhat.com>
8904
8905         * common/agent.h: Add include guards.
8906
8907 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
8908
8909         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
8910         talk about addressable units instead of bytes.
8911
8912 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8913
8914         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
8915         of '::const_iterator'.
8916
8917 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8918
8919         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8920         'unittests/environ-selftests.c'.
8921         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
8922         * charset.c (find_charset_names): Declare object 'iconv_env'.
8923         Update code to use 'iconv_env' object.  Remove call to
8924         'free_environ'.
8925         * common/environ.c: Include <utility>.
8926         (make_environ): Delete function.
8927         (free_environ): Delete function.
8928         (gdb_environ::clear): New function.
8929         (gdb_environ::operator=): New function.
8930         (gdb_environ::get): Likewise.
8931         (environ_vector): Delete function.
8932         (set_in_environ): Delete function.
8933         (gdb_environ::set): New function.
8934         (unset_in_environ): Delete function.
8935         (gdb_environ::unset): New function.
8936         (gdb_environ::envp): Likewise.
8937         * common/environ.h: Include <vector>.
8938         (struct gdb_environ): Delete; transform into...
8939         (class gdb_environ): ... this class.
8940         (free_environ): Delete prototype.
8941         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
8942         environ_vector): Likewise.
8943         * infcmd.c (run_command_1): Update code to call
8944         'envp' from 'gdb_environ' class.
8945         (environment_info): Update code to call methods from 'gdb_environ'
8946         class.
8947         (unset_environment_command): Likewise.
8948         (path_info): Likewise.
8949         (path_command): Likewise.
8950         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
8951         (inferior::inferior): Initialize 'environment' using the host's
8952         information.
8953         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
8954         Include "environ.h".
8955         (class inferior) <environment>: Change type from 'struct
8956         gdb_environ' to 'gdb_environ'.
8957         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
8958         methods from 'gdb_environ' class.
8959         * solib.c (solib_find_1): Likewise
8960         * unittests/environ-selftests.c: New file.
8961
8962 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8963
8964         * features/i386/i386-linux.xml: Exchange the order of including
8965         32bit-linux.xml and 32bit-sse.xml.
8966         * features/i386/i386-linux.c: Regenerated.
8967
8968 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8969
8970         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
8971         Delete copy ctor and assignment operator.
8972         (tdesc_type): Likewise.
8973         (tdesc_feature): Likewise.
8974         (tdesc_free_reg): Remove.
8975         (tdesc_create_reg): Use new.
8976         (tdesc_free_type): Remove.
8977         (tdesc_create_vector): Use new.
8978         (tdesc_create_union): Likewise.
8979         (tdesc_create_flags): Likewise.
8980         (tdesc_create_enum): Likewise.
8981         (tdesc_free_feature): Delete.
8982         (free_target_description): Use delete.
8983
8984 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
8985
8986         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
8987         registers.
8988
8989 2017-06-19  Pedro Alves  <palves@redhat.com>
8990
8991         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
8992         after gdb::unlinker.
8993
8994 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
8995
8996         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
8997         gdb_environ to access an environment variable.
8998
8999 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
9000
9001         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9002         gdb_byte*.
9003
9004 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9005
9006         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9007
9008 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9009
9010         * configure: Re-generate.
9011         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9012
9013 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9014
9015         * configure: Re-generate.
9016         * warning.m4: Pass -Werror to compiler when checking for
9017         supported warning flags.
9018
9019 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9020
9021         * Makefile.in (COMPILE.pre): Add "-x c++".
9022
9023 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
9024             Pedro Alves  <palves@redhat.com>
9025             Yao Qi  <yao.qi@linaro.org>
9026
9027         * defs.h (RequireLongest): New.
9028         (extract_integer): Declare function template.
9029         (extract_signed_integer): Remove the declaration, but define it
9030         static inline.
9031         (extract_unsigned_integer): Likewise.
9032         (store_integer): Declare function template.
9033         (store_signed_integer): Remove the declaration, but define it
9034         static inline.
9035         (store_unsigned_integer): Likewise.
9036         * findvar.c (extract_integer): New function template.
9037         (extract_signed_integer): Remove.
9038         (extract_unsigned_integer): Remove.
9039         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9040         instantiations.
9041         (store_integer): New function template.
9042         (store_signed_integer): Remove.
9043         (store_unsigned_integer): Remove.
9044         (store_integer): Explicit instantiations.
9045         * regcache.c (regcache_raw_read_signed): Update.
9046         (regcache::raw_read): New function.
9047         (regcache::raw_read_signed): Remove.
9048         (regcache::raw_read_unsigned): Remove.
9049         (regcache_raw_read_unsigned): Update.
9050         (regcache_raw_write_unsigned): Update.
9051         (regcache::raw_write_signed): Remove.
9052         (regcache::raw_write): New function.
9053         (regcache_cooked_read_signed): Update.
9054         (regcache::raw_write_unsigned): Remove.
9055         (regcache::cooked_read_signed): Remove.
9056         (regcache_cooked_read_unsigned): Update.
9057         (regcache::cooked_read_unsigned): Remove.
9058         (regcache_cooked_write_signed): Update.
9059         (regcache_cooked_write_unsigned): Update.
9060         * regcache.h (regcache) <raw_read_signed>: Remove.
9061         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9062         <raw_read, raw_write>: New.
9063         <cooked_read_signed, cooked_write_signed>: Remove.
9064         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9065         <cooked_read, cooked_write>: New.
9066         * sh64-tdep.c (sh64_pseudo_register_read): Update.
9067         (sh64_pseudo_register_write): Update.
9068
9069 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
9070
9071         * arc-tdep.c (arc_disassembler_options): New variable.
9072         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9073         of default_print_insn.
9074         (arc_delayed_print_insn): Set info->section when needed,
9075         use default_print_insn to retrieve a disassembler.
9076
9077 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
9078
9079         PR gdb/21574
9080         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9081         to mention $SHELL and startup-with-shell.
9082
9083 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
9084
9085         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9086
9087 2017-06-14  Yao Qi  <yao.qi@linaro.org>
9088
9089         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9090         default_print_insn instead of print_insn_aarch64.
9091         * arm-tdep.c (gdb_print_insn_arm): Call
9092         default_print_insn instead of print_insn_big_arm
9093         and print_insn_little_arm.
9094         * i386-tdep.c (i386_print_insn): Call default_print_insn
9095         instead of print_insn_i386.
9096         * ia64-tdep.c (ia64_print_insn): Call
9097         default_print_insn instead of print_insn_ia64.
9098         * mips-tdep.c (gdb_print_insn_mips): Call
9099         default_print_insn instead of print_insn_big_mips
9100         and print_insn_little_mips.
9101         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9102         instead of print_insn_spu.
9103
9104 2017-06-14  Pedro Alves  <palves@redhat.com>
9105
9106         * ada-lang.c: Include "common/byte-vector.h".
9107         (ada_value_primitive_packed_val): Use gdb::byte_vector.
9108         * charset.c (wchar_iterator::iterate): Resize the vector instead
9109         of reserving it.
9110         * common/byte-vector.h: Include "common/def-vector.h".
9111         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9112         * cli/cli-dump.c: Include "common/byte-vector.h".
9113         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9114         * common/byte-vector.h: New file.
9115         * common/def-vector.h: New file.
9116         * common/default-init-alloc.h: New file.
9117         * dwarf2loc.c: Include "common/byte-vector.h".
9118         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9119         instead of reserving it.
9120         * dwarf2read.c: Include "common/byte-vector.h".
9121         (data_buf::m_vec): Now a gdb::byte_vector.
9122         * gdb_regex.c: Include "common/def-vector.h".
9123         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9124         * mi/mi-main.c: Include "common/byte-vector.h".
9125         (mi_cmd_data_read_memory): Use gdb::byte_vector.
9126         * printcmd.c: Include "common/byte-vector.h".
9127         (print_scalar_formatted): Use gdb::byte_vector.
9128         * valprint.c: Include "common/byte-vector.h".
9129         (maybe_negate_by_bytes, print_decimal_chars): Use
9130         gdb::byte_vector.
9131
9132 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9133
9134         * darwin-nat.c: Include "nat/fork-inferior.h".
9135
9136 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9137
9138         * configure.nat: Factor out Darwin bits that are not
9139         architecture-specific.  Add fork-inferior.o.
9140
9141 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9142
9143         * configure.nat: Factor out AIX bits that are not
9144         architecture-specific.  Add fork-inferior.o.
9145
9146 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9147
9148         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
9149         (read_pieced_value, write_pieced_value): ...here.  Reduce to
9150         wrappers that just call rw_pieced_value.
9151
9152 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9153
9154         * dwarf2loc.c (write_pieced_value): When writing the data for a
9155         memory piece, use write_memory_with_notification instead of
9156         write_memory.
9157
9158 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9159
9160         * valops.c (read_value_memory): Change embedded_offset to
9161         represent a bit offset instead of a byte offset.
9162         * value.h (read_value_memory): Adjust comment.
9163
9164 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9165
9166         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9167         dest_offset_bits and source_offset_bits.
9168         (write_pieced_value): Likewise.
9169
9170 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9171
9172         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9173         given by DW_OP_bit_piece.
9174         (write_pieced_value): Likewise.
9175
9176 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9177
9178         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9179         some other preparations to the places where sufficient information
9180         is available.
9181         (write_pieced_value): Likewise.
9182
9183 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9184
9185         * dwarf2loc.c (bits_to_bytes): New function.
9186         (read_pieced_value): Fix offset calculations for register pieces
9187         on big-endian targets.
9188         (write_pieced_value): Likewise.
9189
9190 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9191
9192         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9193         (write_pieced_value): Likewise.
9194
9195 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9196
9197         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9198         transfer the source value's least significant bits, instead of its
9199         lowest-addressed ones.  Rename type_len to max_offset.
9200         (read_pieced_value): Mirror above changes to write_pieced_value as
9201         applicable.
9202
9203 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9204
9205         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9206         truncate full bytes from dest_offset_bits before using it as an
9207         offset into the buffer.
9208
9209 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9210
9211         * dwarf2loc.c (write_pieced_value): Include transfer size in
9212         byte-wise check.
9213
9214 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9215
9216         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9217         calculation of this_size.
9218
9219 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9220
9221         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9222         when targeting a bit-field.
9223         (write_pieced_value): Likewise.
9224
9225 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9226
9227         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9228         (allocate_piece_closure): Drop addr_size parameter.
9229         (dwarf2_evaluate_loc_desc_full): Adjust call to
9230         allocate_piece_closure.
9231
9232 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9233
9234         PR gdb/21226
9235         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9236         the LSB end, independent of endianness.
9237
9238 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9239
9240         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9241         size capping.
9242
9243 2017-06-13  Yao Qi  <yao.qi@linaro.org>
9244
9245         * mips-linux-nat.c: Move include features/mips*-linux.c to
9246         mips-linux-tdep.c.
9247         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9248         to mips-linux-tdep.c.
9249         * mips-linux-tdep.c: Include features/mips*-linux.c
9250         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9251         functions.
9252         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9253         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9254         (tdesc_mips64_dsp_linux): Declare.
9255
9256 2017-06-12  Tom Tromey  <tom@tromey.com>
9257
9258         * valprint.h (val_print_type_code_int): Remove.
9259         * valprint.c (generic_val_print_int): Always call
9260         val_print_scalar_formatted.
9261         (val_print_type_code_int): Remove.
9262         * printcmd.c (print_scalar_formatted): Handle options->format==0.
9263         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9264         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9265         * ada-valprint.c (ada_val_print_num): Use
9266         val_print_scalar_formatted.
9267
9268 2017-06-12  Tom Tromey  <tom@tromey.com>
9269
9270         * printcmd.c (print_scalar_formatted): Unify the two switches.
9271         Don't convert scalars to LONGEST.
9272
9273 2017-06-12  Tom Tromey  <tom@tromey.com>
9274
9275         PR exp/16225:
9276         * valprint.h (print_decimal_chars): Update.
9277         * valprint.c (maybe_negate_by_bytes): New function.
9278         (print_decimal_chars): Add "is_signed" argument.
9279         * printcmd.c (print_scalar_formatted): Update.
9280
9281 2017-06-12  Tom Tromey  <tom@tromey.com>
9282
9283         PR exp/16225:
9284         * valprint.h (print_binary_chars, print_hex_chars): Update.
9285         * valprint.c (val_print_type_code_int): Update.
9286         (print_binary_chars): Add "zero_pad" argument.
9287         (emit_octal_digit): New function.
9288         (print_octal_chars): Don't zero-pad.
9289         (print_decimal_chars): Likewise.
9290         (print_hex_chars): Add "zero_pad" argument.
9291         * sh64-tdep.c (sh64_do_fp_register): Update.
9292         * regcache.c (regcache::dump): Update.
9293         * printcmd.c (print_scalar_formatted): Update.
9294         * infcmd.c (default_print_one_register_info): Update.
9295
9296 2017-06-12  Pedro Alves  <palves@redhat.com>
9297             Alan Hayward  <alan.hayward@arm.com>
9298
9299         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9300         (mips_eabi_push_dummy_call): Rename local 'regsize' to
9301         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
9302         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9303         Assert that abi_regsize bytes fit in 'ref_valbuf'.
9304
9305 2017-06-12  Pedro Alves  <palves@redhat.com>
9306
9307         * dwarf2read.c (mapped_symtab::data): Now a vector of
9308         symtab_index_entry instead of vector of
9309         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
9310         whether an element's name is NULL instead of checking whether the
9311         element itself is NULL.
9312         (find_slot): Change return type.  Adjust.
9313         (hash_expand, , add_index_entry, uniquify_cu_indices)
9314         (write_hash_table): Adjust.
9315
9316 2017-06-12  Pedro Alves  <palves@redhat.com>
9317
9318         * dwarf2read.c (recursively_count_psymbols): New function.
9319         (write_psymtabs_to_index): Call it to compute number of psyms and
9320         pass estimate size of psyms_seen to unordered_set's ctor.
9321
9322 2017-06-12  Pedro Alves  <palves@redhat.com>
9323
9324         * dwarf2read.c (write_hash_table): Check if key already exists
9325         before emplacing.
9326
9327 2017-06-12  Pedro Alves  <palves@redhat.com>
9328
9329         * dwarf2read.c (data_buf::append_space): Rename to...
9330         (data_buf::grow): ... this, and make private.  Adjust all callers.
9331         (data_buf::append_uint): New method.
9332         (add_address_entry, write_one_signatured_type)
9333         (write_psymtabs_to_index): Use it.
9334
9335 2017-06-12  Pedro Alves  <palves@redhat.com>
9336
9337         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9338         (file_write (FILE *, const std::vector<Elem>&)): Delete.
9339         (data_buf::file_write): Call ::fwrite directly.
9340
9341 2017-06-12  Pedro Alves  <palves@redhat.com>
9342
9343         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9344         std::vector::erase.
9345
9346 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9347
9348         Code cleanup: C++ify .gdb_index producer.
9349         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9350         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9351         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9352         (create_strtab, add_string): Remove.
9353         (file_write, data_buf): New.
9354         (struct symtab_index_entry): Use std::vector for cu_indices.
9355         (struct mapped_symtab): Use std::vector for data.
9356         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9357         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9358         Remove.
9359         (find_slot): Change return type.  Update it to the new data structures.
9360         (hash_expand, add_index_entry): Update it to the new data structures.
9361         (offset_type_compare): Remove.
9362         (uniquify_cu_indices): Update it to the new data structures.
9363         (c_str_view, c_str_view_hasher, vector_hasher): New.
9364         (add_indices_to_cpool): Remove.
9365         (write_hash_table): Update it to the new data structures.
9366         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9367         (eq_psymtab_cu_index): Remove.
9368         (psym_index_map): New typedef.
9369         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9370         reference and std::unordered_map for cu_index_htab.
9371         (add_address_entry, add_address_entry_worker, write_address_map)
9372         (write_psymbols): Update it to the new data structures.
9373         (write_obstack): Remove.
9374         (struct signatured_type_index_data): Change types_list to a data_buf
9375         reference and psyms_seen to a std::unordered_set reference.
9376         (write_one_signatured_type, recursively_write_psymbols)
9377         (write_psymtabs_to_index): Update it to the new data structures.
9378
9379 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
9380
9381         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9382         separate-debug-file commands.
9383         * symfile.h (separate_debug_file_debug): New global.
9384         * symfile.c (separate_debug_file_debug): New global.
9385         (separate_debug_file_exists, find_separate_debug_file): Add
9386         debug output.
9387         (_initialize_symfile): Add "set debug separate-debug-file"
9388         command.
9389         * build-id.c (build_id_to_debug_bfd,
9390         find_separate_debug_file_by_buildid): Add debug output.
9391
9392 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
9393
9394         * gdbarch.sh (displaced_step_free_closure): Remove.
9395         * gdbarch.h, gdbarch.c: Re-generate.
9396         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9397         displaced_step_free_closure.
9398         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9399         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9400         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9401         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9402         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9403         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9404         * arch-utils.h (simple_displaced_step_free_closure): Remove.
9405         * arch-utils.c (simple_displaced_step_free_closure): Remove.
9406         * infrun.c (displaced_step_clear): Call xfree instead of
9407         gdbarch_displaced_step_free_closure.
9408
9409 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
9410
9411         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9412         NULL".
9413
9414 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
9415
9416         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9417         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9418         (mn10300_push_dummy_call): Likewise.
9419
9420 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9421
9422         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9423
9424 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9425
9426         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9427
9428 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9429
9430         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9431         able to start inferiors using a shell.
9432         (New remote packets): Announce new packet "QStartupWithShell".
9433         * remote.c: Add PACKET_QStartupWithShell.
9434         (extended_remote_create_inferior): Handle new
9435         PACKET_QStartupWithShell.
9436         (remote_protocol_features) <QStartupWithShell>: New entry for
9437         PACKET_QStartupWithShell.
9438         (_initialize_remote): Call "add_packet_config_cmd" for
9439         QStartupShell.
9440
9441 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9442             Pedro Alves  <palves@redhat.com>
9443
9444         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9445         and "nat/fork-inferior.h".
9446         * common/common-inferior.h: New file, with contents from
9447         "gdb/inferior.h".
9448         * commom/common-utils.c: Include "common-utils.h".
9449         (stringify_argv): New function.
9450         * common/common-utils.h (stringify_argv): New prototype.
9451         * configure.nat: Add "fork-inferior.o" as a dependency for
9452         "*linux*", "fbsd*" and "nbsd*" hosts.
9453         * corefile.c (get_exec_file): Update comment.
9454         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9455         instead of "startup_inferior".
9456         (darwin_create_inferior): Call "add_thread_silent" after
9457         "fork_inferior".
9458         * fork-child.c: Cleanup unnecessary includes.
9459         (SHELL_FILE): Move to "common/common-fork-child.c".
9460         (environ): Likewise.
9461         (exec_wrapper): Initialize.
9462         (get_exec_wrapper): New function.
9463         (breakup_args): Move to "common/common-fork-child.c"; rename to
9464         "breakup_args_for_exec".
9465         (escape_bang_in_quoted_argument): Move to
9466         "common/common-fork-child.c".
9467         (saved_ui): New variable.
9468         (prefork_hook): New function.
9469         (postfork_hook): Likewise.
9470         (postfork_child_hook): Likewise.
9471         (gdb_startup_inferior): Likewise.
9472         (fork_inferior): Move to "common/common-fork-child.c".  Update
9473         function to support gdbserver.
9474         (startup_inferior): Likewise.
9475         * gdbcore.h (get_exec_file): Remove declaration.
9476         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9477         instead of "startup_inferior".  Call "add_thread_silent" after
9478         "fork_inferior".
9479         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9480         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9481         instead of "startup_inferior".  Call "add_thread_silent" after
9482         "fork_inferior".
9483         * inferior.h: Include "common-inferior.h".
9484         (trace_start_error): Move to "common/common-utils.h".
9485         (trace_start_error_with_name): Likewise.
9486         (fork_inferior): Move prototype to "nat/fork-inferior.h".
9487         (startup_inferior): Likewise.
9488         (gdb_startup_inferior): New prototype.
9489         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9490         * nat/fork-inferior.h: New file.
9491         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9492         instead of "startup_inferior".  Call "add_thread_silent" after
9493         "fork_inferior".
9494         * target.h (target_terminal_init): Move prototype to
9495         "target/target.h".
9496         (target_terminal_inferior): Likewise.
9497         (target_terminal_ours): Likewise.
9498         * target/target.h (target_terminal_init): New prototype, moved
9499         from "target.h".
9500         (target_terminal_inferior): Likewise.
9501         (target_terminal_ours): Likewise.
9502         * utils.c (gdb_flush_out_err): New function.
9503
9504 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9505
9506         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9507         * common/common-gdbthread.h: New file, with parts from
9508         "gdb/gdbthread.h".
9509         * gdbthread.h: Include "common-gdbthread.h".
9510         (switch_to_thread): Moved to "common/common-gdbthread.h".
9511
9512 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9513
9514         * Makefile.in (SFILES): Add "common/job-control.c".
9515         (HFILES_NO_SRCDIR): Add "common/job-control.h".
9516         (COMMON_OBS): Add "job-control.o".
9517         * common/job-control.c: New file, with contents from
9518         "gdb/inflow.c".
9519         * common/job-control.h: New file, with contents from "terminal.h".
9520         * fork-child.c: Include "job-control.h".
9521         * inflow.c: Include "job-control.h".
9522         (gdb_setpgid): Move to "common/common-inflow.c".
9523         (_initialize_inflow): Move setting of "job_control" to
9524         "handle_job_control".
9525         * terminal.h (job_control): Moved to "common/common-terminal.h".
9526         (gdb_setpgid): Likewise.
9527         * top.c: Include "job_control.h".
9528         * utils.c: Likewise.
9529         (job_control): Moved to "job-control.c".
9530
9531 2017-06-07  Pedro Alves  <palves@redhat.com>
9532
9533         * Makefile.in (SFILES): Add gdb_regex.c.
9534         (COMMON_OBS): Add gdb_regex.o.
9535         * ada-lang.c (ada_add_standard_exceptions)
9536         (ada_add_exceptions_from_frame, name_matches_regex)
9537         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9538         parameter type to compiled_regex.  Adjust.
9539         (ada_exceptions_list): Use compiled_regex.
9540         * break-catch-throw.c (exception_catchpoint::pattern): Now a
9541         std::unique_ptr<compiled_regex>.
9542         (exception_catchpoint::~exception_catchpoint): Remove regfree
9543         call.
9544         (check_status_exception_catchpoint): Adjust to use compiled_regex.
9545         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9546         * breakpoint.c (solib_catchpoint::compiled): Now a
9547         std::unique_ptr<compiled_regex>.
9548         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9549         (check_status_catch_solib): Adjust to use compiled_regex.
9550         (add_solib_catchpoint): Adjust to use compiled_regex.
9551         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9552         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9553         compiled_regex reference.  Adjust to use it.
9554         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9555         declaration.  Include "gdb_regex.h".
9556         (apropos_cmd): Change regex parameter to compiled_regex reference.
9557         * gdb_regex.c: New file.
9558         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9559         declarations.
9560         (class compiled_regex): New.
9561         * linux-tdep.c: Include "common/gdb_optional.h".
9562         (struct mapping_regexes): New, factored out from
9563         mapping_is_anonymous_p, and adjusted to use compiled_regex.
9564         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9565         gdb::optional and remove cleanups.  Adjust to compiled_regex.
9566         * probe.c: Include "common/gdb_optional.h".
9567         (collect_probes): Use compiled_regex and gdb::optional and remove
9568         cleanups.
9569         * skip.c: Include "common/gdb_optional.h".
9570         (skiplist_entry::compiled_function_regexp): Now a
9571         gdb::optional<compiled_regex>.
9572         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9573         (free_skiplist_entry): Remove regfree call.
9574         (compile_skip_regexp, skip_rfunction_p): Adjust to use
9575         compiled_regex and gdb::optional.
9576         * symtab.c: Include "common/gdb_optional.h".
9577         (search_symbols): Use compiled_regex and gdb::optional.
9578         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9579         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
9580         to gdb_regex.c.
9581
9582 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9583
9584         * regcache.c (regcache::save): Avoid buffer use.
9585         (regcache::dump): Likewise.
9586
9587 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9588
9589         * sh-tdep.c (sh_pseudo_register_read): Remove
9590         MAX_REGISTER_SIZE.
9591         (sh_pseudo_register_write): Likewise.
9592         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9593         (sh64_pseudo_register_write): Likewise
9594
9595 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9596
9597         * aarch64-tdep.c (aarch64_store_return_value): Use
9598         V_REGISTER_SIZE.
9599         (aarch64_pseudo_read_value): Likewise.
9600         (aarch64_pseudo_write): Likewise.
9601
9602 2017-06-06  Yao Qi  <yao.qi@linaro.org>
9603
9604         * regformats/regdef.h (set_register_cache): Remove the
9605         declaration.
9606
9607 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
9608
9609         * frame.c (frame_unwind_register_signed): Use
9610         frame_unwind_register_value.
9611
9612 2017-06-06  Pedro Alves  <palves@redhat.com>
9613
9614         PR breakpoints/21553
9615         * breakpoint.c (create_breakpoints_sal_default)
9616         (init_breakpoint_sal, create_breakpoint_sal): Use
9617         gdb::unique_xmalloc_ptr for string parameters.
9618         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9619         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
9620         (base_breakpoint_create_breakpoints_sal)
9621         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9622         (strace_marker_create_breakpoints_sal)
9623         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9624         string parameters.
9625         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9626         gdb::unique_xmalloc_ptr for string parameters.
9627         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9628         parameters.
9629
9630 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9631
9632         * alpha-tdep.c (alpha_register_to_value): Use
9633         get_frame_register_value.
9634         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9635
9636 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9637
9638         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9639         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9640         (ia64_value_to_register): Likewise.
9641         (ia64_extract_return_value): Likewise.
9642         (ia64_store_return_value): Likewise.
9643         (ia64_push_dummy_call): Likewise.
9644
9645 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
9646
9647         GDB 8.0 released.
9648
9649 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
9650
9651         * x86-linux-nat.c (struct arch_lwp_info): Remove.
9652
9653 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
9654
9655         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9656         parameter.
9657         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9658
9659 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
9660
9661         * event-loop.c (poll_timers): Unallocate timer using delete
9662         instead of xfree.
9663
9664 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9665
9666         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9667         (struct breakpoint) <~breakpoint>: New.
9668         (struct watchpoint): Inherit from breakpoint.
9669         <~watchpoint>: New.
9670         <base>: Remove.
9671         (struct tracepoint): Inherit from breakpoint.
9672         <base>: Remove.
9673         * breakpoint.c (longjmp_breakpoint_ops): Remove.
9674         (struct longjmp_breakpoint): Inherit from breakpoint.
9675         <~longjmp_breakpoint>: New.
9676         <base>: Remove.
9677         (new_breakpoint_from_type): Remove casts.
9678         (watchpoint_in_thread_scope): Remove reference to base field.
9679         (watchpoint_del_at_next_stop): Likewise.
9680         (update_watchpoint): Likewise.
9681         (watchpoint_check): Likewise.
9682         (bpstat_check_watchpoint): Likewise.
9683         (set_longjmp_breakpoint): Likewise.
9684         (struct fork_catchpoint): Inherit from breakpoint.
9685         <base>: Remove.
9686         (struct solib_catchpoint): Inherit from breakpoint.
9687         <~solib_catchpoint>: New.
9688         <base>: Remove.
9689         (dtor_catch_solib): Change to ...
9690         (solib_catchpoint::~solib_catchpoint): ... this.
9691         (breakpoint_hit_catch_solib): Remove reference to base field.
9692         (add_solib_catchpoint): Likewise.
9693         (create_fork_vfork_event_catchpoint): Likewise.
9694         (struct exec_catchpoint): Inherit from breakpoint.
9695         <~exec_catchpoint>: New.
9696         <base>: Remove.
9697         (dtor_catch_exec): Change to ...
9698         (exec_catchpoint::~exec_catchpoint): ... this.
9699         (dtor_watchpoint): Change to ...
9700         (watchpoint::~watchpoint): ... this.
9701         (watch_command_1): Remove reference to base field.
9702         (catch_exec_command_1): Likewise.
9703         (base_breakpoint_dtor): Change to ...
9704         (breakpoint::~breakpoint): ... this.
9705         (base_breakpoint_ops): Remove dtor field value.
9706         (longjmp_bkpt_dtor): Change to ...
9707         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9708         (strace_marker_create_breakpoints_sal): Remove reference to base
9709         field.
9710         (delete_breakpoint): Don't manually call breakpoint destructor.
9711         (create_tracepoint_from_upload): Remove reference to base field.
9712         (trace_pass_set_count): Likewise.
9713         (initialize_breakpoint_ops): Don't initialize
9714         momentary_breakpoint_ops, don't set dtors.
9715         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9716         <~ada_catchpoint>: New.
9717         <base>: Remove.
9718         (create_excep_cond_exprs): Remove reference to base field.
9719         (dtor_exception): Change to ...
9720         (ada_catchpoint::~ada_catchpoint): ... this.
9721         (dtor_catch_exception): Remove.
9722         (dtor_catch_exception_unhandled): Remove.
9723         (dtor_catch_assert): Remove.
9724         (create_ada_exception_catchpoint): Remove reference to base
9725         field.
9726         (initialize_ada_catchpoint_ops): Don't set dtors.
9727         * break-catch-sig.c (struct signal_catchpoint): Inherit from
9728         breakpoint.
9729         <~signal_catchpoint>: New.
9730         <base>: Remove.
9731         (signal_catchpoint_dtor): Change to ...
9732         (signal_catchpoint::~signal_catchpoint): ... this.
9733         (create_signal_catchpoint): Remove reference to base field.
9734         (initialize_signal_catchpoint_ops): Don't set dtor.
9735         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
9736         from breakpoint.
9737         <~syscall_catchpoint>: New.
9738         <base>: Remove.
9739         (dtor_catch_syscall): Change to ...
9740         (syscall_catchpoint::~syscall_catchpoint): ... this.
9741         (create_syscall_event_catchpoint): Remove reference to base
9742         field.
9743         (initialize_syscall_catchpoint_ops): Don't set dtor.
9744         * break-catch-throw.c (struct exception_catchpoint): Inherit
9745         from breakpoint.
9746         <~exception_catchpoint>: New.
9747         <base>: Remove.
9748         (dtor_exception_catchpoint): Change to ...
9749         (exception_catchpoint::~exception_catchpoint): ... this.
9750         (handle_gnu_v3_exceptions): Remove reference to base field.
9751         (initialize_throw_catchpoint_ops): Don't set dtor.
9752         * ctf.c (ctf_get_traceframe_address): Remove reference to base
9753         field.
9754         * remote.c (remote_get_tracepoint_status): Likewise.
9755         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
9756         * tracefile.c (tracefile_fetch_registers): Likewise.
9757         * tracepoint.c (actions_command): Likewise.
9758         (validate_actionline): Likewise.
9759         (tfind_1): Likewise.
9760         (get_traceframe_location): Likewise.
9761         (find_matching_tracepoint_location): Likewise.
9762         (parse_tracepoint_status): Likewise.
9763         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
9764
9765 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9766
9767         * breakpoint.c (struct longjmp_breakpoint): New struct.
9768         (is_tracepoint_type): Change return type to bool.
9769         (is_longjmp_type): New function.
9770         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
9771         (set_raw_breakpoint_without_location): Use
9772         new_breakpoint_from_type.
9773         (set_raw_breakpoint): Likewise.
9774
9775 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9776
9777         * breakpoint.c (new_breakpoint_from_type): New function.
9778         (create_breakpoint_sal): Use new_breakpoint_from_type and
9779         unique_ptr.
9780         (create_breakpoint): Likewise.
9781
9782 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
9783
9784         * memattr.c (mem_info_command): Rename to ...
9785         (info_mem_command): ... this.
9786         (mem_enable_command): Rename to ...
9787         (enable_mem_command): ... this.
9788         (mem_disable_command): Rename to ...
9789         (disable_mem_command): ... this.
9790         (mem_delete_command): Rename to ...
9791         (delete_mem_command): ... this.
9792         (_initialize_mem): Adjust function names.
9793
9794 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9795
9796         * btrace.c (handle_pt_insn_events): New.
9797         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
9798         STATUS.  Split into this and ...
9799         (handle_pt_insn_event_flags): ... this.
9800
9801 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9802
9803         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
9804         and struct pt_insn.resynced.
9805         * configure: Regenerated.
9806         * config.in: Regenerated.
9807
9808 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9809
9810         * btrace.c (ftrace_find_call_by_number): New function.
9811         (ftrace_new_function): Store objects, not pointers.
9812         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
9813         ftrace_new_gap, ftrace_update_function,
9814         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
9815         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
9816         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
9817         btrace_ends_with_single_insn, btrace_call_get): Account for
9818         btrace_thread_info::functions now storing objects.
9819         * btrace.h (struct btrace_thread_info): Add constructor.
9820         (struct btrace_thread_info) <functions>: Make std::vector.
9821         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
9822         Initialize with default values.
9823         * record-btrace.c (record_btrace_frame_sniffer): Account for
9824         btrace_thread_info::functions now storing objects.
9825
9826 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9827
9828         * btrace.c: Remove typedef bfun_s.
9829         (ftrace_new_gap): Directly add gaps to the list of gaps.
9830         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
9831         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
9832         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
9833         instead of gdb VEC.
9834
9835 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9836
9837         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
9838         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
9839         with btrace_thread_info::next_segment and
9840         btrace_thread_info::prev_segment.
9841         * btrace.h: Remove struct btrace_func_link.
9842         (struct btrace_function): Replace pair of function segment pointers
9843         with pair of indices.
9844         * python/py-record-btrace.c (btpy_call_prev_sibling,
9845         btpy_call_next_sibling): Replace references to
9846         btrace_thread_info::segment with btrace_thread_info::next_segment and
9847         btrace_thread_info::prev_segment.
9848         * record-btrace.c (record_btrace_frame_this_id): Use
9849         btrace_find_call_by_number.
9850
9851 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9852
9853         * btrace.c (ftrace_new_function, ftrace_fixup_level,
9854         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9855         btrace_insn_next, btrace_insn_prev): Remove references to
9856         btrace_thread_info::flow.
9857         * btrace.h (struct btrace_function): Remove FLOW.
9858
9859 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9860
9861         * btrace.c (ftrace_find_call_by_number): New function.
9862         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
9863         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
9864         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
9865         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
9866         index.
9867         * btrace.h (struct btrace_function): Turn UP into an index.
9868         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
9869         as an index.
9870         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
9871         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
9872         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
9873
9874 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9875
9876         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9877         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9878         ftrace_update_function, ftrace_compute_global_level_offset,
9879         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
9880         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
9881         btrace_insn_end, btrace_is_empty): Remove references to
9882         btrace_thread_info::begin and btrace_thread_info::end.
9883         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
9884         (struct btrace_thread_info) <functions>: Adjust comment.
9885         * record-btrace.c (record_btrace_start_replaying): Remove reference to
9886         btrace_thread_info::begin.
9887
9888 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9889
9890         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9891         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9892         ftrace_update_function): Remove arguments that implicitly were always
9893         BTINFO->END.
9894         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
9895         Don't pass BTINFO->END.
9896
9897 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9898
9899         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
9900         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
9901         btrace_find_insn_by_number): Replace function segment pointer with
9902         index.
9903         (btrace_insn_cmp): Simplify.
9904         * btrace.h: (struct btrace_insn_iterator) Rename index to
9905         insn_index.  Replace function segment pointer with index into function
9906         segment vector.
9907         * record-btrace.c (record_btrace_call_history): Replace function
9908         segment pointer use with index.
9909         (record_btrace_frame_sniffer): Retrieve function call segment through
9910         vector.
9911         (record_btrace_set_replay): Remove defunc't safety check.
9912
9913 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9914
9915         * btrace.c (btrace_ends_with_single_insn): New function.
9916         (btrace_call_get, btrace_call_number, btrace_call_begin,
9917         btrace_call_end, btrace_call_next, btrace_call_prev,
9918         btrace_find_call_by_number): Use index into call segment vector
9919         instead of pointer.
9920         (btrace_call_cmp): Simplify.
9921         * btrace.h (struct btrace_call_iterator): Replace function call segment
9922         pointer with index into vector.
9923         * record-btrace.c (record_btrace_call_history): Use index instead of
9924         pointer.
9925
9926 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9927
9928         * btrace.c (btrace_insn_begin, btrace_insn_end,
9929         btrace_find_insn_by_number): Add btinfo to iterator.
9930         * btrace.h (struct btrace_insn_iterator): Add btinfo.
9931
9932 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9933
9934         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
9935         and save pointers directly.
9936         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
9937         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
9938         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
9939         changed signature of functions.
9940         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
9941         (btrace_fetch): Remove code that adds btrace_function pointers to
9942         vector of btrace_functions.
9943         (btrace_clear): Simplify freeing vector of btrace_functions.
9944
9945 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9946
9947         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
9948         Replace VEC_* with std::vector functions.
9949         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
9950         (struct btrace_thread_info)<functions>: Change type to std::vector.
9951
9952 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9953
9954         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
9955         "Removed targets and native configurations" up.  Merge duplicate
9956         "New commands" sub-sections.  Add "New options" sub-sections.
9957
9958 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
9959
9960         * defs.h (copy_integer_to_size): New declaration.
9961         * findvar.c (copy_integer_to_size): New function.
9962         (do_cint_test): New selftest function.
9963         (copy_integer_to_size_test): Likewise.
9964         (_initialize_findvar): Likewise.
9965         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
9966         (mips_fbsd_collect_reg): Use raw_collect_integer.
9967         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
9968         (mips64_fill_gregset): Use raw_collect_integer
9969         (mips64_fill_fpregset): Use raw_supply_integer.
9970         * regcache.c (regcache::raw_supply_integer): New function.
9971         (regcache::raw_collect_integer): Likewise.
9972         * regcache.h: (regcache::raw_supply_integer): New declaration.
9973         (regcache::raw_collect_integer): Likewise.
9974
9975 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9976
9977         * Makefile.in (SFILES): Add gdbarch-selftests.c.
9978         (COMMON_OBS): Add gdbarch-selftests.o.
9979         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
9980         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
9981         * gdbarch-selftests.c: New file.
9982         * regcache.h (regcache) <~regcache>: Mark it virtual if
9983         GDB_SELF_TEST.
9984         <raw_write>: Likewise.
9985
9986 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9987
9988         * regcache.c (current_regcache): Change it to
9989         regcache::current_regcache.
9990         (regcache_observer_target_changed): Update.
9991         (regcache_thread_ptid_changed): Make it a regcache static
9992         method.
9993         (regcache_thread_ptid_changed): Update.
9994         (class regcache_access): New.
9995         (current_regcache_test): Update.
9996         (_initialize_regcache): Update.
9997         * regcache.h: Include forward_list.
9998         (regcache): Declare regcache_thread_ptid_changed and declare
9999         registers_changed_ptid as friend.
10000
10001 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10002
10003         * i387-tdep.c (i387_register_to_value): Use register_size
10004         instead of TYPE_LENGTH.
10005         * m68k-tdep.c (m68k_register_to_value): Likewise.
10006
10007 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10008
10009         * i387-tdep.c (i387_convert_register_p): Return false if type
10010         code isn't TYPE_CODE_FLT.
10011
10012 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10013
10014         * alpha-tdep.c (alpha_convert_register_p): Return true if type
10015         length is 4.
10016         (alpha_register_to_value): Remove type length check.
10017         (alpha_value_to_register): Likewise.
10018
10019 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10020
10021         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10022         TYPE_CODE_FLT.
10023
10024 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10025
10026         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10027         TYPE_CODE_FLT or not.
10028
10029 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10030
10031         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10032         * avr-tdep.c (avr_gdbarch_init): Likewise.
10033         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10034         * cris-tdep.c (cris_gdbarch_init): Likewise.
10035         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10036         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10037         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10038         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10039         * mep-tdep.c (mep_gdbarch_init): Likewise.
10040         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10041         * mips-tdep.c (mips_gdbarch_init): Likewise.
10042         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10043         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10044         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10045         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10046         * v850-tdep.c (v850_gdbarch_init): Likewise.
10047
10048 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10049
10050         * selftest-arch.c (tests_with_arch): Call registers_changed
10051         and reinit_frame_cache.
10052         * selftest.c (run_self_tests): Likewise.
10053
10054 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10055
10056         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10057         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10058
10059 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10060
10061         * rl78-tdep.c (rl78_gdbarch_init): Don't call
10062         set_gdbarch_print_insn.
10063
10064 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10065
10066         * h8300-tdep.c (h8300_gdbarch_init): Don't call
10067         set_gdbarch_print_insn.
10068
10069 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10070
10071         * alpha-tdep.c (alpha_gdbarch_init): Don't call
10072         set_gdbarch_print_insn.
10073         * arc-tdep.c (arc_gdbarch_init): Likewise.
10074         * arch-utils.c: include dis-asm.h.
10075         (default_print_insn): New function.
10076         * arch-utils.h (default_print_insn): Declare.
10077         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10078         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10079         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10080         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10081         * frv-tdep.c (frv_gdbarch_init): Likewise.
10082         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10083         * gdbarch.sh (print_insn): Use default_print_insn.
10084         * gdbarch.c: Regenerated.
10085         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10086         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10087         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10088         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10089         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10090         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10091         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10092         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10093         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10094         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10095         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10096         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10097         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10098         * mt-tdep.c (mt_gdbarch_init): Likewise.
10099         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10100         * nios2-tdep.c (nios2_print_insn): Remove.
10101         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10102         * rx-tdep.c (rx_gdbarch_init): Likewise.
10103         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10104         * score-tdep.c (score_print_insn): Remove.
10105         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10106         * sh-tdep.c (sh_gdbarch_init): Likewise.
10107         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10108         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10109         * tic6x-tdep.c (tic6x_print_insn): Remove.
10110         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10111         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10112         * v850-tdep.c (v850_gdbarch_init): Likewise.
10113         * vax-tdep.c (vax_gdbarch_init): Likewise.
10114         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10115         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10116
10117 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10118
10119         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10120         (MIPS_FP0_REGNUM): Remove.
10121         (MIPS_FSR_REGNUM): Remove.
10122         (mips_fbsd_supply_fpregs): Use mips_regnum.
10123         (mips_fbsd_supply_gregs): Likewise.
10124         (mips_fbsd_collect_fpregs): Likewise.
10125         (mips_fbsd_collect_gregs): Likewise.
10126
10127 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10128
10129         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10130         (getpfpregs_supplies): New function.
10131         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10132         getfpregs_supplies.
10133         (mips_fbsd_store_inferior_registers): Likewise.
10134
10135 2017-05-22  Pedro Alves <palves@redhat.com>
10136
10137         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10138         maintainer.
10139
10140 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
10141
10142         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10143         (store_register): Likewise.
10144         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10145         (get_decimal_float_return_value): Likewise.
10146         (do_ppc_sysv_return_value): Likewise.
10147         (ppc64_sysv_abi_push_integer): Likewise.
10148         (ppc64_sysv_abi_push_freg): Likewise.
10149         (ppc64_sysv_abi_return_value_base): Likewise.
10150         (ppc64_sysv_abi_return_value): Likewise.
10151         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10152         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10153         * rs6000-nat.c: Likewise.
10154         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10155         (rs6000_value_to_register): Likewise.
10156         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10157
10158 2017-05-21  Tom Tromey  <tom@tromey.com>
10159
10160         PR rust/21466:
10161         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10162         arrays as "[T]", not "[T; ]".
10163
10164 2017-05-19  Tom Tromey  <tom@tromey.com>
10165
10166         PR rust/21484:
10167         * rust-lang.c (exp_descriptor_rust): New function.
10168         (rust_language_defn): Use it.
10169         * p-lang.c (pascal_language_defn): Update.
10170         * opencl-lang.c (opencl_language_defn): Update.
10171         * objc-lang.c (objc_language_defn): Update.
10172         * m2-lang.c (m2_language_defn): Update.
10173         * language.h (struct language_defn)
10174         <la_watch_location_expression>: New member.
10175         * language.c (unknown_language_defn, auto_language_defn)
10176         (local_language_defn): Update.
10177         * go-lang.c (go_language_defn): Update.
10178         * f-lang.c (f_language_defn): Update.
10179         * d-lang.c (d_language_defn): Update.
10180         * c-lang.h (c_watch_location_expression): Declare.
10181         * c-lang.c (c_watch_location_expression): New function.
10182         (c_language_defn, cplus_language_defn, asm_language_defn)
10183         (minimal_language_defn): Use it.
10184         * breakpoint.c (watch_command_1): Call
10185         la_watch_location_expression.
10186         * ada-lang.c (ada_language_defn): Update.
10187
10188 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10189
10190         PR tui/21482
10191         * gdb_curses.h (NOMACROS): Define.
10192         (NCURSES_NOMACROS): Define.
10193
10194 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10195
10196         PR tui/21482
10197         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10198         arg to char *.
10199         * tui/tui-wingeneral.c (box_win): Likewise.
10200         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10201         (tui_show_source_line): Likewise.
10202         (tui_show_exec_info_content): Likewise.
10203
10204 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10205
10206         * sparc-tdep.c (sparc_structure_return_p)
10207         (sparc_arg_on_registers_p): New functions.
10208         (sparc32_store_arguments): Use them.
10209         * sparc64-tdep.c (sparc64_16_byte_align_p)
10210         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10211         Handle TYPE_CODE_ARRAY.
10212
10213 2017-05-17  Yao Qi  <yao.qi@linaro.org>
10214
10215         * cli/cli-decode.c (add_alias_cmd): New function.
10216         * command.h (add_alias_cmd): Declare.
10217         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10218         instead call add_alias_cmd.
10219
10220 2017-05-17  Pedro Alves  <palves@redhat.com>
10221
10222         * Makefile.in (nat_extra_makefile_frag): Rename to ...
10223         (nat_makefile_frag): ... this.  All references updated.
10224         * configure.ac: Likewise.
10225         * configure.nat: Likewise.  Enhance comments.
10226         * configure: Regenerate.
10227
10228 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10229
10230         * procfs.c (procfs_create_inferior): Change prototype to match
10231         definition.
10232
10233 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
10234
10235         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10236         C++ compiler warning.
10237
10238 2017-05-12  Tom Tromey  <tom@tromey.com>
10239
10240         PR rust/21483:
10241         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10242         recurse, just call value_struct_elt directly.
10243
10244 2017-05-12  Tom Tromey  <tom@tromey.com>
10245
10246         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10247         OP_RUST_ARRAY>: Fix.
10248
10249 2017-05-12  Tom Tromey  <tom@tromey.com>
10250
10251         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10252
10253 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10254
10255         * regcache.c: Include <forward_list>.
10256         (struct regcache_list): Remove.
10257         (current_regcache): Update.
10258         (get_thread_arch_aspace_regcache): Update for std::forward_list.
10259         (regcache_thread_ptid_changed): Likewise.
10260         (registers_changed_ptid): Likewise.
10261         (current_regcache_size): Likewise.
10262
10263 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10264
10265         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10266         (current_regcache_size): New function.
10267         (current_regcache_test): New function.
10268         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10269
10270 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10271
10272         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10273         (print_gp_register_row): Use get_frame_register_value.
10274
10275 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10276
10277         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10278         (mips_supply_fpregset): Likewise.
10279         (mips64_supply_gregset): Likewise.
10280
10281 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10282
10283         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
10284         regcache->raw_supply_zeroed.
10285
10286 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10287
10288         * configure.nat: Rearrange 'case' statements to match
10289         host before cpu.
10290
10291 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10292
10293         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
10294         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10295         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
10296         "@nat_extra_makefile_frag@".
10297         (Makefile): Remove dependency on "@frags@".
10298         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10299         (data-directory/Makefile): Likewise.
10300         * config/aarch64/linux.mh: Deleted; moved contents to
10301         "gdb/configure.nat".
10302         * config/alpha/alpha-linux.mh: Likewise.
10303         * config/alpha/nbsd.mh: Likewise.
10304         * config/arm/linux.mh: Likewise.
10305         * config/arm/nbsdelf.mh: Likewise.
10306         * config/i386/cygwin.mh: Likewise.
10307         * config/i386/cygwin64.mh: Likewise.
10308         * config/i386/darwin.mh: Likewise.
10309         * config/i386/fbsd.mh: Likewise.
10310         * config/i386/fbsd64.mh: Likewise.
10311         * config/i386/go32.mh: Likewise.
10312         * config/i386/i386gnu.mh: Likewise.
10313         * config/i386/i386sol2.mh: Likewise.
10314         * config/i386/linux.mh: Likewise.
10315         * config/i386/linux64.mh: Likewise.
10316         * config/i386/mingw.mh: Likewise.
10317         * config/i386/mingw64.mh: Likewise.
10318         * config/i386/nbsd64.mh: Likewise.
10319         * config/i386/nbsdelf.mh: Likewise.
10320         * config/i386/nto.mh: Likewise.
10321         * config/i386/obsd.mh: Likewise.
10322         * config/i386/obsd64.mh: Likewise.
10323         * config/i386/sol2-64.mh: Likewise.
10324         * config/ia64/linux.mh: Likewise.
10325         * config/m32r/linux.mh: Likewise.
10326         * config/m68k/linux.mh: Likewise.
10327         * config/m68k/nbsdelf.mh: Likewise.
10328         * config/m68k/obsd.mh: Likewise.
10329         * config/m88k/obsd.mh: Likewise.
10330         * config/mips/fbsd.mh: Likewise.
10331         * config/mips/linux.mh: Likewise.
10332         * config/mips/nbsd.mh: Likewise.
10333         * config/mips/obsd64.mh: Likewise.
10334         * config/pa/linux.mh: Likewise.
10335         * config/pa/nbsd.mh: Likewise.
10336         * config/pa/obsd.mh: Likewise.
10337         * config/powerpc/aix.mh: Likewise.
10338         * config/powerpc/fbsd.mh: Likewise.
10339         * config/powerpc/linux.mh: Likewise.
10340         * config/powerpc/nbsd.mh: Likewise.
10341         * config/powerpc/obsd.mh: Likewise.
10342         * config/powerpc/ppc64-linux.mh: Likewise.
10343         * config/powerpc/spu-linux.mh: Likewise.
10344         * config/s390/linux.mh: Likewise.
10345         * config/sh/nbsd.mh: Likewise.
10346         * config/sparc/fbsd.mh: Likewise.
10347         * config/sparc/linux.mh: Likewise.
10348         * config/sparc/linux64.mh: Likewise.
10349         * config/sparc/nbsd64.mh: Likewise.
10350         * config/sparc/nbsdelf.mh: Likewise.
10351         * config/sparc/obsd64.mh: Likewise.
10352         * config/sparc/sol2.mh: Likewise.
10353         * config/tilegx/linux.mh: Likewise.
10354         * config/vax/nbsdelf.mh: Likewise.
10355         * config/vax/obsd.mh: Likewise.
10356         * config/xtensa/linux.mh: Likewise.
10357         * config/i386/i386gnu.mn: New file, with excerpts from
10358         "config/i386/i386gnu.mh".
10359         * configure: Regenerate.
10360         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10361         *.mh files under "gdb/config".
10362         * configure.nat: New file, with contents from the
10363         "gdb/config/*/*.mh" files.
10364
10365 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
10366
10367         * btrace.c (btrace_clear): Free insn vector.
10368
10369 2017-05-05  Pedro Alves  <palves@redhat.com>
10370
10371         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10372         * configure: Regenerate.
10373
10374 2017-05-04  Pedro Alves  <palves@redhat.com>
10375
10376         * Makefile.in (SFILES): Add progspace-and-thread.c.
10377         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10378         (COMMON_OBS): Add progspace-and-thread.o.
10379         * breakpoint.c: Include "progspace-and-thread.h".
10380         (update_inserted_breakpoint_locations)
10381         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10382         Use scoped_restore_current_pspace_and_thread.
10383         (create_std_terminate_master_breakpoint): Use
10384         scoped_restore_current_program_space.
10385         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10386         (print_breakpoint_location): Use
10387         scoped_restore_current_program_space.
10388         (bp_loc_is_permanent): Use
10389         scoped_restore_current_pspace_and_thread.
10390         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10391         (download_tracepoint_locations): Use
10392         scoped_restore_current_pspace_and_thread.
10393         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10394         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10395         (enum step_over_calls_kind): Moved from inferior.h.
10396         (class scoped_restore_current_thread): New class.
10397         * gdbthread.h (make_cleanup_restore_current_thread): Delete
10398         declaration.
10399         (scoped_restore_current_thread): New class.
10400         * infcmd.c: Include "common/gdb_optional.h".
10401         (continue_1, proceed_after_attach): Use
10402         scoped_restore_current_thread.
10403         (notice_new_inferior): Use scoped_restore_current_thread.
10404         * inferior.c: Include "progspace-and-thread.h".
10405         (restore_inferior, save_current_inferior): Delete.
10406         (add_inferior_command, clone_inferior_command): Use
10407         scoped_restore_current_pspace_and_thread.
10408         * inferior.h (scoped_restore_current_inferior): New class.
10409         * infrun.c: Include "progspace-and-thread.h" and
10410         "common/gdb_optional.h".
10411         (follow_fork_inferior): Use
10412         scoped_restore_current_pspace_and_thread.
10413         (scoped_restore_exited_inferior): New class.
10414         (handle_vfork_child_exec_or_exit): Use
10415         scoped_restore_exited_inferior,
10416         scoped_restore_current_pspace_and_thread,
10417         scoped_restore_current_thread and scoped_restore.
10418         (fetch_inferior_event): Use scoped_restore_current_thread.
10419         * linespec.c (decode_line_full, decode_line_1): Use
10420         scoped_restore_current_program_space.
10421         * mi/mi-main.c: Include "progspace-and-thread.h".
10422         (exec_continue): Use scoped_restore_current_thread.
10423         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10424         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10425         * proc-service.c (ps_pglobal_lookup): Use
10426         scoped_restore_current_program_space.
10427         * progspace-and-thread.c: New file.
10428         * progspace-and-thread.h: New file.
10429         * progspace.c (release_program_space, clone_program_space): Use
10430         scoped_restore_current_program_space.
10431         (restore_program_space, save_current_program_space)
10432         (save_current_space_and_thread): Delete.
10433         (switch_to_program_space_and_thread): Moved to
10434         progspace-and-thread.c.
10435         * progspace.h (save_current_program_space)
10436         (save_current_space_and_thread): Delete declarations.
10437         (scoped_restore_current_program_space): New class.
10438         * remote.c (remote_btrace_maybe_reopen): Use
10439         scoped_restore_current_thread.
10440         * symtab.c: Include "progspace-and-thread.h".
10441         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10442         * thread.c (print_thread_info_1): Use
10443         scoped_restore_current_thread.
10444         (struct current_thread_cleanup): Delete.
10445         (do_restore_current_thread_cleanup)
10446         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10447         (scoped_restore_current_thread::~scoped_restore_current_thread):
10448         ... this new dtor.
10449         (make_cleanup_restore_current_thread): Rename/convert to ...
10450         (scoped_restore_current_thread::scoped_restore_current_thread):
10451         ... this new ctor.
10452         (thread_apply_all_command): Use scoped_restore_current_thread.
10453         (thread_apply_command): Use scoped_restore_current_thread.
10454         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10455         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10456
10457 2017-05-04  Pedro Alves  <palves@redhat.com>
10458
10459         * thread.c (make_cleanup_restore_current_thread): Move
10460         find_thread_ptid call before the is_stopped call.  Assert that the
10461         thread is found.  Replace is_stopped call by checking the thread's
10462         state directly.  Remove unnecessary NULL-thread check.
10463
10464 2017-05-04  Pedro Alves  <palves@redhat.com>
10465
10466         * corelow.c (thread_section_name): New class.
10467         (get_core_register_section, get_core_siginfo): Use it.
10468
10469 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10470
10471         * corelow.c (sniff_core_bfd): Remove extra semicolon.
10472         (get_core_register_section): Remove xfree of NULL pointer.
10473
10474 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
10475
10476         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10477         * regcache.c (regcache::raw_supply_zeroed): New function.
10478         * regcache.h (regcache::raw_supply_zeroed): New declaration.
10479
10480 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10481
10482         * gdbarch.sh: Remove commented out definition of
10483         TARGET_CHAR_BIT.
10484         * gdbarch.h: Re-generate.
10485
10486 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
10487
10488         * configure: Regenerate.
10489
10490 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
10491
10492         * solib-target.c (solib_target_relocate_section_addresses):
10493         Remove num_section_bases, num_bases, segment_bases variables.
10494
10495 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10496
10497         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10498
10499 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10500
10501         * solib-target.c: Include <vector>
10502         (struct lm_info_target) <~lm_info_target>: Remove.
10503         <segment_bases, section_bases>: Change type to
10504         std::vector<CORE_ADDR>.
10505         (library_list_start_segment, library_list_start_section,
10506         library_list_end_library,
10507         solib_target_relocate_section_addresses): Adjust.
10508
10509 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10510
10511         * gdbarch.sh (software_single_step): Change return type to
10512         std::vector<CORE_ADDR>.
10513         * gdbarch.c, gdbarch.h: Re-generate.
10514         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10515         Adjust.
10516         (arm_deal_with_atomic_sequence_raw): Adjust.
10517         (thumb_get_next_pcs_raw): Adjust.
10518         (arm_get_next_pcs_raw): Adjust.
10519         (arm_get_next_pcs): Adjust.
10520         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10521         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10522         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10523         (alpha_software_single_step): Adjust.
10524         * alpha-tdep.h (alpha_software_single_step): Adjust.
10525         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10526         * arm-tdep.c (arm_software_single_step): Adjust.
10527         (arm_breakpoint_kind_from_current_state): Adjust.
10528         * arm-tdep.h (arm_software_single_step): Adjust.
10529         * breakpoint.c (insert_single_step_breakpoint): Adjust.
10530         * cris-tdep.c (cris_software_single_step): Adjust.
10531         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10532         (micromips_deal_with_atomic_sequence): Adjust.
10533         (deal_with_atomic_sequence): Adjust.
10534         (mips_software_single_step): Adjust.
10535         * mips-tdep.h (mips_software_single_step): Adjust.
10536         * moxie-tdep.c (moxie_software_single_step): Adjust.
10537         * nios2-tdep.c (nios2_software_single_step): Adjust.
10538         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10539         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10540         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10541         * s390-linux-tdep.c (s390_software_single_step): Adjust.
10542         * sparc-tdep.c (sparc_software_single_step): Adjust.
10543         * spu-tdep.c (spu_software_single_step): Adjust.
10544         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10545
10546 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10547
10548         * gdbarch.sh: Use semi-colon as field separator instead of colon.
10549         * gdbarch.h: Re-generate.
10550
10551 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10552
10553         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10554         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10555         * python/py-instruction.c, python/py-instruction.h: New file.
10556         * python/py-record.c: Add py-instruction.h include.
10557         (gdbpy_initialize_record): Make gdb.Instruction a super class of
10558         gdb.RecordInstruction.
10559         * python/python-internal.h: Add gdbpy_initialize_instruction
10560         declaration.
10561         * python/python.c (do_start_initialization): Add
10562         gdbpy_initialize_instruction.
10563
10564 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10565
10566         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10567         Remove.
10568         (btrace_func_from_recpy_func): New function.
10569         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10570         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10571         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10572         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10573         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10574         Also, use new helper functions.
10575         (btpy_list_item): Use new helper functions.
10576         (recpy_bt_function_call_history): Use new type name.
10577         (btpy_call_getset): Remove.
10578         (gdbpy_initialize_btrace): Remove code to initialize
10579         gdb.BtraceFunctionCall.
10580         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10581         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10582         recpy_bt_func_prev, recpy_bt_func_next): New export.
10583         * python/py-record.c (recpy_func_type): New static object.
10584         (recpy_func_new, recpy_func_level, recpy_func_symbol,
10585         recpy_func_instructions, recpy_func_up, recpy_func_prev,
10586         recpy_func_next): New function.
10587         (recpy_element_hash, recpy_element_richcompare): Updated comment.
10588         (recpy_func_getset): New static object.
10589         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10590         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10591
10592 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10593
10594         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10595         (btpy_object, btpy_insn_type, btpy_new): Remove.
10596         (btpy_list_object): Use gdb.RecordInstruction type instead of
10597         gdb.BtraceInstruction type.
10598         (btrace_insn_from_recpy_insn): New function.
10599         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10600         btpy_new.
10601         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10602         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10603         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10604         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10605         instead of btpy_object.
10606         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10607         btpy_insn_data, btpy_insn_decode): Rename to ...
10608         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10609         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10610         recpy_bt_insn_decode): This.  Also, use new helper functions.
10611         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10612         recpy_insn_type.
10613         (btpy_insn_getset): Remove.
10614         (gdbpy_initialize_btrace): Remove code to initialize
10615         gdb.BtraceInstruction.  Use recpy_element_object.
10616         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10617         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10618         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10619         * python/py-record.c (recpy_insn_type): New static object.
10620         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10621         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10622         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10623         New function.
10624         (recpy_insn_getset): New static object.
10625         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10626         * python/py-record.h (recpy_element_object): New typedef.
10627         (recpy_insn_type, recpy_insn_new): New export.
10628
10629 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10630
10631         * py-record-btrace.c (btpy_insn_new): Removed.
10632         (btpy_insn_or_gap_new): New function.
10633         (btpy_insn_error): Removed.
10634         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10635         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10636         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10637         btpy_insn_or_gap_new instead of btpy_insn_new.
10638         (btpy_insn_getset): Remove btpy_insn_error.
10639         * py-record.c (recpy_gap_type): New static object.
10640         (recpy_gap_object): New typedef.
10641         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10642         recpy_gap_reason_string): New function.
10643         (recpy_gap_getset): New static object.
10644         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10645         * py-record.h (recpy_gap_new): New export.
10646
10647 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10648
10649         * python/py-record.c (recpy_ptid): Remove.
10650         (recpy_record_getset): Remove recpy_ptid.
10651
10652 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10653
10654         * btrace.c (btrace_fetch): Set inferior_ptid.
10655         * python/py-record-btrace.c: Add "py-record.h" include.
10656         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10657         recpy_bt_end, recpy_bt_instruction_history,
10658         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10659         in gdb.Record object instead of current ptid.
10660         * python/py-record.c: Include new "py-record.h" file.
10661         (recpy_record_object): Moved to py-record.h.
10662         * python/py-record.h: New file.
10663
10664 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10665
10666         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10667         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10668         indentation.
10669
10670 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
10671
10672         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10673         the past maintainers section.
10674
10675 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10676
10677         * infcmd.c (get_return_value): Use regcache ctor, and remove
10678         cleanup.
10679
10680 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10681             Pedro Alves  <palves@redhat.com>
10682
10683         * regcache.c (regcache::regcache): New tag dispatch ctor.
10684         (do_cooked_read): Moved above.
10685         (regcache_dup): Use the tag dispatch ctor..
10686         * regcache.h (regcache): Declare ctor, delete copy ctor and
10687         assignment operator, remove friend regcache_dup.
10688
10689 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10690
10691         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10692         call method save instead of regcache_cpy.
10693         * regcache.h (struct regcache): Make regcache_dup a friend.
10694
10695 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10696
10697         * regcache.c (struct regcache): Move to regcache.h
10698         (regcache::arch): New method.
10699         (regcache_get_ptid): Update.
10700         (get_regcache_arch): Call arch method.
10701         (get_regcache_aspace): Call method aspace.
10702         (register_buffer): Change it to method.
10703         (regcache_save): Change it to regcache::save.
10704         (regcache_restore): Likewise.
10705         (regcache_cpy_no_passthrough): Remove the declaration.
10706         (regcache_cpy): Call methods restore and cpy_no_passthrough.
10707         (regcache_cpy_no_passthrough): Change it to method
10708         cpy_no_passthrough.
10709         (regcache_register_status): Change it to method
10710         get_register_status.
10711         (regcache_invalidate): Change it to method invalidate.
10712         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10713         (regcache_raw_update): Change it to method raw_update.
10714         (regcache_raw_read): Likewise.
10715         (regcache_raw_read_signed): Likewise.
10716         (regcache_raw_read_unsigned): Likewise.
10717         (regcache_raw_write_signed): Likewise.
10718         (regcache_raw_write_unsigned): Likewise.
10719         (regcache_cooked_read): Likewise.
10720         (regcache_cooked_read_value): Likewise.
10721         (regcache_cooked_read_signed): Likewise.
10722         (regcache_cooked_read_unsigned): Likewise.
10723         (regcache_cooked_write_signed): Likewise.
10724         (regcache_cooked_write_unsigned): Likewise.
10725         (regcache_raw_set_cached_value): Likewise.
10726         (regcache_raw_write): Likewise.
10727         (regcache_cooked_write): Likewise.
10728         (regcache_xfer_part): Likewise.
10729         (regcache_raw_read_part): Likewise.
10730         (regcache_raw_write_part): Likewise.
10731         (regcache_cooked_read_part): Likewise.
10732         (regcache_cooked_write_part): Likewise.
10733         (regcache_raw_supply): Likewise.
10734         (regcache_raw_collect): Likewise.
10735         (regcache_transfer_regset): Likewise.
10736         (regcache_supply_regset): Likewise.
10737         (regcache_collect_regset): Likewise.
10738         (regcache_debug_print_register): Likewise.
10739         (enum regcache_dump_what): Move it to regcache.h.
10740         (regcache_dump): Change it to method dump.
10741         * regcache.h (enum regcache_dump_what): New.
10742         (class regcache): New.
10743         * target.c (target_fetch_registers): Call method
10744         debug_print_register.
10745         (target_store_registers): Likewise.
10746
10747 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10748
10749         * windows-nat.c (struct lm_info_windows): Initialize field.
10750         (windows_make_so): Allocate lm_info_windows with new.
10751         (windows_free_so): Free lm_info_windows with delete.
10752
10753 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10754
10755         * solib-darwin.c (struct lm_info_darwin): Initialize field.
10756         (darwin_current_sos): Allocate lm_info_darwin with new, remove
10757         cleanup.
10758         (darwin_free_so): Free lm_info_darwin with delete.
10759
10760 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10761
10762         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
10763         <l_addr_p>: Change type to bool.
10764         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
10765         (svr4_free_so): Free lm_info_svr4 with delete.
10766         (svr4_copy_library_list): Replace memcpy with call to copy
10767         constructor.
10768         (library_list_start_library, svr4_default_sos): Allocate
10769         lm_info_svr4 with new.
10770
10771 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10772
10773         * solib-target.c (struct lm_info_target): Add destructor,
10774         initialize fields.
10775         <name>: Change type to std::string.
10776         (library_list_start_library): Allocate lm_info_target with new.
10777         (solib_target_free_library_list): Free lm_info_target with
10778         delete.
10779         (solib_target_current_sos): Adapt to std::string.
10780         (solib_target_free_so): Free lm_info_target with delete.
10781
10782 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10783
10784         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
10785         fields.
10786         (frv_current_sos): Allocate lm_info_frv with new.
10787         (frv_relocate_main_executable): Free lm_info_frv with delete,
10788         allocate with new.
10789         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
10790
10791 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10792
10793         * solib-frv.c (struct lm_info_frv): Fix indentation.
10794
10795 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10796
10797         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
10798         map field.
10799         (dsbt_current_sos): Allocate lm_info_dsbt with new.
10800         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
10801         and allocate with new.
10802         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
10803
10804 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10805
10806         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
10807         <filename, member_name>: Change type to std::string.
10808         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
10809         (library_list_start_library): Allocate lm_info_aix with new.
10810         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
10811         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
10812         with copy constructor.
10813
10814 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10815
10816         * solist.h (struct lm_info): Remove.
10817         (struct lm_info_base): New class.
10818         (struct so_list) <lm_info>: Change type to lm_info_base *.
10819         * nto-tdep.c (struct lm_info): Remove.
10820         (lm_addr): Adjust.
10821         * solib-aix.c (struct lm_info): Rename to ...
10822         (struct lm_info_aix): ... this.  Extend lm_info_base.
10823         (lm_info_p): Rename to ...
10824         (lm_info_aix_p): ... this, and adjust.
10825         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
10826         solib_aix_parse_libraries, library_list_start_library,
10827         solib_aix_free_library_list, solib_aix_parse_libraries,
10828         solib_aix_get_library_list,
10829         solib_aix_relocate_section_addresses, solib_aix_free_so,
10830         solib_aix_get_section_offsets,
10831         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
10832         Adjust.
10833         (struct solib_aix_inferior_data) <library_list>: Adjust.
10834         * solib-darwin.c (struct lm_info): Rename to ...
10835         (struct lm_info_darwin): ... this.  Extend lm_info_base.
10836         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
10837         * solib-dsbt.c (struct lm_info): Rename to ...
10838         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
10839         (struct dsbt_info) <main_executable_lm_info): Adjust.
10840         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
10841         dsbt_relocate_section_addresses): Adjust.
10842         * solib-frv.c (struct lm_info): Rename to ...
10843         (struct lm_info_frv): ... this.  Extend lm_info_base.
10844         (main_executable_lm_info): Adjust.
10845         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
10846         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
10847         find_canonical_descriptor_in_load_object,
10848         frv_fdpic_find_canonical_descriptor): Adjust.
10849         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10850         to lm_info_svr4.
10851         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10852         svr4_clear_so, svr4_copy_library_list,
10853         library_list_start_library, svr4_default_sos, svr4_read_so_list,
10854         svr4_current_sos, svr4_fetch_objfile_link_map,
10855         solist_update_incremental): Adjust.
10856         * solib-svr4.h (struct lm_info_svr4): Move here from
10857         solib-svr4.c.
10858         * solib-target.c (struct lm_info): Rename to ...
10859         (struct lm_info_target): ... this.  Extend lm_info_base.
10860         (lm_info_p): Rename to ...
10861         (lm_info_target_p): ... this.
10862         (solib_target_parse_libraries, library_list_start_segment,
10863         library_list_start_section, library_list_start_library,
10864         library_list_end_library, solib_target_free_library_list,
10865         solib_target_current_sos, solib_target_free_so,
10866         solib_target_relocate_section_addresses): Adjust.
10867         * windows-nat.c (struct lm_info): Rename to ...
10868         (struct lm_info_windows): ... this.  Extend lm_info_base.
10869         (windows_make_so, handle_load_dll, handle_unload_dll,
10870         windows_xfer_shared_libraries): Adjust.
10871
10872 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10873
10874         * solib-darwin.c (struct darwin_so_list): Remove.
10875         (darwin_current_sos): Allocate an so_list object instead of a
10876         darwin_so_list, separately allocate an lm_info object.
10877         (darwin_free_so): Free lm_info.
10878
10879 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
10880
10881         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
10882         with fprintf_filtered.
10883
10884 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10885
10886         * regcache.c (regcache::regcache): New function.
10887         (regcache::~regcache): New function.
10888         (regcache_xmalloc_1): Remove.
10889         (regcache_xmalloc): Call new regcache.
10890         (regcache_xfree): Call delete regcache.
10891         (get_thread_arch_aspace_regcache): Call new regcache.
10892
10893 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10894
10895         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
10896         lwp instead of ptid_get_lwp.
10897
10898 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10899
10900         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
10901         lwp_info instead of getting from inferior_ptid.
10902
10903 2017-04-27  Keith Seitz  <keiths@redhat.com>
10904
10905         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
10906         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
10907         (CV_CONVERSION_BADNESS): Define.
10908         (rank_one_type): Remove overly restrictive rvalue reference
10909         rank checks.
10910         Add cv-qualifier checks and subranks for type equality.
10911         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
10912         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
10913         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
10914
10915 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
10916
10917         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
10918         count when creating the object.
10919
10920 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
10921             Ulrich Weigand  <uweigand@de.ibm.com>
10922
10923         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
10924         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
10925         is used in AIX.
10926         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
10927         (process_xcoff_symbol): Likewise.
10928         (scan_xcoff_symtab): Likewise.
10929
10930 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10931
10932         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
10933         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
10934         (ia64_access_reg): Use get_frame_register_unsigned.
10935         (ia64_access_rse_reg): Likewise.
10936         (ia64_libunwind_frame_prev_register): Likewise.
10937
10938 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
10939
10940         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
10941         * gdbarch.c: Regenerated.
10942         * gdbarch.h: Regenerated.
10943         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
10944         visibility external.
10945         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
10946         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
10947         (enum cfa_how_kind): Move to ...
10948         (struct dwarf2_frame_state_reg_info): Likewise.
10949         (struct dwarf2_frame_state): Likewise.
10950         * dwarf2-frame.h: ... here.
10951         (dwarf2_frame_state_alloc_regs): New declaration.
10952         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
10953         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
10954
10955 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10956
10957         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
10958         regcache_raw_read_unsigned.
10959         (xtensa_pseudo_register_write): Likewise.
10960
10961 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10962
10963         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
10964         (nds32_pseudo_register_write): Likewise.
10965
10966 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10967
10968         * regcache.c (struct regcache) <readonly_p>: Change its type
10969         to bool.
10970         (regcache_xmalloc_1): Update parameter type and callers update.
10971
10972 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10973
10974         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
10975         set_gdbarch_wchar_bit.
10976         * arm-tdep.c (arm_gdbarch_init): Likewise.
10977
10978 2017-04-25  Pedro Alves  <palves@redhat.com>
10979
10980         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
10981         (BothAreRelocatable, memcopy, memmove): Don't define.
10982         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
10983         macros.
10984
10985 2017-04-25  Pedro Alves  <palves@redhat.com>
10986
10987         * common/common-defs.h: Include "common/poison.h".
10988         * common/function-view.h: (Not, Or, Requires): Move to traits.h
10989         and adjust.
10990         * common/poison.h: New file.
10991         * common/traits.h: Include <type_traits>.
10992         (Not, Or, Requires): New, moved from common/function-view.h.
10993
10994 2017-04-25  Pedro Alves  <palves@redhat.com>
10995
10996         * breakpoint.h (struct breakpoint): In-class initialize all
10997         fields.  Make boolean fields "bool".
10998         * breakpoint.c (init_raw_breakpoint_without_location): Remove
10999         memset call and initializations no longer necessary.
11000
11001 2017-04-25  Pedro Alves  <palves@redhat.com>
11002
11003         * btrace.c (pt_btrace_insn_flags): Change parameter type to
11004         reference.
11005         (pt_btrace_insn): New function.
11006         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11007
11008 2017-04-25  Pedro Alves  <palves@redhat.com>
11009
11010         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
11011         "base" field and inherit from "bp_location" instead.  Add
11012         non-default ctor.
11013         (allocate_location_exception): Use new non-default ctor.
11014         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11015         (init_bp_location): Convert to ...
11016         (bp_location::bp_location): ... this new ctor, and remove memset
11017         call.
11018         (base_breakpoint_allocate_location): Use the new non-default ctor.
11019         * breakpoint.h (bp_location): Now a class.  Declare default and
11020         non-default ctors.  In-class initialize all members.
11021         (init_bp_location): Remove declaration.
11022
11023 2017-04-25  Pedro Alves  <palves@redhat.com>
11024
11025         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11026         assignment operator.
11027
11028 2017-04-24  Yao Qi  <yao.qi@linaro.org>
11029
11030         * doublest.c (convert_doublest_to_floatformat): Call
11031         floatformat_totalsize_bytes.
11032
11033 2017-04-22  Tom Tromey  <tom@tromey.com>
11034
11035         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11036         ui_out_emit_list.
11037         * stack.c (print_frame): Use ui_out_emit_list.
11038         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11039         ui_out_emit_list.
11040         * mi/mi-main.c (print_one_inferior)
11041         (mi_cmd_data_list_register_names)
11042         (mi_cmd_data_list_register_values, mi_cmd_list_features)
11043         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11044         ui_out_emit_list.
11045         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11046         (mi_output_solib_attribs): Use ui_out_emit_list,
11047         ui_out_emit_tuple.
11048         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11049         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11050         (mi_cmd_stack_list_args, list_args_or_locals): Use
11051         ui_out_emit_list.
11052         * disasm.c (do_assembly_only): Use ui_out_emit_list.
11053         * breakpoint.c (print_solib_event, output_thread_groups): Use
11054         ui_out_emit_list.
11055
11056 2017-04-22  Tom Tromey  <tom@tromey.com>
11057
11058         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11059         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11060         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11061
11062 2017-04-22  Tom Tromey  <tom@tromey.com>
11063
11064         * tracepoint.c (tvariables_info_1)
11065         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11066
11067 2017-04-22  Tom Tromey  <tom@tromey.com>
11068
11069         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11070         annotate_arg_emitter.
11071         * breakpoint.c (print_mention_watchpoint)
11072         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11073         * annotate.h (struct annotate_arg_emitter): New.
11074
11075 2017-04-22  Tom Tromey  <tom@tromey.com>
11076
11077         * record-btrace.c (record_btrace_insn_history)
11078         (record_btrace_insn_history_range, record_btrace_call_history)
11079         (record_btrace_call_history_range): Use ui_out_emit_tuple.
11080         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11081         ui_out_emit_tuple.
11082         * stack.c (print_frame_info): Use ui_out_emit_tuple.
11083         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11084         * skip.c (skip_info): Use ui_out_emit_tuple.
11085         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11086         * progspace.c (print_program_space): Use ui_out_emit_tuple.
11087         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11088         * osdata.c (info_osdata): Use ui_out_emit_tuple.
11089         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11090         ui_out_emit_tuple.
11091         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11092         (output_register, mi_cmd_data_read_memory)
11093         (mi_cmd_data_read_memory_bytes, mi_load_progress)
11094         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11095         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11096         Use ui_out_emit_tuple.
11097         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11098         ui_out_emit_tuple.
11099         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11100         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11101         * linux-thread-db.c (info_auto_load_libthread_db): Use
11102         ui_out_emit_tuple.
11103         * inferior.c (print_inferior): Use ui_out_emit_tuple.
11104         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11105         * disasm.c (do_mixed_source_and_assembly_deprecated)
11106         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11107         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11108         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11109         * breakpoint.c (print_one_breakpoint_location)
11110         (print_one_breakpoint): Use ui_out_emit_tuple.
11111         * auto-load.c (print_script, info_auto_load_cmd): Use
11112         ui_out_emit_tuple.
11113         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11114
11115 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
11116
11117         * thread.c (print_thread_info_1): Remove dead code.
11118
11119 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11120
11121         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11122         GDB_SELF_TEST.
11123         * arm-tdep.c (selftests::arm_record_test): Likewise.
11124
11125 2017-04-21  Yao Qi  <yao.qi@linaro.org>
11126
11127         * regcache.c (regcache_restore): Remove argument 2.  Replace
11128         argument 3 with regcache.  Get register status from
11129         src->register_status and get register contents from
11130         register_buffer (src, regnum).
11131         (regcache_cpy): Update.
11132
11133 2017-04-19  Pedro Alves  <palves@redhat.com>
11134
11135         * gdbthread.h (thread): Add missing closing parenthesis in
11136         comment.
11137
11138 2017-04-19  Pedro Alves  <palves@redhat.com>
11139
11140         * common/refcounted-object.h: New file.
11141         * gdbthread.h: Include "common/refcounted-object.h".
11142         (thread_info): Inherit from refcounted_object and add comments.
11143         (thread_info::incref, thread_info::decref)
11144         (thread_info::m_refcount): Delete.
11145         (thread_info::deletable): Use the refcounted_object::refcount()
11146         method.
11147         * inferior.c (current_inferior_): Add comment.
11148         (set_current_inferior): Increment/decrement refcounts.
11149         (prune_inferiors, remove_inferior_command): Skip inferiors marked
11150         not-deletable instead of comparing with the current inferior.
11151         (initialize_inferiors): Increment the initial inferior's refcount.
11152         * inferior.h (struct inferior): Forward declare.
11153         Include "common/refcounted-object.h".
11154         (current_inferior, set_current_inferior): Move declaration to
11155         before struct inferior's definition, and fix comment.
11156         (inferior): Inherit from refcounted_object.  Add comments.
11157         * thread.c (switch_to_thread_no_regs): Reference the thread's
11158         inferior pointer directly instead of doing a ptid lookup.
11159         (switch_to_no_thread): New function.
11160         (switch_to_thread(thread_info *)): New function, factored out
11161         from ...
11162         (switch_to_thread(ptid_t)): ... this.
11163         (restore_current_thread): Delete.
11164         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11165         fields, and add 'inf' field.
11166         (do_restore_current_thread_cleanup): Check whether old->inf is
11167         alive instead of looking up an inferior by ptid.  Use
11168         switch_to_thread and switch_to_no_thread.
11169         (restore_current_thread_cleanup_dtor): Use old->inf directly
11170         instead of lookup up an inferior by id.  Decref the inferior.
11171         Don't restore 'removable'.
11172         (make_cleanup_restore_current_thread): Same the inferior pointer
11173         in old, instead of the inferior number.  Incref the inferior.
11174         Don't save/clear 'removable'.
11175
11176 2017-04-19  Pedro Alves  <palves@redhat.com>
11177
11178         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11179         unittests/scoped_restore-selftests.c.
11180         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11181         * common/scoped_restore.h (scoped_restore_base): Make "class".
11182         (scoped_restore_base::release): New public method.
11183         (scoped_restore_base::scoped_restore_base): New protected ctor.
11184         (scoped_restore_base::m_saved_var): New protected field.
11185         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11186         scoped_restore_base base class instead of m_saved_var directly.
11187         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11188         (scoped_restore_tmpl::scoped_restore_tmpl(const
11189         scoped_restore_tmpl<T>&)): Likewise.
11190         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11191         method.
11192         (scoped_restore_tmpl::saved_var): New method.
11193         (scoped_restore_tmpl::m_saved_var): Delete.
11194         * inferior.h (inferior::detaching): Now a bool.
11195         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11196         cleanup.
11197         * unittests/scoped_restore-selftests.c: New file.
11198
11199 2017-04-19  Pedro Alves  <palves@redhat.com>
11200
11201         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11202         Re-sort in alphabetic order.
11203
11204 2017-04-18  Pedro Alves  <palves@redhat.com>
11205
11206         * xml-support.c (obstack_xml_printf): Delete.
11207         * xml-support.h (obstack_xml_printf): Delete.
11208
11209 2017-04-18  Pedro Alves  <palves@redhat.com>
11210
11211         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11212         vdebug, verror, body_text, start_element, end_element, name,
11213         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11214         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11215         is_xinclude>: Make private and add m_ prefix.
11216         (gdb_xml_parser::body_text): New method, based on ...
11217         (gdb_xml_body_text): ... this.  Adjust.
11218         (gdb_xml_parser::vdebug): New method, based on ...
11219         (gdb_xml_debug): ... this.  Adjust.
11220         (gdb_xml_parser::verror): New method, based on ...
11221         (gdb_xml_error): ... this.  Adjust.
11222         (gdb_xml_parser::start_element): New method, based on ...
11223         (gdb_xml_start_element): ... this.  Adjust.
11224         (gdb_xml_start_element_wrapper): Defer to
11225         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11226         (gdb_xml_parser::end_element): New method, based on ...
11227         (gdb_xml_end_element_wrapper): ... this.  Adjust.
11228         (gdb_xml_parser::~gdb_xml_parser): Adjust.
11229         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11230         (gdb_xml_parser::use_dtd): New method, based on ...
11231         (gdb_xml_use_dtd): ... this.  Adjust.
11232         (gdb_xml_parser::parse): New method, based on ...
11233         (gdb_xml_parse): ... this.  Adjust.
11234         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11235         (xinclude_start_include): Adjust to call the parser's name method.
11236         (xml_xinclude_default, xml_xinclude_start_doctype)
11237         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11238         method.
11239         (xml_process_xincludes): Adjust to call parser methods.
11240         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11241         declarations.
11242
11243 2017-04-18  Pedro Alves  <palves@redhat.com>
11244
11245         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11246         gdb::optional<std::string>.
11247         * xml-support.c: Include <string>.
11248         (scope_level::scope_level(scope_level &&))
11249         (scope_level::~scope_level): Delete.
11250         (scope_level::body): Now a std::string.
11251         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11252         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11253         parameter.
11254         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11255         (xinclude_parsing_data::output): Now a std::string reference.
11256         (xinclude_start_include): Adjust.
11257         (xml_xinclude_default): Adjust.
11258         (xml_process_xincludes): Add 'output' parameter, and return bool.
11259         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11260         and return bool.
11261         * xml-tdesc.c: Include <unordered_map> and <string>.
11262         (tdesc_xml_cache): Delete.
11263         (tdesc_xml_cache_s): Delete.
11264         (xml_cache): Now an std::unordered_map.
11265         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11266         (target_fetch_description_xml): Change return type to
11267         gdb::optional<std::string>, and adjust.
11268         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11269         (target_fetch_description_xml): Change return type to
11270         gdb::optional<std::string>.
11271
11272 2017-04-18  Pedro Alves  <palves@redhat.com>
11273
11274         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11275         unittests/optional-selftests.c.
11276         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11277         * unittests/optional-selftests.c: New file.
11278         * unittests/optional/assignment/1.cc: New file.
11279         * unittests/optional/assignment/2.cc: New file.
11280         * unittests/optional/assignment/3.cc: New file.
11281         * unittests/optional/assignment/4.cc: New file.
11282         * unittests/optional/assignment/5.cc: New file.
11283         * unittests/optional/assignment/6.cc: New file.
11284         * unittests/optional/assignment/7.cc: New file.
11285         * unittests/optional/cons/copy.cc: New file.
11286         * unittests/optional/cons/default.cc: New file.
11287         * unittests/optional/cons/move.cc: New file.
11288         * unittests/optional/cons/value.cc: New file.
11289         * unittests/optional/in_place.cc: New file.
11290         * unittests/optional/observers/1.cc: New file.
11291         * unittests/optional/observers/2.cc: New file.
11292
11293 2017-04-18  Pedro Alves  <palves@redhat.com>
11294
11295         * common/gdb_optional.h: Include common/traits.h.
11296         (in_place_t): New type.
11297         (in_place): New constexpr variable.
11298         (optional::optional): Remove member initialization of
11299         m_instantiated.
11300         (optional::optional(in_place_t...)): New constructor.
11301         (optional::~optional): Use reset.
11302         (optional::optional(const optional&)): New.
11303         (optional::optional(const optional&&)): New.
11304         (optional::optional(T &)): New.
11305         (optional::optional(T &&)): New.
11306         (operator::operator=(const optional &)): New.
11307         (operator::operator=(optional &&)): New.
11308         (operator::operator= (const T &))
11309         (operator::operator= (T &&))
11310         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
11311         (operator::reset): New.
11312         (operator::m_instantiated):: Add in-class initializer.
11313         * common/traits.h: Include <type_traits>.
11314         (struct And): New types.
11315
11316 2017-04-18  Pedro Alves  <palves@redhat.com>
11317
11318         * xml-support.c: Include <vector>.
11319         (scope_level::scope_level(const gdb_xml_element *))
11320         (scope_level::scope_level(scope_level&&)): New.
11321         (scope_level::~scope_level): New.
11322         (scope_level_s): Delete.
11323         (gdb_xml_parser::scopes): Now a std::vector.
11324         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11325         Use std::vector.
11326         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11327         scope cleanup code.
11328         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11329         of the scopes member.  Use std::vector::emplace_back.
11330
11331 2017-04-18  Pedro Alves  <palves@redhat.com>
11332
11333         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
11334         a bool.
11335         (gdb_xml_end_element): Change type of first parameter.
11336         (gdb_xml_cleanup): Rename to ...
11337         (gdb_xml_parser::~gdb_xml_parser): ... this.
11338         (gdb_xml_create_parser_and_cleanup): Delete with ...
11339         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11340         to this new ctor.
11341         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11342         using gdb_xml_create_parser_and_cleanup.
11343         (xinclude_parsing_data): Add ctor/dtor.
11344         (xml_xinclude_cleanup): Delete.
11345         (xml_process_xincludes): Create a local xinclude_parsing_data
11346         instead of heap-allocating one.  Create a local gdb_xml_parser
11347         instead of heap-allocating one with
11348         gdb_xml_create_parser_and_cleanup.
11349
11350 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
11351
11352         PR threads/20743
11353         * fbsd-nat.c (resume_one_thread_cb): Remove.
11354         (resume_all_threads_cb): Remove.
11355         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11356         iterate_over_threads.
11357
11358 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11359
11360         * NEWS: Create a new section for the next release branch.
11361         Rename the section of the current branch, now that it has
11362         been cut.
11363
11364 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11365
11366         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11367         * version.in: Bump version to 8.0.50.DATE-git.
11368
11369 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
11370
11371         PR gdb/21385
11372         * windows-nat.c (windows_create_inferior): Declare 'allargs'
11373         independently of the host, and fix build breakage on Cygwin.
11374
11375 2017-04-13  Pedro Alves  <palves@redhat.com>
11376
11377         * inferior.c (free_inferior): Convert to ...
11378         (inferior::~inferior): ... this dtor.
11379         (inferior::inferior): New ctor, factored out from ...
11380         (add_inferior_silent): ... here.  Allocate the inferior with a new
11381         expression.
11382         (delete_inferior): Call delete instead of free_inferior.
11383         * inferior.h (gdb_environ, continuation): Forward declare.
11384         (inferior): Now a class.  Add in-class initialization to all
11385         members.  Make boolean fields bool, except 'detaching'.
11386         (inferior::inferior): New explicit ctor.
11387         (inferior::~inferior): New.
11388
11389 2017-04-13  Pedro Alves  <palves@redhat.com>
11390
11391         * inferior.c (init_inferior_list): Delete.
11392         * inferior.h (init_inferior_list): Delete.
11393
11394 2017-04-13  Pedro Alves  <palves@redhat.com>
11395
11396         PR threads/13217
11397         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11398         (top level): Call it twice, with different thread sets.
11399
11400 2017-04-13  Pedro Alves  <palves@redhat.com>
11401
11402         * thread.c: Include <algorithm>.
11403         (thread_array_cleanup): Delete.
11404         (scoped_inc_dec_ref): New class.
11405         (live_threads_count): New function.
11406         (set_thread_refcount): Delete.
11407         (tp_array_compar_ascending): Now a bool.
11408         (tp_array_compar): Convert to a std::sort comparison function.
11409         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11410         and live_threads_count.
11411
11412 2017-04-13  Pedro Alves  <palves@redhat.com>
11413
11414         * infrun.c (follow_fork_inferior): Also switch the current
11415         inferior.
11416
11417 2017-04-13  Pedro Alves  <palves@redhat.com>
11418
11419         * breakpoint.c (watch_command_1): Save watchpoint-frame info
11420         before calling create_internal_breakpoint.
11421
11422 2017-04-13  Pedro Alves  <palves@redhat.com>
11423
11424         * fork-child.c (execv_argv): New class.
11425         (breakup_args): Refactored as ...
11426         (execv_argv::init_for_no_shell): .. this method of execv_argv.
11427         Copy arguments to storage and replace separators with NULL
11428         terminators in place.
11429         (escape_bang_in_quoted_argument): Adjust to return bool.
11430         (execv_argv::execv_argv): New ctor.
11431         (execv_argv::init_for_shell): New method, factored out from
11432         fork_inferior.  Don't strdup strings into the vector.
11433         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
11434         Remove free_vector_argv call.
11435
11436 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11437
11438         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11439         tdep->rx_psw_type.
11440
11441 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11442
11443         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11444         * rx-tdep.c (rx_gdbarch_init): Likewise.
11445
11446 2017-04-13  Pedro Alves  <palves@redhat.com>
11447
11448         * breakpoint.h (struct breakpoint): Reindent.
11449
11450 2017-04-13  Pedro Alves  <palves@redhat.com>
11451
11452         * breakpoint.c (bp_location): Rename to ...
11453         (bp_locations): ... this.  All references updated.
11454         (bp_location_count): Rename to ...
11455         (bp_locations_count): ... this.  All references updated.
11456         (bp_location_placed_address_before_address_max): Rename to ...
11457         (bp_locations_placed_address_before_address_max): ... this.  All
11458         references updated.
11459         (bp_location_shadow_len_after_address_max): Rename to ...
11460         (bp_locations_shadow_len_after_address_max): ... this.  All
11461         references updated.
11462         (bp_location_compare_addrs): Rename to ...
11463         (bp_locations_compare_addrs): ... this.  All references updated.
11464         (bp_location_compare):Rename to ...
11465         (bp_locations_compare): ... this.  All references updated.
11466         (bp_location_target_extensions_update): Rename to ...
11467         (bp_locations_target_extensions_update): ... this.  All references
11468         updated.
11469
11470 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11471
11472         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11473         * common/common.m4: Check headers 'termios.h', 'termio.h' and
11474         'sgtty.h'.
11475         * common/gdb_termios.h: New file, with parts of "terminal.h".
11476         * inflow.c: Include "gdb_termios.h".
11477         * ser-unix.c: Include "gdb_termios.h".
11478         * terminal.h: Move terminal-related defines to
11479         "common/gdb_termios.h".
11480
11481 2017-04-12  Tom Tromey  <tom@tromey.com>
11482
11483         * probe.c (parse_probes): Update.
11484         * location.h (delete_event_location): Don't declare.
11485         (event_location_deleter::operator()): Update.
11486         * location.c (event_location_deleter::operator()): Rename from
11487         delete_event_location.
11488         * linespec.h (linespec_result) <location>: Change type to
11489         event_location_up.
11490         * linespec.c (canonicalize_linespec, event_location_to_sals)
11491         (decode_objc): Update.
11492         (linespec_result): Don't call delete_event_location.
11493         * breakpoint.c (create_breakpoints_sal)
11494         (bkpt_probe_create_sals_from_location)
11495         (strace_marker_create_sals_from_location): Update.
11496
11497 2017-04-12  Tom Tromey  <tom@tromey.com>
11498
11499         * linespec.h (struct linespec_result): Add constructor and
11500         destructor.
11501         (init_linespec_result, destroy_linespec_result)
11502         (make_cleanup_destroy_linespec_result): Don't declare.
11503         * linespec.c (init_linespec_result): Remove.
11504         (linespec_result::~linespec_result): Rename from
11505         destroy_linespec_result.  Update.
11506         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11507         Remove.
11508         * breakpoint.c (create_breakpoint, break_range_command)
11509         (decode_location_default): Update.
11510         * ax-gdb.c (agent_command_1): Update.
11511
11512 2017-04-12  Tom Tromey  <tom@tromey.com>
11513
11514         * remote.c (remote_download_tracepoint): Update.
11515         * python/py-breakpoint.c (bppy_get_location): Update.
11516         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11517         (gdbscm_breakpoint_location): Update.
11518         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11519         * breakpoint.h (struct breakpoint) <location, location_range_end>:
11520         Change type to event_location_up.
11521         * breakpoint.c (create_overlay_event_breakpoint)
11522         (create_longjmp_master_breakpoint)
11523         (create_std_terminate_master_breakpoint)
11524         (create_exception_master_breakpoint)
11525         (breakpoint_event_location_empty_p, print_breakpoint_location)
11526         (print_one_breakpoint_location, create_thread_event_breakpoint)
11527         (init_breakpoint_sal, create_breakpoint)
11528         (print_recreate_ranged_breakpoint, break_range_command)
11529         (init_ada_exception_breakpoint, say_where): Update.
11530         (base_breakpoint_dtor): Don't call delete_event_location.
11531         (bkpt_print_recreate, tracepoint_print_recreate)
11532         (dprintf_print_recreate, update_static_tracepoint)
11533         (breakpoint_re_set_default): Update.
11534
11535 2017-04-12  Tom Tromey  <tom@tromey.com>
11536
11537         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11538         type of "to_do".  Update.
11539         (compute_stack_depth): Use std::vector.
11540
11541 2017-04-12  Tom Tromey  <tom@tromey.com>
11542
11543         * printcmd.c (find_instruction_backward): Use std::vector.
11544
11545 2017-04-12  Tom Tromey  <tom@tromey.com>
11546
11547         * symfile.c (objfilep): Remove typedef.
11548         (reread_symbols): Use a std::vector.
11549
11550 2017-04-12  Tom Tromey  <tom@tromey.com>
11551
11552         * mi/mi-main.c (exec_direction_forward): Remove.
11553         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11554         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11555         scoped_restore.
11556         * guile/guile.c (guile_repl_command, guile_command)
11557         (gdbscm_execute_gdb_command): Use scoped_restore.
11558         * go-exp.y (go_parse): Use scoped_restore.
11559         * d-exp.y (d_parse): Use scoped_restore.
11560         * cli/cli-decode.c (cmd_func): Use scoped_restore.
11561         * c-exp.y (c_parse): Use scoped_restore.
11562
11563 2017-04-12  Tom Tromey  <tom@tromey.com>
11564
11565         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11566         (mi_parse): Update return type.
11567         (mi_parse_free): Remove.
11568         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11569         (mi_parse::~mi_parse): Rename from mi_parse_free.
11570         (mi_parse_cleanup): Remove.
11571         (mi_parse): Return a unique_ptr.  Use new.
11572         * mi/mi-main.c (mi_execute_command): Update.
11573
11574 2017-04-12  Tom Tromey  <tom@tromey.com>
11575
11576         * location.c (explicit_location_lex_one): Return a
11577         unique_xmalloc_ptr.
11578         (string_to_explicit_location): Update.  Remove cleanups.
11579
11580 2017-04-12  Tom Tromey  <tom@tromey.com>
11581
11582         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11583         (compare_value_and_voffset): Change type.  Update.
11584         (compute_vtable_size): Change type of "offset_vec".
11585         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
11586         (gnuv3_get_typeid): Remove extraneous declaration.
11587
11588 2017-04-12  Tom Tromey  <tom@tromey.com>
11589
11590         * charset.h (wchar_iterator): Fix comment.
11591
11592 2017-04-12  Tom Tromey  <tom@tromey.com>
11593
11594         * charset.c (iconv_wrapper): New class.
11595         (cleanup_iconv): Remove.
11596         (convert_between_encodings): Use it.
11597
11598 2017-04-12  Tom Tromey  <tom@tromey.com>
11599
11600         * symfile.h (increment_reading_symtab): Update type.
11601         * symfile.c (decrement_reading_symtab): Remove.
11602         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11603         * psymtab.c (psymtab_to_symtab): Update.
11604         * dwarf2read.c (dw2_instantiate_symtab): Update.
11605
11606 2017-04-12  Tom Tromey  <tom@tromey.com>
11607
11608         * jit.c (struct jit_reader): Declare separately.  Add constructor
11609         and destructor.  Change type of "handle".
11610         (loaded_jit_reader): Define separately.
11611         (jit_reader_load): Update.  New "new".
11612         (jit_reader_unload_command): Use "delete".
11613         * gdb-dlfcn.h (struct dlclose_deleter): New.
11614         (gdb_dlhandle_up): New typedef.
11615         (gdb_dlopen, gdb_dlsym): Update types.
11616         (gdb_dlclose): Remove.
11617         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11618         (gdb_dlsym): Change type of "handle".
11619         (make_cleanup_dlclose): Remove.
11620         (dlclose_deleter::operator()): Rename from gdb_dlclose.
11621         * compile/compile-c-support.c (load_libcc): Update.
11622
11623 2017-04-12  Tom Tromey  <tom@tromey.com>
11624
11625         * symtab.h (find_pcs_for_symtab_line): Change return type.
11626         * symtab.c (find_pcs_for_symtab_line): Change return type.
11627         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11628         type of "vec".  Update.
11629         (ltpy_get_pcs_for_line): Update.
11630         * linespec.c (decode_digits_ordinary): Update.
11631
11632 2017-04-12  Tom Tromey  <tom@tromey.com>
11633
11634         * tracepoint.c (actions_command): Update.
11635         * python/python.c (python_command, python_interactive_command):
11636         Update.
11637         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11638         * guile/guile.c (guile_command): Update.
11639         * defs.h (read_command_lines, read_command_lines_1): Return
11640         command_line_up.
11641         (command_lines_deleter): New struct.
11642         (command_line_up): New typedef.
11643         * compile/compile.c (compile_code_command)
11644         (compile_print_command): Update.
11645         * cli/cli-script.h (get_command_line, copy_command_lines): Return
11646         command_line_up.
11647         (make_cleanup_free_command_lines): Remove.
11648         * cli/cli-script.c (get_command_line, read_command_lines_1)
11649         (copy_command_lines): Return command_line_up.
11650         (while_command, if_command, read_command_lines, define_command)
11651         (document_command): Update.
11652         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11653         Remove.
11654         * breakpoint.h (breakpoint_set_commands): Change type of
11655         "commands".
11656         * breakpoint.c (breakpoint_set_commands): Change type of
11657         "commands".  Update.
11658         (do_map_commands_command, update_dprintf_command_list)
11659         (create_tracepoint_from_upload): Update.
11660
11661 2017-04-12  Tom Tromey  <tom@tromey.com>
11662
11663         * tracepoint.c (scope_info): Update.
11664         * spu-tdep.c (spu_catch_start): Update.
11665         * python/python.c (gdbpy_decode_line): Update.
11666         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11667         * python/py-breakpoint.c (bppy_init): Update.
11668         * probe.c (parse_probes): Update.
11669         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11670         * location.h (event_location_deleter): New struct.
11671         (event_location_up): New typedef.
11672         (new_linespec_location, new_address_location, new_probe_location)
11673         (new_explicit_location, copy_event_location)
11674         (string_to_event_location, string_to_event_location_basic)
11675         (string_to_explicit_location): Update return type.
11676         (make_cleanup_delete_event_location): Remove.
11677         * location.c (new_linespec_location, new_address_location)
11678         (new_probe_location, new_explicit_location, copy_event_location):
11679         Return event_location_up.
11680         (delete_event_location_cleanup)
11681         (make_cleanup_delete_event_location): Remove.
11682         (string_to_explicit_location, string_to_event_location_basic)
11683         (string_to_event_location): Return event_location_up.
11684         * linespec.c (canonicalize_linespec, event_location_to_sals)
11685         (decode_line_with_current_source)
11686         (decode_line_with_last_displayed, decode_objc): Update.
11687         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11688         * completer.c (location_completer): Update.
11689         * cli/cli-cmds.c (edit_command, list_command): Update.
11690         * breakpoint.c (create_overlay_event_breakpoint)
11691         (create_longjmp_master_breakpoint)
11692         (create_std_terminate_master_breakpoint)
11693         (create_exception_master_breakpoint)
11694         (create_thread_event_breakpoint): Update.
11695         (init_breakpoint_sal): Update.  Remove some dead code.
11696         (create_breakpoint_sal): Change type of "location".  Update.
11697         (create_breakpoints_sal, create_breakpoint, break_command_1)
11698         (dprintf_command, break_range_command, until_break_command)
11699         (init_ada_exception_breakpoint)
11700         (strace_marker_create_sals_from_location)
11701         (update_static_tracepoint, trace_command, ftrace_command)
11702         (strace_command, create_tracepoint_from_upload): Update.
11703         * break-catch-throw.c (re_set_exception_catchpoint): Update.
11704         * ax-gdb.c (agent_command_1): Update.
11705
11706 2017-04-12  Pedro Alves  <palves@redhat.com>
11707
11708         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11709         * configure.tgt: Handle i[34567]86-*-go32* and
11710         i[34567]86-*-msdosdjgpp*.
11711         * i386-tdep.c (i386_svr4_reg_to_regnum):
11712         Make extern.
11713         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11714         i386-go32-tdep.c.
11715         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11716         * i386-go32-tdep.c: New file.
11717         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
11718         declarations.
11719
11720 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
11721
11722         * aix-thread.c (pd_status2str): Change return type to const char *.
11723
11724 2017-04-12  Pedro Alves  <palves@redhat.com>
11725
11726         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
11727         calls to set_gdbarch_gnu_triplet_regexp.
11728
11729 2017-04-12  Pedro Alves  <palves@redhat.com>
11730
11731         PR gdb/21323
11732         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
11733         New enum value.
11734         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
11735         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
11736         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
11737         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
11738         * gdbarch.h, gdbarch.c: Regenerate.
11739         * aarch64-tdep.c (aarch64_gdbarch_init): Override
11740         gdbarch_wchar_bit and gdbarch_wchar_signed.
11741         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
11742         * arm-tdep.c (arm_gdbarch_init): Likewise.
11743         * avr-tdep.c (avr_gdbarch_init): Likewise.
11744         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
11745         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
11746         * i386-tdep.c (i386_go32_init_abi): Likewise.
11747         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11748         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11749         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11750         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11751         * sh-tdep.c (sh_gdbarch_init): Likewise.
11752         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11753         * sparc64-tdep.c (sparc64_init_abi): Likewise.
11754         * windows-tdep.c (windows_init_abi): Likewise.
11755         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11756
11757 2017-04-12  Pedro Alves  <palves@redhat.com>
11758
11759         PR c++/21323
11760         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
11761         cplus_primitive_type_char32_t>: New enum values.
11762         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
11763         and cplus_primitive_type_char32_t.
11764         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
11765         32, use the archtecture's built-in type for char16_t and char32_t,
11766         respectively.  Otherwise, fallback to init_integer_type as before,
11767         but make the type unsigned, and issue a complaint.
11768         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
11769
11770 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
11771
11772         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
11773         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
11774
11775 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11776
11777         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
11778         'const char *'.
11779
11780 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11781
11782         * common/common-utils.c (free_vector_argv): New function.
11783         * common/common-utils.h: Include <vector>.
11784         (free_vector_argv): New prototype.
11785         * darwin-nat.c (darwin_create_inferior): Rewrite function
11786         prototype in order to constify "exec_file" and accept a
11787         "std::string" for "allargs".
11788         * fork-child.c: Include <vector>.
11789         (breakup_args): Rewrite function, using C++.
11790         (fork_inferior): Rewrite function header, constify "exec_file_arg"
11791         and accept "std::string" for "allargs".  Update the code to
11792         calculate "argv" based on "allargs".  Update calls to "exec_fun"
11793         and "execvp".
11794         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
11795         order to constify "exec_file" and accept a "std::string" for
11796         "allargs".
11797         * go32-nat.c (go32_create_inferior): Likewise.
11798         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
11799         * infcmd.c (run_command_1): Constify "exec_file".  Use
11800         "std::string" for inferior arguments.
11801         * inferior.h (fork_inferior): Update prototype.
11802         * linux-nat.c (linux_nat_create_inferior): Rewrite function
11803         prototype in order to constify "exec_file" and accept a
11804         "std::string" for "allargs".
11805         * nto-procfs.c (procfs_create_inferior): Likewise.
11806         * procfs.c (procfs_create_inferior): Likewise.
11807         * remote-sim.c (gdbsim_create_inferior): Likewise.
11808         * remote.c (extended_remote_run): Update code to accept
11809         "std::string" as argument.
11810         (extended_remote_create_inferior): Rewrite function prototype in
11811         order to constify "exec_file" and accept a "std::string" for
11812         "allargs".
11813         * rs6000-nat.c (super_create_inferior): Likewise.
11814         (rs6000_create_inferior): Likewise.
11815         * target.h (struct target_ops) <to_create_inferior>: Likewise.
11816         * windows-nat.c (windows_create_inferior): Likewise.
11817
11818 2017-04-11  Pedro Alves  <palves@redhat.com>
11819
11820         * thread.c: Fix whitespace throughout.
11821
11822 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11823
11824         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
11825
11826 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
11827
11828         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
11829
11830 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
11831
11832         PR gdb/21364
11833         * osdata.c (info_osdata): Check if 'type' is an empty string
11834         instead of NULL.
11835
11836 2017-04-10  Pedro Alves  <palves@redhat.com>
11837
11838         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
11839         (ptid_to_global_thread_id, in_thread_list)
11840         (do_captured_list_thread_ids, set_resumed, set_running)
11841         (set_executing, set_stop_requested, finish_thread_state)
11842         (validate_registers_access, can_access_registers_ptid)
11843         (print_thread_info_1, switch_to_thread)
11844         (do_restore_current_thread_cleanup)
11845         (make_cleanup_restore_current_thread, thread_command)
11846         (thread_name_command): Use operator== instead of ptid_equal.
11847
11848 2017-04-10  Pedro Alves  <palves@redhat.com>
11849
11850         * thread.c (struct current_thread_cleanup) <next>: Delete field.
11851         (current_thread_cleanup_chain): Delete.
11852         (restore_current_thread_cleanup_dtor)
11853         (make_cleanup_restore_current_thread): Remove references to
11854         current_thread_cleanup_chain.
11855
11856 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
11857
11858         * msp430-tdep.c (msp430_pseudo_register_read): Never return
11859         REG_UNKNOWN.
11860
11861 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11862
11863         PR gdb/19942
11864         * gdbthread.h (thread_info::deletable): New method.
11865         (thread_info::incref): New method.
11866         (thread_info::decref): New method.
11867         (thread_info::refcount): Move it to private.
11868         * infrun.c (save_stop_context): Call inc_refcount.
11869         (release_stop_context_cleanup): Likewise.
11870         * thread.c (set_thread_exited): New function.
11871         (init_thread_list): Delete "tp" only it is deletable, otherwise
11872         call set_thread_exited.
11873         (delete_thread_1): Call set_thread_exited.
11874         (current_thread_cleanup) <inferior_pid>: Remove.
11875         <thread>: New field.
11876         (restore_current_thread_ptid_changed): Removed.
11877         (do_restore_current_thread_cleanup): Adjust.
11878         (restore_current_thread_cleanup_dtor): Don't call
11879         find_thread_ptid.
11880         (set_thread_refcount): Use dec_refcount.
11881         (make_cleanup_restore_current_thread): Adjust.
11882         (thread_apply_all_command): Call inc_refcount.
11883         (_initialize_thread): Don't call
11884         observer_attach_thread_ptid_changed.
11885
11886 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11887
11888         * thread.c (delete_thread_1): Hoist code on marking thread as
11889         exited.
11890
11891 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11892
11893         * windows-nat.c (windows_detach): Initialize ptid with
11894         minus_one_ptid.
11895
11896 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11897
11898         * unittests/ptid-selftests.c: Fix erroneous assert messages.
11899
11900 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
11901
11902         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
11903         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
11904         (bfin_pseudo_register_write): Likewise
11905
11906 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
11907
11908         * common/ptid.h (struct ptid): Change to...
11909         (class ptid_t): ... this.
11910         <ptid_t>: New constructors.
11911         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
11912         matches>: New methods.
11913         <make_null, make_minus_one>: New static methods.
11914         <pid>: Rename to...
11915         <m_pid>: ...this.
11916         <lwp>: Rename to...
11917         <m_lwp>: ...this.
11918         <tid>: Rename to...
11919         <m_tid>: ...this.
11920         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
11921         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
11922         as references, move comment to class ptid_t.
11923         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
11924         ptid_t static methods.
11925         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
11926         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
11927         Take ptid arguments as references, implement using ptid_t methods.
11928         * unittests/ptid-selftests.c: New file.
11929         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11930         unittests/ptid-selftests.c.
11931         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
11932
11933 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
11934
11935         * python/python.c (python_run_simple_file): Cast mode literal to
11936         non-const char pointer as expected by PyFile_FromString.
11937
11938 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
11939
11940         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
11941         minus_one_ptid and null_ptid.
11942
11943 2017-04-05  Pedro Alves  <palves@redhat.com>
11944
11945         * warning.m4 (build_warnings): Remove -Wno-write-strings.
11946         * configure: Regenerate.
11947
11948 2017-04-05  Pedro Alves  <palves@redhat.com>
11949
11950         * ada-exp.y (yyerror): Constify.
11951         * ada-lang.c (bound_name, get_selections)
11952         (ada_variant_discrim_type)
11953         (ada_variant_discrim_name, ada_value_struct_elt)
11954         (ada_lookup_struct_elt_type, is_unchecked_variant)
11955         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
11956         (catch_ada_exception_command_split)
11957         (catch_ada_assert_command_split, catch_assert_command)
11958         (ada_op_name): Constify.
11959         * ada-lang.h (ada_yyerror, get_selections)
11960         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
11961         * arc-tdep.c (arc_print_frame_cache): Constify.
11962         * arm-tdep.c (arm_skip_stub): Constify.
11963         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
11964         (gen_aggregate_elt_ref): Constify.
11965         * bcache.c (print_bcache_statistics): Constify.
11966         * bcache.h (print_bcache_statistics): Constify.
11967         * break-catch-throw.c (catch_exception_command_1):
11968         * breakpoint.c (struct ep_type_description::description):
11969         Constify.
11970         (add_solib_catchpoint): Constify.
11971         (catch_fork_command_1): Add cast.
11972         (add_catch_command): Constify.
11973         * breakpoint.h (add_catch_command, add_solib_catchpoint):
11974         Constify.
11975         * bsd-uthread.c (bsd_uthread_state): Constify.
11976         * buildsym.c (patch_subfile_names): Constify.
11977         * buildsym.h (next_symbol_text_func, patch_subfile_names):
11978         Constify.
11979         * c-exp.y (yyerror): Constify.
11980         (token::oper): Constify.
11981         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
11982         * c-varobj.c (cplus_describe_child): Constify.
11983         * charset.c (find_charset_names): Add cast.
11984         (find_charset_names): Constify array and add const_cast.
11985         * cli/cli-cmds.c (complete_command, cd_command): Constify.
11986         (edit_command): Constify.
11987         * cli/cli-decode.c (lookup_cmd): Constify.
11988         * cli/cli-dump.c (dump_memory_command, dump_value_command):
11989         Constify.
11990         (struct dump_context): Constify.
11991         (add_dump_command, restore_command): Constify.
11992         * cli/cli-script.c (get_command_line): Constify.
11993         * cli/cli-script.h (get_command_line): Constify.
11994         * cli/cli-utils.c (check_for_argument): Constify.
11995         * cli/cli-utils.h (check_for_argument): Constify.
11996         * coff-pe-read.c (struct read_pe_section_data): Constify.
11997         * command.h (lookup_cmd): Constify.
11998         * common/print-utils.c (decimal2str): Constify.
11999         * completer.c (gdb_print_filename): Constify.
12000         * corefile.c (set_gnutarget): Constify.
12001         * cp-name-parser.y (yyerror): Constify.
12002         * cp-valprint.c (cp_print_class_member): Constify.
12003         * cris-tdep.c (cris_register_name, crisv32_register_name):
12004         Constify.
12005         * d-exp.y (yyerror): Constify.
12006         (struct token::oper): Constify.
12007         * d-lang.h (d_yyerror): Constify.
12008         * dbxread.c (struct header_file_location::name): Constify.
12009         (add_old_header_file, add_new_header_file, last_function_name)
12010         (dbx_next_symbol_text, add_bincl_to_list)
12011         (find_corresponding_bincl_psymtab, set_namestring)
12012         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12013         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12014         * defs.h (command_line_input, print_address_symbolic)
12015         (deprecated_readline_begin_hook): Constify.
12016         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12017         Constify.
12018         * event-top.c (handle_line_of_input): Constify and add cast.
12019         * exceptions.c (catch_errors): Constify.
12020         * exceptions.h (catch_errors): Constify.
12021         * expprint.c (print_subexp_standard, op_string, op_name)
12022         (op_name_standard, dump_raw_expression, dump_raw_expression):
12023         * expression.h (op_name, op_string, dump_raw_expression):
12024         Constify.
12025         * f-exp.y (yyerror): Constify.
12026         (struct token::oper): Constify.
12027         (struct f77_boolean_val::name): Constify.
12028         * f-lang.c (f_word_break_characters): Constify.
12029         * f-lang.h (f_yyerror): Constify.
12030         * fork-child.c (fork_inferior): Add cast.
12031         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12032         (new_variant): Constify.
12033         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12034         * gdbarch.c: Regenerate.
12035         * gdbcore.h (set_gnutarget): Constify.
12036         * go-exp.y (yyerror): Constify.
12037         (token::oper): Constify.
12038         * go-lang.h (go_yyerror): Constify.
12039         * go32-nat.c (go32_sysinfo): Constify.
12040         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12041         * guile/scm-cmd.c (cmdscm_function): Constify.
12042         * guile/scm-param.c (pascm_param_value): Constify.
12043         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12044         (h8300sx_register_name): Constify.
12045         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12046         Constify.
12047         * ia64-tdep.c (ia64_register_names): Constify.
12048         * infcmd.c (construct_inferior_arguments): Constify.
12049         (path_command, attach_post_wait): Constify.
12050         * language.c (show_range_command, show_case_command)
12051         (unk_lang_error): Constify.
12052         * language.h (language_defn::la_error)
12053         (language_defn::la_name_of_this): Constify.
12054         * linespec.c (decode_line_2): Constify.
12055         * linux-thread-db.c (thread_db_err_str): Constify.
12056         * lm32-tdep.c (lm32_register_name): Constify.
12057         * m2-exp.y (yyerror): Constify.
12058         * m2-lang.h (m2_yyerror): Constify.
12059         * m32r-tdep.c (m32r_register_names): Constify and make static.
12060         * m68hc11-tdep.c (m68hc11_register_names): Constify.
12061         * m88k-tdep.c (m88k_register_name): Constify.
12062         * macroexp.c (appendmem): Constify.
12063         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12064         (upgrade_type, parse_external, parse_partial_symbols)
12065         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12066         (new_symbol): Constify.
12067         * memattr.c (mem_info_command): Constify.
12068         * mep-tdep.c (register_name_from_keyword): Constify.
12069         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12070         Constify.
12071         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12072         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12073         * mi/mi-main.c (captured_mi_execute_command): Constify and add
12074         cast.
12075         (mi_execute_async_cli_command): Constify.
12076         * mips-tdep.c (mips_register_name): Constify.
12077         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12078         (am33_register_name, am33_2_register_name)
12079         * moxie-tdep.c (moxie_register_names): Constify.
12080         * nat/linux-osdata.c (osdata_type): Constify fields.
12081         * nto-tdep.c (nto_parse_redirection): Constify.
12082         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12083         (lookup_child_selector): Constify.
12084         (objc_methcall::name): Constify.
12085         * objc-lang.h (lookup_objc_class, lookup_child_selector)
12086         (lookup_struct_typedef): Constify.
12087         * objfiles.c (pc_in_section): Constify.
12088         * objfiles.h (pc_in_section): Constify.
12089         * p-exp.y (struct token::oper): Constify.
12090         (yyerror): Constify.
12091         * p-lang.h (pascal_yyerror): Constify.
12092         * parser-defs.h (op_name_standard): Constify.
12093         (op_print::string): Constify.
12094         (exp_descriptor::op_name): Constify.
12095         * printcmd.c (print_address_symbolic): Constify.
12096         * psymtab.c (print_partial_symbols): Constify.
12097         * python/py-breakpoint.c (stop_func): Constify.
12098         (bppy_get_expression): Constify.
12099         * python/py-cmd.c (cmdpy_completer::name): Constify.
12100         (cmdpy_function): Constify.
12101         * python/py-event.c (evpy_add_attribute)
12102         (gdbpy_initialize_event_generic): Constify.
12103         * python/py-event.h (evpy_add_attribute)
12104         (gdbpy_initialize_event_generic): Constify.
12105         * python/py-evts.c (add_new_registry): Constify.
12106         * python/py-finishbreakpoint.c (outofscope_func): Constify.
12107         * python/py-framefilter.c (get_py_iter_from_func): Constify.
12108         * python/py-inferior.c (get_buffer): Add cast.
12109         * python/py-param.c (parm_constant::name): Constify.
12110         * python/py-unwind.c (fprint_frame_id): Constify.
12111         * python/python.c (gdbpy_parameter_value): Constify.
12112         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12113         * remote.c (memory_packet_config::name): Constify.
12114         (show_packet_config_cmd, remote_write_bytes)
12115         (remote_buffer_add_string):
12116         * reverse.c (exec_reverse_once): Constify.
12117         * rs6000-tdep.c (variant::name, variant::description): Constify.
12118         * rust-exp.y (rustyyerror): Constify.
12119         * rust-lang.c (rust_op_name): Constify.
12120         * rust-lang.h (rustyyerror): Constify.
12121         * serial.h (serial_ops::name): Constify.
12122         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12123         (sh_sh3e_register_name, sh_sh2e_register_name)
12124         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12125         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12126         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12127         (sh_sh4al_dsp_register_name): Constify.
12128         * sh64-tdep.c (sh64_register_name): Constify.
12129         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12130         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12131         * stabsread.c (patch_block_stabs, read_type_number)
12132         (ref_map::stabs, ref_add, process_reference)
12133         (symbol_reference_defined, define_symbol, define_symbol)
12134         (error_type, read_type, read_member_functions, read_cpp_abbrev)
12135         (read_one_struct_field, read_struct_fields, read_baseclasses)
12136         (read_tilde_fields, read_struct_type, read_array_type)
12137         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12138         (read_huge_number, read_range_type, read_args, common_block_start)
12139         (find_name_end): Constify.
12140         * stabsread.h (common_block_start, define_symbol)
12141         (process_one_symbol, symbol_reference_defined, ref_add):
12142         * symfile.c (get_section_index, add_symbol_file_command):
12143         * symfile.h (get_section_index): Constify.
12144         * target-descriptions.c (tdesc_type::name): Constify.
12145         (tdesc_free_type): Add cast.
12146         * target.c (find_default_run_target):
12147         (add_deprecated_target_alias, find_default_run_target)
12148         (target_announce_detach): Constify.
12149         (do_option): Constify.
12150         * target.h (add_deprecated_target_alias): Constify.
12151         * thread.c (print_thread_info_1): Constify.
12152         * top.c (deprecated_readline_begin_hook, command_line_input):
12153         Constify.
12154         (init_main): Add casts.
12155         * top.h (handle_line_of_input): Constify.
12156         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12157         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12158         (tfind_command): Rename to ...
12159         (tfind_command_1): ... this and constify.
12160         (tfind_command): New function.
12161         (tfind_end_command, tfind_start_command): Adjust.
12162         (encode_source_string): Constify.
12163         * tracepoint.h (encode_source_string): Constify.
12164         * tui/tui-data.c (tui_partial_win_by_name): Constify.
12165         * tui/tui-data.h (tui_partial_win_by_name): Constify.
12166         * tui/tui-source.c (tui_set_source_content_nil): Constify.
12167         * tui/tui-source.h (tui_set_source_content_nil): Constify.
12168         * tui/tui-win.c (parse_scrolling_args): Constify.
12169         * tui/tui-windata.c (tui_erase_data_content): Constify.
12170         * tui/tui-windata.h (tui_erase_data_content): Constify.
12171         * tui/tui-winsource.c (tui_erase_source_content): Constify.
12172         * tui/tui.c (tui_enable): Add cast.
12173         * utils.c (defaulted_query): Constify.
12174         (init_page_info): Add cast.
12175         (puts_debug, subset_compare): Constify.
12176         * utils.h (subset_compare): Constify.
12177         * varobj.c (varobj_format_string): Constify.
12178         * varobj.h (varobj_format_string): Constify.
12179         * vax-tdep.c (vax_register_name): Constify.
12180         * windows-nat.c (windows_detach): Constify.
12181         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12182         * xml-support.c (gdb_xml_end_element): Constify.
12183         * xml-tdesc.c (tdesc_start_reg): Constify.
12184         * xstormy16-tdep.c (xstormy16_register_name): Constify.
12185         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12186         * xtensa-tdep.h (xtensa_register_t::name): Constify.
12187
12188 2017-04-05  Pedro Alves  <palves@redhat.com>
12189
12190         * proc-api.c (struct trans): Constify.
12191         (procfs_note): Constify.
12192         * proc-events.c (struct trans, syscall_table):
12193         * proc-flags.c (struct trans): Constify.
12194         * proc-utils.h (procfs_note): Constify.
12195         * proc-why.c (struct trans): Constify.
12196         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12197         (procfs_detach): Constify.
12198         * sol-thread.c (struct string_map): Constify.
12199         (td_err_string, td_state_string): Constify.
12200
12201 2017-04-05  Pedro Alves  <palves@redhat.com>
12202
12203         * proc-api.c (procfs_filename): Don't initialize
12204         procfs_filename.
12205         (prepare_to_trace): Assume procfs_filename is non-NULL.
12206         (_initialize_proc_api): Give procfs_filename a default value here.
12207
12208 2017-04-05  Pedro Alves  <palves@redhat.com>
12209
12210         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12211         'cond_string' parameter.
12212         (extract_exception_regexp): Constify 'string' parameter.
12213         (catch_exception_command_1): Constify.
12214         * breakpoint.c (init_catchpoint)
12215         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12216         parameter.
12217         (ep_parse_optional_if_clause, catch_fork_command_1)
12218         (catch_exec_command_1): Constify.
12219         * breakpoint.h (init_catchpoint): Constify 'cond_string'
12220         parameter.
12221         (ep_parse_optional_if_clause): Constify.
12222         * cli/cli-utils.c (remove_trailing_whitespace)
12223         (check_for_argument): Constify.
12224         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12225         non-const overload.
12226         (check_for_argument): Likewise.
12227
12228 2017-04-05  Pedro Alves  <palves@redhat.com>
12229
12230         * event-top.c (command_line_handler): Add cast to execute_command
12231         call.
12232         * record-btrace.c (cmd_record_btrace_bts_start)
12233         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12234         (cmd_record_btrace_start): Add cast to execute_command call.
12235         * record-full.c (record_full_goto_insn):
12236         * record.c (record_start, record_stop): Add cast to
12237         execute_command_to_string calls.
12238         (cmd_record_start): Add cast to execute_command calls.
12239
12240 2017-04-05  Pedro Alves  <palves@redhat.com>
12241
12242         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12243         static inline function.
12244         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12245         array and use gdb_PyArg_ParseTupleAndKeywords.
12246         * python/py-cmd.c (cmdpy_init): Likewise.
12247         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12248         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12249         (infpy_search_memory): Likewise.
12250         * python/py-objfile.c (objfpy_add_separate_debug_file)
12251         (gdbpy_lookup_objfile): Likewise.
12252         * python/py-symbol.c (gdbpy_lookup_symbol)
12253         (gdbpy_lookup_global_symbol): Likewise.
12254         * python/py-type.c (gdbpy_lookup_type): Likewise.
12255         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12256         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12257         Likewise.
12258
12259 2017-04-05  Pedro Alves  <palves@redhat.com>
12260
12261         * python/python-internal.h (gdb_PyGetSetDef): New type.
12262         * python/py-block.c (block_object_getset)
12263         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12264         * python/py-event.c (event_object_getset)
12265         (finish_breakpoint_object_getset): Likewise.
12266         * python/py-inferior.c (inferior_object_getset): Likewise.
12267         * python/py-infthread.c (thread_object_getset): Likewise.
12268         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12269         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12270         * python/py-objfile.c (objfile_getset): Likewise.
12271         * python/py-progspace.c (pspace_getset): Likewise.
12272         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12273         Likewise.
12274         * python/py-record.c (recpy_record_getset): Likewise.
12275         * python/py-symbol.c (symbol_object_getset): Likewise.
12276         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12277         Likewise.
12278         * python/py-type.c (type_object_getset, field_object_getset):
12279         Likewise.
12280         * python/py-value.c (value_object_getset): Likewise.
12281
12282 2017-04-05  Pedro Alves  <palves@redhat.com>
12283
12284         * python/python-internal.h (gdb_PyObject_CallMethod)
12285         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12286         New functions.
12287         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12288         (PySys_GetObject, PySys_SetPath): New macros.
12289
12290 2017-04-05  Pedro Alves  <palves@redhat.com>
12291
12292         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12293         info_osdata_command.
12294         * osdata.c (info_osdata_command): Rename to ...
12295         (info_osdata): ... this.  Constify 'type' parameter, and remove
12296         the 'from_tty' parameter.  Accept NULL TYPE.
12297         (info_osdata_command): New function.
12298         * osdata.h (info_osdata_command): Remove declaration.
12299         (info_osdata): New declaration.
12300
12301 2017-04-05  Pedro Alves  <palves@redhat.com>
12302
12303         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12304         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12305         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12306         parameter.
12307         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12308         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12309         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12310         parameter.
12311         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12312         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12313         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12314         (mi_cmd_file_list_exec_source_files)
12315         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12316         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12317         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12318         parameter.
12319         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12320         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12321         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12322         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12323         (mi_cmd_stack_info_frame): Constify 'command' parameter.
12324         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12325         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12326         'command' parameter.
12327         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12328         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12329         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12330         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12331         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12332         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12333         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12334         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12335         (mi_cmd_var_set_update_range): Constify 'command' parameter.
12336         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12337         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12338         parameter.
12339         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12340         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12341         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12342         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12343         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12344         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12345         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12346         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12347         (mi_cmd_data_list_changed_registers)
12348         (mi_cmd_data_write_register_values)
12349         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12350         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12351         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12352         (mi_cmd_list_features, mi_cmd_list_target_features)
12353         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12354         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12355         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12356         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12357         (mi_cmd_trace_frame_collected): Constify 'command'
12358         parameter.
12359         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12360         'command' parameter.
12361
12362 2017-04-05  Pedro Alves  <palves@redhat.com>
12363
12364         * ada-lang.c (ada_completer_word_break_characters): Now a const
12365         array.
12366         (ada_get_gdb_completer_word_break_characters): Constify.
12367         * completer.c (gdb_completer_command_word_break_characters)
12368         (gdb_completer_file_name_break_characters)
12369         (gdb_completer_quote_characters): Now const arrays.
12370         (get_gdb_completer_quote_characters): Constify.
12371         (set_rl_completer_word_break_characters): New function.
12372         (set_gdb_completion_word_break_characters)
12373         (complete_line_internal): Use it.
12374         * completer.h (get_gdb_completer_quote_characters): Constify.
12375         (set_rl_completer_word_break_characters): Declare.
12376         * f-lang.c (f_word_break_characters): Constify.
12377         * language.c (default_word_break_characters): Constify.
12378         * language.h (language_defn::la_word_break_characters): Constify.
12379         (default_word_break_characters): Constify.
12380         * top.c (init_main): Use set_rl_completer_word_break_characters.
12381
12382 2017-04-05  Pedro Alves  <palves@redhat.com>
12383
12384         * aix-thread.c (aix_thread_pid_to_str)
12385         (aix_thread_extra_thread_info): Constify.
12386         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12387         * bsd-uthread.c (bsd_uthread_extra_thread_info)
12388         (bsd_uthread_pid_to_str): Constify.
12389         * corelow.c (core_pid_to_str): Constify.
12390         * darwin-nat.c (darwin_pid_to_str): Constify.
12391         * fbsd-nat.c (fbsd_pid_to_str): Constify.
12392         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12393         Constify.
12394         * gnu-nat.c (gnu_pid_to_str): Constify.
12395         * go32-nat.c (go32_pid_to_str): Constify.
12396         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12397         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12398         * inferior.c (inferior_pid_to_str): Constify.
12399         * linux-nat.c (linux_nat_pid_to_str): Constify.
12400         * linux-tdep.c (linux_core_pid_to_str): Constify.
12401         * linux-thread-db.c (thread_db_pid_to_str)
12402         (thread_db_extra_thread_info): Constify.
12403         * nto-tdep.c (nto_extra_thread_info): Constify.
12404         * nto-tdep.h (nto_extra_thread_info): Constify.
12405         * obsd-nat.c (obsd_pid_to_str): Constify.
12406         * procfs.c (procfs_pid_to_str): Constify.
12407         * ravenscar-thread.c (ravenscar_extra_thread_info)
12408         (ravenscar_pid_to_str): Constify.
12409         * remote-sim.c (gdbsim_pid_to_str): Constify.
12410         * remote.c (remote_threads_extra_info, remote_pid_to_str):
12411         Constify.
12412         * sol-thread.c (solaris_pid_to_str): Constify.
12413         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12414         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12415         * target.c (default_pid_to_str, target_pid_to_str)
12416         (normal_pid_to_str, default_pid_to_str): Constify.
12417         * target.h (target_ops::to_pid_to_str)
12418         (target_ops::to_extra_thread_info): Constify.
12419         (target_pid_to_str, normal_pid_to_str): Constify.
12420         * windows-nat.c (windows_pid_to_str): Constify.
12421         * gdbarch.sh (core_pid_to_str): Constify.
12422         * target-delegates.c: Regenerate.
12423         * gdbarch.h, gdbarch.c: Regenerate.
12424
12425 2017-04-05  Pedro Alves  <palves@redhat.com>
12426
12427         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12428         the memory of the temporary warning_pre_print override.
12429         * utils.c (warning_pre_print): Constify.
12430         * utils.h (warning_pre_print): Constify.
12431
12432 2017-04-05  Pedro Alves  <palves@redhat.com>
12433
12434         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12435         (shell_command): New function.
12436         (make_command): Use std::string.
12437         (init_cli_cmds): Register shell_command instead of shell_escape.
12438
12439 2017-04-05  Pedro Alves  <palves@redhat.com>
12440
12441         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12442         * tracepoint.c (default_collect): Don't initialize.
12443
12444 2017-04-05  Pedro Alves  <palves@redhat.com>
12445
12446         * macroexp.c (macro_buffer::shared): Now a bool.
12447         (init_buffer): Update.
12448         (init_shared_buffer): Constify 'addr' parameter.
12449         (substitute_args, expand, macro_expand, macro_expand_next): Remove
12450         casts.
12451
12452 2017-04-05  Pedro Alves  <palves@redhat.com>
12453
12454         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12455         * disasm.c (set_disassembler_options): Constify local.
12456         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12457
12458 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
12459
12460         PR gdb/21352
12461         * tracefile.c (tsave_command): Fix argument parsing for '-r'
12462         option.
12463
12464 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12465
12466         * frame.c (frame_unwind_register_unsigned): Call
12467         frame_unwind_register_value.
12468
12469 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12470
12471         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12472         Use gdb_test_multiple, and don't match anchor.
12473
12474 2017-04-05  Pedro Alves  <palves@redhat.com>
12475
12476         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12477         (Write After Approval): Remove Simon Marchi.
12478
12479 2017-04-05  Pedro Alves  <palves@redhat.com>
12480
12481         * common/gdb_optional.h (optional::optional): Make constexpr and
12482         initialize m_dummy.
12483
12484 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12485
12486         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12487         (amd64fbsd_jmp_buf_reg_offset): Remove.
12488         (amd64fbsd_supply_uthread): Remove function.
12489         (amd64fbsd_collect_uthread): Remove function.
12490         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12491         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12492         (x86_64-*-freebsd*): Remove bsd-uthread.o.
12493         (fbsd-nat.c): Update comment.
12494         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12495         (i386fbsd_jmp_buf_reg_offset): Remove.
12496         (i386fbsd_supply_uthread): Remove function.
12497         (i386fbsd_collect_uthread): Remove function.
12498         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12499
12500 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12501
12502         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12503         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12504         * NEWS: Mention that support for FreeBSD/alpha was removed.
12505         * alpha-fbsd-tdep.c: Delete file.
12506         * config/alpha/fbsd.mh: Delete file.
12507         * configure.host: Delete alpha*-*-freebsd* and
12508         alpha*-*-kfreebsd*-gnu.
12509         * configure.tgt: Delete alpha*-*-freebsd* and
12510         alpha*-*-kfreebsd*-gnu.
12511
12512 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12513
12514         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12515         amd64bsd_store_inferior_registers): Use ptid from regcache.
12516
12517 2017-04-04  Pedro Alves  <palves@redhat.com>
12518
12519         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
12520         data fields, make them private and add "m_" prefixes.
12521         (lnp_state_machine::lnp_state_machine): New ctor.
12522         (record_line, check_line_address, handle_set_discriminator)
12523         (handle_set_address, handle_advance_pc, handle_special_opcode)
12524         (handle_advance_line, handle_set_file, handle_negate_stmt)
12525         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12526         (end_sequence, advance_line): New methods.
12527         (m_gdbarch, m_record_lines_p): New fields.
12528         (lnp_reader_state): Delete.
12529         (dwarf_record_line): Rename to ...
12530         (lnp_state_machine::record_line): ... adjust.
12531         (init_lnp_state_machine): Delete.
12532         (lnp_state_machine::lnp_state_machine): New.
12533         (check_line_address): Rename to ...
12534         (lnp_state_machine::check_line_address): This.
12535         (dwarf_decode_lines_1): Remove reference to "reader_state".
12536         Adjust lnp_state_machine having a non-default ctor.  Use bool.
12537         State machine internal state manipulation moved to
12538         lnp_state_machine methods.
12539
12540 2017-04-04  Pedro Alves  <palves@redhat.com>
12541
12542         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12543         unittests/offset-type-selftests.c.
12544         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12545         * common/offset-type.h: New file.
12546         * common/preprocessor.h: New file.
12547         * common/traits.h: New file.
12548         * common/valid-expr.h: New file.
12549         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
12550         sect_offset and cu_offset strong typedefs throughout.
12551         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12552         typedefs throughout.
12553         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
12554         sect_offset and cu_offset strong typedefs throughout.
12555         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12556         typedefs throughout.
12557         * gdbtypes.h: Include "common/offset-type.h".
12558         (cu_offset): Now an offset type (strong typedef) instead of a
12559         struct.
12560         (sect_offset): Likewise.
12561         (union call_site_parameter_u): Rename "param_offset" field to
12562         "param_cu_off".
12563         * unittests/offset-type-selftests.c: New file.
12564
12565 2017-04-04  Pedro Alves  <palves@redhat.com>
12566
12567         * common/underlying.h: New file.
12568         * dwarf2read.c: Include "common/gdb_optional.h" and
12569         "common/underlying.h".
12570         (dir_index, file_name_index): New types.
12571         (file_entry): Use them.
12572         (file_entry::include): Use to_underlying.
12573         (line_header::add_file_name): Use dir_index.
12574         (read_formatted_entries): Use gdb::optional.  Read form before
12575         writting to file_entry.
12576         (dwarf_decode_line_header): Use dir_index.
12577         (lnp_state_machine::current_file): Use to_underlying.
12578         (lnp_state_machine::file): Change type to file_name_index.
12579         (dwarf_record_line): Use to_underlying.
12580         (init_lnp_state_machine): Use file_name_index.
12581         (dwarf_decode_lines_1): Use dir_index and file_name_index.
12582
12583 2017-04-04  Pedro Alves  <palves@redhat.com>
12584
12585         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12586         operator bool, has_value and get methods.
12587
12588 2017-04-04  Pedro Alves  <palves@redhat.com>
12589
12590         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12591         fields.
12592         (line_header): Initialize all data fields.  Change type of
12593         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12594         Change type of include_dirs to std::vector<const char *>.  Remove
12595         num_include_dirs, include_dirs_size.  Change type of file_names to
12596         std::vector<file_entry>.  Remove num_file_names, file_names_size.
12597         (line_header::line_header): New.
12598         (line_header::add_include_dir, line_header::add_file_name): New
12599         methods.
12600         (line_header::include_dir_at): Remove NULL check.
12601         (line_header::file_name_at): Add const overload.
12602         (line_header_up): New unique_ptr typedef.
12603         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
12604         std::vector.  Remove free_line_header call.
12605         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
12606         free_line_header call.
12607         (free_cu_line_header): Delete.
12608         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12609         (setup_type_unit_groups): Use line_header_up instead of cleanups.
12610         Adjust to use std::vector.
12611         (free_line_header): Delete.
12612         (free_line_header_voidp): Use delete.
12613         (add_include_dir): Replace with ...
12614         (line_header::add_include_dir): ... this method.  Use std::vector.
12615         (add_file_name): Replace with ...
12616         (line_header::add_file_name): ... this method.  Use std::vector.
12617         (add_include_dir_stub): Delete.
12618         (read_formatted_entries): Remove memset.
12619         (dwarf_decode_line_header): Return a line_header_up instead of a
12620         raw pointer.  Remove cleanup handling.  Pass lambdas to
12621         read_formatted_entries.  Adjust to use line_header methods.
12622         (dwarf_decode_lines_1): Adjust to use line_header methods.
12623         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12624         use std::vector.
12625
12626 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
12627
12628         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12629         instead of struct ptid.
12630
12631 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
12632
12633         * frame.c (get_frame_register_bytes): Unwind using value.
12634         (put_frame_register_bytes): Likewise.
12635
12636 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
12637
12638         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12639         aggregate-like.
12640
12641 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
12642
12643         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12644
12645 2017-03-29  Yao Qi  <yao.qi@linaro.org>
12646
12647         * gdbthread.h (struct thread_info): Declare constructor and
12648         destructor.  Add some in-class member initializers.
12649         * thread.c (free_thread): Remove.
12650         (init_thread_list): Call delete instead of free_thread.
12651         (new_thread): Call thread_info constructor.
12652         (thread_info::thread_info): New function.
12653         (thread_info::~thread_info): New function.
12654         (delete_thread_1): Call delete instead of free_thread.
12655         (make_cleanup_restore_current_thread): Move tp and frame to
12656         inner block.
12657
12658 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12659
12660         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12661         (arc_skip_prologue): Likewise.
12662         (arc_make_frame_cache): Likewise.
12663         (arc_pv_get_operand): New function.
12664         (arc_is_in_prologue): Likewise.
12665         (arc_analyze_prologue): Likewise.
12666         (arc_print_frame_cache): Likewise.
12667         (MAX_PROLOGUE_LENGTH): New constant.
12668
12669 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12670
12671         * configure.tgt: Add arc-insn.o.
12672         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12673         (dump_arc_instruction_command): New function.
12674         (arc_fprintf_disasm): Likewise.
12675         (arc_disassemble_info): Likewise.
12676         (arc_insn_get_operand_value): Likewise.
12677         (arc_insn_get_operand_value_signed): Likewise.
12678         (arc_insn_get_memory_base_reg): Likewise.
12679         (arc_insn_get_memory_offset): Likewise.
12680         (arc_insn_get_branch_target): Likewise.
12681         (arc_insn_dump): Likewise.
12682         (arc_insn_get_linear_next_pc): Likewise.
12683         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12684         (arc_disassemble_info): Likewise.
12685         (arc_insn_get_branch_target): Likewise.
12686         (arc_insn_get_linear_next_pc): Likewise.
12687         * NEWS: Mention new "maint print arc arc-instruction".
12688
12689 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12690
12691         * arc-tdep (maintenance_print_arc_list): New variable.
12692         (maintenance_print_arc_command): New function.
12693
12694 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12695
12696         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12697         Add "limm" and "reserved".
12698         (arc_cannot_fetch_register, arc_cannot_store_register): Add
12699         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12700         * arc-tdep.h (arc_regnum): Likewise.
12701
12702 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12703
12704         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12705         for THREADPTR register.
12706         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12707         register.
12708         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12709         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12710         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12711
12712 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12713
12714         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12715         registers above gdbarch_num_regs (gdbarch) as privileged in
12716         call0 ABI.
12717
12718 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12719
12720         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12721         for a single specified register or for all registers in
12722         a0_base..a0_base + C0_NREGS range.
12723         (supply_gregset_reg): Call regcache_raw_supply for a single
12724         specified register or for all registers in a0_base..a0_base +
12725         C0_NREGS range.
12726
12727 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12728
12729         * arch/xtensa.h (C0_NREGS): Add definition.
12730         * xtensa-tdep.c (C0_NREGS): Remove definition.
12731
12732 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12733
12734         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
12735         Drop xtensa_default_isa initialization.
12736         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
12737
12738 2017-03-27  Pedro Alves  <palves@redhat.com>
12739
12740         * dwarf2read.c (file_entry) <dir_index>: Add comment.
12741         (file_entry::include_dir): New method.
12742         (line_header::include_dir_at, line_header::file_name_at): New
12743         methods.
12744         (setup_type_unit_groups, setup_type_unit_groups)
12745         (psymtab_include_file_name): Simplify using the new methods.
12746         (lnp_state_machine) <the_line_header>: New field.
12747         <file>: Add comment.
12748         (lnp_state_machine::current_file): New method.
12749         (dwarf_record_line): Simplify using the new methods.
12750         (init_lnp_state_machine): Initialize the "the_line_header" field.
12751         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
12752         Simplify using the new methods.
12753
12754 2017-03-27  Pedro Alves  <palves@redhat.com>
12755
12756         * cp-name-parser.y (make_empty): Delete.
12757         (demangler_special, nested_name, ptr_operator, array_indicator)
12758         (direct_declarator, declarator_1): Use fill_comp instead of
12759         make_empty.
12760
12761 2017-03-27  Pedro Alves  <palves@redhat.com>
12762
12763         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
12764         to ATTRIBUTE_PRINTF.
12765         * solib-target.c (library_list_start_list): Print "string" not
12766         "version".
12767         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
12768         gdb_xml_error call.
12769
12770 2017-03-27  Pedro Alves  <palves@redhat.com>
12771
12772         * dwarf2read.c (struct file_and_directory): New.
12773         (dwarf2_get_dwz_file): Adjust to use std::string.
12774         (dw2_get_file_names_reader): Adjust to use file_and_directory.
12775         (find_file_and_directory): Adjust to return a file_and_directory
12776         object.
12777         (read_file_scope): Adjust to use file_and_directory.  Remove
12778         make_cleanup/do_cleanups calls.
12779         (open_and_init_dwp_file): Adjust to use std::string.  Remove
12780         make_cleanup/do_cleanups calls.
12781         * python/python.c (do_start_initialization): Adjust to ldirname
12782         returning a std::string.
12783         * utils.c (ldirname): Now returns a std::string.
12784         * utils.h (ldirname): Change return type to std::string.
12785         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
12786         returning a std::string.
12787         * xml-tdesc.c (file_read_description_xml): Likewise.
12788
12789 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
12790
12791         * regcache.c (regcache_debug_print_register): New function.
12792         * regcache.h (regcache_debug_print_register): New declaration.
12793         * target.c (debug_print_register): Remove.
12794         (target_fetch_registers): Call regcache_debug_print_register.
12795         (target_store_registers): Likewise.
12796
12797 2017-03-24  Pádraig Brady  <pbrady@fb.com>
12798
12799         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
12800         reference beyond the 'lh->include_dirs' array before accessing to
12801         it.
12802         (psymtab_include_file_name): Likewise.
12803         (dwarf_decode_lines_1): Likewise.
12804         (dwarf_decode_lines): Likewise.
12805         (file_file_name): Likewise.
12806
12807 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
12808
12809         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
12810         inferior_ptid.
12811         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12812         ps_lsetfpregs): Likewise.
12813         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
12814         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12815         ps_lsetfpregs): Likewise.
12816         * target.c (target_fetch_registers, target_store_registers):
12817         Remove asserts.
12818
12819 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
12820
12821         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
12822
12823 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12824
12825         * aarch64-tdep.c (aarch64_process_record_test): Declare.
12826         (_initialize_aarch64_tdep): Register it.
12827         (aarch64_record_load_store): Handle PRFM instruction.
12828         (aarch64_process_record_test): New function.
12829
12830 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12831
12832         * aarch64-tdep.c (aarch64_record_load_store): Fix code
12833         indentation.
12834
12835 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12836
12837         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
12838
12839 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12840
12841         python/python.c (do_start_initialization): Fix memory leak.
12842
12843 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12844
12845         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
12846         using get_ptrace_pid.
12847         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12848         inferior_ptid.
12849         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12850         inferior_ptid instead of pid.
12851
12852 2017-03-22  Yao Qi  <yao.qi@linaro.org>
12853
12854         * aarch64-tdep.c: Wrap locally used classes in anonymous
12855         namespace.
12856         * arm-tdep.c: Likewise.
12857         * linespec.c: Likewise.
12858         * ui-out.c: Likewise.
12859
12860 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
12861
12862         PR gdb/19637
12863         * python/lib/gdb/printer/bound_registers.py: Import sys.
12864
12865 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12866
12867         * windows-nat.c (do_windows_fetch_inferior_registers): Add
12868         windows_thread_info parameter and use it instead of
12869         current_thread.
12870         (windows_fetch_inferior_registers): Don't set current_thread,
12871         pass the thread to do_windows_fetch_inferior_registers.  Use
12872         ptid from regcache instead of inferior_ptid.
12873         (do_windows_store_inferior_registers): Add windows_thread_info
12874         parameter and use it instead of current_thread.
12875         (windows_store_inferior_registers): Don't set current_thread,
12876         pass the thread to do_windows_store_inferior_registers.  Use
12877         ptid from regcache instead of inferior_ptid.
12878
12879 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12880
12881         * ser-mingw.c (ser_windows_raw): Remove reference to
12882         struct serial::current_timeout.
12883
12884 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
12885
12886         PR tdep/20928
12887         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
12888         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
12889         (sparc64_fsr_type): Fix %fsr decoding.
12890
12891 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
12892
12893         * python/py-record-btrace.c (btpy_insn_data): Change return type
12894         for Python 2.
12895
12896 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12897
12898         * spu-linux-nat.c (spu_fetch_inferior_registers,
12899         spu_store_inferior_registers): Use ptid from regcache, set and
12900         restore inferior_ptid.
12901         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
12902         Likewise.
12903
12904 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12905
12906         * i386-linux-nat.c (fetch_register, store_register,
12907         i386_linux_fetch_inferior_registers,
12908         i386_linux_store_inferior_registers): Use ptid from regcache.
12909         * ia64-linux-nat.c (ia64_linux_fetch_register,
12910         ia64_linux_store_register): Likewise.
12911         * inf-ptrace.c (inf_ptrace_fetch_register,
12912         inf_ptrace_store_register): Likewise.
12913         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
12914         m32r_linux_store_inferior_registers): Likewise.
12915         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
12916         m68kbsd_store_inferior_registers): Likewise.
12917         * m68k-linux-nat.c (fetch_register, store_register,
12918         m68k_linux_fetch_inferior_registers,
12919         m68k_linux_store_inferior_registers): Likewise.
12920         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
12921         m88kbsd_store_inferior_registers): Likewise.
12922         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
12923         mips_fbsd_store_inferior_registers): Likewise.
12924         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
12925         mips64_linux_regsets_store_registers): Likewise.
12926         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
12927         mipsnbsd_store_inferior_registers): Likewise.
12928         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
12929         mips64obsd_store_inferior_registers): Likewise.
12930         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
12931         Likewise.
12932         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
12933         ppcfbsd_store_inferior_registers): Likewise.
12934         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
12935         ppc_linux_store_inferior_registers): Likewise.
12936         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
12937         ppcnbsd_store_inferior_registers): Likewise.
12938         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
12939         ppcobsd_store_registers): Likewise.
12940         * procfs.c (procfs_fetch_registers, procfs_store_registers):
12941         Likewise.
12942         * ravenscar-thread.c (ravenscar_fetch_registers,
12943         ravenscar_store_registers, ravenscar_prepare_to_store):
12944         Likewise.
12945         * record-btrace.c (record_btrace_fetch_registers,
12946         record_btrace_store_registers, record_btrace_prepare_to_store):
12947         Likewise.
12948         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
12949         Lookup inferior using ptid from regcache, instead of
12950         current_inferior.
12951         * remote.c (remote_fetch_registers, remote_store_registers): Use
12952         ptid from regcache.
12953         * rs6000-nat.c (fetch_register, store_register): Likewise.
12954         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
12955         s390_linux_store_inferior_registers): Likewise.
12956         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
12957         shnbsd_store_inferior_registers): Likewise.
12958         * sol-thread.c (sol_thread_fetch_registers,
12959         sol_thread_store_registers): Likewise.
12960         * sparc-nat.c (sparc_fetch_inferior_registers,
12961         sparc_store_inferior_registers): Likewise.
12962         * tilegx-linux-nat.c (fetch_inferior_registers,
12963         store_inferior_registers): Likewise.
12964         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
12965         vaxbsd_store_inferior_registers): Likewise.
12966         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
12967         store_xtregs): Likewise.
12968
12969 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12970
12971         PR gdb/14441
12972         * NEWS: Mention support for rvalue references in GDB and python.
12973         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
12974         supports both lvalue and rvalue references.
12975
12976 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12977
12978         PR gdb/14441
12979         * gdbtypes.c (rank_one_type): Implement overloading
12980         resolution rules regarding rvalue references.
12981
12982 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12983
12984         PR gdb/14441
12985         * aarch64-tdep.c (aarch64_type_align)
12986         (aarch64_extract_return_value, aarch64_store_return_value): Change
12987         lvalue reference type checks to general reference type checks.
12988         * amd64-tdep.c (amd64_classify): Likewise.
12989         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
12990         Likewise.
12991         * arm-tdep.c (arm_type_align, arm_extract_return_value)
12992         (arm_store_return_value): Likewise.
12993         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
12994         * c-typeprint.c (c_print_type): Likewise.
12995         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
12996         (cplus_number_of_children, cplus_describe_child): Likewise.
12997         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
12998         * completer.c (expression_completer): Likewise.
12999         * cp-support.c (make_symbol_overload_list_adl_namespace):
13000         Likewise.
13001         * darwin-nat-info.c (info_mach_region_command): Likewise.
13002         * dwarf2loc.c (entry_data_value_coerce_ref)
13003         (value_of_dwarf_reg_entry): Likewise.
13004         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13005         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13006         Likewise.
13007         * findvar.c (extract_typed_address, store_typed_address):
13008         Likewise.
13009         * gdbtypes.c (rank_one_type): Likewise.
13010         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13011         * infcall.c (value_arg_coerce): Likewise.
13012         * language.c (pointer_type): Likewise.
13013         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13014         Likewise.
13015         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13016         * mn10300-tdep.c (mn10300_type_align): Likewise.
13017         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13018         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13019         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13020         Likewise.
13021         * printcmd.c (print_formatted, x_command): Likewise.
13022         * python/py-type.c (typy_get_composite, typy_template_argument):
13023         Likewise.
13024         * python/py-value.c (valpy_referenced_value)
13025         (valpy_get_dynamic_type, value_has_field): Likewise.
13026         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13027         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13028         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13029         * spu-tdep.c (spu_scalar_value_p): Likewise.
13030         * symtab.c (lookup_symbol_aux): Likewise.
13031         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13032         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13033         Likewise.
13034         * valops.c (value_cast_pointers, value_cast)
13035         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13036         (value_struct_elt, value_struct_elt_bitpos)
13037         (value_find_oload_method_list, find_overload_match)
13038         (value_rtti_indirect_type): Likewise.
13039         * valprint.c (val_print_scalar_type_p, generic_val_print):
13040         Likewise.
13041         * value.c (value_actual_type, value_as_address, unpack_long)
13042         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13043         (coerce_ref): Likewise.
13044         * varobj.c (varobj_get_value_type): Likewise.
13045
13046 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13047
13048         PR gdb/14441
13049         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13050         table of constants.
13051         * python/lib/gdb/command/explore.py: Support exploring values
13052         of rvalue reference types.
13053         * python/lib/gdb/types.py: Implement get_basic_type() for
13054         rvalue reference types.
13055         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13056         constant.
13057         * python/py-value.c (valpy_getitem): Add an rvalue reference
13058         check.
13059         (valpy_reference_value): Add new parameter "refcode".
13060         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13061         New wrappers for valpy_reference_value().
13062         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13063         (gdbpy_invoke_xmethod): Likewise.
13064
13065 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13066
13067         PR gdb/14441
13068         * dwarf2read.c (process_die, read_type_die_1): Handle the
13069         DW_TAG_rvalue_reference_type DIE.
13070         (read_tag_reference_type): Add new parameter "refcode".
13071
13072 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13073
13074         PR gdb/14441
13075         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13076         (c_type_print_modifier, c_type_print_varspec_suffix)
13077         (c_type_print_base): Support printing rvalue reference types.
13078         * c-valprint.c (c_val_print, c_value_print): Support printing
13079         rvalue reference values.
13080
13081 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13082
13083         PR gdb/14441
13084         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13085         typename.
13086         * cp-support.c (replace_typedefs): Handle
13087         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13088         * python/py-type.c (typy_lookup_type): Likewise.
13089
13090 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13091
13092         PR gdb/14441
13093         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13094         * parse.c (insert_type): Change assert statement.
13095         (follow_types): Handle rvalue reference types.
13096         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13097         constant.
13098
13099 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13100
13101         PR gdb/14441
13102         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13103         value_ref() interface.
13104         * c-valprint.c (c_value_print): Likewise.
13105         * infcall.c (value_arg_coerce): Likewise.
13106         * python/py-value.c (valpy_reference_value): Likewise.
13107         * valops.c (value_cast, value_reinterpret_cast)
13108         (value_dynamic_cast, typecmp): Likewise.
13109         (value_ref): Parameterize by kind of return value reference type.
13110         * value.h (value_ref): Add new parameter "refcode".
13111
13112 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13113
13114         PR gdb/14441
13115         * dwarf2read.c (read_tag_reference_type): Use
13116         lookup_lvalue_reference_type() instead of lookup_reference_type().
13117         * eval.c (evaluate_subexp_standard): Likewise.
13118         * f-exp.y: Likewise.
13119         * gdbtypes.c (make_reference_type, lookup_reference_type):
13120         Generalize with rvalue reference types.
13121         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13122         convenience wrappers for lookup_reference_type().
13123         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13124         reference kind parameter.
13125         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13126         wrappers for lookup_reference_type().
13127         * guile/scm-type.c (gdbscm_type_reference): Use
13128         lookup_lvalue_reference_type() instead of lookup_reference_type().
13129         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13130         * parse.c (follow_types): Likewise.
13131         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13132         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13133         Likewise.
13134         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13135         (gdbpy_invoke_xmethod): Likewise.
13136         * stabsread.c: Provide extra argument to make_reference_type()
13137         call.
13138         * valops.c (value_ref, value_rtti_indirect_type): Use
13139         lookup_lvalue_reference_type() instead of lookup_reference_type().
13140
13141 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13142
13143         PR gdb/14441
13144         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13145         (TYPE_IS_REFERENCE): New macro.
13146         (struct type): Add rvalue_reference_type field.
13147         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13148
13149 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13150
13151         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13152         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13153         New function definition.
13154         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13155         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13156         New function declaration.
13157         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13158         * mi/mi-interp.h: New file.
13159         * solib.c (info_sharedlibrary_command): Replace for loop with
13160         ALL_SO_LIBS macro
13161         * solib.h (update_solib_list): New function declaration.
13162         (so_list_head): Move macro.
13163         * solist.h (ALL_SO_LIBS): New macro.
13164
13165 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13166
13167         * infcmd.c (post_create_inferior): Remove unused argument in
13168         call to solib_add.
13169         * remote.c (remote_start_remote): Likewise.
13170         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13171         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13172         (enable_break): Likewise.
13173         * solib.c (update_solib_list): Remove unused target argument
13174         and its documentation.
13175         (solib_add): Remove unused target argument.  Remove unused
13176         argument in call to update_solib_list.
13177         (info_sharedlibrary_command): Remove unused argument in call
13178         to update_solib_list.
13179         (sharedlibrary_command): Remove unused argument in call to
13180         solib_add.
13181         (handle_solib_event): Likewise.
13182         (reload_shared_libraries): Likewise.
13183         * solib.h (solib_add): Remove unused target argument.
13184
13185 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13186
13187         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13188         (s390_displaced_step_fixup): Cover relative branches with the
13189         default fixup handling.  This fixes lack of support for some
13190         relative branch instructions.
13191
13192 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13193
13194         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13195         ptid from regcache.
13196
13197 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13198
13199         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13200         i386_darwin_store_inferior_registers): Use ptid from regcache.
13201
13202 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13203
13204         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13205         i386bsd_store_inferior_registers): Use ptid from regcache.
13206
13207 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13208
13209         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13210         hppaobsd_store_registers): Use ptid from regcache.
13211
13212 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13213
13214         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13215         hppanbsd_store_registers): Use ptid from regcache.
13216
13217 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13218
13219         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13220         from regcache.  Use get_ptrace_pid.
13221
13222 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13223
13224         * corelow.c (get_core_register_section): Use ptid from regcache,
13225         update doc.
13226
13227 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13228
13229         * bsd-uthread.c (bsd_uthread_fetch_registers,
13230         bsd_uthread_store_registers): Use ptid from regcache, set and
13231         restore inferior_ptid.
13232
13233 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13234
13235         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13236         fetch_fp_regs, store_register, store_regs, store_fp_register,
13237         store_fp_regs): Use ptid from regcache.
13238
13239 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13240
13241         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13242         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13243         store_vfp_regs): Use ptid from regcache.
13244
13245 2017-03-17  Pedro Alves  <palves@redhat.com>
13246
13247         PR remote/21188
13248         * ser-base.c (ser_base_wait_for): Add comment.
13249         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13250         version.
13251         * ser-unix.c (hardwire_raw): Remove reference to
13252         scb->current_timeout.
13253         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13254         (hardwire_ops): Install ser_base_readchar instead of
13255         hardwire_readchar.
13256         * serial.h (struct serial) <current_timeout, timeout_remaining>:
13257         Remove fields.
13258
13259 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
13260
13261         PR gdb/19637
13262         * python/lib/gdb/printer/bound_registers.py: Add support for
13263         Python 3.
13264
13265 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13266
13267         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13268         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13269         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13270         byte_offset to subobj_byte_offset.  Fix the handling of
13271         DWARF_VALUE_STACK on big-endian targets when coming via an
13272         implicit pointer.
13273         (dwarf2_evaluate_loc_desc): Adjust call to
13274         dwarf2_evaluate_loc_desc_full.
13275         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13276         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13277
13278 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13279
13280         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13281         and REVSH instructions.
13282
13283 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13284
13285         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13286         (arm_record_test): Declare.
13287         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13288         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13289         align with the manual.
13290         (thumb_record_misc): Adjust the code order to align with the
13291         manual.
13292         (thumb2_record_decode_insn_handler): Fix instruction matching.
13293         (instruction_reader_thumb): New class.
13294         (arm_record_test): New function.
13295
13296 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13297
13298         * arm-tdep.c (abstract_memory_reader): New class.
13299         (instruction_reader): New class.
13300         (extract_arm_insn): Add argument 'reader'.  Callers updated.
13301         (decode_insn): Likewise.
13302
13303 2017-03-16  Doug Evans  <dje@google.com>
13304
13305         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13306         member.  Change type of TYPE member to SCM.  All uses updated.
13307         (lsscm_make_lazy_string_smob): Add assert.
13308         (lsscm_make_lazy_string): Flag bad length values.
13309         (lsscm_elt_type): New function.
13310         (gdbscm_lazy_string_to_value): Rewrite to use
13311         lsscm_safe_lazy_string_to_value.
13312         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13313         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13314         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
13315         in incoming type.
13316         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13317         * guile/scm-type.c (tyscm_scm_to_type): New function.
13318
13319 2017-03-15  Doug Evans  <dje@google.com>
13320
13321         PR python/17728, python/18439, python/18779
13322         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13323         member.  Change type of TYPE member to PyObject *.  All uses updated.
13324         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13325         (gdbpy_create_lazy_string_object): Flag bad length values.
13326         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13327         Handle typedefs in incoming type.
13328         (stpy_lazy_string_elt_type): New function.
13329         (gdbpy_extract_lazy_string): Call it.
13330         * python/py-value.c (valpy_lazy_string): Flag bad length values.
13331         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
13332         typedefs in incoming type.
13333
13334 2017-03-16  Doug Evans  <dje@google.com>
13335
13336         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13337         * guile/scm-type.c (tyscm_scm_to_type): New function.
13338
13339 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
13340
13341         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13342         "ULONGEST" for "skip".
13343
13344 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13345
13346         PR gdb/21220
13347         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13348         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13349         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
13350         over ptrace peek/poke until end of buffer or error.
13351
13352 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
13353
13354         * parse.c (length_of_subexp): Make static.
13355         * parser-defs.h (length_of_subexp): Remove.
13356
13357 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13358
13359         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13360         as well.
13361
13362 2017-03-14  Pedro Alves  <palves@redhat.com>
13363
13364         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13365         (main): Use std::unique_ptr.  Remove calls to
13366         cp_demangled_name_parse_free.
13367
13368 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13369
13370         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13371         alphabsd_store_inferior_registers): Use regcache->ptid instead
13372         of inferior_ptid.
13373
13374 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13375
13376         * aix-thread.c (aix_thread_fetch_registers,
13377         aix_thread_store_registers): Use regcache->ptid instead of
13378         inferior_ptid.
13379
13380 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13381
13382         * aarch64-linux-nat.c (fetch_gregs_from_thread,
13383         store_gregs_to_thread, fetch_fpregs_from_thread,
13384         store_fpregs_to_thread): Use regcache->ptid instead of
13385         inferior_ptid.
13386
13387 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13388
13389         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13390         amd64_linux_fetch_inferior_registers): Use regcache->ptid
13391         instead of inferior_ptid.
13392
13393 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13394
13395         * target.c (target_fetch_registers, target_store_registers): Add
13396         assert.
13397
13398 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13399
13400         * regcache.h (regcache_get_ptid): New function.
13401         * regcache.c (regcache_get_ptid): New function.
13402
13403 2017-03-13  Mark Wielaard  <mark@klomp.org>
13404
13405         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13406
13407 2017-03-10  Keith Seitz  <keiths@redhat.com>
13408
13409         PR c++/8218
13410         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13411
13412 2017-03-08  Pedro Alves  <palves@redhat.com>
13413
13414         PR gdb/18360
13415         * infrun.c (start_step_over, do_target_resume, resume)
13416         (restart_threads): Assert we're not resuming a thread that is
13417         meant to be stopped.
13418         (infrun_thread_stop_requested_callback): Delete.
13419         (infrun_thread_stop_requested): If the thread is internally
13420         stopped, queue a pending stop event and clear the thread's
13421         inline-frame state.
13422         (handle_stop_requested): New function.
13423         (handle_syscall_event, handle_inferior_event_1): Use
13424         handle_stop_requested.
13425         (handle_stop_requested): New function.
13426         (handle_signal_stop): Set the thread's stop_signal here instead of
13427         at caller.
13428         (finish_step_over): Clear step over info unconditionally.
13429         (handle_signal_stop): If the user had interrupted the event
13430         thread, consider the stop a random signal.
13431         (handle_signal_stop) <signal arrived while stepping over
13432         breakpoint>: Don't restart threads here.
13433         (stop_waiting): Don't clear step-over info here.
13434
13435 2017-03-08  Pedro Alves  <palves@redhat.com>
13436
13437         PR 21206
13438         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13439         goes to argument 2, not 1.
13440
13441 2017-03-08  Pedro Alves  <palves@redhat.com>
13442
13443         PR cli/21218
13444         * top.c (gdb_readline_wrapper): Avoid passing NULL to
13445         display_gdb_prompt.
13446         (command_line_input): Add comment.
13447
13448 2017-03-08  Pedro Alves  <palves@redhat.com>
13449
13450         PR tui/21216
13451         * tui/tui-file.c (tui_file::write): New.
13452         * tui/tui-file.h (tui_file): Override "write".
13453         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13454         factored out from ...
13455         (tui_puts): ... here.
13456         (tui_putc): Use them.
13457         (tui_write): New function.
13458         * tui/tui-io.h (tui_write): Declare.
13459
13460 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
13461
13462         * Makefile.in (SFILES): Replace "environ.c" with
13463         "common/environ.c".
13464         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13465         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
13466         to...
13467         * common/environ.c: ... here.
13468         * environ.h: Moved to...
13469         * common/environ.h: ... here.
13470
13471 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13472
13473         * gdbarch.sh (pstring_ptr): New static function.
13474         (gdbarch_disassembler_options): Use it.
13475         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13476         not valid_disassembler_option->name.
13477         * gdbarch.c: Regenerate.
13478
13479 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13480
13481         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13482
13483 2017-03-07  Pedro Alves  <palves@redhat.com>
13484
13485         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13486
13487 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13488
13489         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13490         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13491         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13492         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13493
13494 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
13495
13496         * xtensa-linux-nat.c (fetch_gregs): Remove const.
13497
13498 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
13499
13500         * remote.c (remote_add_target_side_commands): Use range-based
13501         for loop.
13502
13503 2017-03-03  Yao Qi  <yao.qi@linaro.org>
13504
13505         PR gdb/21165
13506         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13507         value is lazy.
13508         * valprint.c (common_val_print): Likewise.
13509
13510 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
13511
13512         * NEWS: Mention new set/show disassembler-options commands.
13513         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13514         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13515         (prospective_options): New static variable.
13516         (gdb_disassembler::gdb_disassembler): Initialize
13517         m_di.disassembler_options.
13518         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13519         (get_disassembler_options): New function.
13520         (set_disassembler_options): Likewise.
13521         (set_disassembler_options_sfunc): Likewise.
13522         (show_disassembler_options_sfunc): Likewise.
13523         (disassembler_options_completer): Likewise.
13524         (_initialize_disasm): Likewise.
13525         * disasm.h (get_disassembler_options): New prototype.
13526         (set_disassembler_options): Likewise.
13527         * gdbarch.sh (gdbarch_disassembler_options): New variable.
13528         (gdbarch_verify_disassembler_options): Likewise.
13529         * gdbarch.c: Regenerate.
13530         * gdbarch.h: Likewise.
13531         * arm-tdep.c (num_disassembly_options): Delete.
13532         (set_disassembly_style): Likewise.
13533         (arm_disassembler_options): New static variable.
13534         (set_disassembly_style_sfunc): Convert short style name into long
13535         option name.  Call set_disassembler_options.
13536         (show_disassembly_style_sfunc): New function.
13537         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13538         set_gdbarch_verify_disassembler_options.
13539         (_initialize_arm_tdep): Delete regnames variable and update callers.
13540         (arm_disassembler_options): Initialize.
13541         (disasm_options): New variable.
13542         (num_disassembly_options): Rename from this...
13543         (num_disassembly_styles): ...to this.  Compute by scanning through
13544         disasm_options.
13545         (valid_disassembly_styles): Initialize using disasm_options.
13546         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13547         set_arm_regname_option.
13548         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13549         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13550         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13551         set_gdbarch_verify_disassembler_options.
13552         * s390-tdep.c (s390_disassembler_options): New static variable.
13553         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13554         set_gdbarch_verify_disassembler_options.
13555
13556 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13557
13558         * remote.c (remote_add_target_side_condition): Remove "struct"
13559         keyword from range-based for loop.
13560
13561 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13562
13563         * remote.c (remote_add_target_side_condition): Use range-based
13564         for loop.  Update comment.
13565
13566 2017-02-27  Yao Qi  <yao.qi@linaro.org>
13567
13568         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13569
13570 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
13571
13572         * regcache.c (regcache_raw_update): New function.
13573         (regcache_raw_read): Move code to regcache_raw_update.
13574         * regcache.h (regcache_raw_update): New declaration.
13575         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13576
13577 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
13578
13579         * dwarf2read.c (create_debug_type_hash_table): Initialize
13580         header.signature and header.type_offset_in_tu.
13581
13582 2017-02-24  Pedro Alves  <palves@redhat.com>
13583
13584         * symtab.c (make_file_symbol_completion_list_1): Use
13585         add_symtab_completions.
13586
13587 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13588
13589         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13590
13591 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13592
13593         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13594         I386_MAX_REGISTER_SIZE.
13595         (i386_pseudo_register_write): Likewise.
13596         (i386_process_record): Likewise.
13597         * i387-tdep.c (i387_supply_xsave): Likewise.
13598         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13599         (store_register): Likewise.
13600
13601 2017-02-23  Pedro Alves  <palves@redhat.com>
13602
13603         * ada-lang.c: Include "common/function-view.h".
13604         (ada_iterate_over_symbols): Adjust to use function_view as
13605         callback type.
13606         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13607         (ada_make_symbol_completion_list): Use a lambda.
13608         (ada_exc_search_name_matches): Delete.
13609         (name_matches_regex): New.
13610         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13611         * compile/compile-c-support.c: Include "common/function-view.h".
13612         (print_one_macro): Change prototype to accept a ui_file pointer.
13613         (write_macro_definitions): Use a lambda.
13614         * dwarf2read.c: Include "common/function-view.h".
13615         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13616         (dw2_expand_symtabs_matching): Adjust to use function_view as
13617         callback type.
13618         * language.h: Include "common/function-view.h".
13619         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13620         function_view as callback type.
13621         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13622         * linespec.c: Include "common/function-view.h".
13623         (collect_info::add_symbol): New method.
13624         (struct symbol_and_data_callback, iterate_inline_only, struct
13625         symbol_matcher_data, iterate_name_matcher): Delete.
13626         (iterate_over_all_matching_symtabs): Adjust to use function_view
13627         as callback type and lambdas.
13628         (iterate_over_file_blocks): Adjust to use function_view as
13629         callback type.
13630         (decode_compound_collector): Now a class with private fields.
13631         (decode_compound_collector::release_symbols): New method.
13632         (collect_one_symbol): Rename to...
13633         (decode_compound_collector::operator()): ... this and adjust.
13634         (lookup_prefix_sym): decode_compound_collector construction bits
13635         move to decode_compound_collector ctor.  Pass the
13636         decode_compound_collector object directly as callback.  Remove
13637         cleanups and use decode_compound_collector::release_symbols
13638         instead.
13639         (symtab_collector): Now a class with private fields.
13640         (symtab_collector::release_symtabs): New method.
13641         (add_symtabs_to_list): Rename to...
13642         (symtab_collector::operator()): ... this and adjust.
13643         (collect_symtabs_from_filename): symtab_collector construction
13644         bits move to symtab_collector ctor.  Pass the symtab_collector
13645         object directly as callback.  Remove cleanups and use
13646         symtab_collector::release_symtabs instead.
13647         (collect_symbols): Delete.
13648         (add_matching_symbols_to_info): Use lambdas.
13649         * macrocmd.c (print_macro_callback): Delete.
13650         (info_macro_command): Use a lambda.
13651         (info_macros_command): Pass print_macro_definition as callable
13652         directly.
13653         (print_one_macro): Remove 'ignore' parameter.
13654         (macro_list_command): Adjust.
13655         * macrotab.c (macro_for_each_data::fn): Now a function_view.
13656         (macro_for_each_data::user_data): Delete field.
13657         (foreach_macro): Adjust to call the function_view.
13658         (macro_for_each): Adjust to use function_view as callback type.
13659         (foreach_macro_in_scope): Adjust to call the function_view.
13660         (macro_for_each_in_scope): Adjust to use function_view as callback
13661         type.
13662         * macrotab.h: Include "common/function-view.h".
13663         (macro_callback_fn): Declare a prototype instead of a pointer.
13664         Remove "user_data" parameter.
13665         (macro_for_each, macro_for_each_in_scope): Adjust to use
13666         function_view as callback type.
13667         * psymtab.c (partial_map_expand_apply)
13668         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13669         Adjust to use function_view as callback type and to return bool.
13670         (psym_expand_symtabs_matching): Adjust to use function_view as
13671         callback types.
13672         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13673         to use function_view as callback type and to return bool.
13674         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13675         callback types.
13676         * symfile.c (expand_symtabs_matching): Adjust to use function_view
13677         as callback types.
13678         * symfile.h: Include "common/function-view.h".
13679         (expand_symtabs_file_matcher_ftype)
13680         (expand_symtabs_symbol_matcher_ftype)
13681         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13682         return bool.
13683         (quick_symbol_functions::map_symtabs_matching_filename)
13684         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13685         function_view as callback type and return bool.
13686         (expand_symtabs_matching): Adjust to use function_view as callback
13687         type.
13688         (maintenance_expand_name_matcher)
13689         (maintenance_expand_file_matcher): Delete.
13690         (maintenance_expand_symtabs): Use lambdas.
13691         * symtab.c (iterate_over_some_symtabs): Adjust to use
13692         function_view as callback types and return bool.
13693         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
13694         of a cleanup.
13695         (lookup_symtab_callback): Delete.
13696         (lookup_symtab): Use a lambda.
13697         (iterate_over_symbols): Adjust to use function_view as callback
13698         type.
13699         (struct search_symbols_data, search_symbols_file_matches)
13700         (search_symbols_name_matches): Delete.
13701         (search_symbols): Use a pair of lambdas.
13702         (struct add_name_data, add_macro_name, symbol_completion_matcher)
13703         (symtab_expansion_callback): Delete.
13704         (default_make_symbol_completion_list_break_on_1): Use lambdas.
13705         * symtab.h: Include "common/function-view.h".
13706         (iterate_over_some_symtabs): Adjust to use function_view as
13707         callback type and return bool.
13708         (iterate_over_symtabs): Adjust to use function_view as callback
13709         type.
13710         (symbol_found_callback_ftype): Remove 'data' parameter and return
13711         bool.
13712         (iterate_over_symbols): Adjust to use function_view as callback
13713         type.
13714
13715 2017-02-23  Pedro Alves  <palves@redhat.com>
13716
13717         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
13718         (%.o) <unittests/%.c>: New pattern.
13719         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
13720         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
13721         * common/function-view.h: New file.
13722         * unittests/function-view-selftests.c: New file.
13723         * configure: Regenerate.
13724
13725 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
13726
13727         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
13728         inferior_ptid.
13729         * go32-nat.c (go32_thread_alive): Likewise.
13730
13731 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13732
13733         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
13734         delete.
13735
13736 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13737
13738         * varobj.c (varobj_clear_saved_item): Use delete instead of
13739         xfree.
13740         (update_dynamic_varobj_children): Likewise.
13741
13742 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13743
13744         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
13745
13746 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
13747
13748         * common/enum-flags.h (enum_flags::enum_flags): Initialize
13749         m_enum_value to 0 in default constructor.
13750
13751 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
13752
13753         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
13754         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
13755         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
13756         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
13757         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
13758         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
13759         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
13760         IS_STORE_CONDITIONAL_INSN.
13761
13762 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13763
13764         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
13765
13766 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13767
13768         * NEWS (Changes since GDB 7.12): Add DWARF-5.
13769
13770 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13771
13772         * dwarf2read.c (skip_one_die, read_attribute_value)
13773         (dwarf2_const_value_attr, dump_die_shallow)
13774         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
13775         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
13776
13777 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13778
13779         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
13780         (dwarf_parse_macro_header): Accept DWARF version 5.
13781         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
13782
13783 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13784
13785         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
13786         DW_AT_GNU_*.
13787         * common/common-exceptions.h (enum errors): Likewise.
13788         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
13789         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
13790         (dwarf_expr_context::execute_stack_op): Likewise.
13791         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
13792         Likewise.
13793         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
13794         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
13795         (show_entry_values_debug, call_site_to_target_addr)
13796         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
13797         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
13798         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
13799         (value_of_dwarf_block_entry, indirect_pieced_value)
13800         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
13801         (disassemble_dwarf_expression): Likewise.
13802         * dwarf2read.c (process_die, inherit_abstract_dies)
13803         (read_call_site_scope): Likewise.
13804         * gdbtypes.h (struct func_type, struct call_site_parameter)
13805         (struct call_site): Likewise.
13806         * stack.c (read_frame_arg): Likewise.
13807         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
13808
13809 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13810
13811         * defs.h (read_unsigned_leb128): New declaration.
13812         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
13813         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
13814         (dwarf2_find_location_expression): Call also
13815         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
13816         * dwarf2loc.h (dwarf2_version): New declaration.
13817         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
13818         rnglists.
13819         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
13820         .debug_rnglists.
13821         (struct dwop_section_names): Add loclists_dwo.
13822         (dwop_section_names): Add .debug_loclists.dwo.
13823         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
13824         (struct dwarf2_per_cu_data): Add dwarf_version.
13825         (struct dwo_sections): Add loclists.
13826         (struct attr_abbrev): Add implicit_const.
13827         (read_indirect_line_string): New declaration.
13828         (read_unsigned_leb128): Delete declaration.
13829         (rcuh_kind): New definition.
13830         (read_and_check_comp_unit_head): Change parameter
13831         is_debug_types_section to section_kind.
13832         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
13833         (read_comp_unit_head): Change parameter abfd to section, add parameter
13834         section_kind.  Handle DWARF-5.
13835         (error_check_comp_unit_head): Accept also DWARF version 5.
13836         (read_and_check_comp_unit_head): Change parameter
13837         is_debug_types_section to section_kind.
13838         (read_and_check_type_unit_head): Delete function.
13839         (read_abbrev_offset): Handle DWARF-5.
13840         (create_debug_type_hash_table): Add parameter section_kind.  Process
13841         only DW_UT_type.  Use signature and type_offset_in_tu from struct
13842         comp_unit_head.
13843         (create_debug_types_hash_table): Update create_debug_type_hash_table
13844         caller.
13845         (create_all_type_units): Call create_debug_type_hash_table.
13846         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
13847         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13848         caller.
13849         (skip_one_die): Handle DW_FORM_implicit_const.
13850         (dwarf2_rnglists_process): New function.
13851         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13852         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13853         (read_attribute_value): Handle DW_FORM_implicit_const,
13854         DW_FORM_line_strp.
13855         (read_attribute): Handle DW_FORM_implicit_const.
13856         (read_indirect_string_at_offset_from): New function from
13857         read_indirect_string_at_offset.
13858         (read_indirect_string_at_offset): Call
13859         read_indirect_string_at_offset_from.
13860         (read_indirect_line_string_at_offset): New function.
13861         (read_indirect_string): New function comment.
13862         (read_indirect_line_string): New function.
13863         (read_unsigned_leb128): Make it global.
13864         (dwarf2_string_attr): Handle DWARF-5.
13865         (add_include_dir_stub, read_formatted_entries): New functions.
13866         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
13867         Handle DWARF-5.
13868         (per_cu_header_read_in): Update read_comp_unit_head caller.
13869         (dwarf2_version): New function.
13870         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
13871         rnglists.
13872         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
13873         fields.
13874
13875 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13876
13877         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
13878
13879 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13880
13881         * dwarf2read.c (dwarf2_ranges_process): New function from
13882         dwarf2_ranges_read.
13883         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
13884         dwarf2_ranges_process.
13885
13886 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13887
13888         * dwarf2read.c (create_debug_type_hash_table): New function from
13889         create_debug_types_hash_table.
13890         (create_debug_types_hash_table): Call create_debug_type_hash_table.
13891         (create_all_type_units, open_and_init_dwo_file): Update
13892         create_debug_types_hash_table callers.
13893
13894 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13895
13896         PR gdb/16188
13897         * fork-child.c (trace_start_error): Fix thinko.  va_end should
13898         refer to 'ap', not 'args'.
13899
13900 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13901             Pedro Alves  <palves@redhat.com>
13902
13903         PR gdb/16188
13904         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
13905         calls succeeded.
13906         * fork-child.c (trace_start_error): New function.
13907         (trace_start_error_with_name): Likewise.
13908         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
13909         * inf-ptrace.c (inf_ptrace_me): Likewise.
13910         * inferior.h (trace_start_error): New prototype.
13911         (trace_start_error_with_name): Likewise.
13912
13913 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
13914
13915         PR gdb/21164
13916         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
13917         NULL before using it.
13918         * symmisc.c (maintenance_print_symbols): Likewise.
13919         (maintenance_print_msymbols): Likewise.
13920
13921 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13922
13923         * NEWS: Add record Python bindings entry.
13924
13925 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13926
13927         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
13928         py-record-full.o.
13929         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
13930         * python/py-record-btrace.c, python/py-record-btrace.h,
13931         python/py-record-full.c, python/py-record-full.h: New file.
13932         * python/py-record.c: Add include for py-record-btrace.h and
13933         py-record-full.h.
13934         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
13935         recpy_instruction_history, recpy_function_call_history, recpy_begin,
13936         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
13937         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
13938         New definition.
13939         (gdbpy_initialize_btrace): New export.
13940         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
13941
13942 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13943
13944         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
13945         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
13946         * python/py-record.c: New file.
13947         * python/python-internal.h (gdbpy_start_recording,
13948         gdbpy_current_recording, gdpy_stop_recording,
13949         gdbpy_initialize_record): New export.
13950         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
13951         (python_GdbMethods): Add gdbpy_start_recording,
13952         gdbpy_current_recording and gdbpy_stop_recording.
13953
13954 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13955
13956         * record-btrace.c (record_btrace_record_method): New function.
13957         (init_record_btrace_ops): Initialize to_record_method.
13958         * record-full.c (record_full_record_method): New function.
13959         (init_record_full_ops, init_record_full_core_ops): Add
13960         record_full_record_method.
13961         * record.h (enum record_method): New enum.
13962         * target-debug.h (target_debug_print_enum_record_method: New define.
13963         * target-delegates.c: Regenerate.
13964         * target.c (target_record_method): New function.
13965         * target.h: Include record.h.
13966         (struct target_ops) <to_record_method>: New field.
13967         (target_record_method): New export.
13968
13969 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13970
13971         * record.h (record_start, record_stop): New export.
13972         * record.c (record_start, record_stop): New function.
13973
13974 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13975
13976         * btrace.c (btrace_fetch): Copy function call segments pointer
13977         into a vector.
13978         (btrace_clear): Clear the vector.
13979         (btrace_find_insn_by_number): Use binary search to find the correct
13980         function call segment.
13981         * btrace.h (brace_fun_p): New typedef.
13982         (struct btrace_thread_info) <functions>: New field.
13983
13984 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13985
13986         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
13987         * btrace.c (btrace_decode_error): ... here.  New function.
13988         * btrace.h (btrace_decode_error): New export.
13989
13990 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13991
13992         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
13993         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
13994         btrace_find_insn_by_number): Remove special case for gaps.
13995         * btrace.h (btrace_insn_get_error): New export.
13996         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
13997         * record-btrace.c (btrace_insn_history): Print number for gaps.
13998         (record_btrace_info, record_btrace_goto): Handle gaps.
13999
14000 2017-02-14  Tom Tromey  <tom@tromey.com>
14001
14002         PR python/13598:
14003         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14004         event.
14005         * python/py-evts.c (gdbpy_initialize_py_events): Add
14006         before_prompt registry.
14007         * python/py-events.h (events_object) <before_prompt>: New field.
14008
14009 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
14010
14011         * btrace.c (ftrace_new_switch): Preserve up link and flags.
14012
14013 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
14014
14015         * symfile (_initialize_symfile): Add usage text to the load command's
14016         help text.
14017
14018 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
14019
14020         * utils.c (defaulted_query): Don't query on secondary UIs.
14021
14022 2017-02-10  Tom Tromey  <tom@tromey.com>
14023
14024         * rust-lang.c (rust_get_disr_info): Remove unused variable.
14025
14026 2017-02-10  Tom Tromey  <tom@tromey.com>
14027
14028         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14029         "cleanup" local.
14030         * python/py-type.c (typy_legacy_template_argument): Remove
14031         unnecessary "cleanup" local.
14032
14033 2017-02-10  Tom Tromey  <tom@tromey.com>
14034
14035         * python/python.c (do_start_initialization): New function, from
14036         _initialize_python.
14037         (_initialize_python): Call do_start_initialization.
14038         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14039         goto.
14040
14041 2017-02-10  Tom Tromey  <tom@tromey.com>
14042
14043         * python/py-prettyprint.c (pretty_print_one_value): Use
14044         gdbpy_ref.
14045
14046 2017-02-10  Tom Tromey  <tom@tromey.com>
14047
14048         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14049         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14050         gdbpy_ref.
14051         * python/py-type.c (field_new): Use gdbpy_ref.
14052         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14053         gdbpy_ref.
14054         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14055         (py_free_pspace): Likewise.
14056         (pspace_to_pspace_object): Likewise.
14057         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14058         (py_free_objfile): Likewise.
14059         (objfile_to_objfile_object): Likewise.
14060         * python/py-inferior.c (delete_thread_object): Use
14061         gdbpy_ref.
14062         (infpy_read_memory): Likewise.
14063         (py_free_inferior): Likewise.
14064         * python/py-evtregistry.c (create_eventregistry_object): Use
14065         gdbpy_ref.
14066         * python/py-event.c (create_event_object): Use gdbpy_ref.
14067
14068 2017-02-10  Tom Tromey  <tom@tromey.com>
14069
14070         * python/py-ref.h (gdbpy_ref_policy): Now a template.
14071         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14072         used.
14073         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14074         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14075         python/py-exitedevent.c, python/py-finishbreakpoint.c,
14076         python/py-framefilter.c, python/py-function.c,
14077         python/py-inferior.c, python/py-infevents.c,
14078         python/py-linetable.c, python/py-newobjfileevent.c,
14079         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14080         python/py-signalevent.c, python/py-stopevent.c,
14081         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14082         python/py-unwind.c, python/py-utils.c, python/py-value.c,
14083         python/py-varobj.c, python/py-xmethods.c, python/python.c,
14084         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14085
14086 2017-02-10  Tom Tromey  <tom@tromey.com>
14087
14088         * ui-out.h (ui_out_emit_type): New class.
14089         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14090         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14091         and ui_out_emit_tuple.
14092         (enumerate_locals): Likewise.
14093         (py_mi_print_variables, py_print_locals, py_print_args): Use
14094         ui_out_emit_list.
14095         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14096         ui_out_emit_list.
14097         * common/gdb_optional.h: New file.
14098
14099 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14100
14101         * MAINTAINERS (Write After Approval): Update my e-mail address.
14102
14103 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14104
14105         PR gdb/21122
14106         * breakpoint.c (_initialize_breakpoint): Update the help description
14107         of the 'commands' command to indicate that it takes a list argument.
14108
14109 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
14110
14111         * interps.c (current_interp_set_logging): Remove "return".
14112
14113 2017-02-09  Gary Benson  <gbenson@redhat.com>
14114
14115         * symtab.c (add_symtab_completions): Prevent NULL pointer
14116         dereference.
14117
14118 2017-02-08  Pedro Alves  <palves@redhat.com>
14119
14120         * interps.c (interp::interp): Remove reference to quiet_p.
14121         (interp_set): Make static.  Remove dead "Switching to" output
14122         code.
14123         (interp_quiet_p, interp_set_quiet): Delete.
14124         (interpreter_exec_cmd): Don't set the interpreter quiet.
14125         * interps.h (interp_quiet_p): Make static.
14126         (class interp) <quiet_p>: Remove field
14127
14128 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14129
14130         * cli/cli-decode.c (find_command_name_length): Make it extern.
14131         * cli/cli-decode.h (find_command_name_length): Declare.
14132         * cli/cli-script.c (command_name_equals, line_first_arg):
14133         New functions.
14134         (process_next_line): Use cli-decode to parse command names.
14135         (build_command_line): Make args a constant pointer.
14136
14137 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14138
14139         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14140         Remove case-insensitive search.
14141
14142 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
14143
14144         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14145         at the end of the line.  Avoids an ARI warning.
14146
14147 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
14148
14149         * NEWS: Mention support for record/replay of Intel 64 rdrand and
14150         rdseed instructions.
14151         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14152
14153 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
14154
14155         PR tdep/20936
14156         Provide and use sparc32 and sparc64 target description XML files.
14157         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14158         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14159         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14160         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14161         * features/sparc/sparc32-solaris.xml: New file.
14162         * features/sparc/sparc64-solaris.xml: New file.
14163         * features/sparc/sparc32-solaris.c: Generated.
14164         * features/sparc/sparc64-solaris.c: Generated.
14165         * sparc-tdep.h: Account for differences in target descriptions.
14166         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14167         (sparc32_register_type): Use target provided registers.
14168         (validate_tdesc_registers): New function.
14169         (sparc32_gdbarch_init): Use tdesc_has_registers.
14170         Set pseudoregister functions.
14171         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14172         (sparc64_register_type): Use target provided registers.
14173         (sparc64_init_abi): Set pseudoregister functions.
14174
14175 2017-02-03  Tom Tromey  <tom@tromey.com>
14176
14177         PR rust/21097:
14178         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14179         with a single member.
14180
14181 2017-02-03  Pedro Alves  <palves@redhat.com>
14182
14183         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14184         (cli_interp_base::~cli_interp_base): New.
14185         (cli_interp): New struct.
14186         (as_cli_interp): Cast the interp itself to cli_interp.
14187         (cli_interpreter_pre_command_loop): Rename to ...
14188         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
14189         parameter.
14190         (cli_interpreter_init): Rename to ...
14191         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
14192         boolean.  Make extern.
14193         (cli_interpreter_resume): Rename to ...
14194         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
14195         extern.
14196         (cli_interpreter_suspend): Rename to ...
14197         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
14198         extern.
14199         (cli_interpreter_exec): Rename to ...
14200         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
14201         extern.
14202         (cli_interpreter_supports_command_editing): Rename to ...
14203         (cli_interp_base::supports_command_editing): ... this.  Remove
14204         'interp' parameter.  Make extern.
14205         (cli_ui_out): Rename to ...
14206         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
14207         Make extern.
14208         (cli_set_logging): Rename to ...
14209         (cli_interp_base::set_logging): ... this.  Remove 'interp'
14210         parameter.  Make extern.
14211         (cli_interp_procs): Delete.
14212         (cli_interp_factory): Adjust to use "new".
14213         * cli/cli-interp.h: Include "interps.h".
14214         (struct cli_interp_base): New struct.
14215         * interps.c (struct interp): Delete.  Fields moved to interps.h.
14216         (interp_new): Delete.
14217         (interp::interp, interp::~interp): New.
14218         (interp_set): Use bool, and return void.  Assume the interpreter
14219         has suspend, init and resume methods, and that the all return
14220         void.
14221         (set_top_level_interpreter): interp_set returns void.
14222         (interp_ui_out): Adapt.
14223         (current_interp_set_logging): Adapt.
14224         (interp_data): Delete.
14225         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14226         (interp_exec): Adapt.
14227         (top_level_interpreter_data): Delete.
14228         * interps.h (interp_init_ftype, interp_resume_ftype)
14229         (interp_suspend_ftype, interp_exec_ftype)
14230         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14231         (class interp): New.
14232         (interp_new): Delete.
14233         (interp_set): Now returns void.  Use bool.
14234         (interp_data, top_level_interpreter_data): Delete.
14235         * mi/mi-common.h: Include interps.h.
14236         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
14237         init, resume, suspect, exec, interp_ui_out, set_logging and
14238         pre_command_loop methods.
14239         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14240         (mi_interpreter_init): Rename to ...
14241         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
14242         bool, return void and make extern.  Adjust.
14243         (mi_interpreter_resume): ... Rename to ...
14244         (mi_interp::resume): ... this.  Remove the 'data' parameter,
14245         return void and make extern.  Adjust.
14246         (mi_interpreter_suspend): ... Rename to ...
14247         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
14248         return void and make extern.  Adjust.
14249         (mi_interpreter_exec): ... Rename to ...
14250         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
14251         extern.  Adjust.
14252         (mi_interpreter_pre_command_loop): ... Rename to ...
14253         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
14254         parameter and make extern.
14255         (mi_on_normal_stop_1): Adjust.
14256         (mi_ui_out): Rename to ...
14257         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
14258         parameter and make extern.  Adjust.
14259         (mi_set_logging): Rename to ...
14260         (mi_interp::set_logging): ... this.  Remove the 'interp'
14261         parameter and make extern.  Adjust.
14262         (mi_interp_procs): Delete.
14263         (mi_interp_factory): Adjust to use 'new'.
14264         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14265         (mi_print_exception, mi_execute_command, mi_load_progress):
14266         Adjust.
14267         * tui/tui-interp.c (tui_interp): New class.
14268         (as_tui_interp): Return a tui_interp pointer.
14269         (tui_on_normal_stop, tui_on_signal_received)
14270         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14271         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14272         to use interp::interp_ui_out.
14273         (tui_init): Rename to ...
14274         (tui_interp::init): ... this.  Remove the 'self' parameter, use
14275         bool, return void and make extern.  Adjust.
14276         (tui_resume): Rename to ...
14277         (tui_interp::resume): ... this.  Remove the 'data' parameter,
14278         return void and make extern.  Adjust.
14279         (tui_suspend): Rename to ...
14280         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
14281         return void and make extern.  Adjust.
14282         (tui_ui_out): Rename to ...
14283         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
14284         parameter, and make extern.  Adjust.
14285         (tui_exec): Rename to ...
14286         (tui_interp::exec): ... this.  Remove the 'data' parameter and
14287         make extern.
14288         (tui_interp_procs): Delete.
14289         (tui_interp_factory): Use "new".
14290
14291 2017-02-02  Tom Tromey  <tom@tromey.com>
14292
14293         * rust-exp.y (ends_raw_string, space_then_number)
14294         (rust_identifier_start_p): Return bool.
14295         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14296         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14297         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14298         (rust_chartype_p): Return bool.
14299         (val_print_struct, rust_print_struct_def, rust_print_type):
14300         Update.
14301         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14302         Return bool.
14303
14304 2017-02-02  Tom Tromey  <tom@tromey.com>
14305
14306         * rust-lang.c: Reindent.
14307
14308 2017-02-02  Tom Tromey  <tom@tromey.com>
14309
14310         * rust-lang.h (rust_crate_for_block): Update.
14311         * rust-lang.c (rust_crate_for_block): Return std::string.
14312         (rust_get_disr_info): Use std:;string, not
14313         gdb::unique_xmalloc_ptr.
14314         * rust-exp.y (crate_name): Update.
14315
14316 2017-02-02  Pedro Alves  <palves@redhat.com>
14317
14318         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14319         field out of gdb_disassembler_test and make it static.
14320
14321 2017-02-02  Pedro Alves  <palves@redhat.com>
14322
14323         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14324         mi1_interp and mi_interp fields.
14325
14326 2017-02-02  Pedro Alves  <palves@redhat.com>
14327
14328         * cli/cli-interp.c (struct saved_output_files, saved_output):
14329         Moved from cli/cli-logging.c.
14330         (cli_set_logging): New function.
14331         (cli_interp_procs): Install cli_set_logging.
14332         * cli/cli-interp.h (make_logging_output, cli_set_logging):
14333         Declare.
14334         * cli/cli-logging.c (struct saved_output_files, saved_output):
14335         Moved to cli/cli-interp.c.
14336         (pop_output_files): Don't save outputs here.
14337         (make_logging_output): New function.
14338         (handle_redirections): Don't build tee nor save previous outputs
14339         here.
14340         * interps.c (current_interp_set_logging): Change prototype.
14341         Assume there's always a set_logging_proc method installed.
14342         * interps.h (interp_set_logging_ftype): Change prototype.
14343         (current_interp_set_logging): Change prototype and adjust comment.
14344         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
14345         use make_logging_output.
14346         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14347 2017-02-02  Pedro Alves  <palves@redhat.com>
14348
14349         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14350         from ...
14351         (set_logging_overwrite): ... here.
14352         (logging_no_redirect_file): Delete.
14353         (set_logging_redirect): Don't handle redirection on the fly.
14354         Instead warn that "logging off" / "logging on" is necessary.
14355         (pop_output_files): Delete references to logging_no_redirect_file.
14356         (show_logging_command): Always speak in terms of what will happen
14357         once logging is reenabled.
14358
14359 2017-02-02  Pedro Alves  <palves@redhat.com>
14360
14361         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14362
14363 2017-02-02  Pedro Alves  <palves@redhat.com>
14364
14365         * disasm.c (gdb_pretty_print_insn): Rename to ...
14366         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14367         Remove gdbarch parameter.  Adapt to clear the object's buffers
14368         instead of allocating new buffers, and to print using the object's
14369         gdb_disassembler instead of calling gdb_print_insn.
14370         (dump_insns): Use gdb_pretty_print_disassembler.
14371         * disasm.h (gdb_pretty_print_insn): Delete declaration.
14372         (gdb_pretty_print_disassembler): New class.
14373         * record-btrace.c (btrace_insn_history): Use
14374         gdb_pretty_print_disassembler.
14375
14376 2017-02-02  Pedro Alves  <palves@redhat.com>
14377
14378         * ada-lang.c (type_as_string): Use string_file.
14379         * ada-valprint.c (ada_print_floating): Use string_file.
14380         * ada-varobj.c (ada_varobj_scalar_image)
14381         (ada_varobj_get_value_image): Use string_file.
14382         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14383         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14384         * breakpoint.c (update_inserted_breakpoint_locations)
14385         (insert_breakpoint_locations, reattach_breakpoints)
14386         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14387         (print_it_watchpoint): Use string_file.
14388         (save_breakpoints): Use stdio_file.
14389         * c-exp.y (oper): Use string_file.
14390         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14391         tee_file.
14392         (pop_output_files): Use delete.
14393         (handle_redirections): Use stdio_file and tee_file.
14394         * cli/cli-setshow.c (do_show_command): Use string_file.
14395         * compile/compile-c-support.c (c_compute_program): Use
14396         string_file.
14397         * compile/compile-c-symbols.c (generate_vla_size): Take a
14398         'string_file &' instead of a 'ui_file *'.
14399         (generate_c_for_for_one_variable): Take a 'string_file &' instead
14400         of a 'ui_file *'.  Use string_file.
14401         (generate_c_for_variable_locations): Take a 'string_file &'
14402         instead of a 'ui_file *'.
14403         * compile/compile-internal.h (generate_c_for_for_one_variable):
14404         Take a 'string_file &' instead of a 'ui_file *'.
14405         * compile/compile-loc2c.c (push, pushf, unary, binary)
14406         (print_label, pushf_register_address, pushf_register)
14407         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14408         'ui_file *'.  Adjust.
14409         * compile/compile.c (compile_to_object): Use string_file.
14410         * compile/compile.h (compile_dwarf_expr_to_c)
14411         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14412         'ui_file *'.
14413         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14414         (replace_typedefs_qualified_name): Use string_file and
14415         obstack_copy0.
14416         * disasm.c (gdb_pretty_print_insn): Use string_file.
14417         (gdb_disassembly): Adjust reference the null_stream global.
14418         (do_ui_file_delete): Delete.
14419         (gdb_insn_length): Use null_stream.
14420         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14421         * dwarf2loc.c (dwarf2_compile_property_to_c)
14422         (locexpr_generate_c_location, loclist_generate_c_location): Take a
14423         'string_file &' instead of a 'ui_file *'.
14424         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14425         * dwarf2read.c (do_ui_file_peek_last): Delete.
14426         (dwarf2_compute_name): Use string_file.
14427         * event-top.c (gdb_setup_readline): Use stdio_file.
14428         * gdbarch.sh (verify_gdbarch): Use string_file.
14429         * gdbtypes.c (safe_parse_type): Use null_stream.
14430         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14431         string_file.
14432         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14433         'string_file *' instead of a 'ui_file *'.
14434         (gdbscm_arch_disassemble): Use string_file.
14435         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14436         * guile/scm-ports.c (class ioscm_file_port): Now a class that
14437         inherits from ui_file.
14438         (ioscm_file_port_delete, ioscm_file_port_rewind)
14439         (ioscm_file_port_put): Delete.
14440         (ioscm_file_port_write): Rename to ...
14441         (ioscm_file_port::write): ... this.  Remove file_port_magic
14442         checks.
14443         (ioscm_file_port_new): Delete.
14444         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14445         ui_file_up.
14446         * guile/scm-type.c (tyscm_type_name): Use string_file.
14447         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14448         Use string_file.
14449         * infcmd.c (print_return_value_1): Use string_file.
14450         * infrun.c (print_target_wait_results): Use string_file.
14451         * language.c (add_language): Use string_file.
14452         * location.c (explicit_to_string_internal): Use string_file.
14453         * main.c (captured_main_1): Use null_file.
14454         * maint.c (maintenance_print_architecture): Use stdio_file.
14455         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14456         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14457         event_channel>: Change type to mi_console_file pointer.
14458         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14459         (mi_console_file_delete): Delete.
14460         (struct mi_console_file): Delete.
14461         (mi_console_file_magic): Delete.
14462         (mi_console_file_new): Delete.
14463         (mi_console_file::mi_console_file): New.
14464         (mi_console_file_delete): Delete.
14465         (mi_console_file_fputs): Delete.
14466         (mi_console_file::write): New.
14467         (mi_console_raw_packet): Delete.
14468         (mi_console_file::flush): New.
14469         (mi_console_file_flush): Delete.
14470         (mi_console_set_raw): Rename to ...
14471         (mi_console_file::set_raw): ... this.
14472         * mi/mi-console.h (class mi_console_file): New class.
14473         (mi_console_file_new, mi_console_set_raw): Delete.
14474         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14475         (mi_set_logging): Use delete and tee_file.  Adjust.
14476         * mi/mi-main.c (output_register): Use string_file.
14477         (mi_cmd_data_evaluate_expression): Use string_file.
14478         (mi_cmd_data_read_memory): Use string_file.
14479         (mi_cmd_execute, print_variable_or_computed): Use string_file.
14480         * mi/mi-out.c (mi_ui_out::main_stream): New.
14481         (mi_ui_out::rewind): Use main_stream and
14482         string_file.
14483         (mi_ui_out::put): Use main_stream and string_file.
14484         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14485         Allocate a 'string_file' instead.
14486         (mi_out_new): Don't allocate a mem_fileopen stream here.
14487         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14488         (mi_ui_out::main_stream): Declare method.
14489         * printcmd.c (eval_command): Use string_file.
14490         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14491         * python/py-arch.c (archpy_disassemble): Use string_file.
14492         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14493         * python/py-frame.c (frapy_str): Use string_file.
14494         * python/py-framefilter.c (py_print_type, py_print_single_arg):
14495         Use string_file.
14496         * python/py-type.c (typy_str): Use string_file.
14497         * python/py-unwind.c (unwind_infopy_str): Use string_file.
14498         * python/py-value.c (valpy_str): Use string_file.
14499         * record-btrace.c (btrace_insn_history): Use string_file.
14500         * regcache.c (regcache_print): Use stdio_file.
14501         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14502         * remote.c (escape_buffer): Use string_file.
14503         * rust-lang.c (rust_get_disr_info): Use string_file.
14504         * serial.c (serial_open_ops_1): Use stdio_file.
14505         (do_serial_close): Use delete.
14506         * stack.c (print_frame_arg): Use string_file.
14507         (print_frame_args): Remove local mem_fileopen stream, not used.
14508         (print_frame): Use string_file.
14509         * symmisc.c (maintenance_print_symbols): Use stdio_file.
14510         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14511         Take a 'string_file *' instead of a 'ui_file *'.
14512         * top.c (new_ui): Use stdio_file and stderr_file.
14513         (free_ui): Use delete.
14514         (execute_command_to_string): Use string_file.
14515         (quit_confirm): Use string_file.
14516         * tracepoint.c (collection_list::append_exp): Use string_file.
14517         * tui/tui-disasm.c (tui_disassemble): Use string_file.
14518         * tui/tui-file.c: Don't include "ui-file.h".
14519         (enum streamtype, struct tui_stream): Delete.
14520         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14521         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14522         (tui_file::tui_file): New method.
14523         (tui_file_fputs): Delete.
14524         (tui_file_get_strbuf): Delete.
14525         (tui_file::puts): New method.
14526         (tui_file_adjust_strbuf): Delete.
14527         (tui_file_flush): Delete.
14528         (tui_file::flush): New method.
14529         * tui/tui-file.h: Tweak intro comment.
14530         Include ui-file.h.
14531         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14532         (tui_file_adjust_strbuf): Delete declarations.
14533         (class tui_file): New class.
14534         * tui/tui-io.c (tui_initialize_io): Use tui_file.
14535         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14536         (tui_register_format): Use string_stream.
14537         * tui/tui-stack.c (tui_make_status_line): Use string_file.
14538         (tui_get_function_from_frame): Use string_file.
14539         * typeprint.c (type_to_string): Use string_file.
14540         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14541         (null_stream): New global.
14542         (ui_file_delete): Delete.
14543         (ui_file::ui_file): New.
14544         (null_file_isatty): Delete.
14545         (ui_file::~ui_file): New.
14546         (null_file_rewind): Delete.
14547         (ui_file::printf): New.
14548         (null_file_put): Delete.
14549         (null_file_flush): Delete.
14550         (ui_file::putstr): New.
14551         (null_file_write): Delete.
14552         (ui_file::putstrn): New.
14553         (null_file_read): Delete.
14554         (ui_file::putc): New.
14555         (null_file_fputs): Delete.
14556         (null_file_write_async_safe): Delete.
14557         (ui_file::vprintf): New.
14558         (null_file_delete): Delete.
14559         (null_file::write): New.
14560         (null_file_fseek): Delete.
14561         (null_file::puts): New.
14562         (ui_file_data): Delete.
14563         (null_file::write_async_safe): New.
14564         (gdb_flush, ui_file_isatty): Adjust.
14565         (ui_file_put, ui_file_rewind): Delete.
14566         (ui_file_write): Adjust.
14567         (ui_file_write_for_put): Delete.
14568         (ui_file_write_async_safe, ui_file_read): Adjust.
14569         (ui_file_fseek): Delete.
14570         (fputs_unfiltered): Adjust.
14571         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14572         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14573         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14574         (set_ui_file_data): Delete.
14575         (string_file::~string_file, string_file::write)
14576         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14577         (do_ui_file_as_string, ui_file_as_string): Delete.
14578         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14579         (struct mem_file): Delete.
14580         (mem_file_new): Delete.
14581         (stdio_file::stdio_file): New.
14582         (mem_file_delete): Delete.
14583         (stdio_file::stdio_file): New.
14584         (mem_fileopen): Delete.
14585         (stdio_file::~stdio_file): New.
14586         (mem_file_rewind): Delete.
14587         (stdio_file::set_stream): New.
14588         (mem_file_put): Delete.
14589         (stdio_file::open): New.
14590         (mem_file_write): Delete.
14591         (stdio_file_magic, struct stdio_file): Delete.
14592         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14593         (stdio_file::flush): New.
14594         (stdio_file_read): Rename to ...
14595         (stdio_file::read): ... this.  Adjust.
14596         (stdio_file_write): Rename to ...
14597         (stdio_file::write): ... this.  Adjust.
14598         (stdio_file_write_async_safe): Rename to ...
14599         (stdio_file::write_async_safe) ... this.  Adjust.
14600         (stdio_file_fputs): Rename to ...
14601         (stdio_file::puts) ... this.  Adjust.
14602         (stdio_file_isatty): Delete.
14603         (stdio_file_fseek): Delete.
14604         (stdio_file::isatty): New.
14605         (stderr_file_write): Rename to ...
14606         (stderr_file::write) ... this.  Adjust.
14607         (stderr_file_fputs): Rename to ...
14608         (stderr_file::puts) ... this.  Adjust.
14609         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14610         (stderr_file::stderr_file): New.
14611         (tee_file_magic): Delete.
14612         (struct tee_file): Delete.
14613         (tee_file::tee_file): New.
14614         (tee_file_new): Delete.
14615         (tee_file::~tee_file): New.
14616         (tee_file_delete): Delete.
14617         (tee_file_flush): Rename to ...
14618         (tee_file::flush): ... this.  Adjust.
14619         (tee_file_write): Rename to ...
14620         (tee_file::write): ... this.  Adjust.
14621         (tee_file::write_async_safe): New.
14622         (tee_file_fputs): Rename to ...
14623         (tee_file::puts): ... this.  Adjust.
14624         (tee_file_isatty): Rename to ...
14625         (tee_file::isatty): ... this.  Adjust.
14626         * ui-file.h (struct obstack, struct ui_file): Don't
14627         forward-declare.
14628         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14629         (ui_file_write_ftype)
14630         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14631         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14632         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14633         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14634         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14635         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14636         (set_ui_file_fseek): Delete.
14637         (ui_file_data, ui_file_delete, ui_file_rewind)
14638         (struct ui_file): New.
14639         (ui_file_up): New.
14640         (class null_file): New.
14641         (null_stream): Declare.
14642         (ui_file_write_for_put, ui_file_put): Delete.
14643         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14644         Delete.
14645         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14646         (gdb_fopen, tee_file_new): Delete.
14647         (struct string_file): New.
14648         (struct stdio_file): New.
14649         (stdio_file_up): New.
14650         (struct stderr_file): New.
14651         (class tee_file): New.
14652         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14653         of a 'ui_file *'.  Adjust.
14654         * ui-out.h (class ui_out) <field_stream>: Likewise.
14655         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14656         (null_stream): Delete.
14657         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14658         Adjust.
14659         * utils.h (struct ui_file): Delete forward declaration..
14660         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14661         (error_stream): Take a 'string_file &' instead of a
14662         'ui_file *'.
14663         * varobj.c (varobj_value_get_print_value): Use string_file.
14664         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14665         * gdbarch.c: Regenerate.
14666
14667 2017-02-02  Pedro Alves  <palves@redhat.com>
14668
14669         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14670         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
14671         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
14672         Adjust to call gdb_print_insn instead of
14673         gdb_disassembler::print_insn.
14674         (dump_insns, do_mixed_source_and_assembly_deprecated)
14675         (do_mixed_source_and_assembly, do_assembly_only): Add back a
14676         'gdbarch' parameter.  Remove gdb_disassembler parameter.
14677         (gdb_disassembly): Don't allocate a gdb_disassembler here.
14678         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14679         declaration.
14680         (gdb_pretty_print_insn): Re-add declaration.
14681         * record-btrace.c (btrace_insn_history): Don't allocate a
14682         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
14683
14684 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
14685
14686         * disasm.h (gdb_disassembly): Remove file_string parameter.
14687         * disasm.c (gdb_disassembly): Likewise.
14688         * cli/cli-cmds.c (print_disassembly): Adapt.
14689         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14690         * stack.c (do_gdb_disassembly): Likewise.
14691
14692 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14693
14694         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14695         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14696         targets.  And if the implicit value is longer than needed, extract
14697         the first bytes instead of the "least significant" ones.
14698
14699 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14700
14701         * btrace.c (btrace_enable): Do not call btrace_add_pc for
14702         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14703         (btrace_fetch): Assert can_access_registers_ptid.
14704         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14705         validate_registers_access.
14706
14707 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14708
14709         * gdbthread.h (can_access_registers_ptid): New.
14710         * thread.c (can_access_registers_ptid): New.
14711
14712 2017-02-01  Pedro Alves  <palves@redhat.com>
14713
14714         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14715
14716 2017-01-31  Pedro Alves  <palves@redhat.com>
14717
14718         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
14719         Fix typos.
14720
14721 2017-01-31  Pedro Alves  <palves@redhat.com>
14722
14723         * stack.c (print_frame_args): Remove local mem_fileopen stream,
14724         not used.
14725
14726 2017-01-31  Pedro Alves  <palves@redhat.com>
14727
14728         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
14729
14730 2017-01-31  Pedro Alves  <palves@redhat.com>
14731
14732         * common/scoped_restore.h
14733         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
14734         change the value's parameter type to T2.
14735         (make_scoped_restore): Likewise.
14736
14737 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14738             Richard Henderson  <rth@redhat.com>
14739
14740         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
14741         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
14742         GS_BASE for older kernels.
14743         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
14744         GS_BASE for older kernels.
14745         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
14746         and GS_BASE to the offset table.
14747         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
14748         system register group.
14749         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
14750         for older kernels.
14751         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
14752         amd64 ABI.
14753         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
14754         AMD64_GSBASE_REGNUM.
14755         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
14756         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
14757         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
14758         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
14759         i386/64bit-segments.xml in those rules.
14760         * features/i386/64bit-segments.xml: New file.
14761         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
14762         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
14763         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
14764         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
14765         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
14766         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
14767         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
14768         * features/i386/amd64-avx-linux.c: Regenerated.
14769         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
14770         * features/i386/amd64-avx-mpx.c: Regenerated.
14771         * features/i386/amd64-avx512-linux.c: Regenerated.
14772         * features/i386/amd64-linux.c: Regenerated.
14773         * features/i386/amd64-mpx-linux.c: Regenerated.
14774         * features/i386/i386-avx-mpx-linux.c: Regenerated.
14775         * features/i386/i386-avx-mpx.c: Regenerated.
14776         * features/i386/x32-avx-linux.c: Regenerated.
14777         * features/i386/x32-avx512-linux.c: Regenerated.
14778         * regformats/i386/amd64-avx-linux.dat: Regenerated.
14779         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
14780         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
14781         * regformats/i386/amd64-linux.dat: Regenerated.
14782         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
14783         * regformats/i386/x32-avx-linux.dat: Regenerated.
14784         * regformats/i386/x32-avx512-linux.dat: Regenerated.
14785         * regformats/i386/x32-linux.dat: Regenerated.
14786
14787 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14788
14789         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
14790         Set to AMD64_NUM_REGS.
14791
14792 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14793
14794         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
14795         that checks validity of a register number.
14796
14797 2017-01-27  Kees Cook  <keescook@google.com>
14798
14799         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
14800         fetch_fpregs if target has fpa registers.
14801         (arm_linux_store_inferior_registers): Call store_fpregs if target
14802         has fpa registers.
14803
14804 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14805
14806         * cris-tdep.c (cris_gdbarch_init): Remove check for
14807         info.byte_order and force it to BFD_ENDIAN_LITTLE.
14808
14809 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
14810
14811         * corelow.c (get_core_register_section): Check for regset
14812         existence before checking for REGSET_VARIABLE_SIZE.
14813
14814 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14815             Pedro Alves  <palves@redhat.com>
14816
14817         PR gdb/20939
14818         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
14819         call memory_error, save memaddr instead.
14820         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
14821         negative, cal memory_error.
14822         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
14823
14824 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14825
14826         * disasm-selftests.c (memory_error_test): New function.
14827         (_initialize_disasm_selftests): Register memory_error_test.
14828
14829 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14830
14831         * Makefile.in (SFILES): Add disasm-selftests.c and
14832         selftest-arch.c.
14833         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
14834         * disasm-selftests.c: New file.
14835         * selftest-arch.c: New file.
14836         * selftest-arch.h: New file.
14837
14838 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14839
14840         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
14841         to bfd_arch_mep.  Don't return 0 if section is not
14842         found.  Call print_insn_mep.
14843
14844 2017-01-26  Pedro Alves  <palves@redhat.com>
14845             Yao Qi  <yao.qi@linaro.org>
14846
14847         * arm-tdep.c: Include "disasm.h".
14848         (gdb_print_insn_arm): Update code to get gdbarch.
14849         * disasm.c (dis_asm_read_memory): Change it to
14850         gdb_disassembler::dis_asm_read_memory.
14851         (dis_asm_memory_error): Likewise.
14852         (dis_asm_print_address): Likewise.
14853         (gdb_pretty_print_insn): Change it to
14854         gdb_disassembler::pretty_print_insn.
14855         (dump_insns): Add one argument gdb_disassemlber.  All
14856         callers updated.
14857         (do_mixed_source_and_assembly_deprecated): Likewise.
14858         (do_mixed_source_and_assembly): Likewise.
14859         (do_assembly_only): Likewise.
14860         (gdb_disassembler::gdb_disassembler): New.
14861         (gdb_disassembler::print_insn): New.
14862         * disasm.h (class gdb_disassembler): New.
14863         (gdb_pretty_print_insn): Remove declaration.
14864         (gdb_disassemble_info): Likewise.
14865         * guile/scm-disasm.c (class gdbscm_disassembler): New.
14866         (gdbscm_disasm_read_memory_worker): Update.
14867         (gdbscm_disasm_read_memory): Update.
14868         (gdbscm_disasm_memory_error): Remove.
14869         (gdbscm_disasm_print_address): Remove.
14870         (gdbscm_disassembler::gdbscm_disassembler): New.
14871         (gdbscm_print_insn_from_port): Update.
14872         * mips-tdep.c: Include disasm.h.
14873         (gdb_print_insn_mips): Update code to get gdbarch.
14874         * record-btrace.c (btrace_insn_history): Update.
14875         * spu-tdep.c: Include disasm.h.
14876         (struct spu_dis_asm_data): Remove.
14877         (struct spu_dis_asm_info): New.
14878         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
14879         SPU id.
14880         (gdb_print_insn_spu): Cast disassemble_info to
14881         spu_dis_asm_info.
14882
14883 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14884
14885         * disasm.c (do_ui_file_delete): Delete.
14886         (gdb_insn_length): Move code creating stream to ...
14887         * utils.c (null_stream): ... here.  New function.
14888         * utils.h (null_stream): Declare.
14889
14890 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
14891
14892         * python/py-inferior.c (find_thread_object): Return directly
14893         from the loop.  Remove "found" variable.
14894
14895 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
14896
14897         GDB 7.12.1 released.
14898
14899 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14900
14901         * python/py-function.c (fnpy_call): Reorder declarations to have
14902         the gdbpy_enter object declared first.
14903         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
14904
14905 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14906
14907         PR python/21068
14908         * python/python-internal.h (PyMem_RawMalloc): Define for
14909         Python < 3.4.
14910         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
14911         PyMem_RawMalloc instead of PyMem_Malloc.
14912
14913 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
14914             Luis Machado  <lgustavo@codesourcery.com>
14915
14916         * NEWS (New commands): Mention flash-erase.
14917         (New MI commands): Mention target-flash-erase.
14918         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
14919         command.
14920         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
14921         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
14922         * target.c (flash_erase_command): New function.
14923         (initialize_targets): Add new flash-erase command.
14924         * target.h (flash_erase_command): New declaration.
14925
14926 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
14927
14928         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
14929         HAVE_SYS_PROCFS_H is defined.
14930
14931 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14932
14933         * remote.c (struct cached_reg): Change data into a pointer.
14934         * (stop_reply_dtr): Free data pointers before deleting vector.
14935         (process_stop_reply): Likewise.
14936         (remote_parse_stop_reply): Allocate space for data
14937
14938 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14939
14940         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
14941         MAX_REGISTER_SIZE.
14942         (amd64_pseudo_register_read_value): Likewise.
14943         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
14944         (store_register_using_P): Likewise.
14945         * regcache.c (regcache_xfer_part): Likewise.
14946
14947 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
14948
14949         Split real and pseudo registers.
14950         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
14951         (sparc32_pseudo_regnum): New enum.
14952         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
14953         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
14954         (SPARC32_CP0_REGISTERS): New macro.
14955         (sparc32_pseudo_register_name): New function.
14956         (sparc32_register_name): Use sparc32_pseudo_register_name.
14957         (sparc32_pseudo_register_type): New function.
14958         (sparc32_register_type): Use sparc32_pseudo_register_type.
14959         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
14960         pseudo register numbers.
14961         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
14962         (SPARC64_CP0_REGISTERS): New macro.
14963         (sparc64_pseudo_register_name): New function.
14964         (sparc64_register_name): Use sparc64_pseudo_register_name.
14965         (sparc64_pseudo_register_type): New function.
14966         (sparc64_register_type): Use sparc64_pseudo_register_type.
14967         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
14968         pseudo register numbers.
14969         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
14970         sparc64_store_arguments): Handle pseudo register numbers.
14971
14972 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14973
14974         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
14975         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
14976         output.
14977         (getpkt_or_notif_sane_1): Likewise.
14978
14979 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14980
14981         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
14982         of CC.  Pass "-x c++-header" instead of "-x c".
14983
14984 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14985
14986         * remote.c (remote_can_async_p): Update comment.
14987
14988 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14989
14990         * linux-nat.c (linux_nat_can_async_p): Update comment.
14991
14992 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14993
14994         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
14995
14996 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
14997
14998         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
14999
15000 2017-01-10  Tom Tromey  <tom@tromey.com>
15001
15002         * python/py-type.c (typy_legacy_template_argument): Update.
15003         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15004         ~demangle_parse_info): Declare new members.
15005         (cp_demangled_name_to_comp): Return unique_ptr.
15006         (cp_demangled_name_parse_free)
15007         (make_cleanup_cp_demangled_name_parse_free)
15008         (cp_new_demangle_parse_info): Remove.
15009         * cp-support.c (do_demangled_name_parse_free_cleanup)
15010         (make_cleanup_cp_demangled_name_parse_free): Remove.
15011         (inspect_type, cp_canonicalize_string_full)
15012         (cp_canonicalize_string): Update.
15013         (mangled_name_to_comp): Change return type.
15014         (cp_class_name_from_physname, method_name_from_physname)
15015         (cp_func_name, cp_remove_params): Update.
15016         * cp-name-parser.y (demangle_parse_info): New constructor, from
15017         cp_new_demangle_parse_info.
15018         (~demangle_parse_info): New destructor, from
15019         cp_demangled_name_parse_free.
15020         (cp_merge_demangle_parse_infos): Update.
15021         (cp_demangled_name_to_comp): Change return type.
15022
15023 2017-01-10  Tom Tromey  <tom@tromey.com>
15024
15025         * top.c (prevent_dont_repeat): Change return type.
15026         * python/python.c (execute_gdb_command): Use std::string.
15027         Update.
15028         * guile/guile.c (gdbscm_execute_gdb_command): Update.
15029         * command.h (prevent_dont_repeat): Change return type.
15030         * breakpoint.c (bpstat_do_actions_1): Update.
15031
15032 2017-01-10  Tom Tromey  <tom@tromey.com>
15033
15034         * value.h (scoped_value_mark::~scoped_value_mark): Call
15035         free_to_mark.
15036         (scoped_value_mark::free_to_mark): New method.
15037         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15038         scoped_value_mark.
15039
15040 2017-01-10  Tom Tromey  <tom@tromey.com>
15041
15042         * python/py-value.c (valpy_dereference, valpy_referenced_value)
15043         (valpy_reference_value, valpy_const_value, valpy_get_address)
15044         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15045         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15046         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15047         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15048         scoped_value_mark.
15049         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15050         * value.h (scoped_value_mark): New class.
15051
15052 2017-01-10  Tom Tromey  <tom@tromey.com>
15053
15054         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15055         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15056         * psymtab.c (discard_psymtabs_upto): Remove.
15057         (make_cleanup_discard_psymtabs): Remove.
15058         (struct psymtab_state): Remove.
15059
15060 2017-01-10  Tom Tromey  <tom@tromey.com>
15061
15062         * record-full.c (record_full_save_cleanups): Remove.
15063         (record_full_save): Use gdb::unlinker.
15064         * gcore.c (do_bfd_delete_cleanup): Remove.
15065         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
15066         cleanups.
15067         * dwarf2read.c (unlink_if_set): Remove.
15068         (write_psymtabs_to_index): Use gdb::unlinker.
15069         * common/gdb_unlinker.h: New file.
15070
15071 2017-01-10  Tom Tromey  <tom@tromey.com>
15072
15073         * windows-tdep.c (windows_xfer_shared_library): Update.
15074         * windows-nat.c (windows_make_so): Update.
15075         * utils.h (make_cleanup_bfd_unref): Remove.
15076         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15077         * symfile.h (symfile_bfd_open)
15078         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15079         * symfile.c (read_symbols, symbol_file_add)
15080         (separate_debug_file_exists): Update.
15081         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15082         (generic_load, reread_symbols): Update.
15083         * symfile-mem.c (symbol_file_add_from_memory): Update.
15084         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15085         (spu_symbol_file_add_from_memory): Update.
15086         * solist.h (struct target_so_ops) <bfd_open>: Return
15087         gdb_bfd_ref_ptr.
15088         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15089         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15090         gdb_bfd_ref_ptr.
15091         (solib_map_sections, reload_shared_libraries_1): Update.
15092         * solib-svr4.c (enable_break): Update.
15093         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15094         * solib-frv.c (enable_break2): Update.
15095         * solib-dsbt.c (enable_break): Update.
15096         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15097         gdb_bfd_ref_ptr.
15098         (darwin_solib_get_all_image_info_addr_at_init): Update.
15099         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15100         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15101         * record-full.c (record_full_save): Update.
15102         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15103         * procfs.c (insert_dbx_link_bpt_in_file): Update.
15104         * minidebug.c (find_separate_debug_file_in_section): Return
15105         gdb_bfd_ref_ptr.
15106         * machoread.c (macho_add_oso_symfile): Change abfd to
15107         gdb_bfd_ref_ptr.
15108         (macho_symfile_read_all_oso): Update.
15109         (macho_check_dsym): Return gdb_bfd_ref_ptr.
15110         (macho_symfile_read): Update.
15111         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15112         (jit_bfd_try_read_symtab): Update.
15113         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15114         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15115         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15116         gdb_bfd_ref_ptr.
15117         (gdb_bfd_ref_policy): New struct.
15118         (gdb_bfd_ref_ptr): New typedef.
15119         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15120         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15121         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15122         gdb_bfd_ref_ptr.
15123         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15124         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15125         (gcore_command): Update.
15126         * exec.c (exec_file_attach): Update.
15127         * elfread.c (elf_symfile_read): Update.
15128         * dwarf2read.c (dwarf2_get_dwz_file): Update.
15129         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15130         (open_and_init_dwo_file): Update.
15131         (open_dwp_file): Return gdb_bfd_ref_ptr.
15132         (open_and_init_dwp_file): Update.
15133         * corelow.c (core_open): Update.
15134         * compile/compile-object-load.c (compile_object_load): Update.
15135         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15136         * coffread.c (coff_symfile_read): Update.
15137         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15138         gdb_bfd_ref_ptr.  Rename.
15139         (dump_bfd_file, restore_command): Update.
15140         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15141         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15142         (find_separate_debug_file_by_buildid): Update.
15143
15144 2017-01-10  Tom Tromey  <tom@tromey.com>
15145
15146         * common/gdb_ref_ptr.h: New file.
15147         * python/py-ref.h (struct gdbpy_ref_policy): New.
15148         (gdbpy_ref): Now a typedef.
15149
15150 2017-01-10  Tom Tromey  <tom@tromey.com>
15151
15152         * utils.h (make_cleanup_htab_delete): Don't declare.
15153         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15154         Remove.
15155         * linespec.c (decode_compound_collector): Add constructor,
15156         destructor.
15157         (lookup_prefix_sym): Remove cleanup.
15158         (symtab_collector): Add constructor, destructor.
15159         (collect_symtabs_from_filename): Remove cleanup.
15160         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15161         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15162         Use htab_up.
15163         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15164         * dwarf2read.c (dw2_expand_symtabs_matching)
15165         (dw2_map_symbol_filenames, dwarf_decode_macros)
15166         (write_psymtabs_to_index): Use htab_up.
15167         * dwarf2loc.c (func_verify_no_selftailcall)
15168         (call_site_find_chain_1, func_verify_no_selftailcall)
15169         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15170         std::vector, gdb::unique_xmalloc_ptr.
15171         (call_sitep): Remove typedef.
15172         (dwarf2_locexpr_baton_eval): Remove unused variable.
15173
15174 2017-01-10  Tom Tromey  <tom@tromey.com>
15175
15176         * python/python-internal.h (make_cleanup_py_decref)
15177         (make_cleanup_py_xdecref): Don't declare.
15178         * python/py-utils.c (py_decref, make_cleanup_py_decref)
15179         (py_xdecref, make_cleanup_py_xdecref): Remove.
15180
15181 2017-01-10  Tom Tromey  <tom@tromey.com>
15182
15183         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15184         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15185
15186 2017-01-10  Tom Tromey  <tom@tromey.com>
15187
15188         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15189
15190 2017-01-10  Tom Tromey  <tom@tromey.com>
15191
15192         * python/py-utils.c (unicode_to_encoded_string)
15193         (python_string_to_target_string)
15194         (python_string_to_target_python_string)
15195         (python_string_to_host_string, gdbpy_obj_to_string)
15196         (get_addr_from_python): Use gdbpy_ref.
15197
15198 2017-01-10  Tom Tromey  <tom@tromey.com>
15199
15200         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15201         gdbpy_ref.
15202
15203 2017-01-10  Tom Tromey  <tom@tromey.com>
15204
15205         * python/python.c (eval_python_command, gdbpy_decode_line)
15206         (gdbpy_run_events, gdbpy_start_type_printers)
15207         (gdbpy_apply_type_printers): Use gdbpy_ref.
15208
15209 2017-01-10  Tom Tromey  <tom@tromey.com>
15210
15211         * python/py-param.c (get_doc_string, compute_enum_values): Use
15212         gdbpy_ref.
15213
15214 2017-01-10  Tom Tromey  <tom@tromey.com>
15215
15216         * python/py-inferior.c (find_thread_object, build_inferior_list):
15217         Use gdbpy_ref.
15218
15219 2017-01-10  Tom Tromey  <tom@tromey.com>
15220
15221         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15222
15223 2017-01-10  Tom Tromey  <tom@tromey.com>
15224
15225         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15226         gdbpy_ref.
15227
15228 2017-01-10  Tom Tromey  <tom@tromey.com>
15229
15230         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
15231         extra incref.
15232         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15233         Use gdbpy_ref.
15234
15235 2017-01-10  Tom Tromey  <tom@tromey.com>
15236
15237         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15238         gdbpy_ref.
15239
15240 2017-01-10  Tom Tromey  <tom@tromey.com>
15241
15242         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
15243         decref results of PyArg_ParseTupleAndKeywords.
15244
15245 2017-01-10  Tom Tromey  <tom@tromey.com>
15246
15247         * python/python.c (python_run_simple_file): Use
15248         unique_xmalloc_ptr, gdbpy_ref.
15249
15250 2017-01-10  Tom Tromey  <tom@tromey.com>
15251
15252         * python/py-prettyprint.c (print_stack_unless_memory_error)
15253         (print_string_repr, print_children): Use gdbpy_ref.
15254         (dummy_python_frame): New class.
15255         (dummy_python_frame::dummy_python_frame): Rename from
15256         push_dummy_python_frame.
15257         (py_restore_tstate): Remove.
15258
15259 2017-01-10  Tom Tromey  <tom@tromey.com>
15260
15261         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15262
15263 2017-01-10  Tom Tromey  <tom@tromey.com>
15264
15265         * python/python.c (ensure_python_env, restore_python_env):
15266         Remove.
15267         * python/python-internal.h (ensure_python_env): Don't declare.
15268         * varobj.h (varobj_ensure_python_env): Don't declare.
15269         * varobj.c (varobj_ensure_python_env): Remove.
15270
15271 2017-01-10  Tom Tromey  <tom@tromey.com>
15272
15273         * varobj.c (varobj_value_get_print_value): Use
15274         gdbpy_enter_varobj.
15275
15276 2017-01-10  Tom Tromey  <tom@tromey.com>
15277
15278         * python/py-prettyprint.c (print_string_repr, print_children):
15279         Update.
15280         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15281         of "encoding".
15282         * varobj.c (varobj_value_get_print_value): Update.
15283         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15284
15285 2017-01-10  Tom Tromey  <tom@tromey.com>
15286
15287         * varobj.c (varobj_get_display_hint)
15288         (dynamic_varobj_has_child_method, install_new_value_visualizer)
15289         (varobj_set_visualizer, free_variable): Use
15290         gdbpy_enter_varobj.
15291
15292 2017-01-10  Tom Tromey  <tom@tromey.com>
15293
15294         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15295         (do_finish_initialization): New function.  Use gdbpy_ref.
15296         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
15297         do_finish_initialization.
15298
15299 2017-01-10  Tom Tromey  <tom@tromey.com>
15300
15301         * python/py-param.c (get_set_value, get_show_value): Use
15302         gdbpy_enter, gdbpy_ref.
15303
15304 2017-01-10  Tom Tromey  <tom@tromey.com>
15305
15306         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15307
15308 2017-01-10  Tom Tromey  <tom@tromey.com>
15309
15310         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15311
15312 2017-01-10  Tom Tromey  <tom@tromey.com>
15313
15314         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15315         Use gdbpy_enter_varobj.
15316
15317 2017-01-10  Tom Tromey  <tom@tromey.com>
15318
15319         * varobj.c (gdbpy_enter_varobj): New constructor.
15320         * python/python-internal.h (gdbpy_enter_varobj): New class.
15321         * python/py-varobj.c (py_varobj_get_iterator): Use
15322         gdbpy_enter_varobj.
15323
15324 2017-01-10  Tom Tromey  <tom@tromey.com>
15325
15326         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15327         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15328         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15329         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15330         unique_xmalloc_ptr.
15331         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15332
15333 2017-01-10  Tom Tromey  <tom@tromey.com>
15334
15335         * python/py-xmethods.c (invoke_match_method): Use
15336         gdbpy_ref.
15337
15338 2017-01-10  Tom Tromey  <tom@tromey.com>
15339
15340         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15341         gdbpy_enter, gdbpy_ref.
15342
15343 2017-01-10  Tom Tromey  <tom@tromey.com>
15344
15345         * python/python.c (python_interactive_command): Use gdbpy_enter.
15346
15347 2017-01-10  Tom Tromey  <tom@tromey.com>
15348
15349         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15350         gdbpy_ref.
15351
15352 2017-01-10  Tom Tromey  <tom@tromey.com>
15353
15354         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15355         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15356
15357 2017-01-10  Tom Tromey  <tom@tromey.com>
15358
15359         * utils.h (htab_deleter): New struct.
15360         (htab_up): New typedef.
15361         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15362         gdbpy_enter, gdbpy_ref, htab_up.
15363
15364 2017-01-10  Tom Tromey  <tom@tromey.com>
15365
15366         * python/py-unwind.c (pending_frame_invalidate): Remove.
15367         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15368
15369 2017-01-10  Tom Tromey  <tom@tromey.com>
15370
15371         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15372         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15373
15374 2017-01-10  Tom Tromey  <tom@tromey.com>
15375
15376         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15377
15378 2017-01-10  Tom Tromey  <tom@tromey.com>
15379
15380         * python/python.c (gdbpy_eval_from_control_command)
15381         (gdbpy_source_script, gdbpy_run_events)
15382         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15383         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15384         gdbpy_enter.
15385
15386 2017-01-10  Tom Tromey  <tom@tromey.com>
15387
15388         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15389
15390 2017-01-10  Tom Tromey  <tom@tromey.com>
15391
15392         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15393
15394 2017-01-10  Tom Tromey  <tom@tromey.com>
15395
15396         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15397         (python_on_inferior_call_pre, python_on_inferior_call_post)
15398         (python_on_memory_change, python_on_register_change)
15399         (python_inferior_exit, python_new_objfile, add_thread_object)
15400         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15401
15402 2017-01-10  Tom Tromey  <tom@tromey.com>
15403
15404         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15405         (bpfinishpy_handle_exit): Use gdbpy_enter.
15406
15407 2017-01-10  Tom Tromey  <tom@tromey.com>
15408
15409         * python/py-cmd.c (cmdpy_destroyer)
15410         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15411         gdbpy_enter.
15412
15413 2017-01-10  Tom Tromey  <tom@tromey.com>
15414
15415         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15416         gdbpy_enter.
15417         (gdbpy_breakpoint_has_cond): Likewise.
15418
15419 2017-01-10  Tom Tromey  <tom@tromey.com>
15420
15421         * python/python.c (gdbpy_enter): New constructor.
15422         (~gdbpy_enter): New destructor.
15423         (restore_python_env, ensure_python_env): Rewrite.
15424         * python/python-internal.h (gdbpy_enter): New class.
15425
15426 2017-01-10  Tom Tromey  <tom@tromey.com>
15427
15428         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15429
15430 2017-01-10  Tom Tromey  <tom@tromey.com>
15431
15432         * python/py-value.c (value_has_field, get_field_flag)
15433         (get_field_type, valpy_getitem, convert_value_from_python): Use
15434         gdbpy_ref.
15435
15436 2017-01-10  Tom Tromey  <tom@tromey.com>
15437
15438         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15439         gdbpy_ref.
15440
15441 2017-01-10  Tom Tromey  <tom@tromey.com>
15442
15443         * python/py-prettyprint.c (search_pp_list)
15444         (find_pretty_printer_from_objfiles)
15445         (find_pretty_printer_from_progspace)
15446         (find_pretty_printer_from_gdb, find_pretty_printer)
15447         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15448         gdbpy_ref.
15449
15450 2017-01-10  Tom Tromey  <tom@tromey.com>
15451
15452         * python/py-param.c (call_doc_function): Use gdbpy_ref.
15453
15454 2017-01-10  Tom Tromey  <tom@tromey.com>
15455
15456         * python/py-linetable.c (build_line_table_tuple_from_pcs)
15457         (ltpy_get_all_source_lines): Use gdbpy_ref.
15458
15459 2017-01-10  Tom Tromey  <tom@tromey.com>
15460
15461         * python/py-framefilter.c (extract_sym, extract_value)
15462         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15463         gdbpy_ref.
15464
15465 2017-01-10  Tom Tromey  <tom@tromey.com>
15466
15467         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15468
15469 2017-01-10  Tom Tromey  <tom@tromey.com>
15470
15471         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15472
15473 2017-01-10  Tom Tromey  <tom@tromey.com>
15474
15475         * python/py-function.c (convert_values_to_python, fnpy_init): Use
15476         gdbpy_ref.
15477
15478 2017-01-10  Tom Tromey  <tom@tromey.com>
15479
15480         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15481
15482 2017-01-10  Tom Tromey  <tom@tromey.com>
15483
15484         * python/py-type.c (convert_field, make_fielditem, typy_fields)
15485         (typy_range): Use gdbpy_ref.
15486
15487 2017-01-10  Tom Tromey  <tom@tromey.com>
15488
15489         * python/py-threadevent.c (create_thread_event_object): Use
15490         gdbpy_ref.
15491         * python/py-stopevent.c (create_stop_event_object): Simplify.
15492         (emit_stop_event): Use gdbpy_ref.
15493         * python/py-signalevent.c (create_signal_event_object): Use
15494         gdbpy_ref.
15495         * python/py-newobjfileevent.c (create_new_objfile_event_object)
15496         (emit_new_objfile_event, create_clear_objfiles_event_object)
15497         (emit_clear_objfiles_event): Use gdbpy_ref.
15498         * python/py-infevents.c (create_inferior_call_event_object)
15499         (create_register_changed_event_object)
15500         (create_memory_changed_event_object, emit_inferior_call_event)
15501         (emit_memory_changed_event, emit_register_changed_event): Use
15502         gdbpy_ref.
15503         * python/py-exitedevent.c (create_exited_event_object)
15504         (emit_exited_event): Use gdbpy_ref.
15505         * python/py-event.h (evpy_emit_event): Remove
15506         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15507         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15508         * python/py-continueevent.c (emit_continue_event): Use
15509         gdbpy_ref.
15510         * python/py-breakpoint.c (gdbpy_breakpoint_created)
15511         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15512         gdbpy_ref.
15513         * python/py-bpevent.c (create_breakpoint_event_object): Use
15514         gdbpy_ref.
15515
15516 2017-01-10  Tom Tromey  <tom@tromey.com>
15517
15518         * python/py-ref.h: New file.
15519
15520 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15521
15522         * cli-out.c (cli_ui_out::do_redirect): Change return type to
15523         void.
15524         * cli-out.h (cli_ui_out::do_redirect): Likewise.
15525         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15526         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15527         * ui-out.c (ui_out::redirect): Likewise.
15528         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15529         * cli/cli-logging.c (set_logging_redirect): Update call site of
15530         ui_out::redirect.
15531         (handle_redirections): Likewise.
15532         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15533         * top.c (execute_command_to_string): Likewise.
15534         * utils.c (do_ui_out_redirect_pop): Likewise.
15535
15536 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15537
15538         * stack.c (_initialize_stack): Update "frame" command help message.
15539
15540 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
15541
15542         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15543
15544 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15545
15546         * x86-linux-nat.h: Include gdb_proc_service.h.
15547
15548 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15549
15550         * ser-base.h: Include serial.h.
15551
15552 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15553
15554         * ppc-linux-tdep.h: Include ppc-tdep.h.
15555
15556 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15557
15558         * nat/amd64-linux-siginfo.h: Include signal.h.
15559
15560 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15561
15562         * nat/aarch64-linux-hw-point.h: Include break-common.h.
15563
15564 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15565
15566         * mi/mi-parse.h: Include mi-cmds.h.
15567
15568 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15569
15570         * inf-loop.c: Don't include "target.h".
15571         * inf-loop.h: Include it here.
15572
15573 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15574
15575         * dfp.h: Include "dboulest.h" and "expression.h".
15576
15577 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15578
15579         * ax-gdb.h: Include "ax.h".
15580
15581 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15582
15583         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15584         with nat/gdb_ptrace.h.
15585
15586 2017-01-05  Yao Qi  <yao.qi@linaro.org>
15587
15588         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15589         new line.
15590         (mips64_fbsd_sigframe_init): Likewise.
15591
15592 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15593
15594         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15595         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15596
15597 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15598
15599         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15600         * NEWS: Mention new FreeBSD/mips native configuration.
15601         * config/mips/fbsd.mh: New file.
15602         * configure.host: Add mips*-*-freebsd*.
15603         * mips-fbsd-nat.c: New file.
15604
15605 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15606
15607         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15608         (ALLDEPFILES): Add mips-fbsd-tdep.c.
15609         * NEWS: Mention new FreeBSD/mips target.
15610         * configure.tgt: Add mips*-*-freebsd*.
15611         * mips-fbsd-tdep.c: New file.
15612         * mips-fbsd-tdep.h: New file.
15613
15614 2017-01-04  Yao Qi  <yao.qi@linaro.org>
15615
15616         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15617         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15618
15619 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15620
15621         Update copyright year range in all GDB files.
15622
15623 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15624
15625         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15626
15627 For older changes see ChangeLog-2016.
15628 \f
15629 Local Variables:
15630 mode: change-log
15631 left-margin: 8
15632 fill-column: 74
15633 version-control: never
15634 coding: utf-8
15635 End: