Simplify the psymbol hash function
[external/binutils.git] / gdb / ChangeLog
1 2017-11-09  Tom Tromey  <tom@tromey.com>
2
3         * psymtab.c (psymbol_hash): Do not hash string contents.
4         (psymbol_compare): Add comment.
5
6 2017-11-09  Tom Tromey  <tom@tromey.com>
7
8         * dictionary.c (dict_hash): Move "TKB" check into the "switch".
9
10 2017-11-08  Joel Brobecker  <brobecker@adacore.com>
11
12         * ada-exp.y (write_var_from_sym): Remove parameter
13         "orig_left_context".  Update all callers.
14
15 2017-11-08  Simon Marchi  <simon.marchi@ericsson.com>
16
17         * tracepoint.h (class collection_list) <stringify>: Return
18         std::vector<std::string>.
19         (encode_actions_rsp): Change parameters to
20         std::vector<std::string> *.
21         * tracepoint.c (collection_list::stringify): Return
22         std::vector<std::string> and adjust accordingly.
23         (encode_actions_rsp): Changee parameters to
24         std::vector<std::string> and adjust accordingly.
25         * remote.c (free_actions_list),
26         free_actions_list_cleanup_wrapper): Remove.
27         (remote_download_tracepoint): Adjust to std::vector.
28
29 2017-11-08  Tom Tromey  <tom@tromey.com>
30
31         * dwarf2read.c (symbolp): Remove typedef.
32         (read_func_scope): Use std::vector.
33         (process_structure_scope): Use std::vector.
34
35 2017-11-08  Pedro Alves  <palves@redhat.com>
36
37         * ada-lang.c (ada_make_symbol_completion_list): Use
38         completion_skip_symbol.
39         * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
40         (symbol_is_function_or_method(symbol*)): New.
41         (add_symtab_completions): Add complete_symbol_mode parameter.  Use
42         completion_skip_symbol.
43         (default_collect_symbol_completion_matches_break_on): Use
44         completion_skip_symbol.  Pass down mode.
45         (collect_file_symbol_completion_matches): Pass down mode.
46         * symtab.h (symbol_is_function_or_method): New declarations.
47         (completion_skip_symbol): New template function.
48
49 2017-11-08  Pedro Alves  <palves@redhat.com>
50
51         * linespec.c (iterate_over_all_matching_symtabs): Add
52         search_domain parameter.  Pass it down to expand_symtabs_matching.
53         (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
54         (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
55         search_domain.
56         (add_all_symbol_names_from_pspace): Add search_domain parameter.
57         Pass it down.
58         (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
59         symbols.
60         (add_matching_symbols_to_info): Add search_domain parameter.  Pass
61         it down.
62
63 2017-11-08  Pedro Alves  <palves@redhat.com>
64
65         * ada-lang.c (ada_make_symbol_completion_list): Remove text and
66         text_len locals and don't pass them down.
67         * symtab.c (completion_list_add_name): Remove
68         sym_text/sym_text_len parameters and adjust.
69         (completion_list_add_symbol, completion_list_add_msymbol)
70         (completion_list_objc_symbol, completion_list_add_fields)
71         (add_symtab_completions): Likewise.
72         (default_collect_symbol_completion_matches_break_on)
73         (collect_file_symbol_completion_matches): Remove sym_text_len
74         local and don't pass it down.
75         * symtab.h (completion_list_add_name): Remove
76         sym_text/sym_text_len parameters.
77
78 2017-11-08  Pedro Alves  <palves@redhat.com>
79
80         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
81         unittests/lookup_name_info-selftests.c.
82         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
83         * cp-support.c: Include "selftest.h".
84         (cp_remove_params_1): Rename from cp_remove_params.  Add
85         'require_param' parameter, and handle it.
86         (cp_remove_params): Reimplement.
87         (cp_remove_params_if_any): New.
88         (selftests::quote): New.
89         (selftests::check_remove_params): New.
90         (selftests::test_cp_remove_params): New.
91         (_initialize_cp_support): Install
92         selftests::test_cp_remove_params.
93         * cp-support.h (cp_remove_params_if_any): Declare.
94         * dwarf2read.c :Include "selftest.h".
95         (dw2_expand_symtabs_matching_symbol): Use
96         lookup_name_info::make_ignore_params.
97         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
98         (selftests::dw2_expand_symtabs_matching::string_or_null)
99         (selftests::dw2_expand_symtabs_matching::check_match)
100         (selftests::dw2_expand_symtabs_matching::test_symbols)
101         (selftests::dw2_expand_symtabs_matching::run_test): New.
102         (_initialize_dwarf2_read): Register
103         selftests::dw2_expand_symtabs_matching::run_test.
104         * psymtab.c (psym_expand_symtabs_matching): Use
105         lookup_name_info::make_ignore_params.
106         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
107         If the lookup name wants to ignore parameters, strip them.
108         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
109         code handling '('.
110         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
111         (default_collect_symbol_completion_matches_break_on): Don't try to
112         strip parameters.
113         * symtab.h (lookup_name_info::lookup_name_info): Add
114         'ignore_parameters' parameter.
115         (lookup_name_info::ignore_parameters)
116         (lookup_name_info::make_ignore_params): New methods.
117         (lookup_name_info::m_ignore_parameters): New field.
118         * unittests/lookup_name_info-selftests.c: New file.
119
120 2017-11-08  Pedro Alves  <palves@redhat.com>
121
122         * dwarf2read.c (dw2_expand_marked_cus)
123         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
124         (dw2_expand_symtabs_matching): Move further below.
125         (dw2_expand_marked_cus): Reindent.
126
127 2017-11-08  Pedro Alves  <palves@redhat.com>
128
129         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
130         (struct name_component): New.
131         (mapped_index::name_components): New field.
132         (mapped_index::symbol_name_at): New method.
133         (dwarf2_read_index): Call mapped_index ctor.
134         (dw2_map_matching_symbols): Add comment about name_components
135         table.
136         (dw2_expand_symtabs_matching): Factor part to...
137         (dw2_expand_symtabs_matching_symbol): ... this new function.
138         Build name components table, and lookup symbols in it before
139         calling the name matcher.
140         (dw2_expand_marked_cus): New, factored out from
141         dw2_expand_symtabs_matching.
142         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
143
144 2017-11-08   Pedro Alves  <palves@redhat.com>
145
146         * ada-lang.c (ada_encode): Rename to ..
147         (ada_encode_1): ... this.  Add throw_errors parameter and handle
148         it.
149         (ada_encode): Reimplement.
150         (match_name): Delete, folded into full_name.
151         (resolve_subexp): No longer pass the encoded name to
152         ada_lookup_symbol_list.
153         (should_use_wild_match): Delete.
154         (name_match_type_from_name): New.
155         (ada_lookup_simple_minsym): Use lookup_name_info and the
156         language's symbol_name_matcher_ftype.
157         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
158         (ada_add_block_renamings): Adjust to use lookup_name_info.
159         (ada_lookup_name): New.
160         (add_nonlocal_symbols, ada_add_all_symbols)
161         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
162         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
163         (ada_name_for_lookup): Delete.
164         (ada_lookup_encoded_symbol): Construct a verbatim name.
165         (wild_match): Reverse sense of return type.  Use bool.
166         (full_match): Reverse sense of return type.  Inline bits of old
167         match_name here.
168         (ada_add_block_symbols): Adjust to use lookup_name_info.
169         (symbol_completion_match): Delete, folded into...
170         (ada_lookup_name_info::matches): ... .this new method.
171         (symbol_completion_add): Delete.
172         (ada_collect_symbol_completion_matches): Add name_match_type
173         parameter.  Adjust to use lookup_name_info and
174         completion_list_add_name.
175         (get_var_value, ada_add_global_exceptions): Adjust to use
176         lookup_name_info.
177         (ada_get_symbol_name_cmp): Delete.
178         (do_wild_match, do_full_match): New functions.
179         (ada_lookup_name_info::ada_lookup_name_info): New method.
180         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
181         functions.
182         (ada_language_defn): Install ada_get_symbol_name_matcher.
183         * ada-lex.l (processId): If name starts with '<', copy it
184         verbatim.
185         * block.c (block_iter_match_step, block_iter_match_first)
186         (block_iter_match_next, block_lookup_symbol)
187         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
188         lookup_name_info.
189         * block.h (block_iter_match_first, block_iter_match_next)
190         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
191         * c-lang.c (c_language_defn, cplus_language_defn)
192         (asm_language_defn, minimal_language_defn): Adjust comments to
193         refer to la_get_symbol_name_matcher.
194         * completer.c (complete_files_symbols)
195         (collect_explicit_location_matches, symbol_completer): Pass a
196         symbol_name_match_type down.
197         * completer.h (class completion_match, completion_match_result):
198         New classes.
199         (completion_tracker::reset_completion_match_result): New method.
200         (completion_tracker::m_completion_match_result): New field.
201         * cp-support.c (make_symbol_overload_list_block): Adjust to use
202         lookup_name_info.
203         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
204         functions.
205         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
206         * d-lang.c: Adjust comments to refer to
207         la_get_symbol_name_matcher.
208         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
209         Adjust to use lookup_name_info.
210         (dict_iter_match_first, dict_iter_match_next)
211         (iter_match_first_hashed, iter_match_next_hashed)
212         (iter_match_first_linear, iter_match_next_linear): Adjust to work
213         with a lookup_name_info.
214         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
215         Likewise.
216         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
217         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
218         (gdb_index_symbol_name_matcher): New class.
219         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
220         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
221         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
222         with a symbol_name_match_type.
223         (f_language_defn): Adjust comments to refer to
224         la_get_symbol_name_matcher.
225         * go-lang.c (go_language_defn): Adjust comments to refer to
226         la_get_symbol_name_matcher.
227         * language.c (default_symbol_name_matcher)
228         (language_get_symbol_name_matcher): New functions.
229         (unknown_language_defn, auto_language_defn): Adjust comments to
230         refer to la_get_symbol_name_matcher.
231         * language.h (symbol_name_cmp_ftype): Delete.
232         (language_defn) <la_collect_symbol_completion_matches>: Add match
233         type parameter.
234         <la_get_symbol_name_cmp>: Delete field.
235         <la_get_symbol_name_matcher>: New field.
236         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
237         (default_symbol_name_matcher, language_get_symbol_name_matcher):
238         Declare.
239         * linespec.c (iterate_over_all_matching_symtabs)
240         (iterate_over_file_blocks): Adjust to use lookup_name_info.
241         (find_methods): Add language parameter, and use lookup_name_info
242         and the language's symbol_name_matcher_ftype.
243         (linespec_complete_function): Adjust.
244         (lookup_prefix_sym): Use lookup_name_info.
245         (add_all_symbol_names_from_pspace): Adjust.
246         (find_superclass_methods): Add language parameter and pass it
247         down.
248         (find_method): Pass symbol language down.
249         (find_linespec_symbols): Don't demangle or Ada encode here.
250         (search_minsyms_for_name): Add lookup_name_info parameter.
251         (add_matching_symbols_to_info): Add name_match_type parameter.
252         Use lookup_name_info.
253         * m2-lang.c (m2_language_defn): Adjust comments to refer to
254         la_get_symbol_name_matcher.
255         * minsyms.c: Include <algorithm>.
256         (add_minsym_to_demangled_hash_table): Remove table parameter and
257         add objfile parameter.  Use search_name_hash, and add language to
258         demangled languages vector.
259         (struct found_minimal_symbols): New struct.
260         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
261         New functions.
262         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
263         input names here.  Use lookup_name_info instead.  Lookup up
264         demangled names once for each language in the demangled names
265         vector.
266         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
267         demangled names once for each language in the demangled names
268         vector.
269         (build_minimal_symbol_hash_tables): Adjust.
270         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
271         lookup_name_info.
272         * objc-lang.c (objc_language_defn): Adjust comment to refer to
273         la_get_symbol_name_matcher.
274         * objfiles.h: Include <vector>.
275         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
276         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
277         la_get_symbol_name_matcher.
278         * p-lang.c (pascal_language_defn): Adjust comment to refer to
279         la_get_symbol_name_matcher.
280         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
281         (match_partial_symbol): Use symbol_name_match_type,
282         lookup_name_info and psymbol_name_matches.
283         (lookup_partial_symbol): Use lookup_name_info.
284         (map_block): Use symbol_name_match_type and lookup_name_info.
285         (psym_map_matching_symbols): Use symbol_name_match_type.
286         (psymbol_name_matches): New.
287         (recursively_search_psymtabs): Use lookup_name_info and
288         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
289         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
290         'kind' parameter to 'domain'.
291         * rust-lang.c (rust_language_defn): Adjust comment to refer to
292         la_get_symbol_name_matcher.
293         * symfile-debug.c (debug_qf_map_matching_symbols)
294         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
295         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
296         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
297         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
298         Adjust to use symbol_name_match_type.
299         <expand_symtabs_matching>: Adjust to use lookup_name_info.
300         (expand_symtabs_matching): Adjust to use lookup_name_info.
301         * symmisc.c (maintenance_expand_symtabs): Use
302         lookup_name_info::match_any ().
303         * symtab.c (symbol_matches_search_name): New.
304         (eq_symbol_entry): Adjust to use lookup_name_info and the
305         language's matcher.
306         (demangle_for_lookup_info::demangle_for_lookup_info): New.
307         (lookup_name_info::match_any): New.
308         (iterate_over_symbols, search_symbols): Use lookup_name_info.
309         (compare_symbol_name): Add language, lookup_name_info and
310         completion_match_result parameters, and use them.
311         (completion_list_add_name): Make extern.  Add language and
312         lookup_name_info parameters.  Use them.
313         (completion_list_add_symbol, completion_list_add_msymbol)
314         (completion_list_objc_symbol): Add lookup_name_info parameters and
315         adjust.  Pass down language.
316         (completion_list_add_fields): Add lookup_name_info parameters and
317         adjust.  Pass down language.
318         (add_symtab_completions): Add lookup_name_info parameters and
319         adjust.
320         (default_collect_symbol_completion_matches_break_on): Add
321         name_match_type parameter, and use it.  Use lookup_name_info.
322         (default_collect_symbol_completion_matches)
323         (collect_symbol_completion_matches): Add name_match_type
324         parameter, and pass it down.
325         (collect_symbol_completion_matches_type): Adjust.
326         (collect_file_symbol_completion_matches): Add name_match_type
327         parameter, and use lookup_name_info.
328         * symtab.h: Include <string> and "common/gdb_optional.h".
329         (enum class symbol_name_match_type): New.
330         (class ada_lookup_name_info): New.
331         (struct demangle_for_lookup_info): New.
332         (class lookup_name_info): New.
333         (symbol_name_matcher_ftype): New.
334         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
335         (symbol_matches_search_name): Declare.
336         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
337         (default_collect_symbol_completion_matches)
338         (collect_symbol_completion_matches)
339         (collect_file_symbol_completion_matches): Add name_match_type
340         parameter.
341         (iterate_over_symbols): Use lookup_name_info.
342         (completion_list_add_name): Declare.
343         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
344         (strncmp_iw_with_mode): Now extern.
345         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
346         (strncmp_iw_with_mode): Declare.
347
348 2017-11-08  Keith Seitz  <keiths@redhat.com>
349             Pedro Alves  <palves@redhat.com>
350
351         * ada-lang.c (ada_language_defn): Install
352         default_search_name_hash.
353         * buildsym.c (struct buildsym_compunit): <language>: New field.
354         (finish_block_internal): Pass language when creating dictionaries.
355         (start_buildsym_compunit, start_symtab): New language parameters.
356         Use them.
357         (restart_symtab): Pass down compilation unit's language.
358         * buildsym.h (enum language): Forward declare.
359         (start_symtab): New 'language' parameter.
360         * c-lang.c (c_language_defn, cplus_language_defn)
361         (asm_language_defn, minimal_language_defn): Install
362         default_search_name_hash.
363         * coffread.c (coff_start_symtab): Adjust.
364         * d-lang.c (d_language_defn): Install default_search_name_hash.
365         * dbxread.c (struct symloc): Add 'pst_language' field.
366         (PST_LANGUAGE): Define.
367         (start_psymtab, read_ofile_symtab): Use it.
368         (process_one_symbol): New 'language' parameter.  Pass it down.
369         * dictionary.c (struct dictionary) <language>: New field.
370         (DICT_LANGUAGE): Define.
371         (dict_create_hashed, dict_create_hashed_expandable)
372         (dict_create_linear, dict_create_linear_expandable): New parameter
373         'language'.  Set the dictionary's language.
374         (iter_match_first_hashed): Adjust to rename.
375         (insert_symbol_hashed): Assert we don't see mismatching
376         languages.  Adjust to rename.
377         (dict_hash): Rename to ...
378         (default_search_name_hash): ... this and make extern.
379         * dictionary.h (struct language_defn): Forward declare.
380         (dict_create_hashed): New parameter 'language'.
381         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
382         * f-lang.c (f_language_defn): Install default_search_name_hash.
383         * go-lang.c (go_language_defn): Install default_search_name_hash.
384         * jit.c (finalize_symtab): Pass compunit's language to dictionary
385         creation.
386         * language.c (unknown_language_defn, auto_language_defn):
387         * language.h (language_defn::la_search_name_hash): New field.
388         (default_search_name_hash): Declare.
389         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
390         * mdebugread.c (new_block): New parameter 'language'.
391         * mdebugread.c (parse_symbol): Pass symbol language to block
392         allocation.
393         (psymtab_to_symtab_1): Pass down language.
394         (new_symtab): Pass compunit's language to block allocation.
395         * objc-lang.c (objc_language_defn): Install
396         default_search_name_hash.
397         * opencl-lang.c (opencl_language_defn):
398         * p-lang.c (pascal_language_defn): Install
399         default_search_name_hash.
400         * rust-lang.c (rust_language_defn): Install
401         default_search_name_hash.
402         * stabsread.h (enum language): Forward declare.
403         (process_one_symbol): Add 'language' parameter.
404         * symtab.c (search_name_hash): New function.
405         * symtab.h (search_name_hash): Declare.
406         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
407
408 2017-11-08  Pedro Alves  <palves@redhat.com>
409
410         * cp-name-parser.y (main): Don't initialize extra_chars.
411
412 2017-11-07  Tom Tromey  <tom@tromey.com>
413
414         * event-top.h (command_handler): Constify.
415         * record-full.c (cmd_record_full_start): Update.
416         * thread.c (thread_apply_all_command): Update.
417         * printcmd.c (eval_command): Update.
418         * mi/mi-main.c (mi_execute_cli_command): Update.
419         (mi_execute_async_cli_command): Update.
420         * tui/tui-stack.c (tui_update_command): Update.
421         * cli/cli-interp.c (safe_execute_command): Constify.
422         * record.c (record_start): Update.
423         (record_start, record_stop, cmd_record_start): Update.
424         * record-btrace.c (cmd_record_btrace_bts_start): Update.
425         (cmd_record_btrace_pt_start): Update.
426         (cmd_record_btrace_start): Update.
427         (cmd_record_btrace_start): Update.
428         * reverse.c (exec_reverse_once): Update.
429         * python/python.c (execute_gdb_command): Don't copy the command.
430         * event-top.c (command_line_handler): Update.
431         (command_handler): Constify.
432         * defs.h (deprecated_call_command_hook): Constify.
433         * cli/cli-script.h (execute_user_command): Constify.
434         * cli/cli-script.c (execute_user_command): Constify.
435         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
436         (enum command_control_type): Update.
437         * main.c (catch_command_errors): Remove non-const overload.
438         (catch_command_errors_ftype): Remove.
439         * python/py-cmd.c (cmdpy_function): Constify.
440         * guile/scm-cmd.c (cmdscm_function): Constify.
441         * cli/cli-dump.c (call_dump_func): Constify.
442         * cli/cli-decode.c (do_const_cfunc): Constify.
443         (do_sfunc): Constify.
444         (cmd_func): Constify.
445         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
446         * top.h (execute_command): Constify.
447         * top.c (execute_command): Constify.
448         (execute_command_to_string): Constify.
449         (deprecated_call_command_hook): Constify.
450         * command.h (cmd_func): Constify.
451         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
452
453 2017-11-07  Tom Tromey  <tom@tromey.com>
454
455         * ada-lang.c (catch_ada_exception_command): Constify.
456         (catch_assert_command): Constify.
457         * break-catch-throw.c (catch_catch_command, catch_throw_command)
458         (catch_rethrow_command): Constify.
459         (catch_exception_command_1): Constify.
460         * breakpoint.h (add_catch_command): Constify.
461         * break-catch-syscall.c (catch_syscall_command_1): Constify.
462         (catch_syscall_split_args): Constify.
463         * break-catch-sig.c (catch_signal_command): Constify.
464         (catch_signal_split_args): Constify.
465         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
466         cmd_const_sfunc_ftype.
467         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
468         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
469         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
470         (add_setshow_string_cmd, struct cmd_list_element)
471         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
472         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
473         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
474         Constify.
475         (set_cmd_sfunc): Constify.
476         (empty_sfunc): Constify.
477         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
478         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
479         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
480         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
481         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
482         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
483         Constify.
484         (set_cmd_sfunc): Constify.
485         (cmd_sfunc_ftype): Remove.
486         * compile/compile.c (set_compile_args): Constify.
487         * infrun.c (set_disable_randomization): Constify.
488         * infcmd.c (set_args_command, set_cwd_command): Constify.
489         * breakpoint.c (set_condition_evaluation_mode): Constify.
490         (add_catch_command): Constify.
491         (catch_fork_command_1, catch_exec_command_1)
492         (catch_load_command_1, catch_unload_command_1): Constify.
493         (catch_load_or_unload): Constify.
494         * guile/scm-param.c (pascm_set_func): Constify.
495         (add_setshow_generic): Constify.
496         * python/py-param.c (get_set_value): Constify.
497         * top.h (set_verbose): Constify.
498         * tui/tui-win.c (tui_set_var_cmd): Constify.
499         * mi/mi-main.c (set_mi_async_command): Constify.
500         * cli/cli-logging.c (set_logging_overwrite)
501         (set_logging_redirect): Constify.
502         * value.c (set_max_value_size): Constify.
503         * valprint.c (set_input_radix, set_output_radix): Constify.
504         * utils.c (set_width_command, set_height_command): Constify.
505         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
506         * tracepoint.c (set_disconnected_tracing)
507         (set_circular_trace_buffer, set_trace_buffer_size)
508         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
509         * top.c (set_history_size_command, set_verbose, set_editing)
510         (set_gdb_datadir, set_history_filename): Constify.
511         * target.c (set_targetdebug, maint_set_target_async_command)
512         (maint_set_target_non_stop_command, set_target_permissions)
513         (set_write_memory_permission): Constify.
514         (open_target): Constify.
515         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
516         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
517         * symtab.c (set_symbol_cache_size_handler): Constify.
518         * symfile.c (set_ext_lang_command): Constify.
519         * symfile-debug.c (set_debug_symfile): Constify.
520         * source.c (set_directories_command): Constify.
521         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
522         * serial.c (set_parity): Constify.
523         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
524         * remote.c (set_remote_exec_file, set_remotebreak)
525         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
526         * record.c (set_record_insn_history_size)
527         (set_record_call_history_size): Constify.
528         * record-full.c (set_record_full_insn_max_num): Constify.
529         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
530         * osabi.c (set_osabi): Constify.
531         * mips-tdep.c (set_mips64_transfers_32bit_regs)
532         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
533         * maint.c (maintenance_set_profile_cmd): Constify.
534         * linux-thread-db.c (set_libthread_db_search_path): Constify.
535         * language.c (set_language_command, set_range_command)
536         (set_case_command): Constify.
537         * infrun.c (set_non_stop, set_observer_mode)
538         (set_stop_on_solib_events, set_schedlock_func)
539         (set_exec_direction_func): Constify.
540         * infcmd.c (set_inferior_tty_command): Constify.
541         * disasm.c (set_disassembler_options_sfunc): Constify.
542         * demangle.c (set_demangling_command): Constify.
543         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
544         * cris-tdep.c (set_cris_version, set_cris_mode)
545         (set_cris_dwarf2_cfi): Constify.
546         * corefile.c (set_gnutarget_command): Constify.
547         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
548         (set_target_wide_charset_sfunc): Constify.
549         * breakpoint.c (update_dprintf_commands): Constify.
550         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
551         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
552         (set_disassembly_style_sfunc): Constify.
553         * arch-utils.c (set_endian, set_architecture): Constify.
554         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
555         * agent.c (set_can_use_agent): Constify.
556
557 2017-11-07  Tom Tromey  <tom@tromey.com>
558
559         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
560         (go32_pde, go32_pte, go32_pte_for_address): Constify.
561         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
562         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
563         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
564         (parse_int_arg, show_thread_default_detach_sc_cmd)
565         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
566         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
567         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
568         (show_task_pause_cmd, set_task_detach_sc_cmd)
569         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
570         (set_noninvasive_cmd, set_thread_pause_cmd)
571         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
572         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
573         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
574         * windows-nat.c (display_selectors): Constify.
575         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
576         non-const "cfunc".
577         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
578         (cmd_cfunc_eq): Likewise.
579         (struct cmd_list_element): Likewise.
580         (do_cfunc): Remove.
581         (cli_user_command_p): Update.
582         * command.h (add_cmd): Remove non-const overload.
583         (cmd_cfunc_ftype): Remove typedef.
584         (cmd_cfunc_eq): Remove non-const overload.
585         * value.c (show_values): Constify.
586         * thread.c (thread_apply_all_command): Constify.
587         * symfile.c (load_command): Constify.
588         * source.c (directory_command): Constify.
589         * maint.c (maintenance_internal_error)
590         (maintenance_demangler_warning, maintenance_space_display)
591         (maintenance_print_architecture, maintenance_translate_address)
592         (maintenance_info_selftests, maintenance_internal_warning):
593         Constify.
594         * breakpoint.c (disable_trace_command, enable_trace_command):
595         Constify.
596         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
597         Constify.
598         (add_auto_load_safe_path): Constify.
599         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
600         * top.h (show_commands): Constify.
601         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
602         * sparc64-tdep.c (adi_examine_command): Constify.
603         (adi_assign_command): Constify.
604
605 2017-11-07  Tom Tromey  <tom@tromey.com>
606
607         * frame.h (info_locals_command, info_args_command): Constify.
608         * auto-load.h (auto_load_info_scripts): Constify.
609         * inferior.h (registers_info): Constify.
610         * copying.c: Rebuild.
611         * copying.awk: Constify generated commands.
612         * auto-load.c (auto_load_info_scripts)
613         (info_auto_load_gdb_scripts): Constify.
614         * cli/cli-decode.c (struct cmd_list_element): Take a
615         cmd_const_cfunc_ftype.
616         * command.h (add_info): Take a cmd_const_cfunc_ftype.
617         * tui/tui-win.c (tui_all_windows_info): Constify.
618         * python/py-auto-load.c (info_auto_load_python_scripts):
619         Constify.
620         * cli/cli-cmds.c (show_command): Remove non-const overload.
621         * tracepoint.c (info_tvariables_command, info_scope_command):
622         Constify.
623         (info_static_tracepoint_markers_command): Constify.
624         * thread.c (info_threads_command): Constify.
625         (print_thread_info_1): Constify.
626         * target.c (info_target_command): Constify.
627         * symtab.c (info_sources_command, info_functions_command)
628         (info_types_command): Constify.
629         (info_variables_command): Remove non-const overload.
630         * symfile.c (info_ext_lang_command): Constify.
631         * stack.c (info_frame_command, info_locals_command)
632         (info_args_command): Constify.
633         (backtrace_command): Remove non-const overload.
634         * source.c (info_source_command, info_line_command): Constify.
635         * solib.c (info_sharedlibrary_command): Constify.
636         * skip.c (info_skip_command): Constify.
637         * ser-go32.c (info_serial_command): Constify.
638         * reverse.c (info_bookmarks_command): Constify.
639         * printcmd.c (info_symbol_command, info_address_command)
640         (info_display_command): Constify.
641         * osdata.c (info_osdata_command): Constify.
642         * objc-lang.c (info_selectors_command, info_classes_command):
643         Constify.
644         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
645         * memattr.c (info_mem_command): Constify.
646         * macrocmd.c (info_macro_command, info_macros_command): Constify.
647         * linux-fork.c (info_checkpoints_command): Constify.
648         * infrun.c (info_signals_command): Constify.
649         * inflow.c (info_terminal_command): Constify.
650         * inferior.c (info_inferiors_command): Constify.
651         (print_inferior): Constify.
652         * infcmd.c (info_program_command, info_all_registers_command)
653         (info_registers_command, info_vector_command)
654         (info_float_command): Constify.
655         (registers_info): Constify.
656         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
657         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
658         Constify.
659         * f-valprint.c (info_common_command): Constify.
660         * dcache.c (info_dcache_command): Constify.
661         (dcache_info_1): Constify.
662         * darwin-nat-info.c (info_mach_tasks_command)
663         (info_mach_task_command, info_mach_ports_command)
664         (info_mach_port_command, info_mach_threads_command)
665         (info_mach_thread_command, info_mach_regions_command)
666         (info_mach_regions_recurse_command, info_mach_region_command)
667         (info_mach_exceptions_command): Constify.
668         (get_task_from_args): Constify.
669         * cp-support.c (info_vtbl_command): Constify.
670         * breakpoint.c (info_watchpoints_command)
671         (info_tracepoints_command): Constify.
672         (info_breakpoints_command): Remove non-const overload.
673         * avr-tdep.c (avr_io_reg_read_command): Constify.
674         * auxv.c (info_auxv_command): Constify.
675         * ada-tasks.c (info_tasks_command): Constify.
676         (info_task): Constify.
677         * ada-lang.c (info_exceptions_command): Constify.
678
679 2017-11-07  Tom Tromey  <tom@tromey.com>
680
681         * solib.h (no_shared_libraries): Constify.
682         * frame.h (return_command): Constify.
683         * cli/cli-cmds.h (quit_command): Constify.
684         * top.h (quit_command, execute_command): Constify.
685         * target.h (flash_erase_command): Constify.
686         * inferior.h (set_inferior_args, attach_command): Constify.
687         * tracepoint.h (start_tracing, stop_tracing): Constify.
688         * breakpoint.h (break_command, tbreak_command)
689         (hbreak_command_wrapper, thbreak_command_wrapper)
690         (rbreak_command_wrapper, watch_command_wrapper)
691         (awatch_command_wrapper, rwatch_command_wrapper)
692         (get_tracepoint_by_number): Constify.
693         * symtab.c (info_variables_command, rbreak_command)
694         (symtab_symbol_info): Constify.
695         (info_variables_command): Add non-const overload.
696         * top.c (dont_repeat_command): Constify.
697         * breakpoint.c (ignore_command, commands_command)
698         (condition_command, tbreak_command, hbreak_command)
699         (thbreak_command, clear_command, break_command)
700         (info_breakpoints_command, watch_command, rwatch_command)
701         (awatch_command, trace_command, ftrace_command, strace_command)
702         (trace_pass_command, break_range_command, dprintf_command)
703         (agent_printf_command, get_tracepoint_by_number)
704         (watch_maybe_just_location, trace_pass_command): Constify.
705         (info_breakpoints_command): Add non-const overload.
706         * tracefile.c (tsave_command): Constify.
707         * infcmd.c (attach_command, disconnect_command, signal_command)
708         (queue_signal_command, stepi_command, nexti_command)
709         (finish_command, next_command, step_command, until_command)
710         (advance_command, jump_command, continue_command, run_command)
711         (start_command, starti_command, interrupt_command)
712         (run_command_1, set_inferior_args, step_1): Constify.
713         * inferior.c (add_inferior_command, remove_inferior_command)
714         (clone_inferior_command): Constify.
715         * linux-fork.c (checkpoint_command, restart_command): Constify.
716         * windows-nat.c (signal_event_command): Constify.
717         * guile/guile.c (guile_repl_command, guile_command): Constify.
718         * printcmd.c (x_command, display_command, printf_command)
719         (output_command, set_command, call_command, print_command)
720         (eval_command): Constify.
721         (non_const_set_command): Remove.
722         (_initialize_printcmd): Update.
723         * source.c (forward_search_command, reverse_search_command):
724         Constify.
725         * jit.c (jit_reader_load_command, jit_reader_unload_command):
726         Constify.
727         * infrun.c (handle_command): Constify.
728         * memattr.c (mem_command): Constify.
729         * stack.c (return_command, up_command, up_silently_command)
730         (down_command, down_silently_command, frame_command)
731         (backtrace_command, func_command, backtrace_command_1): Constify.
732         (backtrace_command): Add non-const overload.
733         * remote-sim.c (simulator_command): Constify.
734         * exec.c (set_section_command): Constify.
735         * tracepoint.c (tdump_command, trace_variable_command)
736         (tstatus_command, tstop_command, tstart_command)
737         (end_actions_pseudocommand, while_stepping_pseudocommand)
738         (collect_pseudocommand, teval_pseudocommand, actions_command)
739         (start_tracing, stop_tracing): Constify.
740         * value.c (init_if_undefined_command): Constify.
741         * tui/tui-stack.c (tui_update_command): Constify.
742         * tui/tui-win.c (tui_refresh_all_command)
743         (tui_set_tab_width_command, tui_set_win_height_command)
744         (tui_set_focus_command, tui_scroll_forward_command)
745         (tui_scroll_backward_command, tui_scroll_left_command)
746         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
747         (tui_set_win_height): Constify.
748         * tui/tui-layout.c (tui_layout_command): Constify.
749         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
750         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
751         (proc_untrace_sysexit_cmd): Constify.
752         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
753         (threadset_test_cmd, threadlist_update_test_cmd)
754         (threadalive_test): Constify.
755         * objc-lang.c (print_object_command): Constify.
756         * command.h (add_com): Constify.
757         * cli/cli-dump.c (restore_command): Constify.
758         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
759         (help_command, complete_command, shell_command, edit_command)
760         (list_command, disassemble_command, make_command)
761         (apropos_command, alias_command): Constify.
762         * cli/cli-script.c (document_command, define_command)
763         (while_command, if_command, validate_comname): Constify.
764         * cli/cli-decode.c (struct cmd_list_element): Change type of
765         "fun".
766         * target.c (do_monitor_command, flash_erase_command): Constify.
767         * regcache.c (reg_flush_command): Constify.
768         * reverse.c (reverse_step, reverse_next, reverse_stepi)
769         (reverse_nexti, reverse_continue, reverse_finish)
770         (save_bookmark_command, goto_bookmark_command)
771         (exec_reverse_once): Constify.
772         * python/python.c (python_interactive_command, python_command):
773         Constify.
774         * typeprint.c (ptype_command, whatis_command, whatis_exp):
775         Constify.
776         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
777         * gcore.c (gcore_command): Constify.
778
779 2017-11-07  Tom Tromey  <tom@tromey.com>
780
781         * printcmd.c (x_command): Call set_repeat_arguments.
782         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
783         * top.c (repeat_arguments): New global.
784         (set_repeat_arguments): New function.
785         (execute_command): Handle repeat_arguments.
786         (show_commands): Calls set_repeat_arguments.
787         * command.h (set_repeat_arguments): Declare.
788
789 2017-11-07  Tom Tromey  <tom@tromey.com>
790
791         * stack.c (backtrace_command): Use std::string.
792         (backtrace_command_1): Make "count_exp" const.
793
794 2017-11-07  Tom Tromey  <tom@tromey.com>
795
796         * source.c (directory_switch, mod_path, add_path): Constify.
797         * defs.h (add_path, mod_path, directory_switch): Constify.
798         * mi/mi-cmd-env.c (env_mod_path): Constify.
799
800 2017-11-07  Tom Tromey  <tom@tromey.com>
801
802         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
803         (run_command_1, continue_command, step_1, jump_command)
804         (signal_command, until_command, advance_command, finish_command)
805         (attach_command): Update.
806
807 2017-11-07  Tom Tromey  <tom@tromey.com>
808
809         * command.h (set_cmd_cfunc): Don't declare.
810         * cli/cli-decode.c (set_cmd_cfunc): Now static.
811
812 2017-11-07  Tom Tromey  <tom@tromey.com>
813
814         * stack.c (select_frame_command): Constify.
815         * cli/cli-decode.c (add_com_suppress_notification): Constify.
816         * command.h (add_com_suppress_notification): Constify.
817
818 2017-11-07  Tom Tromey  <tom@tromey.com>
819
820         * breakpoint.c (stop_command): Constify.
821         * cli/cli-decode.c (struct cmd_list_element): Constify.
822         * command.h (add_abbrev_prefix_cmd): Constify.
823
824 2017-11-07  Pedro Alves  <palves@redhat.com>
825
826         * breakpoint.c (extract_bp_kind): New enum.
827         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
828         factored out from ...
829         (extract_bp_number_and_location): ... here.
830         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
831
832 2017-11-07  Pedro Alves  <palves@redhat.com>
833
834         * breakpoint.c (extract_bp_number_and_location): Change return
835         type to void.  Throw error instead of warning.
836         (enable_disable_command): Adjust.
837
838 2017-11-07  Xavier Roirand  <roirand@adacore.com>
839             Pedro Alves  <palves@redhat.com>
840
841         * breakpoint.c (map_breakpoint_number_range): New, factored out
842         from ...
843         (map_breakpoint_numbers): ... here.
844         (find_location_by_number): Change parameters from string to
845         breakpoint number and location.
846         (extract_bp_number_and_location): New function.
847         (enable_disable_bp_num_loc)
848         (enable_disable_breakpoint_location_range)
849         (enable_disable_command): New functions, factored out ...
850         (enable_command, disable_command): ... these functions, and
851         adjusted to support ranges.
852         * NEWS: Document enable/disable breakpoint location range feature.
853
854 2017-11-06  Luis Machado  <luis.machado@linaro.org>
855
856         * MAINTAINERS (Write After Approval): Update my e-mail address.
857
858 2017-11-06  Pedro Alves  <palves@redhat.com>
859
860         * gnu-nat.c (gnu_terminal_init): Delete.
861         (gnu_target): Don't install gnu_terminal_init.
862         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
863         (child_terminal_init): ... this function.
864
865 2017-11-06  Pedro Alves  <palves@redhat.com>
866
867         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
868         sgtty.h.
869         * config.in, configure: Regenerate.
870
871 2017-11-06  Pedro Alves  <palves@redhat.com>
872
873         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
874         (async_init_signals): Adjust.
875         (handle_stop_sig): Rename to ...
876         (handle_sigtstp): ... this.
877         (async_stop_sig): Rename to ...
878         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
879         SIGTSTP path.
880         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
881         instead of STOP_SIGNAL thoughout.
882         (handle_stop_sig): Rename to ...
883         (handle_sigtstp): ... this.
884         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
885
886 2017-11-06  Pedro Alves  <palves@redhat.com>
887
888         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
889         longer set flags twice in row.
890
891 2017-11-06  Pedro Alves  <palves@redhat.com>
892
893         * Makefile.in (SER_HARDWIRE): Update comment.
894         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
895         * common/gdb_termios.h: Delete file.
896         * common/job-control.c: Include termios.h and unistd.h instead of
897         gdb_termios.h.
898         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
899         check.
900         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
901         Remove sgtty code.
902         * configure.ac: No longer check for termio.h and sgtty.h.
903         * configure: Regenerate.
904         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
905         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
906         Replace PROCESS_GROUP_TYPE references with pid_t references
907         throughout.
908         (gdb_getpgrp): Delete.
909         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
910         (child_terminal_inferior): Remove comment.  Remove sgtty code.
911         (child_terminal_ours_1): Use tcgetpgrp directly instead of
912         gdb_getpgrp.  Use serial_set_tty_state instead aof
913         serial_noflush_set_tty_state.  Remove sgtty code.
914         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
915         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
916         (inferior_process_group): Now returns pid_t.
917         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
918         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
919         * ser-event.c (serial_event_ops): Update.
920         * ser-go32.c (dos_noflush_set_tty_state): Delete.
921         (dos_ops): Update.
922         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
923         * ser-pipe.c (pipe_ops): Update.
924         * ser-tcp.c (tcp_ops): Update.
925         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
926         HAVE_TERMIOS checks.
927         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
928         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
929         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
930         assume termios.
931         (hardwire_noflush_set_tty_state): Delete.
932         (hardwire_print_tty_state, hardwire_drain_output)
933         (hardwire_flush_output, hardwire_flush_input)
934         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
935         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
936         code, and assume termios.
937         (hardwire_ops): Update.
938         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
939         * serial.c (serial_noflush_set_tty_state): Delete.
940         * serial.h (serial_noflush_set_tty_state): Delete.
941         (serial_ops::noflush_set_tty_state): Delete.
942
943 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
944
945         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
946         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
947         (COMMON_OBS): Remove doublest.o and dfp.o.
948         Do not build target-float.c (instead of doublest.c)
949         with -Wformat-nonliteral.
950
951         * doublest.c: Remove file.
952         * doublest.h: Remove file.
953         * dfp.c: Remove file.
954         * dfp.h: Remove file.
955
956         * target-float.c: Do not include "doublest.h" and "dfp.h".
957         (DOUBLEST): Move here from doublest.h.
958         (enum float_kind): Likewise.
959         (FLOATFORMAT_CHAR_BIT): Likewise.
960         (FLOATFORMAT_LARGEST_BYTES): Likewise.
961         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
962         (floatformat_precision): Likewise.
963         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
964         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
965         Likewise.
966         (host_float_format, host_double_format, host_long_double_format):
967         Likewise.
968         (floatformat_to_string, floatformat_from_string): Likewise.
969         (floatformat_to_doublest): Likewise.  Also, inline the original
970         convert_floatformat_to_doublest.
971         (floatformat_from_doublest): Likewise.  Also, inline the original
972         convert_floatformat_from_doublest.
973
974         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
975         (MAX_DECIMAL_STRING): Move here from dfp.c.
976         (match_endianness): Likewise.
977         (set_decnumber_context, decimal_check_errors): Likewise.
978         (decimal_from_number, decimal_to_number): Likewise.
979         (decimal_to_string, decimal_from_string): Likewise.  Make static.
980         (decimal_from_longest, decimal_from_ulongest): Likewise.
981         (decimal_to_longest): Likewise.
982         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
983         (decimal_convert): Likewise.
984
985 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
986
987         * doublest.c: Do not include "gdbtypes.h".
988         (extract_typed_floating): Remove.
989         (store_typed_floating): Remove.
990         (convert_typed_floating): Remove.
991         * doublest.h (struct type): Remove.
992         (DOUBLEST_PRINT_FORMAT): Remove.
993         (DOUBLEST_SCAN_FORMAT): Remove.
994         (extract_typed_floating): Remove.
995         (store_typed_floating): Remove.
996         (convert_typed_floating): Remove.
997
998         * dfp.c (decimal_from_doublest): Remove.
999         (decimal_to_doublest): Remove.
1000         * dfp.h: Do not include "doublest.h".
1001         (decimal_from_doublest): Remove.
1002         (decimal_to_doublest): Remove.
1003
1004         * value.c: Do not include "doublest.h" and "dfp.h".
1005         (value_as_double): Remove.
1006         (unpack_double): Remove.
1007         (value_from_double): Remove.
1008         (value_from_decfloat): Remove.
1009         * value.h: Do not include "doublest.h".
1010         (value_as_double): Remove.
1011         (unpack_double): Remove.
1012         (value_from_double): Remove.
1013         (value_from_decfloat): Remove.
1014
1015 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1016
1017         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1018         (i386_extract_return_value): Use target_float_convert.
1019         (i386_store_return_value): Likewise.
1020         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1021         (i387_value_to_register): Likewise.
1022         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1023         (ia64_register_to_value): Use target_float_convert.
1024         (ia64_value_to_register): Likewise.
1025         (ia64_extract_return_value): Likewise.
1026         (ia64_store_return_value): Likewise.
1027         (ia64_push_dummy_call): Likewise.
1028         * m68k-tdep.c: Include "target-float.h".
1029         (m68k_register_to_value): Use target_float_convert.
1030         (m68k_value_to_register): Likewise.
1031         (m68k_svr4_extract_return_value): Likewise.
1032         (m68k_svr4_store_return_value): Likewise.
1033         * ppc-sysv-tdep.c: Include "target-float.h".
1034         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1035         (do_ppc_sysv_return_value): Likewise.
1036         (ppc64_sysv_abi_push_freg): Likewise.
1037         (ppc64_sysv_abi_return_value_base): Likewise.
1038         * rs6000-aix-tdep.c: Include "target-float.h".
1039         (rs6000_push_dummy_call): Use target_float_convert.
1040         (rs6000_return_value): Likewise.
1041         * rs6000-lynx178-tdep.c: Include "target-float.h".
1042         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1043         (rs6000_lynx178_return_value): Likewise.
1044         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1045         (rs6000_register_to_value): Use target_float_convert.
1046         (rs6000_value_to_register): Likewise.
1047         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1048         (arm_extract_return_value): Use target_float_convert.
1049         (arm_store_return_value): Likewise.
1050         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1051         (sh_register_convert_to_virtual): Use target_float_convert.
1052         (sh_register_convert_to_raw): Likewise.
1053         * sh64-tdep.c: Include "target-float.h".
1054         (sh64_extract_return_value): Use target_float_convert.
1055         (sh64_register_convert_to_virtual): Likewise.
1056         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
1057
1058 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1059
1060         * target-float.c (floatformat_to_host_double): New function.
1061         (floatformat_from_host_double): Likewise.
1062         (target_float_to_host_double): Likewise.
1063         (target_float_from_host_double): Likewise.
1064         * target-float.h (target_float_to_host_double): Add prototype.
1065         (target_float_from_host_double): Likewise.
1066
1067         * guile/scm-value.c: Include "target-float.h".
1068         (gdbscm_value_to_real): Use target_float_to_host_double.
1069         Handle integer source values via value_as_long.
1070         * guile/scm-math.c: Include "target-float.h".  Do not include
1071         "doublest.h", "dfp.h", and "expression.h".
1072         (vlscm_convert_typed_number): Use target_float_from_host_double.
1073         (vlscm_convert_number): Likewise.
1074
1075         * python/py-value.c (valpy_float): Use target_float_to_host_double.
1076         (convert_value_from_python): Use target_float_from_host_double.
1077
1078 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1079
1080         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1081         (cast_from_fixed): Likewise.
1082         (ada_scaling_type): New function.
1083         (ada_delta): Return value instead of DOUBLEST.  Perform target
1084         arithmetic instead of host arithmetic.
1085         (scaling_factor): Rename to ...
1086         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
1087         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
1088         (ada_fixed_to_float): Remove.
1089         (ada_float_to_fixed): Remove.
1090         * ada-lang.h (ada_fixed_to_float): Remove.
1091         (ada_float_to_fixed): Remove.
1092         (ada_delta): Return value instead of DOUBLEST.
1093         (ada_scaling_factor): Add prototype.
1094
1095         * ada-typeprint.c: Include "target-float.h".
1096         (print_fixed_point_type): Perform target arithmetic instead of
1097         host arithmetic.
1098         * ada-valprint.c: Include "target-float.h".
1099         (ada_val_print_num): Perform target arithmetic instead of
1100         host arithmetic for fixed-point types.
1101
1102 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1103
1104         * target-float.c: Include <math.h>.
1105         (floatformat_binop): New function.
1106         (floatformat_compare): Likewise.
1107         (target_float_binop): Likewise.
1108         (target_float_compare): Likewise.
1109         * target-float.h: Include "expression.h".
1110         (target_float_binop): Add prototype.
1111         (target_float_compare): Likewise.
1112
1113         * valarith.c: Do not include "doublest.h" and "dfp.h".
1114         Include "common/byte-vector.h".
1115         (value_args_as_decimal): Remove, replace by ...
1116         (value_args_as_target_float): ... this function.  Handle both
1117         binary and decimal target floating-point formats.
1118         (scalar_binop): Handle both binary and decimal FP using
1119         value_args_as_target_float and target_float_binop.
1120         (value_equal): Handle both binary and decimal FP using
1121         value_args_as_target_float and target_float_compare.
1122         (value_less): Likewise.
1123         (value_pos): Handle all scalar types as simple copy.
1124         (value_neg): Handle all scalar types via BINOP_SUB from 0.
1125         * dfp.c (decimal_binop): Throw error instead of internal_error
1126         when called with an unsupported operation code.
1127
1128 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1129
1130         * target-float.c (target_float_to_string): New function.
1131         (target_float_from_string): New function.
1132         * target-float.h (target_float_to_string): Add prototype.
1133         (target_float_from_string): Add prototype.
1134
1135         * valprint.c: Include "target-float.h".  Do not include
1136         "doublest.h" and "dfp.h".
1137         (print_floating): Use target_float_to_string.
1138         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
1139         (printf_floating): Use target_float_to_string.
1140         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1141         (print_i387_value): Use target_float_to_string.
1142         * mips-tdep.c: Include "target-float.h".
1143         (mips_print_fp_register): Use target_float_to_string.
1144         * sh64-tdep.c: Include "target-float.h".
1145         (sh64_do_fp_register): Use target_float_to_string.
1146
1147         * parse.c: Include "target-float.h".  Do not include
1148         "doublest.h" and "dfp.h".
1149         (parse_float): Use target_float_from_string.
1150         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
1151         (define_symbol): Use target_float_from_string.
1152         * gdbarch-selftests.c: Include "target-float.h".
1153         (register_to_value_test): Use target_float_from_string.
1154
1155 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1156
1157         * Makefile.c (SFILES): Add target-float.c.
1158         (HFILES_NO_SRCDIR): Add target-float.h.
1159         (COMMON_OBS): Add target-float.o.
1160         * target-float.h: New file.
1161         * target-float.c: New file.
1162
1163         * doublest.c (floatformat_classify): Fix detection of float_zero.
1164
1165         * gdbtypes.c (is_floating_type): New function.
1166         * gdbtypes.h (is_floating_type): Add prototype.
1167
1168         * value.c: Do not include "floatformat.h".
1169         (unpack_double): Use target_float_is_valid.
1170         (is_floating_value): New function.
1171         * value.h (is_floating_value): Add prototype-
1172
1173         * valarith.c: Include "target-float.h".
1174         (value_logical_not): Use target_float_is_zero.
1175
1176         * python/py-value.c: Include "target-float.h".
1177         (valpy_nonzero): Use target_float_is_zero.
1178
1179 2017-11-04  Tom Tromey  <tom@tromey.com>
1180
1181         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1182
1183 2017-11-04  Tom Tromey  <tom@tromey.com>
1184
1185         * breakpoint.c (set_momentary_breakpoint): Return
1186         breakpoint_up.
1187         (until_break_command): Update.
1188         (new_until_break_fsm): Change argument types to
1189         breakpoint_up.
1190         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1191         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1192         Remove.
1193         * infcmd.c (finish_forward): Update.
1194         * breakpoint.h (set_momentary_breakpoint)
1195         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1196         (make_cleanup_delete_breakpoint): Remove.
1197         (struct breakpoint_deleter): New.
1198         (breakpoint_up): New typedef.
1199         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1200         (insert_exception_resume_breakpoint): Update.
1201         (insert_exception_resume_from_probe): Update.
1202         (insert_longjmp_resume_breakpoint): Update.
1203         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1204         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1205         * infcall.c (call_function_by_hand_dummy): Update
1206
1207 2017-11-04  Tom Tromey  <tom@tromey.com>
1208
1209         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1210
1211 2017-11-04  Tom Tromey  <tom@tromey.com>
1212
1213         * linux-tdep.c (linux_core_info_proc_mappings): Use
1214         gdb::def_vector.
1215         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
1216         "size" argument.
1217         (linux_corefile_thread): Update.
1218         (linux_make_corefile_notes): Remove unused variable.
1219
1220 2017-11-04  Tom Tromey  <tom@tromey.com>
1221
1222         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1223         gdb::byte_vector.
1224
1225 2017-11-04  Tom Tromey  <tom@tromey.com>
1226
1227         * objfiles.c (do_free_objfile_cleanup): Remove.
1228         * compile/compile-object-load.c (compile_object_load): Update.
1229         * objfiles.h (make_cleanup_free_objfile): Remove.
1230
1231 2017-11-04  Tom Tromey  <tom@tromey.com>
1232
1233         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1234         (adi_read_versions): Change "tags" to "gdb_byte *".
1235         (adi_print_versions): Likewise.
1236
1237 2017-11-04  Tom Tromey  <tom@tromey.com>
1238
1239         * breakpoint.c
1240         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1241         from start_rbreak_breakpoints.
1242         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1243         * breakpoint.h (class scoped_rbreak_breakpoints): New.
1244         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1245         * symtab.c (do_end_rbreak_breakpoints): Remove.
1246         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1247
1248 2017-11-04  Tom Tromey  <tom@tromey.com>
1249
1250         * cp-namespace.c (reset_directive_searched): Remove.
1251         (cp_lookup_symbol_via_imports): Use scoped_restore.
1252         * cp-support.c (reset_directive_searched): Remove.
1253         (make_symbol_overload_list_using): Use scoped_restore.
1254         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1255         (reset_directive_searched): Remove.
1256
1257 2017-11-04  Tom Tromey  <tom@tromey.com>
1258
1259         * symfile.c (find_separate_debug_file_by_debuglink): Use
1260         unique_xmalloc_ptr.
1261
1262 2017-11-04  Tom Tromey  <tom@tromey.com>
1263
1264         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1265         type of "info".
1266         (compute_stack_depth): Likewise.
1267         (do_compile_dwarf_expr_to_c): Use std::vector.
1268
1269 2017-11-04  Tom Tromey  <tom@tromey.com>
1270
1271         * compile/compile-object-load.c (link_callbacks_einfo): Use
1272         std::string.
1273
1274 2017-11-04  Tom Tromey  <tom@tromey.com>
1275
1276         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1277         Use scoped_free_pendings.
1278         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1279         scoped_free_pendings.
1280         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1281         (xcoff_initial_scan): Likewise.
1282         * buildsym.c (reset_symtab_globals): Update comment.
1283         (scoped_free_pendings): Rename from really_free_pendings.
1284         (prepare_for_building): Update comment.
1285         (buildsym_init): Likewise.
1286         * buildsym.h (class scoped_free_pendings): New class.
1287         (really_free_pendings): Don't declare.
1288
1289 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
1290
1291         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1292         output when converting a zero value to a special byteorder format.
1293
1294 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1295
1296         * frame.c (do_frame_register_read): Remove aspace.
1297         * jit.c (jit_frame_sniffer): Likwise.
1298         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1299         * regcache.c (regcache::regcache): Pass nullptr.
1300         (regcache_print): Caller updated.
1301         * regcache.h (regcache::regcache): Remove one constructor
1302         parameter aspace.
1303
1304 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1305
1306         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1307
1308 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1309
1310         * breakpoint.c (insert_single_step_breakpoints): Update.
1311         * frame.c (struct frame_info) <aspace>: Add const.
1312         (frame_save_as_regcache): Add const.
1313         (get_frame_address_space): Return const address_space *.
1314         * frame.h (get_frame_address_space): Update declaration.
1315         * infrun.c (struct step_over_info) <aspace>: Add const.
1316         (set_step_over_info): Make aspace const.
1317         (displaced_step_prepare_throw): Change variable const.
1318         (resume): Likewise.
1319         (proceed): Likewise.
1320         (adjust_pc_after_break): Likewise.
1321         (save_waitstatus): Likewise.
1322         (handle_signal_stop): Likewise.
1323         (keep_going_pass_signal): Likewise.
1324         * jit.c (jit_frame_sniffer): Add const.
1325         * mips-tdep.c (mips_single_step_through_delay): Likewise.
1326         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1327         * record-full.c (record_full_wait_1): Likewise.
1328         * regcache.c (regcache::regcache): Change parameter to const.
1329         * regcache.h (regcache::regcache): Likewise.
1330         (regcache::aspace): Return const address_space *.
1331         (regcache) <m_aspace>: Add const.
1332
1333 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1334
1335         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1336         * frame.c (create_sentinel_frame): Likewise.
1337         * infrun.c (displaced_step_prepare_throw): Likewise.
1338         (resume): Likewise.
1339         (thread_still_needs_step_over_bp): Likewise.
1340         (proceed): Likewise.
1341         (do_target_wait): Likewise.
1342         (adjust_pc_after_break): Likewise.
1343         (handle_syscall_event): Likewise.
1344         (save_waitstatus): Likewise.
1345         (handle_inferior_event_1): Likewise.
1346         (handle_signal_stop): Likewise.
1347         (keep_going_pass_signal): Likewise.
1348         * linux-nat.c (status_callback): Likewise.
1349         (save_stop_reason): Likewise.
1350         (resume_stopped_resumed_lwps): Likewise.
1351         * record-full.c (record_full_exec_insn): Likewise.
1352         (record_full_wait_1): Likewise.
1353         * regcache.c (get_regcache_aspace): Remove.
1354         * regcache.h (get_regcache_aspace): Remove.
1355
1356 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1357
1358         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1359         (init_regcache_descr): Use gdbarch_num_regs.
1360         (regcache::regcache): Likewise.
1361         (regcache::get_register_status): Likewise.
1362         (regcache::assert_raw_regnum): Likewise.
1363         (regcache::cooked_read): Likewise.
1364         (regcache::cooked_read_value): Likewise.
1365         (regcache::cooked_write): Likewise.
1366         (regcache::dump): Likewise.
1367         (regcache::num_raw_registers): New method.
1368         * regcache.h (class regcache) <num_raw_registers>: New.
1369
1370 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1371
1372         * regcache.c (regcache::assert_regnum): New method.
1373         (regcache::invalidate): Call assert_regnum.
1374         (regcache::raw_update): Likewise.
1375         (regcache::raw_write): Likewise.
1376         (regcache::raw_read_part): Likewise.
1377         (regcache::raw_write_part): Likewise.
1378         (regcache::raw_supply): Likewise.
1379         (regcache::raw_supply_integer): Likewise.
1380         (regcache::raw_supply_zeroed): Likewise.
1381         (regcache::raw_collect): Likewise.
1382         (regcache::raw_collect_integer): Likewise.
1383         * regcache.h (regcache::assert_regnum): Declare.
1384
1385 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1386
1387         * regcache.c (regcache::dump): Remove code.
1388
1389 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1390
1391         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1392         Remove.
1393         <sizeof_cooked_register_status>: Remove.
1394         (init_regcache_descr): Update.
1395         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1396         (regcache::save): Likewise.
1397         (regcache::dump): Likewise.
1398
1399 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
1400
1401         * ft32-tdep.c (ft32_fetch_instruction): New function.
1402         (ft32_analyze_prologue): Use ft32_fetch_instruction().
1403
1404 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
1405
1406         * cli/cli-script.c (execute_control_command): Rename to ...
1407         (execute_control_command_1): ... this.
1408         (execute_control_command): New function.
1409
1410 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
1411
1412         * tracepoint.c (tfind_command): Remove const_cast.
1413
1414 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
1415
1416         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1417
1418 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
1419
1420         * common/common-utils.h (in_inclusive_range): New function.
1421         * arm-tdep.c (arm_record_extension_space): Use
1422         in_inclusive_range.
1423         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1424         * cris-tdep.c (cris_spec_reg_applicable): Use
1425         in_inclusive_range.
1426
1427 2017-10-30  Pedro Alves  <palves@redhat.com>
1428             Simon Marchi <simon.marchi@ericsson.com>
1429
1430         * remote.c (remote_set_syscall_catchpoint): Build a std::string
1431         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1432
1433 2017-10-30  Pedro Alves  <palves@redhat.com>
1434
1435         * common/common-utils.c (string_appendf, string_vappendf): New
1436         functions.
1437         * common/common-utils.h (string_appendf, string_vappendf): New
1438         declarations.
1439         * unittests/common-utils-selftests.c (string_appendf_func)
1440         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1441         (string_vappendf_tests): New functions.
1442         (_initialize_common_utils_selftests): Register "string_appendf" and
1443         "string_vappendf tests".
1444
1445 2017-10-30  Pedro Alves  <palves@redhat.com>
1446
1447         * unittests/common-utils-selftests.c (format_func): New typedef.
1448         (string_printf_tests, string_vprintf_tests): Tests factored out
1449         and merged to ...
1450         (test_format_func): ... this new function.
1451         (string_printf_tests, string_vprintf_tests): Reimplement on top of
1452         test_format_func.
1453
1454 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1455
1456         * darwin-nat.c: Remove include of gdb.h.
1457
1458 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1459
1460         * xtensa-xtregs.c: Fix formatting issues.
1461
1462 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1463
1464         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1465
1466 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
1467
1468         PR python/21213
1469         * python/py-infthread.c (thpy_get_inferior): Increment reference
1470         of inferior before returning it.
1471
1472 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1473
1474         * unittests/common-utils-selftests.c (format): Add
1475         ATTRIBUTE_PRINTF.
1476
1477 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1478
1479         * xml-syscall.c (struct syscall_desc): Add constructor.
1480         <name>: Change type to std::string.
1481         (syscall_desc_up): New typedef.
1482         (syscall_desc_p): Remove typeder.
1483         (DEF_VEC_P(syscall_desc_p)): Remove.
1484         (struct syscall_group_desc): Add constructor.
1485         <name>: Change type to std::string.
1486         <syscalls>: Change type to std::vector.
1487         (syscall_group_desc_up): New typedef.
1488         (syscall_group_desc_p): Remove typedef.
1489         (DEF_VEC_P(syscall_group_desc_p)): Remove.
1490         (struct syscalls_info) <syscalls>: Change type to std::vector of
1491         unique_ptr.
1492         <groups>: Likewise.
1493         <my_gdb_datadir>: Change type to std::string.
1494         (syscalls_info_up): New typedef.
1495         (allocate_syscalls_info): Remove.
1496         (syscalls_info_free_syscalls_desc): Remove.
1497         (syscalls_info_free_syscall_group_desc): Remove.
1498         (free_syscalls_info): Remove.
1499         (make_cleanup_free_syscalls_info): Remove.
1500         (syscall_group_create_syscall_group_desc): Adjust.
1501         (syscall_group_add_syscall): Adjust.
1502         (syscall_create_syscall_desc): Adjust.
1503         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1504         (init_syscalls_info): Adjust.
1505         (syscall_group_get_group_by_name): Adjust.
1506         (xml_get_syscall_number): Adjust.
1507         (xml_get_syscall_name): Adjust.
1508         (xml_list_of_syscalls): Adjust.
1509         (xml_list_syscalls_by_group): Adjust.
1510         (xml_list_of_groups): Adjust.
1511
1512 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1513
1514         * probe.h: Don't include gdb_vecs.h.
1515         (DEF_VEC_P (probe_p)): Remove.
1516         (find_probes_in_objfile): Return an std::vector.
1517         * probe.c (find_probes_in_objfile): Likewise.
1518         * breakpoint.c (breakpoint_objfile_data)
1519         <longjmp_probes>: Change type to std::vector.
1520         <exception_probes>: Likewise.
1521         (free_breakpoint_probes): Don't manually free vectors.
1522         (create_longjmp_master_breakpoint): Adjust.
1523         (create_exception_master_breakpoint): Adjust.
1524         * solib-svr4.c (svr4_create_probe_breakpoints): Change
1525         parameter type, adjust.
1526         (svr4_create_solib_event_breakpoints): Adjust.
1527
1528 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1529
1530         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1531         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1532         with new.
1533         (free_breakpoint_probes): Rename to ...
1534         (free_breakpoint_objfile_data): ... this, and call delete on
1535         bp_objfile_data..
1536
1537 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1538
1539         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1540         (loaded_script_ptr): Remove typedef.
1541         (DEF_VEC_P (loaded_script_ptr)): Remove.
1542         (struct collect_matching_scripts_data): Add constructor.
1543         <scripts_p>: Change type to (pointer to) std::vector.
1544         (collect_matching_scripts_data): Adjust.
1545         (sort_scripts_by_name): Make suitable for std::sort.
1546         (print_scripts): Don't sort vector, adjust to std::vector.
1547         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1548
1549 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1550
1551         * symfile.c (filename_language): Make struct, not typedef.  Add
1552         constructor.
1553         <ext>: Change type to std::string.
1554         (DEF_VEC_O (filename_language)): Remove.
1555         (filename_language_table): Change type to std::vector.
1556         (add_filename_language): Adjust.
1557         (set_ext_lang_command): Adjust.
1558         (info_ext_lang_command): Adjust.
1559         (deduce_language_from_filename): Adjust.
1560         (class scoped_restore_filename_language_table): Remove.
1561         (test_filename_language): Use scoped_restore.
1562         (test_set_ext_lang_command): Use scoped_restore, adjust to
1563         std::vector change.
1564
1565 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1566
1567         * symfile.c: Include selftest.h.
1568         (class scoped_restore_filename_language_table): New.
1569         (test_filename_language): New test.
1570         (test_set_ext_lang_command): New test.
1571         (_initialize_symfile): Register tests.
1572
1573 2017-10-27  Keith Seitz  <keiths@redhat.com>
1574
1575         * breakpoint.c (print_breakpoint_location): Use the symbol saved
1576         in the bp_location, falling back to find_pc_sect_function when
1577         needed.
1578         (add_location_to_breakpoint): Save sal->symbol.
1579         * breakpoint.h (struct bp_location) <symbol>: New field.
1580         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1581         * symtab.h (struct symtab_and_line) <symbol>: New field.
1582
1583 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
1584
1585         PR gdb/13669
1586         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1587         to rewind obstack.
1588
1589 2017-10-26  Pedro Alves  <palves@redhat.com>
1590
1591         * remote.c (remote_async_terminal_ours_p): Delete.
1592         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1593         Remove references to 'remote_async_terminal_ours_p'.
1594
1595 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1596
1597         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1598
1599 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1600
1601         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1602         aspace const.
1603         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1604         Likewise.
1605         * breakpoint.c (bpstat_check_location): Remove cast.
1606         (breakpoint_hit_catch_fork): Make aspce const.
1607         (breakpoint_hit_catch_solib): Likewise.
1608         (breakpoint_hit_catch_exec): Likewise.
1609         (breakpoint_hit_ranged_breakpoint): Likewise.
1610         (breakpoint_hit_watchpoint): Likewise.
1611         (base_breakpoint_breakpoint_hit): Likewise.
1612         (bkpt_breakpoint_hit): Likewise.
1613         (dprintf_breakpoint_hit): Likewise.
1614         (tracepoint_breakpoint_hit): Likewise.
1615         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1616
1617 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1618
1619         * breakpoint.c (breakpoint_location_address_match): Change
1620         "struct address_space *" to "const address_space".
1621         (breakpoint_location_address_range_overlap): Likewise.
1622         (breakpoint_here_p): Likewise.
1623         (breakpoint_in_range_p): Likewise.
1624         (moribund_breakpoint_here_p): Likewise.
1625         (bp_location_inserted_here_p): Likewise.
1626         (software_breakpoint_inserted_here_p): Likewise.
1627         (hardware_breakpoint_inserted_here_p): Likewise.
1628         (hardware_watchpoint_inserted_in_range): Likewise.
1629         (bpstat_check_location): Likewise.
1630         (bpstat_stop_status): Likewise.
1631         (breakpoint_address_match): Likewise.
1632         (breakpoint_address_match_range): Likewise.
1633         (breakpoint_location_address_match): Likewise.
1634         (breakpoint_location_address_range_overlap): Likewise.
1635         (insert_single_step_breakpoint): Likewise.
1636         (breakpoint_has_location_inserted_here): Likewise.
1637         (single_step_breakpoint_inserted_here_p): Likewise.
1638         (pc_at_non_inline_function): Likewise.
1639         * breakpoint.h (bpstat_stop_status): Update declaration.
1640         (breakpoint_here_p): Likewise.
1641         (breakpoint_in_range_p): Likewise.
1642         (moribund_breakpoint_here_p): Likewise.
1643         (breakpoint_inserted_here_p): Likewise.
1644         (software_breakpoint_inserted_here_p): Likewise.
1645         (hardware_breakpoint_inserted_here_p): Likewise.
1646         (breakpoint_has_location_inserted_here): Likewise.
1647         (single_step_breakpoint_inserted_here_p): Likewise.
1648         (hardware_watchpoint_inserted_in_range): Likewise.
1649         (breakpoint_address_match): Likewise.
1650         (insert_single_step_breakpoint): Likewise.
1651         (pc_at_non_inline_function): Likewise.
1652         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1653         * record.c (record_check_stopped_by_breakpoint): Likewise.
1654         * record.h (record_check_stopped_by_breakpoint): Likewise.
1655         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1656
1657 2017-10-25  Yao Qi  <yao.qi@linaro.org>
1658
1659         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1660         regcache->arch () instead get_regcache_arch.
1661         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1662         Likewise.
1663         (aarch64_fbsd_store_inferior_registers): Likewise.
1664         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1665         (store_gregs_to_thread): Likewise.
1666         (fetch_fpregs_from_thread): Likewise.
1667         (store_fpregs_to_thread): Likewise.
1668         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1669         (aarch64_store_return_value): Likewise.
1670         (aarch64_software_single_step): Likewise.
1671         * aix-thread.c (aix_thread_wait): Likewise.
1672         (supply_reg32): Likewise.
1673         (supply_sprs64): Likewise.
1674         (supply_sprs32): Likewise.
1675         (fill_gprs64): Likewise.
1676         (fill_gprs32): Likewise.
1677         (fill_sprs64): Likewise.
1678         (fill_sprs32): Likewise.
1679         (store_regs_user_thread): Likewise.
1680         (store_regs_kernel_thread): Likewise.
1681         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1682         (alphabsd_store_inferior_registers): Likewise.
1683         * alpha-tdep.c (alpha_extract_return_value): Likewise.
1684         (alpha_store_return_value): Likewise.
1685         (alpha_deal_with_atomic_sequence): Likewise.
1686         (alpha_next_pc): Likewise.
1687         (alpha_software_single_step): Likewise.
1688         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1689         (amd64bsd_store_inferior_registers): Likewise.
1690         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1691         Likewise.
1692         (amd64_linux_store_inferior_registers): Likewise.
1693         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1694         (amd64_collect_native_gregset): Likewise.
1695         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1696         (amd64obsd_collect_uthread): Likewise.
1697         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1698         (amd64_collect_fpregset): Likewise.
1699         (amd64_supply_fxsave): Likewise.
1700         (amd64_supply_xsave): Likewise.
1701         (amd64_collect_fxsave): Likewise.
1702         (amd64_collect_xsave): Likewise.
1703         * arc-tdep.c (arc_write_pc): Likewise.
1704         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1705         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1706         (arm_fbsd_store_inferior_registers): Likewise.
1707         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1708         (store_vfp_regs): Likewise.
1709         (arm_linux_fetch_inferior_registers): Likewise.
1710         (arm_linux_store_inferior_registers): Likewise.
1711         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1712         (arm_linux_sigreturn_next_pc): Likewise.
1713         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1714         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1715         (fetch_register): Likewise.
1716         (store_register): Likewise.
1717         * arm-tdep.c (arm_is_thumb): Likewise.
1718         (displaced_in_arm_mode): Likewise.
1719         (bx_write_pc): Likewise.
1720         (arm_get_next_pcs_addr_bits_remove): Likewise.
1721         (arm_software_single_step): Likewise.
1722         (arm_extract_return_value): Likewise.
1723         (arm_store_return_value): Likewise.
1724         (arm_write_pc): Likewise.
1725         * bfin-tdep.c (bfin_extract_return_value): Likewise.
1726         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
1727         (bsd_uthread_store_registers): Likewise.
1728         * core-regset.c (fetch_core_registers): Likewise.
1729         * corelow.c (get_core_registers): Likewise.
1730         * cris-tdep.c (cris_store_return_value): Likewise.
1731         (cris_extract_return_value): Likewise.
1732         (find_step_target): Likewise.
1733         (find_step_target): Likewise.
1734         (cris_software_single_step): Likewise.
1735         * ctf.c (ctf_fetch_registers): Likewise.
1736         * darwin-nat.c (cancel_breakpoint): Likewise.
1737         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
1738         * frv-tdep.c (frv_extract_return_value): Likewise.
1739         * ft32-tdep.c (ft32_store_return_value): Likewise.
1740         (ft32_extract_return_value): Likewise.
1741         * go32-nat.c (fetch_register): Likewise.
1742         (go32_fetch_registers): Likewise.
1743         (go32_store_registers): Likewise.
1744         (store_register): Likewise.
1745         * h8300-tdep.c (h8300_extract_return_value): Likewise.
1746         (h8300_store_return_value): Likewise.
1747         * hppa-linux-nat.c (fetch_register): Likewise.
1748         (store_register): Likewise.
1749         (hppa_linux_fetch_inferior_registers): Likewise.
1750         (hppa_linux_store_inferior_registers): Likewise.
1751         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
1752         (i386_darwin_store_inferior_registers): Likewise.
1753         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
1754         (gnu_store_registers): Likewise.
1755         * i386-linux-nat.c (fetch_register): Likewise.
1756         (store_register): Likewise.
1757         (supply_gregset): Likewise.
1758         (fill_gregset): Likewise.
1759         (i386_linux_fetch_inferior_registers): Likewise.
1760         (i386_linux_store_inferior_registers): Likewise.
1761         (i386_linux_resume): Likewise.
1762         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
1763         Likewise.
1764         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
1765         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
1766         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
1767         (i386obsd_collect_uthread): Likewise.
1768         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1769         (i386_supply_gregset): Likewise.
1770         (i386_collect_gregset): Likewise.
1771         (i386_supply_fpregset): Likewise.
1772         (i386_collect_fpregset): Likewise.
1773         (i386_mpx_bd_base): Likewise.
1774         * i386-v4-nat.c (supply_fpregset): Likewise.
1775         (fill_fpregset): Likewise.
1776         * i387-tdep.c (i387_supply_fsave): Likewise.
1777         (i387_collect_fsave): Likewise.
1778         (i387_supply_fxsave): Likewise.
1779         (i387_collect_fxsave): Likewise.
1780         (i387_supply_xsave): Likewise.
1781         (i387_collect_xsave): Likewise.
1782         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
1783         (ia64_linux_store_registers): Likewise.
1784         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
1785         (ia64_extract_return_value): Likewise.
1786         (ia64_store_return_value): Likewise.
1787         (find_func_descr): Likewise.
1788         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
1789         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
1790         (inf_ptrace_store_registers): Likewise.
1791         * infrun.c (use_displaced_stepping): Likewise.
1792         (displaced_step_prepare_throw): Likewise.
1793         (resume): Likewise.
1794         (proceed): Likewise.
1795         (do_target_wait): Likewise.
1796         (adjust_pc_after_break): Likewise.
1797         (handle_inferior_event_1): Likewise.
1798         (handle_signal_stop): Likewise.
1799         (save_infcall_suspend_state): Likewise.
1800         (restore_infcall_suspend_state): Likewise.
1801         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
1802         * jit.c (jit_frame_prev_register): Likewise.
1803         * linux-nat.c (save_stop_reason): Likewise.
1804         (linux_nat_wait_1): Likewise.
1805         (resume_stopped_resumed_lwps): Likewise.
1806         * linux-record.c (record_linux_sockaddr): Likewise.
1807         (record_linux_msghdr): Likewise.
1808         (record_linux_system_call): Likewise.
1809         * linux-tdep.c (linux_collect_thread_registers): Likewise.
1810         * lm32-tdep.c (lm32_extract_return_value): Likewise.
1811         (lm32_store_return_value): Likewise.
1812         * m32c-tdep.c (m32c_read_flg): Likewise.
1813         (m32c_pseudo_register_read): Likewise.
1814         (m32c_pseudo_register_write): Likewise.
1815         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
1816         (m32r_linux_collect_gregset): Likewise.
1817         * m32r-tdep.c (m32r_store_return_value): Likewise.
1818         (m32r_extract_return_value): Likewise.
1819         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1820         (m68kbsd_collect_fpregset): Likewise.
1821         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
1822         * m68k-linux-nat.c (fetch_register): Likewise.
1823         (old_fetch_inferior_registers): Likewise.
1824         (old_store_inferior_registers): Likewise.
1825         (store_regs): Likewise.
1826         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
1827         (m68k_svr4_store_return_value): Likewise.
1828         * m88k-tdep.c (m88k_store_arguments): Likewise.
1829         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
1830         (mi_cmd_data_write_register_values): Likewise.
1831         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
1832         (mips_fbsd_store_inferior_registers): Likewise.
1833         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
1834         (mips_fbsd_supply_gregs): Likewise.
1835         (mips_fbsd_collect_fpregs): Likewise.
1836         (mips_fbsd_collect_gregs): Likewise.
1837         (mips_fbsd_supply_fpregset): Likewise.
1838         (mips_fbsd_collect_fpregset): Likewise.
1839         (mips_fbsd_supply_gregset): Likewise.
1840         (mips_fbsd_collect_gregset): Likewise.
1841         * mips-linux-nat.c (supply_gregset): Likewise.
1842         (fill_gregset): Likewise.
1843         (supply_fpregset): Likewise.
1844         (fill_fpregset): Likewise.
1845         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
1846         (mips_fill_gregset): Likewise.
1847         (mips_supply_fpregset): Likewise.
1848         (mips_fill_fpregset): Likewise.
1849         (mips64_supply_gregset): Likewise.
1850         (micromips_linux_sigframe_validate): Likewise.
1851         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
1852         (mipsnbsd_fetch_inferior_registers): Likewise.
1853         (mipsnbsd_store_inferior_registers): Likewise.
1854         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1855         (mipsnbsd_supply_gregset): Likewise.
1856         (mipsnbsd_iterate_over_regset_sections): Likewise.
1857         (mipsnbsd_supply_reg): Likewise.
1858         (mipsnbsd_supply_fpreg): Likewise.
1859         * mips-tdep.c (mips_in_frame_stub): Likewise.
1860         (mips_dummy_id): Likewise.
1861         (is_octeon_bbit_op): Likewise.
1862         (micromips_bc1_pc): Likewise.
1863         (extended_mips16_next_pc): Likewise.
1864         (mips16_next_pc): Likewise.
1865         (deal_with_atomic_sequence): Likewise.
1866         * moxie-tdep.c (moxie_process_readu): Likewise.
1867         * nios2-tdep.c (nios2_get_next_pc): Likewise.
1868         * nto-procfs.c (procfs_store_registers): Likewise.
1869         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
1870         (ppcfbsd_store_inferior_registers): Likewise.
1871         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
1872         (fetch_altivec_register): Likewise.
1873         (get_spe_registers): Likewise.
1874         (fetch_spe_register): Likewise.
1875         (fetch_altivec_registers): Likewise.
1876         (fetch_all_gp_regs): Likewise.
1877         (fetch_all_fp_regs): Likewise.
1878         (store_vsx_register): Likewise.
1879         (store_altivec_register): Likewise.
1880         (set_spe_registers): Likewise.
1881         (store_spe_register): Likewise.
1882         (store_altivec_registers): Likewise.
1883         (store_all_gp_regs): Likewise.
1884         (store_all_fp_regs): Likewise.
1885         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
1886         (ppc_linux_collect_gregset): Likewise.
1887         (ppc_canonicalize_syscall): Likewise.
1888         (ppc_linux_record_signal): Likewise.
1889         (ppu2spu_prev_register): Likewise.
1890         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
1891         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
1892         (ppcobsd_store_registers): Likewise.
1893         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
1894         Likewise.
1895         (ppc_ravenscar_generic_store_registers): Likewise.
1896         * procfs.c (procfs_fetch_registers): Likewise.
1897         (procfs_store_registers): Likewise.
1898         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
1899         (ravenscar_store_registers): Likewise.
1900         (ravenscar_prepare_to_store): Likewise.
1901         * record-btrace.c (record_btrace_fetch_registers): Likewise.
1902         * record-full.c (record_full_wait_1): Likewise.
1903         (record_full_registers_change): Likewise.
1904         (record_full_store_registers): Likewise.
1905         (record_full_core_fetch_registers): Likewise.
1906         (record_full_save): Likewise.
1907         (record_full_goto_insn): Likewise.
1908         * regcache.c (regcache_register_size): Likewise.
1909         (get_regcache_arch): Remove.
1910         (regcache_read_pc): Likewise.
1911         * regcache.h (get_regcache_arch): Remove.
1912         * remote-sim.c (gdbsim_fetch_register): Likewise.
1913         (gdbsim_store_register): Likewise.
1914         * remote.c (fetch_register_using_p): Likewise.
1915         (send_g_packet): Likewise.
1916         (remote_prepare_to_store): Likewise.
1917         (store_registers_using_G): Likewise.
1918         * reverse.c (save_bookmark_command): Likewise.
1919         (goto_bookmark_command): Likewise.
1920         * rs6000-aix-tdep.c (branch_dest): Likewise.
1921         * rs6000-nat.c (rs6000_ptrace64): Likewise.
1922         (fetch_register): Likewise.
1923         * rs6000-tdep.c (ppc_supply_reg): Likewise.
1924         (ppc_collect_reg): Likewise.
1925         (ppc_collect_gregset): Likewise.
1926         (ppc_collect_fpregset): Likewise.
1927         (ppc_collect_vsxregset): Likewise.
1928         (ppc_collect_vrregset): Likewise.
1929         (ppc_displaced_step_hw_singlestep): Likewise.
1930         (rs6000_pseudo_register_read): Likewise.
1931         (rs6000_pseudo_register_write): Likewise.
1932         * s390-linux-nat.c (supply_gregset): Likewise.
1933         (fill_gregset): Likewise.
1934         (s390_linux_fetch_inferior_registers): Likewise.
1935         * s390-linux-tdep.c (s390_write_pc): Likewise.
1936         (s390_software_single_step): Likewise.
1937         (s390_all_but_pc_registers_record): Likewise.
1938         (s390_linux_syscall_record): Likewise.
1939         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
1940         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
1941         (shnbsd_store_inferior_registers): Likewise.
1942         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
1943         (sh_extract_return_value_fpu): Likewise.
1944         (sh_store_return_value_nofpu): Likewise.
1945         (sh_corefile_supply_regset): Likewise.
1946         (sh_corefile_collect_regset): Likewise.
1947         * sh64-tdep.c (sh64_extract_return_value): Likewise.
1948         (sh64_store_return_value): Likewise.
1949         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
1950         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
1951         (sparc_store_inferior_registers): Likewise.
1952         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
1953         (sparc_ravenscar_prepare_to_store): Likewise.
1954         * sparc-tdep.c (sparc32_store_arguments): Likewise.
1955         (sparc_analyze_control_transfer): Likewise.
1956         (sparc_step_trap): Likewise.
1957         (sparc_software_single_step): Likewise.
1958         (sparc32_gdbarch_init): Likewise.
1959         (sparc_supply_rwindow): Likewise.
1960         (sparc_collect_rwindow): Likewise.
1961         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
1962         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
1963         (sparc64nbsd_collect_gregset): Likewise.
1964         (sparc64nbsd_supply_fpregset): Likewise.
1965         (sparc64nbsd_collect_fpregset): Likewise.
1966         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1967         (sparc64_supply_gregset): Likewise.
1968         (sparc64_collect_gregset): Likewise.
1969         (sparc64_supply_fpregset): Likewise.
1970         (sparc64_collect_fpregset): Likewise.
1971         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
1972         * spu-tdep.c (spu_unwind_sp): Likewise.
1973         (spu2ppu_prev_register): Likewise.
1974         (spu_memory_remove_breakpoint): Likewise.
1975         * stack.c (return_command): Likewise.
1976         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
1977         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
1978         * tracefile.c (trace_save_ctf): Likewise.
1979         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
1980         (do_windows_store_inferior_registers): Likewise.
1981         (windows_resume): Likewise.
1982         * xtensa-linux-nat.c (fill_gregset): Likewise.
1983         (supply_gregset_reg): Likewise.
1984         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
1985         (xtensa_register_read_masked): Likewise.
1986         (xtensa_supply_gregset): Likewise.
1987         (xtensa_extract_return_value): Likewise.
1988         (xtensa_store_return_value): Likewise.
1989
1990 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
1991
1992         * doublest.c (floatformat_from_string): New function.
1993         * doublest.h (floatformat_from_string): Add prototype.
1994
1995         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
1996         (OP_FLOAT): ... this.
1997         * expression.h: Do not include "doublest.h".
1998         (union exp_element): Replace doubleconst and decfloatconst by
1999         new element floatconst.
2000         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2001         (ada_evaluate_subexp): Likewise.
2002         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2003         OP_DOUBLE and OP_DECFLOAT.
2004         * expprint.c (print_subexp_standard): Likewise.
2005         (dump_subexp_body_standard): Likewise.
2006         * breakpoint.c (watchpoint_exp_is_const): Likewise.
2007
2008         * parse.c: Include "dfp.h".
2009         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2010         (write_exp_elt_floatcst): New function.
2011         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2012         and OP_DECFLOAT.
2013         (operator_check_standard): Likewise.
2014         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
2015         Return target format buffer instead of host DOUBLEST.
2016         Use floatformat_from_string and decimal_from_string to parse
2017         either binary or decimal floating-point types.
2018         (parse_c_float): Remove.
2019         * parser-defs.h: Do not include "doublest.h".
2020         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2021         (write_exp_elt_floatcst): Add prototype.
2022         (parse_float): Update prototype.
2023         (parse_c_float): Remove.
2024
2025         * c-exp.y: Do not include "dfp.h".
2026         (typed_val_float): Use byte buffer instead of DOUBLEST.
2027         (typed_val_decfloat): Remove.
2028         (DECFLOAT): Remove.
2029         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2030         (parse_number): Update to new parse_float interface.
2031         Parse suffixes and determine type before calling parse_float.
2032         Handle decimal and binary FP types the same way.
2033
2034         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2035         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2036         (parse_number): Update to new parse_float interface.
2037         Parse suffixes and determine type before calling parse_float.
2038
2039         * f-exp.y: Replace dval by typed_val_float.
2040         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2041         (parse_number): Use parse_float instead of atof.
2042
2043         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2044         (parse_go_float): Remove.
2045         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2046         (parse_number): Call parse_float instead of parse_go_float.
2047         Parse suffixes and determine type before calling parse_float.
2048
2049         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2050         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2051         (parse_number): Update to new parse_float interface.
2052         Parse suffixes and determine type before calling parse_float.
2053
2054         * m2-exp.y: Replace dval by byte buffer val.
2055         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2056         (parse_number): Call parse_float instead of atof.
2057
2058         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2059         (lex_number): Call parse_float instead of strtod.
2060         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2061         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2062         Use write_exp_elt_floatcst.
2063         (unit_testing): Remove static variable.
2064         (rust_type): Do not check unit_testing.
2065         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
2066
2067         * ada-exp.y (type_float, type_double): Remove.
2068         (typed_val_float): Use byte buffer instead of DOUBLEST.
2069         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2070         * ada-lex.l (processReal): Use parse_float instead of sscanf.
2071
2072 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
2073
2074         * aarch64-tdep.h (enum aarch64_regnum): Remove.
2075         * arch/aarch64.h: New file.
2076
2077 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2078
2079         * dfp.h (decimal_from_string): Use const reference for argument.
2080         * dfp.c (decimal_from_string): Likewise.
2081
2082 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2083
2084         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2085         * sh64-tdep.c (sh64_do_fp_register): Likewise.
2086         * mips-tdep.c (mips_print_fp_register): Likewise.
2087
2088 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2089
2090         * common/format.h (enum argclass): Replace decfloat_arg by
2091         dec32float_arg, dec64float_arg, and dec128float_arg.
2092         * common/format.c (parse_format_string): Update to return
2093         new decimal float argument classes.
2094
2095         * printcmd.c (printf_decfloat): Rename to ...
2096         (printf_floating): ... this.  Add argclass argument, and use it
2097         instead of parsing the format string again.  Add support for
2098         binary floating-point values, using floatformat_to_string.
2099         Convert value to the target format if it doesn't already match.
2100         (ui_printf): Call printf_floating instead of printf_decfloat,
2101         also for double_arg / long_double_arg.  Pass argclass.
2102
2103         * dfp.c (decimal_to_string): Add format string argument.
2104         * dfp.h (decimal_to_string): Likewise.
2105
2106         * doublest.c (floatformat_to_string): Add format string argument.
2107         * doublest.h (floatformat_to_string): Likewise.
2108
2109 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2110
2111         * doublest.c (floatformat_precision): New routine.
2112         (floatformat_to_string): Likewise.
2113         * doublest.c (floatformat_to_string): Add prototype.
2114
2115         * printcmd.c (print_scalar_formatted): Only call print_floating
2116         on floating-point types.
2117         * valprint.c: Do not include "floatformat.h".
2118         (generic_val_print_decfloat): Remove.
2119         (generic_val_print): Call generic_val_print_float for both
2120         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2121         (print_floating): Use floatformat_to_string.  Handle decimal float.
2122         (print_decimal_floating): Remove, merge into floatformat_to_string.
2123         * value.h (print_decimal_floating): Remove.
2124
2125         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2126
2127 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2128
2129         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2130
2131 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2132
2133         * memattr.h: Don't include vec.h.
2134         (struct mem_attrib): Initialize fields.
2135         <unknown>: New static method.
2136         (struct mem_region): Add constructors, operator<, initialize
2137         fields.
2138         * memattr.c: Include algorithm.
2139         (default_mem_attrib, unknown_mem_attrib): Remove.
2140         (user_mem_region_list): New global.
2141         (target_mem_region_list, mem_region_list): Change type to
2142         std::vector<mem_region>.
2143         (mem_use_target): Now a function.
2144         (target_mem_regions_valid): Change type to bool.
2145         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2146         (require_user_regions): Adjust.
2147         (require_target_regions): Adjust.
2148         (create_mem_region): Adjust.
2149         (lookup_mem_region): Adjust.
2150         (invalidate_target_mem_regions): Adjust.
2151         (mem_clear): Rename to...
2152         (user_mem_clear): ... this, and adjust.
2153         (mem_command): Adjust.
2154         (info_mem_command): Adjust.
2155         (mem_enable, enable_mem_command, mem_disable,
2156         disable_mem_command): Adjust.
2157         (mem_delete): Adjust.
2158         (delete_mem_command): Adjust.
2159         * memory-map.h (parse_memory_map): Return an std::vector.
2160         * memory-map.c (parse_memory_map): Likewise.
2161         (struct memory_map_parsing_data): Add constructor.
2162         <memory_map>: Point to std::vector.
2163         (memory_map_start_memory): Adjust.
2164         (memory_map_end_memory): Adjust.
2165         (memory_map_end_property): Adjust.
2166         (clear_result): Remove.
2167         * remote.c (remote_memory_map): Return an std::vector.
2168         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2169         Remove.
2170         (target_debug_print_mem_region_vector): New.
2171         * target-delegates.c: Regenerate.
2172         * target.h (mem_region_vector): New typedef.
2173         (to_memory_map): Return mem_region_vector.
2174         (target_memory_map): Return an std::vector.
2175         * target.c (target_memory_map): Return an std::vector.
2176         (flash_erase_command): Adjust.
2177
2178 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2179
2180         * memory-map.c (struct memory_map_parsing_data) <property_name>:
2181         Change type to std::string.
2182         (memory_map_start_property): Adjust.
2183         (memory_map_end_property): Adjust.
2184
2185 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2186
2187         * infrun.h: Include common/byte-vector.h.
2188         (struct displaced_step_closure): New struct.
2189         (struct buf_displaced_step_closure): New struct.
2190         * infrun.c (displaced_step_closure::~displaced_step_closure):
2191         Provide default implementation.
2192         (displaced_step_clear): Deallocate step closure with delete.
2193         * aarch64-tdep.c (displaced_step_closure): Rename to ...
2194         (aarch64_displaced_step_closure): ... this, extend
2195         displaced_step_closure.
2196         (aarch64_displaced_step_data) <dsc>: Change type to
2197         aarch64_displaced_step_closure.
2198         (aarch64_displaced_step_copy_insn): Adjust to type change, use
2199         unique_ptr.
2200         (aarch64_displaced_step_fixup): Add cast for displaced step
2201         closure.
2202         * amd64-tdep.c (displaced_step_closure): Rename to ...
2203         (amd64_displaced_step_closure): ... this, extend
2204         displaced_step_closure.
2205         <insn_buf>: Change type to std::vector<gdb_byte>.
2206         <max_len>: Remove.
2207         (fixup_riprel): Change type of DSC parameter, adjust to type
2208         change of insn_buf.
2209         (fixup_displaced_copy): Change type of DSC parameter.
2210         (amd64_displaced_step_copy_insn): Instantiate
2211         amd64_displaced_step_closure.
2212         (amd64_displaced_step_fixup): Add cast for closure type, adjust
2213         to type change of insn_buf.
2214         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2215         parameter DSC.
2216         (arm_linux_copy_svc): Likewise.
2217         (cleanup_kernel_helper_return): Likewise.
2218         (arm_catch_kernel_helper_return): Likewise.
2219         (arm_linux_displaced_step_copy_insn): Instantiate
2220         arm_displaced_step_closure.
2221         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2222         (displaced_read_reg): Change type of parameter DSC.
2223         (branch_write_pc): Likewise.
2224         (load_write_pc): Likewise.
2225         (alu_write_pc): Likewise.
2226         (displaced_write_reg): Likewise.
2227         (arm_copy_unmodified): Likewise.
2228         (thumb_copy_unmodified_32bit): Likewise.
2229         (thumb_copy_unmodified_16bit): Likewise.
2230         (cleanup_preload): Likewise.
2231         (install_preload): Likewise.
2232         (arm_copy_preload): Likewise.
2233         (thumb2_copy_preload): Likewise.
2234         (install_preload_reg): Likewise.
2235         (arm_copy_preload_reg): Likewise.
2236         (cleanup_copro_load_store): Likewise.
2237         (install_copro_load_store): Likewise.
2238         (arm_copy_copro_load_store) Likewise.
2239         (thumb2_copy_copro_load_store): Likewise.
2240         (cleanup_branch): Likewise.
2241         (install_b_bl_blx): Likewise.
2242         (arm_copy_b_bl_blx): Likewise.
2243         (thumb2_copy_b_bl_blx): Likewise.
2244         (thumb_copy_b): Likewise.
2245         (install_bx_blx_reg): Likewise.
2246         (arm_copy_bx_blx_reg): Likewise.
2247         (thumb_copy_bx_blx_reg): Likewise.
2248         (cleanup_alu_imm): Likewise.
2249         (arm_copy_alu_imm): Likewise.
2250         (thumb2_copy_alu_imm): Likewise.
2251         (cleanup_alu_reg): Likewise.
2252         (install_alu_reg): Likewise.
2253         (arm_copy_alu_reg): Likewise.
2254         (thumb_copy_alu_reg): Likewise.
2255         (cleanup_alu_shifted_reg): Likewise.
2256         (install_alu_shifted_reg): Likewise.
2257         (arm_copy_alu_shifted_reg): Likewise.
2258         (cleanup_load): Likewise.
2259         (cleanup_store): Likewise.
2260         (arm_copy_extra_ld_st): Likewise.
2261         (install_load_store): Likewise.
2262         (thumb2_copy_load_literal): Likewise.
2263         (thumb2_copy_load_reg_imm): Likewise.
2264         (arm_copy_ldr_str_ldrb_strb): Likewise.
2265         (cleanup_block_load_all): Likewise.
2266         (cleanup_block_store_pc): Likewise.
2267         (cleanup_block_load_pc): Likewise.
2268         (arm_copy_block_xfer): Likewise.
2269         (thumb2_copy_block_xfer): Likewise.
2270         (cleanup_svc): Likewise.
2271         (install_svc): Likewise.
2272         (arm_copy_svc): Likewise.
2273         (thumb_copy_svc): Likewise.
2274         (arm_copy_undef): Likewise.
2275         (thumb_32bit_copy_undef): Likewise.
2276         (arm_copy_unpred): Likewise.
2277         (arm_decode_misc_memhint_neon): Likewise.
2278         (arm_decode_unconditional): Likewise.
2279         (arm_decode_miscellaneous): Likewise.
2280         (arm_decode_dp_misc): Likewise.
2281         (arm_decode_ld_st_word_ubyte): Likewise.
2282         (arm_decode_media): Likewise.
2283         (arm_decode_b_bl_ldmstm): Likewise.
2284         (arm_decode_ext_reg_ld_st): Likewise.
2285         (thumb2_decode_dp_shift_reg): Likewise.
2286         (thumb2_decode_ext_reg_ld_st): Likewise.
2287         (arm_decode_svc_copro): Likewise.
2288         (thumb2_decode_svc_copro): Likewise.
2289         (install_pc_relative): Likewise.
2290         (thumb_copy_pc_relative_16bit): Likewise.
2291         (thumb_decode_pc_relative_16bit): Likewise.
2292         (thumb_copy_pc_relative_32bit): Likewise.
2293         (thumb_copy_16bit_ldr_literal): Likewise.
2294         (thumb_copy_cbnz_cbz): Likewise.
2295         (thumb2_copy_table_branch): Likewise.
2296         (cleanup_pop_pc_16bit_all): Likewise.
2297         (thumb_copy_pop_pc_16bit): Likewise.
2298         (thumb_process_displaced_16bit_insn): Likewise.
2299         (decode_thumb_32bit_ld_mem_hints): Likewise.
2300         (thumb_process_displaced_32bit_insn): Likewise.
2301         (thumb_process_displaced_insn): Likewise.
2302         (arm_process_displaced_insn): Likewise.
2303         (arm_displaced_init_closure): Likewise.
2304         (arm_displaced_step_fixup): Add cast for closure.
2305         * arm-tdep.h: Include infrun.h.
2306         (displaced_step_closure): Rename to ...
2307         (arm_displaced_step_closure): ... this, extend
2308         displaced_step_closure.
2309         <u::svc::copy_svc_os>: Change type of parameter DSC.
2310         <cleanup>: Likewise.
2311         (arm_process_displaced_insn): Likewise.
2312         (arm_displaced_init_closure): Likewise.
2313         (displaced_read_reg): Likewise.
2314         (displaced_write_reg): Likewise.
2315         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2316         Adjust.
2317         * i386-tdep.h: Include infrun.h.
2318         (i386_displaced_step_closure): New typedef.
2319         * i386-tdep.c (i386_displaced_step_copy_insn): Use
2320         i386_displaced_step_closure.
2321         (i386_displaced_step_fixup): Adjust.
2322         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2323         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2324         and unique_ptr.
2325         (ppc_displaced_step_fixup): Adjust.
2326         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2327         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2328         and unique_ptr.
2329         (s390_displaced_step_fixup): Adjust.
2330
2331 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2332
2333         * interps.h (interp_resume, interp_suspend, interp_set_temp):
2334         Remove declarations.
2335
2336 2017-10-20  Tom Tromey  <tom@tromey.com>
2337
2338         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2339         std::vector.
2340         (gdb_bfd_record_inclusion): Update.
2341         (bfdp): Remove typedef.
2342
2343 2017-10-20  Tom Tromey  <tom@tromey.com>
2344
2345         * gdb_bfd.c (gdb_bfd_ref): Use new.
2346         (struct gdb_bfd_data): Add constructor, destructor, and member
2347         initializers.
2348         (gdb_bfd_unref): Use delete.
2349
2350 2017-10-20  Tom Tromey  <tom@tromey.com>
2351
2352         * exec.c (exec_file_attach): Use new_bfd_ref.
2353         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2354         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2355         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2356         new_bfd_ref.
2357         * gdb_bfd.h (new_bfd_ref): New function.
2358
2359 2017-10-20  Pedro Alves  <palves@redhat.com>
2360
2361         * main.c (captured_command_loop): Add attribute noinline.
2362
2363 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
2364
2365         * interps.c (struct interp_factory): Add constructor.
2366         (interp_factory_p): Remove typedef.
2367         (DEF_VEC_P(interp_factory_p)): Remove.
2368         (interpreter_factories): Change type to std::vector.
2369         (interp_factory_register): Adjust.
2370         (interp_lookup): Adjust.
2371         (interpreter_completer): Adjust.
2372
2373 2017-10-19  Tom Tromey  <tom@tromey.com>
2374
2375         * break-catch-syscall.c (catch_syscall_completer): Use
2376         std::string, gdb::unique_xmalloc_ptr.
2377
2378 2017-10-19  Tom Tromey  <tom@tromey.com>
2379
2380         * infcall.c (call_function_by_hand_dummy): Use std::string.
2381
2382 2017-10-19  Tom Tromey  <tom@tromey.com>
2383
2384         * mi/mi-main.c (mi_cmd_execute): Update.
2385         * top.h (prepare_execute_command): Return scoped_value_mark.
2386         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2387         Add move constructor.
2388         * top.c (prepare_execute_command): Return scoped_value_mark.
2389         (execute_command): Update.
2390
2391 2017-10-19  Pedro Alves  <palves@redhat.com>
2392
2393         * xml-support.c (xml_fetch_content_from_file): Check fread's
2394         return.
2395
2396 2017-10-19  Pedro Alves  <palves@redhat.com>
2397
2398         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2399         async.
2400         (handle_error_fd): New function.
2401         (ser_base_async): Add/delete an event loop file handler for
2402         error_fd.
2403
2404 2017-10-19  Pedro Alves  <palves@redhat.com>
2405
2406         * xml-support.c (xml_fetch_content_from_file): Don't read in
2407         chunks.  Instead use fseek to determine the file's size, and read
2408         it in one go.
2409
2410 2017-11-18  Keith Seitz  <keiths@redhat.com>
2411
2412         * c-exp.y (oper): Canonicalize conversion operators of user-defined
2413         types.
2414         Add whitespace to front of type name.
2415
2416 2017-10-18  Keith Seitz  <keiths@redhat.com>
2417
2418         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2419         DW_AT_accessibility.
2420
2421 2017-10-18  Yao Qi  <yao.qi@linaro.org>
2422
2423         * features/tic6x-c62x-linux.c: Remove.
2424
2425 2017-10-17  Tom Tromey  <tom@tromey.com>
2426
2427         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2428         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2429         (do_mixed_source_and_assembly): Likewise.
2430
2431 2017-10-17  Tom Tromey  <tom@tromey.com>
2432
2433         * regcache.c (regcache::xfer_part): Remove assertion.
2434
2435 2017-10-17  Pedro Alves  <palves@redhat.com>
2436
2437         * xml-support.c (xml_fetch_content_from_file): Call
2438         unique_ptr::release() instead unique_ptr::get() when passing
2439         through xrealloc.
2440
2441 2017-10-17  Yao Qi  <yao.qi@linaro.org>
2442
2443         * regcache.c (regcache::xfer_part): Remove parameters read and
2444         write, add parameter is_raw.  All callers are updated.
2445
2446 2017-10-16  Keith Seitz  <keiths@redhat.com>
2447
2448         * c-typeprint.c (enum access_specifier): Moved here from
2449         c_type_print_base.
2450         (output_access_specifier): New function.
2451         (c_type_print_base): Consider typedefs when assessing
2452         whether access labels are needed.
2453         Use output_access_specifier as needed.
2454         Output access specifier for typedefs, if needed.
2455         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2456         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2457         fields.
2458         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2459         accessor macros.
2460
2461 2017-10-16  Tom Tromey  <tom@tromey.com>
2462
2463         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2464         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2465         * target.c (target_fileio_read_stralloc): Update.
2466         * sparc64-tdep.c (adi_is_addr_mapped): Update.
2467         * target.h (target_fileio_read_stralloc): Return
2468         unique_xmalloc_ptr.
2469
2470 2017-10-16  Tom Tromey  <tom@tromey.com>
2471
2472         * xml-syscall.c (xml_init_syscalls_info): Update.
2473         * xml-support.c (xinclude_start_include): Update.
2474         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2475         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2476         (xml_fetch_content_from_file): Likewise.
2477         * osdata.c (get_osdata): Update.
2478         * target.h (target_read_stralloc, target_get_osdata): Return
2479         unique_xmalloc_ptr.
2480         * solib-aix.c (solib_aix_get_library_list): Update.
2481         * solib-target.c (solib_target_current_sos): Update.
2482         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2483         * xml-tdesc.c (fetch_available_features_from_target): Update.
2484         (target_fetch_description_xml): Update.
2485         (file_read_description_xml): Update.
2486         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2487         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2488         (remote_pid_to_exec_file): Update.
2489         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2490         (target_get_osdata): Likewise.
2491
2492 2017-10-16  Tom Tromey  <tom@tromey.com>
2493
2494         * remote.c (remote_register_number_and_offset): Use std::vector.
2495         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2496         (putpkt_binary): Use gdb::def_vector.
2497         (compare_sections_command): Use gdb::byte_vector.
2498
2499 2017-10-16  Tom Tromey  <tom@tromey.com>
2500
2501         * ppc-linux-nat.c (hwdebug_insert_point): Use
2502         gdb::unique_xmalloc_ptr, XDUP.
2503
2504 2017-10-16  Tom Tromey  <tom@tromey.com>
2505
2506         * probe.c (parse_probes): Use std::string.
2507         (info_probes_for_ops, enable_probes_command)
2508         (disable_probes_command): Remove cleanups.
2509
2510 2017-10-16  Tom Tromey  <tom@tromey.com>
2511
2512         * buildsym.c (block_compar): Remove.
2513         (end_symtab_get_static_block): Use std::vector.
2514
2515 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
2516
2517         * memrange.h (struct mem_range): Define operator< and operator==.
2518         (mem_range_s): Remove.
2519         (DEF_VEC_O (mem_range_s)): Remove.
2520         (normalize_mem_ranges): Change parameter type to std::vector.
2521         * memrange.c (compare_mem_ranges): Remove.
2522         (normalize_mem_ranges): Change parameter type to std::vector,
2523         adjust to vector change.
2524         * exec.c (section_table_available_memory): Return vector, remove
2525         parameter.
2526         (section_table_read_available_memory): Adjust to std::vector
2527         change.
2528         * remote.c (remote_read_bytes): Adjust to std::vector
2529         change.
2530         * tracepoint.h (traceframe_available_memory): Change parameter
2531         type to std::vector.
2532         * tracepoint.c (traceframe_available_memory): Change parameter
2533         type to std::vector, adjust.
2534         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2535         std::vector change.
2536         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2537         unittests/memrange-selftests.c.
2538         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2539         * gdb/unittests/memrange-selftests.c: New file.
2540
2541 2017-10-16  Pedro Alves  <palves@redhat.com>
2542
2543         * elfread.c (probe_key_free): Rename range-for variable.
2544         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2545         (find_probe_by_pc, collect_probes): Rename range-for variable.
2546
2547 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2548
2549         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2550         * features/tic6x-c62x.c: Remove.
2551         * features/tic6x-c64x-linux.c: Remove.
2552         * features/tic6x-c64x.c: Remove.
2553         * features/tic6x-c64xp-linux.c: Remove.
2554         * features/tic6x-c64xp.c: Remove.
2555         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2556         initialize_tdesc_tic6x_*_linux functions.
2557         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2558         initialize_tdesc_tic6x_* functions.
2559
2560 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2561
2562         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2563         tic6x-c62x.
2564         * regformats/tic6x-c62x.dat: Remove.
2565         * regformats/tic6x-c64x.dat: Remove.
2566         * regformats/tic6x-c64xp.dat: Remove.
2567
2568 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2569
2570         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2571         (the !HAVE_LIBEXPAT version).
2572
2573 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2574
2575         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2576         const.
2577
2578 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2579
2580         * target.h: Include tracepoint.h.
2581         (enum trace_find_type): Move to tracepoint.h.
2582         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2583         * tracepoint.h: Don't include target.h
2584         (enum trace_find_type): Move from target.h.
2585         (parse_traceframe_info): Return a unique ptr.
2586         * tracepoint.c (current_traceframe_info): Change type to unique
2587         ptr.
2588         (free_traceframe_info): Remove.
2589         (clear_traceframe_info): Don't manually free
2590         current_traceframe_info.
2591         (free_result): Remove.
2592         (parse_traceframe_info): Return a unique ptr.
2593         (get_traceframe_info): Adjust to unique ptr.
2594         * ctf.c (ctf_traceframe_info): Return a unique ptr.
2595         * remote.c (remote_traceframe_info): Return a unique ptr.
2596         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2597         ptr.
2598         * target-debug.h (target_debug_print_traceframe_info_up): New
2599         macro.
2600         * target-delegates.c: Regenerate.
2601
2602 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2603
2604         * memrange.h (struct mem_range): Add constructors.
2605         * tracepoint.h (struct traceframe_info) <memory>: Change type to
2606         std::vector<mem_range>.
2607         * tracepoint.c (free_traceframe_info): Don't manually free
2608         vector.
2609         (traceframe_info_start_memory): Adjust to vector change.
2610         (traceframe_available_memory): Likewise.
2611         * tracefile-tfile.c (build_traceframe_info): Likewise.
2612         * ctf.c (ctf_traceframe_info): Likewise.
2613
2614 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2615
2616         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2617         std::vector<int>.
2618         * tracepoint.c (free_traceframe_info): Deallocate with delete.
2619         (traceframe_info_start_tvar): Adjust to vector change.
2620         (parse_traceframe_info): Allocate with new.
2621         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2622         vector change.
2623         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2624         change.
2625         tfile_traceframe_info): Allocate with new.
2626         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2627         change.
2628
2629 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2630
2631         * tracepoint.c (traceframe_info): Rename to...
2632         (current_traceframe_info): ...this.
2633         (clear_traceframe_info): Adjust.
2634         (get_traceframe_info): Adjust.
2635
2636 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2637
2638         * nat/linux-osdata.c: Include algorithm.
2639         (compare_processes): Remove.
2640         (struct pid_pgid_entry): New struct.
2641         (linux_xfer_osdata_processgroups): Use std::vector instead of
2642         XNEWVEC.
2643
2644 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2645
2646         * objfiles.h: Don't include symfile.h.
2647         (struct partial_symbol): Remove forward-declaration.
2648         (struct objfile) <global_psymbols, static_psymbols>: Change type
2649         to std::vector<partial_symbol *>.
2650         * objfiles.c (objfile::objfile): Don't memset those fields.
2651         (objfile::~objfile): Don't free those fields.
2652         * psympriv.h (struct psymbol_allocation_list): Remove
2653         forward-declaration.
2654         (add_psymbol_to_list): Change psymbol_allocation_list parameter
2655         to std::vector.
2656         (start_psymtab_common): Change parameters to std::vector.
2657         * psymtab.c: Include algorithm.
2658         (require_partial_symbols): Call shrink_to_fit.
2659         (find_pc_sect_psymbol): Adjust to vector change.
2660         (match_partial_symbol): Likewise.
2661         (lookup_partial_symbol): Likewise.
2662         (psym_relocate): Likewise.
2663         (dump_psymtab): Likewise.
2664         (recursively_search_psymtabs): Likewise.
2665         (compare_psymbols): Remove.
2666         (sort_pst_symbols): Adjust to vector change.
2667         (start_psymtab_common): Likewise.
2668         (end_psymtab_common): Likewise.
2669         (psymbol_bcache_full): De-constify return value.
2670         (add_psymbol_to_bcache): Likewise.
2671         (extend_psymbol_list): Remove.
2672         (append_psymbol_to_list): Adjust to vector change.
2673         (add_psymbol_to_list): Likewise.
2674         (init_psymbol_list): Likewise.
2675         (maintenance_info_psymtabs): Likewise.
2676         (maintenance_check_psymtabs): Likewise.
2677         * symfile.h (struct psymbol_allocation_list): Remove.
2678         * symfile.c (reread_symbols): Adjust to vector change.
2679         * dbxread.c (start_psymtab): Change type of parameters.
2680         (dbx_symfile_read): Adjust to vector change.
2681         (read_dbx_symtab): Likewise.
2682         (start_psymtab): Change type of parameters.
2683         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2684         (create_partial_symtab): Likewise.
2685         (add_partial_symbol): Likewise.
2686         (write_one_signatured_type): Likewise.
2687         (recursively_write_psymbols): Likewise.
2688         * mdebugread.c (parse_partial_symbols): Likewise.
2689         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2690         (scan_xcoff_symtab): Adjust to vector change.
2691         (xcoff_initial_scan): Likewise.
2692
2693 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
2694
2695         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2696
2697 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2698
2699         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2700         Remove s390x-*-expedite, add s390x-expedite.
2701
2702 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2703
2704         * features/s390-gs-linux64.c: Regenerated.
2705         * features/s390x-gs-linux64.c: Regenerated.
2706
2707 2017-10-13  Tom Tromey  <tom@tromey.com>
2708
2709         * compile/compile-object-run.c (do_module_cleanup): Use delete.
2710         * solib.c (update_solib_list, reload_shared_libraries_1): Use
2711         delete.
2712         * symfile.c (symbol_file_add_with_addrs): Use new.
2713         (symbol_file_add_separate): Update comment.
2714         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2715         * jit.c (jit_object_close_impl): Use new.
2716         (jit_unregister_code): Use delete.
2717         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2718         (~objfile): Rename from free_objfile.
2719         (free_objfile_separate_debug, do_free_objfile_cleanup)
2720         (free_all_objfiles, objfile_purge_solibs): Use delete.
2721         * objfiles.h (struct objfile): Add constructor and destructor.
2722         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
2723         (allocate_objfile, free_objfile): Don't declare.
2724         (struct objstats): Add initializers.
2725
2726 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2727
2728         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
2729         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
2730         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
2731         * gdbarch.h: Regenerate.
2732         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2733         Adjust comment.
2734         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
2735         (i386_displaced_step_fixup): Adjust comment.
2736         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
2737
2738 2017-10-12  Tom Tromey  <tom@tromey.com>
2739
2740         * prologue-value.h (pv_area::store_would_trash): Return bool.
2741         (pv_area::find_reg): Likewise.
2742         * prologue-value.c (pv_area::store_would_trash): Return bool.
2743         (pv_area::find_reg): Likewise.
2744
2745 2017-10-12  Tom Tromey  <tom@tromey.com>
2746
2747         * s390-linux-tdep.c (s390_store, s390_load)
2748         (s390_check_for_saved, s390_analyze_prologue): Update.
2749         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
2750         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
2751         * prologue-value.h (class pv_area): Move from prologue-value.c.
2752         Change names of members.  Add constructor, destructor, member
2753         functions.
2754         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
2755         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
2756         (pv_area_fetch, pv_area_scan): Don't declare.
2757         * prologue-value.c (struct pv_area::area_entry): Now member of
2758         pv_area.
2759         (struct pv_area): Move to prologue-value.h.
2760         (pv_area::pv_area): Rename from make_pv_area.
2761         (pv_area::~pv_area): Rename from free_pv_area.
2762         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
2763         (clear_entries, find_entry, overlaps, store_would_trash, store)
2764         (fetch, find_reg, scan): Now member of pv_area.
2765         Remove "area" argument.  Update.
2766         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
2767         Update.
2768         * mn10300-tdep.c (push_reg, check_for_saved)
2769         (mn10300_analyze_prologue): Update.
2770         * mep-tdep.c (is_arg_spill, check_for_saved)
2771         (mep_analyze_prologue): Update.
2772         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
2773         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
2774         (m32c_is_struct_return, m32c_analyze_prologue): Update.
2775         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
2776         Update.
2777         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
2778         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
2779
2780 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2781
2782         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
2783         * linux-nat.c (linux_nat_delete_thread): New variable.
2784         (lwp_free): Invoke linux_nat_delete_thread if set.
2785         (linux_nat_set_delete_thread): New function.
2786         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
2787         thread delete callback.
2788         * arm-linux-nat.c (arm_linux_delete_thread): New function.
2789         (_initialize_arm_linux_nat): Assign thread delete callback.
2790         * s390-linux-nat.c (s390_delete_thread): New function.
2791         (_initialize_s390_nat): Assign thread delete callback.
2792         * x86-linux-nat.c (x86_linux_add_target): Likewise.
2793         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
2794         function.
2795         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
2796         declaration.
2797         * nat/x86-linux.c (x86_linux_delete_thread): New function.
2798         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
2799
2800 2017-10-09  Tom Tromey  <tom@tromey.com>
2801
2802         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
2803         std::string.
2804         * tui/tui-layout.c (enum tui_status): Use std::string.
2805
2806 2017-10-11  Tom Tromey  <tom@tromey.com>
2807
2808         * gdbthread.h (thread_command): Constify.
2809         * inferior.h (detach_command): Constify.
2810         * top.h (set_history, show_history): Constify.
2811         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
2812         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
2813         * bsd-kvm.c (bsd_kvm_cmd): Constify.
2814         * printcmd.c (set_command): Constify.
2815         (non_const_set_command): New function.
2816         * dcache.c (set_dcache_command, show_dcache_command): Constify.
2817         * breakpoint.c (enable_command, disable_command, delete_command)
2818         (catch_command, tcatch_command, set_breakpoint_cmd)
2819         (show_breakpoint_cmd): Constify.
2820         * macrocmd.c (macro_command): Constify.
2821         * infcmd.c (unset_command, kill_command, detach_command)
2822         (info_proc_cmd): Constify.
2823         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
2824         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
2825         (info_auto_load_cmd): Constify.
2826         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
2827         (unset_tdesc_cmd): Constify.
2828         * ada-lang.c (set_ada_command, show_ada_command)
2829         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
2830         * guile/guile.c (set_guile_command, show_guile_command)
2831         (info_guile_command): Constify.
2832         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
2833         Constify.
2834         * skip.c (skip_command): Constify.
2835         * compile/compile.c (_initialize_compile): Constify.
2836         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
2837         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
2838         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
2839         (maint_btrace_pt_show_cmd): Constify.
2840         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
2841         Constify.
2842         * python/python.c (user_show_python, user_set_python): Constify.
2843         * mips-tdep.c (set_mips_command, show_mips_command)
2844         (set_mipsfpu_command): Constify.
2845         * record-btrace.c (cmd_record_btrace_start)
2846         (cmd_set_record_btrace, cmd_show_record_btrace)
2847         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
2848         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
2849         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
2850         Constify.
2851         * symfile.c (overlay_command): Constify.
2852         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2853         * cli/cli-logging.c (set_logging_command, show_logging_command):
2854         Constify.
2855         * cli/cli-dump.c (dump_command, append_command)
2856         (srec_dump_command, ihex_dump_command, verilog_dump_command)
2857         (tekhex_dump_command, binary_dump_command)
2858         (binary_append_command): Constify.
2859         * cli/cli-decode.c (struct cmd_list_element): Change type of
2860         "fun".
2861         * cli/cli-cmds.c (info_command, show_command, set_debug)
2862         (show_debug): Constify.
2863         (show_command): Add non-const overload.
2864         * top.c (set_history, show_history): Constify.
2865         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
2866         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
2867         * target.c (target_command): Constify.
2868         * sparc64-tdep.c (info_adi_command): Constify.
2869         * record-full.c (cmd_record_full_start): Constify.
2870         (set_record_full_command): Constify.  Fix typo.
2871         (show_record_full_command): Constify.
2872         * thread.c (thread_command, thread_apply_command): Constify.
2873         * memattr.c (dummy_cmd): Constify.
2874         * value.c (function_command): Constify.
2875         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
2876         * probe.c (info_probes_command): Constify.
2877         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
2878         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
2879         (show_thread_cmd, set_thread_default_cmd)
2880         (show_thread_default_cmd): Constify.
2881         (check_empty): Constify.
2882         * tracepoint.c (tfind_command): Constify.
2883         * cp-support.c (maint_cplus_command): Constify.
2884         * windows-tdep.c (info_w32_command): Constify.
2885         * record.c (cmd_record_start, set_record_command)
2886         (show_record_command, info_record_command, cmd_record_goto):
2887         Constify.
2888         * ravenscar-thread.c (set_ravenscar_command)
2889         (show_ravenscar_command): Constify.
2890         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
2891         Constify.
2892         (add_internal_problem_command): Remove casts.
2893         * arc-tdep.c (maintenance_print_arc_command): Constify.
2894         * valprint.c (set_print, show_print, set_print_raw)
2895         (show_print_raw): Constify.
2896         * maint.c (maintenance_command, maintenance_info_command)
2897         (maintenance_print_command, maintenance_set_cmd)
2898         (maintenance_show_cmd, set_per_command_cmd)
2899         (show_per_command_cmd, maintenance_check_command): Constify.
2900         * language.c (set_check, show_check): Constify.
2901         * typeprint.c (show_print_type, set_print_type): Constify.
2902         * go32-nat.c (go32_info_dos_command): Constify.
2903
2904 2017-10-11  Tom Tromey  <tom@tromey.com>
2905
2906         * breakpoint.c (prepare_re_set_context): Remove.
2907         (breakpoint_re_set_one): Update.  Don't use cleanups.
2908         (breakpoint_re_set): Use scoped_restore, std::string, and
2909         scoped_restore_current_language.
2910
2911 2017-10-11  Tom Tromey  <tom@tromey.com>
2912
2913         * breakpoint.c (commands_command_1): Use std::string.
2914         (cleanup_executing_breakpoints): Remove.
2915         (bpstat_do_actions_1): Use scoped_restore.
2916         (bpstat_check_watchpoint): Use std::string.
2917         (decode_static_tracepoint_spec): Likewise.
2918         (break_range_command): Likewise.
2919         (watch_command_1): Likewise.
2920         (compare_breakpoints): Change argument types.
2921         (clear_command): Use std::vector.
2922         (cleanup_executing_breakpoints): Remove.
2923         (update_global_location_list): Use unique_xmalloc_ptr.
2924         (strace_command): Remove unused declaration.
2925
2926 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2927
2928         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
2929         * NEWS: Mention new FreeBSD/arm native configuration.
2930         * configure.host: Add arm*-*-freebsd*.
2931         * configure.nat: Likewise.
2932         * arm-fbsd-nat.c: New file.
2933
2934 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2935
2936         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
2937         (ALLDEPFILES): Add arm-fbsd-tdep.c.
2938         * NEWS: Mention new FreeBSD/arm target.
2939         * configure.tgt: Add arm*-*-freebsd*.
2940         * arm-fbsd-tdep.c: New file.
2941         * arm-fbsd-tdep.h: New file.
2942
2943 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2944
2945         * linux-tdep.c (linux_make_corefile_notes): Remove call to
2946         `gdbarch_elfcore_write_linux_prpsinfo'.
2947         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
2948         method.
2949         (elf_internal_linux_prpsinfo): Remove declaration.
2950         * gdbarch.h: Regenerate.
2951         * gdbarch.c: Regenerate.
2952
2953 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2954
2955         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
2956         `set_gdbarch_elfcore_write_linux_prpsinfo'.
2957
2958 2017-10-11  Pedro Alves  <palves@redhat.com>
2959
2960         * breakpoint.c (reattach_breakpoints): Delete.
2961         * breakpoint.h (reattach_breakpoints): Delete.
2962
2963 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
2964
2965         * symfile.c (registered_sym_fns): Make struct, not typedef.
2966         (DEF_VEC_O (registered_sym_fns)): Remove.
2967         (symtab_fns): Change type to std::vector.
2968         (add_symtab_fns): Adjust.
2969         (find_sym_fns): Adjust.
2970
2971 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
2972
2973         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
2974         * arc-tdep.h (arc_arch_is_em): New function.
2975         (arc_arch_is_hs): Likewise.
2976
2977 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
2978
2979         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
2980         parentheses in the declaration.
2981         (macro_lookup_inclusion): Likewise.
2982         (macro_lookup_definition): Likewise.
2983         * p-lang.h (pascal_builtin_types): Likewise.
2984         * tui/tui-data.c (tui_win_list): Likewise.
2985         * tui/tui-data.h (tui_win_list): Likewise.
2986         * utils.h (make_cleanup_free_section_addr_info): Likewise.
2987
2988 2017-10-11  Mark Rages  <markrages@gmail.com>
2989
2990         * target-memory.c (block_boundaries): Fix for block address not
2991         aligned on block size.
2992
2993 2017-10-10  Pedro Alves <palves@redhat.com>
2994             Tom Tromey  <tom@tromey.com>
2995
2996         * breakpoint.c (struct captured_breakpoint_query_args)
2997         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
2998         (print_breakpoint): New.
2999         * breakpoint.h (print_breakpoint): Declare.
3000         * common/common-exceptions.h (enum return_reason): Remove
3001         references to catch_exceptions.
3002         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3003         Delete.
3004         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3005         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3006         * gdb.h: Delete.
3007         * gdbthread.h (thread_select): Declare.
3008         * mi/mi-cmd-break.c: Don't include gdb.h.
3009         (breakpoint_notify): Use print_breakpoint.
3010         * mi/mi-cmd-catch.c: Don't include gdb.h.
3011         * mi/mi-interp.c: Don't include gdb.h.
3012         (mi_print_breakpoint_for_event): New.
3013         (mi_breakpoint_created, mi_breakpoint_modified): Use
3014         mi_print_breakpoint_for_event.
3015         * mi/mi-main.c: Don't include gdb.h.
3016         (mi_cmd_thread_select): Parse the global thread ID here.  Use
3017         thread_select instead of gdb_thread_select.
3018         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3019         of using gdb_list_thread_ids.
3020         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
3021         FILEIO_ENOSYS here.
3022         (remote_fileio_request): Use TRY/CATCH instead of
3023         catch_exceptions.
3024         * symfile-mem.c (struct symbol_file_add_from_memory_args)
3025         (symbol_file_add_from_memory_wrapper): Delete.
3026         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3027         * thread.c: Don't include gdb.h.
3028         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3029         (thread_alive): Use thread_select.
3030         (do_captured_thread_select): Delete, parts salvaged as ...
3031         (thread_select): ... this new function.
3032         (gdb_thread_select): Delete.
3033
3034 2017-10-10  Pedro Alves  <palves@redhat.com>
3035             Tom Tromey  <tom@tromey.com>
3036
3037         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3038         and reverse logic.
3039         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3040         No longer macros.  Instead ...
3041         (enum wp_check_result): They're now values of this new
3042         enumeration.
3043         (watchpoint_check): Change return type to wp_check_result and
3044         parameter type to bpstat.
3045         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3046         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3047         catch_errors.  Reverse logic of watchpoint_check call.
3048         (breakpoint_re_set_one): Now returns void and takes a breakpoint
3049         pointer as parameter.
3050         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3051         * common/common-exceptions.c (throw_exception_sjlj): Update
3052         comments to avoid mentioning catch_errors.
3053         * exceptions.c (catch_errors): Delete.
3054         * exceptions.h: Update comments to avoid mentioning catch_errors.
3055         (catch_errors_ftype, catch_errors): Delete.
3056         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3057         (hook_stop_stub): Delete.
3058         (restore_selected_frame): Change return type to void, and
3059         parameter type to const frame_id &.
3060         (restore_infcall_control_state): Use TRY/CATCH instead of
3061         catch_errors.
3062         * main.c (captured_command_loop): Return void and remove
3063         parameter.  Remove references to catch_errors.
3064         (captured_main): Use TRY/CATCH instead of catch_errors.
3065         * objc-lang.c (objc_submethod_helper_data)
3066         (find_objc_msgcall_submethod_helper): Delete.
3067         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3068         catch_errors.
3069         * record-full.c (record_full_message): Return void.
3070         (record_full_message_args, record_full_message_wrapper): Delete.
3071         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3072         instead of catch_errors.
3073         * solib-aix.c (solib_aix_open_symbol_file_object): Change
3074         parameter type to int.
3075         * solib-darwin.c (open_symbol_file_object): Ditto.
3076         * solib-dsbt.c (open_symbol_file_object): Ditto.
3077         * solib-frv.c (open_symbol_file_object): Ditto.
3078         * solib-svr4.c (open_symbol_file_object): Ditto.
3079         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3080         * solib.c (update_solib_list): Use TRY/CATCH instead of
3081         catch_errors.
3082         * solist.h (struct target_so_ops) <open_symbol_file_object>:
3083         Change type.
3084         * symmisc.c (struct print_symbol_args): Remove.
3085         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3086         (print_symbol): Change type.
3087         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3088         and remove parameters.
3089         (catch_errors): New.
3090         (get_windows_debug_event): Adjust.
3091
3092 2017-10-09  Tom Tromey  <tom@tromey.com>
3093
3094         * mi/mi-main.c (free_splay_tree): Remove.
3095         (list_available_thread_groups): Use splay_tree_up.
3096         * common/gdb_splay_tree.h: New file.
3097
3098 2017-10-09  Tom Tromey  <tom@tromey.com>
3099
3100         * mi/mi-main.c (do_nothing): Remove.
3101         (list_available_thread_groups): Update.
3102
3103 2017-10-09  Pedro Alves  <palves@redhat.com>
3104
3105         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3106         reading registers when switching context.
3107
3108 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
3109
3110         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3111         (fbsd_convert_siginfo): Likewise.
3112         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3113
3114 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
3115
3116         * configure.ac (try_guile_versions): Remove guile-2.2.
3117         * configure: Regenerate.
3118
3119 2017-10-09  Tom Tromey  <tom@tromey.com>
3120
3121         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3122         (COMPILE.pre): Use $(CXX).
3123
3124 2017-10-09  Pedro Alves  <palves@redhat.com>
3125
3126         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3127         Use bool.
3128         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3129         * cp-support.h (cp_remove_params): Now returns a
3130         gdb::unique_xmalloc_ptr.
3131         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3132         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3133         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3134         returning a gdb::unique_xmalloc_ptr.
3135         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3136         * stack.c (find_frame_funname): Adjust to cp_remove_params
3137         returning a gdb::unique_xmalloc_ptr.
3138
3139 2017-10-08  Tom Tromey  <tom@tromey.com>
3140
3141         * dwarf2read.c (dwarf2_get_dwz_file): Use
3142         gdb::unique_xmalloc_ptr.
3143         (find_slot_in_mapped_hash): Likewise.
3144         (dwarf2_physname): Likewise.
3145         (create_dwo_unit_in_dwp_v1): Use std::string.
3146         (create_dwo_unit_in_dwp_v2): Likewise.
3147         (lookup_dwo_cutu): Likewise.
3148         (inherit_abstract_dies): Use std::vector.
3149         (read_array_type): Likewise.
3150         (dwarf_decode_macros): Remove unused declaration.
3151         (unsigned_int_compar): Remove.
3152         (dwarf2_build_psymtabs_hard): Use scoped_restore.
3153         (psymtabs_addrmap_cleanup): Remove.
3154
3155 2017-10-08  Tom Tromey  <tom@tromey.com>
3156
3157         * frame-unwind.c (frame_unwind_try_unwinder): Update.
3158         * frame.h (frame_cleanup_after_sniffer): Declare.
3159         (frame_prepare_for_sniffer): Return void.
3160         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
3161         type of argument.
3162         (frame_prepare_for_sniffer): Return void.
3163
3164 2017-10-08  Tom Tromey  <tom@tromey.com>
3165
3166         * utils.h (make_cleanup_value_free): Remove.
3167         * utils.c (do_value_free, struct cleanup): Remove.
3168         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3169         Use gdb_value_up.
3170         * value.h (struct value_deleter): New.
3171         (gdb_value_up): New typedef.
3172
3173 2017-10-08  Tom Tromey  <tom@tromey.com>
3174
3175         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3176         (make_cleanup_free_search_symbols): Remove.
3177         (search_symbols): Return std::vector.
3178         (symbol_search::compare_search_syms): Now member of
3179         symbol_search.  Change arguments.
3180         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
3181         (symtab_symbol_info, rbreak_command): Update.
3182         * symtab.h (struct symbol_search) <next>: Remove.
3183         Add constructors.
3184         (symbol_search::operator<): New function.
3185         (symbol_search::operator==): New function.
3186         (search_symbols): Remove std::vector.
3187         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3188         (symbol_search::compare_search_syms): Declare.
3189
3190 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3191
3192         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3193         arch/aarch64-insn.o.
3194         Remove one rule.
3195         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3196
3197 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3198
3199         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3200         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3201         arch/arm-linux.o respectively.
3202         * configure.tgt: Likewise.
3203
3204 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3205
3206         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3207         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3208
3209 2017-10-06  Pedro Alves  <palves@redhat.com>
3210
3211         * windows-nat.c: Include <algorithm>.
3212
3213 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3214
3215         * configure.tgt (i386_tobjs): New variable.
3216         (amd64_tobjs): New variable.
3217         Set $cpu_obs and $os_obs.
3218
3219 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3220
3221         * Makefile.in (CONFIG_SRC_SUBDIR): New.
3222         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3223         (clean): Remove object files and dependency files.
3224         (distclean): Remove the directory.
3225         * configure.ac: Invoke AC_CONFIG_COMMANDS.
3226         * configure: Re-generated.
3227         * configure.tgt: Replace amd64.o with arch/amd64.o.
3228
3229 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
3230
3231         PR build/22188
3232         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3233         and SETEND.
3234
3235 2017-10-05  Pedro Alves  <palves@redhat.com>
3236
3237         * linux-nat.c (linux_child_follow_fork): When following the parent
3238         and detaching the child, consult the parent thread's architecture
3239         instead of the child's.
3240
3241 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3242
3243         * ax.h: Do not include "doublest.h".
3244         (union agent_val): Remove.
3245
3246 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3247
3248         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3249         (decimal_to_string): Return std::string object.
3250         (decimal_from_string): Accept std::string object.  Return bool.
3251         (decimal_from_integral, decimal_from_doublest): Remove.
3252         (decimal_from_longest): Add prototype.
3253         (decimal_from_ulongest): Likewise.
3254         (decimal_to_longest): Likewise.
3255         (decimal_from_doublest): Likewise.
3256         * dfp.c: Do not include "gdbtypes.h" or "value.h".
3257         (MAX_DECIMAL_STRING): Move here.
3258         (decimal_to_string): Return std::string object.
3259         (decimal_from_string): Accept std::string object.  Return bool.
3260         (decimal_from_integral): Remove, replace by ...
3261         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3262         (decimal_to_longest): New function.
3263         (decimal_from_floating): Remove, replace by ...
3264         (decimal_from_doublest): ... this new function.
3265         (decimal_to_doublest): Update to new decimal_to_string interface.
3266
3267         * value.c (unpack_long): Use decimal_to_longest.
3268         * valops.c (value_cast): Use decimal_from_doublest instead of
3269         decimal_from_floating.  Use decimal_from_[u]longest isntead of
3270         decimal_from_integral.
3271         * valarith.c (value_args_as_decimal): Likewise.
3272         * valprint.c (print_decimal_floating): Update to new
3273         decimal_to_string interface.
3274         * printcmd.c (printf_decfloat): Likewise.
3275         * c-exp.y (parse_number): Update to new decimal_from_string interface.
3276
3277 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3278
3279         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
3280         * gdbtypes.c: Include "floatformat.h".
3281         * value.c: Likewise.
3282         * m68k-tdep.c: Likewise.
3283
3284         * findvar.c: Do not include "floatformat.h".
3285         * amd64-darwin-tdep.c: Likewise.
3286         * arm-linux-tdep.c: Likewise.
3287         * i386-darwin-tdep.c: Likewise.
3288         * i387-tdep.c: Likewise.
3289         * m68k-linux-tdep.c: Likewise.
3290         * mep-tdep.c: Likewise.
3291         * mips-tdep.c: Likewise.
3292         * nios2-tdep.c: Likewise.
3293         * s390-linux-tdep.c: Likewise.
3294         * sparc-obsd-tdep.c: Likewise.
3295         * sparc-tdep.c: Likewise.
3296         * sparc64-tdep.c: Likewise.
3297         * spu-tdep.c: Likewise.
3298         * tic6x-tdep.c: Likewise.
3299         * tilegx-tdep.c: Likewise.
3300         * vax-tdep.c: Likewise.
3301         * xstormy16-tdep.c: Likewise.
3302         * xtensa-tdep.c: Likewise.
3303
3304         * top.c: Do not include "doublest.h".
3305         * aarch64-tdep.c: Likewise.
3306         * alpha-tdep.c: Likewise.
3307         * arm-linux-tdep.c: Likewise.
3308         * m68k-linux-tdep.c: Likewise.
3309         * tilegx-tdep.c: Likewise.
3310         * xstormy16-tdep.c: Likewise.
3311
3312 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3313
3314         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3315         (mipsn32_fbsd_sigframe): Define.
3316         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3317         for FreeBSD/mipsn32.
3318
3319 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3320
3321         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3322         AT_HWCAP.
3323
3324 2017-10-05  Tristan Gingold  <tgingold@free.fr>
3325
3326         * MAINTAINERS (Misc): Update my email address.
3327
3328 2017-10-04  Pedro Alves  <palves@redhat.com>
3329
3330         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
3331         it instead of target_gdbarch.
3332         (get_remote_state, get_remote_packet_size): Adjust
3333         get_remote_arch_state calls, passing down target_gdbarch
3334         explicitly.
3335         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3336         'gdbarch' and use it instead of target_gdbarch.
3337         (get_memory_packet_size): Adjust get_remote_arch_state calls,
3338         passing down target_gdbarch explicitly.
3339         (struct stop_reply) <arch>: New field.
3340         (remote_parse_stop_reply): Use the stopped thread's architecture,
3341         not the current inferior's.  Save the architecture in the
3342         stop_reply.
3343         (process_stop_reply): Use the stop reply's architecture.
3344         (process_g_packet, remote_fetch_registers)
3345         (remote_prepare_to_store, store_registers_using_G)
3346         (remote_store_registers): Adjust get_remote_arch_state calls,
3347         using the regcache's architecture.
3348         (remote_get_trace_status): Adjust get_remote_arch_state calls,
3349         passing down target_gdbarch explicitly.
3350         * spu-multiarch.c (spu_thread_architecture): Defer to the target
3351         beneath instead of calling target_gdbarch.
3352         * target.c (default_thread_architecture): Use the specified
3353         inferior's architecture, instead of the current inferior's
3354         architecture (via target_gdbarch).
3355
3356 2017-10-04  Pedro Alves  <palves@redhat.com>
3357
3358         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3359         case.
3360         (regcache_print): Handle !target_has_registers here instead.
3361
3362 2017-10-04  Pedro Alves  <palves@redhat.com>
3363
3364         * frame.c (create_test_frame): Delete.
3365         * frame.h (create_test_frame): Delete.
3366         * gdbarch-selftests.c: Include gdbthread.h and target.h.
3367         (class regcache_test): Delete.
3368         (test_target_has_registers, test_target_has_stack)
3369         (test_target_has_memory, test_target_prepare_to_store)
3370         (test_target_store_registers): New functions.
3371         (test_target_ops): New class.
3372         (register_to_value_test): Error out if there's already a
3373         process_stratum (or higher) target pushed.  Create a fuller mock
3374         environment, with mock target_ops, inferior, address space, thread
3375         and inferior_ptid.
3376         * progspace.c (struct address_space): Move to ...
3377         * progspace.h (struct address_space): ... here.
3378         * regcache.h (regcache::~regcache, regcache::raw_write)
3379         [GDB_SELF_TEST]: No longer virtual.
3380
3381 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
3382
3383         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3384
3385 2017-10-04  Pedro Alves  <palves@redhat.com>
3386
3387         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3388         out of 'between TRY and CATCH'.
3389
3390 2017-10-04  Pedro Alves  <palves@redhat.com>
3391
3392         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3393         * common/common-exceptions.h (TRY): Open an outermost scope.
3394         Expand intro comment.
3395         (CATCH): Reindent.
3396         (END_CATCH): Close the outermost scope.
3397         * completer.c (complete_line_internal): Add missing END_CATCH.
3398
3399 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3400
3401         * NEWS (Changes since GDB 8.0): Add entry about new
3402         'set-cwd-on-gdbserver' feature.
3403         (New remote packets): Add entry for QSetWorkingDir.
3404         * common/common-inferior.h (set_inferior_cwd): New prototype.
3405         * infcmd.c (set_inferior_cwd): Remove "static".
3406         (show_cwd_command): Expand text to include remote debugging.
3407         * remote.c: Add PACKET_QSetWorkingDir.
3408         (remote_protocol_features) <QSetWorkingDir>: New entry for
3409         PACKET_QSetWorkingDir.
3410         (extended_remote_set_inferior_cwd): New function.
3411         (extended_remote_create_inferior): Call
3412         "extended_remote_set_inferior_cwd".
3413         (_initialize_remote): Call "add_packet_config_cmd" for
3414         QSetWorkingDir.
3415
3416 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3417
3418         * NEWS (New commands): Mention "set/show cwd".
3419         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3420         "cd" command's help text.
3421         * common/common-inferior.h (get_inferior_cwd): New prototype.
3422         * infcmd.c (inferior_cwd_scratch): New global variable.
3423         (set_inferior_cwd): New function.
3424         (get_inferior_cwd): Likewise.
3425         (set_cwd_command): Likewise.
3426         (show_cwd_command): Likewise.
3427         (_initialize_infcmd): Add "set/show cwd" commands.
3428         * inferior.h (class inferior) <cwd>: New field.
3429         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3430         (fork_inferior): Change inferior's cwd before its execution.
3431         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3432         to CreateProcess.
3433
3434 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3435
3436         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3437         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3438         (COMMON_OBS): Add gdb_tilde_expand.o.
3439         * common/gdb_tilde_expand.c: New file.
3440         * common/gdb_tilde_expand.h: Likewise.
3441
3442 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
3443
3444         * gdbarch.sh (objfile): Remove duplicate declaration.
3445         * gdbarch.h: Regenerate.
3446
3447 2017-10-03  Tom Tromey  <tom@tromey.com>
3448
3449         * utils.c (internal_vproblem): Use string_vprintf.
3450
3451 2017-10-03  Tom Tromey  <tom@tromey.com>
3452
3453         * printcmd.c (info_symbol_command): Use std::string.
3454
3455 2017-10-03  Tom Tromey  <tom@tromey.com>
3456
3457         * top.c (gdb_safe_append_history): Use std::string.
3458
3459 2017-10-03  Tom Tromey  <tom@tromey.com>
3460
3461         * event-top.c (stdin_event_handler): Update.
3462         * main.c (captured_main_1): Update.
3463         * top.h (make_delete_ui_cleanup): Remove.
3464         (struct ui): Add constructor and destructor.
3465         (new_ui, delete_ui): Remove.
3466         * top.c (make_delete_ui_cleanup): Remove.
3467         (new_ui_command): Use std::unique_ptr.
3468         (delete_ui_cleanup): Remove.
3469         (ui::ui): Rename from new_ui.  Update.
3470         (free_ui): Remove.
3471         (ui::~ui): Rename from delete_ui.  Update.
3472
3473 2017-10-03  Tom Tromey  <tom@tromey.com>
3474
3475         * symfile.c (load_progress): Use gdb::byte_vector.
3476
3477 2017-10-03  Tom Tromey  <tom@tromey.com>
3478
3479         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3480         declaration.
3481         * printcmd.c (x_command): Remove unused declaration.
3482         * symfile.c (symbol_file_command): Remove unused declaration.
3483
3484 2017-10-03  Tom Tromey  <tom@tromey.com>
3485
3486         * utils.c (internal_vproblem): Use std::string.
3487         (defaulted_query): Likewise.
3488
3489 2017-10-03  Tom Tromey  <tom@tromey.com>
3490
3491         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3492         * top.c (execute_command_to_string): Update.
3493         * utils.c (make_cleanup_restore_page_info): Remove.
3494         (do_restore_page_info_cleanup): Remove.
3495         (set_batch_flag_and_restore_page_info):
3496         New.
3497         (make_cleanup_restore_page_info): Remove.
3498         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3499         (~set_batch_flag_and_restore_page_info): New
3500         (make_cleanup_restore_uinteger): Remove.
3501         (make_cleanup_restore_integer): Remove.
3502         (struct restore_integer_closure): Remove.
3503         (restore_integer): Remove.
3504         * utils.h (struct set_batch_flag_and_restore_page_info): New
3505         class.
3506         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3507         (make_cleanup_restore_page_info): Remove.
3508         (make_cleanup_restore_uinteger) Remove.
3509         (make_cleanup_restore_integer) Remove.
3510
3511 2017-10-03  Tom Tromey  <tom@tromey.com>
3512
3513         * record-full.h (record_full_gdb_operation_disable_set): Return
3514         scoped_restore_tmpl<int>.
3515         * infrun.c (adjust_pc_after_break): Update.
3516         (handle_signal_stop): Update.
3517         * record-full.c (record_full_gdb_operation_disable_set): Return
3518         scoped_restore_tmpl<int>.
3519         (record_full_wait_1, record_full_insert_breakpoint)
3520         (record_full_remove_breakpoint, record_full_save)
3521         (record_full_goto_insn): Update.
3522
3523 2017-10-02  Tom Tromey  <tom@tromey.com>
3524
3525         PR rust/22236:
3526         * rust-lang.c (rust_val_print_str): New function.
3527         (val_print_struct): Call it.
3528         (rust_subscript): Preserve name of slice type.
3529
3530 2017-10-02  Tom Tromey  <tom@tromey.com>
3531
3532         * rust-lang.c (rust_subscript): Handle slices in
3533         EVAL_AVOID_SIDE_EFFECTS case.
3534
3535 2017-10-02  Tom Tromey  <tom@tromey.com>
3536
3537         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3538
3539 2017-10-02  Tom Tromey  <tom@tromey.com>
3540
3541         * rust-lang.h (rust_slice_type): Add "extern".
3542
3543 2017-10-02  Tom Tromey  <tom@tromey.com>
3544             Pedro Alves  <palves@redhat.com>
3545
3546         * ada-lang.h (ada_exc_info::operator<): Make const.
3547         (ada_exc_info::operator==): Make const.
3548         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3549         Make const.
3550
3551 2017-09-29  Tom Tromey  <tom@tromey.com>
3552
3553         * target.c (read_whatever_is_readable): Change type of "result".
3554         Update.
3555         (free_memory_read_result_vector): Remove.
3556         (read_memory_robust): Change return type.  Update.
3557         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
3558         bin2hex, std::string.
3559         * target.h (memory_read_result_s): Remove typedef.
3560         (free_memory_read_result_vector): Remove.
3561         (read_memory_robust): Return std::vector.
3562
3563 2017-09-29  Tom Tromey  <tom@tromey.com>
3564
3565         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3566
3567 2017-09-29  Tom Tromey  <tom@tromey.com>
3568
3569         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3570         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
3571         operator< and operator==.
3572         (ada_exceptions_list): Return a std::vector.
3573         * ada-lang.c (ada_exc_info::operator<): Rename from
3574         compare_ada_exception_info.
3575         (ada_exc_info::operator==): New.
3576         (sort_remove_dups_ada_exceptions_list): Change type of
3577         "exceptions".
3578         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3579         (ada_add_global_exceptions): Likewise.
3580         (ada_exceptions_list_1): Return a std::vector.
3581         (ada_exceptions_list): Likewise.
3582
3583 2017-09-29  Tom Tromey  <tom@tromey.com>
3584
3585         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3586         'std::set *'.
3587         (print_one_inferior): Update.
3588         (free_vector_of_ints): Remove.
3589         (list_available_thread_groups): Change "ids" to std::set.
3590         (mi_cmd_list_thread_groups): Update.
3591         (struct collect_cores_data) <core>: Now a std::set.
3592         (collect_cores): Update.
3593         (unique): Remove.
3594         (print_one_inferior): Update.
3595
3596 2017-09-29  Tom Tromey  <tom@tromey.com>
3597
3598         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3599         (mi_execute_async_cli_command): Likewise.
3600         (mi_cmd_trace_frame_collected): Use field_fmt.
3601
3602 2017-09-29  Tom Tromey  <tom@tromey.com>
3603
3604         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3605         gdb::byte_vector.
3606
3607 2017-09-29  Tom Tromey  <tom@tromey.com>
3608
3609         * mi/mi-parse.c (mi_parse): Remove unused declaration.
3610
3611 2017-09-29  Tom Tromey  <tom@tromey.com>
3612
3613         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3614
3615 2017-09-29  Tom Tromey  <tom@tromey.com>
3616
3617         * varobj.h (varobj_gen_name): Return std::string.
3618         * varobj.c (varobj_gen_name): Return std::string.
3619         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3620         (mi_cmd_var_delete): Don't copy "name".
3621
3622 2017-09-29  Tom Tromey  <tom@tromey.com>
3623
3624         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3625         (mi_cmd_break_insert_1): Update.
3626
3627 2017-09-29  Tom Tromey  <tom@tromey.com>
3628
3629         * target.h (make_scoped_defer_target_commit_resume): Update.
3630         * target.c (make_scoped_defer_target_commit_resume): Rename from
3631         make_cleanup_defer_target_commit_resume.  Return a
3632         scoped_restore.
3633         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3634
3635 2017-09-29  Tom Tromey  <tom@tromey.com>
3636
3637         * main.c (captured_main_1): Remove unused declaration.
3638         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3639
3640 2017-09-29  Tom Tromey  <tom@tromey.com>
3641
3642         * symtab.c (search_symbols): Remove unused outer cleanup.
3643         (make_source_files_completion_list): Remove unused declaration.
3644
3645 2017-09-29  Tom Tromey  <tom@tromey.com>
3646
3647         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3648
3649 2017-09-29  Tom Tromey  <tom@tromey.com>
3650
3651         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3652         gdb::byte_vector.
3653
3654 2017-09-29  Tom Tromey  <tom@tromey.com>
3655
3656         * complaints.c (vcomplaint): Use std::string.
3657
3658 2017-09-29  Tom Tromey  <tom@tromey.com>
3659
3660         * tracepoint.c (trace_variable_command): Use std::string.
3661         (encode_actions_1): Remove unused declarations.
3662         (create_tsv_from_upload): Use std::string.
3663
3664 2017-09-29  Tom Tromey  <tom@tromey.com>
3665
3666         * cp-support.c (gdb_demangle): Use std::string.
3667
3668 2017-09-29  Tom Tromey  <tom@tromey.com>
3669
3670         * stack.c (parse_frame_specification): Use std::string
3671         (info_frame_command): Use gdb::unique_xmalloc_ptr.
3672
3673 2017-09-29  Tom Tromey  <tom@tromey.com>
3674
3675         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3676
3677 2017-09-29  Tom Tromey  <tom@tromey.com>
3678
3679         * utils.c (vfprintf_maybe_filtered): Use std::string.
3680         (vfprintf_unfiltered): Likewise.
3681
3682 2017-09-29  Tom Tromey  <tom@tromey.com>
3683
3684         * event-top.c (top_level_prompt): Return std::string.
3685         (display_gdb_prompt): Update.
3686
3687 2017-09-29  Tom Tromey  <tom@tromey.com>
3688
3689         * unittests/common-utils-selftests.c (format): New function.
3690         (string_vprintf_tests): New function.
3691         (_initialize_common_utils_selftests): Register new tests.
3692         * common/common-utils.c (string_vprintf): New function.
3693         * common/common-utils.h (string_vprintf): Declare.
3694
3695 2017-09-29  Pedro Alves  <palves@redhat.com>
3696
3697         * common/rsp-low.c (unpack_varlen_hex): Constify.
3698         * common/rsp-low.h (unpack_varlen_hex): Constify.
3699         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3700         Constify.
3701         * remote.c (remote_set_permissions, read_ptid)
3702         (remote_current_thread, remote_get_threads_with_qthreadinfo)
3703         (remote_static_tracepoint_marker_at)
3704         (remote_static_tracepoint_markers_by_strid)
3705         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3706         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3707         (parse_tracepoint_definition, parse_tsv_definition)
3708         (parse_static_tracepoint_marker_definition): Constify.
3709         * tracepoint.h (parse_static_tracepoint_marker_definition)
3710         (parse_trace_status, parse_tracepoint_status)
3711         (parse_tracepoint_definition, parse_tsv_definition): Constify.
3712
3713 2017-09-29  Pedro Alves  <palves@redhat.com>
3714
3715         * remote.c (target_buf, target_buf_size): Delete.
3716         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3717         Use the connection's packet buffer instead.
3718         All callers adjusted.
3719         (_initialize_remote): Remove references to target_buf and
3720         target_buf_size.
3721
3722 2017-09-28  Pedro Alves  <palves@redhat.com>
3723
3724         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3725         unittests/common-utils-selftests.c.
3726         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
3727         (COMMON_OBS): Remove utils-selftests.o.
3728         * utils-selftests.c: Move to ...
3729         * unittests/common-utils-selftests.c: ... here and rename self
3730         test to "string_printf".
3731
3732 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
3733
3734         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
3735         having NULL cus or tus.
3736
3737 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3738
3739         * arm-tdep.c: (convert_from_extended): Remove.
3740         (convert_to_extended): Likewise.
3741         (arm_extract_return_value): Use convert_typed_floating.
3742         (arm_store_return_value): Likewise.
3743
3744         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3745         * sh-tdep.c: Do not include "floatformat.h".
3746         (sh_littlebyte_bigword_type): New function.
3747         (sh_register_convert_to_virtual): Use convert_typed_floating.
3748         (sh_register_convert_to_raw): Likewise.
3749         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3750         (sh64_littlebyte_bigword_type): New function.
3751         (sh64_extract_return_value): Use convert_typed_floating.
3752         (sh64_register_convert_to_virtual): Likewise.
3753         (sh64_register_convert_to_raw): Likewise.
3754
3755 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3756
3757         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
3758         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
3759
3760         * gdbtypes.h (union type_specific): Make field floatformat hold
3761         just a single struct floatformat, not an array.
3762         (floatformat_from_type): Move here.
3763         * gdbtypes.c (floatformat_from_type): Move here.  Update to
3764         changed TYPE_FLOATFORMAT definition.
3765         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
3766         (recursive_dump_type): Likewise.
3767         (init_float_type): Install correct floatformat for byte order.
3768         (arch_float_type): Likewise.
3769
3770 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3771
3772         * gdbtypes.c (init_type): Change incoming argument from
3773         length-in-bytes to length-in-bits.  Assert length is a
3774         multiple of TARGET_CHAR_BITS.
3775         (arch_type, arch_flags_type): Likewise.
3776         (init_integer_type): Update call to init_type.
3777         (init_character_type): Likewise.
3778         (init_boolean_type): Likewise.
3779         (init_float_type): Likewise.
3780         (init_decfloat_type): Likewise.
3781         (init_complex_type): Likewise.
3782         (init_pointer_type): Likewise.
3783         (objfile_type): Likewise.
3784         (arch_integer_type): Update call to arch_type.
3785         (arch_character_type): Likewise.
3786         (arch_boolean_type): Likewise.
3787         (arch_float_type): Likewise.
3788         (arch_decfloat_type): Likewise.
3789         (arch_complex_type): Likewise.
3790         (arch_pointer_type): Likewise.
3791         (gdbtypes_post_init): Likewise.
3792
3793         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
3794         (read_base_type): Likewise.
3795         * mdebugread.c (basic_type): Likewise.
3796         * stabsread.c (dbx_init_float_type): Likewise.
3797         (rs6000_builtin_type): Likewise.
3798         (read_range_type): Likewise.  Also, fix call to init_integer_type
3799         with erroneous length argument.
3800
3801         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
3802         * d-lang.c (build_d_types): Likewise.
3803         * f-lang.c (build_fortran_types): Likewise.
3804         * go-lang.c (build_go_types): Likewise.
3805         * opencl-lang.c (build_opencl_types): Likewise.
3806         * jit.c (finalize_symtab): Likewise.
3807         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
3808         (build_std_type_info_type): Likewise.
3809         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
3810         update call to arch_flags_type.
3811
3812         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
3813         arch_type.
3814         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
3815         * windows-tdep.c (windows_get_tlb_type): Likewise.
3816
3817         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
3818         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3819         * m32c-tdep.c (make_types): Likewise.
3820         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
3821         (rl78_psw_type): Update call to arch_flags_type.
3822         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
3823         * rx-tdep.c (rx_psw_type): Likewise.
3824         (rx_fpsw_type): Likewise.
3825         * sparc-tdep.c (sparc_psr_type): Likewise.
3826         (sparc_fsr_type): Likewise.
3827         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
3828         (sparc64_ccr_type): Likewise.
3829         (sparc64_fsr_type): Likewise.
3830         (sparc64_fprs_type): Likewise.
3831
3832 2017-09-27  Tom Tromey  <tom@tromey.com>
3833
3834         * findcmd.c (find_command): Constify.
3835
3836 2017-09-27  Tom Tromey  <tom@tromey.com>
3837
3838         * ada-tasks.c (task_command_1, task_command): Constify.
3839
3840 2017-09-27  Tom Tromey  <tom@tromey.com>
3841
3842         * symtab.c (maintenance_print_symbol_cache)
3843         (maintenance_flush_symbol_cache)
3844         (maintenance_print_symbol_cache_statistics): Constify.
3845
3846 2017-09-27  Tom Tromey  <tom@tromey.com>
3847
3848         * inferior.c (detach_inferior_command, kill_inferior_command)
3849         (inferior_command): Constify.
3850
3851 2017-09-27  Tom Tromey  <tom@tromey.com>
3852
3853         * regcache.c (regcache_print, maintenance_print_registers)
3854         (maintenance_print_raw_registers)
3855         (maintenance_print_cooked_registers)
3856         (maintenance_print_register_groups)
3857         (maintenance_print_remote_registers): Constify.
3858
3859 2017-09-27  Tom Tromey  <tom@tromey.com>
3860
3861         * printcmd.c (map_display_numbers, undisplay_command)
3862         (enable_disable_display_command, enable_display_command)
3863         (disable_display_command): Constify.
3864
3865 2017-09-27  Tom Tromey  <tom@tromey.com>
3866
3867         * breakpoint.h (delete_command): Don't declare.
3868         * breakpoint.c (delete_command, enable_once_command)
3869         (enable_count_command, enable_delete_command, breakpoint_1)
3870         (maintenance_info_breakpoints, stopin_command, stopat_command)
3871         (delete_command, delete_trace_command, save_breakpoints)
3872         (save_breakpoints_command, save_tracepoints_command): Constify.
3873
3874 2017-09-27  Tom Tromey  <tom@tromey.com>
3875
3876         * macrocmd.c (macro_expand_command, macro_expand_once_command)
3877         (skip_ws, extract_identifier, macro_define_command)
3878         (macro_undef_command, macro_list_command): Constify.
3879
3880 2017-09-27  Tom Tromey  <tom@tromey.com>
3881
3882         * infcmd.c (environment_info, set_environment_command)
3883         (unset_environment_command, path_info, info_proc_cmd_1)
3884         (info_proc_cmd_mappings, info_proc_cmd_stat)
3885         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
3886         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
3887
3888 2017-09-27  Tom Tromey  <tom@tromey.com>
3889
3890         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
3891         Constify.
3892
3893 2017-09-27  Tom Tromey  <tom@tromey.com>
3894
3895         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
3896
3897 2017-09-27  Tom Tromey  <tom@tromey.com>
3898
3899         * demangle.c (demangle_command): Constify.
3900
3901 2017-09-27  Tom Tromey  <tom@tromey.com>
3902
3903         * progspace.c (maintenance_info_program_spaces_command):
3904         Constify.
3905
3906 2017-09-27  Tom Tromey  <tom@tromey.com>
3907
3908         * compile/compile.c (check_raw_argument, compile_file_command)
3909         (compile_code_command, compile_print_command): Constify.
3910
3911 2017-09-27  Tom Tromey  <tom@tromey.com>
3912
3913         * reggroups.c (maintenance_print_reggroups): Constify.
3914
3915 2017-09-27  Tom Tromey  <tom@tromey.com>
3916
3917         * dwarf2read.c (save_gdb_index_command): Constify.
3918
3919 2017-09-27  Tom Tromey  <tom@tromey.com>
3920
3921         * stap-probe.c (info_probes_stap_command): Constify.
3922
3923 2017-09-27  Tom Tromey  <tom@tromey.com>
3924
3925         * fork-child.c (unset_exec_wrapper_command): Constify.
3926
3927 2017-09-27  Tom Tromey  <tom@tromey.com>
3928
3929         * btrace.c (get_uint, get_context_size, no_chunk)
3930         (maint_btrace_packet_history_cmd)
3931         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
3932         (maint_info_btrace_cmd): Constify.
3933
3934 2017-09-27  Tom Tromey  <tom@tromey.com>
3935
3936         * reverse.c (delete_bookmark_command): Constify.
3937
3938 2017-09-27  Tom Tromey  <tom@tromey.com>
3939
3940         * remote.c (set_memory_packet_size)
3941         (set_memory_write_packet_size, show_memory_write_packet_size)
3942         (set_memory_read_packet_size, show_memory_read_packet_size)
3943         (compare_sections_command, packet_command, remote_put_command)
3944         (remote_get_command, remote_delete_command): Constify.
3945
3946 2017-09-27  Tom Tromey  <tom@tromey.com>
3947
3948         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
3949         (set_mipsfpu_double_command, set_mipsfpu_none_command)
3950         (set_mipsfpu_auto_command): Constify.
3951
3952 2017-09-27  Tom Tromey  <tom@tromey.com>
3953
3954         * cli/cli-cmds.h (cd_command): Constify.
3955         * cli/cli-cmds.c (cd_command): Constify.
3956
3957 2017-09-27  Tom Tromey  <tom@tromey.com>
3958
3959         * thread.c (thread_name_command, thread_find_command): Constify.
3960
3961 2017-09-27  Tom Tromey  <tom@tromey.com>
3962
3963         * probe.c (enable_probes_command, disable_probes_command):
3964         Constify.
3965
3966 2017-09-27  Tom Tromey  <tom@tromey.com>
3967
3968         * symfile.c (symbol_file_command): Constify.
3969         * gdbcore.h (deprecated_file_changed_hook): Constify.
3970         * exec.c (deprecated_file_changed_hook, exec_file_command)
3971         (file_command): Constify.
3972         * defs.h (symbol_file_command): Constify.
3973
3974 2017-09-27  Tom Tromey  <tom@tromey.com>
3975
3976         * remote-fileio.c (set_system_call_allowed)
3977         (show_system_call_allowed): Constify.
3978
3979 2017-09-27  Tom Tromey  <tom@tromey.com>
3980
3981         * tracepoint.c (delete_trace_variable_command)
3982         (tfind_end_command, tfind_start_command, tfind_pc_command)
3983         (tfind_tracepoint_command, tfind_line_command)
3984         (tfind_range_command, tfind_outside_command): Constify.
3985
3986 2017-09-27  Tom Tromey  <tom@tromey.com>
3987
3988         * ax-gdb.c (maint_agent_printf_command, agent_command)
3989         (agent_eval_command): Constify.
3990
3991 2017-09-27  Tom Tromey  <tom@tromey.com>
3992
3993         * tracepoint.c (info_scope_command): Constify.
3994         * python/python.c (gdbpy_decode_line): Constify.
3995         * python/py-breakpoint.c (bppy_init): Constify.
3996         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
3997         * location.h: (new_linespec_location)
3998         (string_to_event_location_basic, string_to_event_location):
3999         Constify.
4000         * location.c (new_linespec_location)
4001         (string_to_event_location_basic, string_to_event_location):
4002         Constify.
4003         * linespec.h (decode_line_with_current_source)
4004         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4005         * linespec.c (linespec_lex_to_end)
4006         (decode_line_with_current_source)
4007         (decode_line_with_last_displayed): Constify.
4008         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4009         Constify.
4010         * cli/cli-cmds.c (edit_command, list_command): Constify.
4011         * breakpoint.h (until_break_command, watch_command_wrapper)
4012         (awatch_command_wrapper, rwatch_command_wrapper)
4013         (init_ada_exception_breakpoint): Constify.
4014         * breakpoint.c (break_command_1, dprintf_command)
4015         (break_range_command, watch_command_wrapper)
4016         (rwatch_command_wrapper, awatch_command_wrapper)
4017         (until_break_command, init_ada_exception_breakpoint)
4018         (strace_marker_create_sals_from_location, trace_command)
4019         (ftrace_command, strace_command, struct tracepoint): Constify.
4020         * ax-gdb.c (agent_command_1): Constify.
4021         * ada-lang.c (ada_exception_sal): Constify.
4022
4023 2017-09-27  Tom Tromey  <tom@tromey.com>
4024
4025         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4026         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4027         (get_context_size, no_chunk, get_insn_history_modifiers)
4028         (cmd_record_insn_history, get_call_history_modifiers)
4029         (cmd_record_call_history): Constify.
4030
4031 2017-09-27  Tom Tromey  <tom@tromey.com>
4032
4033         * source.c (show_substitute_path_command)
4034         (unset_substitute_path_command, set_substitute_path_command):
4035         Constify.
4036
4037 2017-09-27  Tom Tromey  <tom@tromey.com>
4038
4039         * typeprint.c (maintenance_print_type): Constify.
4040         * maint.c (maintenance_dump_me, maintenance_demangle)
4041         (maintenance_time_display, maintenance_info_sections)
4042         (maintenance_print_statistics, maintenance_deprecate)
4043         (maintenance_undeprecate): Constify.
4044         (maintenance_do_deprecate): Constify.  Use std::string.
4045         (maintenance_selftest): Constify.
4046         * gdbtypes.h (maintenance_print_type): Constify.
4047
4048 2017-09-27  Tom Tromey  <tom@tromey.com>
4049
4050         * hppa-tdep.c (unwind_command): Constify.
4051
4052 2017-09-27  Tom Tromey  <tom@tromey.com>
4053
4054         * target-descriptions.c (unset_tdesc_filename_cmd)
4055         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4056         Constify.
4057
4058 2017-09-27  Tom Tromey  <tom@tromey.com>
4059
4060         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4061
4062 2017-09-27  Tom Tromey  <tom@tromey.com>
4063
4064         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4065
4066 2017-09-27  Tom Tromey  <tom@tromey.com>
4067
4068         * tui/tui-regs.c (tui_reg_command): Constify.
4069
4070 2017-09-27  Tom Tromey  <tom@tromey.com>
4071
4072         * skip.c (skip_file_command, skip_function_command)
4073         (skip_enable_command, skip_disable_command, skip_delete_command):
4074         Constify.
4075
4076 2017-09-27  Tom Tromey  <tom@tromey.com>
4077
4078         * record-btrace.c (cmd_record_btrace_bts_start)
4079         (cmd_record_btrace_pt_start): Constify.
4080
4081 2017-09-27  Tom Tromey  <tom@tromey.com>
4082
4083         * symmisc.c (maintenance_print_symbols)
4084         (maintenance_print_msymbols, maintenance_print_objfiles)
4085         (maintenance_info_symtabs, maintenance_check_symtabs)
4086         (maintenance_expand_symtabs, maintenance_info_line_tables):
4087         Constify.
4088
4089 2017-09-27  Tom Tromey  <tom@tromey.com>
4090
4091         * top.c (new_ui_command): Constify.
4092
4093 2017-09-27  Tom Tromey  <tom@tromey.com>
4094
4095         * symfile.c (add_symbol_file_command)
4096         (remove_symbol_file_command, list_overlays_command)
4097         (map_overlay_command, unmap_overlay_command)
4098         (overlay_auto_command, overlay_manual_command)
4099         (overlay_off_command, overlay_load_command): Constify.
4100
4101 2017-09-27  Tom Tromey  <tom@tromey.com>
4102
4103         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4104         (info_spu_mailbox_command, info_spu_dma_command)
4105         (info_spu_proxydma_command): Constify.
4106
4107 2017-09-27  Tom Tromey  <tom@tromey.com>
4108
4109         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4110
4111 2017-09-27  Tom Tromey  <tom@tromey.com>
4112
4113         * cli/cli-script.c (user_defined_command): Constify.
4114
4115 2017-09-27  Tom Tromey  <tom@tromey.com>
4116
4117         * cli/cli-dump.c (dump_memory_command, dump_value_command)
4118         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4119         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4120         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4121         (dump_binary_value, append_binary_memory, append_binary_value):
4122         Constify.
4123         (struct dump_context) <func>: Constify.
4124         (add_dump_command): Update.
4125
4126 2017-09-27  Tom Tromey  <tom@tromey.com>
4127
4128         * cli/cli-cmds.c (show_version, show_configuration)
4129         (source_command, show_user): Constify.
4130
4131 2017-09-27  Tom Tromey  <tom@tromey.com>
4132
4133         * target.c (maintenance_print_target_stack): Constify.
4134
4135 2017-09-27  Tom Tromey  <tom@tromey.com>
4136
4137         * interps.c (interpreter_exec_cmd): Constify.
4138
4139 2017-09-27  Tom Tromey  <tom@tromey.com>
4140
4141         * record-full.c (cmd_record_full_restore): Constify.
4142
4143 2017-09-27  Tom Tromey  <tom@tromey.com>
4144
4145         * memattr.c (enable_mem_command, disable_mem_command)
4146         (delete_mem_command): Constify.
4147
4148 2017-09-27  Tom Tromey  <tom@tromey.com>
4149
4150         * value.c (show_convenience): Constify.
4151
4152 2017-09-27  Tom Tromey  <tom@tromey.com>
4153
4154         * gdbcore.h (core_file_command): Update.
4155         * corefile.c (core_file_command): Constify.
4156
4157 2017-09-27  Tom Tromey  <tom@tromey.com>
4158
4159         * user-regs.c (maintenance_print_user_registers): Constify.
4160
4161 2017-09-27  Tom Tromey  <tom@tromey.com>
4162
4163         * cp-namespace.c (maintenance_cplus_namespace): Constify.
4164
4165 2017-09-27  Tom Tromey  <tom@tromey.com>
4166
4167         * cp-support.c (first_component_command): Constify.
4168
4169 2017-09-27  Tom Tromey  <tom@tromey.com>
4170
4171         * psymtab.c (maintenance_print_psymbols)
4172         (maintenance_info_psymtabs, maintenance_check_psymtabs):
4173         Constify.
4174
4175 2017-09-27  Tom Tromey  <tom@tromey.com>
4176
4177         * windows-tdep.c (display_tib): Constify.
4178
4179 2017-09-27  Tom Tromey  <tom@tromey.com>
4180
4181         * linux-fork.c (delete_checkpoint_command)
4182         (detach_checkpoint_command): Constify.
4183
4184 2017-09-27  Tom Tromey  <tom@tromey.com>
4185
4186         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4187
4188 2017-09-27  Tom Tromey  <tom@tromey.com>
4189
4190         * arc-tdep.c (dump_arc_instruction_command): Constify.
4191
4192 2017-09-27  Tom Tromey  <tom@tromey.com>
4193
4194         * valprint.c (set_radix, show_radix): Constify.
4195
4196 2017-09-27  Tom Tromey  <tom@tromey.com>
4197
4198         * dtrace-probe.c (info_probes_dtrace_command): Constify.
4199
4200 2017-09-27  Tom Tromey  <tom@tromey.com>
4201
4202         * command.h (not_just_help_class_command): Update.
4203         * cli/cli-decode.h (not_just_help_class_command): Update.
4204         * cli/cli-decode.c (not_just_help_class_command): Constify.
4205
4206 2017-09-27  Tom Tromey  <tom@tromey.com>
4207
4208         * gdb_bfd.c (maintenance_info_bfds): Constify.
4209
4210 2017-09-27  Tom Tromey  <tom@tromey.com>
4211
4212         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4213         overloads.
4214         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
4215         (do_const_cfunc): New function.
4216         (cmd_cfunc_eq): New overload.
4217         (cli_user_command_p): Check do_const_cfunc.
4218         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4219         const_cfunc.
4220         * command.h (add_cmd): Add const overload and no-function
4221         overload.
4222         (set_cmd_cfunc): Add const overload.
4223         (cmd_const_cfunc_ftype): Declare.
4224         (cmd_cfunc_eq): Add const overload.
4225         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4226         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4227         overload.
4228
4229 2017-09-27  Tom Tromey  <tom@tromey.com>
4230
4231         * macroexp.c (get_next_token_for_substitution): New function.
4232         (substitute_args): Call it.  Check for __VA_OPT__.
4233
4234 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4235             Pedro Alves <palves@redhat.com>
4236
4237         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4238         producer_is_icc_lt_14.
4239         (producer_is_icc_lt_14): New function.
4240         (check_producer): Add code for checking version of ICC.
4241         (producer_is_icc): Move to producer.c.
4242         (read_structure_type): Restrict ICC workaround to ICC<14.
4243         * producer.c: Include selftest.h.
4244         (producer_is_icc, producer_parsing_tests, _initialize_producer):
4245         New functions.
4246         * producer.h (producer_is_icc): New declaration.
4247
4248 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4249
4250         * Makefile.in (SFILES): Add producer.c.
4251         (COMMON_OBS): Add producer.o
4252         * amd64-tdep.c (producer.h): Add new include.
4253         * dwarf2read.c (producer.h): Add new include.
4254         * producer.c: New file.
4255         * producer.h: New file.
4256         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4257         producer.c.
4258         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4259         producer.h.
4260
4261 2017-09-26  Matthias Klose  <doko@ubuntu.com>
4262
4263         * configure.ac: Search ncursesw before ncurses.
4264         Check ncursesw/ncurses.h before ncurses/ncurses.h.
4265         * gdb_curses.h: Include <ncursesw/ncurses.h>
4266         * config.in, configure: Regenerate.
4267
4268 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4269
4270         PR gdb/22185
4271         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4272         obsolete.
4273         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4274         Remove i386sol2 support.
4275         * configure.nat <i386sol2>: Remove.
4276         <sol2-64>: Fold into ...
4277         <sol2>: ... this.
4278         Move common settings to default section.
4279         Add sol-thread.o.
4280         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4281         x86_64-*-solaris2.1[0-9]*>: Rename to ...
4282         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4283         <i[34567]86-*-solaris*>: Remove.
4284         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4285
4286         * configure.ac: Remove wctype in libw check.
4287         (_MSE_INT_H): Don't define on Solaris 7-9.
4288         <solaris*>: Remove libthread_db.so.1 check.
4289         * configure: Regenerate.
4290         * config.in: Regenerate.
4291
4292         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4293         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4294         (gdb_ps_size_t): Remove.
4295         Use base types in users.
4296         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4297
4298         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4299
4300 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4301
4302         PR build/22206
4303         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4304         (adi_is_addr_mapped): Likewise.
4305         (PSR_ICC): Don't redefine.
4306         (PSR_IMPL): Likewise.
4307
4308 2017-09-25  Tom Tromey  <tom@tromey.com>
4309
4310         * regcache.c (regcache::dump): Use string_printf.
4311
4312 2017-09-25  Tom Tromey  <tom@tromey.com>
4313
4314         * regcache.c (class regcache_invalidator): New.
4315         (struct register_to_invalidate): Remove.
4316         (make_cleanup_regcache_invalidate): Remove.
4317         (regcache::raw_write): Use regcache_invalidator.
4318
4319 2017-09-25  Tom Tromey  <tom@tromey.com>
4320
4321         * spu-tdep.c (spu2ppu_sniffer): Update.
4322         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4323         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4324         Remove.
4325         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4326         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4327         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4328         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4329         (frame_pop): Update.
4330
4331 2017-09-25  Tom Tromey  <tom@tromey.com>
4332
4333         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4334         * regcache.h (regcache_xfree): Don't declare.
4335         * regcache.c (regcache_xfree): Remove.
4336         (do_regcache_xfree): Use delete.
4337         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4338         * linux-fork.c (free_fork): Use delete.
4339         (fork_save_infrun_state): Likewise.
4340         * jit.c (jit_dealloc_cache): Use delete.
4341         * infrun.c (discard_infcall_suspend_state): Use delete.
4342
4343 2017-09-25  Tom Tromey  <tom@tromey.com>
4344
4345         * regcache.h (regcache_xmalloc): Don't declare.
4346         (regcache_raw_set_cached_value): Update comment.
4347         * regcache.c (regcache_xmalloc): Remove.
4348         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4349         * jit.c (jit_frame_sniffer): Use new.
4350         * frame.c (frame_save_as_regcache): Use new.
4351
4352 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4353
4354         * NEWS: Advertise support for guarded-storage registers on IBM z.
4355
4356 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4357
4358         * s390-linux-nat.c (have_regset_gs): New static variable.
4359         (s390_linux_fetch_inferior_registers): Handle guarded-storage
4360         control block and guarded-storage broadcast control regsets.
4361         (s390_read_description): Detect whether the target has
4362         guarded-storage support, return appropriate tdesc.
4363         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4364         (features/s390x-gs-linux64.c): Likewise.
4365         (struct gdbarch_tdep) <have_gs>: New field.
4366         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4367         (s390_gsbc_regset): New variables.
4368         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4369         and s390_gsbc_regset, if applicable.
4370         (s390_core_read_description): Check whether core file was from a
4371         target with guarded-storage support; include appropriate regsets.
4372         (s390_gdbarch_init): Add registers for guarded-storage support.
4373         (_initialize_s390_tdep): Initialize new target descriptions that
4374         include registers for guarded-storage support.
4375         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4376         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4377         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4378         (S390_NUM_REGS): Adjust macro definition.
4379         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4380         (tdesc_s390x_gs_linux64): New declarations.
4381
4382 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4383
4384         * features/s390-gs-linux64.xml: New file.
4385         * features/s390-gs.xml: New file.
4386         * features/s390-gsbc.xml: New file.
4387         * features/s390x-gs-linux64.xml: New file.
4388         * features/Makefile (WHICH): Add s390-gs-linux64 and
4389         s390x-gs-linux64.
4390         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4391         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4392         * features/s390-gs-linux64.c: New generated file.
4393         * features/s390x-gs-linux64.c: New file.
4394         * regformats/s390-gs-linux64.dat: New file.
4395         * regformats/s390x-gs-linux64.dat: New file.
4396
4397 2017-09-23  Tom Tromey  <tom@tromey.com>
4398
4399         * defs.h (make_cleanup_override_quit_handler): Don't declare.
4400
4401 2017-09-22  Tom Tromey  <tom@tromey.com>
4402
4403         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4404         type to scoped_restore_tmpl.
4405         <scoped_input_handler>: Initialize m_quit_handler directly.
4406
4407 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4408
4409         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4410         (cd_command): Likewise.  Free "current_directory" before
4411         assigning to it.
4412         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4413         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4414         * top.c (gdb_dirbuf): Remove global declaration.
4415         * top.h (gdb_dirbuf): Likewise.
4416
4417 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4418
4419         * gnulib/aclocal.m4: Regenerate.
4420         * gnulib/config.in: Regenerate.
4421         * gnulib/configure: Regenerate.
4422         * gnulib/import/Makefile.am: Regenerate.
4423         * gnulib/import/Makefile.in: Regenerate.
4424         * gnulib/import/assure.h: New file.
4425         * gnulib/import/at-func.c: Likewise
4426         * gnulib/import/chdir-long.c: New file.
4427         * gnulib/import/chdir-long.h: New file.
4428         * gnulib/import/cloexec.c: New file.
4429         * gnulib/import/cloexec.h: New file.
4430         * gnulib/import/close.c: New file.
4431         * gnulib/import/closedir.c: New file.
4432         * gnulib/import/dirent-private.h: New file.
4433         * gnulib/import/dup-safer.c: New file.
4434         * gnulib/import/dup.c: New file.
4435         * gnulib/import/dup2.c: New file.
4436         * gnulib/import/error.c: New file.
4437         * gnulib/import/error.h: New file.
4438         * gnulib/import/exitfail.c: New file.
4439         * gnulib/import/exitfail.h: New file.
4440         * gnulib/import/fchdir.c: New file.
4441         * gnulib/import/fcntl.c: New file.
4442         * gnulib/import/fcntl.in.h: New file.
4443         * gnulib/import/fd-hook.c: New file.
4444         * gnulib/import/fd-hook.h: New file.
4445         * gnulib/import/fd-safer.c: New file.
4446         * gnulib/import/fdopendir.c: New file.
4447         * gnulib/import/filename.h: New file.
4448         * gnulib/import/filenamecat-lgpl.c: New file.
4449         * gnulib/import/filenamecat.h: New file.
4450         * gnulib/import/fstat.c: New file.
4451         * gnulib/import/fstatat.c: New file.
4452         * gnulib/import/getcwd-lgpl.c: New file.
4453         * gnulib/import/getcwd.c: New file.
4454         * gnulib/import/getdtablesize.c: New file.
4455         * gnulib/import/getlogin_r.c: New file.
4456         * gnulib/import/getprogname.c: New file.
4457         * gnulib/import/getprogname.h: New file.
4458         * gnulib/import/gettext.h: New file.
4459         * gnulib/import/glob-libc.h: New file.
4460         * gnulib/import/glob.c: New file.
4461         * gnulib/import/glob.in.h: New file.
4462         * gnulib/import/intprops.h: New file.
4463         * gnulib/import/m4/chdir-long.m4: New file.
4464         * gnulib/import/m4/close.m4: New file.
4465         * gnulib/import/m4/closedir.m4: New file.
4466         * gnulib/import/m4/d-ino.m4: New file.
4467         * gnulib/import/m4/d-type.m4: New file.
4468         * gnulib/import/m4/dup.m4: New file.
4469         * gnulib/import/m4/dup2.m4: New file.
4470         * gnulib/import/m4/error.m4: New file.
4471         * gnulib/import/m4/fchdir.m4: New file.
4472         * gnulib/import/m4/fcntl.m4: New file.
4473         * gnulib/import/m4/fcntl_h.m4: New file.
4474         * gnulib/import/m4/fdopendir.m4: New file.
4475         * gnulib/import/m4/filenamecat.m4: New file.
4476         * gnulib/import/m4/fstat.m4: New file.
4477         * gnulib/import/m4/fstatat.m4: New file.
4478         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4479         * gnulib/import/m4/getcwd-path-max.m4: New file.
4480         * gnulib/import/m4/getcwd.m4: New file.
4481         * gnulib/import/m4/getdtablesize.m4: New file.
4482         * gnulib/import/m4/getlogin_r.m4: New file.
4483         * gnulib/import/m4/getprogname.m4: New file.
4484         * gnulib/import/m4/glob.m4: New file.
4485         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4486         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4487         * gnulib/import/m4/mempcpy.m4: New file.
4488         * gnulib/import/m4/memrchr.m4: New file.
4489         * gnulib/import/m4/mode_t.m4: New file.
4490         * gnulib/import/m4/msvc-inval.m4: New file.
4491         * gnulib/import/m4/msvc-nothrow.m4: New file.
4492         * gnulib/import/m4/open.m4: New file.
4493         * gnulib/import/m4/openat.m4: New file.
4494         * gnulib/import/m4/opendir.m4: New file.
4495         * gnulib/import/m4/readdir.m4: New file.
4496         * gnulib/import/m4/realloc.m4: New file.
4497         * gnulib/import/m4/rewinddir.m4: New file.
4498         * gnulib/import/m4/save-cwd.m4: New file.
4499         * gnulib/import/m4/strdup.m4: New file.
4500         * gnulib/import/m4/strerror.m4: New file.
4501         * gnulib/import/m4/unistd-safer.m4: New file.
4502         * gnulib/import/mempcpy.c: New file.
4503         * gnulib/import/memrchr.c: New file.
4504         * gnulib/import/msvc-inval.c: New file.
4505         * gnulib/import/msvc-inval.h: New file.
4506         * gnulib/import/msvc-nothrow.c: New file.
4507         * gnulib/import/msvc-nothrow.h: New file.
4508         * gnulib/import/open.c: New file.
4509         * gnulib/import/openat-die.c: New file.
4510         * gnulib/import/openat-priv.h: New file.
4511         * gnulib/import/openat-proc.c: New file.
4512         * gnulib/import/openat.c: New file.
4513         * gnulib/import/openat.h: New file.
4514         * gnulib/import/opendir.c: New file.
4515         * gnulib/import/pipe-safer.c: New file.
4516         * gnulib/import/readdir.c: New file.
4517         * gnulib/import/realloc.c: New file.
4518         * gnulib/import/rewinddir.c: New file.
4519         * gnulib/import/save-cwd.c: New file.
4520         * gnulib/import/save-cwd.h: New file.
4521         * gnulib/import/strdup.c: New file.
4522         * gnulib/import/strerror-override.c: New file.
4523         * gnulib/import/strerror-override.h: New file.
4524         * gnulib/import/strerror.c: New file.
4525         * gnulib/import/unistd--.h: New file.
4526         * gnulib/import/unistd-safer.h: New file.
4527         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4528         "getcwd" and "glob".
4529         * ser-tcp.c: Undefine "close" before redefining it.
4530
4531 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4532
4533         * guile/scm-value.c (gdbscm_value_address): Initialize address,
4534         get rid of res_val.
4535
4536 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4537
4538         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4539         <sol2,sparc>: Likewise.
4540         <sol2-64,i386>: Likewise.
4541
4542         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4543         -Wdeprecated-declarations on *-*-solaris*.
4544         * configure: Regenerate.
4545
4546         * procfs.c: Include "nat/inferior.h".
4547         (procfs_info_proc): Fix typo.
4548
4549 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4550
4551         * remote.c (vector): Include.
4552         (struct private_thread_info): Add field, thread_handle.
4553         (free_private_thread_info): Deallocate storage associated with
4554         thread handle.
4555         (get_private_info_thread): Initialize `thread_handle' field.
4556         (struct thread_item): Add field, thread_handle.
4557         (clear_threads_listing_context): Deallocate storage associated
4558         with thread handle.
4559         (start_thread): Add support for "handle" attribute.
4560         (thread_attributes): Add "handle".
4561         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4562         field.
4563         (remote_update_thread_list): Update thread_handle.
4564         (remote_thread_handle_to_thread_info): New function.
4565         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4566
4567 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4568
4569         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4570         function.
4571         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4572         * python/python-internal.h (thread_object_type): Declare.
4573
4574 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4575
4576         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4577         (target_thread_handle_to_thread_info): Declare.
4578         * target.c (target_thread_handle_to_thread_info): New function.
4579         * target-delegates.c: Regenerate.
4580         * gdbthread.h (find_thread_by_handle): Declare.
4581         * thread.c (find_thread_by_handle): New function.
4582         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4583         function.
4584         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4585
4586 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4587
4588         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4589
4590 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4591
4592         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4593
4594 2017-09-21  Yao Qi  <yao.qi@linaro.org>
4595
4596         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4597         to gdb_target_obs.
4598
4599 2017-09-20  Tom Tromey  <tom@tromey.com>
4600
4601         * breakpoint.c (struct counted_command_line): Remove.
4602         (breakpoint_commands): Update.
4603         (alloc_counted_command_line, incref_counted_command_line)
4604         (decref_counted_command_line, do_cleanup_counted_command_line)
4605         (make_cleanup_decref_counted_command_line): Remove.
4606         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4607         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4608         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4609         (save_breakpoints): Update.
4610         * breakpoint.h (counted_command_line): Now a typedef to
4611         shared_ptr.
4612         (struct breakpoint) <commands>: Now a counted_command_line.
4613         (struct bpstats) <command>: Likewise.
4614
4615 2017-09-20  Tom Tromey  <tom@tromey.com>
4616
4617         * breakpoint.c (struct commands_info, do_map_commands_command):
4618         Remove.
4619         (commands_command_1): Update.
4620         (iterate_over_related_breakpoints): Take a function_view.
4621         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4622         (delete_command): Update.
4623         (map_breakpoint_numbers): Take a function_view.
4624         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4625         (disable_command): Update.
4626         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4627         (enable_command): Update.
4628         (struct disp_data, do_enable_breakpoint_disp)
4629         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4630         (do_map_enable_delete_breakpoint): Remove.
4631         (enable_once_command, enable_count_command, enable_delete_command)
4632         (delete_trace_variable_command): Update.
4633
4634 2017-09-20  Tom Tromey  <tom@tromey.com>
4635
4636         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
4637         (bpstat_clear): Use delete.
4638         (bpstats): New constructors.
4639         (bpstat_copy, bpstat_stop_status): Use new.
4640         (dprintf_after_condition_true): Update.
4641         * breakpoint.h (bpstats::bpstats): Add constructors.
4642         (bpstats::~bpstats): Add destructor.
4643
4644 2017-09-20  Pedro Alves  <palves@redhat.com>
4645
4646         * eval.c (make_params): Delete, refactored as ...
4647         (class fake_method): ... this new type's ctor.
4648         (fake_method::~fake_method): New.
4649         (evaluate_subexp_standard): Use 'fake_method'.
4650
4651 2017-09-20  Tom Tromey  <tom@tromey.com>
4652
4653         * windows-nat.c (get_windows_debug_event, windows_wait)
4654         (do_initial_windows_stuff, windows_attach): Update.
4655         * utils.c (vwarning, internal_vproblem): Update.
4656         (ui_unregister_input_event_handler_cleanup)
4657         (prepare_to_handle_input): Remove.
4658         (class scoped_input_handler): New.
4659         (defaulted_query, prompt_for_continue): Update.
4660         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4661         Update.
4662         * top.c (undo_terminal_modifications_before_exit): Update.
4663         * target/target.h (target_terminal_init, target_terminal_inferior)
4664         (target_terminal_ours): Don't declare.
4665         (class target_terminal): New.
4666         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4667         (target_terminal_ours_for_output)
4668         (make_cleanup_restore_target_terminal): Don't declare.
4669         (target_terminal_info): Remove.
4670         * target.c (enum terminal_state, terminal_state): Remove.
4671         (target_terminal::terminal_state): Define.
4672         (target_terminal::init): Rename from target_terminal_init.
4673         (target_terminal::inferior): Rename from
4674         target_terminal_inferior.
4675         (target_terminal::ours): Rename from target_terminal_ours.
4676         (target_terminal::ours_for_output): Rename from
4677         target_terminal_ours_for_output.
4678         (target_terminal::info): New method.
4679         (cleanup_restore_target_terminal)
4680         (make_cleanup_restore_target_terminal): Remove.
4681         * solib.c (handle_solib_event): Update.
4682         * remote.c (remote_serial_quit_handler): Update.
4683         (remote_terminal_inferior, remote_wait_as): Update.
4684         * record-full.c (record_full_wait_1): Update.
4685         * nto-procfs.c (procfs_create_inferior): Update.
4686         * nat/fork-inferior.c (startup_inferior): Update.
4687         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4688         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4689         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4690         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4691         (mi_breakpoint_created, mi_breakpoint_deleted)
4692         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4693         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4694         (mi_user_selected_context_changed, report_initial_inferior):
4695         Update.
4696         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4697         (linux_nat_terminal_inferior): Update.
4698         * infrun.c (follow_fork_inferior)
4699         (handle_vfork_child_exec_or_exit, do_target_resume)
4700         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4701         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4702         Update.
4703         * inflow.c (child_terminal_init, info_terminal_command): Update.
4704         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4705         (attach_command): Update.
4706         * infcall.c (call_thread_fsm_should_stop): Update.
4707         * gnu-nat.c (gnu_attach): Update.
4708         * extension.c (struct active_ext_lang_state)
4709         (restore_active_ext_lang): Update.
4710         * exceptions.c (print_flush): Update.
4711         * event-top.c (async_enable_stdin, default_quit_handler): Update.
4712         (struct quit_handler_cleanup_data, restore_quit_handler)
4713         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4714         Remove.
4715         * cp-support.c (gdb_demangle): Update.
4716         * breakpoint.c (update_inserted_breakpoint_locations)
4717         (insert_breakpoint_locations, handle_jit_event)
4718         (disable_breakpoints_in_unloaded_shlib): Update.
4719         * annotate.c (annotate_breakpoints_invalid)
4720         (annotate_frames_invalid): Update.
4721
4722 2017-09-20  Tom Tromey  <tom@tromey.com>
4723
4724         * main.c (catch_command_errors): Rename from
4725         catch_command_errors_const.
4726         (captured_main_1): Update.
4727
4728 2017-09-20  Pedro Alves  <palves@redhat.com>
4729
4730         * cli/cli-cmds.c (list_command): Use print_sal_location.
4731         (print_sal_location): New function.
4732         (ambiguous_line_spec): Use print_sal_location.
4733         * linespec.c (symbol_to_sal): Record the symbol in the sal.
4734         * symtab.c (find_function_start_sal): Likewise.
4735         * symtab.h (symtab_and_line::symbol): New field.
4736
4737 2017-09-20  Pedro Alves  <palves@redhat.com>
4738
4739         * linespec.c (minsym_found): Handle non-text minsyms.
4740         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
4741
4742 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4743
4744         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
4745         backslash.
4746
4747 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4748
4749         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
4750         vmovups instead vmovaps.
4751         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
4752
4753 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
4754
4755         * NEWS (Changes since GDB 8.0): Add starti.
4756         * infcmd.c (enum run_break): New.
4757         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
4758         case.
4759         (run_command): Use enum run_how.
4760         (start_command): Likewise.
4761         (starti_command): New function.
4762         (RUN_ARGS_HELP): New macro.
4763         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
4764         commands.  Add starti command.
4765
4766 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4767
4768         * Makefile.in (monitor.o): Remove the rule.
4769
4770 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4771
4772         * annotate.h (struct annotate_arg_emitter): Use
4773         DISABLE_COPY_AND_ASSIGN.
4774         * common/refcounted-object.h (refcounted_object): Likewise.
4775         * completer.h (struct completion_result): Likewise.
4776         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
4777         * filename-seen-cache.h (filename_seen_cache): Likewise.
4778         * gdbcore.h (thread_section_name): Likewise.
4779         * gdb_regex.h (compiled_regex): Likewise.
4780         * gdbthread.h (scoped_restore_current_thread): Likewise.
4781         * inferior.h (scoped_restore_current_inferior): Likewise.
4782         * jit.c (jit_reader): Likewise.
4783         * linespec.h (struct linespec_result): Likewise.
4784         * mi/mi-parse.h (struct mi_parse): Likewise.
4785         * nat/fork-inferior.c (execv_argv): Likewise.
4786         * progspace.h (scoped_restore_current_program_space): Likewise.
4787         * python/python-internal.h (class gdbpy_enter): Likewise.
4788         * regcache.h (regcache): Likewise.
4789         * target-descriptions.c (struct tdesc_reg): Likewise.
4790         (struct tdesc_type): Likewise.
4791         (struct tdesc_feature): Likewise.
4792         * ui-out.h (ui_out_emit_type): Likewise.
4793
4794 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
4795
4796         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
4797         label abort_expression.
4798
4799 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4800
4801         * common/buffer.c (buffer_xml_printf): Adjust.
4802         * common/xml-utils.c (xml_escape_text): Change return type to
4803         std::string, update code accordingly.
4804         * common/xml-utils.h (xml_escape_text): Change return type to
4805         std::string.
4806         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
4807         * windows-tdep.c (windows_xfer_shared_library): Adjust.
4808         * unittests/xml-utils-selftests.c (test_xml_escape_text):
4809         Adjust.
4810
4811 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4812
4813         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
4814         (SUBDIR_UNITTESTS_OBS): Add new object file.
4815         * unittests/xml-utils-selftests.c: New file.
4816
4817 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4818
4819         * common/selftest.h (selftest): New struct/interface.
4820         (register_test): Add name parameter, add new overload.
4821         (run_tests): Add filter parameter.
4822         (for_each_selftest_ftype): New typedef.
4823         (for_each_selftest): New declaration.
4824         * common/selftest.c (tests): Change type to
4825         map<string, unique_ptr<selftest>>.
4826         (simple_selftest): New struct.
4827         (register_test): New function.
4828         (register_test): Add name parameter and use it.
4829         (run_tests): Add filter parameter and use it.  Add prints.
4830         Adjust to vector -> map change.
4831         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
4832         registering selftests.
4833         * arm-tdep.c (_initialize_arm_tdep): Likewise.
4834         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
4835         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
4836         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
4837         * findvar.c (_initialize_findvar): Likewise.
4838         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
4839         * maint.c (maintenance_selftest): Update call to run_tests.
4840         (maintenance_info_selftests): New function.
4841         (_initialize_maint_cmds): Register "maintenance info selftests"
4842         command.  Update "maintenance selftest" doc.
4843         * regcache.c (_initialize_regcache): Add names when registering
4844         selftests.
4845         * rust-exp.y (_initialize_rust_exp): Likewise.
4846         * selftest-arch.c (gdbarch_selftest): New struct.
4847         (gdbarch_tests): Remove.
4848         (register_test_foreach_arch): Add name parameter.  Call
4849         register_test.
4850         (tests_with_arch): Remove, move most content to
4851         gdbarch_selftest::operator().
4852         (_initialize_selftests_foreach_arch): Remove.
4853         * selftest-arch.h (register_test_foreach_arch): Add name
4854         parameter.
4855         (run_tests_with_arch): New declaration.
4856         * utils-selftests.c (_initialize_utils_selftests): Add names
4857         when registering selftests.
4858         * utils.c (_initialize_utils): Likewise.
4859         * unittests/array-view-selftests.c
4860         (_initialize_array_view_selftests): Likewise.
4861         * unittests/environ-selftests.c (_initialize_environ_selftests):
4862         Likewise.
4863         * unittests/function-view-selftests.c
4864         (_initialize_function_view_selftests): Likewise.
4865         * unittests/offset-type-selftests.c
4866         (_initialize_offset_type_selftests): Likewise.
4867         * unittests/optional-selftests.c
4868         (_initialize_optional_selftests): Likewise.
4869         * unittests/scoped_restore-selftests.c
4870         (_initialize_scoped_restore_selftests): Likewise.
4871         * NEWS: Document "maintenance selftest" and "maint info
4872         selftests".
4873
4874 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4875
4876         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
4877         scoped_restore.
4878
4879 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4880
4881         * mi/mi-main.c (mi_load_progress): Make uiout variable
4882         a unique_ptr.
4883
4884 2017-09-15  Pedro Alves  <palves@redhat.com>
4885
4886         * compile/compile-c-types.c (convert_enum, convert_int)
4887         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
4888
4889 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
4890
4891         * dwarf2read.c (copy_string): Remove.
4892         (parse_macro_definition): Replace copy_string with savestring.
4893
4894 2017-09-15  Yao Qi  <yao.qi@linaro.org>
4895
4896         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
4897         gdb_target_obs.
4898         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
4899         Likewise.
4900         (i[34567]86-*-linux*): Likewise.
4901
4902 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4903
4904         * dwarf2expr.h (dwarf_stack_value): Add constructor.
4905         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
4906         <stack>: Change type to std::vector.
4907         <stack_len, stack_allocated>: Remove.
4908         <grow_stack>: Remove.
4909         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4910         (dwarf_expr_context::~dwarf_expr_context): Remove.
4911         (dwarf_expr_context::grow_stack): Remove.
4912         (dwarf_expr_context::push): Adjust.
4913         (dwarf_expr_context::pop): Adjust.
4914         (dwarf_expr_context::fetch): Adjust.
4915         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
4916         (dwarf_expr_context::stack_empty_p): Adjust.
4917         (dwarf_expr_context::execute_stack_op): Adjust.
4918
4919 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4920
4921         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
4922         return type to bool.
4923         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
4924
4925 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4926
4927         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
4928         Change type to bool.
4929         (dwarf_stack_value) <in_stack_memory>: Likewise.
4930         (dwarf_expr_context) <push_address>: Change parameter type to
4931         bool.
4932         <fetch_in_stack_memory>: Change return type to bool.
4933         <push>: Change parameter type to bool.
4934         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
4935         to bool.
4936         (dwarf_expr_context::push_address): Likewise.
4937         (dwarf_expr_context::fetch_in_stack_memory): Change return type
4938         to bool.
4939         (dwarf_expr_context::execute_stack_op): Adjust.
4940         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
4941
4942 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4943
4944         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
4945         (struct dwarf_expr_context) <n_pieces>: Remove.
4946         <pieces>: Change type to std::vector.
4947         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4948         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
4949         pieces.
4950         (dwarf_expr_context::add_piece): Adjust.
4951         * dwarf2loc.c (struct piece_closure): Initialize fields.
4952         <n_pieces>: Remove.
4953         <pieces>: Change type to std::vector.
4954         (allocate_piece_closure): Adjust, change parameter to
4955         std::vector rvalue and std::move it to piece_closure.
4956         (rw_pieced_value): Adjust.
4957         (check_pieced_synthetic_pointer): Adjust.
4958         (indirect_synthetic_pointer): Adjust.
4959         (coerce_pieced_ref): Adjust.
4960         (free_pieced_value_closure):  Adjust.  Use delete to free
4961         piece_closure.
4962         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
4963         to allocate_piece_closure.
4964         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
4965
4966 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4967
4968         * probe.h (probe_ops_cp): Remove typedef.
4969         (DEF_VEC_P (probe_ops_cp)): Remove.
4970         (all_probe_ops): Change type to std::vector.
4971         * probe.c (info_probes_for_ops): Adjust to vector change.
4972         (probe_linespec_to_ops): Likewise.
4973         (all_probe_ops): Change type to std::vector.
4974         (_initialize_probe): Adjust to vector change.
4975         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
4976         * elfread.c (elf_get_probes): Likewise.
4977         * stap-probe.c (_initialize_stap_probe): Likewise.
4978
4979 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4980
4981         * probe.h (struct bound_probe): Define constructors.
4982         * probe.c (bound_probe_s): Remove typedef.
4983         (DEF_VEC_O (bound_probe_s)): Remove VEC.
4984         (collect_probes): Change return type to std::vector, remove
4985         cleanup.
4986         (compare_probes): Return bool, change parameter type.  Change
4987         semantic to "less than".
4988         (gen_ui_out_table_header_info): Change parameter to std::vector
4989         and update.
4990         (exists_probe_with_pops): Likewise.
4991         (info_probes_for_ops): Update to std::vector change.
4992         (enable_probes_command): Likewise.
4993         (disable_probes_command): Likewise.
4994
4995 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4996
4997         * probe.h (struct probe_ops) <get_probes>: Change parameter from
4998         vec to std::vector.
4999         * probe.c (parse_probes_in_pspace): Update.
5000         (find_probes_in_objfile): Update.
5001         (find_probe_by_pc): Update.
5002         (collect_probes): Update.
5003         (probe_any_get_probes): Update.
5004         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5005         return type to reference to std::vector.
5006         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5007         std::vector and update.
5008         (dtrace_process_dof): Likewise.
5009         (dtrace_get_probes): Likewise.
5010         * elfread.c (elf_get_probes): Change return type to std::vector,
5011         store an std::vector in bfd_data.
5012         (probe_key_free): Update to std::vector.
5013         * stap-probe.c (handle_stap_probe): Change parameter to
5014         std::vector and update.
5015         (stap_get_probes): Likewise.
5016         * symfile-debug.c (debug_sym_get_probes): Change return type to
5017         std::vector and update.
5018
5019 2017-09-11  Tom Tromey  <tom@tromey.com>
5020
5021         * breakpoint.c (program_breakpoint_here_p): Update.
5022         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5023         from make_show_memory_breakpoints_cleanup.  Return a
5024         scoped_restore_tmpl<int>.
5025         (restore_show_memory_breakpoints): Remove.
5026         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5027         * mem-break.c (memory_validate_breakpoint): Update.
5028         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5029         (ia64_memory_remove_breakpoint): Update.
5030         (ia64_breakpoint_from_pc): Update.
5031         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5032         from make_show_memory_breakpoints_cleanup.
5033
5034 2017-09-11  Tom Tromey  <tom@tromey.com>
5035
5036         * d-namespace.c (d_lookup_symbol): Use std::string.
5037         (find_symbol_in_baseclass): Likewise.
5038
5039 2017-09-11  Tom Tromey  <tom@tromey.com>
5040
5041         * ctf.c (ctf_start): Use std::string.
5042
5043 2017-09-11  Tom Tromey  <tom@tromey.com>
5044
5045         * ada-lang.c (is_known_support_routine): Update.
5046         (ada_unhandled_exception_name_addr_from_raise): Update.
5047         * guile/scm-frame.c (gdbscm_frame_name): Update.
5048         * python/py-frame.c (frapy_name): Update.
5049         (frapy_function): Update.
5050         * stack.h (find_frame_funname): Update.
5051         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5052         (print_frame): Update.
5053
5054 2017-09-11  Tom Tromey  <tom@tromey.com>
5055
5056         * findcmd.c (put_bits): Take a gdb::byte_vector.
5057         (parse_find_args): Return gdb::byte_vector.  "args" now const.
5058         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
5059         cleanups.
5060         (find_command): Update.
5061
5062 2017-09-11  Tom Tromey  <tom@tromey.com>
5063
5064         * cli/cli-script.c (class scoped_restore_hook_in): New.
5065         (clear_hook_in_cleanup): Remove.
5066         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5067         scoped_restore_hook_in.
5068
5069 2017-09-11  Tom Tromey  <tom@tromey.com>
5070
5071         * cli/cli-script.c (restore_interp): Remove.
5072         (read_command_lines): Use scoped_restore_interp.
5073         * interps.c (scoped_restore_interp::set_temp): Rename from
5074         interp_set_temp.
5075         * interps.h (class scoped_restore_interp): New.
5076         (interp_set_temp): Remove.
5077
5078 2017-09-11  Tom Tromey  <tom@tromey.com>
5079
5080         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5081         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5082         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5083         scoped_restore.
5084         (mi_cmd_break_insert_1): Update.
5085         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5086         scoped_restore.
5087
5088 2017-09-11  Tom Tromey  <tom@tromey.com>
5089
5090         * demangle.c (demangle_command): Update.
5091         * breakpoint.c (disable_command): Update.
5092         (enable_command): Update.
5093         (find_location_by_number): Make "number" const.  Use
5094         get_number_trailer.
5095         * cli/cli-utils.c (extract_arg): Return std::string.
5096         * probe.c (parse_probe_linespec): Update.  Change types.
5097         (collect_probes): Take string arguments.
5098         (parse_probe_linespec): Likewise.
5099         (info_probes_for_ops): Update.
5100         (enable_probes_command): Update.
5101         (disable_probes_command): Update.
5102         * break-catch-sig.c (catch_signal_split_args): Update.
5103         * mi/mi-parse.c (mi_parse): Update.
5104
5105 2017-09-11  Tom Tromey  <tom@tromey.com>
5106
5107         * language.h (language_enum): Make argument const.
5108         * language.c (language_enum): Make argument const.
5109
5110 2017-09-11  Tom Tromey  <tom@tromey.com>
5111
5112         * common/common-utils.h (skip_to_space): Remove macro, redeclare
5113         as function.
5114         (skip_to_space): Rename from skip_to_space_const.
5115         * common/common-utils.c (skip_to_space): New function.
5116         (skip_to_space): Rename from skip_to_space_const.
5117         * cli/cli-utils.h (get_number): Rename from get_number_const.
5118         (extract_arg): Rename from extract_arg_const.
5119         * cli/cli-utils.c (get_number): Rename from get_number_const.
5120         (extract_arg): Rename from extract_arg_const.
5121         (number_or_range_parser::get_number): Use ::get_number.
5122         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5123         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5124         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5125         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5126         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5127         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5128         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5129         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5130
5131 2017-09-11  Tom Tromey  <tom@tromey.com>
5132
5133         * python/python.c (do_start_initialization): Use
5134         py-event-types.def to initialize types.
5135         Define all object type structures.
5136         * python/python-internal.h: Don't declare event initialization
5137         functions.
5138         * python/py-threadevent.c (thread_event_object_type): Don't
5139         define.
5140         * python/py-stopevent.c (stop_event_object_type): Don't define.
5141         * python/py-signalevent.c (signal_event_object_type): Don't
5142         declare or define.
5143         * python/py-newobjfileevent.c (new_objfile_event_object_type)
5144         (clear_objfiles_event_object_type): Don't declare or define.
5145         * python/py-infevents.c (inferior_call_pre_event_object_type)
5146         (inferior_call_post_event_object_type)
5147         (register_changed_event_object_type)
5148         (memory_changed_event_object_type): Don't declare or define.
5149         * python/py-inferior.c (new_thread_event_object_type)
5150         (new_inferior_event_object_type)
5151         (inferior_deleted_event_object_type): Don't declare or define.
5152         * python/py-exitedevent.c (exited_event_object_type): Don't
5153         declare or define.
5154         * python/py-evts.c (gdbpy_initialize_py_events): Use
5155         py-all-events.def.
5156         * python/py-events.h (thread_event_object_type): Don't declare.
5157         (events_object): Use py-all-events.def.
5158         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
5159         py-event-types.def.
5160         * python/py-event-types.def: New file.
5161         * python/py-continueevent.c (create_continue_event_object): Don't
5162         declare or define.
5163         * python/py-bpevent.c (breakpoint_event_object_type): Don't
5164         declare or define.
5165         * python/py-all-events.def: New file.
5166
5167 2017-09-11  Tom Tromey  <tom@tromey.com>
5168
5169         * python/py-threadevent.c (create_thread_event_object): Return
5170         gdbpy_ref.
5171         * python/py-stopevent.h (create_stop_event_object)
5172         (create_breakpoint_event_object, create_signal_event_object):
5173         Update.
5174         * python/py-stopevent.c (create_stop_event_object): Return
5175         gdbpy_ref.
5176         (emit_stop_event): Update.
5177         * python/py-signalevent.c (create_signal_event_object): Return
5178         gdbpy_ref.
5179         * python/py-infevents.c (create_inferior_call_event_object):
5180         Update.
5181         * python/py-event.h (create_event_object)
5182         (create_thread_event_object): Update.
5183         * python/py-event.c (create_event_object): Return gdbpy_ref.
5184         * python/py-continueevent.c: Return gdbpy_ref.
5185         * python/py-bpevent.c (create_breakpoint_event_object): Return
5186         gdbpy_ref.
5187
5188 2017-09-11  Tom Tromey  <tom@tromey.com>
5189
5190         PR python/15622:
5191         * NEWS: Add entry.
5192         * python/python.c (do_start_initialization): Initialize new event
5193         types.
5194         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5195         (gdbpy_initialize_inferior_deleted_event)
5196         (gdbpy_initialize_new_thread_event): Declare.
5197         * python/py-threadevent.c (create_thread_event_object): Add option
5198         "thread" parameter.
5199         * python/py-inferior.c (new_thread_event_object_type)
5200         (new_inferior_event_object_type)
5201         (inferior_deleted_event_object_type): Declare.
5202         (python_new_inferior, python_inferior_deleted): New functions.
5203         (add_thread_object): Emit new_thread event.
5204         (gdbpy_initialize_inferior): Attach new functions to corresponding
5205         observers.
5206         (new_thread, new_inferior, inferior_deleted): Define new event
5207         types.
5208         * python/py-evts.c (gdbpy_initialize_py_events): Add new
5209         registries.
5210         * python/py-events.h (events_object) <new_inferior,
5211         inferior_deleted, new_thread>: New fields.
5212         * python/py-event.h (create_thread_event_breakpoint): Add optional
5213         "thread" parameter.
5214
5215 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5216
5217         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5218         check current_ui instead.
5219         (internal_vproblem): Likewise.
5220
5221 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
5222
5223         * thread.c (print_thread_info_1): Remove unnecessary calls to
5224         uiout->is_mi_like_p.
5225
5226 2017-09-09  Tom Tromey  <tom@tromey.com>
5227
5228         * namespace.h (add_using_directive): Update.
5229         * namespace.c (add_using_directive): Change type of excludes to
5230         std::vector.
5231         * dwarf2read.c (read_import_statement): Use std::vector.
5232         (read_namespace): Update.
5233         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5234
5235 2017-09-09  Tom Tromey  <tom@tromey.com>
5236
5237         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5238
5239 2017-09-09  Tom Tromey  <tom@tromey.com>
5240
5241         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5242
5243 2017-09-09  Tom Tromey  <tom@tromey.com>
5244
5245         * stack.c (func_command): Use gdb::def_vector.
5246
5247 2017-09-09  Tom Tromey  <tom@tromey.com>
5248
5249         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5250         ui_out_emit_list, ui_out_emit_tuple.
5251         (mi_cmd_var_update): Likewise.
5252
5253 2017-09-09  Tom Tromey  <tom@tromey.com>
5254
5255         * mi/mi-interp.c (mi_user_selected_context_changed): Use
5256         ui_out_redirect_pop.
5257         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5258         ui_out_redirect_pop.
5259         * utils.c (do_ui_out_redirect_pop)
5260         (make_cleanup_ui_out_redirect_pop): Remove.
5261         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5262         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5263         * ui-out.h (ui_out_redirect_pop): New class.
5264
5265 2017-09-09  Tom Tromey  <tom@tromey.com>
5266
5267         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5268         (list_available_thread_groups, mi_cmd_list_thread_groups)
5269         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5270         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5271         Likewise.
5272
5273 2017-09-09  Tom Tromey  <tom@tromey.com>
5274
5275         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5276         ui_out_emit_tuple.
5277
5278 2017-09-09  Tom Tromey  <tom@tromey.com>
5279
5280         * target.c (flash_erase_command): Use ui_out_emit_tuple.
5281         * stack.c (print_frame): Use ui_out_emit_tuple.
5282         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5283         (info_spu_mailbox_command, info_spu_dma_command)
5284         (info_spu_proxydma_command): Likewise.
5285         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5286         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5287         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5288         ui_out_emit_tuple.
5289         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5290
5291 2017-09-09  Tom Tromey  <tom@tromey.com>
5292
5293         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5294         (class ui_out_emit_table): Update comment.
5295         * ui-out.c (do_cleanup_table_end)
5296         (make_cleanup_ui_out_table_begin_end): Remove.
5297         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5298         (info_spu_dma_cmdlist): Likewise.
5299         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5300         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5301         ui_out_emit_table.
5302
5303 2017-09-09  Tom Tromey  <tom@tromey.com>
5304
5305         * thread.c (print_thread_info_1): Use ui_out_emit_table,
5306         ui_out_emit_list, gdb::optional.
5307
5308 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
5309
5310         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5311         prototype.
5312         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5313         prototype.
5314         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5315         prototype.
5316         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5317         * ada-exp.y: Remove _initialize_ada_exp prototype.
5318         * ada-lang.c: Remove _initialize_ada_language prototype.
5319         * ada-tasks.c: Remove _initialize_tasks prototype.
5320         * addrmap.c: Remove _initialize_addrmap prototype.
5321         * agent.c: Remove _initialize_agent prototype.
5322         * aix-thread.c: Remove _initialize_aix_thread prototype.
5323         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5324         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5325         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5326         prototype.
5327         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5328         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5329         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5330         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5331         prototype.
5332         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5333         prototype.
5334         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5335         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5336         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5337         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5338         prototype.
5339         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5340         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5341         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5342         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5343         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5344         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5345         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5346         prototype.
5347         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5348         prototype.
5349         * annotate.c: Remove _initialize_annotate prototype.
5350         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5351         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5352         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5353         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5354         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5355         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5356         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5357         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5358         prototype.
5359         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5360         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5361         * auto-load.c: Remove _initialize_auto_load prototype.
5362         * auxv.c: Remove _initialize_auxv prototype.
5363         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5364         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5365         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5366         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5367         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5368         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5369         prototype.
5370         * break-catch-throw.c: Remove _initialize_break_catch_throw
5371         prototype.
5372         * breakpoint.c: Remove _initialize_breakpoint prototype.
5373         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5374         * btrace.c: Remove _initialize_btrace prototype.
5375         * charset.c: Remove _initialize_charset prototype.
5376         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5377         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5378         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5379         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5380         * cli/cli-script.c: Remove _initialize_cli_script prototype.
5381         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5382         * coffread.c: Remove _initialize_coffread prototype.
5383         * compile/compile.c: Remove _initialize_compile prototype.
5384         * complaints.c: Remove _initialize_complaints prototype.
5385         * completer.c: Remove _initialize_completer prototype.
5386         * copying.awk: Remove _initialize_copying prototype.
5387         * copying.c: Regenerate.
5388         * core-regset.c: Remove _initialize_core_regset prototype.
5389         * corefile.c: Remove _initialize_core prototype.
5390         * corelow.c: Remove _initialize_corelow prototype.
5391         * cp-abi.c: Remove _initialize_cp_abi prototype.
5392         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5393         * cp-support.c: Remove _initialize_cp_support prototype.
5394         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5395         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5396         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5397         * ctf.c: Remove _initialize_ctf prototype.
5398         * d-lang.c: Remove _initialize_d_language prototype.
5399         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5400         prototype.
5401         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5402         * dbxread.c: Remove _initialize_dbxread prototype.
5403         * dcache.c: Remove _initialize_dcache prototype.
5404         * demangle.c: Remove _initialize_demangler prototype.
5405         * disasm-selftests.c: Remove _initialize_disasm_selftests
5406         prototype.
5407         * disasm.c: Remove _initialize_disasm prototype.
5408         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5409         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5410         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5411         prototype.
5412         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5413         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5414         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5415         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5416         * elfread.c: Remove _initialize_elfread prototype.
5417         * exec.c: Remove _initialize_exec prototype.
5418         * extension.c: Remove _initialize_extension prototype.
5419         * f-lang.c: Remove _initialize_f_language prototype.
5420         * f-valprint.c: Remove _initialize_f_valprint prototype.
5421         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5422         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5423         * filesystem.c: Remove _initialize_filesystem prototype.
5424         * findcmd.c: Remove _initialize_mem_search prototype.
5425         * fork-child.c: Remove _initialize_fork_child prototype.
5426         * frame-base.c: Remove _initialize_frame_base prototype.
5427         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5428         * frame.c: Remove _initialize_frame prototype.
5429         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5430         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5431         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5432         * gcore.c: Remove _initialize_gcore prototype.
5433         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5434         * gdbarch.c: Regenerate.
5435         * gdbarch.sh: Remove _initialize_gdbarch prototype.
5436         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5437         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5438         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5439         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5440         * go-lang.c: Remove _initialize_go_language prototype.
5441         * go32-nat.c: Remove _initialize_go32_nat prototype.
5442         * guile/guile.c: Remove _initialize_guile prototype.
5443         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5444         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5445         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5446         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5447         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5448         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5449         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5450         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5451         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5452         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5453         prototype.
5454         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5455         prototype.
5456         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5457         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5458         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5459         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5460         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5461         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5462         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5463         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5464         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5465         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5466         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5467         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5468         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5469         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5470         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5471         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5472         prototype.
5473         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5474         prototype.
5475         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5476         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5477         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5478         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5479         * infcall.c: Remove _initialize_infcall prototype.
5480         * infcmd.c: Remove _initialize_infcmd prototype.
5481         * inferior.c: Remove _initialize_inferiors prototype.
5482         * inflow.c: Remove _initialize_inflow prototype.
5483         * infrun.c: Remove _initialize_infrun prototype.
5484         * interps.c: Remove _initialize_interpreter prototype.
5485         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5486         * jit.c: Remove _initialize_jit prototype.
5487         * language.c: Remove _initialize_language prototype.
5488         * linux-fork.c: Remove _initialize_linux_fork prototype.
5489         * linux-nat.c: Remove _initialize_linux_nat prototype.
5490         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5491         * linux-thread-db.c: Remove _initialize_thread_db prototype.
5492         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5493         * m2-lang.c: Remove _initialize_m2_language prototype.
5494         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5495         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5496         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5497         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5498         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5499         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5500         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5501         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5502         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5503         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5504         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5505         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5506         * machoread.c: Remove _initialize_machoread prototype.
5507         * macrocmd.c: Remove _initialize_macrocmd prototype.
5508         * macroscope.c: Remove _initialize_macroscope prototype.
5509         * maint.c: Remove _initialize_maint_cmds prototype.
5510         * mdebugread.c: Remove _initialize_mdebugread prototype.
5511         * memattr.c: Remove _initialize_mem prototype.
5512         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5513         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5514         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5515         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5516         * mi/mi-main.c: Remove _initialize_mi_main prototype.
5517         * microblaze-linux-tdep.c: Remove
5518         _initialize_microblaze_linux_tdep prototype.
5519         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5520         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5521         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5522         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5523         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5524         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5525         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5526         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5527         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5528         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5529         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5530         prototype.
5531         * mipsread.c: Remove _initialize_mipsread prototype.
5532         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5533         prototype.
5534         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5535         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5536         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5537         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5538         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5539         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5540         prototype.
5541         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5542         * nto-procfs.c: Remove _initialize_procfs prototype.
5543         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5544         * objc-lang.c: Remove _initialize_objc_language prototype.
5545         * objfiles.c: Remove _initialize_objfiles prototype.
5546         * observer.c: Remove observer_test_first_notification_function,
5547         observer_test_second_notification_function,
5548         observer_test_third_notification_function, and
5549         _initialize_observer prototypes.
5550         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5551         * osabi.c: Remove _initialize_gdb_osabi prototype.
5552         * osdata.c: Remove _initialize_osdata prototype.
5553         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5554         * parse.c: Remove _initialize_parse prototype.
5555         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5556         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5557         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5558         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5559         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5560         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5561         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5562         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5563         * printcmd.c: Remove _initialize_printcmd prototype.
5564         * probe.c: Remove _initialize_probe prototype.
5565         * proc-api.c: Remove _initialize_proc_api prototype.
5566         * proc-events.c: Remove _initialize_proc_events prototype.
5567         * proc-service.c: Remove _initialize_proc_service prototype.
5568         * procfs.c: Remove _initialize_procfs prototype.
5569         * psymtab.c: Remove _initialize_psymtab prototype.
5570         * python/python.c: Remove _initialize_python prototype.
5571         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5572         * record-btrace.c: Remove _initialize_record_btrace prototype.
5573         * record-full.c: Remove _initialize_record_full prototype.
5574         * record.c: Remove _initialize_record prototype.
5575         * regcache.c: Remove _initialize_regcache prototype.
5576         * reggroups.c: Remove _initialize_reggroup prototype.
5577         * remote-notif.c: Remove _initialize_notif prototype.
5578         * remote-sim.c: Remove _initialize_remote_sim prototype.
5579         * remote.c: Remove _initialize_remote prototype.
5580         * reverse.c: Remove _initialize_reverse prototype.
5581         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5582         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5583         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5584         prototype.
5585         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5586         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5587         * rust-exp.y: Remove _initialize_rust_exp prototype.
5588         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5589         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5590         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5591         * score-tdep.c: Remove _initialize_score_tdep prototype.
5592         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5593         prototype.
5594         * ser-go32.c: Remove _initialize_ser_dos prototype.
5595         * ser-mingw.c: Remove _initialize_ser_windows prototype.
5596         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5597         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5598         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5599         * serial.c: Remove _initialize_serial prototype.
5600         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5601         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5602         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5603         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5604         * skip.c: Remove _initialize_step_skip prototype.
5605         * sol-thread.c: Remove _initialize_sol_thread prototype.
5606         * solib-aix.c: Remove _initialize_solib_aix prototype.
5607         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5608         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5609         * solib-frv.c: Remove _initialize_frv_solib prototype.
5610         * solib-spu.c: Remove _initialize_spu_solib prototype.
5611         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5612         * solib-target.c: Remove _initialize_solib_target prototype.
5613         * solib.c: Remove _initialize_solib prototype.
5614         * source.c: Remove _initialize_source prototype.
5615         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5616         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5617         prototype.
5618         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5619         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5620         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5621         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5622         prototype.
5623         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5624         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5625         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5626         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5627         prototype.
5628         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5629         prototype.
5630         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5631         prototype.
5632         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5633         prototype.
5634         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5635         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5636         prototype.
5637         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5638         prototype.
5639         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5640         prototype.
5641         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5642         prototype.
5643         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5644         prototype.
5645         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5646         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5647         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5648         * stabsread.c: Remove _initialize_stabsread prototype.
5649         * stack.c: Remove _initialize_stack prototype.
5650         * stap-probe.c: Remove _initialize_stap_probe prototype.
5651         * std-regs.c: Remove _initialize_frame_reg prototype.
5652         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5653         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5654         * symfile.c: Remove _initialize_symfile prototype.
5655         * symmisc.c: Remove _initialize_symmisc prototype.
5656         * symtab.c: Remove _initialize_symtab prototype.
5657         * target-dcache.c: Remove _initialize_target_dcache prototype.
5658         * target-descriptions.c: Remove _initialize_target_descriptions
5659         prototype.
5660         * thread.c: Remove _initialize_thread prototype.
5661         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5662         prototype.
5663         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5664         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5665         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5666         prototype.
5667         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5668         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5669         * tracefile.c: Remove _initialize_tracefile prototype.
5670         * tracepoint.c: Remove _initialize_tracepoint prototype.
5671         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5672         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5673         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5674         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5675         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5676         * tui/tui-win.c: Remove _initialize_tui_win prototype.
5677         * tui/tui.c: Remove _initialize_tui prototype.
5678         * typeprint.c: Remove _initialize_typeprint prototype.
5679         * user-regs.c: Remove _initialize_user_regs prototype.
5680         * utils.c: Remove _initialize_utils prototype.
5681         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5682         * valarith.c: Remove _initialize_valarith prototype.
5683         * valops.c: Remove _initialize_valops prototype.
5684         * valprint.c: Remove _initialize_valprint prototype.
5685         * value.c: Remove _initialize_values prototype.
5686         * varobj.c: Remove _initialize_varobj prototype.
5687         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5688         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5689         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5690         * windows-nat.c: Remove _initialize_windows_nat,
5691         _initialize_check_for_gdb_ini, and _initialize_loadable
5692         prototypes.
5693         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5694         * xcoffread.c: Remove _initialize_xcoffread prototype.
5695         * xml-support.c: Remove _initialize_xml_support prototype.
5696         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5697         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5698         prototype.
5699         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5700         prototype.
5701         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5702
5703 2017-09-08  Keith Seitz  <keiths@redhat.com>
5704
5705         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5706         field.
5707
5708 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
5709
5710         * f-valprint.c (f_val_print): Remove check for one byte
5711         sized integers. Remove printing of character type.
5712
5713 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
5714             Christoph Weinmann  <christoph.t.weinmann@intel.com>
5715             Bernhard Heckel  <bernhard.heckel@intel.com>
5716
5717         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5718         to maintain proper indentation when printing pointers/refs.
5719
5720 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5721
5722         GDB 8.0.1 released.
5723
5724 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5725
5726         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
5727
5728 2017-09-05  Tom Tromey  <tom@tromey.com>
5729
5730         * parse.c (funcall_chain): Now a std::vector.
5731         (start_arglist, end_arglist): Simplify.
5732         (free_funcalls): Remove.
5733         (parse_exp_in_context_1): Remove cleanup.
5734
5735 2017-09-05  Tom Tromey  <tom@tromey.com>
5736
5737         * go-exp.y (go_parse): Don't create a cleanup.
5738
5739 2017-09-05  Tom Tromey  <tom@tromey.com>
5740
5741         * d-exp.y (PrimaryExpression): Use std::string.
5742         (d_parse): Don't create a cleanup.
5743
5744 2017-09-05  Tom Tromey  <tom@tromey.com>
5745
5746         * utils.c (do_clear_parser_state): Remove.
5747         (make_cleanup_clear_parser_state): Remove.
5748         * p-exp.y (pascal_parse): Use scoped_restore.
5749         * m2-exp.y (m2_parse): Use scoped_restore.
5750         * f-exp.y (f_parse): Use scoped_restore.
5751         * d-exp.y (d_parse): Use scoped_restore.
5752         * c-exp.y (c_parse): Use scoped_restore.
5753         * ada-exp.y (ada_parse): Use scoped_restore.
5754         * utils.h (make_cleanup_clear_parser_state): Remove.
5755
5756 2017-09-06  Keith Seitz  <keiths@redhat.com>
5757
5758         * dwarf2read.c (dw2_linkage_name_attr): New function.
5759         (dw2_linkage_name): New function.
5760         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
5761         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
5762         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
5763
5764 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5765
5766         * config/djgpp/djconfig.sh: Correct shell portability issue.
5767
5768 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5769
5770         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
5771
5772 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5773
5774         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
5775         * NEWS: Mention new FreeBSD/mips native configuration.
5776         * configure.host: Add aarch64*-*-freebsd*.
5777         * configure.nat: Likewise.
5778         * aarch64-fbsd-nat.c: New file.
5779
5780 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5781
5782         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
5783         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
5784         * NEWS: Mention new FreeBSD/aarch64 target.
5785         * configure.tgt: Add aarch64*-*-freebsd*.
5786         * aarch64-fbsd-tdep.c: New file.
5787         * aarch64-fbsd-tdep.h: New file.
5788
5789 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5790
5791         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
5792
5793 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
5794
5795         * parse.c (find_minsym_type_and_address): Don't relocate addresses
5796         of TLS symbols.
5797
5798 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5799
5800         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
5801         call.
5802
5803 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5804
5805         * infrun.c (follow_exec): Call add_thread after
5806         target_find_description.
5807
5808 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5809
5810         * infrun.c (handle_inferior_event_1): When exec'ing, read
5811         stop_pc after follow_exec.
5812
5813 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5814
5815         * remote.c (process_g_packet): Update error message.
5816
5817 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5818
5819         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
5820         targets.
5821
5822 2017-09-05  Pedro Alves  <palves@redhat.com>
5823
5824         * eval.c (eval_call, evaluate_funcall): New functions, factored
5825         out from ...
5826         (evaluate_subexp_standard): ... this.
5827
5828 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5829
5830         * amd64-tdep.c (amd64_target_description): Create target
5831         descriptions.
5832         (_initialize_amd64_tdep): Don't call functions
5833         initialize_tdesc_amd64_*.  Add self tests.
5834         * arch/amd64.c (amd64_create_target_description): Add parameter
5835         is_linux.  Call set_tdesc_osabi if is_linux is true.
5836         * arch/amd64.h (amd64_create_target_description): Update the
5837         declaration.
5838         * arch/i386.c (i386_create_target_description): Add parameter
5839         is_linux.  Call set_tdesc_osabi if is_linux is true.
5840         * arch/i386.h (i386_create_target_description): Update
5841         declaration.
5842         * configure.tgt: Add i386.o to gdb_target_obs.
5843         * features/Makefile (XMLTOC): Remove i386/*.xml.
5844         * features/i386/amd64-avx-avx512.c: Remove.
5845         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
5846         * features/i386/amd64-avx-mpx.c: Remove.
5847         * features/i386/amd64-avx.c: Remove.
5848         * features/i386/amd64-mpx.c: Remove.
5849         * features/i386/amd64.c: Remove.
5850         * features/i386/i386-avx-avx512.c: Remove.
5851         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
5852         * features/i386/i386-avx-mpx.c: Remove.
5853         * features/i386/i386-avx.c: Remove.
5854         * features/i386/i386-mmx.c: Remove.
5855         * features/i386/i386-mpx.c: Remove.
5856         * features/i386/i386.c: Remove.
5857         * i386-tdep.c: Don't include features/i386/i386*.c., include
5858         target-descriptions.h and arch/i386.h.
5859         (i386_target_description): Create target descriptions.
5860         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
5861         functions.  Do self tests.
5862
5863 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5864
5865         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
5866         * features/i386/amd64-avx-avx512-linux.c: Removed.
5867         * features/i386/amd64-avx-linux.c: Removed.
5868         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
5869         * features/i386/amd64-avx-mpx-linux.c: Removed.
5870         * features/i386/amd64-linux.c: Removed.
5871         * features/i386/amd64-mpx-linux.c: Removed.
5872         * features/i386/x32-avx-avx512-linux.c: Removed.
5873         * features/i386/x32-avx-linux.c: Removed.
5874         * features/i386/x32-linux.c: Removed.
5875
5876 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5877
5878         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
5879         features/i386/*.c.
5880         (amd64_linux_read_description): Call
5881         amd64_create_target_description.
5882         * arch/amd64.c: New file.
5883         * arch/amd64.h: New file.
5884         * configure.tgt (x86_64-*-linux*): Append amd64.o.
5885         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
5886
5887 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5888
5889         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
5890         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
5891         (amd64_linux_read_description): Create target descriptions.
5892         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
5893         functions.  Add unit tests.
5894         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
5895         x32-core.xml.
5896         * features/i386/64bit-avx.c: Generated.
5897         * features/i386/64bit-avx512.c: Generated.
5898         * features/i386/64bit-core.c: Generated.
5899         * features/i386/64bit-linux.c: Generated.
5900         * features/i386/64bit-mpx.c: Generated.
5901         * features/i386/64bit-pkeys.c: Generated.
5902         * features/i386/64bit-segments.c: Generated.
5903         * features/i386/64bit-sse.c: Generated.
5904         * features/i386/x32-core.c: Generated.
5905         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
5906         c files for amd64-linux and x32-linux.
5907
5908 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5909
5910         * amd64-linux-tdep.c (amd64_linux_read_description): New
5911         function.
5912         (amd64_linux_core_read_description): Call
5913         amd64_linux_read_description.
5914         (amd64_linux_init_abi): Likewise.
5915         (amd64_x32_linux_init_abi): Likewise.
5916         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
5917         * x86-linux-nat.c (x86_linux_read_description): Call
5918         amd64_linux_read_description.
5919
5920 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5921
5922         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
5923         comments.
5924
5925 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5926
5927         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
5928         * features/i386/i386-avx-avx512-linux.c: Remove.
5929         * features/i386/i386-avx-linux.c: Remove.
5930         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
5931         * features/i386/i386-avx-mpx-linux.c: Remove.
5932         * features/i386/i386-linux.c: Remove.
5933         * features/i386/i386-mmx-linux.c: Remove.
5934         * features/i386/i386-mpx-linux.c: Remove.
5935
5936 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5937
5938         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
5939         (SFILES): Add arch/i386.c.
5940         (HFILES_NO_SRCDIR): Add arch/i386.h.
5941         * arch/i386.c: New file.
5942         * arch/i386.h: New file.
5943         * arch/tdesc.h (allocate_target_description): Declare.
5944         (set_tdesc_architecture): Declare.
5945         (set_tdesc_osabi): Declare.
5946         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
5947         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
5948         include arch/i386.h.
5949         (i386_linux_read_description): Remove code and call
5950         i386_create_target_description.
5951         (set_tdesc_architecture): New function.
5952         (set_tdesc_osabi): New function.
5953         * target-descriptions.h (allocate_target_description): Remove.
5954
5955 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5956
5957         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
5958         * target-descriptions.c (tdesc_create_feature): Likewise, and
5959         adjust code.
5960         * features/i386/32bit-avx.c: Re-generated.
5961         * features/i386/32bit-avx512.c: Re-generated.
5962         * features/i386/32bit-core.c: Re-generated.
5963         * features/i386/32bit-linux.c: Re-generated.
5964         * features/i386/32bit-mpx.c: Re-generated.
5965         * features/i386/32bit-pkeys.c: Re-generated.
5966         * features/i386/32bit-sse.c: Re-generated.
5967
5968 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5969
5970         * regformats/regdef.h (struct reg): Override operator == and !=.
5971
5972 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5973
5974         * arch/tdesc.h: New file.
5975         * regformats/regdat.sh: Generate code using tdesc_create_reg.
5976         * target-descriptions.c: Update comments.
5977         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
5978         declarations.
5979         * features/i386/32bit-avx.c: Re-generated.
5980         * features/i386/32bit-avx512.c: Re-generated.
5981         * features/i386/32bit-core.c: Re-generated.
5982         * features/i386/32bit-linux.c: Re-generated.
5983         * features/i386/32bit-mpx.c: Re-generated.
5984         * features/i386/32bit-pkeys.c: Re-generated.
5985         * features/i386/32bit-sse.c: Re-generated.
5986
5987 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5988
5989         * regformats/regdat.sh: Update generated code.
5990
5991 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5992
5993         * regformats/regdat.sh: Adjust code order.
5994
5995 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5996
5997         * expprint.c (dump_subexp_body_standard): Use constant format
5998         string in fprintf_filtered call.
5999
6000 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6001
6002         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6003         NetBSD/i386.
6004         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6005
6006 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6007
6008         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6009
6010 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6011
6012         * bsd-kvm.o: Define _KMEMUSER.
6013         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6014         * configure: Regenerate.
6015
6016 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6017
6018         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6019         * i386-fbsd-nat.c: Likewise.
6020
6021 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6022
6023         * unittests/array-view-selftests.c: Add include of <array>.
6024
6025 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6026
6027         * spu-tdep.c (flush_ea_cache): Add missing argument to
6028         call_function_by_hand.
6029
6030 2017-09-04  Pedro Alves  <palves@redhat.com>
6031
6032         * NEWS (Safer support for debugging with no debug info): New.
6033
6034 2017-09-04  Pedro Alves  <palves@redhat.com>
6035
6036         * c-exp.y (function_method, function_method_void): Add current
6037         instance flags to TYPE_INSTANCE.
6038         * dwarf2read.c (check_modifier): New.
6039         (compute_delayed_physnames): Assert that only C++ adds delayed
6040         physnames.  Mark fn_fields as const/volatile depending on
6041         physname.
6042         * eval.c (make_params): New type_instance_flags parameter.  Use
6043         it as the new type's instance flags.
6044         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6045         flags element and pass it to make_params.
6046         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6047         instance flags element.
6048         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6049         * gdbtypes.h: Include "enum-flags.h".
6050         (type_instance_flags): New enum-flags type.
6051         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6052         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6053         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6054         (follow_type_instance_flags): New function.
6055         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6056         * parser-defs.h (follow_type_instance_flags): Declare.
6057         * valops.c (value_struct_elt_for_reference): const/volatile must
6058         match too.
6059
6060 2017-09-04  Pedro Alves  <palves@redhat.com>
6061
6062         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6063         function/method scopes; lookup the nested name as a function local
6064         static variable.
6065
6066 2017-09-04  Pedro Alves  <palves@redhat.com>
6067
6068         (%type <voidval>): Add function_method.
6069         * c-exp.y (exp): New production for calls with no arguments.
6070         (function_method, function_method_void_or_typelist): New
6071         productions.
6072         (exp): New production for "method()::static_var".
6073         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6074         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6075         Handle OP_FUNC_STATIC_VAR.
6076         * parse.c (operator_length_standard):
6077         Handle OP_FUNC_STATIC_VAR.
6078
6079 2017-09-04  Pedro Alves  <palves@redhat.com>
6080
6081         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6082         handling.
6083         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6084         Ditto.
6085         * parse.c (operator_length_standard, operator_check_standard):
6086         Ditto.
6087         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6088
6089 2017-09-04  Pedro Alves  <palves@redhat.com>
6090
6091         * ax-gdb.c: Include "typeprint.h".
6092         (gen_expr_for_cast): New function.
6093         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6094         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6095         type is unknown.
6096         * dwarf2read.c (new_symbol_full): Fallback to int instead of
6097         nodebug_data_symbol.
6098         * eval.c: Include "typeprint.h".
6099         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6100         Error out if symbol has unknown type.
6101         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6102         evaluate_subexp_for_cast.
6103         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6104         OP_VAR_MSYM_VALUE.
6105         (evaluate_subexp_for_cast): New function.
6106         * gdbtypes.c (init_nodebug_var_type): New function.
6107         (objfile_type): Use it to initialize types of variables with no
6108         debug info.
6109         * typeprint.c (error_unknown_type): New.
6110         * typeprint.h (error_unknown_type): New declaration.
6111         * compile/compile-c-types.c (convert_type_basic): Handle
6112         TYPE_CODE_ERROR; warn and fallback to int for variables with
6113         unknown type.
6114
6115 2017-09-04  Pedro Alves  <palves@redhat.com>
6116
6117         * eval.c (evaluate_var_value): New function, factored out from ...
6118         (evaluate_subexp_standard): ... here.
6119
6120 2017-09-04  Pedro Alves  <palves@redhat.com>
6121
6122         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6123         Remove useless assignments to 'op'.
6124
6125 2017-09-04  Pedro Alves  <palves@redhat.com>
6126
6127         * eval.c (eval_skip_value): New function.
6128         (evaluate_subexp_standard): Use it.
6129
6130 2017-09-04  Pedro Alves  <palves@redhat.com>
6131
6132         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6133         function name from symbol/minsym and pass it to
6134         error_call_unknown_return_type.
6135
6136 2017-09-04  Pedro Alves  <palves@redhat.com>
6137
6138         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6139         * ax-gdb.c (gen_msym_var_ref): New function.
6140         (gen_expr): Handle OP_VAR_MSYM_VALUE.
6141         * eval.c (evaluate_var_msym_value): New function.
6142         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6143         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6144         to call_function_by_hand.
6145         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6146         Handle OP_VAR_MSYM_VALUE.
6147         (union exp_element) <msymbol>: New field.
6148         * minsyms.h (struct type): Forward declare.
6149         (find_minsym_type_and_address): Declare.
6150         * parse.c (write_exp_elt_msym): New function.
6151         (write_exp_msymbol): Delete, refactored as ...
6152         (find_minsym_type_and_address): ... this new function.
6153         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6154         (operator_length_standard, operator_check_standard): Handle
6155         OP_VAR_MSYM_VALUE.
6156         * std-operator.def (OP_VAR_MSYM_VALUE): New.
6157
6158 2017-09-04  Pedro Alves  <palves@redhat.com>
6159
6160         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6161         TYPE_GNU_IFUNC specially here.  Throw error if return type is
6162         unknown.
6163         * ada-typeprint.c (print_func_type): Handle functions with unknown
6164         return type.
6165         * c-typeprint.c (c_type_print_base): Handle functions and methods
6166         with unknown return type.
6167         * compile/compile-c-symbols.c (convert_symbol_bmsym)
6168         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6169         * compile/compile-c-types.c: Include "objfiles.h".
6170         (convert_func): For functions with unknown return type, warn and
6171         default to int.
6172         * compile/compile-object-run.c (compile_object_run): Adjust call
6173         to call_function_by_hand_dummy.
6174         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6175         call_function_by_hand.
6176         * eval.c (evaluate_subexp_standard): Adjust calls to
6177         call_function_by_hand.  Handle functions and methods with unknown
6178         return type.  Pass expect_type to call_function_by_hand.
6179         * f-typeprint.c (f_type_print_base): Handle functions with unknown
6180         return type.
6181         * gcore.c (call_target_sbrk): Adjust call to
6182         call_function_by_hand.
6183         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6184         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
6185         an integer address type instead of nodebug.
6186         * guile/scm-value.c (gdbscm_value_call): Adjust call to
6187         call_function_by_hand.
6188         * infcall.c (error_call_unknown_return_type): New function.
6189         (call_function_by_hand): New "default_return_type" parameter.
6190         Pass it down.
6191         (call_function_by_hand_dummy): New "default_return_type"
6192         parameter.  Use it instead of defaulting to int.  If there's no
6193         default and the return type is unknown, throw an error.  If
6194         there's a default return type, and the called function has no
6195         debug info, then assume the function is prototyped.
6196         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6197         New "default_return_type" parameter.
6198         (error_call_unknown_return_type): New declaration.
6199         * linux-fork.c (call_lseek): Cast return type of lseek.
6200         (inferior_call_waitpid, checkpoint_command): Adjust calls to
6201         call_function_by_hand.
6202         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6203         calls to call_function_by_hand.
6204         * m2-typeprint.c (m2_procedure): Handle functions with unknown
6205         return type.
6206         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6207         (value_nsstring, print_object_command): Adjust calls to
6208         call_function_by_hand.
6209         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6210         functions with unknown return type.
6211         (pascal_type_print_func_varspec_suffix): New function.
6212         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6213         TYPE_CODE_METHOD>: Use it.
6214         * python/py-value.c (valpy_call): Adjust call to
6215         call_function_by_hand.
6216         * rust-lang.c (rust_evaluate_funcall): Adjust call to
6217         call_function_by_hand.
6218         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6219         call_function_by_hand.
6220         * valops.c (value_allocate_space_in_inferior): Adjust call to
6221         call_function_by_hand.
6222         * typeprint.c (type_print_unknown_return_type): New function.
6223         * typeprint.h (type_print_unknown_return_type): New declaration.
6224
6225 2017-09-04  Pedro Alves  <palves@redhat.com>
6226
6227         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6228         types with more than one parameter as prototyped.
6229
6230 2017-09-04  Pedro Alves  <palves@redhat.com>
6231
6232         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6233         (disassemble_command): Use gdb_disassembly_flags instead of bare
6234         int.
6235         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6236         (dump_insns, do_mixed_source_and_assembly_deprecated)
6237         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6238         Use gdb_disassembly_flags instead of bare int.
6239         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6240         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6241         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6242         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
6243         (enum gdb_disassembly_flag): ... values of this new enumeration.
6244         (gdb_disassembly_flags): Define.
6245         (gdb_disassembly)
6246         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6247         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6248         gdb_disassembly_flags instead of bare int.
6249         * record-btrace.c (btrace_insn_history)
6250         (record_btrace_insn_history, record_btrace_insn_history_range)
6251         (record_btrace_insn_history_from): Use gdb_disassembly_flags
6252         instead of bare int.
6253         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6254         Use gdb_disassembly_flags instead of bare int.
6255         * target-debug.h (target_debug_print_gdb_disassembly_flags):
6256         Define.
6257         * target-delegates.c: Regenerate.
6258         * target.c (target_insn_history, target_insn_history_from)
6259         (target_insn_history_range): Use gdb_disassembly_flags instead of
6260         bare int.
6261         * target.h: Include "disasm.h".
6262         (struct target_ops) <to_insn_history, to_insn_history_from,
6263         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6264         int.
6265         (target_insn_history, target_insn_history_from)
6266         (target_insn_history_range): Use gdb_disassembly_flags instead of
6267         bare int.
6268
6269 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6270
6271         * cli/cli-script.c (build_command_line): For if/while commands,
6272         check whether args is empty.
6273
6274 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6275
6276         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6277         (enum command_control_type): Likewise.
6278         (struct command_line): Likewise.
6279         (free_command_lines): Likewise.
6280         (struct command_lines_deleter): Likewise.
6281         (command_line_up): Likewise.
6282         (read_command_lines): Likewise.
6283         (read_command_lines_1): Likewise.
6284         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6285         (enum command_control_type): Likewise.
6286         (struct command_line): Likewise.
6287         (free_command_lines): Likewise.
6288         (struct command_lines_deleter): Likewise.
6289         (command_line_up): Likewise.
6290         (read_command_lines): Likewise.
6291         (read_command_lines_1): Likewise.
6292         * breakpoint.h: Include cli/cli-script.h.
6293         * extension-priv.h: Likewise.
6294         * gdbcmd.h: Likewise.
6295
6296 2017-09-04  Pedro Alves  <palves@redhat.com>
6297
6298         * ada-lang.c (is_known_support_routine): Move sal declaration to
6299         where it is initialized.
6300         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6301         (parse_breakpoint_sals, decode_static_tracepoint_spec)
6302         (clear_command, update_static_tracepoint): Remove init_sal
6303         references.  Move declarations closer to initializations.
6304         * cli/cli-cmds.c (list_command): Move sal declarations closer to
6305         initializations.
6306         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6307         references.  Move sal declarations closer to initializations.
6308         * frame.c (find_frame_sal): Return a symtab_and_line via function
6309         return instead of output parameter.  Remove init_sal references.
6310         * frame.h (find_frame_sal): Return a symtab_and_line via function
6311         return instead of output parameter.
6312         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6313         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6314         instead of memset.
6315         (gdbscm_find_pc_line): Remove init_sal reference.
6316         * infcall.c (call_function_by_hand_dummy): Remove init_sal
6317         references.  Move declarations closer to initializations.
6318         * infcmd.c (set_step_frame): Update.  Move declarations closer to
6319         initializations.
6320         (finish_backward): Remove init_sal references.  Move declarations
6321         closer to initializations.
6322         * infrun.c (process_event_stop_test, handle_step_into_function)
6323         (insert_hp_step_resume_breakpoint_at_frame)
6324         (insert_step_resume_breakpoint_at_caller): Likewise.
6325         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6326         (symbol_to_sal): Likewise.
6327         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6328         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6329         to its initialization.
6330         * reverse.c (save_bookmark_command): Use new/delete.  Remove
6331         init_sal references.  Move declarations closer to initializations.
6332         * source.c (get_current_source_symtab_and_line): Remove brace
6333         initialization.
6334         (set_current_source_symtab_and_line): Now takes the sal by const
6335         reference.  Remove brace initialization.
6336         (line_info): Remove init_sal reference.
6337         * source.h (set_current_source_symtab_and_line): Now takes a
6338         symtab_and_line via const reference.
6339         * stack.c (set_current_sal_from_frame): Adjust.
6340         (print_frame_info): Adjust.
6341         (get_last_displayed_sal): Return the sal via function return
6342         instead of via output parameter.  Simplify.
6343         (frame_info): Adjust.
6344         * stack.h (get_last_displayed_sal): Return the sal via function
6345         return instead of via output parameter.
6346         * symtab.c (init_sal): Delete.
6347         (find_pc_sect_line): Remove init_sal references.  Move
6348         declarations closer to initializations.
6349         (find_function_start_sal): Remove init_sal references.  Move
6350         declarations closer to initializations.
6351         * symtab.h (struct symtab_and_line): In-class initialize all
6352         fields.
6353         * tracepoint.c (set_traceframe_context)
6354         (print_one_static_tracepoint_marker): Remove init_sal references.
6355         Move declarations closer to initializations.
6356         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6357         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
6358         declarations closer to initializations.
6359         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6360         init_sal references.  Adjust.
6361
6362 2017-09-04  Pedro Alves  <palves@redhat.com>
6363
6364         * ax-gdb.c (agent_command_1): Use range-for.
6365         * break-catch-throw.c (re_set_exception_catchpoint): Update.
6366         * breakpoint.c: Include "common/array-view.h".
6367         (init_breakpoint_sal, create_breakpoint_sal): Change sals
6368         parameter from struct symtabs_and_lines to
6369         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
6370         (breakpoint_sals_to_pc): Change sals parameter from struct
6371         symtabs_and_lines to std::vector reference.
6372         (check_fast_tracepoint_sals): Change sals parameter from struct
6373         symtabs_and_lines to std::array_view.  Use range-for.
6374         (decode_static_tracepoint_spec): Return a std::vector instead of
6375         symtabs_and_lines.  Update.
6376         (create_breakpoint): Update.
6377         (break_range_command, until_break_command, clear_command): Update.
6378         (base_breakpoint_decode_location, bkpt_decode_location)
6379         (bkpt_probe_create_sals_from_location)
6380         (bkpt_probe_decode_location, tracepoint_decode_location)
6381         (tracepoint_probe_decode_location)
6382         (strace_marker_create_sals_from_location): Return a std::vector
6383         instead of symtabs_and_lines.
6384         (strace_marker_create_breakpoints_sal): Update.
6385         (strace_marker_decode_location): Return a std::vector instead of
6386         symtabs_and_lines.  Update.
6387         (update_breakpoint_locations): Change struct symtabs_and_lines
6388         parameters to gdb::array_view.  Adjust.
6389         (location_to_sals): Return a std::vector instead of
6390         symtabs_and_lines.  Update.
6391         (breakpoint_re_set_default): Use std::vector instead of struct
6392         symtabs_and_lines.
6393         (decode_location_default): Return a std::vector instead of
6394         symtabs_and_lines.  Update.
6395         * breakpoint.h: Include "common/array-view.h".
6396         (struct breakpoint_ops) <decode_location>: Now returns a
6397         std::vector instead of returning a symtabs_and_lines via output
6398         parameter.
6399         (update_breakpoint_locations): Change sals parameters to use
6400         gdb::array_view.
6401         * cli/cli-cmds.c (edit_command, list_command): Update to use
6402         std::vector and gdb::array_view.
6403         (ambiguous_line_spec): Adjust to use gdb::array_view and
6404         range-for.
6405         (compare_symtabs): Rename to ...
6406         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
6407         const reference and adjust.
6408         (filter_sals): Rewrite using std::vector and standard algorithms.
6409         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6410         (jump_command): Update to use std::vector.
6411         * linespec.c (struct linespec_state) <canonical_names>: Update
6412         comment.
6413         (add_sal_to_sals_basic): Delete.
6414         (add_sal_to_sals, filter_results, convert_results_to_lsals)
6415         (decode_line_2, create_sals_line_offset)
6416         (convert_address_location_to_sals, convert_linespec_to_sals)
6417         (convert_explicit_location_to_sals, parse_linespec)
6418         (event_location_to_sals, decode_line_full, decode_line_1)
6419         (decode_line_with_current_source)
6420         (decode_line_with_last_displayed, decode_objc)
6421         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6422         (linespec_result::~linespec_result): Adjust to use std::vector
6423         instead of symtabs_and_lines.
6424         * linespec.h (linespec_sals::sals): Now a std::vector.
6425         (struct linespec_result): Use std::vector, bool, and in-class
6426         initialization.
6427         (decode_line_1, decode_line_with_current_source)
6428         (decode_line_with_last_displayed): Return std::vector.
6429         * macrocmd.c (info_macros_command): Use std::vector.
6430         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6431         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6432         std::vector.
6433         * probe.h (parse_probes): Return a std::vector.
6434         * python/python.c (gdbpy_decode_line): Use std::vector and
6435         gdb::array_view.
6436         * source.c (select_source_symtab, line_info): Use std::vector.
6437         * stack.c (func_command): Use std::vector.
6438         * symtab.h (struct symtabs_and_lines): Delete.
6439         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6440
6441 2017-09-04  Pedro Alves  <palves@redhat.com>
6442
6443         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6444         unittests/array-view-selftests.c.
6445         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6446         * common/array-view.h: New file.
6447         * unittests/array-view-selftests.c: New file.
6448
6449 2017-09-04  Pedro Alves  <palves@redhat.com>
6450
6451         * cli/cli-cmds.c (edit_command): Pass message to
6452         ambiguous_line_spec.
6453         (list_command): Pass message to ambiguous_line_spec.  Say
6454         "first"/"last" instead of "start" and "end" to be consistent with
6455         the manual.
6456         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
6457         them to print formatted message.
6458
6459 2017-09-04  Pedro Alves  <palves@redhat.com>
6460
6461         * btrace.c (ftrace_add_pt): Pass btrace_insn to
6462         ftrace_update_insns by reference instead of pointer.
6463
6464 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6465
6466         * i386-go32-tdep.c: Include x86-xstate.h.
6467         (i386_go32_init_abi): Call i386_target_description.
6468         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6469         if xcr0 is X86_XSTATE_X87_MASK.
6470         * i386-tdep.h (tdesc_i386): Remove the declaration.
6471         (tdesc_i386_mmx): Likewise.
6472
6473 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6474
6475         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6476         X86_XSTATE_SSE_MASK instead of 0.
6477
6478 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6479
6480         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6481         i386_target_description.
6482         * i386-fbsd-nat.c (i386fbsd_read_description): Call
6483         i386_target_description.
6484         * i386-tdep.c (i386_gdbarch_init): Likewise.
6485
6486 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6487
6488         * amd64-darwin-tdep.c: Include "x86-xstate.h".
6489         (x86_darwin_init_abi_64): Call amd64_target_description.
6490         * amd64-dicos-tdep.c: Likewise.
6491         * amd64-fbsd-nat.c: Likewise.
6492         * amd64-fbsd-tdep.c: Likewise.
6493         * amd64-nbsd-tdep.c: Likewise.
6494         * amd64-obsd-tdep.c: Likewise.
6495         * amd64-sol2-tdep.c: Likewise.
6496         * amd64-windows-tdep.c: Likewise.
6497         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6498
6499 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6500
6501         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6502         (btrace_function) <insn>: Change type to use std::vector.
6503         * btrace.c (ftrace_debug, ftrace_call_num_insn,
6504         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6505         ftrace_update_insns, ftrace_compute_global_level_offset,
6506         btrace_stitch_bts, btrace_clear, btrace_insn_get,
6507         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6508         change to std::vector.
6509         (ftrace_update_insns): Adjust to change to std::vector, change
6510         type of INSN parameter.
6511         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6512         * record-btrace.c (btrace_call_history_insn_range,
6513         btrace_compute_src_line_range,
6514         record_btrace_frame_prev_register): Adjust to change to
6515         std::vector.
6516         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6517         to change to std::vector.
6518
6519 2017-09-03  Tom Tromey  <tom@tromey.com>
6520
6521         * corefile.c (reopen_exec_file): Use std::string.
6522
6523 2017-09-03  Tom Tromey  <tom@tromey.com>
6524
6525         * compile/compile.c (compile_register_name_mangled): Return
6526         std::string.
6527         * compile/compile-loc2c.c (pushf_register_address): Update.
6528         (pushf_register): Update.
6529         * compile/compile-c-types.c (convert_array): Update.
6530         * compile/compile-c-symbols.c (generate_vla_size): Update.
6531         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6532         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6533         (convert_one_symbol): Update.
6534         (generate_c_for_for_one_variable): Update.
6535         * compile/compile-c-support.c (c_get_range_decl_name): Return a
6536         std::string.
6537         (generate_register_struct): Update.
6538         * compile/compile-internal.h (c_get_range_decl_name): Return a
6539         std::string.
6540         (compile_register_name_mangled): Return std::string.
6541
6542 2017-09-03  Tom Tromey  <tom@tromey.com>
6543
6544         * utils.c (perror_string): Return a std::string.
6545         (throw_perror_with_name, perror_warning_with_name): Update.
6546
6547 2017-09-03  Tom Tromey  <tom@tromey.com>
6548
6549         * demangle.c (demangle_command): Use std::string,
6550         unique_xmalloc_ptr.
6551
6552 2017-09-03  Tom Tromey  <tom@tromey.com>
6553
6554         * cli/cli-setshow.c (do_set_command): Use std::string.
6555
6556 2017-09-03  Tom Tromey  <tom@tromey.com>
6557
6558         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6559
6560 2017-09-03  Tom Tromey  <tom@tromey.com>
6561
6562         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6563
6564 2017-09-03  Tom Tromey  <tom@tromey.com>
6565
6566         * mi/mi-cmd-env.c (env_execute_cli_command): Use
6567         gdb::unique_xmalloc_ptr.
6568
6569 2017-09-03  Tom Tromey  <tom@tromey.com>
6570
6571         * thread.c (print_thread_info_1): Use string_printf.
6572         (thread_apply_command, thread_apply_all_command): Use
6573         std::string.
6574
6575 2017-09-03  Tom Tromey  <tom@tromey.com>
6576
6577         * valprint.c (val_print_string): Update.
6578         * gdbcore.h (memory_error_message): Return std::string.
6579         * corefile.c (memory_error_message): Return std::string.
6580         (memory_error): Update.
6581         * breakpoint.c (insert_bp_location): Update.
6582
6583 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
6584
6585         * target/waitstatus.h (target_waitstatus_to_string): Change
6586         return type to std::string.
6587         * target/waitstatus.c (target_waitstatus_to_string): Return
6588         std::string.
6589         * target.h (target_waitstatus_to_string): Remove declaration.
6590         * infrun.c (resume, clear_proceed_status_thread,
6591         print_target_wait_results, do_target_wait, save_waitstatus,
6592         stop_all_threads): Adjust.
6593         * record-btrace.c (record_btrace_wait): Adjust.
6594         * target-debug.h
6595         (target_debug_print_struct_target_waitstatus_p): Adjust.
6596
6597 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6598
6599         PR gdb/22046
6600         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6601         detection.
6602
6603 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
6604
6605         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6606         for setting/unsetting environment variables on the remote target.
6607         (New remote packets): Add entries for QEnvironmentHexEncoded,
6608         QEnvironmentUnset and QEnvironmentReset.
6609         * common/environ.c (gdb_environ::operator=): Extend method to
6610         handle m_user_set_env_list and m_user_unset_env_list.
6611         (gdb_environ::clear): Likewise.
6612         (match_var_in_string): Change type of first parameter from 'char
6613         *' to 'const char *'.
6614         (gdb_environ::set): Extend method to handle
6615         m_user_set_env_list and m_user_unset_env_list.
6616         (gdb_environ::unset): Likewise.
6617         (gdb_environ::clear_user_set_env): New method.
6618         (gdb_environ::user_set_envp): Likewise.
6619         (gdb_environ::user_unset_envp): Likewise.
6620         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6621         m_user_unset_env_list on move constructor/assignment.
6622         (unset): Add new default parameter 'update_unset_list = true'.
6623         (clear_user_set_env): New method.
6624         (user_set_envp): Likewise.
6625         (user_unset_envp): Likewise.
6626         (m_user_set_env_list): New std::set.
6627         (m_user_unset_env_list): Likewise.
6628         * common/rsp-low.c (hex2str): New function.
6629         (bin2hex): New overload for bin2hex function.
6630         * common/rsp-low.c (hex2str): New prototype.
6631         (str2hex): New overload prototype.
6632         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6633         QEnvironmentUnset and QEnvironmentReset.
6634         (remote_protocol_features): Add QEnvironmentHexEncoded,
6635         QEnvironmentUnset and QEnvironmentReset packets.
6636         (send_environment_packet): New function.
6637         (extended_remote_environment_support): Likewise.
6638         (extended_remote_create_inferior): Call
6639         extended_remote_environment_support.
6640         (_initialize_remote): Add QEnvironmentHexEncoded,
6641         QEnvironmentUnset and QEnvironmentReset packet configs.
6642         * unittests/environ-selftests.c (gdb_selftest_env_var):
6643         New variable.
6644         (test_vector_initialization): New function.
6645         (test_init_from_host_environ): Likewise.
6646         (test_reinit_from_host_environ): Likewise.
6647         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6648         Likewise.
6649         (test_unset_set_empty_vector): Likewise.
6650         (test_vector_clear): Likewise.
6651         (test_std_move): Likewise.
6652         (test_move_constructor):
6653         (test_self_move): Likewise.
6654         (test_set_unset_reset): Likewise.
6655         (run_tests): Rewrite in terms of the functions above.
6656
6657 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
6658
6659         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6660         (adi_available): Use a temp variable of type CORE_ADDR as argument
6661         3 when calling target_auxv_search.
6662         (adi_normalize_address): Use masks and xor operators to calculate
6663         normalized address.
6664         (adi_read_versions, adi_write_versions, adi_print_versions)
6665         (do_examine, do_assign): Use paddress.
6666
6667 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
6668
6669         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6670         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6671         out of loop and add supply of FIR.
6672         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6673         add collect of FIR.
6674
6675 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
6676
6677         PR gdb/21827
6678         * cli/cli-script.c (define_command): Don't convert command name
6679         to lower case.
6680
6681 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
6682
6683         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6684         Update all callers accordingly. Remove all code blocks handling
6685         the case where DISPP is not NULL.
6686
6687 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6688
6689         PR symtab/22003
6690         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6691         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6692         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6693
6694 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6695
6696         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6697         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6698         (read_comp_units_from_section): New parameter abbrev_section, use
6699         read_and_check_comp_unit_head, allocate signatured_type if needed.
6700         (create_all_comp_units): Update read_comp_units_from_section caller.
6701
6702 2017-08-23  Pedro Alves  <palves@redhat.com>
6703
6704         PR remote/21852
6705         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6706         to null_ptid and switch to thread without reading the registers
6707         after adding the inferior.
6708
6709 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6710
6711         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6712         compile-gcc.
6713         * compile/compile.c (compile_gcc, show_compile_gcc): New.
6714         (compile_to_object): Implement compile_gcc.
6715         (_initialize_compile): Install "set compile-gcc".  Initialize
6716         compile_gcc.
6717
6718 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6719
6720         * compile/compile.c (compile_to_object): Conditionally call
6721         set_verbose.  Conditionally call compile or compile_v0.
6722
6723 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
6724
6725         * sparc64-tdep.h: (adi_normalize_address): New export.
6726         * sparc-nat.h: (open_adi_tag_fd): New export.
6727         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
6728         * sparc64-linux-tdep.c:
6729         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
6730         (sparc64_linux_handle_segmentation_fault): New function.
6731         (sparc64_linux_init_abi): Register
6732         sparc64_linux_handle_segmentation_fault
6733         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
6734         (sparc64_addr_bits_remove): New function.
6735         (sparc64_init_abi): Register sparc64_addr_bits_remove.
6736         (MAX_PROC_NAME_SIZE): New macro.
6737         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
6738         (sparc64adilist): New variable.
6739         (adi_proc_list): New variable.
6740         (find_adi_info): New function.
6741         (add_adi_info): New function.
6742         (get_adi_info_proc): New function.
6743         (get_adi_info): New function.
6744         (info_adi_command): New function.
6745         (read_maps_entry): New function.
6746         (adi_available): New function.
6747         (adi_normalize_address): New function.
6748         (adi_align_address): New function.
6749         (adi_convert_byte_count): New function.
6750         (adi_tag_fd): New function.
6751         (adi_is_addr_mapped): New function.
6752         (adi_read_versions): New function.
6753         (adi_write_versions): New function.
6754         (adi_print_versions): New function.
6755         (do_examine): New function.
6756         (do_assign): New function.
6757         (adi_examine_command): New function.
6758         (adi_assign_command): New function.
6759         (_initialize_sparc64_adi_tdep): New function.
6760
6761 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
6762
6763         * breakpoint.c (breakpoints_info): Rename to ...
6764         (info_breakpoints_command): ... this.
6765         (watchpoints_info): Rename to ...
6766         (info_watchpoints_command): ... this.
6767         (tracepoints_info): Rename to ...
6768         (info_tracepoints_command): ... this.
6769         (_initialize_breakpoint): Adjust.
6770         * dcache.c (dcache_info): Rename to ...
6771         (info_display_command): ... this.
6772         (_initialize_dcache): Adjust.
6773         * frame.h (args_info): Rename to ...
6774         (info_args_command): ... this.
6775         (locals_info): Rename to ...
6776         (info_locals_command): ... this.
6777         * infcmd.c (nofp_registers_info): Rename to ...
6778         (info_registers_command): ... this.
6779         (float_info): Rename to ...
6780         (info_float_command): ... this.
6781         (program_info): Rename to ...
6782         (info_program_command): ... this.
6783         (all_registers_info): Rename to ...
6784         (info_all_registers_command): ... this.
6785         (vector_info): Rename to ...
6786         (info_vector_command): ... this.
6787         (float_info): Rename to ...
6788         (info_float_command): ... this.
6789         (_initialize_infcmd): Adjust.
6790         * inferior.h (term_info): Rename to ...
6791         (info_terminal_command): ... this.
6792         * inflow.c (term_info): Rename to ...
6793         (info_terminal_command): ... this.
6794         (_initialize_inflow): Adjust.
6795         * infrun.c (signals_info): Rename to ...
6796         (info_signals_command): ... this.
6797         (_initialize_infrun): Adjust.
6798         * objc-lang.c (classes_info): Rename to ...
6799         (info_classes_command): ... this.
6800         (selectors_info): Rename to ...
6801         (info_selectors_command): ... this.
6802         (_initialize_objc_language): Adjust.
6803         * printcmd.c (sym_info): Rename to ...
6804         (info_symbol_command): ... this.
6805         (address_info): Rename to ...
6806         (info_address_command): ... this.
6807         (display_info): Rename to ...
6808         (info_display_command): ... this.
6809         (_initialize_printcmd): Adjust.
6810         * reverse.c (bookmarks_info): Rename to ...
6811         (info_breakpoints_command): ... this.
6812         (_initialize_reverse): Adjust.
6813         * ser-go32.c (dos_info): Rename to ...
6814         (info_serial_command): ... this.
6815         (_initialize_ser_dos): Adjust.
6816         * skip.c (skip_info): Rename to ...
6817         (info_skip_command): ... this.
6818         (_initialize_step_skip): Adjust.
6819         * source.c (line_info): Rename to ...
6820         (info_line_command): ... this.
6821         (source_info): Rename to ...
6822         (info_source_command)
6823         * stack.c (frame_info): Rename to ...
6824         (info_frame_command): ... this.
6825         (locals_info): Rename to ...
6826         (info_locals_command): ... this.
6827         (args_info): Rename to ...
6828         (info_args_command): ... this.
6829         (_initialize_stack): Adjust.
6830         * symtab.c (sources_info): Rename to ...
6831         (info_sources_command): ... this.
6832         (variables_info): Rename to ...
6833         (info_variables_command): ... this.
6834         (functions_info): Rename to ...
6835         (info_functions_command): ... this.
6836         (types_info): Rename to ...
6837         (info_types_command): ... this.
6838         (_initialize_symtab): Adjust.
6839         * target.c (target_info): Rename to ...
6840         (info_target_command): ... this.
6841         (initialize_targets): Adjust.
6842         * tracepoint.c (tvariables_info): Rename to ...
6843         (info_tvariables_command): ... this.
6844         (scope_info): Rename to ...
6845         (info_scope_command): ... this.
6846         (trace_dump_actions): Adjust.
6847         (_initialize_tracepoint): Adjust.
6848
6849 2017-08-22  Tom Tromey  <tom@tromey.com>
6850
6851         * breakpoint.h (install_breakpoint): Update.
6852         * breakpoint.c (add_solib_catchpoint): Update.
6853         (install_breakpoint): Change argument to a std::unique_ptr.
6854         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6855         (create_breakpoint_sal, create_breakpoint): Update.
6856         (watch_command_1, catch_exec_command_1)
6857         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6858         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6859         Return the breakpoint.
6860         (set_raw_breakpoint_without_location, set_raw_breakpoint)
6861         (new_single_step_breakpoint): Update.
6862         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
6863         std::unique_ptr.
6864         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6865         std::unique_ptr.
6866         * break-catch-sig.c (create_signal_catchpoint): Use
6867         std::unique_ptr.
6868         * ada-lang.c (create_ada_exception_catchpoint): Use
6869         std::unique_ptr.
6870
6871 2017-08-22  Tom Tromey  <tom@tromey.com>
6872
6873         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
6874
6875 2017-08-22  Tom Tromey  <tom@tromey.com>
6876
6877         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
6878         (lookup_partial_symbol): Update.
6879
6880 2017-08-22  Tom Tromey  <tom@tromey.com>
6881
6882         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
6883         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
6884         (find_and_open_source, symtab_to_fullname): Update.
6885         * psymtab.c (psymtab_to_fullname): Update.
6886
6887 2017-08-22  Tom Tromey  <tom@tromey.com>
6888
6889         * exec.c (exec_file_attach): Update.
6890         * linux-thread-db.c (try_thread_db_load): Update.
6891         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
6892         * utils.c (gdb_realpath): Change return type.
6893         (gdb_realpath_keepfile): Update.
6894         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
6895         (_initialize_utils): Register the new self test.
6896         * source.c (openp): Update.
6897         (find_and_open_source): Update.
6898         * nto-tdep.c (nto_find_and_open_solib): Update.
6899         * main.c (set_gdb_data_directory): Update.
6900         (captured_main_1): Update.
6901         * dwarf2read.c (dwarf2_get_dwz_file): Update
6902         (dw2_map_symbol_filenames): Update.
6903         * auto-load.c (auto_load_safe_path_vec_update): Update.
6904         (filename_is_in_auto_load_safe_path_vec): Change type of
6905         "filename_realp".
6906         (auto_load_objfile_script): Update.
6907         (file_is_auto_load_safe): Update.  Use std::string.
6908         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
6909
6910 2017-08-22  Tom Tromey  <tom@tromey.com>
6911
6912         * utils.c (gdb_realpath_keepfile): Return a
6913         gdb::unique_xmalloc_ptr.
6914         * exec.c (exec_file_attach): Update.
6915         * utils.h (gdb_realpath_keepfile): Return a
6916         gdb::unique_xmalloc_ptr.
6917
6918 2017-08-22  Tom Tromey  <tom@tromey.com>
6919
6920         * compile/compile.c (compile_file_command): Use
6921         gdb::unique_xmalloc_ptr, std::string.
6922         * utils.c (gdb_abspath): Change return type.
6923         * source.c (openp): Update.
6924         * objfiles.c (allocate_objfile): Update.
6925         * main.c (set_gdb_data_directory): Update.
6926         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
6927
6928 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
6929
6930         * cli-cmds.c (list_commands): List actual code around more than
6931         one location.
6932
6933 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
6934
6935         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
6936
6937 2017-08-21  Pedro Alves  <palves@redhat.com>
6938
6939         PR gdb/19487
6940         * c-exp.y (variable production): Handle function aliases.
6941         * minsyms.c (msymbol_is_text): New function.
6942         * minsyms.h (msymbol_is_text): Declare.
6943         * symtab.c (find_function_alias_target): New function.
6944         * symtab.h (find_function_alias_target): Declare.
6945
6946 2017-08-21  Pedro Alves  <palves@redhat.com>
6947
6948         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
6949         typedefs.
6950         * typeprint.c (whatis_exp): If handling "whatis", and expression
6951         is OP_TYPE, strip one typedef level.  Otherwise don't strip
6952         typedefs here.
6953         * valops.c (value_cast): Save "to" type before resolving
6954         stubs/typedefs.  Use that type as resulting value's type.
6955
6956 2017-08-18  Tom Tromey  <tom@tromey.com>
6957             Pedro Alves  <palves@redhat.com>
6958
6959         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
6960         * sol-thread.c (sol_thread_resume, sol_thread_wait)
6961         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
6962         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
6963         * proc-service.c (ps_xfer_memory): Use scoped_restore.
6964         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
6965         (linux_get_siginfo_data): Add "thread" argument.  Use
6966         scoped_restore.
6967         * linux-nat.c (linux_child_follow_fork)
6968         (check_stopped_by_watchpoint): Use scoped_restore.
6969         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
6970         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
6971         (restore_inferior_ptid, save_inferior_ptid): Remove.
6972         * btrace.c (btrace_fetch): Use scoped_restore.
6973         * bsd-uthread.c (bsd_uthread_fetch_registers)
6974         (bsd_uthread_store_registers): Use scoped_restore.
6975         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
6976         scoped_restore.
6977         * aix-thread.c (aix_thread_resume, aix_thread_wait)
6978         (aix_thread_xfer_partial): Use scoped_restore.
6979         * inferior.h (save_inferior_ptid): Remove.
6980
6981 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6982
6983         PR tdep/21818
6984         * arm-tdep.c (gdb_print_insn_arm): Mark
6985         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
6986
6987 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6988
6989         * NEWS: Mention GDBserver's new option "--selftest".
6990         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
6991         * selftest.c: Move it to common/selftest.c.
6992         * selftest.h: Move it to common/selftest.h.
6993         * selftest-arch.c (reset): New function.
6994         (tests_with_arch): Call reset.
6995
6996 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6997
6998         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
6999         instead of exception_fprintf and printf_filtered.
7000
7001 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7002
7003         * selftest.c (register_self_test): Rename it to
7004         selftests::register_test.
7005         (run_self_tests): selftest::run_tests.
7006         * selftest.h: Update declarations.
7007         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7008         selftests::register_test_foreach_arch.
7009         * selftest-arch.h: Update declaration.
7010         * aarch64-tdep.c: Update.
7011         * arm-tdep.c: Likewise.
7012         * disasm-selftests.c: Likewise.
7013         * dwarf2loc.c: Likewise.
7014         * dwarf2-frame.c: Likewise.
7015         * findvar.c: Likewise.
7016         * gdbarch-selftests.c: Likewise.
7017         * maint.c (maintenance_selftest): Likewise.
7018         * regcache.c: Likewise.
7019         * rust-exp.y: Likewise.
7020         * selftest-arch.c: Likewise.
7021         * unittests/environ-selftests.c: Likewise.
7022         * unittests/function-view-selftests.c: Likewise.
7023         * unittests/offset-type-selftests.c: Likewise.
7024         * unittests/optional-selftests.c: Likewise.
7025         * unittests/scoped_restore-selftests.c: Likewise.
7026         * utils-selftests.c: Likewise.
7027
7028 2017-08-17  Pedro Alves  <palves@redhat.com>
7029
7030         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7031         local.
7032
7033 2017-08-17  Pedro Alves  <palves@redhat.com>
7034
7035         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7036         field.
7037         (reset_die_in_process): Delete, replaced by ...
7038         (process_die_scope): ... this new class.  Make it responsible for
7039         freeing cu->line_header too.
7040         (process_die): Use process_die_scope.
7041         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7042         cu->line_header_die_owner.  Don't release the line header if it's
7043         owned by the CU.
7044         (setup_type_unit_groups): Make the CU/DIE own the line header.
7045         Don't release the line header here.
7046
7047 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
7048
7049         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7050
7051 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7052
7053         * NEWS: Mention new shortcuts for nexti and stepi in TUI
7054         Single-Key mode
7055
7056 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7057
7058         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7059         mode command list.
7060
7061 2017-08-15  Stafford Horne  <shorne@gmail.com>
7062
7063         * MAINTAINERS (Write After Approval): Add Stafford Horne.
7064
7065 2017-08-15  Stafford Horne  <shorne@gmail.com>
7066
7067         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7068
7069 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
7070
7071         PR gdb/21954
7072         * infcmd.c (unset_environment_command): Use the 'clear' method on
7073         the environment instead of resetting it.
7074
7075 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
7076
7077         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7078         platforms.
7079
7080 2017-08-14  Tom Tromey  <tom@tromey.com>
7081
7082         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7083         (print_binary_chars): Likewise.
7084         (BITS_IN_BYTES): Remove.
7085
7086 2017-08-14  Tom Tromey  <tom@tromey.com>
7087
7088         PR gdb/21675
7089         * valprint.c (LOW_ZERO): Change value to 034.
7090         (print_octal_chars): Add static_asserts for octal constants.
7091         * printcmd.c (print_scalar_formatted): Add 'd' case.
7092
7093 2017-08-11  Tom Tromey  <tom@tromey.com>
7094
7095         * symfile.c (add_symbol_file_command): Use std::vector.
7096
7097 2017-08-14  Tom Tromey  <tom@tromey.com>
7098
7099         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7100         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7101         std::move.
7102         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7103
7104 2017-08-11  Pedro Alves  <palves@redhat.com>
7105
7106         * infrun.c (process_event_stop_test): Adjust
7107         function_name_is_marked_for_skip call.
7108         * skip.c: Include <list>.
7109         (skiplist_entry): Make it a class with private fields, and
7110         getters/setters.
7111         (skiplist_entry_chain): Delete.
7112         (skiplist_entries): New.
7113         (skiplist_entry_count): Delete.
7114         (highest_skiplist_entry_num): New.
7115         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7116         (add_skiplist_entry): Delete.
7117         (skiplist_entry::skiplist_entry): New.
7118         (skiplist_entry::add_entry): New.
7119         (skip_file_command, skip_function): Adjust.
7120         (compile_skip_regexp): Delete.
7121         (skip_command): Don't compile regexp here.  Adjust to use
7122         skiplist_entry::add_entry.
7123         (skip_info): Adjust to use range-for and getters.
7124         (skip_enable_command, skip_disable_command): Adjust to use
7125         range-for and setters.
7126         (skip_delete_command): Adjust to use std::list.
7127         (add_skiplist_entry): Delete.
7128         (skip_file_p): Delete, refactored as ...
7129         (skiplist_entry::do_skip_file_p): ... this new method.
7130         (skip_gfile_p): Delete, refactored as ...
7131         (skiplist_entry::do_gskip_file_p): ... this new method.
7132         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7133         (skiplist_entry::skip_function_p): ... this new method.
7134         (function_name_is_marked_for_skip): Now returns bool, and takes
7135         the function sal by const reference.  Adjust to use range-for and
7136         skiplist_entry methods.
7137         (_initialize_step_skip): Remove references to
7138         skiplist_entry_chain, skiplist_entry_count.
7139         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7140         takes the function sal by const reference.
7141
7142 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7143
7144         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7145         (dwarf2_frame_cache): Remove reset_cache_cleanup.
7146         (dwarf2_frame_cache):
7147         * frame-unwind.c (frame_unwind_try_unwinder): Catch
7148         RETURN_MASK_ALL and set *this_case to NULL.
7149         * frame-unwind.h: Update comments.
7150
7151 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7152
7153         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7154         (dwarf2_frame_state_copy_regs): Remove.
7155         (dwarf2_frame_state_free_regs): Remove.
7156         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7157         (dwarf2_restore_rule): Call method .alloc_regs instead of
7158         dwarf2_frame_state_alloc_regs.
7159         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
7160         constructor.  Call std::move.
7161         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7162         (dwarf2_frame_cache): Likewise.
7163
7164         [GDB_SELF_TEST]: Include selftest.h and
7165         selftest-arch.h.
7166         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7167         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7168         execute_cfa_program_test.
7169
7170         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7171         copy ctor, assignment operator, move assignment.
7172         <alloc_regs>: New method.
7173         <swap>: New method.
7174         (struct dwarf2_frame_state): Delete dtor.
7175         (dwarf2_frame_state_alloc_regs): Remove declaration.
7176         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7177         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7178
7179 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7180
7181         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7182         (dwarf2_frame_state::dwarf2_frame_state): New.
7183         (dwarf2_frame_state::~dwarf2_frame_state): New.
7184         (dwarf2_fetch_cfa_info): Update.
7185         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
7186         rather than a pointer.  Update code.
7187         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7188         dtor.
7189         <data_align, code_align, retaddr_column>: Change them to const.
7190         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7191         to bool.
7192
7193 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7194
7195         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7196         <loc.exp>: New field.
7197         * dwarf2-frame.c (execute_cfa_program): Update.
7198         (dwarf2_frame_prev_register): Update.
7199
7200 2017-08-10  Pedro Alves  <palves@redhat.com>
7201
7202         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7203
7204 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7205
7206         * fbsd-nat.c (struct fbsd_fork_info): Remove.
7207         (fbsd_pending_children): Use std::list.
7208         (fbsd_remember_child): Likewise.
7209         (fbsd_is_child_pending): Likewise.
7210         (fbsd_pending_vfork_done): Use std::forward_list.
7211         (fbsd_add_vfork_done): Likewise.
7212         (fbsd_is_vfork_done_pending): Likewise.
7213         (fbsd_next_vfork_done): Likewise.
7214
7215 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7216
7217         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7218         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7219         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7220         for `mapfilename'.
7221         (fbsd_xfer_partial): Use gdb::byte_vector.
7222         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7223
7224 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7225
7226         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7227         "filestuff.h".
7228         (fbsd_find_memory_regions): Fix `mapfile' initialization.
7229
7230 2017-08-09  Tom Tromey  <tom@tromey.com>
7231
7232         * skip.c (skiplist_entry): New constructor.
7233         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7234         (skiplist_entry::file_is_glob): Now bool.
7235         (skiplist_entry::file, skiplist_entry::function): Now
7236         std::string.
7237         (make_skip_entry): Return a unique_ptr.  Use new.
7238         (free_skiplist_entry, free_skiplist_entry_cleanup)
7239         (make_free_skiplist_entry_cleanup): Remove.
7240         (skip_command, skip_disable_command, add_skiplist_entry)
7241         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7242         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7243         (function_name_is_marked_for_skip): Update.
7244         (skip_delete_command): Update.  Use delete.
7245
7246 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
7247
7248         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7249         (aarch64_linux_core_read_description): New function.
7250         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7251
7252 2017-08-09  Pedro Alves  <palves@redhat.com>
7253
7254         * cp-name-parser.y (cp_comp_to_string): Return a
7255         gdb::unique_xmalloc_ptr<char>.
7256         * cp-support.c (replace_typedefs_qualified_name)
7257         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7258         (cp_canonicalize_string_full): Use op= instead of explicit
7259         convertion.
7260         (cp_class_name_from_physname, method_name_from_physname)
7261         (cp_func_name, cp_remove_params): Adjust to use
7262         gdb::unique_xmalloc_ptr<char>.
7263         * cp-support.h (cp_comp_to_string): Return a
7264         gdb::unique_xmalloc_ptr<char>.
7265         * python/py-type.c (typy_lookup_type): Adjust to use
7266         gdb::unique_xmalloc_ptr<char>.
7267
7268 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
7269
7270         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7271
7272 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
7273             Yao Qi  <yao.qi@linaro.org>
7274
7275         * cp-support.c (cp_canonicalize_string_full): Use
7276         gdb::unique_xmalloc_ptr<char>.
7277         (cp_canonicalize_string): Likewise.
7278
7279 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7280
7281         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7282         * regformats/i386/amd64-avx-avx512.dat: Remove.
7283         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7284         * regformats/i386/amd64-avx-mpx.dat:Remove.
7285         * regformats/i386/amd64-avx.dat: Remove.
7286         * regformats/i386/amd64-mpx.dat: Remove.
7287         * regformats/i386/i386-avx-avx512.dat: Remove.
7288         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7289         * regformats/i386/i386-avx-mpx.dat: Remove.
7290         * regformats/i386/i386-mmx.dat: Remove.
7291         * regformats/i386/i386-mpx.dat: Remove.
7292
7293 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7294
7295         * amd64-tdep.h (tdesc_x32): Remove the declaration.
7296         * amd64-tdep.c: Don't include features/i386/x32*.c.
7297         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7298         functions.
7299         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7300         and i386/x32-avx-avx512.
7301         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7302         and i386/x32.xml.
7303         * features/i386/x32-avx-avx512.c: Removed.
7304         * features/i386/x32-avx-avx512.xml: Removed.
7305         * features/i386/x32-avx.c: Removed.
7306         * features/i386/x32-avx.xml: Removed.
7307         * features/i386/x32.c: Removed.
7308         * features/i386/x32.xml: Removed.
7309         * regformats/i386/x32-avx-avx512.dat: Removed.
7310         * regformats/i386/x32-avx.dat: Removed.
7311         * regformats/i386/x32.dat: Removed.
7312
7313 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7314
7315         PR breakpoints/21886
7316         * mem-break.c (default_memory_insert_breakpoint): Use
7317         `->placed_address' rather than `->reqstd_address' for the
7318         breakpoint location.
7319
7320 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7321
7322         * arch-utils.c (default_print_insn): Remove arch/mach/endian
7323         assertions.
7324
7325 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7326
7327         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7328         a union of `tdep_info', `tdesc_data' and `id'.
7329         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7330         rather than `info.tdep_info'.
7331         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7332         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7333         * i386-tdep.c (i386_gdbarch_init): Likewise.
7334         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7335         * mips-tdep.c (mips_gdbarch_init): Likewise.
7336         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7337         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7338         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7339         `info.tdep_info'.
7340         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7341         `info.tdep_info'.
7342         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7343         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7344         `info.tdep_info'.
7345         * spu-tdep.c (spu_gdbarch_init): Likewise.
7346         * gdbarch.h: Regenerate.
7347
7348 2017-08-07  Leszek Swirski  <leszeks@google.com>
7349
7350         PR symtab/20899
7351         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7352
7353 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
7354
7355         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7356         (gdbsim_open): Rename gdb_argv args object to argv.
7357
7358 2017-08-05  Tom Tromey  <tom@tromey.com>
7359
7360         * compile/compile-object-load.c (compile_object_load): Use
7361         gdb::unique_xmalloc_ptr.
7362         * cli/cli-dump.c (scan_filename): Rename from
7363         scan_filename_with_cleanup.  Change return type.
7364         (scan_expression): Rename from scan_expression_with_cleanup.
7365         Change return type.
7366         (dump_memory_to_file, dump_value_to_file, restore_command):
7367         Use gdb::unique_xmalloc_ptr.  Update.
7368         * cli/cli-cmds.c (find_and_open_script): Use
7369         gdb::unique_xmalloc_ptr.
7370         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7371         * symmisc.c (maintenance_print_symbols)
7372         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7373         * symfile.c (symfile_bfd_open, generic_load)
7374         (add_symbol_file_command, remove_symbol_file_command): Use
7375         gdb::unique_xmalloc_ptr.
7376         * source.c (openp): Use gdb::unique_xmalloc_ptr.
7377         * psymtab.c (maintenance_print_psymbols): Use
7378         gdb::unique_xmalloc_ptr.
7379         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7380         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7381         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7382         (reload_shared_libraries_1): Likewise.
7383
7384 2017-08-05  Tom Tromey  <tom@tromey.com>
7385
7386         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7387         (rust_op_vector, rust_set_vector): New typedefs.
7388         (current_parser): New global.
7389         (work_obstack): Change to pointer type.  Update all users.
7390         (rust_ast, pstate): Remove globals.
7391         (struct rust_parser): New.
7392         (%union) <params, field_inits>: Change type.
7393         (start, tuple_expr, unit_expr, struct_expr_list, literal)
7394         (field_expr, expr_list, maybe_expr_list, type_list): Update.
7395         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7396         (convert_params_to_types, convert_params_to_expression): Change
7397         type of "params".
7398         (ast_string): Change type of "fields".
7399         (rust_parse): Make a rust_parser.  Remove cleanups.
7400         (rust_lex_tests): Make and install an auto_obstack.
7401
7402 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7403
7404         * configure.srv (ipa_x32_linux_regobj): New.
7405         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7406         instead of X86_TDESC_AVX512.
7407         (initialize_low_tracepoint): Call
7408         init_registers_x32_avx_avx512_linux.
7409
7410 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7411
7412         * utils.h (gdb_argv): Add namespace std for nullptr_t.
7413
7414 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7415
7416         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7417
7418 2017-08-03  Tom Tromey  <tom@tromey.com>
7419
7420         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7421         Remove.
7422         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7423
7424 2017-08-03  Tom Tromey  <tom@tromey.com>
7425
7426         * python/py-param.c (compute_enum_values): Use gdb_argv.
7427
7428 2017-08-03  Tom Tromey  <tom@tromey.com>
7429
7430         * utils.h (struct gdb_argv_deleter): New.
7431         (gdb_argv): New class.
7432         * utils.c (gdb_argv::reset): New method.
7433         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7434         * tracefile.c (tsave_command): Use gdb_argv.
7435         * top.c (new_ui_command): Use gdb_argv.
7436         * symmisc.c (maintenance_print_symbols)
7437         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7438         * symfile.c (symbol_file_command, generic_load)
7439         (remove_symbol_file_command): Use gdb_argv.
7440         * stack.c (backtrace_command): Use gdb_argv.
7441         * source.c (add_path, show_substitute_path_command)
7442         (unset_substitute_path_command, set_substitute_path_command):
7443         Use gdb_argv.
7444         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
7445         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7446         * remote.c (extended_remote_run, remote_put_command)
7447         (remote_get_command, remote_delete_command): Use gdb_argv.
7448         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7449         (gdbsim_open): Use gdb_argv.
7450         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7451         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7452         * procfs.c (procfs_info_proc): Use gdb_argv.
7453         * interps.c (interpreter_exec_cmd): Use gdb_argv.
7454         * infrun.c (handle_command): Use gdb_argv.
7455         * inferior.c (add_inferior_command, clone_inferior_command):
7456         Use gdb_argv.
7457         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7458         * exec.c (exec_file_command): Use gdb_argv.
7459         * cli/cli-cmds.c (alias_command): Use gdb_argv.
7460         * compile/compile.c (build_argc_argv): Use gdb_argv.
7461
7462 2017-08-03  Tom Tromey  <tom@tromey.com>
7463
7464         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7465
7466 2017-08-03  Tom Tromey  <tom@tromey.com>
7467
7468         * python/python.c (compute_python_string): Return std::string.
7469         (gdbpy_eval_from_control_command): Update.
7470         (do_start_initialization): Use std::string.
7471         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7472         xstrprintf.
7473         * python/py-breakpoint.c (local_setattro): Use string_printf, not
7474         xstrprintf.
7475
7476 2017-08-03  Tom Tromey  <tom@tromey.com>
7477
7478         * top.h (do_restore_instream_cleanup): Remove.
7479         * top.c (do_restore_instream_cleanup): Remove.
7480         (read_command_file): Use scoped_restore.
7481         * cli/cli-script.c (execute_user_command): Use scoped_restore.
7482
7483 2017-08-03  Tom Tromey  <tom@tromey.com>
7484
7485         * cli/cli-script.c (execute_user_command)
7486         (execute_control_command): Use scoped_restore.
7487
7488 2017-08-03  Tom Tromey  <tom@tromey.com>
7489
7490         * cli/cli-script.c (do_restore_user_call_depth): Remove.
7491         (execute_user_command): Remove user_call_depth; use
7492         user_args_stack's size instead.
7493
7494 2017-08-03  Tom Tromey  <tom@tromey.com>
7495
7496         * top.h (in_user_command): Remove.
7497         * top.c (in_user_command): Remove.
7498         * cli/cli-script.c (do_restore_user_call_depth)
7499         (execute_user_command): Update.
7500
7501 2017-08-03  Tom Tromey  <tom@tromey.com>
7502
7503         * valops.c (search_struct_method): Use gdb::byte_vector.
7504         * valarith.c (value_concat): Use std::vector.
7505         * target.c (memory_xfer_partial): Use gdb::byte_vector.
7506         (simple_search_memory): Likewise.
7507         * printcmd.c (find_string_backward): Use gdb::byte_vector.
7508         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7509         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7510         * elfread.c (elf_rel_plt_read): Use std::string.
7511         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7512         * cli/cli-dump.c (restore_section_callback): Use
7513         gdb::byte_vector.
7514
7515 2017-08-03  Tom Tromey  <tom@tromey.com>
7516
7517         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7518
7519 2017-08-03  Tom Tromey  <tom@tromey.com>
7520
7521         * tui/tui-regs.c (tui_restore_gdbout): Remove.
7522         (tui_register_format): Use scoped_restore.
7523
7524 2017-08-03  Tom Tromey  <tom@tromey.com>
7525
7526         * reverse.c (exec_direction_default): Remove.
7527         (exec_reverse_once): Use scoped_restore.
7528         * remote.c (restore_remote_timeout): Remove.
7529         (remote_flash_erase, remote_flash_write, remote_flash_done)
7530         (readchar, remote_serial_write): Use scoped_restore.
7531         * cli/cli-script.c (struct source_cleanup_lines_args)
7532         (source_cleanup_lines): Remove.
7533         (script_from_file): Use scoped_restore.
7534         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7535         (source_command): Use scoped_restore.
7536
7537 2017-08-03  Tom Tromey  <tom@tromey.com>
7538
7539         * utils.h (make_cleanup_free_so): Remove.
7540         * utils.c (do_free_so, make_cleanup_free_so): Remove.
7541         * solist.h (struct so_deleter): New.
7542         (so_list_up): New typedef.
7543         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7544
7545 2017-08-03  Tom Tromey  <tom@tromey.com>
7546
7547         * utils.h (make_cleanup_restore_current_language): Remove.
7548         * utils.c (do_restore_current_language)
7549         (make_cleanup_restore_current_language): Remove.
7550         * parse.c (parse_exp_in_context_1)
7551         (parse_expression_with_language): Use
7552         scoped_restore_current_language.
7553         * mi/mi-main.c (mi_cmd_execute): Use
7554         scoped_restore_current_language.
7555         * language.h (scoped_restore_current_language): New class.
7556
7557 2017-08-03  Tom Tromey  <tom@tromey.com>
7558
7559         * compile/compile.c (cleanup_unlink_file): Remove.
7560         (compile_to_object): Use gdb::unlinker.
7561         (eval_compile_command): Likewise.
7562
7563 2017-08-03  Tom Tromey  <tom@tromey.com>
7564
7565         * utils.h (make_cleanup_fclose): Remove.
7566         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7567
7568 2017-08-03  Tom Tromey  <tom@tromey.com>
7569
7570         * top.c (open_terminal_stream): Return gdb_file_up.
7571         (new_ui_command): Update.
7572
7573 2017-08-03  Tom Tromey  <tom@tromey.com>
7574
7575         * source.c (print_source_lines_base, forward_search_command)
7576         (reverse_search_command): Use gdb_file_up.
7577
7578 2017-08-03  Tom Tromey  <tom@tromey.com>
7579
7580         * fbsd-nat.c (fbsd_find_memory_regions): Update.
7581
7582 2017-08-03  Tom Tromey  <tom@tromey.com>
7583
7584         * cli/cli-cmds.c (find_and_open_script): Change return type.
7585         Remove "streamp" and "full_path" parameters.
7586         (source_script_with_search): Update.
7587         * auto-load.c (source_script_file): Update.
7588         * cli/cli-cmds.h (find_and_open_script): Change type.
7589         (open_script): New struct.
7590
7591 2017-08-03  Tom Tromey  <tom@tromey.com>
7592
7593         * xml-support.c (xml_fetch_content_from_file): Update.
7594         * ui-file.c (stdio_file::open): Update.
7595         * tracefile-tfile.c (tfile_start): Update.
7596         * remote.c (remote_file_put, remote_file_get): Update.
7597         * nat/linux-procfs.c (linux_proc_get_int)
7598         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7599         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7600         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7601         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7602         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7603         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7604         * linux-nat.c (linux_proc_pending_signals): Update.
7605         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7606         (file_closer): Remove.
7607         * compile/compile.c (compile_to_object): Update.
7608         * common/filestuff.h (struct gdb_file_deleter): New.
7609         (gdb_file_up): New typedef.
7610         (gdb_fopen_cloexec): Change return type.
7611         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7612         * cli/cli-dump.c (fopen_with_cleanup): Remove.
7613         (dump_binary_file, restore_binary_file): Update.
7614         * auto-load.c (auto_load_objfile_script_1): Update.
7615
7616 2017-08-03  Tom Tromey  <tom@tromey.com>
7617
7618         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7619         (info_static_tracepoint_markers_command): Likewise.
7620         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7621         * skip.c (skip_info): Use ui_out_emit_table.
7622         * progspace.c (print_program_space): Use ui_out_emit_table.
7623         * osdata.c (info_osdata): Use ui_out_emit_table.
7624         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7625         ui_out_emit_table.
7626         * linux-thread-db.c (info_auto_load_libthread_db): Use
7627         ui_out_emit_table.
7628         * inferior.c (print_inferior): Use ui_out_emit_table.
7629         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7630         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7631         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7632         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7633         * ui-out.h (class ui_out_emit_table): New.
7634
7635 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
7636
7637         * mips-tdep.c (mips_fpu_type_str): New function.
7638         (mips_dump_tdep): Call it.
7639
7640 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
7641
7642         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7643         `->mips_fpu_type'.
7644
7645 2017-07-31  Xavier Roirand  <roirand@adacore.com>
7646
7647         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7648
7649 2017-07-27  Xavier Roirand  <roirand@adacore.com>
7650
7651         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7652
7653 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7654
7655         * cli/cli-cmds.c (maintenancechecklist): New variable.
7656         * gdbcmd.h (maintenancechecklist): Declare it.
7657         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7658         Call i386_linux_read_description with different masks.
7659         * maint.c (maintenance_check_command): New function.
7660         (_initialize_maint_cmds): Call add_prefix_cmd.
7661         * target-descriptions.c (tdesc_reg): override operator != and ==.
7662         (tdesc_type): Likewise.
7663         (tdesc_feature): Likewise.
7664         (target_desc): Likewise.
7665         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7666         (maintenance_check_xml_descriptions): New function.
7667         (_initialize_target_descriptions) Add command "xml-descriptions".
7668         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7669
7670 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7671
7672         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7673         Include features/i386/32bit-*.c.
7674         (i386_linux_read_description): Generate target description if it
7675         doesn't exist.
7676         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7677         functions.
7678         * features/i386/32bit-linux.c: Re-generated.
7679         * features/i386/32bit-sse.c: Likewise.
7680         * target-descriptions.c (print_c_feature::visit): Print code to
7681         set register number if needed.
7682         (print_c_feature) <m_next_regnum>: New field.
7683
7684 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7685
7686         * features/Makefile (CFILES): Rename with TDESC_CFILES.
7687         (FEATURE_XMLFILES): New.
7688         (FEATURE_CFILES): New.
7689         New rules.
7690         (clean-cfiles): Remove generated c files.
7691         * features/i386/32bit-avx.c: Generated.
7692         * features/i386/32bit-avx512.c: Generated.
7693         * features/i386/32bit-core.c: Generated.
7694         * features/i386/32bit-linux.c: Generated.
7695         * features/i386/32bit-mpx.c: Generated.
7696         * features/i386/32bit-pkeys.c: Generated.
7697         * features/i386/32bit-sse.c: Generated.
7698         * target-descriptions.c: Include algorithm.
7699         (tdesc_element_visitor): Add method visit_end.
7700         (print_c_tdesc): Implement visit_end.
7701         (print_c_tdesc:: m_filename_after_features): Move it to
7702         protected.
7703         (print_c_feature): New class.
7704         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7705         name starts with "i386/32bit-".
7706
7707 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7708
7709         * target-descriptions.c (tdesc_element_visitor): New class.
7710         (tdesc_element): New class.
7711         (tdesc_reg): Inherit from tdesc_element.
7712         (tdesc_reg::accept): New function.
7713         (tdesc_type): Inherit from tdesc_element.
7714         (tdesc_type::accept): New function.
7715         (tdesc_feature): Inherit from tdesc_element.
7716         (tdesc_feature::accept): New function.
7717         (target_desc): Inherit from tdesc_element.
7718         (target_desc::target_desc): New.
7719         (target_desc::~target_desc): New.
7720         (target_desc::accept): New.
7721         (allocate_target_description): Use new.
7722         (free_target_description): Use delete.
7723         (print_c_tdesc): New class.
7724         (maint_print_c_tdesc_cmd): Adjust.
7725
7726         * features/aarch64.c: Re-generated.
7727         * features/arc-arcompact.c: Re-generated.
7728         * features/arc-v2.c: Re-generated.
7729         * features/arm/arm-with-iwmmxt.c: Re-generated.
7730         * features/arm/arm-with-m.c: Re-generated.
7731         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
7732         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
7733         * features/arm/arm-with-neon.c: Re-generated.
7734         * features/arm/arm-with-vfpv2.c: Re-generated.
7735         * features/arm/arm-with-vfpv3.c: Re-generated.
7736         * features/i386/amd64-avx-avx512.c: Re-generated.
7737         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7738         * features/i386/amd64-avx.c: Re-generated.
7739         * features/i386/amd64-avx-linux.c: Re-generated.
7740         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
7741         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7742         * features/i386/amd64-avx-mpx.c: Re-generated.
7743         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
7744         * features/i386/amd64.c: Re-generated.
7745         * features/i386/amd64-linux.c: Re-generated.
7746         * features/i386/amd64-mpx.c: Re-generated.
7747         * features/i386/amd64-mpx-linux.c: Re-generated.
7748         * features/i386/i386-avx-avx512.c: Re-generated.
7749         * features/i386/i386-avx-avx512-linux.c: Re-generated.
7750         * features/i386/i386-avx.c: Re-generated.
7751         * features/i386/i386-avx-linux.c: Re-generated.
7752         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
7753         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
7754         * features/i386/i386-avx-mpx.c: Re-generated.
7755         * features/i386/i386-avx-mpx-linux.c: Re-generated.
7756         * features/i386/i386.c: Re-generated.
7757         * features/i386/i386-linux.c: Re-generated.
7758         * features/i386/i386-mmx.c: Re-generated.
7759         * features/i386/i386-mmx-linux.c: Re-generated.
7760         * features/i386/i386-mpx.c: Re-generated.
7761         * features/i386/i386-mpx-linux.c: Re-generated.
7762         * features/i386/x32-avx-avx512.c: Re-generated.
7763         * features/i386/x32-avx-avx512-linux.c: Re-generated.
7764         * features/i386/x32-avx.c: Re-generated.
7765         * features/i386/x32-avx-linux.c: Re-generated.
7766         * features/i386/x32.c: Re-generated.
7767         * features/i386/x32-linux.c: Re-generated.
7768         * features/microblaze.c: Re-generated.
7769         * features/microblaze-with-stack-protect.c: Re-generated.
7770         * features/mips64-dsp-linux.c: Re-generated.
7771         * features/mips64-linux.c: Re-generated.
7772         * features/mips-dsp-linux.c: Re-generated.
7773         * features/mips-linux.c: Re-generated.
7774         * features/nds32.c: Re-generated.
7775         * features/nios2.c: Re-generated.
7776         * features/nios2-linux.c: Re-generated.
7777         * features/rs6000/powerpc-32.c: Re-generated.
7778         * features/rs6000/powerpc-32l.c: Re-generated.
7779         * features/rs6000/powerpc-403.c: Re-generated.
7780         * features/rs6000/powerpc-403gc.c : Re-generated.
7781         * features/rs6000/powerpc-405.c: Re-generated.
7782         * features/rs6000/powerpc-505.c: Re-generated.
7783         * features/rs6000/powerpc-601.c: Re-generated.
7784         * features/rs6000/powerpc-602.c: Re-generated.
7785         * features/rs6000/powerpc-603.c: Re-generated.
7786         * features/rs6000/powerpc-604.c: Re-generated.
7787         * features/rs6000/powerpc-64.c: Re-generated.
7788         * features/rs6000/powerpc-64l.c: Re-generated.
7789         * features/rs6000/powerpc-7400.c: Re-generated.
7790         * features/rs6000/powerpc-750.c: Re-generated.
7791         * features/rs6000/powerpc-860.c: Re-generated.
7792         * features/rs6000/powerpc-altivec32.c: Re-generated.
7793         * features/rs6000/powerpc-altivec32l.c: Re-generated.
7794         * features/rs6000/powerpc-altivec64.c: Re-generated.
7795         * features/rs6000/powerpc-altivec64l.c: Re-generated.
7796         * features/rs6000/powerpc-cell32l.c: Re-generated.
7797         * features/rs6000/powerpc-cell64l.c: Re-generated.
7798         * features/rs6000/powerpc-e500.c: Re-generated.
7799         * features/rs6000/powerpc-e500l.c: Re-generated.
7800         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
7801         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
7802         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
7803         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
7804         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
7805         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
7806         * features/rs6000/powerpc-vsx32.c: Re-generated.
7807         * features/rs6000/powerpc-vsx32l.c: Re-generated.
7808         * features/rs6000/powerpc-vsx64.c: Re-generated.
7809         * features/rs6000/powerpc-vsx64l.c: Re-generated.
7810         * features/rs6000/rs6000.c: Re-generated.
7811         * features/s390-linux32.c: Re-generated.
7812         * features/s390-linux32v1.c: Re-generated.
7813         * features/s390-linux32v2.c: Re-generated.
7814         * features/s390-linux64.c: Re-generated.
7815         * features/s390-linux64v1.c: Re-generated.
7816         * features/s390-linux64v2.c: Re-generated.
7817         * features/s390-te-linux64.c: Re-generated.
7818         * features/s390-tevx-linux64.c: Re-generated.
7819         * features/s390-vx-linux64.c: Re-generated.
7820         * features/s390x-linux64.c: Re-generated.
7821         * features/s390x-linux64v1.c: Re-generated.
7822         * features/s390x-linux64v2.c: Re-generated.
7823         * features/s390x-te-linux64.c: Re-generated.
7824         * features/s390x-tevx-linux64.c: Re-generated.
7825         * features/s390x-vx-linux64.c: Re-generated.
7826         * features/sparc/sparc32-solaris.c: Re-generated.
7827         * features/sparc/sparc64-solaris.c: Re-generated.
7828         * features/tic6x-c62x.c: Re-generated.
7829         * features/tic6x-c62x-linux.c: Re-generated.
7830         * features/tic6x-c64x.c: Re-generated.
7831         * features/tic6x-c64x-linux.c: Re-generated.
7832         * features/tic6x-c64xp.c: Re-generated.
7833         * features/tic6x-c64xp-linux.c: Re-generated.
7834
7835 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7836
7837         * i386-linux-tdep.c (i386_linux_read_description): New function.
7838         (i386_linux_core_read_description): Call
7839         i386_linux_read_description.
7840         * i386-linux-tdep.h (i386_linux_read_description): Declare.
7841         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
7842         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
7843         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
7844         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
7845         * x86-linux-nat.c (x86_linux_read_description): Call
7846         i386_linux_read_description.
7847
7848 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7849
7850         * NEWS: Mention it.
7851         * features/Makefile (%.c: %.xml): Pass the xml file name to
7852         command "maint print c-tdesc".
7853         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7854         name from 'arg'.
7855
7856 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7857
7858         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
7859         in-class initialization.
7860         (tdesc_create_feature): Call new instead of XCNEW.
7861         (free_target_description): Ue delete.
7862
7863 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
7864
7865         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
7866
7867 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7868
7869         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
7870         constant.
7871         (amd64_x32_init_abi): Likewise.
7872         * amd64-tdep.h (amd64_init_abi): Update declaration.
7873         (amd64_x32_init_abi): Likewise.
7874
7875 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7876
7877         PR tdep/21717
7878         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
7879         condition for FPSCR.
7880         (arm_linux_store_inferior_registers): Likewise.
7881
7882 2017-07-22  Tom Tromey  <tom@tromey.com>
7883
7884         * break-catch-syscall.c (struct catch_syscall_inferior_data)
7885         <syscalls_counts>: Now a std::vector.
7886         (get_catch_syscall_inferior_data): Use "new".
7887         (catch_syscall_inferior_data_cleanup): Use "delete".
7888         (insert_catch_syscall, remove_catch_syscall)
7889         (clear_syscall_counts): Update.
7890
7891 2017-07-22  Tom Tromey  <tom@tromey.com>
7892
7893         * break-catch-syscall.c (syscall_catchpoint)
7894         <syscalls_to_be_caught>: Now a std::vector<int>
7895         (~syscall_catchpoint): Remove.
7896         (insert_catch_syscall, remove_catch_syscall)
7897         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
7898         (print_mention_catch_syscall, print_recreate_catch_syscall):
7899         Update.
7900         (create_syscall_event_catchpoint): Change type of "filter"
7901         parameter.
7902         (catch_syscall_split_args): Return a std::vector.
7903         (catch_syscall_command_1, catching_syscall_number_1): Update.
7904
7905 2017-07-22  Tom Tromey  <tom@tromey.com>
7906
7907         * break-catch-throw.c (struct exception_catchpoint)
7908         <exception_rx>: Now a std::string.
7909         (~exception_catchpoint): Remove.
7910         (print_one_detail_exception_catchpoint): Update.
7911         (handle_gnu_v3_exceptions): Change type of except_rx.
7912         (extract_exception_regexp): Return a std::string.
7913         (catch_exception_command_1): Update.
7914
7915 2017-07-22  Tom Tromey  <tom@tromey.com>
7916
7917         * break-catch-sig.c (gdb_signal_type): Remove typedef.
7918         (struct signal_catchpoint) <signals_to_be_caught>: Now a
7919         std::vector.
7920         <catch_all>: Now a bool.
7921         (~signal_catchpoint): Remove.
7922         (signal_catchpoint_insert_location)
7923         (signal_catchpoint_remove_location)
7924         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
7925         (signal_catchpoint_print_mention)
7926         (signal_catchpoint_print_recreate)
7927         (signal_catchpoint_explains_signal): Update.
7928         (create_signal_catchpoint): Change type of "filter" and
7929         "catch_all".
7930         (catch_signal_split_args): Return a std::vector.  Change type of
7931         "catch_all".
7932         (catch_signal_command): Update.
7933
7934 2017-07-20  Pedro Alves  <palves@redhat.com>
7935
7936         * ada-lang.c (ada_language_defn): Make extern.
7937         (_initialize_ada_language): Remove add_language call.
7938         * c-lang.c (c_language_defn, cplus_language_defn)
7939         (asm_language_defn, minimal_language_defn): Make extern.
7940         (_initialize_c_language): Delete.
7941         * completer.c (compare_cstrings): Delete, moved to utils.h.
7942         * d-lang.c (d_language_defn): Make extern.
7943         (_initialize_d_language): Remove add_language calls.
7944         * defs.h (enum language): Add comment.
7945         * f-lang.c (f_language_defn): Make extern.
7946         (_initialize_f_language): Remove add_language call.
7947         * go-lang.c (go_language_defn): Make extern.
7948         (_initialize_go_language): Remove add_language call.
7949         * language.c: Include <algorithm>.
7950         (languages): Redefine as const array.
7951         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
7952         (set_language_command): Handle "local".  Use for-range loop.
7953         (set_language): Remove loop.
7954         (language_enum): Rewrite.
7955         (language_def, language_str): Remove loops.
7956         (add_language): Delete.
7957         (add_set_language_command): New, based on add_languages.
7958         (skip_language_trampoline): Adjust.
7959         (local_language_defn): Delete.
7960         (language_gdbarch_post_init): Adjust.
7961         (_initialize_language): Remove add_language calls.  Call
7962         add_set_language_command.
7963         * language.h (add_language): Delete.
7964         (auto_language_defn)
7965         (unknown_language_defn, minimal_language_defn, ada_language_defn)
7966         (asm_language_defn, c_language_defn, cplus_language_defn)
7967         (d_language_defn, f_language_defn, go_language_defn)
7968         (m2_language_defn, objc_language_defn, opencl_language_defn)
7969         (pascal_language_defn, rust_language_defn): Declare.
7970         * m2-lang.c (m2_language_defn): Make extern.
7971         (_initialize_m2_language): Remove add_language call.
7972         * objc-lang.c (objc_language_defn): Make extern.
7973         (_initialize_objc_language): Remove add_language call.
7974         * opencl-lang.c (opencl_language_defn): Make extern.
7975         (_initialize_opencl_language): Remove add_language call.
7976         * p-lang.c (pascal_language_defn): Make extern.
7977         (_initialize_pascal_language): Delete.
7978         * rust-lang.c (rust_language_defn): Make extern.
7979         (_initialize_rust_language): Delete.
7980         * utils.h (compare_cstrings): New static inline function.
7981
7982 2017-07-20  Pedro Alves  <palves@redhat.com>
7983
7984         * ada-lang.c (ada_to_fixed_type_1): Adjust.
7985         (get_var_value): Constify parameters.
7986         (get_int_var_value): Change prototype.
7987         (to_fixed_range_type): Adjust.
7988         * ada-lang.h (get_int_var_value): Change prototype.
7989
7990 2017-07-20  Pedro Alves  <palves@redhat.com>
7991
7992         * dwarf2read.c (dw2_lookup_symbol): Use
7993         SYMBOL_MATCHES_SEARCH_NAME.
7994         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
7995
7996 2017-07-20  Pedro Alves  <palves@redhat.com>
7997
7998         * block.c (block_iter_name_step, block_iter_name_first)
7999         (block_iter_name_next): Delete.
8000         (block_lookup_symbol_primary): Adjust to use
8001         dict_iter_match_first/dict_iter_match_next.
8002         * block.h (block_iter_name_first, block_iter_name_next): Delete
8003         declarations.
8004         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8005         dict_iter_match_first/dict_iter_match_next.
8006
8007 2017-07-20  Pedro Alves  <palves@redhat.com>
8008
8009         * cp-support.c (cp_find_first_component_aux): Add missing case for
8010         end of string.
8011
8012 2017-07-18  David Blaikie  <dblaikie@gmail.com>
8013
8014         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8015         of dwo_cu's dwo_file.
8016
8017 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8018
8019         * remote.c (store_registers_using_G): Remove one line comment.
8020
8021 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8022
8023         * regcache.c (regcache_cpy): Simplify it.
8024         (regcache::cpy_no_passthrough): Remove it.
8025         * regcache.h (cpy_no_passthrough): Remove it.
8026         (regcache_dup, regcache_cpy): Update comments.
8027
8028 2017-07-18  Pedro Alves  <palves@redhat.com>
8029
8030         * remote-sim.c (sim_command_completer): Adjust to work with a
8031         completion_tracker instead of a VEC.
8032
8033 2017-07-17  Pedro Alves  <palves@redhat.com>
8034
8035         * completer.c (complete_source_filenames): New function.
8036         (complete_address_and_linespec_locations): New function.
8037         (location_completer): Use complete_address_and_linespec_locations.
8038         (completion_tracker::build_completion_result): Honor the tracker's
8039         request to suppress append.
8040         * completer.h (completion_tracker::suppress_append_ws)
8041         (completion_tracker::set_suppress_append_ws): New methods.
8042         (completion_tracker::m_suppress_append_ws): New field.
8043         (complete_source_filenames): New declaration.
8044         * linespec.c (linespec_complete_what): New.
8045         (struct ls_parser) <complete_what, completion_word,
8046         completion_quote_char, completion_quote_end, completion_tracker>:
8047         New fields.
8048         (string_find_incomplete_keyword_at_end): New.
8049         (linespec_lexer_lex_string): Record quote char.  If in completion
8050         mode, don't throw.
8051         (linespec_lexer_consume_token): Advance the completion word point.
8052         (linespec_lexer_peek_token): Save/restore completion info.
8053         (save_stream_and_consume_token): New.
8054         (set_completion_after_number): New.
8055         (linespec_parse_basic): Set what to complete next depending on
8056         token.  Handle function and label completions specially.
8057         (parse_linespec): Disable objc shortcut in completion mode.  Set
8058         what to complete next depending on token type.  Skip keyword if in
8059         completion mode.
8060         (complete_linespec_component, linespec_complete): New.
8061         * linespec.h (linespec_complete): Declare.
8062
8063 2017-07-17  Pedro Alves  <palves@redhat.com>
8064
8065         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8066         Handle 'operator<' / 'operator<<'.
8067
8068 2017-07-17  Pedro Alves  <palves@redhat.com>
8069
8070         * completer.c (collect_explicit_location_matches): Handle
8071         MATCH_LABEL.
8072         (convert_explicit_location_to_linespec): New, factored out from
8073         ...
8074         (convert_explicit_location_to_sals): ... this.
8075         (complete_label): New.
8076         (linespec_complete_label, find_label_symbols_in_block): New.
8077         (find_label_symbols): Add completion_mode parameter and adjust to
8078         call find_label_symbols_in_block.
8079         * linespec.h (linespec_complete_label): Declare.
8080
8081 2017-07-17  Pedro Alves  <palves@redhat.com>
8082
8083         * ada-lang.c (ada_collect_symbol_completion_matches): Add
8084         complete_symbol_mode parameter.
8085         * cli/cli-cmds.c (complete_command): Get the completion result out
8086         of the handle_brkchars tracker if used a custom word point.
8087         * completer.c: Include "linespec.h".
8088         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8089         (advance_to_expression_complete_word_point): New.
8090         (completion_tracker::completes_to_completion_word): New.
8091         (complete_files_symbols): Pass down
8092         complete_symbol_mode::EXPRESSION.
8093         (explicit_options, probe_options): New.
8094         (collect_explicit_location_matches): Complete on the
8095         explictit_loc->foo instead of word.  Use
8096         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
8097         keyword and options completions.
8098         (backup_text_ptr): Delete.
8099         (skip_keyword): New.
8100         (complete_explicit_location): Remove 'word' parameter.  Add
8101         language, quoted_arg_start and quoted_arg_end parameters.
8102         Rewrite, parsing left to right.
8103         (location_completer): Rewrite.
8104         (location_completer_handle_brkchars): New function.
8105         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8106         (enum complete_line_internal_reason): Adjust comments.
8107         (completion_tracker::discard_completions): New.
8108         (completer_handle_brkchars_func_for_completer): Handle
8109         location_completer.
8110         (gdb_custom_word_point_brkchars)
8111         (gdb_org_rl_basic_quote_characters): New.
8112         (gdb_completion_word_break_characters_throw)
8113         (completion_find_completion_word): Handle trackers that use a
8114         custom word point.
8115         (completion_tracker::advance_custom_word_point_by): New.
8116         (completion_tracker::build_completion_result): Don't rely on
8117         readline appending the quote char.
8118         (gdb_rl_attempted_completion_function_throw): Handle trackers that
8119         use a custom word point.
8120         (gdb_rl_attempted_completion_function): Restore
8121         rl_basic_quote_characters.
8122         * completer.h (class completion_tracker): Extend intro comment.
8123         (completion_tracker::set_quote_char)
8124         (completion_tracker::quote_char)
8125         (completion_tracker::set_use_custom_word_point)
8126         (completion_tracker::use_custom_word_point)
8127         (completion_tracker::custom_word_point)
8128         (completion_tracker::set_custom_word_point)
8129         (completion_tracker::advance_custom_word_point_by)
8130         (completion_tracker::completes_to_completion_word)
8131         (completion_tracker::discard_completions): New methods.
8132         (completion_tracker::m_quote_char)
8133         (completion_tracker::m_use_custom_word_point)
8134         (completion_tracker::m_custom_word_point): New fields.
8135         (advance_to_expression_complete_word_point): Declare.
8136         * f-lang.c (f_collect_symbol_completion_matches): Add
8137         complete_symbol_mode parameter.
8138         * language.h (struct language_defn)
8139         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8140         parameter.
8141         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
8142         (linespec_complete_function): New function.
8143         (linespec_lexer_lex_keyword): Adjust.
8144         * linespec.h (linespec_keywords, linespec_complete_function): New
8145         declarations.
8146         * location.c (find_end_quote): New function.
8147         (explicit_location_lex_one): Add explicit_completion_info
8148         parameter.  Save quoting info.  Don't throw if being called for
8149         completion.  Don't handle Ada operators here.
8150         (is_cp_operator, skip_op_false_positives, first_of)
8151         (explicit_location_lex_one_function): New function.
8152         (string_to_explicit_location): Replace 'dont_throw' parameter with
8153         an explicit_completion_info pointer parameter.  Handle it.  Don't
8154         use explicit_location_lex_one to lex function names.  Use
8155         explicit_location_lex_one_function instead.
8156         * location.h (struct explicit_completion_info): New.
8157         (string_to_explicit_location): Replace 'dont_throw' parameter with
8158         an explicit_completion_info pointer parameter.
8159         * symtab.c (default_collect_symbol_completion_matches_break_on):
8160         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
8161         (default_collect_symbol_completion_matches)
8162         (collect_symbol_completion_matches): Add complete_symbol_mode
8163         parameter.
8164         (collect_symbol_completion_matches_type): Pass down
8165         complete_symbol_mode::EXPRESSION.
8166         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8167         parameter.  Handle LINESPEC mode.
8168         * symtab.h (complete_symbol_mode): New.
8169         (default_collect_symbol_completion_matches_break_on)
8170         (default_collect_symbol_completion_matches)
8171         (collect_symbol_completion_matches)
8172         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8173         parameter.
8174
8175 2017-07-17  Pedro Alves  <palves@redhat.com>
8176
8177         * utils.c (enum class strncmp_iw_mode): New.
8178         (strcmp_iw): Rename to ...
8179         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
8180         parameters.  Handle them.
8181         (strncmp_iw): New.
8182         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8183         * utils.h (strncmp_iw): Declare.
8184         (strcmp_iw): Move describing comments here.
8185
8186 2017-07-17  Pedro Alves  <palves@redhat.com>
8187
8188         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8189         CP_OPERATOR_STR.
8190         * c-typeprint.c (is_type_conversion_operator): Use
8191         CP_OPERATOR_STR.
8192         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8193         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8194         CP_OPERATOR_LEN.
8195         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8196         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8197         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8198         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8199         CP_OPERATOR_STR.
8200         * location.c: Include "cp-support.h".
8201         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8202         CP_OPERATOR_STR.
8203         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8204         CP_OPERATOR_LEN.
8205
8206 2017-07-17  Pedro Alves  <palves@redhat.com>
8207
8208         * cli/cli-cmds.c (complete_command): Use a completion tracker
8209         along with completion_find_completion_word for handle_brkchars
8210         phase.
8211         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8212         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8213         (struct gdb_rl_completion_word_info): New.
8214         (gdb_rl_find_completion_word): New.
8215         (completion_find_completion_word): New.
8216         * completer.h (completion_find_completion_word): Declare.
8217
8218 2017-07-17  Pedro Alves  <palves@redhat.com>
8219
8220         * ada-lang.c (symbol_completion_match): Adjust comments.
8221         (symbol_completion_add): Replace vector parameter with
8222         completion_tracker parameter.  Use it.
8223         (ada_make_symbol_completion_list): Rename to...
8224         (ada_collect_symbol_completion_matches): ... this.  Add
8225         completion_tracker parameter and use it.
8226         (ada_language_defn): Adjust.
8227         * break-catch-syscall.c (catch_syscall_completer): Adjust
8228         prototype and work with completion_tracker instead of VEC.
8229         * breakpoint.c (condition_completer): Adjust prototype and work
8230         with completion_tracker instead of VEC.
8231         * c-lang.c (c_language_defn, cplus_language_defn)
8232         (asm_language_defn, minimal_language_defn): Adjust to renames.
8233         * cli/cli-cmds.c (complete_command): Rework using
8234         completion_tracker.  Catch exceptions when completing.
8235         * cli/cli-decode.c (integer_unlimited_completer)
8236         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8237         with completion_tracker instead of VEC.
8238         * command.h (struct completion_tracker): Forward declare.
8239         (completer_ftype, completer_handle_brkchars_ftype): Change
8240         types.
8241         (complete_on_cmdlist, complete_on_enum): Adjust.
8242         * completer.c: Include <algorithm>.
8243         (struct gdb_completer_state): New.
8244         (current_completion): New global.
8245         (readline_line_completion_function): Delete.
8246         (noop_completer, filename_completer)
8247         (filename_completer_handle_brkchars, complete_files_symbols)
8248         (linespec_location_completer): Adjust to work with a
8249         completion_tracker instead of a VEC.
8250         (string_or_empty): New.
8251         (collect_explicit_location_matches): Adjust to work with a
8252         completion_tracker instead of a VEC.
8253         (explicit_location_completer): Rename to ...
8254         (complete_explicit_location): ... this and adjust to work with a
8255         completion_tracker instead of a VEC.
8256         (location_completer): Adjust to work with a completion_tracker
8257         instead of a VEC.
8258         (add_struct_fields): Adjust to work with a completion_list instead
8259         of VEC.
8260         (expression_completer): Rename to ...
8261         (complete_expression): ... this and adjust to work with a
8262         completion_tracker instead of a VEC.  Use complete_files_symbols.
8263         (expression_completer): Reimplement on top of complete_expression.
8264         (symbol_completer): Adjust to work with a completion_tracker
8265         instead of a VEC.
8266         (enum complete_line_internal_reason): Add describing comments.
8267         (complete_line_internal_normal_command): Adjust to work with a
8268         completion_tracker instead of a VEC.
8269         (complete_line_internal): Rename to ...
8270         (complete_line_internal_1): ... this and adjust to work with a
8271         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
8272         handle_brkchars phase.
8273         (new_completion_tracker): Delete.
8274         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8275         complete_line_internal_1.
8276         (free_completion_tracker): Delete.
8277         (INITIAL_COMPLETION_HTAB_SIZE): New.
8278         (completion_tracker::completion_tracker)
8279         (completion_tracker::~completion_tracker): New.
8280         (maybe_add_completion): Delete.
8281         (completion_tracker::maybe_add_completion)
8282         (completion_tracker::add_completion)
8283         (completion_tracker::add_completions): New.
8284         (throw_max_completions_reached_error): Delete.
8285         (complete_line): Adjust to work with a completion_tracker instead
8286         of a VEC.  Don't create a completion_tracker_t or check for max
8287         completions here.
8288         (command_completer, command_completer_handle_brkchars)
8289         (signal_completer, reg_or_group_completer_1)
8290         (reg_or_group_completer, default_completer_handle_brkchars):
8291         Adjust to work with a completion_tracker.
8292         (gdb_completion_word_break_characters_throw): New.
8293         (gdb_completion_word_break_characters): Reimplement.
8294         (line_completion_function): Delete.
8295         (completion_tracker::recompute_lowest_common_denominator)
8296         (expand_preserving_ws)
8297         (completion_tracker::build_completion_result)
8298         (completion_result::completion_result)
8299         (completion_result::completion_result)
8300         (completion_result::~completion_result)
8301         (completion_result::completion_result)
8302         (completion_result::release_match_list, compare_cstrings)
8303         (completion_result::sort_match_list)
8304         (completion_result::reset_match_list)
8305         (gdb_rl_attempted_completion_function_throw)
8306         (gdb_rl_attempted_completion_function): New.
8307         * completer.h (completion_list, struct completion_result)
8308         (class completion_tracker): New.
8309         (complete_line): Add completion_tracker parameter.
8310         (readline_line_completion_function): Delete.
8311         (gdb_rl_attempted_completion_function): New.
8312         (noop_completer, filename_completer, expression_completer)
8313         (location_completer, symbol_completer, command_completer)
8314         (signal_completer, reg_or_group_completer): Update prototypes.
8315         (completion_tracker_t, new_completion_tracker)
8316         (make_cleanup_free_completion_tracker): Delete.
8317         (enum maybe_add_completion_enum): Delete.
8318         (maybe_add_completion): Delete.
8319         (throw_max_completions_reached_error): Delete.
8320         * corefile.c (complete_set_gnutarget): Adjust to work with a
8321         completion_tracker instead of a VEC.
8322         * cp-abi.c (cp_abi_completer): Adjust to work with a
8323         completion_tracker instead of a VEC.
8324         * d-lang.c (d_language_defn): Adjust.
8325         * disasm.c (disassembler_options_completer): Adjust to work with a
8326         completion_tracker instead of a VEC.
8327         * f-lang.c (f_make_symbol_completion_list): Rename to ...
8328         (f_collect_symbol_completion_matches): ... this.  Adjust to work
8329         with a completion_tracker instead of a VEC.
8330         (f_language_defn): Adjust.
8331         * go-lang.c (go_language_defn): Adjust.
8332         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8333         Adjust to work with a completion_tracker instead of a VEC.
8334         * infrun.c (handle_completer): Likewise.
8335         * interps.c (interpreter_completer): Likewise.
8336         * interps.h (interpreter_completer): Likewise.
8337         * language.c (unknown_language_defn, auto_language_defn)
8338         (local_language_defn): Adjust.
8339         * language.h (language_defn::la_make_symbol_completion_list):
8340         Rename to ...
8341         (language_defn::la_collect_symbol_completion_matches): ... this
8342         and adjust to work with a completion_tracker instead of a VEC.
8343         * m2-lang.c (m2_language_defn): Adjust.
8344         * objc-lang.c (objc_language_defn): Adjust.
8345         * opencl-lang.c (opencl_language_defn): Adjust.
8346         * p-lang.c (pascal_language_defn): Adjust.
8347         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8348         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8349         with a completion_tracker.
8350         * rust-lang.c (rust_language_defn): Adjust.
8351         * symtab.c (free_completion_list, do_free_completion_list)
8352         (return_val, completion_tracker): Delete.
8353         (completion_list_add_name, completion_list_add_symbol)
8354         (completion_list_add_msymbol, completion_list_objc_symbol)
8355         (completion_list_add_fields, add_symtab_completions): Add
8356         completion_tracker parameter and use it.
8357         (default_make_symbol_completion_list_break_on_1): Rename to...
8358         (default_collect_symbol_completion_matches_break_on): ... this.
8359         Add completion_tracker parameter and use it instead of allocating
8360         a completion tracker here.
8361         (default_make_symbol_completion_list_break_on): Delete old
8362         implementation.
8363         (default_make_symbol_completion_list): Delete.
8364         (default_collect_symbol_completion_matches): New.
8365         (make_symbol_completion_list): Delete.
8366         (collect_symbol_completion_matches): New.
8367         (make_symbol_completion_type): Rename to ...
8368         (collect_symbol_completion_matches_type): ... this.  Add
8369         completion_tracker parameter and use it instead of VEC.
8370         (make_file_symbol_completion_list_1): Rename to...
8371         (collect_file_symbol_completion_matches): ... this.  Add
8372         completion_tracker parameter and use it instead of VEC.
8373         (make_file_symbol_completion_list): Delete.
8374         (add_filename_to_list): Use completion_list instead of a VEC.
8375         (add_partial_filename_data::list): Now a completion_list.
8376         (make_source_files_completion_list): Work with a completion_list
8377         instead of a VEC.
8378         * symtab.h: Include "completer.h".
8379         (default_make_symbol_completion_list_break_on)
8380         (default_make_symbol_completion_list, make_symbol_completion_list)
8381         (make_symbol_completion_type, make_file_symbol_completion_list)
8382         (make_source_files_completion_list): Delete.
8383         (default_collect_symbol_completion_matches_break_on)
8384         (default_collect_symbol_completion_matches)
8385         (collect_symbol_completion_matches)
8386         (collect_symbol_completion_matches_type)
8387         (collect_file_symbol_completion_matches)
8388         (make_source_files_completion_list): New.
8389         * top.c (init_main): Don't install a rl_completion_entry_function
8390         hook.  Install a rl_attempted_completion_function hook instead.
8391         * tui/tui-layout.c (layout_completer): Adjust to work with a
8392         completion_tracker.
8393         * tui/tui-regs.c (tui_reggroup_completer):
8394         * tui/tui-win.c (window_name_completer, focus_completer)
8395         (winheight_completer): Adjust to work with a completion_tracker.
8396         * value.c: Include "completer.h".
8397         (complete_internalvar): Adjust to work with a completion_tracker.
8398         * value.h (complete_internalvar): Likewise.
8399
8400 2017-07-17  Pedro Alves  <palves@redhat.com>
8401
8402         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8403         renames.
8404         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8405         comments to completer_ftype's declaration.
8406         <completer_handle_brkchars>: Change type to
8407         completer_handle_brkchars_ftype.
8408         * command.h (completer_ftype): Add describing comment and give
8409         names to parameters.
8410         (completer_ftype_void): Rename to ...
8411         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
8412         (set_cmd_completer_handle_brkchars): Adjust.
8413         * completer.c (filename_completer_handle_brkchars): New function.
8414         (complete_line_internal_normal_command): New function, factored
8415         out from ...
8416         (complete_line_internal): ... here.
8417         (command_completer_handle_brkchars)
8418         (default_completer_handle_brkchars)
8419         (completer_handle_brkchars_func_for_completer): New functions.
8420         * completer.h (set_gdb_completion_word_break_characters): Delete
8421         declaration.
8422         (completer_handle_brkchars_func_for_completer): New declaration.
8423         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8424         completer_handle_brkchars_func_for_completer.
8425
8426 2017-07-17  Pedro Alves  <palves@redhat.com>
8427
8428         * completer.c (symbol_completer): New function, based on
8429         make_symbol_completion_list_fn.
8430         * completer.h (symbol_completer): New declaration.
8431         * guile/scm-cmd.c (cmdscm_completers): Adjust.
8432         * python/py-cmd.c (completers): Adjust.
8433         * symtab.c (make_symbol_completion_list_fn): Delete.
8434         * symtab.h (make_symbol_completion_list_fn): Delete.
8435         * cli/cli-decode.c (add_cmd): Adjust.
8436
8437 2017-07-17  Pedro Alves  <palves@redhat.com>
8438
8439         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8440         * dwarf2read.c: Include "filename-seen-cache.h".
8441         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8442         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8443         * filename-seen-cache.c: New file.
8444         * filename-seen-cache.h: New file.
8445         * symtab.c: Include "filename-seen-cache.h".
8446         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8447         (create_filename_seen_cache, clear_filename_seen_cache)
8448         (delete_filename_seen_cache, filename_seen): Delete, parts moved
8449         to filename-seen-cache.h/filename-seen-cache.c.
8450         (output_source_filename, sources_info)
8451         (maybe_add_partial_symtab_filename)
8452         (make_source_files_completion_list): Adjust to use
8453         filename_seen_cache.
8454
8455 2017-07-17  Pedro Alves  <palves@redhat.com>
8456
8457         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8458         fields.
8459         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8460         dwarf2_debug_sections*)): New.
8461         (dwarf2_per_objfile::dwarf2_per_objfile(const
8462         dwarf2_per_objfile&)): Declare as deleted.
8463         (dwarf2_per_objfile::operator=): Declare as deleted.
8464         (dwarf2_per_objfile::dwarf2_per_objfile)
8465         (dwarf2_per_objfile::~dwarf2_per_objfile)
8466         (dwarf2_per_objfile::free_cached_comp_units): New.
8467         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8468         ctor.  Call dwarf2_per_objfile's ctor manually.
8469         (dwarf2_locate_sections): Deleted/refactored as ...
8470         (dwarf2_per_objfile::locate_sections): ... this new method.
8471         (free_cached_comp_units): Defer to
8472         dwarf2_per_objfile::free_cached_comp_units.
8473         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8474
8475 2017-07-14  Tom Tromey  <tom@tromey.com>
8476
8477         PR rust/21764:
8478         * rust-exp.y (convert_ast_to_expression): Add "want_type"
8479         parameter.
8480         <UNOP_SIZEOF>: Split into separate case.
8481         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
8482
8483 2017-07-14  Tom Tromey  <tom@tromey.com>
8484
8485         PR rust/21763:
8486         * symtab.c (symbol_matches_domain): Add language_rust to special
8487         case.
8488         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8489         treat LOC_TYPEDEF symbols as variables.
8490
8491 2017-07-14  Pedro Alves  <palves@redhat.com>
8492
8493         * symtab.c (make_file_symbol_completion_list_1): Iterate over
8494         symtabs matching all symtabs with SRCFILE as file name instead of
8495         only considering the first hit, with lookup_symtab.
8496
8497 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8498
8499         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8500         operator_name parameters.
8501         (gen_expr): Update function call.
8502
8503 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8504
8505         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8506         parameter.
8507         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8508         Likewise.
8509         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8510         parameter, use agent_expr::gdbarch instead, update function
8511         calls.
8512         (locexpr_tracepoint_var_ref): Likewise.
8513         (loclist_tracepoint_var_ref): Likewise.
8514         * ax-gdb.c (gen_trace_static_fields): Likewise.
8515         (gen_traced_pop): Likewise.
8516         (gen_frame_args_address): Likewise.
8517         (gen_frame_locals_address): Likewise.
8518         (gen_var_ref): Likewise.
8519         (gen_struct_ref_recursive): Likewise.
8520         (gen_static_field): Likewise.
8521         (gen_maybe_namespace_elt): Likewise.
8522         (gen_expr): Likewise.
8523         (gen_trace_for_var): Likewise.
8524         (gen_trace_for_expr): Likewise.
8525         (gen_trace_for_return_address): Likewise.
8526
8527 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8528
8529         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8530         parameter.
8531         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8532
8533 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8534
8535         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8536         from ax, update calls.
8537         (gen_usual_arithmetic): Likewise.
8538         (gen_integral_promotions): Likewise.
8539         (gen_bitfield_ref): Likewise.
8540         (gen_primitive_field): Likewise.
8541         (gen_struct_ref_recursive): Likewise.
8542         (gen_struct_ref): Likewise.
8543         (gen_maybe_namespace_elt): Likewise.
8544         (gen_struct_elt_for_reference): Likewise.
8545         (gen_namespace_elt): Likewise.
8546         (gen_aggregate_elt_ref): Likewise.
8547         (gen_expr): Get gdbarch from ax, update calls.
8548         (gen_expr_binop_rest): Likewise.
8549
8550 2017-07-13  Pedro Alves  <palves@redhat.com>
8551
8552         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8553         as default tdesc.
8554         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8555         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8556         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8557         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
8558         tdep.
8559         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8560         Get final tdesc from the tdep.
8561         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8562         default tdesc.
8563         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8564         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8565         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8566         Use it as default tdesc.
8567         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8568         down to amd_init_abi.  No longer handle fallback tdesc here.
8569         * amd64-tdep.h (tdesc_x32): Declare.
8570         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8571         parameter.
8572         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8573         as default tdesc.
8574
8575 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8576
8577         * s390-linux-tdep.c (s390_process_record): Add support for
8578         instructions new in arch12.
8579
8580 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8581
8582         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8583         PT_GETFSBASE and PT_GETGSBASE.
8584         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8585         PT_SETGSBASE.
8586
8587 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8588
8589         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8590         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8591         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8592         those rules.
8593         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8594         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8595         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8596         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8597         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8598         * features/i386/amd64.xml: Add 64bit-segments.xml.
8599         * features/i386/amd64-avx-avx512.c: Regenerated.
8600         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8601         * features/i386/amd64-avx-mpx.c: Regenerated.
8602         * features/i386/amd64-avx.c: Regenerated.
8603         * features/i386/amd64-mpx.c: Regenerated.
8604         * features/i386/amd64.c: Regenerated.
8605         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8606         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8607         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8608         * regformats/i386/amd64-avx.dat: Regenerated.
8609         * regformats/i386/amd64-mpx.dat: Regenerated.
8610         * regformats/i386/amd64.dat: Regenerated.
8611
8612 2017-07-10  Yao Qi  <yao.qi@linaro.org>
8613
8614         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8615         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8616
8617 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
8618
8619         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8620         unsetenv.
8621         * gnulib/aclocal.m4: Regenerate.
8622         * gnulib/config.in: Regenerate.
8623         * gnulib/configure: Regenerate.
8624         * gnulib/import/Makefile.am: Regenerate.
8625         * gnulib/import/Makefile.in: Regenerate.
8626         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8627         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8628         * gnulib/import/m4/environ.m4: New file.
8629         * gnulib/import/m4/setenv.m4: New file.
8630         * gnulib/import/setenv.c: New file.
8631         * gnulib/import/unsetenv.c: New file.
8632
8633 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
8634
8635         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8636         address when op is DW_OP_addr.
8637
8638 2017-07-09  Tom Tromey  <tom@tromey.com>
8639
8640         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8641         check and apply to outer type.
8642
8643 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8644
8645         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8646         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8647         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8648         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8649
8650 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8651
8652         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8653
8654 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8655
8656         * corelow.c (get_core_siginfo): Remove.
8657         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8658         instead of get_core_siginfo.
8659         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8660         * gdbarch.h: Re-generate.
8661         * gdbarch.c: Re-generate.
8662         * linux-tdep.c (linux_core_xfer_siginfo): New.
8663         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8664
8665 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8666
8667         * corelow.c (thread_section_name): Move to ...
8668         * gdbcore.h (thread_section_name): ... here.
8669
8670 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8671
8672         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8673         (struct siginfo32): New.
8674         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8675         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8676         via ptrace(PT_LWPINFO).
8677
8678 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8679
8680         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8681         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8682         (fbsd_get_siginfo_type): New.
8683         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8684         (_initialize_fbsd_tdep): New.
8685
8686 2017-07-06  David Blaikie  <dblaikie@gmail.com>
8687
8688         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8689         a singular dwo_unit*) to support multiple CUs in the same way that
8690         multiple TUs are supported.
8691         (create_cus_hash_table): Replace create_dwo_cu with a function for
8692         parsing multiple CUs from a DWO file.
8693         (open_and_init_dwo_file): Use create_cus_hash_table rather than
8694         create_dwo_cu.
8695         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8696         htab_find, rather than comparing the signature to a singleton CU in
8697         the dwo_file.
8698
8699 2017-07-06  Pedro Alves  <palves@redhat.com>
8700
8701         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8702
8703 2017-07-04  Pedro Alves  <palves@redhat.com>
8704
8705         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8706         * gdbtypes.h (TYPE_STATIC): Delete.
8707         (struct fn_field) <is_public, is_abstract, is_static, is_final,
8708         is_synchronized, is_native>: Delete.
8709         <dummy>: Bump.
8710         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8711         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8712         (TYPE_FN_FIELD_ABSTRACT): Delete.
8713
8714 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
8715
8716         * buffer.h (buffer_finish): Fix spelling mistakes.
8717
8718 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
8719
8720         * .dir-locals.el: Automatically switch to C-style comments in
8721         versions of Emacs that support the feature.
8722
8723 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8724             Pedro Alves  <palves@redhat.com>
8725
8726         PR cli/21688
8727         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
8728         (process_next_line): New variable 'inline_cmd'.
8729         Adjust 'if' clauses for "python", "compile" and "guile" to use
8730         'command_name_equals' and check for '!inline_cmd'.
8731
8732 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8733
8734         PR cli/21688
8735         * cli/cli-script.c (command_name_equals_not_inline): New function.
8736         (process_next_line): Adjust 'if' clauses for "python", "compile"
8737         and "guile" to use command_name_equals_not_inline.
8738
8739 2017-06-29  Pedro Alves  <palves@redhat.com>
8740
8741         * completer.c (expression_completer): Call
8742         linespec_location_completer instead of location_completer.
8743
8744 2017-06-29  Pedro Alves  <palves@redhat.com>
8745
8746         * completer.c (expression_completer): Remove code that recomputes
8747         'text' from 'word'.
8748
8749 2017-06-29  Yao Qi  <yao.qi@linaro.org>
8750
8751         * regformats/regdat.sh: Generate code with
8752         "ifndef IN_PROCESS_AGENT".
8753
8754 2017-06-28  Pedro Alves  <palves@redhat.com>
8755
8756         * command.h: Include "common/scoped_restore.h".
8757
8758 2017-06-28  Yao Qi  <yao.qi@linaro.org>
8759
8760         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
8761         instead of obstack_grow.
8762
8763 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
8764
8765         PR gdb/21337
8766         * symfile.c (reread_symbols): Call objfiles_changed just before
8767         read_symbols.
8768
8769 2017-06-27  Pedro Alves  <palves@redhat.com>
8770
8771         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
8772         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
8773         (completion_list_add_symbol, completion_list_add_msymbol):
8774         ... these new functions.
8775         (add_symtab_completions)
8776         (default_make_symbol_completion_list_break_on_1): Adjust.
8777
8778 2017-06-27  Pedro Alves  <palves@redhat.com>
8779
8780         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
8781         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
8782         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
8783         dtor.
8784         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
8785         'storage_obstack' field an auto_obstack.  In-class initialize all
8786         non-bitfield fields.  Make minsyms_read bool.
8787         * symfile.c (read_symbols): Adjust.
8788
8789 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
8790
8791         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
8792         (gdbsim_store_register): Likewise.
8793
8794 2017-06-27  Pedro Alves  <palves@redhat.com>
8795
8796         * c-exp.y (name_obstack): Now an auto_obstack.
8797         (yylex): Use auto_obstack::clear.
8798         (c_parse): Use auto_obstack::clear instead of reinitializing and
8799         freeing the obstack.
8800         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
8801         * d-exp.y (name_obstack): Now an auto_obstack.
8802         (yylex): Use auto_obstack::clear.
8803         (d_parse): Use auto_obstack::clear instead of reinitializing and
8804         freeing the obstack.
8805         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
8806         auto_obstack.
8807         * dwarf2read.c (create_addrmap_from_index)
8808         (dwarf2_build_psymtabs_hard)
8809         (update_enumeration_type_from_children): Likewise.
8810         * gdb_obstack.h (auto_obstack): New type.
8811         * go-exp.y (name_obstack): Now an auto_obstack.
8812         (build_packaged_name): Use auto_obstack::clear.
8813         (go_parse): Use auto_obstack::clear instead of reinitializing and
8814         freeing the obstack.
8815         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
8816         auto_obstack.
8817         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
8818         * rust-exp.y (work_obstack): Now an auto_obstack.
8819         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
8820         reinitializing and freeing the obstack.
8821         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
8822         (host_char_to_target): Use auto_obstack.
8823         * utils.h (make_cleanup_obstack_free): Delete declaration.
8824         * valprint.c (generic_emit_char, generic_printstr): Use
8825         auto_obstack.
8826
8827 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
8828
8829         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
8830         thread.
8831         (darwin_init_thread_list): Don't update dummy thread.
8832         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
8833
8834 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8835
8836         * record-full.c (netorder16): Remove.
8837
8838 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8839
8840         * common/diagnostics.h: Define macros for GCC.
8841         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
8842         * common/vec.h: Include diagnostics.h.
8843         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
8844         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
8845         warning.
8846
8847 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8848
8849         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
8850         New macro.
8851         * ada-lex.l: Ignore deprecated register warnings.
8852
8853 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8854
8855         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8856         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8857
8858 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8859
8860         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
8861         its own line.
8862
8863 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8864
8865         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
8866
8867 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
8868
8869         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
8870         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
8871         (xtensa_register_read_masked): Likewise.
8872
8873 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
8874
8875         * common/environ.c (gdb_environ::unset): Update comment.
8876
8877 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8878
8879         * python/py-unwind.c (pyuw_sniffer): Allocate space for
8880         registers.
8881
8882 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8883
8884         * record-full.c (record_full_exec_insn): Use byte_vector.
8885
8886 2017-06-22  Yao Qi  <yao.qi@linaro.org>
8887
8888         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
8889         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8890
8891 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8892
8893         * remote.c (cached_reg): Move from here...
8894         * regcache.h (cached_reg): ...to here.
8895         * python/py-unwind.c (struct reg_info): Remove.
8896         (cached_frame_info): Use cached_reg_t.
8897         (pyuw_prev_register): Likewise.
8898         (pyuw_sniffer): Use cached_reg_t and allocate registers.
8899         (pyuw_dealloc_cache): Free all registers.
8900
8901 2017-06-22  Pedro Alves  <palves@redhat.com>
8902             Simon Marchi  <simon.marchi@ericsson.com>
8903
8904         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
8905         warning.
8906         * common/diagnostics.h: New file.
8907
8908 2017-06-22  Pedro Alves  <palves@redhat.com>
8909
8910         * common/agent.h: Add include guards.
8911
8912 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
8913
8914         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
8915         talk about addressable units instead of bytes.
8916
8917 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8918
8919         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
8920         of '::const_iterator'.
8921
8922 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8923
8924         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8925         'unittests/environ-selftests.c'.
8926         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
8927         * charset.c (find_charset_names): Declare object 'iconv_env'.
8928         Update code to use 'iconv_env' object.  Remove call to
8929         'free_environ'.
8930         * common/environ.c: Include <utility>.
8931         (make_environ): Delete function.
8932         (free_environ): Delete function.
8933         (gdb_environ::clear): New function.
8934         (gdb_environ::operator=): New function.
8935         (gdb_environ::get): Likewise.
8936         (environ_vector): Delete function.
8937         (set_in_environ): Delete function.
8938         (gdb_environ::set): New function.
8939         (unset_in_environ): Delete function.
8940         (gdb_environ::unset): New function.
8941         (gdb_environ::envp): Likewise.
8942         * common/environ.h: Include <vector>.
8943         (struct gdb_environ): Delete; transform into...
8944         (class gdb_environ): ... this class.
8945         (free_environ): Delete prototype.
8946         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
8947         environ_vector): Likewise.
8948         * infcmd.c (run_command_1): Update code to call
8949         'envp' from 'gdb_environ' class.
8950         (environment_info): Update code to call methods from 'gdb_environ'
8951         class.
8952         (unset_environment_command): Likewise.
8953         (path_info): Likewise.
8954         (path_command): Likewise.
8955         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
8956         (inferior::inferior): Initialize 'environment' using the host's
8957         information.
8958         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
8959         Include "environ.h".
8960         (class inferior) <environment>: Change type from 'struct
8961         gdb_environ' to 'gdb_environ'.
8962         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
8963         methods from 'gdb_environ' class.
8964         * solib.c (solib_find_1): Likewise
8965         * unittests/environ-selftests.c: New file.
8966
8967 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8968
8969         * features/i386/i386-linux.xml: Exchange the order of including
8970         32bit-linux.xml and 32bit-sse.xml.
8971         * features/i386/i386-linux.c: Regenerated.
8972
8973 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8974
8975         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
8976         Delete copy ctor and assignment operator.
8977         (tdesc_type): Likewise.
8978         (tdesc_feature): Likewise.
8979         (tdesc_free_reg): Remove.
8980         (tdesc_create_reg): Use new.
8981         (tdesc_free_type): Remove.
8982         (tdesc_create_vector): Use new.
8983         (tdesc_create_union): Likewise.
8984         (tdesc_create_flags): Likewise.
8985         (tdesc_create_enum): Likewise.
8986         (tdesc_free_feature): Delete.
8987         (free_target_description): Use delete.
8988
8989 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
8990
8991         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
8992         registers.
8993
8994 2017-06-19  Pedro Alves  <palves@redhat.com>
8995
8996         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
8997         after gdb::unlinker.
8998
8999 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
9000
9001         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9002         gdb_environ to access an environment variable.
9003
9004 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
9005
9006         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9007         gdb_byte*.
9008
9009 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9010
9011         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9012
9013 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9014
9015         * configure: Re-generate.
9016         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9017
9018 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9019
9020         * configure: Re-generate.
9021         * warning.m4: Pass -Werror to compiler when checking for
9022         supported warning flags.
9023
9024 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9025
9026         * Makefile.in (COMPILE.pre): Add "-x c++".
9027
9028 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
9029             Pedro Alves  <palves@redhat.com>
9030             Yao Qi  <yao.qi@linaro.org>
9031
9032         * defs.h (RequireLongest): New.
9033         (extract_integer): Declare function template.
9034         (extract_signed_integer): Remove the declaration, but define it
9035         static inline.
9036         (extract_unsigned_integer): Likewise.
9037         (store_integer): Declare function template.
9038         (store_signed_integer): Remove the declaration, but define it
9039         static inline.
9040         (store_unsigned_integer): Likewise.
9041         * findvar.c (extract_integer): New function template.
9042         (extract_signed_integer): Remove.
9043         (extract_unsigned_integer): Remove.
9044         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9045         instantiations.
9046         (store_integer): New function template.
9047         (store_signed_integer): Remove.
9048         (store_unsigned_integer): Remove.
9049         (store_integer): Explicit instantiations.
9050         * regcache.c (regcache_raw_read_signed): Update.
9051         (regcache::raw_read): New function.
9052         (regcache::raw_read_signed): Remove.
9053         (regcache::raw_read_unsigned): Remove.
9054         (regcache_raw_read_unsigned): Update.
9055         (regcache_raw_write_unsigned): Update.
9056         (regcache::raw_write_signed): Remove.
9057         (regcache::raw_write): New function.
9058         (regcache_cooked_read_signed): Update.
9059         (regcache::raw_write_unsigned): Remove.
9060         (regcache::cooked_read_signed): Remove.
9061         (regcache_cooked_read_unsigned): Update.
9062         (regcache::cooked_read_unsigned): Remove.
9063         (regcache_cooked_write_signed): Update.
9064         (regcache_cooked_write_unsigned): Update.
9065         * regcache.h (regcache) <raw_read_signed>: Remove.
9066         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9067         <raw_read, raw_write>: New.
9068         <cooked_read_signed, cooked_write_signed>: Remove.
9069         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9070         <cooked_read, cooked_write>: New.
9071         * sh64-tdep.c (sh64_pseudo_register_read): Update.
9072         (sh64_pseudo_register_write): Update.
9073
9074 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
9075
9076         * arc-tdep.c (arc_disassembler_options): New variable.
9077         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9078         of default_print_insn.
9079         (arc_delayed_print_insn): Set info->section when needed,
9080         use default_print_insn to retrieve a disassembler.
9081
9082 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
9083
9084         PR gdb/21574
9085         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9086         to mention $SHELL and startup-with-shell.
9087
9088 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
9089
9090         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9091
9092 2017-06-14  Yao Qi  <yao.qi@linaro.org>
9093
9094         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9095         default_print_insn instead of print_insn_aarch64.
9096         * arm-tdep.c (gdb_print_insn_arm): Call
9097         default_print_insn instead of print_insn_big_arm
9098         and print_insn_little_arm.
9099         * i386-tdep.c (i386_print_insn): Call default_print_insn
9100         instead of print_insn_i386.
9101         * ia64-tdep.c (ia64_print_insn): Call
9102         default_print_insn instead of print_insn_ia64.
9103         * mips-tdep.c (gdb_print_insn_mips): Call
9104         default_print_insn instead of print_insn_big_mips
9105         and print_insn_little_mips.
9106         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9107         instead of print_insn_spu.
9108
9109 2017-06-14  Pedro Alves  <palves@redhat.com>
9110
9111         * ada-lang.c: Include "common/byte-vector.h".
9112         (ada_value_primitive_packed_val): Use gdb::byte_vector.
9113         * charset.c (wchar_iterator::iterate): Resize the vector instead
9114         of reserving it.
9115         * common/byte-vector.h: Include "common/def-vector.h".
9116         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9117         * cli/cli-dump.c: Include "common/byte-vector.h".
9118         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9119         * common/byte-vector.h: New file.
9120         * common/def-vector.h: New file.
9121         * common/default-init-alloc.h: New file.
9122         * dwarf2loc.c: Include "common/byte-vector.h".
9123         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9124         instead of reserving it.
9125         * dwarf2read.c: Include "common/byte-vector.h".
9126         (data_buf::m_vec): Now a gdb::byte_vector.
9127         * gdb_regex.c: Include "common/def-vector.h".
9128         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9129         * mi/mi-main.c: Include "common/byte-vector.h".
9130         (mi_cmd_data_read_memory): Use gdb::byte_vector.
9131         * printcmd.c: Include "common/byte-vector.h".
9132         (print_scalar_formatted): Use gdb::byte_vector.
9133         * valprint.c: Include "common/byte-vector.h".
9134         (maybe_negate_by_bytes, print_decimal_chars): Use
9135         gdb::byte_vector.
9136
9137 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9138
9139         * darwin-nat.c: Include "nat/fork-inferior.h".
9140
9141 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9142
9143         * configure.nat: Factor out Darwin bits that are not
9144         architecture-specific.  Add fork-inferior.o.
9145
9146 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9147
9148         * configure.nat: Factor out AIX bits that are not
9149         architecture-specific.  Add fork-inferior.o.
9150
9151 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9152
9153         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
9154         (read_pieced_value, write_pieced_value): ...here.  Reduce to
9155         wrappers that just call rw_pieced_value.
9156
9157 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9158
9159         * dwarf2loc.c (write_pieced_value): When writing the data for a
9160         memory piece, use write_memory_with_notification instead of
9161         write_memory.
9162
9163 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9164
9165         * valops.c (read_value_memory): Change embedded_offset to
9166         represent a bit offset instead of a byte offset.
9167         * value.h (read_value_memory): Adjust comment.
9168
9169 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9170
9171         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9172         dest_offset_bits and source_offset_bits.
9173         (write_pieced_value): Likewise.
9174
9175 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9176
9177         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9178         given by DW_OP_bit_piece.
9179         (write_pieced_value): Likewise.
9180
9181 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9182
9183         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9184         some other preparations to the places where sufficient information
9185         is available.
9186         (write_pieced_value): Likewise.
9187
9188 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9189
9190         * dwarf2loc.c (bits_to_bytes): New function.
9191         (read_pieced_value): Fix offset calculations for register pieces
9192         on big-endian targets.
9193         (write_pieced_value): Likewise.
9194
9195 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9196
9197         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9198         (write_pieced_value): Likewise.
9199
9200 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9201
9202         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9203         transfer the source value's least significant bits, instead of its
9204         lowest-addressed ones.  Rename type_len to max_offset.
9205         (read_pieced_value): Mirror above changes to write_pieced_value as
9206         applicable.
9207
9208 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9209
9210         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9211         truncate full bytes from dest_offset_bits before using it as an
9212         offset into the buffer.
9213
9214 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9215
9216         * dwarf2loc.c (write_pieced_value): Include transfer size in
9217         byte-wise check.
9218
9219 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9220
9221         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9222         calculation of this_size.
9223
9224 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9225
9226         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9227         when targeting a bit-field.
9228         (write_pieced_value): Likewise.
9229
9230 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9231
9232         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9233         (allocate_piece_closure): Drop addr_size parameter.
9234         (dwarf2_evaluate_loc_desc_full): Adjust call to
9235         allocate_piece_closure.
9236
9237 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9238
9239         PR gdb/21226
9240         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9241         the LSB end, independent of endianness.
9242
9243 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9244
9245         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9246         size capping.
9247
9248 2017-06-13  Yao Qi  <yao.qi@linaro.org>
9249
9250         * mips-linux-nat.c: Move include features/mips*-linux.c to
9251         mips-linux-tdep.c.
9252         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9253         to mips-linux-tdep.c.
9254         * mips-linux-tdep.c: Include features/mips*-linux.c
9255         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9256         functions.
9257         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9258         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9259         (tdesc_mips64_dsp_linux): Declare.
9260
9261 2017-06-12  Tom Tromey  <tom@tromey.com>
9262
9263         * valprint.h (val_print_type_code_int): Remove.
9264         * valprint.c (generic_val_print_int): Always call
9265         val_print_scalar_formatted.
9266         (val_print_type_code_int): Remove.
9267         * printcmd.c (print_scalar_formatted): Handle options->format==0.
9268         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9269         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9270         * ada-valprint.c (ada_val_print_num): Use
9271         val_print_scalar_formatted.
9272
9273 2017-06-12  Tom Tromey  <tom@tromey.com>
9274
9275         * printcmd.c (print_scalar_formatted): Unify the two switches.
9276         Don't convert scalars to LONGEST.
9277
9278 2017-06-12  Tom Tromey  <tom@tromey.com>
9279
9280         PR exp/16225:
9281         * valprint.h (print_decimal_chars): Update.
9282         * valprint.c (maybe_negate_by_bytes): New function.
9283         (print_decimal_chars): Add "is_signed" argument.
9284         * printcmd.c (print_scalar_formatted): Update.
9285
9286 2017-06-12  Tom Tromey  <tom@tromey.com>
9287
9288         PR exp/16225:
9289         * valprint.h (print_binary_chars, print_hex_chars): Update.
9290         * valprint.c (val_print_type_code_int): Update.
9291         (print_binary_chars): Add "zero_pad" argument.
9292         (emit_octal_digit): New function.
9293         (print_octal_chars): Don't zero-pad.
9294         (print_decimal_chars): Likewise.
9295         (print_hex_chars): Add "zero_pad" argument.
9296         * sh64-tdep.c (sh64_do_fp_register): Update.
9297         * regcache.c (regcache::dump): Update.
9298         * printcmd.c (print_scalar_formatted): Update.
9299         * infcmd.c (default_print_one_register_info): Update.
9300
9301 2017-06-12  Pedro Alves  <palves@redhat.com>
9302             Alan Hayward  <alan.hayward@arm.com>
9303
9304         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9305         (mips_eabi_push_dummy_call): Rename local 'regsize' to
9306         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
9307         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9308         Assert that abi_regsize bytes fit in 'ref_valbuf'.
9309
9310 2017-06-12  Pedro Alves  <palves@redhat.com>
9311
9312         * dwarf2read.c (mapped_symtab::data): Now a vector of
9313         symtab_index_entry instead of vector of
9314         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
9315         whether an element's name is NULL instead of checking whether the
9316         element itself is NULL.
9317         (find_slot): Change return type.  Adjust.
9318         (hash_expand, , add_index_entry, uniquify_cu_indices)
9319         (write_hash_table): Adjust.
9320
9321 2017-06-12  Pedro Alves  <palves@redhat.com>
9322
9323         * dwarf2read.c (recursively_count_psymbols): New function.
9324         (write_psymtabs_to_index): Call it to compute number of psyms and
9325         pass estimate size of psyms_seen to unordered_set's ctor.
9326
9327 2017-06-12  Pedro Alves  <palves@redhat.com>
9328
9329         * dwarf2read.c (write_hash_table): Check if key already exists
9330         before emplacing.
9331
9332 2017-06-12  Pedro Alves  <palves@redhat.com>
9333
9334         * dwarf2read.c (data_buf::append_space): Rename to...
9335         (data_buf::grow): ... this, and make private.  Adjust all callers.
9336         (data_buf::append_uint): New method.
9337         (add_address_entry, write_one_signatured_type)
9338         (write_psymtabs_to_index): Use it.
9339
9340 2017-06-12  Pedro Alves  <palves@redhat.com>
9341
9342         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9343         (file_write (FILE *, const std::vector<Elem>&)): Delete.
9344         (data_buf::file_write): Call ::fwrite directly.
9345
9346 2017-06-12  Pedro Alves  <palves@redhat.com>
9347
9348         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9349         std::vector::erase.
9350
9351 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9352
9353         Code cleanup: C++ify .gdb_index producer.
9354         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9355         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9356         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9357         (create_strtab, add_string): Remove.
9358         (file_write, data_buf): New.
9359         (struct symtab_index_entry): Use std::vector for cu_indices.
9360         (struct mapped_symtab): Use std::vector for data.
9361         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9362         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9363         Remove.
9364         (find_slot): Change return type.  Update it to the new data structures.
9365         (hash_expand, add_index_entry): Update it to the new data structures.
9366         (offset_type_compare): Remove.
9367         (uniquify_cu_indices): Update it to the new data structures.
9368         (c_str_view, c_str_view_hasher, vector_hasher): New.
9369         (add_indices_to_cpool): Remove.
9370         (write_hash_table): Update it to the new data structures.
9371         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9372         (eq_psymtab_cu_index): Remove.
9373         (psym_index_map): New typedef.
9374         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9375         reference and std::unordered_map for cu_index_htab.
9376         (add_address_entry, add_address_entry_worker, write_address_map)
9377         (write_psymbols): Update it to the new data structures.
9378         (write_obstack): Remove.
9379         (struct signatured_type_index_data): Change types_list to a data_buf
9380         reference and psyms_seen to a std::unordered_set reference.
9381         (write_one_signatured_type, recursively_write_psymbols)
9382         (write_psymtabs_to_index): Update it to the new data structures.
9383
9384 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
9385
9386         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9387         separate-debug-file commands.
9388         * symfile.h (separate_debug_file_debug): New global.
9389         * symfile.c (separate_debug_file_debug): New global.
9390         (separate_debug_file_exists, find_separate_debug_file): Add
9391         debug output.
9392         (_initialize_symfile): Add "set debug separate-debug-file"
9393         command.
9394         * build-id.c (build_id_to_debug_bfd,
9395         find_separate_debug_file_by_buildid): Add debug output.
9396
9397 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
9398
9399         * gdbarch.sh (displaced_step_free_closure): Remove.
9400         * gdbarch.h, gdbarch.c: Re-generate.
9401         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9402         displaced_step_free_closure.
9403         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9404         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9405         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9406         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9407         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9408         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9409         * arch-utils.h (simple_displaced_step_free_closure): Remove.
9410         * arch-utils.c (simple_displaced_step_free_closure): Remove.
9411         * infrun.c (displaced_step_clear): Call xfree instead of
9412         gdbarch_displaced_step_free_closure.
9413
9414 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
9415
9416         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9417         NULL".
9418
9419 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
9420
9421         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9422         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9423         (mn10300_push_dummy_call): Likewise.
9424
9425 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9426
9427         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9428
9429 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9430
9431         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9432
9433 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9434
9435         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9436         able to start inferiors using a shell.
9437         (New remote packets): Announce new packet "QStartupWithShell".
9438         * remote.c: Add PACKET_QStartupWithShell.
9439         (extended_remote_create_inferior): Handle new
9440         PACKET_QStartupWithShell.
9441         (remote_protocol_features) <QStartupWithShell>: New entry for
9442         PACKET_QStartupWithShell.
9443         (_initialize_remote): Call "add_packet_config_cmd" for
9444         QStartupShell.
9445
9446 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9447             Pedro Alves  <palves@redhat.com>
9448
9449         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9450         and "nat/fork-inferior.h".
9451         * common/common-inferior.h: New file, with contents from
9452         "gdb/inferior.h".
9453         * commom/common-utils.c: Include "common-utils.h".
9454         (stringify_argv): New function.
9455         * common/common-utils.h (stringify_argv): New prototype.
9456         * configure.nat: Add "fork-inferior.o" as a dependency for
9457         "*linux*", "fbsd*" and "nbsd*" hosts.
9458         * corefile.c (get_exec_file): Update comment.
9459         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9460         instead of "startup_inferior".
9461         (darwin_create_inferior): Call "add_thread_silent" after
9462         "fork_inferior".
9463         * fork-child.c: Cleanup unnecessary includes.
9464         (SHELL_FILE): Move to "common/common-fork-child.c".
9465         (environ): Likewise.
9466         (exec_wrapper): Initialize.
9467         (get_exec_wrapper): New function.
9468         (breakup_args): Move to "common/common-fork-child.c"; rename to
9469         "breakup_args_for_exec".
9470         (escape_bang_in_quoted_argument): Move to
9471         "common/common-fork-child.c".
9472         (saved_ui): New variable.
9473         (prefork_hook): New function.
9474         (postfork_hook): Likewise.
9475         (postfork_child_hook): Likewise.
9476         (gdb_startup_inferior): Likewise.
9477         (fork_inferior): Move to "common/common-fork-child.c".  Update
9478         function to support gdbserver.
9479         (startup_inferior): Likewise.
9480         * gdbcore.h (get_exec_file): Remove declaration.
9481         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9482         instead of "startup_inferior".  Call "add_thread_silent" after
9483         "fork_inferior".
9484         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9485         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9486         instead of "startup_inferior".  Call "add_thread_silent" after
9487         "fork_inferior".
9488         * inferior.h: Include "common-inferior.h".
9489         (trace_start_error): Move to "common/common-utils.h".
9490         (trace_start_error_with_name): Likewise.
9491         (fork_inferior): Move prototype to "nat/fork-inferior.h".
9492         (startup_inferior): Likewise.
9493         (gdb_startup_inferior): New prototype.
9494         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9495         * nat/fork-inferior.h: New file.
9496         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9497         instead of "startup_inferior".  Call "add_thread_silent" after
9498         "fork_inferior".
9499         * target.h (target_terminal_init): Move prototype to
9500         "target/target.h".
9501         (target_terminal_inferior): Likewise.
9502         (target_terminal_ours): Likewise.
9503         * target/target.h (target_terminal_init): New prototype, moved
9504         from "target.h".
9505         (target_terminal_inferior): Likewise.
9506         (target_terminal_ours): Likewise.
9507         * utils.c (gdb_flush_out_err): New function.
9508
9509 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9510
9511         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9512         * common/common-gdbthread.h: New file, with parts from
9513         "gdb/gdbthread.h".
9514         * gdbthread.h: Include "common-gdbthread.h".
9515         (switch_to_thread): Moved to "common/common-gdbthread.h".
9516
9517 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9518
9519         * Makefile.in (SFILES): Add "common/job-control.c".
9520         (HFILES_NO_SRCDIR): Add "common/job-control.h".
9521         (COMMON_OBS): Add "job-control.o".
9522         * common/job-control.c: New file, with contents from
9523         "gdb/inflow.c".
9524         * common/job-control.h: New file, with contents from "terminal.h".
9525         * fork-child.c: Include "job-control.h".
9526         * inflow.c: Include "job-control.h".
9527         (gdb_setpgid): Move to "common/common-inflow.c".
9528         (_initialize_inflow): Move setting of "job_control" to
9529         "handle_job_control".
9530         * terminal.h (job_control): Moved to "common/common-terminal.h".
9531         (gdb_setpgid): Likewise.
9532         * top.c: Include "job_control.h".
9533         * utils.c: Likewise.
9534         (job_control): Moved to "job-control.c".
9535
9536 2017-06-07  Pedro Alves  <palves@redhat.com>
9537
9538         * Makefile.in (SFILES): Add gdb_regex.c.
9539         (COMMON_OBS): Add gdb_regex.o.
9540         * ada-lang.c (ada_add_standard_exceptions)
9541         (ada_add_exceptions_from_frame, name_matches_regex)
9542         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9543         parameter type to compiled_regex.  Adjust.
9544         (ada_exceptions_list): Use compiled_regex.
9545         * break-catch-throw.c (exception_catchpoint::pattern): Now a
9546         std::unique_ptr<compiled_regex>.
9547         (exception_catchpoint::~exception_catchpoint): Remove regfree
9548         call.
9549         (check_status_exception_catchpoint): Adjust to use compiled_regex.
9550         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9551         * breakpoint.c (solib_catchpoint::compiled): Now a
9552         std::unique_ptr<compiled_regex>.
9553         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9554         (check_status_catch_solib): Adjust to use compiled_regex.
9555         (add_solib_catchpoint): Adjust to use compiled_regex.
9556         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9557         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9558         compiled_regex reference.  Adjust to use it.
9559         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9560         declaration.  Include "gdb_regex.h".
9561         (apropos_cmd): Change regex parameter to compiled_regex reference.
9562         * gdb_regex.c: New file.
9563         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9564         declarations.
9565         (class compiled_regex): New.
9566         * linux-tdep.c: Include "common/gdb_optional.h".
9567         (struct mapping_regexes): New, factored out from
9568         mapping_is_anonymous_p, and adjusted to use compiled_regex.
9569         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9570         gdb::optional and remove cleanups.  Adjust to compiled_regex.
9571         * probe.c: Include "common/gdb_optional.h".
9572         (collect_probes): Use compiled_regex and gdb::optional and remove
9573         cleanups.
9574         * skip.c: Include "common/gdb_optional.h".
9575         (skiplist_entry::compiled_function_regexp): Now a
9576         gdb::optional<compiled_regex>.
9577         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9578         (free_skiplist_entry): Remove regfree call.
9579         (compile_skip_regexp, skip_rfunction_p): Adjust to use
9580         compiled_regex and gdb::optional.
9581         * symtab.c: Include "common/gdb_optional.h".
9582         (search_symbols): Use compiled_regex and gdb::optional.
9583         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9584         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
9585         to gdb_regex.c.
9586
9587 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9588
9589         * regcache.c (regcache::save): Avoid buffer use.
9590         (regcache::dump): Likewise.
9591
9592 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9593
9594         * sh-tdep.c (sh_pseudo_register_read): Remove
9595         MAX_REGISTER_SIZE.
9596         (sh_pseudo_register_write): Likewise.
9597         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9598         (sh64_pseudo_register_write): Likewise
9599
9600 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9601
9602         * aarch64-tdep.c (aarch64_store_return_value): Use
9603         V_REGISTER_SIZE.
9604         (aarch64_pseudo_read_value): Likewise.
9605         (aarch64_pseudo_write): Likewise.
9606
9607 2017-06-06  Yao Qi  <yao.qi@linaro.org>
9608
9609         * regformats/regdef.h (set_register_cache): Remove the
9610         declaration.
9611
9612 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
9613
9614         * frame.c (frame_unwind_register_signed): Use
9615         frame_unwind_register_value.
9616
9617 2017-06-06  Pedro Alves  <palves@redhat.com>
9618
9619         PR breakpoints/21553
9620         * breakpoint.c (create_breakpoints_sal_default)
9621         (init_breakpoint_sal, create_breakpoint_sal): Use
9622         gdb::unique_xmalloc_ptr for string parameters.
9623         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9624         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
9625         (base_breakpoint_create_breakpoints_sal)
9626         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9627         (strace_marker_create_breakpoints_sal)
9628         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9629         string parameters.
9630         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9631         gdb::unique_xmalloc_ptr for string parameters.
9632         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9633         parameters.
9634
9635 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9636
9637         * alpha-tdep.c (alpha_register_to_value): Use
9638         get_frame_register_value.
9639         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9640
9641 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9642
9643         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9644         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9645         (ia64_value_to_register): Likewise.
9646         (ia64_extract_return_value): Likewise.
9647         (ia64_store_return_value): Likewise.
9648         (ia64_push_dummy_call): Likewise.
9649
9650 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
9651
9652         GDB 8.0 released.
9653
9654 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
9655
9656         * x86-linux-nat.c (struct arch_lwp_info): Remove.
9657
9658 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
9659
9660         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9661         parameter.
9662         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9663
9664 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
9665
9666         * event-loop.c (poll_timers): Unallocate timer using delete
9667         instead of xfree.
9668
9669 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9670
9671         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9672         (struct breakpoint) <~breakpoint>: New.
9673         (struct watchpoint): Inherit from breakpoint.
9674         <~watchpoint>: New.
9675         <base>: Remove.
9676         (struct tracepoint): Inherit from breakpoint.
9677         <base>: Remove.
9678         * breakpoint.c (longjmp_breakpoint_ops): Remove.
9679         (struct longjmp_breakpoint): Inherit from breakpoint.
9680         <~longjmp_breakpoint>: New.
9681         <base>: Remove.
9682         (new_breakpoint_from_type): Remove casts.
9683         (watchpoint_in_thread_scope): Remove reference to base field.
9684         (watchpoint_del_at_next_stop): Likewise.
9685         (update_watchpoint): Likewise.
9686         (watchpoint_check): Likewise.
9687         (bpstat_check_watchpoint): Likewise.
9688         (set_longjmp_breakpoint): Likewise.
9689         (struct fork_catchpoint): Inherit from breakpoint.
9690         <base>: Remove.
9691         (struct solib_catchpoint): Inherit from breakpoint.
9692         <~solib_catchpoint>: New.
9693         <base>: Remove.
9694         (dtor_catch_solib): Change to ...
9695         (solib_catchpoint::~solib_catchpoint): ... this.
9696         (breakpoint_hit_catch_solib): Remove reference to base field.
9697         (add_solib_catchpoint): Likewise.
9698         (create_fork_vfork_event_catchpoint): Likewise.
9699         (struct exec_catchpoint): Inherit from breakpoint.
9700         <~exec_catchpoint>: New.
9701         <base>: Remove.
9702         (dtor_catch_exec): Change to ...
9703         (exec_catchpoint::~exec_catchpoint): ... this.
9704         (dtor_watchpoint): Change to ...
9705         (watchpoint::~watchpoint): ... this.
9706         (watch_command_1): Remove reference to base field.
9707         (catch_exec_command_1): Likewise.
9708         (base_breakpoint_dtor): Change to ...
9709         (breakpoint::~breakpoint): ... this.
9710         (base_breakpoint_ops): Remove dtor field value.
9711         (longjmp_bkpt_dtor): Change to ...
9712         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9713         (strace_marker_create_breakpoints_sal): Remove reference to base
9714         field.
9715         (delete_breakpoint): Don't manually call breakpoint destructor.
9716         (create_tracepoint_from_upload): Remove reference to base field.
9717         (trace_pass_set_count): Likewise.
9718         (initialize_breakpoint_ops): Don't initialize
9719         momentary_breakpoint_ops, don't set dtors.
9720         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9721         <~ada_catchpoint>: New.
9722         <base>: Remove.
9723         (create_excep_cond_exprs): Remove reference to base field.
9724         (dtor_exception): Change to ...
9725         (ada_catchpoint::~ada_catchpoint): ... this.
9726         (dtor_catch_exception): Remove.
9727         (dtor_catch_exception_unhandled): Remove.
9728         (dtor_catch_assert): Remove.
9729         (create_ada_exception_catchpoint): Remove reference to base
9730         field.
9731         (initialize_ada_catchpoint_ops): Don't set dtors.
9732         * break-catch-sig.c (struct signal_catchpoint): Inherit from
9733         breakpoint.
9734         <~signal_catchpoint>: New.
9735         <base>: Remove.
9736         (signal_catchpoint_dtor): Change to ...
9737         (signal_catchpoint::~signal_catchpoint): ... this.
9738         (create_signal_catchpoint): Remove reference to base field.
9739         (initialize_signal_catchpoint_ops): Don't set dtor.
9740         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
9741         from breakpoint.
9742         <~syscall_catchpoint>: New.
9743         <base>: Remove.
9744         (dtor_catch_syscall): Change to ...
9745         (syscall_catchpoint::~syscall_catchpoint): ... this.
9746         (create_syscall_event_catchpoint): Remove reference to base
9747         field.
9748         (initialize_syscall_catchpoint_ops): Don't set dtor.
9749         * break-catch-throw.c (struct exception_catchpoint): Inherit
9750         from breakpoint.
9751         <~exception_catchpoint>: New.
9752         <base>: Remove.
9753         (dtor_exception_catchpoint): Change to ...
9754         (exception_catchpoint::~exception_catchpoint): ... this.
9755         (handle_gnu_v3_exceptions): Remove reference to base field.
9756         (initialize_throw_catchpoint_ops): Don't set dtor.
9757         * ctf.c (ctf_get_traceframe_address): Remove reference to base
9758         field.
9759         * remote.c (remote_get_tracepoint_status): Likewise.
9760         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
9761         * tracefile.c (tracefile_fetch_registers): Likewise.
9762         * tracepoint.c (actions_command): Likewise.
9763         (validate_actionline): Likewise.
9764         (tfind_1): Likewise.
9765         (get_traceframe_location): Likewise.
9766         (find_matching_tracepoint_location): Likewise.
9767         (parse_tracepoint_status): Likewise.
9768         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
9769
9770 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9771
9772         * breakpoint.c (struct longjmp_breakpoint): New struct.
9773         (is_tracepoint_type): Change return type to bool.
9774         (is_longjmp_type): New function.
9775         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
9776         (set_raw_breakpoint_without_location): Use
9777         new_breakpoint_from_type.
9778         (set_raw_breakpoint): Likewise.
9779
9780 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9781
9782         * breakpoint.c (new_breakpoint_from_type): New function.
9783         (create_breakpoint_sal): Use new_breakpoint_from_type and
9784         unique_ptr.
9785         (create_breakpoint): Likewise.
9786
9787 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
9788
9789         * memattr.c (mem_info_command): Rename to ...
9790         (info_mem_command): ... this.
9791         (mem_enable_command): Rename to ...
9792         (enable_mem_command): ... this.
9793         (mem_disable_command): Rename to ...
9794         (disable_mem_command): ... this.
9795         (mem_delete_command): Rename to ...
9796         (delete_mem_command): ... this.
9797         (_initialize_mem): Adjust function names.
9798
9799 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9800
9801         * btrace.c (handle_pt_insn_events): New.
9802         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
9803         STATUS.  Split into this and ...
9804         (handle_pt_insn_event_flags): ... this.
9805
9806 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9807
9808         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
9809         and struct pt_insn.resynced.
9810         * configure: Regenerated.
9811         * config.in: Regenerated.
9812
9813 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9814
9815         * btrace.c (ftrace_find_call_by_number): New function.
9816         (ftrace_new_function): Store objects, not pointers.
9817         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
9818         ftrace_new_gap, ftrace_update_function,
9819         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
9820         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
9821         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
9822         btrace_ends_with_single_insn, btrace_call_get): Account for
9823         btrace_thread_info::functions now storing objects.
9824         * btrace.h (struct btrace_thread_info): Add constructor.
9825         (struct btrace_thread_info) <functions>: Make std::vector.
9826         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
9827         Initialize with default values.
9828         * record-btrace.c (record_btrace_frame_sniffer): Account for
9829         btrace_thread_info::functions now storing objects.
9830
9831 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9832
9833         * btrace.c: Remove typedef bfun_s.
9834         (ftrace_new_gap): Directly add gaps to the list of gaps.
9835         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
9836         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
9837         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
9838         instead of gdb VEC.
9839
9840 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9841
9842         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
9843         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
9844         with btrace_thread_info::next_segment and
9845         btrace_thread_info::prev_segment.
9846         * btrace.h: Remove struct btrace_func_link.
9847         (struct btrace_function): Replace pair of function segment pointers
9848         with pair of indices.
9849         * python/py-record-btrace.c (btpy_call_prev_sibling,
9850         btpy_call_next_sibling): Replace references to
9851         btrace_thread_info::segment with btrace_thread_info::next_segment and
9852         btrace_thread_info::prev_segment.
9853         * record-btrace.c (record_btrace_frame_this_id): Use
9854         btrace_find_call_by_number.
9855
9856 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9857
9858         * btrace.c (ftrace_new_function, ftrace_fixup_level,
9859         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9860         btrace_insn_next, btrace_insn_prev): Remove references to
9861         btrace_thread_info::flow.
9862         * btrace.h (struct btrace_function): Remove FLOW.
9863
9864 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9865
9866         * btrace.c (ftrace_find_call_by_number): New function.
9867         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
9868         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
9869         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
9870         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
9871         index.
9872         * btrace.h (struct btrace_function): Turn UP into an index.
9873         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
9874         as an index.
9875         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
9876         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
9877         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
9878
9879 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9880
9881         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9882         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9883         ftrace_update_function, ftrace_compute_global_level_offset,
9884         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
9885         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
9886         btrace_insn_end, btrace_is_empty): Remove references to
9887         btrace_thread_info::begin and btrace_thread_info::end.
9888         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
9889         (struct btrace_thread_info) <functions>: Adjust comment.
9890         * record-btrace.c (record_btrace_start_replaying): Remove reference to
9891         btrace_thread_info::begin.
9892
9893 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9894
9895         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9896         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9897         ftrace_update_function): Remove arguments that implicitly were always
9898         BTINFO->END.
9899         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
9900         Don't pass BTINFO->END.
9901
9902 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9903
9904         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
9905         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
9906         btrace_find_insn_by_number): Replace function segment pointer with
9907         index.
9908         (btrace_insn_cmp): Simplify.
9909         * btrace.h: (struct btrace_insn_iterator) Rename index to
9910         insn_index.  Replace function segment pointer with index into function
9911         segment vector.
9912         * record-btrace.c (record_btrace_call_history): Replace function
9913         segment pointer use with index.
9914         (record_btrace_frame_sniffer): Retrieve function call segment through
9915         vector.
9916         (record_btrace_set_replay): Remove defunc't safety check.
9917
9918 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9919
9920         * btrace.c (btrace_ends_with_single_insn): New function.
9921         (btrace_call_get, btrace_call_number, btrace_call_begin,
9922         btrace_call_end, btrace_call_next, btrace_call_prev,
9923         btrace_find_call_by_number): Use index into call segment vector
9924         instead of pointer.
9925         (btrace_call_cmp): Simplify.
9926         * btrace.h (struct btrace_call_iterator): Replace function call segment
9927         pointer with index into vector.
9928         * record-btrace.c (record_btrace_call_history): Use index instead of
9929         pointer.
9930
9931 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9932
9933         * btrace.c (btrace_insn_begin, btrace_insn_end,
9934         btrace_find_insn_by_number): Add btinfo to iterator.
9935         * btrace.h (struct btrace_insn_iterator): Add btinfo.
9936
9937 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9938
9939         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
9940         and save pointers directly.
9941         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
9942         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
9943         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
9944         changed signature of functions.
9945         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
9946         (btrace_fetch): Remove code that adds btrace_function pointers to
9947         vector of btrace_functions.
9948         (btrace_clear): Simplify freeing vector of btrace_functions.
9949
9950 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9951
9952         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
9953         Replace VEC_* with std::vector functions.
9954         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
9955         (struct btrace_thread_info)<functions>: Change type to std::vector.
9956
9957 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9958
9959         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
9960         "Removed targets and native configurations" up.  Merge duplicate
9961         "New commands" sub-sections.  Add "New options" sub-sections.
9962
9963 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
9964
9965         * defs.h (copy_integer_to_size): New declaration.
9966         * findvar.c (copy_integer_to_size): New function.
9967         (do_cint_test): New selftest function.
9968         (copy_integer_to_size_test): Likewise.
9969         (_initialize_findvar): Likewise.
9970         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
9971         (mips_fbsd_collect_reg): Use raw_collect_integer.
9972         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
9973         (mips64_fill_gregset): Use raw_collect_integer
9974         (mips64_fill_fpregset): Use raw_supply_integer.
9975         * regcache.c (regcache::raw_supply_integer): New function.
9976         (regcache::raw_collect_integer): Likewise.
9977         * regcache.h: (regcache::raw_supply_integer): New declaration.
9978         (regcache::raw_collect_integer): Likewise.
9979
9980 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9981
9982         * Makefile.in (SFILES): Add gdbarch-selftests.c.
9983         (COMMON_OBS): Add gdbarch-selftests.o.
9984         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
9985         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
9986         * gdbarch-selftests.c: New file.
9987         * regcache.h (regcache) <~regcache>: Mark it virtual if
9988         GDB_SELF_TEST.
9989         <raw_write>: Likewise.
9990
9991 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9992
9993         * regcache.c (current_regcache): Change it to
9994         regcache::current_regcache.
9995         (regcache_observer_target_changed): Update.
9996         (regcache_thread_ptid_changed): Make it a regcache static
9997         method.
9998         (regcache_thread_ptid_changed): Update.
9999         (class regcache_access): New.
10000         (current_regcache_test): Update.
10001         (_initialize_regcache): Update.
10002         * regcache.h: Include forward_list.
10003         (regcache): Declare regcache_thread_ptid_changed and declare
10004         registers_changed_ptid as friend.
10005
10006 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10007
10008         * i387-tdep.c (i387_register_to_value): Use register_size
10009         instead of TYPE_LENGTH.
10010         * m68k-tdep.c (m68k_register_to_value): Likewise.
10011
10012 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10013
10014         * i387-tdep.c (i387_convert_register_p): Return false if type
10015         code isn't TYPE_CODE_FLT.
10016
10017 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10018
10019         * alpha-tdep.c (alpha_convert_register_p): Return true if type
10020         length is 4.
10021         (alpha_register_to_value): Remove type length check.
10022         (alpha_value_to_register): Likewise.
10023
10024 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10025
10026         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10027         TYPE_CODE_FLT.
10028
10029 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10030
10031         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10032         TYPE_CODE_FLT or not.
10033
10034 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10035
10036         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10037         * avr-tdep.c (avr_gdbarch_init): Likewise.
10038         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10039         * cris-tdep.c (cris_gdbarch_init): Likewise.
10040         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10041         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10042         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10043         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10044         * mep-tdep.c (mep_gdbarch_init): Likewise.
10045         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10046         * mips-tdep.c (mips_gdbarch_init): Likewise.
10047         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10048         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10049         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10050         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10051         * v850-tdep.c (v850_gdbarch_init): Likewise.
10052
10053 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10054
10055         * selftest-arch.c (tests_with_arch): Call registers_changed
10056         and reinit_frame_cache.
10057         * selftest.c (run_self_tests): Likewise.
10058
10059 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10060
10061         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10062         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10063
10064 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10065
10066         * rl78-tdep.c (rl78_gdbarch_init): Don't call
10067         set_gdbarch_print_insn.
10068
10069 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10070
10071         * h8300-tdep.c (h8300_gdbarch_init): Don't call
10072         set_gdbarch_print_insn.
10073
10074 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10075
10076         * alpha-tdep.c (alpha_gdbarch_init): Don't call
10077         set_gdbarch_print_insn.
10078         * arc-tdep.c (arc_gdbarch_init): Likewise.
10079         * arch-utils.c: include dis-asm.h.
10080         (default_print_insn): New function.
10081         * arch-utils.h (default_print_insn): Declare.
10082         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10083         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10084         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10085         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10086         * frv-tdep.c (frv_gdbarch_init): Likewise.
10087         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10088         * gdbarch.sh (print_insn): Use default_print_insn.
10089         * gdbarch.c: Regenerated.
10090         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10091         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10092         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10093         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10094         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10095         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10096         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10097         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10098         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10099         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10100         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10101         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10102         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10103         * mt-tdep.c (mt_gdbarch_init): Likewise.
10104         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10105         * nios2-tdep.c (nios2_print_insn): Remove.
10106         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10107         * rx-tdep.c (rx_gdbarch_init): Likewise.
10108         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10109         * score-tdep.c (score_print_insn): Remove.
10110         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10111         * sh-tdep.c (sh_gdbarch_init): Likewise.
10112         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10113         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10114         * tic6x-tdep.c (tic6x_print_insn): Remove.
10115         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10116         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10117         * v850-tdep.c (v850_gdbarch_init): Likewise.
10118         * vax-tdep.c (vax_gdbarch_init): Likewise.
10119         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10120         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10121
10122 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10123
10124         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10125         (MIPS_FP0_REGNUM): Remove.
10126         (MIPS_FSR_REGNUM): Remove.
10127         (mips_fbsd_supply_fpregs): Use mips_regnum.
10128         (mips_fbsd_supply_gregs): Likewise.
10129         (mips_fbsd_collect_fpregs): Likewise.
10130         (mips_fbsd_collect_gregs): Likewise.
10131
10132 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10133
10134         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10135         (getpfpregs_supplies): New function.
10136         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10137         getfpregs_supplies.
10138         (mips_fbsd_store_inferior_registers): Likewise.
10139
10140 2017-05-22  Pedro Alves <palves@redhat.com>
10141
10142         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10143         maintainer.
10144
10145 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
10146
10147         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10148         (store_register): Likewise.
10149         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10150         (get_decimal_float_return_value): Likewise.
10151         (do_ppc_sysv_return_value): Likewise.
10152         (ppc64_sysv_abi_push_integer): Likewise.
10153         (ppc64_sysv_abi_push_freg): Likewise.
10154         (ppc64_sysv_abi_return_value_base): Likewise.
10155         (ppc64_sysv_abi_return_value): Likewise.
10156         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10157         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10158         * rs6000-nat.c: Likewise.
10159         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10160         (rs6000_value_to_register): Likewise.
10161         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10162
10163 2017-05-21  Tom Tromey  <tom@tromey.com>
10164
10165         PR rust/21466:
10166         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10167         arrays as "[T]", not "[T; ]".
10168
10169 2017-05-19  Tom Tromey  <tom@tromey.com>
10170
10171         PR rust/21484:
10172         * rust-lang.c (exp_descriptor_rust): New function.
10173         (rust_language_defn): Use it.
10174         * p-lang.c (pascal_language_defn): Update.
10175         * opencl-lang.c (opencl_language_defn): Update.
10176         * objc-lang.c (objc_language_defn): Update.
10177         * m2-lang.c (m2_language_defn): Update.
10178         * language.h (struct language_defn)
10179         <la_watch_location_expression>: New member.
10180         * language.c (unknown_language_defn, auto_language_defn)
10181         (local_language_defn): Update.
10182         * go-lang.c (go_language_defn): Update.
10183         * f-lang.c (f_language_defn): Update.
10184         * d-lang.c (d_language_defn): Update.
10185         * c-lang.h (c_watch_location_expression): Declare.
10186         * c-lang.c (c_watch_location_expression): New function.
10187         (c_language_defn, cplus_language_defn, asm_language_defn)
10188         (minimal_language_defn): Use it.
10189         * breakpoint.c (watch_command_1): Call
10190         la_watch_location_expression.
10191         * ada-lang.c (ada_language_defn): Update.
10192
10193 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10194
10195         PR tui/21482
10196         * gdb_curses.h (NOMACROS): Define.
10197         (NCURSES_NOMACROS): Define.
10198
10199 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10200
10201         PR tui/21482
10202         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10203         arg to char *.
10204         * tui/tui-wingeneral.c (box_win): Likewise.
10205         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10206         (tui_show_source_line): Likewise.
10207         (tui_show_exec_info_content): Likewise.
10208
10209 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10210
10211         * sparc-tdep.c (sparc_structure_return_p)
10212         (sparc_arg_on_registers_p): New functions.
10213         (sparc32_store_arguments): Use them.
10214         * sparc64-tdep.c (sparc64_16_byte_align_p)
10215         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10216         Handle TYPE_CODE_ARRAY.
10217
10218 2017-05-17  Yao Qi  <yao.qi@linaro.org>
10219
10220         * cli/cli-decode.c (add_alias_cmd): New function.
10221         * command.h (add_alias_cmd): Declare.
10222         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10223         instead call add_alias_cmd.
10224
10225 2017-05-17  Pedro Alves  <palves@redhat.com>
10226
10227         * Makefile.in (nat_extra_makefile_frag): Rename to ...
10228         (nat_makefile_frag): ... this.  All references updated.
10229         * configure.ac: Likewise.
10230         * configure.nat: Likewise.  Enhance comments.
10231         * configure: Regenerate.
10232
10233 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10234
10235         * procfs.c (procfs_create_inferior): Change prototype to match
10236         definition.
10237
10238 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
10239
10240         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10241         C++ compiler warning.
10242
10243 2017-05-12  Tom Tromey  <tom@tromey.com>
10244
10245         PR rust/21483:
10246         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10247         recurse, just call value_struct_elt directly.
10248
10249 2017-05-12  Tom Tromey  <tom@tromey.com>
10250
10251         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10252         OP_RUST_ARRAY>: Fix.
10253
10254 2017-05-12  Tom Tromey  <tom@tromey.com>
10255
10256         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10257
10258 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10259
10260         * regcache.c: Include <forward_list>.
10261         (struct regcache_list): Remove.
10262         (current_regcache): Update.
10263         (get_thread_arch_aspace_regcache): Update for std::forward_list.
10264         (regcache_thread_ptid_changed): Likewise.
10265         (registers_changed_ptid): Likewise.
10266         (current_regcache_size): Likewise.
10267
10268 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10269
10270         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10271         (current_regcache_size): New function.
10272         (current_regcache_test): New function.
10273         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10274
10275 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10276
10277         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10278         (print_gp_register_row): Use get_frame_register_value.
10279
10280 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10281
10282         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10283         (mips_supply_fpregset): Likewise.
10284         (mips64_supply_gregset): Likewise.
10285
10286 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10287
10288         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
10289         regcache->raw_supply_zeroed.
10290
10291 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10292
10293         * configure.nat: Rearrange 'case' statements to match
10294         host before cpu.
10295
10296 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10297
10298         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
10299         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10300         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
10301         "@nat_extra_makefile_frag@".
10302         (Makefile): Remove dependency on "@frags@".
10303         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10304         (data-directory/Makefile): Likewise.
10305         * config/aarch64/linux.mh: Deleted; moved contents to
10306         "gdb/configure.nat".
10307         * config/alpha/alpha-linux.mh: Likewise.
10308         * config/alpha/nbsd.mh: Likewise.
10309         * config/arm/linux.mh: Likewise.
10310         * config/arm/nbsdelf.mh: Likewise.
10311         * config/i386/cygwin.mh: Likewise.
10312         * config/i386/cygwin64.mh: Likewise.
10313         * config/i386/darwin.mh: Likewise.
10314         * config/i386/fbsd.mh: Likewise.
10315         * config/i386/fbsd64.mh: Likewise.
10316         * config/i386/go32.mh: Likewise.
10317         * config/i386/i386gnu.mh: Likewise.
10318         * config/i386/i386sol2.mh: Likewise.
10319         * config/i386/linux.mh: Likewise.
10320         * config/i386/linux64.mh: Likewise.
10321         * config/i386/mingw.mh: Likewise.
10322         * config/i386/mingw64.mh: Likewise.
10323         * config/i386/nbsd64.mh: Likewise.
10324         * config/i386/nbsdelf.mh: Likewise.
10325         * config/i386/nto.mh: Likewise.
10326         * config/i386/obsd.mh: Likewise.
10327         * config/i386/obsd64.mh: Likewise.
10328         * config/i386/sol2-64.mh: Likewise.
10329         * config/ia64/linux.mh: Likewise.
10330         * config/m32r/linux.mh: Likewise.
10331         * config/m68k/linux.mh: Likewise.
10332         * config/m68k/nbsdelf.mh: Likewise.
10333         * config/m68k/obsd.mh: Likewise.
10334         * config/m88k/obsd.mh: Likewise.
10335         * config/mips/fbsd.mh: Likewise.
10336         * config/mips/linux.mh: Likewise.
10337         * config/mips/nbsd.mh: Likewise.
10338         * config/mips/obsd64.mh: Likewise.
10339         * config/pa/linux.mh: Likewise.
10340         * config/pa/nbsd.mh: Likewise.
10341         * config/pa/obsd.mh: Likewise.
10342         * config/powerpc/aix.mh: Likewise.
10343         * config/powerpc/fbsd.mh: Likewise.
10344         * config/powerpc/linux.mh: Likewise.
10345         * config/powerpc/nbsd.mh: Likewise.
10346         * config/powerpc/obsd.mh: Likewise.
10347         * config/powerpc/ppc64-linux.mh: Likewise.
10348         * config/powerpc/spu-linux.mh: Likewise.
10349         * config/s390/linux.mh: Likewise.
10350         * config/sh/nbsd.mh: Likewise.
10351         * config/sparc/fbsd.mh: Likewise.
10352         * config/sparc/linux.mh: Likewise.
10353         * config/sparc/linux64.mh: Likewise.
10354         * config/sparc/nbsd64.mh: Likewise.
10355         * config/sparc/nbsdelf.mh: Likewise.
10356         * config/sparc/obsd64.mh: Likewise.
10357         * config/sparc/sol2.mh: Likewise.
10358         * config/tilegx/linux.mh: Likewise.
10359         * config/vax/nbsdelf.mh: Likewise.
10360         * config/vax/obsd.mh: Likewise.
10361         * config/xtensa/linux.mh: Likewise.
10362         * config/i386/i386gnu.mn: New file, with excerpts from
10363         "config/i386/i386gnu.mh".
10364         * configure: Regenerate.
10365         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10366         *.mh files under "gdb/config".
10367         * configure.nat: New file, with contents from the
10368         "gdb/config/*/*.mh" files.
10369
10370 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
10371
10372         * btrace.c (btrace_clear): Free insn vector.
10373
10374 2017-05-05  Pedro Alves  <palves@redhat.com>
10375
10376         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10377         * configure: Regenerate.
10378
10379 2017-05-04  Pedro Alves  <palves@redhat.com>
10380
10381         * Makefile.in (SFILES): Add progspace-and-thread.c.
10382         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10383         (COMMON_OBS): Add progspace-and-thread.o.
10384         * breakpoint.c: Include "progspace-and-thread.h".
10385         (update_inserted_breakpoint_locations)
10386         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10387         Use scoped_restore_current_pspace_and_thread.
10388         (create_std_terminate_master_breakpoint): Use
10389         scoped_restore_current_program_space.
10390         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10391         (print_breakpoint_location): Use
10392         scoped_restore_current_program_space.
10393         (bp_loc_is_permanent): Use
10394         scoped_restore_current_pspace_and_thread.
10395         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10396         (download_tracepoint_locations): Use
10397         scoped_restore_current_pspace_and_thread.
10398         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10399         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10400         (enum step_over_calls_kind): Moved from inferior.h.
10401         (class scoped_restore_current_thread): New class.
10402         * gdbthread.h (make_cleanup_restore_current_thread): Delete
10403         declaration.
10404         (scoped_restore_current_thread): New class.
10405         * infcmd.c: Include "common/gdb_optional.h".
10406         (continue_1, proceed_after_attach): Use
10407         scoped_restore_current_thread.
10408         (notice_new_inferior): Use scoped_restore_current_thread.
10409         * inferior.c: Include "progspace-and-thread.h".
10410         (restore_inferior, save_current_inferior): Delete.
10411         (add_inferior_command, clone_inferior_command): Use
10412         scoped_restore_current_pspace_and_thread.
10413         * inferior.h (scoped_restore_current_inferior): New class.
10414         * infrun.c: Include "progspace-and-thread.h" and
10415         "common/gdb_optional.h".
10416         (follow_fork_inferior): Use
10417         scoped_restore_current_pspace_and_thread.
10418         (scoped_restore_exited_inferior): New class.
10419         (handle_vfork_child_exec_or_exit): Use
10420         scoped_restore_exited_inferior,
10421         scoped_restore_current_pspace_and_thread,
10422         scoped_restore_current_thread and scoped_restore.
10423         (fetch_inferior_event): Use scoped_restore_current_thread.
10424         * linespec.c (decode_line_full, decode_line_1): Use
10425         scoped_restore_current_program_space.
10426         * mi/mi-main.c: Include "progspace-and-thread.h".
10427         (exec_continue): Use scoped_restore_current_thread.
10428         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10429         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10430         * proc-service.c (ps_pglobal_lookup): Use
10431         scoped_restore_current_program_space.
10432         * progspace-and-thread.c: New file.
10433         * progspace-and-thread.h: New file.
10434         * progspace.c (release_program_space, clone_program_space): Use
10435         scoped_restore_current_program_space.
10436         (restore_program_space, save_current_program_space)
10437         (save_current_space_and_thread): Delete.
10438         (switch_to_program_space_and_thread): Moved to
10439         progspace-and-thread.c.
10440         * progspace.h (save_current_program_space)
10441         (save_current_space_and_thread): Delete declarations.
10442         (scoped_restore_current_program_space): New class.
10443         * remote.c (remote_btrace_maybe_reopen): Use
10444         scoped_restore_current_thread.
10445         * symtab.c: Include "progspace-and-thread.h".
10446         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10447         * thread.c (print_thread_info_1): Use
10448         scoped_restore_current_thread.
10449         (struct current_thread_cleanup): Delete.
10450         (do_restore_current_thread_cleanup)
10451         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10452         (scoped_restore_current_thread::~scoped_restore_current_thread):
10453         ... this new dtor.
10454         (make_cleanup_restore_current_thread): Rename/convert to ...
10455         (scoped_restore_current_thread::scoped_restore_current_thread):
10456         ... this new ctor.
10457         (thread_apply_all_command): Use scoped_restore_current_thread.
10458         (thread_apply_command): Use scoped_restore_current_thread.
10459         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10460         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10461
10462 2017-05-04  Pedro Alves  <palves@redhat.com>
10463
10464         * thread.c (make_cleanup_restore_current_thread): Move
10465         find_thread_ptid call before the is_stopped call.  Assert that the
10466         thread is found.  Replace is_stopped call by checking the thread's
10467         state directly.  Remove unnecessary NULL-thread check.
10468
10469 2017-05-04  Pedro Alves  <palves@redhat.com>
10470
10471         * corelow.c (thread_section_name): New class.
10472         (get_core_register_section, get_core_siginfo): Use it.
10473
10474 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10475
10476         * corelow.c (sniff_core_bfd): Remove extra semicolon.
10477         (get_core_register_section): Remove xfree of NULL pointer.
10478
10479 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
10480
10481         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10482         * regcache.c (regcache::raw_supply_zeroed): New function.
10483         * regcache.h (regcache::raw_supply_zeroed): New declaration.
10484
10485 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10486
10487         * gdbarch.sh: Remove commented out definition of
10488         TARGET_CHAR_BIT.
10489         * gdbarch.h: Re-generate.
10490
10491 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
10492
10493         * configure: Regenerate.
10494
10495 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
10496
10497         * solib-target.c (solib_target_relocate_section_addresses):
10498         Remove num_section_bases, num_bases, segment_bases variables.
10499
10500 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10501
10502         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10503
10504 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10505
10506         * solib-target.c: Include <vector>
10507         (struct lm_info_target) <~lm_info_target>: Remove.
10508         <segment_bases, section_bases>: Change type to
10509         std::vector<CORE_ADDR>.
10510         (library_list_start_segment, library_list_start_section,
10511         library_list_end_library,
10512         solib_target_relocate_section_addresses): Adjust.
10513
10514 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10515
10516         * gdbarch.sh (software_single_step): Change return type to
10517         std::vector<CORE_ADDR>.
10518         * gdbarch.c, gdbarch.h: Re-generate.
10519         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10520         Adjust.
10521         (arm_deal_with_atomic_sequence_raw): Adjust.
10522         (thumb_get_next_pcs_raw): Adjust.
10523         (arm_get_next_pcs_raw): Adjust.
10524         (arm_get_next_pcs): Adjust.
10525         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10526         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10527         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10528         (alpha_software_single_step): Adjust.
10529         * alpha-tdep.h (alpha_software_single_step): Adjust.
10530         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10531         * arm-tdep.c (arm_software_single_step): Adjust.
10532         (arm_breakpoint_kind_from_current_state): Adjust.
10533         * arm-tdep.h (arm_software_single_step): Adjust.
10534         * breakpoint.c (insert_single_step_breakpoint): Adjust.
10535         * cris-tdep.c (cris_software_single_step): Adjust.
10536         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10537         (micromips_deal_with_atomic_sequence): Adjust.
10538         (deal_with_atomic_sequence): Adjust.
10539         (mips_software_single_step): Adjust.
10540         * mips-tdep.h (mips_software_single_step): Adjust.
10541         * moxie-tdep.c (moxie_software_single_step): Adjust.
10542         * nios2-tdep.c (nios2_software_single_step): Adjust.
10543         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10544         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10545         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10546         * s390-linux-tdep.c (s390_software_single_step): Adjust.
10547         * sparc-tdep.c (sparc_software_single_step): Adjust.
10548         * spu-tdep.c (spu_software_single_step): Adjust.
10549         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10550
10551 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10552
10553         * gdbarch.sh: Use semi-colon as field separator instead of colon.
10554         * gdbarch.h: Re-generate.
10555
10556 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10557
10558         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10559         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10560         * python/py-instruction.c, python/py-instruction.h: New file.
10561         * python/py-record.c: Add py-instruction.h include.
10562         (gdbpy_initialize_record): Make gdb.Instruction a super class of
10563         gdb.RecordInstruction.
10564         * python/python-internal.h: Add gdbpy_initialize_instruction
10565         declaration.
10566         * python/python.c (do_start_initialization): Add
10567         gdbpy_initialize_instruction.
10568
10569 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10570
10571         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10572         Remove.
10573         (btrace_func_from_recpy_func): New function.
10574         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10575         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10576         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10577         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10578         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10579         Also, use new helper functions.
10580         (btpy_list_item): Use new helper functions.
10581         (recpy_bt_function_call_history): Use new type name.
10582         (btpy_call_getset): Remove.
10583         (gdbpy_initialize_btrace): Remove code to initialize
10584         gdb.BtraceFunctionCall.
10585         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10586         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10587         recpy_bt_func_prev, recpy_bt_func_next): New export.
10588         * python/py-record.c (recpy_func_type): New static object.
10589         (recpy_func_new, recpy_func_level, recpy_func_symbol,
10590         recpy_func_instructions, recpy_func_up, recpy_func_prev,
10591         recpy_func_next): New function.
10592         (recpy_element_hash, recpy_element_richcompare): Updated comment.
10593         (recpy_func_getset): New static object.
10594         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10595         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10596
10597 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10598
10599         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10600         (btpy_object, btpy_insn_type, btpy_new): Remove.
10601         (btpy_list_object): Use gdb.RecordInstruction type instead of
10602         gdb.BtraceInstruction type.
10603         (btrace_insn_from_recpy_insn): New function.
10604         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10605         btpy_new.
10606         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10607         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10608         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10609         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10610         instead of btpy_object.
10611         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10612         btpy_insn_data, btpy_insn_decode): Rename to ...
10613         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10614         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10615         recpy_bt_insn_decode): This.  Also, use new helper functions.
10616         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10617         recpy_insn_type.
10618         (btpy_insn_getset): Remove.
10619         (gdbpy_initialize_btrace): Remove code to initialize
10620         gdb.BtraceInstruction.  Use recpy_element_object.
10621         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10622         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10623         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10624         * python/py-record.c (recpy_insn_type): New static object.
10625         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10626         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10627         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10628         New function.
10629         (recpy_insn_getset): New static object.
10630         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10631         * python/py-record.h (recpy_element_object): New typedef.
10632         (recpy_insn_type, recpy_insn_new): New export.
10633
10634 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10635
10636         * py-record-btrace.c (btpy_insn_new): Removed.
10637         (btpy_insn_or_gap_new): New function.
10638         (btpy_insn_error): Removed.
10639         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10640         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10641         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10642         btpy_insn_or_gap_new instead of btpy_insn_new.
10643         (btpy_insn_getset): Remove btpy_insn_error.
10644         * py-record.c (recpy_gap_type): New static object.
10645         (recpy_gap_object): New typedef.
10646         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10647         recpy_gap_reason_string): New function.
10648         (recpy_gap_getset): New static object.
10649         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10650         * py-record.h (recpy_gap_new): New export.
10651
10652 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10653
10654         * python/py-record.c (recpy_ptid): Remove.
10655         (recpy_record_getset): Remove recpy_ptid.
10656
10657 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10658
10659         * btrace.c (btrace_fetch): Set inferior_ptid.
10660         * python/py-record-btrace.c: Add "py-record.h" include.
10661         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10662         recpy_bt_end, recpy_bt_instruction_history,
10663         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10664         in gdb.Record object instead of current ptid.
10665         * python/py-record.c: Include new "py-record.h" file.
10666         (recpy_record_object): Moved to py-record.h.
10667         * python/py-record.h: New file.
10668
10669 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10670
10671         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10672         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10673         indentation.
10674
10675 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
10676
10677         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10678         the past maintainers section.
10679
10680 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10681
10682         * infcmd.c (get_return_value): Use regcache ctor, and remove
10683         cleanup.
10684
10685 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10686             Pedro Alves  <palves@redhat.com>
10687
10688         * regcache.c (regcache::regcache): New tag dispatch ctor.
10689         (do_cooked_read): Moved above.
10690         (regcache_dup): Use the tag dispatch ctor..
10691         * regcache.h (regcache): Declare ctor, delete copy ctor and
10692         assignment operator, remove friend regcache_dup.
10693
10694 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10695
10696         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10697         call method save instead of regcache_cpy.
10698         * regcache.h (struct regcache): Make regcache_dup a friend.
10699
10700 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10701
10702         * regcache.c (struct regcache): Move to regcache.h
10703         (regcache::arch): New method.
10704         (regcache_get_ptid): Update.
10705         (get_regcache_arch): Call arch method.
10706         (get_regcache_aspace): Call method aspace.
10707         (register_buffer): Change it to method.
10708         (regcache_save): Change it to regcache::save.
10709         (regcache_restore): Likewise.
10710         (regcache_cpy_no_passthrough): Remove the declaration.
10711         (regcache_cpy): Call methods restore and cpy_no_passthrough.
10712         (regcache_cpy_no_passthrough): Change it to method
10713         cpy_no_passthrough.
10714         (regcache_register_status): Change it to method
10715         get_register_status.
10716         (regcache_invalidate): Change it to method invalidate.
10717         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10718         (regcache_raw_update): Change it to method raw_update.
10719         (regcache_raw_read): Likewise.
10720         (regcache_raw_read_signed): Likewise.
10721         (regcache_raw_read_unsigned): Likewise.
10722         (regcache_raw_write_signed): Likewise.
10723         (regcache_raw_write_unsigned): Likewise.
10724         (regcache_cooked_read): Likewise.
10725         (regcache_cooked_read_value): Likewise.
10726         (regcache_cooked_read_signed): Likewise.
10727         (regcache_cooked_read_unsigned): Likewise.
10728         (regcache_cooked_write_signed): Likewise.
10729         (regcache_cooked_write_unsigned): Likewise.
10730         (regcache_raw_set_cached_value): Likewise.
10731         (regcache_raw_write): Likewise.
10732         (regcache_cooked_write): Likewise.
10733         (regcache_xfer_part): Likewise.
10734         (regcache_raw_read_part): Likewise.
10735         (regcache_raw_write_part): Likewise.
10736         (regcache_cooked_read_part): Likewise.
10737         (regcache_cooked_write_part): Likewise.
10738         (regcache_raw_supply): Likewise.
10739         (regcache_raw_collect): Likewise.
10740         (regcache_transfer_regset): Likewise.
10741         (regcache_supply_regset): Likewise.
10742         (regcache_collect_regset): Likewise.
10743         (regcache_debug_print_register): Likewise.
10744         (enum regcache_dump_what): Move it to regcache.h.
10745         (regcache_dump): Change it to method dump.
10746         * regcache.h (enum regcache_dump_what): New.
10747         (class regcache): New.
10748         * target.c (target_fetch_registers): Call method
10749         debug_print_register.
10750         (target_store_registers): Likewise.
10751
10752 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10753
10754         * windows-nat.c (struct lm_info_windows): Initialize field.
10755         (windows_make_so): Allocate lm_info_windows with new.
10756         (windows_free_so): Free lm_info_windows with delete.
10757
10758 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10759
10760         * solib-darwin.c (struct lm_info_darwin): Initialize field.
10761         (darwin_current_sos): Allocate lm_info_darwin with new, remove
10762         cleanup.
10763         (darwin_free_so): Free lm_info_darwin with delete.
10764
10765 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10766
10767         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
10768         <l_addr_p>: Change type to bool.
10769         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
10770         (svr4_free_so): Free lm_info_svr4 with delete.
10771         (svr4_copy_library_list): Replace memcpy with call to copy
10772         constructor.
10773         (library_list_start_library, svr4_default_sos): Allocate
10774         lm_info_svr4 with new.
10775
10776 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10777
10778         * solib-target.c (struct lm_info_target): Add destructor,
10779         initialize fields.
10780         <name>: Change type to std::string.
10781         (library_list_start_library): Allocate lm_info_target with new.
10782         (solib_target_free_library_list): Free lm_info_target with
10783         delete.
10784         (solib_target_current_sos): Adapt to std::string.
10785         (solib_target_free_so): Free lm_info_target with delete.
10786
10787 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10788
10789         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
10790         fields.
10791         (frv_current_sos): Allocate lm_info_frv with new.
10792         (frv_relocate_main_executable): Free lm_info_frv with delete,
10793         allocate with new.
10794         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
10795
10796 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10797
10798         * solib-frv.c (struct lm_info_frv): Fix indentation.
10799
10800 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10801
10802         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
10803         map field.
10804         (dsbt_current_sos): Allocate lm_info_dsbt with new.
10805         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
10806         and allocate with new.
10807         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
10808
10809 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10810
10811         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
10812         <filename, member_name>: Change type to std::string.
10813         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
10814         (library_list_start_library): Allocate lm_info_aix with new.
10815         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
10816         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
10817         with copy constructor.
10818
10819 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10820
10821         * solist.h (struct lm_info): Remove.
10822         (struct lm_info_base): New class.
10823         (struct so_list) <lm_info>: Change type to lm_info_base *.
10824         * nto-tdep.c (struct lm_info): Remove.
10825         (lm_addr): Adjust.
10826         * solib-aix.c (struct lm_info): Rename to ...
10827         (struct lm_info_aix): ... this.  Extend lm_info_base.
10828         (lm_info_p): Rename to ...
10829         (lm_info_aix_p): ... this, and adjust.
10830         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
10831         solib_aix_parse_libraries, library_list_start_library,
10832         solib_aix_free_library_list, solib_aix_parse_libraries,
10833         solib_aix_get_library_list,
10834         solib_aix_relocate_section_addresses, solib_aix_free_so,
10835         solib_aix_get_section_offsets,
10836         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
10837         Adjust.
10838         (struct solib_aix_inferior_data) <library_list>: Adjust.
10839         * solib-darwin.c (struct lm_info): Rename to ...
10840         (struct lm_info_darwin): ... this.  Extend lm_info_base.
10841         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
10842         * solib-dsbt.c (struct lm_info): Rename to ...
10843         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
10844         (struct dsbt_info) <main_executable_lm_info): Adjust.
10845         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
10846         dsbt_relocate_section_addresses): Adjust.
10847         * solib-frv.c (struct lm_info): Rename to ...
10848         (struct lm_info_frv): ... this.  Extend lm_info_base.
10849         (main_executable_lm_info): Adjust.
10850         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
10851         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
10852         find_canonical_descriptor_in_load_object,
10853         frv_fdpic_find_canonical_descriptor): Adjust.
10854         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10855         to lm_info_svr4.
10856         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10857         svr4_clear_so, svr4_copy_library_list,
10858         library_list_start_library, svr4_default_sos, svr4_read_so_list,
10859         svr4_current_sos, svr4_fetch_objfile_link_map,
10860         solist_update_incremental): Adjust.
10861         * solib-svr4.h (struct lm_info_svr4): Move here from
10862         solib-svr4.c.
10863         * solib-target.c (struct lm_info): Rename to ...
10864         (struct lm_info_target): ... this.  Extend lm_info_base.
10865         (lm_info_p): Rename to ...
10866         (lm_info_target_p): ... this.
10867         (solib_target_parse_libraries, library_list_start_segment,
10868         library_list_start_section, library_list_start_library,
10869         library_list_end_library, solib_target_free_library_list,
10870         solib_target_current_sos, solib_target_free_so,
10871         solib_target_relocate_section_addresses): Adjust.
10872         * windows-nat.c (struct lm_info): Rename to ...
10873         (struct lm_info_windows): ... this.  Extend lm_info_base.
10874         (windows_make_so, handle_load_dll, handle_unload_dll,
10875         windows_xfer_shared_libraries): Adjust.
10876
10877 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10878
10879         * solib-darwin.c (struct darwin_so_list): Remove.
10880         (darwin_current_sos): Allocate an so_list object instead of a
10881         darwin_so_list, separately allocate an lm_info object.
10882         (darwin_free_so): Free lm_info.
10883
10884 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
10885
10886         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
10887         with fprintf_filtered.
10888
10889 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10890
10891         * regcache.c (regcache::regcache): New function.
10892         (regcache::~regcache): New function.
10893         (regcache_xmalloc_1): Remove.
10894         (regcache_xmalloc): Call new regcache.
10895         (regcache_xfree): Call delete regcache.
10896         (get_thread_arch_aspace_regcache): Call new regcache.
10897
10898 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10899
10900         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
10901         lwp instead of ptid_get_lwp.
10902
10903 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10904
10905         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
10906         lwp_info instead of getting from inferior_ptid.
10907
10908 2017-04-27  Keith Seitz  <keiths@redhat.com>
10909
10910         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
10911         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
10912         (CV_CONVERSION_BADNESS): Define.
10913         (rank_one_type): Remove overly restrictive rvalue reference
10914         rank checks.
10915         Add cv-qualifier checks and subranks for type equality.
10916         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
10917         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
10918         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
10919
10920 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
10921
10922         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
10923         count when creating the object.
10924
10925 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
10926             Ulrich Weigand  <uweigand@de.ibm.com>
10927
10928         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
10929         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
10930         is used in AIX.
10931         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
10932         (process_xcoff_symbol): Likewise.
10933         (scan_xcoff_symtab): Likewise.
10934
10935 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10936
10937         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
10938         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
10939         (ia64_access_reg): Use get_frame_register_unsigned.
10940         (ia64_access_rse_reg): Likewise.
10941         (ia64_libunwind_frame_prev_register): Likewise.
10942
10943 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
10944
10945         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
10946         * gdbarch.c: Regenerated.
10947         * gdbarch.h: Regenerated.
10948         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
10949         visibility external.
10950         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
10951         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
10952         (enum cfa_how_kind): Move to ...
10953         (struct dwarf2_frame_state_reg_info): Likewise.
10954         (struct dwarf2_frame_state): Likewise.
10955         * dwarf2-frame.h: ... here.
10956         (dwarf2_frame_state_alloc_regs): New declaration.
10957         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
10958         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
10959
10960 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10961
10962         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
10963         regcache_raw_read_unsigned.
10964         (xtensa_pseudo_register_write): Likewise.
10965
10966 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10967
10968         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
10969         (nds32_pseudo_register_write): Likewise.
10970
10971 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10972
10973         * regcache.c (struct regcache) <readonly_p>: Change its type
10974         to bool.
10975         (regcache_xmalloc_1): Update parameter type and callers update.
10976
10977 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10978
10979         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
10980         set_gdbarch_wchar_bit.
10981         * arm-tdep.c (arm_gdbarch_init): Likewise.
10982
10983 2017-04-25  Pedro Alves  <palves@redhat.com>
10984
10985         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
10986         (BothAreRelocatable, memcopy, memmove): Don't define.
10987         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
10988         macros.
10989
10990 2017-04-25  Pedro Alves  <palves@redhat.com>
10991
10992         * common/common-defs.h: Include "common/poison.h".
10993         * common/function-view.h: (Not, Or, Requires): Move to traits.h
10994         and adjust.
10995         * common/poison.h: New file.
10996         * common/traits.h: Include <type_traits>.
10997         (Not, Or, Requires): New, moved from common/function-view.h.
10998
10999 2017-04-25  Pedro Alves  <palves@redhat.com>
11000
11001         * breakpoint.h (struct breakpoint): In-class initialize all
11002         fields.  Make boolean fields "bool".
11003         * breakpoint.c (init_raw_breakpoint_without_location): Remove
11004         memset call and initializations no longer necessary.
11005
11006 2017-04-25  Pedro Alves  <palves@redhat.com>
11007
11008         * btrace.c (pt_btrace_insn_flags): Change parameter type to
11009         reference.
11010         (pt_btrace_insn): New function.
11011         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11012
11013 2017-04-25  Pedro Alves  <palves@redhat.com>
11014
11015         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
11016         "base" field and inherit from "bp_location" instead.  Add
11017         non-default ctor.
11018         (allocate_location_exception): Use new non-default ctor.
11019         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11020         (init_bp_location): Convert to ...
11021         (bp_location::bp_location): ... this new ctor, and remove memset
11022         call.
11023         (base_breakpoint_allocate_location): Use the new non-default ctor.
11024         * breakpoint.h (bp_location): Now a class.  Declare default and
11025         non-default ctors.  In-class initialize all members.
11026         (init_bp_location): Remove declaration.
11027
11028 2017-04-25  Pedro Alves  <palves@redhat.com>
11029
11030         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11031         assignment operator.
11032
11033 2017-04-24  Yao Qi  <yao.qi@linaro.org>
11034
11035         * doublest.c (convert_doublest_to_floatformat): Call
11036         floatformat_totalsize_bytes.
11037
11038 2017-04-22  Tom Tromey  <tom@tromey.com>
11039
11040         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11041         ui_out_emit_list.
11042         * stack.c (print_frame): Use ui_out_emit_list.
11043         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11044         ui_out_emit_list.
11045         * mi/mi-main.c (print_one_inferior)
11046         (mi_cmd_data_list_register_names)
11047         (mi_cmd_data_list_register_values, mi_cmd_list_features)
11048         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11049         ui_out_emit_list.
11050         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11051         (mi_output_solib_attribs): Use ui_out_emit_list,
11052         ui_out_emit_tuple.
11053         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11054         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11055         (mi_cmd_stack_list_args, list_args_or_locals): Use
11056         ui_out_emit_list.
11057         * disasm.c (do_assembly_only): Use ui_out_emit_list.
11058         * breakpoint.c (print_solib_event, output_thread_groups): Use
11059         ui_out_emit_list.
11060
11061 2017-04-22  Tom Tromey  <tom@tromey.com>
11062
11063         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11064         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11065         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11066
11067 2017-04-22  Tom Tromey  <tom@tromey.com>
11068
11069         * tracepoint.c (tvariables_info_1)
11070         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11071
11072 2017-04-22  Tom Tromey  <tom@tromey.com>
11073
11074         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11075         annotate_arg_emitter.
11076         * breakpoint.c (print_mention_watchpoint)
11077         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11078         * annotate.h (struct annotate_arg_emitter): New.
11079
11080 2017-04-22  Tom Tromey  <tom@tromey.com>
11081
11082         * record-btrace.c (record_btrace_insn_history)
11083         (record_btrace_insn_history_range, record_btrace_call_history)
11084         (record_btrace_call_history_range): Use ui_out_emit_tuple.
11085         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11086         ui_out_emit_tuple.
11087         * stack.c (print_frame_info): Use ui_out_emit_tuple.
11088         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11089         * skip.c (skip_info): Use ui_out_emit_tuple.
11090         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11091         * progspace.c (print_program_space): Use ui_out_emit_tuple.
11092         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11093         * osdata.c (info_osdata): Use ui_out_emit_tuple.
11094         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11095         ui_out_emit_tuple.
11096         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11097         (output_register, mi_cmd_data_read_memory)
11098         (mi_cmd_data_read_memory_bytes, mi_load_progress)
11099         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11100         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11101         Use ui_out_emit_tuple.
11102         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11103         ui_out_emit_tuple.
11104         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11105         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11106         * linux-thread-db.c (info_auto_load_libthread_db): Use
11107         ui_out_emit_tuple.
11108         * inferior.c (print_inferior): Use ui_out_emit_tuple.
11109         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11110         * disasm.c (do_mixed_source_and_assembly_deprecated)
11111         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11112         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11113         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11114         * breakpoint.c (print_one_breakpoint_location)
11115         (print_one_breakpoint): Use ui_out_emit_tuple.
11116         * auto-load.c (print_script, info_auto_load_cmd): Use
11117         ui_out_emit_tuple.
11118         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11119
11120 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
11121
11122         * thread.c (print_thread_info_1): Remove dead code.
11123
11124 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11125
11126         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11127         GDB_SELF_TEST.
11128         * arm-tdep.c (selftests::arm_record_test): Likewise.
11129
11130 2017-04-21  Yao Qi  <yao.qi@linaro.org>
11131
11132         * regcache.c (regcache_restore): Remove argument 2.  Replace
11133         argument 3 with regcache.  Get register status from
11134         src->register_status and get register contents from
11135         register_buffer (src, regnum).
11136         (regcache_cpy): Update.
11137
11138 2017-04-19  Pedro Alves  <palves@redhat.com>
11139
11140         * gdbthread.h (thread): Add missing closing parenthesis in
11141         comment.
11142
11143 2017-04-19  Pedro Alves  <palves@redhat.com>
11144
11145         * common/refcounted-object.h: New file.
11146         * gdbthread.h: Include "common/refcounted-object.h".
11147         (thread_info): Inherit from refcounted_object and add comments.
11148         (thread_info::incref, thread_info::decref)
11149         (thread_info::m_refcount): Delete.
11150         (thread_info::deletable): Use the refcounted_object::refcount()
11151         method.
11152         * inferior.c (current_inferior_): Add comment.
11153         (set_current_inferior): Increment/decrement refcounts.
11154         (prune_inferiors, remove_inferior_command): Skip inferiors marked
11155         not-deletable instead of comparing with the current inferior.
11156         (initialize_inferiors): Increment the initial inferior's refcount.
11157         * inferior.h (struct inferior): Forward declare.
11158         Include "common/refcounted-object.h".
11159         (current_inferior, set_current_inferior): Move declaration to
11160         before struct inferior's definition, and fix comment.
11161         (inferior): Inherit from refcounted_object.  Add comments.
11162         * thread.c (switch_to_thread_no_regs): Reference the thread's
11163         inferior pointer directly instead of doing a ptid lookup.
11164         (switch_to_no_thread): New function.
11165         (switch_to_thread(thread_info *)): New function, factored out
11166         from ...
11167         (switch_to_thread(ptid_t)): ... this.
11168         (restore_current_thread): Delete.
11169         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11170         fields, and add 'inf' field.
11171         (do_restore_current_thread_cleanup): Check whether old->inf is
11172         alive instead of looking up an inferior by ptid.  Use
11173         switch_to_thread and switch_to_no_thread.
11174         (restore_current_thread_cleanup_dtor): Use old->inf directly
11175         instead of lookup up an inferior by id.  Decref the inferior.
11176         Don't restore 'removable'.
11177         (make_cleanup_restore_current_thread): Same the inferior pointer
11178         in old, instead of the inferior number.  Incref the inferior.
11179         Don't save/clear 'removable'.
11180
11181 2017-04-19  Pedro Alves  <palves@redhat.com>
11182
11183         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11184         unittests/scoped_restore-selftests.c.
11185         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11186         * common/scoped_restore.h (scoped_restore_base): Make "class".
11187         (scoped_restore_base::release): New public method.
11188         (scoped_restore_base::scoped_restore_base): New protected ctor.
11189         (scoped_restore_base::m_saved_var): New protected field.
11190         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11191         scoped_restore_base base class instead of m_saved_var directly.
11192         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11193         (scoped_restore_tmpl::scoped_restore_tmpl(const
11194         scoped_restore_tmpl<T>&)): Likewise.
11195         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11196         method.
11197         (scoped_restore_tmpl::saved_var): New method.
11198         (scoped_restore_tmpl::m_saved_var): Delete.
11199         * inferior.h (inferior::detaching): Now a bool.
11200         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11201         cleanup.
11202         * unittests/scoped_restore-selftests.c: New file.
11203
11204 2017-04-19  Pedro Alves  <palves@redhat.com>
11205
11206         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11207         Re-sort in alphabetic order.
11208
11209 2017-04-18  Pedro Alves  <palves@redhat.com>
11210
11211         * xml-support.c (obstack_xml_printf): Delete.
11212         * xml-support.h (obstack_xml_printf): Delete.
11213
11214 2017-04-18  Pedro Alves  <palves@redhat.com>
11215
11216         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11217         vdebug, verror, body_text, start_element, end_element, name,
11218         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11219         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11220         is_xinclude>: Make private and add m_ prefix.
11221         (gdb_xml_parser::body_text): New method, based on ...
11222         (gdb_xml_body_text): ... this.  Adjust.
11223         (gdb_xml_parser::vdebug): New method, based on ...
11224         (gdb_xml_debug): ... this.  Adjust.
11225         (gdb_xml_parser::verror): New method, based on ...
11226         (gdb_xml_error): ... this.  Adjust.
11227         (gdb_xml_parser::start_element): New method, based on ...
11228         (gdb_xml_start_element): ... this.  Adjust.
11229         (gdb_xml_start_element_wrapper): Defer to
11230         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11231         (gdb_xml_parser::end_element): New method, based on ...
11232         (gdb_xml_end_element_wrapper): ... this.  Adjust.
11233         (gdb_xml_parser::~gdb_xml_parser): Adjust.
11234         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11235         (gdb_xml_parser::use_dtd): New method, based on ...
11236         (gdb_xml_use_dtd): ... this.  Adjust.
11237         (gdb_xml_parser::parse): New method, based on ...
11238         (gdb_xml_parse): ... this.  Adjust.
11239         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11240         (xinclude_start_include): Adjust to call the parser's name method.
11241         (xml_xinclude_default, xml_xinclude_start_doctype)
11242         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11243         method.
11244         (xml_process_xincludes): Adjust to call parser methods.
11245         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11246         declarations.
11247
11248 2017-04-18  Pedro Alves  <palves@redhat.com>
11249
11250         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11251         gdb::optional<std::string>.
11252         * xml-support.c: Include <string>.
11253         (scope_level::scope_level(scope_level &&))
11254         (scope_level::~scope_level): Delete.
11255         (scope_level::body): Now a std::string.
11256         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11257         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11258         parameter.
11259         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11260         (xinclude_parsing_data::output): Now a std::string reference.
11261         (xinclude_start_include): Adjust.
11262         (xml_xinclude_default): Adjust.
11263         (xml_process_xincludes): Add 'output' parameter, and return bool.
11264         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11265         and return bool.
11266         * xml-tdesc.c: Include <unordered_map> and <string>.
11267         (tdesc_xml_cache): Delete.
11268         (tdesc_xml_cache_s): Delete.
11269         (xml_cache): Now an std::unordered_map.
11270         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11271         (target_fetch_description_xml): Change return type to
11272         gdb::optional<std::string>, and adjust.
11273         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11274         (target_fetch_description_xml): Change return type to
11275         gdb::optional<std::string>.
11276
11277 2017-04-18  Pedro Alves  <palves@redhat.com>
11278
11279         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11280         unittests/optional-selftests.c.
11281         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11282         * unittests/optional-selftests.c: New file.
11283         * unittests/optional/assignment/1.cc: New file.
11284         * unittests/optional/assignment/2.cc: New file.
11285         * unittests/optional/assignment/3.cc: New file.
11286         * unittests/optional/assignment/4.cc: New file.
11287         * unittests/optional/assignment/5.cc: New file.
11288         * unittests/optional/assignment/6.cc: New file.
11289         * unittests/optional/assignment/7.cc: New file.
11290         * unittests/optional/cons/copy.cc: New file.
11291         * unittests/optional/cons/default.cc: New file.
11292         * unittests/optional/cons/move.cc: New file.
11293         * unittests/optional/cons/value.cc: New file.
11294         * unittests/optional/in_place.cc: New file.
11295         * unittests/optional/observers/1.cc: New file.
11296         * unittests/optional/observers/2.cc: New file.
11297
11298 2017-04-18  Pedro Alves  <palves@redhat.com>
11299
11300         * common/gdb_optional.h: Include common/traits.h.
11301         (in_place_t): New type.
11302         (in_place): New constexpr variable.
11303         (optional::optional): Remove member initialization of
11304         m_instantiated.
11305         (optional::optional(in_place_t...)): New constructor.
11306         (optional::~optional): Use reset.
11307         (optional::optional(const optional&)): New.
11308         (optional::optional(const optional&&)): New.
11309         (optional::optional(T &)): New.
11310         (optional::optional(T &&)): New.
11311         (operator::operator=(const optional &)): New.
11312         (operator::operator=(optional &&)): New.
11313         (operator::operator= (const T &))
11314         (operator::operator= (T &&))
11315         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
11316         (operator::reset): New.
11317         (operator::m_instantiated):: Add in-class initializer.
11318         * common/traits.h: Include <type_traits>.
11319         (struct And): New types.
11320
11321 2017-04-18  Pedro Alves  <palves@redhat.com>
11322
11323         * xml-support.c: Include <vector>.
11324         (scope_level::scope_level(const gdb_xml_element *))
11325         (scope_level::scope_level(scope_level&&)): New.
11326         (scope_level::~scope_level): New.
11327         (scope_level_s): Delete.
11328         (gdb_xml_parser::scopes): Now a std::vector.
11329         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11330         Use std::vector.
11331         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11332         scope cleanup code.
11333         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11334         of the scopes member.  Use std::vector::emplace_back.
11335
11336 2017-04-18  Pedro Alves  <palves@redhat.com>
11337
11338         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
11339         a bool.
11340         (gdb_xml_end_element): Change type of first parameter.
11341         (gdb_xml_cleanup): Rename to ...
11342         (gdb_xml_parser::~gdb_xml_parser): ... this.
11343         (gdb_xml_create_parser_and_cleanup): Delete with ...
11344         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11345         to this new ctor.
11346         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11347         using gdb_xml_create_parser_and_cleanup.
11348         (xinclude_parsing_data): Add ctor/dtor.
11349         (xml_xinclude_cleanup): Delete.
11350         (xml_process_xincludes): Create a local xinclude_parsing_data
11351         instead of heap-allocating one.  Create a local gdb_xml_parser
11352         instead of heap-allocating one with
11353         gdb_xml_create_parser_and_cleanup.
11354
11355 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
11356
11357         PR threads/20743
11358         * fbsd-nat.c (resume_one_thread_cb): Remove.
11359         (resume_all_threads_cb): Remove.
11360         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11361         iterate_over_threads.
11362
11363 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11364
11365         * NEWS: Create a new section for the next release branch.
11366         Rename the section of the current branch, now that it has
11367         been cut.
11368
11369 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11370
11371         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11372         * version.in: Bump version to 8.0.50.DATE-git.
11373
11374 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
11375
11376         PR gdb/21385
11377         * windows-nat.c (windows_create_inferior): Declare 'allargs'
11378         independently of the host, and fix build breakage on Cygwin.
11379
11380 2017-04-13  Pedro Alves  <palves@redhat.com>
11381
11382         * inferior.c (free_inferior): Convert to ...
11383         (inferior::~inferior): ... this dtor.
11384         (inferior::inferior): New ctor, factored out from ...
11385         (add_inferior_silent): ... here.  Allocate the inferior with a new
11386         expression.
11387         (delete_inferior): Call delete instead of free_inferior.
11388         * inferior.h (gdb_environ, continuation): Forward declare.
11389         (inferior): Now a class.  Add in-class initialization to all
11390         members.  Make boolean fields bool, except 'detaching'.
11391         (inferior::inferior): New explicit ctor.
11392         (inferior::~inferior): New.
11393
11394 2017-04-13  Pedro Alves  <palves@redhat.com>
11395
11396         * inferior.c (init_inferior_list): Delete.
11397         * inferior.h (init_inferior_list): Delete.
11398
11399 2017-04-13  Pedro Alves  <palves@redhat.com>
11400
11401         PR threads/13217
11402         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11403         (top level): Call it twice, with different thread sets.
11404
11405 2017-04-13  Pedro Alves  <palves@redhat.com>
11406
11407         * thread.c: Include <algorithm>.
11408         (thread_array_cleanup): Delete.
11409         (scoped_inc_dec_ref): New class.
11410         (live_threads_count): New function.
11411         (set_thread_refcount): Delete.
11412         (tp_array_compar_ascending): Now a bool.
11413         (tp_array_compar): Convert to a std::sort comparison function.
11414         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11415         and live_threads_count.
11416
11417 2017-04-13  Pedro Alves  <palves@redhat.com>
11418
11419         * infrun.c (follow_fork_inferior): Also switch the current
11420         inferior.
11421
11422 2017-04-13  Pedro Alves  <palves@redhat.com>
11423
11424         * breakpoint.c (watch_command_1): Save watchpoint-frame info
11425         before calling create_internal_breakpoint.
11426
11427 2017-04-13  Pedro Alves  <palves@redhat.com>
11428
11429         * fork-child.c (execv_argv): New class.
11430         (breakup_args): Refactored as ...
11431         (execv_argv::init_for_no_shell): .. this method of execv_argv.
11432         Copy arguments to storage and replace separators with NULL
11433         terminators in place.
11434         (escape_bang_in_quoted_argument): Adjust to return bool.
11435         (execv_argv::execv_argv): New ctor.
11436         (execv_argv::init_for_shell): New method, factored out from
11437         fork_inferior.  Don't strdup strings into the vector.
11438         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
11439         Remove free_vector_argv call.
11440
11441 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11442
11443         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11444         tdep->rx_psw_type.
11445
11446 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11447
11448         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11449         * rx-tdep.c (rx_gdbarch_init): Likewise.
11450
11451 2017-04-13  Pedro Alves  <palves@redhat.com>
11452
11453         * breakpoint.h (struct breakpoint): Reindent.
11454
11455 2017-04-13  Pedro Alves  <palves@redhat.com>
11456
11457         * breakpoint.c (bp_location): Rename to ...
11458         (bp_locations): ... this.  All references updated.
11459         (bp_location_count): Rename to ...
11460         (bp_locations_count): ... this.  All references updated.
11461         (bp_location_placed_address_before_address_max): Rename to ...
11462         (bp_locations_placed_address_before_address_max): ... this.  All
11463         references updated.
11464         (bp_location_shadow_len_after_address_max): Rename to ...
11465         (bp_locations_shadow_len_after_address_max): ... this.  All
11466         references updated.
11467         (bp_location_compare_addrs): Rename to ...
11468         (bp_locations_compare_addrs): ... this.  All references updated.
11469         (bp_location_compare):Rename to ...
11470         (bp_locations_compare): ... this.  All references updated.
11471         (bp_location_target_extensions_update): Rename to ...
11472         (bp_locations_target_extensions_update): ... this.  All references
11473         updated.
11474
11475 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11476
11477         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11478         * common/common.m4: Check headers 'termios.h', 'termio.h' and
11479         'sgtty.h'.
11480         * common/gdb_termios.h: New file, with parts of "terminal.h".
11481         * inflow.c: Include "gdb_termios.h".
11482         * ser-unix.c: Include "gdb_termios.h".
11483         * terminal.h: Move terminal-related defines to
11484         "common/gdb_termios.h".
11485
11486 2017-04-12  Tom Tromey  <tom@tromey.com>
11487
11488         * probe.c (parse_probes): Update.
11489         * location.h (delete_event_location): Don't declare.
11490         (event_location_deleter::operator()): Update.
11491         * location.c (event_location_deleter::operator()): Rename from
11492         delete_event_location.
11493         * linespec.h (linespec_result) <location>: Change type to
11494         event_location_up.
11495         * linespec.c (canonicalize_linespec, event_location_to_sals)
11496         (decode_objc): Update.
11497         (linespec_result): Don't call delete_event_location.
11498         * breakpoint.c (create_breakpoints_sal)
11499         (bkpt_probe_create_sals_from_location)
11500         (strace_marker_create_sals_from_location): Update.
11501
11502 2017-04-12  Tom Tromey  <tom@tromey.com>
11503
11504         * linespec.h (struct linespec_result): Add constructor and
11505         destructor.
11506         (init_linespec_result, destroy_linespec_result)
11507         (make_cleanup_destroy_linespec_result): Don't declare.
11508         * linespec.c (init_linespec_result): Remove.
11509         (linespec_result::~linespec_result): Rename from
11510         destroy_linespec_result.  Update.
11511         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11512         Remove.
11513         * breakpoint.c (create_breakpoint, break_range_command)
11514         (decode_location_default): Update.
11515         * ax-gdb.c (agent_command_1): Update.
11516
11517 2017-04-12  Tom Tromey  <tom@tromey.com>
11518
11519         * remote.c (remote_download_tracepoint): Update.
11520         * python/py-breakpoint.c (bppy_get_location): Update.
11521         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11522         (gdbscm_breakpoint_location): Update.
11523         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11524         * breakpoint.h (struct breakpoint) <location, location_range_end>:
11525         Change type to event_location_up.
11526         * breakpoint.c (create_overlay_event_breakpoint)
11527         (create_longjmp_master_breakpoint)
11528         (create_std_terminate_master_breakpoint)
11529         (create_exception_master_breakpoint)
11530         (breakpoint_event_location_empty_p, print_breakpoint_location)
11531         (print_one_breakpoint_location, create_thread_event_breakpoint)
11532         (init_breakpoint_sal, create_breakpoint)
11533         (print_recreate_ranged_breakpoint, break_range_command)
11534         (init_ada_exception_breakpoint, say_where): Update.
11535         (base_breakpoint_dtor): Don't call delete_event_location.
11536         (bkpt_print_recreate, tracepoint_print_recreate)
11537         (dprintf_print_recreate, update_static_tracepoint)
11538         (breakpoint_re_set_default): Update.
11539
11540 2017-04-12  Tom Tromey  <tom@tromey.com>
11541
11542         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11543         type of "to_do".  Update.
11544         (compute_stack_depth): Use std::vector.
11545
11546 2017-04-12  Tom Tromey  <tom@tromey.com>
11547
11548         * printcmd.c (find_instruction_backward): Use std::vector.
11549
11550 2017-04-12  Tom Tromey  <tom@tromey.com>
11551
11552         * symfile.c (objfilep): Remove typedef.
11553         (reread_symbols): Use a std::vector.
11554
11555 2017-04-12  Tom Tromey  <tom@tromey.com>
11556
11557         * mi/mi-main.c (exec_direction_forward): Remove.
11558         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11559         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11560         scoped_restore.
11561         * guile/guile.c (guile_repl_command, guile_command)
11562         (gdbscm_execute_gdb_command): Use scoped_restore.
11563         * go-exp.y (go_parse): Use scoped_restore.
11564         * d-exp.y (d_parse): Use scoped_restore.
11565         * cli/cli-decode.c (cmd_func): Use scoped_restore.
11566         * c-exp.y (c_parse): Use scoped_restore.
11567
11568 2017-04-12  Tom Tromey  <tom@tromey.com>
11569
11570         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11571         (mi_parse): Update return type.
11572         (mi_parse_free): Remove.
11573         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11574         (mi_parse::~mi_parse): Rename from mi_parse_free.
11575         (mi_parse_cleanup): Remove.
11576         (mi_parse): Return a unique_ptr.  Use new.
11577         * mi/mi-main.c (mi_execute_command): Update.
11578
11579 2017-04-12  Tom Tromey  <tom@tromey.com>
11580
11581         * location.c (explicit_location_lex_one): Return a
11582         unique_xmalloc_ptr.
11583         (string_to_explicit_location): Update.  Remove cleanups.
11584
11585 2017-04-12  Tom Tromey  <tom@tromey.com>
11586
11587         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11588         (compare_value_and_voffset): Change type.  Update.
11589         (compute_vtable_size): Change type of "offset_vec".
11590         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
11591         (gnuv3_get_typeid): Remove extraneous declaration.
11592
11593 2017-04-12  Tom Tromey  <tom@tromey.com>
11594
11595         * charset.h (wchar_iterator): Fix comment.
11596
11597 2017-04-12  Tom Tromey  <tom@tromey.com>
11598
11599         * charset.c (iconv_wrapper): New class.
11600         (cleanup_iconv): Remove.
11601         (convert_between_encodings): Use it.
11602
11603 2017-04-12  Tom Tromey  <tom@tromey.com>
11604
11605         * symfile.h (increment_reading_symtab): Update type.
11606         * symfile.c (decrement_reading_symtab): Remove.
11607         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11608         * psymtab.c (psymtab_to_symtab): Update.
11609         * dwarf2read.c (dw2_instantiate_symtab): Update.
11610
11611 2017-04-12  Tom Tromey  <tom@tromey.com>
11612
11613         * jit.c (struct jit_reader): Declare separately.  Add constructor
11614         and destructor.  Change type of "handle".
11615         (loaded_jit_reader): Define separately.
11616         (jit_reader_load): Update.  New "new".
11617         (jit_reader_unload_command): Use "delete".
11618         * gdb-dlfcn.h (struct dlclose_deleter): New.
11619         (gdb_dlhandle_up): New typedef.
11620         (gdb_dlopen, gdb_dlsym): Update types.
11621         (gdb_dlclose): Remove.
11622         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11623         (gdb_dlsym): Change type of "handle".
11624         (make_cleanup_dlclose): Remove.
11625         (dlclose_deleter::operator()): Rename from gdb_dlclose.
11626         * compile/compile-c-support.c (load_libcc): Update.
11627
11628 2017-04-12  Tom Tromey  <tom@tromey.com>
11629
11630         * symtab.h (find_pcs_for_symtab_line): Change return type.
11631         * symtab.c (find_pcs_for_symtab_line): Change return type.
11632         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11633         type of "vec".  Update.
11634         (ltpy_get_pcs_for_line): Update.
11635         * linespec.c (decode_digits_ordinary): Update.
11636
11637 2017-04-12  Tom Tromey  <tom@tromey.com>
11638
11639         * tracepoint.c (actions_command): Update.
11640         * python/python.c (python_command, python_interactive_command):
11641         Update.
11642         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11643         * guile/guile.c (guile_command): Update.
11644         * defs.h (read_command_lines, read_command_lines_1): Return
11645         command_line_up.
11646         (command_lines_deleter): New struct.
11647         (command_line_up): New typedef.
11648         * compile/compile.c (compile_code_command)
11649         (compile_print_command): Update.
11650         * cli/cli-script.h (get_command_line, copy_command_lines): Return
11651         command_line_up.
11652         (make_cleanup_free_command_lines): Remove.
11653         * cli/cli-script.c (get_command_line, read_command_lines_1)
11654         (copy_command_lines): Return command_line_up.
11655         (while_command, if_command, read_command_lines, define_command)
11656         (document_command): Update.
11657         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11658         Remove.
11659         * breakpoint.h (breakpoint_set_commands): Change type of
11660         "commands".
11661         * breakpoint.c (breakpoint_set_commands): Change type of
11662         "commands".  Update.
11663         (do_map_commands_command, update_dprintf_command_list)
11664         (create_tracepoint_from_upload): Update.
11665
11666 2017-04-12  Tom Tromey  <tom@tromey.com>
11667
11668         * tracepoint.c (scope_info): Update.
11669         * spu-tdep.c (spu_catch_start): Update.
11670         * python/python.c (gdbpy_decode_line): Update.
11671         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11672         * python/py-breakpoint.c (bppy_init): Update.
11673         * probe.c (parse_probes): Update.
11674         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11675         * location.h (event_location_deleter): New struct.
11676         (event_location_up): New typedef.
11677         (new_linespec_location, new_address_location, new_probe_location)
11678         (new_explicit_location, copy_event_location)
11679         (string_to_event_location, string_to_event_location_basic)
11680         (string_to_explicit_location): Update return type.
11681         (make_cleanup_delete_event_location): Remove.
11682         * location.c (new_linespec_location, new_address_location)
11683         (new_probe_location, new_explicit_location, copy_event_location):
11684         Return event_location_up.
11685         (delete_event_location_cleanup)
11686         (make_cleanup_delete_event_location): Remove.
11687         (string_to_explicit_location, string_to_event_location_basic)
11688         (string_to_event_location): Return event_location_up.
11689         * linespec.c (canonicalize_linespec, event_location_to_sals)
11690         (decode_line_with_current_source)
11691         (decode_line_with_last_displayed, decode_objc): Update.
11692         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11693         * completer.c (location_completer): Update.
11694         * cli/cli-cmds.c (edit_command, list_command): Update.
11695         * breakpoint.c (create_overlay_event_breakpoint)
11696         (create_longjmp_master_breakpoint)
11697         (create_std_terminate_master_breakpoint)
11698         (create_exception_master_breakpoint)
11699         (create_thread_event_breakpoint): Update.
11700         (init_breakpoint_sal): Update.  Remove some dead code.
11701         (create_breakpoint_sal): Change type of "location".  Update.
11702         (create_breakpoints_sal, create_breakpoint, break_command_1)
11703         (dprintf_command, break_range_command, until_break_command)
11704         (init_ada_exception_breakpoint)
11705         (strace_marker_create_sals_from_location)
11706         (update_static_tracepoint, trace_command, ftrace_command)
11707         (strace_command, create_tracepoint_from_upload): Update.
11708         * break-catch-throw.c (re_set_exception_catchpoint): Update.
11709         * ax-gdb.c (agent_command_1): Update.
11710
11711 2017-04-12  Pedro Alves  <palves@redhat.com>
11712
11713         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11714         * configure.tgt: Handle i[34567]86-*-go32* and
11715         i[34567]86-*-msdosdjgpp*.
11716         * i386-tdep.c (i386_svr4_reg_to_regnum):
11717         Make extern.
11718         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11719         i386-go32-tdep.c.
11720         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11721         * i386-go32-tdep.c: New file.
11722         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
11723         declarations.
11724
11725 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
11726
11727         * aix-thread.c (pd_status2str): Change return type to const char *.
11728
11729 2017-04-12  Pedro Alves  <palves@redhat.com>
11730
11731         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
11732         calls to set_gdbarch_gnu_triplet_regexp.
11733
11734 2017-04-12  Pedro Alves  <palves@redhat.com>
11735
11736         PR gdb/21323
11737         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
11738         New enum value.
11739         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
11740         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
11741         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
11742         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
11743         * gdbarch.h, gdbarch.c: Regenerate.
11744         * aarch64-tdep.c (aarch64_gdbarch_init): Override
11745         gdbarch_wchar_bit and gdbarch_wchar_signed.
11746         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
11747         * arm-tdep.c (arm_gdbarch_init): Likewise.
11748         * avr-tdep.c (avr_gdbarch_init): Likewise.
11749         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
11750         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
11751         * i386-tdep.c (i386_go32_init_abi): Likewise.
11752         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11753         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11754         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11755         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11756         * sh-tdep.c (sh_gdbarch_init): Likewise.
11757         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11758         * sparc64-tdep.c (sparc64_init_abi): Likewise.
11759         * windows-tdep.c (windows_init_abi): Likewise.
11760         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11761
11762 2017-04-12  Pedro Alves  <palves@redhat.com>
11763
11764         PR c++/21323
11765         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
11766         cplus_primitive_type_char32_t>: New enum values.
11767         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
11768         and cplus_primitive_type_char32_t.
11769         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
11770         32, use the archtecture's built-in type for char16_t and char32_t,
11771         respectively.  Otherwise, fallback to init_integer_type as before,
11772         but make the type unsigned, and issue a complaint.
11773         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
11774
11775 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
11776
11777         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
11778         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
11779
11780 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11781
11782         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
11783         'const char *'.
11784
11785 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11786
11787         * common/common-utils.c (free_vector_argv): New function.
11788         * common/common-utils.h: Include <vector>.
11789         (free_vector_argv): New prototype.
11790         * darwin-nat.c (darwin_create_inferior): Rewrite function
11791         prototype in order to constify "exec_file" and accept a
11792         "std::string" for "allargs".
11793         * fork-child.c: Include <vector>.
11794         (breakup_args): Rewrite function, using C++.
11795         (fork_inferior): Rewrite function header, constify "exec_file_arg"
11796         and accept "std::string" for "allargs".  Update the code to
11797         calculate "argv" based on "allargs".  Update calls to "exec_fun"
11798         and "execvp".
11799         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
11800         order to constify "exec_file" and accept a "std::string" for
11801         "allargs".
11802         * go32-nat.c (go32_create_inferior): Likewise.
11803         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
11804         * infcmd.c (run_command_1): Constify "exec_file".  Use
11805         "std::string" for inferior arguments.
11806         * inferior.h (fork_inferior): Update prototype.
11807         * linux-nat.c (linux_nat_create_inferior): Rewrite function
11808         prototype in order to constify "exec_file" and accept a
11809         "std::string" for "allargs".
11810         * nto-procfs.c (procfs_create_inferior): Likewise.
11811         * procfs.c (procfs_create_inferior): Likewise.
11812         * remote-sim.c (gdbsim_create_inferior): Likewise.
11813         * remote.c (extended_remote_run): Update code to accept
11814         "std::string" as argument.
11815         (extended_remote_create_inferior): Rewrite function prototype in
11816         order to constify "exec_file" and accept a "std::string" for
11817         "allargs".
11818         * rs6000-nat.c (super_create_inferior): Likewise.
11819         (rs6000_create_inferior): Likewise.
11820         * target.h (struct target_ops) <to_create_inferior>: Likewise.
11821         * windows-nat.c (windows_create_inferior): Likewise.
11822
11823 2017-04-11  Pedro Alves  <palves@redhat.com>
11824
11825         * thread.c: Fix whitespace throughout.
11826
11827 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11828
11829         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
11830
11831 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
11832
11833         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
11834
11835 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
11836
11837         PR gdb/21364
11838         * osdata.c (info_osdata): Check if 'type' is an empty string
11839         instead of NULL.
11840
11841 2017-04-10  Pedro Alves  <palves@redhat.com>
11842
11843         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
11844         (ptid_to_global_thread_id, in_thread_list)
11845         (do_captured_list_thread_ids, set_resumed, set_running)
11846         (set_executing, set_stop_requested, finish_thread_state)
11847         (validate_registers_access, can_access_registers_ptid)
11848         (print_thread_info_1, switch_to_thread)
11849         (do_restore_current_thread_cleanup)
11850         (make_cleanup_restore_current_thread, thread_command)
11851         (thread_name_command): Use operator== instead of ptid_equal.
11852
11853 2017-04-10  Pedro Alves  <palves@redhat.com>
11854
11855         * thread.c (struct current_thread_cleanup) <next>: Delete field.
11856         (current_thread_cleanup_chain): Delete.
11857         (restore_current_thread_cleanup_dtor)
11858         (make_cleanup_restore_current_thread): Remove references to
11859         current_thread_cleanup_chain.
11860
11861 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
11862
11863         * msp430-tdep.c (msp430_pseudo_register_read): Never return
11864         REG_UNKNOWN.
11865
11866 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11867
11868         PR gdb/19942
11869         * gdbthread.h (thread_info::deletable): New method.
11870         (thread_info::incref): New method.
11871         (thread_info::decref): New method.
11872         (thread_info::refcount): Move it to private.
11873         * infrun.c (save_stop_context): Call inc_refcount.
11874         (release_stop_context_cleanup): Likewise.
11875         * thread.c (set_thread_exited): New function.
11876         (init_thread_list): Delete "tp" only it is deletable, otherwise
11877         call set_thread_exited.
11878         (delete_thread_1): Call set_thread_exited.
11879         (current_thread_cleanup) <inferior_pid>: Remove.
11880         <thread>: New field.
11881         (restore_current_thread_ptid_changed): Removed.
11882         (do_restore_current_thread_cleanup): Adjust.
11883         (restore_current_thread_cleanup_dtor): Don't call
11884         find_thread_ptid.
11885         (set_thread_refcount): Use dec_refcount.
11886         (make_cleanup_restore_current_thread): Adjust.
11887         (thread_apply_all_command): Call inc_refcount.
11888         (_initialize_thread): Don't call
11889         observer_attach_thread_ptid_changed.
11890
11891 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11892
11893         * thread.c (delete_thread_1): Hoist code on marking thread as
11894         exited.
11895
11896 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11897
11898         * windows-nat.c (windows_detach): Initialize ptid with
11899         minus_one_ptid.
11900
11901 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11902
11903         * unittests/ptid-selftests.c: Fix erroneous assert messages.
11904
11905 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
11906
11907         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
11908         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
11909         (bfin_pseudo_register_write): Likewise
11910
11911 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
11912
11913         * common/ptid.h (struct ptid): Change to...
11914         (class ptid_t): ... this.
11915         <ptid_t>: New constructors.
11916         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
11917         matches>: New methods.
11918         <make_null, make_minus_one>: New static methods.
11919         <pid>: Rename to...
11920         <m_pid>: ...this.
11921         <lwp>: Rename to...
11922         <m_lwp>: ...this.
11923         <tid>: Rename to...
11924         <m_tid>: ...this.
11925         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
11926         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
11927         as references, move comment to class ptid_t.
11928         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
11929         ptid_t static methods.
11930         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
11931         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
11932         Take ptid arguments as references, implement using ptid_t methods.
11933         * unittests/ptid-selftests.c: New file.
11934         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11935         unittests/ptid-selftests.c.
11936         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
11937
11938 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
11939
11940         * python/python.c (python_run_simple_file): Cast mode literal to
11941         non-const char pointer as expected by PyFile_FromString.
11942
11943 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
11944
11945         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
11946         minus_one_ptid and null_ptid.
11947
11948 2017-04-05  Pedro Alves  <palves@redhat.com>
11949
11950         * warning.m4 (build_warnings): Remove -Wno-write-strings.
11951         * configure: Regenerate.
11952
11953 2017-04-05  Pedro Alves  <palves@redhat.com>
11954
11955         * ada-exp.y (yyerror): Constify.
11956         * ada-lang.c (bound_name, get_selections)
11957         (ada_variant_discrim_type)
11958         (ada_variant_discrim_name, ada_value_struct_elt)
11959         (ada_lookup_struct_elt_type, is_unchecked_variant)
11960         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
11961         (catch_ada_exception_command_split)
11962         (catch_ada_assert_command_split, catch_assert_command)
11963         (ada_op_name): Constify.
11964         * ada-lang.h (ada_yyerror, get_selections)
11965         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
11966         * arc-tdep.c (arc_print_frame_cache): Constify.
11967         * arm-tdep.c (arm_skip_stub): Constify.
11968         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
11969         (gen_aggregate_elt_ref): Constify.
11970         * bcache.c (print_bcache_statistics): Constify.
11971         * bcache.h (print_bcache_statistics): Constify.
11972         * break-catch-throw.c (catch_exception_command_1):
11973         * breakpoint.c (struct ep_type_description::description):
11974         Constify.
11975         (add_solib_catchpoint): Constify.
11976         (catch_fork_command_1): Add cast.
11977         (add_catch_command): Constify.
11978         * breakpoint.h (add_catch_command, add_solib_catchpoint):
11979         Constify.
11980         * bsd-uthread.c (bsd_uthread_state): Constify.
11981         * buildsym.c (patch_subfile_names): Constify.
11982         * buildsym.h (next_symbol_text_func, patch_subfile_names):
11983         Constify.
11984         * c-exp.y (yyerror): Constify.
11985         (token::oper): Constify.
11986         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
11987         * c-varobj.c (cplus_describe_child): Constify.
11988         * charset.c (find_charset_names): Add cast.
11989         (find_charset_names): Constify array and add const_cast.
11990         * cli/cli-cmds.c (complete_command, cd_command): Constify.
11991         (edit_command): Constify.
11992         * cli/cli-decode.c (lookup_cmd): Constify.
11993         * cli/cli-dump.c (dump_memory_command, dump_value_command):
11994         Constify.
11995         (struct dump_context): Constify.
11996         (add_dump_command, restore_command): Constify.
11997         * cli/cli-script.c (get_command_line): Constify.
11998         * cli/cli-script.h (get_command_line): Constify.
11999         * cli/cli-utils.c (check_for_argument): Constify.
12000         * cli/cli-utils.h (check_for_argument): Constify.
12001         * coff-pe-read.c (struct read_pe_section_data): Constify.
12002         * command.h (lookup_cmd): Constify.
12003         * common/print-utils.c (decimal2str): Constify.
12004         * completer.c (gdb_print_filename): Constify.
12005         * corefile.c (set_gnutarget): Constify.
12006         * cp-name-parser.y (yyerror): Constify.
12007         * cp-valprint.c (cp_print_class_member): Constify.
12008         * cris-tdep.c (cris_register_name, crisv32_register_name):
12009         Constify.
12010         * d-exp.y (yyerror): Constify.
12011         (struct token::oper): Constify.
12012         * d-lang.h (d_yyerror): Constify.
12013         * dbxread.c (struct header_file_location::name): Constify.
12014         (add_old_header_file, add_new_header_file, last_function_name)
12015         (dbx_next_symbol_text, add_bincl_to_list)
12016         (find_corresponding_bincl_psymtab, set_namestring)
12017         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12018         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12019         * defs.h (command_line_input, print_address_symbolic)
12020         (deprecated_readline_begin_hook): Constify.
12021         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12022         Constify.
12023         * event-top.c (handle_line_of_input): Constify and add cast.
12024         * exceptions.c (catch_errors): Constify.
12025         * exceptions.h (catch_errors): Constify.
12026         * expprint.c (print_subexp_standard, op_string, op_name)
12027         (op_name_standard, dump_raw_expression, dump_raw_expression):
12028         * expression.h (op_name, op_string, dump_raw_expression):
12029         Constify.
12030         * f-exp.y (yyerror): Constify.
12031         (struct token::oper): Constify.
12032         (struct f77_boolean_val::name): Constify.
12033         * f-lang.c (f_word_break_characters): Constify.
12034         * f-lang.h (f_yyerror): Constify.
12035         * fork-child.c (fork_inferior): Add cast.
12036         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12037         (new_variant): Constify.
12038         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12039         * gdbarch.c: Regenerate.
12040         * gdbcore.h (set_gnutarget): Constify.
12041         * go-exp.y (yyerror): Constify.
12042         (token::oper): Constify.
12043         * go-lang.h (go_yyerror): Constify.
12044         * go32-nat.c (go32_sysinfo): Constify.
12045         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12046         * guile/scm-cmd.c (cmdscm_function): Constify.
12047         * guile/scm-param.c (pascm_param_value): Constify.
12048         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12049         (h8300sx_register_name): Constify.
12050         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12051         Constify.
12052         * ia64-tdep.c (ia64_register_names): Constify.
12053         * infcmd.c (construct_inferior_arguments): Constify.
12054         (path_command, attach_post_wait): Constify.
12055         * language.c (show_range_command, show_case_command)
12056         (unk_lang_error): Constify.
12057         * language.h (language_defn::la_error)
12058         (language_defn::la_name_of_this): Constify.
12059         * linespec.c (decode_line_2): Constify.
12060         * linux-thread-db.c (thread_db_err_str): Constify.
12061         * lm32-tdep.c (lm32_register_name): Constify.
12062         * m2-exp.y (yyerror): Constify.
12063         * m2-lang.h (m2_yyerror): Constify.
12064         * m32r-tdep.c (m32r_register_names): Constify and make static.
12065         * m68hc11-tdep.c (m68hc11_register_names): Constify.
12066         * m88k-tdep.c (m88k_register_name): Constify.
12067         * macroexp.c (appendmem): Constify.
12068         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12069         (upgrade_type, parse_external, parse_partial_symbols)
12070         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12071         (new_symbol): Constify.
12072         * memattr.c (mem_info_command): Constify.
12073         * mep-tdep.c (register_name_from_keyword): Constify.
12074         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12075         Constify.
12076         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12077         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12078         * mi/mi-main.c (captured_mi_execute_command): Constify and add
12079         cast.
12080         (mi_execute_async_cli_command): Constify.
12081         * mips-tdep.c (mips_register_name): Constify.
12082         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12083         (am33_register_name, am33_2_register_name)
12084         * moxie-tdep.c (moxie_register_names): Constify.
12085         * nat/linux-osdata.c (osdata_type): Constify fields.
12086         * nto-tdep.c (nto_parse_redirection): Constify.
12087         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12088         (lookup_child_selector): Constify.
12089         (objc_methcall::name): Constify.
12090         * objc-lang.h (lookup_objc_class, lookup_child_selector)
12091         (lookup_struct_typedef): Constify.
12092         * objfiles.c (pc_in_section): Constify.
12093         * objfiles.h (pc_in_section): Constify.
12094         * p-exp.y (struct token::oper): Constify.
12095         (yyerror): Constify.
12096         * p-lang.h (pascal_yyerror): Constify.
12097         * parser-defs.h (op_name_standard): Constify.
12098         (op_print::string): Constify.
12099         (exp_descriptor::op_name): Constify.
12100         * printcmd.c (print_address_symbolic): Constify.
12101         * psymtab.c (print_partial_symbols): Constify.
12102         * python/py-breakpoint.c (stop_func): Constify.
12103         (bppy_get_expression): Constify.
12104         * python/py-cmd.c (cmdpy_completer::name): Constify.
12105         (cmdpy_function): Constify.
12106         * python/py-event.c (evpy_add_attribute)
12107         (gdbpy_initialize_event_generic): Constify.
12108         * python/py-event.h (evpy_add_attribute)
12109         (gdbpy_initialize_event_generic): Constify.
12110         * python/py-evts.c (add_new_registry): Constify.
12111         * python/py-finishbreakpoint.c (outofscope_func): Constify.
12112         * python/py-framefilter.c (get_py_iter_from_func): Constify.
12113         * python/py-inferior.c (get_buffer): Add cast.
12114         * python/py-param.c (parm_constant::name): Constify.
12115         * python/py-unwind.c (fprint_frame_id): Constify.
12116         * python/python.c (gdbpy_parameter_value): Constify.
12117         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12118         * remote.c (memory_packet_config::name): Constify.
12119         (show_packet_config_cmd, remote_write_bytes)
12120         (remote_buffer_add_string):
12121         * reverse.c (exec_reverse_once): Constify.
12122         * rs6000-tdep.c (variant::name, variant::description): Constify.
12123         * rust-exp.y (rustyyerror): Constify.
12124         * rust-lang.c (rust_op_name): Constify.
12125         * rust-lang.h (rustyyerror): Constify.
12126         * serial.h (serial_ops::name): Constify.
12127         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12128         (sh_sh3e_register_name, sh_sh2e_register_name)
12129         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12130         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12131         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12132         (sh_sh4al_dsp_register_name): Constify.
12133         * sh64-tdep.c (sh64_register_name): Constify.
12134         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12135         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12136         * stabsread.c (patch_block_stabs, read_type_number)
12137         (ref_map::stabs, ref_add, process_reference)
12138         (symbol_reference_defined, define_symbol, define_symbol)
12139         (error_type, read_type, read_member_functions, read_cpp_abbrev)
12140         (read_one_struct_field, read_struct_fields, read_baseclasses)
12141         (read_tilde_fields, read_struct_type, read_array_type)
12142         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12143         (read_huge_number, read_range_type, read_args, common_block_start)
12144         (find_name_end): Constify.
12145         * stabsread.h (common_block_start, define_symbol)
12146         (process_one_symbol, symbol_reference_defined, ref_add):
12147         * symfile.c (get_section_index, add_symbol_file_command):
12148         * symfile.h (get_section_index): Constify.
12149         * target-descriptions.c (tdesc_type::name): Constify.
12150         (tdesc_free_type): Add cast.
12151         * target.c (find_default_run_target):
12152         (add_deprecated_target_alias, find_default_run_target)
12153         (target_announce_detach): Constify.
12154         (do_option): Constify.
12155         * target.h (add_deprecated_target_alias): Constify.
12156         * thread.c (print_thread_info_1): Constify.
12157         * top.c (deprecated_readline_begin_hook, command_line_input):
12158         Constify.
12159         (init_main): Add casts.
12160         * top.h (handle_line_of_input): Constify.
12161         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12162         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12163         (tfind_command): Rename to ...
12164         (tfind_command_1): ... this and constify.
12165         (tfind_command): New function.
12166         (tfind_end_command, tfind_start_command): Adjust.
12167         (encode_source_string): Constify.
12168         * tracepoint.h (encode_source_string): Constify.
12169         * tui/tui-data.c (tui_partial_win_by_name): Constify.
12170         * tui/tui-data.h (tui_partial_win_by_name): Constify.
12171         * tui/tui-source.c (tui_set_source_content_nil): Constify.
12172         * tui/tui-source.h (tui_set_source_content_nil): Constify.
12173         * tui/tui-win.c (parse_scrolling_args): Constify.
12174         * tui/tui-windata.c (tui_erase_data_content): Constify.
12175         * tui/tui-windata.h (tui_erase_data_content): Constify.
12176         * tui/tui-winsource.c (tui_erase_source_content): Constify.
12177         * tui/tui.c (tui_enable): Add cast.
12178         * utils.c (defaulted_query): Constify.
12179         (init_page_info): Add cast.
12180         (puts_debug, subset_compare): Constify.
12181         * utils.h (subset_compare): Constify.
12182         * varobj.c (varobj_format_string): Constify.
12183         * varobj.h (varobj_format_string): Constify.
12184         * vax-tdep.c (vax_register_name): Constify.
12185         * windows-nat.c (windows_detach): Constify.
12186         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12187         * xml-support.c (gdb_xml_end_element): Constify.
12188         * xml-tdesc.c (tdesc_start_reg): Constify.
12189         * xstormy16-tdep.c (xstormy16_register_name): Constify.
12190         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12191         * xtensa-tdep.h (xtensa_register_t::name): Constify.
12192
12193 2017-04-05  Pedro Alves  <palves@redhat.com>
12194
12195         * proc-api.c (struct trans): Constify.
12196         (procfs_note): Constify.
12197         * proc-events.c (struct trans, syscall_table):
12198         * proc-flags.c (struct trans): Constify.
12199         * proc-utils.h (procfs_note): Constify.
12200         * proc-why.c (struct trans): Constify.
12201         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12202         (procfs_detach): Constify.
12203         * sol-thread.c (struct string_map): Constify.
12204         (td_err_string, td_state_string): Constify.
12205
12206 2017-04-05  Pedro Alves  <palves@redhat.com>
12207
12208         * proc-api.c (procfs_filename): Don't initialize
12209         procfs_filename.
12210         (prepare_to_trace): Assume procfs_filename is non-NULL.
12211         (_initialize_proc_api): Give procfs_filename a default value here.
12212
12213 2017-04-05  Pedro Alves  <palves@redhat.com>
12214
12215         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12216         'cond_string' parameter.
12217         (extract_exception_regexp): Constify 'string' parameter.
12218         (catch_exception_command_1): Constify.
12219         * breakpoint.c (init_catchpoint)
12220         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12221         parameter.
12222         (ep_parse_optional_if_clause, catch_fork_command_1)
12223         (catch_exec_command_1): Constify.
12224         * breakpoint.h (init_catchpoint): Constify 'cond_string'
12225         parameter.
12226         (ep_parse_optional_if_clause): Constify.
12227         * cli/cli-utils.c (remove_trailing_whitespace)
12228         (check_for_argument): Constify.
12229         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12230         non-const overload.
12231         (check_for_argument): Likewise.
12232
12233 2017-04-05  Pedro Alves  <palves@redhat.com>
12234
12235         * event-top.c (command_line_handler): Add cast to execute_command
12236         call.
12237         * record-btrace.c (cmd_record_btrace_bts_start)
12238         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12239         (cmd_record_btrace_start): Add cast to execute_command call.
12240         * record-full.c (record_full_goto_insn):
12241         * record.c (record_start, record_stop): Add cast to
12242         execute_command_to_string calls.
12243         (cmd_record_start): Add cast to execute_command calls.
12244
12245 2017-04-05  Pedro Alves  <palves@redhat.com>
12246
12247         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12248         static inline function.
12249         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12250         array and use gdb_PyArg_ParseTupleAndKeywords.
12251         * python/py-cmd.c (cmdpy_init): Likewise.
12252         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12253         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12254         (infpy_search_memory): Likewise.
12255         * python/py-objfile.c (objfpy_add_separate_debug_file)
12256         (gdbpy_lookup_objfile): Likewise.
12257         * python/py-symbol.c (gdbpy_lookup_symbol)
12258         (gdbpy_lookup_global_symbol): Likewise.
12259         * python/py-type.c (gdbpy_lookup_type): Likewise.
12260         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12261         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12262         Likewise.
12263
12264 2017-04-05  Pedro Alves  <palves@redhat.com>
12265
12266         * python/python-internal.h (gdb_PyGetSetDef): New type.
12267         * python/py-block.c (block_object_getset)
12268         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12269         * python/py-event.c (event_object_getset)
12270         (finish_breakpoint_object_getset): Likewise.
12271         * python/py-inferior.c (inferior_object_getset): Likewise.
12272         * python/py-infthread.c (thread_object_getset): Likewise.
12273         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12274         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12275         * python/py-objfile.c (objfile_getset): Likewise.
12276         * python/py-progspace.c (pspace_getset): Likewise.
12277         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12278         Likewise.
12279         * python/py-record.c (recpy_record_getset): Likewise.
12280         * python/py-symbol.c (symbol_object_getset): Likewise.
12281         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12282         Likewise.
12283         * python/py-type.c (type_object_getset, field_object_getset):
12284         Likewise.
12285         * python/py-value.c (value_object_getset): Likewise.
12286
12287 2017-04-05  Pedro Alves  <palves@redhat.com>
12288
12289         * python/python-internal.h (gdb_PyObject_CallMethod)
12290         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12291         New functions.
12292         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12293         (PySys_GetObject, PySys_SetPath): New macros.
12294
12295 2017-04-05  Pedro Alves  <palves@redhat.com>
12296
12297         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12298         info_osdata_command.
12299         * osdata.c (info_osdata_command): Rename to ...
12300         (info_osdata): ... this.  Constify 'type' parameter, and remove
12301         the 'from_tty' parameter.  Accept NULL TYPE.
12302         (info_osdata_command): New function.
12303         * osdata.h (info_osdata_command): Remove declaration.
12304         (info_osdata): New declaration.
12305
12306 2017-04-05  Pedro Alves  <palves@redhat.com>
12307
12308         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12309         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12310         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12311         parameter.
12312         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12313         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12314         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12315         parameter.
12316         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12317         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12318         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12319         (mi_cmd_file_list_exec_source_files)
12320         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12321         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12322         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12323         parameter.
12324         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12325         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12326         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12327         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12328         (mi_cmd_stack_info_frame): Constify 'command' parameter.
12329         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12330         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12331         'command' parameter.
12332         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12333         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12334         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12335         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12336         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12337         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12338         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12339         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12340         (mi_cmd_var_set_update_range): Constify 'command' parameter.
12341         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12342         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12343         parameter.
12344         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12345         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12346         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12347         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12348         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12349         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12350         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12351         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12352         (mi_cmd_data_list_changed_registers)
12353         (mi_cmd_data_write_register_values)
12354         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12355         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12356         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12357         (mi_cmd_list_features, mi_cmd_list_target_features)
12358         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12359         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12360         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12361         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12362         (mi_cmd_trace_frame_collected): Constify 'command'
12363         parameter.
12364         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12365         'command' parameter.
12366
12367 2017-04-05  Pedro Alves  <palves@redhat.com>
12368
12369         * ada-lang.c (ada_completer_word_break_characters): Now a const
12370         array.
12371         (ada_get_gdb_completer_word_break_characters): Constify.
12372         * completer.c (gdb_completer_command_word_break_characters)
12373         (gdb_completer_file_name_break_characters)
12374         (gdb_completer_quote_characters): Now const arrays.
12375         (get_gdb_completer_quote_characters): Constify.
12376         (set_rl_completer_word_break_characters): New function.
12377         (set_gdb_completion_word_break_characters)
12378         (complete_line_internal): Use it.
12379         * completer.h (get_gdb_completer_quote_characters): Constify.
12380         (set_rl_completer_word_break_characters): Declare.
12381         * f-lang.c (f_word_break_characters): Constify.
12382         * language.c (default_word_break_characters): Constify.
12383         * language.h (language_defn::la_word_break_characters): Constify.
12384         (default_word_break_characters): Constify.
12385         * top.c (init_main): Use set_rl_completer_word_break_characters.
12386
12387 2017-04-05  Pedro Alves  <palves@redhat.com>
12388
12389         * aix-thread.c (aix_thread_pid_to_str)
12390         (aix_thread_extra_thread_info): Constify.
12391         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12392         * bsd-uthread.c (bsd_uthread_extra_thread_info)
12393         (bsd_uthread_pid_to_str): Constify.
12394         * corelow.c (core_pid_to_str): Constify.
12395         * darwin-nat.c (darwin_pid_to_str): Constify.
12396         * fbsd-nat.c (fbsd_pid_to_str): Constify.
12397         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12398         Constify.
12399         * gnu-nat.c (gnu_pid_to_str): Constify.
12400         * go32-nat.c (go32_pid_to_str): Constify.
12401         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12402         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12403         * inferior.c (inferior_pid_to_str): Constify.
12404         * linux-nat.c (linux_nat_pid_to_str): Constify.
12405         * linux-tdep.c (linux_core_pid_to_str): Constify.
12406         * linux-thread-db.c (thread_db_pid_to_str)
12407         (thread_db_extra_thread_info): Constify.
12408         * nto-tdep.c (nto_extra_thread_info): Constify.
12409         * nto-tdep.h (nto_extra_thread_info): Constify.
12410         * obsd-nat.c (obsd_pid_to_str): Constify.
12411         * procfs.c (procfs_pid_to_str): Constify.
12412         * ravenscar-thread.c (ravenscar_extra_thread_info)
12413         (ravenscar_pid_to_str): Constify.
12414         * remote-sim.c (gdbsim_pid_to_str): Constify.
12415         * remote.c (remote_threads_extra_info, remote_pid_to_str):
12416         Constify.
12417         * sol-thread.c (solaris_pid_to_str): Constify.
12418         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12419         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12420         * target.c (default_pid_to_str, target_pid_to_str)
12421         (normal_pid_to_str, default_pid_to_str): Constify.
12422         * target.h (target_ops::to_pid_to_str)
12423         (target_ops::to_extra_thread_info): Constify.
12424         (target_pid_to_str, normal_pid_to_str): Constify.
12425         * windows-nat.c (windows_pid_to_str): Constify.
12426         * gdbarch.sh (core_pid_to_str): Constify.
12427         * target-delegates.c: Regenerate.
12428         * gdbarch.h, gdbarch.c: Regenerate.
12429
12430 2017-04-05  Pedro Alves  <palves@redhat.com>
12431
12432         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12433         the memory of the temporary warning_pre_print override.
12434         * utils.c (warning_pre_print): Constify.
12435         * utils.h (warning_pre_print): Constify.
12436
12437 2017-04-05  Pedro Alves  <palves@redhat.com>
12438
12439         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12440         (shell_command): New function.
12441         (make_command): Use std::string.
12442         (init_cli_cmds): Register shell_command instead of shell_escape.
12443
12444 2017-04-05  Pedro Alves  <palves@redhat.com>
12445
12446         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12447         * tracepoint.c (default_collect): Don't initialize.
12448
12449 2017-04-05  Pedro Alves  <palves@redhat.com>
12450
12451         * macroexp.c (macro_buffer::shared): Now a bool.
12452         (init_buffer): Update.
12453         (init_shared_buffer): Constify 'addr' parameter.
12454         (substitute_args, expand, macro_expand, macro_expand_next): Remove
12455         casts.
12456
12457 2017-04-05  Pedro Alves  <palves@redhat.com>
12458
12459         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12460         * disasm.c (set_disassembler_options): Constify local.
12461         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12462
12463 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
12464
12465         PR gdb/21352
12466         * tracefile.c (tsave_command): Fix argument parsing for '-r'
12467         option.
12468
12469 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12470
12471         * frame.c (frame_unwind_register_unsigned): Call
12472         frame_unwind_register_value.
12473
12474 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12475
12476         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12477         Use gdb_test_multiple, and don't match anchor.
12478
12479 2017-04-05  Pedro Alves  <palves@redhat.com>
12480
12481         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12482         (Write After Approval): Remove Simon Marchi.
12483
12484 2017-04-05  Pedro Alves  <palves@redhat.com>
12485
12486         * common/gdb_optional.h (optional::optional): Make constexpr and
12487         initialize m_dummy.
12488
12489 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12490
12491         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12492         (amd64fbsd_jmp_buf_reg_offset): Remove.
12493         (amd64fbsd_supply_uthread): Remove function.
12494         (amd64fbsd_collect_uthread): Remove function.
12495         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12496         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12497         (x86_64-*-freebsd*): Remove bsd-uthread.o.
12498         (fbsd-nat.c): Update comment.
12499         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12500         (i386fbsd_jmp_buf_reg_offset): Remove.
12501         (i386fbsd_supply_uthread): Remove function.
12502         (i386fbsd_collect_uthread): Remove function.
12503         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12504
12505 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12506
12507         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12508         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12509         * NEWS: Mention that support for FreeBSD/alpha was removed.
12510         * alpha-fbsd-tdep.c: Delete file.
12511         * config/alpha/fbsd.mh: Delete file.
12512         * configure.host: Delete alpha*-*-freebsd* and
12513         alpha*-*-kfreebsd*-gnu.
12514         * configure.tgt: Delete alpha*-*-freebsd* and
12515         alpha*-*-kfreebsd*-gnu.
12516
12517 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12518
12519         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12520         amd64bsd_store_inferior_registers): Use ptid from regcache.
12521
12522 2017-04-04  Pedro Alves  <palves@redhat.com>
12523
12524         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
12525         data fields, make them private and add "m_" prefixes.
12526         (lnp_state_machine::lnp_state_machine): New ctor.
12527         (record_line, check_line_address, handle_set_discriminator)
12528         (handle_set_address, handle_advance_pc, handle_special_opcode)
12529         (handle_advance_line, handle_set_file, handle_negate_stmt)
12530         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12531         (end_sequence, advance_line): New methods.
12532         (m_gdbarch, m_record_lines_p): New fields.
12533         (lnp_reader_state): Delete.
12534         (dwarf_record_line): Rename to ...
12535         (lnp_state_machine::record_line): ... adjust.
12536         (init_lnp_state_machine): Delete.
12537         (lnp_state_machine::lnp_state_machine): New.
12538         (check_line_address): Rename to ...
12539         (lnp_state_machine::check_line_address): This.
12540         (dwarf_decode_lines_1): Remove reference to "reader_state".
12541         Adjust lnp_state_machine having a non-default ctor.  Use bool.
12542         State machine internal state manipulation moved to
12543         lnp_state_machine methods.
12544
12545 2017-04-04  Pedro Alves  <palves@redhat.com>
12546
12547         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12548         unittests/offset-type-selftests.c.
12549         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12550         * common/offset-type.h: New file.
12551         * common/preprocessor.h: New file.
12552         * common/traits.h: New file.
12553         * common/valid-expr.h: New file.
12554         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
12555         sect_offset and cu_offset strong typedefs throughout.
12556         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12557         typedefs throughout.
12558         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
12559         sect_offset and cu_offset strong typedefs throughout.
12560         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12561         typedefs throughout.
12562         * gdbtypes.h: Include "common/offset-type.h".
12563         (cu_offset): Now an offset type (strong typedef) instead of a
12564         struct.
12565         (sect_offset): Likewise.
12566         (union call_site_parameter_u): Rename "param_offset" field to
12567         "param_cu_off".
12568         * unittests/offset-type-selftests.c: New file.
12569
12570 2017-04-04  Pedro Alves  <palves@redhat.com>
12571
12572         * common/underlying.h: New file.
12573         * dwarf2read.c: Include "common/gdb_optional.h" and
12574         "common/underlying.h".
12575         (dir_index, file_name_index): New types.
12576         (file_entry): Use them.
12577         (file_entry::include): Use to_underlying.
12578         (line_header::add_file_name): Use dir_index.
12579         (read_formatted_entries): Use gdb::optional.  Read form before
12580         writting to file_entry.
12581         (dwarf_decode_line_header): Use dir_index.
12582         (lnp_state_machine::current_file): Use to_underlying.
12583         (lnp_state_machine::file): Change type to file_name_index.
12584         (dwarf_record_line): Use to_underlying.
12585         (init_lnp_state_machine): Use file_name_index.
12586         (dwarf_decode_lines_1): Use dir_index and file_name_index.
12587
12588 2017-04-04  Pedro Alves  <palves@redhat.com>
12589
12590         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12591         operator bool, has_value and get methods.
12592
12593 2017-04-04  Pedro Alves  <palves@redhat.com>
12594
12595         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12596         fields.
12597         (line_header): Initialize all data fields.  Change type of
12598         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12599         Change type of include_dirs to std::vector<const char *>.  Remove
12600         num_include_dirs, include_dirs_size.  Change type of file_names to
12601         std::vector<file_entry>.  Remove num_file_names, file_names_size.
12602         (line_header::line_header): New.
12603         (line_header::add_include_dir, line_header::add_file_name): New
12604         methods.
12605         (line_header::include_dir_at): Remove NULL check.
12606         (line_header::file_name_at): Add const overload.
12607         (line_header_up): New unique_ptr typedef.
12608         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
12609         std::vector.  Remove free_line_header call.
12610         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
12611         free_line_header call.
12612         (free_cu_line_header): Delete.
12613         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12614         (setup_type_unit_groups): Use line_header_up instead of cleanups.
12615         Adjust to use std::vector.
12616         (free_line_header): Delete.
12617         (free_line_header_voidp): Use delete.
12618         (add_include_dir): Replace with ...
12619         (line_header::add_include_dir): ... this method.  Use std::vector.
12620         (add_file_name): Replace with ...
12621         (line_header::add_file_name): ... this method.  Use std::vector.
12622         (add_include_dir_stub): Delete.
12623         (read_formatted_entries): Remove memset.
12624         (dwarf_decode_line_header): Return a line_header_up instead of a
12625         raw pointer.  Remove cleanup handling.  Pass lambdas to
12626         read_formatted_entries.  Adjust to use line_header methods.
12627         (dwarf_decode_lines_1): Adjust to use line_header methods.
12628         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12629         use std::vector.
12630
12631 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
12632
12633         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12634         instead of struct ptid.
12635
12636 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
12637
12638         * frame.c (get_frame_register_bytes): Unwind using value.
12639         (put_frame_register_bytes): Likewise.
12640
12641 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
12642
12643         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12644         aggregate-like.
12645
12646 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
12647
12648         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12649
12650 2017-03-29  Yao Qi  <yao.qi@linaro.org>
12651
12652         * gdbthread.h (struct thread_info): Declare constructor and
12653         destructor.  Add some in-class member initializers.
12654         * thread.c (free_thread): Remove.
12655         (init_thread_list): Call delete instead of free_thread.
12656         (new_thread): Call thread_info constructor.
12657         (thread_info::thread_info): New function.
12658         (thread_info::~thread_info): New function.
12659         (delete_thread_1): Call delete instead of free_thread.
12660         (make_cleanup_restore_current_thread): Move tp and frame to
12661         inner block.
12662
12663 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12664
12665         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12666         (arc_skip_prologue): Likewise.
12667         (arc_make_frame_cache): Likewise.
12668         (arc_pv_get_operand): New function.
12669         (arc_is_in_prologue): Likewise.
12670         (arc_analyze_prologue): Likewise.
12671         (arc_print_frame_cache): Likewise.
12672         (MAX_PROLOGUE_LENGTH): New constant.
12673
12674 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12675
12676         * configure.tgt: Add arc-insn.o.
12677         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12678         (dump_arc_instruction_command): New function.
12679         (arc_fprintf_disasm): Likewise.
12680         (arc_disassemble_info): Likewise.
12681         (arc_insn_get_operand_value): Likewise.
12682         (arc_insn_get_operand_value_signed): Likewise.
12683         (arc_insn_get_memory_base_reg): Likewise.
12684         (arc_insn_get_memory_offset): Likewise.
12685         (arc_insn_get_branch_target): Likewise.
12686         (arc_insn_dump): Likewise.
12687         (arc_insn_get_linear_next_pc): Likewise.
12688         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12689         (arc_disassemble_info): Likewise.
12690         (arc_insn_get_branch_target): Likewise.
12691         (arc_insn_get_linear_next_pc): Likewise.
12692         * NEWS: Mention new "maint print arc arc-instruction".
12693
12694 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12695
12696         * arc-tdep (maintenance_print_arc_list): New variable.
12697         (maintenance_print_arc_command): New function.
12698
12699 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12700
12701         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12702         Add "limm" and "reserved".
12703         (arc_cannot_fetch_register, arc_cannot_store_register): Add
12704         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12705         * arc-tdep.h (arc_regnum): Likewise.
12706
12707 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12708
12709         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12710         for THREADPTR register.
12711         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12712         register.
12713         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12714         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12715         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12716
12717 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12718
12719         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12720         registers above gdbarch_num_regs (gdbarch) as privileged in
12721         call0 ABI.
12722
12723 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12724
12725         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12726         for a single specified register or for all registers in
12727         a0_base..a0_base + C0_NREGS range.
12728         (supply_gregset_reg): Call regcache_raw_supply for a single
12729         specified register or for all registers in a0_base..a0_base +
12730         C0_NREGS range.
12731
12732 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12733
12734         * arch/xtensa.h (C0_NREGS): Add definition.
12735         * xtensa-tdep.c (C0_NREGS): Remove definition.
12736
12737 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12738
12739         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
12740         Drop xtensa_default_isa initialization.
12741         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
12742
12743 2017-03-27  Pedro Alves  <palves@redhat.com>
12744
12745         * dwarf2read.c (file_entry) <dir_index>: Add comment.
12746         (file_entry::include_dir): New method.
12747         (line_header::include_dir_at, line_header::file_name_at): New
12748         methods.
12749         (setup_type_unit_groups, setup_type_unit_groups)
12750         (psymtab_include_file_name): Simplify using the new methods.
12751         (lnp_state_machine) <the_line_header>: New field.
12752         <file>: Add comment.
12753         (lnp_state_machine::current_file): New method.
12754         (dwarf_record_line): Simplify using the new methods.
12755         (init_lnp_state_machine): Initialize the "the_line_header" field.
12756         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
12757         Simplify using the new methods.
12758
12759 2017-03-27  Pedro Alves  <palves@redhat.com>
12760
12761         * cp-name-parser.y (make_empty): Delete.
12762         (demangler_special, nested_name, ptr_operator, array_indicator)
12763         (direct_declarator, declarator_1): Use fill_comp instead of
12764         make_empty.
12765
12766 2017-03-27  Pedro Alves  <palves@redhat.com>
12767
12768         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
12769         to ATTRIBUTE_PRINTF.
12770         * solib-target.c (library_list_start_list): Print "string" not
12771         "version".
12772         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
12773         gdb_xml_error call.
12774
12775 2017-03-27  Pedro Alves  <palves@redhat.com>
12776
12777         * dwarf2read.c (struct file_and_directory): New.
12778         (dwarf2_get_dwz_file): Adjust to use std::string.
12779         (dw2_get_file_names_reader): Adjust to use file_and_directory.
12780         (find_file_and_directory): Adjust to return a file_and_directory
12781         object.
12782         (read_file_scope): Adjust to use file_and_directory.  Remove
12783         make_cleanup/do_cleanups calls.
12784         (open_and_init_dwp_file): Adjust to use std::string.  Remove
12785         make_cleanup/do_cleanups calls.
12786         * python/python.c (do_start_initialization): Adjust to ldirname
12787         returning a std::string.
12788         * utils.c (ldirname): Now returns a std::string.
12789         * utils.h (ldirname): Change return type to std::string.
12790         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
12791         returning a std::string.
12792         * xml-tdesc.c (file_read_description_xml): Likewise.
12793
12794 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
12795
12796         * regcache.c (regcache_debug_print_register): New function.
12797         * regcache.h (regcache_debug_print_register): New declaration.
12798         * target.c (debug_print_register): Remove.
12799         (target_fetch_registers): Call regcache_debug_print_register.
12800         (target_store_registers): Likewise.
12801
12802 2017-03-24  Pádraig Brady  <pbrady@fb.com>
12803
12804         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
12805         reference beyond the 'lh->include_dirs' array before accessing to
12806         it.
12807         (psymtab_include_file_name): Likewise.
12808         (dwarf_decode_lines_1): Likewise.
12809         (dwarf_decode_lines): Likewise.
12810         (file_file_name): Likewise.
12811
12812 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
12813
12814         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
12815         inferior_ptid.
12816         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12817         ps_lsetfpregs): Likewise.
12818         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
12819         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12820         ps_lsetfpregs): Likewise.
12821         * target.c (target_fetch_registers, target_store_registers):
12822         Remove asserts.
12823
12824 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
12825
12826         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
12827
12828 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12829
12830         * aarch64-tdep.c (aarch64_process_record_test): Declare.
12831         (_initialize_aarch64_tdep): Register it.
12832         (aarch64_record_load_store): Handle PRFM instruction.
12833         (aarch64_process_record_test): New function.
12834
12835 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12836
12837         * aarch64-tdep.c (aarch64_record_load_store): Fix code
12838         indentation.
12839
12840 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12841
12842         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
12843
12844 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12845
12846         python/python.c (do_start_initialization): Fix memory leak.
12847
12848 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12849
12850         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
12851         using get_ptrace_pid.
12852         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12853         inferior_ptid.
12854         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12855         inferior_ptid instead of pid.
12856
12857 2017-03-22  Yao Qi  <yao.qi@linaro.org>
12858
12859         * aarch64-tdep.c: Wrap locally used classes in anonymous
12860         namespace.
12861         * arm-tdep.c: Likewise.
12862         * linespec.c: Likewise.
12863         * ui-out.c: Likewise.
12864
12865 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
12866
12867         PR gdb/19637
12868         * python/lib/gdb/printer/bound_registers.py: Import sys.
12869
12870 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12871
12872         * windows-nat.c (do_windows_fetch_inferior_registers): Add
12873         windows_thread_info parameter and use it instead of
12874         current_thread.
12875         (windows_fetch_inferior_registers): Don't set current_thread,
12876         pass the thread to do_windows_fetch_inferior_registers.  Use
12877         ptid from regcache instead of inferior_ptid.
12878         (do_windows_store_inferior_registers): Add windows_thread_info
12879         parameter and use it instead of current_thread.
12880         (windows_store_inferior_registers): Don't set current_thread,
12881         pass the thread to do_windows_store_inferior_registers.  Use
12882         ptid from regcache instead of inferior_ptid.
12883
12884 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12885
12886         * ser-mingw.c (ser_windows_raw): Remove reference to
12887         struct serial::current_timeout.
12888
12889 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
12890
12891         PR tdep/20928
12892         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
12893         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
12894         (sparc64_fsr_type): Fix %fsr decoding.
12895
12896 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
12897
12898         * python/py-record-btrace.c (btpy_insn_data): Change return type
12899         for Python 2.
12900
12901 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12902
12903         * spu-linux-nat.c (spu_fetch_inferior_registers,
12904         spu_store_inferior_registers): Use ptid from regcache, set and
12905         restore inferior_ptid.
12906         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
12907         Likewise.
12908
12909 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12910
12911         * i386-linux-nat.c (fetch_register, store_register,
12912         i386_linux_fetch_inferior_registers,
12913         i386_linux_store_inferior_registers): Use ptid from regcache.
12914         * ia64-linux-nat.c (ia64_linux_fetch_register,
12915         ia64_linux_store_register): Likewise.
12916         * inf-ptrace.c (inf_ptrace_fetch_register,
12917         inf_ptrace_store_register): Likewise.
12918         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
12919         m32r_linux_store_inferior_registers): Likewise.
12920         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
12921         m68kbsd_store_inferior_registers): Likewise.
12922         * m68k-linux-nat.c (fetch_register, store_register,
12923         m68k_linux_fetch_inferior_registers,
12924         m68k_linux_store_inferior_registers): Likewise.
12925         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
12926         m88kbsd_store_inferior_registers): Likewise.
12927         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
12928         mips_fbsd_store_inferior_registers): Likewise.
12929         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
12930         mips64_linux_regsets_store_registers): Likewise.
12931         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
12932         mipsnbsd_store_inferior_registers): Likewise.
12933         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
12934         mips64obsd_store_inferior_registers): Likewise.
12935         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
12936         Likewise.
12937         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
12938         ppcfbsd_store_inferior_registers): Likewise.
12939         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
12940         ppc_linux_store_inferior_registers): Likewise.
12941         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
12942         ppcnbsd_store_inferior_registers): Likewise.
12943         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
12944         ppcobsd_store_registers): Likewise.
12945         * procfs.c (procfs_fetch_registers, procfs_store_registers):
12946         Likewise.
12947         * ravenscar-thread.c (ravenscar_fetch_registers,
12948         ravenscar_store_registers, ravenscar_prepare_to_store):
12949         Likewise.
12950         * record-btrace.c (record_btrace_fetch_registers,
12951         record_btrace_store_registers, record_btrace_prepare_to_store):
12952         Likewise.
12953         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
12954         Lookup inferior using ptid from regcache, instead of
12955         current_inferior.
12956         * remote.c (remote_fetch_registers, remote_store_registers): Use
12957         ptid from regcache.
12958         * rs6000-nat.c (fetch_register, store_register): Likewise.
12959         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
12960         s390_linux_store_inferior_registers): Likewise.
12961         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
12962         shnbsd_store_inferior_registers): Likewise.
12963         * sol-thread.c (sol_thread_fetch_registers,
12964         sol_thread_store_registers): Likewise.
12965         * sparc-nat.c (sparc_fetch_inferior_registers,
12966         sparc_store_inferior_registers): Likewise.
12967         * tilegx-linux-nat.c (fetch_inferior_registers,
12968         store_inferior_registers): Likewise.
12969         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
12970         vaxbsd_store_inferior_registers): Likewise.
12971         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
12972         store_xtregs): Likewise.
12973
12974 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12975
12976         PR gdb/14441
12977         * NEWS: Mention support for rvalue references in GDB and python.
12978         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
12979         supports both lvalue and rvalue references.
12980
12981 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12982
12983         PR gdb/14441
12984         * gdbtypes.c (rank_one_type): Implement overloading
12985         resolution rules regarding rvalue references.
12986
12987 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12988
12989         PR gdb/14441
12990         * aarch64-tdep.c (aarch64_type_align)
12991         (aarch64_extract_return_value, aarch64_store_return_value): Change
12992         lvalue reference type checks to general reference type checks.
12993         * amd64-tdep.c (amd64_classify): Likewise.
12994         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
12995         Likewise.
12996         * arm-tdep.c (arm_type_align, arm_extract_return_value)
12997         (arm_store_return_value): Likewise.
12998         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
12999         * c-typeprint.c (c_print_type): Likewise.
13000         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13001         (cplus_number_of_children, cplus_describe_child): Likewise.
13002         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13003         * completer.c (expression_completer): Likewise.
13004         * cp-support.c (make_symbol_overload_list_adl_namespace):
13005         Likewise.
13006         * darwin-nat-info.c (info_mach_region_command): Likewise.
13007         * dwarf2loc.c (entry_data_value_coerce_ref)
13008         (value_of_dwarf_reg_entry): Likewise.
13009         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13010         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13011         Likewise.
13012         * findvar.c (extract_typed_address, store_typed_address):
13013         Likewise.
13014         * gdbtypes.c (rank_one_type): Likewise.
13015         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13016         * infcall.c (value_arg_coerce): Likewise.
13017         * language.c (pointer_type): Likewise.
13018         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13019         Likewise.
13020         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13021         * mn10300-tdep.c (mn10300_type_align): Likewise.
13022         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13023         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13024         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13025         Likewise.
13026         * printcmd.c (print_formatted, x_command): Likewise.
13027         * python/py-type.c (typy_get_composite, typy_template_argument):
13028         Likewise.
13029         * python/py-value.c (valpy_referenced_value)
13030         (valpy_get_dynamic_type, value_has_field): Likewise.
13031         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13032         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13033         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13034         * spu-tdep.c (spu_scalar_value_p): Likewise.
13035         * symtab.c (lookup_symbol_aux): Likewise.
13036         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13037         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13038         Likewise.
13039         * valops.c (value_cast_pointers, value_cast)
13040         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13041         (value_struct_elt, value_struct_elt_bitpos)
13042         (value_find_oload_method_list, find_overload_match)
13043         (value_rtti_indirect_type): Likewise.
13044         * valprint.c (val_print_scalar_type_p, generic_val_print):
13045         Likewise.
13046         * value.c (value_actual_type, value_as_address, unpack_long)
13047         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13048         (coerce_ref): Likewise.
13049         * varobj.c (varobj_get_value_type): Likewise.
13050
13051 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13052
13053         PR gdb/14441
13054         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13055         table of constants.
13056         * python/lib/gdb/command/explore.py: Support exploring values
13057         of rvalue reference types.
13058         * python/lib/gdb/types.py: Implement get_basic_type() for
13059         rvalue reference types.
13060         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13061         constant.
13062         * python/py-value.c (valpy_getitem): Add an rvalue reference
13063         check.
13064         (valpy_reference_value): Add new parameter "refcode".
13065         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13066         New wrappers for valpy_reference_value().
13067         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13068         (gdbpy_invoke_xmethod): Likewise.
13069
13070 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13071
13072         PR gdb/14441
13073         * dwarf2read.c (process_die, read_type_die_1): Handle the
13074         DW_TAG_rvalue_reference_type DIE.
13075         (read_tag_reference_type): Add new parameter "refcode".
13076
13077 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13078
13079         PR gdb/14441
13080         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13081         (c_type_print_modifier, c_type_print_varspec_suffix)
13082         (c_type_print_base): Support printing rvalue reference types.
13083         * c-valprint.c (c_val_print, c_value_print): Support printing
13084         rvalue reference values.
13085
13086 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13087
13088         PR gdb/14441
13089         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13090         typename.
13091         * cp-support.c (replace_typedefs): Handle
13092         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13093         * python/py-type.c (typy_lookup_type): Likewise.
13094
13095 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13096
13097         PR gdb/14441
13098         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13099         * parse.c (insert_type): Change assert statement.
13100         (follow_types): Handle rvalue reference types.
13101         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13102         constant.
13103
13104 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13105
13106         PR gdb/14441
13107         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13108         value_ref() interface.
13109         * c-valprint.c (c_value_print): Likewise.
13110         * infcall.c (value_arg_coerce): Likewise.
13111         * python/py-value.c (valpy_reference_value): Likewise.
13112         * valops.c (value_cast, value_reinterpret_cast)
13113         (value_dynamic_cast, typecmp): Likewise.
13114         (value_ref): Parameterize by kind of return value reference type.
13115         * value.h (value_ref): Add new parameter "refcode".
13116
13117 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13118
13119         PR gdb/14441
13120         * dwarf2read.c (read_tag_reference_type): Use
13121         lookup_lvalue_reference_type() instead of lookup_reference_type().
13122         * eval.c (evaluate_subexp_standard): Likewise.
13123         * f-exp.y: Likewise.
13124         * gdbtypes.c (make_reference_type, lookup_reference_type):
13125         Generalize with rvalue reference types.
13126         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13127         convenience wrappers for lookup_reference_type().
13128         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13129         reference kind parameter.
13130         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13131         wrappers for lookup_reference_type().
13132         * guile/scm-type.c (gdbscm_type_reference): Use
13133         lookup_lvalue_reference_type() instead of lookup_reference_type().
13134         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13135         * parse.c (follow_types): Likewise.
13136         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13137         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13138         Likewise.
13139         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13140         (gdbpy_invoke_xmethod): Likewise.
13141         * stabsread.c: Provide extra argument to make_reference_type()
13142         call.
13143         * valops.c (value_ref, value_rtti_indirect_type): Use
13144         lookup_lvalue_reference_type() instead of lookup_reference_type().
13145
13146 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13147
13148         PR gdb/14441
13149         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13150         (TYPE_IS_REFERENCE): New macro.
13151         (struct type): Add rvalue_reference_type field.
13152         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13153
13154 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13155
13156         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13157         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13158         New function definition.
13159         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13160         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13161         New function declaration.
13162         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13163         * mi/mi-interp.h: New file.
13164         * solib.c (info_sharedlibrary_command): Replace for loop with
13165         ALL_SO_LIBS macro
13166         * solib.h (update_solib_list): New function declaration.
13167         (so_list_head): Move macro.
13168         * solist.h (ALL_SO_LIBS): New macro.
13169
13170 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13171
13172         * infcmd.c (post_create_inferior): Remove unused argument in
13173         call to solib_add.
13174         * remote.c (remote_start_remote): Likewise.
13175         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13176         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13177         (enable_break): Likewise.
13178         * solib.c (update_solib_list): Remove unused target argument
13179         and its documentation.
13180         (solib_add): Remove unused target argument.  Remove unused
13181         argument in call to update_solib_list.
13182         (info_sharedlibrary_command): Remove unused argument in call
13183         to update_solib_list.
13184         (sharedlibrary_command): Remove unused argument in call to
13185         solib_add.
13186         (handle_solib_event): Likewise.
13187         (reload_shared_libraries): Likewise.
13188         * solib.h (solib_add): Remove unused target argument.
13189
13190 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13191
13192         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13193         (s390_displaced_step_fixup): Cover relative branches with the
13194         default fixup handling.  This fixes lack of support for some
13195         relative branch instructions.
13196
13197 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13198
13199         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13200         ptid from regcache.
13201
13202 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13203
13204         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13205         i386_darwin_store_inferior_registers): Use ptid from regcache.
13206
13207 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13208
13209         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13210         i386bsd_store_inferior_registers): Use ptid from regcache.
13211
13212 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13213
13214         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13215         hppaobsd_store_registers): Use ptid from regcache.
13216
13217 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13218
13219         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13220         hppanbsd_store_registers): Use ptid from regcache.
13221
13222 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13223
13224         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13225         from regcache.  Use get_ptrace_pid.
13226
13227 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13228
13229         * corelow.c (get_core_register_section): Use ptid from regcache,
13230         update doc.
13231
13232 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13233
13234         * bsd-uthread.c (bsd_uthread_fetch_registers,
13235         bsd_uthread_store_registers): Use ptid from regcache, set and
13236         restore inferior_ptid.
13237
13238 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13239
13240         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13241         fetch_fp_regs, store_register, store_regs, store_fp_register,
13242         store_fp_regs): Use ptid from regcache.
13243
13244 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13245
13246         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13247         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13248         store_vfp_regs): Use ptid from regcache.
13249
13250 2017-03-17  Pedro Alves  <palves@redhat.com>
13251
13252         PR remote/21188
13253         * ser-base.c (ser_base_wait_for): Add comment.
13254         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13255         version.
13256         * ser-unix.c (hardwire_raw): Remove reference to
13257         scb->current_timeout.
13258         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13259         (hardwire_ops): Install ser_base_readchar instead of
13260         hardwire_readchar.
13261         * serial.h (struct serial) <current_timeout, timeout_remaining>:
13262         Remove fields.
13263
13264 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
13265
13266         PR gdb/19637
13267         * python/lib/gdb/printer/bound_registers.py: Add support for
13268         Python 3.
13269
13270 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13271
13272         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13273         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13274         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13275         byte_offset to subobj_byte_offset.  Fix the handling of
13276         DWARF_VALUE_STACK on big-endian targets when coming via an
13277         implicit pointer.
13278         (dwarf2_evaluate_loc_desc): Adjust call to
13279         dwarf2_evaluate_loc_desc_full.
13280         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13281         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13282
13283 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13284
13285         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13286         and REVSH instructions.
13287
13288 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13289
13290         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13291         (arm_record_test): Declare.
13292         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13293         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13294         align with the manual.
13295         (thumb_record_misc): Adjust the code order to align with the
13296         manual.
13297         (thumb2_record_decode_insn_handler): Fix instruction matching.
13298         (instruction_reader_thumb): New class.
13299         (arm_record_test): New function.
13300
13301 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13302
13303         * arm-tdep.c (abstract_memory_reader): New class.
13304         (instruction_reader): New class.
13305         (extract_arm_insn): Add argument 'reader'.  Callers updated.
13306         (decode_insn): Likewise.
13307
13308 2017-03-16  Doug Evans  <dje@google.com>
13309
13310         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13311         member.  Change type of TYPE member to SCM.  All uses updated.
13312         (lsscm_make_lazy_string_smob): Add assert.
13313         (lsscm_make_lazy_string): Flag bad length values.
13314         (lsscm_elt_type): New function.
13315         (gdbscm_lazy_string_to_value): Rewrite to use
13316         lsscm_safe_lazy_string_to_value.
13317         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13318         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13319         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
13320         in incoming type.
13321         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13322         * guile/scm-type.c (tyscm_scm_to_type): New function.
13323
13324 2017-03-15  Doug Evans  <dje@google.com>
13325
13326         PR python/17728, python/18439, python/18779
13327         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13328         member.  Change type of TYPE member to PyObject *.  All uses updated.
13329         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13330         (gdbpy_create_lazy_string_object): Flag bad length values.
13331         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13332         Handle typedefs in incoming type.
13333         (stpy_lazy_string_elt_type): New function.
13334         (gdbpy_extract_lazy_string): Call it.
13335         * python/py-value.c (valpy_lazy_string): Flag bad length values.
13336         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
13337         typedefs in incoming type.
13338
13339 2017-03-16  Doug Evans  <dje@google.com>
13340
13341         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13342         * guile/scm-type.c (tyscm_scm_to_type): New function.
13343
13344 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
13345
13346         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13347         "ULONGEST" for "skip".
13348
13349 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13350
13351         PR gdb/21220
13352         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13353         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13354         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
13355         over ptrace peek/poke until end of buffer or error.
13356
13357 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
13358
13359         * parse.c (length_of_subexp): Make static.
13360         * parser-defs.h (length_of_subexp): Remove.
13361
13362 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13363
13364         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13365         as well.
13366
13367 2017-03-14  Pedro Alves  <palves@redhat.com>
13368
13369         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13370         (main): Use std::unique_ptr.  Remove calls to
13371         cp_demangled_name_parse_free.
13372
13373 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13374
13375         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13376         alphabsd_store_inferior_registers): Use regcache->ptid instead
13377         of inferior_ptid.
13378
13379 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13380
13381         * aix-thread.c (aix_thread_fetch_registers,
13382         aix_thread_store_registers): Use regcache->ptid instead of
13383         inferior_ptid.
13384
13385 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13386
13387         * aarch64-linux-nat.c (fetch_gregs_from_thread,
13388         store_gregs_to_thread, fetch_fpregs_from_thread,
13389         store_fpregs_to_thread): Use regcache->ptid instead of
13390         inferior_ptid.
13391
13392 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13393
13394         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13395         amd64_linux_fetch_inferior_registers): Use regcache->ptid
13396         instead of inferior_ptid.
13397
13398 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13399
13400         * target.c (target_fetch_registers, target_store_registers): Add
13401         assert.
13402
13403 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13404
13405         * regcache.h (regcache_get_ptid): New function.
13406         * regcache.c (regcache_get_ptid): New function.
13407
13408 2017-03-13  Mark Wielaard  <mark@klomp.org>
13409
13410         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13411
13412 2017-03-10  Keith Seitz  <keiths@redhat.com>
13413
13414         PR c++/8218
13415         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13416
13417 2017-03-08  Pedro Alves  <palves@redhat.com>
13418
13419         PR gdb/18360
13420         * infrun.c (start_step_over, do_target_resume, resume)
13421         (restart_threads): Assert we're not resuming a thread that is
13422         meant to be stopped.
13423         (infrun_thread_stop_requested_callback): Delete.
13424         (infrun_thread_stop_requested): If the thread is internally
13425         stopped, queue a pending stop event and clear the thread's
13426         inline-frame state.
13427         (handle_stop_requested): New function.
13428         (handle_syscall_event, handle_inferior_event_1): Use
13429         handle_stop_requested.
13430         (handle_stop_requested): New function.
13431         (handle_signal_stop): Set the thread's stop_signal here instead of
13432         at caller.
13433         (finish_step_over): Clear step over info unconditionally.
13434         (handle_signal_stop): If the user had interrupted the event
13435         thread, consider the stop a random signal.
13436         (handle_signal_stop) <signal arrived while stepping over
13437         breakpoint>: Don't restart threads here.
13438         (stop_waiting): Don't clear step-over info here.
13439
13440 2017-03-08  Pedro Alves  <palves@redhat.com>
13441
13442         PR 21206
13443         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13444         goes to argument 2, not 1.
13445
13446 2017-03-08  Pedro Alves  <palves@redhat.com>
13447
13448         PR cli/21218
13449         * top.c (gdb_readline_wrapper): Avoid passing NULL to
13450         display_gdb_prompt.
13451         (command_line_input): Add comment.
13452
13453 2017-03-08  Pedro Alves  <palves@redhat.com>
13454
13455         PR tui/21216
13456         * tui/tui-file.c (tui_file::write): New.
13457         * tui/tui-file.h (tui_file): Override "write".
13458         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13459         factored out from ...
13460         (tui_puts): ... here.
13461         (tui_putc): Use them.
13462         (tui_write): New function.
13463         * tui/tui-io.h (tui_write): Declare.
13464
13465 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
13466
13467         * Makefile.in (SFILES): Replace "environ.c" with
13468         "common/environ.c".
13469         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13470         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
13471         to...
13472         * common/environ.c: ... here.
13473         * environ.h: Moved to...
13474         * common/environ.h: ... here.
13475
13476 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13477
13478         * gdbarch.sh (pstring_ptr): New static function.
13479         (gdbarch_disassembler_options): Use it.
13480         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13481         not valid_disassembler_option->name.
13482         * gdbarch.c: Regenerate.
13483
13484 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13485
13486         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13487
13488 2017-03-07  Pedro Alves  <palves@redhat.com>
13489
13490         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13491
13492 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13493
13494         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13495         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13496         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13497         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13498
13499 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
13500
13501         * xtensa-linux-nat.c (fetch_gregs): Remove const.
13502
13503 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
13504
13505         * remote.c (remote_add_target_side_commands): Use range-based
13506         for loop.
13507
13508 2017-03-03  Yao Qi  <yao.qi@linaro.org>
13509
13510         PR gdb/21165
13511         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13512         value is lazy.
13513         * valprint.c (common_val_print): Likewise.
13514
13515 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
13516
13517         * NEWS: Mention new set/show disassembler-options commands.
13518         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13519         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13520         (prospective_options): New static variable.
13521         (gdb_disassembler::gdb_disassembler): Initialize
13522         m_di.disassembler_options.
13523         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13524         (get_disassembler_options): New function.
13525         (set_disassembler_options): Likewise.
13526         (set_disassembler_options_sfunc): Likewise.
13527         (show_disassembler_options_sfunc): Likewise.
13528         (disassembler_options_completer): Likewise.
13529         (_initialize_disasm): Likewise.
13530         * disasm.h (get_disassembler_options): New prototype.
13531         (set_disassembler_options): Likewise.
13532         * gdbarch.sh (gdbarch_disassembler_options): New variable.
13533         (gdbarch_verify_disassembler_options): Likewise.
13534         * gdbarch.c: Regenerate.
13535         * gdbarch.h: Likewise.
13536         * arm-tdep.c (num_disassembly_options): Delete.
13537         (set_disassembly_style): Likewise.
13538         (arm_disassembler_options): New static variable.
13539         (set_disassembly_style_sfunc): Convert short style name into long
13540         option name.  Call set_disassembler_options.
13541         (show_disassembly_style_sfunc): New function.
13542         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13543         set_gdbarch_verify_disassembler_options.
13544         (_initialize_arm_tdep): Delete regnames variable and update callers.
13545         (arm_disassembler_options): Initialize.
13546         (disasm_options): New variable.
13547         (num_disassembly_options): Rename from this...
13548         (num_disassembly_styles): ...to this.  Compute by scanning through
13549         disasm_options.
13550         (valid_disassembly_styles): Initialize using disasm_options.
13551         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13552         set_arm_regname_option.
13553         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13554         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13555         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13556         set_gdbarch_verify_disassembler_options.
13557         * s390-tdep.c (s390_disassembler_options): New static variable.
13558         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13559         set_gdbarch_verify_disassembler_options.
13560
13561 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13562
13563         * remote.c (remote_add_target_side_condition): Remove "struct"
13564         keyword from range-based for loop.
13565
13566 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13567
13568         * remote.c (remote_add_target_side_condition): Use range-based
13569         for loop.  Update comment.
13570
13571 2017-02-27  Yao Qi  <yao.qi@linaro.org>
13572
13573         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13574
13575 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
13576
13577         * regcache.c (regcache_raw_update): New function.
13578         (regcache_raw_read): Move code to regcache_raw_update.
13579         * regcache.h (regcache_raw_update): New declaration.
13580         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13581
13582 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
13583
13584         * dwarf2read.c (create_debug_type_hash_table): Initialize
13585         header.signature and header.type_offset_in_tu.
13586
13587 2017-02-24  Pedro Alves  <palves@redhat.com>
13588
13589         * symtab.c (make_file_symbol_completion_list_1): Use
13590         add_symtab_completions.
13591
13592 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13593
13594         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13595
13596 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13597
13598         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13599         I386_MAX_REGISTER_SIZE.
13600         (i386_pseudo_register_write): Likewise.
13601         (i386_process_record): Likewise.
13602         * i387-tdep.c (i387_supply_xsave): Likewise.
13603         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13604         (store_register): Likewise.
13605
13606 2017-02-23  Pedro Alves  <palves@redhat.com>
13607
13608         * ada-lang.c: Include "common/function-view.h".
13609         (ada_iterate_over_symbols): Adjust to use function_view as
13610         callback type.
13611         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13612         (ada_make_symbol_completion_list): Use a lambda.
13613         (ada_exc_search_name_matches): Delete.
13614         (name_matches_regex): New.
13615         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13616         * compile/compile-c-support.c: Include "common/function-view.h".
13617         (print_one_macro): Change prototype to accept a ui_file pointer.
13618         (write_macro_definitions): Use a lambda.
13619         * dwarf2read.c: Include "common/function-view.h".
13620         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13621         (dw2_expand_symtabs_matching): Adjust to use function_view as
13622         callback type.
13623         * language.h: Include "common/function-view.h".
13624         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13625         function_view as callback type.
13626         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13627         * linespec.c: Include "common/function-view.h".
13628         (collect_info::add_symbol): New method.
13629         (struct symbol_and_data_callback, iterate_inline_only, struct
13630         symbol_matcher_data, iterate_name_matcher): Delete.
13631         (iterate_over_all_matching_symtabs): Adjust to use function_view
13632         as callback type and lambdas.
13633         (iterate_over_file_blocks): Adjust to use function_view as
13634         callback type.
13635         (decode_compound_collector): Now a class with private fields.
13636         (decode_compound_collector::release_symbols): New method.
13637         (collect_one_symbol): Rename to...
13638         (decode_compound_collector::operator()): ... this and adjust.
13639         (lookup_prefix_sym): decode_compound_collector construction bits
13640         move to decode_compound_collector ctor.  Pass the
13641         decode_compound_collector object directly as callback.  Remove
13642         cleanups and use decode_compound_collector::release_symbols
13643         instead.
13644         (symtab_collector): Now a class with private fields.
13645         (symtab_collector::release_symtabs): New method.
13646         (add_symtabs_to_list): Rename to...
13647         (symtab_collector::operator()): ... this and adjust.
13648         (collect_symtabs_from_filename): symtab_collector construction
13649         bits move to symtab_collector ctor.  Pass the symtab_collector
13650         object directly as callback.  Remove cleanups and use
13651         symtab_collector::release_symtabs instead.
13652         (collect_symbols): Delete.
13653         (add_matching_symbols_to_info): Use lambdas.
13654         * macrocmd.c (print_macro_callback): Delete.
13655         (info_macro_command): Use a lambda.
13656         (info_macros_command): Pass print_macro_definition as callable
13657         directly.
13658         (print_one_macro): Remove 'ignore' parameter.
13659         (macro_list_command): Adjust.
13660         * macrotab.c (macro_for_each_data::fn): Now a function_view.
13661         (macro_for_each_data::user_data): Delete field.
13662         (foreach_macro): Adjust to call the function_view.
13663         (macro_for_each): Adjust to use function_view as callback type.
13664         (foreach_macro_in_scope): Adjust to call the function_view.
13665         (macro_for_each_in_scope): Adjust to use function_view as callback
13666         type.
13667         * macrotab.h: Include "common/function-view.h".
13668         (macro_callback_fn): Declare a prototype instead of a pointer.
13669         Remove "user_data" parameter.
13670         (macro_for_each, macro_for_each_in_scope): Adjust to use
13671         function_view as callback type.
13672         * psymtab.c (partial_map_expand_apply)
13673         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13674         Adjust to use function_view as callback type and to return bool.
13675         (psym_expand_symtabs_matching): Adjust to use function_view as
13676         callback types.
13677         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13678         to use function_view as callback type and to return bool.
13679         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13680         callback types.
13681         * symfile.c (expand_symtabs_matching): Adjust to use function_view
13682         as callback types.
13683         * symfile.h: Include "common/function-view.h".
13684         (expand_symtabs_file_matcher_ftype)
13685         (expand_symtabs_symbol_matcher_ftype)
13686         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13687         return bool.
13688         (quick_symbol_functions::map_symtabs_matching_filename)
13689         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13690         function_view as callback type and return bool.
13691         (expand_symtabs_matching): Adjust to use function_view as callback
13692         type.
13693         (maintenance_expand_name_matcher)
13694         (maintenance_expand_file_matcher): Delete.
13695         (maintenance_expand_symtabs): Use lambdas.
13696         * symtab.c (iterate_over_some_symtabs): Adjust to use
13697         function_view as callback types and return bool.
13698         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
13699         of a cleanup.
13700         (lookup_symtab_callback): Delete.
13701         (lookup_symtab): Use a lambda.
13702         (iterate_over_symbols): Adjust to use function_view as callback
13703         type.
13704         (struct search_symbols_data, search_symbols_file_matches)
13705         (search_symbols_name_matches): Delete.
13706         (search_symbols): Use a pair of lambdas.
13707         (struct add_name_data, add_macro_name, symbol_completion_matcher)
13708         (symtab_expansion_callback): Delete.
13709         (default_make_symbol_completion_list_break_on_1): Use lambdas.
13710         * symtab.h: Include "common/function-view.h".
13711         (iterate_over_some_symtabs): Adjust to use function_view as
13712         callback type and return bool.
13713         (iterate_over_symtabs): Adjust to use function_view as callback
13714         type.
13715         (symbol_found_callback_ftype): Remove 'data' parameter and return
13716         bool.
13717         (iterate_over_symbols): Adjust to use function_view as callback
13718         type.
13719
13720 2017-02-23  Pedro Alves  <palves@redhat.com>
13721
13722         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
13723         (%.o) <unittests/%.c>: New pattern.
13724         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
13725         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
13726         * common/function-view.h: New file.
13727         * unittests/function-view-selftests.c: New file.
13728         * configure: Regenerate.
13729
13730 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
13731
13732         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
13733         inferior_ptid.
13734         * go32-nat.c (go32_thread_alive): Likewise.
13735
13736 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13737
13738         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
13739         delete.
13740
13741 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13742
13743         * varobj.c (varobj_clear_saved_item): Use delete instead of
13744         xfree.
13745         (update_dynamic_varobj_children): Likewise.
13746
13747 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13748
13749         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
13750
13751 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
13752
13753         * common/enum-flags.h (enum_flags::enum_flags): Initialize
13754         m_enum_value to 0 in default constructor.
13755
13756 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
13757
13758         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
13759         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
13760         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
13761         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
13762         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
13763         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
13764         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
13765         IS_STORE_CONDITIONAL_INSN.
13766
13767 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13768
13769         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
13770
13771 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13772
13773         * NEWS (Changes since GDB 7.12): Add DWARF-5.
13774
13775 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13776
13777         * dwarf2read.c (skip_one_die, read_attribute_value)
13778         (dwarf2_const_value_attr, dump_die_shallow)
13779         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
13780         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
13781
13782 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13783
13784         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
13785         (dwarf_parse_macro_header): Accept DWARF version 5.
13786         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
13787
13788 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13789
13790         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
13791         DW_AT_GNU_*.
13792         * common/common-exceptions.h (enum errors): Likewise.
13793         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
13794         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
13795         (dwarf_expr_context::execute_stack_op): Likewise.
13796         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
13797         Likewise.
13798         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
13799         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
13800         (show_entry_values_debug, call_site_to_target_addr)
13801         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
13802         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
13803         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
13804         (value_of_dwarf_block_entry, indirect_pieced_value)
13805         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
13806         (disassemble_dwarf_expression): Likewise.
13807         * dwarf2read.c (process_die, inherit_abstract_dies)
13808         (read_call_site_scope): Likewise.
13809         * gdbtypes.h (struct func_type, struct call_site_parameter)
13810         (struct call_site): Likewise.
13811         * stack.c (read_frame_arg): Likewise.
13812         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
13813
13814 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13815
13816         * defs.h (read_unsigned_leb128): New declaration.
13817         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
13818         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
13819         (dwarf2_find_location_expression): Call also
13820         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
13821         * dwarf2loc.h (dwarf2_version): New declaration.
13822         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
13823         rnglists.
13824         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
13825         .debug_rnglists.
13826         (struct dwop_section_names): Add loclists_dwo.
13827         (dwop_section_names): Add .debug_loclists.dwo.
13828         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
13829         (struct dwarf2_per_cu_data): Add dwarf_version.
13830         (struct dwo_sections): Add loclists.
13831         (struct attr_abbrev): Add implicit_const.
13832         (read_indirect_line_string): New declaration.
13833         (read_unsigned_leb128): Delete declaration.
13834         (rcuh_kind): New definition.
13835         (read_and_check_comp_unit_head): Change parameter
13836         is_debug_types_section to section_kind.
13837         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
13838         (read_comp_unit_head): Change parameter abfd to section, add parameter
13839         section_kind.  Handle DWARF-5.
13840         (error_check_comp_unit_head): Accept also DWARF version 5.
13841         (read_and_check_comp_unit_head): Change parameter
13842         is_debug_types_section to section_kind.
13843         (read_and_check_type_unit_head): Delete function.
13844         (read_abbrev_offset): Handle DWARF-5.
13845         (create_debug_type_hash_table): Add parameter section_kind.  Process
13846         only DW_UT_type.  Use signature and type_offset_in_tu from struct
13847         comp_unit_head.
13848         (create_debug_types_hash_table): Update create_debug_type_hash_table
13849         caller.
13850         (create_all_type_units): Call create_debug_type_hash_table.
13851         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
13852         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13853         caller.
13854         (skip_one_die): Handle DW_FORM_implicit_const.
13855         (dwarf2_rnglists_process): New function.
13856         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13857         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13858         (read_attribute_value): Handle DW_FORM_implicit_const,
13859         DW_FORM_line_strp.
13860         (read_attribute): Handle DW_FORM_implicit_const.
13861         (read_indirect_string_at_offset_from): New function from
13862         read_indirect_string_at_offset.
13863         (read_indirect_string_at_offset): Call
13864         read_indirect_string_at_offset_from.
13865         (read_indirect_line_string_at_offset): New function.
13866         (read_indirect_string): New function comment.
13867         (read_indirect_line_string): New function.
13868         (read_unsigned_leb128): Make it global.
13869         (dwarf2_string_attr): Handle DWARF-5.
13870         (add_include_dir_stub, read_formatted_entries): New functions.
13871         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
13872         Handle DWARF-5.
13873         (per_cu_header_read_in): Update read_comp_unit_head caller.
13874         (dwarf2_version): New function.
13875         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
13876         rnglists.
13877         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
13878         fields.
13879
13880 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13881
13882         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
13883
13884 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13885
13886         * dwarf2read.c (dwarf2_ranges_process): New function from
13887         dwarf2_ranges_read.
13888         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
13889         dwarf2_ranges_process.
13890
13891 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13892
13893         * dwarf2read.c (create_debug_type_hash_table): New function from
13894         create_debug_types_hash_table.
13895         (create_debug_types_hash_table): Call create_debug_type_hash_table.
13896         (create_all_type_units, open_and_init_dwo_file): Update
13897         create_debug_types_hash_table callers.
13898
13899 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13900
13901         PR gdb/16188
13902         * fork-child.c (trace_start_error): Fix thinko.  va_end should
13903         refer to 'ap', not 'args'.
13904
13905 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13906             Pedro Alves  <palves@redhat.com>
13907
13908         PR gdb/16188
13909         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
13910         calls succeeded.
13911         * fork-child.c (trace_start_error): New function.
13912         (trace_start_error_with_name): Likewise.
13913         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
13914         * inf-ptrace.c (inf_ptrace_me): Likewise.
13915         * inferior.h (trace_start_error): New prototype.
13916         (trace_start_error_with_name): Likewise.
13917
13918 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
13919
13920         PR gdb/21164
13921         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
13922         NULL before using it.
13923         * symmisc.c (maintenance_print_symbols): Likewise.
13924         (maintenance_print_msymbols): Likewise.
13925
13926 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13927
13928         * NEWS: Add record Python bindings entry.
13929
13930 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13931
13932         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
13933         py-record-full.o.
13934         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
13935         * python/py-record-btrace.c, python/py-record-btrace.h,
13936         python/py-record-full.c, python/py-record-full.h: New file.
13937         * python/py-record.c: Add include for py-record-btrace.h and
13938         py-record-full.h.
13939         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
13940         recpy_instruction_history, recpy_function_call_history, recpy_begin,
13941         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
13942         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
13943         New definition.
13944         (gdbpy_initialize_btrace): New export.
13945         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
13946
13947 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13948
13949         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
13950         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
13951         * python/py-record.c: New file.
13952         * python/python-internal.h (gdbpy_start_recording,
13953         gdbpy_current_recording, gdpy_stop_recording,
13954         gdbpy_initialize_record): New export.
13955         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
13956         (python_GdbMethods): Add gdbpy_start_recording,
13957         gdbpy_current_recording and gdbpy_stop_recording.
13958
13959 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13960
13961         * record-btrace.c (record_btrace_record_method): New function.
13962         (init_record_btrace_ops): Initialize to_record_method.
13963         * record-full.c (record_full_record_method): New function.
13964         (init_record_full_ops, init_record_full_core_ops): Add
13965         record_full_record_method.
13966         * record.h (enum record_method): New enum.
13967         * target-debug.h (target_debug_print_enum_record_method: New define.
13968         * target-delegates.c: Regenerate.
13969         * target.c (target_record_method): New function.
13970         * target.h: Include record.h.
13971         (struct target_ops) <to_record_method>: New field.
13972         (target_record_method): New export.
13973
13974 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13975
13976         * record.h (record_start, record_stop): New export.
13977         * record.c (record_start, record_stop): New function.
13978
13979 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13980
13981         * btrace.c (btrace_fetch): Copy function call segments pointer
13982         into a vector.
13983         (btrace_clear): Clear the vector.
13984         (btrace_find_insn_by_number): Use binary search to find the correct
13985         function call segment.
13986         * btrace.h (brace_fun_p): New typedef.
13987         (struct btrace_thread_info) <functions>: New field.
13988
13989 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13990
13991         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
13992         * btrace.c (btrace_decode_error): ... here.  New function.
13993         * btrace.h (btrace_decode_error): New export.
13994
13995 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13996
13997         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
13998         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
13999         btrace_find_insn_by_number): Remove special case for gaps.
14000         * btrace.h (btrace_insn_get_error): New export.
14001         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14002         * record-btrace.c (btrace_insn_history): Print number for gaps.
14003         (record_btrace_info, record_btrace_goto): Handle gaps.
14004
14005 2017-02-14  Tom Tromey  <tom@tromey.com>
14006
14007         PR python/13598:
14008         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14009         event.
14010         * python/py-evts.c (gdbpy_initialize_py_events): Add
14011         before_prompt registry.
14012         * python/py-events.h (events_object) <before_prompt>: New field.
14013
14014 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
14015
14016         * btrace.c (ftrace_new_switch): Preserve up link and flags.
14017
14018 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
14019
14020         * symfile (_initialize_symfile): Add usage text to the load command's
14021         help text.
14022
14023 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
14024
14025         * utils.c (defaulted_query): Don't query on secondary UIs.
14026
14027 2017-02-10  Tom Tromey  <tom@tromey.com>
14028
14029         * rust-lang.c (rust_get_disr_info): Remove unused variable.
14030
14031 2017-02-10  Tom Tromey  <tom@tromey.com>
14032
14033         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14034         "cleanup" local.
14035         * python/py-type.c (typy_legacy_template_argument): Remove
14036         unnecessary "cleanup" local.
14037
14038 2017-02-10  Tom Tromey  <tom@tromey.com>
14039
14040         * python/python.c (do_start_initialization): New function, from
14041         _initialize_python.
14042         (_initialize_python): Call do_start_initialization.
14043         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14044         goto.
14045
14046 2017-02-10  Tom Tromey  <tom@tromey.com>
14047
14048         * python/py-prettyprint.c (pretty_print_one_value): Use
14049         gdbpy_ref.
14050
14051 2017-02-10  Tom Tromey  <tom@tromey.com>
14052
14053         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14054         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14055         gdbpy_ref.
14056         * python/py-type.c (field_new): Use gdbpy_ref.
14057         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14058         gdbpy_ref.
14059         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14060         (py_free_pspace): Likewise.
14061         (pspace_to_pspace_object): Likewise.
14062         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14063         (py_free_objfile): Likewise.
14064         (objfile_to_objfile_object): Likewise.
14065         * python/py-inferior.c (delete_thread_object): Use
14066         gdbpy_ref.
14067         (infpy_read_memory): Likewise.
14068         (py_free_inferior): Likewise.
14069         * python/py-evtregistry.c (create_eventregistry_object): Use
14070         gdbpy_ref.
14071         * python/py-event.c (create_event_object): Use gdbpy_ref.
14072
14073 2017-02-10  Tom Tromey  <tom@tromey.com>
14074
14075         * python/py-ref.h (gdbpy_ref_policy): Now a template.
14076         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14077         used.
14078         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14079         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14080         python/py-exitedevent.c, python/py-finishbreakpoint.c,
14081         python/py-framefilter.c, python/py-function.c,
14082         python/py-inferior.c, python/py-infevents.c,
14083         python/py-linetable.c, python/py-newobjfileevent.c,
14084         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14085         python/py-signalevent.c, python/py-stopevent.c,
14086         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14087         python/py-unwind.c, python/py-utils.c, python/py-value.c,
14088         python/py-varobj.c, python/py-xmethods.c, python/python.c,
14089         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14090
14091 2017-02-10  Tom Tromey  <tom@tromey.com>
14092
14093         * ui-out.h (ui_out_emit_type): New class.
14094         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14095         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14096         and ui_out_emit_tuple.
14097         (enumerate_locals): Likewise.
14098         (py_mi_print_variables, py_print_locals, py_print_args): Use
14099         ui_out_emit_list.
14100         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14101         ui_out_emit_list.
14102         * common/gdb_optional.h: New file.
14103
14104 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14105
14106         * MAINTAINERS (Write After Approval): Update my e-mail address.
14107
14108 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14109
14110         PR gdb/21122
14111         * breakpoint.c (_initialize_breakpoint): Update the help description
14112         of the 'commands' command to indicate that it takes a list argument.
14113
14114 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
14115
14116         * interps.c (current_interp_set_logging): Remove "return".
14117
14118 2017-02-09  Gary Benson  <gbenson@redhat.com>
14119
14120         * symtab.c (add_symtab_completions): Prevent NULL pointer
14121         dereference.
14122
14123 2017-02-08  Pedro Alves  <palves@redhat.com>
14124
14125         * interps.c (interp::interp): Remove reference to quiet_p.
14126         (interp_set): Make static.  Remove dead "Switching to" output
14127         code.
14128         (interp_quiet_p, interp_set_quiet): Delete.
14129         (interpreter_exec_cmd): Don't set the interpreter quiet.
14130         * interps.h (interp_quiet_p): Make static.
14131         (class interp) <quiet_p>: Remove field
14132
14133 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14134
14135         * cli/cli-decode.c (find_command_name_length): Make it extern.
14136         * cli/cli-decode.h (find_command_name_length): Declare.
14137         * cli/cli-script.c (command_name_equals, line_first_arg):
14138         New functions.
14139         (process_next_line): Use cli-decode to parse command names.
14140         (build_command_line): Make args a constant pointer.
14141
14142 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14143
14144         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14145         Remove case-insensitive search.
14146
14147 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
14148
14149         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14150         at the end of the line.  Avoids an ARI warning.
14151
14152 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
14153
14154         * NEWS: Mention support for record/replay of Intel 64 rdrand and
14155         rdseed instructions.
14156         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14157
14158 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
14159
14160         PR tdep/20936
14161         Provide and use sparc32 and sparc64 target description XML files.
14162         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14163         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14164         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14165         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14166         * features/sparc/sparc32-solaris.xml: New file.
14167         * features/sparc/sparc64-solaris.xml: New file.
14168         * features/sparc/sparc32-solaris.c: Generated.
14169         * features/sparc/sparc64-solaris.c: Generated.
14170         * sparc-tdep.h: Account for differences in target descriptions.
14171         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14172         (sparc32_register_type): Use target provided registers.
14173         (validate_tdesc_registers): New function.
14174         (sparc32_gdbarch_init): Use tdesc_has_registers.
14175         Set pseudoregister functions.
14176         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14177         (sparc64_register_type): Use target provided registers.
14178         (sparc64_init_abi): Set pseudoregister functions.
14179
14180 2017-02-03  Tom Tromey  <tom@tromey.com>
14181
14182         PR rust/21097:
14183         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14184         with a single member.
14185
14186 2017-02-03  Pedro Alves  <palves@redhat.com>
14187
14188         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14189         (cli_interp_base::~cli_interp_base): New.
14190         (cli_interp): New struct.
14191         (as_cli_interp): Cast the interp itself to cli_interp.
14192         (cli_interpreter_pre_command_loop): Rename to ...
14193         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
14194         parameter.
14195         (cli_interpreter_init): Rename to ...
14196         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
14197         boolean.  Make extern.
14198         (cli_interpreter_resume): Rename to ...
14199         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
14200         extern.
14201         (cli_interpreter_suspend): Rename to ...
14202         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
14203         extern.
14204         (cli_interpreter_exec): Rename to ...
14205         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
14206         extern.
14207         (cli_interpreter_supports_command_editing): Rename to ...
14208         (cli_interp_base::supports_command_editing): ... this.  Remove
14209         'interp' parameter.  Make extern.
14210         (cli_ui_out): Rename to ...
14211         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
14212         Make extern.
14213         (cli_set_logging): Rename to ...
14214         (cli_interp_base::set_logging): ... this.  Remove 'interp'
14215         parameter.  Make extern.
14216         (cli_interp_procs): Delete.
14217         (cli_interp_factory): Adjust to use "new".
14218         * cli/cli-interp.h: Include "interps.h".
14219         (struct cli_interp_base): New struct.
14220         * interps.c (struct interp): Delete.  Fields moved to interps.h.
14221         (interp_new): Delete.
14222         (interp::interp, interp::~interp): New.
14223         (interp_set): Use bool, and return void.  Assume the interpreter
14224         has suspend, init and resume methods, and that the all return
14225         void.
14226         (set_top_level_interpreter): interp_set returns void.
14227         (interp_ui_out): Adapt.
14228         (current_interp_set_logging): Adapt.
14229         (interp_data): Delete.
14230         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14231         (interp_exec): Adapt.
14232         (top_level_interpreter_data): Delete.
14233         * interps.h (interp_init_ftype, interp_resume_ftype)
14234         (interp_suspend_ftype, interp_exec_ftype)
14235         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14236         (class interp): New.
14237         (interp_new): Delete.
14238         (interp_set): Now returns void.  Use bool.
14239         (interp_data, top_level_interpreter_data): Delete.
14240         * mi/mi-common.h: Include interps.h.
14241         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
14242         init, resume, suspect, exec, interp_ui_out, set_logging and
14243         pre_command_loop methods.
14244         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14245         (mi_interpreter_init): Rename to ...
14246         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
14247         bool, return void and make extern.  Adjust.
14248         (mi_interpreter_resume): ... Rename to ...
14249         (mi_interp::resume): ... this.  Remove the 'data' parameter,
14250         return void and make extern.  Adjust.
14251         (mi_interpreter_suspend): ... Rename to ...
14252         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
14253         return void and make extern.  Adjust.
14254         (mi_interpreter_exec): ... Rename to ...
14255         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
14256         extern.  Adjust.
14257         (mi_interpreter_pre_command_loop): ... Rename to ...
14258         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
14259         parameter and make extern.
14260         (mi_on_normal_stop_1): Adjust.
14261         (mi_ui_out): Rename to ...
14262         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
14263         parameter and make extern.  Adjust.
14264         (mi_set_logging): Rename to ...
14265         (mi_interp::set_logging): ... this.  Remove the 'interp'
14266         parameter and make extern.  Adjust.
14267         (mi_interp_procs): Delete.
14268         (mi_interp_factory): Adjust to use 'new'.
14269         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14270         (mi_print_exception, mi_execute_command, mi_load_progress):
14271         Adjust.
14272         * tui/tui-interp.c (tui_interp): New class.
14273         (as_tui_interp): Return a tui_interp pointer.
14274         (tui_on_normal_stop, tui_on_signal_received)
14275         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14276         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14277         to use interp::interp_ui_out.
14278         (tui_init): Rename to ...
14279         (tui_interp::init): ... this.  Remove the 'self' parameter, use
14280         bool, return void and make extern.  Adjust.
14281         (tui_resume): Rename to ...
14282         (tui_interp::resume): ... this.  Remove the 'data' parameter,
14283         return void and make extern.  Adjust.
14284         (tui_suspend): Rename to ...
14285         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
14286         return void and make extern.  Adjust.
14287         (tui_ui_out): Rename to ...
14288         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
14289         parameter, and make extern.  Adjust.
14290         (tui_exec): Rename to ...
14291         (tui_interp::exec): ... this.  Remove the 'data' parameter and
14292         make extern.
14293         (tui_interp_procs): Delete.
14294         (tui_interp_factory): Use "new".
14295
14296 2017-02-02  Tom Tromey  <tom@tromey.com>
14297
14298         * rust-exp.y (ends_raw_string, space_then_number)
14299         (rust_identifier_start_p): Return bool.
14300         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14301         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14302         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14303         (rust_chartype_p): Return bool.
14304         (val_print_struct, rust_print_struct_def, rust_print_type):
14305         Update.
14306         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14307         Return bool.
14308
14309 2017-02-02  Tom Tromey  <tom@tromey.com>
14310
14311         * rust-lang.c: Reindent.
14312
14313 2017-02-02  Tom Tromey  <tom@tromey.com>
14314
14315         * rust-lang.h (rust_crate_for_block): Update.
14316         * rust-lang.c (rust_crate_for_block): Return std::string.
14317         (rust_get_disr_info): Use std:;string, not
14318         gdb::unique_xmalloc_ptr.
14319         * rust-exp.y (crate_name): Update.
14320
14321 2017-02-02  Pedro Alves  <palves@redhat.com>
14322
14323         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14324         field out of gdb_disassembler_test and make it static.
14325
14326 2017-02-02  Pedro Alves  <palves@redhat.com>
14327
14328         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14329         mi1_interp and mi_interp fields.
14330
14331 2017-02-02  Pedro Alves  <palves@redhat.com>
14332
14333         * cli/cli-interp.c (struct saved_output_files, saved_output):
14334         Moved from cli/cli-logging.c.
14335         (cli_set_logging): New function.
14336         (cli_interp_procs): Install cli_set_logging.
14337         * cli/cli-interp.h (make_logging_output, cli_set_logging):
14338         Declare.
14339         * cli/cli-logging.c (struct saved_output_files, saved_output):
14340         Moved to cli/cli-interp.c.
14341         (pop_output_files): Don't save outputs here.
14342         (make_logging_output): New function.
14343         (handle_redirections): Don't build tee nor save previous outputs
14344         here.
14345         * interps.c (current_interp_set_logging): Change prototype.
14346         Assume there's always a set_logging_proc method installed.
14347         * interps.h (interp_set_logging_ftype): Change prototype.
14348         (current_interp_set_logging): Change prototype and adjust comment.
14349         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
14350         use make_logging_output.
14351         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14352 2017-02-02  Pedro Alves  <palves@redhat.com>
14353
14354         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14355         from ...
14356         (set_logging_overwrite): ... here.
14357         (logging_no_redirect_file): Delete.
14358         (set_logging_redirect): Don't handle redirection on the fly.
14359         Instead warn that "logging off" / "logging on" is necessary.
14360         (pop_output_files): Delete references to logging_no_redirect_file.
14361         (show_logging_command): Always speak in terms of what will happen
14362         once logging is reenabled.
14363
14364 2017-02-02  Pedro Alves  <palves@redhat.com>
14365
14366         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14367
14368 2017-02-02  Pedro Alves  <palves@redhat.com>
14369
14370         * disasm.c (gdb_pretty_print_insn): Rename to ...
14371         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14372         Remove gdbarch parameter.  Adapt to clear the object's buffers
14373         instead of allocating new buffers, and to print using the object's
14374         gdb_disassembler instead of calling gdb_print_insn.
14375         (dump_insns): Use gdb_pretty_print_disassembler.
14376         * disasm.h (gdb_pretty_print_insn): Delete declaration.
14377         (gdb_pretty_print_disassembler): New class.
14378         * record-btrace.c (btrace_insn_history): Use
14379         gdb_pretty_print_disassembler.
14380
14381 2017-02-02  Pedro Alves  <palves@redhat.com>
14382
14383         * ada-lang.c (type_as_string): Use string_file.
14384         * ada-valprint.c (ada_print_floating): Use string_file.
14385         * ada-varobj.c (ada_varobj_scalar_image)
14386         (ada_varobj_get_value_image): Use string_file.
14387         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14388         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14389         * breakpoint.c (update_inserted_breakpoint_locations)
14390         (insert_breakpoint_locations, reattach_breakpoints)
14391         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14392         (print_it_watchpoint): Use string_file.
14393         (save_breakpoints): Use stdio_file.
14394         * c-exp.y (oper): Use string_file.
14395         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14396         tee_file.
14397         (pop_output_files): Use delete.
14398         (handle_redirections): Use stdio_file and tee_file.
14399         * cli/cli-setshow.c (do_show_command): Use string_file.
14400         * compile/compile-c-support.c (c_compute_program): Use
14401         string_file.
14402         * compile/compile-c-symbols.c (generate_vla_size): Take a
14403         'string_file &' instead of a 'ui_file *'.
14404         (generate_c_for_for_one_variable): Take a 'string_file &' instead
14405         of a 'ui_file *'.  Use string_file.
14406         (generate_c_for_variable_locations): Take a 'string_file &'
14407         instead of a 'ui_file *'.
14408         * compile/compile-internal.h (generate_c_for_for_one_variable):
14409         Take a 'string_file &' instead of a 'ui_file *'.
14410         * compile/compile-loc2c.c (push, pushf, unary, binary)
14411         (print_label, pushf_register_address, pushf_register)
14412         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14413         'ui_file *'.  Adjust.
14414         * compile/compile.c (compile_to_object): Use string_file.
14415         * compile/compile.h (compile_dwarf_expr_to_c)
14416         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14417         'ui_file *'.
14418         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14419         (replace_typedefs_qualified_name): Use string_file and
14420         obstack_copy0.
14421         * disasm.c (gdb_pretty_print_insn): Use string_file.
14422         (gdb_disassembly): Adjust reference the null_stream global.
14423         (do_ui_file_delete): Delete.
14424         (gdb_insn_length): Use null_stream.
14425         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14426         * dwarf2loc.c (dwarf2_compile_property_to_c)
14427         (locexpr_generate_c_location, loclist_generate_c_location): Take a
14428         'string_file &' instead of a 'ui_file *'.
14429         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14430         * dwarf2read.c (do_ui_file_peek_last): Delete.
14431         (dwarf2_compute_name): Use string_file.
14432         * event-top.c (gdb_setup_readline): Use stdio_file.
14433         * gdbarch.sh (verify_gdbarch): Use string_file.
14434         * gdbtypes.c (safe_parse_type): Use null_stream.
14435         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14436         string_file.
14437         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14438         'string_file *' instead of a 'ui_file *'.
14439         (gdbscm_arch_disassemble): Use string_file.
14440         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14441         * guile/scm-ports.c (class ioscm_file_port): Now a class that
14442         inherits from ui_file.
14443         (ioscm_file_port_delete, ioscm_file_port_rewind)
14444         (ioscm_file_port_put): Delete.
14445         (ioscm_file_port_write): Rename to ...
14446         (ioscm_file_port::write): ... this.  Remove file_port_magic
14447         checks.
14448         (ioscm_file_port_new): Delete.
14449         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14450         ui_file_up.
14451         * guile/scm-type.c (tyscm_type_name): Use string_file.
14452         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14453         Use string_file.
14454         * infcmd.c (print_return_value_1): Use string_file.
14455         * infrun.c (print_target_wait_results): Use string_file.
14456         * language.c (add_language): Use string_file.
14457         * location.c (explicit_to_string_internal): Use string_file.
14458         * main.c (captured_main_1): Use null_file.
14459         * maint.c (maintenance_print_architecture): Use stdio_file.
14460         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14461         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14462         event_channel>: Change type to mi_console_file pointer.
14463         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14464         (mi_console_file_delete): Delete.
14465         (struct mi_console_file): Delete.
14466         (mi_console_file_magic): Delete.
14467         (mi_console_file_new): Delete.
14468         (mi_console_file::mi_console_file): New.
14469         (mi_console_file_delete): Delete.
14470         (mi_console_file_fputs): Delete.
14471         (mi_console_file::write): New.
14472         (mi_console_raw_packet): Delete.
14473         (mi_console_file::flush): New.
14474         (mi_console_file_flush): Delete.
14475         (mi_console_set_raw): Rename to ...
14476         (mi_console_file::set_raw): ... this.
14477         * mi/mi-console.h (class mi_console_file): New class.
14478         (mi_console_file_new, mi_console_set_raw): Delete.
14479         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14480         (mi_set_logging): Use delete and tee_file.  Adjust.
14481         * mi/mi-main.c (output_register): Use string_file.
14482         (mi_cmd_data_evaluate_expression): Use string_file.
14483         (mi_cmd_data_read_memory): Use string_file.
14484         (mi_cmd_execute, print_variable_or_computed): Use string_file.
14485         * mi/mi-out.c (mi_ui_out::main_stream): New.
14486         (mi_ui_out::rewind): Use main_stream and
14487         string_file.
14488         (mi_ui_out::put): Use main_stream and string_file.
14489         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14490         Allocate a 'string_file' instead.
14491         (mi_out_new): Don't allocate a mem_fileopen stream here.
14492         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14493         (mi_ui_out::main_stream): Declare method.
14494         * printcmd.c (eval_command): Use string_file.
14495         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14496         * python/py-arch.c (archpy_disassemble): Use string_file.
14497         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14498         * python/py-frame.c (frapy_str): Use string_file.
14499         * python/py-framefilter.c (py_print_type, py_print_single_arg):
14500         Use string_file.
14501         * python/py-type.c (typy_str): Use string_file.
14502         * python/py-unwind.c (unwind_infopy_str): Use string_file.
14503         * python/py-value.c (valpy_str): Use string_file.
14504         * record-btrace.c (btrace_insn_history): Use string_file.
14505         * regcache.c (regcache_print): Use stdio_file.
14506         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14507         * remote.c (escape_buffer): Use string_file.
14508         * rust-lang.c (rust_get_disr_info): Use string_file.
14509         * serial.c (serial_open_ops_1): Use stdio_file.
14510         (do_serial_close): Use delete.
14511         * stack.c (print_frame_arg): Use string_file.
14512         (print_frame_args): Remove local mem_fileopen stream, not used.
14513         (print_frame): Use string_file.
14514         * symmisc.c (maintenance_print_symbols): Use stdio_file.
14515         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14516         Take a 'string_file *' instead of a 'ui_file *'.
14517         * top.c (new_ui): Use stdio_file and stderr_file.
14518         (free_ui): Use delete.
14519         (execute_command_to_string): Use string_file.
14520         (quit_confirm): Use string_file.
14521         * tracepoint.c (collection_list::append_exp): Use string_file.
14522         * tui/tui-disasm.c (tui_disassemble): Use string_file.
14523         * tui/tui-file.c: Don't include "ui-file.h".
14524         (enum streamtype, struct tui_stream): Delete.
14525         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14526         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14527         (tui_file::tui_file): New method.
14528         (tui_file_fputs): Delete.
14529         (tui_file_get_strbuf): Delete.
14530         (tui_file::puts): New method.
14531         (tui_file_adjust_strbuf): Delete.
14532         (tui_file_flush): Delete.
14533         (tui_file::flush): New method.
14534         * tui/tui-file.h: Tweak intro comment.
14535         Include ui-file.h.
14536         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14537         (tui_file_adjust_strbuf): Delete declarations.
14538         (class tui_file): New class.
14539         * tui/tui-io.c (tui_initialize_io): Use tui_file.
14540         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14541         (tui_register_format): Use string_stream.
14542         * tui/tui-stack.c (tui_make_status_line): Use string_file.
14543         (tui_get_function_from_frame): Use string_file.
14544         * typeprint.c (type_to_string): Use string_file.
14545         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14546         (null_stream): New global.
14547         (ui_file_delete): Delete.
14548         (ui_file::ui_file): New.
14549         (null_file_isatty): Delete.
14550         (ui_file::~ui_file): New.
14551         (null_file_rewind): Delete.
14552         (ui_file::printf): New.
14553         (null_file_put): Delete.
14554         (null_file_flush): Delete.
14555         (ui_file::putstr): New.
14556         (null_file_write): Delete.
14557         (ui_file::putstrn): New.
14558         (null_file_read): Delete.
14559         (ui_file::putc): New.
14560         (null_file_fputs): Delete.
14561         (null_file_write_async_safe): Delete.
14562         (ui_file::vprintf): New.
14563         (null_file_delete): Delete.
14564         (null_file::write): New.
14565         (null_file_fseek): Delete.
14566         (null_file::puts): New.
14567         (ui_file_data): Delete.
14568         (null_file::write_async_safe): New.
14569         (gdb_flush, ui_file_isatty): Adjust.
14570         (ui_file_put, ui_file_rewind): Delete.
14571         (ui_file_write): Adjust.
14572         (ui_file_write_for_put): Delete.
14573         (ui_file_write_async_safe, ui_file_read): Adjust.
14574         (ui_file_fseek): Delete.
14575         (fputs_unfiltered): Adjust.
14576         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14577         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14578         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14579         (set_ui_file_data): Delete.
14580         (string_file::~string_file, string_file::write)
14581         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14582         (do_ui_file_as_string, ui_file_as_string): Delete.
14583         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14584         (struct mem_file): Delete.
14585         (mem_file_new): Delete.
14586         (stdio_file::stdio_file): New.
14587         (mem_file_delete): Delete.
14588         (stdio_file::stdio_file): New.
14589         (mem_fileopen): Delete.
14590         (stdio_file::~stdio_file): New.
14591         (mem_file_rewind): Delete.
14592         (stdio_file::set_stream): New.
14593         (mem_file_put): Delete.
14594         (stdio_file::open): New.
14595         (mem_file_write): Delete.
14596         (stdio_file_magic, struct stdio_file): Delete.
14597         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14598         (stdio_file::flush): New.
14599         (stdio_file_read): Rename to ...
14600         (stdio_file::read): ... this.  Adjust.
14601         (stdio_file_write): Rename to ...
14602         (stdio_file::write): ... this.  Adjust.
14603         (stdio_file_write_async_safe): Rename to ...
14604         (stdio_file::write_async_safe) ... this.  Adjust.
14605         (stdio_file_fputs): Rename to ...
14606         (stdio_file::puts) ... this.  Adjust.
14607         (stdio_file_isatty): Delete.
14608         (stdio_file_fseek): Delete.
14609         (stdio_file::isatty): New.
14610         (stderr_file_write): Rename to ...
14611         (stderr_file::write) ... this.  Adjust.
14612         (stderr_file_fputs): Rename to ...
14613         (stderr_file::puts) ... this.  Adjust.
14614         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14615         (stderr_file::stderr_file): New.
14616         (tee_file_magic): Delete.
14617         (struct tee_file): Delete.
14618         (tee_file::tee_file): New.
14619         (tee_file_new): Delete.
14620         (tee_file::~tee_file): New.
14621         (tee_file_delete): Delete.
14622         (tee_file_flush): Rename to ...
14623         (tee_file::flush): ... this.  Adjust.
14624         (tee_file_write): Rename to ...
14625         (tee_file::write): ... this.  Adjust.
14626         (tee_file::write_async_safe): New.
14627         (tee_file_fputs): Rename to ...
14628         (tee_file::puts): ... this.  Adjust.
14629         (tee_file_isatty): Rename to ...
14630         (tee_file::isatty): ... this.  Adjust.
14631         * ui-file.h (struct obstack, struct ui_file): Don't
14632         forward-declare.
14633         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14634         (ui_file_write_ftype)
14635         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14636         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14637         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14638         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14639         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14640         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14641         (set_ui_file_fseek): Delete.
14642         (ui_file_data, ui_file_delete, ui_file_rewind)
14643         (struct ui_file): New.
14644         (ui_file_up): New.
14645         (class null_file): New.
14646         (null_stream): Declare.
14647         (ui_file_write_for_put, ui_file_put): Delete.
14648         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14649         Delete.
14650         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14651         (gdb_fopen, tee_file_new): Delete.
14652         (struct string_file): New.
14653         (struct stdio_file): New.
14654         (stdio_file_up): New.
14655         (struct stderr_file): New.
14656         (class tee_file): New.
14657         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14658         of a 'ui_file *'.  Adjust.
14659         * ui-out.h (class ui_out) <field_stream>: Likewise.
14660         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14661         (null_stream): Delete.
14662         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14663         Adjust.
14664         * utils.h (struct ui_file): Delete forward declaration..
14665         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14666         (error_stream): Take a 'string_file &' instead of a
14667         'ui_file *'.
14668         * varobj.c (varobj_value_get_print_value): Use string_file.
14669         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14670         * gdbarch.c: Regenerate.
14671
14672 2017-02-02  Pedro Alves  <palves@redhat.com>
14673
14674         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14675         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
14676         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
14677         Adjust to call gdb_print_insn instead of
14678         gdb_disassembler::print_insn.
14679         (dump_insns, do_mixed_source_and_assembly_deprecated)
14680         (do_mixed_source_and_assembly, do_assembly_only): Add back a
14681         'gdbarch' parameter.  Remove gdb_disassembler parameter.
14682         (gdb_disassembly): Don't allocate a gdb_disassembler here.
14683         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14684         declaration.
14685         (gdb_pretty_print_insn): Re-add declaration.
14686         * record-btrace.c (btrace_insn_history): Don't allocate a
14687         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
14688
14689 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
14690
14691         * disasm.h (gdb_disassembly): Remove file_string parameter.
14692         * disasm.c (gdb_disassembly): Likewise.
14693         * cli/cli-cmds.c (print_disassembly): Adapt.
14694         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14695         * stack.c (do_gdb_disassembly): Likewise.
14696
14697 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14698
14699         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14700         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14701         targets.  And if the implicit value is longer than needed, extract
14702         the first bytes instead of the "least significant" ones.
14703
14704 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14705
14706         * btrace.c (btrace_enable): Do not call btrace_add_pc for
14707         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14708         (btrace_fetch): Assert can_access_registers_ptid.
14709         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14710         validate_registers_access.
14711
14712 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14713
14714         * gdbthread.h (can_access_registers_ptid): New.
14715         * thread.c (can_access_registers_ptid): New.
14716
14717 2017-02-01  Pedro Alves  <palves@redhat.com>
14718
14719         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14720
14721 2017-01-31  Pedro Alves  <palves@redhat.com>
14722
14723         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
14724         Fix typos.
14725
14726 2017-01-31  Pedro Alves  <palves@redhat.com>
14727
14728         * stack.c (print_frame_args): Remove local mem_fileopen stream,
14729         not used.
14730
14731 2017-01-31  Pedro Alves  <palves@redhat.com>
14732
14733         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
14734
14735 2017-01-31  Pedro Alves  <palves@redhat.com>
14736
14737         * common/scoped_restore.h
14738         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
14739         change the value's parameter type to T2.
14740         (make_scoped_restore): Likewise.
14741
14742 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14743             Richard Henderson  <rth@redhat.com>
14744
14745         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
14746         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
14747         GS_BASE for older kernels.
14748         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
14749         GS_BASE for older kernels.
14750         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
14751         and GS_BASE to the offset table.
14752         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
14753         system register group.
14754         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
14755         for older kernels.
14756         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
14757         amd64 ABI.
14758         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
14759         AMD64_GSBASE_REGNUM.
14760         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
14761         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
14762         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
14763         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
14764         i386/64bit-segments.xml in those rules.
14765         * features/i386/64bit-segments.xml: New file.
14766         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
14767         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
14768         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
14769         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
14770         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
14771         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
14772         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
14773         * features/i386/amd64-avx-linux.c: Regenerated.
14774         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
14775         * features/i386/amd64-avx-mpx.c: Regenerated.
14776         * features/i386/amd64-avx512-linux.c: Regenerated.
14777         * features/i386/amd64-linux.c: Regenerated.
14778         * features/i386/amd64-mpx-linux.c: Regenerated.
14779         * features/i386/i386-avx-mpx-linux.c: Regenerated.
14780         * features/i386/i386-avx-mpx.c: Regenerated.
14781         * features/i386/x32-avx-linux.c: Regenerated.
14782         * features/i386/x32-avx512-linux.c: Regenerated.
14783         * regformats/i386/amd64-avx-linux.dat: Regenerated.
14784         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
14785         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
14786         * regformats/i386/amd64-linux.dat: Regenerated.
14787         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
14788         * regformats/i386/x32-avx-linux.dat: Regenerated.
14789         * regformats/i386/x32-avx512-linux.dat: Regenerated.
14790         * regformats/i386/x32-linux.dat: Regenerated.
14791
14792 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14793
14794         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
14795         Set to AMD64_NUM_REGS.
14796
14797 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14798
14799         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
14800         that checks validity of a register number.
14801
14802 2017-01-27  Kees Cook  <keescook@google.com>
14803
14804         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
14805         fetch_fpregs if target has fpa registers.
14806         (arm_linux_store_inferior_registers): Call store_fpregs if target
14807         has fpa registers.
14808
14809 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14810
14811         * cris-tdep.c (cris_gdbarch_init): Remove check for
14812         info.byte_order and force it to BFD_ENDIAN_LITTLE.
14813
14814 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
14815
14816         * corelow.c (get_core_register_section): Check for regset
14817         existence before checking for REGSET_VARIABLE_SIZE.
14818
14819 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14820             Pedro Alves  <palves@redhat.com>
14821
14822         PR gdb/20939
14823         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
14824         call memory_error, save memaddr instead.
14825         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
14826         negative, cal memory_error.
14827         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
14828
14829 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14830
14831         * disasm-selftests.c (memory_error_test): New function.
14832         (_initialize_disasm_selftests): Register memory_error_test.
14833
14834 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14835
14836         * Makefile.in (SFILES): Add disasm-selftests.c and
14837         selftest-arch.c.
14838         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
14839         * disasm-selftests.c: New file.
14840         * selftest-arch.c: New file.
14841         * selftest-arch.h: New file.
14842
14843 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14844
14845         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
14846         to bfd_arch_mep.  Don't return 0 if section is not
14847         found.  Call print_insn_mep.
14848
14849 2017-01-26  Pedro Alves  <palves@redhat.com>
14850             Yao Qi  <yao.qi@linaro.org>
14851
14852         * arm-tdep.c: Include "disasm.h".
14853         (gdb_print_insn_arm): Update code to get gdbarch.
14854         * disasm.c (dis_asm_read_memory): Change it to
14855         gdb_disassembler::dis_asm_read_memory.
14856         (dis_asm_memory_error): Likewise.
14857         (dis_asm_print_address): Likewise.
14858         (gdb_pretty_print_insn): Change it to
14859         gdb_disassembler::pretty_print_insn.
14860         (dump_insns): Add one argument gdb_disassemlber.  All
14861         callers updated.
14862         (do_mixed_source_and_assembly_deprecated): Likewise.
14863         (do_mixed_source_and_assembly): Likewise.
14864         (do_assembly_only): Likewise.
14865         (gdb_disassembler::gdb_disassembler): New.
14866         (gdb_disassembler::print_insn): New.
14867         * disasm.h (class gdb_disassembler): New.
14868         (gdb_pretty_print_insn): Remove declaration.
14869         (gdb_disassemble_info): Likewise.
14870         * guile/scm-disasm.c (class gdbscm_disassembler): New.
14871         (gdbscm_disasm_read_memory_worker): Update.
14872         (gdbscm_disasm_read_memory): Update.
14873         (gdbscm_disasm_memory_error): Remove.
14874         (gdbscm_disasm_print_address): Remove.
14875         (gdbscm_disassembler::gdbscm_disassembler): New.
14876         (gdbscm_print_insn_from_port): Update.
14877         * mips-tdep.c: Include disasm.h.
14878         (gdb_print_insn_mips): Update code to get gdbarch.
14879         * record-btrace.c (btrace_insn_history): Update.
14880         * spu-tdep.c: Include disasm.h.
14881         (struct spu_dis_asm_data): Remove.
14882         (struct spu_dis_asm_info): New.
14883         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
14884         SPU id.
14885         (gdb_print_insn_spu): Cast disassemble_info to
14886         spu_dis_asm_info.
14887
14888 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14889
14890         * disasm.c (do_ui_file_delete): Delete.
14891         (gdb_insn_length): Move code creating stream to ...
14892         * utils.c (null_stream): ... here.  New function.
14893         * utils.h (null_stream): Declare.
14894
14895 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
14896
14897         * python/py-inferior.c (find_thread_object): Return directly
14898         from the loop.  Remove "found" variable.
14899
14900 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
14901
14902         GDB 7.12.1 released.
14903
14904 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14905
14906         * python/py-function.c (fnpy_call): Reorder declarations to have
14907         the gdbpy_enter object declared first.
14908         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
14909
14910 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14911
14912         PR python/21068
14913         * python/python-internal.h (PyMem_RawMalloc): Define for
14914         Python < 3.4.
14915         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
14916         PyMem_RawMalloc instead of PyMem_Malloc.
14917
14918 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
14919             Luis Machado  <lgustavo@codesourcery.com>
14920
14921         * NEWS (New commands): Mention flash-erase.
14922         (New MI commands): Mention target-flash-erase.
14923         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
14924         command.
14925         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
14926         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
14927         * target.c (flash_erase_command): New function.
14928         (initialize_targets): Add new flash-erase command.
14929         * target.h (flash_erase_command): New declaration.
14930
14931 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
14932
14933         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
14934         HAVE_SYS_PROCFS_H is defined.
14935
14936 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14937
14938         * remote.c (struct cached_reg): Change data into a pointer.
14939         * (stop_reply_dtr): Free data pointers before deleting vector.
14940         (process_stop_reply): Likewise.
14941         (remote_parse_stop_reply): Allocate space for data
14942
14943 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14944
14945         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
14946         MAX_REGISTER_SIZE.
14947         (amd64_pseudo_register_read_value): Likewise.
14948         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
14949         (store_register_using_P): Likewise.
14950         * regcache.c (regcache_xfer_part): Likewise.
14951
14952 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
14953
14954         Split real and pseudo registers.
14955         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
14956         (sparc32_pseudo_regnum): New enum.
14957         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
14958         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
14959         (SPARC32_CP0_REGISTERS): New macro.
14960         (sparc32_pseudo_register_name): New function.
14961         (sparc32_register_name): Use sparc32_pseudo_register_name.
14962         (sparc32_pseudo_register_type): New function.
14963         (sparc32_register_type): Use sparc32_pseudo_register_type.
14964         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
14965         pseudo register numbers.
14966         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
14967         (SPARC64_CP0_REGISTERS): New macro.
14968         (sparc64_pseudo_register_name): New function.
14969         (sparc64_register_name): Use sparc64_pseudo_register_name.
14970         (sparc64_pseudo_register_type): New function.
14971         (sparc64_register_type): Use sparc64_pseudo_register_type.
14972         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
14973         pseudo register numbers.
14974         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
14975         sparc64_store_arguments): Handle pseudo register numbers.
14976
14977 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14978
14979         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
14980         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
14981         output.
14982         (getpkt_or_notif_sane_1): Likewise.
14983
14984 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14985
14986         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
14987         of CC.  Pass "-x c++-header" instead of "-x c".
14988
14989 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14990
14991         * remote.c (remote_can_async_p): Update comment.
14992
14993 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14994
14995         * linux-nat.c (linux_nat_can_async_p): Update comment.
14996
14997 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14998
14999         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15000
15001 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
15002
15003         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15004
15005 2017-01-10  Tom Tromey  <tom@tromey.com>
15006
15007         * python/py-type.c (typy_legacy_template_argument): Update.
15008         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15009         ~demangle_parse_info): Declare new members.
15010         (cp_demangled_name_to_comp): Return unique_ptr.
15011         (cp_demangled_name_parse_free)
15012         (make_cleanup_cp_demangled_name_parse_free)
15013         (cp_new_demangle_parse_info): Remove.
15014         * cp-support.c (do_demangled_name_parse_free_cleanup)
15015         (make_cleanup_cp_demangled_name_parse_free): Remove.
15016         (inspect_type, cp_canonicalize_string_full)
15017         (cp_canonicalize_string): Update.
15018         (mangled_name_to_comp): Change return type.
15019         (cp_class_name_from_physname, method_name_from_physname)
15020         (cp_func_name, cp_remove_params): Update.
15021         * cp-name-parser.y (demangle_parse_info): New constructor, from
15022         cp_new_demangle_parse_info.
15023         (~demangle_parse_info): New destructor, from
15024         cp_demangled_name_parse_free.
15025         (cp_merge_demangle_parse_infos): Update.
15026         (cp_demangled_name_to_comp): Change return type.
15027
15028 2017-01-10  Tom Tromey  <tom@tromey.com>
15029
15030         * top.c (prevent_dont_repeat): Change return type.
15031         * python/python.c (execute_gdb_command): Use std::string.
15032         Update.
15033         * guile/guile.c (gdbscm_execute_gdb_command): Update.
15034         * command.h (prevent_dont_repeat): Change return type.
15035         * breakpoint.c (bpstat_do_actions_1): Update.
15036
15037 2017-01-10  Tom Tromey  <tom@tromey.com>
15038
15039         * value.h (scoped_value_mark::~scoped_value_mark): Call
15040         free_to_mark.
15041         (scoped_value_mark::free_to_mark): New method.
15042         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15043         scoped_value_mark.
15044
15045 2017-01-10  Tom Tromey  <tom@tromey.com>
15046
15047         * python/py-value.c (valpy_dereference, valpy_referenced_value)
15048         (valpy_reference_value, valpy_const_value, valpy_get_address)
15049         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15050         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15051         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15052         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15053         scoped_value_mark.
15054         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15055         * value.h (scoped_value_mark): New class.
15056
15057 2017-01-10  Tom Tromey  <tom@tromey.com>
15058
15059         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15060         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15061         * psymtab.c (discard_psymtabs_upto): Remove.
15062         (make_cleanup_discard_psymtabs): Remove.
15063         (struct psymtab_state): Remove.
15064
15065 2017-01-10  Tom Tromey  <tom@tromey.com>
15066
15067         * record-full.c (record_full_save_cleanups): Remove.
15068         (record_full_save): Use gdb::unlinker.
15069         * gcore.c (do_bfd_delete_cleanup): Remove.
15070         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
15071         cleanups.
15072         * dwarf2read.c (unlink_if_set): Remove.
15073         (write_psymtabs_to_index): Use gdb::unlinker.
15074         * common/gdb_unlinker.h: New file.
15075
15076 2017-01-10  Tom Tromey  <tom@tromey.com>
15077
15078         * windows-tdep.c (windows_xfer_shared_library): Update.
15079         * windows-nat.c (windows_make_so): Update.
15080         * utils.h (make_cleanup_bfd_unref): Remove.
15081         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15082         * symfile.h (symfile_bfd_open)
15083         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15084         * symfile.c (read_symbols, symbol_file_add)
15085         (separate_debug_file_exists): Update.
15086         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15087         (generic_load, reread_symbols): Update.
15088         * symfile-mem.c (symbol_file_add_from_memory): Update.
15089         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15090         (spu_symbol_file_add_from_memory): Update.
15091         * solist.h (struct target_so_ops) <bfd_open>: Return
15092         gdb_bfd_ref_ptr.
15093         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15094         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15095         gdb_bfd_ref_ptr.
15096         (solib_map_sections, reload_shared_libraries_1): Update.
15097         * solib-svr4.c (enable_break): Update.
15098         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15099         * solib-frv.c (enable_break2): Update.
15100         * solib-dsbt.c (enable_break): Update.
15101         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15102         gdb_bfd_ref_ptr.
15103         (darwin_solib_get_all_image_info_addr_at_init): Update.
15104         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15105         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15106         * record-full.c (record_full_save): Update.
15107         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15108         * procfs.c (insert_dbx_link_bpt_in_file): Update.
15109         * minidebug.c (find_separate_debug_file_in_section): Return
15110         gdb_bfd_ref_ptr.
15111         * machoread.c (macho_add_oso_symfile): Change abfd to
15112         gdb_bfd_ref_ptr.
15113         (macho_symfile_read_all_oso): Update.
15114         (macho_check_dsym): Return gdb_bfd_ref_ptr.
15115         (macho_symfile_read): Update.
15116         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15117         (jit_bfd_try_read_symtab): Update.
15118         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15119         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15120         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15121         gdb_bfd_ref_ptr.
15122         (gdb_bfd_ref_policy): New struct.
15123         (gdb_bfd_ref_ptr): New typedef.
15124         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15125         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15126         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15127         gdb_bfd_ref_ptr.
15128         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15129         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15130         (gcore_command): Update.
15131         * exec.c (exec_file_attach): Update.
15132         * elfread.c (elf_symfile_read): Update.
15133         * dwarf2read.c (dwarf2_get_dwz_file): Update.
15134         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15135         (open_and_init_dwo_file): Update.
15136         (open_dwp_file): Return gdb_bfd_ref_ptr.
15137         (open_and_init_dwp_file): Update.
15138         * corelow.c (core_open): Update.
15139         * compile/compile-object-load.c (compile_object_load): Update.
15140         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15141         * coffread.c (coff_symfile_read): Update.
15142         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15143         gdb_bfd_ref_ptr.  Rename.
15144         (dump_bfd_file, restore_command): Update.
15145         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15146         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15147         (find_separate_debug_file_by_buildid): Update.
15148
15149 2017-01-10  Tom Tromey  <tom@tromey.com>
15150
15151         * common/gdb_ref_ptr.h: New file.
15152         * python/py-ref.h (struct gdbpy_ref_policy): New.
15153         (gdbpy_ref): Now a typedef.
15154
15155 2017-01-10  Tom Tromey  <tom@tromey.com>
15156
15157         * utils.h (make_cleanup_htab_delete): Don't declare.
15158         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15159         Remove.
15160         * linespec.c (decode_compound_collector): Add constructor,
15161         destructor.
15162         (lookup_prefix_sym): Remove cleanup.
15163         (symtab_collector): Add constructor, destructor.
15164         (collect_symtabs_from_filename): Remove cleanup.
15165         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15166         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15167         Use htab_up.
15168         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15169         * dwarf2read.c (dw2_expand_symtabs_matching)
15170         (dw2_map_symbol_filenames, dwarf_decode_macros)
15171         (write_psymtabs_to_index): Use htab_up.
15172         * dwarf2loc.c (func_verify_no_selftailcall)
15173         (call_site_find_chain_1, func_verify_no_selftailcall)
15174         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15175         std::vector, gdb::unique_xmalloc_ptr.
15176         (call_sitep): Remove typedef.
15177         (dwarf2_locexpr_baton_eval): Remove unused variable.
15178
15179 2017-01-10  Tom Tromey  <tom@tromey.com>
15180
15181         * python/python-internal.h (make_cleanup_py_decref)
15182         (make_cleanup_py_xdecref): Don't declare.
15183         * python/py-utils.c (py_decref, make_cleanup_py_decref)
15184         (py_xdecref, make_cleanup_py_xdecref): Remove.
15185
15186 2017-01-10  Tom Tromey  <tom@tromey.com>
15187
15188         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15189         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15190
15191 2017-01-10  Tom Tromey  <tom@tromey.com>
15192
15193         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15194
15195 2017-01-10  Tom Tromey  <tom@tromey.com>
15196
15197         * python/py-utils.c (unicode_to_encoded_string)
15198         (python_string_to_target_string)
15199         (python_string_to_target_python_string)
15200         (python_string_to_host_string, gdbpy_obj_to_string)
15201         (get_addr_from_python): Use gdbpy_ref.
15202
15203 2017-01-10  Tom Tromey  <tom@tromey.com>
15204
15205         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15206         gdbpy_ref.
15207
15208 2017-01-10  Tom Tromey  <tom@tromey.com>
15209
15210         * python/python.c (eval_python_command, gdbpy_decode_line)
15211         (gdbpy_run_events, gdbpy_start_type_printers)
15212         (gdbpy_apply_type_printers): Use gdbpy_ref.
15213
15214 2017-01-10  Tom Tromey  <tom@tromey.com>
15215
15216         * python/py-param.c (get_doc_string, compute_enum_values): Use
15217         gdbpy_ref.
15218
15219 2017-01-10  Tom Tromey  <tom@tromey.com>
15220
15221         * python/py-inferior.c (find_thread_object, build_inferior_list):
15222         Use gdbpy_ref.
15223
15224 2017-01-10  Tom Tromey  <tom@tromey.com>
15225
15226         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15227
15228 2017-01-10  Tom Tromey  <tom@tromey.com>
15229
15230         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15231         gdbpy_ref.
15232
15233 2017-01-10  Tom Tromey  <tom@tromey.com>
15234
15235         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
15236         extra incref.
15237         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15238         Use gdbpy_ref.
15239
15240 2017-01-10  Tom Tromey  <tom@tromey.com>
15241
15242         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15243         gdbpy_ref.
15244
15245 2017-01-10  Tom Tromey  <tom@tromey.com>
15246
15247         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
15248         decref results of PyArg_ParseTupleAndKeywords.
15249
15250 2017-01-10  Tom Tromey  <tom@tromey.com>
15251
15252         * python/python.c (python_run_simple_file): Use
15253         unique_xmalloc_ptr, gdbpy_ref.
15254
15255 2017-01-10  Tom Tromey  <tom@tromey.com>
15256
15257         * python/py-prettyprint.c (print_stack_unless_memory_error)
15258         (print_string_repr, print_children): Use gdbpy_ref.
15259         (dummy_python_frame): New class.
15260         (dummy_python_frame::dummy_python_frame): Rename from
15261         push_dummy_python_frame.
15262         (py_restore_tstate): Remove.
15263
15264 2017-01-10  Tom Tromey  <tom@tromey.com>
15265
15266         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15267
15268 2017-01-10  Tom Tromey  <tom@tromey.com>
15269
15270         * python/python.c (ensure_python_env, restore_python_env):
15271         Remove.
15272         * python/python-internal.h (ensure_python_env): Don't declare.
15273         * varobj.h (varobj_ensure_python_env): Don't declare.
15274         * varobj.c (varobj_ensure_python_env): Remove.
15275
15276 2017-01-10  Tom Tromey  <tom@tromey.com>
15277
15278         * varobj.c (varobj_value_get_print_value): Use
15279         gdbpy_enter_varobj.
15280
15281 2017-01-10  Tom Tromey  <tom@tromey.com>
15282
15283         * python/py-prettyprint.c (print_string_repr, print_children):
15284         Update.
15285         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15286         of "encoding".
15287         * varobj.c (varobj_value_get_print_value): Update.
15288         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15289
15290 2017-01-10  Tom Tromey  <tom@tromey.com>
15291
15292         * varobj.c (varobj_get_display_hint)
15293         (dynamic_varobj_has_child_method, install_new_value_visualizer)
15294         (varobj_set_visualizer, free_variable): Use
15295         gdbpy_enter_varobj.
15296
15297 2017-01-10  Tom Tromey  <tom@tromey.com>
15298
15299         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15300         (do_finish_initialization): New function.  Use gdbpy_ref.
15301         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
15302         do_finish_initialization.
15303
15304 2017-01-10  Tom Tromey  <tom@tromey.com>
15305
15306         * python/py-param.c (get_set_value, get_show_value): Use
15307         gdbpy_enter, gdbpy_ref.
15308
15309 2017-01-10  Tom Tromey  <tom@tromey.com>
15310
15311         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15312
15313 2017-01-10  Tom Tromey  <tom@tromey.com>
15314
15315         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15316
15317 2017-01-10  Tom Tromey  <tom@tromey.com>
15318
15319         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15320         Use gdbpy_enter_varobj.
15321
15322 2017-01-10  Tom Tromey  <tom@tromey.com>
15323
15324         * varobj.c (gdbpy_enter_varobj): New constructor.
15325         * python/python-internal.h (gdbpy_enter_varobj): New class.
15326         * python/py-varobj.c (py_varobj_get_iterator): Use
15327         gdbpy_enter_varobj.
15328
15329 2017-01-10  Tom Tromey  <tom@tromey.com>
15330
15331         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15332         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15333         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15334         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15335         unique_xmalloc_ptr.
15336         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15337
15338 2017-01-10  Tom Tromey  <tom@tromey.com>
15339
15340         * python/py-xmethods.c (invoke_match_method): Use
15341         gdbpy_ref.
15342
15343 2017-01-10  Tom Tromey  <tom@tromey.com>
15344
15345         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15346         gdbpy_enter, gdbpy_ref.
15347
15348 2017-01-10  Tom Tromey  <tom@tromey.com>
15349
15350         * python/python.c (python_interactive_command): Use gdbpy_enter.
15351
15352 2017-01-10  Tom Tromey  <tom@tromey.com>
15353
15354         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15355         gdbpy_ref.
15356
15357 2017-01-10  Tom Tromey  <tom@tromey.com>
15358
15359         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15360         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15361
15362 2017-01-10  Tom Tromey  <tom@tromey.com>
15363
15364         * utils.h (htab_deleter): New struct.
15365         (htab_up): New typedef.
15366         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15367         gdbpy_enter, gdbpy_ref, htab_up.
15368
15369 2017-01-10  Tom Tromey  <tom@tromey.com>
15370
15371         * python/py-unwind.c (pending_frame_invalidate): Remove.
15372         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15373
15374 2017-01-10  Tom Tromey  <tom@tromey.com>
15375
15376         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15377         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15378
15379 2017-01-10  Tom Tromey  <tom@tromey.com>
15380
15381         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15382
15383 2017-01-10  Tom Tromey  <tom@tromey.com>
15384
15385         * python/python.c (gdbpy_eval_from_control_command)
15386         (gdbpy_source_script, gdbpy_run_events)
15387         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15388         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15389         gdbpy_enter.
15390
15391 2017-01-10  Tom Tromey  <tom@tromey.com>
15392
15393         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15394
15395 2017-01-10  Tom Tromey  <tom@tromey.com>
15396
15397         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15398
15399 2017-01-10  Tom Tromey  <tom@tromey.com>
15400
15401         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15402         (python_on_inferior_call_pre, python_on_inferior_call_post)
15403         (python_on_memory_change, python_on_register_change)
15404         (python_inferior_exit, python_new_objfile, add_thread_object)
15405         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15406
15407 2017-01-10  Tom Tromey  <tom@tromey.com>
15408
15409         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15410         (bpfinishpy_handle_exit): Use gdbpy_enter.
15411
15412 2017-01-10  Tom Tromey  <tom@tromey.com>
15413
15414         * python/py-cmd.c (cmdpy_destroyer)
15415         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15416         gdbpy_enter.
15417
15418 2017-01-10  Tom Tromey  <tom@tromey.com>
15419
15420         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15421         gdbpy_enter.
15422         (gdbpy_breakpoint_has_cond): Likewise.
15423
15424 2017-01-10  Tom Tromey  <tom@tromey.com>
15425
15426         * python/python.c (gdbpy_enter): New constructor.
15427         (~gdbpy_enter): New destructor.
15428         (restore_python_env, ensure_python_env): Rewrite.
15429         * python/python-internal.h (gdbpy_enter): New class.
15430
15431 2017-01-10  Tom Tromey  <tom@tromey.com>
15432
15433         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15434
15435 2017-01-10  Tom Tromey  <tom@tromey.com>
15436
15437         * python/py-value.c (value_has_field, get_field_flag)
15438         (get_field_type, valpy_getitem, convert_value_from_python): Use
15439         gdbpy_ref.
15440
15441 2017-01-10  Tom Tromey  <tom@tromey.com>
15442
15443         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15444         gdbpy_ref.
15445
15446 2017-01-10  Tom Tromey  <tom@tromey.com>
15447
15448         * python/py-prettyprint.c (search_pp_list)
15449         (find_pretty_printer_from_objfiles)
15450         (find_pretty_printer_from_progspace)
15451         (find_pretty_printer_from_gdb, find_pretty_printer)
15452         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15453         gdbpy_ref.
15454
15455 2017-01-10  Tom Tromey  <tom@tromey.com>
15456
15457         * python/py-param.c (call_doc_function): Use gdbpy_ref.
15458
15459 2017-01-10  Tom Tromey  <tom@tromey.com>
15460
15461         * python/py-linetable.c (build_line_table_tuple_from_pcs)
15462         (ltpy_get_all_source_lines): Use gdbpy_ref.
15463
15464 2017-01-10  Tom Tromey  <tom@tromey.com>
15465
15466         * python/py-framefilter.c (extract_sym, extract_value)
15467         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15468         gdbpy_ref.
15469
15470 2017-01-10  Tom Tromey  <tom@tromey.com>
15471
15472         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15473
15474 2017-01-10  Tom Tromey  <tom@tromey.com>
15475
15476         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15477
15478 2017-01-10  Tom Tromey  <tom@tromey.com>
15479
15480         * python/py-function.c (convert_values_to_python, fnpy_init): Use
15481         gdbpy_ref.
15482
15483 2017-01-10  Tom Tromey  <tom@tromey.com>
15484
15485         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15486
15487 2017-01-10  Tom Tromey  <tom@tromey.com>
15488
15489         * python/py-type.c (convert_field, make_fielditem, typy_fields)
15490         (typy_range): Use gdbpy_ref.
15491
15492 2017-01-10  Tom Tromey  <tom@tromey.com>
15493
15494         * python/py-threadevent.c (create_thread_event_object): Use
15495         gdbpy_ref.
15496         * python/py-stopevent.c (create_stop_event_object): Simplify.
15497         (emit_stop_event): Use gdbpy_ref.
15498         * python/py-signalevent.c (create_signal_event_object): Use
15499         gdbpy_ref.
15500         * python/py-newobjfileevent.c (create_new_objfile_event_object)
15501         (emit_new_objfile_event, create_clear_objfiles_event_object)
15502         (emit_clear_objfiles_event): Use gdbpy_ref.
15503         * python/py-infevents.c (create_inferior_call_event_object)
15504         (create_register_changed_event_object)
15505         (create_memory_changed_event_object, emit_inferior_call_event)
15506         (emit_memory_changed_event, emit_register_changed_event): Use
15507         gdbpy_ref.
15508         * python/py-exitedevent.c (create_exited_event_object)
15509         (emit_exited_event): Use gdbpy_ref.
15510         * python/py-event.h (evpy_emit_event): Remove
15511         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15512         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15513         * python/py-continueevent.c (emit_continue_event): Use
15514         gdbpy_ref.
15515         * python/py-breakpoint.c (gdbpy_breakpoint_created)
15516         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15517         gdbpy_ref.
15518         * python/py-bpevent.c (create_breakpoint_event_object): Use
15519         gdbpy_ref.
15520
15521 2017-01-10  Tom Tromey  <tom@tromey.com>
15522
15523         * python/py-ref.h: New file.
15524
15525 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15526
15527         * cli-out.c (cli_ui_out::do_redirect): Change return type to
15528         void.
15529         * cli-out.h (cli_ui_out::do_redirect): Likewise.
15530         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15531         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15532         * ui-out.c (ui_out::redirect): Likewise.
15533         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15534         * cli/cli-logging.c (set_logging_redirect): Update call site of
15535         ui_out::redirect.
15536         (handle_redirections): Likewise.
15537         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15538         * top.c (execute_command_to_string): Likewise.
15539         * utils.c (do_ui_out_redirect_pop): Likewise.
15540
15541 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15542
15543         * stack.c (_initialize_stack): Update "frame" command help message.
15544
15545 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
15546
15547         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15548
15549 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15550
15551         * x86-linux-nat.h: Include gdb_proc_service.h.
15552
15553 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15554
15555         * ser-base.h: Include serial.h.
15556
15557 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15558
15559         * ppc-linux-tdep.h: Include ppc-tdep.h.
15560
15561 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15562
15563         * nat/amd64-linux-siginfo.h: Include signal.h.
15564
15565 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15566
15567         * nat/aarch64-linux-hw-point.h: Include break-common.h.
15568
15569 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15570
15571         * mi/mi-parse.h: Include mi-cmds.h.
15572
15573 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15574
15575         * inf-loop.c: Don't include "target.h".
15576         * inf-loop.h: Include it here.
15577
15578 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15579
15580         * dfp.h: Include "dboulest.h" and "expression.h".
15581
15582 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15583
15584         * ax-gdb.h: Include "ax.h".
15585
15586 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15587
15588         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15589         with nat/gdb_ptrace.h.
15590
15591 2017-01-05  Yao Qi  <yao.qi@linaro.org>
15592
15593         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15594         new line.
15595         (mips64_fbsd_sigframe_init): Likewise.
15596
15597 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15598
15599         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15600         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15601
15602 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15603
15604         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15605         * NEWS: Mention new FreeBSD/mips native configuration.
15606         * config/mips/fbsd.mh: New file.
15607         * configure.host: Add mips*-*-freebsd*.
15608         * mips-fbsd-nat.c: New file.
15609
15610 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15611
15612         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15613         (ALLDEPFILES): Add mips-fbsd-tdep.c.
15614         * NEWS: Mention new FreeBSD/mips target.
15615         * configure.tgt: Add mips*-*-freebsd*.
15616         * mips-fbsd-tdep.c: New file.
15617         * mips-fbsd-tdep.h: New file.
15618
15619 2017-01-04  Yao Qi  <yao.qi@linaro.org>
15620
15621         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15622         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15623
15624 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15625
15626         Update copyright year range in all GDB files.
15627
15628 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15629
15630         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15631
15632 For older changes see ChangeLog-2016.
15633 \f
15634 Local Variables:
15635 mode: change-log
15636 left-margin: 8
15637 fill-column: 74
15638 version-control: never
15639 coding: utf-8
15640 End: