fix typos in ada-lang.c comment
[external/binutils.git] / gdb / ChangeLog
1 2017-11-09  Joel Brobecker  <brobecker@adacore.com>
2
3         * ada-lang.c: Fix some typos in the general command documenting
4         how Ada expressions are being evaluated and how their result
5         is printed.
6
7 2017-11-09  Tom Tromey  <tom@tromey.com>
8
9         * psymtab.c (psymbol_hash): Do not hash string contents.
10         (psymbol_compare): Add comment.
11
12 2017-11-09  Tom Tromey  <tom@tromey.com>
13
14         * dictionary.c (dict_hash): Move "TKB" check into the "switch".
15
16 2017-11-08  Joel Brobecker  <brobecker@adacore.com>
17
18         * ada-exp.y (write_var_from_sym): Remove parameter
19         "orig_left_context".  Update all callers.
20
21 2017-11-08  Simon Marchi  <simon.marchi@ericsson.com>
22
23         * tracepoint.h (class collection_list) <stringify>: Return
24         std::vector<std::string>.
25         (encode_actions_rsp): Change parameters to
26         std::vector<std::string> *.
27         * tracepoint.c (collection_list::stringify): Return
28         std::vector<std::string> and adjust accordingly.
29         (encode_actions_rsp): Changee parameters to
30         std::vector<std::string> and adjust accordingly.
31         * remote.c (free_actions_list),
32         free_actions_list_cleanup_wrapper): Remove.
33         (remote_download_tracepoint): Adjust to std::vector.
34
35 2017-11-08  Tom Tromey  <tom@tromey.com>
36
37         * dwarf2read.c (symbolp): Remove typedef.
38         (read_func_scope): Use std::vector.
39         (process_structure_scope): Use std::vector.
40
41 2017-11-08  Pedro Alves  <palves@redhat.com>
42
43         * ada-lang.c (ada_make_symbol_completion_list): Use
44         completion_skip_symbol.
45         * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
46         (symbol_is_function_or_method(symbol*)): New.
47         (add_symtab_completions): Add complete_symbol_mode parameter.  Use
48         completion_skip_symbol.
49         (default_collect_symbol_completion_matches_break_on): Use
50         completion_skip_symbol.  Pass down mode.
51         (collect_file_symbol_completion_matches): Pass down mode.
52         * symtab.h (symbol_is_function_or_method): New declarations.
53         (completion_skip_symbol): New template function.
54
55 2017-11-08  Pedro Alves  <palves@redhat.com>
56
57         * linespec.c (iterate_over_all_matching_symtabs): Add
58         search_domain parameter.  Pass it down to expand_symtabs_matching.
59         (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
60         (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
61         search_domain.
62         (add_all_symbol_names_from_pspace): Add search_domain parameter.
63         Pass it down.
64         (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
65         symbols.
66         (add_matching_symbols_to_info): Add search_domain parameter.  Pass
67         it down.
68
69 2017-11-08  Pedro Alves  <palves@redhat.com>
70
71         * ada-lang.c (ada_make_symbol_completion_list): Remove text and
72         text_len locals and don't pass them down.
73         * symtab.c (completion_list_add_name): Remove
74         sym_text/sym_text_len parameters and adjust.
75         (completion_list_add_symbol, completion_list_add_msymbol)
76         (completion_list_objc_symbol, completion_list_add_fields)
77         (add_symtab_completions): Likewise.
78         (default_collect_symbol_completion_matches_break_on)
79         (collect_file_symbol_completion_matches): Remove sym_text_len
80         local and don't pass it down.
81         * symtab.h (completion_list_add_name): Remove
82         sym_text/sym_text_len parameters.
83
84 2017-11-08  Pedro Alves  <palves@redhat.com>
85
86         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
87         unittests/lookup_name_info-selftests.c.
88         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
89         * cp-support.c: Include "selftest.h".
90         (cp_remove_params_1): Rename from cp_remove_params.  Add
91         'require_param' parameter, and handle it.
92         (cp_remove_params): Reimplement.
93         (cp_remove_params_if_any): New.
94         (selftests::quote): New.
95         (selftests::check_remove_params): New.
96         (selftests::test_cp_remove_params): New.
97         (_initialize_cp_support): Install
98         selftests::test_cp_remove_params.
99         * cp-support.h (cp_remove_params_if_any): Declare.
100         * dwarf2read.c :Include "selftest.h".
101         (dw2_expand_symtabs_matching_symbol): Use
102         lookup_name_info::make_ignore_params.
103         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
104         (selftests::dw2_expand_symtabs_matching::string_or_null)
105         (selftests::dw2_expand_symtabs_matching::check_match)
106         (selftests::dw2_expand_symtabs_matching::test_symbols)
107         (selftests::dw2_expand_symtabs_matching::run_test): New.
108         (_initialize_dwarf2_read): Register
109         selftests::dw2_expand_symtabs_matching::run_test.
110         * psymtab.c (psym_expand_symtabs_matching): Use
111         lookup_name_info::make_ignore_params.
112         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
113         If the lookup name wants to ignore parameters, strip them.
114         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
115         code handling '('.
116         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
117         (default_collect_symbol_completion_matches_break_on): Don't try to
118         strip parameters.
119         * symtab.h (lookup_name_info::lookup_name_info): Add
120         'ignore_parameters' parameter.
121         (lookup_name_info::ignore_parameters)
122         (lookup_name_info::make_ignore_params): New methods.
123         (lookup_name_info::m_ignore_parameters): New field.
124         * unittests/lookup_name_info-selftests.c: New file.
125
126 2017-11-08  Pedro Alves  <palves@redhat.com>
127
128         * dwarf2read.c (dw2_expand_marked_cus)
129         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
130         (dw2_expand_symtabs_matching): Move further below.
131         (dw2_expand_marked_cus): Reindent.
132
133 2017-11-08  Pedro Alves  <palves@redhat.com>
134
135         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
136         (struct name_component): New.
137         (mapped_index::name_components): New field.
138         (mapped_index::symbol_name_at): New method.
139         (dwarf2_read_index): Call mapped_index ctor.
140         (dw2_map_matching_symbols): Add comment about name_components
141         table.
142         (dw2_expand_symtabs_matching): Factor part to...
143         (dw2_expand_symtabs_matching_symbol): ... this new function.
144         Build name components table, and lookup symbols in it before
145         calling the name matcher.
146         (dw2_expand_marked_cus): New, factored out from
147         dw2_expand_symtabs_matching.
148         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
149
150 2017-11-08   Pedro Alves  <palves@redhat.com>
151
152         * ada-lang.c (ada_encode): Rename to ..
153         (ada_encode_1): ... this.  Add throw_errors parameter and handle
154         it.
155         (ada_encode): Reimplement.
156         (match_name): Delete, folded into full_name.
157         (resolve_subexp): No longer pass the encoded name to
158         ada_lookup_symbol_list.
159         (should_use_wild_match): Delete.
160         (name_match_type_from_name): New.
161         (ada_lookup_simple_minsym): Use lookup_name_info and the
162         language's symbol_name_matcher_ftype.
163         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
164         (ada_add_block_renamings): Adjust to use lookup_name_info.
165         (ada_lookup_name): New.
166         (add_nonlocal_symbols, ada_add_all_symbols)
167         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
168         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
169         (ada_name_for_lookup): Delete.
170         (ada_lookup_encoded_symbol): Construct a verbatim name.
171         (wild_match): Reverse sense of return type.  Use bool.
172         (full_match): Reverse sense of return type.  Inline bits of old
173         match_name here.
174         (ada_add_block_symbols): Adjust to use lookup_name_info.
175         (symbol_completion_match): Delete, folded into...
176         (ada_lookup_name_info::matches): ... .this new method.
177         (symbol_completion_add): Delete.
178         (ada_collect_symbol_completion_matches): Add name_match_type
179         parameter.  Adjust to use lookup_name_info and
180         completion_list_add_name.
181         (get_var_value, ada_add_global_exceptions): Adjust to use
182         lookup_name_info.
183         (ada_get_symbol_name_cmp): Delete.
184         (do_wild_match, do_full_match): New functions.
185         (ada_lookup_name_info::ada_lookup_name_info): New method.
186         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
187         functions.
188         (ada_language_defn): Install ada_get_symbol_name_matcher.
189         * ada-lex.l (processId): If name starts with '<', copy it
190         verbatim.
191         * block.c (block_iter_match_step, block_iter_match_first)
192         (block_iter_match_next, block_lookup_symbol)
193         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
194         lookup_name_info.
195         * block.h (block_iter_match_first, block_iter_match_next)
196         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
197         * c-lang.c (c_language_defn, cplus_language_defn)
198         (asm_language_defn, minimal_language_defn): Adjust comments to
199         refer to la_get_symbol_name_matcher.
200         * completer.c (complete_files_symbols)
201         (collect_explicit_location_matches, symbol_completer): Pass a
202         symbol_name_match_type down.
203         * completer.h (class completion_match, completion_match_result):
204         New classes.
205         (completion_tracker::reset_completion_match_result): New method.
206         (completion_tracker::m_completion_match_result): New field.
207         * cp-support.c (make_symbol_overload_list_block): Adjust to use
208         lookup_name_info.
209         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
210         functions.
211         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
212         * d-lang.c: Adjust comments to refer to
213         la_get_symbol_name_matcher.
214         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
215         Adjust to use lookup_name_info.
216         (dict_iter_match_first, dict_iter_match_next)
217         (iter_match_first_hashed, iter_match_next_hashed)
218         (iter_match_first_linear, iter_match_next_linear): Adjust to work
219         with a lookup_name_info.
220         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
221         Likewise.
222         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
223         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
224         (gdb_index_symbol_name_matcher): New class.
225         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
226         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
227         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
228         with a symbol_name_match_type.
229         (f_language_defn): Adjust comments to refer to
230         la_get_symbol_name_matcher.
231         * go-lang.c (go_language_defn): Adjust comments to refer to
232         la_get_symbol_name_matcher.
233         * language.c (default_symbol_name_matcher)
234         (language_get_symbol_name_matcher): New functions.
235         (unknown_language_defn, auto_language_defn): Adjust comments to
236         refer to la_get_symbol_name_matcher.
237         * language.h (symbol_name_cmp_ftype): Delete.
238         (language_defn) <la_collect_symbol_completion_matches>: Add match
239         type parameter.
240         <la_get_symbol_name_cmp>: Delete field.
241         <la_get_symbol_name_matcher>: New field.
242         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
243         (default_symbol_name_matcher, language_get_symbol_name_matcher):
244         Declare.
245         * linespec.c (iterate_over_all_matching_symtabs)
246         (iterate_over_file_blocks): Adjust to use lookup_name_info.
247         (find_methods): Add language parameter, and use lookup_name_info
248         and the language's symbol_name_matcher_ftype.
249         (linespec_complete_function): Adjust.
250         (lookup_prefix_sym): Use lookup_name_info.
251         (add_all_symbol_names_from_pspace): Adjust.
252         (find_superclass_methods): Add language parameter and pass it
253         down.
254         (find_method): Pass symbol language down.
255         (find_linespec_symbols): Don't demangle or Ada encode here.
256         (search_minsyms_for_name): Add lookup_name_info parameter.
257         (add_matching_symbols_to_info): Add name_match_type parameter.
258         Use lookup_name_info.
259         * m2-lang.c (m2_language_defn): Adjust comments to refer to
260         la_get_symbol_name_matcher.
261         * minsyms.c: Include <algorithm>.
262         (add_minsym_to_demangled_hash_table): Remove table parameter and
263         add objfile parameter.  Use search_name_hash, and add language to
264         demangled languages vector.
265         (struct found_minimal_symbols): New struct.
266         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
267         New functions.
268         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
269         input names here.  Use lookup_name_info instead.  Lookup up
270         demangled names once for each language in the demangled names
271         vector.
272         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
273         demangled names once for each language in the demangled names
274         vector.
275         (build_minimal_symbol_hash_tables): Adjust.
276         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
277         lookup_name_info.
278         * objc-lang.c (objc_language_defn): Adjust comment to refer to
279         la_get_symbol_name_matcher.
280         * objfiles.h: Include <vector>.
281         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
282         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
283         la_get_symbol_name_matcher.
284         * p-lang.c (pascal_language_defn): Adjust comment to refer to
285         la_get_symbol_name_matcher.
286         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
287         (match_partial_symbol): Use symbol_name_match_type,
288         lookup_name_info and psymbol_name_matches.
289         (lookup_partial_symbol): Use lookup_name_info.
290         (map_block): Use symbol_name_match_type and lookup_name_info.
291         (psym_map_matching_symbols): Use symbol_name_match_type.
292         (psymbol_name_matches): New.
293         (recursively_search_psymtabs): Use lookup_name_info and
294         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
295         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
296         'kind' parameter to 'domain'.
297         * rust-lang.c (rust_language_defn): Adjust comment to refer to
298         la_get_symbol_name_matcher.
299         * symfile-debug.c (debug_qf_map_matching_symbols)
300         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
301         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
302         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
303         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
304         Adjust to use symbol_name_match_type.
305         <expand_symtabs_matching>: Adjust to use lookup_name_info.
306         (expand_symtabs_matching): Adjust to use lookup_name_info.
307         * symmisc.c (maintenance_expand_symtabs): Use
308         lookup_name_info::match_any ().
309         * symtab.c (symbol_matches_search_name): New.
310         (eq_symbol_entry): Adjust to use lookup_name_info and the
311         language's matcher.
312         (demangle_for_lookup_info::demangle_for_lookup_info): New.
313         (lookup_name_info::match_any): New.
314         (iterate_over_symbols, search_symbols): Use lookup_name_info.
315         (compare_symbol_name): Add language, lookup_name_info and
316         completion_match_result parameters, and use them.
317         (completion_list_add_name): Make extern.  Add language and
318         lookup_name_info parameters.  Use them.
319         (completion_list_add_symbol, completion_list_add_msymbol)
320         (completion_list_objc_symbol): Add lookup_name_info parameters and
321         adjust.  Pass down language.
322         (completion_list_add_fields): Add lookup_name_info parameters and
323         adjust.  Pass down language.
324         (add_symtab_completions): Add lookup_name_info parameters and
325         adjust.
326         (default_collect_symbol_completion_matches_break_on): Add
327         name_match_type parameter, and use it.  Use lookup_name_info.
328         (default_collect_symbol_completion_matches)
329         (collect_symbol_completion_matches): Add name_match_type
330         parameter, and pass it down.
331         (collect_symbol_completion_matches_type): Adjust.
332         (collect_file_symbol_completion_matches): Add name_match_type
333         parameter, and use lookup_name_info.
334         * symtab.h: Include <string> and "common/gdb_optional.h".
335         (enum class symbol_name_match_type): New.
336         (class ada_lookup_name_info): New.
337         (struct demangle_for_lookup_info): New.
338         (class lookup_name_info): New.
339         (symbol_name_matcher_ftype): New.
340         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
341         (symbol_matches_search_name): Declare.
342         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
343         (default_collect_symbol_completion_matches)
344         (collect_symbol_completion_matches)
345         (collect_file_symbol_completion_matches): Add name_match_type
346         parameter.
347         (iterate_over_symbols): Use lookup_name_info.
348         (completion_list_add_name): Declare.
349         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
350         (strncmp_iw_with_mode): Now extern.
351         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
352         (strncmp_iw_with_mode): Declare.
353
354 2017-11-08  Keith Seitz  <keiths@redhat.com>
355             Pedro Alves  <palves@redhat.com>
356
357         * ada-lang.c (ada_language_defn): Install
358         default_search_name_hash.
359         * buildsym.c (struct buildsym_compunit): <language>: New field.
360         (finish_block_internal): Pass language when creating dictionaries.
361         (start_buildsym_compunit, start_symtab): New language parameters.
362         Use them.
363         (restart_symtab): Pass down compilation unit's language.
364         * buildsym.h (enum language): Forward declare.
365         (start_symtab): New 'language' parameter.
366         * c-lang.c (c_language_defn, cplus_language_defn)
367         (asm_language_defn, minimal_language_defn): Install
368         default_search_name_hash.
369         * coffread.c (coff_start_symtab): Adjust.
370         * d-lang.c (d_language_defn): Install default_search_name_hash.
371         * dbxread.c (struct symloc): Add 'pst_language' field.
372         (PST_LANGUAGE): Define.
373         (start_psymtab, read_ofile_symtab): Use it.
374         (process_one_symbol): New 'language' parameter.  Pass it down.
375         * dictionary.c (struct dictionary) <language>: New field.
376         (DICT_LANGUAGE): Define.
377         (dict_create_hashed, dict_create_hashed_expandable)
378         (dict_create_linear, dict_create_linear_expandable): New parameter
379         'language'.  Set the dictionary's language.
380         (iter_match_first_hashed): Adjust to rename.
381         (insert_symbol_hashed): Assert we don't see mismatching
382         languages.  Adjust to rename.
383         (dict_hash): Rename to ...
384         (default_search_name_hash): ... this and make extern.
385         * dictionary.h (struct language_defn): Forward declare.
386         (dict_create_hashed): New parameter 'language'.
387         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
388         * f-lang.c (f_language_defn): Install default_search_name_hash.
389         * go-lang.c (go_language_defn): Install default_search_name_hash.
390         * jit.c (finalize_symtab): Pass compunit's language to dictionary
391         creation.
392         * language.c (unknown_language_defn, auto_language_defn):
393         * language.h (language_defn::la_search_name_hash): New field.
394         (default_search_name_hash): Declare.
395         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
396         * mdebugread.c (new_block): New parameter 'language'.
397         * mdebugread.c (parse_symbol): Pass symbol language to block
398         allocation.
399         (psymtab_to_symtab_1): Pass down language.
400         (new_symtab): Pass compunit's language to block allocation.
401         * objc-lang.c (objc_language_defn): Install
402         default_search_name_hash.
403         * opencl-lang.c (opencl_language_defn):
404         * p-lang.c (pascal_language_defn): Install
405         default_search_name_hash.
406         * rust-lang.c (rust_language_defn): Install
407         default_search_name_hash.
408         * stabsread.h (enum language): Forward declare.
409         (process_one_symbol): Add 'language' parameter.
410         * symtab.c (search_name_hash): New function.
411         * symtab.h (search_name_hash): Declare.
412         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
413
414 2017-11-08  Pedro Alves  <palves@redhat.com>
415
416         * cp-name-parser.y (main): Don't initialize extra_chars.
417
418 2017-11-07  Tom Tromey  <tom@tromey.com>
419
420         * event-top.h (command_handler): Constify.
421         * record-full.c (cmd_record_full_start): Update.
422         * thread.c (thread_apply_all_command): Update.
423         * printcmd.c (eval_command): Update.
424         * mi/mi-main.c (mi_execute_cli_command): Update.
425         (mi_execute_async_cli_command): Update.
426         * tui/tui-stack.c (tui_update_command): Update.
427         * cli/cli-interp.c (safe_execute_command): Constify.
428         * record.c (record_start): Update.
429         (record_start, record_stop, cmd_record_start): Update.
430         * record-btrace.c (cmd_record_btrace_bts_start): Update.
431         (cmd_record_btrace_pt_start): Update.
432         (cmd_record_btrace_start): Update.
433         (cmd_record_btrace_start): Update.
434         * reverse.c (exec_reverse_once): Update.
435         * python/python.c (execute_gdb_command): Don't copy the command.
436         * event-top.c (command_line_handler): Update.
437         (command_handler): Constify.
438         * defs.h (deprecated_call_command_hook): Constify.
439         * cli/cli-script.h (execute_user_command): Constify.
440         * cli/cli-script.c (execute_user_command): Constify.
441         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
442         (enum command_control_type): Update.
443         * main.c (catch_command_errors): Remove non-const overload.
444         (catch_command_errors_ftype): Remove.
445         * python/py-cmd.c (cmdpy_function): Constify.
446         * guile/scm-cmd.c (cmdscm_function): Constify.
447         * cli/cli-dump.c (call_dump_func): Constify.
448         * cli/cli-decode.c (do_const_cfunc): Constify.
449         (do_sfunc): Constify.
450         (cmd_func): Constify.
451         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
452         * top.h (execute_command): Constify.
453         * top.c (execute_command): Constify.
454         (execute_command_to_string): Constify.
455         (deprecated_call_command_hook): Constify.
456         * command.h (cmd_func): Constify.
457         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
458
459 2017-11-07  Tom Tromey  <tom@tromey.com>
460
461         * ada-lang.c (catch_ada_exception_command): Constify.
462         (catch_assert_command): Constify.
463         * break-catch-throw.c (catch_catch_command, catch_throw_command)
464         (catch_rethrow_command): Constify.
465         (catch_exception_command_1): Constify.
466         * breakpoint.h (add_catch_command): Constify.
467         * break-catch-syscall.c (catch_syscall_command_1): Constify.
468         (catch_syscall_split_args): Constify.
469         * break-catch-sig.c (catch_signal_command): Constify.
470         (catch_signal_split_args): Constify.
471         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
472         cmd_const_sfunc_ftype.
473         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
474         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
475         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
476         (add_setshow_string_cmd, struct cmd_list_element)
477         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
478         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
479         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
480         Constify.
481         (set_cmd_sfunc): Constify.
482         (empty_sfunc): Constify.
483         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
484         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
485         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
486         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
487         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
488         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
489         Constify.
490         (set_cmd_sfunc): Constify.
491         (cmd_sfunc_ftype): Remove.
492         * compile/compile.c (set_compile_args): Constify.
493         * infrun.c (set_disable_randomization): Constify.
494         * infcmd.c (set_args_command, set_cwd_command): Constify.
495         * breakpoint.c (set_condition_evaluation_mode): Constify.
496         (add_catch_command): Constify.
497         (catch_fork_command_1, catch_exec_command_1)
498         (catch_load_command_1, catch_unload_command_1): Constify.
499         (catch_load_or_unload): Constify.
500         * guile/scm-param.c (pascm_set_func): Constify.
501         (add_setshow_generic): Constify.
502         * python/py-param.c (get_set_value): Constify.
503         * top.h (set_verbose): Constify.
504         * tui/tui-win.c (tui_set_var_cmd): Constify.
505         * mi/mi-main.c (set_mi_async_command): Constify.
506         * cli/cli-logging.c (set_logging_overwrite)
507         (set_logging_redirect): Constify.
508         * value.c (set_max_value_size): Constify.
509         * valprint.c (set_input_radix, set_output_radix): Constify.
510         * utils.c (set_width_command, set_height_command): Constify.
511         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
512         * tracepoint.c (set_disconnected_tracing)
513         (set_circular_trace_buffer, set_trace_buffer_size)
514         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
515         * top.c (set_history_size_command, set_verbose, set_editing)
516         (set_gdb_datadir, set_history_filename): Constify.
517         * target.c (set_targetdebug, maint_set_target_async_command)
518         (maint_set_target_non_stop_command, set_target_permissions)
519         (set_write_memory_permission): Constify.
520         (open_target): Constify.
521         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
522         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
523         * symtab.c (set_symbol_cache_size_handler): Constify.
524         * symfile.c (set_ext_lang_command): Constify.
525         * symfile-debug.c (set_debug_symfile): Constify.
526         * source.c (set_directories_command): Constify.
527         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
528         * serial.c (set_parity): Constify.
529         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
530         * remote.c (set_remote_exec_file, set_remotebreak)
531         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
532         * record.c (set_record_insn_history_size)
533         (set_record_call_history_size): Constify.
534         * record-full.c (set_record_full_insn_max_num): Constify.
535         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
536         * osabi.c (set_osabi): Constify.
537         * mips-tdep.c (set_mips64_transfers_32bit_regs)
538         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
539         * maint.c (maintenance_set_profile_cmd): Constify.
540         * linux-thread-db.c (set_libthread_db_search_path): Constify.
541         * language.c (set_language_command, set_range_command)
542         (set_case_command): Constify.
543         * infrun.c (set_non_stop, set_observer_mode)
544         (set_stop_on_solib_events, set_schedlock_func)
545         (set_exec_direction_func): Constify.
546         * infcmd.c (set_inferior_tty_command): Constify.
547         * disasm.c (set_disassembler_options_sfunc): Constify.
548         * demangle.c (set_demangling_command): Constify.
549         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
550         * cris-tdep.c (set_cris_version, set_cris_mode)
551         (set_cris_dwarf2_cfi): Constify.
552         * corefile.c (set_gnutarget_command): Constify.
553         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
554         (set_target_wide_charset_sfunc): Constify.
555         * breakpoint.c (update_dprintf_commands): Constify.
556         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
557         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
558         (set_disassembly_style_sfunc): Constify.
559         * arch-utils.c (set_endian, set_architecture): Constify.
560         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
561         * agent.c (set_can_use_agent): Constify.
562
563 2017-11-07  Tom Tromey  <tom@tromey.com>
564
565         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
566         (go32_pde, go32_pte, go32_pte_for_address): Constify.
567         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
568         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
569         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
570         (parse_int_arg, show_thread_default_detach_sc_cmd)
571         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
572         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
573         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
574         (show_task_pause_cmd, set_task_detach_sc_cmd)
575         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
576         (set_noninvasive_cmd, set_thread_pause_cmd)
577         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
578         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
579         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
580         * windows-nat.c (display_selectors): Constify.
581         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
582         non-const "cfunc".
583         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
584         (cmd_cfunc_eq): Likewise.
585         (struct cmd_list_element): Likewise.
586         (do_cfunc): Remove.
587         (cli_user_command_p): Update.
588         * command.h (add_cmd): Remove non-const overload.
589         (cmd_cfunc_ftype): Remove typedef.
590         (cmd_cfunc_eq): Remove non-const overload.
591         * value.c (show_values): Constify.
592         * thread.c (thread_apply_all_command): Constify.
593         * symfile.c (load_command): Constify.
594         * source.c (directory_command): Constify.
595         * maint.c (maintenance_internal_error)
596         (maintenance_demangler_warning, maintenance_space_display)
597         (maintenance_print_architecture, maintenance_translate_address)
598         (maintenance_info_selftests, maintenance_internal_warning):
599         Constify.
600         * breakpoint.c (disable_trace_command, enable_trace_command):
601         Constify.
602         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
603         Constify.
604         (add_auto_load_safe_path): Constify.
605         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
606         * top.h (show_commands): Constify.
607         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
608         * sparc64-tdep.c (adi_examine_command): Constify.
609         (adi_assign_command): Constify.
610
611 2017-11-07  Tom Tromey  <tom@tromey.com>
612
613         * frame.h (info_locals_command, info_args_command): Constify.
614         * auto-load.h (auto_load_info_scripts): Constify.
615         * inferior.h (registers_info): Constify.
616         * copying.c: Rebuild.
617         * copying.awk: Constify generated commands.
618         * auto-load.c (auto_load_info_scripts)
619         (info_auto_load_gdb_scripts): Constify.
620         * cli/cli-decode.c (struct cmd_list_element): Take a
621         cmd_const_cfunc_ftype.
622         * command.h (add_info): Take a cmd_const_cfunc_ftype.
623         * tui/tui-win.c (tui_all_windows_info): Constify.
624         * python/py-auto-load.c (info_auto_load_python_scripts):
625         Constify.
626         * cli/cli-cmds.c (show_command): Remove non-const overload.
627         * tracepoint.c (info_tvariables_command, info_scope_command):
628         Constify.
629         (info_static_tracepoint_markers_command): Constify.
630         * thread.c (info_threads_command): Constify.
631         (print_thread_info_1): Constify.
632         * target.c (info_target_command): Constify.
633         * symtab.c (info_sources_command, info_functions_command)
634         (info_types_command): Constify.
635         (info_variables_command): Remove non-const overload.
636         * symfile.c (info_ext_lang_command): Constify.
637         * stack.c (info_frame_command, info_locals_command)
638         (info_args_command): Constify.
639         (backtrace_command): Remove non-const overload.
640         * source.c (info_source_command, info_line_command): Constify.
641         * solib.c (info_sharedlibrary_command): Constify.
642         * skip.c (info_skip_command): Constify.
643         * ser-go32.c (info_serial_command): Constify.
644         * reverse.c (info_bookmarks_command): Constify.
645         * printcmd.c (info_symbol_command, info_address_command)
646         (info_display_command): Constify.
647         * osdata.c (info_osdata_command): Constify.
648         * objc-lang.c (info_selectors_command, info_classes_command):
649         Constify.
650         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
651         * memattr.c (info_mem_command): Constify.
652         * macrocmd.c (info_macro_command, info_macros_command): Constify.
653         * linux-fork.c (info_checkpoints_command): Constify.
654         * infrun.c (info_signals_command): Constify.
655         * inflow.c (info_terminal_command): Constify.
656         * inferior.c (info_inferiors_command): Constify.
657         (print_inferior): Constify.
658         * infcmd.c (info_program_command, info_all_registers_command)
659         (info_registers_command, info_vector_command)
660         (info_float_command): Constify.
661         (registers_info): Constify.
662         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
663         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
664         Constify.
665         * f-valprint.c (info_common_command): Constify.
666         * dcache.c (info_dcache_command): Constify.
667         (dcache_info_1): Constify.
668         * darwin-nat-info.c (info_mach_tasks_command)
669         (info_mach_task_command, info_mach_ports_command)
670         (info_mach_port_command, info_mach_threads_command)
671         (info_mach_thread_command, info_mach_regions_command)
672         (info_mach_regions_recurse_command, info_mach_region_command)
673         (info_mach_exceptions_command): Constify.
674         (get_task_from_args): Constify.
675         * cp-support.c (info_vtbl_command): Constify.
676         * breakpoint.c (info_watchpoints_command)
677         (info_tracepoints_command): Constify.
678         (info_breakpoints_command): Remove non-const overload.
679         * avr-tdep.c (avr_io_reg_read_command): Constify.
680         * auxv.c (info_auxv_command): Constify.
681         * ada-tasks.c (info_tasks_command): Constify.
682         (info_task): Constify.
683         * ada-lang.c (info_exceptions_command): Constify.
684
685 2017-11-07  Tom Tromey  <tom@tromey.com>
686
687         * solib.h (no_shared_libraries): Constify.
688         * frame.h (return_command): Constify.
689         * cli/cli-cmds.h (quit_command): Constify.
690         * top.h (quit_command, execute_command): Constify.
691         * target.h (flash_erase_command): Constify.
692         * inferior.h (set_inferior_args, attach_command): Constify.
693         * tracepoint.h (start_tracing, stop_tracing): Constify.
694         * breakpoint.h (break_command, tbreak_command)
695         (hbreak_command_wrapper, thbreak_command_wrapper)
696         (rbreak_command_wrapper, watch_command_wrapper)
697         (awatch_command_wrapper, rwatch_command_wrapper)
698         (get_tracepoint_by_number): Constify.
699         * symtab.c (info_variables_command, rbreak_command)
700         (symtab_symbol_info): Constify.
701         (info_variables_command): Add non-const overload.
702         * top.c (dont_repeat_command): Constify.
703         * breakpoint.c (ignore_command, commands_command)
704         (condition_command, tbreak_command, hbreak_command)
705         (thbreak_command, clear_command, break_command)
706         (info_breakpoints_command, watch_command, rwatch_command)
707         (awatch_command, trace_command, ftrace_command, strace_command)
708         (trace_pass_command, break_range_command, dprintf_command)
709         (agent_printf_command, get_tracepoint_by_number)
710         (watch_maybe_just_location, trace_pass_command): Constify.
711         (info_breakpoints_command): Add non-const overload.
712         * tracefile.c (tsave_command): Constify.
713         * infcmd.c (attach_command, disconnect_command, signal_command)
714         (queue_signal_command, stepi_command, nexti_command)
715         (finish_command, next_command, step_command, until_command)
716         (advance_command, jump_command, continue_command, run_command)
717         (start_command, starti_command, interrupt_command)
718         (run_command_1, set_inferior_args, step_1): Constify.
719         * inferior.c (add_inferior_command, remove_inferior_command)
720         (clone_inferior_command): Constify.
721         * linux-fork.c (checkpoint_command, restart_command): Constify.
722         * windows-nat.c (signal_event_command): Constify.
723         * guile/guile.c (guile_repl_command, guile_command): Constify.
724         * printcmd.c (x_command, display_command, printf_command)
725         (output_command, set_command, call_command, print_command)
726         (eval_command): Constify.
727         (non_const_set_command): Remove.
728         (_initialize_printcmd): Update.
729         * source.c (forward_search_command, reverse_search_command):
730         Constify.
731         * jit.c (jit_reader_load_command, jit_reader_unload_command):
732         Constify.
733         * infrun.c (handle_command): Constify.
734         * memattr.c (mem_command): Constify.
735         * stack.c (return_command, up_command, up_silently_command)
736         (down_command, down_silently_command, frame_command)
737         (backtrace_command, func_command, backtrace_command_1): Constify.
738         (backtrace_command): Add non-const overload.
739         * remote-sim.c (simulator_command): Constify.
740         * exec.c (set_section_command): Constify.
741         * tracepoint.c (tdump_command, trace_variable_command)
742         (tstatus_command, tstop_command, tstart_command)
743         (end_actions_pseudocommand, while_stepping_pseudocommand)
744         (collect_pseudocommand, teval_pseudocommand, actions_command)
745         (start_tracing, stop_tracing): Constify.
746         * value.c (init_if_undefined_command): Constify.
747         * tui/tui-stack.c (tui_update_command): Constify.
748         * tui/tui-win.c (tui_refresh_all_command)
749         (tui_set_tab_width_command, tui_set_win_height_command)
750         (tui_set_focus_command, tui_scroll_forward_command)
751         (tui_scroll_backward_command, tui_scroll_left_command)
752         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
753         (tui_set_win_height): Constify.
754         * tui/tui-layout.c (tui_layout_command): Constify.
755         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
756         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
757         (proc_untrace_sysexit_cmd): Constify.
758         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
759         (threadset_test_cmd, threadlist_update_test_cmd)
760         (threadalive_test): Constify.
761         * objc-lang.c (print_object_command): Constify.
762         * command.h (add_com): Constify.
763         * cli/cli-dump.c (restore_command): Constify.
764         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
765         (help_command, complete_command, shell_command, edit_command)
766         (list_command, disassemble_command, make_command)
767         (apropos_command, alias_command): Constify.
768         * cli/cli-script.c (document_command, define_command)
769         (while_command, if_command, validate_comname): Constify.
770         * cli/cli-decode.c (struct cmd_list_element): Change type of
771         "fun".
772         * target.c (do_monitor_command, flash_erase_command): Constify.
773         * regcache.c (reg_flush_command): Constify.
774         * reverse.c (reverse_step, reverse_next, reverse_stepi)
775         (reverse_nexti, reverse_continue, reverse_finish)
776         (save_bookmark_command, goto_bookmark_command)
777         (exec_reverse_once): Constify.
778         * python/python.c (python_interactive_command, python_command):
779         Constify.
780         * typeprint.c (ptype_command, whatis_command, whatis_exp):
781         Constify.
782         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
783         * gcore.c (gcore_command): Constify.
784
785 2017-11-07  Tom Tromey  <tom@tromey.com>
786
787         * printcmd.c (x_command): Call set_repeat_arguments.
788         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
789         * top.c (repeat_arguments): New global.
790         (set_repeat_arguments): New function.
791         (execute_command): Handle repeat_arguments.
792         (show_commands): Calls set_repeat_arguments.
793         * command.h (set_repeat_arguments): Declare.
794
795 2017-11-07  Tom Tromey  <tom@tromey.com>
796
797         * stack.c (backtrace_command): Use std::string.
798         (backtrace_command_1): Make "count_exp" const.
799
800 2017-11-07  Tom Tromey  <tom@tromey.com>
801
802         * source.c (directory_switch, mod_path, add_path): Constify.
803         * defs.h (add_path, mod_path, directory_switch): Constify.
804         * mi/mi-cmd-env.c (env_mod_path): Constify.
805
806 2017-11-07  Tom Tromey  <tom@tromey.com>
807
808         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
809         (run_command_1, continue_command, step_1, jump_command)
810         (signal_command, until_command, advance_command, finish_command)
811         (attach_command): Update.
812
813 2017-11-07  Tom Tromey  <tom@tromey.com>
814
815         * command.h (set_cmd_cfunc): Don't declare.
816         * cli/cli-decode.c (set_cmd_cfunc): Now static.
817
818 2017-11-07  Tom Tromey  <tom@tromey.com>
819
820         * stack.c (select_frame_command): Constify.
821         * cli/cli-decode.c (add_com_suppress_notification): Constify.
822         * command.h (add_com_suppress_notification): Constify.
823
824 2017-11-07  Tom Tromey  <tom@tromey.com>
825
826         * breakpoint.c (stop_command): Constify.
827         * cli/cli-decode.c (struct cmd_list_element): Constify.
828         * command.h (add_abbrev_prefix_cmd): Constify.
829
830 2017-11-07  Pedro Alves  <palves@redhat.com>
831
832         * breakpoint.c (extract_bp_kind): New enum.
833         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
834         factored out from ...
835         (extract_bp_number_and_location): ... here.
836         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
837
838 2017-11-07  Pedro Alves  <palves@redhat.com>
839
840         * breakpoint.c (extract_bp_number_and_location): Change return
841         type to void.  Throw error instead of warning.
842         (enable_disable_command): Adjust.
843
844 2017-11-07  Xavier Roirand  <roirand@adacore.com>
845             Pedro Alves  <palves@redhat.com>
846
847         * breakpoint.c (map_breakpoint_number_range): New, factored out
848         from ...
849         (map_breakpoint_numbers): ... here.
850         (find_location_by_number): Change parameters from string to
851         breakpoint number and location.
852         (extract_bp_number_and_location): New function.
853         (enable_disable_bp_num_loc)
854         (enable_disable_breakpoint_location_range)
855         (enable_disable_command): New functions, factored out ...
856         (enable_command, disable_command): ... these functions, and
857         adjusted to support ranges.
858         * NEWS: Document enable/disable breakpoint location range feature.
859
860 2017-11-06  Luis Machado  <luis.machado@linaro.org>
861
862         * MAINTAINERS (Write After Approval): Update my e-mail address.
863
864 2017-11-06  Pedro Alves  <palves@redhat.com>
865
866         * gnu-nat.c (gnu_terminal_init): Delete.
867         (gnu_target): Don't install gnu_terminal_init.
868         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
869         (child_terminal_init): ... this function.
870
871 2017-11-06  Pedro Alves  <palves@redhat.com>
872
873         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
874         sgtty.h.
875         * config.in, configure: Regenerate.
876
877 2017-11-06  Pedro Alves  <palves@redhat.com>
878
879         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
880         (async_init_signals): Adjust.
881         (handle_stop_sig): Rename to ...
882         (handle_sigtstp): ... this.
883         (async_stop_sig): Rename to ...
884         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
885         SIGTSTP path.
886         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
887         instead of STOP_SIGNAL thoughout.
888         (handle_stop_sig): Rename to ...
889         (handle_sigtstp): ... this.
890         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
891
892 2017-11-06  Pedro Alves  <palves@redhat.com>
893
894         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
895         longer set flags twice in row.
896
897 2017-11-06  Pedro Alves  <palves@redhat.com>
898
899         * Makefile.in (SER_HARDWIRE): Update comment.
900         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
901         * common/gdb_termios.h: Delete file.
902         * common/job-control.c: Include termios.h and unistd.h instead of
903         gdb_termios.h.
904         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
905         check.
906         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
907         Remove sgtty code.
908         * configure.ac: No longer check for termio.h and sgtty.h.
909         * configure: Regenerate.
910         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
911         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
912         Replace PROCESS_GROUP_TYPE references with pid_t references
913         throughout.
914         (gdb_getpgrp): Delete.
915         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
916         (child_terminal_inferior): Remove comment.  Remove sgtty code.
917         (child_terminal_ours_1): Use tcgetpgrp directly instead of
918         gdb_getpgrp.  Use serial_set_tty_state instead aof
919         serial_noflush_set_tty_state.  Remove sgtty code.
920         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
921         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
922         (inferior_process_group): Now returns pid_t.
923         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
924         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
925         * ser-event.c (serial_event_ops): Update.
926         * ser-go32.c (dos_noflush_set_tty_state): Delete.
927         (dos_ops): Update.
928         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
929         * ser-pipe.c (pipe_ops): Update.
930         * ser-tcp.c (tcp_ops): Update.
931         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
932         HAVE_TERMIOS checks.
933         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
934         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
935         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
936         assume termios.
937         (hardwire_noflush_set_tty_state): Delete.
938         (hardwire_print_tty_state, hardwire_drain_output)
939         (hardwire_flush_output, hardwire_flush_input)
940         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
941         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
942         code, and assume termios.
943         (hardwire_ops): Update.
944         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
945         * serial.c (serial_noflush_set_tty_state): Delete.
946         * serial.h (serial_noflush_set_tty_state): Delete.
947         (serial_ops::noflush_set_tty_state): Delete.
948
949 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
950
951         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
952         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
953         (COMMON_OBS): Remove doublest.o and dfp.o.
954         Do not build target-float.c (instead of doublest.c)
955         with -Wformat-nonliteral.
956
957         * doublest.c: Remove file.
958         * doublest.h: Remove file.
959         * dfp.c: Remove file.
960         * dfp.h: Remove file.
961
962         * target-float.c: Do not include "doublest.h" and "dfp.h".
963         (DOUBLEST): Move here from doublest.h.
964         (enum float_kind): Likewise.
965         (FLOATFORMAT_CHAR_BIT): Likewise.
966         (FLOATFORMAT_LARGEST_BYTES): Likewise.
967         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
968         (floatformat_precision): Likewise.
969         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
970         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
971         Likewise.
972         (host_float_format, host_double_format, host_long_double_format):
973         Likewise.
974         (floatformat_to_string, floatformat_from_string): Likewise.
975         (floatformat_to_doublest): Likewise.  Also, inline the original
976         convert_floatformat_to_doublest.
977         (floatformat_from_doublest): Likewise.  Also, inline the original
978         convert_floatformat_from_doublest.
979
980         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
981         (MAX_DECIMAL_STRING): Move here from dfp.c.
982         (match_endianness): Likewise.
983         (set_decnumber_context, decimal_check_errors): Likewise.
984         (decimal_from_number, decimal_to_number): Likewise.
985         (decimal_to_string, decimal_from_string): Likewise.  Make static.
986         (decimal_from_longest, decimal_from_ulongest): Likewise.
987         (decimal_to_longest): Likewise.
988         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
989         (decimal_convert): Likewise.
990
991 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
992
993         * doublest.c: Do not include "gdbtypes.h".
994         (extract_typed_floating): Remove.
995         (store_typed_floating): Remove.
996         (convert_typed_floating): Remove.
997         * doublest.h (struct type): Remove.
998         (DOUBLEST_PRINT_FORMAT): Remove.
999         (DOUBLEST_SCAN_FORMAT): Remove.
1000         (extract_typed_floating): Remove.
1001         (store_typed_floating): Remove.
1002         (convert_typed_floating): Remove.
1003
1004         * dfp.c (decimal_from_doublest): Remove.
1005         (decimal_to_doublest): Remove.
1006         * dfp.h: Do not include "doublest.h".
1007         (decimal_from_doublest): Remove.
1008         (decimal_to_doublest): Remove.
1009
1010         * value.c: Do not include "doublest.h" and "dfp.h".
1011         (value_as_double): Remove.
1012         (unpack_double): Remove.
1013         (value_from_double): Remove.
1014         (value_from_decfloat): Remove.
1015         * value.h: Do not include "doublest.h".
1016         (value_as_double): Remove.
1017         (unpack_double): Remove.
1018         (value_from_double): Remove.
1019         (value_from_decfloat): Remove.
1020
1021 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1022
1023         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1024         (i386_extract_return_value): Use target_float_convert.
1025         (i386_store_return_value): Likewise.
1026         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1027         (i387_value_to_register): Likewise.
1028         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1029         (ia64_register_to_value): Use target_float_convert.
1030         (ia64_value_to_register): Likewise.
1031         (ia64_extract_return_value): Likewise.
1032         (ia64_store_return_value): Likewise.
1033         (ia64_push_dummy_call): Likewise.
1034         * m68k-tdep.c: Include "target-float.h".
1035         (m68k_register_to_value): Use target_float_convert.
1036         (m68k_value_to_register): Likewise.
1037         (m68k_svr4_extract_return_value): Likewise.
1038         (m68k_svr4_store_return_value): Likewise.
1039         * ppc-sysv-tdep.c: Include "target-float.h".
1040         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1041         (do_ppc_sysv_return_value): Likewise.
1042         (ppc64_sysv_abi_push_freg): Likewise.
1043         (ppc64_sysv_abi_return_value_base): Likewise.
1044         * rs6000-aix-tdep.c: Include "target-float.h".
1045         (rs6000_push_dummy_call): Use target_float_convert.
1046         (rs6000_return_value): Likewise.
1047         * rs6000-lynx178-tdep.c: Include "target-float.h".
1048         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1049         (rs6000_lynx178_return_value): Likewise.
1050         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1051         (rs6000_register_to_value): Use target_float_convert.
1052         (rs6000_value_to_register): Likewise.
1053         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1054         (arm_extract_return_value): Use target_float_convert.
1055         (arm_store_return_value): Likewise.
1056         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1057         (sh_register_convert_to_virtual): Use target_float_convert.
1058         (sh_register_convert_to_raw): Likewise.
1059         * sh64-tdep.c: Include "target-float.h".
1060         (sh64_extract_return_value): Use target_float_convert.
1061         (sh64_register_convert_to_virtual): Likewise.
1062         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
1063
1064 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1065
1066         * target-float.c (floatformat_to_host_double): New function.
1067         (floatformat_from_host_double): Likewise.
1068         (target_float_to_host_double): Likewise.
1069         (target_float_from_host_double): Likewise.
1070         * target-float.h (target_float_to_host_double): Add prototype.
1071         (target_float_from_host_double): Likewise.
1072
1073         * guile/scm-value.c: Include "target-float.h".
1074         (gdbscm_value_to_real): Use target_float_to_host_double.
1075         Handle integer source values via value_as_long.
1076         * guile/scm-math.c: Include "target-float.h".  Do not include
1077         "doublest.h", "dfp.h", and "expression.h".
1078         (vlscm_convert_typed_number): Use target_float_from_host_double.
1079         (vlscm_convert_number): Likewise.
1080
1081         * python/py-value.c (valpy_float): Use target_float_to_host_double.
1082         (convert_value_from_python): Use target_float_from_host_double.
1083
1084 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1085
1086         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1087         (cast_from_fixed): Likewise.
1088         (ada_scaling_type): New function.
1089         (ada_delta): Return value instead of DOUBLEST.  Perform target
1090         arithmetic instead of host arithmetic.
1091         (scaling_factor): Rename to ...
1092         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
1093         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
1094         (ada_fixed_to_float): Remove.
1095         (ada_float_to_fixed): Remove.
1096         * ada-lang.h (ada_fixed_to_float): Remove.
1097         (ada_float_to_fixed): Remove.
1098         (ada_delta): Return value instead of DOUBLEST.
1099         (ada_scaling_factor): Add prototype.
1100
1101         * ada-typeprint.c: Include "target-float.h".
1102         (print_fixed_point_type): Perform target arithmetic instead of
1103         host arithmetic.
1104         * ada-valprint.c: Include "target-float.h".
1105         (ada_val_print_num): Perform target arithmetic instead of
1106         host arithmetic for fixed-point types.
1107
1108 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1109
1110         * target-float.c: Include <math.h>.
1111         (floatformat_binop): New function.
1112         (floatformat_compare): Likewise.
1113         (target_float_binop): Likewise.
1114         (target_float_compare): Likewise.
1115         * target-float.h: Include "expression.h".
1116         (target_float_binop): Add prototype.
1117         (target_float_compare): Likewise.
1118
1119         * valarith.c: Do not include "doublest.h" and "dfp.h".
1120         Include "common/byte-vector.h".
1121         (value_args_as_decimal): Remove, replace by ...
1122         (value_args_as_target_float): ... this function.  Handle both
1123         binary and decimal target floating-point formats.
1124         (scalar_binop): Handle both binary and decimal FP using
1125         value_args_as_target_float and target_float_binop.
1126         (value_equal): Handle both binary and decimal FP using
1127         value_args_as_target_float and target_float_compare.
1128         (value_less): Likewise.
1129         (value_pos): Handle all scalar types as simple copy.
1130         (value_neg): Handle all scalar types via BINOP_SUB from 0.
1131         * dfp.c (decimal_binop): Throw error instead of internal_error
1132         when called with an unsupported operation code.
1133
1134 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1135
1136         * target-float.c (target_float_to_string): New function.
1137         (target_float_from_string): New function.
1138         * target-float.h (target_float_to_string): Add prototype.
1139         (target_float_from_string): Add prototype.
1140
1141         * valprint.c: Include "target-float.h".  Do not include
1142         "doublest.h" and "dfp.h".
1143         (print_floating): Use target_float_to_string.
1144         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
1145         (printf_floating): Use target_float_to_string.
1146         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1147         (print_i387_value): Use target_float_to_string.
1148         * mips-tdep.c: Include "target-float.h".
1149         (mips_print_fp_register): Use target_float_to_string.
1150         * sh64-tdep.c: Include "target-float.h".
1151         (sh64_do_fp_register): Use target_float_to_string.
1152
1153         * parse.c: Include "target-float.h".  Do not include
1154         "doublest.h" and "dfp.h".
1155         (parse_float): Use target_float_from_string.
1156         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
1157         (define_symbol): Use target_float_from_string.
1158         * gdbarch-selftests.c: Include "target-float.h".
1159         (register_to_value_test): Use target_float_from_string.
1160
1161 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1162
1163         * Makefile.c (SFILES): Add target-float.c.
1164         (HFILES_NO_SRCDIR): Add target-float.h.
1165         (COMMON_OBS): Add target-float.o.
1166         * target-float.h: New file.
1167         * target-float.c: New file.
1168
1169         * doublest.c (floatformat_classify): Fix detection of float_zero.
1170
1171         * gdbtypes.c (is_floating_type): New function.
1172         * gdbtypes.h (is_floating_type): Add prototype.
1173
1174         * value.c: Do not include "floatformat.h".
1175         (unpack_double): Use target_float_is_valid.
1176         (is_floating_value): New function.
1177         * value.h (is_floating_value): Add prototype-
1178
1179         * valarith.c: Include "target-float.h".
1180         (value_logical_not): Use target_float_is_zero.
1181
1182         * python/py-value.c: Include "target-float.h".
1183         (valpy_nonzero): Use target_float_is_zero.
1184
1185 2017-11-04  Tom Tromey  <tom@tromey.com>
1186
1187         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1188
1189 2017-11-04  Tom Tromey  <tom@tromey.com>
1190
1191         * breakpoint.c (set_momentary_breakpoint): Return
1192         breakpoint_up.
1193         (until_break_command): Update.
1194         (new_until_break_fsm): Change argument types to
1195         breakpoint_up.
1196         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1197         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1198         Remove.
1199         * infcmd.c (finish_forward): Update.
1200         * breakpoint.h (set_momentary_breakpoint)
1201         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1202         (make_cleanup_delete_breakpoint): Remove.
1203         (struct breakpoint_deleter): New.
1204         (breakpoint_up): New typedef.
1205         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1206         (insert_exception_resume_breakpoint): Update.
1207         (insert_exception_resume_from_probe): Update.
1208         (insert_longjmp_resume_breakpoint): Update.
1209         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1210         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1211         * infcall.c (call_function_by_hand_dummy): Update
1212
1213 2017-11-04  Tom Tromey  <tom@tromey.com>
1214
1215         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1216
1217 2017-11-04  Tom Tromey  <tom@tromey.com>
1218
1219         * linux-tdep.c (linux_core_info_proc_mappings): Use
1220         gdb::def_vector.
1221         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
1222         "size" argument.
1223         (linux_corefile_thread): Update.
1224         (linux_make_corefile_notes): Remove unused variable.
1225
1226 2017-11-04  Tom Tromey  <tom@tromey.com>
1227
1228         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1229         gdb::byte_vector.
1230
1231 2017-11-04  Tom Tromey  <tom@tromey.com>
1232
1233         * objfiles.c (do_free_objfile_cleanup): Remove.
1234         * compile/compile-object-load.c (compile_object_load): Update.
1235         * objfiles.h (make_cleanup_free_objfile): Remove.
1236
1237 2017-11-04  Tom Tromey  <tom@tromey.com>
1238
1239         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1240         (adi_read_versions): Change "tags" to "gdb_byte *".
1241         (adi_print_versions): Likewise.
1242
1243 2017-11-04  Tom Tromey  <tom@tromey.com>
1244
1245         * breakpoint.c
1246         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1247         from start_rbreak_breakpoints.
1248         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1249         * breakpoint.h (class scoped_rbreak_breakpoints): New.
1250         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1251         * symtab.c (do_end_rbreak_breakpoints): Remove.
1252         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1253
1254 2017-11-04  Tom Tromey  <tom@tromey.com>
1255
1256         * cp-namespace.c (reset_directive_searched): Remove.
1257         (cp_lookup_symbol_via_imports): Use scoped_restore.
1258         * cp-support.c (reset_directive_searched): Remove.
1259         (make_symbol_overload_list_using): Use scoped_restore.
1260         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1261         (reset_directive_searched): Remove.
1262
1263 2017-11-04  Tom Tromey  <tom@tromey.com>
1264
1265         * symfile.c (find_separate_debug_file_by_debuglink): Use
1266         unique_xmalloc_ptr.
1267
1268 2017-11-04  Tom Tromey  <tom@tromey.com>
1269
1270         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1271         type of "info".
1272         (compute_stack_depth): Likewise.
1273         (do_compile_dwarf_expr_to_c): Use std::vector.
1274
1275 2017-11-04  Tom Tromey  <tom@tromey.com>
1276
1277         * compile/compile-object-load.c (link_callbacks_einfo): Use
1278         std::string.
1279
1280 2017-11-04  Tom Tromey  <tom@tromey.com>
1281
1282         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1283         Use scoped_free_pendings.
1284         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1285         scoped_free_pendings.
1286         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1287         (xcoff_initial_scan): Likewise.
1288         * buildsym.c (reset_symtab_globals): Update comment.
1289         (scoped_free_pendings): Rename from really_free_pendings.
1290         (prepare_for_building): Update comment.
1291         (buildsym_init): Likewise.
1292         * buildsym.h (class scoped_free_pendings): New class.
1293         (really_free_pendings): Don't declare.
1294
1295 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
1296
1297         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1298         output when converting a zero value to a special byteorder format.
1299
1300 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1301
1302         * frame.c (do_frame_register_read): Remove aspace.
1303         * jit.c (jit_frame_sniffer): Likwise.
1304         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1305         * regcache.c (regcache::regcache): Pass nullptr.
1306         (regcache_print): Caller updated.
1307         * regcache.h (regcache::regcache): Remove one constructor
1308         parameter aspace.
1309
1310 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1311
1312         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1313
1314 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1315
1316         * breakpoint.c (insert_single_step_breakpoints): Update.
1317         * frame.c (struct frame_info) <aspace>: Add const.
1318         (frame_save_as_regcache): Add const.
1319         (get_frame_address_space): Return const address_space *.
1320         * frame.h (get_frame_address_space): Update declaration.
1321         * infrun.c (struct step_over_info) <aspace>: Add const.
1322         (set_step_over_info): Make aspace const.
1323         (displaced_step_prepare_throw): Change variable const.
1324         (resume): Likewise.
1325         (proceed): Likewise.
1326         (adjust_pc_after_break): Likewise.
1327         (save_waitstatus): Likewise.
1328         (handle_signal_stop): Likewise.
1329         (keep_going_pass_signal): Likewise.
1330         * jit.c (jit_frame_sniffer): Add const.
1331         * mips-tdep.c (mips_single_step_through_delay): Likewise.
1332         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1333         * record-full.c (record_full_wait_1): Likewise.
1334         * regcache.c (regcache::regcache): Change parameter to const.
1335         * regcache.h (regcache::regcache): Likewise.
1336         (regcache::aspace): Return const address_space *.
1337         (regcache) <m_aspace>: Add const.
1338
1339 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1340
1341         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1342         * frame.c (create_sentinel_frame): Likewise.
1343         * infrun.c (displaced_step_prepare_throw): Likewise.
1344         (resume): Likewise.
1345         (thread_still_needs_step_over_bp): Likewise.
1346         (proceed): Likewise.
1347         (do_target_wait): Likewise.
1348         (adjust_pc_after_break): Likewise.
1349         (handle_syscall_event): Likewise.
1350         (save_waitstatus): Likewise.
1351         (handle_inferior_event_1): Likewise.
1352         (handle_signal_stop): Likewise.
1353         (keep_going_pass_signal): Likewise.
1354         * linux-nat.c (status_callback): Likewise.
1355         (save_stop_reason): Likewise.
1356         (resume_stopped_resumed_lwps): Likewise.
1357         * record-full.c (record_full_exec_insn): Likewise.
1358         (record_full_wait_1): Likewise.
1359         * regcache.c (get_regcache_aspace): Remove.
1360         * regcache.h (get_regcache_aspace): Remove.
1361
1362 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1363
1364         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1365         (init_regcache_descr): Use gdbarch_num_regs.
1366         (regcache::regcache): Likewise.
1367         (regcache::get_register_status): Likewise.
1368         (regcache::assert_raw_regnum): Likewise.
1369         (regcache::cooked_read): Likewise.
1370         (regcache::cooked_read_value): Likewise.
1371         (regcache::cooked_write): Likewise.
1372         (regcache::dump): Likewise.
1373         (regcache::num_raw_registers): New method.
1374         * regcache.h (class regcache) <num_raw_registers>: New.
1375
1376 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1377
1378         * regcache.c (regcache::assert_regnum): New method.
1379         (regcache::invalidate): Call assert_regnum.
1380         (regcache::raw_update): Likewise.
1381         (regcache::raw_write): Likewise.
1382         (regcache::raw_read_part): Likewise.
1383         (regcache::raw_write_part): Likewise.
1384         (regcache::raw_supply): Likewise.
1385         (regcache::raw_supply_integer): Likewise.
1386         (regcache::raw_supply_zeroed): Likewise.
1387         (regcache::raw_collect): Likewise.
1388         (regcache::raw_collect_integer): Likewise.
1389         * regcache.h (regcache::assert_regnum): Declare.
1390
1391 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1392
1393         * regcache.c (regcache::dump): Remove code.
1394
1395 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1396
1397         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1398         Remove.
1399         <sizeof_cooked_register_status>: Remove.
1400         (init_regcache_descr): Update.
1401         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1402         (regcache::save): Likewise.
1403         (regcache::dump): Likewise.
1404
1405 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
1406
1407         * ft32-tdep.c (ft32_fetch_instruction): New function.
1408         (ft32_analyze_prologue): Use ft32_fetch_instruction().
1409
1410 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
1411
1412         * cli/cli-script.c (execute_control_command): Rename to ...
1413         (execute_control_command_1): ... this.
1414         (execute_control_command): New function.
1415
1416 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
1417
1418         * tracepoint.c (tfind_command): Remove const_cast.
1419
1420 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
1421
1422         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1423
1424 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
1425
1426         * common/common-utils.h (in_inclusive_range): New function.
1427         * arm-tdep.c (arm_record_extension_space): Use
1428         in_inclusive_range.
1429         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1430         * cris-tdep.c (cris_spec_reg_applicable): Use
1431         in_inclusive_range.
1432
1433 2017-10-30  Pedro Alves  <palves@redhat.com>
1434             Simon Marchi <simon.marchi@ericsson.com>
1435
1436         * remote.c (remote_set_syscall_catchpoint): Build a std::string
1437         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1438
1439 2017-10-30  Pedro Alves  <palves@redhat.com>
1440
1441         * common/common-utils.c (string_appendf, string_vappendf): New
1442         functions.
1443         * common/common-utils.h (string_appendf, string_vappendf): New
1444         declarations.
1445         * unittests/common-utils-selftests.c (string_appendf_func)
1446         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1447         (string_vappendf_tests): New functions.
1448         (_initialize_common_utils_selftests): Register "string_appendf" and
1449         "string_vappendf tests".
1450
1451 2017-10-30  Pedro Alves  <palves@redhat.com>
1452
1453         * unittests/common-utils-selftests.c (format_func): New typedef.
1454         (string_printf_tests, string_vprintf_tests): Tests factored out
1455         and merged to ...
1456         (test_format_func): ... this new function.
1457         (string_printf_tests, string_vprintf_tests): Reimplement on top of
1458         test_format_func.
1459
1460 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1461
1462         * darwin-nat.c: Remove include of gdb.h.
1463
1464 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1465
1466         * xtensa-xtregs.c: Fix formatting issues.
1467
1468 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1469
1470         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1471
1472 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
1473
1474         PR python/21213
1475         * python/py-infthread.c (thpy_get_inferior): Increment reference
1476         of inferior before returning it.
1477
1478 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1479
1480         * unittests/common-utils-selftests.c (format): Add
1481         ATTRIBUTE_PRINTF.
1482
1483 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1484
1485         * xml-syscall.c (struct syscall_desc): Add constructor.
1486         <name>: Change type to std::string.
1487         (syscall_desc_up): New typedef.
1488         (syscall_desc_p): Remove typeder.
1489         (DEF_VEC_P(syscall_desc_p)): Remove.
1490         (struct syscall_group_desc): Add constructor.
1491         <name>: Change type to std::string.
1492         <syscalls>: Change type to std::vector.
1493         (syscall_group_desc_up): New typedef.
1494         (syscall_group_desc_p): Remove typedef.
1495         (DEF_VEC_P(syscall_group_desc_p)): Remove.
1496         (struct syscalls_info) <syscalls>: Change type to std::vector of
1497         unique_ptr.
1498         <groups>: Likewise.
1499         <my_gdb_datadir>: Change type to std::string.
1500         (syscalls_info_up): New typedef.
1501         (allocate_syscalls_info): Remove.
1502         (syscalls_info_free_syscalls_desc): Remove.
1503         (syscalls_info_free_syscall_group_desc): Remove.
1504         (free_syscalls_info): Remove.
1505         (make_cleanup_free_syscalls_info): Remove.
1506         (syscall_group_create_syscall_group_desc): Adjust.
1507         (syscall_group_add_syscall): Adjust.
1508         (syscall_create_syscall_desc): Adjust.
1509         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1510         (init_syscalls_info): Adjust.
1511         (syscall_group_get_group_by_name): Adjust.
1512         (xml_get_syscall_number): Adjust.
1513         (xml_get_syscall_name): Adjust.
1514         (xml_list_of_syscalls): Adjust.
1515         (xml_list_syscalls_by_group): Adjust.
1516         (xml_list_of_groups): Adjust.
1517
1518 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1519
1520         * probe.h: Don't include gdb_vecs.h.
1521         (DEF_VEC_P (probe_p)): Remove.
1522         (find_probes_in_objfile): Return an std::vector.
1523         * probe.c (find_probes_in_objfile): Likewise.
1524         * breakpoint.c (breakpoint_objfile_data)
1525         <longjmp_probes>: Change type to std::vector.
1526         <exception_probes>: Likewise.
1527         (free_breakpoint_probes): Don't manually free vectors.
1528         (create_longjmp_master_breakpoint): Adjust.
1529         (create_exception_master_breakpoint): Adjust.
1530         * solib-svr4.c (svr4_create_probe_breakpoints): Change
1531         parameter type, adjust.
1532         (svr4_create_solib_event_breakpoints): Adjust.
1533
1534 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1535
1536         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1537         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1538         with new.
1539         (free_breakpoint_probes): Rename to ...
1540         (free_breakpoint_objfile_data): ... this, and call delete on
1541         bp_objfile_data..
1542
1543 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1544
1545         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1546         (loaded_script_ptr): Remove typedef.
1547         (DEF_VEC_P (loaded_script_ptr)): Remove.
1548         (struct collect_matching_scripts_data): Add constructor.
1549         <scripts_p>: Change type to (pointer to) std::vector.
1550         (collect_matching_scripts_data): Adjust.
1551         (sort_scripts_by_name): Make suitable for std::sort.
1552         (print_scripts): Don't sort vector, adjust to std::vector.
1553         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1554
1555 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1556
1557         * symfile.c (filename_language): Make struct, not typedef.  Add
1558         constructor.
1559         <ext>: Change type to std::string.
1560         (DEF_VEC_O (filename_language)): Remove.
1561         (filename_language_table): Change type to std::vector.
1562         (add_filename_language): Adjust.
1563         (set_ext_lang_command): Adjust.
1564         (info_ext_lang_command): Adjust.
1565         (deduce_language_from_filename): Adjust.
1566         (class scoped_restore_filename_language_table): Remove.
1567         (test_filename_language): Use scoped_restore.
1568         (test_set_ext_lang_command): Use scoped_restore, adjust to
1569         std::vector change.
1570
1571 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1572
1573         * symfile.c: Include selftest.h.
1574         (class scoped_restore_filename_language_table): New.
1575         (test_filename_language): New test.
1576         (test_set_ext_lang_command): New test.
1577         (_initialize_symfile): Register tests.
1578
1579 2017-10-27  Keith Seitz  <keiths@redhat.com>
1580
1581         * breakpoint.c (print_breakpoint_location): Use the symbol saved
1582         in the bp_location, falling back to find_pc_sect_function when
1583         needed.
1584         (add_location_to_breakpoint): Save sal->symbol.
1585         * breakpoint.h (struct bp_location) <symbol>: New field.
1586         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1587         * symtab.h (struct symtab_and_line) <symbol>: New field.
1588
1589 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
1590
1591         PR gdb/13669
1592         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1593         to rewind obstack.
1594
1595 2017-10-26  Pedro Alves  <palves@redhat.com>
1596
1597         * remote.c (remote_async_terminal_ours_p): Delete.
1598         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1599         Remove references to 'remote_async_terminal_ours_p'.
1600
1601 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1602
1603         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1604
1605 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1606
1607         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1608         aspace const.
1609         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1610         Likewise.
1611         * breakpoint.c (bpstat_check_location): Remove cast.
1612         (breakpoint_hit_catch_fork): Make aspce const.
1613         (breakpoint_hit_catch_solib): Likewise.
1614         (breakpoint_hit_catch_exec): Likewise.
1615         (breakpoint_hit_ranged_breakpoint): Likewise.
1616         (breakpoint_hit_watchpoint): Likewise.
1617         (base_breakpoint_breakpoint_hit): Likewise.
1618         (bkpt_breakpoint_hit): Likewise.
1619         (dprintf_breakpoint_hit): Likewise.
1620         (tracepoint_breakpoint_hit): Likewise.
1621         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1622
1623 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1624
1625         * breakpoint.c (breakpoint_location_address_match): Change
1626         "struct address_space *" to "const address_space".
1627         (breakpoint_location_address_range_overlap): Likewise.
1628         (breakpoint_here_p): Likewise.
1629         (breakpoint_in_range_p): Likewise.
1630         (moribund_breakpoint_here_p): Likewise.
1631         (bp_location_inserted_here_p): Likewise.
1632         (software_breakpoint_inserted_here_p): Likewise.
1633         (hardware_breakpoint_inserted_here_p): Likewise.
1634         (hardware_watchpoint_inserted_in_range): Likewise.
1635         (bpstat_check_location): Likewise.
1636         (bpstat_stop_status): Likewise.
1637         (breakpoint_address_match): Likewise.
1638         (breakpoint_address_match_range): Likewise.
1639         (breakpoint_location_address_match): Likewise.
1640         (breakpoint_location_address_range_overlap): Likewise.
1641         (insert_single_step_breakpoint): Likewise.
1642         (breakpoint_has_location_inserted_here): Likewise.
1643         (single_step_breakpoint_inserted_here_p): Likewise.
1644         (pc_at_non_inline_function): Likewise.
1645         * breakpoint.h (bpstat_stop_status): Update declaration.
1646         (breakpoint_here_p): Likewise.
1647         (breakpoint_in_range_p): Likewise.
1648         (moribund_breakpoint_here_p): Likewise.
1649         (breakpoint_inserted_here_p): Likewise.
1650         (software_breakpoint_inserted_here_p): Likewise.
1651         (hardware_breakpoint_inserted_here_p): Likewise.
1652         (breakpoint_has_location_inserted_here): Likewise.
1653         (single_step_breakpoint_inserted_here_p): Likewise.
1654         (hardware_watchpoint_inserted_in_range): Likewise.
1655         (breakpoint_address_match): Likewise.
1656         (insert_single_step_breakpoint): Likewise.
1657         (pc_at_non_inline_function): Likewise.
1658         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1659         * record.c (record_check_stopped_by_breakpoint): Likewise.
1660         * record.h (record_check_stopped_by_breakpoint): Likewise.
1661         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1662
1663 2017-10-25  Yao Qi  <yao.qi@linaro.org>
1664
1665         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1666         regcache->arch () instead get_regcache_arch.
1667         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1668         Likewise.
1669         (aarch64_fbsd_store_inferior_registers): Likewise.
1670         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1671         (store_gregs_to_thread): Likewise.
1672         (fetch_fpregs_from_thread): Likewise.
1673         (store_fpregs_to_thread): Likewise.
1674         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1675         (aarch64_store_return_value): Likewise.
1676         (aarch64_software_single_step): Likewise.
1677         * aix-thread.c (aix_thread_wait): Likewise.
1678         (supply_reg32): Likewise.
1679         (supply_sprs64): Likewise.
1680         (supply_sprs32): Likewise.
1681         (fill_gprs64): Likewise.
1682         (fill_gprs32): Likewise.
1683         (fill_sprs64): Likewise.
1684         (fill_sprs32): Likewise.
1685         (store_regs_user_thread): Likewise.
1686         (store_regs_kernel_thread): Likewise.
1687         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1688         (alphabsd_store_inferior_registers): Likewise.
1689         * alpha-tdep.c (alpha_extract_return_value): Likewise.
1690         (alpha_store_return_value): Likewise.
1691         (alpha_deal_with_atomic_sequence): Likewise.
1692         (alpha_next_pc): Likewise.
1693         (alpha_software_single_step): Likewise.
1694         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1695         (amd64bsd_store_inferior_registers): Likewise.
1696         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1697         Likewise.
1698         (amd64_linux_store_inferior_registers): Likewise.
1699         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1700         (amd64_collect_native_gregset): Likewise.
1701         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1702         (amd64obsd_collect_uthread): Likewise.
1703         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1704         (amd64_collect_fpregset): Likewise.
1705         (amd64_supply_fxsave): Likewise.
1706         (amd64_supply_xsave): Likewise.
1707         (amd64_collect_fxsave): Likewise.
1708         (amd64_collect_xsave): Likewise.
1709         * arc-tdep.c (arc_write_pc): Likewise.
1710         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1711         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1712         (arm_fbsd_store_inferior_registers): Likewise.
1713         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1714         (store_vfp_regs): Likewise.
1715         (arm_linux_fetch_inferior_registers): Likewise.
1716         (arm_linux_store_inferior_registers): Likewise.
1717         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1718         (arm_linux_sigreturn_next_pc): Likewise.
1719         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1720         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1721         (fetch_register): Likewise.
1722         (store_register): Likewise.
1723         * arm-tdep.c (arm_is_thumb): Likewise.
1724         (displaced_in_arm_mode): Likewise.
1725         (bx_write_pc): Likewise.
1726         (arm_get_next_pcs_addr_bits_remove): Likewise.
1727         (arm_software_single_step): Likewise.
1728         (arm_extract_return_value): Likewise.
1729         (arm_store_return_value): Likewise.
1730         (arm_write_pc): Likewise.
1731         * bfin-tdep.c (bfin_extract_return_value): Likewise.
1732         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
1733         (bsd_uthread_store_registers): Likewise.
1734         * core-regset.c (fetch_core_registers): Likewise.
1735         * corelow.c (get_core_registers): Likewise.
1736         * cris-tdep.c (cris_store_return_value): Likewise.
1737         (cris_extract_return_value): Likewise.
1738         (find_step_target): Likewise.
1739         (find_step_target): Likewise.
1740         (cris_software_single_step): Likewise.
1741         * ctf.c (ctf_fetch_registers): Likewise.
1742         * darwin-nat.c (cancel_breakpoint): Likewise.
1743         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
1744         * frv-tdep.c (frv_extract_return_value): Likewise.
1745         * ft32-tdep.c (ft32_store_return_value): Likewise.
1746         (ft32_extract_return_value): Likewise.
1747         * go32-nat.c (fetch_register): Likewise.
1748         (go32_fetch_registers): Likewise.
1749         (go32_store_registers): Likewise.
1750         (store_register): Likewise.
1751         * h8300-tdep.c (h8300_extract_return_value): Likewise.
1752         (h8300_store_return_value): Likewise.
1753         * hppa-linux-nat.c (fetch_register): Likewise.
1754         (store_register): Likewise.
1755         (hppa_linux_fetch_inferior_registers): Likewise.
1756         (hppa_linux_store_inferior_registers): Likewise.
1757         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
1758         (i386_darwin_store_inferior_registers): Likewise.
1759         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
1760         (gnu_store_registers): Likewise.
1761         * i386-linux-nat.c (fetch_register): Likewise.
1762         (store_register): Likewise.
1763         (supply_gregset): Likewise.
1764         (fill_gregset): Likewise.
1765         (i386_linux_fetch_inferior_registers): Likewise.
1766         (i386_linux_store_inferior_registers): Likewise.
1767         (i386_linux_resume): Likewise.
1768         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
1769         Likewise.
1770         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
1771         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
1772         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
1773         (i386obsd_collect_uthread): Likewise.
1774         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1775         (i386_supply_gregset): Likewise.
1776         (i386_collect_gregset): Likewise.
1777         (i386_supply_fpregset): Likewise.
1778         (i386_collect_fpregset): Likewise.
1779         (i386_mpx_bd_base): Likewise.
1780         * i386-v4-nat.c (supply_fpregset): Likewise.
1781         (fill_fpregset): Likewise.
1782         * i387-tdep.c (i387_supply_fsave): Likewise.
1783         (i387_collect_fsave): Likewise.
1784         (i387_supply_fxsave): Likewise.
1785         (i387_collect_fxsave): Likewise.
1786         (i387_supply_xsave): Likewise.
1787         (i387_collect_xsave): Likewise.
1788         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
1789         (ia64_linux_store_registers): Likewise.
1790         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
1791         (ia64_extract_return_value): Likewise.
1792         (ia64_store_return_value): Likewise.
1793         (find_func_descr): Likewise.
1794         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
1795         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
1796         (inf_ptrace_store_registers): Likewise.
1797         * infrun.c (use_displaced_stepping): Likewise.
1798         (displaced_step_prepare_throw): Likewise.
1799         (resume): Likewise.
1800         (proceed): Likewise.
1801         (do_target_wait): Likewise.
1802         (adjust_pc_after_break): Likewise.
1803         (handle_inferior_event_1): Likewise.
1804         (handle_signal_stop): Likewise.
1805         (save_infcall_suspend_state): Likewise.
1806         (restore_infcall_suspend_state): Likewise.
1807         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
1808         * jit.c (jit_frame_prev_register): Likewise.
1809         * linux-nat.c (save_stop_reason): Likewise.
1810         (linux_nat_wait_1): Likewise.
1811         (resume_stopped_resumed_lwps): Likewise.
1812         * linux-record.c (record_linux_sockaddr): Likewise.
1813         (record_linux_msghdr): Likewise.
1814         (record_linux_system_call): Likewise.
1815         * linux-tdep.c (linux_collect_thread_registers): Likewise.
1816         * lm32-tdep.c (lm32_extract_return_value): Likewise.
1817         (lm32_store_return_value): Likewise.
1818         * m32c-tdep.c (m32c_read_flg): Likewise.
1819         (m32c_pseudo_register_read): Likewise.
1820         (m32c_pseudo_register_write): Likewise.
1821         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
1822         (m32r_linux_collect_gregset): Likewise.
1823         * m32r-tdep.c (m32r_store_return_value): Likewise.
1824         (m32r_extract_return_value): Likewise.
1825         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1826         (m68kbsd_collect_fpregset): Likewise.
1827         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
1828         * m68k-linux-nat.c (fetch_register): Likewise.
1829         (old_fetch_inferior_registers): Likewise.
1830         (old_store_inferior_registers): Likewise.
1831         (store_regs): Likewise.
1832         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
1833         (m68k_svr4_store_return_value): Likewise.
1834         * m88k-tdep.c (m88k_store_arguments): Likewise.
1835         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
1836         (mi_cmd_data_write_register_values): Likewise.
1837         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
1838         (mips_fbsd_store_inferior_registers): Likewise.
1839         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
1840         (mips_fbsd_supply_gregs): Likewise.
1841         (mips_fbsd_collect_fpregs): Likewise.
1842         (mips_fbsd_collect_gregs): Likewise.
1843         (mips_fbsd_supply_fpregset): Likewise.
1844         (mips_fbsd_collect_fpregset): Likewise.
1845         (mips_fbsd_supply_gregset): Likewise.
1846         (mips_fbsd_collect_gregset): Likewise.
1847         * mips-linux-nat.c (supply_gregset): Likewise.
1848         (fill_gregset): Likewise.
1849         (supply_fpregset): Likewise.
1850         (fill_fpregset): Likewise.
1851         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
1852         (mips_fill_gregset): Likewise.
1853         (mips_supply_fpregset): Likewise.
1854         (mips_fill_fpregset): Likewise.
1855         (mips64_supply_gregset): Likewise.
1856         (micromips_linux_sigframe_validate): Likewise.
1857         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
1858         (mipsnbsd_fetch_inferior_registers): Likewise.
1859         (mipsnbsd_store_inferior_registers): Likewise.
1860         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1861         (mipsnbsd_supply_gregset): Likewise.
1862         (mipsnbsd_iterate_over_regset_sections): Likewise.
1863         (mipsnbsd_supply_reg): Likewise.
1864         (mipsnbsd_supply_fpreg): Likewise.
1865         * mips-tdep.c (mips_in_frame_stub): Likewise.
1866         (mips_dummy_id): Likewise.
1867         (is_octeon_bbit_op): Likewise.
1868         (micromips_bc1_pc): Likewise.
1869         (extended_mips16_next_pc): Likewise.
1870         (mips16_next_pc): Likewise.
1871         (deal_with_atomic_sequence): Likewise.
1872         * moxie-tdep.c (moxie_process_readu): Likewise.
1873         * nios2-tdep.c (nios2_get_next_pc): Likewise.
1874         * nto-procfs.c (procfs_store_registers): Likewise.
1875         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
1876         (ppcfbsd_store_inferior_registers): Likewise.
1877         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
1878         (fetch_altivec_register): Likewise.
1879         (get_spe_registers): Likewise.
1880         (fetch_spe_register): Likewise.
1881         (fetch_altivec_registers): Likewise.
1882         (fetch_all_gp_regs): Likewise.
1883         (fetch_all_fp_regs): Likewise.
1884         (store_vsx_register): Likewise.
1885         (store_altivec_register): Likewise.
1886         (set_spe_registers): Likewise.
1887         (store_spe_register): Likewise.
1888         (store_altivec_registers): Likewise.
1889         (store_all_gp_regs): Likewise.
1890         (store_all_fp_regs): Likewise.
1891         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
1892         (ppc_linux_collect_gregset): Likewise.
1893         (ppc_canonicalize_syscall): Likewise.
1894         (ppc_linux_record_signal): Likewise.
1895         (ppu2spu_prev_register): Likewise.
1896         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
1897         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
1898         (ppcobsd_store_registers): Likewise.
1899         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
1900         Likewise.
1901         (ppc_ravenscar_generic_store_registers): Likewise.
1902         * procfs.c (procfs_fetch_registers): Likewise.
1903         (procfs_store_registers): Likewise.
1904         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
1905         (ravenscar_store_registers): Likewise.
1906         (ravenscar_prepare_to_store): Likewise.
1907         * record-btrace.c (record_btrace_fetch_registers): Likewise.
1908         * record-full.c (record_full_wait_1): Likewise.
1909         (record_full_registers_change): Likewise.
1910         (record_full_store_registers): Likewise.
1911         (record_full_core_fetch_registers): Likewise.
1912         (record_full_save): Likewise.
1913         (record_full_goto_insn): Likewise.
1914         * regcache.c (regcache_register_size): Likewise.
1915         (get_regcache_arch): Remove.
1916         (regcache_read_pc): Likewise.
1917         * regcache.h (get_regcache_arch): Remove.
1918         * remote-sim.c (gdbsim_fetch_register): Likewise.
1919         (gdbsim_store_register): Likewise.
1920         * remote.c (fetch_register_using_p): Likewise.
1921         (send_g_packet): Likewise.
1922         (remote_prepare_to_store): Likewise.
1923         (store_registers_using_G): Likewise.
1924         * reverse.c (save_bookmark_command): Likewise.
1925         (goto_bookmark_command): Likewise.
1926         * rs6000-aix-tdep.c (branch_dest): Likewise.
1927         * rs6000-nat.c (rs6000_ptrace64): Likewise.
1928         (fetch_register): Likewise.
1929         * rs6000-tdep.c (ppc_supply_reg): Likewise.
1930         (ppc_collect_reg): Likewise.
1931         (ppc_collect_gregset): Likewise.
1932         (ppc_collect_fpregset): Likewise.
1933         (ppc_collect_vsxregset): Likewise.
1934         (ppc_collect_vrregset): Likewise.
1935         (ppc_displaced_step_hw_singlestep): Likewise.
1936         (rs6000_pseudo_register_read): Likewise.
1937         (rs6000_pseudo_register_write): Likewise.
1938         * s390-linux-nat.c (supply_gregset): Likewise.
1939         (fill_gregset): Likewise.
1940         (s390_linux_fetch_inferior_registers): Likewise.
1941         * s390-linux-tdep.c (s390_write_pc): Likewise.
1942         (s390_software_single_step): Likewise.
1943         (s390_all_but_pc_registers_record): Likewise.
1944         (s390_linux_syscall_record): Likewise.
1945         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
1946         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
1947         (shnbsd_store_inferior_registers): Likewise.
1948         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
1949         (sh_extract_return_value_fpu): Likewise.
1950         (sh_store_return_value_nofpu): Likewise.
1951         (sh_corefile_supply_regset): Likewise.
1952         (sh_corefile_collect_regset): Likewise.
1953         * sh64-tdep.c (sh64_extract_return_value): Likewise.
1954         (sh64_store_return_value): Likewise.
1955         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
1956         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
1957         (sparc_store_inferior_registers): Likewise.
1958         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
1959         (sparc_ravenscar_prepare_to_store): Likewise.
1960         * sparc-tdep.c (sparc32_store_arguments): Likewise.
1961         (sparc_analyze_control_transfer): Likewise.
1962         (sparc_step_trap): Likewise.
1963         (sparc_software_single_step): Likewise.
1964         (sparc32_gdbarch_init): Likewise.
1965         (sparc_supply_rwindow): Likewise.
1966         (sparc_collect_rwindow): Likewise.
1967         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
1968         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
1969         (sparc64nbsd_collect_gregset): Likewise.
1970         (sparc64nbsd_supply_fpregset): Likewise.
1971         (sparc64nbsd_collect_fpregset): Likewise.
1972         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1973         (sparc64_supply_gregset): Likewise.
1974         (sparc64_collect_gregset): Likewise.
1975         (sparc64_supply_fpregset): Likewise.
1976         (sparc64_collect_fpregset): Likewise.
1977         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
1978         * spu-tdep.c (spu_unwind_sp): Likewise.
1979         (spu2ppu_prev_register): Likewise.
1980         (spu_memory_remove_breakpoint): Likewise.
1981         * stack.c (return_command): Likewise.
1982         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
1983         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
1984         * tracefile.c (trace_save_ctf): Likewise.
1985         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
1986         (do_windows_store_inferior_registers): Likewise.
1987         (windows_resume): Likewise.
1988         * xtensa-linux-nat.c (fill_gregset): Likewise.
1989         (supply_gregset_reg): Likewise.
1990         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
1991         (xtensa_register_read_masked): Likewise.
1992         (xtensa_supply_gregset): Likewise.
1993         (xtensa_extract_return_value): Likewise.
1994         (xtensa_store_return_value): Likewise.
1995
1996 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
1997
1998         * doublest.c (floatformat_from_string): New function.
1999         * doublest.h (floatformat_from_string): Add prototype.
2000
2001         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2002         (OP_FLOAT): ... this.
2003         * expression.h: Do not include "doublest.h".
2004         (union exp_element): Replace doubleconst and decfloatconst by
2005         new element floatconst.
2006         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2007         (ada_evaluate_subexp): Likewise.
2008         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2009         OP_DOUBLE and OP_DECFLOAT.
2010         * expprint.c (print_subexp_standard): Likewise.
2011         (dump_subexp_body_standard): Likewise.
2012         * breakpoint.c (watchpoint_exp_is_const): Likewise.
2013
2014         * parse.c: Include "dfp.h".
2015         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2016         (write_exp_elt_floatcst): New function.
2017         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2018         and OP_DECFLOAT.
2019         (operator_check_standard): Likewise.
2020         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
2021         Return target format buffer instead of host DOUBLEST.
2022         Use floatformat_from_string and decimal_from_string to parse
2023         either binary or decimal floating-point types.
2024         (parse_c_float): Remove.
2025         * parser-defs.h: Do not include "doublest.h".
2026         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2027         (write_exp_elt_floatcst): Add prototype.
2028         (parse_float): Update prototype.
2029         (parse_c_float): Remove.
2030
2031         * c-exp.y: Do not include "dfp.h".
2032         (typed_val_float): Use byte buffer instead of DOUBLEST.
2033         (typed_val_decfloat): Remove.
2034         (DECFLOAT): Remove.
2035         (FLOAT): 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         Handle decimal and binary FP types the same way.
2039
2040         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2041         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2042         (parse_number): Update to new parse_float interface.
2043         Parse suffixes and determine type before calling parse_float.
2044
2045         * f-exp.y: Replace dval by typed_val_float.
2046         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2047         (parse_number): Use parse_float instead of atof.
2048
2049         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2050         (parse_go_float): Remove.
2051         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2052         (parse_number): Call parse_float instead of parse_go_float.
2053         Parse suffixes and determine type before calling parse_float.
2054
2055         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2056         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2057         (parse_number): Update to new parse_float interface.
2058         Parse suffixes and determine type before calling parse_float.
2059
2060         * m2-exp.y: Replace dval by byte buffer val.
2061         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2062         (parse_number): Call parse_float instead of atof.
2063
2064         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2065         (lex_number): Call parse_float instead of strtod.
2066         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2067         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2068         Use write_exp_elt_floatcst.
2069         (unit_testing): Remove static variable.
2070         (rust_type): Do not check unit_testing.
2071         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
2072
2073         * ada-exp.y (type_float, type_double): Remove.
2074         (typed_val_float): Use byte buffer instead of DOUBLEST.
2075         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2076         * ada-lex.l (processReal): Use parse_float instead of sscanf.
2077
2078 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
2079
2080         * aarch64-tdep.h (enum aarch64_regnum): Remove.
2081         * arch/aarch64.h: New file.
2082
2083 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2084
2085         * dfp.h (decimal_from_string): Use const reference for argument.
2086         * dfp.c (decimal_from_string): Likewise.
2087
2088 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2089
2090         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2091         * sh64-tdep.c (sh64_do_fp_register): Likewise.
2092         * mips-tdep.c (mips_print_fp_register): Likewise.
2093
2094 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2095
2096         * common/format.h (enum argclass): Replace decfloat_arg by
2097         dec32float_arg, dec64float_arg, and dec128float_arg.
2098         * common/format.c (parse_format_string): Update to return
2099         new decimal float argument classes.
2100
2101         * printcmd.c (printf_decfloat): Rename to ...
2102         (printf_floating): ... this.  Add argclass argument, and use it
2103         instead of parsing the format string again.  Add support for
2104         binary floating-point values, using floatformat_to_string.
2105         Convert value to the target format if it doesn't already match.
2106         (ui_printf): Call printf_floating instead of printf_decfloat,
2107         also for double_arg / long_double_arg.  Pass argclass.
2108
2109         * dfp.c (decimal_to_string): Add format string argument.
2110         * dfp.h (decimal_to_string): Likewise.
2111
2112         * doublest.c (floatformat_to_string): Add format string argument.
2113         * doublest.h (floatformat_to_string): Likewise.
2114
2115 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2116
2117         * doublest.c (floatformat_precision): New routine.
2118         (floatformat_to_string): Likewise.
2119         * doublest.c (floatformat_to_string): Add prototype.
2120
2121         * printcmd.c (print_scalar_formatted): Only call print_floating
2122         on floating-point types.
2123         * valprint.c: Do not include "floatformat.h".
2124         (generic_val_print_decfloat): Remove.
2125         (generic_val_print): Call generic_val_print_float for both
2126         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2127         (print_floating): Use floatformat_to_string.  Handle decimal float.
2128         (print_decimal_floating): Remove, merge into floatformat_to_string.
2129         * value.h (print_decimal_floating): Remove.
2130
2131         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2132
2133 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2134
2135         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2136
2137 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2138
2139         * memattr.h: Don't include vec.h.
2140         (struct mem_attrib): Initialize fields.
2141         <unknown>: New static method.
2142         (struct mem_region): Add constructors, operator<, initialize
2143         fields.
2144         * memattr.c: Include algorithm.
2145         (default_mem_attrib, unknown_mem_attrib): Remove.
2146         (user_mem_region_list): New global.
2147         (target_mem_region_list, mem_region_list): Change type to
2148         std::vector<mem_region>.
2149         (mem_use_target): Now a function.
2150         (target_mem_regions_valid): Change type to bool.
2151         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2152         (require_user_regions): Adjust.
2153         (require_target_regions): Adjust.
2154         (create_mem_region): Adjust.
2155         (lookup_mem_region): Adjust.
2156         (invalidate_target_mem_regions): Adjust.
2157         (mem_clear): Rename to...
2158         (user_mem_clear): ... this, and adjust.
2159         (mem_command): Adjust.
2160         (info_mem_command): Adjust.
2161         (mem_enable, enable_mem_command, mem_disable,
2162         disable_mem_command): Adjust.
2163         (mem_delete): Adjust.
2164         (delete_mem_command): Adjust.
2165         * memory-map.h (parse_memory_map): Return an std::vector.
2166         * memory-map.c (parse_memory_map): Likewise.
2167         (struct memory_map_parsing_data): Add constructor.
2168         <memory_map>: Point to std::vector.
2169         (memory_map_start_memory): Adjust.
2170         (memory_map_end_memory): Adjust.
2171         (memory_map_end_property): Adjust.
2172         (clear_result): Remove.
2173         * remote.c (remote_memory_map): Return an std::vector.
2174         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2175         Remove.
2176         (target_debug_print_mem_region_vector): New.
2177         * target-delegates.c: Regenerate.
2178         * target.h (mem_region_vector): New typedef.
2179         (to_memory_map): Return mem_region_vector.
2180         (target_memory_map): Return an std::vector.
2181         * target.c (target_memory_map): Return an std::vector.
2182         (flash_erase_command): Adjust.
2183
2184 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2185
2186         * memory-map.c (struct memory_map_parsing_data) <property_name>:
2187         Change type to std::string.
2188         (memory_map_start_property): Adjust.
2189         (memory_map_end_property): Adjust.
2190
2191 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2192
2193         * infrun.h: Include common/byte-vector.h.
2194         (struct displaced_step_closure): New struct.
2195         (struct buf_displaced_step_closure): New struct.
2196         * infrun.c (displaced_step_closure::~displaced_step_closure):
2197         Provide default implementation.
2198         (displaced_step_clear): Deallocate step closure with delete.
2199         * aarch64-tdep.c (displaced_step_closure): Rename to ...
2200         (aarch64_displaced_step_closure): ... this, extend
2201         displaced_step_closure.
2202         (aarch64_displaced_step_data) <dsc>: Change type to
2203         aarch64_displaced_step_closure.
2204         (aarch64_displaced_step_copy_insn): Adjust to type change, use
2205         unique_ptr.
2206         (aarch64_displaced_step_fixup): Add cast for displaced step
2207         closure.
2208         * amd64-tdep.c (displaced_step_closure): Rename to ...
2209         (amd64_displaced_step_closure): ... this, extend
2210         displaced_step_closure.
2211         <insn_buf>: Change type to std::vector<gdb_byte>.
2212         <max_len>: Remove.
2213         (fixup_riprel): Change type of DSC parameter, adjust to type
2214         change of insn_buf.
2215         (fixup_displaced_copy): Change type of DSC parameter.
2216         (amd64_displaced_step_copy_insn): Instantiate
2217         amd64_displaced_step_closure.
2218         (amd64_displaced_step_fixup): Add cast for closure type, adjust
2219         to type change of insn_buf.
2220         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2221         parameter DSC.
2222         (arm_linux_copy_svc): Likewise.
2223         (cleanup_kernel_helper_return): Likewise.
2224         (arm_catch_kernel_helper_return): Likewise.
2225         (arm_linux_displaced_step_copy_insn): Instantiate
2226         arm_displaced_step_closure.
2227         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2228         (displaced_read_reg): Change type of parameter DSC.
2229         (branch_write_pc): Likewise.
2230         (load_write_pc): Likewise.
2231         (alu_write_pc): Likewise.
2232         (displaced_write_reg): Likewise.
2233         (arm_copy_unmodified): Likewise.
2234         (thumb_copy_unmodified_32bit): Likewise.
2235         (thumb_copy_unmodified_16bit): Likewise.
2236         (cleanup_preload): Likewise.
2237         (install_preload): Likewise.
2238         (arm_copy_preload): Likewise.
2239         (thumb2_copy_preload): Likewise.
2240         (install_preload_reg): Likewise.
2241         (arm_copy_preload_reg): Likewise.
2242         (cleanup_copro_load_store): Likewise.
2243         (install_copro_load_store): Likewise.
2244         (arm_copy_copro_load_store) Likewise.
2245         (thumb2_copy_copro_load_store): Likewise.
2246         (cleanup_branch): Likewise.
2247         (install_b_bl_blx): Likewise.
2248         (arm_copy_b_bl_blx): Likewise.
2249         (thumb2_copy_b_bl_blx): Likewise.
2250         (thumb_copy_b): Likewise.
2251         (install_bx_blx_reg): Likewise.
2252         (arm_copy_bx_blx_reg): Likewise.
2253         (thumb_copy_bx_blx_reg): Likewise.
2254         (cleanup_alu_imm): Likewise.
2255         (arm_copy_alu_imm): Likewise.
2256         (thumb2_copy_alu_imm): Likewise.
2257         (cleanup_alu_reg): Likewise.
2258         (install_alu_reg): Likewise.
2259         (arm_copy_alu_reg): Likewise.
2260         (thumb_copy_alu_reg): Likewise.
2261         (cleanup_alu_shifted_reg): Likewise.
2262         (install_alu_shifted_reg): Likewise.
2263         (arm_copy_alu_shifted_reg): Likewise.
2264         (cleanup_load): Likewise.
2265         (cleanup_store): Likewise.
2266         (arm_copy_extra_ld_st): Likewise.
2267         (install_load_store): Likewise.
2268         (thumb2_copy_load_literal): Likewise.
2269         (thumb2_copy_load_reg_imm): Likewise.
2270         (arm_copy_ldr_str_ldrb_strb): Likewise.
2271         (cleanup_block_load_all): Likewise.
2272         (cleanup_block_store_pc): Likewise.
2273         (cleanup_block_load_pc): Likewise.
2274         (arm_copy_block_xfer): Likewise.
2275         (thumb2_copy_block_xfer): Likewise.
2276         (cleanup_svc): Likewise.
2277         (install_svc): Likewise.
2278         (arm_copy_svc): Likewise.
2279         (thumb_copy_svc): Likewise.
2280         (arm_copy_undef): Likewise.
2281         (thumb_32bit_copy_undef): Likewise.
2282         (arm_copy_unpred): Likewise.
2283         (arm_decode_misc_memhint_neon): Likewise.
2284         (arm_decode_unconditional): Likewise.
2285         (arm_decode_miscellaneous): Likewise.
2286         (arm_decode_dp_misc): Likewise.
2287         (arm_decode_ld_st_word_ubyte): Likewise.
2288         (arm_decode_media): Likewise.
2289         (arm_decode_b_bl_ldmstm): Likewise.
2290         (arm_decode_ext_reg_ld_st): Likewise.
2291         (thumb2_decode_dp_shift_reg): Likewise.
2292         (thumb2_decode_ext_reg_ld_st): Likewise.
2293         (arm_decode_svc_copro): Likewise.
2294         (thumb2_decode_svc_copro): Likewise.
2295         (install_pc_relative): Likewise.
2296         (thumb_copy_pc_relative_16bit): Likewise.
2297         (thumb_decode_pc_relative_16bit): Likewise.
2298         (thumb_copy_pc_relative_32bit): Likewise.
2299         (thumb_copy_16bit_ldr_literal): Likewise.
2300         (thumb_copy_cbnz_cbz): Likewise.
2301         (thumb2_copy_table_branch): Likewise.
2302         (cleanup_pop_pc_16bit_all): Likewise.
2303         (thumb_copy_pop_pc_16bit): Likewise.
2304         (thumb_process_displaced_16bit_insn): Likewise.
2305         (decode_thumb_32bit_ld_mem_hints): Likewise.
2306         (thumb_process_displaced_32bit_insn): Likewise.
2307         (thumb_process_displaced_insn): Likewise.
2308         (arm_process_displaced_insn): Likewise.
2309         (arm_displaced_init_closure): Likewise.
2310         (arm_displaced_step_fixup): Add cast for closure.
2311         * arm-tdep.h: Include infrun.h.
2312         (displaced_step_closure): Rename to ...
2313         (arm_displaced_step_closure): ... this, extend
2314         displaced_step_closure.
2315         <u::svc::copy_svc_os>: Change type of parameter DSC.
2316         <cleanup>: Likewise.
2317         (arm_process_displaced_insn): Likewise.
2318         (arm_displaced_init_closure): Likewise.
2319         (displaced_read_reg): Likewise.
2320         (displaced_write_reg): Likewise.
2321         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2322         Adjust.
2323         * i386-tdep.h: Include infrun.h.
2324         (i386_displaced_step_closure): New typedef.
2325         * i386-tdep.c (i386_displaced_step_copy_insn): Use
2326         i386_displaced_step_closure.
2327         (i386_displaced_step_fixup): Adjust.
2328         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2329         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2330         and unique_ptr.
2331         (ppc_displaced_step_fixup): Adjust.
2332         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2333         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2334         and unique_ptr.
2335         (s390_displaced_step_fixup): Adjust.
2336
2337 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2338
2339         * interps.h (interp_resume, interp_suspend, interp_set_temp):
2340         Remove declarations.
2341
2342 2017-10-20  Tom Tromey  <tom@tromey.com>
2343
2344         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2345         std::vector.
2346         (gdb_bfd_record_inclusion): Update.
2347         (bfdp): Remove typedef.
2348
2349 2017-10-20  Tom Tromey  <tom@tromey.com>
2350
2351         * gdb_bfd.c (gdb_bfd_ref): Use new.
2352         (struct gdb_bfd_data): Add constructor, destructor, and member
2353         initializers.
2354         (gdb_bfd_unref): Use delete.
2355
2356 2017-10-20  Tom Tromey  <tom@tromey.com>
2357
2358         * exec.c (exec_file_attach): Use new_bfd_ref.
2359         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2360         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2361         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2362         new_bfd_ref.
2363         * gdb_bfd.h (new_bfd_ref): New function.
2364
2365 2017-10-20  Pedro Alves  <palves@redhat.com>
2366
2367         * main.c (captured_command_loop): Add attribute noinline.
2368
2369 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
2370
2371         * interps.c (struct interp_factory): Add constructor.
2372         (interp_factory_p): Remove typedef.
2373         (DEF_VEC_P(interp_factory_p)): Remove.
2374         (interpreter_factories): Change type to std::vector.
2375         (interp_factory_register): Adjust.
2376         (interp_lookup): Adjust.
2377         (interpreter_completer): Adjust.
2378
2379 2017-10-19  Tom Tromey  <tom@tromey.com>
2380
2381         * break-catch-syscall.c (catch_syscall_completer): Use
2382         std::string, gdb::unique_xmalloc_ptr.
2383
2384 2017-10-19  Tom Tromey  <tom@tromey.com>
2385
2386         * infcall.c (call_function_by_hand_dummy): Use std::string.
2387
2388 2017-10-19  Tom Tromey  <tom@tromey.com>
2389
2390         * mi/mi-main.c (mi_cmd_execute): Update.
2391         * top.h (prepare_execute_command): Return scoped_value_mark.
2392         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2393         Add move constructor.
2394         * top.c (prepare_execute_command): Return scoped_value_mark.
2395         (execute_command): Update.
2396
2397 2017-10-19  Pedro Alves  <palves@redhat.com>
2398
2399         * xml-support.c (xml_fetch_content_from_file): Check fread's
2400         return.
2401
2402 2017-10-19  Pedro Alves  <palves@redhat.com>
2403
2404         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2405         async.
2406         (handle_error_fd): New function.
2407         (ser_base_async): Add/delete an event loop file handler for
2408         error_fd.
2409
2410 2017-10-19  Pedro Alves  <palves@redhat.com>
2411
2412         * xml-support.c (xml_fetch_content_from_file): Don't read in
2413         chunks.  Instead use fseek to determine the file's size, and read
2414         it in one go.
2415
2416 2017-11-18  Keith Seitz  <keiths@redhat.com>
2417
2418         * c-exp.y (oper): Canonicalize conversion operators of user-defined
2419         types.
2420         Add whitespace to front of type name.
2421
2422 2017-10-18  Keith Seitz  <keiths@redhat.com>
2423
2424         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2425         DW_AT_accessibility.
2426
2427 2017-10-18  Yao Qi  <yao.qi@linaro.org>
2428
2429         * features/tic6x-c62x-linux.c: Remove.
2430
2431 2017-10-17  Tom Tromey  <tom@tromey.com>
2432
2433         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2434         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2435         (do_mixed_source_and_assembly): Likewise.
2436
2437 2017-10-17  Tom Tromey  <tom@tromey.com>
2438
2439         * regcache.c (regcache::xfer_part): Remove assertion.
2440
2441 2017-10-17  Pedro Alves  <palves@redhat.com>
2442
2443         * xml-support.c (xml_fetch_content_from_file): Call
2444         unique_ptr::release() instead unique_ptr::get() when passing
2445         through xrealloc.
2446
2447 2017-10-17  Yao Qi  <yao.qi@linaro.org>
2448
2449         * regcache.c (regcache::xfer_part): Remove parameters read and
2450         write, add parameter is_raw.  All callers are updated.
2451
2452 2017-10-16  Keith Seitz  <keiths@redhat.com>
2453
2454         * c-typeprint.c (enum access_specifier): Moved here from
2455         c_type_print_base.
2456         (output_access_specifier): New function.
2457         (c_type_print_base): Consider typedefs when assessing
2458         whether access labels are needed.
2459         Use output_access_specifier as needed.
2460         Output access specifier for typedefs, if needed.
2461         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2462         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2463         fields.
2464         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2465         accessor macros.
2466
2467 2017-10-16  Tom Tromey  <tom@tromey.com>
2468
2469         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2470         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2471         * target.c (target_fileio_read_stralloc): Update.
2472         * sparc64-tdep.c (adi_is_addr_mapped): Update.
2473         * target.h (target_fileio_read_stralloc): Return
2474         unique_xmalloc_ptr.
2475
2476 2017-10-16  Tom Tromey  <tom@tromey.com>
2477
2478         * xml-syscall.c (xml_init_syscalls_info): Update.
2479         * xml-support.c (xinclude_start_include): Update.
2480         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2481         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2482         (xml_fetch_content_from_file): Likewise.
2483         * osdata.c (get_osdata): Update.
2484         * target.h (target_read_stralloc, target_get_osdata): Return
2485         unique_xmalloc_ptr.
2486         * solib-aix.c (solib_aix_get_library_list): Update.
2487         * solib-target.c (solib_target_current_sos): Update.
2488         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2489         * xml-tdesc.c (fetch_available_features_from_target): Update.
2490         (target_fetch_description_xml): Update.
2491         (file_read_description_xml): Update.
2492         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2493         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2494         (remote_pid_to_exec_file): Update.
2495         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2496         (target_get_osdata): Likewise.
2497
2498 2017-10-16  Tom Tromey  <tom@tromey.com>
2499
2500         * remote.c (remote_register_number_and_offset): Use std::vector.
2501         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2502         (putpkt_binary): Use gdb::def_vector.
2503         (compare_sections_command): Use gdb::byte_vector.
2504
2505 2017-10-16  Tom Tromey  <tom@tromey.com>
2506
2507         * ppc-linux-nat.c (hwdebug_insert_point): Use
2508         gdb::unique_xmalloc_ptr, XDUP.
2509
2510 2017-10-16  Tom Tromey  <tom@tromey.com>
2511
2512         * probe.c (parse_probes): Use std::string.
2513         (info_probes_for_ops, enable_probes_command)
2514         (disable_probes_command): Remove cleanups.
2515
2516 2017-10-16  Tom Tromey  <tom@tromey.com>
2517
2518         * buildsym.c (block_compar): Remove.
2519         (end_symtab_get_static_block): Use std::vector.
2520
2521 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
2522
2523         * memrange.h (struct mem_range): Define operator< and operator==.
2524         (mem_range_s): Remove.
2525         (DEF_VEC_O (mem_range_s)): Remove.
2526         (normalize_mem_ranges): Change parameter type to std::vector.
2527         * memrange.c (compare_mem_ranges): Remove.
2528         (normalize_mem_ranges): Change parameter type to std::vector,
2529         adjust to vector change.
2530         * exec.c (section_table_available_memory): Return vector, remove
2531         parameter.
2532         (section_table_read_available_memory): Adjust to std::vector
2533         change.
2534         * remote.c (remote_read_bytes): Adjust to std::vector
2535         change.
2536         * tracepoint.h (traceframe_available_memory): Change parameter
2537         type to std::vector.
2538         * tracepoint.c (traceframe_available_memory): Change parameter
2539         type to std::vector, adjust.
2540         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2541         std::vector change.
2542         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2543         unittests/memrange-selftests.c.
2544         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2545         * gdb/unittests/memrange-selftests.c: New file.
2546
2547 2017-10-16  Pedro Alves  <palves@redhat.com>
2548
2549         * elfread.c (probe_key_free): Rename range-for variable.
2550         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2551         (find_probe_by_pc, collect_probes): Rename range-for variable.
2552
2553 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2554
2555         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2556         * features/tic6x-c62x.c: Remove.
2557         * features/tic6x-c64x-linux.c: Remove.
2558         * features/tic6x-c64x.c: Remove.
2559         * features/tic6x-c64xp-linux.c: Remove.
2560         * features/tic6x-c64xp.c: Remove.
2561         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2562         initialize_tdesc_tic6x_*_linux functions.
2563         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2564         initialize_tdesc_tic6x_* functions.
2565
2566 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2567
2568         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2569         tic6x-c62x.
2570         * regformats/tic6x-c62x.dat: Remove.
2571         * regformats/tic6x-c64x.dat: Remove.
2572         * regformats/tic6x-c64xp.dat: Remove.
2573
2574 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2575
2576         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2577         (the !HAVE_LIBEXPAT version).
2578
2579 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2580
2581         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2582         const.
2583
2584 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2585
2586         * target.h: Include tracepoint.h.
2587         (enum trace_find_type): Move to tracepoint.h.
2588         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2589         * tracepoint.h: Don't include target.h
2590         (enum trace_find_type): Move from target.h.
2591         (parse_traceframe_info): Return a unique ptr.
2592         * tracepoint.c (current_traceframe_info): Change type to unique
2593         ptr.
2594         (free_traceframe_info): Remove.
2595         (clear_traceframe_info): Don't manually free
2596         current_traceframe_info.
2597         (free_result): Remove.
2598         (parse_traceframe_info): Return a unique ptr.
2599         (get_traceframe_info): Adjust to unique ptr.
2600         * ctf.c (ctf_traceframe_info): Return a unique ptr.
2601         * remote.c (remote_traceframe_info): Return a unique ptr.
2602         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2603         ptr.
2604         * target-debug.h (target_debug_print_traceframe_info_up): New
2605         macro.
2606         * target-delegates.c: Regenerate.
2607
2608 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2609
2610         * memrange.h (struct mem_range): Add constructors.
2611         * tracepoint.h (struct traceframe_info) <memory>: Change type to
2612         std::vector<mem_range>.
2613         * tracepoint.c (free_traceframe_info): Don't manually free
2614         vector.
2615         (traceframe_info_start_memory): Adjust to vector change.
2616         (traceframe_available_memory): Likewise.
2617         * tracefile-tfile.c (build_traceframe_info): Likewise.
2618         * ctf.c (ctf_traceframe_info): Likewise.
2619
2620 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2621
2622         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2623         std::vector<int>.
2624         * tracepoint.c (free_traceframe_info): Deallocate with delete.
2625         (traceframe_info_start_tvar): Adjust to vector change.
2626         (parse_traceframe_info): Allocate with new.
2627         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2628         vector change.
2629         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2630         change.
2631         tfile_traceframe_info): Allocate with new.
2632         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2633         change.
2634
2635 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2636
2637         * tracepoint.c (traceframe_info): Rename to...
2638         (current_traceframe_info): ...this.
2639         (clear_traceframe_info): Adjust.
2640         (get_traceframe_info): Adjust.
2641
2642 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2643
2644         * nat/linux-osdata.c: Include algorithm.
2645         (compare_processes): Remove.
2646         (struct pid_pgid_entry): New struct.
2647         (linux_xfer_osdata_processgroups): Use std::vector instead of
2648         XNEWVEC.
2649
2650 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2651
2652         * objfiles.h: Don't include symfile.h.
2653         (struct partial_symbol): Remove forward-declaration.
2654         (struct objfile) <global_psymbols, static_psymbols>: Change type
2655         to std::vector<partial_symbol *>.
2656         * objfiles.c (objfile::objfile): Don't memset those fields.
2657         (objfile::~objfile): Don't free those fields.
2658         * psympriv.h (struct psymbol_allocation_list): Remove
2659         forward-declaration.
2660         (add_psymbol_to_list): Change psymbol_allocation_list parameter
2661         to std::vector.
2662         (start_psymtab_common): Change parameters to std::vector.
2663         * psymtab.c: Include algorithm.
2664         (require_partial_symbols): Call shrink_to_fit.
2665         (find_pc_sect_psymbol): Adjust to vector change.
2666         (match_partial_symbol): Likewise.
2667         (lookup_partial_symbol): Likewise.
2668         (psym_relocate): Likewise.
2669         (dump_psymtab): Likewise.
2670         (recursively_search_psymtabs): Likewise.
2671         (compare_psymbols): Remove.
2672         (sort_pst_symbols): Adjust to vector change.
2673         (start_psymtab_common): Likewise.
2674         (end_psymtab_common): Likewise.
2675         (psymbol_bcache_full): De-constify return value.
2676         (add_psymbol_to_bcache): Likewise.
2677         (extend_psymbol_list): Remove.
2678         (append_psymbol_to_list): Adjust to vector change.
2679         (add_psymbol_to_list): Likewise.
2680         (init_psymbol_list): Likewise.
2681         (maintenance_info_psymtabs): Likewise.
2682         (maintenance_check_psymtabs): Likewise.
2683         * symfile.h (struct psymbol_allocation_list): Remove.
2684         * symfile.c (reread_symbols): Adjust to vector change.
2685         * dbxread.c (start_psymtab): Change type of parameters.
2686         (dbx_symfile_read): Adjust to vector change.
2687         (read_dbx_symtab): Likewise.
2688         (start_psymtab): Change type of parameters.
2689         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2690         (create_partial_symtab): Likewise.
2691         (add_partial_symbol): Likewise.
2692         (write_one_signatured_type): Likewise.
2693         (recursively_write_psymbols): Likewise.
2694         * mdebugread.c (parse_partial_symbols): Likewise.
2695         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2696         (scan_xcoff_symtab): Adjust to vector change.
2697         (xcoff_initial_scan): Likewise.
2698
2699 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
2700
2701         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2702
2703 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2704
2705         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2706         Remove s390x-*-expedite, add s390x-expedite.
2707
2708 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2709
2710         * features/s390-gs-linux64.c: Regenerated.
2711         * features/s390x-gs-linux64.c: Regenerated.
2712
2713 2017-10-13  Tom Tromey  <tom@tromey.com>
2714
2715         * compile/compile-object-run.c (do_module_cleanup): Use delete.
2716         * solib.c (update_solib_list, reload_shared_libraries_1): Use
2717         delete.
2718         * symfile.c (symbol_file_add_with_addrs): Use new.
2719         (symbol_file_add_separate): Update comment.
2720         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2721         * jit.c (jit_object_close_impl): Use new.
2722         (jit_unregister_code): Use delete.
2723         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2724         (~objfile): Rename from free_objfile.
2725         (free_objfile_separate_debug, do_free_objfile_cleanup)
2726         (free_all_objfiles, objfile_purge_solibs): Use delete.
2727         * objfiles.h (struct objfile): Add constructor and destructor.
2728         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
2729         (allocate_objfile, free_objfile): Don't declare.
2730         (struct objstats): Add initializers.
2731
2732 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2733
2734         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
2735         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
2736         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
2737         * gdbarch.h: Regenerate.
2738         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2739         Adjust comment.
2740         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
2741         (i386_displaced_step_fixup): Adjust comment.
2742         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
2743
2744 2017-10-12  Tom Tromey  <tom@tromey.com>
2745
2746         * prologue-value.h (pv_area::store_would_trash): Return bool.
2747         (pv_area::find_reg): Likewise.
2748         * prologue-value.c (pv_area::store_would_trash): Return bool.
2749         (pv_area::find_reg): Likewise.
2750
2751 2017-10-12  Tom Tromey  <tom@tromey.com>
2752
2753         * s390-linux-tdep.c (s390_store, s390_load)
2754         (s390_check_for_saved, s390_analyze_prologue): Update.
2755         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
2756         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
2757         * prologue-value.h (class pv_area): Move from prologue-value.c.
2758         Change names of members.  Add constructor, destructor, member
2759         functions.
2760         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
2761         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
2762         (pv_area_fetch, pv_area_scan): Don't declare.
2763         * prologue-value.c (struct pv_area::area_entry): Now member of
2764         pv_area.
2765         (struct pv_area): Move to prologue-value.h.
2766         (pv_area::pv_area): Rename from make_pv_area.
2767         (pv_area::~pv_area): Rename from free_pv_area.
2768         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
2769         (clear_entries, find_entry, overlaps, store_would_trash, store)
2770         (fetch, find_reg, scan): Now member of pv_area.
2771         Remove "area" argument.  Update.
2772         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
2773         Update.
2774         * mn10300-tdep.c (push_reg, check_for_saved)
2775         (mn10300_analyze_prologue): Update.
2776         * mep-tdep.c (is_arg_spill, check_for_saved)
2777         (mep_analyze_prologue): Update.
2778         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
2779         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
2780         (m32c_is_struct_return, m32c_analyze_prologue): Update.
2781         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
2782         Update.
2783         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
2784         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
2785
2786 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2787
2788         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
2789         * linux-nat.c (linux_nat_delete_thread): New variable.
2790         (lwp_free): Invoke linux_nat_delete_thread if set.
2791         (linux_nat_set_delete_thread): New function.
2792         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
2793         thread delete callback.
2794         * arm-linux-nat.c (arm_linux_delete_thread): New function.
2795         (_initialize_arm_linux_nat): Assign thread delete callback.
2796         * s390-linux-nat.c (s390_delete_thread): New function.
2797         (_initialize_s390_nat): Assign thread delete callback.
2798         * x86-linux-nat.c (x86_linux_add_target): Likewise.
2799         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
2800         function.
2801         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
2802         declaration.
2803         * nat/x86-linux.c (x86_linux_delete_thread): New function.
2804         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
2805
2806 2017-10-09  Tom Tromey  <tom@tromey.com>
2807
2808         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
2809         std::string.
2810         * tui/tui-layout.c (enum tui_status): Use std::string.
2811
2812 2017-10-11  Tom Tromey  <tom@tromey.com>
2813
2814         * gdbthread.h (thread_command): Constify.
2815         * inferior.h (detach_command): Constify.
2816         * top.h (set_history, show_history): Constify.
2817         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
2818         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
2819         * bsd-kvm.c (bsd_kvm_cmd): Constify.
2820         * printcmd.c (set_command): Constify.
2821         (non_const_set_command): New function.
2822         * dcache.c (set_dcache_command, show_dcache_command): Constify.
2823         * breakpoint.c (enable_command, disable_command, delete_command)
2824         (catch_command, tcatch_command, set_breakpoint_cmd)
2825         (show_breakpoint_cmd): Constify.
2826         * macrocmd.c (macro_command): Constify.
2827         * infcmd.c (unset_command, kill_command, detach_command)
2828         (info_proc_cmd): Constify.
2829         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
2830         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
2831         (info_auto_load_cmd): Constify.
2832         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
2833         (unset_tdesc_cmd): Constify.
2834         * ada-lang.c (set_ada_command, show_ada_command)
2835         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
2836         * guile/guile.c (set_guile_command, show_guile_command)
2837         (info_guile_command): Constify.
2838         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
2839         Constify.
2840         * skip.c (skip_command): Constify.
2841         * compile/compile.c (_initialize_compile): Constify.
2842         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
2843         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
2844         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
2845         (maint_btrace_pt_show_cmd): Constify.
2846         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
2847         Constify.
2848         * python/python.c (user_show_python, user_set_python): Constify.
2849         * mips-tdep.c (set_mips_command, show_mips_command)
2850         (set_mipsfpu_command): Constify.
2851         * record-btrace.c (cmd_record_btrace_start)
2852         (cmd_set_record_btrace, cmd_show_record_btrace)
2853         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
2854         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
2855         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
2856         Constify.
2857         * symfile.c (overlay_command): Constify.
2858         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2859         * cli/cli-logging.c (set_logging_command, show_logging_command):
2860         Constify.
2861         * cli/cli-dump.c (dump_command, append_command)
2862         (srec_dump_command, ihex_dump_command, verilog_dump_command)
2863         (tekhex_dump_command, binary_dump_command)
2864         (binary_append_command): Constify.
2865         * cli/cli-decode.c (struct cmd_list_element): Change type of
2866         "fun".
2867         * cli/cli-cmds.c (info_command, show_command, set_debug)
2868         (show_debug): Constify.
2869         (show_command): Add non-const overload.
2870         * top.c (set_history, show_history): Constify.
2871         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
2872         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
2873         * target.c (target_command): Constify.
2874         * sparc64-tdep.c (info_adi_command): Constify.
2875         * record-full.c (cmd_record_full_start): Constify.
2876         (set_record_full_command): Constify.  Fix typo.
2877         (show_record_full_command): Constify.
2878         * thread.c (thread_command, thread_apply_command): Constify.
2879         * memattr.c (dummy_cmd): Constify.
2880         * value.c (function_command): Constify.
2881         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
2882         * probe.c (info_probes_command): Constify.
2883         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
2884         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
2885         (show_thread_cmd, set_thread_default_cmd)
2886         (show_thread_default_cmd): Constify.
2887         (check_empty): Constify.
2888         * tracepoint.c (tfind_command): Constify.
2889         * cp-support.c (maint_cplus_command): Constify.
2890         * windows-tdep.c (info_w32_command): Constify.
2891         * record.c (cmd_record_start, set_record_command)
2892         (show_record_command, info_record_command, cmd_record_goto):
2893         Constify.
2894         * ravenscar-thread.c (set_ravenscar_command)
2895         (show_ravenscar_command): Constify.
2896         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
2897         Constify.
2898         (add_internal_problem_command): Remove casts.
2899         * arc-tdep.c (maintenance_print_arc_command): Constify.
2900         * valprint.c (set_print, show_print, set_print_raw)
2901         (show_print_raw): Constify.
2902         * maint.c (maintenance_command, maintenance_info_command)
2903         (maintenance_print_command, maintenance_set_cmd)
2904         (maintenance_show_cmd, set_per_command_cmd)
2905         (show_per_command_cmd, maintenance_check_command): Constify.
2906         * language.c (set_check, show_check): Constify.
2907         * typeprint.c (show_print_type, set_print_type): Constify.
2908         * go32-nat.c (go32_info_dos_command): Constify.
2909
2910 2017-10-11  Tom Tromey  <tom@tromey.com>
2911
2912         * breakpoint.c (prepare_re_set_context): Remove.
2913         (breakpoint_re_set_one): Update.  Don't use cleanups.
2914         (breakpoint_re_set): Use scoped_restore, std::string, and
2915         scoped_restore_current_language.
2916
2917 2017-10-11  Tom Tromey  <tom@tromey.com>
2918
2919         * breakpoint.c (commands_command_1): Use std::string.
2920         (cleanup_executing_breakpoints): Remove.
2921         (bpstat_do_actions_1): Use scoped_restore.
2922         (bpstat_check_watchpoint): Use std::string.
2923         (decode_static_tracepoint_spec): Likewise.
2924         (break_range_command): Likewise.
2925         (watch_command_1): Likewise.
2926         (compare_breakpoints): Change argument types.
2927         (clear_command): Use std::vector.
2928         (cleanup_executing_breakpoints): Remove.
2929         (update_global_location_list): Use unique_xmalloc_ptr.
2930         (strace_command): Remove unused declaration.
2931
2932 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2933
2934         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
2935         * NEWS: Mention new FreeBSD/arm native configuration.
2936         * configure.host: Add arm*-*-freebsd*.
2937         * configure.nat: Likewise.
2938         * arm-fbsd-nat.c: New file.
2939
2940 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2941
2942         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
2943         (ALLDEPFILES): Add arm-fbsd-tdep.c.
2944         * NEWS: Mention new FreeBSD/arm target.
2945         * configure.tgt: Add arm*-*-freebsd*.
2946         * arm-fbsd-tdep.c: New file.
2947         * arm-fbsd-tdep.h: New file.
2948
2949 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2950
2951         * linux-tdep.c (linux_make_corefile_notes): Remove call to
2952         `gdbarch_elfcore_write_linux_prpsinfo'.
2953         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
2954         method.
2955         (elf_internal_linux_prpsinfo): Remove declaration.
2956         * gdbarch.h: Regenerate.
2957         * gdbarch.c: Regenerate.
2958
2959 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2960
2961         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
2962         `set_gdbarch_elfcore_write_linux_prpsinfo'.
2963
2964 2017-10-11  Pedro Alves  <palves@redhat.com>
2965
2966         * breakpoint.c (reattach_breakpoints): Delete.
2967         * breakpoint.h (reattach_breakpoints): Delete.
2968
2969 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
2970
2971         * symfile.c (registered_sym_fns): Make struct, not typedef.
2972         (DEF_VEC_O (registered_sym_fns)): Remove.
2973         (symtab_fns): Change type to std::vector.
2974         (add_symtab_fns): Adjust.
2975         (find_sym_fns): Adjust.
2976
2977 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
2978
2979         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
2980         * arc-tdep.h (arc_arch_is_em): New function.
2981         (arc_arch_is_hs): Likewise.
2982
2983 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
2984
2985         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
2986         parentheses in the declaration.
2987         (macro_lookup_inclusion): Likewise.
2988         (macro_lookup_definition): Likewise.
2989         * p-lang.h (pascal_builtin_types): Likewise.
2990         * tui/tui-data.c (tui_win_list): Likewise.
2991         * tui/tui-data.h (tui_win_list): Likewise.
2992         * utils.h (make_cleanup_free_section_addr_info): Likewise.
2993
2994 2017-10-11  Mark Rages  <markrages@gmail.com>
2995
2996         * target-memory.c (block_boundaries): Fix for block address not
2997         aligned on block size.
2998
2999 2017-10-10  Pedro Alves <palves@redhat.com>
3000             Tom Tromey  <tom@tromey.com>
3001
3002         * breakpoint.c (struct captured_breakpoint_query_args)
3003         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3004         (print_breakpoint): New.
3005         * breakpoint.h (print_breakpoint): Declare.
3006         * common/common-exceptions.h (enum return_reason): Remove
3007         references to catch_exceptions.
3008         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3009         Delete.
3010         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3011         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3012         * gdb.h: Delete.
3013         * gdbthread.h (thread_select): Declare.
3014         * mi/mi-cmd-break.c: Don't include gdb.h.
3015         (breakpoint_notify): Use print_breakpoint.
3016         * mi/mi-cmd-catch.c: Don't include gdb.h.
3017         * mi/mi-interp.c: Don't include gdb.h.
3018         (mi_print_breakpoint_for_event): New.
3019         (mi_breakpoint_created, mi_breakpoint_modified): Use
3020         mi_print_breakpoint_for_event.
3021         * mi/mi-main.c: Don't include gdb.h.
3022         (mi_cmd_thread_select): Parse the global thread ID here.  Use
3023         thread_select instead of gdb_thread_select.
3024         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3025         of using gdb_list_thread_ids.
3026         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
3027         FILEIO_ENOSYS here.
3028         (remote_fileio_request): Use TRY/CATCH instead of
3029         catch_exceptions.
3030         * symfile-mem.c (struct symbol_file_add_from_memory_args)
3031         (symbol_file_add_from_memory_wrapper): Delete.
3032         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3033         * thread.c: Don't include gdb.h.
3034         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3035         (thread_alive): Use thread_select.
3036         (do_captured_thread_select): Delete, parts salvaged as ...
3037         (thread_select): ... this new function.
3038         (gdb_thread_select): Delete.
3039
3040 2017-10-10  Pedro Alves  <palves@redhat.com>
3041             Tom Tromey  <tom@tromey.com>
3042
3043         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3044         and reverse logic.
3045         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3046         No longer macros.  Instead ...
3047         (enum wp_check_result): They're now values of this new
3048         enumeration.
3049         (watchpoint_check): Change return type to wp_check_result and
3050         parameter type to bpstat.
3051         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3052         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3053         catch_errors.  Reverse logic of watchpoint_check call.
3054         (breakpoint_re_set_one): Now returns void and takes a breakpoint
3055         pointer as parameter.
3056         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3057         * common/common-exceptions.c (throw_exception_sjlj): Update
3058         comments to avoid mentioning catch_errors.
3059         * exceptions.c (catch_errors): Delete.
3060         * exceptions.h: Update comments to avoid mentioning catch_errors.
3061         (catch_errors_ftype, catch_errors): Delete.
3062         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3063         (hook_stop_stub): Delete.
3064         (restore_selected_frame): Change return type to void, and
3065         parameter type to const frame_id &.
3066         (restore_infcall_control_state): Use TRY/CATCH instead of
3067         catch_errors.
3068         * main.c (captured_command_loop): Return void and remove
3069         parameter.  Remove references to catch_errors.
3070         (captured_main): Use TRY/CATCH instead of catch_errors.
3071         * objc-lang.c (objc_submethod_helper_data)
3072         (find_objc_msgcall_submethod_helper): Delete.
3073         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3074         catch_errors.
3075         * record-full.c (record_full_message): Return void.
3076         (record_full_message_args, record_full_message_wrapper): Delete.
3077         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3078         instead of catch_errors.
3079         * solib-aix.c (solib_aix_open_symbol_file_object): Change
3080         parameter type to int.
3081         * solib-darwin.c (open_symbol_file_object): Ditto.
3082         * solib-dsbt.c (open_symbol_file_object): Ditto.
3083         * solib-frv.c (open_symbol_file_object): Ditto.
3084         * solib-svr4.c (open_symbol_file_object): Ditto.
3085         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3086         * solib.c (update_solib_list): Use TRY/CATCH instead of
3087         catch_errors.
3088         * solist.h (struct target_so_ops) <open_symbol_file_object>:
3089         Change type.
3090         * symmisc.c (struct print_symbol_args): Remove.
3091         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3092         (print_symbol): Change type.
3093         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3094         and remove parameters.
3095         (catch_errors): New.
3096         (get_windows_debug_event): Adjust.
3097
3098 2017-10-09  Tom Tromey  <tom@tromey.com>
3099
3100         * mi/mi-main.c (free_splay_tree): Remove.
3101         (list_available_thread_groups): Use splay_tree_up.
3102         * common/gdb_splay_tree.h: New file.
3103
3104 2017-10-09  Tom Tromey  <tom@tromey.com>
3105
3106         * mi/mi-main.c (do_nothing): Remove.
3107         (list_available_thread_groups): Update.
3108
3109 2017-10-09  Pedro Alves  <palves@redhat.com>
3110
3111         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3112         reading registers when switching context.
3113
3114 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
3115
3116         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3117         (fbsd_convert_siginfo): Likewise.
3118         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3119
3120 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
3121
3122         * configure.ac (try_guile_versions): Remove guile-2.2.
3123         * configure: Regenerate.
3124
3125 2017-10-09  Tom Tromey  <tom@tromey.com>
3126
3127         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3128         (COMPILE.pre): Use $(CXX).
3129
3130 2017-10-09  Pedro Alves  <palves@redhat.com>
3131
3132         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3133         Use bool.
3134         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3135         * cp-support.h (cp_remove_params): Now returns a
3136         gdb::unique_xmalloc_ptr.
3137         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3138         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3139         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3140         returning a gdb::unique_xmalloc_ptr.
3141         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3142         * stack.c (find_frame_funname): Adjust to cp_remove_params
3143         returning a gdb::unique_xmalloc_ptr.
3144
3145 2017-10-08  Tom Tromey  <tom@tromey.com>
3146
3147         * dwarf2read.c (dwarf2_get_dwz_file): Use
3148         gdb::unique_xmalloc_ptr.
3149         (find_slot_in_mapped_hash): Likewise.
3150         (dwarf2_physname): Likewise.
3151         (create_dwo_unit_in_dwp_v1): Use std::string.
3152         (create_dwo_unit_in_dwp_v2): Likewise.
3153         (lookup_dwo_cutu): Likewise.
3154         (inherit_abstract_dies): Use std::vector.
3155         (read_array_type): Likewise.
3156         (dwarf_decode_macros): Remove unused declaration.
3157         (unsigned_int_compar): Remove.
3158         (dwarf2_build_psymtabs_hard): Use scoped_restore.
3159         (psymtabs_addrmap_cleanup): Remove.
3160
3161 2017-10-08  Tom Tromey  <tom@tromey.com>
3162
3163         * frame-unwind.c (frame_unwind_try_unwinder): Update.
3164         * frame.h (frame_cleanup_after_sniffer): Declare.
3165         (frame_prepare_for_sniffer): Return void.
3166         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
3167         type of argument.
3168         (frame_prepare_for_sniffer): Return void.
3169
3170 2017-10-08  Tom Tromey  <tom@tromey.com>
3171
3172         * utils.h (make_cleanup_value_free): Remove.
3173         * utils.c (do_value_free, struct cleanup): Remove.
3174         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3175         Use gdb_value_up.
3176         * value.h (struct value_deleter): New.
3177         (gdb_value_up): New typedef.
3178
3179 2017-10-08  Tom Tromey  <tom@tromey.com>
3180
3181         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3182         (make_cleanup_free_search_symbols): Remove.
3183         (search_symbols): Return std::vector.
3184         (symbol_search::compare_search_syms): Now member of
3185         symbol_search.  Change arguments.
3186         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
3187         (symtab_symbol_info, rbreak_command): Update.
3188         * symtab.h (struct symbol_search) <next>: Remove.
3189         Add constructors.
3190         (symbol_search::operator<): New function.
3191         (symbol_search::operator==): New function.
3192         (search_symbols): Remove std::vector.
3193         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3194         (symbol_search::compare_search_syms): Declare.
3195
3196 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3197
3198         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3199         arch/aarch64-insn.o.
3200         Remove one rule.
3201         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3202
3203 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3204
3205         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3206         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3207         arch/arm-linux.o respectively.
3208         * configure.tgt: Likewise.
3209
3210 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3211
3212         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3213         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3214
3215 2017-10-06  Pedro Alves  <palves@redhat.com>
3216
3217         * windows-nat.c: Include <algorithm>.
3218
3219 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3220
3221         * configure.tgt (i386_tobjs): New variable.
3222         (amd64_tobjs): New variable.
3223         Set $cpu_obs and $os_obs.
3224
3225 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3226
3227         * Makefile.in (CONFIG_SRC_SUBDIR): New.
3228         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3229         (clean): Remove object files and dependency files.
3230         (distclean): Remove the directory.
3231         * configure.ac: Invoke AC_CONFIG_COMMANDS.
3232         * configure: Re-generated.
3233         * configure.tgt: Replace amd64.o with arch/amd64.o.
3234
3235 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
3236
3237         PR build/22188
3238         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3239         and SETEND.
3240
3241 2017-10-05  Pedro Alves  <palves@redhat.com>
3242
3243         * linux-nat.c (linux_child_follow_fork): When following the parent
3244         and detaching the child, consult the parent thread's architecture
3245         instead of the child's.
3246
3247 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3248
3249         * ax.h: Do not include "doublest.h".
3250         (union agent_val): Remove.
3251
3252 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3253
3254         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3255         (decimal_to_string): Return std::string object.
3256         (decimal_from_string): Accept std::string object.  Return bool.
3257         (decimal_from_integral, decimal_from_doublest): Remove.
3258         (decimal_from_longest): Add prototype.
3259         (decimal_from_ulongest): Likewise.
3260         (decimal_to_longest): Likewise.
3261         (decimal_from_doublest): Likewise.
3262         * dfp.c: Do not include "gdbtypes.h" or "value.h".
3263         (MAX_DECIMAL_STRING): Move here.
3264         (decimal_to_string): Return std::string object.
3265         (decimal_from_string): Accept std::string object.  Return bool.
3266         (decimal_from_integral): Remove, replace by ...
3267         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3268         (decimal_to_longest): New function.
3269         (decimal_from_floating): Remove, replace by ...
3270         (decimal_from_doublest): ... this new function.
3271         (decimal_to_doublest): Update to new decimal_to_string interface.
3272
3273         * value.c (unpack_long): Use decimal_to_longest.
3274         * valops.c (value_cast): Use decimal_from_doublest instead of
3275         decimal_from_floating.  Use decimal_from_[u]longest isntead of
3276         decimal_from_integral.
3277         * valarith.c (value_args_as_decimal): Likewise.
3278         * valprint.c (print_decimal_floating): Update to new
3279         decimal_to_string interface.
3280         * printcmd.c (printf_decfloat): Likewise.
3281         * c-exp.y (parse_number): Update to new decimal_from_string interface.
3282
3283 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3284
3285         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
3286         * gdbtypes.c: Include "floatformat.h".
3287         * value.c: Likewise.
3288         * m68k-tdep.c: Likewise.
3289
3290         * findvar.c: Do not include "floatformat.h".
3291         * amd64-darwin-tdep.c: Likewise.
3292         * arm-linux-tdep.c: Likewise.
3293         * i386-darwin-tdep.c: Likewise.
3294         * i387-tdep.c: Likewise.
3295         * m68k-linux-tdep.c: Likewise.
3296         * mep-tdep.c: Likewise.
3297         * mips-tdep.c: Likewise.
3298         * nios2-tdep.c: Likewise.
3299         * s390-linux-tdep.c: Likewise.
3300         * sparc-obsd-tdep.c: Likewise.
3301         * sparc-tdep.c: Likewise.
3302         * sparc64-tdep.c: Likewise.
3303         * spu-tdep.c: Likewise.
3304         * tic6x-tdep.c: Likewise.
3305         * tilegx-tdep.c: Likewise.
3306         * vax-tdep.c: Likewise.
3307         * xstormy16-tdep.c: Likewise.
3308         * xtensa-tdep.c: Likewise.
3309
3310         * top.c: Do not include "doublest.h".
3311         * aarch64-tdep.c: Likewise.
3312         * alpha-tdep.c: Likewise.
3313         * arm-linux-tdep.c: Likewise.
3314         * m68k-linux-tdep.c: Likewise.
3315         * tilegx-tdep.c: Likewise.
3316         * xstormy16-tdep.c: Likewise.
3317
3318 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3319
3320         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3321         (mipsn32_fbsd_sigframe): Define.
3322         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3323         for FreeBSD/mipsn32.
3324
3325 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3326
3327         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3328         AT_HWCAP.
3329
3330 2017-10-05  Tristan Gingold  <tgingold@free.fr>
3331
3332         * MAINTAINERS (Misc): Update my email address.
3333
3334 2017-10-04  Pedro Alves  <palves@redhat.com>
3335
3336         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
3337         it instead of target_gdbarch.
3338         (get_remote_state, get_remote_packet_size): Adjust
3339         get_remote_arch_state calls, passing down target_gdbarch
3340         explicitly.
3341         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3342         'gdbarch' and use it instead of target_gdbarch.
3343         (get_memory_packet_size): Adjust get_remote_arch_state calls,
3344         passing down target_gdbarch explicitly.
3345         (struct stop_reply) <arch>: New field.
3346         (remote_parse_stop_reply): Use the stopped thread's architecture,
3347         not the current inferior's.  Save the architecture in the
3348         stop_reply.
3349         (process_stop_reply): Use the stop reply's architecture.
3350         (process_g_packet, remote_fetch_registers)
3351         (remote_prepare_to_store, store_registers_using_G)
3352         (remote_store_registers): Adjust get_remote_arch_state calls,
3353         using the regcache's architecture.
3354         (remote_get_trace_status): Adjust get_remote_arch_state calls,
3355         passing down target_gdbarch explicitly.
3356         * spu-multiarch.c (spu_thread_architecture): Defer to the target
3357         beneath instead of calling target_gdbarch.
3358         * target.c (default_thread_architecture): Use the specified
3359         inferior's architecture, instead of the current inferior's
3360         architecture (via target_gdbarch).
3361
3362 2017-10-04  Pedro Alves  <palves@redhat.com>
3363
3364         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3365         case.
3366         (regcache_print): Handle !target_has_registers here instead.
3367
3368 2017-10-04  Pedro Alves  <palves@redhat.com>
3369
3370         * frame.c (create_test_frame): Delete.
3371         * frame.h (create_test_frame): Delete.
3372         * gdbarch-selftests.c: Include gdbthread.h and target.h.
3373         (class regcache_test): Delete.
3374         (test_target_has_registers, test_target_has_stack)
3375         (test_target_has_memory, test_target_prepare_to_store)
3376         (test_target_store_registers): New functions.
3377         (test_target_ops): New class.
3378         (register_to_value_test): Error out if there's already a
3379         process_stratum (or higher) target pushed.  Create a fuller mock
3380         environment, with mock target_ops, inferior, address space, thread
3381         and inferior_ptid.
3382         * progspace.c (struct address_space): Move to ...
3383         * progspace.h (struct address_space): ... here.
3384         * regcache.h (regcache::~regcache, regcache::raw_write)
3385         [GDB_SELF_TEST]: No longer virtual.
3386
3387 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
3388
3389         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3390
3391 2017-10-04  Pedro Alves  <palves@redhat.com>
3392
3393         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3394         out of 'between TRY and CATCH'.
3395
3396 2017-10-04  Pedro Alves  <palves@redhat.com>
3397
3398         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3399         * common/common-exceptions.h (TRY): Open an outermost scope.
3400         Expand intro comment.
3401         (CATCH): Reindent.
3402         (END_CATCH): Close the outermost scope.
3403         * completer.c (complete_line_internal): Add missing END_CATCH.
3404
3405 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3406
3407         * NEWS (Changes since GDB 8.0): Add entry about new
3408         'set-cwd-on-gdbserver' feature.
3409         (New remote packets): Add entry for QSetWorkingDir.
3410         * common/common-inferior.h (set_inferior_cwd): New prototype.
3411         * infcmd.c (set_inferior_cwd): Remove "static".
3412         (show_cwd_command): Expand text to include remote debugging.
3413         * remote.c: Add PACKET_QSetWorkingDir.
3414         (remote_protocol_features) <QSetWorkingDir>: New entry for
3415         PACKET_QSetWorkingDir.
3416         (extended_remote_set_inferior_cwd): New function.
3417         (extended_remote_create_inferior): Call
3418         "extended_remote_set_inferior_cwd".
3419         (_initialize_remote): Call "add_packet_config_cmd" for
3420         QSetWorkingDir.
3421
3422 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3423
3424         * NEWS (New commands): Mention "set/show cwd".
3425         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3426         "cd" command's help text.
3427         * common/common-inferior.h (get_inferior_cwd): New prototype.
3428         * infcmd.c (inferior_cwd_scratch): New global variable.
3429         (set_inferior_cwd): New function.
3430         (get_inferior_cwd): Likewise.
3431         (set_cwd_command): Likewise.
3432         (show_cwd_command): Likewise.
3433         (_initialize_infcmd): Add "set/show cwd" commands.
3434         * inferior.h (class inferior) <cwd>: New field.
3435         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3436         (fork_inferior): Change inferior's cwd before its execution.
3437         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3438         to CreateProcess.
3439
3440 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3441
3442         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3443         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3444         (COMMON_OBS): Add gdb_tilde_expand.o.
3445         * common/gdb_tilde_expand.c: New file.
3446         * common/gdb_tilde_expand.h: Likewise.
3447
3448 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
3449
3450         * gdbarch.sh (objfile): Remove duplicate declaration.
3451         * gdbarch.h: Regenerate.
3452
3453 2017-10-03  Tom Tromey  <tom@tromey.com>
3454
3455         * utils.c (internal_vproblem): Use string_vprintf.
3456
3457 2017-10-03  Tom Tromey  <tom@tromey.com>
3458
3459         * printcmd.c (info_symbol_command): Use std::string.
3460
3461 2017-10-03  Tom Tromey  <tom@tromey.com>
3462
3463         * top.c (gdb_safe_append_history): Use std::string.
3464
3465 2017-10-03  Tom Tromey  <tom@tromey.com>
3466
3467         * event-top.c (stdin_event_handler): Update.
3468         * main.c (captured_main_1): Update.
3469         * top.h (make_delete_ui_cleanup): Remove.
3470         (struct ui): Add constructor and destructor.
3471         (new_ui, delete_ui): Remove.
3472         * top.c (make_delete_ui_cleanup): Remove.
3473         (new_ui_command): Use std::unique_ptr.
3474         (delete_ui_cleanup): Remove.
3475         (ui::ui): Rename from new_ui.  Update.
3476         (free_ui): Remove.
3477         (ui::~ui): Rename from delete_ui.  Update.
3478
3479 2017-10-03  Tom Tromey  <tom@tromey.com>
3480
3481         * symfile.c (load_progress): Use gdb::byte_vector.
3482
3483 2017-10-03  Tom Tromey  <tom@tromey.com>
3484
3485         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3486         declaration.
3487         * printcmd.c (x_command): Remove unused declaration.
3488         * symfile.c (symbol_file_command): Remove unused declaration.
3489
3490 2017-10-03  Tom Tromey  <tom@tromey.com>
3491
3492         * utils.c (internal_vproblem): Use std::string.
3493         (defaulted_query): Likewise.
3494
3495 2017-10-03  Tom Tromey  <tom@tromey.com>
3496
3497         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3498         * top.c (execute_command_to_string): Update.
3499         * utils.c (make_cleanup_restore_page_info): Remove.
3500         (do_restore_page_info_cleanup): Remove.
3501         (set_batch_flag_and_restore_page_info):
3502         New.
3503         (make_cleanup_restore_page_info): Remove.
3504         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3505         (~set_batch_flag_and_restore_page_info): New
3506         (make_cleanup_restore_uinteger): Remove.
3507         (make_cleanup_restore_integer): Remove.
3508         (struct restore_integer_closure): Remove.
3509         (restore_integer): Remove.
3510         * utils.h (struct set_batch_flag_and_restore_page_info): New
3511         class.
3512         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3513         (make_cleanup_restore_page_info): Remove.
3514         (make_cleanup_restore_uinteger) Remove.
3515         (make_cleanup_restore_integer) Remove.
3516
3517 2017-10-03  Tom Tromey  <tom@tromey.com>
3518
3519         * record-full.h (record_full_gdb_operation_disable_set): Return
3520         scoped_restore_tmpl<int>.
3521         * infrun.c (adjust_pc_after_break): Update.
3522         (handle_signal_stop): Update.
3523         * record-full.c (record_full_gdb_operation_disable_set): Return
3524         scoped_restore_tmpl<int>.
3525         (record_full_wait_1, record_full_insert_breakpoint)
3526         (record_full_remove_breakpoint, record_full_save)
3527         (record_full_goto_insn): Update.
3528
3529 2017-10-02  Tom Tromey  <tom@tromey.com>
3530
3531         PR rust/22236:
3532         * rust-lang.c (rust_val_print_str): New function.
3533         (val_print_struct): Call it.
3534         (rust_subscript): Preserve name of slice type.
3535
3536 2017-10-02  Tom Tromey  <tom@tromey.com>
3537
3538         * rust-lang.c (rust_subscript): Handle slices in
3539         EVAL_AVOID_SIDE_EFFECTS case.
3540
3541 2017-10-02  Tom Tromey  <tom@tromey.com>
3542
3543         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3544
3545 2017-10-02  Tom Tromey  <tom@tromey.com>
3546
3547         * rust-lang.h (rust_slice_type): Add "extern".
3548
3549 2017-10-02  Tom Tromey  <tom@tromey.com>
3550             Pedro Alves  <palves@redhat.com>
3551
3552         * ada-lang.h (ada_exc_info::operator<): Make const.
3553         (ada_exc_info::operator==): Make const.
3554         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3555         Make const.
3556
3557 2017-09-29  Tom Tromey  <tom@tromey.com>
3558
3559         * target.c (read_whatever_is_readable): Change type of "result".
3560         Update.
3561         (free_memory_read_result_vector): Remove.
3562         (read_memory_robust): Change return type.  Update.
3563         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
3564         bin2hex, std::string.
3565         * target.h (memory_read_result_s): Remove typedef.
3566         (free_memory_read_result_vector): Remove.
3567         (read_memory_robust): Return std::vector.
3568
3569 2017-09-29  Tom Tromey  <tom@tromey.com>
3570
3571         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3572
3573 2017-09-29  Tom Tromey  <tom@tromey.com>
3574
3575         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3576         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
3577         operator< and operator==.
3578         (ada_exceptions_list): Return a std::vector.
3579         * ada-lang.c (ada_exc_info::operator<): Rename from
3580         compare_ada_exception_info.
3581         (ada_exc_info::operator==): New.
3582         (sort_remove_dups_ada_exceptions_list): Change type of
3583         "exceptions".
3584         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3585         (ada_add_global_exceptions): Likewise.
3586         (ada_exceptions_list_1): Return a std::vector.
3587         (ada_exceptions_list): Likewise.
3588
3589 2017-09-29  Tom Tromey  <tom@tromey.com>
3590
3591         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3592         'std::set *'.
3593         (print_one_inferior): Update.
3594         (free_vector_of_ints): Remove.
3595         (list_available_thread_groups): Change "ids" to std::set.
3596         (mi_cmd_list_thread_groups): Update.
3597         (struct collect_cores_data) <core>: Now a std::set.
3598         (collect_cores): Update.
3599         (unique): Remove.
3600         (print_one_inferior): Update.
3601
3602 2017-09-29  Tom Tromey  <tom@tromey.com>
3603
3604         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3605         (mi_execute_async_cli_command): Likewise.
3606         (mi_cmd_trace_frame_collected): Use field_fmt.
3607
3608 2017-09-29  Tom Tromey  <tom@tromey.com>
3609
3610         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3611         gdb::byte_vector.
3612
3613 2017-09-29  Tom Tromey  <tom@tromey.com>
3614
3615         * mi/mi-parse.c (mi_parse): Remove unused declaration.
3616
3617 2017-09-29  Tom Tromey  <tom@tromey.com>
3618
3619         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3620
3621 2017-09-29  Tom Tromey  <tom@tromey.com>
3622
3623         * varobj.h (varobj_gen_name): Return std::string.
3624         * varobj.c (varobj_gen_name): Return std::string.
3625         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3626         (mi_cmd_var_delete): Don't copy "name".
3627
3628 2017-09-29  Tom Tromey  <tom@tromey.com>
3629
3630         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3631         (mi_cmd_break_insert_1): Update.
3632
3633 2017-09-29  Tom Tromey  <tom@tromey.com>
3634
3635         * target.h (make_scoped_defer_target_commit_resume): Update.
3636         * target.c (make_scoped_defer_target_commit_resume): Rename from
3637         make_cleanup_defer_target_commit_resume.  Return a
3638         scoped_restore.
3639         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3640
3641 2017-09-29  Tom Tromey  <tom@tromey.com>
3642
3643         * main.c (captured_main_1): Remove unused declaration.
3644         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3645
3646 2017-09-29  Tom Tromey  <tom@tromey.com>
3647
3648         * symtab.c (search_symbols): Remove unused outer cleanup.
3649         (make_source_files_completion_list): Remove unused declaration.
3650
3651 2017-09-29  Tom Tromey  <tom@tromey.com>
3652
3653         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3654
3655 2017-09-29  Tom Tromey  <tom@tromey.com>
3656
3657         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3658         gdb::byte_vector.
3659
3660 2017-09-29  Tom Tromey  <tom@tromey.com>
3661
3662         * complaints.c (vcomplaint): Use std::string.
3663
3664 2017-09-29  Tom Tromey  <tom@tromey.com>
3665
3666         * tracepoint.c (trace_variable_command): Use std::string.
3667         (encode_actions_1): Remove unused declarations.
3668         (create_tsv_from_upload): Use std::string.
3669
3670 2017-09-29  Tom Tromey  <tom@tromey.com>
3671
3672         * cp-support.c (gdb_demangle): Use std::string.
3673
3674 2017-09-29  Tom Tromey  <tom@tromey.com>
3675
3676         * stack.c (parse_frame_specification): Use std::string
3677         (info_frame_command): Use gdb::unique_xmalloc_ptr.
3678
3679 2017-09-29  Tom Tromey  <tom@tromey.com>
3680
3681         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3682
3683 2017-09-29  Tom Tromey  <tom@tromey.com>
3684
3685         * utils.c (vfprintf_maybe_filtered): Use std::string.
3686         (vfprintf_unfiltered): Likewise.
3687
3688 2017-09-29  Tom Tromey  <tom@tromey.com>
3689
3690         * event-top.c (top_level_prompt): Return std::string.
3691         (display_gdb_prompt): Update.
3692
3693 2017-09-29  Tom Tromey  <tom@tromey.com>
3694
3695         * unittests/common-utils-selftests.c (format): New function.
3696         (string_vprintf_tests): New function.
3697         (_initialize_common_utils_selftests): Register new tests.
3698         * common/common-utils.c (string_vprintf): New function.
3699         * common/common-utils.h (string_vprintf): Declare.
3700
3701 2017-09-29  Pedro Alves  <palves@redhat.com>
3702
3703         * common/rsp-low.c (unpack_varlen_hex): Constify.
3704         * common/rsp-low.h (unpack_varlen_hex): Constify.
3705         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3706         Constify.
3707         * remote.c (remote_set_permissions, read_ptid)
3708         (remote_current_thread, remote_get_threads_with_qthreadinfo)
3709         (remote_static_tracepoint_marker_at)
3710         (remote_static_tracepoint_markers_by_strid)
3711         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3712         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3713         (parse_tracepoint_definition, parse_tsv_definition)
3714         (parse_static_tracepoint_marker_definition): Constify.
3715         * tracepoint.h (parse_static_tracepoint_marker_definition)
3716         (parse_trace_status, parse_tracepoint_status)
3717         (parse_tracepoint_definition, parse_tsv_definition): Constify.
3718
3719 2017-09-29  Pedro Alves  <palves@redhat.com>
3720
3721         * remote.c (target_buf, target_buf_size): Delete.
3722         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3723         Use the connection's packet buffer instead.
3724         All callers adjusted.
3725         (_initialize_remote): Remove references to target_buf and
3726         target_buf_size.
3727
3728 2017-09-28  Pedro Alves  <palves@redhat.com>
3729
3730         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3731         unittests/common-utils-selftests.c.
3732         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
3733         (COMMON_OBS): Remove utils-selftests.o.
3734         * utils-selftests.c: Move to ...
3735         * unittests/common-utils-selftests.c: ... here and rename self
3736         test to "string_printf".
3737
3738 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
3739
3740         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
3741         having NULL cus or tus.
3742
3743 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3744
3745         * arm-tdep.c: (convert_from_extended): Remove.
3746         (convert_to_extended): Likewise.
3747         (arm_extract_return_value): Use convert_typed_floating.
3748         (arm_store_return_value): Likewise.
3749
3750         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3751         * sh-tdep.c: Do not include "floatformat.h".
3752         (sh_littlebyte_bigword_type): New function.
3753         (sh_register_convert_to_virtual): Use convert_typed_floating.
3754         (sh_register_convert_to_raw): Likewise.
3755         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3756         (sh64_littlebyte_bigword_type): New function.
3757         (sh64_extract_return_value): Use convert_typed_floating.
3758         (sh64_register_convert_to_virtual): Likewise.
3759         (sh64_register_convert_to_raw): Likewise.
3760
3761 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3762
3763         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
3764         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
3765
3766         * gdbtypes.h (union type_specific): Make field floatformat hold
3767         just a single struct floatformat, not an array.
3768         (floatformat_from_type): Move here.
3769         * gdbtypes.c (floatformat_from_type): Move here.  Update to
3770         changed TYPE_FLOATFORMAT definition.
3771         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
3772         (recursive_dump_type): Likewise.
3773         (init_float_type): Install correct floatformat for byte order.
3774         (arch_float_type): Likewise.
3775
3776 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3777
3778         * gdbtypes.c (init_type): Change incoming argument from
3779         length-in-bytes to length-in-bits.  Assert length is a
3780         multiple of TARGET_CHAR_BITS.
3781         (arch_type, arch_flags_type): Likewise.
3782         (init_integer_type): Update call to init_type.
3783         (init_character_type): Likewise.
3784         (init_boolean_type): Likewise.
3785         (init_float_type): Likewise.
3786         (init_decfloat_type): Likewise.
3787         (init_complex_type): Likewise.
3788         (init_pointer_type): Likewise.
3789         (objfile_type): Likewise.
3790         (arch_integer_type): Update call to arch_type.
3791         (arch_character_type): Likewise.
3792         (arch_boolean_type): Likewise.
3793         (arch_float_type): Likewise.
3794         (arch_decfloat_type): Likewise.
3795         (arch_complex_type): Likewise.
3796         (arch_pointer_type): Likewise.
3797         (gdbtypes_post_init): Likewise.
3798
3799         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
3800         (read_base_type): Likewise.
3801         * mdebugread.c (basic_type): Likewise.
3802         * stabsread.c (dbx_init_float_type): Likewise.
3803         (rs6000_builtin_type): Likewise.
3804         (read_range_type): Likewise.  Also, fix call to init_integer_type
3805         with erroneous length argument.
3806
3807         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
3808         * d-lang.c (build_d_types): Likewise.
3809         * f-lang.c (build_fortran_types): Likewise.
3810         * go-lang.c (build_go_types): Likewise.
3811         * opencl-lang.c (build_opencl_types): Likewise.
3812         * jit.c (finalize_symtab): Likewise.
3813         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
3814         (build_std_type_info_type): Likewise.
3815         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
3816         update call to arch_flags_type.
3817
3818         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
3819         arch_type.
3820         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
3821         * windows-tdep.c (windows_get_tlb_type): Likewise.
3822
3823         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
3824         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3825         * m32c-tdep.c (make_types): Likewise.
3826         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
3827         (rl78_psw_type): Update call to arch_flags_type.
3828         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
3829         * rx-tdep.c (rx_psw_type): Likewise.
3830         (rx_fpsw_type): Likewise.
3831         * sparc-tdep.c (sparc_psr_type): Likewise.
3832         (sparc_fsr_type): Likewise.
3833         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
3834         (sparc64_ccr_type): Likewise.
3835         (sparc64_fsr_type): Likewise.
3836         (sparc64_fprs_type): Likewise.
3837
3838 2017-09-27  Tom Tromey  <tom@tromey.com>
3839
3840         * findcmd.c (find_command): Constify.
3841
3842 2017-09-27  Tom Tromey  <tom@tromey.com>
3843
3844         * ada-tasks.c (task_command_1, task_command): Constify.
3845
3846 2017-09-27  Tom Tromey  <tom@tromey.com>
3847
3848         * symtab.c (maintenance_print_symbol_cache)
3849         (maintenance_flush_symbol_cache)
3850         (maintenance_print_symbol_cache_statistics): Constify.
3851
3852 2017-09-27  Tom Tromey  <tom@tromey.com>
3853
3854         * inferior.c (detach_inferior_command, kill_inferior_command)
3855         (inferior_command): Constify.
3856
3857 2017-09-27  Tom Tromey  <tom@tromey.com>
3858
3859         * regcache.c (regcache_print, maintenance_print_registers)
3860         (maintenance_print_raw_registers)
3861         (maintenance_print_cooked_registers)
3862         (maintenance_print_register_groups)
3863         (maintenance_print_remote_registers): Constify.
3864
3865 2017-09-27  Tom Tromey  <tom@tromey.com>
3866
3867         * printcmd.c (map_display_numbers, undisplay_command)
3868         (enable_disable_display_command, enable_display_command)
3869         (disable_display_command): Constify.
3870
3871 2017-09-27  Tom Tromey  <tom@tromey.com>
3872
3873         * breakpoint.h (delete_command): Don't declare.
3874         * breakpoint.c (delete_command, enable_once_command)
3875         (enable_count_command, enable_delete_command, breakpoint_1)
3876         (maintenance_info_breakpoints, stopin_command, stopat_command)
3877         (delete_command, delete_trace_command, save_breakpoints)
3878         (save_breakpoints_command, save_tracepoints_command): Constify.
3879
3880 2017-09-27  Tom Tromey  <tom@tromey.com>
3881
3882         * macrocmd.c (macro_expand_command, macro_expand_once_command)
3883         (skip_ws, extract_identifier, macro_define_command)
3884         (macro_undef_command, macro_list_command): Constify.
3885
3886 2017-09-27  Tom Tromey  <tom@tromey.com>
3887
3888         * infcmd.c (environment_info, set_environment_command)
3889         (unset_environment_command, path_info, info_proc_cmd_1)
3890         (info_proc_cmd_mappings, info_proc_cmd_stat)
3891         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
3892         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
3893
3894 2017-09-27  Tom Tromey  <tom@tromey.com>
3895
3896         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
3897         Constify.
3898
3899 2017-09-27  Tom Tromey  <tom@tromey.com>
3900
3901         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
3902
3903 2017-09-27  Tom Tromey  <tom@tromey.com>
3904
3905         * demangle.c (demangle_command): Constify.
3906
3907 2017-09-27  Tom Tromey  <tom@tromey.com>
3908
3909         * progspace.c (maintenance_info_program_spaces_command):
3910         Constify.
3911
3912 2017-09-27  Tom Tromey  <tom@tromey.com>
3913
3914         * compile/compile.c (check_raw_argument, compile_file_command)
3915         (compile_code_command, compile_print_command): Constify.
3916
3917 2017-09-27  Tom Tromey  <tom@tromey.com>
3918
3919         * reggroups.c (maintenance_print_reggroups): Constify.
3920
3921 2017-09-27  Tom Tromey  <tom@tromey.com>
3922
3923         * dwarf2read.c (save_gdb_index_command): Constify.
3924
3925 2017-09-27  Tom Tromey  <tom@tromey.com>
3926
3927         * stap-probe.c (info_probes_stap_command): Constify.
3928
3929 2017-09-27  Tom Tromey  <tom@tromey.com>
3930
3931         * fork-child.c (unset_exec_wrapper_command): Constify.
3932
3933 2017-09-27  Tom Tromey  <tom@tromey.com>
3934
3935         * btrace.c (get_uint, get_context_size, no_chunk)
3936         (maint_btrace_packet_history_cmd)
3937         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
3938         (maint_info_btrace_cmd): Constify.
3939
3940 2017-09-27  Tom Tromey  <tom@tromey.com>
3941
3942         * reverse.c (delete_bookmark_command): Constify.
3943
3944 2017-09-27  Tom Tromey  <tom@tromey.com>
3945
3946         * remote.c (set_memory_packet_size)
3947         (set_memory_write_packet_size, show_memory_write_packet_size)
3948         (set_memory_read_packet_size, show_memory_read_packet_size)
3949         (compare_sections_command, packet_command, remote_put_command)
3950         (remote_get_command, remote_delete_command): Constify.
3951
3952 2017-09-27  Tom Tromey  <tom@tromey.com>
3953
3954         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
3955         (set_mipsfpu_double_command, set_mipsfpu_none_command)
3956         (set_mipsfpu_auto_command): Constify.
3957
3958 2017-09-27  Tom Tromey  <tom@tromey.com>
3959
3960         * cli/cli-cmds.h (cd_command): Constify.
3961         * cli/cli-cmds.c (cd_command): Constify.
3962
3963 2017-09-27  Tom Tromey  <tom@tromey.com>
3964
3965         * thread.c (thread_name_command, thread_find_command): Constify.
3966
3967 2017-09-27  Tom Tromey  <tom@tromey.com>
3968
3969         * probe.c (enable_probes_command, disable_probes_command):
3970         Constify.
3971
3972 2017-09-27  Tom Tromey  <tom@tromey.com>
3973
3974         * symfile.c (symbol_file_command): Constify.
3975         * gdbcore.h (deprecated_file_changed_hook): Constify.
3976         * exec.c (deprecated_file_changed_hook, exec_file_command)
3977         (file_command): Constify.
3978         * defs.h (symbol_file_command): Constify.
3979
3980 2017-09-27  Tom Tromey  <tom@tromey.com>
3981
3982         * remote-fileio.c (set_system_call_allowed)
3983         (show_system_call_allowed): Constify.
3984
3985 2017-09-27  Tom Tromey  <tom@tromey.com>
3986
3987         * tracepoint.c (delete_trace_variable_command)
3988         (tfind_end_command, tfind_start_command, tfind_pc_command)
3989         (tfind_tracepoint_command, tfind_line_command)
3990         (tfind_range_command, tfind_outside_command): Constify.
3991
3992 2017-09-27  Tom Tromey  <tom@tromey.com>
3993
3994         * ax-gdb.c (maint_agent_printf_command, agent_command)
3995         (agent_eval_command): Constify.
3996
3997 2017-09-27  Tom Tromey  <tom@tromey.com>
3998
3999         * tracepoint.c (info_scope_command): Constify.
4000         * python/python.c (gdbpy_decode_line): Constify.
4001         * python/py-breakpoint.c (bppy_init): Constify.
4002         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4003         * location.h: (new_linespec_location)
4004         (string_to_event_location_basic, string_to_event_location):
4005         Constify.
4006         * location.c (new_linespec_location)
4007         (string_to_event_location_basic, string_to_event_location):
4008         Constify.
4009         * linespec.h (decode_line_with_current_source)
4010         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4011         * linespec.c (linespec_lex_to_end)
4012         (decode_line_with_current_source)
4013         (decode_line_with_last_displayed): Constify.
4014         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4015         Constify.
4016         * cli/cli-cmds.c (edit_command, list_command): Constify.
4017         * breakpoint.h (until_break_command, watch_command_wrapper)
4018         (awatch_command_wrapper, rwatch_command_wrapper)
4019         (init_ada_exception_breakpoint): Constify.
4020         * breakpoint.c (break_command_1, dprintf_command)
4021         (break_range_command, watch_command_wrapper)
4022         (rwatch_command_wrapper, awatch_command_wrapper)
4023         (until_break_command, init_ada_exception_breakpoint)
4024         (strace_marker_create_sals_from_location, trace_command)
4025         (ftrace_command, strace_command, struct tracepoint): Constify.
4026         * ax-gdb.c (agent_command_1): Constify.
4027         * ada-lang.c (ada_exception_sal): Constify.
4028
4029 2017-09-27  Tom Tromey  <tom@tromey.com>
4030
4031         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4032         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4033         (get_context_size, no_chunk, get_insn_history_modifiers)
4034         (cmd_record_insn_history, get_call_history_modifiers)
4035         (cmd_record_call_history): Constify.
4036
4037 2017-09-27  Tom Tromey  <tom@tromey.com>
4038
4039         * source.c (show_substitute_path_command)
4040         (unset_substitute_path_command, set_substitute_path_command):
4041         Constify.
4042
4043 2017-09-27  Tom Tromey  <tom@tromey.com>
4044
4045         * typeprint.c (maintenance_print_type): Constify.
4046         * maint.c (maintenance_dump_me, maintenance_demangle)
4047         (maintenance_time_display, maintenance_info_sections)
4048         (maintenance_print_statistics, maintenance_deprecate)
4049         (maintenance_undeprecate): Constify.
4050         (maintenance_do_deprecate): Constify.  Use std::string.
4051         (maintenance_selftest): Constify.
4052         * gdbtypes.h (maintenance_print_type): Constify.
4053
4054 2017-09-27  Tom Tromey  <tom@tromey.com>
4055
4056         * hppa-tdep.c (unwind_command): Constify.
4057
4058 2017-09-27  Tom Tromey  <tom@tromey.com>
4059
4060         * target-descriptions.c (unset_tdesc_filename_cmd)
4061         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4062         Constify.
4063
4064 2017-09-27  Tom Tromey  <tom@tromey.com>
4065
4066         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4067
4068 2017-09-27  Tom Tromey  <tom@tromey.com>
4069
4070         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4071
4072 2017-09-27  Tom Tromey  <tom@tromey.com>
4073
4074         * tui/tui-regs.c (tui_reg_command): Constify.
4075
4076 2017-09-27  Tom Tromey  <tom@tromey.com>
4077
4078         * skip.c (skip_file_command, skip_function_command)
4079         (skip_enable_command, skip_disable_command, skip_delete_command):
4080         Constify.
4081
4082 2017-09-27  Tom Tromey  <tom@tromey.com>
4083
4084         * record-btrace.c (cmd_record_btrace_bts_start)
4085         (cmd_record_btrace_pt_start): Constify.
4086
4087 2017-09-27  Tom Tromey  <tom@tromey.com>
4088
4089         * symmisc.c (maintenance_print_symbols)
4090         (maintenance_print_msymbols, maintenance_print_objfiles)
4091         (maintenance_info_symtabs, maintenance_check_symtabs)
4092         (maintenance_expand_symtabs, maintenance_info_line_tables):
4093         Constify.
4094
4095 2017-09-27  Tom Tromey  <tom@tromey.com>
4096
4097         * top.c (new_ui_command): Constify.
4098
4099 2017-09-27  Tom Tromey  <tom@tromey.com>
4100
4101         * symfile.c (add_symbol_file_command)
4102         (remove_symbol_file_command, list_overlays_command)
4103         (map_overlay_command, unmap_overlay_command)
4104         (overlay_auto_command, overlay_manual_command)
4105         (overlay_off_command, overlay_load_command): Constify.
4106
4107 2017-09-27  Tom Tromey  <tom@tromey.com>
4108
4109         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4110         (info_spu_mailbox_command, info_spu_dma_command)
4111         (info_spu_proxydma_command): Constify.
4112
4113 2017-09-27  Tom Tromey  <tom@tromey.com>
4114
4115         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4116
4117 2017-09-27  Tom Tromey  <tom@tromey.com>
4118
4119         * cli/cli-script.c (user_defined_command): Constify.
4120
4121 2017-09-27  Tom Tromey  <tom@tromey.com>
4122
4123         * cli/cli-dump.c (dump_memory_command, dump_value_command)
4124         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4125         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4126         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4127         (dump_binary_value, append_binary_memory, append_binary_value):
4128         Constify.
4129         (struct dump_context) <func>: Constify.
4130         (add_dump_command): Update.
4131
4132 2017-09-27  Tom Tromey  <tom@tromey.com>
4133
4134         * cli/cli-cmds.c (show_version, show_configuration)
4135         (source_command, show_user): Constify.
4136
4137 2017-09-27  Tom Tromey  <tom@tromey.com>
4138
4139         * target.c (maintenance_print_target_stack): Constify.
4140
4141 2017-09-27  Tom Tromey  <tom@tromey.com>
4142
4143         * interps.c (interpreter_exec_cmd): Constify.
4144
4145 2017-09-27  Tom Tromey  <tom@tromey.com>
4146
4147         * record-full.c (cmd_record_full_restore): Constify.
4148
4149 2017-09-27  Tom Tromey  <tom@tromey.com>
4150
4151         * memattr.c (enable_mem_command, disable_mem_command)
4152         (delete_mem_command): Constify.
4153
4154 2017-09-27  Tom Tromey  <tom@tromey.com>
4155
4156         * value.c (show_convenience): Constify.
4157
4158 2017-09-27  Tom Tromey  <tom@tromey.com>
4159
4160         * gdbcore.h (core_file_command): Update.
4161         * corefile.c (core_file_command): Constify.
4162
4163 2017-09-27  Tom Tromey  <tom@tromey.com>
4164
4165         * user-regs.c (maintenance_print_user_registers): Constify.
4166
4167 2017-09-27  Tom Tromey  <tom@tromey.com>
4168
4169         * cp-namespace.c (maintenance_cplus_namespace): Constify.
4170
4171 2017-09-27  Tom Tromey  <tom@tromey.com>
4172
4173         * cp-support.c (first_component_command): Constify.
4174
4175 2017-09-27  Tom Tromey  <tom@tromey.com>
4176
4177         * psymtab.c (maintenance_print_psymbols)
4178         (maintenance_info_psymtabs, maintenance_check_psymtabs):
4179         Constify.
4180
4181 2017-09-27  Tom Tromey  <tom@tromey.com>
4182
4183         * windows-tdep.c (display_tib): Constify.
4184
4185 2017-09-27  Tom Tromey  <tom@tromey.com>
4186
4187         * linux-fork.c (delete_checkpoint_command)
4188         (detach_checkpoint_command): Constify.
4189
4190 2017-09-27  Tom Tromey  <tom@tromey.com>
4191
4192         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4193
4194 2017-09-27  Tom Tromey  <tom@tromey.com>
4195
4196         * arc-tdep.c (dump_arc_instruction_command): Constify.
4197
4198 2017-09-27  Tom Tromey  <tom@tromey.com>
4199
4200         * valprint.c (set_radix, show_radix): Constify.
4201
4202 2017-09-27  Tom Tromey  <tom@tromey.com>
4203
4204         * dtrace-probe.c (info_probes_dtrace_command): Constify.
4205
4206 2017-09-27  Tom Tromey  <tom@tromey.com>
4207
4208         * command.h (not_just_help_class_command): Update.
4209         * cli/cli-decode.h (not_just_help_class_command): Update.
4210         * cli/cli-decode.c (not_just_help_class_command): Constify.
4211
4212 2017-09-27  Tom Tromey  <tom@tromey.com>
4213
4214         * gdb_bfd.c (maintenance_info_bfds): Constify.
4215
4216 2017-09-27  Tom Tromey  <tom@tromey.com>
4217
4218         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4219         overloads.
4220         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
4221         (do_const_cfunc): New function.
4222         (cmd_cfunc_eq): New overload.
4223         (cli_user_command_p): Check do_const_cfunc.
4224         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4225         const_cfunc.
4226         * command.h (add_cmd): Add const overload and no-function
4227         overload.
4228         (set_cmd_cfunc): Add const overload.
4229         (cmd_const_cfunc_ftype): Declare.
4230         (cmd_cfunc_eq): Add const overload.
4231         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4232         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4233         overload.
4234
4235 2017-09-27  Tom Tromey  <tom@tromey.com>
4236
4237         * macroexp.c (get_next_token_for_substitution): New function.
4238         (substitute_args): Call it.  Check for __VA_OPT__.
4239
4240 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4241             Pedro Alves <palves@redhat.com>
4242
4243         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4244         producer_is_icc_lt_14.
4245         (producer_is_icc_lt_14): New function.
4246         (check_producer): Add code for checking version of ICC.
4247         (producer_is_icc): Move to producer.c.
4248         (read_structure_type): Restrict ICC workaround to ICC<14.
4249         * producer.c: Include selftest.h.
4250         (producer_is_icc, producer_parsing_tests, _initialize_producer):
4251         New functions.
4252         * producer.h (producer_is_icc): New declaration.
4253
4254 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4255
4256         * Makefile.in (SFILES): Add producer.c.
4257         (COMMON_OBS): Add producer.o
4258         * amd64-tdep.c (producer.h): Add new include.
4259         * dwarf2read.c (producer.h): Add new include.
4260         * producer.c: New file.
4261         * producer.h: New file.
4262         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4263         producer.c.
4264         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4265         producer.h.
4266
4267 2017-09-26  Matthias Klose  <doko@ubuntu.com>
4268
4269         * configure.ac: Search ncursesw before ncurses.
4270         Check ncursesw/ncurses.h before ncurses/ncurses.h.
4271         * gdb_curses.h: Include <ncursesw/ncurses.h>
4272         * config.in, configure: Regenerate.
4273
4274 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4275
4276         PR gdb/22185
4277         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4278         obsolete.
4279         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4280         Remove i386sol2 support.
4281         * configure.nat <i386sol2>: Remove.
4282         <sol2-64>: Fold into ...
4283         <sol2>: ... this.
4284         Move common settings to default section.
4285         Add sol-thread.o.
4286         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4287         x86_64-*-solaris2.1[0-9]*>: Rename to ...
4288         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4289         <i[34567]86-*-solaris*>: Remove.
4290         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4291
4292         * configure.ac: Remove wctype in libw check.
4293         (_MSE_INT_H): Don't define on Solaris 7-9.
4294         <solaris*>: Remove libthread_db.so.1 check.
4295         * configure: Regenerate.
4296         * config.in: Regenerate.
4297
4298         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4299         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4300         (gdb_ps_size_t): Remove.
4301         Use base types in users.
4302         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4303
4304         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4305
4306 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4307
4308         PR build/22206
4309         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4310         (adi_is_addr_mapped): Likewise.
4311         (PSR_ICC): Don't redefine.
4312         (PSR_IMPL): Likewise.
4313
4314 2017-09-25  Tom Tromey  <tom@tromey.com>
4315
4316         * regcache.c (regcache::dump): Use string_printf.
4317
4318 2017-09-25  Tom Tromey  <tom@tromey.com>
4319
4320         * regcache.c (class regcache_invalidator): New.
4321         (struct register_to_invalidate): Remove.
4322         (make_cleanup_regcache_invalidate): Remove.
4323         (regcache::raw_write): Use regcache_invalidator.
4324
4325 2017-09-25  Tom Tromey  <tom@tromey.com>
4326
4327         * spu-tdep.c (spu2ppu_sniffer): Update.
4328         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4329         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4330         Remove.
4331         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4332         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4333         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4334         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4335         (frame_pop): Update.
4336
4337 2017-09-25  Tom Tromey  <tom@tromey.com>
4338
4339         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4340         * regcache.h (regcache_xfree): Don't declare.
4341         * regcache.c (regcache_xfree): Remove.
4342         (do_regcache_xfree): Use delete.
4343         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4344         * linux-fork.c (free_fork): Use delete.
4345         (fork_save_infrun_state): Likewise.
4346         * jit.c (jit_dealloc_cache): Use delete.
4347         * infrun.c (discard_infcall_suspend_state): Use delete.
4348
4349 2017-09-25  Tom Tromey  <tom@tromey.com>
4350
4351         * regcache.h (regcache_xmalloc): Don't declare.
4352         (regcache_raw_set_cached_value): Update comment.
4353         * regcache.c (regcache_xmalloc): Remove.
4354         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4355         * jit.c (jit_frame_sniffer): Use new.
4356         * frame.c (frame_save_as_regcache): Use new.
4357
4358 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4359
4360         * NEWS: Advertise support for guarded-storage registers on IBM z.
4361
4362 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4363
4364         * s390-linux-nat.c (have_regset_gs): New static variable.
4365         (s390_linux_fetch_inferior_registers): Handle guarded-storage
4366         control block and guarded-storage broadcast control regsets.
4367         (s390_read_description): Detect whether the target has
4368         guarded-storage support, return appropriate tdesc.
4369         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4370         (features/s390x-gs-linux64.c): Likewise.
4371         (struct gdbarch_tdep) <have_gs>: New field.
4372         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4373         (s390_gsbc_regset): New variables.
4374         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4375         and s390_gsbc_regset, if applicable.
4376         (s390_core_read_description): Check whether core file was from a
4377         target with guarded-storage support; include appropriate regsets.
4378         (s390_gdbarch_init): Add registers for guarded-storage support.
4379         (_initialize_s390_tdep): Initialize new target descriptions that
4380         include registers for guarded-storage support.
4381         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4382         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4383         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4384         (S390_NUM_REGS): Adjust macro definition.
4385         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4386         (tdesc_s390x_gs_linux64): New declarations.
4387
4388 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4389
4390         * features/s390-gs-linux64.xml: New file.
4391         * features/s390-gs.xml: New file.
4392         * features/s390-gsbc.xml: New file.
4393         * features/s390x-gs-linux64.xml: New file.
4394         * features/Makefile (WHICH): Add s390-gs-linux64 and
4395         s390x-gs-linux64.
4396         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4397         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4398         * features/s390-gs-linux64.c: New generated file.
4399         * features/s390x-gs-linux64.c: New file.
4400         * regformats/s390-gs-linux64.dat: New file.
4401         * regformats/s390x-gs-linux64.dat: New file.
4402
4403 2017-09-23  Tom Tromey  <tom@tromey.com>
4404
4405         * defs.h (make_cleanup_override_quit_handler): Don't declare.
4406
4407 2017-09-22  Tom Tromey  <tom@tromey.com>
4408
4409         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4410         type to scoped_restore_tmpl.
4411         <scoped_input_handler>: Initialize m_quit_handler directly.
4412
4413 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4414
4415         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4416         (cd_command): Likewise.  Free "current_directory" before
4417         assigning to it.
4418         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4419         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4420         * top.c (gdb_dirbuf): Remove global declaration.
4421         * top.h (gdb_dirbuf): Likewise.
4422
4423 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4424
4425         * gnulib/aclocal.m4: Regenerate.
4426         * gnulib/config.in: Regenerate.
4427         * gnulib/configure: Regenerate.
4428         * gnulib/import/Makefile.am: Regenerate.
4429         * gnulib/import/Makefile.in: Regenerate.
4430         * gnulib/import/assure.h: New file.
4431         * gnulib/import/at-func.c: Likewise
4432         * gnulib/import/chdir-long.c: New file.
4433         * gnulib/import/chdir-long.h: New file.
4434         * gnulib/import/cloexec.c: New file.
4435         * gnulib/import/cloexec.h: New file.
4436         * gnulib/import/close.c: New file.
4437         * gnulib/import/closedir.c: New file.
4438         * gnulib/import/dirent-private.h: New file.
4439         * gnulib/import/dup-safer.c: New file.
4440         * gnulib/import/dup.c: New file.
4441         * gnulib/import/dup2.c: New file.
4442         * gnulib/import/error.c: New file.
4443         * gnulib/import/error.h: New file.
4444         * gnulib/import/exitfail.c: New file.
4445         * gnulib/import/exitfail.h: New file.
4446         * gnulib/import/fchdir.c: New file.
4447         * gnulib/import/fcntl.c: New file.
4448         * gnulib/import/fcntl.in.h: New file.
4449         * gnulib/import/fd-hook.c: New file.
4450         * gnulib/import/fd-hook.h: New file.
4451         * gnulib/import/fd-safer.c: New file.
4452         * gnulib/import/fdopendir.c: New file.
4453         * gnulib/import/filename.h: New file.
4454         * gnulib/import/filenamecat-lgpl.c: New file.
4455         * gnulib/import/filenamecat.h: New file.
4456         * gnulib/import/fstat.c: New file.
4457         * gnulib/import/fstatat.c: New file.
4458         * gnulib/import/getcwd-lgpl.c: New file.
4459         * gnulib/import/getcwd.c: New file.
4460         * gnulib/import/getdtablesize.c: New file.
4461         * gnulib/import/getlogin_r.c: New file.
4462         * gnulib/import/getprogname.c: New file.
4463         * gnulib/import/getprogname.h: New file.
4464         * gnulib/import/gettext.h: New file.
4465         * gnulib/import/glob-libc.h: New file.
4466         * gnulib/import/glob.c: New file.
4467         * gnulib/import/glob.in.h: New file.
4468         * gnulib/import/intprops.h: New file.
4469         * gnulib/import/m4/chdir-long.m4: New file.
4470         * gnulib/import/m4/close.m4: New file.
4471         * gnulib/import/m4/closedir.m4: New file.
4472         * gnulib/import/m4/d-ino.m4: New file.
4473         * gnulib/import/m4/d-type.m4: New file.
4474         * gnulib/import/m4/dup.m4: New file.
4475         * gnulib/import/m4/dup2.m4: New file.
4476         * gnulib/import/m4/error.m4: New file.
4477         * gnulib/import/m4/fchdir.m4: New file.
4478         * gnulib/import/m4/fcntl.m4: New file.
4479         * gnulib/import/m4/fcntl_h.m4: New file.
4480         * gnulib/import/m4/fdopendir.m4: New file.
4481         * gnulib/import/m4/filenamecat.m4: New file.
4482         * gnulib/import/m4/fstat.m4: New file.
4483         * gnulib/import/m4/fstatat.m4: New file.
4484         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4485         * gnulib/import/m4/getcwd-path-max.m4: New file.
4486         * gnulib/import/m4/getcwd.m4: New file.
4487         * gnulib/import/m4/getdtablesize.m4: New file.
4488         * gnulib/import/m4/getlogin_r.m4: New file.
4489         * gnulib/import/m4/getprogname.m4: New file.
4490         * gnulib/import/m4/glob.m4: New file.
4491         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4492         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4493         * gnulib/import/m4/mempcpy.m4: New file.
4494         * gnulib/import/m4/memrchr.m4: New file.
4495         * gnulib/import/m4/mode_t.m4: New file.
4496         * gnulib/import/m4/msvc-inval.m4: New file.
4497         * gnulib/import/m4/msvc-nothrow.m4: New file.
4498         * gnulib/import/m4/open.m4: New file.
4499         * gnulib/import/m4/openat.m4: New file.
4500         * gnulib/import/m4/opendir.m4: New file.
4501         * gnulib/import/m4/readdir.m4: New file.
4502         * gnulib/import/m4/realloc.m4: New file.
4503         * gnulib/import/m4/rewinddir.m4: New file.
4504         * gnulib/import/m4/save-cwd.m4: New file.
4505         * gnulib/import/m4/strdup.m4: New file.
4506         * gnulib/import/m4/strerror.m4: New file.
4507         * gnulib/import/m4/unistd-safer.m4: New file.
4508         * gnulib/import/mempcpy.c: New file.
4509         * gnulib/import/memrchr.c: New file.
4510         * gnulib/import/msvc-inval.c: New file.
4511         * gnulib/import/msvc-inval.h: New file.
4512         * gnulib/import/msvc-nothrow.c: New file.
4513         * gnulib/import/msvc-nothrow.h: New file.
4514         * gnulib/import/open.c: New file.
4515         * gnulib/import/openat-die.c: New file.
4516         * gnulib/import/openat-priv.h: New file.
4517         * gnulib/import/openat-proc.c: New file.
4518         * gnulib/import/openat.c: New file.
4519         * gnulib/import/openat.h: New file.
4520         * gnulib/import/opendir.c: New file.
4521         * gnulib/import/pipe-safer.c: New file.
4522         * gnulib/import/readdir.c: New file.
4523         * gnulib/import/realloc.c: New file.
4524         * gnulib/import/rewinddir.c: New file.
4525         * gnulib/import/save-cwd.c: New file.
4526         * gnulib/import/save-cwd.h: New file.
4527         * gnulib/import/strdup.c: New file.
4528         * gnulib/import/strerror-override.c: New file.
4529         * gnulib/import/strerror-override.h: New file.
4530         * gnulib/import/strerror.c: New file.
4531         * gnulib/import/unistd--.h: New file.
4532         * gnulib/import/unistd-safer.h: New file.
4533         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4534         "getcwd" and "glob".
4535         * ser-tcp.c: Undefine "close" before redefining it.
4536
4537 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4538
4539         * guile/scm-value.c (gdbscm_value_address): Initialize address,
4540         get rid of res_val.
4541
4542 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4543
4544         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4545         <sol2,sparc>: Likewise.
4546         <sol2-64,i386>: Likewise.
4547
4548         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4549         -Wdeprecated-declarations on *-*-solaris*.
4550         * configure: Regenerate.
4551
4552         * procfs.c: Include "nat/inferior.h".
4553         (procfs_info_proc): Fix typo.
4554
4555 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4556
4557         * remote.c (vector): Include.
4558         (struct private_thread_info): Add field, thread_handle.
4559         (free_private_thread_info): Deallocate storage associated with
4560         thread handle.
4561         (get_private_info_thread): Initialize `thread_handle' field.
4562         (struct thread_item): Add field, thread_handle.
4563         (clear_threads_listing_context): Deallocate storage associated
4564         with thread handle.
4565         (start_thread): Add support for "handle" attribute.
4566         (thread_attributes): Add "handle".
4567         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4568         field.
4569         (remote_update_thread_list): Update thread_handle.
4570         (remote_thread_handle_to_thread_info): New function.
4571         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4572
4573 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4574
4575         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4576         function.
4577         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4578         * python/python-internal.h (thread_object_type): Declare.
4579
4580 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4581
4582         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4583         (target_thread_handle_to_thread_info): Declare.
4584         * target.c (target_thread_handle_to_thread_info): New function.
4585         * target-delegates.c: Regenerate.
4586         * gdbthread.h (find_thread_by_handle): Declare.
4587         * thread.c (find_thread_by_handle): New function.
4588         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4589         function.
4590         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4591
4592 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4593
4594         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4595
4596 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4597
4598         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4599
4600 2017-09-21  Yao Qi  <yao.qi@linaro.org>
4601
4602         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4603         to gdb_target_obs.
4604
4605 2017-09-20  Tom Tromey  <tom@tromey.com>
4606
4607         * breakpoint.c (struct counted_command_line): Remove.
4608         (breakpoint_commands): Update.
4609         (alloc_counted_command_line, incref_counted_command_line)
4610         (decref_counted_command_line, do_cleanup_counted_command_line)
4611         (make_cleanup_decref_counted_command_line): Remove.
4612         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4613         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4614         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4615         (save_breakpoints): Update.
4616         * breakpoint.h (counted_command_line): Now a typedef to
4617         shared_ptr.
4618         (struct breakpoint) <commands>: Now a counted_command_line.
4619         (struct bpstats) <command>: Likewise.
4620
4621 2017-09-20  Tom Tromey  <tom@tromey.com>
4622
4623         * breakpoint.c (struct commands_info, do_map_commands_command):
4624         Remove.
4625         (commands_command_1): Update.
4626         (iterate_over_related_breakpoints): Take a function_view.
4627         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4628         (delete_command): Update.
4629         (map_breakpoint_numbers): Take a function_view.
4630         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4631         (disable_command): Update.
4632         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4633         (enable_command): Update.
4634         (struct disp_data, do_enable_breakpoint_disp)
4635         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4636         (do_map_enable_delete_breakpoint): Remove.
4637         (enable_once_command, enable_count_command, enable_delete_command)
4638         (delete_trace_variable_command): Update.
4639
4640 2017-09-20  Tom Tromey  <tom@tromey.com>
4641
4642         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
4643         (bpstat_clear): Use delete.
4644         (bpstats): New constructors.
4645         (bpstat_copy, bpstat_stop_status): Use new.
4646         (dprintf_after_condition_true): Update.
4647         * breakpoint.h (bpstats::bpstats): Add constructors.
4648         (bpstats::~bpstats): Add destructor.
4649
4650 2017-09-20  Pedro Alves  <palves@redhat.com>
4651
4652         * eval.c (make_params): Delete, refactored as ...
4653         (class fake_method): ... this new type's ctor.
4654         (fake_method::~fake_method): New.
4655         (evaluate_subexp_standard): Use 'fake_method'.
4656
4657 2017-09-20  Tom Tromey  <tom@tromey.com>
4658
4659         * windows-nat.c (get_windows_debug_event, windows_wait)
4660         (do_initial_windows_stuff, windows_attach): Update.
4661         * utils.c (vwarning, internal_vproblem): Update.
4662         (ui_unregister_input_event_handler_cleanup)
4663         (prepare_to_handle_input): Remove.
4664         (class scoped_input_handler): New.
4665         (defaulted_query, prompt_for_continue): Update.
4666         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4667         Update.
4668         * top.c (undo_terminal_modifications_before_exit): Update.
4669         * target/target.h (target_terminal_init, target_terminal_inferior)
4670         (target_terminal_ours): Don't declare.
4671         (class target_terminal): New.
4672         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4673         (target_terminal_ours_for_output)
4674         (make_cleanup_restore_target_terminal): Don't declare.
4675         (target_terminal_info): Remove.
4676         * target.c (enum terminal_state, terminal_state): Remove.
4677         (target_terminal::terminal_state): Define.
4678         (target_terminal::init): Rename from target_terminal_init.
4679         (target_terminal::inferior): Rename from
4680         target_terminal_inferior.
4681         (target_terminal::ours): Rename from target_terminal_ours.
4682         (target_terminal::ours_for_output): Rename from
4683         target_terminal_ours_for_output.
4684         (target_terminal::info): New method.
4685         (cleanup_restore_target_terminal)
4686         (make_cleanup_restore_target_terminal): Remove.
4687         * solib.c (handle_solib_event): Update.
4688         * remote.c (remote_serial_quit_handler): Update.
4689         (remote_terminal_inferior, remote_wait_as): Update.
4690         * record-full.c (record_full_wait_1): Update.
4691         * nto-procfs.c (procfs_create_inferior): Update.
4692         * nat/fork-inferior.c (startup_inferior): Update.
4693         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4694         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4695         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4696         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4697         (mi_breakpoint_created, mi_breakpoint_deleted)
4698         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4699         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4700         (mi_user_selected_context_changed, report_initial_inferior):
4701         Update.
4702         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4703         (linux_nat_terminal_inferior): Update.
4704         * infrun.c (follow_fork_inferior)
4705         (handle_vfork_child_exec_or_exit, do_target_resume)
4706         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4707         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4708         Update.
4709         * inflow.c (child_terminal_init, info_terminal_command): Update.
4710         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4711         (attach_command): Update.
4712         * infcall.c (call_thread_fsm_should_stop): Update.
4713         * gnu-nat.c (gnu_attach): Update.
4714         * extension.c (struct active_ext_lang_state)
4715         (restore_active_ext_lang): Update.
4716         * exceptions.c (print_flush): Update.
4717         * event-top.c (async_enable_stdin, default_quit_handler): Update.
4718         (struct quit_handler_cleanup_data, restore_quit_handler)
4719         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4720         Remove.
4721         * cp-support.c (gdb_demangle): Update.
4722         * breakpoint.c (update_inserted_breakpoint_locations)
4723         (insert_breakpoint_locations, handle_jit_event)
4724         (disable_breakpoints_in_unloaded_shlib): Update.
4725         * annotate.c (annotate_breakpoints_invalid)
4726         (annotate_frames_invalid): Update.
4727
4728 2017-09-20  Tom Tromey  <tom@tromey.com>
4729
4730         * main.c (catch_command_errors): Rename from
4731         catch_command_errors_const.
4732         (captured_main_1): Update.
4733
4734 2017-09-20  Pedro Alves  <palves@redhat.com>
4735
4736         * cli/cli-cmds.c (list_command): Use print_sal_location.
4737         (print_sal_location): New function.
4738         (ambiguous_line_spec): Use print_sal_location.
4739         * linespec.c (symbol_to_sal): Record the symbol in the sal.
4740         * symtab.c (find_function_start_sal): Likewise.
4741         * symtab.h (symtab_and_line::symbol): New field.
4742
4743 2017-09-20  Pedro Alves  <palves@redhat.com>
4744
4745         * linespec.c (minsym_found): Handle non-text minsyms.
4746         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
4747
4748 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4749
4750         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
4751         backslash.
4752
4753 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4754
4755         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
4756         vmovups instead vmovaps.
4757         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
4758
4759 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
4760
4761         * NEWS (Changes since GDB 8.0): Add starti.
4762         * infcmd.c (enum run_break): New.
4763         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
4764         case.
4765         (run_command): Use enum run_how.
4766         (start_command): Likewise.
4767         (starti_command): New function.
4768         (RUN_ARGS_HELP): New macro.
4769         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
4770         commands.  Add starti command.
4771
4772 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4773
4774         * Makefile.in (monitor.o): Remove the rule.
4775
4776 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4777
4778         * annotate.h (struct annotate_arg_emitter): Use
4779         DISABLE_COPY_AND_ASSIGN.
4780         * common/refcounted-object.h (refcounted_object): Likewise.
4781         * completer.h (struct completion_result): Likewise.
4782         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
4783         * filename-seen-cache.h (filename_seen_cache): Likewise.
4784         * gdbcore.h (thread_section_name): Likewise.
4785         * gdb_regex.h (compiled_regex): Likewise.
4786         * gdbthread.h (scoped_restore_current_thread): Likewise.
4787         * inferior.h (scoped_restore_current_inferior): Likewise.
4788         * jit.c (jit_reader): Likewise.
4789         * linespec.h (struct linespec_result): Likewise.
4790         * mi/mi-parse.h (struct mi_parse): Likewise.
4791         * nat/fork-inferior.c (execv_argv): Likewise.
4792         * progspace.h (scoped_restore_current_program_space): Likewise.
4793         * python/python-internal.h (class gdbpy_enter): Likewise.
4794         * regcache.h (regcache): Likewise.
4795         * target-descriptions.c (struct tdesc_reg): Likewise.
4796         (struct tdesc_type): Likewise.
4797         (struct tdesc_feature): Likewise.
4798         * ui-out.h (ui_out_emit_type): Likewise.
4799
4800 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
4801
4802         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
4803         label abort_expression.
4804
4805 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4806
4807         * common/buffer.c (buffer_xml_printf): Adjust.
4808         * common/xml-utils.c (xml_escape_text): Change return type to
4809         std::string, update code accordingly.
4810         * common/xml-utils.h (xml_escape_text): Change return type to
4811         std::string.
4812         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
4813         * windows-tdep.c (windows_xfer_shared_library): Adjust.
4814         * unittests/xml-utils-selftests.c (test_xml_escape_text):
4815         Adjust.
4816
4817 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4818
4819         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
4820         (SUBDIR_UNITTESTS_OBS): Add new object file.
4821         * unittests/xml-utils-selftests.c: New file.
4822
4823 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4824
4825         * common/selftest.h (selftest): New struct/interface.
4826         (register_test): Add name parameter, add new overload.
4827         (run_tests): Add filter parameter.
4828         (for_each_selftest_ftype): New typedef.
4829         (for_each_selftest): New declaration.
4830         * common/selftest.c (tests): Change type to
4831         map<string, unique_ptr<selftest>>.
4832         (simple_selftest): New struct.
4833         (register_test): New function.
4834         (register_test): Add name parameter and use it.
4835         (run_tests): Add filter parameter and use it.  Add prints.
4836         Adjust to vector -> map change.
4837         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
4838         registering selftests.
4839         * arm-tdep.c (_initialize_arm_tdep): Likewise.
4840         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
4841         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
4842         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
4843         * findvar.c (_initialize_findvar): Likewise.
4844         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
4845         * maint.c (maintenance_selftest): Update call to run_tests.
4846         (maintenance_info_selftests): New function.
4847         (_initialize_maint_cmds): Register "maintenance info selftests"
4848         command.  Update "maintenance selftest" doc.
4849         * regcache.c (_initialize_regcache): Add names when registering
4850         selftests.
4851         * rust-exp.y (_initialize_rust_exp): Likewise.
4852         * selftest-arch.c (gdbarch_selftest): New struct.
4853         (gdbarch_tests): Remove.
4854         (register_test_foreach_arch): Add name parameter.  Call
4855         register_test.
4856         (tests_with_arch): Remove, move most content to
4857         gdbarch_selftest::operator().
4858         (_initialize_selftests_foreach_arch): Remove.
4859         * selftest-arch.h (register_test_foreach_arch): Add name
4860         parameter.
4861         (run_tests_with_arch): New declaration.
4862         * utils-selftests.c (_initialize_utils_selftests): Add names
4863         when registering selftests.
4864         * utils.c (_initialize_utils): Likewise.
4865         * unittests/array-view-selftests.c
4866         (_initialize_array_view_selftests): Likewise.
4867         * unittests/environ-selftests.c (_initialize_environ_selftests):
4868         Likewise.
4869         * unittests/function-view-selftests.c
4870         (_initialize_function_view_selftests): Likewise.
4871         * unittests/offset-type-selftests.c
4872         (_initialize_offset_type_selftests): Likewise.
4873         * unittests/optional-selftests.c
4874         (_initialize_optional_selftests): Likewise.
4875         * unittests/scoped_restore-selftests.c
4876         (_initialize_scoped_restore_selftests): Likewise.
4877         * NEWS: Document "maintenance selftest" and "maint info
4878         selftests".
4879
4880 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4881
4882         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
4883         scoped_restore.
4884
4885 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4886
4887         * mi/mi-main.c (mi_load_progress): Make uiout variable
4888         a unique_ptr.
4889
4890 2017-09-15  Pedro Alves  <palves@redhat.com>
4891
4892         * compile/compile-c-types.c (convert_enum, convert_int)
4893         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
4894
4895 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
4896
4897         * dwarf2read.c (copy_string): Remove.
4898         (parse_macro_definition): Replace copy_string with savestring.
4899
4900 2017-09-15  Yao Qi  <yao.qi@linaro.org>
4901
4902         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
4903         gdb_target_obs.
4904         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
4905         Likewise.
4906         (i[34567]86-*-linux*): Likewise.
4907
4908 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4909
4910         * dwarf2expr.h (dwarf_stack_value): Add constructor.
4911         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
4912         <stack>: Change type to std::vector.
4913         <stack_len, stack_allocated>: Remove.
4914         <grow_stack>: Remove.
4915         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4916         (dwarf_expr_context::~dwarf_expr_context): Remove.
4917         (dwarf_expr_context::grow_stack): Remove.
4918         (dwarf_expr_context::push): Adjust.
4919         (dwarf_expr_context::pop): Adjust.
4920         (dwarf_expr_context::fetch): Adjust.
4921         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
4922         (dwarf_expr_context::stack_empty_p): Adjust.
4923         (dwarf_expr_context::execute_stack_op): Adjust.
4924
4925 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4926
4927         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
4928         return type to bool.
4929         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
4930
4931 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4932
4933         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
4934         Change type to bool.
4935         (dwarf_stack_value) <in_stack_memory>: Likewise.
4936         (dwarf_expr_context) <push_address>: Change parameter type to
4937         bool.
4938         <fetch_in_stack_memory>: Change return type to bool.
4939         <push>: Change parameter type to bool.
4940         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
4941         to bool.
4942         (dwarf_expr_context::push_address): Likewise.
4943         (dwarf_expr_context::fetch_in_stack_memory): Change return type
4944         to bool.
4945         (dwarf_expr_context::execute_stack_op): Adjust.
4946         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
4947
4948 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4949
4950         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
4951         (struct dwarf_expr_context) <n_pieces>: Remove.
4952         <pieces>: Change type to std::vector.
4953         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4954         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
4955         pieces.
4956         (dwarf_expr_context::add_piece): Adjust.
4957         * dwarf2loc.c (struct piece_closure): Initialize fields.
4958         <n_pieces>: Remove.
4959         <pieces>: Change type to std::vector.
4960         (allocate_piece_closure): Adjust, change parameter to
4961         std::vector rvalue and std::move it to piece_closure.
4962         (rw_pieced_value): Adjust.
4963         (check_pieced_synthetic_pointer): Adjust.
4964         (indirect_synthetic_pointer): Adjust.
4965         (coerce_pieced_ref): Adjust.
4966         (free_pieced_value_closure):  Adjust.  Use delete to free
4967         piece_closure.
4968         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
4969         to allocate_piece_closure.
4970         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
4971
4972 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4973
4974         * probe.h (probe_ops_cp): Remove typedef.
4975         (DEF_VEC_P (probe_ops_cp)): Remove.
4976         (all_probe_ops): Change type to std::vector.
4977         * probe.c (info_probes_for_ops): Adjust to vector change.
4978         (probe_linespec_to_ops): Likewise.
4979         (all_probe_ops): Change type to std::vector.
4980         (_initialize_probe): Adjust to vector change.
4981         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
4982         * elfread.c (elf_get_probes): Likewise.
4983         * stap-probe.c (_initialize_stap_probe): Likewise.
4984
4985 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4986
4987         * probe.h (struct bound_probe): Define constructors.
4988         * probe.c (bound_probe_s): Remove typedef.
4989         (DEF_VEC_O (bound_probe_s)): Remove VEC.
4990         (collect_probes): Change return type to std::vector, remove
4991         cleanup.
4992         (compare_probes): Return bool, change parameter type.  Change
4993         semantic to "less than".
4994         (gen_ui_out_table_header_info): Change parameter to std::vector
4995         and update.
4996         (exists_probe_with_pops): Likewise.
4997         (info_probes_for_ops): Update to std::vector change.
4998         (enable_probes_command): Likewise.
4999         (disable_probes_command): Likewise.
5000
5001 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5002
5003         * probe.h (struct probe_ops) <get_probes>: Change parameter from
5004         vec to std::vector.
5005         * probe.c (parse_probes_in_pspace): Update.
5006         (find_probes_in_objfile): Update.
5007         (find_probe_by_pc): Update.
5008         (collect_probes): Update.
5009         (probe_any_get_probes): Update.
5010         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5011         return type to reference to std::vector.
5012         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5013         std::vector and update.
5014         (dtrace_process_dof): Likewise.
5015         (dtrace_get_probes): Likewise.
5016         * elfread.c (elf_get_probes): Change return type to std::vector,
5017         store an std::vector in bfd_data.
5018         (probe_key_free): Update to std::vector.
5019         * stap-probe.c (handle_stap_probe): Change parameter to
5020         std::vector and update.
5021         (stap_get_probes): Likewise.
5022         * symfile-debug.c (debug_sym_get_probes): Change return type to
5023         std::vector and update.
5024
5025 2017-09-11  Tom Tromey  <tom@tromey.com>
5026
5027         * breakpoint.c (program_breakpoint_here_p): Update.
5028         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5029         from make_show_memory_breakpoints_cleanup.  Return a
5030         scoped_restore_tmpl<int>.
5031         (restore_show_memory_breakpoints): Remove.
5032         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5033         * mem-break.c (memory_validate_breakpoint): Update.
5034         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5035         (ia64_memory_remove_breakpoint): Update.
5036         (ia64_breakpoint_from_pc): Update.
5037         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5038         from make_show_memory_breakpoints_cleanup.
5039
5040 2017-09-11  Tom Tromey  <tom@tromey.com>
5041
5042         * d-namespace.c (d_lookup_symbol): Use std::string.
5043         (find_symbol_in_baseclass): Likewise.
5044
5045 2017-09-11  Tom Tromey  <tom@tromey.com>
5046
5047         * ctf.c (ctf_start): Use std::string.
5048
5049 2017-09-11  Tom Tromey  <tom@tromey.com>
5050
5051         * ada-lang.c (is_known_support_routine): Update.
5052         (ada_unhandled_exception_name_addr_from_raise): Update.
5053         * guile/scm-frame.c (gdbscm_frame_name): Update.
5054         * python/py-frame.c (frapy_name): Update.
5055         (frapy_function): Update.
5056         * stack.h (find_frame_funname): Update.
5057         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5058         (print_frame): Update.
5059
5060 2017-09-11  Tom Tromey  <tom@tromey.com>
5061
5062         * findcmd.c (put_bits): Take a gdb::byte_vector.
5063         (parse_find_args): Return gdb::byte_vector.  "args" now const.
5064         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
5065         cleanups.
5066         (find_command): Update.
5067
5068 2017-09-11  Tom Tromey  <tom@tromey.com>
5069
5070         * cli/cli-script.c (class scoped_restore_hook_in): New.
5071         (clear_hook_in_cleanup): Remove.
5072         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5073         scoped_restore_hook_in.
5074
5075 2017-09-11  Tom Tromey  <tom@tromey.com>
5076
5077         * cli/cli-script.c (restore_interp): Remove.
5078         (read_command_lines): Use scoped_restore_interp.
5079         * interps.c (scoped_restore_interp::set_temp): Rename from
5080         interp_set_temp.
5081         * interps.h (class scoped_restore_interp): New.
5082         (interp_set_temp): Remove.
5083
5084 2017-09-11  Tom Tromey  <tom@tromey.com>
5085
5086         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5087         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5088         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5089         scoped_restore.
5090         (mi_cmd_break_insert_1): Update.
5091         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5092         scoped_restore.
5093
5094 2017-09-11  Tom Tromey  <tom@tromey.com>
5095
5096         * demangle.c (demangle_command): Update.
5097         * breakpoint.c (disable_command): Update.
5098         (enable_command): Update.
5099         (find_location_by_number): Make "number" const.  Use
5100         get_number_trailer.
5101         * cli/cli-utils.c (extract_arg): Return std::string.
5102         * probe.c (parse_probe_linespec): Update.  Change types.
5103         (collect_probes): Take string arguments.
5104         (parse_probe_linespec): Likewise.
5105         (info_probes_for_ops): Update.
5106         (enable_probes_command): Update.
5107         (disable_probes_command): Update.
5108         * break-catch-sig.c (catch_signal_split_args): Update.
5109         * mi/mi-parse.c (mi_parse): Update.
5110
5111 2017-09-11  Tom Tromey  <tom@tromey.com>
5112
5113         * language.h (language_enum): Make argument const.
5114         * language.c (language_enum): Make argument const.
5115
5116 2017-09-11  Tom Tromey  <tom@tromey.com>
5117
5118         * common/common-utils.h (skip_to_space): Remove macro, redeclare
5119         as function.
5120         (skip_to_space): Rename from skip_to_space_const.
5121         * common/common-utils.c (skip_to_space): New function.
5122         (skip_to_space): Rename from skip_to_space_const.
5123         * cli/cli-utils.h (get_number): Rename from get_number_const.
5124         (extract_arg): Rename from extract_arg_const.
5125         * cli/cli-utils.c (get_number): Rename from get_number_const.
5126         (extract_arg): Rename from extract_arg_const.
5127         (number_or_range_parser::get_number): Use ::get_number.
5128         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5129         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5130         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5131         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5132         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5133         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5134         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5135         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5136
5137 2017-09-11  Tom Tromey  <tom@tromey.com>
5138
5139         * python/python.c (do_start_initialization): Use
5140         py-event-types.def to initialize types.
5141         Define all object type structures.
5142         * python/python-internal.h: Don't declare event initialization
5143         functions.
5144         * python/py-threadevent.c (thread_event_object_type): Don't
5145         define.
5146         * python/py-stopevent.c (stop_event_object_type): Don't define.
5147         * python/py-signalevent.c (signal_event_object_type): Don't
5148         declare or define.
5149         * python/py-newobjfileevent.c (new_objfile_event_object_type)
5150         (clear_objfiles_event_object_type): Don't declare or define.
5151         * python/py-infevents.c (inferior_call_pre_event_object_type)
5152         (inferior_call_post_event_object_type)
5153         (register_changed_event_object_type)
5154         (memory_changed_event_object_type): Don't declare or define.
5155         * python/py-inferior.c (new_thread_event_object_type)
5156         (new_inferior_event_object_type)
5157         (inferior_deleted_event_object_type): Don't declare or define.
5158         * python/py-exitedevent.c (exited_event_object_type): Don't
5159         declare or define.
5160         * python/py-evts.c (gdbpy_initialize_py_events): Use
5161         py-all-events.def.
5162         * python/py-events.h (thread_event_object_type): Don't declare.
5163         (events_object): Use py-all-events.def.
5164         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
5165         py-event-types.def.
5166         * python/py-event-types.def: New file.
5167         * python/py-continueevent.c (create_continue_event_object): Don't
5168         declare or define.
5169         * python/py-bpevent.c (breakpoint_event_object_type): Don't
5170         declare or define.
5171         * python/py-all-events.def: New file.
5172
5173 2017-09-11  Tom Tromey  <tom@tromey.com>
5174
5175         * python/py-threadevent.c (create_thread_event_object): Return
5176         gdbpy_ref.
5177         * python/py-stopevent.h (create_stop_event_object)
5178         (create_breakpoint_event_object, create_signal_event_object):
5179         Update.
5180         * python/py-stopevent.c (create_stop_event_object): Return
5181         gdbpy_ref.
5182         (emit_stop_event): Update.
5183         * python/py-signalevent.c (create_signal_event_object): Return
5184         gdbpy_ref.
5185         * python/py-infevents.c (create_inferior_call_event_object):
5186         Update.
5187         * python/py-event.h (create_event_object)
5188         (create_thread_event_object): Update.
5189         * python/py-event.c (create_event_object): Return gdbpy_ref.
5190         * python/py-continueevent.c: Return gdbpy_ref.
5191         * python/py-bpevent.c (create_breakpoint_event_object): Return
5192         gdbpy_ref.
5193
5194 2017-09-11  Tom Tromey  <tom@tromey.com>
5195
5196         PR python/15622:
5197         * NEWS: Add entry.
5198         * python/python.c (do_start_initialization): Initialize new event
5199         types.
5200         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5201         (gdbpy_initialize_inferior_deleted_event)
5202         (gdbpy_initialize_new_thread_event): Declare.
5203         * python/py-threadevent.c (create_thread_event_object): Add option
5204         "thread" parameter.
5205         * python/py-inferior.c (new_thread_event_object_type)
5206         (new_inferior_event_object_type)
5207         (inferior_deleted_event_object_type): Declare.
5208         (python_new_inferior, python_inferior_deleted): New functions.
5209         (add_thread_object): Emit new_thread event.
5210         (gdbpy_initialize_inferior): Attach new functions to corresponding
5211         observers.
5212         (new_thread, new_inferior, inferior_deleted): Define new event
5213         types.
5214         * python/py-evts.c (gdbpy_initialize_py_events): Add new
5215         registries.
5216         * python/py-events.h (events_object) <new_inferior,
5217         inferior_deleted, new_thread>: New fields.
5218         * python/py-event.h (create_thread_event_breakpoint): Add optional
5219         "thread" parameter.
5220
5221 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5222
5223         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5224         check current_ui instead.
5225         (internal_vproblem): Likewise.
5226
5227 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
5228
5229         * thread.c (print_thread_info_1): Remove unnecessary calls to
5230         uiout->is_mi_like_p.
5231
5232 2017-09-09  Tom Tromey  <tom@tromey.com>
5233
5234         * namespace.h (add_using_directive): Update.
5235         * namespace.c (add_using_directive): Change type of excludes to
5236         std::vector.
5237         * dwarf2read.c (read_import_statement): Use std::vector.
5238         (read_namespace): Update.
5239         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5240
5241 2017-09-09  Tom Tromey  <tom@tromey.com>
5242
5243         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5244
5245 2017-09-09  Tom Tromey  <tom@tromey.com>
5246
5247         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5248
5249 2017-09-09  Tom Tromey  <tom@tromey.com>
5250
5251         * stack.c (func_command): Use gdb::def_vector.
5252
5253 2017-09-09  Tom Tromey  <tom@tromey.com>
5254
5255         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5256         ui_out_emit_list, ui_out_emit_tuple.
5257         (mi_cmd_var_update): Likewise.
5258
5259 2017-09-09  Tom Tromey  <tom@tromey.com>
5260
5261         * mi/mi-interp.c (mi_user_selected_context_changed): Use
5262         ui_out_redirect_pop.
5263         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5264         ui_out_redirect_pop.
5265         * utils.c (do_ui_out_redirect_pop)
5266         (make_cleanup_ui_out_redirect_pop): Remove.
5267         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5268         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5269         * ui-out.h (ui_out_redirect_pop): New class.
5270
5271 2017-09-09  Tom Tromey  <tom@tromey.com>
5272
5273         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5274         (list_available_thread_groups, mi_cmd_list_thread_groups)
5275         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5276         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5277         Likewise.
5278
5279 2017-09-09  Tom Tromey  <tom@tromey.com>
5280
5281         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5282         ui_out_emit_tuple.
5283
5284 2017-09-09  Tom Tromey  <tom@tromey.com>
5285
5286         * target.c (flash_erase_command): Use ui_out_emit_tuple.
5287         * stack.c (print_frame): Use ui_out_emit_tuple.
5288         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5289         (info_spu_mailbox_command, info_spu_dma_command)
5290         (info_spu_proxydma_command): Likewise.
5291         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5292         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5293         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5294         ui_out_emit_tuple.
5295         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5296
5297 2017-09-09  Tom Tromey  <tom@tromey.com>
5298
5299         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5300         (class ui_out_emit_table): Update comment.
5301         * ui-out.c (do_cleanup_table_end)
5302         (make_cleanup_ui_out_table_begin_end): Remove.
5303         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5304         (info_spu_dma_cmdlist): Likewise.
5305         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5306         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5307         ui_out_emit_table.
5308
5309 2017-09-09  Tom Tromey  <tom@tromey.com>
5310
5311         * thread.c (print_thread_info_1): Use ui_out_emit_table,
5312         ui_out_emit_list, gdb::optional.
5313
5314 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
5315
5316         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5317         prototype.
5318         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5319         prototype.
5320         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5321         prototype.
5322         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5323         * ada-exp.y: Remove _initialize_ada_exp prototype.
5324         * ada-lang.c: Remove _initialize_ada_language prototype.
5325         * ada-tasks.c: Remove _initialize_tasks prototype.
5326         * addrmap.c: Remove _initialize_addrmap prototype.
5327         * agent.c: Remove _initialize_agent prototype.
5328         * aix-thread.c: Remove _initialize_aix_thread prototype.
5329         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5330         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5331         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5332         prototype.
5333         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5334         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5335         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5336         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5337         prototype.
5338         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5339         prototype.
5340         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5341         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5342         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5343         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5344         prototype.
5345         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5346         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5347         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5348         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5349         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5350         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5351         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5352         prototype.
5353         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5354         prototype.
5355         * annotate.c: Remove _initialize_annotate prototype.
5356         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5357         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5358         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5359         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5360         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5361         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5362         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5363         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5364         prototype.
5365         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5366         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5367         * auto-load.c: Remove _initialize_auto_load prototype.
5368         * auxv.c: Remove _initialize_auxv prototype.
5369         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5370         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5371         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5372         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5373         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5374         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5375         prototype.
5376         * break-catch-throw.c: Remove _initialize_break_catch_throw
5377         prototype.
5378         * breakpoint.c: Remove _initialize_breakpoint prototype.
5379         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5380         * btrace.c: Remove _initialize_btrace prototype.
5381         * charset.c: Remove _initialize_charset prototype.
5382         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5383         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5384         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5385         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5386         * cli/cli-script.c: Remove _initialize_cli_script prototype.
5387         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5388         * coffread.c: Remove _initialize_coffread prototype.
5389         * compile/compile.c: Remove _initialize_compile prototype.
5390         * complaints.c: Remove _initialize_complaints prototype.
5391         * completer.c: Remove _initialize_completer prototype.
5392         * copying.awk: Remove _initialize_copying prototype.
5393         * copying.c: Regenerate.
5394         * core-regset.c: Remove _initialize_core_regset prototype.
5395         * corefile.c: Remove _initialize_core prototype.
5396         * corelow.c: Remove _initialize_corelow prototype.
5397         * cp-abi.c: Remove _initialize_cp_abi prototype.
5398         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5399         * cp-support.c: Remove _initialize_cp_support prototype.
5400         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5401         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5402         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5403         * ctf.c: Remove _initialize_ctf prototype.
5404         * d-lang.c: Remove _initialize_d_language prototype.
5405         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5406         prototype.
5407         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5408         * dbxread.c: Remove _initialize_dbxread prototype.
5409         * dcache.c: Remove _initialize_dcache prototype.
5410         * demangle.c: Remove _initialize_demangler prototype.
5411         * disasm-selftests.c: Remove _initialize_disasm_selftests
5412         prototype.
5413         * disasm.c: Remove _initialize_disasm prototype.
5414         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5415         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5416         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5417         prototype.
5418         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5419         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5420         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5421         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5422         * elfread.c: Remove _initialize_elfread prototype.
5423         * exec.c: Remove _initialize_exec prototype.
5424         * extension.c: Remove _initialize_extension prototype.
5425         * f-lang.c: Remove _initialize_f_language prototype.
5426         * f-valprint.c: Remove _initialize_f_valprint prototype.
5427         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5428         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5429         * filesystem.c: Remove _initialize_filesystem prototype.
5430         * findcmd.c: Remove _initialize_mem_search prototype.
5431         * fork-child.c: Remove _initialize_fork_child prototype.
5432         * frame-base.c: Remove _initialize_frame_base prototype.
5433         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5434         * frame.c: Remove _initialize_frame prototype.
5435         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5436         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5437         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5438         * gcore.c: Remove _initialize_gcore prototype.
5439         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5440         * gdbarch.c: Regenerate.
5441         * gdbarch.sh: Remove _initialize_gdbarch prototype.
5442         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5443         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5444         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5445         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5446         * go-lang.c: Remove _initialize_go_language prototype.
5447         * go32-nat.c: Remove _initialize_go32_nat prototype.
5448         * guile/guile.c: Remove _initialize_guile prototype.
5449         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5450         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5451         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5452         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5453         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5454         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5455         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5456         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5457         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5458         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5459         prototype.
5460         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5461         prototype.
5462         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5463         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5464         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5465         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5466         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5467         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5468         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5469         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5470         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5471         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5472         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5473         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5474         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5475         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5476         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5477         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5478         prototype.
5479         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5480         prototype.
5481         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5482         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5483         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5484         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5485         * infcall.c: Remove _initialize_infcall prototype.
5486         * infcmd.c: Remove _initialize_infcmd prototype.
5487         * inferior.c: Remove _initialize_inferiors prototype.
5488         * inflow.c: Remove _initialize_inflow prototype.
5489         * infrun.c: Remove _initialize_infrun prototype.
5490         * interps.c: Remove _initialize_interpreter prototype.
5491         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5492         * jit.c: Remove _initialize_jit prototype.
5493         * language.c: Remove _initialize_language prototype.
5494         * linux-fork.c: Remove _initialize_linux_fork prototype.
5495         * linux-nat.c: Remove _initialize_linux_nat prototype.
5496         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5497         * linux-thread-db.c: Remove _initialize_thread_db prototype.
5498         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5499         * m2-lang.c: Remove _initialize_m2_language prototype.
5500         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5501         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5502         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5503         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5504         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5505         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5506         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5507         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5508         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5509         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5510         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5511         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5512         * machoread.c: Remove _initialize_machoread prototype.
5513         * macrocmd.c: Remove _initialize_macrocmd prototype.
5514         * macroscope.c: Remove _initialize_macroscope prototype.
5515         * maint.c: Remove _initialize_maint_cmds prototype.
5516         * mdebugread.c: Remove _initialize_mdebugread prototype.
5517         * memattr.c: Remove _initialize_mem prototype.
5518         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5519         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5520         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5521         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5522         * mi/mi-main.c: Remove _initialize_mi_main prototype.
5523         * microblaze-linux-tdep.c: Remove
5524         _initialize_microblaze_linux_tdep prototype.
5525         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5526         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5527         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5528         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5529         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5530         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5531         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5532         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5533         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5534         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5535         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5536         prototype.
5537         * mipsread.c: Remove _initialize_mipsread prototype.
5538         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5539         prototype.
5540         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5541         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5542         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5543         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5544         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5545         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5546         prototype.
5547         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5548         * nto-procfs.c: Remove _initialize_procfs prototype.
5549         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5550         * objc-lang.c: Remove _initialize_objc_language prototype.
5551         * objfiles.c: Remove _initialize_objfiles prototype.
5552         * observer.c: Remove observer_test_first_notification_function,
5553         observer_test_second_notification_function,
5554         observer_test_third_notification_function, and
5555         _initialize_observer prototypes.
5556         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5557         * osabi.c: Remove _initialize_gdb_osabi prototype.
5558         * osdata.c: Remove _initialize_osdata prototype.
5559         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5560         * parse.c: Remove _initialize_parse prototype.
5561         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5562         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5563         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5564         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5565         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5566         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5567         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5568         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5569         * printcmd.c: Remove _initialize_printcmd prototype.
5570         * probe.c: Remove _initialize_probe prototype.
5571         * proc-api.c: Remove _initialize_proc_api prototype.
5572         * proc-events.c: Remove _initialize_proc_events prototype.
5573         * proc-service.c: Remove _initialize_proc_service prototype.
5574         * procfs.c: Remove _initialize_procfs prototype.
5575         * psymtab.c: Remove _initialize_psymtab prototype.
5576         * python/python.c: Remove _initialize_python prototype.
5577         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5578         * record-btrace.c: Remove _initialize_record_btrace prototype.
5579         * record-full.c: Remove _initialize_record_full prototype.
5580         * record.c: Remove _initialize_record prototype.
5581         * regcache.c: Remove _initialize_regcache prototype.
5582         * reggroups.c: Remove _initialize_reggroup prototype.
5583         * remote-notif.c: Remove _initialize_notif prototype.
5584         * remote-sim.c: Remove _initialize_remote_sim prototype.
5585         * remote.c: Remove _initialize_remote prototype.
5586         * reverse.c: Remove _initialize_reverse prototype.
5587         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5588         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5589         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5590         prototype.
5591         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5592         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5593         * rust-exp.y: Remove _initialize_rust_exp prototype.
5594         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5595         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5596         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5597         * score-tdep.c: Remove _initialize_score_tdep prototype.
5598         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5599         prototype.
5600         * ser-go32.c: Remove _initialize_ser_dos prototype.
5601         * ser-mingw.c: Remove _initialize_ser_windows prototype.
5602         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5603         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5604         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5605         * serial.c: Remove _initialize_serial prototype.
5606         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5607         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5608         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5609         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5610         * skip.c: Remove _initialize_step_skip prototype.
5611         * sol-thread.c: Remove _initialize_sol_thread prototype.
5612         * solib-aix.c: Remove _initialize_solib_aix prototype.
5613         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5614         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5615         * solib-frv.c: Remove _initialize_frv_solib prototype.
5616         * solib-spu.c: Remove _initialize_spu_solib prototype.
5617         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5618         * solib-target.c: Remove _initialize_solib_target prototype.
5619         * solib.c: Remove _initialize_solib prototype.
5620         * source.c: Remove _initialize_source prototype.
5621         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5622         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5623         prototype.
5624         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5625         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5626         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5627         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5628         prototype.
5629         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5630         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5631         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5632         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5633         prototype.
5634         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5635         prototype.
5636         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5637         prototype.
5638         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5639         prototype.
5640         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5641         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5642         prototype.
5643         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5644         prototype.
5645         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5646         prototype.
5647         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5648         prototype.
5649         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5650         prototype.
5651         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5652         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5653         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5654         * stabsread.c: Remove _initialize_stabsread prototype.
5655         * stack.c: Remove _initialize_stack prototype.
5656         * stap-probe.c: Remove _initialize_stap_probe prototype.
5657         * std-regs.c: Remove _initialize_frame_reg prototype.
5658         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5659         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5660         * symfile.c: Remove _initialize_symfile prototype.
5661         * symmisc.c: Remove _initialize_symmisc prototype.
5662         * symtab.c: Remove _initialize_symtab prototype.
5663         * target-dcache.c: Remove _initialize_target_dcache prototype.
5664         * target-descriptions.c: Remove _initialize_target_descriptions
5665         prototype.
5666         * thread.c: Remove _initialize_thread prototype.
5667         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5668         prototype.
5669         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5670         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5671         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5672         prototype.
5673         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5674         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5675         * tracefile.c: Remove _initialize_tracefile prototype.
5676         * tracepoint.c: Remove _initialize_tracepoint prototype.
5677         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5678         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5679         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5680         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5681         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5682         * tui/tui-win.c: Remove _initialize_tui_win prototype.
5683         * tui/tui.c: Remove _initialize_tui prototype.
5684         * typeprint.c: Remove _initialize_typeprint prototype.
5685         * user-regs.c: Remove _initialize_user_regs prototype.
5686         * utils.c: Remove _initialize_utils prototype.
5687         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5688         * valarith.c: Remove _initialize_valarith prototype.
5689         * valops.c: Remove _initialize_valops prototype.
5690         * valprint.c: Remove _initialize_valprint prototype.
5691         * value.c: Remove _initialize_values prototype.
5692         * varobj.c: Remove _initialize_varobj prototype.
5693         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5694         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5695         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5696         * windows-nat.c: Remove _initialize_windows_nat,
5697         _initialize_check_for_gdb_ini, and _initialize_loadable
5698         prototypes.
5699         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5700         * xcoffread.c: Remove _initialize_xcoffread prototype.
5701         * xml-support.c: Remove _initialize_xml_support prototype.
5702         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5703         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5704         prototype.
5705         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5706         prototype.
5707         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5708
5709 2017-09-08  Keith Seitz  <keiths@redhat.com>
5710
5711         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5712         field.
5713
5714 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
5715
5716         * f-valprint.c (f_val_print): Remove check for one byte
5717         sized integers. Remove printing of character type.
5718
5719 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
5720             Christoph Weinmann  <christoph.t.weinmann@intel.com>
5721             Bernhard Heckel  <bernhard.heckel@intel.com>
5722
5723         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5724         to maintain proper indentation when printing pointers/refs.
5725
5726 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5727
5728         GDB 8.0.1 released.
5729
5730 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5731
5732         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
5733
5734 2017-09-05  Tom Tromey  <tom@tromey.com>
5735
5736         * parse.c (funcall_chain): Now a std::vector.
5737         (start_arglist, end_arglist): Simplify.
5738         (free_funcalls): Remove.
5739         (parse_exp_in_context_1): Remove cleanup.
5740
5741 2017-09-05  Tom Tromey  <tom@tromey.com>
5742
5743         * go-exp.y (go_parse): Don't create a cleanup.
5744
5745 2017-09-05  Tom Tromey  <tom@tromey.com>
5746
5747         * d-exp.y (PrimaryExpression): Use std::string.
5748         (d_parse): Don't create a cleanup.
5749
5750 2017-09-05  Tom Tromey  <tom@tromey.com>
5751
5752         * utils.c (do_clear_parser_state): Remove.
5753         (make_cleanup_clear_parser_state): Remove.
5754         * p-exp.y (pascal_parse): Use scoped_restore.
5755         * m2-exp.y (m2_parse): Use scoped_restore.
5756         * f-exp.y (f_parse): Use scoped_restore.
5757         * d-exp.y (d_parse): Use scoped_restore.
5758         * c-exp.y (c_parse): Use scoped_restore.
5759         * ada-exp.y (ada_parse): Use scoped_restore.
5760         * utils.h (make_cleanup_clear_parser_state): Remove.
5761
5762 2017-09-06  Keith Seitz  <keiths@redhat.com>
5763
5764         * dwarf2read.c (dw2_linkage_name_attr): New function.
5765         (dw2_linkage_name): New function.
5766         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
5767         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
5768         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
5769
5770 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5771
5772         * config/djgpp/djconfig.sh: Correct shell portability issue.
5773
5774 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5775
5776         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
5777
5778 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5779
5780         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
5781         * NEWS: Mention new FreeBSD/mips native configuration.
5782         * configure.host: Add aarch64*-*-freebsd*.
5783         * configure.nat: Likewise.
5784         * aarch64-fbsd-nat.c: New file.
5785
5786 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5787
5788         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
5789         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
5790         * NEWS: Mention new FreeBSD/aarch64 target.
5791         * configure.tgt: Add aarch64*-*-freebsd*.
5792         * aarch64-fbsd-tdep.c: New file.
5793         * aarch64-fbsd-tdep.h: New file.
5794
5795 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5796
5797         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
5798
5799 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
5800
5801         * parse.c (find_minsym_type_and_address): Don't relocate addresses
5802         of TLS symbols.
5803
5804 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5805
5806         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
5807         call.
5808
5809 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5810
5811         * infrun.c (follow_exec): Call add_thread after
5812         target_find_description.
5813
5814 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5815
5816         * infrun.c (handle_inferior_event_1): When exec'ing, read
5817         stop_pc after follow_exec.
5818
5819 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5820
5821         * remote.c (process_g_packet): Update error message.
5822
5823 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5824
5825         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
5826         targets.
5827
5828 2017-09-05  Pedro Alves  <palves@redhat.com>
5829
5830         * eval.c (eval_call, evaluate_funcall): New functions, factored
5831         out from ...
5832         (evaluate_subexp_standard): ... this.
5833
5834 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5835
5836         * amd64-tdep.c (amd64_target_description): Create target
5837         descriptions.
5838         (_initialize_amd64_tdep): Don't call functions
5839         initialize_tdesc_amd64_*.  Add self tests.
5840         * arch/amd64.c (amd64_create_target_description): Add parameter
5841         is_linux.  Call set_tdesc_osabi if is_linux is true.
5842         * arch/amd64.h (amd64_create_target_description): Update the
5843         declaration.
5844         * arch/i386.c (i386_create_target_description): Add parameter
5845         is_linux.  Call set_tdesc_osabi if is_linux is true.
5846         * arch/i386.h (i386_create_target_description): Update
5847         declaration.
5848         * configure.tgt: Add i386.o to gdb_target_obs.
5849         * features/Makefile (XMLTOC): Remove i386/*.xml.
5850         * features/i386/amd64-avx-avx512.c: Remove.
5851         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
5852         * features/i386/amd64-avx-mpx.c: Remove.
5853         * features/i386/amd64-avx.c: Remove.
5854         * features/i386/amd64-mpx.c: Remove.
5855         * features/i386/amd64.c: Remove.
5856         * features/i386/i386-avx-avx512.c: Remove.
5857         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
5858         * features/i386/i386-avx-mpx.c: Remove.
5859         * features/i386/i386-avx.c: Remove.
5860         * features/i386/i386-mmx.c: Remove.
5861         * features/i386/i386-mpx.c: Remove.
5862         * features/i386/i386.c: Remove.
5863         * i386-tdep.c: Don't include features/i386/i386*.c., include
5864         target-descriptions.h and arch/i386.h.
5865         (i386_target_description): Create target descriptions.
5866         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
5867         functions.  Do self tests.
5868
5869 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5870
5871         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
5872         * features/i386/amd64-avx-avx512-linux.c: Removed.
5873         * features/i386/amd64-avx-linux.c: Removed.
5874         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
5875         * features/i386/amd64-avx-mpx-linux.c: Removed.
5876         * features/i386/amd64-linux.c: Removed.
5877         * features/i386/amd64-mpx-linux.c: Removed.
5878         * features/i386/x32-avx-avx512-linux.c: Removed.
5879         * features/i386/x32-avx-linux.c: Removed.
5880         * features/i386/x32-linux.c: Removed.
5881
5882 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5883
5884         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
5885         features/i386/*.c.
5886         (amd64_linux_read_description): Call
5887         amd64_create_target_description.
5888         * arch/amd64.c: New file.
5889         * arch/amd64.h: New file.
5890         * configure.tgt (x86_64-*-linux*): Append amd64.o.
5891         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
5892
5893 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5894
5895         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
5896         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
5897         (amd64_linux_read_description): Create target descriptions.
5898         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
5899         functions.  Add unit tests.
5900         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
5901         x32-core.xml.
5902         * features/i386/64bit-avx.c: Generated.
5903         * features/i386/64bit-avx512.c: Generated.
5904         * features/i386/64bit-core.c: Generated.
5905         * features/i386/64bit-linux.c: Generated.
5906         * features/i386/64bit-mpx.c: Generated.
5907         * features/i386/64bit-pkeys.c: Generated.
5908         * features/i386/64bit-segments.c: Generated.
5909         * features/i386/64bit-sse.c: Generated.
5910         * features/i386/x32-core.c: Generated.
5911         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
5912         c files for amd64-linux and x32-linux.
5913
5914 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5915
5916         * amd64-linux-tdep.c (amd64_linux_read_description): New
5917         function.
5918         (amd64_linux_core_read_description): Call
5919         amd64_linux_read_description.
5920         (amd64_linux_init_abi): Likewise.
5921         (amd64_x32_linux_init_abi): Likewise.
5922         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
5923         * x86-linux-nat.c (x86_linux_read_description): Call
5924         amd64_linux_read_description.
5925
5926 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5927
5928         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
5929         comments.
5930
5931 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5932
5933         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
5934         * features/i386/i386-avx-avx512-linux.c: Remove.
5935         * features/i386/i386-avx-linux.c: Remove.
5936         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
5937         * features/i386/i386-avx-mpx-linux.c: Remove.
5938         * features/i386/i386-linux.c: Remove.
5939         * features/i386/i386-mmx-linux.c: Remove.
5940         * features/i386/i386-mpx-linux.c: Remove.
5941
5942 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5943
5944         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
5945         (SFILES): Add arch/i386.c.
5946         (HFILES_NO_SRCDIR): Add arch/i386.h.
5947         * arch/i386.c: New file.
5948         * arch/i386.h: New file.
5949         * arch/tdesc.h (allocate_target_description): Declare.
5950         (set_tdesc_architecture): Declare.
5951         (set_tdesc_osabi): Declare.
5952         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
5953         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
5954         include arch/i386.h.
5955         (i386_linux_read_description): Remove code and call
5956         i386_create_target_description.
5957         (set_tdesc_architecture): New function.
5958         (set_tdesc_osabi): New function.
5959         * target-descriptions.h (allocate_target_description): Remove.
5960
5961 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5962
5963         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
5964         * target-descriptions.c (tdesc_create_feature): Likewise, and
5965         adjust code.
5966         * features/i386/32bit-avx.c: Re-generated.
5967         * features/i386/32bit-avx512.c: Re-generated.
5968         * features/i386/32bit-core.c: Re-generated.
5969         * features/i386/32bit-linux.c: Re-generated.
5970         * features/i386/32bit-mpx.c: Re-generated.
5971         * features/i386/32bit-pkeys.c: Re-generated.
5972         * features/i386/32bit-sse.c: Re-generated.
5973
5974 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5975
5976         * regformats/regdef.h (struct reg): Override operator == and !=.
5977
5978 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5979
5980         * arch/tdesc.h: New file.
5981         * regformats/regdat.sh: Generate code using tdesc_create_reg.
5982         * target-descriptions.c: Update comments.
5983         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
5984         declarations.
5985         * features/i386/32bit-avx.c: Re-generated.
5986         * features/i386/32bit-avx512.c: Re-generated.
5987         * features/i386/32bit-core.c: Re-generated.
5988         * features/i386/32bit-linux.c: Re-generated.
5989         * features/i386/32bit-mpx.c: Re-generated.
5990         * features/i386/32bit-pkeys.c: Re-generated.
5991         * features/i386/32bit-sse.c: Re-generated.
5992
5993 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5994
5995         * regformats/regdat.sh: Update generated code.
5996
5997 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5998
5999         * regformats/regdat.sh: Adjust code order.
6000
6001 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6002
6003         * expprint.c (dump_subexp_body_standard): Use constant format
6004         string in fprintf_filtered call.
6005
6006 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6007
6008         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6009         NetBSD/i386.
6010         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6011
6012 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6013
6014         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6015
6016 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6017
6018         * bsd-kvm.o: Define _KMEMUSER.
6019         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6020         * configure: Regenerate.
6021
6022 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6023
6024         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6025         * i386-fbsd-nat.c: Likewise.
6026
6027 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6028
6029         * unittests/array-view-selftests.c: Add include of <array>.
6030
6031 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6032
6033         * spu-tdep.c (flush_ea_cache): Add missing argument to
6034         call_function_by_hand.
6035
6036 2017-09-04  Pedro Alves  <palves@redhat.com>
6037
6038         * NEWS (Safer support for debugging with no debug info): New.
6039
6040 2017-09-04  Pedro Alves  <palves@redhat.com>
6041
6042         * c-exp.y (function_method, function_method_void): Add current
6043         instance flags to TYPE_INSTANCE.
6044         * dwarf2read.c (check_modifier): New.
6045         (compute_delayed_physnames): Assert that only C++ adds delayed
6046         physnames.  Mark fn_fields as const/volatile depending on
6047         physname.
6048         * eval.c (make_params): New type_instance_flags parameter.  Use
6049         it as the new type's instance flags.
6050         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6051         flags element and pass it to make_params.
6052         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6053         instance flags element.
6054         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6055         * gdbtypes.h: Include "enum-flags.h".
6056         (type_instance_flags): New enum-flags type.
6057         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6058         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6059         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6060         (follow_type_instance_flags): New function.
6061         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6062         * parser-defs.h (follow_type_instance_flags): Declare.
6063         * valops.c (value_struct_elt_for_reference): const/volatile must
6064         match too.
6065
6066 2017-09-04  Pedro Alves  <palves@redhat.com>
6067
6068         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6069         function/method scopes; lookup the nested name as a function local
6070         static variable.
6071
6072 2017-09-04  Pedro Alves  <palves@redhat.com>
6073
6074         (%type <voidval>): Add function_method.
6075         * c-exp.y (exp): New production for calls with no arguments.
6076         (function_method, function_method_void_or_typelist): New
6077         productions.
6078         (exp): New production for "method()::static_var".
6079         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6080         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6081         Handle OP_FUNC_STATIC_VAR.
6082         * parse.c (operator_length_standard):
6083         Handle OP_FUNC_STATIC_VAR.
6084
6085 2017-09-04  Pedro Alves  <palves@redhat.com>
6086
6087         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6088         handling.
6089         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6090         Ditto.
6091         * parse.c (operator_length_standard, operator_check_standard):
6092         Ditto.
6093         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6094
6095 2017-09-04  Pedro Alves  <palves@redhat.com>
6096
6097         * ax-gdb.c: Include "typeprint.h".
6098         (gen_expr_for_cast): New function.
6099         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6100         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6101         type is unknown.
6102         * dwarf2read.c (new_symbol_full): Fallback to int instead of
6103         nodebug_data_symbol.
6104         * eval.c: Include "typeprint.h".
6105         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6106         Error out if symbol has unknown type.
6107         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6108         evaluate_subexp_for_cast.
6109         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6110         OP_VAR_MSYM_VALUE.
6111         (evaluate_subexp_for_cast): New function.
6112         * gdbtypes.c (init_nodebug_var_type): New function.
6113         (objfile_type): Use it to initialize types of variables with no
6114         debug info.
6115         * typeprint.c (error_unknown_type): New.
6116         * typeprint.h (error_unknown_type): New declaration.
6117         * compile/compile-c-types.c (convert_type_basic): Handle
6118         TYPE_CODE_ERROR; warn and fallback to int for variables with
6119         unknown type.
6120
6121 2017-09-04  Pedro Alves  <palves@redhat.com>
6122
6123         * eval.c (evaluate_var_value): New function, factored out from ...
6124         (evaluate_subexp_standard): ... here.
6125
6126 2017-09-04  Pedro Alves  <palves@redhat.com>
6127
6128         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6129         Remove useless assignments to 'op'.
6130
6131 2017-09-04  Pedro Alves  <palves@redhat.com>
6132
6133         * eval.c (eval_skip_value): New function.
6134         (evaluate_subexp_standard): Use it.
6135
6136 2017-09-04  Pedro Alves  <palves@redhat.com>
6137
6138         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6139         function name from symbol/minsym and pass it to
6140         error_call_unknown_return_type.
6141
6142 2017-09-04  Pedro Alves  <palves@redhat.com>
6143
6144         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6145         * ax-gdb.c (gen_msym_var_ref): New function.
6146         (gen_expr): Handle OP_VAR_MSYM_VALUE.
6147         * eval.c (evaluate_var_msym_value): New function.
6148         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6149         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6150         to call_function_by_hand.
6151         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6152         Handle OP_VAR_MSYM_VALUE.
6153         (union exp_element) <msymbol>: New field.
6154         * minsyms.h (struct type): Forward declare.
6155         (find_minsym_type_and_address): Declare.
6156         * parse.c (write_exp_elt_msym): New function.
6157         (write_exp_msymbol): Delete, refactored as ...
6158         (find_minsym_type_and_address): ... this new function.
6159         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6160         (operator_length_standard, operator_check_standard): Handle
6161         OP_VAR_MSYM_VALUE.
6162         * std-operator.def (OP_VAR_MSYM_VALUE): New.
6163
6164 2017-09-04  Pedro Alves  <palves@redhat.com>
6165
6166         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6167         TYPE_GNU_IFUNC specially here.  Throw error if return type is
6168         unknown.
6169         * ada-typeprint.c (print_func_type): Handle functions with unknown
6170         return type.
6171         * c-typeprint.c (c_type_print_base): Handle functions and methods
6172         with unknown return type.
6173         * compile/compile-c-symbols.c (convert_symbol_bmsym)
6174         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6175         * compile/compile-c-types.c: Include "objfiles.h".
6176         (convert_func): For functions with unknown return type, warn and
6177         default to int.
6178         * compile/compile-object-run.c (compile_object_run): Adjust call
6179         to call_function_by_hand_dummy.
6180         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6181         call_function_by_hand.
6182         * eval.c (evaluate_subexp_standard): Adjust calls to
6183         call_function_by_hand.  Handle functions and methods with unknown
6184         return type.  Pass expect_type to call_function_by_hand.
6185         * f-typeprint.c (f_type_print_base): Handle functions with unknown
6186         return type.
6187         * gcore.c (call_target_sbrk): Adjust call to
6188         call_function_by_hand.
6189         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6190         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
6191         an integer address type instead of nodebug.
6192         * guile/scm-value.c (gdbscm_value_call): Adjust call to
6193         call_function_by_hand.
6194         * infcall.c (error_call_unknown_return_type): New function.
6195         (call_function_by_hand): New "default_return_type" parameter.
6196         Pass it down.
6197         (call_function_by_hand_dummy): New "default_return_type"
6198         parameter.  Use it instead of defaulting to int.  If there's no
6199         default and the return type is unknown, throw an error.  If
6200         there's a default return type, and the called function has no
6201         debug info, then assume the function is prototyped.
6202         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6203         New "default_return_type" parameter.
6204         (error_call_unknown_return_type): New declaration.
6205         * linux-fork.c (call_lseek): Cast return type of lseek.
6206         (inferior_call_waitpid, checkpoint_command): Adjust calls to
6207         call_function_by_hand.
6208         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6209         calls to call_function_by_hand.
6210         * m2-typeprint.c (m2_procedure): Handle functions with unknown
6211         return type.
6212         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6213         (value_nsstring, print_object_command): Adjust calls to
6214         call_function_by_hand.
6215         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6216         functions with unknown return type.
6217         (pascal_type_print_func_varspec_suffix): New function.
6218         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6219         TYPE_CODE_METHOD>: Use it.
6220         * python/py-value.c (valpy_call): Adjust call to
6221         call_function_by_hand.
6222         * rust-lang.c (rust_evaluate_funcall): Adjust call to
6223         call_function_by_hand.
6224         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6225         call_function_by_hand.
6226         * valops.c (value_allocate_space_in_inferior): Adjust call to
6227         call_function_by_hand.
6228         * typeprint.c (type_print_unknown_return_type): New function.
6229         * typeprint.h (type_print_unknown_return_type): New declaration.
6230
6231 2017-09-04  Pedro Alves  <palves@redhat.com>
6232
6233         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6234         types with more than one parameter as prototyped.
6235
6236 2017-09-04  Pedro Alves  <palves@redhat.com>
6237
6238         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6239         (disassemble_command): Use gdb_disassembly_flags instead of bare
6240         int.
6241         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6242         (dump_insns, do_mixed_source_and_assembly_deprecated)
6243         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6244         Use gdb_disassembly_flags instead of bare int.
6245         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6246         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6247         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6248         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
6249         (enum gdb_disassembly_flag): ... values of this new enumeration.
6250         (gdb_disassembly_flags): Define.
6251         (gdb_disassembly)
6252         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6253         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6254         gdb_disassembly_flags instead of bare int.
6255         * record-btrace.c (btrace_insn_history)
6256         (record_btrace_insn_history, record_btrace_insn_history_range)
6257         (record_btrace_insn_history_from): Use gdb_disassembly_flags
6258         instead of bare int.
6259         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6260         Use gdb_disassembly_flags instead of bare int.
6261         * target-debug.h (target_debug_print_gdb_disassembly_flags):
6262         Define.
6263         * target-delegates.c: Regenerate.
6264         * target.c (target_insn_history, target_insn_history_from)
6265         (target_insn_history_range): Use gdb_disassembly_flags instead of
6266         bare int.
6267         * target.h: Include "disasm.h".
6268         (struct target_ops) <to_insn_history, to_insn_history_from,
6269         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6270         int.
6271         (target_insn_history, target_insn_history_from)
6272         (target_insn_history_range): Use gdb_disassembly_flags instead of
6273         bare int.
6274
6275 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6276
6277         * cli/cli-script.c (build_command_line): For if/while commands,
6278         check whether args is empty.
6279
6280 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6281
6282         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6283         (enum command_control_type): Likewise.
6284         (struct command_line): Likewise.
6285         (free_command_lines): Likewise.
6286         (struct command_lines_deleter): Likewise.
6287         (command_line_up): Likewise.
6288         (read_command_lines): Likewise.
6289         (read_command_lines_1): Likewise.
6290         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6291         (enum command_control_type): Likewise.
6292         (struct command_line): Likewise.
6293         (free_command_lines): Likewise.
6294         (struct command_lines_deleter): Likewise.
6295         (command_line_up): Likewise.
6296         (read_command_lines): Likewise.
6297         (read_command_lines_1): Likewise.
6298         * breakpoint.h: Include cli/cli-script.h.
6299         * extension-priv.h: Likewise.
6300         * gdbcmd.h: Likewise.
6301
6302 2017-09-04  Pedro Alves  <palves@redhat.com>
6303
6304         * ada-lang.c (is_known_support_routine): Move sal declaration to
6305         where it is initialized.
6306         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6307         (parse_breakpoint_sals, decode_static_tracepoint_spec)
6308         (clear_command, update_static_tracepoint): Remove init_sal
6309         references.  Move declarations closer to initializations.
6310         * cli/cli-cmds.c (list_command): Move sal declarations closer to
6311         initializations.
6312         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6313         references.  Move sal declarations closer to initializations.
6314         * frame.c (find_frame_sal): Return a symtab_and_line via function
6315         return instead of output parameter.  Remove init_sal references.
6316         * frame.h (find_frame_sal): Return a symtab_and_line via function
6317         return instead of output parameter.
6318         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6319         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6320         instead of memset.
6321         (gdbscm_find_pc_line): Remove init_sal reference.
6322         * infcall.c (call_function_by_hand_dummy): Remove init_sal
6323         references.  Move declarations closer to initializations.
6324         * infcmd.c (set_step_frame): Update.  Move declarations closer to
6325         initializations.
6326         (finish_backward): Remove init_sal references.  Move declarations
6327         closer to initializations.
6328         * infrun.c (process_event_stop_test, handle_step_into_function)
6329         (insert_hp_step_resume_breakpoint_at_frame)
6330         (insert_step_resume_breakpoint_at_caller): Likewise.
6331         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6332         (symbol_to_sal): Likewise.
6333         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6334         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6335         to its initialization.
6336         * reverse.c (save_bookmark_command): Use new/delete.  Remove
6337         init_sal references.  Move declarations closer to initializations.
6338         * source.c (get_current_source_symtab_and_line): Remove brace
6339         initialization.
6340         (set_current_source_symtab_and_line): Now takes the sal by const
6341         reference.  Remove brace initialization.
6342         (line_info): Remove init_sal reference.
6343         * source.h (set_current_source_symtab_and_line): Now takes a
6344         symtab_and_line via const reference.
6345         * stack.c (set_current_sal_from_frame): Adjust.
6346         (print_frame_info): Adjust.
6347         (get_last_displayed_sal): Return the sal via function return
6348         instead of via output parameter.  Simplify.
6349         (frame_info): Adjust.
6350         * stack.h (get_last_displayed_sal): Return the sal via function
6351         return instead of via output parameter.
6352         * symtab.c (init_sal): Delete.
6353         (find_pc_sect_line): Remove init_sal references.  Move
6354         declarations closer to initializations.
6355         (find_function_start_sal): Remove init_sal references.  Move
6356         declarations closer to initializations.
6357         * symtab.h (struct symtab_and_line): In-class initialize all
6358         fields.
6359         * tracepoint.c (set_traceframe_context)
6360         (print_one_static_tracepoint_marker): Remove init_sal references.
6361         Move declarations closer to initializations.
6362         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6363         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
6364         declarations closer to initializations.
6365         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6366         init_sal references.  Adjust.
6367
6368 2017-09-04  Pedro Alves  <palves@redhat.com>
6369
6370         * ax-gdb.c (agent_command_1): Use range-for.
6371         * break-catch-throw.c (re_set_exception_catchpoint): Update.
6372         * breakpoint.c: Include "common/array-view.h".
6373         (init_breakpoint_sal, create_breakpoint_sal): Change sals
6374         parameter from struct symtabs_and_lines to
6375         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
6376         (breakpoint_sals_to_pc): Change sals parameter from struct
6377         symtabs_and_lines to std::vector reference.
6378         (check_fast_tracepoint_sals): Change sals parameter from struct
6379         symtabs_and_lines to std::array_view.  Use range-for.
6380         (decode_static_tracepoint_spec): Return a std::vector instead of
6381         symtabs_and_lines.  Update.
6382         (create_breakpoint): Update.
6383         (break_range_command, until_break_command, clear_command): Update.
6384         (base_breakpoint_decode_location, bkpt_decode_location)
6385         (bkpt_probe_create_sals_from_location)
6386         (bkpt_probe_decode_location, tracepoint_decode_location)
6387         (tracepoint_probe_decode_location)
6388         (strace_marker_create_sals_from_location): Return a std::vector
6389         instead of symtabs_and_lines.
6390         (strace_marker_create_breakpoints_sal): Update.
6391         (strace_marker_decode_location): Return a std::vector instead of
6392         symtabs_and_lines.  Update.
6393         (update_breakpoint_locations): Change struct symtabs_and_lines
6394         parameters to gdb::array_view.  Adjust.
6395         (location_to_sals): Return a std::vector instead of
6396         symtabs_and_lines.  Update.
6397         (breakpoint_re_set_default): Use std::vector instead of struct
6398         symtabs_and_lines.
6399         (decode_location_default): Return a std::vector instead of
6400         symtabs_and_lines.  Update.
6401         * breakpoint.h: Include "common/array-view.h".
6402         (struct breakpoint_ops) <decode_location>: Now returns a
6403         std::vector instead of returning a symtabs_and_lines via output
6404         parameter.
6405         (update_breakpoint_locations): Change sals parameters to use
6406         gdb::array_view.
6407         * cli/cli-cmds.c (edit_command, list_command): Update to use
6408         std::vector and gdb::array_view.
6409         (ambiguous_line_spec): Adjust to use gdb::array_view and
6410         range-for.
6411         (compare_symtabs): Rename to ...
6412         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
6413         const reference and adjust.
6414         (filter_sals): Rewrite using std::vector and standard algorithms.
6415         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6416         (jump_command): Update to use std::vector.
6417         * linespec.c (struct linespec_state) <canonical_names>: Update
6418         comment.
6419         (add_sal_to_sals_basic): Delete.
6420         (add_sal_to_sals, filter_results, convert_results_to_lsals)
6421         (decode_line_2, create_sals_line_offset)
6422         (convert_address_location_to_sals, convert_linespec_to_sals)
6423         (convert_explicit_location_to_sals, parse_linespec)
6424         (event_location_to_sals, decode_line_full, decode_line_1)
6425         (decode_line_with_current_source)
6426         (decode_line_with_last_displayed, decode_objc)
6427         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6428         (linespec_result::~linespec_result): Adjust to use std::vector
6429         instead of symtabs_and_lines.
6430         * linespec.h (linespec_sals::sals): Now a std::vector.
6431         (struct linespec_result): Use std::vector, bool, and in-class
6432         initialization.
6433         (decode_line_1, decode_line_with_current_source)
6434         (decode_line_with_last_displayed): Return std::vector.
6435         * macrocmd.c (info_macros_command): Use std::vector.
6436         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6437         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6438         std::vector.
6439         * probe.h (parse_probes): Return a std::vector.
6440         * python/python.c (gdbpy_decode_line): Use std::vector and
6441         gdb::array_view.
6442         * source.c (select_source_symtab, line_info): Use std::vector.
6443         * stack.c (func_command): Use std::vector.
6444         * symtab.h (struct symtabs_and_lines): Delete.
6445         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6446
6447 2017-09-04  Pedro Alves  <palves@redhat.com>
6448
6449         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6450         unittests/array-view-selftests.c.
6451         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6452         * common/array-view.h: New file.
6453         * unittests/array-view-selftests.c: New file.
6454
6455 2017-09-04  Pedro Alves  <palves@redhat.com>
6456
6457         * cli/cli-cmds.c (edit_command): Pass message to
6458         ambiguous_line_spec.
6459         (list_command): Pass message to ambiguous_line_spec.  Say
6460         "first"/"last" instead of "start" and "end" to be consistent with
6461         the manual.
6462         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
6463         them to print formatted message.
6464
6465 2017-09-04  Pedro Alves  <palves@redhat.com>
6466
6467         * btrace.c (ftrace_add_pt): Pass btrace_insn to
6468         ftrace_update_insns by reference instead of pointer.
6469
6470 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6471
6472         * i386-go32-tdep.c: Include x86-xstate.h.
6473         (i386_go32_init_abi): Call i386_target_description.
6474         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6475         if xcr0 is X86_XSTATE_X87_MASK.
6476         * i386-tdep.h (tdesc_i386): Remove the declaration.
6477         (tdesc_i386_mmx): Likewise.
6478
6479 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6480
6481         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6482         X86_XSTATE_SSE_MASK instead of 0.
6483
6484 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6485
6486         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6487         i386_target_description.
6488         * i386-fbsd-nat.c (i386fbsd_read_description): Call
6489         i386_target_description.
6490         * i386-tdep.c (i386_gdbarch_init): Likewise.
6491
6492 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6493
6494         * amd64-darwin-tdep.c: Include "x86-xstate.h".
6495         (x86_darwin_init_abi_64): Call amd64_target_description.
6496         * amd64-dicos-tdep.c: Likewise.
6497         * amd64-fbsd-nat.c: Likewise.
6498         * amd64-fbsd-tdep.c: Likewise.
6499         * amd64-nbsd-tdep.c: Likewise.
6500         * amd64-obsd-tdep.c: Likewise.
6501         * amd64-sol2-tdep.c: Likewise.
6502         * amd64-windows-tdep.c: Likewise.
6503         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6504
6505 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6506
6507         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6508         (btrace_function) <insn>: Change type to use std::vector.
6509         * btrace.c (ftrace_debug, ftrace_call_num_insn,
6510         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6511         ftrace_update_insns, ftrace_compute_global_level_offset,
6512         btrace_stitch_bts, btrace_clear, btrace_insn_get,
6513         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6514         change to std::vector.
6515         (ftrace_update_insns): Adjust to change to std::vector, change
6516         type of INSN parameter.
6517         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6518         * record-btrace.c (btrace_call_history_insn_range,
6519         btrace_compute_src_line_range,
6520         record_btrace_frame_prev_register): Adjust to change to
6521         std::vector.
6522         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6523         to change to std::vector.
6524
6525 2017-09-03  Tom Tromey  <tom@tromey.com>
6526
6527         * corefile.c (reopen_exec_file): Use std::string.
6528
6529 2017-09-03  Tom Tromey  <tom@tromey.com>
6530
6531         * compile/compile.c (compile_register_name_mangled): Return
6532         std::string.
6533         * compile/compile-loc2c.c (pushf_register_address): Update.
6534         (pushf_register): Update.
6535         * compile/compile-c-types.c (convert_array): Update.
6536         * compile/compile-c-symbols.c (generate_vla_size): Update.
6537         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6538         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6539         (convert_one_symbol): Update.
6540         (generate_c_for_for_one_variable): Update.
6541         * compile/compile-c-support.c (c_get_range_decl_name): Return a
6542         std::string.
6543         (generate_register_struct): Update.
6544         * compile/compile-internal.h (c_get_range_decl_name): Return a
6545         std::string.
6546         (compile_register_name_mangled): Return std::string.
6547
6548 2017-09-03  Tom Tromey  <tom@tromey.com>
6549
6550         * utils.c (perror_string): Return a std::string.
6551         (throw_perror_with_name, perror_warning_with_name): Update.
6552
6553 2017-09-03  Tom Tromey  <tom@tromey.com>
6554
6555         * demangle.c (demangle_command): Use std::string,
6556         unique_xmalloc_ptr.
6557
6558 2017-09-03  Tom Tromey  <tom@tromey.com>
6559
6560         * cli/cli-setshow.c (do_set_command): Use std::string.
6561
6562 2017-09-03  Tom Tromey  <tom@tromey.com>
6563
6564         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6565
6566 2017-09-03  Tom Tromey  <tom@tromey.com>
6567
6568         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6569
6570 2017-09-03  Tom Tromey  <tom@tromey.com>
6571
6572         * mi/mi-cmd-env.c (env_execute_cli_command): Use
6573         gdb::unique_xmalloc_ptr.
6574
6575 2017-09-03  Tom Tromey  <tom@tromey.com>
6576
6577         * thread.c (print_thread_info_1): Use string_printf.
6578         (thread_apply_command, thread_apply_all_command): Use
6579         std::string.
6580
6581 2017-09-03  Tom Tromey  <tom@tromey.com>
6582
6583         * valprint.c (val_print_string): Update.
6584         * gdbcore.h (memory_error_message): Return std::string.
6585         * corefile.c (memory_error_message): Return std::string.
6586         (memory_error): Update.
6587         * breakpoint.c (insert_bp_location): Update.
6588
6589 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
6590
6591         * target/waitstatus.h (target_waitstatus_to_string): Change
6592         return type to std::string.
6593         * target/waitstatus.c (target_waitstatus_to_string): Return
6594         std::string.
6595         * target.h (target_waitstatus_to_string): Remove declaration.
6596         * infrun.c (resume, clear_proceed_status_thread,
6597         print_target_wait_results, do_target_wait, save_waitstatus,
6598         stop_all_threads): Adjust.
6599         * record-btrace.c (record_btrace_wait): Adjust.
6600         * target-debug.h
6601         (target_debug_print_struct_target_waitstatus_p): Adjust.
6602
6603 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6604
6605         PR gdb/22046
6606         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6607         detection.
6608
6609 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
6610
6611         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6612         for setting/unsetting environment variables on the remote target.
6613         (New remote packets): Add entries for QEnvironmentHexEncoded,
6614         QEnvironmentUnset and QEnvironmentReset.
6615         * common/environ.c (gdb_environ::operator=): Extend method to
6616         handle m_user_set_env_list and m_user_unset_env_list.
6617         (gdb_environ::clear): Likewise.
6618         (match_var_in_string): Change type of first parameter from 'char
6619         *' to 'const char *'.
6620         (gdb_environ::set): Extend method to handle
6621         m_user_set_env_list and m_user_unset_env_list.
6622         (gdb_environ::unset): Likewise.
6623         (gdb_environ::clear_user_set_env): New method.
6624         (gdb_environ::user_set_envp): Likewise.
6625         (gdb_environ::user_unset_envp): Likewise.
6626         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6627         m_user_unset_env_list on move constructor/assignment.
6628         (unset): Add new default parameter 'update_unset_list = true'.
6629         (clear_user_set_env): New method.
6630         (user_set_envp): Likewise.
6631         (user_unset_envp): Likewise.
6632         (m_user_set_env_list): New std::set.
6633         (m_user_unset_env_list): Likewise.
6634         * common/rsp-low.c (hex2str): New function.
6635         (bin2hex): New overload for bin2hex function.
6636         * common/rsp-low.c (hex2str): New prototype.
6637         (str2hex): New overload prototype.
6638         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6639         QEnvironmentUnset and QEnvironmentReset.
6640         (remote_protocol_features): Add QEnvironmentHexEncoded,
6641         QEnvironmentUnset and QEnvironmentReset packets.
6642         (send_environment_packet): New function.
6643         (extended_remote_environment_support): Likewise.
6644         (extended_remote_create_inferior): Call
6645         extended_remote_environment_support.
6646         (_initialize_remote): Add QEnvironmentHexEncoded,
6647         QEnvironmentUnset and QEnvironmentReset packet configs.
6648         * unittests/environ-selftests.c (gdb_selftest_env_var):
6649         New variable.
6650         (test_vector_initialization): New function.
6651         (test_init_from_host_environ): Likewise.
6652         (test_reinit_from_host_environ): Likewise.
6653         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6654         Likewise.
6655         (test_unset_set_empty_vector): Likewise.
6656         (test_vector_clear): Likewise.
6657         (test_std_move): Likewise.
6658         (test_move_constructor):
6659         (test_self_move): Likewise.
6660         (test_set_unset_reset): Likewise.
6661         (run_tests): Rewrite in terms of the functions above.
6662
6663 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
6664
6665         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6666         (adi_available): Use a temp variable of type CORE_ADDR as argument
6667         3 when calling target_auxv_search.
6668         (adi_normalize_address): Use masks and xor operators to calculate
6669         normalized address.
6670         (adi_read_versions, adi_write_versions, adi_print_versions)
6671         (do_examine, do_assign): Use paddress.
6672
6673 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
6674
6675         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6676         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6677         out of loop and add supply of FIR.
6678         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6679         add collect of FIR.
6680
6681 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
6682
6683         PR gdb/21827
6684         * cli/cli-script.c (define_command): Don't convert command name
6685         to lower case.
6686
6687 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
6688
6689         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6690         Update all callers accordingly. Remove all code blocks handling
6691         the case where DISPP is not NULL.
6692
6693 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6694
6695         PR symtab/22003
6696         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6697         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6698         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6699
6700 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6701
6702         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6703         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6704         (read_comp_units_from_section): New parameter abbrev_section, use
6705         read_and_check_comp_unit_head, allocate signatured_type if needed.
6706         (create_all_comp_units): Update read_comp_units_from_section caller.
6707
6708 2017-08-23  Pedro Alves  <palves@redhat.com>
6709
6710         PR remote/21852
6711         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6712         to null_ptid and switch to thread without reading the registers
6713         after adding the inferior.
6714
6715 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6716
6717         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6718         compile-gcc.
6719         * compile/compile.c (compile_gcc, show_compile_gcc): New.
6720         (compile_to_object): Implement compile_gcc.
6721         (_initialize_compile): Install "set compile-gcc".  Initialize
6722         compile_gcc.
6723
6724 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6725
6726         * compile/compile.c (compile_to_object): Conditionally call
6727         set_verbose.  Conditionally call compile or compile_v0.
6728
6729 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
6730
6731         * sparc64-tdep.h: (adi_normalize_address): New export.
6732         * sparc-nat.h: (open_adi_tag_fd): New export.
6733         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
6734         * sparc64-linux-tdep.c:
6735         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
6736         (sparc64_linux_handle_segmentation_fault): New function.
6737         (sparc64_linux_init_abi): Register
6738         sparc64_linux_handle_segmentation_fault
6739         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
6740         (sparc64_addr_bits_remove): New function.
6741         (sparc64_init_abi): Register sparc64_addr_bits_remove.
6742         (MAX_PROC_NAME_SIZE): New macro.
6743         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
6744         (sparc64adilist): New variable.
6745         (adi_proc_list): New variable.
6746         (find_adi_info): New function.
6747         (add_adi_info): New function.
6748         (get_adi_info_proc): New function.
6749         (get_adi_info): New function.
6750         (info_adi_command): New function.
6751         (read_maps_entry): New function.
6752         (adi_available): New function.
6753         (adi_normalize_address): New function.
6754         (adi_align_address): New function.
6755         (adi_convert_byte_count): New function.
6756         (adi_tag_fd): New function.
6757         (adi_is_addr_mapped): New function.
6758         (adi_read_versions): New function.
6759         (adi_write_versions): New function.
6760         (adi_print_versions): New function.
6761         (do_examine): New function.
6762         (do_assign): New function.
6763         (adi_examine_command): New function.
6764         (adi_assign_command): New function.
6765         (_initialize_sparc64_adi_tdep): New function.
6766
6767 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
6768
6769         * breakpoint.c (breakpoints_info): Rename to ...
6770         (info_breakpoints_command): ... this.
6771         (watchpoints_info): Rename to ...
6772         (info_watchpoints_command): ... this.
6773         (tracepoints_info): Rename to ...
6774         (info_tracepoints_command): ... this.
6775         (_initialize_breakpoint): Adjust.
6776         * dcache.c (dcache_info): Rename to ...
6777         (info_display_command): ... this.
6778         (_initialize_dcache): Adjust.
6779         * frame.h (args_info): Rename to ...
6780         (info_args_command): ... this.
6781         (locals_info): Rename to ...
6782         (info_locals_command): ... this.
6783         * infcmd.c (nofp_registers_info): Rename to ...
6784         (info_registers_command): ... this.
6785         (float_info): Rename to ...
6786         (info_float_command): ... this.
6787         (program_info): Rename to ...
6788         (info_program_command): ... this.
6789         (all_registers_info): Rename to ...
6790         (info_all_registers_command): ... this.
6791         (vector_info): Rename to ...
6792         (info_vector_command): ... this.
6793         (float_info): Rename to ...
6794         (info_float_command): ... this.
6795         (_initialize_infcmd): Adjust.
6796         * inferior.h (term_info): Rename to ...
6797         (info_terminal_command): ... this.
6798         * inflow.c (term_info): Rename to ...
6799         (info_terminal_command): ... this.
6800         (_initialize_inflow): Adjust.
6801         * infrun.c (signals_info): Rename to ...
6802         (info_signals_command): ... this.
6803         (_initialize_infrun): Adjust.
6804         * objc-lang.c (classes_info): Rename to ...
6805         (info_classes_command): ... this.
6806         (selectors_info): Rename to ...
6807         (info_selectors_command): ... this.
6808         (_initialize_objc_language): Adjust.
6809         * printcmd.c (sym_info): Rename to ...
6810         (info_symbol_command): ... this.
6811         (address_info): Rename to ...
6812         (info_address_command): ... this.
6813         (display_info): Rename to ...
6814         (info_display_command): ... this.
6815         (_initialize_printcmd): Adjust.
6816         * reverse.c (bookmarks_info): Rename to ...
6817         (info_breakpoints_command): ... this.
6818         (_initialize_reverse): Adjust.
6819         * ser-go32.c (dos_info): Rename to ...
6820         (info_serial_command): ... this.
6821         (_initialize_ser_dos): Adjust.
6822         * skip.c (skip_info): Rename to ...
6823         (info_skip_command): ... this.
6824         (_initialize_step_skip): Adjust.
6825         * source.c (line_info): Rename to ...
6826         (info_line_command): ... this.
6827         (source_info): Rename to ...
6828         (info_source_command)
6829         * stack.c (frame_info): Rename to ...
6830         (info_frame_command): ... this.
6831         (locals_info): Rename to ...
6832         (info_locals_command): ... this.
6833         (args_info): Rename to ...
6834         (info_args_command): ... this.
6835         (_initialize_stack): Adjust.
6836         * symtab.c (sources_info): Rename to ...
6837         (info_sources_command): ... this.
6838         (variables_info): Rename to ...
6839         (info_variables_command): ... this.
6840         (functions_info): Rename to ...
6841         (info_functions_command): ... this.
6842         (types_info): Rename to ...
6843         (info_types_command): ... this.
6844         (_initialize_symtab): Adjust.
6845         * target.c (target_info): Rename to ...
6846         (info_target_command): ... this.
6847         (initialize_targets): Adjust.
6848         * tracepoint.c (tvariables_info): Rename to ...
6849         (info_tvariables_command): ... this.
6850         (scope_info): Rename to ...
6851         (info_scope_command): ... this.
6852         (trace_dump_actions): Adjust.
6853         (_initialize_tracepoint): Adjust.
6854
6855 2017-08-22  Tom Tromey  <tom@tromey.com>
6856
6857         * breakpoint.h (install_breakpoint): Update.
6858         * breakpoint.c (add_solib_catchpoint): Update.
6859         (install_breakpoint): Change argument to a std::unique_ptr.
6860         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6861         (create_breakpoint_sal, create_breakpoint): Update.
6862         (watch_command_1, catch_exec_command_1)
6863         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6864         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6865         Return the breakpoint.
6866         (set_raw_breakpoint_without_location, set_raw_breakpoint)
6867         (new_single_step_breakpoint): Update.
6868         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
6869         std::unique_ptr.
6870         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6871         std::unique_ptr.
6872         * break-catch-sig.c (create_signal_catchpoint): Use
6873         std::unique_ptr.
6874         * ada-lang.c (create_ada_exception_catchpoint): Use
6875         std::unique_ptr.
6876
6877 2017-08-22  Tom Tromey  <tom@tromey.com>
6878
6879         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
6880
6881 2017-08-22  Tom Tromey  <tom@tromey.com>
6882
6883         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
6884         (lookup_partial_symbol): Update.
6885
6886 2017-08-22  Tom Tromey  <tom@tromey.com>
6887
6888         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
6889         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
6890         (find_and_open_source, symtab_to_fullname): Update.
6891         * psymtab.c (psymtab_to_fullname): Update.
6892
6893 2017-08-22  Tom Tromey  <tom@tromey.com>
6894
6895         * exec.c (exec_file_attach): Update.
6896         * linux-thread-db.c (try_thread_db_load): Update.
6897         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
6898         * utils.c (gdb_realpath): Change return type.
6899         (gdb_realpath_keepfile): Update.
6900         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
6901         (_initialize_utils): Register the new self test.
6902         * source.c (openp): Update.
6903         (find_and_open_source): Update.
6904         * nto-tdep.c (nto_find_and_open_solib): Update.
6905         * main.c (set_gdb_data_directory): Update.
6906         (captured_main_1): Update.
6907         * dwarf2read.c (dwarf2_get_dwz_file): Update
6908         (dw2_map_symbol_filenames): Update.
6909         * auto-load.c (auto_load_safe_path_vec_update): Update.
6910         (filename_is_in_auto_load_safe_path_vec): Change type of
6911         "filename_realp".
6912         (auto_load_objfile_script): Update.
6913         (file_is_auto_load_safe): Update.  Use std::string.
6914         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
6915
6916 2017-08-22  Tom Tromey  <tom@tromey.com>
6917
6918         * utils.c (gdb_realpath_keepfile): Return a
6919         gdb::unique_xmalloc_ptr.
6920         * exec.c (exec_file_attach): Update.
6921         * utils.h (gdb_realpath_keepfile): Return a
6922         gdb::unique_xmalloc_ptr.
6923
6924 2017-08-22  Tom Tromey  <tom@tromey.com>
6925
6926         * compile/compile.c (compile_file_command): Use
6927         gdb::unique_xmalloc_ptr, std::string.
6928         * utils.c (gdb_abspath): Change return type.
6929         * source.c (openp): Update.
6930         * objfiles.c (allocate_objfile): Update.
6931         * main.c (set_gdb_data_directory): Update.
6932         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
6933
6934 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
6935
6936         * cli-cmds.c (list_commands): List actual code around more than
6937         one location.
6938
6939 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
6940
6941         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
6942
6943 2017-08-21  Pedro Alves  <palves@redhat.com>
6944
6945         PR gdb/19487
6946         * c-exp.y (variable production): Handle function aliases.
6947         * minsyms.c (msymbol_is_text): New function.
6948         * minsyms.h (msymbol_is_text): Declare.
6949         * symtab.c (find_function_alias_target): New function.
6950         * symtab.h (find_function_alias_target): Declare.
6951
6952 2017-08-21  Pedro Alves  <palves@redhat.com>
6953
6954         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
6955         typedefs.
6956         * typeprint.c (whatis_exp): If handling "whatis", and expression
6957         is OP_TYPE, strip one typedef level.  Otherwise don't strip
6958         typedefs here.
6959         * valops.c (value_cast): Save "to" type before resolving
6960         stubs/typedefs.  Use that type as resulting value's type.
6961
6962 2017-08-18  Tom Tromey  <tom@tromey.com>
6963             Pedro Alves  <palves@redhat.com>
6964
6965         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
6966         * sol-thread.c (sol_thread_resume, sol_thread_wait)
6967         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
6968         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
6969         * proc-service.c (ps_xfer_memory): Use scoped_restore.
6970         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
6971         (linux_get_siginfo_data): Add "thread" argument.  Use
6972         scoped_restore.
6973         * linux-nat.c (linux_child_follow_fork)
6974         (check_stopped_by_watchpoint): Use scoped_restore.
6975         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
6976         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
6977         (restore_inferior_ptid, save_inferior_ptid): Remove.
6978         * btrace.c (btrace_fetch): Use scoped_restore.
6979         * bsd-uthread.c (bsd_uthread_fetch_registers)
6980         (bsd_uthread_store_registers): Use scoped_restore.
6981         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
6982         scoped_restore.
6983         * aix-thread.c (aix_thread_resume, aix_thread_wait)
6984         (aix_thread_xfer_partial): Use scoped_restore.
6985         * inferior.h (save_inferior_ptid): Remove.
6986
6987 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6988
6989         PR tdep/21818
6990         * arm-tdep.c (gdb_print_insn_arm): Mark
6991         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
6992
6993 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6994
6995         * NEWS: Mention GDBserver's new option "--selftest".
6996         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
6997         * selftest.c: Move it to common/selftest.c.
6998         * selftest.h: Move it to common/selftest.h.
6999         * selftest-arch.c (reset): New function.
7000         (tests_with_arch): Call reset.
7001
7002 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7003
7004         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
7005         instead of exception_fprintf and printf_filtered.
7006
7007 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7008
7009         * selftest.c (register_self_test): Rename it to
7010         selftests::register_test.
7011         (run_self_tests): selftest::run_tests.
7012         * selftest.h: Update declarations.
7013         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7014         selftests::register_test_foreach_arch.
7015         * selftest-arch.h: Update declaration.
7016         * aarch64-tdep.c: Update.
7017         * arm-tdep.c: Likewise.
7018         * disasm-selftests.c: Likewise.
7019         * dwarf2loc.c: Likewise.
7020         * dwarf2-frame.c: Likewise.
7021         * findvar.c: Likewise.
7022         * gdbarch-selftests.c: Likewise.
7023         * maint.c (maintenance_selftest): Likewise.
7024         * regcache.c: Likewise.
7025         * rust-exp.y: Likewise.
7026         * selftest-arch.c: Likewise.
7027         * unittests/environ-selftests.c: Likewise.
7028         * unittests/function-view-selftests.c: Likewise.
7029         * unittests/offset-type-selftests.c: Likewise.
7030         * unittests/optional-selftests.c: Likewise.
7031         * unittests/scoped_restore-selftests.c: Likewise.
7032         * utils-selftests.c: Likewise.
7033
7034 2017-08-17  Pedro Alves  <palves@redhat.com>
7035
7036         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7037         local.
7038
7039 2017-08-17  Pedro Alves  <palves@redhat.com>
7040
7041         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7042         field.
7043         (reset_die_in_process): Delete, replaced by ...
7044         (process_die_scope): ... this new class.  Make it responsible for
7045         freeing cu->line_header too.
7046         (process_die): Use process_die_scope.
7047         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7048         cu->line_header_die_owner.  Don't release the line header if it's
7049         owned by the CU.
7050         (setup_type_unit_groups): Make the CU/DIE own the line header.
7051         Don't release the line header here.
7052
7053 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
7054
7055         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7056
7057 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7058
7059         * NEWS: Mention new shortcuts for nexti and stepi in TUI
7060         Single-Key mode
7061
7062 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7063
7064         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7065         mode command list.
7066
7067 2017-08-15  Stafford Horne  <shorne@gmail.com>
7068
7069         * MAINTAINERS (Write After Approval): Add Stafford Horne.
7070
7071 2017-08-15  Stafford Horne  <shorne@gmail.com>
7072
7073         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7074
7075 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
7076
7077         PR gdb/21954
7078         * infcmd.c (unset_environment_command): Use the 'clear' method on
7079         the environment instead of resetting it.
7080
7081 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
7082
7083         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7084         platforms.
7085
7086 2017-08-14  Tom Tromey  <tom@tromey.com>
7087
7088         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7089         (print_binary_chars): Likewise.
7090         (BITS_IN_BYTES): Remove.
7091
7092 2017-08-14  Tom Tromey  <tom@tromey.com>
7093
7094         PR gdb/21675
7095         * valprint.c (LOW_ZERO): Change value to 034.
7096         (print_octal_chars): Add static_asserts for octal constants.
7097         * printcmd.c (print_scalar_formatted): Add 'd' case.
7098
7099 2017-08-11  Tom Tromey  <tom@tromey.com>
7100
7101         * symfile.c (add_symbol_file_command): Use std::vector.
7102
7103 2017-08-14  Tom Tromey  <tom@tromey.com>
7104
7105         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7106         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7107         std::move.
7108         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7109
7110 2017-08-11  Pedro Alves  <palves@redhat.com>
7111
7112         * infrun.c (process_event_stop_test): Adjust
7113         function_name_is_marked_for_skip call.
7114         * skip.c: Include <list>.
7115         (skiplist_entry): Make it a class with private fields, and
7116         getters/setters.
7117         (skiplist_entry_chain): Delete.
7118         (skiplist_entries): New.
7119         (skiplist_entry_count): Delete.
7120         (highest_skiplist_entry_num): New.
7121         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7122         (add_skiplist_entry): Delete.
7123         (skiplist_entry::skiplist_entry): New.
7124         (skiplist_entry::add_entry): New.
7125         (skip_file_command, skip_function): Adjust.
7126         (compile_skip_regexp): Delete.
7127         (skip_command): Don't compile regexp here.  Adjust to use
7128         skiplist_entry::add_entry.
7129         (skip_info): Adjust to use range-for and getters.
7130         (skip_enable_command, skip_disable_command): Adjust to use
7131         range-for and setters.
7132         (skip_delete_command): Adjust to use std::list.
7133         (add_skiplist_entry): Delete.
7134         (skip_file_p): Delete, refactored as ...
7135         (skiplist_entry::do_skip_file_p): ... this new method.
7136         (skip_gfile_p): Delete, refactored as ...
7137         (skiplist_entry::do_gskip_file_p): ... this new method.
7138         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7139         (skiplist_entry::skip_function_p): ... this new method.
7140         (function_name_is_marked_for_skip): Now returns bool, and takes
7141         the function sal by const reference.  Adjust to use range-for and
7142         skiplist_entry methods.
7143         (_initialize_step_skip): Remove references to
7144         skiplist_entry_chain, skiplist_entry_count.
7145         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7146         takes the function sal by const reference.
7147
7148 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7149
7150         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7151         (dwarf2_frame_cache): Remove reset_cache_cleanup.
7152         (dwarf2_frame_cache):
7153         * frame-unwind.c (frame_unwind_try_unwinder): Catch
7154         RETURN_MASK_ALL and set *this_case to NULL.
7155         * frame-unwind.h: Update comments.
7156
7157 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7158
7159         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7160         (dwarf2_frame_state_copy_regs): Remove.
7161         (dwarf2_frame_state_free_regs): Remove.
7162         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7163         (dwarf2_restore_rule): Call method .alloc_regs instead of
7164         dwarf2_frame_state_alloc_regs.
7165         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
7166         constructor.  Call std::move.
7167         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7168         (dwarf2_frame_cache): Likewise.
7169
7170         [GDB_SELF_TEST]: Include selftest.h and
7171         selftest-arch.h.
7172         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7173         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7174         execute_cfa_program_test.
7175
7176         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7177         copy ctor, assignment operator, move assignment.
7178         <alloc_regs>: New method.
7179         <swap>: New method.
7180         (struct dwarf2_frame_state): Delete dtor.
7181         (dwarf2_frame_state_alloc_regs): Remove declaration.
7182         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7183         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7184
7185 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7186
7187         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7188         (dwarf2_frame_state::dwarf2_frame_state): New.
7189         (dwarf2_frame_state::~dwarf2_frame_state): New.
7190         (dwarf2_fetch_cfa_info): Update.
7191         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
7192         rather than a pointer.  Update code.
7193         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7194         dtor.
7195         <data_align, code_align, retaddr_column>: Change them to const.
7196         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7197         to bool.
7198
7199 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7200
7201         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7202         <loc.exp>: New field.
7203         * dwarf2-frame.c (execute_cfa_program): Update.
7204         (dwarf2_frame_prev_register): Update.
7205
7206 2017-08-10  Pedro Alves  <palves@redhat.com>
7207
7208         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7209
7210 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7211
7212         * fbsd-nat.c (struct fbsd_fork_info): Remove.
7213         (fbsd_pending_children): Use std::list.
7214         (fbsd_remember_child): Likewise.
7215         (fbsd_is_child_pending): Likewise.
7216         (fbsd_pending_vfork_done): Use std::forward_list.
7217         (fbsd_add_vfork_done): Likewise.
7218         (fbsd_is_vfork_done_pending): Likewise.
7219         (fbsd_next_vfork_done): Likewise.
7220
7221 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7222
7223         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7224         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7225         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7226         for `mapfilename'.
7227         (fbsd_xfer_partial): Use gdb::byte_vector.
7228         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7229
7230 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7231
7232         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7233         "filestuff.h".
7234         (fbsd_find_memory_regions): Fix `mapfile' initialization.
7235
7236 2017-08-09  Tom Tromey  <tom@tromey.com>
7237
7238         * skip.c (skiplist_entry): New constructor.
7239         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7240         (skiplist_entry::file_is_glob): Now bool.
7241         (skiplist_entry::file, skiplist_entry::function): Now
7242         std::string.
7243         (make_skip_entry): Return a unique_ptr.  Use new.
7244         (free_skiplist_entry, free_skiplist_entry_cleanup)
7245         (make_free_skiplist_entry_cleanup): Remove.
7246         (skip_command, skip_disable_command, add_skiplist_entry)
7247         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7248         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7249         (function_name_is_marked_for_skip): Update.
7250         (skip_delete_command): Update.  Use delete.
7251
7252 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
7253
7254         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7255         (aarch64_linux_core_read_description): New function.
7256         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7257
7258 2017-08-09  Pedro Alves  <palves@redhat.com>
7259
7260         * cp-name-parser.y (cp_comp_to_string): Return a
7261         gdb::unique_xmalloc_ptr<char>.
7262         * cp-support.c (replace_typedefs_qualified_name)
7263         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7264         (cp_canonicalize_string_full): Use op= instead of explicit
7265         convertion.
7266         (cp_class_name_from_physname, method_name_from_physname)
7267         (cp_func_name, cp_remove_params): Adjust to use
7268         gdb::unique_xmalloc_ptr<char>.
7269         * cp-support.h (cp_comp_to_string): Return a
7270         gdb::unique_xmalloc_ptr<char>.
7271         * python/py-type.c (typy_lookup_type): Adjust to use
7272         gdb::unique_xmalloc_ptr<char>.
7273
7274 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
7275
7276         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7277
7278 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
7279             Yao Qi  <yao.qi@linaro.org>
7280
7281         * cp-support.c (cp_canonicalize_string_full): Use
7282         gdb::unique_xmalloc_ptr<char>.
7283         (cp_canonicalize_string): Likewise.
7284
7285 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7286
7287         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7288         * regformats/i386/amd64-avx-avx512.dat: Remove.
7289         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7290         * regformats/i386/amd64-avx-mpx.dat:Remove.
7291         * regformats/i386/amd64-avx.dat: Remove.
7292         * regformats/i386/amd64-mpx.dat: Remove.
7293         * regformats/i386/i386-avx-avx512.dat: Remove.
7294         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7295         * regformats/i386/i386-avx-mpx.dat: Remove.
7296         * regformats/i386/i386-mmx.dat: Remove.
7297         * regformats/i386/i386-mpx.dat: Remove.
7298
7299 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7300
7301         * amd64-tdep.h (tdesc_x32): Remove the declaration.
7302         * amd64-tdep.c: Don't include features/i386/x32*.c.
7303         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7304         functions.
7305         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7306         and i386/x32-avx-avx512.
7307         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7308         and i386/x32.xml.
7309         * features/i386/x32-avx-avx512.c: Removed.
7310         * features/i386/x32-avx-avx512.xml: Removed.
7311         * features/i386/x32-avx.c: Removed.
7312         * features/i386/x32-avx.xml: Removed.
7313         * features/i386/x32.c: Removed.
7314         * features/i386/x32.xml: Removed.
7315         * regformats/i386/x32-avx-avx512.dat: Removed.
7316         * regformats/i386/x32-avx.dat: Removed.
7317         * regformats/i386/x32.dat: Removed.
7318
7319 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7320
7321         PR breakpoints/21886
7322         * mem-break.c (default_memory_insert_breakpoint): Use
7323         `->placed_address' rather than `->reqstd_address' for the
7324         breakpoint location.
7325
7326 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7327
7328         * arch-utils.c (default_print_insn): Remove arch/mach/endian
7329         assertions.
7330
7331 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7332
7333         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7334         a union of `tdep_info', `tdesc_data' and `id'.
7335         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7336         rather than `info.tdep_info'.
7337         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7338         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7339         * i386-tdep.c (i386_gdbarch_init): Likewise.
7340         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7341         * mips-tdep.c (mips_gdbarch_init): Likewise.
7342         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7343         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7344         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7345         `info.tdep_info'.
7346         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7347         `info.tdep_info'.
7348         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7349         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7350         `info.tdep_info'.
7351         * spu-tdep.c (spu_gdbarch_init): Likewise.
7352         * gdbarch.h: Regenerate.
7353
7354 2017-08-07  Leszek Swirski  <leszeks@google.com>
7355
7356         PR symtab/20899
7357         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7358
7359 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
7360
7361         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7362         (gdbsim_open): Rename gdb_argv args object to argv.
7363
7364 2017-08-05  Tom Tromey  <tom@tromey.com>
7365
7366         * compile/compile-object-load.c (compile_object_load): Use
7367         gdb::unique_xmalloc_ptr.
7368         * cli/cli-dump.c (scan_filename): Rename from
7369         scan_filename_with_cleanup.  Change return type.
7370         (scan_expression): Rename from scan_expression_with_cleanup.
7371         Change return type.
7372         (dump_memory_to_file, dump_value_to_file, restore_command):
7373         Use gdb::unique_xmalloc_ptr.  Update.
7374         * cli/cli-cmds.c (find_and_open_script): Use
7375         gdb::unique_xmalloc_ptr.
7376         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7377         * symmisc.c (maintenance_print_symbols)
7378         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7379         * symfile.c (symfile_bfd_open, generic_load)
7380         (add_symbol_file_command, remove_symbol_file_command): Use
7381         gdb::unique_xmalloc_ptr.
7382         * source.c (openp): Use gdb::unique_xmalloc_ptr.
7383         * psymtab.c (maintenance_print_psymbols): Use
7384         gdb::unique_xmalloc_ptr.
7385         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7386         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7387         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7388         (reload_shared_libraries_1): Likewise.
7389
7390 2017-08-05  Tom Tromey  <tom@tromey.com>
7391
7392         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7393         (rust_op_vector, rust_set_vector): New typedefs.
7394         (current_parser): New global.
7395         (work_obstack): Change to pointer type.  Update all users.
7396         (rust_ast, pstate): Remove globals.
7397         (struct rust_parser): New.
7398         (%union) <params, field_inits>: Change type.
7399         (start, tuple_expr, unit_expr, struct_expr_list, literal)
7400         (field_expr, expr_list, maybe_expr_list, type_list): Update.
7401         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7402         (convert_params_to_types, convert_params_to_expression): Change
7403         type of "params".
7404         (ast_string): Change type of "fields".
7405         (rust_parse): Make a rust_parser.  Remove cleanups.
7406         (rust_lex_tests): Make and install an auto_obstack.
7407
7408 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7409
7410         * configure.srv (ipa_x32_linux_regobj): New.
7411         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7412         instead of X86_TDESC_AVX512.
7413         (initialize_low_tracepoint): Call
7414         init_registers_x32_avx_avx512_linux.
7415
7416 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7417
7418         * utils.h (gdb_argv): Add namespace std for nullptr_t.
7419
7420 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7421
7422         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7423
7424 2017-08-03  Tom Tromey  <tom@tromey.com>
7425
7426         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7427         Remove.
7428         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7429
7430 2017-08-03  Tom Tromey  <tom@tromey.com>
7431
7432         * python/py-param.c (compute_enum_values): Use gdb_argv.
7433
7434 2017-08-03  Tom Tromey  <tom@tromey.com>
7435
7436         * utils.h (struct gdb_argv_deleter): New.
7437         (gdb_argv): New class.
7438         * utils.c (gdb_argv::reset): New method.
7439         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7440         * tracefile.c (tsave_command): Use gdb_argv.
7441         * top.c (new_ui_command): Use gdb_argv.
7442         * symmisc.c (maintenance_print_symbols)
7443         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7444         * symfile.c (symbol_file_command, generic_load)
7445         (remove_symbol_file_command): Use gdb_argv.
7446         * stack.c (backtrace_command): Use gdb_argv.
7447         * source.c (add_path, show_substitute_path_command)
7448         (unset_substitute_path_command, set_substitute_path_command):
7449         Use gdb_argv.
7450         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
7451         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7452         * remote.c (extended_remote_run, remote_put_command)
7453         (remote_get_command, remote_delete_command): Use gdb_argv.
7454         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7455         (gdbsim_open): Use gdb_argv.
7456         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7457         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7458         * procfs.c (procfs_info_proc): Use gdb_argv.
7459         * interps.c (interpreter_exec_cmd): Use gdb_argv.
7460         * infrun.c (handle_command): Use gdb_argv.
7461         * inferior.c (add_inferior_command, clone_inferior_command):
7462         Use gdb_argv.
7463         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7464         * exec.c (exec_file_command): Use gdb_argv.
7465         * cli/cli-cmds.c (alias_command): Use gdb_argv.
7466         * compile/compile.c (build_argc_argv): Use gdb_argv.
7467
7468 2017-08-03  Tom Tromey  <tom@tromey.com>
7469
7470         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7471
7472 2017-08-03  Tom Tromey  <tom@tromey.com>
7473
7474         * python/python.c (compute_python_string): Return std::string.
7475         (gdbpy_eval_from_control_command): Update.
7476         (do_start_initialization): Use std::string.
7477         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7478         xstrprintf.
7479         * python/py-breakpoint.c (local_setattro): Use string_printf, not
7480         xstrprintf.
7481
7482 2017-08-03  Tom Tromey  <tom@tromey.com>
7483
7484         * top.h (do_restore_instream_cleanup): Remove.
7485         * top.c (do_restore_instream_cleanup): Remove.
7486         (read_command_file): Use scoped_restore.
7487         * cli/cli-script.c (execute_user_command): Use scoped_restore.
7488
7489 2017-08-03  Tom Tromey  <tom@tromey.com>
7490
7491         * cli/cli-script.c (execute_user_command)
7492         (execute_control_command): Use scoped_restore.
7493
7494 2017-08-03  Tom Tromey  <tom@tromey.com>
7495
7496         * cli/cli-script.c (do_restore_user_call_depth): Remove.
7497         (execute_user_command): Remove user_call_depth; use
7498         user_args_stack's size instead.
7499
7500 2017-08-03  Tom Tromey  <tom@tromey.com>
7501
7502         * top.h (in_user_command): Remove.
7503         * top.c (in_user_command): Remove.
7504         * cli/cli-script.c (do_restore_user_call_depth)
7505         (execute_user_command): Update.
7506
7507 2017-08-03  Tom Tromey  <tom@tromey.com>
7508
7509         * valops.c (search_struct_method): Use gdb::byte_vector.
7510         * valarith.c (value_concat): Use std::vector.
7511         * target.c (memory_xfer_partial): Use gdb::byte_vector.
7512         (simple_search_memory): Likewise.
7513         * printcmd.c (find_string_backward): Use gdb::byte_vector.
7514         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7515         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7516         * elfread.c (elf_rel_plt_read): Use std::string.
7517         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7518         * cli/cli-dump.c (restore_section_callback): Use
7519         gdb::byte_vector.
7520
7521 2017-08-03  Tom Tromey  <tom@tromey.com>
7522
7523         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7524
7525 2017-08-03  Tom Tromey  <tom@tromey.com>
7526
7527         * tui/tui-regs.c (tui_restore_gdbout): Remove.
7528         (tui_register_format): Use scoped_restore.
7529
7530 2017-08-03  Tom Tromey  <tom@tromey.com>
7531
7532         * reverse.c (exec_direction_default): Remove.
7533         (exec_reverse_once): Use scoped_restore.
7534         * remote.c (restore_remote_timeout): Remove.
7535         (remote_flash_erase, remote_flash_write, remote_flash_done)
7536         (readchar, remote_serial_write): Use scoped_restore.
7537         * cli/cli-script.c (struct source_cleanup_lines_args)
7538         (source_cleanup_lines): Remove.
7539         (script_from_file): Use scoped_restore.
7540         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7541         (source_command): Use scoped_restore.
7542
7543 2017-08-03  Tom Tromey  <tom@tromey.com>
7544
7545         * utils.h (make_cleanup_free_so): Remove.
7546         * utils.c (do_free_so, make_cleanup_free_so): Remove.
7547         * solist.h (struct so_deleter): New.
7548         (so_list_up): New typedef.
7549         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7550
7551 2017-08-03  Tom Tromey  <tom@tromey.com>
7552
7553         * utils.h (make_cleanup_restore_current_language): Remove.
7554         * utils.c (do_restore_current_language)
7555         (make_cleanup_restore_current_language): Remove.
7556         * parse.c (parse_exp_in_context_1)
7557         (parse_expression_with_language): Use
7558         scoped_restore_current_language.
7559         * mi/mi-main.c (mi_cmd_execute): Use
7560         scoped_restore_current_language.
7561         * language.h (scoped_restore_current_language): New class.
7562
7563 2017-08-03  Tom Tromey  <tom@tromey.com>
7564
7565         * compile/compile.c (cleanup_unlink_file): Remove.
7566         (compile_to_object): Use gdb::unlinker.
7567         (eval_compile_command): Likewise.
7568
7569 2017-08-03  Tom Tromey  <tom@tromey.com>
7570
7571         * utils.h (make_cleanup_fclose): Remove.
7572         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7573
7574 2017-08-03  Tom Tromey  <tom@tromey.com>
7575
7576         * top.c (open_terminal_stream): Return gdb_file_up.
7577         (new_ui_command): Update.
7578
7579 2017-08-03  Tom Tromey  <tom@tromey.com>
7580
7581         * source.c (print_source_lines_base, forward_search_command)
7582         (reverse_search_command): Use gdb_file_up.
7583
7584 2017-08-03  Tom Tromey  <tom@tromey.com>
7585
7586         * fbsd-nat.c (fbsd_find_memory_regions): Update.
7587
7588 2017-08-03  Tom Tromey  <tom@tromey.com>
7589
7590         * cli/cli-cmds.c (find_and_open_script): Change return type.
7591         Remove "streamp" and "full_path" parameters.
7592         (source_script_with_search): Update.
7593         * auto-load.c (source_script_file): Update.
7594         * cli/cli-cmds.h (find_and_open_script): Change type.
7595         (open_script): New struct.
7596
7597 2017-08-03  Tom Tromey  <tom@tromey.com>
7598
7599         * xml-support.c (xml_fetch_content_from_file): Update.
7600         * ui-file.c (stdio_file::open): Update.
7601         * tracefile-tfile.c (tfile_start): Update.
7602         * remote.c (remote_file_put, remote_file_get): Update.
7603         * nat/linux-procfs.c (linux_proc_get_int)
7604         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7605         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7606         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7607         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7608         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7609         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7610         * linux-nat.c (linux_proc_pending_signals): Update.
7611         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7612         (file_closer): Remove.
7613         * compile/compile.c (compile_to_object): Update.
7614         * common/filestuff.h (struct gdb_file_deleter): New.
7615         (gdb_file_up): New typedef.
7616         (gdb_fopen_cloexec): Change return type.
7617         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7618         * cli/cli-dump.c (fopen_with_cleanup): Remove.
7619         (dump_binary_file, restore_binary_file): Update.
7620         * auto-load.c (auto_load_objfile_script_1): Update.
7621
7622 2017-08-03  Tom Tromey  <tom@tromey.com>
7623
7624         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7625         (info_static_tracepoint_markers_command): Likewise.
7626         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7627         * skip.c (skip_info): Use ui_out_emit_table.
7628         * progspace.c (print_program_space): Use ui_out_emit_table.
7629         * osdata.c (info_osdata): Use ui_out_emit_table.
7630         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7631         ui_out_emit_table.
7632         * linux-thread-db.c (info_auto_load_libthread_db): Use
7633         ui_out_emit_table.
7634         * inferior.c (print_inferior): Use ui_out_emit_table.
7635         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7636         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7637         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7638         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7639         * ui-out.h (class ui_out_emit_table): New.
7640
7641 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
7642
7643         * mips-tdep.c (mips_fpu_type_str): New function.
7644         (mips_dump_tdep): Call it.
7645
7646 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
7647
7648         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7649         `->mips_fpu_type'.
7650
7651 2017-07-31  Xavier Roirand  <roirand@adacore.com>
7652
7653         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7654
7655 2017-07-27  Xavier Roirand  <roirand@adacore.com>
7656
7657         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7658
7659 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7660
7661         * cli/cli-cmds.c (maintenancechecklist): New variable.
7662         * gdbcmd.h (maintenancechecklist): Declare it.
7663         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7664         Call i386_linux_read_description with different masks.
7665         * maint.c (maintenance_check_command): New function.
7666         (_initialize_maint_cmds): Call add_prefix_cmd.
7667         * target-descriptions.c (tdesc_reg): override operator != and ==.
7668         (tdesc_type): Likewise.
7669         (tdesc_feature): Likewise.
7670         (target_desc): Likewise.
7671         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7672         (maintenance_check_xml_descriptions): New function.
7673         (_initialize_target_descriptions) Add command "xml-descriptions".
7674         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7675
7676 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7677
7678         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7679         Include features/i386/32bit-*.c.
7680         (i386_linux_read_description): Generate target description if it
7681         doesn't exist.
7682         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7683         functions.
7684         * features/i386/32bit-linux.c: Re-generated.
7685         * features/i386/32bit-sse.c: Likewise.
7686         * target-descriptions.c (print_c_feature::visit): Print code to
7687         set register number if needed.
7688         (print_c_feature) <m_next_regnum>: New field.
7689
7690 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7691
7692         * features/Makefile (CFILES): Rename with TDESC_CFILES.
7693         (FEATURE_XMLFILES): New.
7694         (FEATURE_CFILES): New.
7695         New rules.
7696         (clean-cfiles): Remove generated c files.
7697         * features/i386/32bit-avx.c: Generated.
7698         * features/i386/32bit-avx512.c: Generated.
7699         * features/i386/32bit-core.c: Generated.
7700         * features/i386/32bit-linux.c: Generated.
7701         * features/i386/32bit-mpx.c: Generated.
7702         * features/i386/32bit-pkeys.c: Generated.
7703         * features/i386/32bit-sse.c: Generated.
7704         * target-descriptions.c: Include algorithm.
7705         (tdesc_element_visitor): Add method visit_end.
7706         (print_c_tdesc): Implement visit_end.
7707         (print_c_tdesc:: m_filename_after_features): Move it to
7708         protected.
7709         (print_c_feature): New class.
7710         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7711         name starts with "i386/32bit-".
7712
7713 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7714
7715         * target-descriptions.c (tdesc_element_visitor): New class.
7716         (tdesc_element): New class.
7717         (tdesc_reg): Inherit from tdesc_element.
7718         (tdesc_reg::accept): New function.
7719         (tdesc_type): Inherit from tdesc_element.
7720         (tdesc_type::accept): New function.
7721         (tdesc_feature): Inherit from tdesc_element.
7722         (tdesc_feature::accept): New function.
7723         (target_desc): Inherit from tdesc_element.
7724         (target_desc::target_desc): New.
7725         (target_desc::~target_desc): New.
7726         (target_desc::accept): New.
7727         (allocate_target_description): Use new.
7728         (free_target_description): Use delete.
7729         (print_c_tdesc): New class.
7730         (maint_print_c_tdesc_cmd): Adjust.
7731
7732         * features/aarch64.c: Re-generated.
7733         * features/arc-arcompact.c: Re-generated.
7734         * features/arc-v2.c: Re-generated.
7735         * features/arm/arm-with-iwmmxt.c: Re-generated.
7736         * features/arm/arm-with-m.c: Re-generated.
7737         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
7738         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
7739         * features/arm/arm-with-neon.c: Re-generated.
7740         * features/arm/arm-with-vfpv2.c: Re-generated.
7741         * features/arm/arm-with-vfpv3.c: Re-generated.
7742         * features/i386/amd64-avx-avx512.c: Re-generated.
7743         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7744         * features/i386/amd64-avx.c: Re-generated.
7745         * features/i386/amd64-avx-linux.c: Re-generated.
7746         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
7747         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7748         * features/i386/amd64-avx-mpx.c: Re-generated.
7749         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
7750         * features/i386/amd64.c: Re-generated.
7751         * features/i386/amd64-linux.c: Re-generated.
7752         * features/i386/amd64-mpx.c: Re-generated.
7753         * features/i386/amd64-mpx-linux.c: Re-generated.
7754         * features/i386/i386-avx-avx512.c: Re-generated.
7755         * features/i386/i386-avx-avx512-linux.c: Re-generated.
7756         * features/i386/i386-avx.c: Re-generated.
7757         * features/i386/i386-avx-linux.c: Re-generated.
7758         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
7759         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
7760         * features/i386/i386-avx-mpx.c: Re-generated.
7761         * features/i386/i386-avx-mpx-linux.c: Re-generated.
7762         * features/i386/i386.c: Re-generated.
7763         * features/i386/i386-linux.c: Re-generated.
7764         * features/i386/i386-mmx.c: Re-generated.
7765         * features/i386/i386-mmx-linux.c: Re-generated.
7766         * features/i386/i386-mpx.c: Re-generated.
7767         * features/i386/i386-mpx-linux.c: Re-generated.
7768         * features/i386/x32-avx-avx512.c: Re-generated.
7769         * features/i386/x32-avx-avx512-linux.c: Re-generated.
7770         * features/i386/x32-avx.c: Re-generated.
7771         * features/i386/x32-avx-linux.c: Re-generated.
7772         * features/i386/x32.c: Re-generated.
7773         * features/i386/x32-linux.c: Re-generated.
7774         * features/microblaze.c: Re-generated.
7775         * features/microblaze-with-stack-protect.c: Re-generated.
7776         * features/mips64-dsp-linux.c: Re-generated.
7777         * features/mips64-linux.c: Re-generated.
7778         * features/mips-dsp-linux.c: Re-generated.
7779         * features/mips-linux.c: Re-generated.
7780         * features/nds32.c: Re-generated.
7781         * features/nios2.c: Re-generated.
7782         * features/nios2-linux.c: Re-generated.
7783         * features/rs6000/powerpc-32.c: Re-generated.
7784         * features/rs6000/powerpc-32l.c: Re-generated.
7785         * features/rs6000/powerpc-403.c: Re-generated.
7786         * features/rs6000/powerpc-403gc.c : Re-generated.
7787         * features/rs6000/powerpc-405.c: Re-generated.
7788         * features/rs6000/powerpc-505.c: Re-generated.
7789         * features/rs6000/powerpc-601.c: Re-generated.
7790         * features/rs6000/powerpc-602.c: Re-generated.
7791         * features/rs6000/powerpc-603.c: Re-generated.
7792         * features/rs6000/powerpc-604.c: Re-generated.
7793         * features/rs6000/powerpc-64.c: Re-generated.
7794         * features/rs6000/powerpc-64l.c: Re-generated.
7795         * features/rs6000/powerpc-7400.c: Re-generated.
7796         * features/rs6000/powerpc-750.c: Re-generated.
7797         * features/rs6000/powerpc-860.c: Re-generated.
7798         * features/rs6000/powerpc-altivec32.c: Re-generated.
7799         * features/rs6000/powerpc-altivec32l.c: Re-generated.
7800         * features/rs6000/powerpc-altivec64.c: Re-generated.
7801         * features/rs6000/powerpc-altivec64l.c: Re-generated.
7802         * features/rs6000/powerpc-cell32l.c: Re-generated.
7803         * features/rs6000/powerpc-cell64l.c: Re-generated.
7804         * features/rs6000/powerpc-e500.c: Re-generated.
7805         * features/rs6000/powerpc-e500l.c: Re-generated.
7806         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
7807         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
7808         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
7809         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
7810         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
7811         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
7812         * features/rs6000/powerpc-vsx32.c: Re-generated.
7813         * features/rs6000/powerpc-vsx32l.c: Re-generated.
7814         * features/rs6000/powerpc-vsx64.c: Re-generated.
7815         * features/rs6000/powerpc-vsx64l.c: Re-generated.
7816         * features/rs6000/rs6000.c: Re-generated.
7817         * features/s390-linux32.c: Re-generated.
7818         * features/s390-linux32v1.c: Re-generated.
7819         * features/s390-linux32v2.c: Re-generated.
7820         * features/s390-linux64.c: Re-generated.
7821         * features/s390-linux64v1.c: Re-generated.
7822         * features/s390-linux64v2.c: Re-generated.
7823         * features/s390-te-linux64.c: Re-generated.
7824         * features/s390-tevx-linux64.c: Re-generated.
7825         * features/s390-vx-linux64.c: Re-generated.
7826         * features/s390x-linux64.c: Re-generated.
7827         * features/s390x-linux64v1.c: Re-generated.
7828         * features/s390x-linux64v2.c: Re-generated.
7829         * features/s390x-te-linux64.c: Re-generated.
7830         * features/s390x-tevx-linux64.c: Re-generated.
7831         * features/s390x-vx-linux64.c: Re-generated.
7832         * features/sparc/sparc32-solaris.c: Re-generated.
7833         * features/sparc/sparc64-solaris.c: Re-generated.
7834         * features/tic6x-c62x.c: Re-generated.
7835         * features/tic6x-c62x-linux.c: Re-generated.
7836         * features/tic6x-c64x.c: Re-generated.
7837         * features/tic6x-c64x-linux.c: Re-generated.
7838         * features/tic6x-c64xp.c: Re-generated.
7839         * features/tic6x-c64xp-linux.c: Re-generated.
7840
7841 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7842
7843         * i386-linux-tdep.c (i386_linux_read_description): New function.
7844         (i386_linux_core_read_description): Call
7845         i386_linux_read_description.
7846         * i386-linux-tdep.h (i386_linux_read_description): Declare.
7847         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
7848         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
7849         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
7850         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
7851         * x86-linux-nat.c (x86_linux_read_description): Call
7852         i386_linux_read_description.
7853
7854 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7855
7856         * NEWS: Mention it.
7857         * features/Makefile (%.c: %.xml): Pass the xml file name to
7858         command "maint print c-tdesc".
7859         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7860         name from 'arg'.
7861
7862 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7863
7864         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
7865         in-class initialization.
7866         (tdesc_create_feature): Call new instead of XCNEW.
7867         (free_target_description): Ue delete.
7868
7869 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
7870
7871         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
7872
7873 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7874
7875         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
7876         constant.
7877         (amd64_x32_init_abi): Likewise.
7878         * amd64-tdep.h (amd64_init_abi): Update declaration.
7879         (amd64_x32_init_abi): Likewise.
7880
7881 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7882
7883         PR tdep/21717
7884         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
7885         condition for FPSCR.
7886         (arm_linux_store_inferior_registers): Likewise.
7887
7888 2017-07-22  Tom Tromey  <tom@tromey.com>
7889
7890         * break-catch-syscall.c (struct catch_syscall_inferior_data)
7891         <syscalls_counts>: Now a std::vector.
7892         (get_catch_syscall_inferior_data): Use "new".
7893         (catch_syscall_inferior_data_cleanup): Use "delete".
7894         (insert_catch_syscall, remove_catch_syscall)
7895         (clear_syscall_counts): Update.
7896
7897 2017-07-22  Tom Tromey  <tom@tromey.com>
7898
7899         * break-catch-syscall.c (syscall_catchpoint)
7900         <syscalls_to_be_caught>: Now a std::vector<int>
7901         (~syscall_catchpoint): Remove.
7902         (insert_catch_syscall, remove_catch_syscall)
7903         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
7904         (print_mention_catch_syscall, print_recreate_catch_syscall):
7905         Update.
7906         (create_syscall_event_catchpoint): Change type of "filter"
7907         parameter.
7908         (catch_syscall_split_args): Return a std::vector.
7909         (catch_syscall_command_1, catching_syscall_number_1): Update.
7910
7911 2017-07-22  Tom Tromey  <tom@tromey.com>
7912
7913         * break-catch-throw.c (struct exception_catchpoint)
7914         <exception_rx>: Now a std::string.
7915         (~exception_catchpoint): Remove.
7916         (print_one_detail_exception_catchpoint): Update.
7917         (handle_gnu_v3_exceptions): Change type of except_rx.
7918         (extract_exception_regexp): Return a std::string.
7919         (catch_exception_command_1): Update.
7920
7921 2017-07-22  Tom Tromey  <tom@tromey.com>
7922
7923         * break-catch-sig.c (gdb_signal_type): Remove typedef.
7924         (struct signal_catchpoint) <signals_to_be_caught>: Now a
7925         std::vector.
7926         <catch_all>: Now a bool.
7927         (~signal_catchpoint): Remove.
7928         (signal_catchpoint_insert_location)
7929         (signal_catchpoint_remove_location)
7930         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
7931         (signal_catchpoint_print_mention)
7932         (signal_catchpoint_print_recreate)
7933         (signal_catchpoint_explains_signal): Update.
7934         (create_signal_catchpoint): Change type of "filter" and
7935         "catch_all".
7936         (catch_signal_split_args): Return a std::vector.  Change type of
7937         "catch_all".
7938         (catch_signal_command): Update.
7939
7940 2017-07-20  Pedro Alves  <palves@redhat.com>
7941
7942         * ada-lang.c (ada_language_defn): Make extern.
7943         (_initialize_ada_language): Remove add_language call.
7944         * c-lang.c (c_language_defn, cplus_language_defn)
7945         (asm_language_defn, minimal_language_defn): Make extern.
7946         (_initialize_c_language): Delete.
7947         * completer.c (compare_cstrings): Delete, moved to utils.h.
7948         * d-lang.c (d_language_defn): Make extern.
7949         (_initialize_d_language): Remove add_language calls.
7950         * defs.h (enum language): Add comment.
7951         * f-lang.c (f_language_defn): Make extern.
7952         (_initialize_f_language): Remove add_language call.
7953         * go-lang.c (go_language_defn): Make extern.
7954         (_initialize_go_language): Remove add_language call.
7955         * language.c: Include <algorithm>.
7956         (languages): Redefine as const array.
7957         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
7958         (set_language_command): Handle "local".  Use for-range loop.
7959         (set_language): Remove loop.
7960         (language_enum): Rewrite.
7961         (language_def, language_str): Remove loops.
7962         (add_language): Delete.
7963         (add_set_language_command): New, based on add_languages.
7964         (skip_language_trampoline): Adjust.
7965         (local_language_defn): Delete.
7966         (language_gdbarch_post_init): Adjust.
7967         (_initialize_language): Remove add_language calls.  Call
7968         add_set_language_command.
7969         * language.h (add_language): Delete.
7970         (auto_language_defn)
7971         (unknown_language_defn, minimal_language_defn, ada_language_defn)
7972         (asm_language_defn, c_language_defn, cplus_language_defn)
7973         (d_language_defn, f_language_defn, go_language_defn)
7974         (m2_language_defn, objc_language_defn, opencl_language_defn)
7975         (pascal_language_defn, rust_language_defn): Declare.
7976         * m2-lang.c (m2_language_defn): Make extern.
7977         (_initialize_m2_language): Remove add_language call.
7978         * objc-lang.c (objc_language_defn): Make extern.
7979         (_initialize_objc_language): Remove add_language call.
7980         * opencl-lang.c (opencl_language_defn): Make extern.
7981         (_initialize_opencl_language): Remove add_language call.
7982         * p-lang.c (pascal_language_defn): Make extern.
7983         (_initialize_pascal_language): Delete.
7984         * rust-lang.c (rust_language_defn): Make extern.
7985         (_initialize_rust_language): Delete.
7986         * utils.h (compare_cstrings): New static inline function.
7987
7988 2017-07-20  Pedro Alves  <palves@redhat.com>
7989
7990         * ada-lang.c (ada_to_fixed_type_1): Adjust.
7991         (get_var_value): Constify parameters.
7992         (get_int_var_value): Change prototype.
7993         (to_fixed_range_type): Adjust.
7994         * ada-lang.h (get_int_var_value): Change prototype.
7995
7996 2017-07-20  Pedro Alves  <palves@redhat.com>
7997
7998         * dwarf2read.c (dw2_lookup_symbol): Use
7999         SYMBOL_MATCHES_SEARCH_NAME.
8000         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8001
8002 2017-07-20  Pedro Alves  <palves@redhat.com>
8003
8004         * block.c (block_iter_name_step, block_iter_name_first)
8005         (block_iter_name_next): Delete.
8006         (block_lookup_symbol_primary): Adjust to use
8007         dict_iter_match_first/dict_iter_match_next.
8008         * block.h (block_iter_name_first, block_iter_name_next): Delete
8009         declarations.
8010         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8011         dict_iter_match_first/dict_iter_match_next.
8012
8013 2017-07-20  Pedro Alves  <palves@redhat.com>
8014
8015         * cp-support.c (cp_find_first_component_aux): Add missing case for
8016         end of string.
8017
8018 2017-07-18  David Blaikie  <dblaikie@gmail.com>
8019
8020         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8021         of dwo_cu's dwo_file.
8022
8023 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8024
8025         * remote.c (store_registers_using_G): Remove one line comment.
8026
8027 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8028
8029         * regcache.c (regcache_cpy): Simplify it.
8030         (regcache::cpy_no_passthrough): Remove it.
8031         * regcache.h (cpy_no_passthrough): Remove it.
8032         (regcache_dup, regcache_cpy): Update comments.
8033
8034 2017-07-18  Pedro Alves  <palves@redhat.com>
8035
8036         * remote-sim.c (sim_command_completer): Adjust to work with a
8037         completion_tracker instead of a VEC.
8038
8039 2017-07-17  Pedro Alves  <palves@redhat.com>
8040
8041         * completer.c (complete_source_filenames): New function.
8042         (complete_address_and_linespec_locations): New function.
8043         (location_completer): Use complete_address_and_linespec_locations.
8044         (completion_tracker::build_completion_result): Honor the tracker's
8045         request to suppress append.
8046         * completer.h (completion_tracker::suppress_append_ws)
8047         (completion_tracker::set_suppress_append_ws): New methods.
8048         (completion_tracker::m_suppress_append_ws): New field.
8049         (complete_source_filenames): New declaration.
8050         * linespec.c (linespec_complete_what): New.
8051         (struct ls_parser) <complete_what, completion_word,
8052         completion_quote_char, completion_quote_end, completion_tracker>:
8053         New fields.
8054         (string_find_incomplete_keyword_at_end): New.
8055         (linespec_lexer_lex_string): Record quote char.  If in completion
8056         mode, don't throw.
8057         (linespec_lexer_consume_token): Advance the completion word point.
8058         (linespec_lexer_peek_token): Save/restore completion info.
8059         (save_stream_and_consume_token): New.
8060         (set_completion_after_number): New.
8061         (linespec_parse_basic): Set what to complete next depending on
8062         token.  Handle function and label completions specially.
8063         (parse_linespec): Disable objc shortcut in completion mode.  Set
8064         what to complete next depending on token type.  Skip keyword if in
8065         completion mode.
8066         (complete_linespec_component, linespec_complete): New.
8067         * linespec.h (linespec_complete): Declare.
8068
8069 2017-07-17  Pedro Alves  <palves@redhat.com>
8070
8071         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8072         Handle 'operator<' / 'operator<<'.
8073
8074 2017-07-17  Pedro Alves  <palves@redhat.com>
8075
8076         * completer.c (collect_explicit_location_matches): Handle
8077         MATCH_LABEL.
8078         (convert_explicit_location_to_linespec): New, factored out from
8079         ...
8080         (convert_explicit_location_to_sals): ... this.
8081         (complete_label): New.
8082         (linespec_complete_label, find_label_symbols_in_block): New.
8083         (find_label_symbols): Add completion_mode parameter and adjust to
8084         call find_label_symbols_in_block.
8085         * linespec.h (linespec_complete_label): Declare.
8086
8087 2017-07-17  Pedro Alves  <palves@redhat.com>
8088
8089         * ada-lang.c (ada_collect_symbol_completion_matches): Add
8090         complete_symbol_mode parameter.
8091         * cli/cli-cmds.c (complete_command): Get the completion result out
8092         of the handle_brkchars tracker if used a custom word point.
8093         * completer.c: Include "linespec.h".
8094         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8095         (advance_to_expression_complete_word_point): New.
8096         (completion_tracker::completes_to_completion_word): New.
8097         (complete_files_symbols): Pass down
8098         complete_symbol_mode::EXPRESSION.
8099         (explicit_options, probe_options): New.
8100         (collect_explicit_location_matches): Complete on the
8101         explictit_loc->foo instead of word.  Use
8102         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
8103         keyword and options completions.
8104         (backup_text_ptr): Delete.
8105         (skip_keyword): New.
8106         (complete_explicit_location): Remove 'word' parameter.  Add
8107         language, quoted_arg_start and quoted_arg_end parameters.
8108         Rewrite, parsing left to right.
8109         (location_completer): Rewrite.
8110         (location_completer_handle_brkchars): New function.
8111         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8112         (enum complete_line_internal_reason): Adjust comments.
8113         (completion_tracker::discard_completions): New.
8114         (completer_handle_brkchars_func_for_completer): Handle
8115         location_completer.
8116         (gdb_custom_word_point_brkchars)
8117         (gdb_org_rl_basic_quote_characters): New.
8118         (gdb_completion_word_break_characters_throw)
8119         (completion_find_completion_word): Handle trackers that use a
8120         custom word point.
8121         (completion_tracker::advance_custom_word_point_by): New.
8122         (completion_tracker::build_completion_result): Don't rely on
8123         readline appending the quote char.
8124         (gdb_rl_attempted_completion_function_throw): Handle trackers that
8125         use a custom word point.
8126         (gdb_rl_attempted_completion_function): Restore
8127         rl_basic_quote_characters.
8128         * completer.h (class completion_tracker): Extend intro comment.
8129         (completion_tracker::set_quote_char)
8130         (completion_tracker::quote_char)
8131         (completion_tracker::set_use_custom_word_point)
8132         (completion_tracker::use_custom_word_point)
8133         (completion_tracker::custom_word_point)
8134         (completion_tracker::set_custom_word_point)
8135         (completion_tracker::advance_custom_word_point_by)
8136         (completion_tracker::completes_to_completion_word)
8137         (completion_tracker::discard_completions): New methods.
8138         (completion_tracker::m_quote_char)
8139         (completion_tracker::m_use_custom_word_point)
8140         (completion_tracker::m_custom_word_point): New fields.
8141         (advance_to_expression_complete_word_point): Declare.
8142         * f-lang.c (f_collect_symbol_completion_matches): Add
8143         complete_symbol_mode parameter.
8144         * language.h (struct language_defn)
8145         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8146         parameter.
8147         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
8148         (linespec_complete_function): New function.
8149         (linespec_lexer_lex_keyword): Adjust.
8150         * linespec.h (linespec_keywords, linespec_complete_function): New
8151         declarations.
8152         * location.c (find_end_quote): New function.
8153         (explicit_location_lex_one): Add explicit_completion_info
8154         parameter.  Save quoting info.  Don't throw if being called for
8155         completion.  Don't handle Ada operators here.
8156         (is_cp_operator, skip_op_false_positives, first_of)
8157         (explicit_location_lex_one_function): New function.
8158         (string_to_explicit_location): Replace 'dont_throw' parameter with
8159         an explicit_completion_info pointer parameter.  Handle it.  Don't
8160         use explicit_location_lex_one to lex function names.  Use
8161         explicit_location_lex_one_function instead.
8162         * location.h (struct explicit_completion_info): New.
8163         (string_to_explicit_location): Replace 'dont_throw' parameter with
8164         an explicit_completion_info pointer parameter.
8165         * symtab.c (default_collect_symbol_completion_matches_break_on):
8166         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
8167         (default_collect_symbol_completion_matches)
8168         (collect_symbol_completion_matches): Add complete_symbol_mode
8169         parameter.
8170         (collect_symbol_completion_matches_type): Pass down
8171         complete_symbol_mode::EXPRESSION.
8172         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8173         parameter.  Handle LINESPEC mode.
8174         * symtab.h (complete_symbol_mode): New.
8175         (default_collect_symbol_completion_matches_break_on)
8176         (default_collect_symbol_completion_matches)
8177         (collect_symbol_completion_matches)
8178         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8179         parameter.
8180
8181 2017-07-17  Pedro Alves  <palves@redhat.com>
8182
8183         * utils.c (enum class strncmp_iw_mode): New.
8184         (strcmp_iw): Rename to ...
8185         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
8186         parameters.  Handle them.
8187         (strncmp_iw): New.
8188         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8189         * utils.h (strncmp_iw): Declare.
8190         (strcmp_iw): Move describing comments here.
8191
8192 2017-07-17  Pedro Alves  <palves@redhat.com>
8193
8194         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8195         CP_OPERATOR_STR.
8196         * c-typeprint.c (is_type_conversion_operator): Use
8197         CP_OPERATOR_STR.
8198         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8199         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8200         CP_OPERATOR_LEN.
8201         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8202         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8203         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8204         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8205         CP_OPERATOR_STR.
8206         * location.c: Include "cp-support.h".
8207         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8208         CP_OPERATOR_STR.
8209         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8210         CP_OPERATOR_LEN.
8211
8212 2017-07-17  Pedro Alves  <palves@redhat.com>
8213
8214         * cli/cli-cmds.c (complete_command): Use a completion tracker
8215         along with completion_find_completion_word for handle_brkchars
8216         phase.
8217         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8218         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8219         (struct gdb_rl_completion_word_info): New.
8220         (gdb_rl_find_completion_word): New.
8221         (completion_find_completion_word): New.
8222         * completer.h (completion_find_completion_word): Declare.
8223
8224 2017-07-17  Pedro Alves  <palves@redhat.com>
8225
8226         * ada-lang.c (symbol_completion_match): Adjust comments.
8227         (symbol_completion_add): Replace vector parameter with
8228         completion_tracker parameter.  Use it.
8229         (ada_make_symbol_completion_list): Rename to...
8230         (ada_collect_symbol_completion_matches): ... this.  Add
8231         completion_tracker parameter and use it.
8232         (ada_language_defn): Adjust.
8233         * break-catch-syscall.c (catch_syscall_completer): Adjust
8234         prototype and work with completion_tracker instead of VEC.
8235         * breakpoint.c (condition_completer): Adjust prototype and work
8236         with completion_tracker instead of VEC.
8237         * c-lang.c (c_language_defn, cplus_language_defn)
8238         (asm_language_defn, minimal_language_defn): Adjust to renames.
8239         * cli/cli-cmds.c (complete_command): Rework using
8240         completion_tracker.  Catch exceptions when completing.
8241         * cli/cli-decode.c (integer_unlimited_completer)
8242         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8243         with completion_tracker instead of VEC.
8244         * command.h (struct completion_tracker): Forward declare.
8245         (completer_ftype, completer_handle_brkchars_ftype): Change
8246         types.
8247         (complete_on_cmdlist, complete_on_enum): Adjust.
8248         * completer.c: Include <algorithm>.
8249         (struct gdb_completer_state): New.
8250         (current_completion): New global.
8251         (readline_line_completion_function): Delete.
8252         (noop_completer, filename_completer)
8253         (filename_completer_handle_brkchars, complete_files_symbols)
8254         (linespec_location_completer): Adjust to work with a
8255         completion_tracker instead of a VEC.
8256         (string_or_empty): New.
8257         (collect_explicit_location_matches): Adjust to work with a
8258         completion_tracker instead of a VEC.
8259         (explicit_location_completer): Rename to ...
8260         (complete_explicit_location): ... this and adjust to work with a
8261         completion_tracker instead of a VEC.
8262         (location_completer): Adjust to work with a completion_tracker
8263         instead of a VEC.
8264         (add_struct_fields): Adjust to work with a completion_list instead
8265         of VEC.
8266         (expression_completer): Rename to ...
8267         (complete_expression): ... this and adjust to work with a
8268         completion_tracker instead of a VEC.  Use complete_files_symbols.
8269         (expression_completer): Reimplement on top of complete_expression.
8270         (symbol_completer): Adjust to work with a completion_tracker
8271         instead of a VEC.
8272         (enum complete_line_internal_reason): Add describing comments.
8273         (complete_line_internal_normal_command): Adjust to work with a
8274         completion_tracker instead of a VEC.
8275         (complete_line_internal): Rename to ...
8276         (complete_line_internal_1): ... this and adjust to work with a
8277         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
8278         handle_brkchars phase.
8279         (new_completion_tracker): Delete.
8280         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8281         complete_line_internal_1.
8282         (free_completion_tracker): Delete.
8283         (INITIAL_COMPLETION_HTAB_SIZE): New.
8284         (completion_tracker::completion_tracker)
8285         (completion_tracker::~completion_tracker): New.
8286         (maybe_add_completion): Delete.
8287         (completion_tracker::maybe_add_completion)
8288         (completion_tracker::add_completion)
8289         (completion_tracker::add_completions): New.
8290         (throw_max_completions_reached_error): Delete.
8291         (complete_line): Adjust to work with a completion_tracker instead
8292         of a VEC.  Don't create a completion_tracker_t or check for max
8293         completions here.
8294         (command_completer, command_completer_handle_brkchars)
8295         (signal_completer, reg_or_group_completer_1)
8296         (reg_or_group_completer, default_completer_handle_brkchars):
8297         Adjust to work with a completion_tracker.
8298         (gdb_completion_word_break_characters_throw): New.
8299         (gdb_completion_word_break_characters): Reimplement.
8300         (line_completion_function): Delete.
8301         (completion_tracker::recompute_lowest_common_denominator)
8302         (expand_preserving_ws)
8303         (completion_tracker::build_completion_result)
8304         (completion_result::completion_result)
8305         (completion_result::completion_result)
8306         (completion_result::~completion_result)
8307         (completion_result::completion_result)
8308         (completion_result::release_match_list, compare_cstrings)
8309         (completion_result::sort_match_list)
8310         (completion_result::reset_match_list)
8311         (gdb_rl_attempted_completion_function_throw)
8312         (gdb_rl_attempted_completion_function): New.
8313         * completer.h (completion_list, struct completion_result)
8314         (class completion_tracker): New.
8315         (complete_line): Add completion_tracker parameter.
8316         (readline_line_completion_function): Delete.
8317         (gdb_rl_attempted_completion_function): New.
8318         (noop_completer, filename_completer, expression_completer)
8319         (location_completer, symbol_completer, command_completer)
8320         (signal_completer, reg_or_group_completer): Update prototypes.
8321         (completion_tracker_t, new_completion_tracker)
8322         (make_cleanup_free_completion_tracker): Delete.
8323         (enum maybe_add_completion_enum): Delete.
8324         (maybe_add_completion): Delete.
8325         (throw_max_completions_reached_error): Delete.
8326         * corefile.c (complete_set_gnutarget): Adjust to work with a
8327         completion_tracker instead of a VEC.
8328         * cp-abi.c (cp_abi_completer): Adjust to work with a
8329         completion_tracker instead of a VEC.
8330         * d-lang.c (d_language_defn): Adjust.
8331         * disasm.c (disassembler_options_completer): Adjust to work with a
8332         completion_tracker instead of a VEC.
8333         * f-lang.c (f_make_symbol_completion_list): Rename to ...
8334         (f_collect_symbol_completion_matches): ... this.  Adjust to work
8335         with a completion_tracker instead of a VEC.
8336         (f_language_defn): Adjust.
8337         * go-lang.c (go_language_defn): Adjust.
8338         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8339         Adjust to work with a completion_tracker instead of a VEC.
8340         * infrun.c (handle_completer): Likewise.
8341         * interps.c (interpreter_completer): Likewise.
8342         * interps.h (interpreter_completer): Likewise.
8343         * language.c (unknown_language_defn, auto_language_defn)
8344         (local_language_defn): Adjust.
8345         * language.h (language_defn::la_make_symbol_completion_list):
8346         Rename to ...
8347         (language_defn::la_collect_symbol_completion_matches): ... this
8348         and adjust to work with a completion_tracker instead of a VEC.
8349         * m2-lang.c (m2_language_defn): Adjust.
8350         * objc-lang.c (objc_language_defn): Adjust.
8351         * opencl-lang.c (opencl_language_defn): Adjust.
8352         * p-lang.c (pascal_language_defn): Adjust.
8353         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8354         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8355         with a completion_tracker.
8356         * rust-lang.c (rust_language_defn): Adjust.
8357         * symtab.c (free_completion_list, do_free_completion_list)
8358         (return_val, completion_tracker): Delete.
8359         (completion_list_add_name, completion_list_add_symbol)
8360         (completion_list_add_msymbol, completion_list_objc_symbol)
8361         (completion_list_add_fields, add_symtab_completions): Add
8362         completion_tracker parameter and use it.
8363         (default_make_symbol_completion_list_break_on_1): Rename to...
8364         (default_collect_symbol_completion_matches_break_on): ... this.
8365         Add completion_tracker parameter and use it instead of allocating
8366         a completion tracker here.
8367         (default_make_symbol_completion_list_break_on): Delete old
8368         implementation.
8369         (default_make_symbol_completion_list): Delete.
8370         (default_collect_symbol_completion_matches): New.
8371         (make_symbol_completion_list): Delete.
8372         (collect_symbol_completion_matches): New.
8373         (make_symbol_completion_type): Rename to ...
8374         (collect_symbol_completion_matches_type): ... this.  Add
8375         completion_tracker parameter and use it instead of VEC.
8376         (make_file_symbol_completion_list_1): Rename to...
8377         (collect_file_symbol_completion_matches): ... this.  Add
8378         completion_tracker parameter and use it instead of VEC.
8379         (make_file_symbol_completion_list): Delete.
8380         (add_filename_to_list): Use completion_list instead of a VEC.
8381         (add_partial_filename_data::list): Now a completion_list.
8382         (make_source_files_completion_list): Work with a completion_list
8383         instead of a VEC.
8384         * symtab.h: Include "completer.h".
8385         (default_make_symbol_completion_list_break_on)
8386         (default_make_symbol_completion_list, make_symbol_completion_list)
8387         (make_symbol_completion_type, make_file_symbol_completion_list)
8388         (make_source_files_completion_list): Delete.
8389         (default_collect_symbol_completion_matches_break_on)
8390         (default_collect_symbol_completion_matches)
8391         (collect_symbol_completion_matches)
8392         (collect_symbol_completion_matches_type)
8393         (collect_file_symbol_completion_matches)
8394         (make_source_files_completion_list): New.
8395         * top.c (init_main): Don't install a rl_completion_entry_function
8396         hook.  Install a rl_attempted_completion_function hook instead.
8397         * tui/tui-layout.c (layout_completer): Adjust to work with a
8398         completion_tracker.
8399         * tui/tui-regs.c (tui_reggroup_completer):
8400         * tui/tui-win.c (window_name_completer, focus_completer)
8401         (winheight_completer): Adjust to work with a completion_tracker.
8402         * value.c: Include "completer.h".
8403         (complete_internalvar): Adjust to work with a completion_tracker.
8404         * value.h (complete_internalvar): Likewise.
8405
8406 2017-07-17  Pedro Alves  <palves@redhat.com>
8407
8408         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8409         renames.
8410         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8411         comments to completer_ftype's declaration.
8412         <completer_handle_brkchars>: Change type to
8413         completer_handle_brkchars_ftype.
8414         * command.h (completer_ftype): Add describing comment and give
8415         names to parameters.
8416         (completer_ftype_void): Rename to ...
8417         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
8418         (set_cmd_completer_handle_brkchars): Adjust.
8419         * completer.c (filename_completer_handle_brkchars): New function.
8420         (complete_line_internal_normal_command): New function, factored
8421         out from ...
8422         (complete_line_internal): ... here.
8423         (command_completer_handle_brkchars)
8424         (default_completer_handle_brkchars)
8425         (completer_handle_brkchars_func_for_completer): New functions.
8426         * completer.h (set_gdb_completion_word_break_characters): Delete
8427         declaration.
8428         (completer_handle_brkchars_func_for_completer): New declaration.
8429         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8430         completer_handle_brkchars_func_for_completer.
8431
8432 2017-07-17  Pedro Alves  <palves@redhat.com>
8433
8434         * completer.c (symbol_completer): New function, based on
8435         make_symbol_completion_list_fn.
8436         * completer.h (symbol_completer): New declaration.
8437         * guile/scm-cmd.c (cmdscm_completers): Adjust.
8438         * python/py-cmd.c (completers): Adjust.
8439         * symtab.c (make_symbol_completion_list_fn): Delete.
8440         * symtab.h (make_symbol_completion_list_fn): Delete.
8441         * cli/cli-decode.c (add_cmd): Adjust.
8442
8443 2017-07-17  Pedro Alves  <palves@redhat.com>
8444
8445         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8446         * dwarf2read.c: Include "filename-seen-cache.h".
8447         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8448         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8449         * filename-seen-cache.c: New file.
8450         * filename-seen-cache.h: New file.
8451         * symtab.c: Include "filename-seen-cache.h".
8452         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8453         (create_filename_seen_cache, clear_filename_seen_cache)
8454         (delete_filename_seen_cache, filename_seen): Delete, parts moved
8455         to filename-seen-cache.h/filename-seen-cache.c.
8456         (output_source_filename, sources_info)
8457         (maybe_add_partial_symtab_filename)
8458         (make_source_files_completion_list): Adjust to use
8459         filename_seen_cache.
8460
8461 2017-07-17  Pedro Alves  <palves@redhat.com>
8462
8463         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8464         fields.
8465         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8466         dwarf2_debug_sections*)): New.
8467         (dwarf2_per_objfile::dwarf2_per_objfile(const
8468         dwarf2_per_objfile&)): Declare as deleted.
8469         (dwarf2_per_objfile::operator=): Declare as deleted.
8470         (dwarf2_per_objfile::dwarf2_per_objfile)
8471         (dwarf2_per_objfile::~dwarf2_per_objfile)
8472         (dwarf2_per_objfile::free_cached_comp_units): New.
8473         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8474         ctor.  Call dwarf2_per_objfile's ctor manually.
8475         (dwarf2_locate_sections): Deleted/refactored as ...
8476         (dwarf2_per_objfile::locate_sections): ... this new method.
8477         (free_cached_comp_units): Defer to
8478         dwarf2_per_objfile::free_cached_comp_units.
8479         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8480
8481 2017-07-14  Tom Tromey  <tom@tromey.com>
8482
8483         PR rust/21764:
8484         * rust-exp.y (convert_ast_to_expression): Add "want_type"
8485         parameter.
8486         <UNOP_SIZEOF>: Split into separate case.
8487         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
8488
8489 2017-07-14  Tom Tromey  <tom@tromey.com>
8490
8491         PR rust/21763:
8492         * symtab.c (symbol_matches_domain): Add language_rust to special
8493         case.
8494         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8495         treat LOC_TYPEDEF symbols as variables.
8496
8497 2017-07-14  Pedro Alves  <palves@redhat.com>
8498
8499         * symtab.c (make_file_symbol_completion_list_1): Iterate over
8500         symtabs matching all symtabs with SRCFILE as file name instead of
8501         only considering the first hit, with lookup_symtab.
8502
8503 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8504
8505         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8506         operator_name parameters.
8507         (gen_expr): Update function call.
8508
8509 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8510
8511         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8512         parameter.
8513         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8514         Likewise.
8515         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8516         parameter, use agent_expr::gdbarch instead, update function
8517         calls.
8518         (locexpr_tracepoint_var_ref): Likewise.
8519         (loclist_tracepoint_var_ref): Likewise.
8520         * ax-gdb.c (gen_trace_static_fields): Likewise.
8521         (gen_traced_pop): Likewise.
8522         (gen_frame_args_address): Likewise.
8523         (gen_frame_locals_address): Likewise.
8524         (gen_var_ref): Likewise.
8525         (gen_struct_ref_recursive): Likewise.
8526         (gen_static_field): Likewise.
8527         (gen_maybe_namespace_elt): Likewise.
8528         (gen_expr): Likewise.
8529         (gen_trace_for_var): Likewise.
8530         (gen_trace_for_expr): Likewise.
8531         (gen_trace_for_return_address): Likewise.
8532
8533 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8534
8535         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8536         parameter.
8537         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8538
8539 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8540
8541         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8542         from ax, update calls.
8543         (gen_usual_arithmetic): Likewise.
8544         (gen_integral_promotions): Likewise.
8545         (gen_bitfield_ref): Likewise.
8546         (gen_primitive_field): Likewise.
8547         (gen_struct_ref_recursive): Likewise.
8548         (gen_struct_ref): Likewise.
8549         (gen_maybe_namespace_elt): Likewise.
8550         (gen_struct_elt_for_reference): Likewise.
8551         (gen_namespace_elt): Likewise.
8552         (gen_aggregate_elt_ref): Likewise.
8553         (gen_expr): Get gdbarch from ax, update calls.
8554         (gen_expr_binop_rest): Likewise.
8555
8556 2017-07-13  Pedro Alves  <palves@redhat.com>
8557
8558         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8559         as default tdesc.
8560         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8561         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8562         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8563         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
8564         tdep.
8565         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8566         Get final tdesc from the tdep.
8567         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8568         default tdesc.
8569         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8570         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8571         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8572         Use it as default tdesc.
8573         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8574         down to amd_init_abi.  No longer handle fallback tdesc here.
8575         * amd64-tdep.h (tdesc_x32): Declare.
8576         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8577         parameter.
8578         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8579         as default tdesc.
8580
8581 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8582
8583         * s390-linux-tdep.c (s390_process_record): Add support for
8584         instructions new in arch12.
8585
8586 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8587
8588         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8589         PT_GETFSBASE and PT_GETGSBASE.
8590         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8591         PT_SETGSBASE.
8592
8593 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8594
8595         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8596         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8597         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8598         those rules.
8599         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8600         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8601         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8602         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8603         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8604         * features/i386/amd64.xml: Add 64bit-segments.xml.
8605         * features/i386/amd64-avx-avx512.c: Regenerated.
8606         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8607         * features/i386/amd64-avx-mpx.c: Regenerated.
8608         * features/i386/amd64-avx.c: Regenerated.
8609         * features/i386/amd64-mpx.c: Regenerated.
8610         * features/i386/amd64.c: Regenerated.
8611         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8612         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8613         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8614         * regformats/i386/amd64-avx.dat: Regenerated.
8615         * regformats/i386/amd64-mpx.dat: Regenerated.
8616         * regformats/i386/amd64.dat: Regenerated.
8617
8618 2017-07-10  Yao Qi  <yao.qi@linaro.org>
8619
8620         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8621         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8622
8623 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
8624
8625         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8626         unsetenv.
8627         * gnulib/aclocal.m4: Regenerate.
8628         * gnulib/config.in: Regenerate.
8629         * gnulib/configure: Regenerate.
8630         * gnulib/import/Makefile.am: Regenerate.
8631         * gnulib/import/Makefile.in: Regenerate.
8632         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8633         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8634         * gnulib/import/m4/environ.m4: New file.
8635         * gnulib/import/m4/setenv.m4: New file.
8636         * gnulib/import/setenv.c: New file.
8637         * gnulib/import/unsetenv.c: New file.
8638
8639 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
8640
8641         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8642         address when op is DW_OP_addr.
8643
8644 2017-07-09  Tom Tromey  <tom@tromey.com>
8645
8646         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8647         check and apply to outer type.
8648
8649 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8650
8651         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8652         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8653         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8654         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8655
8656 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8657
8658         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8659
8660 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8661
8662         * corelow.c (get_core_siginfo): Remove.
8663         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8664         instead of get_core_siginfo.
8665         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8666         * gdbarch.h: Re-generate.
8667         * gdbarch.c: Re-generate.
8668         * linux-tdep.c (linux_core_xfer_siginfo): New.
8669         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8670
8671 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8672
8673         * corelow.c (thread_section_name): Move to ...
8674         * gdbcore.h (thread_section_name): ... here.
8675
8676 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8677
8678         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8679         (struct siginfo32): New.
8680         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8681         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8682         via ptrace(PT_LWPINFO).
8683
8684 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8685
8686         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8687         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8688         (fbsd_get_siginfo_type): New.
8689         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8690         (_initialize_fbsd_tdep): New.
8691
8692 2017-07-06  David Blaikie  <dblaikie@gmail.com>
8693
8694         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8695         a singular dwo_unit*) to support multiple CUs in the same way that
8696         multiple TUs are supported.
8697         (create_cus_hash_table): Replace create_dwo_cu with a function for
8698         parsing multiple CUs from a DWO file.
8699         (open_and_init_dwo_file): Use create_cus_hash_table rather than
8700         create_dwo_cu.
8701         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8702         htab_find, rather than comparing the signature to a singleton CU in
8703         the dwo_file.
8704
8705 2017-07-06  Pedro Alves  <palves@redhat.com>
8706
8707         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8708
8709 2017-07-04  Pedro Alves  <palves@redhat.com>
8710
8711         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8712         * gdbtypes.h (TYPE_STATIC): Delete.
8713         (struct fn_field) <is_public, is_abstract, is_static, is_final,
8714         is_synchronized, is_native>: Delete.
8715         <dummy>: Bump.
8716         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8717         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8718         (TYPE_FN_FIELD_ABSTRACT): Delete.
8719
8720 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
8721
8722         * buffer.h (buffer_finish): Fix spelling mistakes.
8723
8724 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
8725
8726         * .dir-locals.el: Automatically switch to C-style comments in
8727         versions of Emacs that support the feature.
8728
8729 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8730             Pedro Alves  <palves@redhat.com>
8731
8732         PR cli/21688
8733         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
8734         (process_next_line): New variable 'inline_cmd'.
8735         Adjust 'if' clauses for "python", "compile" and "guile" to use
8736         'command_name_equals' and check for '!inline_cmd'.
8737
8738 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8739
8740         PR cli/21688
8741         * cli/cli-script.c (command_name_equals_not_inline): New function.
8742         (process_next_line): Adjust 'if' clauses for "python", "compile"
8743         and "guile" to use command_name_equals_not_inline.
8744
8745 2017-06-29  Pedro Alves  <palves@redhat.com>
8746
8747         * completer.c (expression_completer): Call
8748         linespec_location_completer instead of location_completer.
8749
8750 2017-06-29  Pedro Alves  <palves@redhat.com>
8751
8752         * completer.c (expression_completer): Remove code that recomputes
8753         'text' from 'word'.
8754
8755 2017-06-29  Yao Qi  <yao.qi@linaro.org>
8756
8757         * regformats/regdat.sh: Generate code with
8758         "ifndef IN_PROCESS_AGENT".
8759
8760 2017-06-28  Pedro Alves  <palves@redhat.com>
8761
8762         * command.h: Include "common/scoped_restore.h".
8763
8764 2017-06-28  Yao Qi  <yao.qi@linaro.org>
8765
8766         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
8767         instead of obstack_grow.
8768
8769 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
8770
8771         PR gdb/21337
8772         * symfile.c (reread_symbols): Call objfiles_changed just before
8773         read_symbols.
8774
8775 2017-06-27  Pedro Alves  <palves@redhat.com>
8776
8777         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
8778         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
8779         (completion_list_add_symbol, completion_list_add_msymbol):
8780         ... these new functions.
8781         (add_symtab_completions)
8782         (default_make_symbol_completion_list_break_on_1): Adjust.
8783
8784 2017-06-27  Pedro Alves  <palves@redhat.com>
8785
8786         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
8787         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
8788         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
8789         dtor.
8790         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
8791         'storage_obstack' field an auto_obstack.  In-class initialize all
8792         non-bitfield fields.  Make minsyms_read bool.
8793         * symfile.c (read_symbols): Adjust.
8794
8795 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
8796
8797         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
8798         (gdbsim_store_register): Likewise.
8799
8800 2017-06-27  Pedro Alves  <palves@redhat.com>
8801
8802         * c-exp.y (name_obstack): Now an auto_obstack.
8803         (yylex): Use auto_obstack::clear.
8804         (c_parse): Use auto_obstack::clear instead of reinitializing and
8805         freeing the obstack.
8806         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
8807         * d-exp.y (name_obstack): Now an auto_obstack.
8808         (yylex): Use auto_obstack::clear.
8809         (d_parse): Use auto_obstack::clear instead of reinitializing and
8810         freeing the obstack.
8811         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
8812         auto_obstack.
8813         * dwarf2read.c (create_addrmap_from_index)
8814         (dwarf2_build_psymtabs_hard)
8815         (update_enumeration_type_from_children): Likewise.
8816         * gdb_obstack.h (auto_obstack): New type.
8817         * go-exp.y (name_obstack): Now an auto_obstack.
8818         (build_packaged_name): Use auto_obstack::clear.
8819         (go_parse): Use auto_obstack::clear instead of reinitializing and
8820         freeing the obstack.
8821         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
8822         auto_obstack.
8823         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
8824         * rust-exp.y (work_obstack): Now an auto_obstack.
8825         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
8826         reinitializing and freeing the obstack.
8827         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
8828         (host_char_to_target): Use auto_obstack.
8829         * utils.h (make_cleanup_obstack_free): Delete declaration.
8830         * valprint.c (generic_emit_char, generic_printstr): Use
8831         auto_obstack.
8832
8833 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
8834
8835         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
8836         thread.
8837         (darwin_init_thread_list): Don't update dummy thread.
8838         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
8839
8840 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8841
8842         * record-full.c (netorder16): Remove.
8843
8844 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8845
8846         * common/diagnostics.h: Define macros for GCC.
8847         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
8848         * common/vec.h: Include diagnostics.h.
8849         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
8850         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
8851         warning.
8852
8853 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8854
8855         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
8856         New macro.
8857         * ada-lex.l: Ignore deprecated register warnings.
8858
8859 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8860
8861         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8862         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8863
8864 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8865
8866         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
8867         its own line.
8868
8869 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8870
8871         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
8872
8873 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
8874
8875         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
8876         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
8877         (xtensa_register_read_masked): Likewise.
8878
8879 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
8880
8881         * common/environ.c (gdb_environ::unset): Update comment.
8882
8883 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8884
8885         * python/py-unwind.c (pyuw_sniffer): Allocate space for
8886         registers.
8887
8888 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8889
8890         * record-full.c (record_full_exec_insn): Use byte_vector.
8891
8892 2017-06-22  Yao Qi  <yao.qi@linaro.org>
8893
8894         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
8895         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8896
8897 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8898
8899         * remote.c (cached_reg): Move from here...
8900         * regcache.h (cached_reg): ...to here.
8901         * python/py-unwind.c (struct reg_info): Remove.
8902         (cached_frame_info): Use cached_reg_t.
8903         (pyuw_prev_register): Likewise.
8904         (pyuw_sniffer): Use cached_reg_t and allocate registers.
8905         (pyuw_dealloc_cache): Free all registers.
8906
8907 2017-06-22  Pedro Alves  <palves@redhat.com>
8908             Simon Marchi  <simon.marchi@ericsson.com>
8909
8910         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
8911         warning.
8912         * common/diagnostics.h: New file.
8913
8914 2017-06-22  Pedro Alves  <palves@redhat.com>
8915
8916         * common/agent.h: Add include guards.
8917
8918 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
8919
8920         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
8921         talk about addressable units instead of bytes.
8922
8923 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8924
8925         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
8926         of '::const_iterator'.
8927
8928 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8929
8930         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8931         'unittests/environ-selftests.c'.
8932         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
8933         * charset.c (find_charset_names): Declare object 'iconv_env'.
8934         Update code to use 'iconv_env' object.  Remove call to
8935         'free_environ'.
8936         * common/environ.c: Include <utility>.
8937         (make_environ): Delete function.
8938         (free_environ): Delete function.
8939         (gdb_environ::clear): New function.
8940         (gdb_environ::operator=): New function.
8941         (gdb_environ::get): Likewise.
8942         (environ_vector): Delete function.
8943         (set_in_environ): Delete function.
8944         (gdb_environ::set): New function.
8945         (unset_in_environ): Delete function.
8946         (gdb_environ::unset): New function.
8947         (gdb_environ::envp): Likewise.
8948         * common/environ.h: Include <vector>.
8949         (struct gdb_environ): Delete; transform into...
8950         (class gdb_environ): ... this class.
8951         (free_environ): Delete prototype.
8952         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
8953         environ_vector): Likewise.
8954         * infcmd.c (run_command_1): Update code to call
8955         'envp' from 'gdb_environ' class.
8956         (environment_info): Update code to call methods from 'gdb_environ'
8957         class.
8958         (unset_environment_command): Likewise.
8959         (path_info): Likewise.
8960         (path_command): Likewise.
8961         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
8962         (inferior::inferior): Initialize 'environment' using the host's
8963         information.
8964         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
8965         Include "environ.h".
8966         (class inferior) <environment>: Change type from 'struct
8967         gdb_environ' to 'gdb_environ'.
8968         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
8969         methods from 'gdb_environ' class.
8970         * solib.c (solib_find_1): Likewise
8971         * unittests/environ-selftests.c: New file.
8972
8973 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8974
8975         * features/i386/i386-linux.xml: Exchange the order of including
8976         32bit-linux.xml and 32bit-sse.xml.
8977         * features/i386/i386-linux.c: Regenerated.
8978
8979 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8980
8981         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
8982         Delete copy ctor and assignment operator.
8983         (tdesc_type): Likewise.
8984         (tdesc_feature): Likewise.
8985         (tdesc_free_reg): Remove.
8986         (tdesc_create_reg): Use new.
8987         (tdesc_free_type): Remove.
8988         (tdesc_create_vector): Use new.
8989         (tdesc_create_union): Likewise.
8990         (tdesc_create_flags): Likewise.
8991         (tdesc_create_enum): Likewise.
8992         (tdesc_free_feature): Delete.
8993         (free_target_description): Use delete.
8994
8995 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
8996
8997         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
8998         registers.
8999
9000 2017-06-19  Pedro Alves  <palves@redhat.com>
9001
9002         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9003         after gdb::unlinker.
9004
9005 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
9006
9007         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9008         gdb_environ to access an environment variable.
9009
9010 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
9011
9012         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9013         gdb_byte*.
9014
9015 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9016
9017         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9018
9019 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9020
9021         * configure: Re-generate.
9022         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9023
9024 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9025
9026         * configure: Re-generate.
9027         * warning.m4: Pass -Werror to compiler when checking for
9028         supported warning flags.
9029
9030 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9031
9032         * Makefile.in (COMPILE.pre): Add "-x c++".
9033
9034 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
9035             Pedro Alves  <palves@redhat.com>
9036             Yao Qi  <yao.qi@linaro.org>
9037
9038         * defs.h (RequireLongest): New.
9039         (extract_integer): Declare function template.
9040         (extract_signed_integer): Remove the declaration, but define it
9041         static inline.
9042         (extract_unsigned_integer): Likewise.
9043         (store_integer): Declare function template.
9044         (store_signed_integer): Remove the declaration, but define it
9045         static inline.
9046         (store_unsigned_integer): Likewise.
9047         * findvar.c (extract_integer): New function template.
9048         (extract_signed_integer): Remove.
9049         (extract_unsigned_integer): Remove.
9050         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9051         instantiations.
9052         (store_integer): New function template.
9053         (store_signed_integer): Remove.
9054         (store_unsigned_integer): Remove.
9055         (store_integer): Explicit instantiations.
9056         * regcache.c (regcache_raw_read_signed): Update.
9057         (regcache::raw_read): New function.
9058         (regcache::raw_read_signed): Remove.
9059         (regcache::raw_read_unsigned): Remove.
9060         (regcache_raw_read_unsigned): Update.
9061         (regcache_raw_write_unsigned): Update.
9062         (regcache::raw_write_signed): Remove.
9063         (regcache::raw_write): New function.
9064         (regcache_cooked_read_signed): Update.
9065         (regcache::raw_write_unsigned): Remove.
9066         (regcache::cooked_read_signed): Remove.
9067         (regcache_cooked_read_unsigned): Update.
9068         (regcache::cooked_read_unsigned): Remove.
9069         (regcache_cooked_write_signed): Update.
9070         (regcache_cooked_write_unsigned): Update.
9071         * regcache.h (regcache) <raw_read_signed>: Remove.
9072         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9073         <raw_read, raw_write>: New.
9074         <cooked_read_signed, cooked_write_signed>: Remove.
9075         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9076         <cooked_read, cooked_write>: New.
9077         * sh64-tdep.c (sh64_pseudo_register_read): Update.
9078         (sh64_pseudo_register_write): Update.
9079
9080 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
9081
9082         * arc-tdep.c (arc_disassembler_options): New variable.
9083         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9084         of default_print_insn.
9085         (arc_delayed_print_insn): Set info->section when needed,
9086         use default_print_insn to retrieve a disassembler.
9087
9088 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
9089
9090         PR gdb/21574
9091         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9092         to mention $SHELL and startup-with-shell.
9093
9094 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
9095
9096         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9097
9098 2017-06-14  Yao Qi  <yao.qi@linaro.org>
9099
9100         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9101         default_print_insn instead of print_insn_aarch64.
9102         * arm-tdep.c (gdb_print_insn_arm): Call
9103         default_print_insn instead of print_insn_big_arm
9104         and print_insn_little_arm.
9105         * i386-tdep.c (i386_print_insn): Call default_print_insn
9106         instead of print_insn_i386.
9107         * ia64-tdep.c (ia64_print_insn): Call
9108         default_print_insn instead of print_insn_ia64.
9109         * mips-tdep.c (gdb_print_insn_mips): Call
9110         default_print_insn instead of print_insn_big_mips
9111         and print_insn_little_mips.
9112         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9113         instead of print_insn_spu.
9114
9115 2017-06-14  Pedro Alves  <palves@redhat.com>
9116
9117         * ada-lang.c: Include "common/byte-vector.h".
9118         (ada_value_primitive_packed_val): Use gdb::byte_vector.
9119         * charset.c (wchar_iterator::iterate): Resize the vector instead
9120         of reserving it.
9121         * common/byte-vector.h: Include "common/def-vector.h".
9122         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9123         * cli/cli-dump.c: Include "common/byte-vector.h".
9124         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9125         * common/byte-vector.h: New file.
9126         * common/def-vector.h: New file.
9127         * common/default-init-alloc.h: New file.
9128         * dwarf2loc.c: Include "common/byte-vector.h".
9129         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9130         instead of reserving it.
9131         * dwarf2read.c: Include "common/byte-vector.h".
9132         (data_buf::m_vec): Now a gdb::byte_vector.
9133         * gdb_regex.c: Include "common/def-vector.h".
9134         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9135         * mi/mi-main.c: Include "common/byte-vector.h".
9136         (mi_cmd_data_read_memory): Use gdb::byte_vector.
9137         * printcmd.c: Include "common/byte-vector.h".
9138         (print_scalar_formatted): Use gdb::byte_vector.
9139         * valprint.c: Include "common/byte-vector.h".
9140         (maybe_negate_by_bytes, print_decimal_chars): Use
9141         gdb::byte_vector.
9142
9143 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9144
9145         * darwin-nat.c: Include "nat/fork-inferior.h".
9146
9147 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9148
9149         * configure.nat: Factor out Darwin bits that are not
9150         architecture-specific.  Add fork-inferior.o.
9151
9152 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9153
9154         * configure.nat: Factor out AIX bits that are not
9155         architecture-specific.  Add fork-inferior.o.
9156
9157 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9158
9159         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
9160         (read_pieced_value, write_pieced_value): ...here.  Reduce to
9161         wrappers that just call rw_pieced_value.
9162
9163 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9164
9165         * dwarf2loc.c (write_pieced_value): When writing the data for a
9166         memory piece, use write_memory_with_notification instead of
9167         write_memory.
9168
9169 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9170
9171         * valops.c (read_value_memory): Change embedded_offset to
9172         represent a bit offset instead of a byte offset.
9173         * value.h (read_value_memory): Adjust comment.
9174
9175 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9176
9177         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9178         dest_offset_bits and source_offset_bits.
9179         (write_pieced_value): Likewise.
9180
9181 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9182
9183         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9184         given by DW_OP_bit_piece.
9185         (write_pieced_value): Likewise.
9186
9187 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9188
9189         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9190         some other preparations to the places where sufficient information
9191         is available.
9192         (write_pieced_value): Likewise.
9193
9194 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9195
9196         * dwarf2loc.c (bits_to_bytes): New function.
9197         (read_pieced_value): Fix offset calculations for register pieces
9198         on big-endian targets.
9199         (write_pieced_value): Likewise.
9200
9201 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9202
9203         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9204         (write_pieced_value): Likewise.
9205
9206 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9207
9208         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9209         transfer the source value's least significant bits, instead of its
9210         lowest-addressed ones.  Rename type_len to max_offset.
9211         (read_pieced_value): Mirror above changes to write_pieced_value as
9212         applicable.
9213
9214 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9215
9216         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9217         truncate full bytes from dest_offset_bits before using it as an
9218         offset into the buffer.
9219
9220 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9221
9222         * dwarf2loc.c (write_pieced_value): Include transfer size in
9223         byte-wise check.
9224
9225 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9226
9227         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9228         calculation of this_size.
9229
9230 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9231
9232         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9233         when targeting a bit-field.
9234         (write_pieced_value): Likewise.
9235
9236 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9237
9238         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9239         (allocate_piece_closure): Drop addr_size parameter.
9240         (dwarf2_evaluate_loc_desc_full): Adjust call to
9241         allocate_piece_closure.
9242
9243 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9244
9245         PR gdb/21226
9246         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9247         the LSB end, independent of endianness.
9248
9249 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9250
9251         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9252         size capping.
9253
9254 2017-06-13  Yao Qi  <yao.qi@linaro.org>
9255
9256         * mips-linux-nat.c: Move include features/mips*-linux.c to
9257         mips-linux-tdep.c.
9258         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9259         to mips-linux-tdep.c.
9260         * mips-linux-tdep.c: Include features/mips*-linux.c
9261         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9262         functions.
9263         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9264         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9265         (tdesc_mips64_dsp_linux): Declare.
9266
9267 2017-06-12  Tom Tromey  <tom@tromey.com>
9268
9269         * valprint.h (val_print_type_code_int): Remove.
9270         * valprint.c (generic_val_print_int): Always call
9271         val_print_scalar_formatted.
9272         (val_print_type_code_int): Remove.
9273         * printcmd.c (print_scalar_formatted): Handle options->format==0.
9274         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9275         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9276         * ada-valprint.c (ada_val_print_num): Use
9277         val_print_scalar_formatted.
9278
9279 2017-06-12  Tom Tromey  <tom@tromey.com>
9280
9281         * printcmd.c (print_scalar_formatted): Unify the two switches.
9282         Don't convert scalars to LONGEST.
9283
9284 2017-06-12  Tom Tromey  <tom@tromey.com>
9285
9286         PR exp/16225:
9287         * valprint.h (print_decimal_chars): Update.
9288         * valprint.c (maybe_negate_by_bytes): New function.
9289         (print_decimal_chars): Add "is_signed" argument.
9290         * printcmd.c (print_scalar_formatted): Update.
9291
9292 2017-06-12  Tom Tromey  <tom@tromey.com>
9293
9294         PR exp/16225:
9295         * valprint.h (print_binary_chars, print_hex_chars): Update.
9296         * valprint.c (val_print_type_code_int): Update.
9297         (print_binary_chars): Add "zero_pad" argument.
9298         (emit_octal_digit): New function.
9299         (print_octal_chars): Don't zero-pad.
9300         (print_decimal_chars): Likewise.
9301         (print_hex_chars): Add "zero_pad" argument.
9302         * sh64-tdep.c (sh64_do_fp_register): Update.
9303         * regcache.c (regcache::dump): Update.
9304         * printcmd.c (print_scalar_formatted): Update.
9305         * infcmd.c (default_print_one_register_info): Update.
9306
9307 2017-06-12  Pedro Alves  <palves@redhat.com>
9308             Alan Hayward  <alan.hayward@arm.com>
9309
9310         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9311         (mips_eabi_push_dummy_call): Rename local 'regsize' to
9312         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
9313         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9314         Assert that abi_regsize bytes fit in 'ref_valbuf'.
9315
9316 2017-06-12  Pedro Alves  <palves@redhat.com>
9317
9318         * dwarf2read.c (mapped_symtab::data): Now a vector of
9319         symtab_index_entry instead of vector of
9320         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
9321         whether an element's name is NULL instead of checking whether the
9322         element itself is NULL.
9323         (find_slot): Change return type.  Adjust.
9324         (hash_expand, , add_index_entry, uniquify_cu_indices)
9325         (write_hash_table): Adjust.
9326
9327 2017-06-12  Pedro Alves  <palves@redhat.com>
9328
9329         * dwarf2read.c (recursively_count_psymbols): New function.
9330         (write_psymtabs_to_index): Call it to compute number of psyms and
9331         pass estimate size of psyms_seen to unordered_set's ctor.
9332
9333 2017-06-12  Pedro Alves  <palves@redhat.com>
9334
9335         * dwarf2read.c (write_hash_table): Check if key already exists
9336         before emplacing.
9337
9338 2017-06-12  Pedro Alves  <palves@redhat.com>
9339
9340         * dwarf2read.c (data_buf::append_space): Rename to...
9341         (data_buf::grow): ... this, and make private.  Adjust all callers.
9342         (data_buf::append_uint): New method.
9343         (add_address_entry, write_one_signatured_type)
9344         (write_psymtabs_to_index): Use it.
9345
9346 2017-06-12  Pedro Alves  <palves@redhat.com>
9347
9348         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9349         (file_write (FILE *, const std::vector<Elem>&)): Delete.
9350         (data_buf::file_write): Call ::fwrite directly.
9351
9352 2017-06-12  Pedro Alves  <palves@redhat.com>
9353
9354         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9355         std::vector::erase.
9356
9357 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9358
9359         Code cleanup: C++ify .gdb_index producer.
9360         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9361         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9362         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9363         (create_strtab, add_string): Remove.
9364         (file_write, data_buf): New.
9365         (struct symtab_index_entry): Use std::vector for cu_indices.
9366         (struct mapped_symtab): Use std::vector for data.
9367         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9368         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9369         Remove.
9370         (find_slot): Change return type.  Update it to the new data structures.
9371         (hash_expand, add_index_entry): Update it to the new data structures.
9372         (offset_type_compare): Remove.
9373         (uniquify_cu_indices): Update it to the new data structures.
9374         (c_str_view, c_str_view_hasher, vector_hasher): New.
9375         (add_indices_to_cpool): Remove.
9376         (write_hash_table): Update it to the new data structures.
9377         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9378         (eq_psymtab_cu_index): Remove.
9379         (psym_index_map): New typedef.
9380         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9381         reference and std::unordered_map for cu_index_htab.
9382         (add_address_entry, add_address_entry_worker, write_address_map)
9383         (write_psymbols): Update it to the new data structures.
9384         (write_obstack): Remove.
9385         (struct signatured_type_index_data): Change types_list to a data_buf
9386         reference and psyms_seen to a std::unordered_set reference.
9387         (write_one_signatured_type, recursively_write_psymbols)
9388         (write_psymtabs_to_index): Update it to the new data structures.
9389
9390 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
9391
9392         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9393         separate-debug-file commands.
9394         * symfile.h (separate_debug_file_debug): New global.
9395         * symfile.c (separate_debug_file_debug): New global.
9396         (separate_debug_file_exists, find_separate_debug_file): Add
9397         debug output.
9398         (_initialize_symfile): Add "set debug separate-debug-file"
9399         command.
9400         * build-id.c (build_id_to_debug_bfd,
9401         find_separate_debug_file_by_buildid): Add debug output.
9402
9403 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
9404
9405         * gdbarch.sh (displaced_step_free_closure): Remove.
9406         * gdbarch.h, gdbarch.c: Re-generate.
9407         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9408         displaced_step_free_closure.
9409         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9410         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9411         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9412         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9413         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9414         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9415         * arch-utils.h (simple_displaced_step_free_closure): Remove.
9416         * arch-utils.c (simple_displaced_step_free_closure): Remove.
9417         * infrun.c (displaced_step_clear): Call xfree instead of
9418         gdbarch_displaced_step_free_closure.
9419
9420 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
9421
9422         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9423         NULL".
9424
9425 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
9426
9427         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9428         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9429         (mn10300_push_dummy_call): Likewise.
9430
9431 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9432
9433         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9434
9435 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9436
9437         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9438
9439 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9440
9441         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9442         able to start inferiors using a shell.
9443         (New remote packets): Announce new packet "QStartupWithShell".
9444         * remote.c: Add PACKET_QStartupWithShell.
9445         (extended_remote_create_inferior): Handle new
9446         PACKET_QStartupWithShell.
9447         (remote_protocol_features) <QStartupWithShell>: New entry for
9448         PACKET_QStartupWithShell.
9449         (_initialize_remote): Call "add_packet_config_cmd" for
9450         QStartupShell.
9451
9452 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9453             Pedro Alves  <palves@redhat.com>
9454
9455         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9456         and "nat/fork-inferior.h".
9457         * common/common-inferior.h: New file, with contents from
9458         "gdb/inferior.h".
9459         * commom/common-utils.c: Include "common-utils.h".
9460         (stringify_argv): New function.
9461         * common/common-utils.h (stringify_argv): New prototype.
9462         * configure.nat: Add "fork-inferior.o" as a dependency for
9463         "*linux*", "fbsd*" and "nbsd*" hosts.
9464         * corefile.c (get_exec_file): Update comment.
9465         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9466         instead of "startup_inferior".
9467         (darwin_create_inferior): Call "add_thread_silent" after
9468         "fork_inferior".
9469         * fork-child.c: Cleanup unnecessary includes.
9470         (SHELL_FILE): Move to "common/common-fork-child.c".
9471         (environ): Likewise.
9472         (exec_wrapper): Initialize.
9473         (get_exec_wrapper): New function.
9474         (breakup_args): Move to "common/common-fork-child.c"; rename to
9475         "breakup_args_for_exec".
9476         (escape_bang_in_quoted_argument): Move to
9477         "common/common-fork-child.c".
9478         (saved_ui): New variable.
9479         (prefork_hook): New function.
9480         (postfork_hook): Likewise.
9481         (postfork_child_hook): Likewise.
9482         (gdb_startup_inferior): Likewise.
9483         (fork_inferior): Move to "common/common-fork-child.c".  Update
9484         function to support gdbserver.
9485         (startup_inferior): Likewise.
9486         * gdbcore.h (get_exec_file): Remove declaration.
9487         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9488         instead of "startup_inferior".  Call "add_thread_silent" after
9489         "fork_inferior".
9490         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9491         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9492         instead of "startup_inferior".  Call "add_thread_silent" after
9493         "fork_inferior".
9494         * inferior.h: Include "common-inferior.h".
9495         (trace_start_error): Move to "common/common-utils.h".
9496         (trace_start_error_with_name): Likewise.
9497         (fork_inferior): Move prototype to "nat/fork-inferior.h".
9498         (startup_inferior): Likewise.
9499         (gdb_startup_inferior): New prototype.
9500         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9501         * nat/fork-inferior.h: New file.
9502         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9503         instead of "startup_inferior".  Call "add_thread_silent" after
9504         "fork_inferior".
9505         * target.h (target_terminal_init): Move prototype to
9506         "target/target.h".
9507         (target_terminal_inferior): Likewise.
9508         (target_terminal_ours): Likewise.
9509         * target/target.h (target_terminal_init): New prototype, moved
9510         from "target.h".
9511         (target_terminal_inferior): Likewise.
9512         (target_terminal_ours): Likewise.
9513         * utils.c (gdb_flush_out_err): New function.
9514
9515 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9516
9517         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9518         * common/common-gdbthread.h: New file, with parts from
9519         "gdb/gdbthread.h".
9520         * gdbthread.h: Include "common-gdbthread.h".
9521         (switch_to_thread): Moved to "common/common-gdbthread.h".
9522
9523 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9524
9525         * Makefile.in (SFILES): Add "common/job-control.c".
9526         (HFILES_NO_SRCDIR): Add "common/job-control.h".
9527         (COMMON_OBS): Add "job-control.o".
9528         * common/job-control.c: New file, with contents from
9529         "gdb/inflow.c".
9530         * common/job-control.h: New file, with contents from "terminal.h".
9531         * fork-child.c: Include "job-control.h".
9532         * inflow.c: Include "job-control.h".
9533         (gdb_setpgid): Move to "common/common-inflow.c".
9534         (_initialize_inflow): Move setting of "job_control" to
9535         "handle_job_control".
9536         * terminal.h (job_control): Moved to "common/common-terminal.h".
9537         (gdb_setpgid): Likewise.
9538         * top.c: Include "job_control.h".
9539         * utils.c: Likewise.
9540         (job_control): Moved to "job-control.c".
9541
9542 2017-06-07  Pedro Alves  <palves@redhat.com>
9543
9544         * Makefile.in (SFILES): Add gdb_regex.c.
9545         (COMMON_OBS): Add gdb_regex.o.
9546         * ada-lang.c (ada_add_standard_exceptions)
9547         (ada_add_exceptions_from_frame, name_matches_regex)
9548         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9549         parameter type to compiled_regex.  Adjust.
9550         (ada_exceptions_list): Use compiled_regex.
9551         * break-catch-throw.c (exception_catchpoint::pattern): Now a
9552         std::unique_ptr<compiled_regex>.
9553         (exception_catchpoint::~exception_catchpoint): Remove regfree
9554         call.
9555         (check_status_exception_catchpoint): Adjust to use compiled_regex.
9556         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9557         * breakpoint.c (solib_catchpoint::compiled): Now a
9558         std::unique_ptr<compiled_regex>.
9559         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9560         (check_status_catch_solib): Adjust to use compiled_regex.
9561         (add_solib_catchpoint): Adjust to use compiled_regex.
9562         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9563         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9564         compiled_regex reference.  Adjust to use it.
9565         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9566         declaration.  Include "gdb_regex.h".
9567         (apropos_cmd): Change regex parameter to compiled_regex reference.
9568         * gdb_regex.c: New file.
9569         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9570         declarations.
9571         (class compiled_regex): New.
9572         * linux-tdep.c: Include "common/gdb_optional.h".
9573         (struct mapping_regexes): New, factored out from
9574         mapping_is_anonymous_p, and adjusted to use compiled_regex.
9575         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9576         gdb::optional and remove cleanups.  Adjust to compiled_regex.
9577         * probe.c: Include "common/gdb_optional.h".
9578         (collect_probes): Use compiled_regex and gdb::optional and remove
9579         cleanups.
9580         * skip.c: Include "common/gdb_optional.h".
9581         (skiplist_entry::compiled_function_regexp): Now a
9582         gdb::optional<compiled_regex>.
9583         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9584         (free_skiplist_entry): Remove regfree call.
9585         (compile_skip_regexp, skip_rfunction_p): Adjust to use
9586         compiled_regex and gdb::optional.
9587         * symtab.c: Include "common/gdb_optional.h".
9588         (search_symbols): Use compiled_regex and gdb::optional.
9589         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9590         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
9591         to gdb_regex.c.
9592
9593 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9594
9595         * regcache.c (regcache::save): Avoid buffer use.
9596         (regcache::dump): Likewise.
9597
9598 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9599
9600         * sh-tdep.c (sh_pseudo_register_read): Remove
9601         MAX_REGISTER_SIZE.
9602         (sh_pseudo_register_write): Likewise.
9603         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9604         (sh64_pseudo_register_write): Likewise
9605
9606 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9607
9608         * aarch64-tdep.c (aarch64_store_return_value): Use
9609         V_REGISTER_SIZE.
9610         (aarch64_pseudo_read_value): Likewise.
9611         (aarch64_pseudo_write): Likewise.
9612
9613 2017-06-06  Yao Qi  <yao.qi@linaro.org>
9614
9615         * regformats/regdef.h (set_register_cache): Remove the
9616         declaration.
9617
9618 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
9619
9620         * frame.c (frame_unwind_register_signed): Use
9621         frame_unwind_register_value.
9622
9623 2017-06-06  Pedro Alves  <palves@redhat.com>
9624
9625         PR breakpoints/21553
9626         * breakpoint.c (create_breakpoints_sal_default)
9627         (init_breakpoint_sal, create_breakpoint_sal): Use
9628         gdb::unique_xmalloc_ptr for string parameters.
9629         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9630         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
9631         (base_breakpoint_create_breakpoints_sal)
9632         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9633         (strace_marker_create_breakpoints_sal)
9634         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9635         string parameters.
9636         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9637         gdb::unique_xmalloc_ptr for string parameters.
9638         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9639         parameters.
9640
9641 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9642
9643         * alpha-tdep.c (alpha_register_to_value): Use
9644         get_frame_register_value.
9645         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9646
9647 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9648
9649         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9650         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9651         (ia64_value_to_register): Likewise.
9652         (ia64_extract_return_value): Likewise.
9653         (ia64_store_return_value): Likewise.
9654         (ia64_push_dummy_call): Likewise.
9655
9656 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
9657
9658         GDB 8.0 released.
9659
9660 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
9661
9662         * x86-linux-nat.c (struct arch_lwp_info): Remove.
9663
9664 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
9665
9666         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9667         parameter.
9668         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9669
9670 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
9671
9672         * event-loop.c (poll_timers): Unallocate timer using delete
9673         instead of xfree.
9674
9675 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9676
9677         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9678         (struct breakpoint) <~breakpoint>: New.
9679         (struct watchpoint): Inherit from breakpoint.
9680         <~watchpoint>: New.
9681         <base>: Remove.
9682         (struct tracepoint): Inherit from breakpoint.
9683         <base>: Remove.
9684         * breakpoint.c (longjmp_breakpoint_ops): Remove.
9685         (struct longjmp_breakpoint): Inherit from breakpoint.
9686         <~longjmp_breakpoint>: New.
9687         <base>: Remove.
9688         (new_breakpoint_from_type): Remove casts.
9689         (watchpoint_in_thread_scope): Remove reference to base field.
9690         (watchpoint_del_at_next_stop): Likewise.
9691         (update_watchpoint): Likewise.
9692         (watchpoint_check): Likewise.
9693         (bpstat_check_watchpoint): Likewise.
9694         (set_longjmp_breakpoint): Likewise.
9695         (struct fork_catchpoint): Inherit from breakpoint.
9696         <base>: Remove.
9697         (struct solib_catchpoint): Inherit from breakpoint.
9698         <~solib_catchpoint>: New.
9699         <base>: Remove.
9700         (dtor_catch_solib): Change to ...
9701         (solib_catchpoint::~solib_catchpoint): ... this.
9702         (breakpoint_hit_catch_solib): Remove reference to base field.
9703         (add_solib_catchpoint): Likewise.
9704         (create_fork_vfork_event_catchpoint): Likewise.
9705         (struct exec_catchpoint): Inherit from breakpoint.
9706         <~exec_catchpoint>: New.
9707         <base>: Remove.
9708         (dtor_catch_exec): Change to ...
9709         (exec_catchpoint::~exec_catchpoint): ... this.
9710         (dtor_watchpoint): Change to ...
9711         (watchpoint::~watchpoint): ... this.
9712         (watch_command_1): Remove reference to base field.
9713         (catch_exec_command_1): Likewise.
9714         (base_breakpoint_dtor): Change to ...
9715         (breakpoint::~breakpoint): ... this.
9716         (base_breakpoint_ops): Remove dtor field value.
9717         (longjmp_bkpt_dtor): Change to ...
9718         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9719         (strace_marker_create_breakpoints_sal): Remove reference to base
9720         field.
9721         (delete_breakpoint): Don't manually call breakpoint destructor.
9722         (create_tracepoint_from_upload): Remove reference to base field.
9723         (trace_pass_set_count): Likewise.
9724         (initialize_breakpoint_ops): Don't initialize
9725         momentary_breakpoint_ops, don't set dtors.
9726         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9727         <~ada_catchpoint>: New.
9728         <base>: Remove.
9729         (create_excep_cond_exprs): Remove reference to base field.
9730         (dtor_exception): Change to ...
9731         (ada_catchpoint::~ada_catchpoint): ... this.
9732         (dtor_catch_exception): Remove.
9733         (dtor_catch_exception_unhandled): Remove.
9734         (dtor_catch_assert): Remove.
9735         (create_ada_exception_catchpoint): Remove reference to base
9736         field.
9737         (initialize_ada_catchpoint_ops): Don't set dtors.
9738         * break-catch-sig.c (struct signal_catchpoint): Inherit from
9739         breakpoint.
9740         <~signal_catchpoint>: New.
9741         <base>: Remove.
9742         (signal_catchpoint_dtor): Change to ...
9743         (signal_catchpoint::~signal_catchpoint): ... this.
9744         (create_signal_catchpoint): Remove reference to base field.
9745         (initialize_signal_catchpoint_ops): Don't set dtor.
9746         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
9747         from breakpoint.
9748         <~syscall_catchpoint>: New.
9749         <base>: Remove.
9750         (dtor_catch_syscall): Change to ...
9751         (syscall_catchpoint::~syscall_catchpoint): ... this.
9752         (create_syscall_event_catchpoint): Remove reference to base
9753         field.
9754         (initialize_syscall_catchpoint_ops): Don't set dtor.
9755         * break-catch-throw.c (struct exception_catchpoint): Inherit
9756         from breakpoint.
9757         <~exception_catchpoint>: New.
9758         <base>: Remove.
9759         (dtor_exception_catchpoint): Change to ...
9760         (exception_catchpoint::~exception_catchpoint): ... this.
9761         (handle_gnu_v3_exceptions): Remove reference to base field.
9762         (initialize_throw_catchpoint_ops): Don't set dtor.
9763         * ctf.c (ctf_get_traceframe_address): Remove reference to base
9764         field.
9765         * remote.c (remote_get_tracepoint_status): Likewise.
9766         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
9767         * tracefile.c (tracefile_fetch_registers): Likewise.
9768         * tracepoint.c (actions_command): Likewise.
9769         (validate_actionline): Likewise.
9770         (tfind_1): Likewise.
9771         (get_traceframe_location): Likewise.
9772         (find_matching_tracepoint_location): Likewise.
9773         (parse_tracepoint_status): Likewise.
9774         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
9775
9776 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9777
9778         * breakpoint.c (struct longjmp_breakpoint): New struct.
9779         (is_tracepoint_type): Change return type to bool.
9780         (is_longjmp_type): New function.
9781         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
9782         (set_raw_breakpoint_without_location): Use
9783         new_breakpoint_from_type.
9784         (set_raw_breakpoint): Likewise.
9785
9786 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9787
9788         * breakpoint.c (new_breakpoint_from_type): New function.
9789         (create_breakpoint_sal): Use new_breakpoint_from_type and
9790         unique_ptr.
9791         (create_breakpoint): Likewise.
9792
9793 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
9794
9795         * memattr.c (mem_info_command): Rename to ...
9796         (info_mem_command): ... this.
9797         (mem_enable_command): Rename to ...
9798         (enable_mem_command): ... this.
9799         (mem_disable_command): Rename to ...
9800         (disable_mem_command): ... this.
9801         (mem_delete_command): Rename to ...
9802         (delete_mem_command): ... this.
9803         (_initialize_mem): Adjust function names.
9804
9805 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9806
9807         * btrace.c (handle_pt_insn_events): New.
9808         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
9809         STATUS.  Split into this and ...
9810         (handle_pt_insn_event_flags): ... this.
9811
9812 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9813
9814         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
9815         and struct pt_insn.resynced.
9816         * configure: Regenerated.
9817         * config.in: Regenerated.
9818
9819 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9820
9821         * btrace.c (ftrace_find_call_by_number): New function.
9822         (ftrace_new_function): Store objects, not pointers.
9823         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
9824         ftrace_new_gap, ftrace_update_function,
9825         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
9826         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
9827         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
9828         btrace_ends_with_single_insn, btrace_call_get): Account for
9829         btrace_thread_info::functions now storing objects.
9830         * btrace.h (struct btrace_thread_info): Add constructor.
9831         (struct btrace_thread_info) <functions>: Make std::vector.
9832         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
9833         Initialize with default values.
9834         * record-btrace.c (record_btrace_frame_sniffer): Account for
9835         btrace_thread_info::functions now storing objects.
9836
9837 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9838
9839         * btrace.c: Remove typedef bfun_s.
9840         (ftrace_new_gap): Directly add gaps to the list of gaps.
9841         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
9842         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
9843         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
9844         instead of gdb VEC.
9845
9846 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9847
9848         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
9849         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
9850         with btrace_thread_info::next_segment and
9851         btrace_thread_info::prev_segment.
9852         * btrace.h: Remove struct btrace_func_link.
9853         (struct btrace_function): Replace pair of function segment pointers
9854         with pair of indices.
9855         * python/py-record-btrace.c (btpy_call_prev_sibling,
9856         btpy_call_next_sibling): Replace references to
9857         btrace_thread_info::segment with btrace_thread_info::next_segment and
9858         btrace_thread_info::prev_segment.
9859         * record-btrace.c (record_btrace_frame_this_id): Use
9860         btrace_find_call_by_number.
9861
9862 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9863
9864         * btrace.c (ftrace_new_function, ftrace_fixup_level,
9865         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9866         btrace_insn_next, btrace_insn_prev): Remove references to
9867         btrace_thread_info::flow.
9868         * btrace.h (struct btrace_function): Remove FLOW.
9869
9870 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9871
9872         * btrace.c (ftrace_find_call_by_number): New function.
9873         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
9874         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
9875         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
9876         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
9877         index.
9878         * btrace.h (struct btrace_function): Turn UP into an index.
9879         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
9880         as an index.
9881         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
9882         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
9883         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
9884
9885 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9886
9887         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9888         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9889         ftrace_update_function, ftrace_compute_global_level_offset,
9890         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
9891         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
9892         btrace_insn_end, btrace_is_empty): Remove references to
9893         btrace_thread_info::begin and btrace_thread_info::end.
9894         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
9895         (struct btrace_thread_info) <functions>: Adjust comment.
9896         * record-btrace.c (record_btrace_start_replaying): Remove reference to
9897         btrace_thread_info::begin.
9898
9899 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9900
9901         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9902         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9903         ftrace_update_function): Remove arguments that implicitly were always
9904         BTINFO->END.
9905         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
9906         Don't pass BTINFO->END.
9907
9908 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9909
9910         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
9911         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
9912         btrace_find_insn_by_number): Replace function segment pointer with
9913         index.
9914         (btrace_insn_cmp): Simplify.
9915         * btrace.h: (struct btrace_insn_iterator) Rename index to
9916         insn_index.  Replace function segment pointer with index into function
9917         segment vector.
9918         * record-btrace.c (record_btrace_call_history): Replace function
9919         segment pointer use with index.
9920         (record_btrace_frame_sniffer): Retrieve function call segment through
9921         vector.
9922         (record_btrace_set_replay): Remove defunc't safety check.
9923
9924 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9925
9926         * btrace.c (btrace_ends_with_single_insn): New function.
9927         (btrace_call_get, btrace_call_number, btrace_call_begin,
9928         btrace_call_end, btrace_call_next, btrace_call_prev,
9929         btrace_find_call_by_number): Use index into call segment vector
9930         instead of pointer.
9931         (btrace_call_cmp): Simplify.
9932         * btrace.h (struct btrace_call_iterator): Replace function call segment
9933         pointer with index into vector.
9934         * record-btrace.c (record_btrace_call_history): Use index instead of
9935         pointer.
9936
9937 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9938
9939         * btrace.c (btrace_insn_begin, btrace_insn_end,
9940         btrace_find_insn_by_number): Add btinfo to iterator.
9941         * btrace.h (struct btrace_insn_iterator): Add btinfo.
9942
9943 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9944
9945         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
9946         and save pointers directly.
9947         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
9948         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
9949         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
9950         changed signature of functions.
9951         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
9952         (btrace_fetch): Remove code that adds btrace_function pointers to
9953         vector of btrace_functions.
9954         (btrace_clear): Simplify freeing vector of btrace_functions.
9955
9956 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9957
9958         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
9959         Replace VEC_* with std::vector functions.
9960         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
9961         (struct btrace_thread_info)<functions>: Change type to std::vector.
9962
9963 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9964
9965         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
9966         "Removed targets and native configurations" up.  Merge duplicate
9967         "New commands" sub-sections.  Add "New options" sub-sections.
9968
9969 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
9970
9971         * defs.h (copy_integer_to_size): New declaration.
9972         * findvar.c (copy_integer_to_size): New function.
9973         (do_cint_test): New selftest function.
9974         (copy_integer_to_size_test): Likewise.
9975         (_initialize_findvar): Likewise.
9976         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
9977         (mips_fbsd_collect_reg): Use raw_collect_integer.
9978         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
9979         (mips64_fill_gregset): Use raw_collect_integer
9980         (mips64_fill_fpregset): Use raw_supply_integer.
9981         * regcache.c (regcache::raw_supply_integer): New function.
9982         (regcache::raw_collect_integer): Likewise.
9983         * regcache.h: (regcache::raw_supply_integer): New declaration.
9984         (regcache::raw_collect_integer): Likewise.
9985
9986 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9987
9988         * Makefile.in (SFILES): Add gdbarch-selftests.c.
9989         (COMMON_OBS): Add gdbarch-selftests.o.
9990         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
9991         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
9992         * gdbarch-selftests.c: New file.
9993         * regcache.h (regcache) <~regcache>: Mark it virtual if
9994         GDB_SELF_TEST.
9995         <raw_write>: Likewise.
9996
9997 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9998
9999         * regcache.c (current_regcache): Change it to
10000         regcache::current_regcache.
10001         (regcache_observer_target_changed): Update.
10002         (regcache_thread_ptid_changed): Make it a regcache static
10003         method.
10004         (regcache_thread_ptid_changed): Update.
10005         (class regcache_access): New.
10006         (current_regcache_test): Update.
10007         (_initialize_regcache): Update.
10008         * regcache.h: Include forward_list.
10009         (regcache): Declare regcache_thread_ptid_changed and declare
10010         registers_changed_ptid as friend.
10011
10012 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10013
10014         * i387-tdep.c (i387_register_to_value): Use register_size
10015         instead of TYPE_LENGTH.
10016         * m68k-tdep.c (m68k_register_to_value): Likewise.
10017
10018 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10019
10020         * i387-tdep.c (i387_convert_register_p): Return false if type
10021         code isn't TYPE_CODE_FLT.
10022
10023 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10024
10025         * alpha-tdep.c (alpha_convert_register_p): Return true if type
10026         length is 4.
10027         (alpha_register_to_value): Remove type length check.
10028         (alpha_value_to_register): Likewise.
10029
10030 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10031
10032         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10033         TYPE_CODE_FLT.
10034
10035 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10036
10037         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10038         TYPE_CODE_FLT or not.
10039
10040 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10041
10042         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10043         * avr-tdep.c (avr_gdbarch_init): Likewise.
10044         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10045         * cris-tdep.c (cris_gdbarch_init): Likewise.
10046         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10047         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10048         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10049         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10050         * mep-tdep.c (mep_gdbarch_init): Likewise.
10051         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10052         * mips-tdep.c (mips_gdbarch_init): Likewise.
10053         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10054         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10055         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10056         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10057         * v850-tdep.c (v850_gdbarch_init): Likewise.
10058
10059 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10060
10061         * selftest-arch.c (tests_with_arch): Call registers_changed
10062         and reinit_frame_cache.
10063         * selftest.c (run_self_tests): Likewise.
10064
10065 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10066
10067         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10068         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10069
10070 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10071
10072         * rl78-tdep.c (rl78_gdbarch_init): Don't call
10073         set_gdbarch_print_insn.
10074
10075 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10076
10077         * h8300-tdep.c (h8300_gdbarch_init): Don't call
10078         set_gdbarch_print_insn.
10079
10080 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10081
10082         * alpha-tdep.c (alpha_gdbarch_init): Don't call
10083         set_gdbarch_print_insn.
10084         * arc-tdep.c (arc_gdbarch_init): Likewise.
10085         * arch-utils.c: include dis-asm.h.
10086         (default_print_insn): New function.
10087         * arch-utils.h (default_print_insn): Declare.
10088         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10089         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10090         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10091         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10092         * frv-tdep.c (frv_gdbarch_init): Likewise.
10093         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10094         * gdbarch.sh (print_insn): Use default_print_insn.
10095         * gdbarch.c: Regenerated.
10096         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10097         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10098         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10099         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10100         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10101         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10102         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10103         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10104         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10105         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10106         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10107         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10108         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10109         * mt-tdep.c (mt_gdbarch_init): Likewise.
10110         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10111         * nios2-tdep.c (nios2_print_insn): Remove.
10112         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10113         * rx-tdep.c (rx_gdbarch_init): Likewise.
10114         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10115         * score-tdep.c (score_print_insn): Remove.
10116         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10117         * sh-tdep.c (sh_gdbarch_init): Likewise.
10118         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10119         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10120         * tic6x-tdep.c (tic6x_print_insn): Remove.
10121         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10122         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10123         * v850-tdep.c (v850_gdbarch_init): Likewise.
10124         * vax-tdep.c (vax_gdbarch_init): Likewise.
10125         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10126         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10127
10128 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10129
10130         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10131         (MIPS_FP0_REGNUM): Remove.
10132         (MIPS_FSR_REGNUM): Remove.
10133         (mips_fbsd_supply_fpregs): Use mips_regnum.
10134         (mips_fbsd_supply_gregs): Likewise.
10135         (mips_fbsd_collect_fpregs): Likewise.
10136         (mips_fbsd_collect_gregs): Likewise.
10137
10138 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10139
10140         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10141         (getpfpregs_supplies): New function.
10142         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10143         getfpregs_supplies.
10144         (mips_fbsd_store_inferior_registers): Likewise.
10145
10146 2017-05-22  Pedro Alves <palves@redhat.com>
10147
10148         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10149         maintainer.
10150
10151 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
10152
10153         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10154         (store_register): Likewise.
10155         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10156         (get_decimal_float_return_value): Likewise.
10157         (do_ppc_sysv_return_value): Likewise.
10158         (ppc64_sysv_abi_push_integer): Likewise.
10159         (ppc64_sysv_abi_push_freg): Likewise.
10160         (ppc64_sysv_abi_return_value_base): Likewise.
10161         (ppc64_sysv_abi_return_value): Likewise.
10162         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10163         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10164         * rs6000-nat.c: Likewise.
10165         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10166         (rs6000_value_to_register): Likewise.
10167         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10168
10169 2017-05-21  Tom Tromey  <tom@tromey.com>
10170
10171         PR rust/21466:
10172         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10173         arrays as "[T]", not "[T; ]".
10174
10175 2017-05-19  Tom Tromey  <tom@tromey.com>
10176
10177         PR rust/21484:
10178         * rust-lang.c (exp_descriptor_rust): New function.
10179         (rust_language_defn): Use it.
10180         * p-lang.c (pascal_language_defn): Update.
10181         * opencl-lang.c (opencl_language_defn): Update.
10182         * objc-lang.c (objc_language_defn): Update.
10183         * m2-lang.c (m2_language_defn): Update.
10184         * language.h (struct language_defn)
10185         <la_watch_location_expression>: New member.
10186         * language.c (unknown_language_defn, auto_language_defn)
10187         (local_language_defn): Update.
10188         * go-lang.c (go_language_defn): Update.
10189         * f-lang.c (f_language_defn): Update.
10190         * d-lang.c (d_language_defn): Update.
10191         * c-lang.h (c_watch_location_expression): Declare.
10192         * c-lang.c (c_watch_location_expression): New function.
10193         (c_language_defn, cplus_language_defn, asm_language_defn)
10194         (minimal_language_defn): Use it.
10195         * breakpoint.c (watch_command_1): Call
10196         la_watch_location_expression.
10197         * ada-lang.c (ada_language_defn): Update.
10198
10199 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10200
10201         PR tui/21482
10202         * gdb_curses.h (NOMACROS): Define.
10203         (NCURSES_NOMACROS): Define.
10204
10205 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10206
10207         PR tui/21482
10208         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10209         arg to char *.
10210         * tui/tui-wingeneral.c (box_win): Likewise.
10211         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10212         (tui_show_source_line): Likewise.
10213         (tui_show_exec_info_content): Likewise.
10214
10215 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10216
10217         * sparc-tdep.c (sparc_structure_return_p)
10218         (sparc_arg_on_registers_p): New functions.
10219         (sparc32_store_arguments): Use them.
10220         * sparc64-tdep.c (sparc64_16_byte_align_p)
10221         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10222         Handle TYPE_CODE_ARRAY.
10223
10224 2017-05-17  Yao Qi  <yao.qi@linaro.org>
10225
10226         * cli/cli-decode.c (add_alias_cmd): New function.
10227         * command.h (add_alias_cmd): Declare.
10228         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10229         instead call add_alias_cmd.
10230
10231 2017-05-17  Pedro Alves  <palves@redhat.com>
10232
10233         * Makefile.in (nat_extra_makefile_frag): Rename to ...
10234         (nat_makefile_frag): ... this.  All references updated.
10235         * configure.ac: Likewise.
10236         * configure.nat: Likewise.  Enhance comments.
10237         * configure: Regenerate.
10238
10239 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10240
10241         * procfs.c (procfs_create_inferior): Change prototype to match
10242         definition.
10243
10244 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
10245
10246         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10247         C++ compiler warning.
10248
10249 2017-05-12  Tom Tromey  <tom@tromey.com>
10250
10251         PR rust/21483:
10252         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10253         recurse, just call value_struct_elt directly.
10254
10255 2017-05-12  Tom Tromey  <tom@tromey.com>
10256
10257         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10258         OP_RUST_ARRAY>: Fix.
10259
10260 2017-05-12  Tom Tromey  <tom@tromey.com>
10261
10262         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10263
10264 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10265
10266         * regcache.c: Include <forward_list>.
10267         (struct regcache_list): Remove.
10268         (current_regcache): Update.
10269         (get_thread_arch_aspace_regcache): Update for std::forward_list.
10270         (regcache_thread_ptid_changed): Likewise.
10271         (registers_changed_ptid): Likewise.
10272         (current_regcache_size): Likewise.
10273
10274 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10275
10276         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10277         (current_regcache_size): New function.
10278         (current_regcache_test): New function.
10279         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10280
10281 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10282
10283         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10284         (print_gp_register_row): Use get_frame_register_value.
10285
10286 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10287
10288         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10289         (mips_supply_fpregset): Likewise.
10290         (mips64_supply_gregset): Likewise.
10291
10292 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10293
10294         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
10295         regcache->raw_supply_zeroed.
10296
10297 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10298
10299         * configure.nat: Rearrange 'case' statements to match
10300         host before cpu.
10301
10302 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10303
10304         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
10305         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10306         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
10307         "@nat_extra_makefile_frag@".
10308         (Makefile): Remove dependency on "@frags@".
10309         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10310         (data-directory/Makefile): Likewise.
10311         * config/aarch64/linux.mh: Deleted; moved contents to
10312         "gdb/configure.nat".
10313         * config/alpha/alpha-linux.mh: Likewise.
10314         * config/alpha/nbsd.mh: Likewise.
10315         * config/arm/linux.mh: Likewise.
10316         * config/arm/nbsdelf.mh: Likewise.
10317         * config/i386/cygwin.mh: Likewise.
10318         * config/i386/cygwin64.mh: Likewise.
10319         * config/i386/darwin.mh: Likewise.
10320         * config/i386/fbsd.mh: Likewise.
10321         * config/i386/fbsd64.mh: Likewise.
10322         * config/i386/go32.mh: Likewise.
10323         * config/i386/i386gnu.mh: Likewise.
10324         * config/i386/i386sol2.mh: Likewise.
10325         * config/i386/linux.mh: Likewise.
10326         * config/i386/linux64.mh: Likewise.
10327         * config/i386/mingw.mh: Likewise.
10328         * config/i386/mingw64.mh: Likewise.
10329         * config/i386/nbsd64.mh: Likewise.
10330         * config/i386/nbsdelf.mh: Likewise.
10331         * config/i386/nto.mh: Likewise.
10332         * config/i386/obsd.mh: Likewise.
10333         * config/i386/obsd64.mh: Likewise.
10334         * config/i386/sol2-64.mh: Likewise.
10335         * config/ia64/linux.mh: Likewise.
10336         * config/m32r/linux.mh: Likewise.
10337         * config/m68k/linux.mh: Likewise.
10338         * config/m68k/nbsdelf.mh: Likewise.
10339         * config/m68k/obsd.mh: Likewise.
10340         * config/m88k/obsd.mh: Likewise.
10341         * config/mips/fbsd.mh: Likewise.
10342         * config/mips/linux.mh: Likewise.
10343         * config/mips/nbsd.mh: Likewise.
10344         * config/mips/obsd64.mh: Likewise.
10345         * config/pa/linux.mh: Likewise.
10346         * config/pa/nbsd.mh: Likewise.
10347         * config/pa/obsd.mh: Likewise.
10348         * config/powerpc/aix.mh: Likewise.
10349         * config/powerpc/fbsd.mh: Likewise.
10350         * config/powerpc/linux.mh: Likewise.
10351         * config/powerpc/nbsd.mh: Likewise.
10352         * config/powerpc/obsd.mh: Likewise.
10353         * config/powerpc/ppc64-linux.mh: Likewise.
10354         * config/powerpc/spu-linux.mh: Likewise.
10355         * config/s390/linux.mh: Likewise.
10356         * config/sh/nbsd.mh: Likewise.
10357         * config/sparc/fbsd.mh: Likewise.
10358         * config/sparc/linux.mh: Likewise.
10359         * config/sparc/linux64.mh: Likewise.
10360         * config/sparc/nbsd64.mh: Likewise.
10361         * config/sparc/nbsdelf.mh: Likewise.
10362         * config/sparc/obsd64.mh: Likewise.
10363         * config/sparc/sol2.mh: Likewise.
10364         * config/tilegx/linux.mh: Likewise.
10365         * config/vax/nbsdelf.mh: Likewise.
10366         * config/vax/obsd.mh: Likewise.
10367         * config/xtensa/linux.mh: Likewise.
10368         * config/i386/i386gnu.mn: New file, with excerpts from
10369         "config/i386/i386gnu.mh".
10370         * configure: Regenerate.
10371         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10372         *.mh files under "gdb/config".
10373         * configure.nat: New file, with contents from the
10374         "gdb/config/*/*.mh" files.
10375
10376 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
10377
10378         * btrace.c (btrace_clear): Free insn vector.
10379
10380 2017-05-05  Pedro Alves  <palves@redhat.com>
10381
10382         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10383         * configure: Regenerate.
10384
10385 2017-05-04  Pedro Alves  <palves@redhat.com>
10386
10387         * Makefile.in (SFILES): Add progspace-and-thread.c.
10388         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10389         (COMMON_OBS): Add progspace-and-thread.o.
10390         * breakpoint.c: Include "progspace-and-thread.h".
10391         (update_inserted_breakpoint_locations)
10392         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10393         Use scoped_restore_current_pspace_and_thread.
10394         (create_std_terminate_master_breakpoint): Use
10395         scoped_restore_current_program_space.
10396         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10397         (print_breakpoint_location): Use
10398         scoped_restore_current_program_space.
10399         (bp_loc_is_permanent): Use
10400         scoped_restore_current_pspace_and_thread.
10401         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10402         (download_tracepoint_locations): Use
10403         scoped_restore_current_pspace_and_thread.
10404         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10405         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10406         (enum step_over_calls_kind): Moved from inferior.h.
10407         (class scoped_restore_current_thread): New class.
10408         * gdbthread.h (make_cleanup_restore_current_thread): Delete
10409         declaration.
10410         (scoped_restore_current_thread): New class.
10411         * infcmd.c: Include "common/gdb_optional.h".
10412         (continue_1, proceed_after_attach): Use
10413         scoped_restore_current_thread.
10414         (notice_new_inferior): Use scoped_restore_current_thread.
10415         * inferior.c: Include "progspace-and-thread.h".
10416         (restore_inferior, save_current_inferior): Delete.
10417         (add_inferior_command, clone_inferior_command): Use
10418         scoped_restore_current_pspace_and_thread.
10419         * inferior.h (scoped_restore_current_inferior): New class.
10420         * infrun.c: Include "progspace-and-thread.h" and
10421         "common/gdb_optional.h".
10422         (follow_fork_inferior): Use
10423         scoped_restore_current_pspace_and_thread.
10424         (scoped_restore_exited_inferior): New class.
10425         (handle_vfork_child_exec_or_exit): Use
10426         scoped_restore_exited_inferior,
10427         scoped_restore_current_pspace_and_thread,
10428         scoped_restore_current_thread and scoped_restore.
10429         (fetch_inferior_event): Use scoped_restore_current_thread.
10430         * linespec.c (decode_line_full, decode_line_1): Use
10431         scoped_restore_current_program_space.
10432         * mi/mi-main.c: Include "progspace-and-thread.h".
10433         (exec_continue): Use scoped_restore_current_thread.
10434         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10435         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10436         * proc-service.c (ps_pglobal_lookup): Use
10437         scoped_restore_current_program_space.
10438         * progspace-and-thread.c: New file.
10439         * progspace-and-thread.h: New file.
10440         * progspace.c (release_program_space, clone_program_space): Use
10441         scoped_restore_current_program_space.
10442         (restore_program_space, save_current_program_space)
10443         (save_current_space_and_thread): Delete.
10444         (switch_to_program_space_and_thread): Moved to
10445         progspace-and-thread.c.
10446         * progspace.h (save_current_program_space)
10447         (save_current_space_and_thread): Delete declarations.
10448         (scoped_restore_current_program_space): New class.
10449         * remote.c (remote_btrace_maybe_reopen): Use
10450         scoped_restore_current_thread.
10451         * symtab.c: Include "progspace-and-thread.h".
10452         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10453         * thread.c (print_thread_info_1): Use
10454         scoped_restore_current_thread.
10455         (struct current_thread_cleanup): Delete.
10456         (do_restore_current_thread_cleanup)
10457         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10458         (scoped_restore_current_thread::~scoped_restore_current_thread):
10459         ... this new dtor.
10460         (make_cleanup_restore_current_thread): Rename/convert to ...
10461         (scoped_restore_current_thread::scoped_restore_current_thread):
10462         ... this new ctor.
10463         (thread_apply_all_command): Use scoped_restore_current_thread.
10464         (thread_apply_command): Use scoped_restore_current_thread.
10465         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10466         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10467
10468 2017-05-04  Pedro Alves  <palves@redhat.com>
10469
10470         * thread.c (make_cleanup_restore_current_thread): Move
10471         find_thread_ptid call before the is_stopped call.  Assert that the
10472         thread is found.  Replace is_stopped call by checking the thread's
10473         state directly.  Remove unnecessary NULL-thread check.
10474
10475 2017-05-04  Pedro Alves  <palves@redhat.com>
10476
10477         * corelow.c (thread_section_name): New class.
10478         (get_core_register_section, get_core_siginfo): Use it.
10479
10480 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10481
10482         * corelow.c (sniff_core_bfd): Remove extra semicolon.
10483         (get_core_register_section): Remove xfree of NULL pointer.
10484
10485 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
10486
10487         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10488         * regcache.c (regcache::raw_supply_zeroed): New function.
10489         * regcache.h (regcache::raw_supply_zeroed): New declaration.
10490
10491 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10492
10493         * gdbarch.sh: Remove commented out definition of
10494         TARGET_CHAR_BIT.
10495         * gdbarch.h: Re-generate.
10496
10497 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
10498
10499         * configure: Regenerate.
10500
10501 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
10502
10503         * solib-target.c (solib_target_relocate_section_addresses):
10504         Remove num_section_bases, num_bases, segment_bases variables.
10505
10506 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10507
10508         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10509
10510 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10511
10512         * solib-target.c: Include <vector>
10513         (struct lm_info_target) <~lm_info_target>: Remove.
10514         <segment_bases, section_bases>: Change type to
10515         std::vector<CORE_ADDR>.
10516         (library_list_start_segment, library_list_start_section,
10517         library_list_end_library,
10518         solib_target_relocate_section_addresses): Adjust.
10519
10520 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10521
10522         * gdbarch.sh (software_single_step): Change return type to
10523         std::vector<CORE_ADDR>.
10524         * gdbarch.c, gdbarch.h: Re-generate.
10525         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10526         Adjust.
10527         (arm_deal_with_atomic_sequence_raw): Adjust.
10528         (thumb_get_next_pcs_raw): Adjust.
10529         (arm_get_next_pcs_raw): Adjust.
10530         (arm_get_next_pcs): Adjust.
10531         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10532         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10533         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10534         (alpha_software_single_step): Adjust.
10535         * alpha-tdep.h (alpha_software_single_step): Adjust.
10536         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10537         * arm-tdep.c (arm_software_single_step): Adjust.
10538         (arm_breakpoint_kind_from_current_state): Adjust.
10539         * arm-tdep.h (arm_software_single_step): Adjust.
10540         * breakpoint.c (insert_single_step_breakpoint): Adjust.
10541         * cris-tdep.c (cris_software_single_step): Adjust.
10542         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10543         (micromips_deal_with_atomic_sequence): Adjust.
10544         (deal_with_atomic_sequence): Adjust.
10545         (mips_software_single_step): Adjust.
10546         * mips-tdep.h (mips_software_single_step): Adjust.
10547         * moxie-tdep.c (moxie_software_single_step): Adjust.
10548         * nios2-tdep.c (nios2_software_single_step): Adjust.
10549         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10550         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10551         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10552         * s390-linux-tdep.c (s390_software_single_step): Adjust.
10553         * sparc-tdep.c (sparc_software_single_step): Adjust.
10554         * spu-tdep.c (spu_software_single_step): Adjust.
10555         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10556
10557 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10558
10559         * gdbarch.sh: Use semi-colon as field separator instead of colon.
10560         * gdbarch.h: Re-generate.
10561
10562 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10563
10564         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10565         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10566         * python/py-instruction.c, python/py-instruction.h: New file.
10567         * python/py-record.c: Add py-instruction.h include.
10568         (gdbpy_initialize_record): Make gdb.Instruction a super class of
10569         gdb.RecordInstruction.
10570         * python/python-internal.h: Add gdbpy_initialize_instruction
10571         declaration.
10572         * python/python.c (do_start_initialization): Add
10573         gdbpy_initialize_instruction.
10574
10575 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10576
10577         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10578         Remove.
10579         (btrace_func_from_recpy_func): New function.
10580         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10581         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10582         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10583         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10584         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10585         Also, use new helper functions.
10586         (btpy_list_item): Use new helper functions.
10587         (recpy_bt_function_call_history): Use new type name.
10588         (btpy_call_getset): Remove.
10589         (gdbpy_initialize_btrace): Remove code to initialize
10590         gdb.BtraceFunctionCall.
10591         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10592         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10593         recpy_bt_func_prev, recpy_bt_func_next): New export.
10594         * python/py-record.c (recpy_func_type): New static object.
10595         (recpy_func_new, recpy_func_level, recpy_func_symbol,
10596         recpy_func_instructions, recpy_func_up, recpy_func_prev,
10597         recpy_func_next): New function.
10598         (recpy_element_hash, recpy_element_richcompare): Updated comment.
10599         (recpy_func_getset): New static object.
10600         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10601         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10602
10603 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10604
10605         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10606         (btpy_object, btpy_insn_type, btpy_new): Remove.
10607         (btpy_list_object): Use gdb.RecordInstruction type instead of
10608         gdb.BtraceInstruction type.
10609         (btrace_insn_from_recpy_insn): New function.
10610         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10611         btpy_new.
10612         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10613         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10614         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10615         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10616         instead of btpy_object.
10617         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10618         btpy_insn_data, btpy_insn_decode): Rename to ...
10619         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10620         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10621         recpy_bt_insn_decode): This.  Also, use new helper functions.
10622         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10623         recpy_insn_type.
10624         (btpy_insn_getset): Remove.
10625         (gdbpy_initialize_btrace): Remove code to initialize
10626         gdb.BtraceInstruction.  Use recpy_element_object.
10627         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10628         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10629         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10630         * python/py-record.c (recpy_insn_type): New static object.
10631         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10632         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10633         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10634         New function.
10635         (recpy_insn_getset): New static object.
10636         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10637         * python/py-record.h (recpy_element_object): New typedef.
10638         (recpy_insn_type, recpy_insn_new): New export.
10639
10640 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10641
10642         * py-record-btrace.c (btpy_insn_new): Removed.
10643         (btpy_insn_or_gap_new): New function.
10644         (btpy_insn_error): Removed.
10645         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10646         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10647         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10648         btpy_insn_or_gap_new instead of btpy_insn_new.
10649         (btpy_insn_getset): Remove btpy_insn_error.
10650         * py-record.c (recpy_gap_type): New static object.
10651         (recpy_gap_object): New typedef.
10652         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10653         recpy_gap_reason_string): New function.
10654         (recpy_gap_getset): New static object.
10655         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10656         * py-record.h (recpy_gap_new): New export.
10657
10658 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10659
10660         * python/py-record.c (recpy_ptid): Remove.
10661         (recpy_record_getset): Remove recpy_ptid.
10662
10663 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10664
10665         * btrace.c (btrace_fetch): Set inferior_ptid.
10666         * python/py-record-btrace.c: Add "py-record.h" include.
10667         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10668         recpy_bt_end, recpy_bt_instruction_history,
10669         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10670         in gdb.Record object instead of current ptid.
10671         * python/py-record.c: Include new "py-record.h" file.
10672         (recpy_record_object): Moved to py-record.h.
10673         * python/py-record.h: New file.
10674
10675 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10676
10677         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10678         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10679         indentation.
10680
10681 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
10682
10683         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10684         the past maintainers section.
10685
10686 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10687
10688         * infcmd.c (get_return_value): Use regcache ctor, and remove
10689         cleanup.
10690
10691 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10692             Pedro Alves  <palves@redhat.com>
10693
10694         * regcache.c (regcache::regcache): New tag dispatch ctor.
10695         (do_cooked_read): Moved above.
10696         (regcache_dup): Use the tag dispatch ctor..
10697         * regcache.h (regcache): Declare ctor, delete copy ctor and
10698         assignment operator, remove friend regcache_dup.
10699
10700 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10701
10702         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10703         call method save instead of regcache_cpy.
10704         * regcache.h (struct regcache): Make regcache_dup a friend.
10705
10706 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10707
10708         * regcache.c (struct regcache): Move to regcache.h
10709         (regcache::arch): New method.
10710         (regcache_get_ptid): Update.
10711         (get_regcache_arch): Call arch method.
10712         (get_regcache_aspace): Call method aspace.
10713         (register_buffer): Change it to method.
10714         (regcache_save): Change it to regcache::save.
10715         (regcache_restore): Likewise.
10716         (regcache_cpy_no_passthrough): Remove the declaration.
10717         (regcache_cpy): Call methods restore and cpy_no_passthrough.
10718         (regcache_cpy_no_passthrough): Change it to method
10719         cpy_no_passthrough.
10720         (regcache_register_status): Change it to method
10721         get_register_status.
10722         (regcache_invalidate): Change it to method invalidate.
10723         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10724         (regcache_raw_update): Change it to method raw_update.
10725         (regcache_raw_read): Likewise.
10726         (regcache_raw_read_signed): Likewise.
10727         (regcache_raw_read_unsigned): Likewise.
10728         (regcache_raw_write_signed): Likewise.
10729         (regcache_raw_write_unsigned): Likewise.
10730         (regcache_cooked_read): Likewise.
10731         (regcache_cooked_read_value): Likewise.
10732         (regcache_cooked_read_signed): Likewise.
10733         (regcache_cooked_read_unsigned): Likewise.
10734         (regcache_cooked_write_signed): Likewise.
10735         (regcache_cooked_write_unsigned): Likewise.
10736         (regcache_raw_set_cached_value): Likewise.
10737         (regcache_raw_write): Likewise.
10738         (regcache_cooked_write): Likewise.
10739         (regcache_xfer_part): Likewise.
10740         (regcache_raw_read_part): Likewise.
10741         (regcache_raw_write_part): Likewise.
10742         (regcache_cooked_read_part): Likewise.
10743         (regcache_cooked_write_part): Likewise.
10744         (regcache_raw_supply): Likewise.
10745         (regcache_raw_collect): Likewise.
10746         (regcache_transfer_regset): Likewise.
10747         (regcache_supply_regset): Likewise.
10748         (regcache_collect_regset): Likewise.
10749         (regcache_debug_print_register): Likewise.
10750         (enum regcache_dump_what): Move it to regcache.h.
10751         (regcache_dump): Change it to method dump.
10752         * regcache.h (enum regcache_dump_what): New.
10753         (class regcache): New.
10754         * target.c (target_fetch_registers): Call method
10755         debug_print_register.
10756         (target_store_registers): Likewise.
10757
10758 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10759
10760         * windows-nat.c (struct lm_info_windows): Initialize field.
10761         (windows_make_so): Allocate lm_info_windows with new.
10762         (windows_free_so): Free lm_info_windows with delete.
10763
10764 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10765
10766         * solib-darwin.c (struct lm_info_darwin): Initialize field.
10767         (darwin_current_sos): Allocate lm_info_darwin with new, remove
10768         cleanup.
10769         (darwin_free_so): Free lm_info_darwin with delete.
10770
10771 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10772
10773         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
10774         <l_addr_p>: Change type to bool.
10775         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
10776         (svr4_free_so): Free lm_info_svr4 with delete.
10777         (svr4_copy_library_list): Replace memcpy with call to copy
10778         constructor.
10779         (library_list_start_library, svr4_default_sos): Allocate
10780         lm_info_svr4 with new.
10781
10782 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10783
10784         * solib-target.c (struct lm_info_target): Add destructor,
10785         initialize fields.
10786         <name>: Change type to std::string.
10787         (library_list_start_library): Allocate lm_info_target with new.
10788         (solib_target_free_library_list): Free lm_info_target with
10789         delete.
10790         (solib_target_current_sos): Adapt to std::string.
10791         (solib_target_free_so): Free lm_info_target with delete.
10792
10793 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10794
10795         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
10796         fields.
10797         (frv_current_sos): Allocate lm_info_frv with new.
10798         (frv_relocate_main_executable): Free lm_info_frv with delete,
10799         allocate with new.
10800         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
10801
10802 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10803
10804         * solib-frv.c (struct lm_info_frv): Fix indentation.
10805
10806 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10807
10808         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
10809         map field.
10810         (dsbt_current_sos): Allocate lm_info_dsbt with new.
10811         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
10812         and allocate with new.
10813         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
10814
10815 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10816
10817         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
10818         <filename, member_name>: Change type to std::string.
10819         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
10820         (library_list_start_library): Allocate lm_info_aix with new.
10821         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
10822         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
10823         with copy constructor.
10824
10825 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10826
10827         * solist.h (struct lm_info): Remove.
10828         (struct lm_info_base): New class.
10829         (struct so_list) <lm_info>: Change type to lm_info_base *.
10830         * nto-tdep.c (struct lm_info): Remove.
10831         (lm_addr): Adjust.
10832         * solib-aix.c (struct lm_info): Rename to ...
10833         (struct lm_info_aix): ... this.  Extend lm_info_base.
10834         (lm_info_p): Rename to ...
10835         (lm_info_aix_p): ... this, and adjust.
10836         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
10837         solib_aix_parse_libraries, library_list_start_library,
10838         solib_aix_free_library_list, solib_aix_parse_libraries,
10839         solib_aix_get_library_list,
10840         solib_aix_relocate_section_addresses, solib_aix_free_so,
10841         solib_aix_get_section_offsets,
10842         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
10843         Adjust.
10844         (struct solib_aix_inferior_data) <library_list>: Adjust.
10845         * solib-darwin.c (struct lm_info): Rename to ...
10846         (struct lm_info_darwin): ... this.  Extend lm_info_base.
10847         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
10848         * solib-dsbt.c (struct lm_info): Rename to ...
10849         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
10850         (struct dsbt_info) <main_executable_lm_info): Adjust.
10851         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
10852         dsbt_relocate_section_addresses): Adjust.
10853         * solib-frv.c (struct lm_info): Rename to ...
10854         (struct lm_info_frv): ... this.  Extend lm_info_base.
10855         (main_executable_lm_info): Adjust.
10856         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
10857         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
10858         find_canonical_descriptor_in_load_object,
10859         frv_fdpic_find_canonical_descriptor): Adjust.
10860         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10861         to lm_info_svr4.
10862         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10863         svr4_clear_so, svr4_copy_library_list,
10864         library_list_start_library, svr4_default_sos, svr4_read_so_list,
10865         svr4_current_sos, svr4_fetch_objfile_link_map,
10866         solist_update_incremental): Adjust.
10867         * solib-svr4.h (struct lm_info_svr4): Move here from
10868         solib-svr4.c.
10869         * solib-target.c (struct lm_info): Rename to ...
10870         (struct lm_info_target): ... this.  Extend lm_info_base.
10871         (lm_info_p): Rename to ...
10872         (lm_info_target_p): ... this.
10873         (solib_target_parse_libraries, library_list_start_segment,
10874         library_list_start_section, library_list_start_library,
10875         library_list_end_library, solib_target_free_library_list,
10876         solib_target_current_sos, solib_target_free_so,
10877         solib_target_relocate_section_addresses): Adjust.
10878         * windows-nat.c (struct lm_info): Rename to ...
10879         (struct lm_info_windows): ... this.  Extend lm_info_base.
10880         (windows_make_so, handle_load_dll, handle_unload_dll,
10881         windows_xfer_shared_libraries): Adjust.
10882
10883 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10884
10885         * solib-darwin.c (struct darwin_so_list): Remove.
10886         (darwin_current_sos): Allocate an so_list object instead of a
10887         darwin_so_list, separately allocate an lm_info object.
10888         (darwin_free_so): Free lm_info.
10889
10890 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
10891
10892         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
10893         with fprintf_filtered.
10894
10895 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10896
10897         * regcache.c (regcache::regcache): New function.
10898         (regcache::~regcache): New function.
10899         (regcache_xmalloc_1): Remove.
10900         (regcache_xmalloc): Call new regcache.
10901         (regcache_xfree): Call delete regcache.
10902         (get_thread_arch_aspace_regcache): Call new regcache.
10903
10904 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10905
10906         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
10907         lwp instead of ptid_get_lwp.
10908
10909 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10910
10911         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
10912         lwp_info instead of getting from inferior_ptid.
10913
10914 2017-04-27  Keith Seitz  <keiths@redhat.com>
10915
10916         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
10917         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
10918         (CV_CONVERSION_BADNESS): Define.
10919         (rank_one_type): Remove overly restrictive rvalue reference
10920         rank checks.
10921         Add cv-qualifier checks and subranks for type equality.
10922         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
10923         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
10924         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
10925
10926 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
10927
10928         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
10929         count when creating the object.
10930
10931 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
10932             Ulrich Weigand  <uweigand@de.ibm.com>
10933
10934         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
10935         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
10936         is used in AIX.
10937         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
10938         (process_xcoff_symbol): Likewise.
10939         (scan_xcoff_symtab): Likewise.
10940
10941 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10942
10943         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
10944         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
10945         (ia64_access_reg): Use get_frame_register_unsigned.
10946         (ia64_access_rse_reg): Likewise.
10947         (ia64_libunwind_frame_prev_register): Likewise.
10948
10949 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
10950
10951         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
10952         * gdbarch.c: Regenerated.
10953         * gdbarch.h: Regenerated.
10954         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
10955         visibility external.
10956         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
10957         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
10958         (enum cfa_how_kind): Move to ...
10959         (struct dwarf2_frame_state_reg_info): Likewise.
10960         (struct dwarf2_frame_state): Likewise.
10961         * dwarf2-frame.h: ... here.
10962         (dwarf2_frame_state_alloc_regs): New declaration.
10963         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
10964         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
10965
10966 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10967
10968         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
10969         regcache_raw_read_unsigned.
10970         (xtensa_pseudo_register_write): Likewise.
10971
10972 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10973
10974         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
10975         (nds32_pseudo_register_write): Likewise.
10976
10977 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10978
10979         * regcache.c (struct regcache) <readonly_p>: Change its type
10980         to bool.
10981         (regcache_xmalloc_1): Update parameter type and callers update.
10982
10983 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10984
10985         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
10986         set_gdbarch_wchar_bit.
10987         * arm-tdep.c (arm_gdbarch_init): Likewise.
10988
10989 2017-04-25  Pedro Alves  <palves@redhat.com>
10990
10991         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
10992         (BothAreRelocatable, memcopy, memmove): Don't define.
10993         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
10994         macros.
10995
10996 2017-04-25  Pedro Alves  <palves@redhat.com>
10997
10998         * common/common-defs.h: Include "common/poison.h".
10999         * common/function-view.h: (Not, Or, Requires): Move to traits.h
11000         and adjust.
11001         * common/poison.h: New file.
11002         * common/traits.h: Include <type_traits>.
11003         (Not, Or, Requires): New, moved from common/function-view.h.
11004
11005 2017-04-25  Pedro Alves  <palves@redhat.com>
11006
11007         * breakpoint.h (struct breakpoint): In-class initialize all
11008         fields.  Make boolean fields "bool".
11009         * breakpoint.c (init_raw_breakpoint_without_location): Remove
11010         memset call and initializations no longer necessary.
11011
11012 2017-04-25  Pedro Alves  <palves@redhat.com>
11013
11014         * btrace.c (pt_btrace_insn_flags): Change parameter type to
11015         reference.
11016         (pt_btrace_insn): New function.
11017         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11018
11019 2017-04-25  Pedro Alves  <palves@redhat.com>
11020
11021         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
11022         "base" field and inherit from "bp_location" instead.  Add
11023         non-default ctor.
11024         (allocate_location_exception): Use new non-default ctor.
11025         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11026         (init_bp_location): Convert to ...
11027         (bp_location::bp_location): ... this new ctor, and remove memset
11028         call.
11029         (base_breakpoint_allocate_location): Use the new non-default ctor.
11030         * breakpoint.h (bp_location): Now a class.  Declare default and
11031         non-default ctors.  In-class initialize all members.
11032         (init_bp_location): Remove declaration.
11033
11034 2017-04-25  Pedro Alves  <palves@redhat.com>
11035
11036         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11037         assignment operator.
11038
11039 2017-04-24  Yao Qi  <yao.qi@linaro.org>
11040
11041         * doublest.c (convert_doublest_to_floatformat): Call
11042         floatformat_totalsize_bytes.
11043
11044 2017-04-22  Tom Tromey  <tom@tromey.com>
11045
11046         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11047         ui_out_emit_list.
11048         * stack.c (print_frame): Use ui_out_emit_list.
11049         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11050         ui_out_emit_list.
11051         * mi/mi-main.c (print_one_inferior)
11052         (mi_cmd_data_list_register_names)
11053         (mi_cmd_data_list_register_values, mi_cmd_list_features)
11054         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11055         ui_out_emit_list.
11056         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11057         (mi_output_solib_attribs): Use ui_out_emit_list,
11058         ui_out_emit_tuple.
11059         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11060         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11061         (mi_cmd_stack_list_args, list_args_or_locals): Use
11062         ui_out_emit_list.
11063         * disasm.c (do_assembly_only): Use ui_out_emit_list.
11064         * breakpoint.c (print_solib_event, output_thread_groups): Use
11065         ui_out_emit_list.
11066
11067 2017-04-22  Tom Tromey  <tom@tromey.com>
11068
11069         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11070         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11071         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11072
11073 2017-04-22  Tom Tromey  <tom@tromey.com>
11074
11075         * tracepoint.c (tvariables_info_1)
11076         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11077
11078 2017-04-22  Tom Tromey  <tom@tromey.com>
11079
11080         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11081         annotate_arg_emitter.
11082         * breakpoint.c (print_mention_watchpoint)
11083         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11084         * annotate.h (struct annotate_arg_emitter): New.
11085
11086 2017-04-22  Tom Tromey  <tom@tromey.com>
11087
11088         * record-btrace.c (record_btrace_insn_history)
11089         (record_btrace_insn_history_range, record_btrace_call_history)
11090         (record_btrace_call_history_range): Use ui_out_emit_tuple.
11091         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11092         ui_out_emit_tuple.
11093         * stack.c (print_frame_info): Use ui_out_emit_tuple.
11094         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11095         * skip.c (skip_info): Use ui_out_emit_tuple.
11096         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11097         * progspace.c (print_program_space): Use ui_out_emit_tuple.
11098         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11099         * osdata.c (info_osdata): Use ui_out_emit_tuple.
11100         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11101         ui_out_emit_tuple.
11102         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11103         (output_register, mi_cmd_data_read_memory)
11104         (mi_cmd_data_read_memory_bytes, mi_load_progress)
11105         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11106         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11107         Use ui_out_emit_tuple.
11108         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11109         ui_out_emit_tuple.
11110         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11111         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11112         * linux-thread-db.c (info_auto_load_libthread_db): Use
11113         ui_out_emit_tuple.
11114         * inferior.c (print_inferior): Use ui_out_emit_tuple.
11115         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11116         * disasm.c (do_mixed_source_and_assembly_deprecated)
11117         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11118         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11119         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11120         * breakpoint.c (print_one_breakpoint_location)
11121         (print_one_breakpoint): Use ui_out_emit_tuple.
11122         * auto-load.c (print_script, info_auto_load_cmd): Use
11123         ui_out_emit_tuple.
11124         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11125
11126 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
11127
11128         * thread.c (print_thread_info_1): Remove dead code.
11129
11130 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11131
11132         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11133         GDB_SELF_TEST.
11134         * arm-tdep.c (selftests::arm_record_test): Likewise.
11135
11136 2017-04-21  Yao Qi  <yao.qi@linaro.org>
11137
11138         * regcache.c (regcache_restore): Remove argument 2.  Replace
11139         argument 3 with regcache.  Get register status from
11140         src->register_status and get register contents from
11141         register_buffer (src, regnum).
11142         (regcache_cpy): Update.
11143
11144 2017-04-19  Pedro Alves  <palves@redhat.com>
11145
11146         * gdbthread.h (thread): Add missing closing parenthesis in
11147         comment.
11148
11149 2017-04-19  Pedro Alves  <palves@redhat.com>
11150
11151         * common/refcounted-object.h: New file.
11152         * gdbthread.h: Include "common/refcounted-object.h".
11153         (thread_info): Inherit from refcounted_object and add comments.
11154         (thread_info::incref, thread_info::decref)
11155         (thread_info::m_refcount): Delete.
11156         (thread_info::deletable): Use the refcounted_object::refcount()
11157         method.
11158         * inferior.c (current_inferior_): Add comment.
11159         (set_current_inferior): Increment/decrement refcounts.
11160         (prune_inferiors, remove_inferior_command): Skip inferiors marked
11161         not-deletable instead of comparing with the current inferior.
11162         (initialize_inferiors): Increment the initial inferior's refcount.
11163         * inferior.h (struct inferior): Forward declare.
11164         Include "common/refcounted-object.h".
11165         (current_inferior, set_current_inferior): Move declaration to
11166         before struct inferior's definition, and fix comment.
11167         (inferior): Inherit from refcounted_object.  Add comments.
11168         * thread.c (switch_to_thread_no_regs): Reference the thread's
11169         inferior pointer directly instead of doing a ptid lookup.
11170         (switch_to_no_thread): New function.
11171         (switch_to_thread(thread_info *)): New function, factored out
11172         from ...
11173         (switch_to_thread(ptid_t)): ... this.
11174         (restore_current_thread): Delete.
11175         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11176         fields, and add 'inf' field.
11177         (do_restore_current_thread_cleanup): Check whether old->inf is
11178         alive instead of looking up an inferior by ptid.  Use
11179         switch_to_thread and switch_to_no_thread.
11180         (restore_current_thread_cleanup_dtor): Use old->inf directly
11181         instead of lookup up an inferior by id.  Decref the inferior.
11182         Don't restore 'removable'.
11183         (make_cleanup_restore_current_thread): Same the inferior pointer
11184         in old, instead of the inferior number.  Incref the inferior.
11185         Don't save/clear 'removable'.
11186
11187 2017-04-19  Pedro Alves  <palves@redhat.com>
11188
11189         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11190         unittests/scoped_restore-selftests.c.
11191         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11192         * common/scoped_restore.h (scoped_restore_base): Make "class".
11193         (scoped_restore_base::release): New public method.
11194         (scoped_restore_base::scoped_restore_base): New protected ctor.
11195         (scoped_restore_base::m_saved_var): New protected field.
11196         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11197         scoped_restore_base base class instead of m_saved_var directly.
11198         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11199         (scoped_restore_tmpl::scoped_restore_tmpl(const
11200         scoped_restore_tmpl<T>&)): Likewise.
11201         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11202         method.
11203         (scoped_restore_tmpl::saved_var): New method.
11204         (scoped_restore_tmpl::m_saved_var): Delete.
11205         * inferior.h (inferior::detaching): Now a bool.
11206         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11207         cleanup.
11208         * unittests/scoped_restore-selftests.c: New file.
11209
11210 2017-04-19  Pedro Alves  <palves@redhat.com>
11211
11212         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11213         Re-sort in alphabetic order.
11214
11215 2017-04-18  Pedro Alves  <palves@redhat.com>
11216
11217         * xml-support.c (obstack_xml_printf): Delete.
11218         * xml-support.h (obstack_xml_printf): Delete.
11219
11220 2017-04-18  Pedro Alves  <palves@redhat.com>
11221
11222         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11223         vdebug, verror, body_text, start_element, end_element, name,
11224         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11225         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11226         is_xinclude>: Make private and add m_ prefix.
11227         (gdb_xml_parser::body_text): New method, based on ...
11228         (gdb_xml_body_text): ... this.  Adjust.
11229         (gdb_xml_parser::vdebug): New method, based on ...
11230         (gdb_xml_debug): ... this.  Adjust.
11231         (gdb_xml_parser::verror): New method, based on ...
11232         (gdb_xml_error): ... this.  Adjust.
11233         (gdb_xml_parser::start_element): New method, based on ...
11234         (gdb_xml_start_element): ... this.  Adjust.
11235         (gdb_xml_start_element_wrapper): Defer to
11236         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11237         (gdb_xml_parser::end_element): New method, based on ...
11238         (gdb_xml_end_element_wrapper): ... this.  Adjust.
11239         (gdb_xml_parser::~gdb_xml_parser): Adjust.
11240         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11241         (gdb_xml_parser::use_dtd): New method, based on ...
11242         (gdb_xml_use_dtd): ... this.  Adjust.
11243         (gdb_xml_parser::parse): New method, based on ...
11244         (gdb_xml_parse): ... this.  Adjust.
11245         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11246         (xinclude_start_include): Adjust to call the parser's name method.
11247         (xml_xinclude_default, xml_xinclude_start_doctype)
11248         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11249         method.
11250         (xml_process_xincludes): Adjust to call parser methods.
11251         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11252         declarations.
11253
11254 2017-04-18  Pedro Alves  <palves@redhat.com>
11255
11256         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11257         gdb::optional<std::string>.
11258         * xml-support.c: Include <string>.
11259         (scope_level::scope_level(scope_level &&))
11260         (scope_level::~scope_level): Delete.
11261         (scope_level::body): Now a std::string.
11262         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11263         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11264         parameter.
11265         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11266         (xinclude_parsing_data::output): Now a std::string reference.
11267         (xinclude_start_include): Adjust.
11268         (xml_xinclude_default): Adjust.
11269         (xml_process_xincludes): Add 'output' parameter, and return bool.
11270         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11271         and return bool.
11272         * xml-tdesc.c: Include <unordered_map> and <string>.
11273         (tdesc_xml_cache): Delete.
11274         (tdesc_xml_cache_s): Delete.
11275         (xml_cache): Now an std::unordered_map.
11276         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11277         (target_fetch_description_xml): Change return type to
11278         gdb::optional<std::string>, and adjust.
11279         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11280         (target_fetch_description_xml): Change return type to
11281         gdb::optional<std::string>.
11282
11283 2017-04-18  Pedro Alves  <palves@redhat.com>
11284
11285         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11286         unittests/optional-selftests.c.
11287         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11288         * unittests/optional-selftests.c: New file.
11289         * unittests/optional/assignment/1.cc: New file.
11290         * unittests/optional/assignment/2.cc: New file.
11291         * unittests/optional/assignment/3.cc: New file.
11292         * unittests/optional/assignment/4.cc: New file.
11293         * unittests/optional/assignment/5.cc: New file.
11294         * unittests/optional/assignment/6.cc: New file.
11295         * unittests/optional/assignment/7.cc: New file.
11296         * unittests/optional/cons/copy.cc: New file.
11297         * unittests/optional/cons/default.cc: New file.
11298         * unittests/optional/cons/move.cc: New file.
11299         * unittests/optional/cons/value.cc: New file.
11300         * unittests/optional/in_place.cc: New file.
11301         * unittests/optional/observers/1.cc: New file.
11302         * unittests/optional/observers/2.cc: New file.
11303
11304 2017-04-18  Pedro Alves  <palves@redhat.com>
11305
11306         * common/gdb_optional.h: Include common/traits.h.
11307         (in_place_t): New type.
11308         (in_place): New constexpr variable.
11309         (optional::optional): Remove member initialization of
11310         m_instantiated.
11311         (optional::optional(in_place_t...)): New constructor.
11312         (optional::~optional): Use reset.
11313         (optional::optional(const optional&)): New.
11314         (optional::optional(const optional&&)): New.
11315         (optional::optional(T &)): New.
11316         (optional::optional(T &&)): New.
11317         (operator::operator=(const optional &)): New.
11318         (operator::operator=(optional &&)): New.
11319         (operator::operator= (const T &))
11320         (operator::operator= (T &&))
11321         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
11322         (operator::reset): New.
11323         (operator::m_instantiated):: Add in-class initializer.
11324         * common/traits.h: Include <type_traits>.
11325         (struct And): New types.
11326
11327 2017-04-18  Pedro Alves  <palves@redhat.com>
11328
11329         * xml-support.c: Include <vector>.
11330         (scope_level::scope_level(const gdb_xml_element *))
11331         (scope_level::scope_level(scope_level&&)): New.
11332         (scope_level::~scope_level): New.
11333         (scope_level_s): Delete.
11334         (gdb_xml_parser::scopes): Now a std::vector.
11335         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11336         Use std::vector.
11337         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11338         scope cleanup code.
11339         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11340         of the scopes member.  Use std::vector::emplace_back.
11341
11342 2017-04-18  Pedro Alves  <palves@redhat.com>
11343
11344         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
11345         a bool.
11346         (gdb_xml_end_element): Change type of first parameter.
11347         (gdb_xml_cleanup): Rename to ...
11348         (gdb_xml_parser::~gdb_xml_parser): ... this.
11349         (gdb_xml_create_parser_and_cleanup): Delete with ...
11350         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11351         to this new ctor.
11352         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11353         using gdb_xml_create_parser_and_cleanup.
11354         (xinclude_parsing_data): Add ctor/dtor.
11355         (xml_xinclude_cleanup): Delete.
11356         (xml_process_xincludes): Create a local xinclude_parsing_data
11357         instead of heap-allocating one.  Create a local gdb_xml_parser
11358         instead of heap-allocating one with
11359         gdb_xml_create_parser_and_cleanup.
11360
11361 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
11362
11363         PR threads/20743
11364         * fbsd-nat.c (resume_one_thread_cb): Remove.
11365         (resume_all_threads_cb): Remove.
11366         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11367         iterate_over_threads.
11368
11369 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11370
11371         * NEWS: Create a new section for the next release branch.
11372         Rename the section of the current branch, now that it has
11373         been cut.
11374
11375 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11376
11377         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11378         * version.in: Bump version to 8.0.50.DATE-git.
11379
11380 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
11381
11382         PR gdb/21385
11383         * windows-nat.c (windows_create_inferior): Declare 'allargs'
11384         independently of the host, and fix build breakage on Cygwin.
11385
11386 2017-04-13  Pedro Alves  <palves@redhat.com>
11387
11388         * inferior.c (free_inferior): Convert to ...
11389         (inferior::~inferior): ... this dtor.
11390         (inferior::inferior): New ctor, factored out from ...
11391         (add_inferior_silent): ... here.  Allocate the inferior with a new
11392         expression.
11393         (delete_inferior): Call delete instead of free_inferior.
11394         * inferior.h (gdb_environ, continuation): Forward declare.
11395         (inferior): Now a class.  Add in-class initialization to all
11396         members.  Make boolean fields bool, except 'detaching'.
11397         (inferior::inferior): New explicit ctor.
11398         (inferior::~inferior): New.
11399
11400 2017-04-13  Pedro Alves  <palves@redhat.com>
11401
11402         * inferior.c (init_inferior_list): Delete.
11403         * inferior.h (init_inferior_list): Delete.
11404
11405 2017-04-13  Pedro Alves  <palves@redhat.com>
11406
11407         PR threads/13217
11408         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11409         (top level): Call it twice, with different thread sets.
11410
11411 2017-04-13  Pedro Alves  <palves@redhat.com>
11412
11413         * thread.c: Include <algorithm>.
11414         (thread_array_cleanup): Delete.
11415         (scoped_inc_dec_ref): New class.
11416         (live_threads_count): New function.
11417         (set_thread_refcount): Delete.
11418         (tp_array_compar_ascending): Now a bool.
11419         (tp_array_compar): Convert to a std::sort comparison function.
11420         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11421         and live_threads_count.
11422
11423 2017-04-13  Pedro Alves  <palves@redhat.com>
11424
11425         * infrun.c (follow_fork_inferior): Also switch the current
11426         inferior.
11427
11428 2017-04-13  Pedro Alves  <palves@redhat.com>
11429
11430         * breakpoint.c (watch_command_1): Save watchpoint-frame info
11431         before calling create_internal_breakpoint.
11432
11433 2017-04-13  Pedro Alves  <palves@redhat.com>
11434
11435         * fork-child.c (execv_argv): New class.
11436         (breakup_args): Refactored as ...
11437         (execv_argv::init_for_no_shell): .. this method of execv_argv.
11438         Copy arguments to storage and replace separators with NULL
11439         terminators in place.
11440         (escape_bang_in_quoted_argument): Adjust to return bool.
11441         (execv_argv::execv_argv): New ctor.
11442         (execv_argv::init_for_shell): New method, factored out from
11443         fork_inferior.  Don't strdup strings into the vector.
11444         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
11445         Remove free_vector_argv call.
11446
11447 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11448
11449         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11450         tdep->rx_psw_type.
11451
11452 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11453
11454         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11455         * rx-tdep.c (rx_gdbarch_init): Likewise.
11456
11457 2017-04-13  Pedro Alves  <palves@redhat.com>
11458
11459         * breakpoint.h (struct breakpoint): Reindent.
11460
11461 2017-04-13  Pedro Alves  <palves@redhat.com>
11462
11463         * breakpoint.c (bp_location): Rename to ...
11464         (bp_locations): ... this.  All references updated.
11465         (bp_location_count): Rename to ...
11466         (bp_locations_count): ... this.  All references updated.
11467         (bp_location_placed_address_before_address_max): Rename to ...
11468         (bp_locations_placed_address_before_address_max): ... this.  All
11469         references updated.
11470         (bp_location_shadow_len_after_address_max): Rename to ...
11471         (bp_locations_shadow_len_after_address_max): ... this.  All
11472         references updated.
11473         (bp_location_compare_addrs): Rename to ...
11474         (bp_locations_compare_addrs): ... this.  All references updated.
11475         (bp_location_compare):Rename to ...
11476         (bp_locations_compare): ... this.  All references updated.
11477         (bp_location_target_extensions_update): Rename to ...
11478         (bp_locations_target_extensions_update): ... this.  All references
11479         updated.
11480
11481 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11482
11483         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11484         * common/common.m4: Check headers 'termios.h', 'termio.h' and
11485         'sgtty.h'.
11486         * common/gdb_termios.h: New file, with parts of "terminal.h".
11487         * inflow.c: Include "gdb_termios.h".
11488         * ser-unix.c: Include "gdb_termios.h".
11489         * terminal.h: Move terminal-related defines to
11490         "common/gdb_termios.h".
11491
11492 2017-04-12  Tom Tromey  <tom@tromey.com>
11493
11494         * probe.c (parse_probes): Update.
11495         * location.h (delete_event_location): Don't declare.
11496         (event_location_deleter::operator()): Update.
11497         * location.c (event_location_deleter::operator()): Rename from
11498         delete_event_location.
11499         * linespec.h (linespec_result) <location>: Change type to
11500         event_location_up.
11501         * linespec.c (canonicalize_linespec, event_location_to_sals)
11502         (decode_objc): Update.
11503         (linespec_result): Don't call delete_event_location.
11504         * breakpoint.c (create_breakpoints_sal)
11505         (bkpt_probe_create_sals_from_location)
11506         (strace_marker_create_sals_from_location): Update.
11507
11508 2017-04-12  Tom Tromey  <tom@tromey.com>
11509
11510         * linespec.h (struct linespec_result): Add constructor and
11511         destructor.
11512         (init_linespec_result, destroy_linespec_result)
11513         (make_cleanup_destroy_linespec_result): Don't declare.
11514         * linespec.c (init_linespec_result): Remove.
11515         (linespec_result::~linespec_result): Rename from
11516         destroy_linespec_result.  Update.
11517         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11518         Remove.
11519         * breakpoint.c (create_breakpoint, break_range_command)
11520         (decode_location_default): Update.
11521         * ax-gdb.c (agent_command_1): Update.
11522
11523 2017-04-12  Tom Tromey  <tom@tromey.com>
11524
11525         * remote.c (remote_download_tracepoint): Update.
11526         * python/py-breakpoint.c (bppy_get_location): Update.
11527         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11528         (gdbscm_breakpoint_location): Update.
11529         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11530         * breakpoint.h (struct breakpoint) <location, location_range_end>:
11531         Change type to event_location_up.
11532         * breakpoint.c (create_overlay_event_breakpoint)
11533         (create_longjmp_master_breakpoint)
11534         (create_std_terminate_master_breakpoint)
11535         (create_exception_master_breakpoint)
11536         (breakpoint_event_location_empty_p, print_breakpoint_location)
11537         (print_one_breakpoint_location, create_thread_event_breakpoint)
11538         (init_breakpoint_sal, create_breakpoint)
11539         (print_recreate_ranged_breakpoint, break_range_command)
11540         (init_ada_exception_breakpoint, say_where): Update.
11541         (base_breakpoint_dtor): Don't call delete_event_location.
11542         (bkpt_print_recreate, tracepoint_print_recreate)
11543         (dprintf_print_recreate, update_static_tracepoint)
11544         (breakpoint_re_set_default): Update.
11545
11546 2017-04-12  Tom Tromey  <tom@tromey.com>
11547
11548         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11549         type of "to_do".  Update.
11550         (compute_stack_depth): Use std::vector.
11551
11552 2017-04-12  Tom Tromey  <tom@tromey.com>
11553
11554         * printcmd.c (find_instruction_backward): Use std::vector.
11555
11556 2017-04-12  Tom Tromey  <tom@tromey.com>
11557
11558         * symfile.c (objfilep): Remove typedef.
11559         (reread_symbols): Use a std::vector.
11560
11561 2017-04-12  Tom Tromey  <tom@tromey.com>
11562
11563         * mi/mi-main.c (exec_direction_forward): Remove.
11564         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11565         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11566         scoped_restore.
11567         * guile/guile.c (guile_repl_command, guile_command)
11568         (gdbscm_execute_gdb_command): Use scoped_restore.
11569         * go-exp.y (go_parse): Use scoped_restore.
11570         * d-exp.y (d_parse): Use scoped_restore.
11571         * cli/cli-decode.c (cmd_func): Use scoped_restore.
11572         * c-exp.y (c_parse): Use scoped_restore.
11573
11574 2017-04-12  Tom Tromey  <tom@tromey.com>
11575
11576         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11577         (mi_parse): Update return type.
11578         (mi_parse_free): Remove.
11579         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11580         (mi_parse::~mi_parse): Rename from mi_parse_free.
11581         (mi_parse_cleanup): Remove.
11582         (mi_parse): Return a unique_ptr.  Use new.
11583         * mi/mi-main.c (mi_execute_command): Update.
11584
11585 2017-04-12  Tom Tromey  <tom@tromey.com>
11586
11587         * location.c (explicit_location_lex_one): Return a
11588         unique_xmalloc_ptr.
11589         (string_to_explicit_location): Update.  Remove cleanups.
11590
11591 2017-04-12  Tom Tromey  <tom@tromey.com>
11592
11593         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11594         (compare_value_and_voffset): Change type.  Update.
11595         (compute_vtable_size): Change type of "offset_vec".
11596         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
11597         (gnuv3_get_typeid): Remove extraneous declaration.
11598
11599 2017-04-12  Tom Tromey  <tom@tromey.com>
11600
11601         * charset.h (wchar_iterator): Fix comment.
11602
11603 2017-04-12  Tom Tromey  <tom@tromey.com>
11604
11605         * charset.c (iconv_wrapper): New class.
11606         (cleanup_iconv): Remove.
11607         (convert_between_encodings): Use it.
11608
11609 2017-04-12  Tom Tromey  <tom@tromey.com>
11610
11611         * symfile.h (increment_reading_symtab): Update type.
11612         * symfile.c (decrement_reading_symtab): Remove.
11613         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11614         * psymtab.c (psymtab_to_symtab): Update.
11615         * dwarf2read.c (dw2_instantiate_symtab): Update.
11616
11617 2017-04-12  Tom Tromey  <tom@tromey.com>
11618
11619         * jit.c (struct jit_reader): Declare separately.  Add constructor
11620         and destructor.  Change type of "handle".
11621         (loaded_jit_reader): Define separately.
11622         (jit_reader_load): Update.  New "new".
11623         (jit_reader_unload_command): Use "delete".
11624         * gdb-dlfcn.h (struct dlclose_deleter): New.
11625         (gdb_dlhandle_up): New typedef.
11626         (gdb_dlopen, gdb_dlsym): Update types.
11627         (gdb_dlclose): Remove.
11628         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11629         (gdb_dlsym): Change type of "handle".
11630         (make_cleanup_dlclose): Remove.
11631         (dlclose_deleter::operator()): Rename from gdb_dlclose.
11632         * compile/compile-c-support.c (load_libcc): Update.
11633
11634 2017-04-12  Tom Tromey  <tom@tromey.com>
11635
11636         * symtab.h (find_pcs_for_symtab_line): Change return type.
11637         * symtab.c (find_pcs_for_symtab_line): Change return type.
11638         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11639         type of "vec".  Update.
11640         (ltpy_get_pcs_for_line): Update.
11641         * linespec.c (decode_digits_ordinary): Update.
11642
11643 2017-04-12  Tom Tromey  <tom@tromey.com>
11644
11645         * tracepoint.c (actions_command): Update.
11646         * python/python.c (python_command, python_interactive_command):
11647         Update.
11648         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11649         * guile/guile.c (guile_command): Update.
11650         * defs.h (read_command_lines, read_command_lines_1): Return
11651         command_line_up.
11652         (command_lines_deleter): New struct.
11653         (command_line_up): New typedef.
11654         * compile/compile.c (compile_code_command)
11655         (compile_print_command): Update.
11656         * cli/cli-script.h (get_command_line, copy_command_lines): Return
11657         command_line_up.
11658         (make_cleanup_free_command_lines): Remove.
11659         * cli/cli-script.c (get_command_line, read_command_lines_1)
11660         (copy_command_lines): Return command_line_up.
11661         (while_command, if_command, read_command_lines, define_command)
11662         (document_command): Update.
11663         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11664         Remove.
11665         * breakpoint.h (breakpoint_set_commands): Change type of
11666         "commands".
11667         * breakpoint.c (breakpoint_set_commands): Change type of
11668         "commands".  Update.
11669         (do_map_commands_command, update_dprintf_command_list)
11670         (create_tracepoint_from_upload): Update.
11671
11672 2017-04-12  Tom Tromey  <tom@tromey.com>
11673
11674         * tracepoint.c (scope_info): Update.
11675         * spu-tdep.c (spu_catch_start): Update.
11676         * python/python.c (gdbpy_decode_line): Update.
11677         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11678         * python/py-breakpoint.c (bppy_init): Update.
11679         * probe.c (parse_probes): Update.
11680         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11681         * location.h (event_location_deleter): New struct.
11682         (event_location_up): New typedef.
11683         (new_linespec_location, new_address_location, new_probe_location)
11684         (new_explicit_location, copy_event_location)
11685         (string_to_event_location, string_to_event_location_basic)
11686         (string_to_explicit_location): Update return type.
11687         (make_cleanup_delete_event_location): Remove.
11688         * location.c (new_linespec_location, new_address_location)
11689         (new_probe_location, new_explicit_location, copy_event_location):
11690         Return event_location_up.
11691         (delete_event_location_cleanup)
11692         (make_cleanup_delete_event_location): Remove.
11693         (string_to_explicit_location, string_to_event_location_basic)
11694         (string_to_event_location): Return event_location_up.
11695         * linespec.c (canonicalize_linespec, event_location_to_sals)
11696         (decode_line_with_current_source)
11697         (decode_line_with_last_displayed, decode_objc): Update.
11698         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11699         * completer.c (location_completer): Update.
11700         * cli/cli-cmds.c (edit_command, list_command): Update.
11701         * breakpoint.c (create_overlay_event_breakpoint)
11702         (create_longjmp_master_breakpoint)
11703         (create_std_terminate_master_breakpoint)
11704         (create_exception_master_breakpoint)
11705         (create_thread_event_breakpoint): Update.
11706         (init_breakpoint_sal): Update.  Remove some dead code.
11707         (create_breakpoint_sal): Change type of "location".  Update.
11708         (create_breakpoints_sal, create_breakpoint, break_command_1)
11709         (dprintf_command, break_range_command, until_break_command)
11710         (init_ada_exception_breakpoint)
11711         (strace_marker_create_sals_from_location)
11712         (update_static_tracepoint, trace_command, ftrace_command)
11713         (strace_command, create_tracepoint_from_upload): Update.
11714         * break-catch-throw.c (re_set_exception_catchpoint): Update.
11715         * ax-gdb.c (agent_command_1): Update.
11716
11717 2017-04-12  Pedro Alves  <palves@redhat.com>
11718
11719         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11720         * configure.tgt: Handle i[34567]86-*-go32* and
11721         i[34567]86-*-msdosdjgpp*.
11722         * i386-tdep.c (i386_svr4_reg_to_regnum):
11723         Make extern.
11724         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11725         i386-go32-tdep.c.
11726         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11727         * i386-go32-tdep.c: New file.
11728         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
11729         declarations.
11730
11731 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
11732
11733         * aix-thread.c (pd_status2str): Change return type to const char *.
11734
11735 2017-04-12  Pedro Alves  <palves@redhat.com>
11736
11737         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
11738         calls to set_gdbarch_gnu_triplet_regexp.
11739
11740 2017-04-12  Pedro Alves  <palves@redhat.com>
11741
11742         PR gdb/21323
11743         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
11744         New enum value.
11745         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
11746         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
11747         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
11748         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
11749         * gdbarch.h, gdbarch.c: Regenerate.
11750         * aarch64-tdep.c (aarch64_gdbarch_init): Override
11751         gdbarch_wchar_bit and gdbarch_wchar_signed.
11752         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
11753         * arm-tdep.c (arm_gdbarch_init): Likewise.
11754         * avr-tdep.c (avr_gdbarch_init): Likewise.
11755         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
11756         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
11757         * i386-tdep.c (i386_go32_init_abi): Likewise.
11758         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11759         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11760         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11761         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11762         * sh-tdep.c (sh_gdbarch_init): Likewise.
11763         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11764         * sparc64-tdep.c (sparc64_init_abi): Likewise.
11765         * windows-tdep.c (windows_init_abi): Likewise.
11766         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11767
11768 2017-04-12  Pedro Alves  <palves@redhat.com>
11769
11770         PR c++/21323
11771         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
11772         cplus_primitive_type_char32_t>: New enum values.
11773         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
11774         and cplus_primitive_type_char32_t.
11775         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
11776         32, use the archtecture's built-in type for char16_t and char32_t,
11777         respectively.  Otherwise, fallback to init_integer_type as before,
11778         but make the type unsigned, and issue a complaint.
11779         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
11780
11781 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
11782
11783         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
11784         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
11785
11786 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11787
11788         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
11789         'const char *'.
11790
11791 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11792
11793         * common/common-utils.c (free_vector_argv): New function.
11794         * common/common-utils.h: Include <vector>.
11795         (free_vector_argv): New prototype.
11796         * darwin-nat.c (darwin_create_inferior): Rewrite function
11797         prototype in order to constify "exec_file" and accept a
11798         "std::string" for "allargs".
11799         * fork-child.c: Include <vector>.
11800         (breakup_args): Rewrite function, using C++.
11801         (fork_inferior): Rewrite function header, constify "exec_file_arg"
11802         and accept "std::string" for "allargs".  Update the code to
11803         calculate "argv" based on "allargs".  Update calls to "exec_fun"
11804         and "execvp".
11805         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
11806         order to constify "exec_file" and accept a "std::string" for
11807         "allargs".
11808         * go32-nat.c (go32_create_inferior): Likewise.
11809         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
11810         * infcmd.c (run_command_1): Constify "exec_file".  Use
11811         "std::string" for inferior arguments.
11812         * inferior.h (fork_inferior): Update prototype.
11813         * linux-nat.c (linux_nat_create_inferior): Rewrite function
11814         prototype in order to constify "exec_file" and accept a
11815         "std::string" for "allargs".
11816         * nto-procfs.c (procfs_create_inferior): Likewise.
11817         * procfs.c (procfs_create_inferior): Likewise.
11818         * remote-sim.c (gdbsim_create_inferior): Likewise.
11819         * remote.c (extended_remote_run): Update code to accept
11820         "std::string" as argument.
11821         (extended_remote_create_inferior): Rewrite function prototype in
11822         order to constify "exec_file" and accept a "std::string" for
11823         "allargs".
11824         * rs6000-nat.c (super_create_inferior): Likewise.
11825         (rs6000_create_inferior): Likewise.
11826         * target.h (struct target_ops) <to_create_inferior>: Likewise.
11827         * windows-nat.c (windows_create_inferior): Likewise.
11828
11829 2017-04-11  Pedro Alves  <palves@redhat.com>
11830
11831         * thread.c: Fix whitespace throughout.
11832
11833 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11834
11835         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
11836
11837 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
11838
11839         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
11840
11841 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
11842
11843         PR gdb/21364
11844         * osdata.c (info_osdata): Check if 'type' is an empty string
11845         instead of NULL.
11846
11847 2017-04-10  Pedro Alves  <palves@redhat.com>
11848
11849         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
11850         (ptid_to_global_thread_id, in_thread_list)
11851         (do_captured_list_thread_ids, set_resumed, set_running)
11852         (set_executing, set_stop_requested, finish_thread_state)
11853         (validate_registers_access, can_access_registers_ptid)
11854         (print_thread_info_1, switch_to_thread)
11855         (do_restore_current_thread_cleanup)
11856         (make_cleanup_restore_current_thread, thread_command)
11857         (thread_name_command): Use operator== instead of ptid_equal.
11858
11859 2017-04-10  Pedro Alves  <palves@redhat.com>
11860
11861         * thread.c (struct current_thread_cleanup) <next>: Delete field.
11862         (current_thread_cleanup_chain): Delete.
11863         (restore_current_thread_cleanup_dtor)
11864         (make_cleanup_restore_current_thread): Remove references to
11865         current_thread_cleanup_chain.
11866
11867 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
11868
11869         * msp430-tdep.c (msp430_pseudo_register_read): Never return
11870         REG_UNKNOWN.
11871
11872 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11873
11874         PR gdb/19942
11875         * gdbthread.h (thread_info::deletable): New method.
11876         (thread_info::incref): New method.
11877         (thread_info::decref): New method.
11878         (thread_info::refcount): Move it to private.
11879         * infrun.c (save_stop_context): Call inc_refcount.
11880         (release_stop_context_cleanup): Likewise.
11881         * thread.c (set_thread_exited): New function.
11882         (init_thread_list): Delete "tp" only it is deletable, otherwise
11883         call set_thread_exited.
11884         (delete_thread_1): Call set_thread_exited.
11885         (current_thread_cleanup) <inferior_pid>: Remove.
11886         <thread>: New field.
11887         (restore_current_thread_ptid_changed): Removed.
11888         (do_restore_current_thread_cleanup): Adjust.
11889         (restore_current_thread_cleanup_dtor): Don't call
11890         find_thread_ptid.
11891         (set_thread_refcount): Use dec_refcount.
11892         (make_cleanup_restore_current_thread): Adjust.
11893         (thread_apply_all_command): Call inc_refcount.
11894         (_initialize_thread): Don't call
11895         observer_attach_thread_ptid_changed.
11896
11897 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11898
11899         * thread.c (delete_thread_1): Hoist code on marking thread as
11900         exited.
11901
11902 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11903
11904         * windows-nat.c (windows_detach): Initialize ptid with
11905         minus_one_ptid.
11906
11907 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11908
11909         * unittests/ptid-selftests.c: Fix erroneous assert messages.
11910
11911 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
11912
11913         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
11914         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
11915         (bfin_pseudo_register_write): Likewise
11916
11917 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
11918
11919         * common/ptid.h (struct ptid): Change to...
11920         (class ptid_t): ... this.
11921         <ptid_t>: New constructors.
11922         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
11923         matches>: New methods.
11924         <make_null, make_minus_one>: New static methods.
11925         <pid>: Rename to...
11926         <m_pid>: ...this.
11927         <lwp>: Rename to...
11928         <m_lwp>: ...this.
11929         <tid>: Rename to...
11930         <m_tid>: ...this.
11931         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
11932         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
11933         as references, move comment to class ptid_t.
11934         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
11935         ptid_t static methods.
11936         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
11937         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
11938         Take ptid arguments as references, implement using ptid_t methods.
11939         * unittests/ptid-selftests.c: New file.
11940         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11941         unittests/ptid-selftests.c.
11942         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
11943
11944 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
11945
11946         * python/python.c (python_run_simple_file): Cast mode literal to
11947         non-const char pointer as expected by PyFile_FromString.
11948
11949 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
11950
11951         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
11952         minus_one_ptid and null_ptid.
11953
11954 2017-04-05  Pedro Alves  <palves@redhat.com>
11955
11956         * warning.m4 (build_warnings): Remove -Wno-write-strings.
11957         * configure: Regenerate.
11958
11959 2017-04-05  Pedro Alves  <palves@redhat.com>
11960
11961         * ada-exp.y (yyerror): Constify.
11962         * ada-lang.c (bound_name, get_selections)
11963         (ada_variant_discrim_type)
11964         (ada_variant_discrim_name, ada_value_struct_elt)
11965         (ada_lookup_struct_elt_type, is_unchecked_variant)
11966         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
11967         (catch_ada_exception_command_split)
11968         (catch_ada_assert_command_split, catch_assert_command)
11969         (ada_op_name): Constify.
11970         * ada-lang.h (ada_yyerror, get_selections)
11971         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
11972         * arc-tdep.c (arc_print_frame_cache): Constify.
11973         * arm-tdep.c (arm_skip_stub): Constify.
11974         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
11975         (gen_aggregate_elt_ref): Constify.
11976         * bcache.c (print_bcache_statistics): Constify.
11977         * bcache.h (print_bcache_statistics): Constify.
11978         * break-catch-throw.c (catch_exception_command_1):
11979         * breakpoint.c (struct ep_type_description::description):
11980         Constify.
11981         (add_solib_catchpoint): Constify.
11982         (catch_fork_command_1): Add cast.
11983         (add_catch_command): Constify.
11984         * breakpoint.h (add_catch_command, add_solib_catchpoint):
11985         Constify.
11986         * bsd-uthread.c (bsd_uthread_state): Constify.
11987         * buildsym.c (patch_subfile_names): Constify.
11988         * buildsym.h (next_symbol_text_func, patch_subfile_names):
11989         Constify.
11990         * c-exp.y (yyerror): Constify.
11991         (token::oper): Constify.
11992         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
11993         * c-varobj.c (cplus_describe_child): Constify.
11994         * charset.c (find_charset_names): Add cast.
11995         (find_charset_names): Constify array and add const_cast.
11996         * cli/cli-cmds.c (complete_command, cd_command): Constify.
11997         (edit_command): Constify.
11998         * cli/cli-decode.c (lookup_cmd): Constify.
11999         * cli/cli-dump.c (dump_memory_command, dump_value_command):
12000         Constify.
12001         (struct dump_context): Constify.
12002         (add_dump_command, restore_command): Constify.
12003         * cli/cli-script.c (get_command_line): Constify.
12004         * cli/cli-script.h (get_command_line): Constify.
12005         * cli/cli-utils.c (check_for_argument): Constify.
12006         * cli/cli-utils.h (check_for_argument): Constify.
12007         * coff-pe-read.c (struct read_pe_section_data): Constify.
12008         * command.h (lookup_cmd): Constify.
12009         * common/print-utils.c (decimal2str): Constify.
12010         * completer.c (gdb_print_filename): Constify.
12011         * corefile.c (set_gnutarget): Constify.
12012         * cp-name-parser.y (yyerror): Constify.
12013         * cp-valprint.c (cp_print_class_member): Constify.
12014         * cris-tdep.c (cris_register_name, crisv32_register_name):
12015         Constify.
12016         * d-exp.y (yyerror): Constify.
12017         (struct token::oper): Constify.
12018         * d-lang.h (d_yyerror): Constify.
12019         * dbxread.c (struct header_file_location::name): Constify.
12020         (add_old_header_file, add_new_header_file, last_function_name)
12021         (dbx_next_symbol_text, add_bincl_to_list)
12022         (find_corresponding_bincl_psymtab, set_namestring)
12023         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12024         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12025         * defs.h (command_line_input, print_address_symbolic)
12026         (deprecated_readline_begin_hook): Constify.
12027         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12028         Constify.
12029         * event-top.c (handle_line_of_input): Constify and add cast.
12030         * exceptions.c (catch_errors): Constify.
12031         * exceptions.h (catch_errors): Constify.
12032         * expprint.c (print_subexp_standard, op_string, op_name)
12033         (op_name_standard, dump_raw_expression, dump_raw_expression):
12034         * expression.h (op_name, op_string, dump_raw_expression):
12035         Constify.
12036         * f-exp.y (yyerror): Constify.
12037         (struct token::oper): Constify.
12038         (struct f77_boolean_val::name): Constify.
12039         * f-lang.c (f_word_break_characters): Constify.
12040         * f-lang.h (f_yyerror): Constify.
12041         * fork-child.c (fork_inferior): Add cast.
12042         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12043         (new_variant): Constify.
12044         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12045         * gdbarch.c: Regenerate.
12046         * gdbcore.h (set_gnutarget): Constify.
12047         * go-exp.y (yyerror): Constify.
12048         (token::oper): Constify.
12049         * go-lang.h (go_yyerror): Constify.
12050         * go32-nat.c (go32_sysinfo): Constify.
12051         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12052         * guile/scm-cmd.c (cmdscm_function): Constify.
12053         * guile/scm-param.c (pascm_param_value): Constify.
12054         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12055         (h8300sx_register_name): Constify.
12056         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12057         Constify.
12058         * ia64-tdep.c (ia64_register_names): Constify.
12059         * infcmd.c (construct_inferior_arguments): Constify.
12060         (path_command, attach_post_wait): Constify.
12061         * language.c (show_range_command, show_case_command)
12062         (unk_lang_error): Constify.
12063         * language.h (language_defn::la_error)
12064         (language_defn::la_name_of_this): Constify.
12065         * linespec.c (decode_line_2): Constify.
12066         * linux-thread-db.c (thread_db_err_str): Constify.
12067         * lm32-tdep.c (lm32_register_name): Constify.
12068         * m2-exp.y (yyerror): Constify.
12069         * m2-lang.h (m2_yyerror): Constify.
12070         * m32r-tdep.c (m32r_register_names): Constify and make static.
12071         * m68hc11-tdep.c (m68hc11_register_names): Constify.
12072         * m88k-tdep.c (m88k_register_name): Constify.
12073         * macroexp.c (appendmem): Constify.
12074         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12075         (upgrade_type, parse_external, parse_partial_symbols)
12076         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12077         (new_symbol): Constify.
12078         * memattr.c (mem_info_command): Constify.
12079         * mep-tdep.c (register_name_from_keyword): Constify.
12080         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12081         Constify.
12082         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12083         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12084         * mi/mi-main.c (captured_mi_execute_command): Constify and add
12085         cast.
12086         (mi_execute_async_cli_command): Constify.
12087         * mips-tdep.c (mips_register_name): Constify.
12088         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12089         (am33_register_name, am33_2_register_name)
12090         * moxie-tdep.c (moxie_register_names): Constify.
12091         * nat/linux-osdata.c (osdata_type): Constify fields.
12092         * nto-tdep.c (nto_parse_redirection): Constify.
12093         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12094         (lookup_child_selector): Constify.
12095         (objc_methcall::name): Constify.
12096         * objc-lang.h (lookup_objc_class, lookup_child_selector)
12097         (lookup_struct_typedef): Constify.
12098         * objfiles.c (pc_in_section): Constify.
12099         * objfiles.h (pc_in_section): Constify.
12100         * p-exp.y (struct token::oper): Constify.
12101         (yyerror): Constify.
12102         * p-lang.h (pascal_yyerror): Constify.
12103         * parser-defs.h (op_name_standard): Constify.
12104         (op_print::string): Constify.
12105         (exp_descriptor::op_name): Constify.
12106         * printcmd.c (print_address_symbolic): Constify.
12107         * psymtab.c (print_partial_symbols): Constify.
12108         * python/py-breakpoint.c (stop_func): Constify.
12109         (bppy_get_expression): Constify.
12110         * python/py-cmd.c (cmdpy_completer::name): Constify.
12111         (cmdpy_function): Constify.
12112         * python/py-event.c (evpy_add_attribute)
12113         (gdbpy_initialize_event_generic): Constify.
12114         * python/py-event.h (evpy_add_attribute)
12115         (gdbpy_initialize_event_generic): Constify.
12116         * python/py-evts.c (add_new_registry): Constify.
12117         * python/py-finishbreakpoint.c (outofscope_func): Constify.
12118         * python/py-framefilter.c (get_py_iter_from_func): Constify.
12119         * python/py-inferior.c (get_buffer): Add cast.
12120         * python/py-param.c (parm_constant::name): Constify.
12121         * python/py-unwind.c (fprint_frame_id): Constify.
12122         * python/python.c (gdbpy_parameter_value): Constify.
12123         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12124         * remote.c (memory_packet_config::name): Constify.
12125         (show_packet_config_cmd, remote_write_bytes)
12126         (remote_buffer_add_string):
12127         * reverse.c (exec_reverse_once): Constify.
12128         * rs6000-tdep.c (variant::name, variant::description): Constify.
12129         * rust-exp.y (rustyyerror): Constify.
12130         * rust-lang.c (rust_op_name): Constify.
12131         * rust-lang.h (rustyyerror): Constify.
12132         * serial.h (serial_ops::name): Constify.
12133         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12134         (sh_sh3e_register_name, sh_sh2e_register_name)
12135         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12136         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12137         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12138         (sh_sh4al_dsp_register_name): Constify.
12139         * sh64-tdep.c (sh64_register_name): Constify.
12140         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12141         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12142         * stabsread.c (patch_block_stabs, read_type_number)
12143         (ref_map::stabs, ref_add, process_reference)
12144         (symbol_reference_defined, define_symbol, define_symbol)
12145         (error_type, read_type, read_member_functions, read_cpp_abbrev)
12146         (read_one_struct_field, read_struct_fields, read_baseclasses)
12147         (read_tilde_fields, read_struct_type, read_array_type)
12148         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12149         (read_huge_number, read_range_type, read_args, common_block_start)
12150         (find_name_end): Constify.
12151         * stabsread.h (common_block_start, define_symbol)
12152         (process_one_symbol, symbol_reference_defined, ref_add):
12153         * symfile.c (get_section_index, add_symbol_file_command):
12154         * symfile.h (get_section_index): Constify.
12155         * target-descriptions.c (tdesc_type::name): Constify.
12156         (tdesc_free_type): Add cast.
12157         * target.c (find_default_run_target):
12158         (add_deprecated_target_alias, find_default_run_target)
12159         (target_announce_detach): Constify.
12160         (do_option): Constify.
12161         * target.h (add_deprecated_target_alias): Constify.
12162         * thread.c (print_thread_info_1): Constify.
12163         * top.c (deprecated_readline_begin_hook, command_line_input):
12164         Constify.
12165         (init_main): Add casts.
12166         * top.h (handle_line_of_input): Constify.
12167         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12168         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12169         (tfind_command): Rename to ...
12170         (tfind_command_1): ... this and constify.
12171         (tfind_command): New function.
12172         (tfind_end_command, tfind_start_command): Adjust.
12173         (encode_source_string): Constify.
12174         * tracepoint.h (encode_source_string): Constify.
12175         * tui/tui-data.c (tui_partial_win_by_name): Constify.
12176         * tui/tui-data.h (tui_partial_win_by_name): Constify.
12177         * tui/tui-source.c (tui_set_source_content_nil): Constify.
12178         * tui/tui-source.h (tui_set_source_content_nil): Constify.
12179         * tui/tui-win.c (parse_scrolling_args): Constify.
12180         * tui/tui-windata.c (tui_erase_data_content): Constify.
12181         * tui/tui-windata.h (tui_erase_data_content): Constify.
12182         * tui/tui-winsource.c (tui_erase_source_content): Constify.
12183         * tui/tui.c (tui_enable): Add cast.
12184         * utils.c (defaulted_query): Constify.
12185         (init_page_info): Add cast.
12186         (puts_debug, subset_compare): Constify.
12187         * utils.h (subset_compare): Constify.
12188         * varobj.c (varobj_format_string): Constify.
12189         * varobj.h (varobj_format_string): Constify.
12190         * vax-tdep.c (vax_register_name): Constify.
12191         * windows-nat.c (windows_detach): Constify.
12192         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12193         * xml-support.c (gdb_xml_end_element): Constify.
12194         * xml-tdesc.c (tdesc_start_reg): Constify.
12195         * xstormy16-tdep.c (xstormy16_register_name): Constify.
12196         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12197         * xtensa-tdep.h (xtensa_register_t::name): Constify.
12198
12199 2017-04-05  Pedro Alves  <palves@redhat.com>
12200
12201         * proc-api.c (struct trans): Constify.
12202         (procfs_note): Constify.
12203         * proc-events.c (struct trans, syscall_table):
12204         * proc-flags.c (struct trans): Constify.
12205         * proc-utils.h (procfs_note): Constify.
12206         * proc-why.c (struct trans): Constify.
12207         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12208         (procfs_detach): Constify.
12209         * sol-thread.c (struct string_map): Constify.
12210         (td_err_string, td_state_string): Constify.
12211
12212 2017-04-05  Pedro Alves  <palves@redhat.com>
12213
12214         * proc-api.c (procfs_filename): Don't initialize
12215         procfs_filename.
12216         (prepare_to_trace): Assume procfs_filename is non-NULL.
12217         (_initialize_proc_api): Give procfs_filename a default value here.
12218
12219 2017-04-05  Pedro Alves  <palves@redhat.com>
12220
12221         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12222         'cond_string' parameter.
12223         (extract_exception_regexp): Constify 'string' parameter.
12224         (catch_exception_command_1): Constify.
12225         * breakpoint.c (init_catchpoint)
12226         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12227         parameter.
12228         (ep_parse_optional_if_clause, catch_fork_command_1)
12229         (catch_exec_command_1): Constify.
12230         * breakpoint.h (init_catchpoint): Constify 'cond_string'
12231         parameter.
12232         (ep_parse_optional_if_clause): Constify.
12233         * cli/cli-utils.c (remove_trailing_whitespace)
12234         (check_for_argument): Constify.
12235         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12236         non-const overload.
12237         (check_for_argument): Likewise.
12238
12239 2017-04-05  Pedro Alves  <palves@redhat.com>
12240
12241         * event-top.c (command_line_handler): Add cast to execute_command
12242         call.
12243         * record-btrace.c (cmd_record_btrace_bts_start)
12244         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12245         (cmd_record_btrace_start): Add cast to execute_command call.
12246         * record-full.c (record_full_goto_insn):
12247         * record.c (record_start, record_stop): Add cast to
12248         execute_command_to_string calls.
12249         (cmd_record_start): Add cast to execute_command calls.
12250
12251 2017-04-05  Pedro Alves  <palves@redhat.com>
12252
12253         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12254         static inline function.
12255         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12256         array and use gdb_PyArg_ParseTupleAndKeywords.
12257         * python/py-cmd.c (cmdpy_init): Likewise.
12258         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12259         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12260         (infpy_search_memory): Likewise.
12261         * python/py-objfile.c (objfpy_add_separate_debug_file)
12262         (gdbpy_lookup_objfile): Likewise.
12263         * python/py-symbol.c (gdbpy_lookup_symbol)
12264         (gdbpy_lookup_global_symbol): Likewise.
12265         * python/py-type.c (gdbpy_lookup_type): Likewise.
12266         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12267         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12268         Likewise.
12269
12270 2017-04-05  Pedro Alves  <palves@redhat.com>
12271
12272         * python/python-internal.h (gdb_PyGetSetDef): New type.
12273         * python/py-block.c (block_object_getset)
12274         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12275         * python/py-event.c (event_object_getset)
12276         (finish_breakpoint_object_getset): Likewise.
12277         * python/py-inferior.c (inferior_object_getset): Likewise.
12278         * python/py-infthread.c (thread_object_getset): Likewise.
12279         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12280         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12281         * python/py-objfile.c (objfile_getset): Likewise.
12282         * python/py-progspace.c (pspace_getset): Likewise.
12283         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12284         Likewise.
12285         * python/py-record.c (recpy_record_getset): Likewise.
12286         * python/py-symbol.c (symbol_object_getset): Likewise.
12287         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12288         Likewise.
12289         * python/py-type.c (type_object_getset, field_object_getset):
12290         Likewise.
12291         * python/py-value.c (value_object_getset): Likewise.
12292
12293 2017-04-05  Pedro Alves  <palves@redhat.com>
12294
12295         * python/python-internal.h (gdb_PyObject_CallMethod)
12296         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12297         New functions.
12298         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12299         (PySys_GetObject, PySys_SetPath): New macros.
12300
12301 2017-04-05  Pedro Alves  <palves@redhat.com>
12302
12303         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12304         info_osdata_command.
12305         * osdata.c (info_osdata_command): Rename to ...
12306         (info_osdata): ... this.  Constify 'type' parameter, and remove
12307         the 'from_tty' parameter.  Accept NULL TYPE.
12308         (info_osdata_command): New function.
12309         * osdata.h (info_osdata_command): Remove declaration.
12310         (info_osdata): New declaration.
12311
12312 2017-04-05  Pedro Alves  <palves@redhat.com>
12313
12314         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12315         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12316         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12317         parameter.
12318         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12319         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12320         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12321         parameter.
12322         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12323         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12324         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12325         (mi_cmd_file_list_exec_source_files)
12326         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12327         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12328         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12329         parameter.
12330         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12331         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12332         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12333         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12334         (mi_cmd_stack_info_frame): Constify 'command' parameter.
12335         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12336         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12337         'command' parameter.
12338         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12339         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12340         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12341         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12342         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12343         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12344         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12345         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12346         (mi_cmd_var_set_update_range): Constify 'command' parameter.
12347         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12348         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12349         parameter.
12350         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12351         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12352         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12353         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12354         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12355         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12356         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12357         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12358         (mi_cmd_data_list_changed_registers)
12359         (mi_cmd_data_write_register_values)
12360         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12361         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12362         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12363         (mi_cmd_list_features, mi_cmd_list_target_features)
12364         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12365         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12366         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12367         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12368         (mi_cmd_trace_frame_collected): Constify 'command'
12369         parameter.
12370         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12371         'command' parameter.
12372
12373 2017-04-05  Pedro Alves  <palves@redhat.com>
12374
12375         * ada-lang.c (ada_completer_word_break_characters): Now a const
12376         array.
12377         (ada_get_gdb_completer_word_break_characters): Constify.
12378         * completer.c (gdb_completer_command_word_break_characters)
12379         (gdb_completer_file_name_break_characters)
12380         (gdb_completer_quote_characters): Now const arrays.
12381         (get_gdb_completer_quote_characters): Constify.
12382         (set_rl_completer_word_break_characters): New function.
12383         (set_gdb_completion_word_break_characters)
12384         (complete_line_internal): Use it.
12385         * completer.h (get_gdb_completer_quote_characters): Constify.
12386         (set_rl_completer_word_break_characters): Declare.
12387         * f-lang.c (f_word_break_characters): Constify.
12388         * language.c (default_word_break_characters): Constify.
12389         * language.h (language_defn::la_word_break_characters): Constify.
12390         (default_word_break_characters): Constify.
12391         * top.c (init_main): Use set_rl_completer_word_break_characters.
12392
12393 2017-04-05  Pedro Alves  <palves@redhat.com>
12394
12395         * aix-thread.c (aix_thread_pid_to_str)
12396         (aix_thread_extra_thread_info): Constify.
12397         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12398         * bsd-uthread.c (bsd_uthread_extra_thread_info)
12399         (bsd_uthread_pid_to_str): Constify.
12400         * corelow.c (core_pid_to_str): Constify.
12401         * darwin-nat.c (darwin_pid_to_str): Constify.
12402         * fbsd-nat.c (fbsd_pid_to_str): Constify.
12403         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12404         Constify.
12405         * gnu-nat.c (gnu_pid_to_str): Constify.
12406         * go32-nat.c (go32_pid_to_str): Constify.
12407         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12408         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12409         * inferior.c (inferior_pid_to_str): Constify.
12410         * linux-nat.c (linux_nat_pid_to_str): Constify.
12411         * linux-tdep.c (linux_core_pid_to_str): Constify.
12412         * linux-thread-db.c (thread_db_pid_to_str)
12413         (thread_db_extra_thread_info): Constify.
12414         * nto-tdep.c (nto_extra_thread_info): Constify.
12415         * nto-tdep.h (nto_extra_thread_info): Constify.
12416         * obsd-nat.c (obsd_pid_to_str): Constify.
12417         * procfs.c (procfs_pid_to_str): Constify.
12418         * ravenscar-thread.c (ravenscar_extra_thread_info)
12419         (ravenscar_pid_to_str): Constify.
12420         * remote-sim.c (gdbsim_pid_to_str): Constify.
12421         * remote.c (remote_threads_extra_info, remote_pid_to_str):
12422         Constify.
12423         * sol-thread.c (solaris_pid_to_str): Constify.
12424         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12425         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12426         * target.c (default_pid_to_str, target_pid_to_str)
12427         (normal_pid_to_str, default_pid_to_str): Constify.
12428         * target.h (target_ops::to_pid_to_str)
12429         (target_ops::to_extra_thread_info): Constify.
12430         (target_pid_to_str, normal_pid_to_str): Constify.
12431         * windows-nat.c (windows_pid_to_str): Constify.
12432         * gdbarch.sh (core_pid_to_str): Constify.
12433         * target-delegates.c: Regenerate.
12434         * gdbarch.h, gdbarch.c: Regenerate.
12435
12436 2017-04-05  Pedro Alves  <palves@redhat.com>
12437
12438         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12439         the memory of the temporary warning_pre_print override.
12440         * utils.c (warning_pre_print): Constify.
12441         * utils.h (warning_pre_print): Constify.
12442
12443 2017-04-05  Pedro Alves  <palves@redhat.com>
12444
12445         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12446         (shell_command): New function.
12447         (make_command): Use std::string.
12448         (init_cli_cmds): Register shell_command instead of shell_escape.
12449
12450 2017-04-05  Pedro Alves  <palves@redhat.com>
12451
12452         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12453         * tracepoint.c (default_collect): Don't initialize.
12454
12455 2017-04-05  Pedro Alves  <palves@redhat.com>
12456
12457         * macroexp.c (macro_buffer::shared): Now a bool.
12458         (init_buffer): Update.
12459         (init_shared_buffer): Constify 'addr' parameter.
12460         (substitute_args, expand, macro_expand, macro_expand_next): Remove
12461         casts.
12462
12463 2017-04-05  Pedro Alves  <palves@redhat.com>
12464
12465         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12466         * disasm.c (set_disassembler_options): Constify local.
12467         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12468
12469 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
12470
12471         PR gdb/21352
12472         * tracefile.c (tsave_command): Fix argument parsing for '-r'
12473         option.
12474
12475 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12476
12477         * frame.c (frame_unwind_register_unsigned): Call
12478         frame_unwind_register_value.
12479
12480 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12481
12482         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12483         Use gdb_test_multiple, and don't match anchor.
12484
12485 2017-04-05  Pedro Alves  <palves@redhat.com>
12486
12487         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12488         (Write After Approval): Remove Simon Marchi.
12489
12490 2017-04-05  Pedro Alves  <palves@redhat.com>
12491
12492         * common/gdb_optional.h (optional::optional): Make constexpr and
12493         initialize m_dummy.
12494
12495 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12496
12497         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12498         (amd64fbsd_jmp_buf_reg_offset): Remove.
12499         (amd64fbsd_supply_uthread): Remove function.
12500         (amd64fbsd_collect_uthread): Remove function.
12501         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12502         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12503         (x86_64-*-freebsd*): Remove bsd-uthread.o.
12504         (fbsd-nat.c): Update comment.
12505         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12506         (i386fbsd_jmp_buf_reg_offset): Remove.
12507         (i386fbsd_supply_uthread): Remove function.
12508         (i386fbsd_collect_uthread): Remove function.
12509         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12510
12511 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12512
12513         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12514         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12515         * NEWS: Mention that support for FreeBSD/alpha was removed.
12516         * alpha-fbsd-tdep.c: Delete file.
12517         * config/alpha/fbsd.mh: Delete file.
12518         * configure.host: Delete alpha*-*-freebsd* and
12519         alpha*-*-kfreebsd*-gnu.
12520         * configure.tgt: Delete alpha*-*-freebsd* and
12521         alpha*-*-kfreebsd*-gnu.
12522
12523 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12524
12525         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12526         amd64bsd_store_inferior_registers): Use ptid from regcache.
12527
12528 2017-04-04  Pedro Alves  <palves@redhat.com>
12529
12530         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
12531         data fields, make them private and add "m_" prefixes.
12532         (lnp_state_machine::lnp_state_machine): New ctor.
12533         (record_line, check_line_address, handle_set_discriminator)
12534         (handle_set_address, handle_advance_pc, handle_special_opcode)
12535         (handle_advance_line, handle_set_file, handle_negate_stmt)
12536         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12537         (end_sequence, advance_line): New methods.
12538         (m_gdbarch, m_record_lines_p): New fields.
12539         (lnp_reader_state): Delete.
12540         (dwarf_record_line): Rename to ...
12541         (lnp_state_machine::record_line): ... adjust.
12542         (init_lnp_state_machine): Delete.
12543         (lnp_state_machine::lnp_state_machine): New.
12544         (check_line_address): Rename to ...
12545         (lnp_state_machine::check_line_address): This.
12546         (dwarf_decode_lines_1): Remove reference to "reader_state".
12547         Adjust lnp_state_machine having a non-default ctor.  Use bool.
12548         State machine internal state manipulation moved to
12549         lnp_state_machine methods.
12550
12551 2017-04-04  Pedro Alves  <palves@redhat.com>
12552
12553         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12554         unittests/offset-type-selftests.c.
12555         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12556         * common/offset-type.h: New file.
12557         * common/preprocessor.h: New file.
12558         * common/traits.h: New file.
12559         * common/valid-expr.h: New file.
12560         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
12561         sect_offset and cu_offset strong typedefs throughout.
12562         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12563         typedefs throughout.
12564         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
12565         sect_offset and cu_offset strong typedefs throughout.
12566         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12567         typedefs throughout.
12568         * gdbtypes.h: Include "common/offset-type.h".
12569         (cu_offset): Now an offset type (strong typedef) instead of a
12570         struct.
12571         (sect_offset): Likewise.
12572         (union call_site_parameter_u): Rename "param_offset" field to
12573         "param_cu_off".
12574         * unittests/offset-type-selftests.c: New file.
12575
12576 2017-04-04  Pedro Alves  <palves@redhat.com>
12577
12578         * common/underlying.h: New file.
12579         * dwarf2read.c: Include "common/gdb_optional.h" and
12580         "common/underlying.h".
12581         (dir_index, file_name_index): New types.
12582         (file_entry): Use them.
12583         (file_entry::include): Use to_underlying.
12584         (line_header::add_file_name): Use dir_index.
12585         (read_formatted_entries): Use gdb::optional.  Read form before
12586         writting to file_entry.
12587         (dwarf_decode_line_header): Use dir_index.
12588         (lnp_state_machine::current_file): Use to_underlying.
12589         (lnp_state_machine::file): Change type to file_name_index.
12590         (dwarf_record_line): Use to_underlying.
12591         (init_lnp_state_machine): Use file_name_index.
12592         (dwarf_decode_lines_1): Use dir_index and file_name_index.
12593
12594 2017-04-04  Pedro Alves  <palves@redhat.com>
12595
12596         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12597         operator bool, has_value and get methods.
12598
12599 2017-04-04  Pedro Alves  <palves@redhat.com>
12600
12601         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12602         fields.
12603         (line_header): Initialize all data fields.  Change type of
12604         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12605         Change type of include_dirs to std::vector<const char *>.  Remove
12606         num_include_dirs, include_dirs_size.  Change type of file_names to
12607         std::vector<file_entry>.  Remove num_file_names, file_names_size.
12608         (line_header::line_header): New.
12609         (line_header::add_include_dir, line_header::add_file_name): New
12610         methods.
12611         (line_header::include_dir_at): Remove NULL check.
12612         (line_header::file_name_at): Add const overload.
12613         (line_header_up): New unique_ptr typedef.
12614         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
12615         std::vector.  Remove free_line_header call.
12616         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
12617         free_line_header call.
12618         (free_cu_line_header): Delete.
12619         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12620         (setup_type_unit_groups): Use line_header_up instead of cleanups.
12621         Adjust to use std::vector.
12622         (free_line_header): Delete.
12623         (free_line_header_voidp): Use delete.
12624         (add_include_dir): Replace with ...
12625         (line_header::add_include_dir): ... this method.  Use std::vector.
12626         (add_file_name): Replace with ...
12627         (line_header::add_file_name): ... this method.  Use std::vector.
12628         (add_include_dir_stub): Delete.
12629         (read_formatted_entries): Remove memset.
12630         (dwarf_decode_line_header): Return a line_header_up instead of a
12631         raw pointer.  Remove cleanup handling.  Pass lambdas to
12632         read_formatted_entries.  Adjust to use line_header methods.
12633         (dwarf_decode_lines_1): Adjust to use line_header methods.
12634         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12635         use std::vector.
12636
12637 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
12638
12639         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12640         instead of struct ptid.
12641
12642 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
12643
12644         * frame.c (get_frame_register_bytes): Unwind using value.
12645         (put_frame_register_bytes): Likewise.
12646
12647 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
12648
12649         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12650         aggregate-like.
12651
12652 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
12653
12654         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12655
12656 2017-03-29  Yao Qi  <yao.qi@linaro.org>
12657
12658         * gdbthread.h (struct thread_info): Declare constructor and
12659         destructor.  Add some in-class member initializers.
12660         * thread.c (free_thread): Remove.
12661         (init_thread_list): Call delete instead of free_thread.
12662         (new_thread): Call thread_info constructor.
12663         (thread_info::thread_info): New function.
12664         (thread_info::~thread_info): New function.
12665         (delete_thread_1): Call delete instead of free_thread.
12666         (make_cleanup_restore_current_thread): Move tp and frame to
12667         inner block.
12668
12669 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12670
12671         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12672         (arc_skip_prologue): Likewise.
12673         (arc_make_frame_cache): Likewise.
12674         (arc_pv_get_operand): New function.
12675         (arc_is_in_prologue): Likewise.
12676         (arc_analyze_prologue): Likewise.
12677         (arc_print_frame_cache): Likewise.
12678         (MAX_PROLOGUE_LENGTH): New constant.
12679
12680 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12681
12682         * configure.tgt: Add arc-insn.o.
12683         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12684         (dump_arc_instruction_command): New function.
12685         (arc_fprintf_disasm): Likewise.
12686         (arc_disassemble_info): Likewise.
12687         (arc_insn_get_operand_value): Likewise.
12688         (arc_insn_get_operand_value_signed): Likewise.
12689         (arc_insn_get_memory_base_reg): Likewise.
12690         (arc_insn_get_memory_offset): Likewise.
12691         (arc_insn_get_branch_target): Likewise.
12692         (arc_insn_dump): Likewise.
12693         (arc_insn_get_linear_next_pc): Likewise.
12694         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12695         (arc_disassemble_info): Likewise.
12696         (arc_insn_get_branch_target): Likewise.
12697         (arc_insn_get_linear_next_pc): Likewise.
12698         * NEWS: Mention new "maint print arc arc-instruction".
12699
12700 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12701
12702         * arc-tdep (maintenance_print_arc_list): New variable.
12703         (maintenance_print_arc_command): New function.
12704
12705 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12706
12707         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12708         Add "limm" and "reserved".
12709         (arc_cannot_fetch_register, arc_cannot_store_register): Add
12710         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12711         * arc-tdep.h (arc_regnum): Likewise.
12712
12713 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12714
12715         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12716         for THREADPTR register.
12717         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12718         register.
12719         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12720         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12721         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12722
12723 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12724
12725         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12726         registers above gdbarch_num_regs (gdbarch) as privileged in
12727         call0 ABI.
12728
12729 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12730
12731         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12732         for a single specified register or for all registers in
12733         a0_base..a0_base + C0_NREGS range.
12734         (supply_gregset_reg): Call regcache_raw_supply for a single
12735         specified register or for all registers in a0_base..a0_base +
12736         C0_NREGS range.
12737
12738 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12739
12740         * arch/xtensa.h (C0_NREGS): Add definition.
12741         * xtensa-tdep.c (C0_NREGS): Remove definition.
12742
12743 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12744
12745         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
12746         Drop xtensa_default_isa initialization.
12747         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
12748
12749 2017-03-27  Pedro Alves  <palves@redhat.com>
12750
12751         * dwarf2read.c (file_entry) <dir_index>: Add comment.
12752         (file_entry::include_dir): New method.
12753         (line_header::include_dir_at, line_header::file_name_at): New
12754         methods.
12755         (setup_type_unit_groups, setup_type_unit_groups)
12756         (psymtab_include_file_name): Simplify using the new methods.
12757         (lnp_state_machine) <the_line_header>: New field.
12758         <file>: Add comment.
12759         (lnp_state_machine::current_file): New method.
12760         (dwarf_record_line): Simplify using the new methods.
12761         (init_lnp_state_machine): Initialize the "the_line_header" field.
12762         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
12763         Simplify using the new methods.
12764
12765 2017-03-27  Pedro Alves  <palves@redhat.com>
12766
12767         * cp-name-parser.y (make_empty): Delete.
12768         (demangler_special, nested_name, ptr_operator, array_indicator)
12769         (direct_declarator, declarator_1): Use fill_comp instead of
12770         make_empty.
12771
12772 2017-03-27  Pedro Alves  <palves@redhat.com>
12773
12774         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
12775         to ATTRIBUTE_PRINTF.
12776         * solib-target.c (library_list_start_list): Print "string" not
12777         "version".
12778         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
12779         gdb_xml_error call.
12780
12781 2017-03-27  Pedro Alves  <palves@redhat.com>
12782
12783         * dwarf2read.c (struct file_and_directory): New.
12784         (dwarf2_get_dwz_file): Adjust to use std::string.
12785         (dw2_get_file_names_reader): Adjust to use file_and_directory.
12786         (find_file_and_directory): Adjust to return a file_and_directory
12787         object.
12788         (read_file_scope): Adjust to use file_and_directory.  Remove
12789         make_cleanup/do_cleanups calls.
12790         (open_and_init_dwp_file): Adjust to use std::string.  Remove
12791         make_cleanup/do_cleanups calls.
12792         * python/python.c (do_start_initialization): Adjust to ldirname
12793         returning a std::string.
12794         * utils.c (ldirname): Now returns a std::string.
12795         * utils.h (ldirname): Change return type to std::string.
12796         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
12797         returning a std::string.
12798         * xml-tdesc.c (file_read_description_xml): Likewise.
12799
12800 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
12801
12802         * regcache.c (regcache_debug_print_register): New function.
12803         * regcache.h (regcache_debug_print_register): New declaration.
12804         * target.c (debug_print_register): Remove.
12805         (target_fetch_registers): Call regcache_debug_print_register.
12806         (target_store_registers): Likewise.
12807
12808 2017-03-24  Pádraig Brady  <pbrady@fb.com>
12809
12810         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
12811         reference beyond the 'lh->include_dirs' array before accessing to
12812         it.
12813         (psymtab_include_file_name): Likewise.
12814         (dwarf_decode_lines_1): Likewise.
12815         (dwarf_decode_lines): Likewise.
12816         (file_file_name): Likewise.
12817
12818 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
12819
12820         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
12821         inferior_ptid.
12822         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12823         ps_lsetfpregs): Likewise.
12824         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
12825         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12826         ps_lsetfpregs): Likewise.
12827         * target.c (target_fetch_registers, target_store_registers):
12828         Remove asserts.
12829
12830 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
12831
12832         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
12833
12834 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12835
12836         * aarch64-tdep.c (aarch64_process_record_test): Declare.
12837         (_initialize_aarch64_tdep): Register it.
12838         (aarch64_record_load_store): Handle PRFM instruction.
12839         (aarch64_process_record_test): New function.
12840
12841 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12842
12843         * aarch64-tdep.c (aarch64_record_load_store): Fix code
12844         indentation.
12845
12846 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12847
12848         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
12849
12850 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12851
12852         python/python.c (do_start_initialization): Fix memory leak.
12853
12854 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12855
12856         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
12857         using get_ptrace_pid.
12858         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12859         inferior_ptid.
12860         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12861         inferior_ptid instead of pid.
12862
12863 2017-03-22  Yao Qi  <yao.qi@linaro.org>
12864
12865         * aarch64-tdep.c: Wrap locally used classes in anonymous
12866         namespace.
12867         * arm-tdep.c: Likewise.
12868         * linespec.c: Likewise.
12869         * ui-out.c: Likewise.
12870
12871 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
12872
12873         PR gdb/19637
12874         * python/lib/gdb/printer/bound_registers.py: Import sys.
12875
12876 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12877
12878         * windows-nat.c (do_windows_fetch_inferior_registers): Add
12879         windows_thread_info parameter and use it instead of
12880         current_thread.
12881         (windows_fetch_inferior_registers): Don't set current_thread,
12882         pass the thread to do_windows_fetch_inferior_registers.  Use
12883         ptid from regcache instead of inferior_ptid.
12884         (do_windows_store_inferior_registers): Add windows_thread_info
12885         parameter and use it instead of current_thread.
12886         (windows_store_inferior_registers): Don't set current_thread,
12887         pass the thread to do_windows_store_inferior_registers.  Use
12888         ptid from regcache instead of inferior_ptid.
12889
12890 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12891
12892         * ser-mingw.c (ser_windows_raw): Remove reference to
12893         struct serial::current_timeout.
12894
12895 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
12896
12897         PR tdep/20928
12898         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
12899         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
12900         (sparc64_fsr_type): Fix %fsr decoding.
12901
12902 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
12903
12904         * python/py-record-btrace.c (btpy_insn_data): Change return type
12905         for Python 2.
12906
12907 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12908
12909         * spu-linux-nat.c (spu_fetch_inferior_registers,
12910         spu_store_inferior_registers): Use ptid from regcache, set and
12911         restore inferior_ptid.
12912         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
12913         Likewise.
12914
12915 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12916
12917         * i386-linux-nat.c (fetch_register, store_register,
12918         i386_linux_fetch_inferior_registers,
12919         i386_linux_store_inferior_registers): Use ptid from regcache.
12920         * ia64-linux-nat.c (ia64_linux_fetch_register,
12921         ia64_linux_store_register): Likewise.
12922         * inf-ptrace.c (inf_ptrace_fetch_register,
12923         inf_ptrace_store_register): Likewise.
12924         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
12925         m32r_linux_store_inferior_registers): Likewise.
12926         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
12927         m68kbsd_store_inferior_registers): Likewise.
12928         * m68k-linux-nat.c (fetch_register, store_register,
12929         m68k_linux_fetch_inferior_registers,
12930         m68k_linux_store_inferior_registers): Likewise.
12931         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
12932         m88kbsd_store_inferior_registers): Likewise.
12933         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
12934         mips_fbsd_store_inferior_registers): Likewise.
12935         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
12936         mips64_linux_regsets_store_registers): Likewise.
12937         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
12938         mipsnbsd_store_inferior_registers): Likewise.
12939         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
12940         mips64obsd_store_inferior_registers): Likewise.
12941         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
12942         Likewise.
12943         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
12944         ppcfbsd_store_inferior_registers): Likewise.
12945         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
12946         ppc_linux_store_inferior_registers): Likewise.
12947         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
12948         ppcnbsd_store_inferior_registers): Likewise.
12949         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
12950         ppcobsd_store_registers): Likewise.
12951         * procfs.c (procfs_fetch_registers, procfs_store_registers):
12952         Likewise.
12953         * ravenscar-thread.c (ravenscar_fetch_registers,
12954         ravenscar_store_registers, ravenscar_prepare_to_store):
12955         Likewise.
12956         * record-btrace.c (record_btrace_fetch_registers,
12957         record_btrace_store_registers, record_btrace_prepare_to_store):
12958         Likewise.
12959         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
12960         Lookup inferior using ptid from regcache, instead of
12961         current_inferior.
12962         * remote.c (remote_fetch_registers, remote_store_registers): Use
12963         ptid from regcache.
12964         * rs6000-nat.c (fetch_register, store_register): Likewise.
12965         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
12966         s390_linux_store_inferior_registers): Likewise.
12967         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
12968         shnbsd_store_inferior_registers): Likewise.
12969         * sol-thread.c (sol_thread_fetch_registers,
12970         sol_thread_store_registers): Likewise.
12971         * sparc-nat.c (sparc_fetch_inferior_registers,
12972         sparc_store_inferior_registers): Likewise.
12973         * tilegx-linux-nat.c (fetch_inferior_registers,
12974         store_inferior_registers): Likewise.
12975         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
12976         vaxbsd_store_inferior_registers): Likewise.
12977         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
12978         store_xtregs): Likewise.
12979
12980 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12981
12982         PR gdb/14441
12983         * NEWS: Mention support for rvalue references in GDB and python.
12984         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
12985         supports both lvalue and rvalue references.
12986
12987 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12988
12989         PR gdb/14441
12990         * gdbtypes.c (rank_one_type): Implement overloading
12991         resolution rules regarding rvalue references.
12992
12993 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12994
12995         PR gdb/14441
12996         * aarch64-tdep.c (aarch64_type_align)
12997         (aarch64_extract_return_value, aarch64_store_return_value): Change
12998         lvalue reference type checks to general reference type checks.
12999         * amd64-tdep.c (amd64_classify): Likewise.
13000         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13001         Likewise.
13002         * arm-tdep.c (arm_type_align, arm_extract_return_value)
13003         (arm_store_return_value): Likewise.
13004         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13005         * c-typeprint.c (c_print_type): Likewise.
13006         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13007         (cplus_number_of_children, cplus_describe_child): Likewise.
13008         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13009         * completer.c (expression_completer): Likewise.
13010         * cp-support.c (make_symbol_overload_list_adl_namespace):
13011         Likewise.
13012         * darwin-nat-info.c (info_mach_region_command): Likewise.
13013         * dwarf2loc.c (entry_data_value_coerce_ref)
13014         (value_of_dwarf_reg_entry): Likewise.
13015         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13016         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13017         Likewise.
13018         * findvar.c (extract_typed_address, store_typed_address):
13019         Likewise.
13020         * gdbtypes.c (rank_one_type): Likewise.
13021         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13022         * infcall.c (value_arg_coerce): Likewise.
13023         * language.c (pointer_type): Likewise.
13024         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13025         Likewise.
13026         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13027         * mn10300-tdep.c (mn10300_type_align): Likewise.
13028         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13029         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13030         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13031         Likewise.
13032         * printcmd.c (print_formatted, x_command): Likewise.
13033         * python/py-type.c (typy_get_composite, typy_template_argument):
13034         Likewise.
13035         * python/py-value.c (valpy_referenced_value)
13036         (valpy_get_dynamic_type, value_has_field): Likewise.
13037         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13038         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13039         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13040         * spu-tdep.c (spu_scalar_value_p): Likewise.
13041         * symtab.c (lookup_symbol_aux): Likewise.
13042         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13043         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13044         Likewise.
13045         * valops.c (value_cast_pointers, value_cast)
13046         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13047         (value_struct_elt, value_struct_elt_bitpos)
13048         (value_find_oload_method_list, find_overload_match)
13049         (value_rtti_indirect_type): Likewise.
13050         * valprint.c (val_print_scalar_type_p, generic_val_print):
13051         Likewise.
13052         * value.c (value_actual_type, value_as_address, unpack_long)
13053         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13054         (coerce_ref): Likewise.
13055         * varobj.c (varobj_get_value_type): Likewise.
13056
13057 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13058
13059         PR gdb/14441
13060         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13061         table of constants.
13062         * python/lib/gdb/command/explore.py: Support exploring values
13063         of rvalue reference types.
13064         * python/lib/gdb/types.py: Implement get_basic_type() for
13065         rvalue reference types.
13066         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13067         constant.
13068         * python/py-value.c (valpy_getitem): Add an rvalue reference
13069         check.
13070         (valpy_reference_value): Add new parameter "refcode".
13071         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13072         New wrappers for valpy_reference_value().
13073         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13074         (gdbpy_invoke_xmethod): Likewise.
13075
13076 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13077
13078         PR gdb/14441
13079         * dwarf2read.c (process_die, read_type_die_1): Handle the
13080         DW_TAG_rvalue_reference_type DIE.
13081         (read_tag_reference_type): Add new parameter "refcode".
13082
13083 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13084
13085         PR gdb/14441
13086         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13087         (c_type_print_modifier, c_type_print_varspec_suffix)
13088         (c_type_print_base): Support printing rvalue reference types.
13089         * c-valprint.c (c_val_print, c_value_print): Support printing
13090         rvalue reference values.
13091
13092 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13093
13094         PR gdb/14441
13095         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13096         typename.
13097         * cp-support.c (replace_typedefs): Handle
13098         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13099         * python/py-type.c (typy_lookup_type): Likewise.
13100
13101 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13102
13103         PR gdb/14441
13104         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13105         * parse.c (insert_type): Change assert statement.
13106         (follow_types): Handle rvalue reference types.
13107         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13108         constant.
13109
13110 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13111
13112         PR gdb/14441
13113         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13114         value_ref() interface.
13115         * c-valprint.c (c_value_print): Likewise.
13116         * infcall.c (value_arg_coerce): Likewise.
13117         * python/py-value.c (valpy_reference_value): Likewise.
13118         * valops.c (value_cast, value_reinterpret_cast)
13119         (value_dynamic_cast, typecmp): Likewise.
13120         (value_ref): Parameterize by kind of return value reference type.
13121         * value.h (value_ref): Add new parameter "refcode".
13122
13123 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13124
13125         PR gdb/14441
13126         * dwarf2read.c (read_tag_reference_type): Use
13127         lookup_lvalue_reference_type() instead of lookup_reference_type().
13128         * eval.c (evaluate_subexp_standard): Likewise.
13129         * f-exp.y: Likewise.
13130         * gdbtypes.c (make_reference_type, lookup_reference_type):
13131         Generalize with rvalue reference types.
13132         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13133         convenience wrappers for lookup_reference_type().
13134         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13135         reference kind parameter.
13136         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13137         wrappers for lookup_reference_type().
13138         * guile/scm-type.c (gdbscm_type_reference): Use
13139         lookup_lvalue_reference_type() instead of lookup_reference_type().
13140         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13141         * parse.c (follow_types): Likewise.
13142         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13143         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13144         Likewise.
13145         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13146         (gdbpy_invoke_xmethod): Likewise.
13147         * stabsread.c: Provide extra argument to make_reference_type()
13148         call.
13149         * valops.c (value_ref, value_rtti_indirect_type): Use
13150         lookup_lvalue_reference_type() instead of lookup_reference_type().
13151
13152 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13153
13154         PR gdb/14441
13155         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13156         (TYPE_IS_REFERENCE): New macro.
13157         (struct type): Add rvalue_reference_type field.
13158         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13159
13160 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13161
13162         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13163         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13164         New function definition.
13165         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13166         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13167         New function declaration.
13168         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13169         * mi/mi-interp.h: New file.
13170         * solib.c (info_sharedlibrary_command): Replace for loop with
13171         ALL_SO_LIBS macro
13172         * solib.h (update_solib_list): New function declaration.
13173         (so_list_head): Move macro.
13174         * solist.h (ALL_SO_LIBS): New macro.
13175
13176 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13177
13178         * infcmd.c (post_create_inferior): Remove unused argument in
13179         call to solib_add.
13180         * remote.c (remote_start_remote): Likewise.
13181         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13182         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13183         (enable_break): Likewise.
13184         * solib.c (update_solib_list): Remove unused target argument
13185         and its documentation.
13186         (solib_add): Remove unused target argument.  Remove unused
13187         argument in call to update_solib_list.
13188         (info_sharedlibrary_command): Remove unused argument in call
13189         to update_solib_list.
13190         (sharedlibrary_command): Remove unused argument in call to
13191         solib_add.
13192         (handle_solib_event): Likewise.
13193         (reload_shared_libraries): Likewise.
13194         * solib.h (solib_add): Remove unused target argument.
13195
13196 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13197
13198         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13199         (s390_displaced_step_fixup): Cover relative branches with the
13200         default fixup handling.  This fixes lack of support for some
13201         relative branch instructions.
13202
13203 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13204
13205         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13206         ptid from regcache.
13207
13208 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13209
13210         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13211         i386_darwin_store_inferior_registers): Use ptid from regcache.
13212
13213 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13214
13215         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13216         i386bsd_store_inferior_registers): Use ptid from regcache.
13217
13218 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13219
13220         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13221         hppaobsd_store_registers): Use ptid from regcache.
13222
13223 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13224
13225         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13226         hppanbsd_store_registers): Use ptid from regcache.
13227
13228 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13229
13230         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13231         from regcache.  Use get_ptrace_pid.
13232
13233 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13234
13235         * corelow.c (get_core_register_section): Use ptid from regcache,
13236         update doc.
13237
13238 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13239
13240         * bsd-uthread.c (bsd_uthread_fetch_registers,
13241         bsd_uthread_store_registers): Use ptid from regcache, set and
13242         restore inferior_ptid.
13243
13244 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13245
13246         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13247         fetch_fp_regs, store_register, store_regs, store_fp_register,
13248         store_fp_regs): Use ptid from regcache.
13249
13250 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13251
13252         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13253         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13254         store_vfp_regs): Use ptid from regcache.
13255
13256 2017-03-17  Pedro Alves  <palves@redhat.com>
13257
13258         PR remote/21188
13259         * ser-base.c (ser_base_wait_for): Add comment.
13260         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13261         version.
13262         * ser-unix.c (hardwire_raw): Remove reference to
13263         scb->current_timeout.
13264         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13265         (hardwire_ops): Install ser_base_readchar instead of
13266         hardwire_readchar.
13267         * serial.h (struct serial) <current_timeout, timeout_remaining>:
13268         Remove fields.
13269
13270 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
13271
13272         PR gdb/19637
13273         * python/lib/gdb/printer/bound_registers.py: Add support for
13274         Python 3.
13275
13276 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13277
13278         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13279         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13280         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13281         byte_offset to subobj_byte_offset.  Fix the handling of
13282         DWARF_VALUE_STACK on big-endian targets when coming via an
13283         implicit pointer.
13284         (dwarf2_evaluate_loc_desc): Adjust call to
13285         dwarf2_evaluate_loc_desc_full.
13286         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13287         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13288
13289 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13290
13291         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13292         and REVSH instructions.
13293
13294 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13295
13296         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13297         (arm_record_test): Declare.
13298         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13299         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13300         align with the manual.
13301         (thumb_record_misc): Adjust the code order to align with the
13302         manual.
13303         (thumb2_record_decode_insn_handler): Fix instruction matching.
13304         (instruction_reader_thumb): New class.
13305         (arm_record_test): New function.
13306
13307 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13308
13309         * arm-tdep.c (abstract_memory_reader): New class.
13310         (instruction_reader): New class.
13311         (extract_arm_insn): Add argument 'reader'.  Callers updated.
13312         (decode_insn): Likewise.
13313
13314 2017-03-16  Doug Evans  <dje@google.com>
13315
13316         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13317         member.  Change type of TYPE member to SCM.  All uses updated.
13318         (lsscm_make_lazy_string_smob): Add assert.
13319         (lsscm_make_lazy_string): Flag bad length values.
13320         (lsscm_elt_type): New function.
13321         (gdbscm_lazy_string_to_value): Rewrite to use
13322         lsscm_safe_lazy_string_to_value.
13323         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13324         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13325         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
13326         in incoming type.
13327         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13328         * guile/scm-type.c (tyscm_scm_to_type): New function.
13329
13330 2017-03-15  Doug Evans  <dje@google.com>
13331
13332         PR python/17728, python/18439, python/18779
13333         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13334         member.  Change type of TYPE member to PyObject *.  All uses updated.
13335         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13336         (gdbpy_create_lazy_string_object): Flag bad length values.
13337         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13338         Handle typedefs in incoming type.
13339         (stpy_lazy_string_elt_type): New function.
13340         (gdbpy_extract_lazy_string): Call it.
13341         * python/py-value.c (valpy_lazy_string): Flag bad length values.
13342         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
13343         typedefs in incoming type.
13344
13345 2017-03-16  Doug Evans  <dje@google.com>
13346
13347         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13348         * guile/scm-type.c (tyscm_scm_to_type): New function.
13349
13350 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
13351
13352         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13353         "ULONGEST" for "skip".
13354
13355 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13356
13357         PR gdb/21220
13358         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13359         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13360         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
13361         over ptrace peek/poke until end of buffer or error.
13362
13363 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
13364
13365         * parse.c (length_of_subexp): Make static.
13366         * parser-defs.h (length_of_subexp): Remove.
13367
13368 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13369
13370         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13371         as well.
13372
13373 2017-03-14  Pedro Alves  <palves@redhat.com>
13374
13375         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13376         (main): Use std::unique_ptr.  Remove calls to
13377         cp_demangled_name_parse_free.
13378
13379 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13380
13381         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13382         alphabsd_store_inferior_registers): Use regcache->ptid instead
13383         of inferior_ptid.
13384
13385 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13386
13387         * aix-thread.c (aix_thread_fetch_registers,
13388         aix_thread_store_registers): Use regcache->ptid instead of
13389         inferior_ptid.
13390
13391 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13392
13393         * aarch64-linux-nat.c (fetch_gregs_from_thread,
13394         store_gregs_to_thread, fetch_fpregs_from_thread,
13395         store_fpregs_to_thread): Use regcache->ptid instead of
13396         inferior_ptid.
13397
13398 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13399
13400         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13401         amd64_linux_fetch_inferior_registers): Use regcache->ptid
13402         instead of inferior_ptid.
13403
13404 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13405
13406         * target.c (target_fetch_registers, target_store_registers): Add
13407         assert.
13408
13409 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13410
13411         * regcache.h (regcache_get_ptid): New function.
13412         * regcache.c (regcache_get_ptid): New function.
13413
13414 2017-03-13  Mark Wielaard  <mark@klomp.org>
13415
13416         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13417
13418 2017-03-10  Keith Seitz  <keiths@redhat.com>
13419
13420         PR c++/8218
13421         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13422
13423 2017-03-08  Pedro Alves  <palves@redhat.com>
13424
13425         PR gdb/18360
13426         * infrun.c (start_step_over, do_target_resume, resume)
13427         (restart_threads): Assert we're not resuming a thread that is
13428         meant to be stopped.
13429         (infrun_thread_stop_requested_callback): Delete.
13430         (infrun_thread_stop_requested): If the thread is internally
13431         stopped, queue a pending stop event and clear the thread's
13432         inline-frame state.
13433         (handle_stop_requested): New function.
13434         (handle_syscall_event, handle_inferior_event_1): Use
13435         handle_stop_requested.
13436         (handle_stop_requested): New function.
13437         (handle_signal_stop): Set the thread's stop_signal here instead of
13438         at caller.
13439         (finish_step_over): Clear step over info unconditionally.
13440         (handle_signal_stop): If the user had interrupted the event
13441         thread, consider the stop a random signal.
13442         (handle_signal_stop) <signal arrived while stepping over
13443         breakpoint>: Don't restart threads here.
13444         (stop_waiting): Don't clear step-over info here.
13445
13446 2017-03-08  Pedro Alves  <palves@redhat.com>
13447
13448         PR 21206
13449         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13450         goes to argument 2, not 1.
13451
13452 2017-03-08  Pedro Alves  <palves@redhat.com>
13453
13454         PR cli/21218
13455         * top.c (gdb_readline_wrapper): Avoid passing NULL to
13456         display_gdb_prompt.
13457         (command_line_input): Add comment.
13458
13459 2017-03-08  Pedro Alves  <palves@redhat.com>
13460
13461         PR tui/21216
13462         * tui/tui-file.c (tui_file::write): New.
13463         * tui/tui-file.h (tui_file): Override "write".
13464         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13465         factored out from ...
13466         (tui_puts): ... here.
13467         (tui_putc): Use them.
13468         (tui_write): New function.
13469         * tui/tui-io.h (tui_write): Declare.
13470
13471 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
13472
13473         * Makefile.in (SFILES): Replace "environ.c" with
13474         "common/environ.c".
13475         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13476         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
13477         to...
13478         * common/environ.c: ... here.
13479         * environ.h: Moved to...
13480         * common/environ.h: ... here.
13481
13482 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13483
13484         * gdbarch.sh (pstring_ptr): New static function.
13485         (gdbarch_disassembler_options): Use it.
13486         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13487         not valid_disassembler_option->name.
13488         * gdbarch.c: Regenerate.
13489
13490 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13491
13492         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13493
13494 2017-03-07  Pedro Alves  <palves@redhat.com>
13495
13496         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13497
13498 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13499
13500         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13501         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13502         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13503         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13504
13505 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
13506
13507         * xtensa-linux-nat.c (fetch_gregs): Remove const.
13508
13509 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
13510
13511         * remote.c (remote_add_target_side_commands): Use range-based
13512         for loop.
13513
13514 2017-03-03  Yao Qi  <yao.qi@linaro.org>
13515
13516         PR gdb/21165
13517         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13518         value is lazy.
13519         * valprint.c (common_val_print): Likewise.
13520
13521 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
13522
13523         * NEWS: Mention new set/show disassembler-options commands.
13524         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13525         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13526         (prospective_options): New static variable.
13527         (gdb_disassembler::gdb_disassembler): Initialize
13528         m_di.disassembler_options.
13529         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13530         (get_disassembler_options): New function.
13531         (set_disassembler_options): Likewise.
13532         (set_disassembler_options_sfunc): Likewise.
13533         (show_disassembler_options_sfunc): Likewise.
13534         (disassembler_options_completer): Likewise.
13535         (_initialize_disasm): Likewise.
13536         * disasm.h (get_disassembler_options): New prototype.
13537         (set_disassembler_options): Likewise.
13538         * gdbarch.sh (gdbarch_disassembler_options): New variable.
13539         (gdbarch_verify_disassembler_options): Likewise.
13540         * gdbarch.c: Regenerate.
13541         * gdbarch.h: Likewise.
13542         * arm-tdep.c (num_disassembly_options): Delete.
13543         (set_disassembly_style): Likewise.
13544         (arm_disassembler_options): New static variable.
13545         (set_disassembly_style_sfunc): Convert short style name into long
13546         option name.  Call set_disassembler_options.
13547         (show_disassembly_style_sfunc): New function.
13548         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13549         set_gdbarch_verify_disassembler_options.
13550         (_initialize_arm_tdep): Delete regnames variable and update callers.
13551         (arm_disassembler_options): Initialize.
13552         (disasm_options): New variable.
13553         (num_disassembly_options): Rename from this...
13554         (num_disassembly_styles): ...to this.  Compute by scanning through
13555         disasm_options.
13556         (valid_disassembly_styles): Initialize using disasm_options.
13557         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13558         set_arm_regname_option.
13559         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13560         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13561         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13562         set_gdbarch_verify_disassembler_options.
13563         * s390-tdep.c (s390_disassembler_options): New static variable.
13564         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13565         set_gdbarch_verify_disassembler_options.
13566
13567 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13568
13569         * remote.c (remote_add_target_side_condition): Remove "struct"
13570         keyword from range-based for loop.
13571
13572 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13573
13574         * remote.c (remote_add_target_side_condition): Use range-based
13575         for loop.  Update comment.
13576
13577 2017-02-27  Yao Qi  <yao.qi@linaro.org>
13578
13579         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13580
13581 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
13582
13583         * regcache.c (regcache_raw_update): New function.
13584         (regcache_raw_read): Move code to regcache_raw_update.
13585         * regcache.h (regcache_raw_update): New declaration.
13586         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13587
13588 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
13589
13590         * dwarf2read.c (create_debug_type_hash_table): Initialize
13591         header.signature and header.type_offset_in_tu.
13592
13593 2017-02-24  Pedro Alves  <palves@redhat.com>
13594
13595         * symtab.c (make_file_symbol_completion_list_1): Use
13596         add_symtab_completions.
13597
13598 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13599
13600         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13601
13602 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13603
13604         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13605         I386_MAX_REGISTER_SIZE.
13606         (i386_pseudo_register_write): Likewise.
13607         (i386_process_record): Likewise.
13608         * i387-tdep.c (i387_supply_xsave): Likewise.
13609         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13610         (store_register): Likewise.
13611
13612 2017-02-23  Pedro Alves  <palves@redhat.com>
13613
13614         * ada-lang.c: Include "common/function-view.h".
13615         (ada_iterate_over_symbols): Adjust to use function_view as
13616         callback type.
13617         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13618         (ada_make_symbol_completion_list): Use a lambda.
13619         (ada_exc_search_name_matches): Delete.
13620         (name_matches_regex): New.
13621         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13622         * compile/compile-c-support.c: Include "common/function-view.h".
13623         (print_one_macro): Change prototype to accept a ui_file pointer.
13624         (write_macro_definitions): Use a lambda.
13625         * dwarf2read.c: Include "common/function-view.h".
13626         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13627         (dw2_expand_symtabs_matching): Adjust to use function_view as
13628         callback type.
13629         * language.h: Include "common/function-view.h".
13630         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13631         function_view as callback type.
13632         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13633         * linespec.c: Include "common/function-view.h".
13634         (collect_info::add_symbol): New method.
13635         (struct symbol_and_data_callback, iterate_inline_only, struct
13636         symbol_matcher_data, iterate_name_matcher): Delete.
13637         (iterate_over_all_matching_symtabs): Adjust to use function_view
13638         as callback type and lambdas.
13639         (iterate_over_file_blocks): Adjust to use function_view as
13640         callback type.
13641         (decode_compound_collector): Now a class with private fields.
13642         (decode_compound_collector::release_symbols): New method.
13643         (collect_one_symbol): Rename to...
13644         (decode_compound_collector::operator()): ... this and adjust.
13645         (lookup_prefix_sym): decode_compound_collector construction bits
13646         move to decode_compound_collector ctor.  Pass the
13647         decode_compound_collector object directly as callback.  Remove
13648         cleanups and use decode_compound_collector::release_symbols
13649         instead.
13650         (symtab_collector): Now a class with private fields.
13651         (symtab_collector::release_symtabs): New method.
13652         (add_symtabs_to_list): Rename to...
13653         (symtab_collector::operator()): ... this and adjust.
13654         (collect_symtabs_from_filename): symtab_collector construction
13655         bits move to symtab_collector ctor.  Pass the symtab_collector
13656         object directly as callback.  Remove cleanups and use
13657         symtab_collector::release_symtabs instead.
13658         (collect_symbols): Delete.
13659         (add_matching_symbols_to_info): Use lambdas.
13660         * macrocmd.c (print_macro_callback): Delete.
13661         (info_macro_command): Use a lambda.
13662         (info_macros_command): Pass print_macro_definition as callable
13663         directly.
13664         (print_one_macro): Remove 'ignore' parameter.
13665         (macro_list_command): Adjust.
13666         * macrotab.c (macro_for_each_data::fn): Now a function_view.
13667         (macro_for_each_data::user_data): Delete field.
13668         (foreach_macro): Adjust to call the function_view.
13669         (macro_for_each): Adjust to use function_view as callback type.
13670         (foreach_macro_in_scope): Adjust to call the function_view.
13671         (macro_for_each_in_scope): Adjust to use function_view as callback
13672         type.
13673         * macrotab.h: Include "common/function-view.h".
13674         (macro_callback_fn): Declare a prototype instead of a pointer.
13675         Remove "user_data" parameter.
13676         (macro_for_each, macro_for_each_in_scope): Adjust to use
13677         function_view as callback type.
13678         * psymtab.c (partial_map_expand_apply)
13679         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13680         Adjust to use function_view as callback type and to return bool.
13681         (psym_expand_symtabs_matching): Adjust to use function_view as
13682         callback types.
13683         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13684         to use function_view as callback type and to return bool.
13685         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13686         callback types.
13687         * symfile.c (expand_symtabs_matching): Adjust to use function_view
13688         as callback types.
13689         * symfile.h: Include "common/function-view.h".
13690         (expand_symtabs_file_matcher_ftype)
13691         (expand_symtabs_symbol_matcher_ftype)
13692         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13693         return bool.
13694         (quick_symbol_functions::map_symtabs_matching_filename)
13695         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13696         function_view as callback type and return bool.
13697         (expand_symtabs_matching): Adjust to use function_view as callback
13698         type.
13699         (maintenance_expand_name_matcher)
13700         (maintenance_expand_file_matcher): Delete.
13701         (maintenance_expand_symtabs): Use lambdas.
13702         * symtab.c (iterate_over_some_symtabs): Adjust to use
13703         function_view as callback types and return bool.
13704         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
13705         of a cleanup.
13706         (lookup_symtab_callback): Delete.
13707         (lookup_symtab): Use a lambda.
13708         (iterate_over_symbols): Adjust to use function_view as callback
13709         type.
13710         (struct search_symbols_data, search_symbols_file_matches)
13711         (search_symbols_name_matches): Delete.
13712         (search_symbols): Use a pair of lambdas.
13713         (struct add_name_data, add_macro_name, symbol_completion_matcher)
13714         (symtab_expansion_callback): Delete.
13715         (default_make_symbol_completion_list_break_on_1): Use lambdas.
13716         * symtab.h: Include "common/function-view.h".
13717         (iterate_over_some_symtabs): Adjust to use function_view as
13718         callback type and return bool.
13719         (iterate_over_symtabs): Adjust to use function_view as callback
13720         type.
13721         (symbol_found_callback_ftype): Remove 'data' parameter and return
13722         bool.
13723         (iterate_over_symbols): Adjust to use function_view as callback
13724         type.
13725
13726 2017-02-23  Pedro Alves  <palves@redhat.com>
13727
13728         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
13729         (%.o) <unittests/%.c>: New pattern.
13730         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
13731         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
13732         * common/function-view.h: New file.
13733         * unittests/function-view-selftests.c: New file.
13734         * configure: Regenerate.
13735
13736 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
13737
13738         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
13739         inferior_ptid.
13740         * go32-nat.c (go32_thread_alive): Likewise.
13741
13742 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13743
13744         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
13745         delete.
13746
13747 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13748
13749         * varobj.c (varobj_clear_saved_item): Use delete instead of
13750         xfree.
13751         (update_dynamic_varobj_children): Likewise.
13752
13753 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13754
13755         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
13756
13757 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
13758
13759         * common/enum-flags.h (enum_flags::enum_flags): Initialize
13760         m_enum_value to 0 in default constructor.
13761
13762 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
13763
13764         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
13765         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
13766         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
13767         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
13768         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
13769         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
13770         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
13771         IS_STORE_CONDITIONAL_INSN.
13772
13773 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13774
13775         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
13776
13777 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13778
13779         * NEWS (Changes since GDB 7.12): Add DWARF-5.
13780
13781 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13782
13783         * dwarf2read.c (skip_one_die, read_attribute_value)
13784         (dwarf2_const_value_attr, dump_die_shallow)
13785         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
13786         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
13787
13788 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13789
13790         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
13791         (dwarf_parse_macro_header): Accept DWARF version 5.
13792         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
13793
13794 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13795
13796         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
13797         DW_AT_GNU_*.
13798         * common/common-exceptions.h (enum errors): Likewise.
13799         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
13800         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
13801         (dwarf_expr_context::execute_stack_op): Likewise.
13802         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
13803         Likewise.
13804         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
13805         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
13806         (show_entry_values_debug, call_site_to_target_addr)
13807         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
13808         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
13809         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
13810         (value_of_dwarf_block_entry, indirect_pieced_value)
13811         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
13812         (disassemble_dwarf_expression): Likewise.
13813         * dwarf2read.c (process_die, inherit_abstract_dies)
13814         (read_call_site_scope): Likewise.
13815         * gdbtypes.h (struct func_type, struct call_site_parameter)
13816         (struct call_site): Likewise.
13817         * stack.c (read_frame_arg): Likewise.
13818         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
13819
13820 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13821
13822         * defs.h (read_unsigned_leb128): New declaration.
13823         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
13824         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
13825         (dwarf2_find_location_expression): Call also
13826         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
13827         * dwarf2loc.h (dwarf2_version): New declaration.
13828         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
13829         rnglists.
13830         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
13831         .debug_rnglists.
13832         (struct dwop_section_names): Add loclists_dwo.
13833         (dwop_section_names): Add .debug_loclists.dwo.
13834         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
13835         (struct dwarf2_per_cu_data): Add dwarf_version.
13836         (struct dwo_sections): Add loclists.
13837         (struct attr_abbrev): Add implicit_const.
13838         (read_indirect_line_string): New declaration.
13839         (read_unsigned_leb128): Delete declaration.
13840         (rcuh_kind): New definition.
13841         (read_and_check_comp_unit_head): Change parameter
13842         is_debug_types_section to section_kind.
13843         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
13844         (read_comp_unit_head): Change parameter abfd to section, add parameter
13845         section_kind.  Handle DWARF-5.
13846         (error_check_comp_unit_head): Accept also DWARF version 5.
13847         (read_and_check_comp_unit_head): Change parameter
13848         is_debug_types_section to section_kind.
13849         (read_and_check_type_unit_head): Delete function.
13850         (read_abbrev_offset): Handle DWARF-5.
13851         (create_debug_type_hash_table): Add parameter section_kind.  Process
13852         only DW_UT_type.  Use signature and type_offset_in_tu from struct
13853         comp_unit_head.
13854         (create_debug_types_hash_table): Update create_debug_type_hash_table
13855         caller.
13856         (create_all_type_units): Call create_debug_type_hash_table.
13857         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
13858         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13859         caller.
13860         (skip_one_die): Handle DW_FORM_implicit_const.
13861         (dwarf2_rnglists_process): New function.
13862         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13863         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13864         (read_attribute_value): Handle DW_FORM_implicit_const,
13865         DW_FORM_line_strp.
13866         (read_attribute): Handle DW_FORM_implicit_const.
13867         (read_indirect_string_at_offset_from): New function from
13868         read_indirect_string_at_offset.
13869         (read_indirect_string_at_offset): Call
13870         read_indirect_string_at_offset_from.
13871         (read_indirect_line_string_at_offset): New function.
13872         (read_indirect_string): New function comment.
13873         (read_indirect_line_string): New function.
13874         (read_unsigned_leb128): Make it global.
13875         (dwarf2_string_attr): Handle DWARF-5.
13876         (add_include_dir_stub, read_formatted_entries): New functions.
13877         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
13878         Handle DWARF-5.
13879         (per_cu_header_read_in): Update read_comp_unit_head caller.
13880         (dwarf2_version): New function.
13881         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
13882         rnglists.
13883         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
13884         fields.
13885
13886 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13887
13888         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
13889
13890 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13891
13892         * dwarf2read.c (dwarf2_ranges_process): New function from
13893         dwarf2_ranges_read.
13894         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
13895         dwarf2_ranges_process.
13896
13897 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13898
13899         * dwarf2read.c (create_debug_type_hash_table): New function from
13900         create_debug_types_hash_table.
13901         (create_debug_types_hash_table): Call create_debug_type_hash_table.
13902         (create_all_type_units, open_and_init_dwo_file): Update
13903         create_debug_types_hash_table callers.
13904
13905 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13906
13907         PR gdb/16188
13908         * fork-child.c (trace_start_error): Fix thinko.  va_end should
13909         refer to 'ap', not 'args'.
13910
13911 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13912             Pedro Alves  <palves@redhat.com>
13913
13914         PR gdb/16188
13915         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
13916         calls succeeded.
13917         * fork-child.c (trace_start_error): New function.
13918         (trace_start_error_with_name): Likewise.
13919         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
13920         * inf-ptrace.c (inf_ptrace_me): Likewise.
13921         * inferior.h (trace_start_error): New prototype.
13922         (trace_start_error_with_name): Likewise.
13923
13924 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
13925
13926         PR gdb/21164
13927         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
13928         NULL before using it.
13929         * symmisc.c (maintenance_print_symbols): Likewise.
13930         (maintenance_print_msymbols): Likewise.
13931
13932 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13933
13934         * NEWS: Add record Python bindings entry.
13935
13936 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13937
13938         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
13939         py-record-full.o.
13940         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
13941         * python/py-record-btrace.c, python/py-record-btrace.h,
13942         python/py-record-full.c, python/py-record-full.h: New file.
13943         * python/py-record.c: Add include for py-record-btrace.h and
13944         py-record-full.h.
13945         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
13946         recpy_instruction_history, recpy_function_call_history, recpy_begin,
13947         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
13948         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
13949         New definition.
13950         (gdbpy_initialize_btrace): New export.
13951         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
13952
13953 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13954
13955         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
13956         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
13957         * python/py-record.c: New file.
13958         * python/python-internal.h (gdbpy_start_recording,
13959         gdbpy_current_recording, gdpy_stop_recording,
13960         gdbpy_initialize_record): New export.
13961         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
13962         (python_GdbMethods): Add gdbpy_start_recording,
13963         gdbpy_current_recording and gdbpy_stop_recording.
13964
13965 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13966
13967         * record-btrace.c (record_btrace_record_method): New function.
13968         (init_record_btrace_ops): Initialize to_record_method.
13969         * record-full.c (record_full_record_method): New function.
13970         (init_record_full_ops, init_record_full_core_ops): Add
13971         record_full_record_method.
13972         * record.h (enum record_method): New enum.
13973         * target-debug.h (target_debug_print_enum_record_method: New define.
13974         * target-delegates.c: Regenerate.
13975         * target.c (target_record_method): New function.
13976         * target.h: Include record.h.
13977         (struct target_ops) <to_record_method>: New field.
13978         (target_record_method): New export.
13979
13980 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13981
13982         * record.h (record_start, record_stop): New export.
13983         * record.c (record_start, record_stop): New function.
13984
13985 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13986
13987         * btrace.c (btrace_fetch): Copy function call segments pointer
13988         into a vector.
13989         (btrace_clear): Clear the vector.
13990         (btrace_find_insn_by_number): Use binary search to find the correct
13991         function call segment.
13992         * btrace.h (brace_fun_p): New typedef.
13993         (struct btrace_thread_info) <functions>: New field.
13994
13995 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13996
13997         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
13998         * btrace.c (btrace_decode_error): ... here.  New function.
13999         * btrace.h (btrace_decode_error): New export.
14000
14001 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14002
14003         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14004         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14005         btrace_find_insn_by_number): Remove special case for gaps.
14006         * btrace.h (btrace_insn_get_error): New export.
14007         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14008         * record-btrace.c (btrace_insn_history): Print number for gaps.
14009         (record_btrace_info, record_btrace_goto): Handle gaps.
14010
14011 2017-02-14  Tom Tromey  <tom@tromey.com>
14012
14013         PR python/13598:
14014         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14015         event.
14016         * python/py-evts.c (gdbpy_initialize_py_events): Add
14017         before_prompt registry.
14018         * python/py-events.h (events_object) <before_prompt>: New field.
14019
14020 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
14021
14022         * btrace.c (ftrace_new_switch): Preserve up link and flags.
14023
14024 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
14025
14026         * symfile (_initialize_symfile): Add usage text to the load command's
14027         help text.
14028
14029 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
14030
14031         * utils.c (defaulted_query): Don't query on secondary UIs.
14032
14033 2017-02-10  Tom Tromey  <tom@tromey.com>
14034
14035         * rust-lang.c (rust_get_disr_info): Remove unused variable.
14036
14037 2017-02-10  Tom Tromey  <tom@tromey.com>
14038
14039         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14040         "cleanup" local.
14041         * python/py-type.c (typy_legacy_template_argument): Remove
14042         unnecessary "cleanup" local.
14043
14044 2017-02-10  Tom Tromey  <tom@tromey.com>
14045
14046         * python/python.c (do_start_initialization): New function, from
14047         _initialize_python.
14048         (_initialize_python): Call do_start_initialization.
14049         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14050         goto.
14051
14052 2017-02-10  Tom Tromey  <tom@tromey.com>
14053
14054         * python/py-prettyprint.c (pretty_print_one_value): Use
14055         gdbpy_ref.
14056
14057 2017-02-10  Tom Tromey  <tom@tromey.com>
14058
14059         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14060         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14061         gdbpy_ref.
14062         * python/py-type.c (field_new): Use gdbpy_ref.
14063         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14064         gdbpy_ref.
14065         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14066         (py_free_pspace): Likewise.
14067         (pspace_to_pspace_object): Likewise.
14068         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14069         (py_free_objfile): Likewise.
14070         (objfile_to_objfile_object): Likewise.
14071         * python/py-inferior.c (delete_thread_object): Use
14072         gdbpy_ref.
14073         (infpy_read_memory): Likewise.
14074         (py_free_inferior): Likewise.
14075         * python/py-evtregistry.c (create_eventregistry_object): Use
14076         gdbpy_ref.
14077         * python/py-event.c (create_event_object): Use gdbpy_ref.
14078
14079 2017-02-10  Tom Tromey  <tom@tromey.com>
14080
14081         * python/py-ref.h (gdbpy_ref_policy): Now a template.
14082         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14083         used.
14084         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14085         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14086         python/py-exitedevent.c, python/py-finishbreakpoint.c,
14087         python/py-framefilter.c, python/py-function.c,
14088         python/py-inferior.c, python/py-infevents.c,
14089         python/py-linetable.c, python/py-newobjfileevent.c,
14090         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14091         python/py-signalevent.c, python/py-stopevent.c,
14092         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14093         python/py-unwind.c, python/py-utils.c, python/py-value.c,
14094         python/py-varobj.c, python/py-xmethods.c, python/python.c,
14095         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14096
14097 2017-02-10  Tom Tromey  <tom@tromey.com>
14098
14099         * ui-out.h (ui_out_emit_type): New class.
14100         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14101         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14102         and ui_out_emit_tuple.
14103         (enumerate_locals): Likewise.
14104         (py_mi_print_variables, py_print_locals, py_print_args): Use
14105         ui_out_emit_list.
14106         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14107         ui_out_emit_list.
14108         * common/gdb_optional.h: New file.
14109
14110 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14111
14112         * MAINTAINERS (Write After Approval): Update my e-mail address.
14113
14114 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14115
14116         PR gdb/21122
14117         * breakpoint.c (_initialize_breakpoint): Update the help description
14118         of the 'commands' command to indicate that it takes a list argument.
14119
14120 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
14121
14122         * interps.c (current_interp_set_logging): Remove "return".
14123
14124 2017-02-09  Gary Benson  <gbenson@redhat.com>
14125
14126         * symtab.c (add_symtab_completions): Prevent NULL pointer
14127         dereference.
14128
14129 2017-02-08  Pedro Alves  <palves@redhat.com>
14130
14131         * interps.c (interp::interp): Remove reference to quiet_p.
14132         (interp_set): Make static.  Remove dead "Switching to" output
14133         code.
14134         (interp_quiet_p, interp_set_quiet): Delete.
14135         (interpreter_exec_cmd): Don't set the interpreter quiet.
14136         * interps.h (interp_quiet_p): Make static.
14137         (class interp) <quiet_p>: Remove field
14138
14139 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14140
14141         * cli/cli-decode.c (find_command_name_length): Make it extern.
14142         * cli/cli-decode.h (find_command_name_length): Declare.
14143         * cli/cli-script.c (command_name_equals, line_first_arg):
14144         New functions.
14145         (process_next_line): Use cli-decode to parse command names.
14146         (build_command_line): Make args a constant pointer.
14147
14148 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14149
14150         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14151         Remove case-insensitive search.
14152
14153 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
14154
14155         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14156         at the end of the line.  Avoids an ARI warning.
14157
14158 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
14159
14160         * NEWS: Mention support for record/replay of Intel 64 rdrand and
14161         rdseed instructions.
14162         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14163
14164 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
14165
14166         PR tdep/20936
14167         Provide and use sparc32 and sparc64 target description XML files.
14168         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14169         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14170         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14171         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14172         * features/sparc/sparc32-solaris.xml: New file.
14173         * features/sparc/sparc64-solaris.xml: New file.
14174         * features/sparc/sparc32-solaris.c: Generated.
14175         * features/sparc/sparc64-solaris.c: Generated.
14176         * sparc-tdep.h: Account for differences in target descriptions.
14177         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14178         (sparc32_register_type): Use target provided registers.
14179         (validate_tdesc_registers): New function.
14180         (sparc32_gdbarch_init): Use tdesc_has_registers.
14181         Set pseudoregister functions.
14182         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14183         (sparc64_register_type): Use target provided registers.
14184         (sparc64_init_abi): Set pseudoregister functions.
14185
14186 2017-02-03  Tom Tromey  <tom@tromey.com>
14187
14188         PR rust/21097:
14189         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14190         with a single member.
14191
14192 2017-02-03  Pedro Alves  <palves@redhat.com>
14193
14194         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14195         (cli_interp_base::~cli_interp_base): New.
14196         (cli_interp): New struct.
14197         (as_cli_interp): Cast the interp itself to cli_interp.
14198         (cli_interpreter_pre_command_loop): Rename to ...
14199         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
14200         parameter.
14201         (cli_interpreter_init): Rename to ...
14202         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
14203         boolean.  Make extern.
14204         (cli_interpreter_resume): Rename to ...
14205         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
14206         extern.
14207         (cli_interpreter_suspend): Rename to ...
14208         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
14209         extern.
14210         (cli_interpreter_exec): Rename to ...
14211         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
14212         extern.
14213         (cli_interpreter_supports_command_editing): Rename to ...
14214         (cli_interp_base::supports_command_editing): ... this.  Remove
14215         'interp' parameter.  Make extern.
14216         (cli_ui_out): Rename to ...
14217         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
14218         Make extern.
14219         (cli_set_logging): Rename to ...
14220         (cli_interp_base::set_logging): ... this.  Remove 'interp'
14221         parameter.  Make extern.
14222         (cli_interp_procs): Delete.
14223         (cli_interp_factory): Adjust to use "new".
14224         * cli/cli-interp.h: Include "interps.h".
14225         (struct cli_interp_base): New struct.
14226         * interps.c (struct interp): Delete.  Fields moved to interps.h.
14227         (interp_new): Delete.
14228         (interp::interp, interp::~interp): New.
14229         (interp_set): Use bool, and return void.  Assume the interpreter
14230         has suspend, init and resume methods, and that the all return
14231         void.
14232         (set_top_level_interpreter): interp_set returns void.
14233         (interp_ui_out): Adapt.
14234         (current_interp_set_logging): Adapt.
14235         (interp_data): Delete.
14236         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14237         (interp_exec): Adapt.
14238         (top_level_interpreter_data): Delete.
14239         * interps.h (interp_init_ftype, interp_resume_ftype)
14240         (interp_suspend_ftype, interp_exec_ftype)
14241         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14242         (class interp): New.
14243         (interp_new): Delete.
14244         (interp_set): Now returns void.  Use bool.
14245         (interp_data, top_level_interpreter_data): Delete.
14246         * mi/mi-common.h: Include interps.h.
14247         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
14248         init, resume, suspect, exec, interp_ui_out, set_logging and
14249         pre_command_loop methods.
14250         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14251         (mi_interpreter_init): Rename to ...
14252         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
14253         bool, return void and make extern.  Adjust.
14254         (mi_interpreter_resume): ... Rename to ...
14255         (mi_interp::resume): ... this.  Remove the 'data' parameter,
14256         return void and make extern.  Adjust.
14257         (mi_interpreter_suspend): ... Rename to ...
14258         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
14259         return void and make extern.  Adjust.
14260         (mi_interpreter_exec): ... Rename to ...
14261         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
14262         extern.  Adjust.
14263         (mi_interpreter_pre_command_loop): ... Rename to ...
14264         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
14265         parameter and make extern.
14266         (mi_on_normal_stop_1): Adjust.
14267         (mi_ui_out): Rename to ...
14268         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
14269         parameter and make extern.  Adjust.
14270         (mi_set_logging): Rename to ...
14271         (mi_interp::set_logging): ... this.  Remove the 'interp'
14272         parameter and make extern.  Adjust.
14273         (mi_interp_procs): Delete.
14274         (mi_interp_factory): Adjust to use 'new'.
14275         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14276         (mi_print_exception, mi_execute_command, mi_load_progress):
14277         Adjust.
14278         * tui/tui-interp.c (tui_interp): New class.
14279         (as_tui_interp): Return a tui_interp pointer.
14280         (tui_on_normal_stop, tui_on_signal_received)
14281         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14282         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14283         to use interp::interp_ui_out.
14284         (tui_init): Rename to ...
14285         (tui_interp::init): ... this.  Remove the 'self' parameter, use
14286         bool, return void and make extern.  Adjust.
14287         (tui_resume): Rename to ...
14288         (tui_interp::resume): ... this.  Remove the 'data' parameter,
14289         return void and make extern.  Adjust.
14290         (tui_suspend): Rename to ...
14291         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
14292         return void and make extern.  Adjust.
14293         (tui_ui_out): Rename to ...
14294         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
14295         parameter, and make extern.  Adjust.
14296         (tui_exec): Rename to ...
14297         (tui_interp::exec): ... this.  Remove the 'data' parameter and
14298         make extern.
14299         (tui_interp_procs): Delete.
14300         (tui_interp_factory): Use "new".
14301
14302 2017-02-02  Tom Tromey  <tom@tromey.com>
14303
14304         * rust-exp.y (ends_raw_string, space_then_number)
14305         (rust_identifier_start_p): Return bool.
14306         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14307         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14308         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14309         (rust_chartype_p): Return bool.
14310         (val_print_struct, rust_print_struct_def, rust_print_type):
14311         Update.
14312         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14313         Return bool.
14314
14315 2017-02-02  Tom Tromey  <tom@tromey.com>
14316
14317         * rust-lang.c: Reindent.
14318
14319 2017-02-02  Tom Tromey  <tom@tromey.com>
14320
14321         * rust-lang.h (rust_crate_for_block): Update.
14322         * rust-lang.c (rust_crate_for_block): Return std::string.
14323         (rust_get_disr_info): Use std:;string, not
14324         gdb::unique_xmalloc_ptr.
14325         * rust-exp.y (crate_name): Update.
14326
14327 2017-02-02  Pedro Alves  <palves@redhat.com>
14328
14329         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14330         field out of gdb_disassembler_test and make it static.
14331
14332 2017-02-02  Pedro Alves  <palves@redhat.com>
14333
14334         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14335         mi1_interp and mi_interp fields.
14336
14337 2017-02-02  Pedro Alves  <palves@redhat.com>
14338
14339         * cli/cli-interp.c (struct saved_output_files, saved_output):
14340         Moved from cli/cli-logging.c.
14341         (cli_set_logging): New function.
14342         (cli_interp_procs): Install cli_set_logging.
14343         * cli/cli-interp.h (make_logging_output, cli_set_logging):
14344         Declare.
14345         * cli/cli-logging.c (struct saved_output_files, saved_output):
14346         Moved to cli/cli-interp.c.
14347         (pop_output_files): Don't save outputs here.
14348         (make_logging_output): New function.
14349         (handle_redirections): Don't build tee nor save previous outputs
14350         here.
14351         * interps.c (current_interp_set_logging): Change prototype.
14352         Assume there's always a set_logging_proc method installed.
14353         * interps.h (interp_set_logging_ftype): Change prototype.
14354         (current_interp_set_logging): Change prototype and adjust comment.
14355         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
14356         use make_logging_output.
14357         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14358 2017-02-02  Pedro Alves  <palves@redhat.com>
14359
14360         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14361         from ...
14362         (set_logging_overwrite): ... here.
14363         (logging_no_redirect_file): Delete.
14364         (set_logging_redirect): Don't handle redirection on the fly.
14365         Instead warn that "logging off" / "logging on" is necessary.
14366         (pop_output_files): Delete references to logging_no_redirect_file.
14367         (show_logging_command): Always speak in terms of what will happen
14368         once logging is reenabled.
14369
14370 2017-02-02  Pedro Alves  <palves@redhat.com>
14371
14372         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14373
14374 2017-02-02  Pedro Alves  <palves@redhat.com>
14375
14376         * disasm.c (gdb_pretty_print_insn): Rename to ...
14377         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14378         Remove gdbarch parameter.  Adapt to clear the object's buffers
14379         instead of allocating new buffers, and to print using the object's
14380         gdb_disassembler instead of calling gdb_print_insn.
14381         (dump_insns): Use gdb_pretty_print_disassembler.
14382         * disasm.h (gdb_pretty_print_insn): Delete declaration.
14383         (gdb_pretty_print_disassembler): New class.
14384         * record-btrace.c (btrace_insn_history): Use
14385         gdb_pretty_print_disassembler.
14386
14387 2017-02-02  Pedro Alves  <palves@redhat.com>
14388
14389         * ada-lang.c (type_as_string): Use string_file.
14390         * ada-valprint.c (ada_print_floating): Use string_file.
14391         * ada-varobj.c (ada_varobj_scalar_image)
14392         (ada_varobj_get_value_image): Use string_file.
14393         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14394         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14395         * breakpoint.c (update_inserted_breakpoint_locations)
14396         (insert_breakpoint_locations, reattach_breakpoints)
14397         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14398         (print_it_watchpoint): Use string_file.
14399         (save_breakpoints): Use stdio_file.
14400         * c-exp.y (oper): Use string_file.
14401         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14402         tee_file.
14403         (pop_output_files): Use delete.
14404         (handle_redirections): Use stdio_file and tee_file.
14405         * cli/cli-setshow.c (do_show_command): Use string_file.
14406         * compile/compile-c-support.c (c_compute_program): Use
14407         string_file.
14408         * compile/compile-c-symbols.c (generate_vla_size): Take a
14409         'string_file &' instead of a 'ui_file *'.
14410         (generate_c_for_for_one_variable): Take a 'string_file &' instead
14411         of a 'ui_file *'.  Use string_file.
14412         (generate_c_for_variable_locations): Take a 'string_file &'
14413         instead of a 'ui_file *'.
14414         * compile/compile-internal.h (generate_c_for_for_one_variable):
14415         Take a 'string_file &' instead of a 'ui_file *'.
14416         * compile/compile-loc2c.c (push, pushf, unary, binary)
14417         (print_label, pushf_register_address, pushf_register)
14418         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14419         'ui_file *'.  Adjust.
14420         * compile/compile.c (compile_to_object): Use string_file.
14421         * compile/compile.h (compile_dwarf_expr_to_c)
14422         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14423         'ui_file *'.
14424         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14425         (replace_typedefs_qualified_name): Use string_file and
14426         obstack_copy0.
14427         * disasm.c (gdb_pretty_print_insn): Use string_file.
14428         (gdb_disassembly): Adjust reference the null_stream global.
14429         (do_ui_file_delete): Delete.
14430         (gdb_insn_length): Use null_stream.
14431         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14432         * dwarf2loc.c (dwarf2_compile_property_to_c)
14433         (locexpr_generate_c_location, loclist_generate_c_location): Take a
14434         'string_file &' instead of a 'ui_file *'.
14435         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14436         * dwarf2read.c (do_ui_file_peek_last): Delete.
14437         (dwarf2_compute_name): Use string_file.
14438         * event-top.c (gdb_setup_readline): Use stdio_file.
14439         * gdbarch.sh (verify_gdbarch): Use string_file.
14440         * gdbtypes.c (safe_parse_type): Use null_stream.
14441         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14442         string_file.
14443         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14444         'string_file *' instead of a 'ui_file *'.
14445         (gdbscm_arch_disassemble): Use string_file.
14446         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14447         * guile/scm-ports.c (class ioscm_file_port): Now a class that
14448         inherits from ui_file.
14449         (ioscm_file_port_delete, ioscm_file_port_rewind)
14450         (ioscm_file_port_put): Delete.
14451         (ioscm_file_port_write): Rename to ...
14452         (ioscm_file_port::write): ... this.  Remove file_port_magic
14453         checks.
14454         (ioscm_file_port_new): Delete.
14455         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14456         ui_file_up.
14457         * guile/scm-type.c (tyscm_type_name): Use string_file.
14458         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14459         Use string_file.
14460         * infcmd.c (print_return_value_1): Use string_file.
14461         * infrun.c (print_target_wait_results): Use string_file.
14462         * language.c (add_language): Use string_file.
14463         * location.c (explicit_to_string_internal): Use string_file.
14464         * main.c (captured_main_1): Use null_file.
14465         * maint.c (maintenance_print_architecture): Use stdio_file.
14466         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14467         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14468         event_channel>: Change type to mi_console_file pointer.
14469         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14470         (mi_console_file_delete): Delete.
14471         (struct mi_console_file): Delete.
14472         (mi_console_file_magic): Delete.
14473         (mi_console_file_new): Delete.
14474         (mi_console_file::mi_console_file): New.
14475         (mi_console_file_delete): Delete.
14476         (mi_console_file_fputs): Delete.
14477         (mi_console_file::write): New.
14478         (mi_console_raw_packet): Delete.
14479         (mi_console_file::flush): New.
14480         (mi_console_file_flush): Delete.
14481         (mi_console_set_raw): Rename to ...
14482         (mi_console_file::set_raw): ... this.
14483         * mi/mi-console.h (class mi_console_file): New class.
14484         (mi_console_file_new, mi_console_set_raw): Delete.
14485         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14486         (mi_set_logging): Use delete and tee_file.  Adjust.
14487         * mi/mi-main.c (output_register): Use string_file.
14488         (mi_cmd_data_evaluate_expression): Use string_file.
14489         (mi_cmd_data_read_memory): Use string_file.
14490         (mi_cmd_execute, print_variable_or_computed): Use string_file.
14491         * mi/mi-out.c (mi_ui_out::main_stream): New.
14492         (mi_ui_out::rewind): Use main_stream and
14493         string_file.
14494         (mi_ui_out::put): Use main_stream and string_file.
14495         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14496         Allocate a 'string_file' instead.
14497         (mi_out_new): Don't allocate a mem_fileopen stream here.
14498         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14499         (mi_ui_out::main_stream): Declare method.
14500         * printcmd.c (eval_command): Use string_file.
14501         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14502         * python/py-arch.c (archpy_disassemble): Use string_file.
14503         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14504         * python/py-frame.c (frapy_str): Use string_file.
14505         * python/py-framefilter.c (py_print_type, py_print_single_arg):
14506         Use string_file.
14507         * python/py-type.c (typy_str): Use string_file.
14508         * python/py-unwind.c (unwind_infopy_str): Use string_file.
14509         * python/py-value.c (valpy_str): Use string_file.
14510         * record-btrace.c (btrace_insn_history): Use string_file.
14511         * regcache.c (regcache_print): Use stdio_file.
14512         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14513         * remote.c (escape_buffer): Use string_file.
14514         * rust-lang.c (rust_get_disr_info): Use string_file.
14515         * serial.c (serial_open_ops_1): Use stdio_file.
14516         (do_serial_close): Use delete.
14517         * stack.c (print_frame_arg): Use string_file.
14518         (print_frame_args): Remove local mem_fileopen stream, not used.
14519         (print_frame): Use string_file.
14520         * symmisc.c (maintenance_print_symbols): Use stdio_file.
14521         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14522         Take a 'string_file *' instead of a 'ui_file *'.
14523         * top.c (new_ui): Use stdio_file and stderr_file.
14524         (free_ui): Use delete.
14525         (execute_command_to_string): Use string_file.
14526         (quit_confirm): Use string_file.
14527         * tracepoint.c (collection_list::append_exp): Use string_file.
14528         * tui/tui-disasm.c (tui_disassemble): Use string_file.
14529         * tui/tui-file.c: Don't include "ui-file.h".
14530         (enum streamtype, struct tui_stream): Delete.
14531         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14532         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14533         (tui_file::tui_file): New method.
14534         (tui_file_fputs): Delete.
14535         (tui_file_get_strbuf): Delete.
14536         (tui_file::puts): New method.
14537         (tui_file_adjust_strbuf): Delete.
14538         (tui_file_flush): Delete.
14539         (tui_file::flush): New method.
14540         * tui/tui-file.h: Tweak intro comment.
14541         Include ui-file.h.
14542         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14543         (tui_file_adjust_strbuf): Delete declarations.
14544         (class tui_file): New class.
14545         * tui/tui-io.c (tui_initialize_io): Use tui_file.
14546         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14547         (tui_register_format): Use string_stream.
14548         * tui/tui-stack.c (tui_make_status_line): Use string_file.
14549         (tui_get_function_from_frame): Use string_file.
14550         * typeprint.c (type_to_string): Use string_file.
14551         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14552         (null_stream): New global.
14553         (ui_file_delete): Delete.
14554         (ui_file::ui_file): New.
14555         (null_file_isatty): Delete.
14556         (ui_file::~ui_file): New.
14557         (null_file_rewind): Delete.
14558         (ui_file::printf): New.
14559         (null_file_put): Delete.
14560         (null_file_flush): Delete.
14561         (ui_file::putstr): New.
14562         (null_file_write): Delete.
14563         (ui_file::putstrn): New.
14564         (null_file_read): Delete.
14565         (ui_file::putc): New.
14566         (null_file_fputs): Delete.
14567         (null_file_write_async_safe): Delete.
14568         (ui_file::vprintf): New.
14569         (null_file_delete): Delete.
14570         (null_file::write): New.
14571         (null_file_fseek): Delete.
14572         (null_file::puts): New.
14573         (ui_file_data): Delete.
14574         (null_file::write_async_safe): New.
14575         (gdb_flush, ui_file_isatty): Adjust.
14576         (ui_file_put, ui_file_rewind): Delete.
14577         (ui_file_write): Adjust.
14578         (ui_file_write_for_put): Delete.
14579         (ui_file_write_async_safe, ui_file_read): Adjust.
14580         (ui_file_fseek): Delete.
14581         (fputs_unfiltered): Adjust.
14582         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14583         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14584         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14585         (set_ui_file_data): Delete.
14586         (string_file::~string_file, string_file::write)
14587         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14588         (do_ui_file_as_string, ui_file_as_string): Delete.
14589         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14590         (struct mem_file): Delete.
14591         (mem_file_new): Delete.
14592         (stdio_file::stdio_file): New.
14593         (mem_file_delete): Delete.
14594         (stdio_file::stdio_file): New.
14595         (mem_fileopen): Delete.
14596         (stdio_file::~stdio_file): New.
14597         (mem_file_rewind): Delete.
14598         (stdio_file::set_stream): New.
14599         (mem_file_put): Delete.
14600         (stdio_file::open): New.
14601         (mem_file_write): Delete.
14602         (stdio_file_magic, struct stdio_file): Delete.
14603         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14604         (stdio_file::flush): New.
14605         (stdio_file_read): Rename to ...
14606         (stdio_file::read): ... this.  Adjust.
14607         (stdio_file_write): Rename to ...
14608         (stdio_file::write): ... this.  Adjust.
14609         (stdio_file_write_async_safe): Rename to ...
14610         (stdio_file::write_async_safe) ... this.  Adjust.
14611         (stdio_file_fputs): Rename to ...
14612         (stdio_file::puts) ... this.  Adjust.
14613         (stdio_file_isatty): Delete.
14614         (stdio_file_fseek): Delete.
14615         (stdio_file::isatty): New.
14616         (stderr_file_write): Rename to ...
14617         (stderr_file::write) ... this.  Adjust.
14618         (stderr_file_fputs): Rename to ...
14619         (stderr_file::puts) ... this.  Adjust.
14620         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14621         (stderr_file::stderr_file): New.
14622         (tee_file_magic): Delete.
14623         (struct tee_file): Delete.
14624         (tee_file::tee_file): New.
14625         (tee_file_new): Delete.
14626         (tee_file::~tee_file): New.
14627         (tee_file_delete): Delete.
14628         (tee_file_flush): Rename to ...
14629         (tee_file::flush): ... this.  Adjust.
14630         (tee_file_write): Rename to ...
14631         (tee_file::write): ... this.  Adjust.
14632         (tee_file::write_async_safe): New.
14633         (tee_file_fputs): Rename to ...
14634         (tee_file::puts): ... this.  Adjust.
14635         (tee_file_isatty): Rename to ...
14636         (tee_file::isatty): ... this.  Adjust.
14637         * ui-file.h (struct obstack, struct ui_file): Don't
14638         forward-declare.
14639         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14640         (ui_file_write_ftype)
14641         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14642         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14643         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14644         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14645         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14646         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14647         (set_ui_file_fseek): Delete.
14648         (ui_file_data, ui_file_delete, ui_file_rewind)
14649         (struct ui_file): New.
14650         (ui_file_up): New.
14651         (class null_file): New.
14652         (null_stream): Declare.
14653         (ui_file_write_for_put, ui_file_put): Delete.
14654         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14655         Delete.
14656         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14657         (gdb_fopen, tee_file_new): Delete.
14658         (struct string_file): New.
14659         (struct stdio_file): New.
14660         (stdio_file_up): New.
14661         (struct stderr_file): New.
14662         (class tee_file): New.
14663         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14664         of a 'ui_file *'.  Adjust.
14665         * ui-out.h (class ui_out) <field_stream>: Likewise.
14666         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14667         (null_stream): Delete.
14668         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14669         Adjust.
14670         * utils.h (struct ui_file): Delete forward declaration..
14671         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14672         (error_stream): Take a 'string_file &' instead of a
14673         'ui_file *'.
14674         * varobj.c (varobj_value_get_print_value): Use string_file.
14675         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14676         * gdbarch.c: Regenerate.
14677
14678 2017-02-02  Pedro Alves  <palves@redhat.com>
14679
14680         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14681         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
14682         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
14683         Adjust to call gdb_print_insn instead of
14684         gdb_disassembler::print_insn.
14685         (dump_insns, do_mixed_source_and_assembly_deprecated)
14686         (do_mixed_source_and_assembly, do_assembly_only): Add back a
14687         'gdbarch' parameter.  Remove gdb_disassembler parameter.
14688         (gdb_disassembly): Don't allocate a gdb_disassembler here.
14689         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14690         declaration.
14691         (gdb_pretty_print_insn): Re-add declaration.
14692         * record-btrace.c (btrace_insn_history): Don't allocate a
14693         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
14694
14695 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
14696
14697         * disasm.h (gdb_disassembly): Remove file_string parameter.
14698         * disasm.c (gdb_disassembly): Likewise.
14699         * cli/cli-cmds.c (print_disassembly): Adapt.
14700         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14701         * stack.c (do_gdb_disassembly): Likewise.
14702
14703 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14704
14705         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14706         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14707         targets.  And if the implicit value is longer than needed, extract
14708         the first bytes instead of the "least significant" ones.
14709
14710 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14711
14712         * btrace.c (btrace_enable): Do not call btrace_add_pc for
14713         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14714         (btrace_fetch): Assert can_access_registers_ptid.
14715         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14716         validate_registers_access.
14717
14718 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14719
14720         * gdbthread.h (can_access_registers_ptid): New.
14721         * thread.c (can_access_registers_ptid): New.
14722
14723 2017-02-01  Pedro Alves  <palves@redhat.com>
14724
14725         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14726
14727 2017-01-31  Pedro Alves  <palves@redhat.com>
14728
14729         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
14730         Fix typos.
14731
14732 2017-01-31  Pedro Alves  <palves@redhat.com>
14733
14734         * stack.c (print_frame_args): Remove local mem_fileopen stream,
14735         not used.
14736
14737 2017-01-31  Pedro Alves  <palves@redhat.com>
14738
14739         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
14740
14741 2017-01-31  Pedro Alves  <palves@redhat.com>
14742
14743         * common/scoped_restore.h
14744         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
14745         change the value's parameter type to T2.
14746         (make_scoped_restore): Likewise.
14747
14748 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14749             Richard Henderson  <rth@redhat.com>
14750
14751         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
14752         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
14753         GS_BASE for older kernels.
14754         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
14755         GS_BASE for older kernels.
14756         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
14757         and GS_BASE to the offset table.
14758         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
14759         system register group.
14760         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
14761         for older kernels.
14762         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
14763         amd64 ABI.
14764         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
14765         AMD64_GSBASE_REGNUM.
14766         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
14767         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
14768         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
14769         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
14770         i386/64bit-segments.xml in those rules.
14771         * features/i386/64bit-segments.xml: New file.
14772         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
14773         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
14774         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
14775         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
14776         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
14777         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
14778         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
14779         * features/i386/amd64-avx-linux.c: Regenerated.
14780         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
14781         * features/i386/amd64-avx-mpx.c: Regenerated.
14782         * features/i386/amd64-avx512-linux.c: Regenerated.
14783         * features/i386/amd64-linux.c: Regenerated.
14784         * features/i386/amd64-mpx-linux.c: Regenerated.
14785         * features/i386/i386-avx-mpx-linux.c: Regenerated.
14786         * features/i386/i386-avx-mpx.c: Regenerated.
14787         * features/i386/x32-avx-linux.c: Regenerated.
14788         * features/i386/x32-avx512-linux.c: Regenerated.
14789         * regformats/i386/amd64-avx-linux.dat: Regenerated.
14790         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
14791         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
14792         * regformats/i386/amd64-linux.dat: Regenerated.
14793         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
14794         * regformats/i386/x32-avx-linux.dat: Regenerated.
14795         * regformats/i386/x32-avx512-linux.dat: Regenerated.
14796         * regformats/i386/x32-linux.dat: Regenerated.
14797
14798 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14799
14800         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
14801         Set to AMD64_NUM_REGS.
14802
14803 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14804
14805         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
14806         that checks validity of a register number.
14807
14808 2017-01-27  Kees Cook  <keescook@google.com>
14809
14810         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
14811         fetch_fpregs if target has fpa registers.
14812         (arm_linux_store_inferior_registers): Call store_fpregs if target
14813         has fpa registers.
14814
14815 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14816
14817         * cris-tdep.c (cris_gdbarch_init): Remove check for
14818         info.byte_order and force it to BFD_ENDIAN_LITTLE.
14819
14820 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
14821
14822         * corelow.c (get_core_register_section): Check for regset
14823         existence before checking for REGSET_VARIABLE_SIZE.
14824
14825 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14826             Pedro Alves  <palves@redhat.com>
14827
14828         PR gdb/20939
14829         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
14830         call memory_error, save memaddr instead.
14831         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
14832         negative, cal memory_error.
14833         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
14834
14835 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14836
14837         * disasm-selftests.c (memory_error_test): New function.
14838         (_initialize_disasm_selftests): Register memory_error_test.
14839
14840 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14841
14842         * Makefile.in (SFILES): Add disasm-selftests.c and
14843         selftest-arch.c.
14844         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
14845         * disasm-selftests.c: New file.
14846         * selftest-arch.c: New file.
14847         * selftest-arch.h: New file.
14848
14849 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14850
14851         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
14852         to bfd_arch_mep.  Don't return 0 if section is not
14853         found.  Call print_insn_mep.
14854
14855 2017-01-26  Pedro Alves  <palves@redhat.com>
14856             Yao Qi  <yao.qi@linaro.org>
14857
14858         * arm-tdep.c: Include "disasm.h".
14859         (gdb_print_insn_arm): Update code to get gdbarch.
14860         * disasm.c (dis_asm_read_memory): Change it to
14861         gdb_disassembler::dis_asm_read_memory.
14862         (dis_asm_memory_error): Likewise.
14863         (dis_asm_print_address): Likewise.
14864         (gdb_pretty_print_insn): Change it to
14865         gdb_disassembler::pretty_print_insn.
14866         (dump_insns): Add one argument gdb_disassemlber.  All
14867         callers updated.
14868         (do_mixed_source_and_assembly_deprecated): Likewise.
14869         (do_mixed_source_and_assembly): Likewise.
14870         (do_assembly_only): Likewise.
14871         (gdb_disassembler::gdb_disassembler): New.
14872         (gdb_disassembler::print_insn): New.
14873         * disasm.h (class gdb_disassembler): New.
14874         (gdb_pretty_print_insn): Remove declaration.
14875         (gdb_disassemble_info): Likewise.
14876         * guile/scm-disasm.c (class gdbscm_disassembler): New.
14877         (gdbscm_disasm_read_memory_worker): Update.
14878         (gdbscm_disasm_read_memory): Update.
14879         (gdbscm_disasm_memory_error): Remove.
14880         (gdbscm_disasm_print_address): Remove.
14881         (gdbscm_disassembler::gdbscm_disassembler): New.
14882         (gdbscm_print_insn_from_port): Update.
14883         * mips-tdep.c: Include disasm.h.
14884         (gdb_print_insn_mips): Update code to get gdbarch.
14885         * record-btrace.c (btrace_insn_history): Update.
14886         * spu-tdep.c: Include disasm.h.
14887         (struct spu_dis_asm_data): Remove.
14888         (struct spu_dis_asm_info): New.
14889         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
14890         SPU id.
14891         (gdb_print_insn_spu): Cast disassemble_info to
14892         spu_dis_asm_info.
14893
14894 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14895
14896         * disasm.c (do_ui_file_delete): Delete.
14897         (gdb_insn_length): Move code creating stream to ...
14898         * utils.c (null_stream): ... here.  New function.
14899         * utils.h (null_stream): Declare.
14900
14901 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
14902
14903         * python/py-inferior.c (find_thread_object): Return directly
14904         from the loop.  Remove "found" variable.
14905
14906 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
14907
14908         GDB 7.12.1 released.
14909
14910 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14911
14912         * python/py-function.c (fnpy_call): Reorder declarations to have
14913         the gdbpy_enter object declared first.
14914         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
14915
14916 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14917
14918         PR python/21068
14919         * python/python-internal.h (PyMem_RawMalloc): Define for
14920         Python < 3.4.
14921         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
14922         PyMem_RawMalloc instead of PyMem_Malloc.
14923
14924 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
14925             Luis Machado  <lgustavo@codesourcery.com>
14926
14927         * NEWS (New commands): Mention flash-erase.
14928         (New MI commands): Mention target-flash-erase.
14929         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
14930         command.
14931         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
14932         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
14933         * target.c (flash_erase_command): New function.
14934         (initialize_targets): Add new flash-erase command.
14935         * target.h (flash_erase_command): New declaration.
14936
14937 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
14938
14939         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
14940         HAVE_SYS_PROCFS_H is defined.
14941
14942 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14943
14944         * remote.c (struct cached_reg): Change data into a pointer.
14945         * (stop_reply_dtr): Free data pointers before deleting vector.
14946         (process_stop_reply): Likewise.
14947         (remote_parse_stop_reply): Allocate space for data
14948
14949 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14950
14951         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
14952         MAX_REGISTER_SIZE.
14953         (amd64_pseudo_register_read_value): Likewise.
14954         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
14955         (store_register_using_P): Likewise.
14956         * regcache.c (regcache_xfer_part): Likewise.
14957
14958 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
14959
14960         Split real and pseudo registers.
14961         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
14962         (sparc32_pseudo_regnum): New enum.
14963         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
14964         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
14965         (SPARC32_CP0_REGISTERS): New macro.
14966         (sparc32_pseudo_register_name): New function.
14967         (sparc32_register_name): Use sparc32_pseudo_register_name.
14968         (sparc32_pseudo_register_type): New function.
14969         (sparc32_register_type): Use sparc32_pseudo_register_type.
14970         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
14971         pseudo register numbers.
14972         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
14973         (SPARC64_CP0_REGISTERS): New macro.
14974         (sparc64_pseudo_register_name): New function.
14975         (sparc64_register_name): Use sparc64_pseudo_register_name.
14976         (sparc64_pseudo_register_type): New function.
14977         (sparc64_register_type): Use sparc64_pseudo_register_type.
14978         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
14979         pseudo register numbers.
14980         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
14981         sparc64_store_arguments): Handle pseudo register numbers.
14982
14983 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14984
14985         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
14986         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
14987         output.
14988         (getpkt_or_notif_sane_1): Likewise.
14989
14990 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14991
14992         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
14993         of CC.  Pass "-x c++-header" instead of "-x c".
14994
14995 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14996
14997         * remote.c (remote_can_async_p): Update comment.
14998
14999 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15000
15001         * linux-nat.c (linux_nat_can_async_p): Update comment.
15002
15003 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15004
15005         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15006
15007 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
15008
15009         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15010
15011 2017-01-10  Tom Tromey  <tom@tromey.com>
15012
15013         * python/py-type.c (typy_legacy_template_argument): Update.
15014         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15015         ~demangle_parse_info): Declare new members.
15016         (cp_demangled_name_to_comp): Return unique_ptr.
15017         (cp_demangled_name_parse_free)
15018         (make_cleanup_cp_demangled_name_parse_free)
15019         (cp_new_demangle_parse_info): Remove.
15020         * cp-support.c (do_demangled_name_parse_free_cleanup)
15021         (make_cleanup_cp_demangled_name_parse_free): Remove.
15022         (inspect_type, cp_canonicalize_string_full)
15023         (cp_canonicalize_string): Update.
15024         (mangled_name_to_comp): Change return type.
15025         (cp_class_name_from_physname, method_name_from_physname)
15026         (cp_func_name, cp_remove_params): Update.
15027         * cp-name-parser.y (demangle_parse_info): New constructor, from
15028         cp_new_demangle_parse_info.
15029         (~demangle_parse_info): New destructor, from
15030         cp_demangled_name_parse_free.
15031         (cp_merge_demangle_parse_infos): Update.
15032         (cp_demangled_name_to_comp): Change return type.
15033
15034 2017-01-10  Tom Tromey  <tom@tromey.com>
15035
15036         * top.c (prevent_dont_repeat): Change return type.
15037         * python/python.c (execute_gdb_command): Use std::string.
15038         Update.
15039         * guile/guile.c (gdbscm_execute_gdb_command): Update.
15040         * command.h (prevent_dont_repeat): Change return type.
15041         * breakpoint.c (bpstat_do_actions_1): Update.
15042
15043 2017-01-10  Tom Tromey  <tom@tromey.com>
15044
15045         * value.h (scoped_value_mark::~scoped_value_mark): Call
15046         free_to_mark.
15047         (scoped_value_mark::free_to_mark): New method.
15048         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15049         scoped_value_mark.
15050
15051 2017-01-10  Tom Tromey  <tom@tromey.com>
15052
15053         * python/py-value.c (valpy_dereference, valpy_referenced_value)
15054         (valpy_reference_value, valpy_const_value, valpy_get_address)
15055         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15056         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15057         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15058         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15059         scoped_value_mark.
15060         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15061         * value.h (scoped_value_mark): New class.
15062
15063 2017-01-10  Tom Tromey  <tom@tromey.com>
15064
15065         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15066         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15067         * psymtab.c (discard_psymtabs_upto): Remove.
15068         (make_cleanup_discard_psymtabs): Remove.
15069         (struct psymtab_state): Remove.
15070
15071 2017-01-10  Tom Tromey  <tom@tromey.com>
15072
15073         * record-full.c (record_full_save_cleanups): Remove.
15074         (record_full_save): Use gdb::unlinker.
15075         * gcore.c (do_bfd_delete_cleanup): Remove.
15076         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
15077         cleanups.
15078         * dwarf2read.c (unlink_if_set): Remove.
15079         (write_psymtabs_to_index): Use gdb::unlinker.
15080         * common/gdb_unlinker.h: New file.
15081
15082 2017-01-10  Tom Tromey  <tom@tromey.com>
15083
15084         * windows-tdep.c (windows_xfer_shared_library): Update.
15085         * windows-nat.c (windows_make_so): Update.
15086         * utils.h (make_cleanup_bfd_unref): Remove.
15087         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15088         * symfile.h (symfile_bfd_open)
15089         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15090         * symfile.c (read_symbols, symbol_file_add)
15091         (separate_debug_file_exists): Update.
15092         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15093         (generic_load, reread_symbols): Update.
15094         * symfile-mem.c (symbol_file_add_from_memory): Update.
15095         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15096         (spu_symbol_file_add_from_memory): Update.
15097         * solist.h (struct target_so_ops) <bfd_open>: Return
15098         gdb_bfd_ref_ptr.
15099         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15100         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15101         gdb_bfd_ref_ptr.
15102         (solib_map_sections, reload_shared_libraries_1): Update.
15103         * solib-svr4.c (enable_break): Update.
15104         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15105         * solib-frv.c (enable_break2): Update.
15106         * solib-dsbt.c (enable_break): Update.
15107         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15108         gdb_bfd_ref_ptr.
15109         (darwin_solib_get_all_image_info_addr_at_init): Update.
15110         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15111         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15112         * record-full.c (record_full_save): Update.
15113         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15114         * procfs.c (insert_dbx_link_bpt_in_file): Update.
15115         * minidebug.c (find_separate_debug_file_in_section): Return
15116         gdb_bfd_ref_ptr.
15117         * machoread.c (macho_add_oso_symfile): Change abfd to
15118         gdb_bfd_ref_ptr.
15119         (macho_symfile_read_all_oso): Update.
15120         (macho_check_dsym): Return gdb_bfd_ref_ptr.
15121         (macho_symfile_read): Update.
15122         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15123         (jit_bfd_try_read_symtab): Update.
15124         * gdb_bfd.h (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         (gdb_bfd_ref_policy): New struct.
15129         (gdb_bfd_ref_ptr): New typedef.
15130         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15131         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15132         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15133         gdb_bfd_ref_ptr.
15134         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15135         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15136         (gcore_command): Update.
15137         * exec.c (exec_file_attach): Update.
15138         * elfread.c (elf_symfile_read): Update.
15139         * dwarf2read.c (dwarf2_get_dwz_file): Update.
15140         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15141         (open_and_init_dwo_file): Update.
15142         (open_dwp_file): Return gdb_bfd_ref_ptr.
15143         (open_and_init_dwp_file): Update.
15144         * corelow.c (core_open): Update.
15145         * compile/compile-object-load.c (compile_object_load): Update.
15146         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15147         * coffread.c (coff_symfile_read): Update.
15148         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15149         gdb_bfd_ref_ptr.  Rename.
15150         (dump_bfd_file, restore_command): Update.
15151         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15152         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15153         (find_separate_debug_file_by_buildid): Update.
15154
15155 2017-01-10  Tom Tromey  <tom@tromey.com>
15156
15157         * common/gdb_ref_ptr.h: New file.
15158         * python/py-ref.h (struct gdbpy_ref_policy): New.
15159         (gdbpy_ref): Now a typedef.
15160
15161 2017-01-10  Tom Tromey  <tom@tromey.com>
15162
15163         * utils.h (make_cleanup_htab_delete): Don't declare.
15164         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15165         Remove.
15166         * linespec.c (decode_compound_collector): Add constructor,
15167         destructor.
15168         (lookup_prefix_sym): Remove cleanup.
15169         (symtab_collector): Add constructor, destructor.
15170         (collect_symtabs_from_filename): Remove cleanup.
15171         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15172         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15173         Use htab_up.
15174         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15175         * dwarf2read.c (dw2_expand_symtabs_matching)
15176         (dw2_map_symbol_filenames, dwarf_decode_macros)
15177         (write_psymtabs_to_index): Use htab_up.
15178         * dwarf2loc.c (func_verify_no_selftailcall)
15179         (call_site_find_chain_1, func_verify_no_selftailcall)
15180         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15181         std::vector, gdb::unique_xmalloc_ptr.
15182         (call_sitep): Remove typedef.
15183         (dwarf2_locexpr_baton_eval): Remove unused variable.
15184
15185 2017-01-10  Tom Tromey  <tom@tromey.com>
15186
15187         * python/python-internal.h (make_cleanup_py_decref)
15188         (make_cleanup_py_xdecref): Don't declare.
15189         * python/py-utils.c (py_decref, make_cleanup_py_decref)
15190         (py_xdecref, make_cleanup_py_xdecref): Remove.
15191
15192 2017-01-10  Tom Tromey  <tom@tromey.com>
15193
15194         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15195         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15196
15197 2017-01-10  Tom Tromey  <tom@tromey.com>
15198
15199         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15200
15201 2017-01-10  Tom Tromey  <tom@tromey.com>
15202
15203         * python/py-utils.c (unicode_to_encoded_string)
15204         (python_string_to_target_string)
15205         (python_string_to_target_python_string)
15206         (python_string_to_host_string, gdbpy_obj_to_string)
15207         (get_addr_from_python): Use gdbpy_ref.
15208
15209 2017-01-10  Tom Tromey  <tom@tromey.com>
15210
15211         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15212         gdbpy_ref.
15213
15214 2017-01-10  Tom Tromey  <tom@tromey.com>
15215
15216         * python/python.c (eval_python_command, gdbpy_decode_line)
15217         (gdbpy_run_events, gdbpy_start_type_printers)
15218         (gdbpy_apply_type_printers): Use gdbpy_ref.
15219
15220 2017-01-10  Tom Tromey  <tom@tromey.com>
15221
15222         * python/py-param.c (get_doc_string, compute_enum_values): Use
15223         gdbpy_ref.
15224
15225 2017-01-10  Tom Tromey  <tom@tromey.com>
15226
15227         * python/py-inferior.c (find_thread_object, build_inferior_list):
15228         Use gdbpy_ref.
15229
15230 2017-01-10  Tom Tromey  <tom@tromey.com>
15231
15232         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15233
15234 2017-01-10  Tom Tromey  <tom@tromey.com>
15235
15236         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15237         gdbpy_ref.
15238
15239 2017-01-10  Tom Tromey  <tom@tromey.com>
15240
15241         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
15242         extra incref.
15243         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15244         Use gdbpy_ref.
15245
15246 2017-01-10  Tom Tromey  <tom@tromey.com>
15247
15248         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15249         gdbpy_ref.
15250
15251 2017-01-10  Tom Tromey  <tom@tromey.com>
15252
15253         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
15254         decref results of PyArg_ParseTupleAndKeywords.
15255
15256 2017-01-10  Tom Tromey  <tom@tromey.com>
15257
15258         * python/python.c (python_run_simple_file): Use
15259         unique_xmalloc_ptr, gdbpy_ref.
15260
15261 2017-01-10  Tom Tromey  <tom@tromey.com>
15262
15263         * python/py-prettyprint.c (print_stack_unless_memory_error)
15264         (print_string_repr, print_children): Use gdbpy_ref.
15265         (dummy_python_frame): New class.
15266         (dummy_python_frame::dummy_python_frame): Rename from
15267         push_dummy_python_frame.
15268         (py_restore_tstate): Remove.
15269
15270 2017-01-10  Tom Tromey  <tom@tromey.com>
15271
15272         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15273
15274 2017-01-10  Tom Tromey  <tom@tromey.com>
15275
15276         * python/python.c (ensure_python_env, restore_python_env):
15277         Remove.
15278         * python/python-internal.h (ensure_python_env): Don't declare.
15279         * varobj.h (varobj_ensure_python_env): Don't declare.
15280         * varobj.c (varobj_ensure_python_env): Remove.
15281
15282 2017-01-10  Tom Tromey  <tom@tromey.com>
15283
15284         * varobj.c (varobj_value_get_print_value): Use
15285         gdbpy_enter_varobj.
15286
15287 2017-01-10  Tom Tromey  <tom@tromey.com>
15288
15289         * python/py-prettyprint.c (print_string_repr, print_children):
15290         Update.
15291         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15292         of "encoding".
15293         * varobj.c (varobj_value_get_print_value): Update.
15294         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15295
15296 2017-01-10  Tom Tromey  <tom@tromey.com>
15297
15298         * varobj.c (varobj_get_display_hint)
15299         (dynamic_varobj_has_child_method, install_new_value_visualizer)
15300         (varobj_set_visualizer, free_variable): Use
15301         gdbpy_enter_varobj.
15302
15303 2017-01-10  Tom Tromey  <tom@tromey.com>
15304
15305         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15306         (do_finish_initialization): New function.  Use gdbpy_ref.
15307         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
15308         do_finish_initialization.
15309
15310 2017-01-10  Tom Tromey  <tom@tromey.com>
15311
15312         * python/py-param.c (get_set_value, get_show_value): Use
15313         gdbpy_enter, gdbpy_ref.
15314
15315 2017-01-10  Tom Tromey  <tom@tromey.com>
15316
15317         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15318
15319 2017-01-10  Tom Tromey  <tom@tromey.com>
15320
15321         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15322
15323 2017-01-10  Tom Tromey  <tom@tromey.com>
15324
15325         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15326         Use gdbpy_enter_varobj.
15327
15328 2017-01-10  Tom Tromey  <tom@tromey.com>
15329
15330         * varobj.c (gdbpy_enter_varobj): New constructor.
15331         * python/python-internal.h (gdbpy_enter_varobj): New class.
15332         * python/py-varobj.c (py_varobj_get_iterator): Use
15333         gdbpy_enter_varobj.
15334
15335 2017-01-10  Tom Tromey  <tom@tromey.com>
15336
15337         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15338         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15339         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15340         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15341         unique_xmalloc_ptr.
15342         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15343
15344 2017-01-10  Tom Tromey  <tom@tromey.com>
15345
15346         * python/py-xmethods.c (invoke_match_method): Use
15347         gdbpy_ref.
15348
15349 2017-01-10  Tom Tromey  <tom@tromey.com>
15350
15351         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15352         gdbpy_enter, gdbpy_ref.
15353
15354 2017-01-10  Tom Tromey  <tom@tromey.com>
15355
15356         * python/python.c (python_interactive_command): Use gdbpy_enter.
15357
15358 2017-01-10  Tom Tromey  <tom@tromey.com>
15359
15360         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15361         gdbpy_ref.
15362
15363 2017-01-10  Tom Tromey  <tom@tromey.com>
15364
15365         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15366         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15367
15368 2017-01-10  Tom Tromey  <tom@tromey.com>
15369
15370         * utils.h (htab_deleter): New struct.
15371         (htab_up): New typedef.
15372         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15373         gdbpy_enter, gdbpy_ref, htab_up.
15374
15375 2017-01-10  Tom Tromey  <tom@tromey.com>
15376
15377         * python/py-unwind.c (pending_frame_invalidate): Remove.
15378         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15379
15380 2017-01-10  Tom Tromey  <tom@tromey.com>
15381
15382         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15383         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15384
15385 2017-01-10  Tom Tromey  <tom@tromey.com>
15386
15387         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15388
15389 2017-01-10  Tom Tromey  <tom@tromey.com>
15390
15391         * python/python.c (gdbpy_eval_from_control_command)
15392         (gdbpy_source_script, gdbpy_run_events)
15393         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15394         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15395         gdbpy_enter.
15396
15397 2017-01-10  Tom Tromey  <tom@tromey.com>
15398
15399         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15400
15401 2017-01-10  Tom Tromey  <tom@tromey.com>
15402
15403         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15404
15405 2017-01-10  Tom Tromey  <tom@tromey.com>
15406
15407         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15408         (python_on_inferior_call_pre, python_on_inferior_call_post)
15409         (python_on_memory_change, python_on_register_change)
15410         (python_inferior_exit, python_new_objfile, add_thread_object)
15411         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15412
15413 2017-01-10  Tom Tromey  <tom@tromey.com>
15414
15415         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15416         (bpfinishpy_handle_exit): Use gdbpy_enter.
15417
15418 2017-01-10  Tom Tromey  <tom@tromey.com>
15419
15420         * python/py-cmd.c (cmdpy_destroyer)
15421         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15422         gdbpy_enter.
15423
15424 2017-01-10  Tom Tromey  <tom@tromey.com>
15425
15426         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15427         gdbpy_enter.
15428         (gdbpy_breakpoint_has_cond): Likewise.
15429
15430 2017-01-10  Tom Tromey  <tom@tromey.com>
15431
15432         * python/python.c (gdbpy_enter): New constructor.
15433         (~gdbpy_enter): New destructor.
15434         (restore_python_env, ensure_python_env): Rewrite.
15435         * python/python-internal.h (gdbpy_enter): New class.
15436
15437 2017-01-10  Tom Tromey  <tom@tromey.com>
15438
15439         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15440
15441 2017-01-10  Tom Tromey  <tom@tromey.com>
15442
15443         * python/py-value.c (value_has_field, get_field_flag)
15444         (get_field_type, valpy_getitem, convert_value_from_python): Use
15445         gdbpy_ref.
15446
15447 2017-01-10  Tom Tromey  <tom@tromey.com>
15448
15449         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15450         gdbpy_ref.
15451
15452 2017-01-10  Tom Tromey  <tom@tromey.com>
15453
15454         * python/py-prettyprint.c (search_pp_list)
15455         (find_pretty_printer_from_objfiles)
15456         (find_pretty_printer_from_progspace)
15457         (find_pretty_printer_from_gdb, find_pretty_printer)
15458         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15459         gdbpy_ref.
15460
15461 2017-01-10  Tom Tromey  <tom@tromey.com>
15462
15463         * python/py-param.c (call_doc_function): Use gdbpy_ref.
15464
15465 2017-01-10  Tom Tromey  <tom@tromey.com>
15466
15467         * python/py-linetable.c (build_line_table_tuple_from_pcs)
15468         (ltpy_get_all_source_lines): Use gdbpy_ref.
15469
15470 2017-01-10  Tom Tromey  <tom@tromey.com>
15471
15472         * python/py-framefilter.c (extract_sym, extract_value)
15473         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15474         gdbpy_ref.
15475
15476 2017-01-10  Tom Tromey  <tom@tromey.com>
15477
15478         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15479
15480 2017-01-10  Tom Tromey  <tom@tromey.com>
15481
15482         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15483
15484 2017-01-10  Tom Tromey  <tom@tromey.com>
15485
15486         * python/py-function.c (convert_values_to_python, fnpy_init): Use
15487         gdbpy_ref.
15488
15489 2017-01-10  Tom Tromey  <tom@tromey.com>
15490
15491         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15492
15493 2017-01-10  Tom Tromey  <tom@tromey.com>
15494
15495         * python/py-type.c (convert_field, make_fielditem, typy_fields)
15496         (typy_range): Use gdbpy_ref.
15497
15498 2017-01-10  Tom Tromey  <tom@tromey.com>
15499
15500         * python/py-threadevent.c (create_thread_event_object): Use
15501         gdbpy_ref.
15502         * python/py-stopevent.c (create_stop_event_object): Simplify.
15503         (emit_stop_event): Use gdbpy_ref.
15504         * python/py-signalevent.c (create_signal_event_object): Use
15505         gdbpy_ref.
15506         * python/py-newobjfileevent.c (create_new_objfile_event_object)
15507         (emit_new_objfile_event, create_clear_objfiles_event_object)
15508         (emit_clear_objfiles_event): Use gdbpy_ref.
15509         * python/py-infevents.c (create_inferior_call_event_object)
15510         (create_register_changed_event_object)
15511         (create_memory_changed_event_object, emit_inferior_call_event)
15512         (emit_memory_changed_event, emit_register_changed_event): Use
15513         gdbpy_ref.
15514         * python/py-exitedevent.c (create_exited_event_object)
15515         (emit_exited_event): Use gdbpy_ref.
15516         * python/py-event.h (evpy_emit_event): Remove
15517         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15518         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15519         * python/py-continueevent.c (emit_continue_event): Use
15520         gdbpy_ref.
15521         * python/py-breakpoint.c (gdbpy_breakpoint_created)
15522         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15523         gdbpy_ref.
15524         * python/py-bpevent.c (create_breakpoint_event_object): Use
15525         gdbpy_ref.
15526
15527 2017-01-10  Tom Tromey  <tom@tromey.com>
15528
15529         * python/py-ref.h: New file.
15530
15531 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15532
15533         * cli-out.c (cli_ui_out::do_redirect): Change return type to
15534         void.
15535         * cli-out.h (cli_ui_out::do_redirect): Likewise.
15536         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15537         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15538         * ui-out.c (ui_out::redirect): Likewise.
15539         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15540         * cli/cli-logging.c (set_logging_redirect): Update call site of
15541         ui_out::redirect.
15542         (handle_redirections): Likewise.
15543         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15544         * top.c (execute_command_to_string): Likewise.
15545         * utils.c (do_ui_out_redirect_pop): Likewise.
15546
15547 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15548
15549         * stack.c (_initialize_stack): Update "frame" command help message.
15550
15551 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
15552
15553         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15554
15555 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15556
15557         * x86-linux-nat.h: Include gdb_proc_service.h.
15558
15559 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15560
15561         * ser-base.h: Include serial.h.
15562
15563 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15564
15565         * ppc-linux-tdep.h: Include ppc-tdep.h.
15566
15567 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15568
15569         * nat/amd64-linux-siginfo.h: Include signal.h.
15570
15571 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15572
15573         * nat/aarch64-linux-hw-point.h: Include break-common.h.
15574
15575 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15576
15577         * mi/mi-parse.h: Include mi-cmds.h.
15578
15579 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15580
15581         * inf-loop.c: Don't include "target.h".
15582         * inf-loop.h: Include it here.
15583
15584 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15585
15586         * dfp.h: Include "dboulest.h" and "expression.h".
15587
15588 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15589
15590         * ax-gdb.h: Include "ax.h".
15591
15592 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15593
15594         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15595         with nat/gdb_ptrace.h.
15596
15597 2017-01-05  Yao Qi  <yao.qi@linaro.org>
15598
15599         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15600         new line.
15601         (mips64_fbsd_sigframe_init): Likewise.
15602
15603 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15604
15605         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15606         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15607
15608 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15609
15610         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15611         * NEWS: Mention new FreeBSD/mips native configuration.
15612         * config/mips/fbsd.mh: New file.
15613         * configure.host: Add mips*-*-freebsd*.
15614         * mips-fbsd-nat.c: New file.
15615
15616 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15617
15618         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15619         (ALLDEPFILES): Add mips-fbsd-tdep.c.
15620         * NEWS: Mention new FreeBSD/mips target.
15621         * configure.tgt: Add mips*-*-freebsd*.
15622         * mips-fbsd-tdep.c: New file.
15623         * mips-fbsd-tdep.h: New file.
15624
15625 2017-01-04  Yao Qi  <yao.qi@linaro.org>
15626
15627         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15628         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15629
15630 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15631
15632         Update copyright year range in all GDB files.
15633
15634 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15635
15636         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15637
15638 For older changes see ChangeLog-2016.
15639 \f
15640 Local Variables:
15641 mode: change-log
15642 left-margin: 8
15643 fill-column: 74
15644 version-control: never
15645 coding: utf-8
15646 End: