Make the linespec/location completer ignore data symbols
[external/binutils.git] / gdb / ChangeLog
1 2017-11-08  Pedro Alves  <palves@redhat.com>
2
3         * ada-lang.c (ada_make_symbol_completion_list): Use
4         completion_skip_symbol.
5         * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
6         (symbol_is_function_or_method(symbol*)): New.
7         (add_symtab_completions): Add complete_symbol_mode parameter.  Use
8         completion_skip_symbol.
9         (default_collect_symbol_completion_matches_break_on): Use
10         completion_skip_symbol.  Pass down mode.
11         (collect_file_symbol_completion_matches): Pass down mode.
12         * symtab.h (symbol_is_function_or_method): New declarations.
13         (completion_skip_symbol): New template function.
14
15 2017-11-08  Pedro Alves  <palves@redhat.com>
16
17         * linespec.c (iterate_over_all_matching_symtabs): Add
18         search_domain parameter.  Pass it down to expand_symtabs_matching.
19         (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
20         (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
21         search_domain.
22         (add_all_symbol_names_from_pspace): Add search_domain parameter.
23         Pass it down.
24         (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
25         symbols.
26         (add_matching_symbols_to_info): Add search_domain parameter.  Pass
27         it down.
28
29 2017-11-08  Pedro Alves  <palves@redhat.com>
30
31         * ada-lang.c (ada_make_symbol_completion_list): Remove text and
32         text_len locals and don't pass them down.
33         * symtab.c (completion_list_add_name): Remove
34         sym_text/sym_text_len parameters and adjust.
35         (completion_list_add_symbol, completion_list_add_msymbol)
36         (completion_list_objc_symbol, completion_list_add_fields)
37         (add_symtab_completions): Likewise.
38         (default_collect_symbol_completion_matches_break_on)
39         (collect_file_symbol_completion_matches): Remove sym_text_len
40         local and don't pass it down.
41         * symtab.h (completion_list_add_name): Remove
42         sym_text/sym_text_len parameters.
43
44 2017-11-08  Pedro Alves  <palves@redhat.com>
45
46         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
47         unittests/lookup_name_info-selftests.c.
48         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
49         * cp-support.c: Include "selftest.h".
50         (cp_remove_params_1): Rename from cp_remove_params.  Add
51         'require_param' parameter, and handle it.
52         (cp_remove_params): Reimplement.
53         (cp_remove_params_if_any): New.
54         (selftests::quote): New.
55         (selftests::check_remove_params): New.
56         (selftests::test_cp_remove_params): New.
57         (_initialize_cp_support): Install
58         selftests::test_cp_remove_params.
59         * cp-support.h (cp_remove_params_if_any): Declare.
60         * dwarf2read.c :Include "selftest.h".
61         (dw2_expand_symtabs_matching_symbol): Use
62         lookup_name_info::make_ignore_params.
63         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
64         (selftests::dw2_expand_symtabs_matching::string_or_null)
65         (selftests::dw2_expand_symtabs_matching::check_match)
66         (selftests::dw2_expand_symtabs_matching::test_symbols)
67         (selftests::dw2_expand_symtabs_matching::run_test): New.
68         (_initialize_dwarf2_read): Register
69         selftests::dw2_expand_symtabs_matching::run_test.
70         * psymtab.c (psym_expand_symtabs_matching): Use
71         lookup_name_info::make_ignore_params.
72         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
73         If the lookup name wants to ignore parameters, strip them.
74         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
75         code handling '('.
76         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
77         (default_collect_symbol_completion_matches_break_on): Don't try to
78         strip parameters.
79         * symtab.h (lookup_name_info::lookup_name_info): Add
80         'ignore_parameters' parameter.
81         (lookup_name_info::ignore_parameters)
82         (lookup_name_info::make_ignore_params): New methods.
83         (lookup_name_info::m_ignore_parameters): New field.
84         * unittests/lookup_name_info-selftests.c: New file.
85
86 2017-11-08  Pedro Alves  <palves@redhat.com>
87
88         * dwarf2read.c (dw2_expand_marked_cus)
89         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
90         (dw2_expand_symtabs_matching): Move further below.
91         (dw2_expand_marked_cus): Reindent.
92
93 2017-11-08  Pedro Alves  <palves@redhat.com>
94
95         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
96         (struct name_component): New.
97         (mapped_index::name_components): New field.
98         (mapped_index::symbol_name_at): New method.
99         (dwarf2_read_index): Call mapped_index ctor.
100         (dw2_map_matching_symbols): Add comment about name_components
101         table.
102         (dw2_expand_symtabs_matching): Factor part to...
103         (dw2_expand_symtabs_matching_symbol): ... this new function.
104         Build name components table, and lookup symbols in it before
105         calling the name matcher.
106         (dw2_expand_marked_cus): New, factored out from
107         dw2_expand_symtabs_matching.
108         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
109
110 2017-11-08   Pedro Alves  <palves@redhat.com>
111
112         * ada-lang.c (ada_encode): Rename to ..
113         (ada_encode_1): ... this.  Add throw_errors parameter and handle
114         it.
115         (ada_encode): Reimplement.
116         (match_name): Delete, folded into full_name.
117         (resolve_subexp): No longer pass the encoded name to
118         ada_lookup_symbol_list.
119         (should_use_wild_match): Delete.
120         (name_match_type_from_name): New.
121         (ada_lookup_simple_minsym): Use lookup_name_info and the
122         language's symbol_name_matcher_ftype.
123         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
124         (ada_add_block_renamings): Adjust to use lookup_name_info.
125         (ada_lookup_name): New.
126         (add_nonlocal_symbols, ada_add_all_symbols)
127         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
128         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
129         (ada_name_for_lookup): Delete.
130         (ada_lookup_encoded_symbol): Construct a verbatim name.
131         (wild_match): Reverse sense of return type.  Use bool.
132         (full_match): Reverse sense of return type.  Inline bits of old
133         match_name here.
134         (ada_add_block_symbols): Adjust to use lookup_name_info.
135         (symbol_completion_match): Delete, folded into...
136         (ada_lookup_name_info::matches): ... .this new method.
137         (symbol_completion_add): Delete.
138         (ada_collect_symbol_completion_matches): Add name_match_type
139         parameter.  Adjust to use lookup_name_info and
140         completion_list_add_name.
141         (get_var_value, ada_add_global_exceptions): Adjust to use
142         lookup_name_info.
143         (ada_get_symbol_name_cmp): Delete.
144         (do_wild_match, do_full_match): New functions.
145         (ada_lookup_name_info::ada_lookup_name_info): New method.
146         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
147         functions.
148         (ada_language_defn): Install ada_get_symbol_name_matcher.
149         * ada-lex.l (processId): If name starts with '<', copy it
150         verbatim.
151         * block.c (block_iter_match_step, block_iter_match_first)
152         (block_iter_match_next, block_lookup_symbol)
153         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
154         lookup_name_info.
155         * block.h (block_iter_match_first, block_iter_match_next)
156         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
157         * c-lang.c (c_language_defn, cplus_language_defn)
158         (asm_language_defn, minimal_language_defn): Adjust comments to
159         refer to la_get_symbol_name_matcher.
160         * completer.c (complete_files_symbols)
161         (collect_explicit_location_matches, symbol_completer): Pass a
162         symbol_name_match_type down.
163         * completer.h (class completion_match, completion_match_result):
164         New classes.
165         (completion_tracker::reset_completion_match_result): New method.
166         (completion_tracker::m_completion_match_result): New field.
167         * cp-support.c (make_symbol_overload_list_block): Adjust to use
168         lookup_name_info.
169         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
170         functions.
171         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
172         * d-lang.c: Adjust comments to refer to
173         la_get_symbol_name_matcher.
174         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
175         Adjust to use lookup_name_info.
176         (dict_iter_match_first, dict_iter_match_next)
177         (iter_match_first_hashed, iter_match_next_hashed)
178         (iter_match_first_linear, iter_match_next_linear): Adjust to work
179         with a lookup_name_info.
180         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
181         Likewise.
182         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
183         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
184         (gdb_index_symbol_name_matcher): New class.
185         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
186         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
187         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
188         with a symbol_name_match_type.
189         (f_language_defn): Adjust comments to refer to
190         la_get_symbol_name_matcher.
191         * go-lang.c (go_language_defn): Adjust comments to refer to
192         la_get_symbol_name_matcher.
193         * language.c (default_symbol_name_matcher)
194         (language_get_symbol_name_matcher): New functions.
195         (unknown_language_defn, auto_language_defn): Adjust comments to
196         refer to la_get_symbol_name_matcher.
197         * language.h (symbol_name_cmp_ftype): Delete.
198         (language_defn) <la_collect_symbol_completion_matches>: Add match
199         type parameter.
200         <la_get_symbol_name_cmp>: Delete field.
201         <la_get_symbol_name_matcher>: New field.
202         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
203         (default_symbol_name_matcher, language_get_symbol_name_matcher):
204         Declare.
205         * linespec.c (iterate_over_all_matching_symtabs)
206         (iterate_over_file_blocks): Adjust to use lookup_name_info.
207         (find_methods): Add language parameter, and use lookup_name_info
208         and the language's symbol_name_matcher_ftype.
209         (linespec_complete_function): Adjust.
210         (lookup_prefix_sym): Use lookup_name_info.
211         (add_all_symbol_names_from_pspace): Adjust.
212         (find_superclass_methods): Add language parameter and pass it
213         down.
214         (find_method): Pass symbol language down.
215         (find_linespec_symbols): Don't demangle or Ada encode here.
216         (search_minsyms_for_name): Add lookup_name_info parameter.
217         (add_matching_symbols_to_info): Add name_match_type parameter.
218         Use lookup_name_info.
219         * m2-lang.c (m2_language_defn): Adjust comments to refer to
220         la_get_symbol_name_matcher.
221         * minsyms.c: Include <algorithm>.
222         (add_minsym_to_demangled_hash_table): Remove table parameter and
223         add objfile parameter.  Use search_name_hash, and add language to
224         demangled languages vector.
225         (struct found_minimal_symbols): New struct.
226         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
227         New functions.
228         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
229         input names here.  Use lookup_name_info instead.  Lookup up
230         demangled names once for each language in the demangled names
231         vector.
232         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
233         demangled names once for each language in the demangled names
234         vector.
235         (build_minimal_symbol_hash_tables): Adjust.
236         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
237         lookup_name_info.
238         * objc-lang.c (objc_language_defn): Adjust comment to refer to
239         la_get_symbol_name_matcher.
240         * objfiles.h: Include <vector>.
241         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
242         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
243         la_get_symbol_name_matcher.
244         * p-lang.c (pascal_language_defn): Adjust comment to refer to
245         la_get_symbol_name_matcher.
246         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
247         (match_partial_symbol): Use symbol_name_match_type,
248         lookup_name_info and psymbol_name_matches.
249         (lookup_partial_symbol): Use lookup_name_info.
250         (map_block): Use symbol_name_match_type and lookup_name_info.
251         (psym_map_matching_symbols): Use symbol_name_match_type.
252         (psymbol_name_matches): New.
253         (recursively_search_psymtabs): Use lookup_name_info and
254         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
255         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
256         'kind' parameter to 'domain'.
257         * rust-lang.c (rust_language_defn): Adjust comment to refer to
258         la_get_symbol_name_matcher.
259         * symfile-debug.c (debug_qf_map_matching_symbols)
260         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
261         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
262         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
263         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
264         Adjust to use symbol_name_match_type.
265         <expand_symtabs_matching>: Adjust to use lookup_name_info.
266         (expand_symtabs_matching): Adjust to use lookup_name_info.
267         * symmisc.c (maintenance_expand_symtabs): Use
268         lookup_name_info::match_any ().
269         * symtab.c (symbol_matches_search_name): New.
270         (eq_symbol_entry): Adjust to use lookup_name_info and the
271         language's matcher.
272         (demangle_for_lookup_info::demangle_for_lookup_info): New.
273         (lookup_name_info::match_any): New.
274         (iterate_over_symbols, search_symbols): Use lookup_name_info.
275         (compare_symbol_name): Add language, lookup_name_info and
276         completion_match_result parameters, and use them.
277         (completion_list_add_name): Make extern.  Add language and
278         lookup_name_info parameters.  Use them.
279         (completion_list_add_symbol, completion_list_add_msymbol)
280         (completion_list_objc_symbol): Add lookup_name_info parameters and
281         adjust.  Pass down language.
282         (completion_list_add_fields): Add lookup_name_info parameters and
283         adjust.  Pass down language.
284         (add_symtab_completions): Add lookup_name_info parameters and
285         adjust.
286         (default_collect_symbol_completion_matches_break_on): Add
287         name_match_type parameter, and use it.  Use lookup_name_info.
288         (default_collect_symbol_completion_matches)
289         (collect_symbol_completion_matches): Add name_match_type
290         parameter, and pass it down.
291         (collect_symbol_completion_matches_type): Adjust.
292         (collect_file_symbol_completion_matches): Add name_match_type
293         parameter, and use lookup_name_info.
294         * symtab.h: Include <string> and "common/gdb_optional.h".
295         (enum class symbol_name_match_type): New.
296         (class ada_lookup_name_info): New.
297         (struct demangle_for_lookup_info): New.
298         (class lookup_name_info): New.
299         (symbol_name_matcher_ftype): New.
300         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
301         (symbol_matches_search_name): Declare.
302         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
303         (default_collect_symbol_completion_matches)
304         (collect_symbol_completion_matches)
305         (collect_file_symbol_completion_matches): Add name_match_type
306         parameter.
307         (iterate_over_symbols): Use lookup_name_info.
308         (completion_list_add_name): Declare.
309         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
310         (strncmp_iw_with_mode): Now extern.
311         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
312         (strncmp_iw_with_mode): Declare.
313
314 2017-11-08  Keith Seitz  <keiths@redhat.com>
315             Pedro Alves  <palves@redhat.com>
316
317         * ada-lang.c (ada_language_defn): Install
318         default_search_name_hash.
319         * buildsym.c (struct buildsym_compunit): <language>: New field.
320         (finish_block_internal): Pass language when creating dictionaries.
321         (start_buildsym_compunit, start_symtab): New language parameters.
322         Use them.
323         (restart_symtab): Pass down compilation unit's language.
324         * buildsym.h (enum language): Forward declare.
325         (start_symtab): New 'language' parameter.
326         * c-lang.c (c_language_defn, cplus_language_defn)
327         (asm_language_defn, minimal_language_defn): Install
328         default_search_name_hash.
329         * coffread.c (coff_start_symtab): Adjust.
330         * d-lang.c (d_language_defn): Install default_search_name_hash.
331         * dbxread.c (struct symloc): Add 'pst_language' field.
332         (PST_LANGUAGE): Define.
333         (start_psymtab, read_ofile_symtab): Use it.
334         (process_one_symbol): New 'language' parameter.  Pass it down.
335         * dictionary.c (struct dictionary) <language>: New field.
336         (DICT_LANGUAGE): Define.
337         (dict_create_hashed, dict_create_hashed_expandable)
338         (dict_create_linear, dict_create_linear_expandable): New parameter
339         'language'.  Set the dictionary's language.
340         (iter_match_first_hashed): Adjust to rename.
341         (insert_symbol_hashed): Assert we don't see mismatching
342         languages.  Adjust to rename.
343         (dict_hash): Rename to ...
344         (default_search_name_hash): ... this and make extern.
345         * dictionary.h (struct language_defn): Forward declare.
346         (dict_create_hashed): New parameter 'language'.
347         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
348         * f-lang.c (f_language_defn): Install default_search_name_hash.
349         * go-lang.c (go_language_defn): Install default_search_name_hash.
350         * jit.c (finalize_symtab): Pass compunit's language to dictionary
351         creation.
352         * language.c (unknown_language_defn, auto_language_defn):
353         * language.h (language_defn::la_search_name_hash): New field.
354         (default_search_name_hash): Declare.
355         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
356         * mdebugread.c (new_block): New parameter 'language'.
357         * mdebugread.c (parse_symbol): Pass symbol language to block
358         allocation.
359         (psymtab_to_symtab_1): Pass down language.
360         (new_symtab): Pass compunit's language to block allocation.
361         * objc-lang.c (objc_language_defn): Install
362         default_search_name_hash.
363         * opencl-lang.c (opencl_language_defn):
364         * p-lang.c (pascal_language_defn): Install
365         default_search_name_hash.
366         * rust-lang.c (rust_language_defn): Install
367         default_search_name_hash.
368         * stabsread.h (enum language): Forward declare.
369         (process_one_symbol): Add 'language' parameter.
370         * symtab.c (search_name_hash): New function.
371         * symtab.h (search_name_hash): Declare.
372         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
373
374 2017-11-08  Pedro Alves  <palves@redhat.com>
375
376         * cp-name-parser.y (main): Don't initialize extra_chars.
377
378 2017-11-07  Tom Tromey  <tom@tromey.com>
379
380         * event-top.h (command_handler): Constify.
381         * record-full.c (cmd_record_full_start): Update.
382         * thread.c (thread_apply_all_command): Update.
383         * printcmd.c (eval_command): Update.
384         * mi/mi-main.c (mi_execute_cli_command): Update.
385         (mi_execute_async_cli_command): Update.
386         * tui/tui-stack.c (tui_update_command): Update.
387         * cli/cli-interp.c (safe_execute_command): Constify.
388         * record.c (record_start): Update.
389         (record_start, record_stop, cmd_record_start): Update.
390         * record-btrace.c (cmd_record_btrace_bts_start): Update.
391         (cmd_record_btrace_pt_start): Update.
392         (cmd_record_btrace_start): Update.
393         (cmd_record_btrace_start): Update.
394         * reverse.c (exec_reverse_once): Update.
395         * python/python.c (execute_gdb_command): Don't copy the command.
396         * event-top.c (command_line_handler): Update.
397         (command_handler): Constify.
398         * defs.h (deprecated_call_command_hook): Constify.
399         * cli/cli-script.h (execute_user_command): Constify.
400         * cli/cli-script.c (execute_user_command): Constify.
401         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
402         (enum command_control_type): Update.
403         * main.c (catch_command_errors): Remove non-const overload.
404         (catch_command_errors_ftype): Remove.
405         * python/py-cmd.c (cmdpy_function): Constify.
406         * guile/scm-cmd.c (cmdscm_function): Constify.
407         * cli/cli-dump.c (call_dump_func): Constify.
408         * cli/cli-decode.c (do_const_cfunc): Constify.
409         (do_sfunc): Constify.
410         (cmd_func): Constify.
411         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
412         * top.h (execute_command): Constify.
413         * top.c (execute_command): Constify.
414         (execute_command_to_string): Constify.
415         (deprecated_call_command_hook): Constify.
416         * command.h (cmd_func): Constify.
417         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
418
419 2017-11-07  Tom Tromey  <tom@tromey.com>
420
421         * ada-lang.c (catch_ada_exception_command): Constify.
422         (catch_assert_command): Constify.
423         * break-catch-throw.c (catch_catch_command, catch_throw_command)
424         (catch_rethrow_command): Constify.
425         (catch_exception_command_1): Constify.
426         * breakpoint.h (add_catch_command): Constify.
427         * break-catch-syscall.c (catch_syscall_command_1): Constify.
428         (catch_syscall_split_args): Constify.
429         * break-catch-sig.c (catch_signal_command): Constify.
430         (catch_signal_split_args): Constify.
431         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
432         cmd_const_sfunc_ftype.
433         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
434         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
435         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
436         (add_setshow_string_cmd, struct cmd_list_element)
437         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
438         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
439         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
440         Constify.
441         (set_cmd_sfunc): Constify.
442         (empty_sfunc): Constify.
443         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
444         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
445         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
446         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
447         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
448         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
449         Constify.
450         (set_cmd_sfunc): Constify.
451         (cmd_sfunc_ftype): Remove.
452         * compile/compile.c (set_compile_args): Constify.
453         * infrun.c (set_disable_randomization): Constify.
454         * infcmd.c (set_args_command, set_cwd_command): Constify.
455         * breakpoint.c (set_condition_evaluation_mode): Constify.
456         (add_catch_command): Constify.
457         (catch_fork_command_1, catch_exec_command_1)
458         (catch_load_command_1, catch_unload_command_1): Constify.
459         (catch_load_or_unload): Constify.
460         * guile/scm-param.c (pascm_set_func): Constify.
461         (add_setshow_generic): Constify.
462         * python/py-param.c (get_set_value): Constify.
463         * top.h (set_verbose): Constify.
464         * tui/tui-win.c (tui_set_var_cmd): Constify.
465         * mi/mi-main.c (set_mi_async_command): Constify.
466         * cli/cli-logging.c (set_logging_overwrite)
467         (set_logging_redirect): Constify.
468         * value.c (set_max_value_size): Constify.
469         * valprint.c (set_input_radix, set_output_radix): Constify.
470         * utils.c (set_width_command, set_height_command): Constify.
471         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
472         * tracepoint.c (set_disconnected_tracing)
473         (set_circular_trace_buffer, set_trace_buffer_size)
474         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
475         * top.c (set_history_size_command, set_verbose, set_editing)
476         (set_gdb_datadir, set_history_filename): Constify.
477         * target.c (set_targetdebug, maint_set_target_async_command)
478         (maint_set_target_non_stop_command, set_target_permissions)
479         (set_write_memory_permission): Constify.
480         (open_target): Constify.
481         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
482         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
483         * symtab.c (set_symbol_cache_size_handler): Constify.
484         * symfile.c (set_ext_lang_command): Constify.
485         * symfile-debug.c (set_debug_symfile): Constify.
486         * source.c (set_directories_command): Constify.
487         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
488         * serial.c (set_parity): Constify.
489         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
490         * remote.c (set_remote_exec_file, set_remotebreak)
491         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
492         * record.c (set_record_insn_history_size)
493         (set_record_call_history_size): Constify.
494         * record-full.c (set_record_full_insn_max_num): Constify.
495         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
496         * osabi.c (set_osabi): Constify.
497         * mips-tdep.c (set_mips64_transfers_32bit_regs)
498         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
499         * maint.c (maintenance_set_profile_cmd): Constify.
500         * linux-thread-db.c (set_libthread_db_search_path): Constify.
501         * language.c (set_language_command, set_range_command)
502         (set_case_command): Constify.
503         * infrun.c (set_non_stop, set_observer_mode)
504         (set_stop_on_solib_events, set_schedlock_func)
505         (set_exec_direction_func): Constify.
506         * infcmd.c (set_inferior_tty_command): Constify.
507         * disasm.c (set_disassembler_options_sfunc): Constify.
508         * demangle.c (set_demangling_command): Constify.
509         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
510         * cris-tdep.c (set_cris_version, set_cris_mode)
511         (set_cris_dwarf2_cfi): Constify.
512         * corefile.c (set_gnutarget_command): Constify.
513         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
514         (set_target_wide_charset_sfunc): Constify.
515         * breakpoint.c (update_dprintf_commands): Constify.
516         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
517         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
518         (set_disassembly_style_sfunc): Constify.
519         * arch-utils.c (set_endian, set_architecture): Constify.
520         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
521         * agent.c (set_can_use_agent): Constify.
522
523 2017-11-07  Tom Tromey  <tom@tromey.com>
524
525         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
526         (go32_pde, go32_pte, go32_pte_for_address): Constify.
527         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
528         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
529         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
530         (parse_int_arg, show_thread_default_detach_sc_cmd)
531         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
532         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
533         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
534         (show_task_pause_cmd, set_task_detach_sc_cmd)
535         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
536         (set_noninvasive_cmd, set_thread_pause_cmd)
537         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
538         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
539         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
540         * windows-nat.c (display_selectors): Constify.
541         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
542         non-const "cfunc".
543         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
544         (cmd_cfunc_eq): Likewise.
545         (struct cmd_list_element): Likewise.
546         (do_cfunc): Remove.
547         (cli_user_command_p): Update.
548         * command.h (add_cmd): Remove non-const overload.
549         (cmd_cfunc_ftype): Remove typedef.
550         (cmd_cfunc_eq): Remove non-const overload.
551         * value.c (show_values): Constify.
552         * thread.c (thread_apply_all_command): Constify.
553         * symfile.c (load_command): Constify.
554         * source.c (directory_command): Constify.
555         * maint.c (maintenance_internal_error)
556         (maintenance_demangler_warning, maintenance_space_display)
557         (maintenance_print_architecture, maintenance_translate_address)
558         (maintenance_info_selftests, maintenance_internal_warning):
559         Constify.
560         * breakpoint.c (disable_trace_command, enable_trace_command):
561         Constify.
562         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
563         Constify.
564         (add_auto_load_safe_path): Constify.
565         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
566         * top.h (show_commands): Constify.
567         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
568         * sparc64-tdep.c (adi_examine_command): Constify.
569         (adi_assign_command): Constify.
570
571 2017-11-07  Tom Tromey  <tom@tromey.com>
572
573         * frame.h (info_locals_command, info_args_command): Constify.
574         * auto-load.h (auto_load_info_scripts): Constify.
575         * inferior.h (registers_info): Constify.
576         * copying.c: Rebuild.
577         * copying.awk: Constify generated commands.
578         * auto-load.c (auto_load_info_scripts)
579         (info_auto_load_gdb_scripts): Constify.
580         * cli/cli-decode.c (struct cmd_list_element): Take a
581         cmd_const_cfunc_ftype.
582         * command.h (add_info): Take a cmd_const_cfunc_ftype.
583         * tui/tui-win.c (tui_all_windows_info): Constify.
584         * python/py-auto-load.c (info_auto_load_python_scripts):
585         Constify.
586         * cli/cli-cmds.c (show_command): Remove non-const overload.
587         * tracepoint.c (info_tvariables_command, info_scope_command):
588         Constify.
589         (info_static_tracepoint_markers_command): Constify.
590         * thread.c (info_threads_command): Constify.
591         (print_thread_info_1): Constify.
592         * target.c (info_target_command): Constify.
593         * symtab.c (info_sources_command, info_functions_command)
594         (info_types_command): Constify.
595         (info_variables_command): Remove non-const overload.
596         * symfile.c (info_ext_lang_command): Constify.
597         * stack.c (info_frame_command, info_locals_command)
598         (info_args_command): Constify.
599         (backtrace_command): Remove non-const overload.
600         * source.c (info_source_command, info_line_command): Constify.
601         * solib.c (info_sharedlibrary_command): Constify.
602         * skip.c (info_skip_command): Constify.
603         * ser-go32.c (info_serial_command): Constify.
604         * reverse.c (info_bookmarks_command): Constify.
605         * printcmd.c (info_symbol_command, info_address_command)
606         (info_display_command): Constify.
607         * osdata.c (info_osdata_command): Constify.
608         * objc-lang.c (info_selectors_command, info_classes_command):
609         Constify.
610         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
611         * memattr.c (info_mem_command): Constify.
612         * macrocmd.c (info_macro_command, info_macros_command): Constify.
613         * linux-fork.c (info_checkpoints_command): Constify.
614         * infrun.c (info_signals_command): Constify.
615         * inflow.c (info_terminal_command): Constify.
616         * inferior.c (info_inferiors_command): Constify.
617         (print_inferior): Constify.
618         * infcmd.c (info_program_command, info_all_registers_command)
619         (info_registers_command, info_vector_command)
620         (info_float_command): Constify.
621         (registers_info): Constify.
622         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
623         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
624         Constify.
625         * f-valprint.c (info_common_command): Constify.
626         * dcache.c (info_dcache_command): Constify.
627         (dcache_info_1): Constify.
628         * darwin-nat-info.c (info_mach_tasks_command)
629         (info_mach_task_command, info_mach_ports_command)
630         (info_mach_port_command, info_mach_threads_command)
631         (info_mach_thread_command, info_mach_regions_command)
632         (info_mach_regions_recurse_command, info_mach_region_command)
633         (info_mach_exceptions_command): Constify.
634         (get_task_from_args): Constify.
635         * cp-support.c (info_vtbl_command): Constify.
636         * breakpoint.c (info_watchpoints_command)
637         (info_tracepoints_command): Constify.
638         (info_breakpoints_command): Remove non-const overload.
639         * avr-tdep.c (avr_io_reg_read_command): Constify.
640         * auxv.c (info_auxv_command): Constify.
641         * ada-tasks.c (info_tasks_command): Constify.
642         (info_task): Constify.
643         * ada-lang.c (info_exceptions_command): Constify.
644
645 2017-11-07  Tom Tromey  <tom@tromey.com>
646
647         * solib.h (no_shared_libraries): Constify.
648         * frame.h (return_command): Constify.
649         * cli/cli-cmds.h (quit_command): Constify.
650         * top.h (quit_command, execute_command): Constify.
651         * target.h (flash_erase_command): Constify.
652         * inferior.h (set_inferior_args, attach_command): Constify.
653         * tracepoint.h (start_tracing, stop_tracing): Constify.
654         * breakpoint.h (break_command, tbreak_command)
655         (hbreak_command_wrapper, thbreak_command_wrapper)
656         (rbreak_command_wrapper, watch_command_wrapper)
657         (awatch_command_wrapper, rwatch_command_wrapper)
658         (get_tracepoint_by_number): Constify.
659         * symtab.c (info_variables_command, rbreak_command)
660         (symtab_symbol_info): Constify.
661         (info_variables_command): Add non-const overload.
662         * top.c (dont_repeat_command): Constify.
663         * breakpoint.c (ignore_command, commands_command)
664         (condition_command, tbreak_command, hbreak_command)
665         (thbreak_command, clear_command, break_command)
666         (info_breakpoints_command, watch_command, rwatch_command)
667         (awatch_command, trace_command, ftrace_command, strace_command)
668         (trace_pass_command, break_range_command, dprintf_command)
669         (agent_printf_command, get_tracepoint_by_number)
670         (watch_maybe_just_location, trace_pass_command): Constify.
671         (info_breakpoints_command): Add non-const overload.
672         * tracefile.c (tsave_command): Constify.
673         * infcmd.c (attach_command, disconnect_command, signal_command)
674         (queue_signal_command, stepi_command, nexti_command)
675         (finish_command, next_command, step_command, until_command)
676         (advance_command, jump_command, continue_command, run_command)
677         (start_command, starti_command, interrupt_command)
678         (run_command_1, set_inferior_args, step_1): Constify.
679         * inferior.c (add_inferior_command, remove_inferior_command)
680         (clone_inferior_command): Constify.
681         * linux-fork.c (checkpoint_command, restart_command): Constify.
682         * windows-nat.c (signal_event_command): Constify.
683         * guile/guile.c (guile_repl_command, guile_command): Constify.
684         * printcmd.c (x_command, display_command, printf_command)
685         (output_command, set_command, call_command, print_command)
686         (eval_command): Constify.
687         (non_const_set_command): Remove.
688         (_initialize_printcmd): Update.
689         * source.c (forward_search_command, reverse_search_command):
690         Constify.
691         * jit.c (jit_reader_load_command, jit_reader_unload_command):
692         Constify.
693         * infrun.c (handle_command): Constify.
694         * memattr.c (mem_command): Constify.
695         * stack.c (return_command, up_command, up_silently_command)
696         (down_command, down_silently_command, frame_command)
697         (backtrace_command, func_command, backtrace_command_1): Constify.
698         (backtrace_command): Add non-const overload.
699         * remote-sim.c (simulator_command): Constify.
700         * exec.c (set_section_command): Constify.
701         * tracepoint.c (tdump_command, trace_variable_command)
702         (tstatus_command, tstop_command, tstart_command)
703         (end_actions_pseudocommand, while_stepping_pseudocommand)
704         (collect_pseudocommand, teval_pseudocommand, actions_command)
705         (start_tracing, stop_tracing): Constify.
706         * value.c (init_if_undefined_command): Constify.
707         * tui/tui-stack.c (tui_update_command): Constify.
708         * tui/tui-win.c (tui_refresh_all_command)
709         (tui_set_tab_width_command, tui_set_win_height_command)
710         (tui_set_focus_command, tui_scroll_forward_command)
711         (tui_scroll_backward_command, tui_scroll_left_command)
712         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
713         (tui_set_win_height): Constify.
714         * tui/tui-layout.c (tui_layout_command): Constify.
715         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
716         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
717         (proc_untrace_sysexit_cmd): Constify.
718         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
719         (threadset_test_cmd, threadlist_update_test_cmd)
720         (threadalive_test): Constify.
721         * objc-lang.c (print_object_command): Constify.
722         * command.h (add_com): Constify.
723         * cli/cli-dump.c (restore_command): Constify.
724         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
725         (help_command, complete_command, shell_command, edit_command)
726         (list_command, disassemble_command, make_command)
727         (apropos_command, alias_command): Constify.
728         * cli/cli-script.c (document_command, define_command)
729         (while_command, if_command, validate_comname): Constify.
730         * cli/cli-decode.c (struct cmd_list_element): Change type of
731         "fun".
732         * target.c (do_monitor_command, flash_erase_command): Constify.
733         * regcache.c (reg_flush_command): Constify.
734         * reverse.c (reverse_step, reverse_next, reverse_stepi)
735         (reverse_nexti, reverse_continue, reverse_finish)
736         (save_bookmark_command, goto_bookmark_command)
737         (exec_reverse_once): Constify.
738         * python/python.c (python_interactive_command, python_command):
739         Constify.
740         * typeprint.c (ptype_command, whatis_command, whatis_exp):
741         Constify.
742         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
743         * gcore.c (gcore_command): Constify.
744
745 2017-11-07  Tom Tromey  <tom@tromey.com>
746
747         * printcmd.c (x_command): Call set_repeat_arguments.
748         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
749         * top.c (repeat_arguments): New global.
750         (set_repeat_arguments): New function.
751         (execute_command): Handle repeat_arguments.
752         (show_commands): Calls set_repeat_arguments.
753         * command.h (set_repeat_arguments): Declare.
754
755 2017-11-07  Tom Tromey  <tom@tromey.com>
756
757         * stack.c (backtrace_command): Use std::string.
758         (backtrace_command_1): Make "count_exp" const.
759
760 2017-11-07  Tom Tromey  <tom@tromey.com>
761
762         * source.c (directory_switch, mod_path, add_path): Constify.
763         * defs.h (add_path, mod_path, directory_switch): Constify.
764         * mi/mi-cmd-env.c (env_mod_path): Constify.
765
766 2017-11-07  Tom Tromey  <tom@tromey.com>
767
768         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
769         (run_command_1, continue_command, step_1, jump_command)
770         (signal_command, until_command, advance_command, finish_command)
771         (attach_command): Update.
772
773 2017-11-07  Tom Tromey  <tom@tromey.com>
774
775         * command.h (set_cmd_cfunc): Don't declare.
776         * cli/cli-decode.c (set_cmd_cfunc): Now static.
777
778 2017-11-07  Tom Tromey  <tom@tromey.com>
779
780         * stack.c (select_frame_command): Constify.
781         * cli/cli-decode.c (add_com_suppress_notification): Constify.
782         * command.h (add_com_suppress_notification): Constify.
783
784 2017-11-07  Tom Tromey  <tom@tromey.com>
785
786         * breakpoint.c (stop_command): Constify.
787         * cli/cli-decode.c (struct cmd_list_element): Constify.
788         * command.h (add_abbrev_prefix_cmd): Constify.
789
790 2017-11-07  Pedro Alves  <palves@redhat.com>
791
792         * breakpoint.c (extract_bp_kind): New enum.
793         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
794         factored out from ...
795         (extract_bp_number_and_location): ... here.
796         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
797
798 2017-11-07  Pedro Alves  <palves@redhat.com>
799
800         * breakpoint.c (extract_bp_number_and_location): Change return
801         type to void.  Throw error instead of warning.
802         (enable_disable_command): Adjust.
803
804 2017-11-07  Xavier Roirand  <roirand@adacore.com>
805             Pedro Alves  <palves@redhat.com>
806
807         * breakpoint.c (map_breakpoint_number_range): New, factored out
808         from ...
809         (map_breakpoint_numbers): ... here.
810         (find_location_by_number): Change parameters from string to
811         breakpoint number and location.
812         (extract_bp_number_and_location): New function.
813         (enable_disable_bp_num_loc)
814         (enable_disable_breakpoint_location_range)
815         (enable_disable_command): New functions, factored out ...
816         (enable_command, disable_command): ... these functions, and
817         adjusted to support ranges.
818         * NEWS: Document enable/disable breakpoint location range feature.
819
820 2017-11-06  Luis Machado  <luis.machado@linaro.org>
821
822         * MAINTAINERS (Write After Approval): Update my e-mail address.
823
824 2017-11-06  Pedro Alves  <palves@redhat.com>
825
826         * gnu-nat.c (gnu_terminal_init): Delete.
827         (gnu_target): Don't install gnu_terminal_init.
828         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
829         (child_terminal_init): ... this function.
830
831 2017-11-06  Pedro Alves  <palves@redhat.com>
832
833         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
834         sgtty.h.
835         * config.in, configure: Regenerate.
836
837 2017-11-06  Pedro Alves  <palves@redhat.com>
838
839         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
840         (async_init_signals): Adjust.
841         (handle_stop_sig): Rename to ...
842         (handle_sigtstp): ... this.
843         (async_stop_sig): Rename to ...
844         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
845         SIGTSTP path.
846         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
847         instead of STOP_SIGNAL thoughout.
848         (handle_stop_sig): Rename to ...
849         (handle_sigtstp): ... this.
850         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
851
852 2017-11-06  Pedro Alves  <palves@redhat.com>
853
854         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
855         longer set flags twice in row.
856
857 2017-11-06  Pedro Alves  <palves@redhat.com>
858
859         * Makefile.in (SER_HARDWIRE): Update comment.
860         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
861         * common/gdb_termios.h: Delete file.
862         * common/job-control.c: Include termios.h and unistd.h instead of
863         gdb_termios.h.
864         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
865         check.
866         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
867         Remove sgtty code.
868         * configure.ac: No longer check for termio.h and sgtty.h.
869         * configure: Regenerate.
870         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
871         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
872         Replace PROCESS_GROUP_TYPE references with pid_t references
873         throughout.
874         (gdb_getpgrp): Delete.
875         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
876         (child_terminal_inferior): Remove comment.  Remove sgtty code.
877         (child_terminal_ours_1): Use tcgetpgrp directly instead of
878         gdb_getpgrp.  Use serial_set_tty_state instead aof
879         serial_noflush_set_tty_state.  Remove sgtty code.
880         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
881         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
882         (inferior_process_group): Now returns pid_t.
883         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
884         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
885         * ser-event.c (serial_event_ops): Update.
886         * ser-go32.c (dos_noflush_set_tty_state): Delete.
887         (dos_ops): Update.
888         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
889         * ser-pipe.c (pipe_ops): Update.
890         * ser-tcp.c (tcp_ops): Update.
891         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
892         HAVE_TERMIOS checks.
893         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
894         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
895         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
896         assume termios.
897         (hardwire_noflush_set_tty_state): Delete.
898         (hardwire_print_tty_state, hardwire_drain_output)
899         (hardwire_flush_output, hardwire_flush_input)
900         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
901         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
902         code, and assume termios.
903         (hardwire_ops): Update.
904         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
905         * serial.c (serial_noflush_set_tty_state): Delete.
906         * serial.h (serial_noflush_set_tty_state): Delete.
907         (serial_ops::noflush_set_tty_state): Delete.
908
909 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
910
911         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
912         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
913         (COMMON_OBS): Remove doublest.o and dfp.o.
914         Do not build target-float.c (instead of doublest.c)
915         with -Wformat-nonliteral.
916
917         * doublest.c: Remove file.
918         * doublest.h: Remove file.
919         * dfp.c: Remove file.
920         * dfp.h: Remove file.
921
922         * target-float.c: Do not include "doublest.h" and "dfp.h".
923         (DOUBLEST): Move here from doublest.h.
924         (enum float_kind): Likewise.
925         (FLOATFORMAT_CHAR_BIT): Likewise.
926         (FLOATFORMAT_LARGEST_BYTES): Likewise.
927         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
928         (floatformat_precision): Likewise.
929         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
930         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
931         Likewise.
932         (host_float_format, host_double_format, host_long_double_format):
933         Likewise.
934         (floatformat_to_string, floatformat_from_string): Likewise.
935         (floatformat_to_doublest): Likewise.  Also, inline the original
936         convert_floatformat_to_doublest.
937         (floatformat_from_doublest): Likewise.  Also, inline the original
938         convert_floatformat_from_doublest.
939
940         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
941         (MAX_DECIMAL_STRING): Move here from dfp.c.
942         (match_endianness): Likewise.
943         (set_decnumber_context, decimal_check_errors): Likewise.
944         (decimal_from_number, decimal_to_number): Likewise.
945         (decimal_to_string, decimal_from_string): Likewise.  Make static.
946         (decimal_from_longest, decimal_from_ulongest): Likewise.
947         (decimal_to_longest): Likewise.
948         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
949         (decimal_convert): Likewise.
950
951 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
952
953         * doublest.c: Do not include "gdbtypes.h".
954         (extract_typed_floating): Remove.
955         (store_typed_floating): Remove.
956         (convert_typed_floating): Remove.
957         * doublest.h (struct type): Remove.
958         (DOUBLEST_PRINT_FORMAT): Remove.
959         (DOUBLEST_SCAN_FORMAT): Remove.
960         (extract_typed_floating): Remove.
961         (store_typed_floating): Remove.
962         (convert_typed_floating): Remove.
963
964         * dfp.c (decimal_from_doublest): Remove.
965         (decimal_to_doublest): Remove.
966         * dfp.h: Do not include "doublest.h".
967         (decimal_from_doublest): Remove.
968         (decimal_to_doublest): Remove.
969
970         * value.c: Do not include "doublest.h" and "dfp.h".
971         (value_as_double): Remove.
972         (unpack_double): Remove.
973         (value_from_double): Remove.
974         (value_from_decfloat): Remove.
975         * value.h: Do not include "doublest.h".
976         (value_as_double): Remove.
977         (unpack_double): Remove.
978         (value_from_double): Remove.
979         (value_from_decfloat): Remove.
980
981 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
982
983         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
984         (i386_extract_return_value): Use target_float_convert.
985         (i386_store_return_value): Likewise.
986         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
987         (i387_value_to_register): Likewise.
988         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
989         (ia64_register_to_value): Use target_float_convert.
990         (ia64_value_to_register): Likewise.
991         (ia64_extract_return_value): Likewise.
992         (ia64_store_return_value): Likewise.
993         (ia64_push_dummy_call): Likewise.
994         * m68k-tdep.c: Include "target-float.h".
995         (m68k_register_to_value): Use target_float_convert.
996         (m68k_value_to_register): Likewise.
997         (m68k_svr4_extract_return_value): Likewise.
998         (m68k_svr4_store_return_value): Likewise.
999         * ppc-sysv-tdep.c: Include "target-float.h".
1000         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1001         (do_ppc_sysv_return_value): Likewise.
1002         (ppc64_sysv_abi_push_freg): Likewise.
1003         (ppc64_sysv_abi_return_value_base): Likewise.
1004         * rs6000-aix-tdep.c: Include "target-float.h".
1005         (rs6000_push_dummy_call): Use target_float_convert.
1006         (rs6000_return_value): Likewise.
1007         * rs6000-lynx178-tdep.c: Include "target-float.h".
1008         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1009         (rs6000_lynx178_return_value): Likewise.
1010         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1011         (rs6000_register_to_value): Use target_float_convert.
1012         (rs6000_value_to_register): Likewise.
1013         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1014         (arm_extract_return_value): Use target_float_convert.
1015         (arm_store_return_value): Likewise.
1016         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1017         (sh_register_convert_to_virtual): Use target_float_convert.
1018         (sh_register_convert_to_raw): Likewise.
1019         * sh64-tdep.c: Include "target-float.h".
1020         (sh64_extract_return_value): Use target_float_convert.
1021         (sh64_register_convert_to_virtual): Likewise.
1022         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
1023
1024 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1025
1026         * target-float.c (floatformat_to_host_double): New function.
1027         (floatformat_from_host_double): Likewise.
1028         (target_float_to_host_double): Likewise.
1029         (target_float_from_host_double): Likewise.
1030         * target-float.h (target_float_to_host_double): Add prototype.
1031         (target_float_from_host_double): Likewise.
1032
1033         * guile/scm-value.c: Include "target-float.h".
1034         (gdbscm_value_to_real): Use target_float_to_host_double.
1035         Handle integer source values via value_as_long.
1036         * guile/scm-math.c: Include "target-float.h".  Do not include
1037         "doublest.h", "dfp.h", and "expression.h".
1038         (vlscm_convert_typed_number): Use target_float_from_host_double.
1039         (vlscm_convert_number): Likewise.
1040
1041         * python/py-value.c (valpy_float): Use target_float_to_host_double.
1042         (convert_value_from_python): Use target_float_from_host_double.
1043
1044 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1045
1046         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1047         (cast_from_fixed): Likewise.
1048         (ada_scaling_type): New function.
1049         (ada_delta): Return value instead of DOUBLEST.  Perform target
1050         arithmetic instead of host arithmetic.
1051         (scaling_factor): Rename to ...
1052         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
1053         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
1054         (ada_fixed_to_float): Remove.
1055         (ada_float_to_fixed): Remove.
1056         * ada-lang.h (ada_fixed_to_float): Remove.
1057         (ada_float_to_fixed): Remove.
1058         (ada_delta): Return value instead of DOUBLEST.
1059         (ada_scaling_factor): Add prototype.
1060
1061         * ada-typeprint.c: Include "target-float.h".
1062         (print_fixed_point_type): Perform target arithmetic instead of
1063         host arithmetic.
1064         * ada-valprint.c: Include "target-float.h".
1065         (ada_val_print_num): Perform target arithmetic instead of
1066         host arithmetic for fixed-point types.
1067
1068 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1069
1070         * target-float.c: Include <math.h>.
1071         (floatformat_binop): New function.
1072         (floatformat_compare): Likewise.
1073         (target_float_binop): Likewise.
1074         (target_float_compare): Likewise.
1075         * target-float.h: Include "expression.h".
1076         (target_float_binop): Add prototype.
1077         (target_float_compare): Likewise.
1078
1079         * valarith.c: Do not include "doublest.h" and "dfp.h".
1080         Include "common/byte-vector.h".
1081         (value_args_as_decimal): Remove, replace by ...
1082         (value_args_as_target_float): ... this function.  Handle both
1083         binary and decimal target floating-point formats.
1084         (scalar_binop): Handle both binary and decimal FP using
1085         value_args_as_target_float and target_float_binop.
1086         (value_equal): Handle both binary and decimal FP using
1087         value_args_as_target_float and target_float_compare.
1088         (value_less): Likewise.
1089         (value_pos): Handle all scalar types as simple copy.
1090         (value_neg): Handle all scalar types via BINOP_SUB from 0.
1091         * dfp.c (decimal_binop): Throw error instead of internal_error
1092         when called with an unsupported operation code.
1093
1094 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1095
1096         * target-float.c (target_float_to_string): New function.
1097         (target_float_from_string): New function.
1098         * target-float.h (target_float_to_string): Add prototype.
1099         (target_float_from_string): Add prototype.
1100
1101         * valprint.c: Include "target-float.h".  Do not include
1102         "doublest.h" and "dfp.h".
1103         (print_floating): Use target_float_to_string.
1104         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
1105         (printf_floating): Use target_float_to_string.
1106         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1107         (print_i387_value): Use target_float_to_string.
1108         * mips-tdep.c: Include "target-float.h".
1109         (mips_print_fp_register): Use target_float_to_string.
1110         * sh64-tdep.c: Include "target-float.h".
1111         (sh64_do_fp_register): Use target_float_to_string.
1112
1113         * parse.c: Include "target-float.h".  Do not include
1114         "doublest.h" and "dfp.h".
1115         (parse_float): Use target_float_from_string.
1116         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
1117         (define_symbol): Use target_float_from_string.
1118         * gdbarch-selftests.c: Include "target-float.h".
1119         (register_to_value_test): Use target_float_from_string.
1120
1121 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1122
1123         * Makefile.c (SFILES): Add target-float.c.
1124         (HFILES_NO_SRCDIR): Add target-float.h.
1125         (COMMON_OBS): Add target-float.o.
1126         * target-float.h: New file.
1127         * target-float.c: New file.
1128
1129         * doublest.c (floatformat_classify): Fix detection of float_zero.
1130
1131         * gdbtypes.c (is_floating_type): New function.
1132         * gdbtypes.h (is_floating_type): Add prototype.
1133
1134         * value.c: Do not include "floatformat.h".
1135         (unpack_double): Use target_float_is_valid.
1136         (is_floating_value): New function.
1137         * value.h (is_floating_value): Add prototype-
1138
1139         * valarith.c: Include "target-float.h".
1140         (value_logical_not): Use target_float_is_zero.
1141
1142         * python/py-value.c: Include "target-float.h".
1143         (valpy_nonzero): Use target_float_is_zero.
1144
1145 2017-11-04  Tom Tromey  <tom@tromey.com>
1146
1147         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1148
1149 2017-11-04  Tom Tromey  <tom@tromey.com>
1150
1151         * breakpoint.c (set_momentary_breakpoint): Return
1152         breakpoint_up.
1153         (until_break_command): Update.
1154         (new_until_break_fsm): Change argument types to
1155         breakpoint_up.
1156         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1157         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1158         Remove.
1159         * infcmd.c (finish_forward): Update.
1160         * breakpoint.h (set_momentary_breakpoint)
1161         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1162         (make_cleanup_delete_breakpoint): Remove.
1163         (struct breakpoint_deleter): New.
1164         (breakpoint_up): New typedef.
1165         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1166         (insert_exception_resume_breakpoint): Update.
1167         (insert_exception_resume_from_probe): Update.
1168         (insert_longjmp_resume_breakpoint): Update.
1169         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1170         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1171         * infcall.c (call_function_by_hand_dummy): Update
1172
1173 2017-11-04  Tom Tromey  <tom@tromey.com>
1174
1175         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1176
1177 2017-11-04  Tom Tromey  <tom@tromey.com>
1178
1179         * linux-tdep.c (linux_core_info_proc_mappings): Use
1180         gdb::def_vector.
1181         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
1182         "size" argument.
1183         (linux_corefile_thread): Update.
1184         (linux_make_corefile_notes): Remove unused variable.
1185
1186 2017-11-04  Tom Tromey  <tom@tromey.com>
1187
1188         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1189         gdb::byte_vector.
1190
1191 2017-11-04  Tom Tromey  <tom@tromey.com>
1192
1193         * objfiles.c (do_free_objfile_cleanup): Remove.
1194         * compile/compile-object-load.c (compile_object_load): Update.
1195         * objfiles.h (make_cleanup_free_objfile): Remove.
1196
1197 2017-11-04  Tom Tromey  <tom@tromey.com>
1198
1199         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1200         (adi_read_versions): Change "tags" to "gdb_byte *".
1201         (adi_print_versions): Likewise.
1202
1203 2017-11-04  Tom Tromey  <tom@tromey.com>
1204
1205         * breakpoint.c
1206         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1207         from start_rbreak_breakpoints.
1208         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1209         * breakpoint.h (class scoped_rbreak_breakpoints): New.
1210         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1211         * symtab.c (do_end_rbreak_breakpoints): Remove.
1212         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1213
1214 2017-11-04  Tom Tromey  <tom@tromey.com>
1215
1216         * cp-namespace.c (reset_directive_searched): Remove.
1217         (cp_lookup_symbol_via_imports): Use scoped_restore.
1218         * cp-support.c (reset_directive_searched): Remove.
1219         (make_symbol_overload_list_using): Use scoped_restore.
1220         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1221         (reset_directive_searched): Remove.
1222
1223 2017-11-04  Tom Tromey  <tom@tromey.com>
1224
1225         * symfile.c (find_separate_debug_file_by_debuglink): Use
1226         unique_xmalloc_ptr.
1227
1228 2017-11-04  Tom Tromey  <tom@tromey.com>
1229
1230         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1231         type of "info".
1232         (compute_stack_depth): Likewise.
1233         (do_compile_dwarf_expr_to_c): Use std::vector.
1234
1235 2017-11-04  Tom Tromey  <tom@tromey.com>
1236
1237         * compile/compile-object-load.c (link_callbacks_einfo): Use
1238         std::string.
1239
1240 2017-11-04  Tom Tromey  <tom@tromey.com>
1241
1242         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1243         Use scoped_free_pendings.
1244         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1245         scoped_free_pendings.
1246         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1247         (xcoff_initial_scan): Likewise.
1248         * buildsym.c (reset_symtab_globals): Update comment.
1249         (scoped_free_pendings): Rename from really_free_pendings.
1250         (prepare_for_building): Update comment.
1251         (buildsym_init): Likewise.
1252         * buildsym.h (class scoped_free_pendings): New class.
1253         (really_free_pendings): Don't declare.
1254
1255 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
1256
1257         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1258         output when converting a zero value to a special byteorder format.
1259
1260 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1261
1262         * frame.c (do_frame_register_read): Remove aspace.
1263         * jit.c (jit_frame_sniffer): Likwise.
1264         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1265         * regcache.c (regcache::regcache): Pass nullptr.
1266         (regcache_print): Caller updated.
1267         * regcache.h (regcache::regcache): Remove one constructor
1268         parameter aspace.
1269
1270 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1271
1272         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1273
1274 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1275
1276         * breakpoint.c (insert_single_step_breakpoints): Update.
1277         * frame.c (struct frame_info) <aspace>: Add const.
1278         (frame_save_as_regcache): Add const.
1279         (get_frame_address_space): Return const address_space *.
1280         * frame.h (get_frame_address_space): Update declaration.
1281         * infrun.c (struct step_over_info) <aspace>: Add const.
1282         (set_step_over_info): Make aspace const.
1283         (displaced_step_prepare_throw): Change variable const.
1284         (resume): Likewise.
1285         (proceed): Likewise.
1286         (adjust_pc_after_break): Likewise.
1287         (save_waitstatus): Likewise.
1288         (handle_signal_stop): Likewise.
1289         (keep_going_pass_signal): Likewise.
1290         * jit.c (jit_frame_sniffer): Add const.
1291         * mips-tdep.c (mips_single_step_through_delay): Likewise.
1292         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1293         * record-full.c (record_full_wait_1): Likewise.
1294         * regcache.c (regcache::regcache): Change parameter to const.
1295         * regcache.h (regcache::regcache): Likewise.
1296         (regcache::aspace): Return const address_space *.
1297         (regcache) <m_aspace>: Add const.
1298
1299 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1300
1301         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1302         * frame.c (create_sentinel_frame): Likewise.
1303         * infrun.c (displaced_step_prepare_throw): Likewise.
1304         (resume): Likewise.
1305         (thread_still_needs_step_over_bp): Likewise.
1306         (proceed): Likewise.
1307         (do_target_wait): Likewise.
1308         (adjust_pc_after_break): Likewise.
1309         (handle_syscall_event): Likewise.
1310         (save_waitstatus): Likewise.
1311         (handle_inferior_event_1): Likewise.
1312         (handle_signal_stop): Likewise.
1313         (keep_going_pass_signal): Likewise.
1314         * linux-nat.c (status_callback): Likewise.
1315         (save_stop_reason): Likewise.
1316         (resume_stopped_resumed_lwps): Likewise.
1317         * record-full.c (record_full_exec_insn): Likewise.
1318         (record_full_wait_1): Likewise.
1319         * regcache.c (get_regcache_aspace): Remove.
1320         * regcache.h (get_regcache_aspace): Remove.
1321
1322 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1323
1324         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1325         (init_regcache_descr): Use gdbarch_num_regs.
1326         (regcache::regcache): Likewise.
1327         (regcache::get_register_status): Likewise.
1328         (regcache::assert_raw_regnum): Likewise.
1329         (regcache::cooked_read): Likewise.
1330         (regcache::cooked_read_value): Likewise.
1331         (regcache::cooked_write): Likewise.
1332         (regcache::dump): Likewise.
1333         (regcache::num_raw_registers): New method.
1334         * regcache.h (class regcache) <num_raw_registers>: New.
1335
1336 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1337
1338         * regcache.c (regcache::assert_regnum): New method.
1339         (regcache::invalidate): Call assert_regnum.
1340         (regcache::raw_update): Likewise.
1341         (regcache::raw_write): Likewise.
1342         (regcache::raw_read_part): Likewise.
1343         (regcache::raw_write_part): Likewise.
1344         (regcache::raw_supply): Likewise.
1345         (regcache::raw_supply_integer): Likewise.
1346         (regcache::raw_supply_zeroed): Likewise.
1347         (regcache::raw_collect): Likewise.
1348         (regcache::raw_collect_integer): Likewise.
1349         * regcache.h (regcache::assert_regnum): Declare.
1350
1351 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1352
1353         * regcache.c (regcache::dump): Remove code.
1354
1355 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1356
1357         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1358         Remove.
1359         <sizeof_cooked_register_status>: Remove.
1360         (init_regcache_descr): Update.
1361         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1362         (regcache::save): Likewise.
1363         (regcache::dump): Likewise.
1364
1365 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
1366
1367         * ft32-tdep.c (ft32_fetch_instruction): New function.
1368         (ft32_analyze_prologue): Use ft32_fetch_instruction().
1369
1370 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
1371
1372         * cli/cli-script.c (execute_control_command): Rename to ...
1373         (execute_control_command_1): ... this.
1374         (execute_control_command): New function.
1375
1376 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
1377
1378         * tracepoint.c (tfind_command): Remove const_cast.
1379
1380 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
1381
1382         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1383
1384 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
1385
1386         * common/common-utils.h (in_inclusive_range): New function.
1387         * arm-tdep.c (arm_record_extension_space): Use
1388         in_inclusive_range.
1389         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1390         * cris-tdep.c (cris_spec_reg_applicable): Use
1391         in_inclusive_range.
1392
1393 2017-10-30  Pedro Alves  <palves@redhat.com>
1394             Simon Marchi <simon.marchi@ericsson.com>
1395
1396         * remote.c (remote_set_syscall_catchpoint): Build a std::string
1397         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1398
1399 2017-10-30  Pedro Alves  <palves@redhat.com>
1400
1401         * common/common-utils.c (string_appendf, string_vappendf): New
1402         functions.
1403         * common/common-utils.h (string_appendf, string_vappendf): New
1404         declarations.
1405         * unittests/common-utils-selftests.c (string_appendf_func)
1406         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1407         (string_vappendf_tests): New functions.
1408         (_initialize_common_utils_selftests): Register "string_appendf" and
1409         "string_vappendf tests".
1410
1411 2017-10-30  Pedro Alves  <palves@redhat.com>
1412
1413         * unittests/common-utils-selftests.c (format_func): New typedef.
1414         (string_printf_tests, string_vprintf_tests): Tests factored out
1415         and merged to ...
1416         (test_format_func): ... this new function.
1417         (string_printf_tests, string_vprintf_tests): Reimplement on top of
1418         test_format_func.
1419
1420 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1421
1422         * darwin-nat.c: Remove include of gdb.h.
1423
1424 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1425
1426         * xtensa-xtregs.c: Fix formatting issues.
1427
1428 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1429
1430         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1431
1432 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
1433
1434         PR python/21213
1435         * python/py-infthread.c (thpy_get_inferior): Increment reference
1436         of inferior before returning it.
1437
1438 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1439
1440         * unittests/common-utils-selftests.c (format): Add
1441         ATTRIBUTE_PRINTF.
1442
1443 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1444
1445         * xml-syscall.c (struct syscall_desc): Add constructor.
1446         <name>: Change type to std::string.
1447         (syscall_desc_up): New typedef.
1448         (syscall_desc_p): Remove typeder.
1449         (DEF_VEC_P(syscall_desc_p)): Remove.
1450         (struct syscall_group_desc): Add constructor.
1451         <name>: Change type to std::string.
1452         <syscalls>: Change type to std::vector.
1453         (syscall_group_desc_up): New typedef.
1454         (syscall_group_desc_p): Remove typedef.
1455         (DEF_VEC_P(syscall_group_desc_p)): Remove.
1456         (struct syscalls_info) <syscalls>: Change type to std::vector of
1457         unique_ptr.
1458         <groups>: Likewise.
1459         <my_gdb_datadir>: Change type to std::string.
1460         (syscalls_info_up): New typedef.
1461         (allocate_syscalls_info): Remove.
1462         (syscalls_info_free_syscalls_desc): Remove.
1463         (syscalls_info_free_syscall_group_desc): Remove.
1464         (free_syscalls_info): Remove.
1465         (make_cleanup_free_syscalls_info): Remove.
1466         (syscall_group_create_syscall_group_desc): Adjust.
1467         (syscall_group_add_syscall): Adjust.
1468         (syscall_create_syscall_desc): Adjust.
1469         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1470         (init_syscalls_info): Adjust.
1471         (syscall_group_get_group_by_name): Adjust.
1472         (xml_get_syscall_number): Adjust.
1473         (xml_get_syscall_name): Adjust.
1474         (xml_list_of_syscalls): Adjust.
1475         (xml_list_syscalls_by_group): Adjust.
1476         (xml_list_of_groups): Adjust.
1477
1478 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1479
1480         * probe.h: Don't include gdb_vecs.h.
1481         (DEF_VEC_P (probe_p)): Remove.
1482         (find_probes_in_objfile): Return an std::vector.
1483         * probe.c (find_probes_in_objfile): Likewise.
1484         * breakpoint.c (breakpoint_objfile_data)
1485         <longjmp_probes>: Change type to std::vector.
1486         <exception_probes>: Likewise.
1487         (free_breakpoint_probes): Don't manually free vectors.
1488         (create_longjmp_master_breakpoint): Adjust.
1489         (create_exception_master_breakpoint): Adjust.
1490         * solib-svr4.c (svr4_create_probe_breakpoints): Change
1491         parameter type, adjust.
1492         (svr4_create_solib_event_breakpoints): Adjust.
1493
1494 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1495
1496         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1497         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1498         with new.
1499         (free_breakpoint_probes): Rename to ...
1500         (free_breakpoint_objfile_data): ... this, and call delete on
1501         bp_objfile_data..
1502
1503 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1504
1505         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1506         (loaded_script_ptr): Remove typedef.
1507         (DEF_VEC_P (loaded_script_ptr)): Remove.
1508         (struct collect_matching_scripts_data): Add constructor.
1509         <scripts_p>: Change type to (pointer to) std::vector.
1510         (collect_matching_scripts_data): Adjust.
1511         (sort_scripts_by_name): Make suitable for std::sort.
1512         (print_scripts): Don't sort vector, adjust to std::vector.
1513         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1514
1515 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1516
1517         * symfile.c (filename_language): Make struct, not typedef.  Add
1518         constructor.
1519         <ext>: Change type to std::string.
1520         (DEF_VEC_O (filename_language)): Remove.
1521         (filename_language_table): Change type to std::vector.
1522         (add_filename_language): Adjust.
1523         (set_ext_lang_command): Adjust.
1524         (info_ext_lang_command): Adjust.
1525         (deduce_language_from_filename): Adjust.
1526         (class scoped_restore_filename_language_table): Remove.
1527         (test_filename_language): Use scoped_restore.
1528         (test_set_ext_lang_command): Use scoped_restore, adjust to
1529         std::vector change.
1530
1531 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1532
1533         * symfile.c: Include selftest.h.
1534         (class scoped_restore_filename_language_table): New.
1535         (test_filename_language): New test.
1536         (test_set_ext_lang_command): New test.
1537         (_initialize_symfile): Register tests.
1538
1539 2017-10-27  Keith Seitz  <keiths@redhat.com>
1540
1541         * breakpoint.c (print_breakpoint_location): Use the symbol saved
1542         in the bp_location, falling back to find_pc_sect_function when
1543         needed.
1544         (add_location_to_breakpoint): Save sal->symbol.
1545         * breakpoint.h (struct bp_location) <symbol>: New field.
1546         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1547         * symtab.h (struct symtab_and_line) <symbol>: New field.
1548
1549 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
1550
1551         PR gdb/13669
1552         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1553         to rewind obstack.
1554
1555 2017-10-26  Pedro Alves  <palves@redhat.com>
1556
1557         * remote.c (remote_async_terminal_ours_p): Delete.
1558         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1559         Remove references to 'remote_async_terminal_ours_p'.
1560
1561 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1562
1563         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1564
1565 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1566
1567         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1568         aspace const.
1569         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1570         Likewise.
1571         * breakpoint.c (bpstat_check_location): Remove cast.
1572         (breakpoint_hit_catch_fork): Make aspce const.
1573         (breakpoint_hit_catch_solib): Likewise.
1574         (breakpoint_hit_catch_exec): Likewise.
1575         (breakpoint_hit_ranged_breakpoint): Likewise.
1576         (breakpoint_hit_watchpoint): Likewise.
1577         (base_breakpoint_breakpoint_hit): Likewise.
1578         (bkpt_breakpoint_hit): Likewise.
1579         (dprintf_breakpoint_hit): Likewise.
1580         (tracepoint_breakpoint_hit): Likewise.
1581         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1582
1583 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1584
1585         * breakpoint.c (breakpoint_location_address_match): Change
1586         "struct address_space *" to "const address_space".
1587         (breakpoint_location_address_range_overlap): Likewise.
1588         (breakpoint_here_p): Likewise.
1589         (breakpoint_in_range_p): Likewise.
1590         (moribund_breakpoint_here_p): Likewise.
1591         (bp_location_inserted_here_p): Likewise.
1592         (software_breakpoint_inserted_here_p): Likewise.
1593         (hardware_breakpoint_inserted_here_p): Likewise.
1594         (hardware_watchpoint_inserted_in_range): Likewise.
1595         (bpstat_check_location): Likewise.
1596         (bpstat_stop_status): Likewise.
1597         (breakpoint_address_match): Likewise.
1598         (breakpoint_address_match_range): Likewise.
1599         (breakpoint_location_address_match): Likewise.
1600         (breakpoint_location_address_range_overlap): Likewise.
1601         (insert_single_step_breakpoint): Likewise.
1602         (breakpoint_has_location_inserted_here): Likewise.
1603         (single_step_breakpoint_inserted_here_p): Likewise.
1604         (pc_at_non_inline_function): Likewise.
1605         * breakpoint.h (bpstat_stop_status): Update declaration.
1606         (breakpoint_here_p): Likewise.
1607         (breakpoint_in_range_p): Likewise.
1608         (moribund_breakpoint_here_p): Likewise.
1609         (breakpoint_inserted_here_p): Likewise.
1610         (software_breakpoint_inserted_here_p): Likewise.
1611         (hardware_breakpoint_inserted_here_p): Likewise.
1612         (breakpoint_has_location_inserted_here): Likewise.
1613         (single_step_breakpoint_inserted_here_p): Likewise.
1614         (hardware_watchpoint_inserted_in_range): Likewise.
1615         (breakpoint_address_match): Likewise.
1616         (insert_single_step_breakpoint): Likewise.
1617         (pc_at_non_inline_function): Likewise.
1618         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1619         * record.c (record_check_stopped_by_breakpoint): Likewise.
1620         * record.h (record_check_stopped_by_breakpoint): Likewise.
1621         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1622
1623 2017-10-25  Yao Qi  <yao.qi@linaro.org>
1624
1625         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1626         regcache->arch () instead get_regcache_arch.
1627         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1628         Likewise.
1629         (aarch64_fbsd_store_inferior_registers): Likewise.
1630         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1631         (store_gregs_to_thread): Likewise.
1632         (fetch_fpregs_from_thread): Likewise.
1633         (store_fpregs_to_thread): Likewise.
1634         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1635         (aarch64_store_return_value): Likewise.
1636         (aarch64_software_single_step): Likewise.
1637         * aix-thread.c (aix_thread_wait): Likewise.
1638         (supply_reg32): Likewise.
1639         (supply_sprs64): Likewise.
1640         (supply_sprs32): Likewise.
1641         (fill_gprs64): Likewise.
1642         (fill_gprs32): Likewise.
1643         (fill_sprs64): Likewise.
1644         (fill_sprs32): Likewise.
1645         (store_regs_user_thread): Likewise.
1646         (store_regs_kernel_thread): Likewise.
1647         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1648         (alphabsd_store_inferior_registers): Likewise.
1649         * alpha-tdep.c (alpha_extract_return_value): Likewise.
1650         (alpha_store_return_value): Likewise.
1651         (alpha_deal_with_atomic_sequence): Likewise.
1652         (alpha_next_pc): Likewise.
1653         (alpha_software_single_step): Likewise.
1654         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1655         (amd64bsd_store_inferior_registers): Likewise.
1656         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1657         Likewise.
1658         (amd64_linux_store_inferior_registers): Likewise.
1659         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1660         (amd64_collect_native_gregset): Likewise.
1661         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1662         (amd64obsd_collect_uthread): Likewise.
1663         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1664         (amd64_collect_fpregset): Likewise.
1665         (amd64_supply_fxsave): Likewise.
1666         (amd64_supply_xsave): Likewise.
1667         (amd64_collect_fxsave): Likewise.
1668         (amd64_collect_xsave): Likewise.
1669         * arc-tdep.c (arc_write_pc): Likewise.
1670         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1671         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1672         (arm_fbsd_store_inferior_registers): Likewise.
1673         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1674         (store_vfp_regs): Likewise.
1675         (arm_linux_fetch_inferior_registers): Likewise.
1676         (arm_linux_store_inferior_registers): Likewise.
1677         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1678         (arm_linux_sigreturn_next_pc): Likewise.
1679         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1680         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1681         (fetch_register): Likewise.
1682         (store_register): Likewise.
1683         * arm-tdep.c (arm_is_thumb): Likewise.
1684         (displaced_in_arm_mode): Likewise.
1685         (bx_write_pc): Likewise.
1686         (arm_get_next_pcs_addr_bits_remove): Likewise.
1687         (arm_software_single_step): Likewise.
1688         (arm_extract_return_value): Likewise.
1689         (arm_store_return_value): Likewise.
1690         (arm_write_pc): Likewise.
1691         * bfin-tdep.c (bfin_extract_return_value): Likewise.
1692         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
1693         (bsd_uthread_store_registers): Likewise.
1694         * core-regset.c (fetch_core_registers): Likewise.
1695         * corelow.c (get_core_registers): Likewise.
1696         * cris-tdep.c (cris_store_return_value): Likewise.
1697         (cris_extract_return_value): Likewise.
1698         (find_step_target): Likewise.
1699         (find_step_target): Likewise.
1700         (cris_software_single_step): Likewise.
1701         * ctf.c (ctf_fetch_registers): Likewise.
1702         * darwin-nat.c (cancel_breakpoint): Likewise.
1703         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
1704         * frv-tdep.c (frv_extract_return_value): Likewise.
1705         * ft32-tdep.c (ft32_store_return_value): Likewise.
1706         (ft32_extract_return_value): Likewise.
1707         * go32-nat.c (fetch_register): Likewise.
1708         (go32_fetch_registers): Likewise.
1709         (go32_store_registers): Likewise.
1710         (store_register): Likewise.
1711         * h8300-tdep.c (h8300_extract_return_value): Likewise.
1712         (h8300_store_return_value): Likewise.
1713         * hppa-linux-nat.c (fetch_register): Likewise.
1714         (store_register): Likewise.
1715         (hppa_linux_fetch_inferior_registers): Likewise.
1716         (hppa_linux_store_inferior_registers): Likewise.
1717         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
1718         (i386_darwin_store_inferior_registers): Likewise.
1719         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
1720         (gnu_store_registers): Likewise.
1721         * i386-linux-nat.c (fetch_register): Likewise.
1722         (store_register): Likewise.
1723         (supply_gregset): Likewise.
1724         (fill_gregset): Likewise.
1725         (i386_linux_fetch_inferior_registers): Likewise.
1726         (i386_linux_store_inferior_registers): Likewise.
1727         (i386_linux_resume): Likewise.
1728         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
1729         Likewise.
1730         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
1731         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
1732         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
1733         (i386obsd_collect_uthread): Likewise.
1734         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1735         (i386_supply_gregset): Likewise.
1736         (i386_collect_gregset): Likewise.
1737         (i386_supply_fpregset): Likewise.
1738         (i386_collect_fpregset): Likewise.
1739         (i386_mpx_bd_base): Likewise.
1740         * i386-v4-nat.c (supply_fpregset): Likewise.
1741         (fill_fpregset): Likewise.
1742         * i387-tdep.c (i387_supply_fsave): Likewise.
1743         (i387_collect_fsave): Likewise.
1744         (i387_supply_fxsave): Likewise.
1745         (i387_collect_fxsave): Likewise.
1746         (i387_supply_xsave): Likewise.
1747         (i387_collect_xsave): Likewise.
1748         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
1749         (ia64_linux_store_registers): Likewise.
1750         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
1751         (ia64_extract_return_value): Likewise.
1752         (ia64_store_return_value): Likewise.
1753         (find_func_descr): Likewise.
1754         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
1755         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
1756         (inf_ptrace_store_registers): Likewise.
1757         * infrun.c (use_displaced_stepping): Likewise.
1758         (displaced_step_prepare_throw): Likewise.
1759         (resume): Likewise.
1760         (proceed): Likewise.
1761         (do_target_wait): Likewise.
1762         (adjust_pc_after_break): Likewise.
1763         (handle_inferior_event_1): Likewise.
1764         (handle_signal_stop): Likewise.
1765         (save_infcall_suspend_state): Likewise.
1766         (restore_infcall_suspend_state): Likewise.
1767         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
1768         * jit.c (jit_frame_prev_register): Likewise.
1769         * linux-nat.c (save_stop_reason): Likewise.
1770         (linux_nat_wait_1): Likewise.
1771         (resume_stopped_resumed_lwps): Likewise.
1772         * linux-record.c (record_linux_sockaddr): Likewise.
1773         (record_linux_msghdr): Likewise.
1774         (record_linux_system_call): Likewise.
1775         * linux-tdep.c (linux_collect_thread_registers): Likewise.
1776         * lm32-tdep.c (lm32_extract_return_value): Likewise.
1777         (lm32_store_return_value): Likewise.
1778         * m32c-tdep.c (m32c_read_flg): Likewise.
1779         (m32c_pseudo_register_read): Likewise.
1780         (m32c_pseudo_register_write): Likewise.
1781         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
1782         (m32r_linux_collect_gregset): Likewise.
1783         * m32r-tdep.c (m32r_store_return_value): Likewise.
1784         (m32r_extract_return_value): Likewise.
1785         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1786         (m68kbsd_collect_fpregset): Likewise.
1787         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
1788         * m68k-linux-nat.c (fetch_register): Likewise.
1789         (old_fetch_inferior_registers): Likewise.
1790         (old_store_inferior_registers): Likewise.
1791         (store_regs): Likewise.
1792         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
1793         (m68k_svr4_store_return_value): Likewise.
1794         * m88k-tdep.c (m88k_store_arguments): Likewise.
1795         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
1796         (mi_cmd_data_write_register_values): Likewise.
1797         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
1798         (mips_fbsd_store_inferior_registers): Likewise.
1799         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
1800         (mips_fbsd_supply_gregs): Likewise.
1801         (mips_fbsd_collect_fpregs): Likewise.
1802         (mips_fbsd_collect_gregs): Likewise.
1803         (mips_fbsd_supply_fpregset): Likewise.
1804         (mips_fbsd_collect_fpregset): Likewise.
1805         (mips_fbsd_supply_gregset): Likewise.
1806         (mips_fbsd_collect_gregset): Likewise.
1807         * mips-linux-nat.c (supply_gregset): Likewise.
1808         (fill_gregset): Likewise.
1809         (supply_fpregset): Likewise.
1810         (fill_fpregset): Likewise.
1811         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
1812         (mips_fill_gregset): Likewise.
1813         (mips_supply_fpregset): Likewise.
1814         (mips_fill_fpregset): Likewise.
1815         (mips64_supply_gregset): Likewise.
1816         (micromips_linux_sigframe_validate): Likewise.
1817         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
1818         (mipsnbsd_fetch_inferior_registers): Likewise.
1819         (mipsnbsd_store_inferior_registers): Likewise.
1820         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1821         (mipsnbsd_supply_gregset): Likewise.
1822         (mipsnbsd_iterate_over_regset_sections): Likewise.
1823         (mipsnbsd_supply_reg): Likewise.
1824         (mipsnbsd_supply_fpreg): Likewise.
1825         * mips-tdep.c (mips_in_frame_stub): Likewise.
1826         (mips_dummy_id): Likewise.
1827         (is_octeon_bbit_op): Likewise.
1828         (micromips_bc1_pc): Likewise.
1829         (extended_mips16_next_pc): Likewise.
1830         (mips16_next_pc): Likewise.
1831         (deal_with_atomic_sequence): Likewise.
1832         * moxie-tdep.c (moxie_process_readu): Likewise.
1833         * nios2-tdep.c (nios2_get_next_pc): Likewise.
1834         * nto-procfs.c (procfs_store_registers): Likewise.
1835         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
1836         (ppcfbsd_store_inferior_registers): Likewise.
1837         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
1838         (fetch_altivec_register): Likewise.
1839         (get_spe_registers): Likewise.
1840         (fetch_spe_register): Likewise.
1841         (fetch_altivec_registers): Likewise.
1842         (fetch_all_gp_regs): Likewise.
1843         (fetch_all_fp_regs): Likewise.
1844         (store_vsx_register): Likewise.
1845         (store_altivec_register): Likewise.
1846         (set_spe_registers): Likewise.
1847         (store_spe_register): Likewise.
1848         (store_altivec_registers): Likewise.
1849         (store_all_gp_regs): Likewise.
1850         (store_all_fp_regs): Likewise.
1851         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
1852         (ppc_linux_collect_gregset): Likewise.
1853         (ppc_canonicalize_syscall): Likewise.
1854         (ppc_linux_record_signal): Likewise.
1855         (ppu2spu_prev_register): Likewise.
1856         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
1857         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
1858         (ppcobsd_store_registers): Likewise.
1859         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
1860         Likewise.
1861         (ppc_ravenscar_generic_store_registers): Likewise.
1862         * procfs.c (procfs_fetch_registers): Likewise.
1863         (procfs_store_registers): Likewise.
1864         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
1865         (ravenscar_store_registers): Likewise.
1866         (ravenscar_prepare_to_store): Likewise.
1867         * record-btrace.c (record_btrace_fetch_registers): Likewise.
1868         * record-full.c (record_full_wait_1): Likewise.
1869         (record_full_registers_change): Likewise.
1870         (record_full_store_registers): Likewise.
1871         (record_full_core_fetch_registers): Likewise.
1872         (record_full_save): Likewise.
1873         (record_full_goto_insn): Likewise.
1874         * regcache.c (regcache_register_size): Likewise.
1875         (get_regcache_arch): Remove.
1876         (regcache_read_pc): Likewise.
1877         * regcache.h (get_regcache_arch): Remove.
1878         * remote-sim.c (gdbsim_fetch_register): Likewise.
1879         (gdbsim_store_register): Likewise.
1880         * remote.c (fetch_register_using_p): Likewise.
1881         (send_g_packet): Likewise.
1882         (remote_prepare_to_store): Likewise.
1883         (store_registers_using_G): Likewise.
1884         * reverse.c (save_bookmark_command): Likewise.
1885         (goto_bookmark_command): Likewise.
1886         * rs6000-aix-tdep.c (branch_dest): Likewise.
1887         * rs6000-nat.c (rs6000_ptrace64): Likewise.
1888         (fetch_register): Likewise.
1889         * rs6000-tdep.c (ppc_supply_reg): Likewise.
1890         (ppc_collect_reg): Likewise.
1891         (ppc_collect_gregset): Likewise.
1892         (ppc_collect_fpregset): Likewise.
1893         (ppc_collect_vsxregset): Likewise.
1894         (ppc_collect_vrregset): Likewise.
1895         (ppc_displaced_step_hw_singlestep): Likewise.
1896         (rs6000_pseudo_register_read): Likewise.
1897         (rs6000_pseudo_register_write): Likewise.
1898         * s390-linux-nat.c (supply_gregset): Likewise.
1899         (fill_gregset): Likewise.
1900         (s390_linux_fetch_inferior_registers): Likewise.
1901         * s390-linux-tdep.c (s390_write_pc): Likewise.
1902         (s390_software_single_step): Likewise.
1903         (s390_all_but_pc_registers_record): Likewise.
1904         (s390_linux_syscall_record): Likewise.
1905         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
1906         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
1907         (shnbsd_store_inferior_registers): Likewise.
1908         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
1909         (sh_extract_return_value_fpu): Likewise.
1910         (sh_store_return_value_nofpu): Likewise.
1911         (sh_corefile_supply_regset): Likewise.
1912         (sh_corefile_collect_regset): Likewise.
1913         * sh64-tdep.c (sh64_extract_return_value): Likewise.
1914         (sh64_store_return_value): Likewise.
1915         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
1916         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
1917         (sparc_store_inferior_registers): Likewise.
1918         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
1919         (sparc_ravenscar_prepare_to_store): Likewise.
1920         * sparc-tdep.c (sparc32_store_arguments): Likewise.
1921         (sparc_analyze_control_transfer): Likewise.
1922         (sparc_step_trap): Likewise.
1923         (sparc_software_single_step): Likewise.
1924         (sparc32_gdbarch_init): Likewise.
1925         (sparc_supply_rwindow): Likewise.
1926         (sparc_collect_rwindow): Likewise.
1927         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
1928         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
1929         (sparc64nbsd_collect_gregset): Likewise.
1930         (sparc64nbsd_supply_fpregset): Likewise.
1931         (sparc64nbsd_collect_fpregset): Likewise.
1932         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1933         (sparc64_supply_gregset): Likewise.
1934         (sparc64_collect_gregset): Likewise.
1935         (sparc64_supply_fpregset): Likewise.
1936         (sparc64_collect_fpregset): Likewise.
1937         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
1938         * spu-tdep.c (spu_unwind_sp): Likewise.
1939         (spu2ppu_prev_register): Likewise.
1940         (spu_memory_remove_breakpoint): Likewise.
1941         * stack.c (return_command): Likewise.
1942         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
1943         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
1944         * tracefile.c (trace_save_ctf): Likewise.
1945         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
1946         (do_windows_store_inferior_registers): Likewise.
1947         (windows_resume): Likewise.
1948         * xtensa-linux-nat.c (fill_gregset): Likewise.
1949         (supply_gregset_reg): Likewise.
1950         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
1951         (xtensa_register_read_masked): Likewise.
1952         (xtensa_supply_gregset): Likewise.
1953         (xtensa_extract_return_value): Likewise.
1954         (xtensa_store_return_value): Likewise.
1955
1956 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
1957
1958         * doublest.c (floatformat_from_string): New function.
1959         * doublest.h (floatformat_from_string): Add prototype.
1960
1961         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
1962         (OP_FLOAT): ... this.
1963         * expression.h: Do not include "doublest.h".
1964         (union exp_element): Replace doubleconst and decfloatconst by
1965         new element floatconst.
1966         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
1967         (ada_evaluate_subexp): Likewise.
1968         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
1969         OP_DOUBLE and OP_DECFLOAT.
1970         * expprint.c (print_subexp_standard): Likewise.
1971         (dump_subexp_body_standard): Likewise.
1972         * breakpoint.c (watchpoint_exp_is_const): Likewise.
1973
1974         * parse.c: Include "dfp.h".
1975         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1976         (write_exp_elt_floatcst): New function.
1977         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
1978         and OP_DECFLOAT.
1979         (operator_check_standard): Likewise.
1980         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
1981         Return target format buffer instead of host DOUBLEST.
1982         Use floatformat_from_string and decimal_from_string to parse
1983         either binary or decimal floating-point types.
1984         (parse_c_float): Remove.
1985         * parser-defs.h: Do not include "doublest.h".
1986         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1987         (write_exp_elt_floatcst): Add prototype.
1988         (parse_float): Update prototype.
1989         (parse_c_float): Remove.
1990
1991         * c-exp.y: Do not include "dfp.h".
1992         (typed_val_float): Use byte buffer instead of DOUBLEST.
1993         (typed_val_decfloat): Remove.
1994         (DECFLOAT): Remove.
1995         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1996         (parse_number): Update to new parse_float interface.
1997         Parse suffixes and determine type before calling parse_float.
1998         Handle decimal and binary FP types the same way.
1999
2000         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2001         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2002         (parse_number): Update to new parse_float interface.
2003         Parse suffixes and determine type before calling parse_float.
2004
2005         * f-exp.y: Replace dval by typed_val_float.
2006         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2007         (parse_number): Use parse_float instead of atof.
2008
2009         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2010         (parse_go_float): Remove.
2011         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2012         (parse_number): Call parse_float instead of parse_go_float.
2013         Parse suffixes and determine type before calling parse_float.
2014
2015         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2016         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2017         (parse_number): Update to new parse_float interface.
2018         Parse suffixes and determine type before calling parse_float.
2019
2020         * m2-exp.y: Replace dval by byte buffer val.
2021         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2022         (parse_number): Call parse_float instead of atof.
2023
2024         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2025         (lex_number): Call parse_float instead of strtod.
2026         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2027         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2028         Use write_exp_elt_floatcst.
2029         (unit_testing): Remove static variable.
2030         (rust_type): Do not check unit_testing.
2031         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
2032
2033         * ada-exp.y (type_float, type_double): Remove.
2034         (typed_val_float): Use byte buffer instead of DOUBLEST.
2035         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2036         * ada-lex.l (processReal): Use parse_float instead of sscanf.
2037
2038 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
2039
2040         * aarch64-tdep.h (enum aarch64_regnum): Remove.
2041         * arch/aarch64.h: New file.
2042
2043 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2044
2045         * dfp.h (decimal_from_string): Use const reference for argument.
2046         * dfp.c (decimal_from_string): Likewise.
2047
2048 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2049
2050         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2051         * sh64-tdep.c (sh64_do_fp_register): Likewise.
2052         * mips-tdep.c (mips_print_fp_register): Likewise.
2053
2054 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2055
2056         * common/format.h (enum argclass): Replace decfloat_arg by
2057         dec32float_arg, dec64float_arg, and dec128float_arg.
2058         * common/format.c (parse_format_string): Update to return
2059         new decimal float argument classes.
2060
2061         * printcmd.c (printf_decfloat): Rename to ...
2062         (printf_floating): ... this.  Add argclass argument, and use it
2063         instead of parsing the format string again.  Add support for
2064         binary floating-point values, using floatformat_to_string.
2065         Convert value to the target format if it doesn't already match.
2066         (ui_printf): Call printf_floating instead of printf_decfloat,
2067         also for double_arg / long_double_arg.  Pass argclass.
2068
2069         * dfp.c (decimal_to_string): Add format string argument.
2070         * dfp.h (decimal_to_string): Likewise.
2071
2072         * doublest.c (floatformat_to_string): Add format string argument.
2073         * doublest.h (floatformat_to_string): Likewise.
2074
2075 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2076
2077         * doublest.c (floatformat_precision): New routine.
2078         (floatformat_to_string): Likewise.
2079         * doublest.c (floatformat_to_string): Add prototype.
2080
2081         * printcmd.c (print_scalar_formatted): Only call print_floating
2082         on floating-point types.
2083         * valprint.c: Do not include "floatformat.h".
2084         (generic_val_print_decfloat): Remove.
2085         (generic_val_print): Call generic_val_print_float for both
2086         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2087         (print_floating): Use floatformat_to_string.  Handle decimal float.
2088         (print_decimal_floating): Remove, merge into floatformat_to_string.
2089         * value.h (print_decimal_floating): Remove.
2090
2091         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2092
2093 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2094
2095         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2096
2097 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2098
2099         * memattr.h: Don't include vec.h.
2100         (struct mem_attrib): Initialize fields.
2101         <unknown>: New static method.
2102         (struct mem_region): Add constructors, operator<, initialize
2103         fields.
2104         * memattr.c: Include algorithm.
2105         (default_mem_attrib, unknown_mem_attrib): Remove.
2106         (user_mem_region_list): New global.
2107         (target_mem_region_list, mem_region_list): Change type to
2108         std::vector<mem_region>.
2109         (mem_use_target): Now a function.
2110         (target_mem_regions_valid): Change type to bool.
2111         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2112         (require_user_regions): Adjust.
2113         (require_target_regions): Adjust.
2114         (create_mem_region): Adjust.
2115         (lookup_mem_region): Adjust.
2116         (invalidate_target_mem_regions): Adjust.
2117         (mem_clear): Rename to...
2118         (user_mem_clear): ... this, and adjust.
2119         (mem_command): Adjust.
2120         (info_mem_command): Adjust.
2121         (mem_enable, enable_mem_command, mem_disable,
2122         disable_mem_command): Adjust.
2123         (mem_delete): Adjust.
2124         (delete_mem_command): Adjust.
2125         * memory-map.h (parse_memory_map): Return an std::vector.
2126         * memory-map.c (parse_memory_map): Likewise.
2127         (struct memory_map_parsing_data): Add constructor.
2128         <memory_map>: Point to std::vector.
2129         (memory_map_start_memory): Adjust.
2130         (memory_map_end_memory): Adjust.
2131         (memory_map_end_property): Adjust.
2132         (clear_result): Remove.
2133         * remote.c (remote_memory_map): Return an std::vector.
2134         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2135         Remove.
2136         (target_debug_print_mem_region_vector): New.
2137         * target-delegates.c: Regenerate.
2138         * target.h (mem_region_vector): New typedef.
2139         (to_memory_map): Return mem_region_vector.
2140         (target_memory_map): Return an std::vector.
2141         * target.c (target_memory_map): Return an std::vector.
2142         (flash_erase_command): Adjust.
2143
2144 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2145
2146         * memory-map.c (struct memory_map_parsing_data) <property_name>:
2147         Change type to std::string.
2148         (memory_map_start_property): Adjust.
2149         (memory_map_end_property): Adjust.
2150
2151 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2152
2153         * infrun.h: Include common/byte-vector.h.
2154         (struct displaced_step_closure): New struct.
2155         (struct buf_displaced_step_closure): New struct.
2156         * infrun.c (displaced_step_closure::~displaced_step_closure):
2157         Provide default implementation.
2158         (displaced_step_clear): Deallocate step closure with delete.
2159         * aarch64-tdep.c (displaced_step_closure): Rename to ...
2160         (aarch64_displaced_step_closure): ... this, extend
2161         displaced_step_closure.
2162         (aarch64_displaced_step_data) <dsc>: Change type to
2163         aarch64_displaced_step_closure.
2164         (aarch64_displaced_step_copy_insn): Adjust to type change, use
2165         unique_ptr.
2166         (aarch64_displaced_step_fixup): Add cast for displaced step
2167         closure.
2168         * amd64-tdep.c (displaced_step_closure): Rename to ...
2169         (amd64_displaced_step_closure): ... this, extend
2170         displaced_step_closure.
2171         <insn_buf>: Change type to std::vector<gdb_byte>.
2172         <max_len>: Remove.
2173         (fixup_riprel): Change type of DSC parameter, adjust to type
2174         change of insn_buf.
2175         (fixup_displaced_copy): Change type of DSC parameter.
2176         (amd64_displaced_step_copy_insn): Instantiate
2177         amd64_displaced_step_closure.
2178         (amd64_displaced_step_fixup): Add cast for closure type, adjust
2179         to type change of insn_buf.
2180         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2181         parameter DSC.
2182         (arm_linux_copy_svc): Likewise.
2183         (cleanup_kernel_helper_return): Likewise.
2184         (arm_catch_kernel_helper_return): Likewise.
2185         (arm_linux_displaced_step_copy_insn): Instantiate
2186         arm_displaced_step_closure.
2187         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2188         (displaced_read_reg): Change type of parameter DSC.
2189         (branch_write_pc): Likewise.
2190         (load_write_pc): Likewise.
2191         (alu_write_pc): Likewise.
2192         (displaced_write_reg): Likewise.
2193         (arm_copy_unmodified): Likewise.
2194         (thumb_copy_unmodified_32bit): Likewise.
2195         (thumb_copy_unmodified_16bit): Likewise.
2196         (cleanup_preload): Likewise.
2197         (install_preload): Likewise.
2198         (arm_copy_preload): Likewise.
2199         (thumb2_copy_preload): Likewise.
2200         (install_preload_reg): Likewise.
2201         (arm_copy_preload_reg): Likewise.
2202         (cleanup_copro_load_store): Likewise.
2203         (install_copro_load_store): Likewise.
2204         (arm_copy_copro_load_store) Likewise.
2205         (thumb2_copy_copro_load_store): Likewise.
2206         (cleanup_branch): Likewise.
2207         (install_b_bl_blx): Likewise.
2208         (arm_copy_b_bl_blx): Likewise.
2209         (thumb2_copy_b_bl_blx): Likewise.
2210         (thumb_copy_b): Likewise.
2211         (install_bx_blx_reg): Likewise.
2212         (arm_copy_bx_blx_reg): Likewise.
2213         (thumb_copy_bx_blx_reg): Likewise.
2214         (cleanup_alu_imm): Likewise.
2215         (arm_copy_alu_imm): Likewise.
2216         (thumb2_copy_alu_imm): Likewise.
2217         (cleanup_alu_reg): Likewise.
2218         (install_alu_reg): Likewise.
2219         (arm_copy_alu_reg): Likewise.
2220         (thumb_copy_alu_reg): Likewise.
2221         (cleanup_alu_shifted_reg): Likewise.
2222         (install_alu_shifted_reg): Likewise.
2223         (arm_copy_alu_shifted_reg): Likewise.
2224         (cleanup_load): Likewise.
2225         (cleanup_store): Likewise.
2226         (arm_copy_extra_ld_st): Likewise.
2227         (install_load_store): Likewise.
2228         (thumb2_copy_load_literal): Likewise.
2229         (thumb2_copy_load_reg_imm): Likewise.
2230         (arm_copy_ldr_str_ldrb_strb): Likewise.
2231         (cleanup_block_load_all): Likewise.
2232         (cleanup_block_store_pc): Likewise.
2233         (cleanup_block_load_pc): Likewise.
2234         (arm_copy_block_xfer): Likewise.
2235         (thumb2_copy_block_xfer): Likewise.
2236         (cleanup_svc): Likewise.
2237         (install_svc): Likewise.
2238         (arm_copy_svc): Likewise.
2239         (thumb_copy_svc): Likewise.
2240         (arm_copy_undef): Likewise.
2241         (thumb_32bit_copy_undef): Likewise.
2242         (arm_copy_unpred): Likewise.
2243         (arm_decode_misc_memhint_neon): Likewise.
2244         (arm_decode_unconditional): Likewise.
2245         (arm_decode_miscellaneous): Likewise.
2246         (arm_decode_dp_misc): Likewise.
2247         (arm_decode_ld_st_word_ubyte): Likewise.
2248         (arm_decode_media): Likewise.
2249         (arm_decode_b_bl_ldmstm): Likewise.
2250         (arm_decode_ext_reg_ld_st): Likewise.
2251         (thumb2_decode_dp_shift_reg): Likewise.
2252         (thumb2_decode_ext_reg_ld_st): Likewise.
2253         (arm_decode_svc_copro): Likewise.
2254         (thumb2_decode_svc_copro): Likewise.
2255         (install_pc_relative): Likewise.
2256         (thumb_copy_pc_relative_16bit): Likewise.
2257         (thumb_decode_pc_relative_16bit): Likewise.
2258         (thumb_copy_pc_relative_32bit): Likewise.
2259         (thumb_copy_16bit_ldr_literal): Likewise.
2260         (thumb_copy_cbnz_cbz): Likewise.
2261         (thumb2_copy_table_branch): Likewise.
2262         (cleanup_pop_pc_16bit_all): Likewise.
2263         (thumb_copy_pop_pc_16bit): Likewise.
2264         (thumb_process_displaced_16bit_insn): Likewise.
2265         (decode_thumb_32bit_ld_mem_hints): Likewise.
2266         (thumb_process_displaced_32bit_insn): Likewise.
2267         (thumb_process_displaced_insn): Likewise.
2268         (arm_process_displaced_insn): Likewise.
2269         (arm_displaced_init_closure): Likewise.
2270         (arm_displaced_step_fixup): Add cast for closure.
2271         * arm-tdep.h: Include infrun.h.
2272         (displaced_step_closure): Rename to ...
2273         (arm_displaced_step_closure): ... this, extend
2274         displaced_step_closure.
2275         <u::svc::copy_svc_os>: Change type of parameter DSC.
2276         <cleanup>: Likewise.
2277         (arm_process_displaced_insn): Likewise.
2278         (arm_displaced_init_closure): Likewise.
2279         (displaced_read_reg): Likewise.
2280         (displaced_write_reg): Likewise.
2281         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2282         Adjust.
2283         * i386-tdep.h: Include infrun.h.
2284         (i386_displaced_step_closure): New typedef.
2285         * i386-tdep.c (i386_displaced_step_copy_insn): Use
2286         i386_displaced_step_closure.
2287         (i386_displaced_step_fixup): Adjust.
2288         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2289         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2290         and unique_ptr.
2291         (ppc_displaced_step_fixup): Adjust.
2292         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2293         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2294         and unique_ptr.
2295         (s390_displaced_step_fixup): Adjust.
2296
2297 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2298
2299         * interps.h (interp_resume, interp_suspend, interp_set_temp):
2300         Remove declarations.
2301
2302 2017-10-20  Tom Tromey  <tom@tromey.com>
2303
2304         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2305         std::vector.
2306         (gdb_bfd_record_inclusion): Update.
2307         (bfdp): Remove typedef.
2308
2309 2017-10-20  Tom Tromey  <tom@tromey.com>
2310
2311         * gdb_bfd.c (gdb_bfd_ref): Use new.
2312         (struct gdb_bfd_data): Add constructor, destructor, and member
2313         initializers.
2314         (gdb_bfd_unref): Use delete.
2315
2316 2017-10-20  Tom Tromey  <tom@tromey.com>
2317
2318         * exec.c (exec_file_attach): Use new_bfd_ref.
2319         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2320         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2321         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2322         new_bfd_ref.
2323         * gdb_bfd.h (new_bfd_ref): New function.
2324
2325 2017-10-20  Pedro Alves  <palves@redhat.com>
2326
2327         * main.c (captured_command_loop): Add attribute noinline.
2328
2329 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
2330
2331         * interps.c (struct interp_factory): Add constructor.
2332         (interp_factory_p): Remove typedef.
2333         (DEF_VEC_P(interp_factory_p)): Remove.
2334         (interpreter_factories): Change type to std::vector.
2335         (interp_factory_register): Adjust.
2336         (interp_lookup): Adjust.
2337         (interpreter_completer): Adjust.
2338
2339 2017-10-19  Tom Tromey  <tom@tromey.com>
2340
2341         * break-catch-syscall.c (catch_syscall_completer): Use
2342         std::string, gdb::unique_xmalloc_ptr.
2343
2344 2017-10-19  Tom Tromey  <tom@tromey.com>
2345
2346         * infcall.c (call_function_by_hand_dummy): Use std::string.
2347
2348 2017-10-19  Tom Tromey  <tom@tromey.com>
2349
2350         * mi/mi-main.c (mi_cmd_execute): Update.
2351         * top.h (prepare_execute_command): Return scoped_value_mark.
2352         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2353         Add move constructor.
2354         * top.c (prepare_execute_command): Return scoped_value_mark.
2355         (execute_command): Update.
2356
2357 2017-10-19  Pedro Alves  <palves@redhat.com>
2358
2359         * xml-support.c (xml_fetch_content_from_file): Check fread's
2360         return.
2361
2362 2017-10-19  Pedro Alves  <palves@redhat.com>
2363
2364         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2365         async.
2366         (handle_error_fd): New function.
2367         (ser_base_async): Add/delete an event loop file handler for
2368         error_fd.
2369
2370 2017-10-19  Pedro Alves  <palves@redhat.com>
2371
2372         * xml-support.c (xml_fetch_content_from_file): Don't read in
2373         chunks.  Instead use fseek to determine the file's size, and read
2374         it in one go.
2375
2376 2017-11-18  Keith Seitz  <keiths@redhat.com>
2377
2378         * c-exp.y (oper): Canonicalize conversion operators of user-defined
2379         types.
2380         Add whitespace to front of type name.
2381
2382 2017-10-18  Keith Seitz  <keiths@redhat.com>
2383
2384         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2385         DW_AT_accessibility.
2386
2387 2017-10-18  Yao Qi  <yao.qi@linaro.org>
2388
2389         * features/tic6x-c62x-linux.c: Remove.
2390
2391 2017-10-17  Tom Tromey  <tom@tromey.com>
2392
2393         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2394         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2395         (do_mixed_source_and_assembly): Likewise.
2396
2397 2017-10-17  Tom Tromey  <tom@tromey.com>
2398
2399         * regcache.c (regcache::xfer_part): Remove assertion.
2400
2401 2017-10-17  Pedro Alves  <palves@redhat.com>
2402
2403         * xml-support.c (xml_fetch_content_from_file): Call
2404         unique_ptr::release() instead unique_ptr::get() when passing
2405         through xrealloc.
2406
2407 2017-10-17  Yao Qi  <yao.qi@linaro.org>
2408
2409         * regcache.c (regcache::xfer_part): Remove parameters read and
2410         write, add parameter is_raw.  All callers are updated.
2411
2412 2017-10-16  Keith Seitz  <keiths@redhat.com>
2413
2414         * c-typeprint.c (enum access_specifier): Moved here from
2415         c_type_print_base.
2416         (output_access_specifier): New function.
2417         (c_type_print_base): Consider typedefs when assessing
2418         whether access labels are needed.
2419         Use output_access_specifier as needed.
2420         Output access specifier for typedefs, if needed.
2421         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2422         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2423         fields.
2424         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2425         accessor macros.
2426
2427 2017-10-16  Tom Tromey  <tom@tromey.com>
2428
2429         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2430         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2431         * target.c (target_fileio_read_stralloc): Update.
2432         * sparc64-tdep.c (adi_is_addr_mapped): Update.
2433         * target.h (target_fileio_read_stralloc): Return
2434         unique_xmalloc_ptr.
2435
2436 2017-10-16  Tom Tromey  <tom@tromey.com>
2437
2438         * xml-syscall.c (xml_init_syscalls_info): Update.
2439         * xml-support.c (xinclude_start_include): Update.
2440         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2441         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2442         (xml_fetch_content_from_file): Likewise.
2443         * osdata.c (get_osdata): Update.
2444         * target.h (target_read_stralloc, target_get_osdata): Return
2445         unique_xmalloc_ptr.
2446         * solib-aix.c (solib_aix_get_library_list): Update.
2447         * solib-target.c (solib_target_current_sos): Update.
2448         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2449         * xml-tdesc.c (fetch_available_features_from_target): Update.
2450         (target_fetch_description_xml): Update.
2451         (file_read_description_xml): Update.
2452         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2453         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2454         (remote_pid_to_exec_file): Update.
2455         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2456         (target_get_osdata): Likewise.
2457
2458 2017-10-16  Tom Tromey  <tom@tromey.com>
2459
2460         * remote.c (remote_register_number_and_offset): Use std::vector.
2461         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2462         (putpkt_binary): Use gdb::def_vector.
2463         (compare_sections_command): Use gdb::byte_vector.
2464
2465 2017-10-16  Tom Tromey  <tom@tromey.com>
2466
2467         * ppc-linux-nat.c (hwdebug_insert_point): Use
2468         gdb::unique_xmalloc_ptr, XDUP.
2469
2470 2017-10-16  Tom Tromey  <tom@tromey.com>
2471
2472         * probe.c (parse_probes): Use std::string.
2473         (info_probes_for_ops, enable_probes_command)
2474         (disable_probes_command): Remove cleanups.
2475
2476 2017-10-16  Tom Tromey  <tom@tromey.com>
2477
2478         * buildsym.c (block_compar): Remove.
2479         (end_symtab_get_static_block): Use std::vector.
2480
2481 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
2482
2483         * memrange.h (struct mem_range): Define operator< and operator==.
2484         (mem_range_s): Remove.
2485         (DEF_VEC_O (mem_range_s)): Remove.
2486         (normalize_mem_ranges): Change parameter type to std::vector.
2487         * memrange.c (compare_mem_ranges): Remove.
2488         (normalize_mem_ranges): Change parameter type to std::vector,
2489         adjust to vector change.
2490         * exec.c (section_table_available_memory): Return vector, remove
2491         parameter.
2492         (section_table_read_available_memory): Adjust to std::vector
2493         change.
2494         * remote.c (remote_read_bytes): Adjust to std::vector
2495         change.
2496         * tracepoint.h (traceframe_available_memory): Change parameter
2497         type to std::vector.
2498         * tracepoint.c (traceframe_available_memory): Change parameter
2499         type to std::vector, adjust.
2500         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2501         std::vector change.
2502         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2503         unittests/memrange-selftests.c.
2504         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2505         * gdb/unittests/memrange-selftests.c: New file.
2506
2507 2017-10-16  Pedro Alves  <palves@redhat.com>
2508
2509         * elfread.c (probe_key_free): Rename range-for variable.
2510         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2511         (find_probe_by_pc, collect_probes): Rename range-for variable.
2512
2513 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2514
2515         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2516         * features/tic6x-c62x.c: Remove.
2517         * features/tic6x-c64x-linux.c: Remove.
2518         * features/tic6x-c64x.c: Remove.
2519         * features/tic6x-c64xp-linux.c: Remove.
2520         * features/tic6x-c64xp.c: Remove.
2521         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2522         initialize_tdesc_tic6x_*_linux functions.
2523         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2524         initialize_tdesc_tic6x_* functions.
2525
2526 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2527
2528         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2529         tic6x-c62x.
2530         * regformats/tic6x-c62x.dat: Remove.
2531         * regformats/tic6x-c64x.dat: Remove.
2532         * regformats/tic6x-c64xp.dat: Remove.
2533
2534 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2535
2536         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2537         (the !HAVE_LIBEXPAT version).
2538
2539 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2540
2541         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2542         const.
2543
2544 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2545
2546         * target.h: Include tracepoint.h.
2547         (enum trace_find_type): Move to tracepoint.h.
2548         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2549         * tracepoint.h: Don't include target.h
2550         (enum trace_find_type): Move from target.h.
2551         (parse_traceframe_info): Return a unique ptr.
2552         * tracepoint.c (current_traceframe_info): Change type to unique
2553         ptr.
2554         (free_traceframe_info): Remove.
2555         (clear_traceframe_info): Don't manually free
2556         current_traceframe_info.
2557         (free_result): Remove.
2558         (parse_traceframe_info): Return a unique ptr.
2559         (get_traceframe_info): Adjust to unique ptr.
2560         * ctf.c (ctf_traceframe_info): Return a unique ptr.
2561         * remote.c (remote_traceframe_info): Return a unique ptr.
2562         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2563         ptr.
2564         * target-debug.h (target_debug_print_traceframe_info_up): New
2565         macro.
2566         * target-delegates.c: Regenerate.
2567
2568 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2569
2570         * memrange.h (struct mem_range): Add constructors.
2571         * tracepoint.h (struct traceframe_info) <memory>: Change type to
2572         std::vector<mem_range>.
2573         * tracepoint.c (free_traceframe_info): Don't manually free
2574         vector.
2575         (traceframe_info_start_memory): Adjust to vector change.
2576         (traceframe_available_memory): Likewise.
2577         * tracefile-tfile.c (build_traceframe_info): Likewise.
2578         * ctf.c (ctf_traceframe_info): Likewise.
2579
2580 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2581
2582         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2583         std::vector<int>.
2584         * tracepoint.c (free_traceframe_info): Deallocate with delete.
2585         (traceframe_info_start_tvar): Adjust to vector change.
2586         (parse_traceframe_info): Allocate with new.
2587         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2588         vector change.
2589         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2590         change.
2591         tfile_traceframe_info): Allocate with new.
2592         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2593         change.
2594
2595 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2596
2597         * tracepoint.c (traceframe_info): Rename to...
2598         (current_traceframe_info): ...this.
2599         (clear_traceframe_info): Adjust.
2600         (get_traceframe_info): Adjust.
2601
2602 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2603
2604         * nat/linux-osdata.c: Include algorithm.
2605         (compare_processes): Remove.
2606         (struct pid_pgid_entry): New struct.
2607         (linux_xfer_osdata_processgroups): Use std::vector instead of
2608         XNEWVEC.
2609
2610 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2611
2612         * objfiles.h: Don't include symfile.h.
2613         (struct partial_symbol): Remove forward-declaration.
2614         (struct objfile) <global_psymbols, static_psymbols>: Change type
2615         to std::vector<partial_symbol *>.
2616         * objfiles.c (objfile::objfile): Don't memset those fields.
2617         (objfile::~objfile): Don't free those fields.
2618         * psympriv.h (struct psymbol_allocation_list): Remove
2619         forward-declaration.
2620         (add_psymbol_to_list): Change psymbol_allocation_list parameter
2621         to std::vector.
2622         (start_psymtab_common): Change parameters to std::vector.
2623         * psymtab.c: Include algorithm.
2624         (require_partial_symbols): Call shrink_to_fit.
2625         (find_pc_sect_psymbol): Adjust to vector change.
2626         (match_partial_symbol): Likewise.
2627         (lookup_partial_symbol): Likewise.
2628         (psym_relocate): Likewise.
2629         (dump_psymtab): Likewise.
2630         (recursively_search_psymtabs): Likewise.
2631         (compare_psymbols): Remove.
2632         (sort_pst_symbols): Adjust to vector change.
2633         (start_psymtab_common): Likewise.
2634         (end_psymtab_common): Likewise.
2635         (psymbol_bcache_full): De-constify return value.
2636         (add_psymbol_to_bcache): Likewise.
2637         (extend_psymbol_list): Remove.
2638         (append_psymbol_to_list): Adjust to vector change.
2639         (add_psymbol_to_list): Likewise.
2640         (init_psymbol_list): Likewise.
2641         (maintenance_info_psymtabs): Likewise.
2642         (maintenance_check_psymtabs): Likewise.
2643         * symfile.h (struct psymbol_allocation_list): Remove.
2644         * symfile.c (reread_symbols): Adjust to vector change.
2645         * dbxread.c (start_psymtab): Change type of parameters.
2646         (dbx_symfile_read): Adjust to vector change.
2647         (read_dbx_symtab): Likewise.
2648         (start_psymtab): Change type of parameters.
2649         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2650         (create_partial_symtab): Likewise.
2651         (add_partial_symbol): Likewise.
2652         (write_one_signatured_type): Likewise.
2653         (recursively_write_psymbols): Likewise.
2654         * mdebugread.c (parse_partial_symbols): Likewise.
2655         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2656         (scan_xcoff_symtab): Adjust to vector change.
2657         (xcoff_initial_scan): Likewise.
2658
2659 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
2660
2661         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2662
2663 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2664
2665         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2666         Remove s390x-*-expedite, add s390x-expedite.
2667
2668 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2669
2670         * features/s390-gs-linux64.c: Regenerated.
2671         * features/s390x-gs-linux64.c: Regenerated.
2672
2673 2017-10-13  Tom Tromey  <tom@tromey.com>
2674
2675         * compile/compile-object-run.c (do_module_cleanup): Use delete.
2676         * solib.c (update_solib_list, reload_shared_libraries_1): Use
2677         delete.
2678         * symfile.c (symbol_file_add_with_addrs): Use new.
2679         (symbol_file_add_separate): Update comment.
2680         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2681         * jit.c (jit_object_close_impl): Use new.
2682         (jit_unregister_code): Use delete.
2683         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2684         (~objfile): Rename from free_objfile.
2685         (free_objfile_separate_debug, do_free_objfile_cleanup)
2686         (free_all_objfiles, objfile_purge_solibs): Use delete.
2687         * objfiles.h (struct objfile): Add constructor and destructor.
2688         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
2689         (allocate_objfile, free_objfile): Don't declare.
2690         (struct objstats): Add initializers.
2691
2692 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2693
2694         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
2695         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
2696         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
2697         * gdbarch.h: Regenerate.
2698         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2699         Adjust comment.
2700         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
2701         (i386_displaced_step_fixup): Adjust comment.
2702         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
2703
2704 2017-10-12  Tom Tromey  <tom@tromey.com>
2705
2706         * prologue-value.h (pv_area::store_would_trash): Return bool.
2707         (pv_area::find_reg): Likewise.
2708         * prologue-value.c (pv_area::store_would_trash): Return bool.
2709         (pv_area::find_reg): Likewise.
2710
2711 2017-10-12  Tom Tromey  <tom@tromey.com>
2712
2713         * s390-linux-tdep.c (s390_store, s390_load)
2714         (s390_check_for_saved, s390_analyze_prologue): Update.
2715         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
2716         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
2717         * prologue-value.h (class pv_area): Move from prologue-value.c.
2718         Change names of members.  Add constructor, destructor, member
2719         functions.
2720         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
2721         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
2722         (pv_area_fetch, pv_area_scan): Don't declare.
2723         * prologue-value.c (struct pv_area::area_entry): Now member of
2724         pv_area.
2725         (struct pv_area): Move to prologue-value.h.
2726         (pv_area::pv_area): Rename from make_pv_area.
2727         (pv_area::~pv_area): Rename from free_pv_area.
2728         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
2729         (clear_entries, find_entry, overlaps, store_would_trash, store)
2730         (fetch, find_reg, scan): Now member of pv_area.
2731         Remove "area" argument.  Update.
2732         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
2733         Update.
2734         * mn10300-tdep.c (push_reg, check_for_saved)
2735         (mn10300_analyze_prologue): Update.
2736         * mep-tdep.c (is_arg_spill, check_for_saved)
2737         (mep_analyze_prologue): Update.
2738         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
2739         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
2740         (m32c_is_struct_return, m32c_analyze_prologue): Update.
2741         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
2742         Update.
2743         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
2744         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
2745
2746 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2747
2748         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
2749         * linux-nat.c (linux_nat_delete_thread): New variable.
2750         (lwp_free): Invoke linux_nat_delete_thread if set.
2751         (linux_nat_set_delete_thread): New function.
2752         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
2753         thread delete callback.
2754         * arm-linux-nat.c (arm_linux_delete_thread): New function.
2755         (_initialize_arm_linux_nat): Assign thread delete callback.
2756         * s390-linux-nat.c (s390_delete_thread): New function.
2757         (_initialize_s390_nat): Assign thread delete callback.
2758         * x86-linux-nat.c (x86_linux_add_target): Likewise.
2759         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
2760         function.
2761         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
2762         declaration.
2763         * nat/x86-linux.c (x86_linux_delete_thread): New function.
2764         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
2765
2766 2017-10-09  Tom Tromey  <tom@tromey.com>
2767
2768         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
2769         std::string.
2770         * tui/tui-layout.c (enum tui_status): Use std::string.
2771
2772 2017-10-11  Tom Tromey  <tom@tromey.com>
2773
2774         * gdbthread.h (thread_command): Constify.
2775         * inferior.h (detach_command): Constify.
2776         * top.h (set_history, show_history): Constify.
2777         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
2778         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
2779         * bsd-kvm.c (bsd_kvm_cmd): Constify.
2780         * printcmd.c (set_command): Constify.
2781         (non_const_set_command): New function.
2782         * dcache.c (set_dcache_command, show_dcache_command): Constify.
2783         * breakpoint.c (enable_command, disable_command, delete_command)
2784         (catch_command, tcatch_command, set_breakpoint_cmd)
2785         (show_breakpoint_cmd): Constify.
2786         * macrocmd.c (macro_command): Constify.
2787         * infcmd.c (unset_command, kill_command, detach_command)
2788         (info_proc_cmd): Constify.
2789         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
2790         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
2791         (info_auto_load_cmd): Constify.
2792         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
2793         (unset_tdesc_cmd): Constify.
2794         * ada-lang.c (set_ada_command, show_ada_command)
2795         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
2796         * guile/guile.c (set_guile_command, show_guile_command)
2797         (info_guile_command): Constify.
2798         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
2799         Constify.
2800         * skip.c (skip_command): Constify.
2801         * compile/compile.c (_initialize_compile): Constify.
2802         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
2803         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
2804         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
2805         (maint_btrace_pt_show_cmd): Constify.
2806         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
2807         Constify.
2808         * python/python.c (user_show_python, user_set_python): Constify.
2809         * mips-tdep.c (set_mips_command, show_mips_command)
2810         (set_mipsfpu_command): Constify.
2811         * record-btrace.c (cmd_record_btrace_start)
2812         (cmd_set_record_btrace, cmd_show_record_btrace)
2813         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
2814         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
2815         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
2816         Constify.
2817         * symfile.c (overlay_command): Constify.
2818         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2819         * cli/cli-logging.c (set_logging_command, show_logging_command):
2820         Constify.
2821         * cli/cli-dump.c (dump_command, append_command)
2822         (srec_dump_command, ihex_dump_command, verilog_dump_command)
2823         (tekhex_dump_command, binary_dump_command)
2824         (binary_append_command): Constify.
2825         * cli/cli-decode.c (struct cmd_list_element): Change type of
2826         "fun".
2827         * cli/cli-cmds.c (info_command, show_command, set_debug)
2828         (show_debug): Constify.
2829         (show_command): Add non-const overload.
2830         * top.c (set_history, show_history): Constify.
2831         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
2832         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
2833         * target.c (target_command): Constify.
2834         * sparc64-tdep.c (info_adi_command): Constify.
2835         * record-full.c (cmd_record_full_start): Constify.
2836         (set_record_full_command): Constify.  Fix typo.
2837         (show_record_full_command): Constify.
2838         * thread.c (thread_command, thread_apply_command): Constify.
2839         * memattr.c (dummy_cmd): Constify.
2840         * value.c (function_command): Constify.
2841         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
2842         * probe.c (info_probes_command): Constify.
2843         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
2844         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
2845         (show_thread_cmd, set_thread_default_cmd)
2846         (show_thread_default_cmd): Constify.
2847         (check_empty): Constify.
2848         * tracepoint.c (tfind_command): Constify.
2849         * cp-support.c (maint_cplus_command): Constify.
2850         * windows-tdep.c (info_w32_command): Constify.
2851         * record.c (cmd_record_start, set_record_command)
2852         (show_record_command, info_record_command, cmd_record_goto):
2853         Constify.
2854         * ravenscar-thread.c (set_ravenscar_command)
2855         (show_ravenscar_command): Constify.
2856         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
2857         Constify.
2858         (add_internal_problem_command): Remove casts.
2859         * arc-tdep.c (maintenance_print_arc_command): Constify.
2860         * valprint.c (set_print, show_print, set_print_raw)
2861         (show_print_raw): Constify.
2862         * maint.c (maintenance_command, maintenance_info_command)
2863         (maintenance_print_command, maintenance_set_cmd)
2864         (maintenance_show_cmd, set_per_command_cmd)
2865         (show_per_command_cmd, maintenance_check_command): Constify.
2866         * language.c (set_check, show_check): Constify.
2867         * typeprint.c (show_print_type, set_print_type): Constify.
2868         * go32-nat.c (go32_info_dos_command): Constify.
2869
2870 2017-10-11  Tom Tromey  <tom@tromey.com>
2871
2872         * breakpoint.c (prepare_re_set_context): Remove.
2873         (breakpoint_re_set_one): Update.  Don't use cleanups.
2874         (breakpoint_re_set): Use scoped_restore, std::string, and
2875         scoped_restore_current_language.
2876
2877 2017-10-11  Tom Tromey  <tom@tromey.com>
2878
2879         * breakpoint.c (commands_command_1): Use std::string.
2880         (cleanup_executing_breakpoints): Remove.
2881         (bpstat_do_actions_1): Use scoped_restore.
2882         (bpstat_check_watchpoint): Use std::string.
2883         (decode_static_tracepoint_spec): Likewise.
2884         (break_range_command): Likewise.
2885         (watch_command_1): Likewise.
2886         (compare_breakpoints): Change argument types.
2887         (clear_command): Use std::vector.
2888         (cleanup_executing_breakpoints): Remove.
2889         (update_global_location_list): Use unique_xmalloc_ptr.
2890         (strace_command): Remove unused declaration.
2891
2892 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2893
2894         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
2895         * NEWS: Mention new FreeBSD/arm native configuration.
2896         * configure.host: Add arm*-*-freebsd*.
2897         * configure.nat: Likewise.
2898         * arm-fbsd-nat.c: New file.
2899
2900 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2901
2902         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
2903         (ALLDEPFILES): Add arm-fbsd-tdep.c.
2904         * NEWS: Mention new FreeBSD/arm target.
2905         * configure.tgt: Add arm*-*-freebsd*.
2906         * arm-fbsd-tdep.c: New file.
2907         * arm-fbsd-tdep.h: New file.
2908
2909 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2910
2911         * linux-tdep.c (linux_make_corefile_notes): Remove call to
2912         `gdbarch_elfcore_write_linux_prpsinfo'.
2913         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
2914         method.
2915         (elf_internal_linux_prpsinfo): Remove declaration.
2916         * gdbarch.h: Regenerate.
2917         * gdbarch.c: Regenerate.
2918
2919 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2920
2921         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
2922         `set_gdbarch_elfcore_write_linux_prpsinfo'.
2923
2924 2017-10-11  Pedro Alves  <palves@redhat.com>
2925
2926         * breakpoint.c (reattach_breakpoints): Delete.
2927         * breakpoint.h (reattach_breakpoints): Delete.
2928
2929 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
2930
2931         * symfile.c (registered_sym_fns): Make struct, not typedef.
2932         (DEF_VEC_O (registered_sym_fns)): Remove.
2933         (symtab_fns): Change type to std::vector.
2934         (add_symtab_fns): Adjust.
2935         (find_sym_fns): Adjust.
2936
2937 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
2938
2939         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
2940         * arc-tdep.h (arc_arch_is_em): New function.
2941         (arc_arch_is_hs): Likewise.
2942
2943 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
2944
2945         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
2946         parentheses in the declaration.
2947         (macro_lookup_inclusion): Likewise.
2948         (macro_lookup_definition): Likewise.
2949         * p-lang.h (pascal_builtin_types): Likewise.
2950         * tui/tui-data.c (tui_win_list): Likewise.
2951         * tui/tui-data.h (tui_win_list): Likewise.
2952         * utils.h (make_cleanup_free_section_addr_info): Likewise.
2953
2954 2017-10-11  Mark Rages  <markrages@gmail.com>
2955
2956         * target-memory.c (block_boundaries): Fix for block address not
2957         aligned on block size.
2958
2959 2017-10-10  Pedro Alves <palves@redhat.com>
2960             Tom Tromey  <tom@tromey.com>
2961
2962         * breakpoint.c (struct captured_breakpoint_query_args)
2963         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
2964         (print_breakpoint): New.
2965         * breakpoint.h (print_breakpoint): Declare.
2966         * common/common-exceptions.h (enum return_reason): Remove
2967         references to catch_exceptions.
2968         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
2969         Delete.
2970         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
2971         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
2972         * gdb.h: Delete.
2973         * gdbthread.h (thread_select): Declare.
2974         * mi/mi-cmd-break.c: Don't include gdb.h.
2975         (breakpoint_notify): Use print_breakpoint.
2976         * mi/mi-cmd-catch.c: Don't include gdb.h.
2977         * mi/mi-interp.c: Don't include gdb.h.
2978         (mi_print_breakpoint_for_event): New.
2979         (mi_breakpoint_created, mi_breakpoint_modified): Use
2980         mi_print_breakpoint_for_event.
2981         * mi/mi-main.c: Don't include gdb.h.
2982         (mi_cmd_thread_select): Parse the global thread ID here.  Use
2983         thread_select instead of gdb_thread_select.
2984         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
2985         of using gdb_list_thread_ids.
2986         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
2987         FILEIO_ENOSYS here.
2988         (remote_fileio_request): Use TRY/CATCH instead of
2989         catch_exceptions.
2990         * symfile-mem.c (struct symbol_file_add_from_memory_args)
2991         (symbol_file_add_from_memory_wrapper): Delete.
2992         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
2993         * thread.c: Don't include gdb.h.
2994         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
2995         (thread_alive): Use thread_select.
2996         (do_captured_thread_select): Delete, parts salvaged as ...
2997         (thread_select): ... this new function.
2998         (gdb_thread_select): Delete.
2999
3000 2017-10-10  Pedro Alves  <palves@redhat.com>
3001             Tom Tromey  <tom@tromey.com>
3002
3003         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3004         and reverse logic.
3005         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3006         No longer macros.  Instead ...
3007         (enum wp_check_result): They're now values of this new
3008         enumeration.
3009         (watchpoint_check): Change return type to wp_check_result and
3010         parameter type to bpstat.
3011         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3012         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3013         catch_errors.  Reverse logic of watchpoint_check call.
3014         (breakpoint_re_set_one): Now returns void and takes a breakpoint
3015         pointer as parameter.
3016         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3017         * common/common-exceptions.c (throw_exception_sjlj): Update
3018         comments to avoid mentioning catch_errors.
3019         * exceptions.c (catch_errors): Delete.
3020         * exceptions.h: Update comments to avoid mentioning catch_errors.
3021         (catch_errors_ftype, catch_errors): Delete.
3022         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3023         (hook_stop_stub): Delete.
3024         (restore_selected_frame): Change return type to void, and
3025         parameter type to const frame_id &.
3026         (restore_infcall_control_state): Use TRY/CATCH instead of
3027         catch_errors.
3028         * main.c (captured_command_loop): Return void and remove
3029         parameter.  Remove references to catch_errors.
3030         (captured_main): Use TRY/CATCH instead of catch_errors.
3031         * objc-lang.c (objc_submethod_helper_data)
3032         (find_objc_msgcall_submethod_helper): Delete.
3033         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3034         catch_errors.
3035         * record-full.c (record_full_message): Return void.
3036         (record_full_message_args, record_full_message_wrapper): Delete.
3037         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3038         instead of catch_errors.
3039         * solib-aix.c (solib_aix_open_symbol_file_object): Change
3040         parameter type to int.
3041         * solib-darwin.c (open_symbol_file_object): Ditto.
3042         * solib-dsbt.c (open_symbol_file_object): Ditto.
3043         * solib-frv.c (open_symbol_file_object): Ditto.
3044         * solib-svr4.c (open_symbol_file_object): Ditto.
3045         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3046         * solib.c (update_solib_list): Use TRY/CATCH instead of
3047         catch_errors.
3048         * solist.h (struct target_so_ops) <open_symbol_file_object>:
3049         Change type.
3050         * symmisc.c (struct print_symbol_args): Remove.
3051         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3052         (print_symbol): Change type.
3053         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3054         and remove parameters.
3055         (catch_errors): New.
3056         (get_windows_debug_event): Adjust.
3057
3058 2017-10-09  Tom Tromey  <tom@tromey.com>
3059
3060         * mi/mi-main.c (free_splay_tree): Remove.
3061         (list_available_thread_groups): Use splay_tree_up.
3062         * common/gdb_splay_tree.h: New file.
3063
3064 2017-10-09  Tom Tromey  <tom@tromey.com>
3065
3066         * mi/mi-main.c (do_nothing): Remove.
3067         (list_available_thread_groups): Update.
3068
3069 2017-10-09  Pedro Alves  <palves@redhat.com>
3070
3071         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3072         reading registers when switching context.
3073
3074 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
3075
3076         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3077         (fbsd_convert_siginfo): Likewise.
3078         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3079
3080 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
3081
3082         * configure.ac (try_guile_versions): Remove guile-2.2.
3083         * configure: Regenerate.
3084
3085 2017-10-09  Tom Tromey  <tom@tromey.com>
3086
3087         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3088         (COMPILE.pre): Use $(CXX).
3089
3090 2017-10-09  Pedro Alves  <palves@redhat.com>
3091
3092         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3093         Use bool.
3094         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3095         * cp-support.h (cp_remove_params): Now returns a
3096         gdb::unique_xmalloc_ptr.
3097         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3098         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3099         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3100         returning a gdb::unique_xmalloc_ptr.
3101         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3102         * stack.c (find_frame_funname): Adjust to cp_remove_params
3103         returning a gdb::unique_xmalloc_ptr.
3104
3105 2017-10-08  Tom Tromey  <tom@tromey.com>
3106
3107         * dwarf2read.c (dwarf2_get_dwz_file): Use
3108         gdb::unique_xmalloc_ptr.
3109         (find_slot_in_mapped_hash): Likewise.
3110         (dwarf2_physname): Likewise.
3111         (create_dwo_unit_in_dwp_v1): Use std::string.
3112         (create_dwo_unit_in_dwp_v2): Likewise.
3113         (lookup_dwo_cutu): Likewise.
3114         (inherit_abstract_dies): Use std::vector.
3115         (read_array_type): Likewise.
3116         (dwarf_decode_macros): Remove unused declaration.
3117         (unsigned_int_compar): Remove.
3118         (dwarf2_build_psymtabs_hard): Use scoped_restore.
3119         (psymtabs_addrmap_cleanup): Remove.
3120
3121 2017-10-08  Tom Tromey  <tom@tromey.com>
3122
3123         * frame-unwind.c (frame_unwind_try_unwinder): Update.
3124         * frame.h (frame_cleanup_after_sniffer): Declare.
3125         (frame_prepare_for_sniffer): Return void.
3126         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
3127         type of argument.
3128         (frame_prepare_for_sniffer): Return void.
3129
3130 2017-10-08  Tom Tromey  <tom@tromey.com>
3131
3132         * utils.h (make_cleanup_value_free): Remove.
3133         * utils.c (do_value_free, struct cleanup): Remove.
3134         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3135         Use gdb_value_up.
3136         * value.h (struct value_deleter): New.
3137         (gdb_value_up): New typedef.
3138
3139 2017-10-08  Tom Tromey  <tom@tromey.com>
3140
3141         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3142         (make_cleanup_free_search_symbols): Remove.
3143         (search_symbols): Return std::vector.
3144         (symbol_search::compare_search_syms): Now member of
3145         symbol_search.  Change arguments.
3146         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
3147         (symtab_symbol_info, rbreak_command): Update.
3148         * symtab.h (struct symbol_search) <next>: Remove.
3149         Add constructors.
3150         (symbol_search::operator<): New function.
3151         (symbol_search::operator==): New function.
3152         (search_symbols): Remove std::vector.
3153         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3154         (symbol_search::compare_search_syms): Declare.
3155
3156 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3157
3158         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3159         arch/aarch64-insn.o.
3160         Remove one rule.
3161         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3162
3163 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3164
3165         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3166         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3167         arch/arm-linux.o respectively.
3168         * configure.tgt: Likewise.
3169
3170 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3171
3172         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3173         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3174
3175 2017-10-06  Pedro Alves  <palves@redhat.com>
3176
3177         * windows-nat.c: Include <algorithm>.
3178
3179 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3180
3181         * configure.tgt (i386_tobjs): New variable.
3182         (amd64_tobjs): New variable.
3183         Set $cpu_obs and $os_obs.
3184
3185 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3186
3187         * Makefile.in (CONFIG_SRC_SUBDIR): New.
3188         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3189         (clean): Remove object files and dependency files.
3190         (distclean): Remove the directory.
3191         * configure.ac: Invoke AC_CONFIG_COMMANDS.
3192         * configure: Re-generated.
3193         * configure.tgt: Replace amd64.o with arch/amd64.o.
3194
3195 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
3196
3197         PR build/22188
3198         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3199         and SETEND.
3200
3201 2017-10-05  Pedro Alves  <palves@redhat.com>
3202
3203         * linux-nat.c (linux_child_follow_fork): When following the parent
3204         and detaching the child, consult the parent thread's architecture
3205         instead of the child's.
3206
3207 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3208
3209         * ax.h: Do not include "doublest.h".
3210         (union agent_val): Remove.
3211
3212 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3213
3214         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3215         (decimal_to_string): Return std::string object.
3216         (decimal_from_string): Accept std::string object.  Return bool.
3217         (decimal_from_integral, decimal_from_doublest): Remove.
3218         (decimal_from_longest): Add prototype.
3219         (decimal_from_ulongest): Likewise.
3220         (decimal_to_longest): Likewise.
3221         (decimal_from_doublest): Likewise.
3222         * dfp.c: Do not include "gdbtypes.h" or "value.h".
3223         (MAX_DECIMAL_STRING): Move here.
3224         (decimal_to_string): Return std::string object.
3225         (decimal_from_string): Accept std::string object.  Return bool.
3226         (decimal_from_integral): Remove, replace by ...
3227         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3228         (decimal_to_longest): New function.
3229         (decimal_from_floating): Remove, replace by ...
3230         (decimal_from_doublest): ... this new function.
3231         (decimal_to_doublest): Update to new decimal_to_string interface.
3232
3233         * value.c (unpack_long): Use decimal_to_longest.
3234         * valops.c (value_cast): Use decimal_from_doublest instead of
3235         decimal_from_floating.  Use decimal_from_[u]longest isntead of
3236         decimal_from_integral.
3237         * valarith.c (value_args_as_decimal): Likewise.
3238         * valprint.c (print_decimal_floating): Update to new
3239         decimal_to_string interface.
3240         * printcmd.c (printf_decfloat): Likewise.
3241         * c-exp.y (parse_number): Update to new decimal_from_string interface.
3242
3243 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3244
3245         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
3246         * gdbtypes.c: Include "floatformat.h".
3247         * value.c: Likewise.
3248         * m68k-tdep.c: Likewise.
3249
3250         * findvar.c: Do not include "floatformat.h".
3251         * amd64-darwin-tdep.c: Likewise.
3252         * arm-linux-tdep.c: Likewise.
3253         * i386-darwin-tdep.c: Likewise.
3254         * i387-tdep.c: Likewise.
3255         * m68k-linux-tdep.c: Likewise.
3256         * mep-tdep.c: Likewise.
3257         * mips-tdep.c: Likewise.
3258         * nios2-tdep.c: Likewise.
3259         * s390-linux-tdep.c: Likewise.
3260         * sparc-obsd-tdep.c: Likewise.
3261         * sparc-tdep.c: Likewise.
3262         * sparc64-tdep.c: Likewise.
3263         * spu-tdep.c: Likewise.
3264         * tic6x-tdep.c: Likewise.
3265         * tilegx-tdep.c: Likewise.
3266         * vax-tdep.c: Likewise.
3267         * xstormy16-tdep.c: Likewise.
3268         * xtensa-tdep.c: Likewise.
3269
3270         * top.c: Do not include "doublest.h".
3271         * aarch64-tdep.c: Likewise.
3272         * alpha-tdep.c: Likewise.
3273         * arm-linux-tdep.c: Likewise.
3274         * m68k-linux-tdep.c: Likewise.
3275         * tilegx-tdep.c: Likewise.
3276         * xstormy16-tdep.c: Likewise.
3277
3278 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3279
3280         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3281         (mipsn32_fbsd_sigframe): Define.
3282         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3283         for FreeBSD/mipsn32.
3284
3285 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3286
3287         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3288         AT_HWCAP.
3289
3290 2017-10-05  Tristan Gingold  <tgingold@free.fr>
3291
3292         * MAINTAINERS (Misc): Update my email address.
3293
3294 2017-10-04  Pedro Alves  <palves@redhat.com>
3295
3296         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
3297         it instead of target_gdbarch.
3298         (get_remote_state, get_remote_packet_size): Adjust
3299         get_remote_arch_state calls, passing down target_gdbarch
3300         explicitly.
3301         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3302         'gdbarch' and use it instead of target_gdbarch.
3303         (get_memory_packet_size): Adjust get_remote_arch_state calls,
3304         passing down target_gdbarch explicitly.
3305         (struct stop_reply) <arch>: New field.
3306         (remote_parse_stop_reply): Use the stopped thread's architecture,
3307         not the current inferior's.  Save the architecture in the
3308         stop_reply.
3309         (process_stop_reply): Use the stop reply's architecture.
3310         (process_g_packet, remote_fetch_registers)
3311         (remote_prepare_to_store, store_registers_using_G)
3312         (remote_store_registers): Adjust get_remote_arch_state calls,
3313         using the regcache's architecture.
3314         (remote_get_trace_status): Adjust get_remote_arch_state calls,
3315         passing down target_gdbarch explicitly.
3316         * spu-multiarch.c (spu_thread_architecture): Defer to the target
3317         beneath instead of calling target_gdbarch.
3318         * target.c (default_thread_architecture): Use the specified
3319         inferior's architecture, instead of the current inferior's
3320         architecture (via target_gdbarch).
3321
3322 2017-10-04  Pedro Alves  <palves@redhat.com>
3323
3324         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3325         case.
3326         (regcache_print): Handle !target_has_registers here instead.
3327
3328 2017-10-04  Pedro Alves  <palves@redhat.com>
3329
3330         * frame.c (create_test_frame): Delete.
3331         * frame.h (create_test_frame): Delete.
3332         * gdbarch-selftests.c: Include gdbthread.h and target.h.
3333         (class regcache_test): Delete.
3334         (test_target_has_registers, test_target_has_stack)
3335         (test_target_has_memory, test_target_prepare_to_store)
3336         (test_target_store_registers): New functions.
3337         (test_target_ops): New class.
3338         (register_to_value_test): Error out if there's already a
3339         process_stratum (or higher) target pushed.  Create a fuller mock
3340         environment, with mock target_ops, inferior, address space, thread
3341         and inferior_ptid.
3342         * progspace.c (struct address_space): Move to ...
3343         * progspace.h (struct address_space): ... here.
3344         * regcache.h (regcache::~regcache, regcache::raw_write)
3345         [GDB_SELF_TEST]: No longer virtual.
3346
3347 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
3348
3349         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3350
3351 2017-10-04  Pedro Alves  <palves@redhat.com>
3352
3353         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3354         out of 'between TRY and CATCH'.
3355
3356 2017-10-04  Pedro Alves  <palves@redhat.com>
3357
3358         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3359         * common/common-exceptions.h (TRY): Open an outermost scope.
3360         Expand intro comment.
3361         (CATCH): Reindent.
3362         (END_CATCH): Close the outermost scope.
3363         * completer.c (complete_line_internal): Add missing END_CATCH.
3364
3365 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3366
3367         * NEWS (Changes since GDB 8.0): Add entry about new
3368         'set-cwd-on-gdbserver' feature.
3369         (New remote packets): Add entry for QSetWorkingDir.
3370         * common/common-inferior.h (set_inferior_cwd): New prototype.
3371         * infcmd.c (set_inferior_cwd): Remove "static".
3372         (show_cwd_command): Expand text to include remote debugging.
3373         * remote.c: Add PACKET_QSetWorkingDir.
3374         (remote_protocol_features) <QSetWorkingDir>: New entry for
3375         PACKET_QSetWorkingDir.
3376         (extended_remote_set_inferior_cwd): New function.
3377         (extended_remote_create_inferior): Call
3378         "extended_remote_set_inferior_cwd".
3379         (_initialize_remote): Call "add_packet_config_cmd" for
3380         QSetWorkingDir.
3381
3382 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3383
3384         * NEWS (New commands): Mention "set/show cwd".
3385         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3386         "cd" command's help text.
3387         * common/common-inferior.h (get_inferior_cwd): New prototype.
3388         * infcmd.c (inferior_cwd_scratch): New global variable.
3389         (set_inferior_cwd): New function.
3390         (get_inferior_cwd): Likewise.
3391         (set_cwd_command): Likewise.
3392         (show_cwd_command): Likewise.
3393         (_initialize_infcmd): Add "set/show cwd" commands.
3394         * inferior.h (class inferior) <cwd>: New field.
3395         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3396         (fork_inferior): Change inferior's cwd before its execution.
3397         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3398         to CreateProcess.
3399
3400 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3401
3402         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3403         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3404         (COMMON_OBS): Add gdb_tilde_expand.o.
3405         * common/gdb_tilde_expand.c: New file.
3406         * common/gdb_tilde_expand.h: Likewise.
3407
3408 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
3409
3410         * gdbarch.sh (objfile): Remove duplicate declaration.
3411         * gdbarch.h: Regenerate.
3412
3413 2017-10-03  Tom Tromey  <tom@tromey.com>
3414
3415         * utils.c (internal_vproblem): Use string_vprintf.
3416
3417 2017-10-03  Tom Tromey  <tom@tromey.com>
3418
3419         * printcmd.c (info_symbol_command): Use std::string.
3420
3421 2017-10-03  Tom Tromey  <tom@tromey.com>
3422
3423         * top.c (gdb_safe_append_history): Use std::string.
3424
3425 2017-10-03  Tom Tromey  <tom@tromey.com>
3426
3427         * event-top.c (stdin_event_handler): Update.
3428         * main.c (captured_main_1): Update.
3429         * top.h (make_delete_ui_cleanup): Remove.
3430         (struct ui): Add constructor and destructor.
3431         (new_ui, delete_ui): Remove.
3432         * top.c (make_delete_ui_cleanup): Remove.
3433         (new_ui_command): Use std::unique_ptr.
3434         (delete_ui_cleanup): Remove.
3435         (ui::ui): Rename from new_ui.  Update.
3436         (free_ui): Remove.
3437         (ui::~ui): Rename from delete_ui.  Update.
3438
3439 2017-10-03  Tom Tromey  <tom@tromey.com>
3440
3441         * symfile.c (load_progress): Use gdb::byte_vector.
3442
3443 2017-10-03  Tom Tromey  <tom@tromey.com>
3444
3445         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3446         declaration.
3447         * printcmd.c (x_command): Remove unused declaration.
3448         * symfile.c (symbol_file_command): Remove unused declaration.
3449
3450 2017-10-03  Tom Tromey  <tom@tromey.com>
3451
3452         * utils.c (internal_vproblem): Use std::string.
3453         (defaulted_query): Likewise.
3454
3455 2017-10-03  Tom Tromey  <tom@tromey.com>
3456
3457         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3458         * top.c (execute_command_to_string): Update.
3459         * utils.c (make_cleanup_restore_page_info): Remove.
3460         (do_restore_page_info_cleanup): Remove.
3461         (set_batch_flag_and_restore_page_info):
3462         New.
3463         (make_cleanup_restore_page_info): Remove.
3464         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3465         (~set_batch_flag_and_restore_page_info): New
3466         (make_cleanup_restore_uinteger): Remove.
3467         (make_cleanup_restore_integer): Remove.
3468         (struct restore_integer_closure): Remove.
3469         (restore_integer): Remove.
3470         * utils.h (struct set_batch_flag_and_restore_page_info): New
3471         class.
3472         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3473         (make_cleanup_restore_page_info): Remove.
3474         (make_cleanup_restore_uinteger) Remove.
3475         (make_cleanup_restore_integer) Remove.
3476
3477 2017-10-03  Tom Tromey  <tom@tromey.com>
3478
3479         * record-full.h (record_full_gdb_operation_disable_set): Return
3480         scoped_restore_tmpl<int>.
3481         * infrun.c (adjust_pc_after_break): Update.
3482         (handle_signal_stop): Update.
3483         * record-full.c (record_full_gdb_operation_disable_set): Return
3484         scoped_restore_tmpl<int>.
3485         (record_full_wait_1, record_full_insert_breakpoint)
3486         (record_full_remove_breakpoint, record_full_save)
3487         (record_full_goto_insn): Update.
3488
3489 2017-10-02  Tom Tromey  <tom@tromey.com>
3490
3491         PR rust/22236:
3492         * rust-lang.c (rust_val_print_str): New function.
3493         (val_print_struct): Call it.
3494         (rust_subscript): Preserve name of slice type.
3495
3496 2017-10-02  Tom Tromey  <tom@tromey.com>
3497
3498         * rust-lang.c (rust_subscript): Handle slices in
3499         EVAL_AVOID_SIDE_EFFECTS case.
3500
3501 2017-10-02  Tom Tromey  <tom@tromey.com>
3502
3503         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3504
3505 2017-10-02  Tom Tromey  <tom@tromey.com>
3506
3507         * rust-lang.h (rust_slice_type): Add "extern".
3508
3509 2017-10-02  Tom Tromey  <tom@tromey.com>
3510             Pedro Alves  <palves@redhat.com>
3511
3512         * ada-lang.h (ada_exc_info::operator<): Make const.
3513         (ada_exc_info::operator==): Make const.
3514         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3515         Make const.
3516
3517 2017-09-29  Tom Tromey  <tom@tromey.com>
3518
3519         * target.c (read_whatever_is_readable): Change type of "result".
3520         Update.
3521         (free_memory_read_result_vector): Remove.
3522         (read_memory_robust): Change return type.  Update.
3523         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
3524         bin2hex, std::string.
3525         * target.h (memory_read_result_s): Remove typedef.
3526         (free_memory_read_result_vector): Remove.
3527         (read_memory_robust): Return std::vector.
3528
3529 2017-09-29  Tom Tromey  <tom@tromey.com>
3530
3531         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3532
3533 2017-09-29  Tom Tromey  <tom@tromey.com>
3534
3535         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3536         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
3537         operator< and operator==.
3538         (ada_exceptions_list): Return a std::vector.
3539         * ada-lang.c (ada_exc_info::operator<): Rename from
3540         compare_ada_exception_info.
3541         (ada_exc_info::operator==): New.
3542         (sort_remove_dups_ada_exceptions_list): Change type of
3543         "exceptions".
3544         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3545         (ada_add_global_exceptions): Likewise.
3546         (ada_exceptions_list_1): Return a std::vector.
3547         (ada_exceptions_list): Likewise.
3548
3549 2017-09-29  Tom Tromey  <tom@tromey.com>
3550
3551         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3552         'std::set *'.
3553         (print_one_inferior): Update.
3554         (free_vector_of_ints): Remove.
3555         (list_available_thread_groups): Change "ids" to std::set.
3556         (mi_cmd_list_thread_groups): Update.
3557         (struct collect_cores_data) <core>: Now a std::set.
3558         (collect_cores): Update.
3559         (unique): Remove.
3560         (print_one_inferior): Update.
3561
3562 2017-09-29  Tom Tromey  <tom@tromey.com>
3563
3564         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3565         (mi_execute_async_cli_command): Likewise.
3566         (mi_cmd_trace_frame_collected): Use field_fmt.
3567
3568 2017-09-29  Tom Tromey  <tom@tromey.com>
3569
3570         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3571         gdb::byte_vector.
3572
3573 2017-09-29  Tom Tromey  <tom@tromey.com>
3574
3575         * mi/mi-parse.c (mi_parse): Remove unused declaration.
3576
3577 2017-09-29  Tom Tromey  <tom@tromey.com>
3578
3579         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3580
3581 2017-09-29  Tom Tromey  <tom@tromey.com>
3582
3583         * varobj.h (varobj_gen_name): Return std::string.
3584         * varobj.c (varobj_gen_name): Return std::string.
3585         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3586         (mi_cmd_var_delete): Don't copy "name".
3587
3588 2017-09-29  Tom Tromey  <tom@tromey.com>
3589
3590         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3591         (mi_cmd_break_insert_1): Update.
3592
3593 2017-09-29  Tom Tromey  <tom@tromey.com>
3594
3595         * target.h (make_scoped_defer_target_commit_resume): Update.
3596         * target.c (make_scoped_defer_target_commit_resume): Rename from
3597         make_cleanup_defer_target_commit_resume.  Return a
3598         scoped_restore.
3599         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3600
3601 2017-09-29  Tom Tromey  <tom@tromey.com>
3602
3603         * main.c (captured_main_1): Remove unused declaration.
3604         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3605
3606 2017-09-29  Tom Tromey  <tom@tromey.com>
3607
3608         * symtab.c (search_symbols): Remove unused outer cleanup.
3609         (make_source_files_completion_list): Remove unused declaration.
3610
3611 2017-09-29  Tom Tromey  <tom@tromey.com>
3612
3613         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3614
3615 2017-09-29  Tom Tromey  <tom@tromey.com>
3616
3617         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3618         gdb::byte_vector.
3619
3620 2017-09-29  Tom Tromey  <tom@tromey.com>
3621
3622         * complaints.c (vcomplaint): Use std::string.
3623
3624 2017-09-29  Tom Tromey  <tom@tromey.com>
3625
3626         * tracepoint.c (trace_variable_command): Use std::string.
3627         (encode_actions_1): Remove unused declarations.
3628         (create_tsv_from_upload): Use std::string.
3629
3630 2017-09-29  Tom Tromey  <tom@tromey.com>
3631
3632         * cp-support.c (gdb_demangle): Use std::string.
3633
3634 2017-09-29  Tom Tromey  <tom@tromey.com>
3635
3636         * stack.c (parse_frame_specification): Use std::string
3637         (info_frame_command): Use gdb::unique_xmalloc_ptr.
3638
3639 2017-09-29  Tom Tromey  <tom@tromey.com>
3640
3641         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3642
3643 2017-09-29  Tom Tromey  <tom@tromey.com>
3644
3645         * utils.c (vfprintf_maybe_filtered): Use std::string.
3646         (vfprintf_unfiltered): Likewise.
3647
3648 2017-09-29  Tom Tromey  <tom@tromey.com>
3649
3650         * event-top.c (top_level_prompt): Return std::string.
3651         (display_gdb_prompt): Update.
3652
3653 2017-09-29  Tom Tromey  <tom@tromey.com>
3654
3655         * unittests/common-utils-selftests.c (format): New function.
3656         (string_vprintf_tests): New function.
3657         (_initialize_common_utils_selftests): Register new tests.
3658         * common/common-utils.c (string_vprintf): New function.
3659         * common/common-utils.h (string_vprintf): Declare.
3660
3661 2017-09-29  Pedro Alves  <palves@redhat.com>
3662
3663         * common/rsp-low.c (unpack_varlen_hex): Constify.
3664         * common/rsp-low.h (unpack_varlen_hex): Constify.
3665         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3666         Constify.
3667         * remote.c (remote_set_permissions, read_ptid)
3668         (remote_current_thread, remote_get_threads_with_qthreadinfo)
3669         (remote_static_tracepoint_marker_at)
3670         (remote_static_tracepoint_markers_by_strid)
3671         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3672         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3673         (parse_tracepoint_definition, parse_tsv_definition)
3674         (parse_static_tracepoint_marker_definition): Constify.
3675         * tracepoint.h (parse_static_tracepoint_marker_definition)
3676         (parse_trace_status, parse_tracepoint_status)
3677         (parse_tracepoint_definition, parse_tsv_definition): Constify.
3678
3679 2017-09-29  Pedro Alves  <palves@redhat.com>
3680
3681         * remote.c (target_buf, target_buf_size): Delete.
3682         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3683         Use the connection's packet buffer instead.
3684         All callers adjusted.
3685         (_initialize_remote): Remove references to target_buf and
3686         target_buf_size.
3687
3688 2017-09-28  Pedro Alves  <palves@redhat.com>
3689
3690         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3691         unittests/common-utils-selftests.c.
3692         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
3693         (COMMON_OBS): Remove utils-selftests.o.
3694         * utils-selftests.c: Move to ...
3695         * unittests/common-utils-selftests.c: ... here and rename self
3696         test to "string_printf".
3697
3698 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
3699
3700         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
3701         having NULL cus or tus.
3702
3703 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3704
3705         * arm-tdep.c: (convert_from_extended): Remove.
3706         (convert_to_extended): Likewise.
3707         (arm_extract_return_value): Use convert_typed_floating.
3708         (arm_store_return_value): Likewise.
3709
3710         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3711         * sh-tdep.c: Do not include "floatformat.h".
3712         (sh_littlebyte_bigword_type): New function.
3713         (sh_register_convert_to_virtual): Use convert_typed_floating.
3714         (sh_register_convert_to_raw): Likewise.
3715         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3716         (sh64_littlebyte_bigword_type): New function.
3717         (sh64_extract_return_value): Use convert_typed_floating.
3718         (sh64_register_convert_to_virtual): Likewise.
3719         (sh64_register_convert_to_raw): Likewise.
3720
3721 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3722
3723         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
3724         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
3725
3726         * gdbtypes.h (union type_specific): Make field floatformat hold
3727         just a single struct floatformat, not an array.
3728         (floatformat_from_type): Move here.
3729         * gdbtypes.c (floatformat_from_type): Move here.  Update to
3730         changed TYPE_FLOATFORMAT definition.
3731         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
3732         (recursive_dump_type): Likewise.
3733         (init_float_type): Install correct floatformat for byte order.
3734         (arch_float_type): Likewise.
3735
3736 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3737
3738         * gdbtypes.c (init_type): Change incoming argument from
3739         length-in-bytes to length-in-bits.  Assert length is a
3740         multiple of TARGET_CHAR_BITS.
3741         (arch_type, arch_flags_type): Likewise.
3742         (init_integer_type): Update call to init_type.
3743         (init_character_type): Likewise.
3744         (init_boolean_type): Likewise.
3745         (init_float_type): Likewise.
3746         (init_decfloat_type): Likewise.
3747         (init_complex_type): Likewise.
3748         (init_pointer_type): Likewise.
3749         (objfile_type): Likewise.
3750         (arch_integer_type): Update call to arch_type.
3751         (arch_character_type): Likewise.
3752         (arch_boolean_type): Likewise.
3753         (arch_float_type): Likewise.
3754         (arch_decfloat_type): Likewise.
3755         (arch_complex_type): Likewise.
3756         (arch_pointer_type): Likewise.
3757         (gdbtypes_post_init): Likewise.
3758
3759         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
3760         (read_base_type): Likewise.
3761         * mdebugread.c (basic_type): Likewise.
3762         * stabsread.c (dbx_init_float_type): Likewise.
3763         (rs6000_builtin_type): Likewise.
3764         (read_range_type): Likewise.  Also, fix call to init_integer_type
3765         with erroneous length argument.
3766
3767         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
3768         * d-lang.c (build_d_types): Likewise.
3769         * f-lang.c (build_fortran_types): Likewise.
3770         * go-lang.c (build_go_types): Likewise.
3771         * opencl-lang.c (build_opencl_types): Likewise.
3772         * jit.c (finalize_symtab): Likewise.
3773         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
3774         (build_std_type_info_type): Likewise.
3775         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
3776         update call to arch_flags_type.
3777
3778         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
3779         arch_type.
3780         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
3781         * windows-tdep.c (windows_get_tlb_type): Likewise.
3782
3783         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
3784         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3785         * m32c-tdep.c (make_types): Likewise.
3786         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
3787         (rl78_psw_type): Update call to arch_flags_type.
3788         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
3789         * rx-tdep.c (rx_psw_type): Likewise.
3790         (rx_fpsw_type): Likewise.
3791         * sparc-tdep.c (sparc_psr_type): Likewise.
3792         (sparc_fsr_type): Likewise.
3793         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
3794         (sparc64_ccr_type): Likewise.
3795         (sparc64_fsr_type): Likewise.
3796         (sparc64_fprs_type): Likewise.
3797
3798 2017-09-27  Tom Tromey  <tom@tromey.com>
3799
3800         * findcmd.c (find_command): Constify.
3801
3802 2017-09-27  Tom Tromey  <tom@tromey.com>
3803
3804         * ada-tasks.c (task_command_1, task_command): Constify.
3805
3806 2017-09-27  Tom Tromey  <tom@tromey.com>
3807
3808         * symtab.c (maintenance_print_symbol_cache)
3809         (maintenance_flush_symbol_cache)
3810         (maintenance_print_symbol_cache_statistics): Constify.
3811
3812 2017-09-27  Tom Tromey  <tom@tromey.com>
3813
3814         * inferior.c (detach_inferior_command, kill_inferior_command)
3815         (inferior_command): Constify.
3816
3817 2017-09-27  Tom Tromey  <tom@tromey.com>
3818
3819         * regcache.c (regcache_print, maintenance_print_registers)
3820         (maintenance_print_raw_registers)
3821         (maintenance_print_cooked_registers)
3822         (maintenance_print_register_groups)
3823         (maintenance_print_remote_registers): Constify.
3824
3825 2017-09-27  Tom Tromey  <tom@tromey.com>
3826
3827         * printcmd.c (map_display_numbers, undisplay_command)
3828         (enable_disable_display_command, enable_display_command)
3829         (disable_display_command): Constify.
3830
3831 2017-09-27  Tom Tromey  <tom@tromey.com>
3832
3833         * breakpoint.h (delete_command): Don't declare.
3834         * breakpoint.c (delete_command, enable_once_command)
3835         (enable_count_command, enable_delete_command, breakpoint_1)
3836         (maintenance_info_breakpoints, stopin_command, stopat_command)
3837         (delete_command, delete_trace_command, save_breakpoints)
3838         (save_breakpoints_command, save_tracepoints_command): Constify.
3839
3840 2017-09-27  Tom Tromey  <tom@tromey.com>
3841
3842         * macrocmd.c (macro_expand_command, macro_expand_once_command)
3843         (skip_ws, extract_identifier, macro_define_command)
3844         (macro_undef_command, macro_list_command): Constify.
3845
3846 2017-09-27  Tom Tromey  <tom@tromey.com>
3847
3848         * infcmd.c (environment_info, set_environment_command)
3849         (unset_environment_command, path_info, info_proc_cmd_1)
3850         (info_proc_cmd_mappings, info_proc_cmd_stat)
3851         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
3852         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
3853
3854 2017-09-27  Tom Tromey  <tom@tromey.com>
3855
3856         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
3857         Constify.
3858
3859 2017-09-27  Tom Tromey  <tom@tromey.com>
3860
3861         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
3862
3863 2017-09-27  Tom Tromey  <tom@tromey.com>
3864
3865         * demangle.c (demangle_command): Constify.
3866
3867 2017-09-27  Tom Tromey  <tom@tromey.com>
3868
3869         * progspace.c (maintenance_info_program_spaces_command):
3870         Constify.
3871
3872 2017-09-27  Tom Tromey  <tom@tromey.com>
3873
3874         * compile/compile.c (check_raw_argument, compile_file_command)
3875         (compile_code_command, compile_print_command): Constify.
3876
3877 2017-09-27  Tom Tromey  <tom@tromey.com>
3878
3879         * reggroups.c (maintenance_print_reggroups): Constify.
3880
3881 2017-09-27  Tom Tromey  <tom@tromey.com>
3882
3883         * dwarf2read.c (save_gdb_index_command): Constify.
3884
3885 2017-09-27  Tom Tromey  <tom@tromey.com>
3886
3887         * stap-probe.c (info_probes_stap_command): Constify.
3888
3889 2017-09-27  Tom Tromey  <tom@tromey.com>
3890
3891         * fork-child.c (unset_exec_wrapper_command): Constify.
3892
3893 2017-09-27  Tom Tromey  <tom@tromey.com>
3894
3895         * btrace.c (get_uint, get_context_size, no_chunk)
3896         (maint_btrace_packet_history_cmd)
3897         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
3898         (maint_info_btrace_cmd): Constify.
3899
3900 2017-09-27  Tom Tromey  <tom@tromey.com>
3901
3902         * reverse.c (delete_bookmark_command): Constify.
3903
3904 2017-09-27  Tom Tromey  <tom@tromey.com>
3905
3906         * remote.c (set_memory_packet_size)
3907         (set_memory_write_packet_size, show_memory_write_packet_size)
3908         (set_memory_read_packet_size, show_memory_read_packet_size)
3909         (compare_sections_command, packet_command, remote_put_command)
3910         (remote_get_command, remote_delete_command): Constify.
3911
3912 2017-09-27  Tom Tromey  <tom@tromey.com>
3913
3914         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
3915         (set_mipsfpu_double_command, set_mipsfpu_none_command)
3916         (set_mipsfpu_auto_command): Constify.
3917
3918 2017-09-27  Tom Tromey  <tom@tromey.com>
3919
3920         * cli/cli-cmds.h (cd_command): Constify.
3921         * cli/cli-cmds.c (cd_command): Constify.
3922
3923 2017-09-27  Tom Tromey  <tom@tromey.com>
3924
3925         * thread.c (thread_name_command, thread_find_command): Constify.
3926
3927 2017-09-27  Tom Tromey  <tom@tromey.com>
3928
3929         * probe.c (enable_probes_command, disable_probes_command):
3930         Constify.
3931
3932 2017-09-27  Tom Tromey  <tom@tromey.com>
3933
3934         * symfile.c (symbol_file_command): Constify.
3935         * gdbcore.h (deprecated_file_changed_hook): Constify.
3936         * exec.c (deprecated_file_changed_hook, exec_file_command)
3937         (file_command): Constify.
3938         * defs.h (symbol_file_command): Constify.
3939
3940 2017-09-27  Tom Tromey  <tom@tromey.com>
3941
3942         * remote-fileio.c (set_system_call_allowed)
3943         (show_system_call_allowed): Constify.
3944
3945 2017-09-27  Tom Tromey  <tom@tromey.com>
3946
3947         * tracepoint.c (delete_trace_variable_command)
3948         (tfind_end_command, tfind_start_command, tfind_pc_command)
3949         (tfind_tracepoint_command, tfind_line_command)
3950         (tfind_range_command, tfind_outside_command): Constify.
3951
3952 2017-09-27  Tom Tromey  <tom@tromey.com>
3953
3954         * ax-gdb.c (maint_agent_printf_command, agent_command)
3955         (agent_eval_command): Constify.
3956
3957 2017-09-27  Tom Tromey  <tom@tromey.com>
3958
3959         * tracepoint.c (info_scope_command): Constify.
3960         * python/python.c (gdbpy_decode_line): Constify.
3961         * python/py-breakpoint.c (bppy_init): Constify.
3962         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
3963         * location.h: (new_linespec_location)
3964         (string_to_event_location_basic, string_to_event_location):
3965         Constify.
3966         * location.c (new_linespec_location)
3967         (string_to_event_location_basic, string_to_event_location):
3968         Constify.
3969         * linespec.h (decode_line_with_current_source)
3970         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
3971         * linespec.c (linespec_lex_to_end)
3972         (decode_line_with_current_source)
3973         (decode_line_with_last_displayed): Constify.
3974         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
3975         Constify.
3976         * cli/cli-cmds.c (edit_command, list_command): Constify.
3977         * breakpoint.h (until_break_command, watch_command_wrapper)
3978         (awatch_command_wrapper, rwatch_command_wrapper)
3979         (init_ada_exception_breakpoint): Constify.
3980         * breakpoint.c (break_command_1, dprintf_command)
3981         (break_range_command, watch_command_wrapper)
3982         (rwatch_command_wrapper, awatch_command_wrapper)
3983         (until_break_command, init_ada_exception_breakpoint)
3984         (strace_marker_create_sals_from_location, trace_command)
3985         (ftrace_command, strace_command, struct tracepoint): Constify.
3986         * ax-gdb.c (agent_command_1): Constify.
3987         * ada-lang.c (ada_exception_sal): Constify.
3988
3989 2017-09-27  Tom Tromey  <tom@tromey.com>
3990
3991         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
3992         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
3993         (get_context_size, no_chunk, get_insn_history_modifiers)
3994         (cmd_record_insn_history, get_call_history_modifiers)
3995         (cmd_record_call_history): Constify.
3996
3997 2017-09-27  Tom Tromey  <tom@tromey.com>
3998
3999         * source.c (show_substitute_path_command)
4000         (unset_substitute_path_command, set_substitute_path_command):
4001         Constify.
4002
4003 2017-09-27  Tom Tromey  <tom@tromey.com>
4004
4005         * typeprint.c (maintenance_print_type): Constify.
4006         * maint.c (maintenance_dump_me, maintenance_demangle)
4007         (maintenance_time_display, maintenance_info_sections)
4008         (maintenance_print_statistics, maintenance_deprecate)
4009         (maintenance_undeprecate): Constify.
4010         (maintenance_do_deprecate): Constify.  Use std::string.
4011         (maintenance_selftest): Constify.
4012         * gdbtypes.h (maintenance_print_type): Constify.
4013
4014 2017-09-27  Tom Tromey  <tom@tromey.com>
4015
4016         * hppa-tdep.c (unwind_command): Constify.
4017
4018 2017-09-27  Tom Tromey  <tom@tromey.com>
4019
4020         * target-descriptions.c (unset_tdesc_filename_cmd)
4021         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4022         Constify.
4023
4024 2017-09-27  Tom Tromey  <tom@tromey.com>
4025
4026         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4027
4028 2017-09-27  Tom Tromey  <tom@tromey.com>
4029
4030         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4031
4032 2017-09-27  Tom Tromey  <tom@tromey.com>
4033
4034         * tui/tui-regs.c (tui_reg_command): Constify.
4035
4036 2017-09-27  Tom Tromey  <tom@tromey.com>
4037
4038         * skip.c (skip_file_command, skip_function_command)
4039         (skip_enable_command, skip_disable_command, skip_delete_command):
4040         Constify.
4041
4042 2017-09-27  Tom Tromey  <tom@tromey.com>
4043
4044         * record-btrace.c (cmd_record_btrace_bts_start)
4045         (cmd_record_btrace_pt_start): Constify.
4046
4047 2017-09-27  Tom Tromey  <tom@tromey.com>
4048
4049         * symmisc.c (maintenance_print_symbols)
4050         (maintenance_print_msymbols, maintenance_print_objfiles)
4051         (maintenance_info_symtabs, maintenance_check_symtabs)
4052         (maintenance_expand_symtabs, maintenance_info_line_tables):
4053         Constify.
4054
4055 2017-09-27  Tom Tromey  <tom@tromey.com>
4056
4057         * top.c (new_ui_command): Constify.
4058
4059 2017-09-27  Tom Tromey  <tom@tromey.com>
4060
4061         * symfile.c (add_symbol_file_command)
4062         (remove_symbol_file_command, list_overlays_command)
4063         (map_overlay_command, unmap_overlay_command)
4064         (overlay_auto_command, overlay_manual_command)
4065         (overlay_off_command, overlay_load_command): Constify.
4066
4067 2017-09-27  Tom Tromey  <tom@tromey.com>
4068
4069         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4070         (info_spu_mailbox_command, info_spu_dma_command)
4071         (info_spu_proxydma_command): Constify.
4072
4073 2017-09-27  Tom Tromey  <tom@tromey.com>
4074
4075         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4076
4077 2017-09-27  Tom Tromey  <tom@tromey.com>
4078
4079         * cli/cli-script.c (user_defined_command): Constify.
4080
4081 2017-09-27  Tom Tromey  <tom@tromey.com>
4082
4083         * cli/cli-dump.c (dump_memory_command, dump_value_command)
4084         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4085         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4086         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4087         (dump_binary_value, append_binary_memory, append_binary_value):
4088         Constify.
4089         (struct dump_context) <func>: Constify.
4090         (add_dump_command): Update.
4091
4092 2017-09-27  Tom Tromey  <tom@tromey.com>
4093
4094         * cli/cli-cmds.c (show_version, show_configuration)
4095         (source_command, show_user): Constify.
4096
4097 2017-09-27  Tom Tromey  <tom@tromey.com>
4098
4099         * target.c (maintenance_print_target_stack): Constify.
4100
4101 2017-09-27  Tom Tromey  <tom@tromey.com>
4102
4103         * interps.c (interpreter_exec_cmd): Constify.
4104
4105 2017-09-27  Tom Tromey  <tom@tromey.com>
4106
4107         * record-full.c (cmd_record_full_restore): Constify.
4108
4109 2017-09-27  Tom Tromey  <tom@tromey.com>
4110
4111         * memattr.c (enable_mem_command, disable_mem_command)
4112         (delete_mem_command): Constify.
4113
4114 2017-09-27  Tom Tromey  <tom@tromey.com>
4115
4116         * value.c (show_convenience): Constify.
4117
4118 2017-09-27  Tom Tromey  <tom@tromey.com>
4119
4120         * gdbcore.h (core_file_command): Update.
4121         * corefile.c (core_file_command): Constify.
4122
4123 2017-09-27  Tom Tromey  <tom@tromey.com>
4124
4125         * user-regs.c (maintenance_print_user_registers): Constify.
4126
4127 2017-09-27  Tom Tromey  <tom@tromey.com>
4128
4129         * cp-namespace.c (maintenance_cplus_namespace): Constify.
4130
4131 2017-09-27  Tom Tromey  <tom@tromey.com>
4132
4133         * cp-support.c (first_component_command): Constify.
4134
4135 2017-09-27  Tom Tromey  <tom@tromey.com>
4136
4137         * psymtab.c (maintenance_print_psymbols)
4138         (maintenance_info_psymtabs, maintenance_check_psymtabs):
4139         Constify.
4140
4141 2017-09-27  Tom Tromey  <tom@tromey.com>
4142
4143         * windows-tdep.c (display_tib): Constify.
4144
4145 2017-09-27  Tom Tromey  <tom@tromey.com>
4146
4147         * linux-fork.c (delete_checkpoint_command)
4148         (detach_checkpoint_command): Constify.
4149
4150 2017-09-27  Tom Tromey  <tom@tromey.com>
4151
4152         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4153
4154 2017-09-27  Tom Tromey  <tom@tromey.com>
4155
4156         * arc-tdep.c (dump_arc_instruction_command): Constify.
4157
4158 2017-09-27  Tom Tromey  <tom@tromey.com>
4159
4160         * valprint.c (set_radix, show_radix): Constify.
4161
4162 2017-09-27  Tom Tromey  <tom@tromey.com>
4163
4164         * dtrace-probe.c (info_probes_dtrace_command): Constify.
4165
4166 2017-09-27  Tom Tromey  <tom@tromey.com>
4167
4168         * command.h (not_just_help_class_command): Update.
4169         * cli/cli-decode.h (not_just_help_class_command): Update.
4170         * cli/cli-decode.c (not_just_help_class_command): Constify.
4171
4172 2017-09-27  Tom Tromey  <tom@tromey.com>
4173
4174         * gdb_bfd.c (maintenance_info_bfds): Constify.
4175
4176 2017-09-27  Tom Tromey  <tom@tromey.com>
4177
4178         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4179         overloads.
4180         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
4181         (do_const_cfunc): New function.
4182         (cmd_cfunc_eq): New overload.
4183         (cli_user_command_p): Check do_const_cfunc.
4184         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4185         const_cfunc.
4186         * command.h (add_cmd): Add const overload and no-function
4187         overload.
4188         (set_cmd_cfunc): Add const overload.
4189         (cmd_const_cfunc_ftype): Declare.
4190         (cmd_cfunc_eq): Add const overload.
4191         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4192         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4193         overload.
4194
4195 2017-09-27  Tom Tromey  <tom@tromey.com>
4196
4197         * macroexp.c (get_next_token_for_substitution): New function.
4198         (substitute_args): Call it.  Check for __VA_OPT__.
4199
4200 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4201             Pedro Alves <palves@redhat.com>
4202
4203         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4204         producer_is_icc_lt_14.
4205         (producer_is_icc_lt_14): New function.
4206         (check_producer): Add code for checking version of ICC.
4207         (producer_is_icc): Move to producer.c.
4208         (read_structure_type): Restrict ICC workaround to ICC<14.
4209         * producer.c: Include selftest.h.
4210         (producer_is_icc, producer_parsing_tests, _initialize_producer):
4211         New functions.
4212         * producer.h (producer_is_icc): New declaration.
4213
4214 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4215
4216         * Makefile.in (SFILES): Add producer.c.
4217         (COMMON_OBS): Add producer.o
4218         * amd64-tdep.c (producer.h): Add new include.
4219         * dwarf2read.c (producer.h): Add new include.
4220         * producer.c: New file.
4221         * producer.h: New file.
4222         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4223         producer.c.
4224         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4225         producer.h.
4226
4227 2017-09-26  Matthias Klose  <doko@ubuntu.com>
4228
4229         * configure.ac: Search ncursesw before ncurses.
4230         Check ncursesw/ncurses.h before ncurses/ncurses.h.
4231         * gdb_curses.h: Include <ncursesw/ncurses.h>
4232         * config.in, configure: Regenerate.
4233
4234 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4235
4236         PR gdb/22185
4237         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4238         obsolete.
4239         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4240         Remove i386sol2 support.
4241         * configure.nat <i386sol2>: Remove.
4242         <sol2-64>: Fold into ...
4243         <sol2>: ... this.
4244         Move common settings to default section.
4245         Add sol-thread.o.
4246         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4247         x86_64-*-solaris2.1[0-9]*>: Rename to ...
4248         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4249         <i[34567]86-*-solaris*>: Remove.
4250         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4251
4252         * configure.ac: Remove wctype in libw check.
4253         (_MSE_INT_H): Don't define on Solaris 7-9.
4254         <solaris*>: Remove libthread_db.so.1 check.
4255         * configure: Regenerate.
4256         * config.in: Regenerate.
4257
4258         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4259         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4260         (gdb_ps_size_t): Remove.
4261         Use base types in users.
4262         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4263
4264         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4265
4266 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4267
4268         PR build/22206
4269         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4270         (adi_is_addr_mapped): Likewise.
4271         (PSR_ICC): Don't redefine.
4272         (PSR_IMPL): Likewise.
4273
4274 2017-09-25  Tom Tromey  <tom@tromey.com>
4275
4276         * regcache.c (regcache::dump): Use string_printf.
4277
4278 2017-09-25  Tom Tromey  <tom@tromey.com>
4279
4280         * regcache.c (class regcache_invalidator): New.
4281         (struct register_to_invalidate): Remove.
4282         (make_cleanup_regcache_invalidate): Remove.
4283         (regcache::raw_write): Use regcache_invalidator.
4284
4285 2017-09-25  Tom Tromey  <tom@tromey.com>
4286
4287         * spu-tdep.c (spu2ppu_sniffer): Update.
4288         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4289         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4290         Remove.
4291         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4292         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4293         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4294         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4295         (frame_pop): Update.
4296
4297 2017-09-25  Tom Tromey  <tom@tromey.com>
4298
4299         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4300         * regcache.h (regcache_xfree): Don't declare.
4301         * regcache.c (regcache_xfree): Remove.
4302         (do_regcache_xfree): Use delete.
4303         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4304         * linux-fork.c (free_fork): Use delete.
4305         (fork_save_infrun_state): Likewise.
4306         * jit.c (jit_dealloc_cache): Use delete.
4307         * infrun.c (discard_infcall_suspend_state): Use delete.
4308
4309 2017-09-25  Tom Tromey  <tom@tromey.com>
4310
4311         * regcache.h (regcache_xmalloc): Don't declare.
4312         (regcache_raw_set_cached_value): Update comment.
4313         * regcache.c (regcache_xmalloc): Remove.
4314         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4315         * jit.c (jit_frame_sniffer): Use new.
4316         * frame.c (frame_save_as_regcache): Use new.
4317
4318 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4319
4320         * NEWS: Advertise support for guarded-storage registers on IBM z.
4321
4322 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4323
4324         * s390-linux-nat.c (have_regset_gs): New static variable.
4325         (s390_linux_fetch_inferior_registers): Handle guarded-storage
4326         control block and guarded-storage broadcast control regsets.
4327         (s390_read_description): Detect whether the target has
4328         guarded-storage support, return appropriate tdesc.
4329         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4330         (features/s390x-gs-linux64.c): Likewise.
4331         (struct gdbarch_tdep) <have_gs>: New field.
4332         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4333         (s390_gsbc_regset): New variables.
4334         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4335         and s390_gsbc_regset, if applicable.
4336         (s390_core_read_description): Check whether core file was from a
4337         target with guarded-storage support; include appropriate regsets.
4338         (s390_gdbarch_init): Add registers for guarded-storage support.
4339         (_initialize_s390_tdep): Initialize new target descriptions that
4340         include registers for guarded-storage support.
4341         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4342         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4343         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4344         (S390_NUM_REGS): Adjust macro definition.
4345         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4346         (tdesc_s390x_gs_linux64): New declarations.
4347
4348 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4349
4350         * features/s390-gs-linux64.xml: New file.
4351         * features/s390-gs.xml: New file.
4352         * features/s390-gsbc.xml: New file.
4353         * features/s390x-gs-linux64.xml: New file.
4354         * features/Makefile (WHICH): Add s390-gs-linux64 and
4355         s390x-gs-linux64.
4356         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4357         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4358         * features/s390-gs-linux64.c: New generated file.
4359         * features/s390x-gs-linux64.c: New file.
4360         * regformats/s390-gs-linux64.dat: New file.
4361         * regformats/s390x-gs-linux64.dat: New file.
4362
4363 2017-09-23  Tom Tromey  <tom@tromey.com>
4364
4365         * defs.h (make_cleanup_override_quit_handler): Don't declare.
4366
4367 2017-09-22  Tom Tromey  <tom@tromey.com>
4368
4369         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4370         type to scoped_restore_tmpl.
4371         <scoped_input_handler>: Initialize m_quit_handler directly.
4372
4373 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4374
4375         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4376         (cd_command): Likewise.  Free "current_directory" before
4377         assigning to it.
4378         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4379         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4380         * top.c (gdb_dirbuf): Remove global declaration.
4381         * top.h (gdb_dirbuf): Likewise.
4382
4383 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4384
4385         * gnulib/aclocal.m4: Regenerate.
4386         * gnulib/config.in: Regenerate.
4387         * gnulib/configure: Regenerate.
4388         * gnulib/import/Makefile.am: Regenerate.
4389         * gnulib/import/Makefile.in: Regenerate.
4390         * gnulib/import/assure.h: New file.
4391         * gnulib/import/at-func.c: Likewise
4392         * gnulib/import/chdir-long.c: New file.
4393         * gnulib/import/chdir-long.h: New file.
4394         * gnulib/import/cloexec.c: New file.
4395         * gnulib/import/cloexec.h: New file.
4396         * gnulib/import/close.c: New file.
4397         * gnulib/import/closedir.c: New file.
4398         * gnulib/import/dirent-private.h: New file.
4399         * gnulib/import/dup-safer.c: New file.
4400         * gnulib/import/dup.c: New file.
4401         * gnulib/import/dup2.c: New file.
4402         * gnulib/import/error.c: New file.
4403         * gnulib/import/error.h: New file.
4404         * gnulib/import/exitfail.c: New file.
4405         * gnulib/import/exitfail.h: New file.
4406         * gnulib/import/fchdir.c: New file.
4407         * gnulib/import/fcntl.c: New file.
4408         * gnulib/import/fcntl.in.h: New file.
4409         * gnulib/import/fd-hook.c: New file.
4410         * gnulib/import/fd-hook.h: New file.
4411         * gnulib/import/fd-safer.c: New file.
4412         * gnulib/import/fdopendir.c: New file.
4413         * gnulib/import/filename.h: New file.
4414         * gnulib/import/filenamecat-lgpl.c: New file.
4415         * gnulib/import/filenamecat.h: New file.
4416         * gnulib/import/fstat.c: New file.
4417         * gnulib/import/fstatat.c: New file.
4418         * gnulib/import/getcwd-lgpl.c: New file.
4419         * gnulib/import/getcwd.c: New file.
4420         * gnulib/import/getdtablesize.c: New file.
4421         * gnulib/import/getlogin_r.c: New file.
4422         * gnulib/import/getprogname.c: New file.
4423         * gnulib/import/getprogname.h: New file.
4424         * gnulib/import/gettext.h: New file.
4425         * gnulib/import/glob-libc.h: New file.
4426         * gnulib/import/glob.c: New file.
4427         * gnulib/import/glob.in.h: New file.
4428         * gnulib/import/intprops.h: New file.
4429         * gnulib/import/m4/chdir-long.m4: New file.
4430         * gnulib/import/m4/close.m4: New file.
4431         * gnulib/import/m4/closedir.m4: New file.
4432         * gnulib/import/m4/d-ino.m4: New file.
4433         * gnulib/import/m4/d-type.m4: New file.
4434         * gnulib/import/m4/dup.m4: New file.
4435         * gnulib/import/m4/dup2.m4: New file.
4436         * gnulib/import/m4/error.m4: New file.
4437         * gnulib/import/m4/fchdir.m4: New file.
4438         * gnulib/import/m4/fcntl.m4: New file.
4439         * gnulib/import/m4/fcntl_h.m4: New file.
4440         * gnulib/import/m4/fdopendir.m4: New file.
4441         * gnulib/import/m4/filenamecat.m4: New file.
4442         * gnulib/import/m4/fstat.m4: New file.
4443         * gnulib/import/m4/fstatat.m4: New file.
4444         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4445         * gnulib/import/m4/getcwd-path-max.m4: New file.
4446         * gnulib/import/m4/getcwd.m4: New file.
4447         * gnulib/import/m4/getdtablesize.m4: New file.
4448         * gnulib/import/m4/getlogin_r.m4: New file.
4449         * gnulib/import/m4/getprogname.m4: New file.
4450         * gnulib/import/m4/glob.m4: New file.
4451         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4452         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4453         * gnulib/import/m4/mempcpy.m4: New file.
4454         * gnulib/import/m4/memrchr.m4: New file.
4455         * gnulib/import/m4/mode_t.m4: New file.
4456         * gnulib/import/m4/msvc-inval.m4: New file.
4457         * gnulib/import/m4/msvc-nothrow.m4: New file.
4458         * gnulib/import/m4/open.m4: New file.
4459         * gnulib/import/m4/openat.m4: New file.
4460         * gnulib/import/m4/opendir.m4: New file.
4461         * gnulib/import/m4/readdir.m4: New file.
4462         * gnulib/import/m4/realloc.m4: New file.
4463         * gnulib/import/m4/rewinddir.m4: New file.
4464         * gnulib/import/m4/save-cwd.m4: New file.
4465         * gnulib/import/m4/strdup.m4: New file.
4466         * gnulib/import/m4/strerror.m4: New file.
4467         * gnulib/import/m4/unistd-safer.m4: New file.
4468         * gnulib/import/mempcpy.c: New file.
4469         * gnulib/import/memrchr.c: New file.
4470         * gnulib/import/msvc-inval.c: New file.
4471         * gnulib/import/msvc-inval.h: New file.
4472         * gnulib/import/msvc-nothrow.c: New file.
4473         * gnulib/import/msvc-nothrow.h: New file.
4474         * gnulib/import/open.c: New file.
4475         * gnulib/import/openat-die.c: New file.
4476         * gnulib/import/openat-priv.h: New file.
4477         * gnulib/import/openat-proc.c: New file.
4478         * gnulib/import/openat.c: New file.
4479         * gnulib/import/openat.h: New file.
4480         * gnulib/import/opendir.c: New file.
4481         * gnulib/import/pipe-safer.c: New file.
4482         * gnulib/import/readdir.c: New file.
4483         * gnulib/import/realloc.c: New file.
4484         * gnulib/import/rewinddir.c: New file.
4485         * gnulib/import/save-cwd.c: New file.
4486         * gnulib/import/save-cwd.h: New file.
4487         * gnulib/import/strdup.c: New file.
4488         * gnulib/import/strerror-override.c: New file.
4489         * gnulib/import/strerror-override.h: New file.
4490         * gnulib/import/strerror.c: New file.
4491         * gnulib/import/unistd--.h: New file.
4492         * gnulib/import/unistd-safer.h: New file.
4493         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4494         "getcwd" and "glob".
4495         * ser-tcp.c: Undefine "close" before redefining it.
4496
4497 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4498
4499         * guile/scm-value.c (gdbscm_value_address): Initialize address,
4500         get rid of res_val.
4501
4502 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4503
4504         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4505         <sol2,sparc>: Likewise.
4506         <sol2-64,i386>: Likewise.
4507
4508         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4509         -Wdeprecated-declarations on *-*-solaris*.
4510         * configure: Regenerate.
4511
4512         * procfs.c: Include "nat/inferior.h".
4513         (procfs_info_proc): Fix typo.
4514
4515 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4516
4517         * remote.c (vector): Include.
4518         (struct private_thread_info): Add field, thread_handle.
4519         (free_private_thread_info): Deallocate storage associated with
4520         thread handle.
4521         (get_private_info_thread): Initialize `thread_handle' field.
4522         (struct thread_item): Add field, thread_handle.
4523         (clear_threads_listing_context): Deallocate storage associated
4524         with thread handle.
4525         (start_thread): Add support for "handle" attribute.
4526         (thread_attributes): Add "handle".
4527         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4528         field.
4529         (remote_update_thread_list): Update thread_handle.
4530         (remote_thread_handle_to_thread_info): New function.
4531         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4532
4533 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4534
4535         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4536         function.
4537         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4538         * python/python-internal.h (thread_object_type): Declare.
4539
4540 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4541
4542         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4543         (target_thread_handle_to_thread_info): Declare.
4544         * target.c (target_thread_handle_to_thread_info): New function.
4545         * target-delegates.c: Regenerate.
4546         * gdbthread.h (find_thread_by_handle): Declare.
4547         * thread.c (find_thread_by_handle): New function.
4548         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4549         function.
4550         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4551
4552 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4553
4554         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4555
4556 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4557
4558         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4559
4560 2017-09-21  Yao Qi  <yao.qi@linaro.org>
4561
4562         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4563         to gdb_target_obs.
4564
4565 2017-09-20  Tom Tromey  <tom@tromey.com>
4566
4567         * breakpoint.c (struct counted_command_line): Remove.
4568         (breakpoint_commands): Update.
4569         (alloc_counted_command_line, incref_counted_command_line)
4570         (decref_counted_command_line, do_cleanup_counted_command_line)
4571         (make_cleanup_decref_counted_command_line): Remove.
4572         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4573         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4574         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4575         (save_breakpoints): Update.
4576         * breakpoint.h (counted_command_line): Now a typedef to
4577         shared_ptr.
4578         (struct breakpoint) <commands>: Now a counted_command_line.
4579         (struct bpstats) <command>: Likewise.
4580
4581 2017-09-20  Tom Tromey  <tom@tromey.com>
4582
4583         * breakpoint.c (struct commands_info, do_map_commands_command):
4584         Remove.
4585         (commands_command_1): Update.
4586         (iterate_over_related_breakpoints): Take a function_view.
4587         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4588         (delete_command): Update.
4589         (map_breakpoint_numbers): Take a function_view.
4590         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4591         (disable_command): Update.
4592         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4593         (enable_command): Update.
4594         (struct disp_data, do_enable_breakpoint_disp)
4595         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4596         (do_map_enable_delete_breakpoint): Remove.
4597         (enable_once_command, enable_count_command, enable_delete_command)
4598         (delete_trace_variable_command): Update.
4599
4600 2017-09-20  Tom Tromey  <tom@tromey.com>
4601
4602         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
4603         (bpstat_clear): Use delete.
4604         (bpstats): New constructors.
4605         (bpstat_copy, bpstat_stop_status): Use new.
4606         (dprintf_after_condition_true): Update.
4607         * breakpoint.h (bpstats::bpstats): Add constructors.
4608         (bpstats::~bpstats): Add destructor.
4609
4610 2017-09-20  Pedro Alves  <palves@redhat.com>
4611
4612         * eval.c (make_params): Delete, refactored as ...
4613         (class fake_method): ... this new type's ctor.
4614         (fake_method::~fake_method): New.
4615         (evaluate_subexp_standard): Use 'fake_method'.
4616
4617 2017-09-20  Tom Tromey  <tom@tromey.com>
4618
4619         * windows-nat.c (get_windows_debug_event, windows_wait)
4620         (do_initial_windows_stuff, windows_attach): Update.
4621         * utils.c (vwarning, internal_vproblem): Update.
4622         (ui_unregister_input_event_handler_cleanup)
4623         (prepare_to_handle_input): Remove.
4624         (class scoped_input_handler): New.
4625         (defaulted_query, prompt_for_continue): Update.
4626         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4627         Update.
4628         * top.c (undo_terminal_modifications_before_exit): Update.
4629         * target/target.h (target_terminal_init, target_terminal_inferior)
4630         (target_terminal_ours): Don't declare.
4631         (class target_terminal): New.
4632         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4633         (target_terminal_ours_for_output)
4634         (make_cleanup_restore_target_terminal): Don't declare.
4635         (target_terminal_info): Remove.
4636         * target.c (enum terminal_state, terminal_state): Remove.
4637         (target_terminal::terminal_state): Define.
4638         (target_terminal::init): Rename from target_terminal_init.
4639         (target_terminal::inferior): Rename from
4640         target_terminal_inferior.
4641         (target_terminal::ours): Rename from target_terminal_ours.
4642         (target_terminal::ours_for_output): Rename from
4643         target_terminal_ours_for_output.
4644         (target_terminal::info): New method.
4645         (cleanup_restore_target_terminal)
4646         (make_cleanup_restore_target_terminal): Remove.
4647         * solib.c (handle_solib_event): Update.
4648         * remote.c (remote_serial_quit_handler): Update.
4649         (remote_terminal_inferior, remote_wait_as): Update.
4650         * record-full.c (record_full_wait_1): Update.
4651         * nto-procfs.c (procfs_create_inferior): Update.
4652         * nat/fork-inferior.c (startup_inferior): Update.
4653         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4654         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4655         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4656         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4657         (mi_breakpoint_created, mi_breakpoint_deleted)
4658         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4659         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4660         (mi_user_selected_context_changed, report_initial_inferior):
4661         Update.
4662         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4663         (linux_nat_terminal_inferior): Update.
4664         * infrun.c (follow_fork_inferior)
4665         (handle_vfork_child_exec_or_exit, do_target_resume)
4666         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4667         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4668         Update.
4669         * inflow.c (child_terminal_init, info_terminal_command): Update.
4670         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4671         (attach_command): Update.
4672         * infcall.c (call_thread_fsm_should_stop): Update.
4673         * gnu-nat.c (gnu_attach): Update.
4674         * extension.c (struct active_ext_lang_state)
4675         (restore_active_ext_lang): Update.
4676         * exceptions.c (print_flush): Update.
4677         * event-top.c (async_enable_stdin, default_quit_handler): Update.
4678         (struct quit_handler_cleanup_data, restore_quit_handler)
4679         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4680         Remove.
4681         * cp-support.c (gdb_demangle): Update.
4682         * breakpoint.c (update_inserted_breakpoint_locations)
4683         (insert_breakpoint_locations, handle_jit_event)
4684         (disable_breakpoints_in_unloaded_shlib): Update.
4685         * annotate.c (annotate_breakpoints_invalid)
4686         (annotate_frames_invalid): Update.
4687
4688 2017-09-20  Tom Tromey  <tom@tromey.com>
4689
4690         * main.c (catch_command_errors): Rename from
4691         catch_command_errors_const.
4692         (captured_main_1): Update.
4693
4694 2017-09-20  Pedro Alves  <palves@redhat.com>
4695
4696         * cli/cli-cmds.c (list_command): Use print_sal_location.
4697         (print_sal_location): New function.
4698         (ambiguous_line_spec): Use print_sal_location.
4699         * linespec.c (symbol_to_sal): Record the symbol in the sal.
4700         * symtab.c (find_function_start_sal): Likewise.
4701         * symtab.h (symtab_and_line::symbol): New field.
4702
4703 2017-09-20  Pedro Alves  <palves@redhat.com>
4704
4705         * linespec.c (minsym_found): Handle non-text minsyms.
4706         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
4707
4708 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4709
4710         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
4711         backslash.
4712
4713 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4714
4715         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
4716         vmovups instead vmovaps.
4717         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
4718
4719 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
4720
4721         * NEWS (Changes since GDB 8.0): Add starti.
4722         * infcmd.c (enum run_break): New.
4723         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
4724         case.
4725         (run_command): Use enum run_how.
4726         (start_command): Likewise.
4727         (starti_command): New function.
4728         (RUN_ARGS_HELP): New macro.
4729         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
4730         commands.  Add starti command.
4731
4732 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4733
4734         * Makefile.in (monitor.o): Remove the rule.
4735
4736 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4737
4738         * annotate.h (struct annotate_arg_emitter): Use
4739         DISABLE_COPY_AND_ASSIGN.
4740         * common/refcounted-object.h (refcounted_object): Likewise.
4741         * completer.h (struct completion_result): Likewise.
4742         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
4743         * filename-seen-cache.h (filename_seen_cache): Likewise.
4744         * gdbcore.h (thread_section_name): Likewise.
4745         * gdb_regex.h (compiled_regex): Likewise.
4746         * gdbthread.h (scoped_restore_current_thread): Likewise.
4747         * inferior.h (scoped_restore_current_inferior): Likewise.
4748         * jit.c (jit_reader): Likewise.
4749         * linespec.h (struct linespec_result): Likewise.
4750         * mi/mi-parse.h (struct mi_parse): Likewise.
4751         * nat/fork-inferior.c (execv_argv): Likewise.
4752         * progspace.h (scoped_restore_current_program_space): Likewise.
4753         * python/python-internal.h (class gdbpy_enter): Likewise.
4754         * regcache.h (regcache): Likewise.
4755         * target-descriptions.c (struct tdesc_reg): Likewise.
4756         (struct tdesc_type): Likewise.
4757         (struct tdesc_feature): Likewise.
4758         * ui-out.h (ui_out_emit_type): Likewise.
4759
4760 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
4761
4762         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
4763         label abort_expression.
4764
4765 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4766
4767         * common/buffer.c (buffer_xml_printf): Adjust.
4768         * common/xml-utils.c (xml_escape_text): Change return type to
4769         std::string, update code accordingly.
4770         * common/xml-utils.h (xml_escape_text): Change return type to
4771         std::string.
4772         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
4773         * windows-tdep.c (windows_xfer_shared_library): Adjust.
4774         * unittests/xml-utils-selftests.c (test_xml_escape_text):
4775         Adjust.
4776
4777 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4778
4779         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
4780         (SUBDIR_UNITTESTS_OBS): Add new object file.
4781         * unittests/xml-utils-selftests.c: New file.
4782
4783 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4784
4785         * common/selftest.h (selftest): New struct/interface.
4786         (register_test): Add name parameter, add new overload.
4787         (run_tests): Add filter parameter.
4788         (for_each_selftest_ftype): New typedef.
4789         (for_each_selftest): New declaration.
4790         * common/selftest.c (tests): Change type to
4791         map<string, unique_ptr<selftest>>.
4792         (simple_selftest): New struct.
4793         (register_test): New function.
4794         (register_test): Add name parameter and use it.
4795         (run_tests): Add filter parameter and use it.  Add prints.
4796         Adjust to vector -> map change.
4797         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
4798         registering selftests.
4799         * arm-tdep.c (_initialize_arm_tdep): Likewise.
4800         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
4801         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
4802         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
4803         * findvar.c (_initialize_findvar): Likewise.
4804         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
4805         * maint.c (maintenance_selftest): Update call to run_tests.
4806         (maintenance_info_selftests): New function.
4807         (_initialize_maint_cmds): Register "maintenance info selftests"
4808         command.  Update "maintenance selftest" doc.
4809         * regcache.c (_initialize_regcache): Add names when registering
4810         selftests.
4811         * rust-exp.y (_initialize_rust_exp): Likewise.
4812         * selftest-arch.c (gdbarch_selftest): New struct.
4813         (gdbarch_tests): Remove.
4814         (register_test_foreach_arch): Add name parameter.  Call
4815         register_test.
4816         (tests_with_arch): Remove, move most content to
4817         gdbarch_selftest::operator().
4818         (_initialize_selftests_foreach_arch): Remove.
4819         * selftest-arch.h (register_test_foreach_arch): Add name
4820         parameter.
4821         (run_tests_with_arch): New declaration.
4822         * utils-selftests.c (_initialize_utils_selftests): Add names
4823         when registering selftests.
4824         * utils.c (_initialize_utils): Likewise.
4825         * unittests/array-view-selftests.c
4826         (_initialize_array_view_selftests): Likewise.
4827         * unittests/environ-selftests.c (_initialize_environ_selftests):
4828         Likewise.
4829         * unittests/function-view-selftests.c
4830         (_initialize_function_view_selftests): Likewise.
4831         * unittests/offset-type-selftests.c
4832         (_initialize_offset_type_selftests): Likewise.
4833         * unittests/optional-selftests.c
4834         (_initialize_optional_selftests): Likewise.
4835         * unittests/scoped_restore-selftests.c
4836         (_initialize_scoped_restore_selftests): Likewise.
4837         * NEWS: Document "maintenance selftest" and "maint info
4838         selftests".
4839
4840 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4841
4842         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
4843         scoped_restore.
4844
4845 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4846
4847         * mi/mi-main.c (mi_load_progress): Make uiout variable
4848         a unique_ptr.
4849
4850 2017-09-15  Pedro Alves  <palves@redhat.com>
4851
4852         * compile/compile-c-types.c (convert_enum, convert_int)
4853         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
4854
4855 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
4856
4857         * dwarf2read.c (copy_string): Remove.
4858         (parse_macro_definition): Replace copy_string with savestring.
4859
4860 2017-09-15  Yao Qi  <yao.qi@linaro.org>
4861
4862         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
4863         gdb_target_obs.
4864         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
4865         Likewise.
4866         (i[34567]86-*-linux*): Likewise.
4867
4868 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4869
4870         * dwarf2expr.h (dwarf_stack_value): Add constructor.
4871         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
4872         <stack>: Change type to std::vector.
4873         <stack_len, stack_allocated>: Remove.
4874         <grow_stack>: Remove.
4875         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4876         (dwarf_expr_context::~dwarf_expr_context): Remove.
4877         (dwarf_expr_context::grow_stack): Remove.
4878         (dwarf_expr_context::push): Adjust.
4879         (dwarf_expr_context::pop): Adjust.
4880         (dwarf_expr_context::fetch): Adjust.
4881         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
4882         (dwarf_expr_context::stack_empty_p): Adjust.
4883         (dwarf_expr_context::execute_stack_op): Adjust.
4884
4885 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4886
4887         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
4888         return type to bool.
4889         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
4890
4891 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4892
4893         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
4894         Change type to bool.
4895         (dwarf_stack_value) <in_stack_memory>: Likewise.
4896         (dwarf_expr_context) <push_address>: Change parameter type to
4897         bool.
4898         <fetch_in_stack_memory>: Change return type to bool.
4899         <push>: Change parameter type to bool.
4900         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
4901         to bool.
4902         (dwarf_expr_context::push_address): Likewise.
4903         (dwarf_expr_context::fetch_in_stack_memory): Change return type
4904         to bool.
4905         (dwarf_expr_context::execute_stack_op): Adjust.
4906         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
4907
4908 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4909
4910         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
4911         (struct dwarf_expr_context) <n_pieces>: Remove.
4912         <pieces>: Change type to std::vector.
4913         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4914         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
4915         pieces.
4916         (dwarf_expr_context::add_piece): Adjust.
4917         * dwarf2loc.c (struct piece_closure): Initialize fields.
4918         <n_pieces>: Remove.
4919         <pieces>: Change type to std::vector.
4920         (allocate_piece_closure): Adjust, change parameter to
4921         std::vector rvalue and std::move it to piece_closure.
4922         (rw_pieced_value): Adjust.
4923         (check_pieced_synthetic_pointer): Adjust.
4924         (indirect_synthetic_pointer): Adjust.
4925         (coerce_pieced_ref): Adjust.
4926         (free_pieced_value_closure):  Adjust.  Use delete to free
4927         piece_closure.
4928         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
4929         to allocate_piece_closure.
4930         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
4931
4932 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4933
4934         * probe.h (probe_ops_cp): Remove typedef.
4935         (DEF_VEC_P (probe_ops_cp)): Remove.
4936         (all_probe_ops): Change type to std::vector.
4937         * probe.c (info_probes_for_ops): Adjust to vector change.
4938         (probe_linespec_to_ops): Likewise.
4939         (all_probe_ops): Change type to std::vector.
4940         (_initialize_probe): Adjust to vector change.
4941         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
4942         * elfread.c (elf_get_probes): Likewise.
4943         * stap-probe.c (_initialize_stap_probe): Likewise.
4944
4945 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4946
4947         * probe.h (struct bound_probe): Define constructors.
4948         * probe.c (bound_probe_s): Remove typedef.
4949         (DEF_VEC_O (bound_probe_s)): Remove VEC.
4950         (collect_probes): Change return type to std::vector, remove
4951         cleanup.
4952         (compare_probes): Return bool, change parameter type.  Change
4953         semantic to "less than".
4954         (gen_ui_out_table_header_info): Change parameter to std::vector
4955         and update.
4956         (exists_probe_with_pops): Likewise.
4957         (info_probes_for_ops): Update to std::vector change.
4958         (enable_probes_command): Likewise.
4959         (disable_probes_command): Likewise.
4960
4961 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4962
4963         * probe.h (struct probe_ops) <get_probes>: Change parameter from
4964         vec to std::vector.
4965         * probe.c (parse_probes_in_pspace): Update.
4966         (find_probes_in_objfile): Update.
4967         (find_probe_by_pc): Update.
4968         (collect_probes): Update.
4969         (probe_any_get_probes): Update.
4970         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
4971         return type to reference to std::vector.
4972         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
4973         std::vector and update.
4974         (dtrace_process_dof): Likewise.
4975         (dtrace_get_probes): Likewise.
4976         * elfread.c (elf_get_probes): Change return type to std::vector,
4977         store an std::vector in bfd_data.
4978         (probe_key_free): Update to std::vector.
4979         * stap-probe.c (handle_stap_probe): Change parameter to
4980         std::vector and update.
4981         (stap_get_probes): Likewise.
4982         * symfile-debug.c (debug_sym_get_probes): Change return type to
4983         std::vector and update.
4984
4985 2017-09-11  Tom Tromey  <tom@tromey.com>
4986
4987         * breakpoint.c (program_breakpoint_here_p): Update.
4988         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
4989         from make_show_memory_breakpoints_cleanup.  Return a
4990         scoped_restore_tmpl<int>.
4991         (restore_show_memory_breakpoints): Remove.
4992         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
4993         * mem-break.c (memory_validate_breakpoint): Update.
4994         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
4995         (ia64_memory_remove_breakpoint): Update.
4996         (ia64_breakpoint_from_pc): Update.
4997         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
4998         from make_show_memory_breakpoints_cleanup.
4999
5000 2017-09-11  Tom Tromey  <tom@tromey.com>
5001
5002         * d-namespace.c (d_lookup_symbol): Use std::string.
5003         (find_symbol_in_baseclass): Likewise.
5004
5005 2017-09-11  Tom Tromey  <tom@tromey.com>
5006
5007         * ctf.c (ctf_start): Use std::string.
5008
5009 2017-09-11  Tom Tromey  <tom@tromey.com>
5010
5011         * ada-lang.c (is_known_support_routine): Update.
5012         (ada_unhandled_exception_name_addr_from_raise): Update.
5013         * guile/scm-frame.c (gdbscm_frame_name): Update.
5014         * python/py-frame.c (frapy_name): Update.
5015         (frapy_function): Update.
5016         * stack.h (find_frame_funname): Update.
5017         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5018         (print_frame): Update.
5019
5020 2017-09-11  Tom Tromey  <tom@tromey.com>
5021
5022         * findcmd.c (put_bits): Take a gdb::byte_vector.
5023         (parse_find_args): Return gdb::byte_vector.  "args" now const.
5024         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
5025         cleanups.
5026         (find_command): Update.
5027
5028 2017-09-11  Tom Tromey  <tom@tromey.com>
5029
5030         * cli/cli-script.c (class scoped_restore_hook_in): New.
5031         (clear_hook_in_cleanup): Remove.
5032         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5033         scoped_restore_hook_in.
5034
5035 2017-09-11  Tom Tromey  <tom@tromey.com>
5036
5037         * cli/cli-script.c (restore_interp): Remove.
5038         (read_command_lines): Use scoped_restore_interp.
5039         * interps.c (scoped_restore_interp::set_temp): Rename from
5040         interp_set_temp.
5041         * interps.h (class scoped_restore_interp): New.
5042         (interp_set_temp): Remove.
5043
5044 2017-09-11  Tom Tromey  <tom@tromey.com>
5045
5046         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5047         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5048         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5049         scoped_restore.
5050         (mi_cmd_break_insert_1): Update.
5051         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5052         scoped_restore.
5053
5054 2017-09-11  Tom Tromey  <tom@tromey.com>
5055
5056         * demangle.c (demangle_command): Update.
5057         * breakpoint.c (disable_command): Update.
5058         (enable_command): Update.
5059         (find_location_by_number): Make "number" const.  Use
5060         get_number_trailer.
5061         * cli/cli-utils.c (extract_arg): Return std::string.
5062         * probe.c (parse_probe_linespec): Update.  Change types.
5063         (collect_probes): Take string arguments.
5064         (parse_probe_linespec): Likewise.
5065         (info_probes_for_ops): Update.
5066         (enable_probes_command): Update.
5067         (disable_probes_command): Update.
5068         * break-catch-sig.c (catch_signal_split_args): Update.
5069         * mi/mi-parse.c (mi_parse): Update.
5070
5071 2017-09-11  Tom Tromey  <tom@tromey.com>
5072
5073         * language.h (language_enum): Make argument const.
5074         * language.c (language_enum): Make argument const.
5075
5076 2017-09-11  Tom Tromey  <tom@tromey.com>
5077
5078         * common/common-utils.h (skip_to_space): Remove macro, redeclare
5079         as function.
5080         (skip_to_space): Rename from skip_to_space_const.
5081         * common/common-utils.c (skip_to_space): New function.
5082         (skip_to_space): Rename from skip_to_space_const.
5083         * cli/cli-utils.h (get_number): Rename from get_number_const.
5084         (extract_arg): Rename from extract_arg_const.
5085         * cli/cli-utils.c (get_number): Rename from get_number_const.
5086         (extract_arg): Rename from extract_arg_const.
5087         (number_or_range_parser::get_number): Use ::get_number.
5088         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5089         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5090         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5091         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5092         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5093         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5094         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5095         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5096
5097 2017-09-11  Tom Tromey  <tom@tromey.com>
5098
5099         * python/python.c (do_start_initialization): Use
5100         py-event-types.def to initialize types.
5101         Define all object type structures.
5102         * python/python-internal.h: Don't declare event initialization
5103         functions.
5104         * python/py-threadevent.c (thread_event_object_type): Don't
5105         define.
5106         * python/py-stopevent.c (stop_event_object_type): Don't define.
5107         * python/py-signalevent.c (signal_event_object_type): Don't
5108         declare or define.
5109         * python/py-newobjfileevent.c (new_objfile_event_object_type)
5110         (clear_objfiles_event_object_type): Don't declare or define.
5111         * python/py-infevents.c (inferior_call_pre_event_object_type)
5112         (inferior_call_post_event_object_type)
5113         (register_changed_event_object_type)
5114         (memory_changed_event_object_type): Don't declare or define.
5115         * python/py-inferior.c (new_thread_event_object_type)
5116         (new_inferior_event_object_type)
5117         (inferior_deleted_event_object_type): Don't declare or define.
5118         * python/py-exitedevent.c (exited_event_object_type): Don't
5119         declare or define.
5120         * python/py-evts.c (gdbpy_initialize_py_events): Use
5121         py-all-events.def.
5122         * python/py-events.h (thread_event_object_type): Don't declare.
5123         (events_object): Use py-all-events.def.
5124         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
5125         py-event-types.def.
5126         * python/py-event-types.def: New file.
5127         * python/py-continueevent.c (create_continue_event_object): Don't
5128         declare or define.
5129         * python/py-bpevent.c (breakpoint_event_object_type): Don't
5130         declare or define.
5131         * python/py-all-events.def: New file.
5132
5133 2017-09-11  Tom Tromey  <tom@tromey.com>
5134
5135         * python/py-threadevent.c (create_thread_event_object): Return
5136         gdbpy_ref.
5137         * python/py-stopevent.h (create_stop_event_object)
5138         (create_breakpoint_event_object, create_signal_event_object):
5139         Update.
5140         * python/py-stopevent.c (create_stop_event_object): Return
5141         gdbpy_ref.
5142         (emit_stop_event): Update.
5143         * python/py-signalevent.c (create_signal_event_object): Return
5144         gdbpy_ref.
5145         * python/py-infevents.c (create_inferior_call_event_object):
5146         Update.
5147         * python/py-event.h (create_event_object)
5148         (create_thread_event_object): Update.
5149         * python/py-event.c (create_event_object): Return gdbpy_ref.
5150         * python/py-continueevent.c: Return gdbpy_ref.
5151         * python/py-bpevent.c (create_breakpoint_event_object): Return
5152         gdbpy_ref.
5153
5154 2017-09-11  Tom Tromey  <tom@tromey.com>
5155
5156         PR python/15622:
5157         * NEWS: Add entry.
5158         * python/python.c (do_start_initialization): Initialize new event
5159         types.
5160         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5161         (gdbpy_initialize_inferior_deleted_event)
5162         (gdbpy_initialize_new_thread_event): Declare.
5163         * python/py-threadevent.c (create_thread_event_object): Add option
5164         "thread" parameter.
5165         * python/py-inferior.c (new_thread_event_object_type)
5166         (new_inferior_event_object_type)
5167         (inferior_deleted_event_object_type): Declare.
5168         (python_new_inferior, python_inferior_deleted): New functions.
5169         (add_thread_object): Emit new_thread event.
5170         (gdbpy_initialize_inferior): Attach new functions to corresponding
5171         observers.
5172         (new_thread, new_inferior, inferior_deleted): Define new event
5173         types.
5174         * python/py-evts.c (gdbpy_initialize_py_events): Add new
5175         registries.
5176         * python/py-events.h (events_object) <new_inferior,
5177         inferior_deleted, new_thread>: New fields.
5178         * python/py-event.h (create_thread_event_breakpoint): Add optional
5179         "thread" parameter.
5180
5181 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5182
5183         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5184         check current_ui instead.
5185         (internal_vproblem): Likewise.
5186
5187 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
5188
5189         * thread.c (print_thread_info_1): Remove unnecessary calls to
5190         uiout->is_mi_like_p.
5191
5192 2017-09-09  Tom Tromey  <tom@tromey.com>
5193
5194         * namespace.h (add_using_directive): Update.
5195         * namespace.c (add_using_directive): Change type of excludes to
5196         std::vector.
5197         * dwarf2read.c (read_import_statement): Use std::vector.
5198         (read_namespace): Update.
5199         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5200
5201 2017-09-09  Tom Tromey  <tom@tromey.com>
5202
5203         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5204
5205 2017-09-09  Tom Tromey  <tom@tromey.com>
5206
5207         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5208
5209 2017-09-09  Tom Tromey  <tom@tromey.com>
5210
5211         * stack.c (func_command): Use gdb::def_vector.
5212
5213 2017-09-09  Tom Tromey  <tom@tromey.com>
5214
5215         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5216         ui_out_emit_list, ui_out_emit_tuple.
5217         (mi_cmd_var_update): Likewise.
5218
5219 2017-09-09  Tom Tromey  <tom@tromey.com>
5220
5221         * mi/mi-interp.c (mi_user_selected_context_changed): Use
5222         ui_out_redirect_pop.
5223         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5224         ui_out_redirect_pop.
5225         * utils.c (do_ui_out_redirect_pop)
5226         (make_cleanup_ui_out_redirect_pop): Remove.
5227         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5228         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5229         * ui-out.h (ui_out_redirect_pop): New class.
5230
5231 2017-09-09  Tom Tromey  <tom@tromey.com>
5232
5233         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5234         (list_available_thread_groups, mi_cmd_list_thread_groups)
5235         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5236         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5237         Likewise.
5238
5239 2017-09-09  Tom Tromey  <tom@tromey.com>
5240
5241         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5242         ui_out_emit_tuple.
5243
5244 2017-09-09  Tom Tromey  <tom@tromey.com>
5245
5246         * target.c (flash_erase_command): Use ui_out_emit_tuple.
5247         * stack.c (print_frame): Use ui_out_emit_tuple.
5248         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5249         (info_spu_mailbox_command, info_spu_dma_command)
5250         (info_spu_proxydma_command): Likewise.
5251         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5252         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5253         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5254         ui_out_emit_tuple.
5255         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5256
5257 2017-09-09  Tom Tromey  <tom@tromey.com>
5258
5259         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5260         (class ui_out_emit_table): Update comment.
5261         * ui-out.c (do_cleanup_table_end)
5262         (make_cleanup_ui_out_table_begin_end): Remove.
5263         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5264         (info_spu_dma_cmdlist): Likewise.
5265         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5266         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5267         ui_out_emit_table.
5268
5269 2017-09-09  Tom Tromey  <tom@tromey.com>
5270
5271         * thread.c (print_thread_info_1): Use ui_out_emit_table,
5272         ui_out_emit_list, gdb::optional.
5273
5274 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
5275
5276         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5277         prototype.
5278         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5279         prototype.
5280         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5281         prototype.
5282         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5283         * ada-exp.y: Remove _initialize_ada_exp prototype.
5284         * ada-lang.c: Remove _initialize_ada_language prototype.
5285         * ada-tasks.c: Remove _initialize_tasks prototype.
5286         * addrmap.c: Remove _initialize_addrmap prototype.
5287         * agent.c: Remove _initialize_agent prototype.
5288         * aix-thread.c: Remove _initialize_aix_thread prototype.
5289         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5290         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5291         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5292         prototype.
5293         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5294         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5295         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5296         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5297         prototype.
5298         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5299         prototype.
5300         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5301         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5302         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5303         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5304         prototype.
5305         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5306         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5307         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5308         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5309         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5310         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5311         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5312         prototype.
5313         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5314         prototype.
5315         * annotate.c: Remove _initialize_annotate prototype.
5316         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5317         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5318         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5319         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5320         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5321         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5322         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5323         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5324         prototype.
5325         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5326         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5327         * auto-load.c: Remove _initialize_auto_load prototype.
5328         * auxv.c: Remove _initialize_auxv prototype.
5329         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5330         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5331         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5332         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5333         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5334         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5335         prototype.
5336         * break-catch-throw.c: Remove _initialize_break_catch_throw
5337         prototype.
5338         * breakpoint.c: Remove _initialize_breakpoint prototype.
5339         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5340         * btrace.c: Remove _initialize_btrace prototype.
5341         * charset.c: Remove _initialize_charset prototype.
5342         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5343         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5344         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5345         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5346         * cli/cli-script.c: Remove _initialize_cli_script prototype.
5347         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5348         * coffread.c: Remove _initialize_coffread prototype.
5349         * compile/compile.c: Remove _initialize_compile prototype.
5350         * complaints.c: Remove _initialize_complaints prototype.
5351         * completer.c: Remove _initialize_completer prototype.
5352         * copying.awk: Remove _initialize_copying prototype.
5353         * copying.c: Regenerate.
5354         * core-regset.c: Remove _initialize_core_regset prototype.
5355         * corefile.c: Remove _initialize_core prototype.
5356         * corelow.c: Remove _initialize_corelow prototype.
5357         * cp-abi.c: Remove _initialize_cp_abi prototype.
5358         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5359         * cp-support.c: Remove _initialize_cp_support prototype.
5360         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5361         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5362         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5363         * ctf.c: Remove _initialize_ctf prototype.
5364         * d-lang.c: Remove _initialize_d_language prototype.
5365         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5366         prototype.
5367         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5368         * dbxread.c: Remove _initialize_dbxread prototype.
5369         * dcache.c: Remove _initialize_dcache prototype.
5370         * demangle.c: Remove _initialize_demangler prototype.
5371         * disasm-selftests.c: Remove _initialize_disasm_selftests
5372         prototype.
5373         * disasm.c: Remove _initialize_disasm prototype.
5374         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5375         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5376         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5377         prototype.
5378         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5379         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5380         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5381         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5382         * elfread.c: Remove _initialize_elfread prototype.
5383         * exec.c: Remove _initialize_exec prototype.
5384         * extension.c: Remove _initialize_extension prototype.
5385         * f-lang.c: Remove _initialize_f_language prototype.
5386         * f-valprint.c: Remove _initialize_f_valprint prototype.
5387         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5388         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5389         * filesystem.c: Remove _initialize_filesystem prototype.
5390         * findcmd.c: Remove _initialize_mem_search prototype.
5391         * fork-child.c: Remove _initialize_fork_child prototype.
5392         * frame-base.c: Remove _initialize_frame_base prototype.
5393         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5394         * frame.c: Remove _initialize_frame prototype.
5395         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5396         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5397         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5398         * gcore.c: Remove _initialize_gcore prototype.
5399         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5400         * gdbarch.c: Regenerate.
5401         * gdbarch.sh: Remove _initialize_gdbarch prototype.
5402         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5403         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5404         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5405         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5406         * go-lang.c: Remove _initialize_go_language prototype.
5407         * go32-nat.c: Remove _initialize_go32_nat prototype.
5408         * guile/guile.c: Remove _initialize_guile prototype.
5409         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5410         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5411         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5412         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5413         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5414         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5415         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5416         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5417         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5418         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5419         prototype.
5420         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5421         prototype.
5422         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5423         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5424         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5425         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5426         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5427         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5428         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5429         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5430         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5431         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5432         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5433         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5434         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5435         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5436         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5437         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5438         prototype.
5439         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5440         prototype.
5441         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5442         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5443         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5444         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5445         * infcall.c: Remove _initialize_infcall prototype.
5446         * infcmd.c: Remove _initialize_infcmd prototype.
5447         * inferior.c: Remove _initialize_inferiors prototype.
5448         * inflow.c: Remove _initialize_inflow prototype.
5449         * infrun.c: Remove _initialize_infrun prototype.
5450         * interps.c: Remove _initialize_interpreter prototype.
5451         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5452         * jit.c: Remove _initialize_jit prototype.
5453         * language.c: Remove _initialize_language prototype.
5454         * linux-fork.c: Remove _initialize_linux_fork prototype.
5455         * linux-nat.c: Remove _initialize_linux_nat prototype.
5456         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5457         * linux-thread-db.c: Remove _initialize_thread_db prototype.
5458         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5459         * m2-lang.c: Remove _initialize_m2_language prototype.
5460         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5461         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5462         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5463         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5464         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5465         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5466         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5467         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5468         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5469         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5470         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5471         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5472         * machoread.c: Remove _initialize_machoread prototype.
5473         * macrocmd.c: Remove _initialize_macrocmd prototype.
5474         * macroscope.c: Remove _initialize_macroscope prototype.
5475         * maint.c: Remove _initialize_maint_cmds prototype.
5476         * mdebugread.c: Remove _initialize_mdebugread prototype.
5477         * memattr.c: Remove _initialize_mem prototype.
5478         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5479         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5480         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5481         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5482         * mi/mi-main.c: Remove _initialize_mi_main prototype.
5483         * microblaze-linux-tdep.c: Remove
5484         _initialize_microblaze_linux_tdep prototype.
5485         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5486         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5487         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5488         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5489         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5490         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5491         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5492         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5493         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5494         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5495         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5496         prototype.
5497         * mipsread.c: Remove _initialize_mipsread prototype.
5498         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5499         prototype.
5500         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5501         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5502         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5503         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5504         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5505         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5506         prototype.
5507         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5508         * nto-procfs.c: Remove _initialize_procfs prototype.
5509         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5510         * objc-lang.c: Remove _initialize_objc_language prototype.
5511         * objfiles.c: Remove _initialize_objfiles prototype.
5512         * observer.c: Remove observer_test_first_notification_function,
5513         observer_test_second_notification_function,
5514         observer_test_third_notification_function, and
5515         _initialize_observer prototypes.
5516         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5517         * osabi.c: Remove _initialize_gdb_osabi prototype.
5518         * osdata.c: Remove _initialize_osdata prototype.
5519         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5520         * parse.c: Remove _initialize_parse prototype.
5521         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5522         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5523         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5524         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5525         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5526         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5527         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5528         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5529         * printcmd.c: Remove _initialize_printcmd prototype.
5530         * probe.c: Remove _initialize_probe prototype.
5531         * proc-api.c: Remove _initialize_proc_api prototype.
5532         * proc-events.c: Remove _initialize_proc_events prototype.
5533         * proc-service.c: Remove _initialize_proc_service prototype.
5534         * procfs.c: Remove _initialize_procfs prototype.
5535         * psymtab.c: Remove _initialize_psymtab prototype.
5536         * python/python.c: Remove _initialize_python prototype.
5537         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5538         * record-btrace.c: Remove _initialize_record_btrace prototype.
5539         * record-full.c: Remove _initialize_record_full prototype.
5540         * record.c: Remove _initialize_record prototype.
5541         * regcache.c: Remove _initialize_regcache prototype.
5542         * reggroups.c: Remove _initialize_reggroup prototype.
5543         * remote-notif.c: Remove _initialize_notif prototype.
5544         * remote-sim.c: Remove _initialize_remote_sim prototype.
5545         * remote.c: Remove _initialize_remote prototype.
5546         * reverse.c: Remove _initialize_reverse prototype.
5547         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5548         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5549         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5550         prototype.
5551         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5552         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5553         * rust-exp.y: Remove _initialize_rust_exp prototype.
5554         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5555         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5556         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5557         * score-tdep.c: Remove _initialize_score_tdep prototype.
5558         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5559         prototype.
5560         * ser-go32.c: Remove _initialize_ser_dos prototype.
5561         * ser-mingw.c: Remove _initialize_ser_windows prototype.
5562         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5563         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5564         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5565         * serial.c: Remove _initialize_serial prototype.
5566         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5567         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5568         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5569         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5570         * skip.c: Remove _initialize_step_skip prototype.
5571         * sol-thread.c: Remove _initialize_sol_thread prototype.
5572         * solib-aix.c: Remove _initialize_solib_aix prototype.
5573         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5574         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5575         * solib-frv.c: Remove _initialize_frv_solib prototype.
5576         * solib-spu.c: Remove _initialize_spu_solib prototype.
5577         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5578         * solib-target.c: Remove _initialize_solib_target prototype.
5579         * solib.c: Remove _initialize_solib prototype.
5580         * source.c: Remove _initialize_source prototype.
5581         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5582         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5583         prototype.
5584         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5585         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5586         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5587         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5588         prototype.
5589         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5590         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5591         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5592         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5593         prototype.
5594         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5595         prototype.
5596         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5597         prototype.
5598         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5599         prototype.
5600         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5601         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5602         prototype.
5603         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5604         prototype.
5605         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5606         prototype.
5607         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5608         prototype.
5609         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5610         prototype.
5611         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5612         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5613         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5614         * stabsread.c: Remove _initialize_stabsread prototype.
5615         * stack.c: Remove _initialize_stack prototype.
5616         * stap-probe.c: Remove _initialize_stap_probe prototype.
5617         * std-regs.c: Remove _initialize_frame_reg prototype.
5618         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5619         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5620         * symfile.c: Remove _initialize_symfile prototype.
5621         * symmisc.c: Remove _initialize_symmisc prototype.
5622         * symtab.c: Remove _initialize_symtab prototype.
5623         * target-dcache.c: Remove _initialize_target_dcache prototype.
5624         * target-descriptions.c: Remove _initialize_target_descriptions
5625         prototype.
5626         * thread.c: Remove _initialize_thread prototype.
5627         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5628         prototype.
5629         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5630         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5631         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5632         prototype.
5633         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5634         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5635         * tracefile.c: Remove _initialize_tracefile prototype.
5636         * tracepoint.c: Remove _initialize_tracepoint prototype.
5637         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5638         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5639         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5640         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5641         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5642         * tui/tui-win.c: Remove _initialize_tui_win prototype.
5643         * tui/tui.c: Remove _initialize_tui prototype.
5644         * typeprint.c: Remove _initialize_typeprint prototype.
5645         * user-regs.c: Remove _initialize_user_regs prototype.
5646         * utils.c: Remove _initialize_utils prototype.
5647         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5648         * valarith.c: Remove _initialize_valarith prototype.
5649         * valops.c: Remove _initialize_valops prototype.
5650         * valprint.c: Remove _initialize_valprint prototype.
5651         * value.c: Remove _initialize_values prototype.
5652         * varobj.c: Remove _initialize_varobj prototype.
5653         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5654         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5655         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5656         * windows-nat.c: Remove _initialize_windows_nat,
5657         _initialize_check_for_gdb_ini, and _initialize_loadable
5658         prototypes.
5659         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5660         * xcoffread.c: Remove _initialize_xcoffread prototype.
5661         * xml-support.c: Remove _initialize_xml_support prototype.
5662         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5663         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5664         prototype.
5665         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5666         prototype.
5667         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5668
5669 2017-09-08  Keith Seitz  <keiths@redhat.com>
5670
5671         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5672         field.
5673
5674 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
5675
5676         * f-valprint.c (f_val_print): Remove check for one byte
5677         sized integers. Remove printing of character type.
5678
5679 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
5680             Christoph Weinmann  <christoph.t.weinmann@intel.com>
5681             Bernhard Heckel  <bernhard.heckel@intel.com>
5682
5683         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5684         to maintain proper indentation when printing pointers/refs.
5685
5686 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5687
5688         GDB 8.0.1 released.
5689
5690 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5691
5692         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
5693
5694 2017-09-05  Tom Tromey  <tom@tromey.com>
5695
5696         * parse.c (funcall_chain): Now a std::vector.
5697         (start_arglist, end_arglist): Simplify.
5698         (free_funcalls): Remove.
5699         (parse_exp_in_context_1): Remove cleanup.
5700
5701 2017-09-05  Tom Tromey  <tom@tromey.com>
5702
5703         * go-exp.y (go_parse): Don't create a cleanup.
5704
5705 2017-09-05  Tom Tromey  <tom@tromey.com>
5706
5707         * d-exp.y (PrimaryExpression): Use std::string.
5708         (d_parse): Don't create a cleanup.
5709
5710 2017-09-05  Tom Tromey  <tom@tromey.com>
5711
5712         * utils.c (do_clear_parser_state): Remove.
5713         (make_cleanup_clear_parser_state): Remove.
5714         * p-exp.y (pascal_parse): Use scoped_restore.
5715         * m2-exp.y (m2_parse): Use scoped_restore.
5716         * f-exp.y (f_parse): Use scoped_restore.
5717         * d-exp.y (d_parse): Use scoped_restore.
5718         * c-exp.y (c_parse): Use scoped_restore.
5719         * ada-exp.y (ada_parse): Use scoped_restore.
5720         * utils.h (make_cleanup_clear_parser_state): Remove.
5721
5722 2017-09-06  Keith Seitz  <keiths@redhat.com>
5723
5724         * dwarf2read.c (dw2_linkage_name_attr): New function.
5725         (dw2_linkage_name): New function.
5726         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
5727         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
5728         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
5729
5730 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5731
5732         * config/djgpp/djconfig.sh: Correct shell portability issue.
5733
5734 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5735
5736         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
5737
5738 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5739
5740         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
5741         * NEWS: Mention new FreeBSD/mips native configuration.
5742         * configure.host: Add aarch64*-*-freebsd*.
5743         * configure.nat: Likewise.
5744         * aarch64-fbsd-nat.c: New file.
5745
5746 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5747
5748         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
5749         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
5750         * NEWS: Mention new FreeBSD/aarch64 target.
5751         * configure.tgt: Add aarch64*-*-freebsd*.
5752         * aarch64-fbsd-tdep.c: New file.
5753         * aarch64-fbsd-tdep.h: New file.
5754
5755 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5756
5757         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
5758
5759 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
5760
5761         * parse.c (find_minsym_type_and_address): Don't relocate addresses
5762         of TLS symbols.
5763
5764 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5765
5766         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
5767         call.
5768
5769 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5770
5771         * infrun.c (follow_exec): Call add_thread after
5772         target_find_description.
5773
5774 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5775
5776         * infrun.c (handle_inferior_event_1): When exec'ing, read
5777         stop_pc after follow_exec.
5778
5779 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5780
5781         * remote.c (process_g_packet): Update error message.
5782
5783 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5784
5785         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
5786         targets.
5787
5788 2017-09-05  Pedro Alves  <palves@redhat.com>
5789
5790         * eval.c (eval_call, evaluate_funcall): New functions, factored
5791         out from ...
5792         (evaluate_subexp_standard): ... this.
5793
5794 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5795
5796         * amd64-tdep.c (amd64_target_description): Create target
5797         descriptions.
5798         (_initialize_amd64_tdep): Don't call functions
5799         initialize_tdesc_amd64_*.  Add self tests.
5800         * arch/amd64.c (amd64_create_target_description): Add parameter
5801         is_linux.  Call set_tdesc_osabi if is_linux is true.
5802         * arch/amd64.h (amd64_create_target_description): Update the
5803         declaration.
5804         * arch/i386.c (i386_create_target_description): Add parameter
5805         is_linux.  Call set_tdesc_osabi if is_linux is true.
5806         * arch/i386.h (i386_create_target_description): Update
5807         declaration.
5808         * configure.tgt: Add i386.o to gdb_target_obs.
5809         * features/Makefile (XMLTOC): Remove i386/*.xml.
5810         * features/i386/amd64-avx-avx512.c: Remove.
5811         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
5812         * features/i386/amd64-avx-mpx.c: Remove.
5813         * features/i386/amd64-avx.c: Remove.
5814         * features/i386/amd64-mpx.c: Remove.
5815         * features/i386/amd64.c: Remove.
5816         * features/i386/i386-avx-avx512.c: Remove.
5817         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
5818         * features/i386/i386-avx-mpx.c: Remove.
5819         * features/i386/i386-avx.c: Remove.
5820         * features/i386/i386-mmx.c: Remove.
5821         * features/i386/i386-mpx.c: Remove.
5822         * features/i386/i386.c: Remove.
5823         * i386-tdep.c: Don't include features/i386/i386*.c., include
5824         target-descriptions.h and arch/i386.h.
5825         (i386_target_description): Create target descriptions.
5826         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
5827         functions.  Do self tests.
5828
5829 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5830
5831         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
5832         * features/i386/amd64-avx-avx512-linux.c: Removed.
5833         * features/i386/amd64-avx-linux.c: Removed.
5834         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
5835         * features/i386/amd64-avx-mpx-linux.c: Removed.
5836         * features/i386/amd64-linux.c: Removed.
5837         * features/i386/amd64-mpx-linux.c: Removed.
5838         * features/i386/x32-avx-avx512-linux.c: Removed.
5839         * features/i386/x32-avx-linux.c: Removed.
5840         * features/i386/x32-linux.c: Removed.
5841
5842 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5843
5844         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
5845         features/i386/*.c.
5846         (amd64_linux_read_description): Call
5847         amd64_create_target_description.
5848         * arch/amd64.c: New file.
5849         * arch/amd64.h: New file.
5850         * configure.tgt (x86_64-*-linux*): Append amd64.o.
5851         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
5852
5853 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5854
5855         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
5856         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
5857         (amd64_linux_read_description): Create target descriptions.
5858         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
5859         functions.  Add unit tests.
5860         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
5861         x32-core.xml.
5862         * features/i386/64bit-avx.c: Generated.
5863         * features/i386/64bit-avx512.c: Generated.
5864         * features/i386/64bit-core.c: Generated.
5865         * features/i386/64bit-linux.c: Generated.
5866         * features/i386/64bit-mpx.c: Generated.
5867         * features/i386/64bit-pkeys.c: Generated.
5868         * features/i386/64bit-segments.c: Generated.
5869         * features/i386/64bit-sse.c: Generated.
5870         * features/i386/x32-core.c: Generated.
5871         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
5872         c files for amd64-linux and x32-linux.
5873
5874 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5875
5876         * amd64-linux-tdep.c (amd64_linux_read_description): New
5877         function.
5878         (amd64_linux_core_read_description): Call
5879         amd64_linux_read_description.
5880         (amd64_linux_init_abi): Likewise.
5881         (amd64_x32_linux_init_abi): Likewise.
5882         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
5883         * x86-linux-nat.c (x86_linux_read_description): Call
5884         amd64_linux_read_description.
5885
5886 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5887
5888         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
5889         comments.
5890
5891 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5892
5893         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
5894         * features/i386/i386-avx-avx512-linux.c: Remove.
5895         * features/i386/i386-avx-linux.c: Remove.
5896         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
5897         * features/i386/i386-avx-mpx-linux.c: Remove.
5898         * features/i386/i386-linux.c: Remove.
5899         * features/i386/i386-mmx-linux.c: Remove.
5900         * features/i386/i386-mpx-linux.c: Remove.
5901
5902 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5903
5904         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
5905         (SFILES): Add arch/i386.c.
5906         (HFILES_NO_SRCDIR): Add arch/i386.h.
5907         * arch/i386.c: New file.
5908         * arch/i386.h: New file.
5909         * arch/tdesc.h (allocate_target_description): Declare.
5910         (set_tdesc_architecture): Declare.
5911         (set_tdesc_osabi): Declare.
5912         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
5913         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
5914         include arch/i386.h.
5915         (i386_linux_read_description): Remove code and call
5916         i386_create_target_description.
5917         (set_tdesc_architecture): New function.
5918         (set_tdesc_osabi): New function.
5919         * target-descriptions.h (allocate_target_description): Remove.
5920
5921 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5922
5923         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
5924         * target-descriptions.c (tdesc_create_feature): Likewise, and
5925         adjust code.
5926         * features/i386/32bit-avx.c: Re-generated.
5927         * features/i386/32bit-avx512.c: Re-generated.
5928         * features/i386/32bit-core.c: Re-generated.
5929         * features/i386/32bit-linux.c: Re-generated.
5930         * features/i386/32bit-mpx.c: Re-generated.
5931         * features/i386/32bit-pkeys.c: Re-generated.
5932         * features/i386/32bit-sse.c: Re-generated.
5933
5934 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5935
5936         * regformats/regdef.h (struct reg): Override operator == and !=.
5937
5938 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5939
5940         * arch/tdesc.h: New file.
5941         * regformats/regdat.sh: Generate code using tdesc_create_reg.
5942         * target-descriptions.c: Update comments.
5943         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
5944         declarations.
5945         * features/i386/32bit-avx.c: Re-generated.
5946         * features/i386/32bit-avx512.c: Re-generated.
5947         * features/i386/32bit-core.c: Re-generated.
5948         * features/i386/32bit-linux.c: Re-generated.
5949         * features/i386/32bit-mpx.c: Re-generated.
5950         * features/i386/32bit-pkeys.c: Re-generated.
5951         * features/i386/32bit-sse.c: Re-generated.
5952
5953 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5954
5955         * regformats/regdat.sh: Update generated code.
5956
5957 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5958
5959         * regformats/regdat.sh: Adjust code order.
5960
5961 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5962
5963         * expprint.c (dump_subexp_body_standard): Use constant format
5964         string in fprintf_filtered call.
5965
5966 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5967
5968         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
5969         NetBSD/i386.
5970         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
5971
5972 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5973
5974         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
5975
5976 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5977
5978         * bsd-kvm.o: Define _KMEMUSER.
5979         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
5980         * configure: Regenerate.
5981
5982 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5983
5984         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
5985         * i386-fbsd-nat.c: Likewise.
5986
5987 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5988
5989         * unittests/array-view-selftests.c: Add include of <array>.
5990
5991 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5992
5993         * spu-tdep.c (flush_ea_cache): Add missing argument to
5994         call_function_by_hand.
5995
5996 2017-09-04  Pedro Alves  <palves@redhat.com>
5997
5998         * NEWS (Safer support for debugging with no debug info): New.
5999
6000 2017-09-04  Pedro Alves  <palves@redhat.com>
6001
6002         * c-exp.y (function_method, function_method_void): Add current
6003         instance flags to TYPE_INSTANCE.
6004         * dwarf2read.c (check_modifier): New.
6005         (compute_delayed_physnames): Assert that only C++ adds delayed
6006         physnames.  Mark fn_fields as const/volatile depending on
6007         physname.
6008         * eval.c (make_params): New type_instance_flags parameter.  Use
6009         it as the new type's instance flags.
6010         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6011         flags element and pass it to make_params.
6012         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6013         instance flags element.
6014         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6015         * gdbtypes.h: Include "enum-flags.h".
6016         (type_instance_flags): New enum-flags type.
6017         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6018         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6019         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6020         (follow_type_instance_flags): New function.
6021         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6022         * parser-defs.h (follow_type_instance_flags): Declare.
6023         * valops.c (value_struct_elt_for_reference): const/volatile must
6024         match too.
6025
6026 2017-09-04  Pedro Alves  <palves@redhat.com>
6027
6028         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6029         function/method scopes; lookup the nested name as a function local
6030         static variable.
6031
6032 2017-09-04  Pedro Alves  <palves@redhat.com>
6033
6034         (%type <voidval>): Add function_method.
6035         * c-exp.y (exp): New production for calls with no arguments.
6036         (function_method, function_method_void_or_typelist): New
6037         productions.
6038         (exp): New production for "method()::static_var".
6039         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6040         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6041         Handle OP_FUNC_STATIC_VAR.
6042         * parse.c (operator_length_standard):
6043         Handle OP_FUNC_STATIC_VAR.
6044
6045 2017-09-04  Pedro Alves  <palves@redhat.com>
6046
6047         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6048         handling.
6049         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6050         Ditto.
6051         * parse.c (operator_length_standard, operator_check_standard):
6052         Ditto.
6053         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6054
6055 2017-09-04  Pedro Alves  <palves@redhat.com>
6056
6057         * ax-gdb.c: Include "typeprint.h".
6058         (gen_expr_for_cast): New function.
6059         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6060         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6061         type is unknown.
6062         * dwarf2read.c (new_symbol_full): Fallback to int instead of
6063         nodebug_data_symbol.
6064         * eval.c: Include "typeprint.h".
6065         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6066         Error out if symbol has unknown type.
6067         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6068         evaluate_subexp_for_cast.
6069         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6070         OP_VAR_MSYM_VALUE.
6071         (evaluate_subexp_for_cast): New function.
6072         * gdbtypes.c (init_nodebug_var_type): New function.
6073         (objfile_type): Use it to initialize types of variables with no
6074         debug info.
6075         * typeprint.c (error_unknown_type): New.
6076         * typeprint.h (error_unknown_type): New declaration.
6077         * compile/compile-c-types.c (convert_type_basic): Handle
6078         TYPE_CODE_ERROR; warn and fallback to int for variables with
6079         unknown type.
6080
6081 2017-09-04  Pedro Alves  <palves@redhat.com>
6082
6083         * eval.c (evaluate_var_value): New function, factored out from ...
6084         (evaluate_subexp_standard): ... here.
6085
6086 2017-09-04  Pedro Alves  <palves@redhat.com>
6087
6088         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6089         Remove useless assignments to 'op'.
6090
6091 2017-09-04  Pedro Alves  <palves@redhat.com>
6092
6093         * eval.c (eval_skip_value): New function.
6094         (evaluate_subexp_standard): Use it.
6095
6096 2017-09-04  Pedro Alves  <palves@redhat.com>
6097
6098         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6099         function name from symbol/minsym and pass it to
6100         error_call_unknown_return_type.
6101
6102 2017-09-04  Pedro Alves  <palves@redhat.com>
6103
6104         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6105         * ax-gdb.c (gen_msym_var_ref): New function.
6106         (gen_expr): Handle OP_VAR_MSYM_VALUE.
6107         * eval.c (evaluate_var_msym_value): New function.
6108         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6109         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6110         to call_function_by_hand.
6111         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6112         Handle OP_VAR_MSYM_VALUE.
6113         (union exp_element) <msymbol>: New field.
6114         * minsyms.h (struct type): Forward declare.
6115         (find_minsym_type_and_address): Declare.
6116         * parse.c (write_exp_elt_msym): New function.
6117         (write_exp_msymbol): Delete, refactored as ...
6118         (find_minsym_type_and_address): ... this new function.
6119         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6120         (operator_length_standard, operator_check_standard): Handle
6121         OP_VAR_MSYM_VALUE.
6122         * std-operator.def (OP_VAR_MSYM_VALUE): New.
6123
6124 2017-09-04  Pedro Alves  <palves@redhat.com>
6125
6126         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6127         TYPE_GNU_IFUNC specially here.  Throw error if return type is
6128         unknown.
6129         * ada-typeprint.c (print_func_type): Handle functions with unknown
6130         return type.
6131         * c-typeprint.c (c_type_print_base): Handle functions and methods
6132         with unknown return type.
6133         * compile/compile-c-symbols.c (convert_symbol_bmsym)
6134         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6135         * compile/compile-c-types.c: Include "objfiles.h".
6136         (convert_func): For functions with unknown return type, warn and
6137         default to int.
6138         * compile/compile-object-run.c (compile_object_run): Adjust call
6139         to call_function_by_hand_dummy.
6140         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6141         call_function_by_hand.
6142         * eval.c (evaluate_subexp_standard): Adjust calls to
6143         call_function_by_hand.  Handle functions and methods with unknown
6144         return type.  Pass expect_type to call_function_by_hand.
6145         * f-typeprint.c (f_type_print_base): Handle functions with unknown
6146         return type.
6147         * gcore.c (call_target_sbrk): Adjust call to
6148         call_function_by_hand.
6149         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6150         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
6151         an integer address type instead of nodebug.
6152         * guile/scm-value.c (gdbscm_value_call): Adjust call to
6153         call_function_by_hand.
6154         * infcall.c (error_call_unknown_return_type): New function.
6155         (call_function_by_hand): New "default_return_type" parameter.
6156         Pass it down.
6157         (call_function_by_hand_dummy): New "default_return_type"
6158         parameter.  Use it instead of defaulting to int.  If there's no
6159         default and the return type is unknown, throw an error.  If
6160         there's a default return type, and the called function has no
6161         debug info, then assume the function is prototyped.
6162         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6163         New "default_return_type" parameter.
6164         (error_call_unknown_return_type): New declaration.
6165         * linux-fork.c (call_lseek): Cast return type of lseek.
6166         (inferior_call_waitpid, checkpoint_command): Adjust calls to
6167         call_function_by_hand.
6168         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6169         calls to call_function_by_hand.
6170         * m2-typeprint.c (m2_procedure): Handle functions with unknown
6171         return type.
6172         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6173         (value_nsstring, print_object_command): Adjust calls to
6174         call_function_by_hand.
6175         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6176         functions with unknown return type.
6177         (pascal_type_print_func_varspec_suffix): New function.
6178         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6179         TYPE_CODE_METHOD>: Use it.
6180         * python/py-value.c (valpy_call): Adjust call to
6181         call_function_by_hand.
6182         * rust-lang.c (rust_evaluate_funcall): Adjust call to
6183         call_function_by_hand.
6184         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6185         call_function_by_hand.
6186         * valops.c (value_allocate_space_in_inferior): Adjust call to
6187         call_function_by_hand.
6188         * typeprint.c (type_print_unknown_return_type): New function.
6189         * typeprint.h (type_print_unknown_return_type): New declaration.
6190
6191 2017-09-04  Pedro Alves  <palves@redhat.com>
6192
6193         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6194         types with more than one parameter as prototyped.
6195
6196 2017-09-04  Pedro Alves  <palves@redhat.com>
6197
6198         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6199         (disassemble_command): Use gdb_disassembly_flags instead of bare
6200         int.
6201         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6202         (dump_insns, do_mixed_source_and_assembly_deprecated)
6203         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6204         Use gdb_disassembly_flags instead of bare int.
6205         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6206         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6207         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6208         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
6209         (enum gdb_disassembly_flag): ... values of this new enumeration.
6210         (gdb_disassembly_flags): Define.
6211         (gdb_disassembly)
6212         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6213         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6214         gdb_disassembly_flags instead of bare int.
6215         * record-btrace.c (btrace_insn_history)
6216         (record_btrace_insn_history, record_btrace_insn_history_range)
6217         (record_btrace_insn_history_from): Use gdb_disassembly_flags
6218         instead of bare int.
6219         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6220         Use gdb_disassembly_flags instead of bare int.
6221         * target-debug.h (target_debug_print_gdb_disassembly_flags):
6222         Define.
6223         * target-delegates.c: Regenerate.
6224         * target.c (target_insn_history, target_insn_history_from)
6225         (target_insn_history_range): Use gdb_disassembly_flags instead of
6226         bare int.
6227         * target.h: Include "disasm.h".
6228         (struct target_ops) <to_insn_history, to_insn_history_from,
6229         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6230         int.
6231         (target_insn_history, target_insn_history_from)
6232         (target_insn_history_range): Use gdb_disassembly_flags instead of
6233         bare int.
6234
6235 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6236
6237         * cli/cli-script.c (build_command_line): For if/while commands,
6238         check whether args is empty.
6239
6240 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6241
6242         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6243         (enum command_control_type): Likewise.
6244         (struct command_line): Likewise.
6245         (free_command_lines): Likewise.
6246         (struct command_lines_deleter): Likewise.
6247         (command_line_up): Likewise.
6248         (read_command_lines): Likewise.
6249         (read_command_lines_1): Likewise.
6250         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6251         (enum command_control_type): Likewise.
6252         (struct command_line): Likewise.
6253         (free_command_lines): Likewise.
6254         (struct command_lines_deleter): Likewise.
6255         (command_line_up): Likewise.
6256         (read_command_lines): Likewise.
6257         (read_command_lines_1): Likewise.
6258         * breakpoint.h: Include cli/cli-script.h.
6259         * extension-priv.h: Likewise.
6260         * gdbcmd.h: Likewise.
6261
6262 2017-09-04  Pedro Alves  <palves@redhat.com>
6263
6264         * ada-lang.c (is_known_support_routine): Move sal declaration to
6265         where it is initialized.
6266         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6267         (parse_breakpoint_sals, decode_static_tracepoint_spec)
6268         (clear_command, update_static_tracepoint): Remove init_sal
6269         references.  Move declarations closer to initializations.
6270         * cli/cli-cmds.c (list_command): Move sal declarations closer to
6271         initializations.
6272         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6273         references.  Move sal declarations closer to initializations.
6274         * frame.c (find_frame_sal): Return a symtab_and_line via function
6275         return instead of output parameter.  Remove init_sal references.
6276         * frame.h (find_frame_sal): Return a symtab_and_line via function
6277         return instead of output parameter.
6278         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6279         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6280         instead of memset.
6281         (gdbscm_find_pc_line): Remove init_sal reference.
6282         * infcall.c (call_function_by_hand_dummy): Remove init_sal
6283         references.  Move declarations closer to initializations.
6284         * infcmd.c (set_step_frame): Update.  Move declarations closer to
6285         initializations.
6286         (finish_backward): Remove init_sal references.  Move declarations
6287         closer to initializations.
6288         * infrun.c (process_event_stop_test, handle_step_into_function)
6289         (insert_hp_step_resume_breakpoint_at_frame)
6290         (insert_step_resume_breakpoint_at_caller): Likewise.
6291         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6292         (symbol_to_sal): Likewise.
6293         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6294         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6295         to its initialization.
6296         * reverse.c (save_bookmark_command): Use new/delete.  Remove
6297         init_sal references.  Move declarations closer to initializations.
6298         * source.c (get_current_source_symtab_and_line): Remove brace
6299         initialization.
6300         (set_current_source_symtab_and_line): Now takes the sal by const
6301         reference.  Remove brace initialization.
6302         (line_info): Remove init_sal reference.
6303         * source.h (set_current_source_symtab_and_line): Now takes a
6304         symtab_and_line via const reference.
6305         * stack.c (set_current_sal_from_frame): Adjust.
6306         (print_frame_info): Adjust.
6307         (get_last_displayed_sal): Return the sal via function return
6308         instead of via output parameter.  Simplify.
6309         (frame_info): Adjust.
6310         * stack.h (get_last_displayed_sal): Return the sal via function
6311         return instead of via output parameter.
6312         * symtab.c (init_sal): Delete.
6313         (find_pc_sect_line): Remove init_sal references.  Move
6314         declarations closer to initializations.
6315         (find_function_start_sal): Remove init_sal references.  Move
6316         declarations closer to initializations.
6317         * symtab.h (struct symtab_and_line): In-class initialize all
6318         fields.
6319         * tracepoint.c (set_traceframe_context)
6320         (print_one_static_tracepoint_marker): Remove init_sal references.
6321         Move declarations closer to initializations.
6322         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6323         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
6324         declarations closer to initializations.
6325         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6326         init_sal references.  Adjust.
6327
6328 2017-09-04  Pedro Alves  <palves@redhat.com>
6329
6330         * ax-gdb.c (agent_command_1): Use range-for.
6331         * break-catch-throw.c (re_set_exception_catchpoint): Update.
6332         * breakpoint.c: Include "common/array-view.h".
6333         (init_breakpoint_sal, create_breakpoint_sal): Change sals
6334         parameter from struct symtabs_and_lines to
6335         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
6336         (breakpoint_sals_to_pc): Change sals parameter from struct
6337         symtabs_and_lines to std::vector reference.
6338         (check_fast_tracepoint_sals): Change sals parameter from struct
6339         symtabs_and_lines to std::array_view.  Use range-for.
6340         (decode_static_tracepoint_spec): Return a std::vector instead of
6341         symtabs_and_lines.  Update.
6342         (create_breakpoint): Update.
6343         (break_range_command, until_break_command, clear_command): Update.
6344         (base_breakpoint_decode_location, bkpt_decode_location)
6345         (bkpt_probe_create_sals_from_location)
6346         (bkpt_probe_decode_location, tracepoint_decode_location)
6347         (tracepoint_probe_decode_location)
6348         (strace_marker_create_sals_from_location): Return a std::vector
6349         instead of symtabs_and_lines.
6350         (strace_marker_create_breakpoints_sal): Update.
6351         (strace_marker_decode_location): Return a std::vector instead of
6352         symtabs_and_lines.  Update.
6353         (update_breakpoint_locations): Change struct symtabs_and_lines
6354         parameters to gdb::array_view.  Adjust.
6355         (location_to_sals): Return a std::vector instead of
6356         symtabs_and_lines.  Update.
6357         (breakpoint_re_set_default): Use std::vector instead of struct
6358         symtabs_and_lines.
6359         (decode_location_default): Return a std::vector instead of
6360         symtabs_and_lines.  Update.
6361         * breakpoint.h: Include "common/array-view.h".
6362         (struct breakpoint_ops) <decode_location>: Now returns a
6363         std::vector instead of returning a symtabs_and_lines via output
6364         parameter.
6365         (update_breakpoint_locations): Change sals parameters to use
6366         gdb::array_view.
6367         * cli/cli-cmds.c (edit_command, list_command): Update to use
6368         std::vector and gdb::array_view.
6369         (ambiguous_line_spec): Adjust to use gdb::array_view and
6370         range-for.
6371         (compare_symtabs): Rename to ...
6372         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
6373         const reference and adjust.
6374         (filter_sals): Rewrite using std::vector and standard algorithms.
6375         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6376         (jump_command): Update to use std::vector.
6377         * linespec.c (struct linespec_state) <canonical_names>: Update
6378         comment.
6379         (add_sal_to_sals_basic): Delete.
6380         (add_sal_to_sals, filter_results, convert_results_to_lsals)
6381         (decode_line_2, create_sals_line_offset)
6382         (convert_address_location_to_sals, convert_linespec_to_sals)
6383         (convert_explicit_location_to_sals, parse_linespec)
6384         (event_location_to_sals, decode_line_full, decode_line_1)
6385         (decode_line_with_current_source)
6386         (decode_line_with_last_displayed, decode_objc)
6387         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6388         (linespec_result::~linespec_result): Adjust to use std::vector
6389         instead of symtabs_and_lines.
6390         * linespec.h (linespec_sals::sals): Now a std::vector.
6391         (struct linespec_result): Use std::vector, bool, and in-class
6392         initialization.
6393         (decode_line_1, decode_line_with_current_source)
6394         (decode_line_with_last_displayed): Return std::vector.
6395         * macrocmd.c (info_macros_command): Use std::vector.
6396         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6397         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6398         std::vector.
6399         * probe.h (parse_probes): Return a std::vector.
6400         * python/python.c (gdbpy_decode_line): Use std::vector and
6401         gdb::array_view.
6402         * source.c (select_source_symtab, line_info): Use std::vector.
6403         * stack.c (func_command): Use std::vector.
6404         * symtab.h (struct symtabs_and_lines): Delete.
6405         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6406
6407 2017-09-04  Pedro Alves  <palves@redhat.com>
6408
6409         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6410         unittests/array-view-selftests.c.
6411         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6412         * common/array-view.h: New file.
6413         * unittests/array-view-selftests.c: New file.
6414
6415 2017-09-04  Pedro Alves  <palves@redhat.com>
6416
6417         * cli/cli-cmds.c (edit_command): Pass message to
6418         ambiguous_line_spec.
6419         (list_command): Pass message to ambiguous_line_spec.  Say
6420         "first"/"last" instead of "start" and "end" to be consistent with
6421         the manual.
6422         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
6423         them to print formatted message.
6424
6425 2017-09-04  Pedro Alves  <palves@redhat.com>
6426
6427         * btrace.c (ftrace_add_pt): Pass btrace_insn to
6428         ftrace_update_insns by reference instead of pointer.
6429
6430 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6431
6432         * i386-go32-tdep.c: Include x86-xstate.h.
6433         (i386_go32_init_abi): Call i386_target_description.
6434         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6435         if xcr0 is X86_XSTATE_X87_MASK.
6436         * i386-tdep.h (tdesc_i386): Remove the declaration.
6437         (tdesc_i386_mmx): Likewise.
6438
6439 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6440
6441         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6442         X86_XSTATE_SSE_MASK instead of 0.
6443
6444 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6445
6446         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6447         i386_target_description.
6448         * i386-fbsd-nat.c (i386fbsd_read_description): Call
6449         i386_target_description.
6450         * i386-tdep.c (i386_gdbarch_init): Likewise.
6451
6452 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6453
6454         * amd64-darwin-tdep.c: Include "x86-xstate.h".
6455         (x86_darwin_init_abi_64): Call amd64_target_description.
6456         * amd64-dicos-tdep.c: Likewise.
6457         * amd64-fbsd-nat.c: Likewise.
6458         * amd64-fbsd-tdep.c: Likewise.
6459         * amd64-nbsd-tdep.c: Likewise.
6460         * amd64-obsd-tdep.c: Likewise.
6461         * amd64-sol2-tdep.c: Likewise.
6462         * amd64-windows-tdep.c: Likewise.
6463         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6464
6465 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6466
6467         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6468         (btrace_function) <insn>: Change type to use std::vector.
6469         * btrace.c (ftrace_debug, ftrace_call_num_insn,
6470         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6471         ftrace_update_insns, ftrace_compute_global_level_offset,
6472         btrace_stitch_bts, btrace_clear, btrace_insn_get,
6473         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6474         change to std::vector.
6475         (ftrace_update_insns): Adjust to change to std::vector, change
6476         type of INSN parameter.
6477         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6478         * record-btrace.c (btrace_call_history_insn_range,
6479         btrace_compute_src_line_range,
6480         record_btrace_frame_prev_register): Adjust to change to
6481         std::vector.
6482         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6483         to change to std::vector.
6484
6485 2017-09-03  Tom Tromey  <tom@tromey.com>
6486
6487         * corefile.c (reopen_exec_file): Use std::string.
6488
6489 2017-09-03  Tom Tromey  <tom@tromey.com>
6490
6491         * compile/compile.c (compile_register_name_mangled): Return
6492         std::string.
6493         * compile/compile-loc2c.c (pushf_register_address): Update.
6494         (pushf_register): Update.
6495         * compile/compile-c-types.c (convert_array): Update.
6496         * compile/compile-c-symbols.c (generate_vla_size): Update.
6497         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6498         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6499         (convert_one_symbol): Update.
6500         (generate_c_for_for_one_variable): Update.
6501         * compile/compile-c-support.c (c_get_range_decl_name): Return a
6502         std::string.
6503         (generate_register_struct): Update.
6504         * compile/compile-internal.h (c_get_range_decl_name): Return a
6505         std::string.
6506         (compile_register_name_mangled): Return std::string.
6507
6508 2017-09-03  Tom Tromey  <tom@tromey.com>
6509
6510         * utils.c (perror_string): Return a std::string.
6511         (throw_perror_with_name, perror_warning_with_name): Update.
6512
6513 2017-09-03  Tom Tromey  <tom@tromey.com>
6514
6515         * demangle.c (demangle_command): Use std::string,
6516         unique_xmalloc_ptr.
6517
6518 2017-09-03  Tom Tromey  <tom@tromey.com>
6519
6520         * cli/cli-setshow.c (do_set_command): Use std::string.
6521
6522 2017-09-03  Tom Tromey  <tom@tromey.com>
6523
6524         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6525
6526 2017-09-03  Tom Tromey  <tom@tromey.com>
6527
6528         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6529
6530 2017-09-03  Tom Tromey  <tom@tromey.com>
6531
6532         * mi/mi-cmd-env.c (env_execute_cli_command): Use
6533         gdb::unique_xmalloc_ptr.
6534
6535 2017-09-03  Tom Tromey  <tom@tromey.com>
6536
6537         * thread.c (print_thread_info_1): Use string_printf.
6538         (thread_apply_command, thread_apply_all_command): Use
6539         std::string.
6540
6541 2017-09-03  Tom Tromey  <tom@tromey.com>
6542
6543         * valprint.c (val_print_string): Update.
6544         * gdbcore.h (memory_error_message): Return std::string.
6545         * corefile.c (memory_error_message): Return std::string.
6546         (memory_error): Update.
6547         * breakpoint.c (insert_bp_location): Update.
6548
6549 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
6550
6551         * target/waitstatus.h (target_waitstatus_to_string): Change
6552         return type to std::string.
6553         * target/waitstatus.c (target_waitstatus_to_string): Return
6554         std::string.
6555         * target.h (target_waitstatus_to_string): Remove declaration.
6556         * infrun.c (resume, clear_proceed_status_thread,
6557         print_target_wait_results, do_target_wait, save_waitstatus,
6558         stop_all_threads): Adjust.
6559         * record-btrace.c (record_btrace_wait): Adjust.
6560         * target-debug.h
6561         (target_debug_print_struct_target_waitstatus_p): Adjust.
6562
6563 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6564
6565         PR gdb/22046
6566         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6567         detection.
6568
6569 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
6570
6571         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6572         for setting/unsetting environment variables on the remote target.
6573         (New remote packets): Add entries for QEnvironmentHexEncoded,
6574         QEnvironmentUnset and QEnvironmentReset.
6575         * common/environ.c (gdb_environ::operator=): Extend method to
6576         handle m_user_set_env_list and m_user_unset_env_list.
6577         (gdb_environ::clear): Likewise.
6578         (match_var_in_string): Change type of first parameter from 'char
6579         *' to 'const char *'.
6580         (gdb_environ::set): Extend method to handle
6581         m_user_set_env_list and m_user_unset_env_list.
6582         (gdb_environ::unset): Likewise.
6583         (gdb_environ::clear_user_set_env): New method.
6584         (gdb_environ::user_set_envp): Likewise.
6585         (gdb_environ::user_unset_envp): Likewise.
6586         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6587         m_user_unset_env_list on move constructor/assignment.
6588         (unset): Add new default parameter 'update_unset_list = true'.
6589         (clear_user_set_env): New method.
6590         (user_set_envp): Likewise.
6591         (user_unset_envp): Likewise.
6592         (m_user_set_env_list): New std::set.
6593         (m_user_unset_env_list): Likewise.
6594         * common/rsp-low.c (hex2str): New function.
6595         (bin2hex): New overload for bin2hex function.
6596         * common/rsp-low.c (hex2str): New prototype.
6597         (str2hex): New overload prototype.
6598         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6599         QEnvironmentUnset and QEnvironmentReset.
6600         (remote_protocol_features): Add QEnvironmentHexEncoded,
6601         QEnvironmentUnset and QEnvironmentReset packets.
6602         (send_environment_packet): New function.
6603         (extended_remote_environment_support): Likewise.
6604         (extended_remote_create_inferior): Call
6605         extended_remote_environment_support.
6606         (_initialize_remote): Add QEnvironmentHexEncoded,
6607         QEnvironmentUnset and QEnvironmentReset packet configs.
6608         * unittests/environ-selftests.c (gdb_selftest_env_var):
6609         New variable.
6610         (test_vector_initialization): New function.
6611         (test_init_from_host_environ): Likewise.
6612         (test_reinit_from_host_environ): Likewise.
6613         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6614         Likewise.
6615         (test_unset_set_empty_vector): Likewise.
6616         (test_vector_clear): Likewise.
6617         (test_std_move): Likewise.
6618         (test_move_constructor):
6619         (test_self_move): Likewise.
6620         (test_set_unset_reset): Likewise.
6621         (run_tests): Rewrite in terms of the functions above.
6622
6623 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
6624
6625         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6626         (adi_available): Use a temp variable of type CORE_ADDR as argument
6627         3 when calling target_auxv_search.
6628         (adi_normalize_address): Use masks and xor operators to calculate
6629         normalized address.
6630         (adi_read_versions, adi_write_versions, adi_print_versions)
6631         (do_examine, do_assign): Use paddress.
6632
6633 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
6634
6635         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6636         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6637         out of loop and add supply of FIR.
6638         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6639         add collect of FIR.
6640
6641 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
6642
6643         PR gdb/21827
6644         * cli/cli-script.c (define_command): Don't convert command name
6645         to lower case.
6646
6647 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
6648
6649         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6650         Update all callers accordingly. Remove all code blocks handling
6651         the case where DISPP is not NULL.
6652
6653 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6654
6655         PR symtab/22003
6656         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6657         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6658         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6659
6660 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6661
6662         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6663         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6664         (read_comp_units_from_section): New parameter abbrev_section, use
6665         read_and_check_comp_unit_head, allocate signatured_type if needed.
6666         (create_all_comp_units): Update read_comp_units_from_section caller.
6667
6668 2017-08-23  Pedro Alves  <palves@redhat.com>
6669
6670         PR remote/21852
6671         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6672         to null_ptid and switch to thread without reading the registers
6673         after adding the inferior.
6674
6675 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6676
6677         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6678         compile-gcc.
6679         * compile/compile.c (compile_gcc, show_compile_gcc): New.
6680         (compile_to_object): Implement compile_gcc.
6681         (_initialize_compile): Install "set compile-gcc".  Initialize
6682         compile_gcc.
6683
6684 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6685
6686         * compile/compile.c (compile_to_object): Conditionally call
6687         set_verbose.  Conditionally call compile or compile_v0.
6688
6689 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
6690
6691         * sparc64-tdep.h: (adi_normalize_address): New export.
6692         * sparc-nat.h: (open_adi_tag_fd): New export.
6693         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
6694         * sparc64-linux-tdep.c:
6695         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
6696         (sparc64_linux_handle_segmentation_fault): New function.
6697         (sparc64_linux_init_abi): Register
6698         sparc64_linux_handle_segmentation_fault
6699         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
6700         (sparc64_addr_bits_remove): New function.
6701         (sparc64_init_abi): Register sparc64_addr_bits_remove.
6702         (MAX_PROC_NAME_SIZE): New macro.
6703         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
6704         (sparc64adilist): New variable.
6705         (adi_proc_list): New variable.
6706         (find_adi_info): New function.
6707         (add_adi_info): New function.
6708         (get_adi_info_proc): New function.
6709         (get_adi_info): New function.
6710         (info_adi_command): New function.
6711         (read_maps_entry): New function.
6712         (adi_available): New function.
6713         (adi_normalize_address): New function.
6714         (adi_align_address): New function.
6715         (adi_convert_byte_count): New function.
6716         (adi_tag_fd): New function.
6717         (adi_is_addr_mapped): New function.
6718         (adi_read_versions): New function.
6719         (adi_write_versions): New function.
6720         (adi_print_versions): New function.
6721         (do_examine): New function.
6722         (do_assign): New function.
6723         (adi_examine_command): New function.
6724         (adi_assign_command): New function.
6725         (_initialize_sparc64_adi_tdep): New function.
6726
6727 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
6728
6729         * breakpoint.c (breakpoints_info): Rename to ...
6730         (info_breakpoints_command): ... this.
6731         (watchpoints_info): Rename to ...
6732         (info_watchpoints_command): ... this.
6733         (tracepoints_info): Rename to ...
6734         (info_tracepoints_command): ... this.
6735         (_initialize_breakpoint): Adjust.
6736         * dcache.c (dcache_info): Rename to ...
6737         (info_display_command): ... this.
6738         (_initialize_dcache): Adjust.
6739         * frame.h (args_info): Rename to ...
6740         (info_args_command): ... this.
6741         (locals_info): Rename to ...
6742         (info_locals_command): ... this.
6743         * infcmd.c (nofp_registers_info): Rename to ...
6744         (info_registers_command): ... this.
6745         (float_info): Rename to ...
6746         (info_float_command): ... this.
6747         (program_info): Rename to ...
6748         (info_program_command): ... this.
6749         (all_registers_info): Rename to ...
6750         (info_all_registers_command): ... this.
6751         (vector_info): Rename to ...
6752         (info_vector_command): ... this.
6753         (float_info): Rename to ...
6754         (info_float_command): ... this.
6755         (_initialize_infcmd): Adjust.
6756         * inferior.h (term_info): Rename to ...
6757         (info_terminal_command): ... this.
6758         * inflow.c (term_info): Rename to ...
6759         (info_terminal_command): ... this.
6760         (_initialize_inflow): Adjust.
6761         * infrun.c (signals_info): Rename to ...
6762         (info_signals_command): ... this.
6763         (_initialize_infrun): Adjust.
6764         * objc-lang.c (classes_info): Rename to ...
6765         (info_classes_command): ... this.
6766         (selectors_info): Rename to ...
6767         (info_selectors_command): ... this.
6768         (_initialize_objc_language): Adjust.
6769         * printcmd.c (sym_info): Rename to ...
6770         (info_symbol_command): ... this.
6771         (address_info): Rename to ...
6772         (info_address_command): ... this.
6773         (display_info): Rename to ...
6774         (info_display_command): ... this.
6775         (_initialize_printcmd): Adjust.
6776         * reverse.c (bookmarks_info): Rename to ...
6777         (info_breakpoints_command): ... this.
6778         (_initialize_reverse): Adjust.
6779         * ser-go32.c (dos_info): Rename to ...
6780         (info_serial_command): ... this.
6781         (_initialize_ser_dos): Adjust.
6782         * skip.c (skip_info): Rename to ...
6783         (info_skip_command): ... this.
6784         (_initialize_step_skip): Adjust.
6785         * source.c (line_info): Rename to ...
6786         (info_line_command): ... this.
6787         (source_info): Rename to ...
6788         (info_source_command)
6789         * stack.c (frame_info): Rename to ...
6790         (info_frame_command): ... this.
6791         (locals_info): Rename to ...
6792         (info_locals_command): ... this.
6793         (args_info): Rename to ...
6794         (info_args_command): ... this.
6795         (_initialize_stack): Adjust.
6796         * symtab.c (sources_info): Rename to ...
6797         (info_sources_command): ... this.
6798         (variables_info): Rename to ...
6799         (info_variables_command): ... this.
6800         (functions_info): Rename to ...
6801         (info_functions_command): ... this.
6802         (types_info): Rename to ...
6803         (info_types_command): ... this.
6804         (_initialize_symtab): Adjust.
6805         * target.c (target_info): Rename to ...
6806         (info_target_command): ... this.
6807         (initialize_targets): Adjust.
6808         * tracepoint.c (tvariables_info): Rename to ...
6809         (info_tvariables_command): ... this.
6810         (scope_info): Rename to ...
6811         (info_scope_command): ... this.
6812         (trace_dump_actions): Adjust.
6813         (_initialize_tracepoint): Adjust.
6814
6815 2017-08-22  Tom Tromey  <tom@tromey.com>
6816
6817         * breakpoint.h (install_breakpoint): Update.
6818         * breakpoint.c (add_solib_catchpoint): Update.
6819         (install_breakpoint): Change argument to a std::unique_ptr.
6820         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6821         (create_breakpoint_sal, create_breakpoint): Update.
6822         (watch_command_1, catch_exec_command_1)
6823         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6824         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6825         Return the breakpoint.
6826         (set_raw_breakpoint_without_location, set_raw_breakpoint)
6827         (new_single_step_breakpoint): Update.
6828         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
6829         std::unique_ptr.
6830         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6831         std::unique_ptr.
6832         * break-catch-sig.c (create_signal_catchpoint): Use
6833         std::unique_ptr.
6834         * ada-lang.c (create_ada_exception_catchpoint): Use
6835         std::unique_ptr.
6836
6837 2017-08-22  Tom Tromey  <tom@tromey.com>
6838
6839         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
6840
6841 2017-08-22  Tom Tromey  <tom@tromey.com>
6842
6843         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
6844         (lookup_partial_symbol): Update.
6845
6846 2017-08-22  Tom Tromey  <tom@tromey.com>
6847
6848         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
6849         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
6850         (find_and_open_source, symtab_to_fullname): Update.
6851         * psymtab.c (psymtab_to_fullname): Update.
6852
6853 2017-08-22  Tom Tromey  <tom@tromey.com>
6854
6855         * exec.c (exec_file_attach): Update.
6856         * linux-thread-db.c (try_thread_db_load): Update.
6857         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
6858         * utils.c (gdb_realpath): Change return type.
6859         (gdb_realpath_keepfile): Update.
6860         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
6861         (_initialize_utils): Register the new self test.
6862         * source.c (openp): Update.
6863         (find_and_open_source): Update.
6864         * nto-tdep.c (nto_find_and_open_solib): Update.
6865         * main.c (set_gdb_data_directory): Update.
6866         (captured_main_1): Update.
6867         * dwarf2read.c (dwarf2_get_dwz_file): Update
6868         (dw2_map_symbol_filenames): Update.
6869         * auto-load.c (auto_load_safe_path_vec_update): Update.
6870         (filename_is_in_auto_load_safe_path_vec): Change type of
6871         "filename_realp".
6872         (auto_load_objfile_script): Update.
6873         (file_is_auto_load_safe): Update.  Use std::string.
6874         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
6875
6876 2017-08-22  Tom Tromey  <tom@tromey.com>
6877
6878         * utils.c (gdb_realpath_keepfile): Return a
6879         gdb::unique_xmalloc_ptr.
6880         * exec.c (exec_file_attach): Update.
6881         * utils.h (gdb_realpath_keepfile): Return a
6882         gdb::unique_xmalloc_ptr.
6883
6884 2017-08-22  Tom Tromey  <tom@tromey.com>
6885
6886         * compile/compile.c (compile_file_command): Use
6887         gdb::unique_xmalloc_ptr, std::string.
6888         * utils.c (gdb_abspath): Change return type.
6889         * source.c (openp): Update.
6890         * objfiles.c (allocate_objfile): Update.
6891         * main.c (set_gdb_data_directory): Update.
6892         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
6893
6894 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
6895
6896         * cli-cmds.c (list_commands): List actual code around more than
6897         one location.
6898
6899 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
6900
6901         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
6902
6903 2017-08-21  Pedro Alves  <palves@redhat.com>
6904
6905         PR gdb/19487
6906         * c-exp.y (variable production): Handle function aliases.
6907         * minsyms.c (msymbol_is_text): New function.
6908         * minsyms.h (msymbol_is_text): Declare.
6909         * symtab.c (find_function_alias_target): New function.
6910         * symtab.h (find_function_alias_target): Declare.
6911
6912 2017-08-21  Pedro Alves  <palves@redhat.com>
6913
6914         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
6915         typedefs.
6916         * typeprint.c (whatis_exp): If handling "whatis", and expression
6917         is OP_TYPE, strip one typedef level.  Otherwise don't strip
6918         typedefs here.
6919         * valops.c (value_cast): Save "to" type before resolving
6920         stubs/typedefs.  Use that type as resulting value's type.
6921
6922 2017-08-18  Tom Tromey  <tom@tromey.com>
6923             Pedro Alves  <palves@redhat.com>
6924
6925         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
6926         * sol-thread.c (sol_thread_resume, sol_thread_wait)
6927         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
6928         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
6929         * proc-service.c (ps_xfer_memory): Use scoped_restore.
6930         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
6931         (linux_get_siginfo_data): Add "thread" argument.  Use
6932         scoped_restore.
6933         * linux-nat.c (linux_child_follow_fork)
6934         (check_stopped_by_watchpoint): Use scoped_restore.
6935         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
6936         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
6937         (restore_inferior_ptid, save_inferior_ptid): Remove.
6938         * btrace.c (btrace_fetch): Use scoped_restore.
6939         * bsd-uthread.c (bsd_uthread_fetch_registers)
6940         (bsd_uthread_store_registers): Use scoped_restore.
6941         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
6942         scoped_restore.
6943         * aix-thread.c (aix_thread_resume, aix_thread_wait)
6944         (aix_thread_xfer_partial): Use scoped_restore.
6945         * inferior.h (save_inferior_ptid): Remove.
6946
6947 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6948
6949         PR tdep/21818
6950         * arm-tdep.c (gdb_print_insn_arm): Mark
6951         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
6952
6953 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6954
6955         * NEWS: Mention GDBserver's new option "--selftest".
6956         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
6957         * selftest.c: Move it to common/selftest.c.
6958         * selftest.h: Move it to common/selftest.h.
6959         * selftest-arch.c (reset): New function.
6960         (tests_with_arch): Call reset.
6961
6962 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6963
6964         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
6965         instead of exception_fprintf and printf_filtered.
6966
6967 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6968
6969         * selftest.c (register_self_test): Rename it to
6970         selftests::register_test.
6971         (run_self_tests): selftest::run_tests.
6972         * selftest.h: Update declarations.
6973         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
6974         selftests::register_test_foreach_arch.
6975         * selftest-arch.h: Update declaration.
6976         * aarch64-tdep.c: Update.
6977         * arm-tdep.c: Likewise.
6978         * disasm-selftests.c: Likewise.
6979         * dwarf2loc.c: Likewise.
6980         * dwarf2-frame.c: Likewise.
6981         * findvar.c: Likewise.
6982         * gdbarch-selftests.c: Likewise.
6983         * maint.c (maintenance_selftest): Likewise.
6984         * regcache.c: Likewise.
6985         * rust-exp.y: Likewise.
6986         * selftest-arch.c: Likewise.
6987         * unittests/environ-selftests.c: Likewise.
6988         * unittests/function-view-selftests.c: Likewise.
6989         * unittests/offset-type-selftests.c: Likewise.
6990         * unittests/optional-selftests.c: Likewise.
6991         * unittests/scoped_restore-selftests.c: Likewise.
6992         * utils-selftests.c: Likewise.
6993
6994 2017-08-17  Pedro Alves  <palves@redhat.com>
6995
6996         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
6997         local.
6998
6999 2017-08-17  Pedro Alves  <palves@redhat.com>
7000
7001         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7002         field.
7003         (reset_die_in_process): Delete, replaced by ...
7004         (process_die_scope): ... this new class.  Make it responsible for
7005         freeing cu->line_header too.
7006         (process_die): Use process_die_scope.
7007         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7008         cu->line_header_die_owner.  Don't release the line header if it's
7009         owned by the CU.
7010         (setup_type_unit_groups): Make the CU/DIE own the line header.
7011         Don't release the line header here.
7012
7013 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
7014
7015         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7016
7017 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7018
7019         * NEWS: Mention new shortcuts for nexti and stepi in TUI
7020         Single-Key mode
7021
7022 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7023
7024         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7025         mode command list.
7026
7027 2017-08-15  Stafford Horne  <shorne@gmail.com>
7028
7029         * MAINTAINERS (Write After Approval): Add Stafford Horne.
7030
7031 2017-08-15  Stafford Horne  <shorne@gmail.com>
7032
7033         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7034
7035 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
7036
7037         PR gdb/21954
7038         * infcmd.c (unset_environment_command): Use the 'clear' method on
7039         the environment instead of resetting it.
7040
7041 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
7042
7043         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7044         platforms.
7045
7046 2017-08-14  Tom Tromey  <tom@tromey.com>
7047
7048         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7049         (print_binary_chars): Likewise.
7050         (BITS_IN_BYTES): Remove.
7051
7052 2017-08-14  Tom Tromey  <tom@tromey.com>
7053
7054         PR gdb/21675
7055         * valprint.c (LOW_ZERO): Change value to 034.
7056         (print_octal_chars): Add static_asserts for octal constants.
7057         * printcmd.c (print_scalar_formatted): Add 'd' case.
7058
7059 2017-08-11  Tom Tromey  <tom@tromey.com>
7060
7061         * symfile.c (add_symbol_file_command): Use std::vector.
7062
7063 2017-08-14  Tom Tromey  <tom@tromey.com>
7064
7065         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7066         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7067         std::move.
7068         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7069
7070 2017-08-11  Pedro Alves  <palves@redhat.com>
7071
7072         * infrun.c (process_event_stop_test): Adjust
7073         function_name_is_marked_for_skip call.
7074         * skip.c: Include <list>.
7075         (skiplist_entry): Make it a class with private fields, and
7076         getters/setters.
7077         (skiplist_entry_chain): Delete.
7078         (skiplist_entries): New.
7079         (skiplist_entry_count): Delete.
7080         (highest_skiplist_entry_num): New.
7081         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7082         (add_skiplist_entry): Delete.
7083         (skiplist_entry::skiplist_entry): New.
7084         (skiplist_entry::add_entry): New.
7085         (skip_file_command, skip_function): Adjust.
7086         (compile_skip_regexp): Delete.
7087         (skip_command): Don't compile regexp here.  Adjust to use
7088         skiplist_entry::add_entry.
7089         (skip_info): Adjust to use range-for and getters.
7090         (skip_enable_command, skip_disable_command): Adjust to use
7091         range-for and setters.
7092         (skip_delete_command): Adjust to use std::list.
7093         (add_skiplist_entry): Delete.
7094         (skip_file_p): Delete, refactored as ...
7095         (skiplist_entry::do_skip_file_p): ... this new method.
7096         (skip_gfile_p): Delete, refactored as ...
7097         (skiplist_entry::do_gskip_file_p): ... this new method.
7098         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7099         (skiplist_entry::skip_function_p): ... this new method.
7100         (function_name_is_marked_for_skip): Now returns bool, and takes
7101         the function sal by const reference.  Adjust to use range-for and
7102         skiplist_entry methods.
7103         (_initialize_step_skip): Remove references to
7104         skiplist_entry_chain, skiplist_entry_count.
7105         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7106         takes the function sal by const reference.
7107
7108 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7109
7110         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7111         (dwarf2_frame_cache): Remove reset_cache_cleanup.
7112         (dwarf2_frame_cache):
7113         * frame-unwind.c (frame_unwind_try_unwinder): Catch
7114         RETURN_MASK_ALL and set *this_case to NULL.
7115         * frame-unwind.h: Update comments.
7116
7117 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7118
7119         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7120         (dwarf2_frame_state_copy_regs): Remove.
7121         (dwarf2_frame_state_free_regs): Remove.
7122         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7123         (dwarf2_restore_rule): Call method .alloc_regs instead of
7124         dwarf2_frame_state_alloc_regs.
7125         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
7126         constructor.  Call std::move.
7127         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7128         (dwarf2_frame_cache): Likewise.
7129
7130         [GDB_SELF_TEST]: Include selftest.h and
7131         selftest-arch.h.
7132         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7133         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7134         execute_cfa_program_test.
7135
7136         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7137         copy ctor, assignment operator, move assignment.
7138         <alloc_regs>: New method.
7139         <swap>: New method.
7140         (struct dwarf2_frame_state): Delete dtor.
7141         (dwarf2_frame_state_alloc_regs): Remove declaration.
7142         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7143         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7144
7145 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7146
7147         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7148         (dwarf2_frame_state::dwarf2_frame_state): New.
7149         (dwarf2_frame_state::~dwarf2_frame_state): New.
7150         (dwarf2_fetch_cfa_info): Update.
7151         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
7152         rather than a pointer.  Update code.
7153         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7154         dtor.
7155         <data_align, code_align, retaddr_column>: Change them to const.
7156         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7157         to bool.
7158
7159 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7160
7161         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7162         <loc.exp>: New field.
7163         * dwarf2-frame.c (execute_cfa_program): Update.
7164         (dwarf2_frame_prev_register): Update.
7165
7166 2017-08-10  Pedro Alves  <palves@redhat.com>
7167
7168         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7169
7170 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7171
7172         * fbsd-nat.c (struct fbsd_fork_info): Remove.
7173         (fbsd_pending_children): Use std::list.
7174         (fbsd_remember_child): Likewise.
7175         (fbsd_is_child_pending): Likewise.
7176         (fbsd_pending_vfork_done): Use std::forward_list.
7177         (fbsd_add_vfork_done): Likewise.
7178         (fbsd_is_vfork_done_pending): Likewise.
7179         (fbsd_next_vfork_done): Likewise.
7180
7181 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7182
7183         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7184         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7185         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7186         for `mapfilename'.
7187         (fbsd_xfer_partial): Use gdb::byte_vector.
7188         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7189
7190 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7191
7192         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7193         "filestuff.h".
7194         (fbsd_find_memory_regions): Fix `mapfile' initialization.
7195
7196 2017-08-09  Tom Tromey  <tom@tromey.com>
7197
7198         * skip.c (skiplist_entry): New constructor.
7199         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7200         (skiplist_entry::file_is_glob): Now bool.
7201         (skiplist_entry::file, skiplist_entry::function): Now
7202         std::string.
7203         (make_skip_entry): Return a unique_ptr.  Use new.
7204         (free_skiplist_entry, free_skiplist_entry_cleanup)
7205         (make_free_skiplist_entry_cleanup): Remove.
7206         (skip_command, skip_disable_command, add_skiplist_entry)
7207         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7208         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7209         (function_name_is_marked_for_skip): Update.
7210         (skip_delete_command): Update.  Use delete.
7211
7212 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
7213
7214         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7215         (aarch64_linux_core_read_description): New function.
7216         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7217
7218 2017-08-09  Pedro Alves  <palves@redhat.com>
7219
7220         * cp-name-parser.y (cp_comp_to_string): Return a
7221         gdb::unique_xmalloc_ptr<char>.
7222         * cp-support.c (replace_typedefs_qualified_name)
7223         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7224         (cp_canonicalize_string_full): Use op= instead of explicit
7225         convertion.
7226         (cp_class_name_from_physname, method_name_from_physname)
7227         (cp_func_name, cp_remove_params): Adjust to use
7228         gdb::unique_xmalloc_ptr<char>.
7229         * cp-support.h (cp_comp_to_string): Return a
7230         gdb::unique_xmalloc_ptr<char>.
7231         * python/py-type.c (typy_lookup_type): Adjust to use
7232         gdb::unique_xmalloc_ptr<char>.
7233
7234 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
7235
7236         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7237
7238 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
7239             Yao Qi  <yao.qi@linaro.org>
7240
7241         * cp-support.c (cp_canonicalize_string_full): Use
7242         gdb::unique_xmalloc_ptr<char>.
7243         (cp_canonicalize_string): Likewise.
7244
7245 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7246
7247         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7248         * regformats/i386/amd64-avx-avx512.dat: Remove.
7249         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7250         * regformats/i386/amd64-avx-mpx.dat:Remove.
7251         * regformats/i386/amd64-avx.dat: Remove.
7252         * regformats/i386/amd64-mpx.dat: Remove.
7253         * regformats/i386/i386-avx-avx512.dat: Remove.
7254         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7255         * regformats/i386/i386-avx-mpx.dat: Remove.
7256         * regformats/i386/i386-mmx.dat: Remove.
7257         * regformats/i386/i386-mpx.dat: Remove.
7258
7259 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7260
7261         * amd64-tdep.h (tdesc_x32): Remove the declaration.
7262         * amd64-tdep.c: Don't include features/i386/x32*.c.
7263         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7264         functions.
7265         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7266         and i386/x32-avx-avx512.
7267         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7268         and i386/x32.xml.
7269         * features/i386/x32-avx-avx512.c: Removed.
7270         * features/i386/x32-avx-avx512.xml: Removed.
7271         * features/i386/x32-avx.c: Removed.
7272         * features/i386/x32-avx.xml: Removed.
7273         * features/i386/x32.c: Removed.
7274         * features/i386/x32.xml: Removed.
7275         * regformats/i386/x32-avx-avx512.dat: Removed.
7276         * regformats/i386/x32-avx.dat: Removed.
7277         * regformats/i386/x32.dat: Removed.
7278
7279 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7280
7281         PR breakpoints/21886
7282         * mem-break.c (default_memory_insert_breakpoint): Use
7283         `->placed_address' rather than `->reqstd_address' for the
7284         breakpoint location.
7285
7286 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7287
7288         * arch-utils.c (default_print_insn): Remove arch/mach/endian
7289         assertions.
7290
7291 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7292
7293         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7294         a union of `tdep_info', `tdesc_data' and `id'.
7295         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7296         rather than `info.tdep_info'.
7297         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7298         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7299         * i386-tdep.c (i386_gdbarch_init): Likewise.
7300         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7301         * mips-tdep.c (mips_gdbarch_init): Likewise.
7302         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7303         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7304         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7305         `info.tdep_info'.
7306         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7307         `info.tdep_info'.
7308         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7309         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7310         `info.tdep_info'.
7311         * spu-tdep.c (spu_gdbarch_init): Likewise.
7312         * gdbarch.h: Regenerate.
7313
7314 2017-08-07  Leszek Swirski  <leszeks@google.com>
7315
7316         PR symtab/20899
7317         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7318
7319 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
7320
7321         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7322         (gdbsim_open): Rename gdb_argv args object to argv.
7323
7324 2017-08-05  Tom Tromey  <tom@tromey.com>
7325
7326         * compile/compile-object-load.c (compile_object_load): Use
7327         gdb::unique_xmalloc_ptr.
7328         * cli/cli-dump.c (scan_filename): Rename from
7329         scan_filename_with_cleanup.  Change return type.
7330         (scan_expression): Rename from scan_expression_with_cleanup.
7331         Change return type.
7332         (dump_memory_to_file, dump_value_to_file, restore_command):
7333         Use gdb::unique_xmalloc_ptr.  Update.
7334         * cli/cli-cmds.c (find_and_open_script): Use
7335         gdb::unique_xmalloc_ptr.
7336         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7337         * symmisc.c (maintenance_print_symbols)
7338         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7339         * symfile.c (symfile_bfd_open, generic_load)
7340         (add_symbol_file_command, remove_symbol_file_command): Use
7341         gdb::unique_xmalloc_ptr.
7342         * source.c (openp): Use gdb::unique_xmalloc_ptr.
7343         * psymtab.c (maintenance_print_psymbols): Use
7344         gdb::unique_xmalloc_ptr.
7345         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7346         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7347         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7348         (reload_shared_libraries_1): Likewise.
7349
7350 2017-08-05  Tom Tromey  <tom@tromey.com>
7351
7352         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7353         (rust_op_vector, rust_set_vector): New typedefs.
7354         (current_parser): New global.
7355         (work_obstack): Change to pointer type.  Update all users.
7356         (rust_ast, pstate): Remove globals.
7357         (struct rust_parser): New.
7358         (%union) <params, field_inits>: Change type.
7359         (start, tuple_expr, unit_expr, struct_expr_list, literal)
7360         (field_expr, expr_list, maybe_expr_list, type_list): Update.
7361         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7362         (convert_params_to_types, convert_params_to_expression): Change
7363         type of "params".
7364         (ast_string): Change type of "fields".
7365         (rust_parse): Make a rust_parser.  Remove cleanups.
7366         (rust_lex_tests): Make and install an auto_obstack.
7367
7368 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7369
7370         * configure.srv (ipa_x32_linux_regobj): New.
7371         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7372         instead of X86_TDESC_AVX512.
7373         (initialize_low_tracepoint): Call
7374         init_registers_x32_avx_avx512_linux.
7375
7376 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7377
7378         * utils.h (gdb_argv): Add namespace std for nullptr_t.
7379
7380 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7381
7382         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7383
7384 2017-08-03  Tom Tromey  <tom@tromey.com>
7385
7386         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7387         Remove.
7388         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7389
7390 2017-08-03  Tom Tromey  <tom@tromey.com>
7391
7392         * python/py-param.c (compute_enum_values): Use gdb_argv.
7393
7394 2017-08-03  Tom Tromey  <tom@tromey.com>
7395
7396         * utils.h (struct gdb_argv_deleter): New.
7397         (gdb_argv): New class.
7398         * utils.c (gdb_argv::reset): New method.
7399         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7400         * tracefile.c (tsave_command): Use gdb_argv.
7401         * top.c (new_ui_command): Use gdb_argv.
7402         * symmisc.c (maintenance_print_symbols)
7403         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7404         * symfile.c (symbol_file_command, generic_load)
7405         (remove_symbol_file_command): Use gdb_argv.
7406         * stack.c (backtrace_command): Use gdb_argv.
7407         * source.c (add_path, show_substitute_path_command)
7408         (unset_substitute_path_command, set_substitute_path_command):
7409         Use gdb_argv.
7410         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
7411         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7412         * remote.c (extended_remote_run, remote_put_command)
7413         (remote_get_command, remote_delete_command): Use gdb_argv.
7414         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7415         (gdbsim_open): Use gdb_argv.
7416         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7417         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7418         * procfs.c (procfs_info_proc): Use gdb_argv.
7419         * interps.c (interpreter_exec_cmd): Use gdb_argv.
7420         * infrun.c (handle_command): Use gdb_argv.
7421         * inferior.c (add_inferior_command, clone_inferior_command):
7422         Use gdb_argv.
7423         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7424         * exec.c (exec_file_command): Use gdb_argv.
7425         * cli/cli-cmds.c (alias_command): Use gdb_argv.
7426         * compile/compile.c (build_argc_argv): Use gdb_argv.
7427
7428 2017-08-03  Tom Tromey  <tom@tromey.com>
7429
7430         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7431
7432 2017-08-03  Tom Tromey  <tom@tromey.com>
7433
7434         * python/python.c (compute_python_string): Return std::string.
7435         (gdbpy_eval_from_control_command): Update.
7436         (do_start_initialization): Use std::string.
7437         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7438         xstrprintf.
7439         * python/py-breakpoint.c (local_setattro): Use string_printf, not
7440         xstrprintf.
7441
7442 2017-08-03  Tom Tromey  <tom@tromey.com>
7443
7444         * top.h (do_restore_instream_cleanup): Remove.
7445         * top.c (do_restore_instream_cleanup): Remove.
7446         (read_command_file): Use scoped_restore.
7447         * cli/cli-script.c (execute_user_command): Use scoped_restore.
7448
7449 2017-08-03  Tom Tromey  <tom@tromey.com>
7450
7451         * cli/cli-script.c (execute_user_command)
7452         (execute_control_command): Use scoped_restore.
7453
7454 2017-08-03  Tom Tromey  <tom@tromey.com>
7455
7456         * cli/cli-script.c (do_restore_user_call_depth): Remove.
7457         (execute_user_command): Remove user_call_depth; use
7458         user_args_stack's size instead.
7459
7460 2017-08-03  Tom Tromey  <tom@tromey.com>
7461
7462         * top.h (in_user_command): Remove.
7463         * top.c (in_user_command): Remove.
7464         * cli/cli-script.c (do_restore_user_call_depth)
7465         (execute_user_command): Update.
7466
7467 2017-08-03  Tom Tromey  <tom@tromey.com>
7468
7469         * valops.c (search_struct_method): Use gdb::byte_vector.
7470         * valarith.c (value_concat): Use std::vector.
7471         * target.c (memory_xfer_partial): Use gdb::byte_vector.
7472         (simple_search_memory): Likewise.
7473         * printcmd.c (find_string_backward): Use gdb::byte_vector.
7474         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7475         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7476         * elfread.c (elf_rel_plt_read): Use std::string.
7477         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7478         * cli/cli-dump.c (restore_section_callback): Use
7479         gdb::byte_vector.
7480
7481 2017-08-03  Tom Tromey  <tom@tromey.com>
7482
7483         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7484
7485 2017-08-03  Tom Tromey  <tom@tromey.com>
7486
7487         * tui/tui-regs.c (tui_restore_gdbout): Remove.
7488         (tui_register_format): Use scoped_restore.
7489
7490 2017-08-03  Tom Tromey  <tom@tromey.com>
7491
7492         * reverse.c (exec_direction_default): Remove.
7493         (exec_reverse_once): Use scoped_restore.
7494         * remote.c (restore_remote_timeout): Remove.
7495         (remote_flash_erase, remote_flash_write, remote_flash_done)
7496         (readchar, remote_serial_write): Use scoped_restore.
7497         * cli/cli-script.c (struct source_cleanup_lines_args)
7498         (source_cleanup_lines): Remove.
7499         (script_from_file): Use scoped_restore.
7500         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7501         (source_command): Use scoped_restore.
7502
7503 2017-08-03  Tom Tromey  <tom@tromey.com>
7504
7505         * utils.h (make_cleanup_free_so): Remove.
7506         * utils.c (do_free_so, make_cleanup_free_so): Remove.
7507         * solist.h (struct so_deleter): New.
7508         (so_list_up): New typedef.
7509         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7510
7511 2017-08-03  Tom Tromey  <tom@tromey.com>
7512
7513         * utils.h (make_cleanup_restore_current_language): Remove.
7514         * utils.c (do_restore_current_language)
7515         (make_cleanup_restore_current_language): Remove.
7516         * parse.c (parse_exp_in_context_1)
7517         (parse_expression_with_language): Use
7518         scoped_restore_current_language.
7519         * mi/mi-main.c (mi_cmd_execute): Use
7520         scoped_restore_current_language.
7521         * language.h (scoped_restore_current_language): New class.
7522
7523 2017-08-03  Tom Tromey  <tom@tromey.com>
7524
7525         * compile/compile.c (cleanup_unlink_file): Remove.
7526         (compile_to_object): Use gdb::unlinker.
7527         (eval_compile_command): Likewise.
7528
7529 2017-08-03  Tom Tromey  <tom@tromey.com>
7530
7531         * utils.h (make_cleanup_fclose): Remove.
7532         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7533
7534 2017-08-03  Tom Tromey  <tom@tromey.com>
7535
7536         * top.c (open_terminal_stream): Return gdb_file_up.
7537         (new_ui_command): Update.
7538
7539 2017-08-03  Tom Tromey  <tom@tromey.com>
7540
7541         * source.c (print_source_lines_base, forward_search_command)
7542         (reverse_search_command): Use gdb_file_up.
7543
7544 2017-08-03  Tom Tromey  <tom@tromey.com>
7545
7546         * fbsd-nat.c (fbsd_find_memory_regions): Update.
7547
7548 2017-08-03  Tom Tromey  <tom@tromey.com>
7549
7550         * cli/cli-cmds.c (find_and_open_script): Change return type.
7551         Remove "streamp" and "full_path" parameters.
7552         (source_script_with_search): Update.
7553         * auto-load.c (source_script_file): Update.
7554         * cli/cli-cmds.h (find_and_open_script): Change type.
7555         (open_script): New struct.
7556
7557 2017-08-03  Tom Tromey  <tom@tromey.com>
7558
7559         * xml-support.c (xml_fetch_content_from_file): Update.
7560         * ui-file.c (stdio_file::open): Update.
7561         * tracefile-tfile.c (tfile_start): Update.
7562         * remote.c (remote_file_put, remote_file_get): Update.
7563         * nat/linux-procfs.c (linux_proc_get_int)
7564         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7565         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7566         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7567         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7568         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7569         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7570         * linux-nat.c (linux_proc_pending_signals): Update.
7571         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7572         (file_closer): Remove.
7573         * compile/compile.c (compile_to_object): Update.
7574         * common/filestuff.h (struct gdb_file_deleter): New.
7575         (gdb_file_up): New typedef.
7576         (gdb_fopen_cloexec): Change return type.
7577         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7578         * cli/cli-dump.c (fopen_with_cleanup): Remove.
7579         (dump_binary_file, restore_binary_file): Update.
7580         * auto-load.c (auto_load_objfile_script_1): Update.
7581
7582 2017-08-03  Tom Tromey  <tom@tromey.com>
7583
7584         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7585         (info_static_tracepoint_markers_command): Likewise.
7586         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7587         * skip.c (skip_info): Use ui_out_emit_table.
7588         * progspace.c (print_program_space): Use ui_out_emit_table.
7589         * osdata.c (info_osdata): Use ui_out_emit_table.
7590         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7591         ui_out_emit_table.
7592         * linux-thread-db.c (info_auto_load_libthread_db): Use
7593         ui_out_emit_table.
7594         * inferior.c (print_inferior): Use ui_out_emit_table.
7595         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7596         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7597         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7598         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7599         * ui-out.h (class ui_out_emit_table): New.
7600
7601 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
7602
7603         * mips-tdep.c (mips_fpu_type_str): New function.
7604         (mips_dump_tdep): Call it.
7605
7606 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
7607
7608         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7609         `->mips_fpu_type'.
7610
7611 2017-07-31  Xavier Roirand  <roirand@adacore.com>
7612
7613         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7614
7615 2017-07-27  Xavier Roirand  <roirand@adacore.com>
7616
7617         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7618
7619 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7620
7621         * cli/cli-cmds.c (maintenancechecklist): New variable.
7622         * gdbcmd.h (maintenancechecklist): Declare it.
7623         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7624         Call i386_linux_read_description with different masks.
7625         * maint.c (maintenance_check_command): New function.
7626         (_initialize_maint_cmds): Call add_prefix_cmd.
7627         * target-descriptions.c (tdesc_reg): override operator != and ==.
7628         (tdesc_type): Likewise.
7629         (tdesc_feature): Likewise.
7630         (target_desc): Likewise.
7631         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7632         (maintenance_check_xml_descriptions): New function.
7633         (_initialize_target_descriptions) Add command "xml-descriptions".
7634         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7635
7636 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7637
7638         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7639         Include features/i386/32bit-*.c.
7640         (i386_linux_read_description): Generate target description if it
7641         doesn't exist.
7642         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7643         functions.
7644         * features/i386/32bit-linux.c: Re-generated.
7645         * features/i386/32bit-sse.c: Likewise.
7646         * target-descriptions.c (print_c_feature::visit): Print code to
7647         set register number if needed.
7648         (print_c_feature) <m_next_regnum>: New field.
7649
7650 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7651
7652         * features/Makefile (CFILES): Rename with TDESC_CFILES.
7653         (FEATURE_XMLFILES): New.
7654         (FEATURE_CFILES): New.
7655         New rules.
7656         (clean-cfiles): Remove generated c files.
7657         * features/i386/32bit-avx.c: Generated.
7658         * features/i386/32bit-avx512.c: Generated.
7659         * features/i386/32bit-core.c: Generated.
7660         * features/i386/32bit-linux.c: Generated.
7661         * features/i386/32bit-mpx.c: Generated.
7662         * features/i386/32bit-pkeys.c: Generated.
7663         * features/i386/32bit-sse.c: Generated.
7664         * target-descriptions.c: Include algorithm.
7665         (tdesc_element_visitor): Add method visit_end.
7666         (print_c_tdesc): Implement visit_end.
7667         (print_c_tdesc:: m_filename_after_features): Move it to
7668         protected.
7669         (print_c_feature): New class.
7670         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7671         name starts with "i386/32bit-".
7672
7673 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7674
7675         * target-descriptions.c (tdesc_element_visitor): New class.
7676         (tdesc_element): New class.
7677         (tdesc_reg): Inherit from tdesc_element.
7678         (tdesc_reg::accept): New function.
7679         (tdesc_type): Inherit from tdesc_element.
7680         (tdesc_type::accept): New function.
7681         (tdesc_feature): Inherit from tdesc_element.
7682         (tdesc_feature::accept): New function.
7683         (target_desc): Inherit from tdesc_element.
7684         (target_desc::target_desc): New.
7685         (target_desc::~target_desc): New.
7686         (target_desc::accept): New.
7687         (allocate_target_description): Use new.
7688         (free_target_description): Use delete.
7689         (print_c_tdesc): New class.
7690         (maint_print_c_tdesc_cmd): Adjust.
7691
7692         * features/aarch64.c: Re-generated.
7693         * features/arc-arcompact.c: Re-generated.
7694         * features/arc-v2.c: Re-generated.
7695         * features/arm/arm-with-iwmmxt.c: Re-generated.
7696         * features/arm/arm-with-m.c: Re-generated.
7697         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
7698         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
7699         * features/arm/arm-with-neon.c: Re-generated.
7700         * features/arm/arm-with-vfpv2.c: Re-generated.
7701         * features/arm/arm-with-vfpv3.c: Re-generated.
7702         * features/i386/amd64-avx-avx512.c: Re-generated.
7703         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7704         * features/i386/amd64-avx.c: Re-generated.
7705         * features/i386/amd64-avx-linux.c: Re-generated.
7706         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
7707         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7708         * features/i386/amd64-avx-mpx.c: Re-generated.
7709         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
7710         * features/i386/amd64.c: Re-generated.
7711         * features/i386/amd64-linux.c: Re-generated.
7712         * features/i386/amd64-mpx.c: Re-generated.
7713         * features/i386/amd64-mpx-linux.c: Re-generated.
7714         * features/i386/i386-avx-avx512.c: Re-generated.
7715         * features/i386/i386-avx-avx512-linux.c: Re-generated.
7716         * features/i386/i386-avx.c: Re-generated.
7717         * features/i386/i386-avx-linux.c: Re-generated.
7718         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
7719         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
7720         * features/i386/i386-avx-mpx.c: Re-generated.
7721         * features/i386/i386-avx-mpx-linux.c: Re-generated.
7722         * features/i386/i386.c: Re-generated.
7723         * features/i386/i386-linux.c: Re-generated.
7724         * features/i386/i386-mmx.c: Re-generated.
7725         * features/i386/i386-mmx-linux.c: Re-generated.
7726         * features/i386/i386-mpx.c: Re-generated.
7727         * features/i386/i386-mpx-linux.c: Re-generated.
7728         * features/i386/x32-avx-avx512.c: Re-generated.
7729         * features/i386/x32-avx-avx512-linux.c: Re-generated.
7730         * features/i386/x32-avx.c: Re-generated.
7731         * features/i386/x32-avx-linux.c: Re-generated.
7732         * features/i386/x32.c: Re-generated.
7733         * features/i386/x32-linux.c: Re-generated.
7734         * features/microblaze.c: Re-generated.
7735         * features/microblaze-with-stack-protect.c: Re-generated.
7736         * features/mips64-dsp-linux.c: Re-generated.
7737         * features/mips64-linux.c: Re-generated.
7738         * features/mips-dsp-linux.c: Re-generated.
7739         * features/mips-linux.c: Re-generated.
7740         * features/nds32.c: Re-generated.
7741         * features/nios2.c: Re-generated.
7742         * features/nios2-linux.c: Re-generated.
7743         * features/rs6000/powerpc-32.c: Re-generated.
7744         * features/rs6000/powerpc-32l.c: Re-generated.
7745         * features/rs6000/powerpc-403.c: Re-generated.
7746         * features/rs6000/powerpc-403gc.c : Re-generated.
7747         * features/rs6000/powerpc-405.c: Re-generated.
7748         * features/rs6000/powerpc-505.c: Re-generated.
7749         * features/rs6000/powerpc-601.c: Re-generated.
7750         * features/rs6000/powerpc-602.c: Re-generated.
7751         * features/rs6000/powerpc-603.c: Re-generated.
7752         * features/rs6000/powerpc-604.c: Re-generated.
7753         * features/rs6000/powerpc-64.c: Re-generated.
7754         * features/rs6000/powerpc-64l.c: Re-generated.
7755         * features/rs6000/powerpc-7400.c: Re-generated.
7756         * features/rs6000/powerpc-750.c: Re-generated.
7757         * features/rs6000/powerpc-860.c: Re-generated.
7758         * features/rs6000/powerpc-altivec32.c: Re-generated.
7759         * features/rs6000/powerpc-altivec32l.c: Re-generated.
7760         * features/rs6000/powerpc-altivec64.c: Re-generated.
7761         * features/rs6000/powerpc-altivec64l.c: Re-generated.
7762         * features/rs6000/powerpc-cell32l.c: Re-generated.
7763         * features/rs6000/powerpc-cell64l.c: Re-generated.
7764         * features/rs6000/powerpc-e500.c: Re-generated.
7765         * features/rs6000/powerpc-e500l.c: Re-generated.
7766         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
7767         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
7768         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
7769         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
7770         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
7771         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
7772         * features/rs6000/powerpc-vsx32.c: Re-generated.
7773         * features/rs6000/powerpc-vsx32l.c: Re-generated.
7774         * features/rs6000/powerpc-vsx64.c: Re-generated.
7775         * features/rs6000/powerpc-vsx64l.c: Re-generated.
7776         * features/rs6000/rs6000.c: Re-generated.
7777         * features/s390-linux32.c: Re-generated.
7778         * features/s390-linux32v1.c: Re-generated.
7779         * features/s390-linux32v2.c: Re-generated.
7780         * features/s390-linux64.c: Re-generated.
7781         * features/s390-linux64v1.c: Re-generated.
7782         * features/s390-linux64v2.c: Re-generated.
7783         * features/s390-te-linux64.c: Re-generated.
7784         * features/s390-tevx-linux64.c: Re-generated.
7785         * features/s390-vx-linux64.c: Re-generated.
7786         * features/s390x-linux64.c: Re-generated.
7787         * features/s390x-linux64v1.c: Re-generated.
7788         * features/s390x-linux64v2.c: Re-generated.
7789         * features/s390x-te-linux64.c: Re-generated.
7790         * features/s390x-tevx-linux64.c: Re-generated.
7791         * features/s390x-vx-linux64.c: Re-generated.
7792         * features/sparc/sparc32-solaris.c: Re-generated.
7793         * features/sparc/sparc64-solaris.c: Re-generated.
7794         * features/tic6x-c62x.c: Re-generated.
7795         * features/tic6x-c62x-linux.c: Re-generated.
7796         * features/tic6x-c64x.c: Re-generated.
7797         * features/tic6x-c64x-linux.c: Re-generated.
7798         * features/tic6x-c64xp.c: Re-generated.
7799         * features/tic6x-c64xp-linux.c: Re-generated.
7800
7801 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7802
7803         * i386-linux-tdep.c (i386_linux_read_description): New function.
7804         (i386_linux_core_read_description): Call
7805         i386_linux_read_description.
7806         * i386-linux-tdep.h (i386_linux_read_description): Declare.
7807         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
7808         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
7809         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
7810         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
7811         * x86-linux-nat.c (x86_linux_read_description): Call
7812         i386_linux_read_description.
7813
7814 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7815
7816         * NEWS: Mention it.
7817         * features/Makefile (%.c: %.xml): Pass the xml file name to
7818         command "maint print c-tdesc".
7819         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7820         name from 'arg'.
7821
7822 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7823
7824         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
7825         in-class initialization.
7826         (tdesc_create_feature): Call new instead of XCNEW.
7827         (free_target_description): Ue delete.
7828
7829 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
7830
7831         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
7832
7833 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7834
7835         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
7836         constant.
7837         (amd64_x32_init_abi): Likewise.
7838         * amd64-tdep.h (amd64_init_abi): Update declaration.
7839         (amd64_x32_init_abi): Likewise.
7840
7841 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7842
7843         PR tdep/21717
7844         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
7845         condition for FPSCR.
7846         (arm_linux_store_inferior_registers): Likewise.
7847
7848 2017-07-22  Tom Tromey  <tom@tromey.com>
7849
7850         * break-catch-syscall.c (struct catch_syscall_inferior_data)
7851         <syscalls_counts>: Now a std::vector.
7852         (get_catch_syscall_inferior_data): Use "new".
7853         (catch_syscall_inferior_data_cleanup): Use "delete".
7854         (insert_catch_syscall, remove_catch_syscall)
7855         (clear_syscall_counts): Update.
7856
7857 2017-07-22  Tom Tromey  <tom@tromey.com>
7858
7859         * break-catch-syscall.c (syscall_catchpoint)
7860         <syscalls_to_be_caught>: Now a std::vector<int>
7861         (~syscall_catchpoint): Remove.
7862         (insert_catch_syscall, remove_catch_syscall)
7863         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
7864         (print_mention_catch_syscall, print_recreate_catch_syscall):
7865         Update.
7866         (create_syscall_event_catchpoint): Change type of "filter"
7867         parameter.
7868         (catch_syscall_split_args): Return a std::vector.
7869         (catch_syscall_command_1, catching_syscall_number_1): Update.
7870
7871 2017-07-22  Tom Tromey  <tom@tromey.com>
7872
7873         * break-catch-throw.c (struct exception_catchpoint)
7874         <exception_rx>: Now a std::string.
7875         (~exception_catchpoint): Remove.
7876         (print_one_detail_exception_catchpoint): Update.
7877         (handle_gnu_v3_exceptions): Change type of except_rx.
7878         (extract_exception_regexp): Return a std::string.
7879         (catch_exception_command_1): Update.
7880
7881 2017-07-22  Tom Tromey  <tom@tromey.com>
7882
7883         * break-catch-sig.c (gdb_signal_type): Remove typedef.
7884         (struct signal_catchpoint) <signals_to_be_caught>: Now a
7885         std::vector.
7886         <catch_all>: Now a bool.
7887         (~signal_catchpoint): Remove.
7888         (signal_catchpoint_insert_location)
7889         (signal_catchpoint_remove_location)
7890         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
7891         (signal_catchpoint_print_mention)
7892         (signal_catchpoint_print_recreate)
7893         (signal_catchpoint_explains_signal): Update.
7894         (create_signal_catchpoint): Change type of "filter" and
7895         "catch_all".
7896         (catch_signal_split_args): Return a std::vector.  Change type of
7897         "catch_all".
7898         (catch_signal_command): Update.
7899
7900 2017-07-20  Pedro Alves  <palves@redhat.com>
7901
7902         * ada-lang.c (ada_language_defn): Make extern.
7903         (_initialize_ada_language): Remove add_language call.
7904         * c-lang.c (c_language_defn, cplus_language_defn)
7905         (asm_language_defn, minimal_language_defn): Make extern.
7906         (_initialize_c_language): Delete.
7907         * completer.c (compare_cstrings): Delete, moved to utils.h.
7908         * d-lang.c (d_language_defn): Make extern.
7909         (_initialize_d_language): Remove add_language calls.
7910         * defs.h (enum language): Add comment.
7911         * f-lang.c (f_language_defn): Make extern.
7912         (_initialize_f_language): Remove add_language call.
7913         * go-lang.c (go_language_defn): Make extern.
7914         (_initialize_go_language): Remove add_language call.
7915         * language.c: Include <algorithm>.
7916         (languages): Redefine as const array.
7917         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
7918         (set_language_command): Handle "local".  Use for-range loop.
7919         (set_language): Remove loop.
7920         (language_enum): Rewrite.
7921         (language_def, language_str): Remove loops.
7922         (add_language): Delete.
7923         (add_set_language_command): New, based on add_languages.
7924         (skip_language_trampoline): Adjust.
7925         (local_language_defn): Delete.
7926         (language_gdbarch_post_init): Adjust.
7927         (_initialize_language): Remove add_language calls.  Call
7928         add_set_language_command.
7929         * language.h (add_language): Delete.
7930         (auto_language_defn)
7931         (unknown_language_defn, minimal_language_defn, ada_language_defn)
7932         (asm_language_defn, c_language_defn, cplus_language_defn)
7933         (d_language_defn, f_language_defn, go_language_defn)
7934         (m2_language_defn, objc_language_defn, opencl_language_defn)
7935         (pascal_language_defn, rust_language_defn): Declare.
7936         * m2-lang.c (m2_language_defn): Make extern.
7937         (_initialize_m2_language): Remove add_language call.
7938         * objc-lang.c (objc_language_defn): Make extern.
7939         (_initialize_objc_language): Remove add_language call.
7940         * opencl-lang.c (opencl_language_defn): Make extern.
7941         (_initialize_opencl_language): Remove add_language call.
7942         * p-lang.c (pascal_language_defn): Make extern.
7943         (_initialize_pascal_language): Delete.
7944         * rust-lang.c (rust_language_defn): Make extern.
7945         (_initialize_rust_language): Delete.
7946         * utils.h (compare_cstrings): New static inline function.
7947
7948 2017-07-20  Pedro Alves  <palves@redhat.com>
7949
7950         * ada-lang.c (ada_to_fixed_type_1): Adjust.
7951         (get_var_value): Constify parameters.
7952         (get_int_var_value): Change prototype.
7953         (to_fixed_range_type): Adjust.
7954         * ada-lang.h (get_int_var_value): Change prototype.
7955
7956 2017-07-20  Pedro Alves  <palves@redhat.com>
7957
7958         * dwarf2read.c (dw2_lookup_symbol): Use
7959         SYMBOL_MATCHES_SEARCH_NAME.
7960         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
7961
7962 2017-07-20  Pedro Alves  <palves@redhat.com>
7963
7964         * block.c (block_iter_name_step, block_iter_name_first)
7965         (block_iter_name_next): Delete.
7966         (block_lookup_symbol_primary): Adjust to use
7967         dict_iter_match_first/dict_iter_match_next.
7968         * block.h (block_iter_name_first, block_iter_name_next): Delete
7969         declarations.
7970         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
7971         dict_iter_match_first/dict_iter_match_next.
7972
7973 2017-07-20  Pedro Alves  <palves@redhat.com>
7974
7975         * cp-support.c (cp_find_first_component_aux): Add missing case for
7976         end of string.
7977
7978 2017-07-18  David Blaikie  <dblaikie@gmail.com>
7979
7980         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
7981         of dwo_cu's dwo_file.
7982
7983 2017-07-18  Yao Qi  <yao.qi@linaro.org>
7984
7985         * remote.c (store_registers_using_G): Remove one line comment.
7986
7987 2017-07-18  Yao Qi  <yao.qi@linaro.org>
7988
7989         * regcache.c (regcache_cpy): Simplify it.
7990         (regcache::cpy_no_passthrough): Remove it.
7991         * regcache.h (cpy_no_passthrough): Remove it.
7992         (regcache_dup, regcache_cpy): Update comments.
7993
7994 2017-07-18  Pedro Alves  <palves@redhat.com>
7995
7996         * remote-sim.c (sim_command_completer): Adjust to work with a
7997         completion_tracker instead of a VEC.
7998
7999 2017-07-17  Pedro Alves  <palves@redhat.com>
8000
8001         * completer.c (complete_source_filenames): New function.
8002         (complete_address_and_linespec_locations): New function.
8003         (location_completer): Use complete_address_and_linespec_locations.
8004         (completion_tracker::build_completion_result): Honor the tracker's
8005         request to suppress append.
8006         * completer.h (completion_tracker::suppress_append_ws)
8007         (completion_tracker::set_suppress_append_ws): New methods.
8008         (completion_tracker::m_suppress_append_ws): New field.
8009         (complete_source_filenames): New declaration.
8010         * linespec.c (linespec_complete_what): New.
8011         (struct ls_parser) <complete_what, completion_word,
8012         completion_quote_char, completion_quote_end, completion_tracker>:
8013         New fields.
8014         (string_find_incomplete_keyword_at_end): New.
8015         (linespec_lexer_lex_string): Record quote char.  If in completion
8016         mode, don't throw.
8017         (linespec_lexer_consume_token): Advance the completion word point.
8018         (linespec_lexer_peek_token): Save/restore completion info.
8019         (save_stream_and_consume_token): New.
8020         (set_completion_after_number): New.
8021         (linespec_parse_basic): Set what to complete next depending on
8022         token.  Handle function and label completions specially.
8023         (parse_linespec): Disable objc shortcut in completion mode.  Set
8024         what to complete next depending on token type.  Skip keyword if in
8025         completion mode.
8026         (complete_linespec_component, linespec_complete): New.
8027         * linespec.h (linespec_complete): Declare.
8028
8029 2017-07-17  Pedro Alves  <palves@redhat.com>
8030
8031         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8032         Handle 'operator<' / 'operator<<'.
8033
8034 2017-07-17  Pedro Alves  <palves@redhat.com>
8035
8036         * completer.c (collect_explicit_location_matches): Handle
8037         MATCH_LABEL.
8038         (convert_explicit_location_to_linespec): New, factored out from
8039         ...
8040         (convert_explicit_location_to_sals): ... this.
8041         (complete_label): New.
8042         (linespec_complete_label, find_label_symbols_in_block): New.
8043         (find_label_symbols): Add completion_mode parameter and adjust to
8044         call find_label_symbols_in_block.
8045         * linespec.h (linespec_complete_label): Declare.
8046
8047 2017-07-17  Pedro Alves  <palves@redhat.com>
8048
8049         * ada-lang.c (ada_collect_symbol_completion_matches): Add
8050         complete_symbol_mode parameter.
8051         * cli/cli-cmds.c (complete_command): Get the completion result out
8052         of the handle_brkchars tracker if used a custom word point.
8053         * completer.c: Include "linespec.h".
8054         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8055         (advance_to_expression_complete_word_point): New.
8056         (completion_tracker::completes_to_completion_word): New.
8057         (complete_files_symbols): Pass down
8058         complete_symbol_mode::EXPRESSION.
8059         (explicit_options, probe_options): New.
8060         (collect_explicit_location_matches): Complete on the
8061         explictit_loc->foo instead of word.  Use
8062         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
8063         keyword and options completions.
8064         (backup_text_ptr): Delete.
8065         (skip_keyword): New.
8066         (complete_explicit_location): Remove 'word' parameter.  Add
8067         language, quoted_arg_start and quoted_arg_end parameters.
8068         Rewrite, parsing left to right.
8069         (location_completer): Rewrite.
8070         (location_completer_handle_brkchars): New function.
8071         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8072         (enum complete_line_internal_reason): Adjust comments.
8073         (completion_tracker::discard_completions): New.
8074         (completer_handle_brkchars_func_for_completer): Handle
8075         location_completer.
8076         (gdb_custom_word_point_brkchars)
8077         (gdb_org_rl_basic_quote_characters): New.
8078         (gdb_completion_word_break_characters_throw)
8079         (completion_find_completion_word): Handle trackers that use a
8080         custom word point.
8081         (completion_tracker::advance_custom_word_point_by): New.
8082         (completion_tracker::build_completion_result): Don't rely on
8083         readline appending the quote char.
8084         (gdb_rl_attempted_completion_function_throw): Handle trackers that
8085         use a custom word point.
8086         (gdb_rl_attempted_completion_function): Restore
8087         rl_basic_quote_characters.
8088         * completer.h (class completion_tracker): Extend intro comment.
8089         (completion_tracker::set_quote_char)
8090         (completion_tracker::quote_char)
8091         (completion_tracker::set_use_custom_word_point)
8092         (completion_tracker::use_custom_word_point)
8093         (completion_tracker::custom_word_point)
8094         (completion_tracker::set_custom_word_point)
8095         (completion_tracker::advance_custom_word_point_by)
8096         (completion_tracker::completes_to_completion_word)
8097         (completion_tracker::discard_completions): New methods.
8098         (completion_tracker::m_quote_char)
8099         (completion_tracker::m_use_custom_word_point)
8100         (completion_tracker::m_custom_word_point): New fields.
8101         (advance_to_expression_complete_word_point): Declare.
8102         * f-lang.c (f_collect_symbol_completion_matches): Add
8103         complete_symbol_mode parameter.
8104         * language.h (struct language_defn)
8105         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8106         parameter.
8107         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
8108         (linespec_complete_function): New function.
8109         (linespec_lexer_lex_keyword): Adjust.
8110         * linespec.h (linespec_keywords, linespec_complete_function): New
8111         declarations.
8112         * location.c (find_end_quote): New function.
8113         (explicit_location_lex_one): Add explicit_completion_info
8114         parameter.  Save quoting info.  Don't throw if being called for
8115         completion.  Don't handle Ada operators here.
8116         (is_cp_operator, skip_op_false_positives, first_of)
8117         (explicit_location_lex_one_function): New function.
8118         (string_to_explicit_location): Replace 'dont_throw' parameter with
8119         an explicit_completion_info pointer parameter.  Handle it.  Don't
8120         use explicit_location_lex_one to lex function names.  Use
8121         explicit_location_lex_one_function instead.
8122         * location.h (struct explicit_completion_info): New.
8123         (string_to_explicit_location): Replace 'dont_throw' parameter with
8124         an explicit_completion_info pointer parameter.
8125         * symtab.c (default_collect_symbol_completion_matches_break_on):
8126         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
8127         (default_collect_symbol_completion_matches)
8128         (collect_symbol_completion_matches): Add complete_symbol_mode
8129         parameter.
8130         (collect_symbol_completion_matches_type): Pass down
8131         complete_symbol_mode::EXPRESSION.
8132         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8133         parameter.  Handle LINESPEC mode.
8134         * symtab.h (complete_symbol_mode): New.
8135         (default_collect_symbol_completion_matches_break_on)
8136         (default_collect_symbol_completion_matches)
8137         (collect_symbol_completion_matches)
8138         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8139         parameter.
8140
8141 2017-07-17  Pedro Alves  <palves@redhat.com>
8142
8143         * utils.c (enum class strncmp_iw_mode): New.
8144         (strcmp_iw): Rename to ...
8145         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
8146         parameters.  Handle them.
8147         (strncmp_iw): New.
8148         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8149         * utils.h (strncmp_iw): Declare.
8150         (strcmp_iw): Move describing comments here.
8151
8152 2017-07-17  Pedro Alves  <palves@redhat.com>
8153
8154         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8155         CP_OPERATOR_STR.
8156         * c-typeprint.c (is_type_conversion_operator): Use
8157         CP_OPERATOR_STR.
8158         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8159         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8160         CP_OPERATOR_LEN.
8161         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8162         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8163         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8164         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8165         CP_OPERATOR_STR.
8166         * location.c: Include "cp-support.h".
8167         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8168         CP_OPERATOR_STR.
8169         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8170         CP_OPERATOR_LEN.
8171
8172 2017-07-17  Pedro Alves  <palves@redhat.com>
8173
8174         * cli/cli-cmds.c (complete_command): Use a completion tracker
8175         along with completion_find_completion_word for handle_brkchars
8176         phase.
8177         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8178         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8179         (struct gdb_rl_completion_word_info): New.
8180         (gdb_rl_find_completion_word): New.
8181         (completion_find_completion_word): New.
8182         * completer.h (completion_find_completion_word): Declare.
8183
8184 2017-07-17  Pedro Alves  <palves@redhat.com>
8185
8186         * ada-lang.c (symbol_completion_match): Adjust comments.
8187         (symbol_completion_add): Replace vector parameter with
8188         completion_tracker parameter.  Use it.
8189         (ada_make_symbol_completion_list): Rename to...
8190         (ada_collect_symbol_completion_matches): ... this.  Add
8191         completion_tracker parameter and use it.
8192         (ada_language_defn): Adjust.
8193         * break-catch-syscall.c (catch_syscall_completer): Adjust
8194         prototype and work with completion_tracker instead of VEC.
8195         * breakpoint.c (condition_completer): Adjust prototype and work
8196         with completion_tracker instead of VEC.
8197         * c-lang.c (c_language_defn, cplus_language_defn)
8198         (asm_language_defn, minimal_language_defn): Adjust to renames.
8199         * cli/cli-cmds.c (complete_command): Rework using
8200         completion_tracker.  Catch exceptions when completing.
8201         * cli/cli-decode.c (integer_unlimited_completer)
8202         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8203         with completion_tracker instead of VEC.
8204         * command.h (struct completion_tracker): Forward declare.
8205         (completer_ftype, completer_handle_brkchars_ftype): Change
8206         types.
8207         (complete_on_cmdlist, complete_on_enum): Adjust.
8208         * completer.c: Include <algorithm>.
8209         (struct gdb_completer_state): New.
8210         (current_completion): New global.
8211         (readline_line_completion_function): Delete.
8212         (noop_completer, filename_completer)
8213         (filename_completer_handle_brkchars, complete_files_symbols)
8214         (linespec_location_completer): Adjust to work with a
8215         completion_tracker instead of a VEC.
8216         (string_or_empty): New.
8217         (collect_explicit_location_matches): Adjust to work with a
8218         completion_tracker instead of a VEC.
8219         (explicit_location_completer): Rename to ...
8220         (complete_explicit_location): ... this and adjust to work with a
8221         completion_tracker instead of a VEC.
8222         (location_completer): Adjust to work with a completion_tracker
8223         instead of a VEC.
8224         (add_struct_fields): Adjust to work with a completion_list instead
8225         of VEC.
8226         (expression_completer): Rename to ...
8227         (complete_expression): ... this and adjust to work with a
8228         completion_tracker instead of a VEC.  Use complete_files_symbols.
8229         (expression_completer): Reimplement on top of complete_expression.
8230         (symbol_completer): Adjust to work with a completion_tracker
8231         instead of a VEC.
8232         (enum complete_line_internal_reason): Add describing comments.
8233         (complete_line_internal_normal_command): Adjust to work with a
8234         completion_tracker instead of a VEC.
8235         (complete_line_internal): Rename to ...
8236         (complete_line_internal_1): ... this and adjust to work with a
8237         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
8238         handle_brkchars phase.
8239         (new_completion_tracker): Delete.
8240         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8241         complete_line_internal_1.
8242         (free_completion_tracker): Delete.
8243         (INITIAL_COMPLETION_HTAB_SIZE): New.
8244         (completion_tracker::completion_tracker)
8245         (completion_tracker::~completion_tracker): New.
8246         (maybe_add_completion): Delete.
8247         (completion_tracker::maybe_add_completion)
8248         (completion_tracker::add_completion)
8249         (completion_tracker::add_completions): New.
8250         (throw_max_completions_reached_error): Delete.
8251         (complete_line): Adjust to work with a completion_tracker instead
8252         of a VEC.  Don't create a completion_tracker_t or check for max
8253         completions here.
8254         (command_completer, command_completer_handle_brkchars)
8255         (signal_completer, reg_or_group_completer_1)
8256         (reg_or_group_completer, default_completer_handle_brkchars):
8257         Adjust to work with a completion_tracker.
8258         (gdb_completion_word_break_characters_throw): New.
8259         (gdb_completion_word_break_characters): Reimplement.
8260         (line_completion_function): Delete.
8261         (completion_tracker::recompute_lowest_common_denominator)
8262         (expand_preserving_ws)
8263         (completion_tracker::build_completion_result)
8264         (completion_result::completion_result)
8265         (completion_result::completion_result)
8266         (completion_result::~completion_result)
8267         (completion_result::completion_result)
8268         (completion_result::release_match_list, compare_cstrings)
8269         (completion_result::sort_match_list)
8270         (completion_result::reset_match_list)
8271         (gdb_rl_attempted_completion_function_throw)
8272         (gdb_rl_attempted_completion_function): New.
8273         * completer.h (completion_list, struct completion_result)
8274         (class completion_tracker): New.
8275         (complete_line): Add completion_tracker parameter.
8276         (readline_line_completion_function): Delete.
8277         (gdb_rl_attempted_completion_function): New.
8278         (noop_completer, filename_completer, expression_completer)
8279         (location_completer, symbol_completer, command_completer)
8280         (signal_completer, reg_or_group_completer): Update prototypes.
8281         (completion_tracker_t, new_completion_tracker)
8282         (make_cleanup_free_completion_tracker): Delete.
8283         (enum maybe_add_completion_enum): Delete.
8284         (maybe_add_completion): Delete.
8285         (throw_max_completions_reached_error): Delete.
8286         * corefile.c (complete_set_gnutarget): Adjust to work with a
8287         completion_tracker instead of a VEC.
8288         * cp-abi.c (cp_abi_completer): Adjust to work with a
8289         completion_tracker instead of a VEC.
8290         * d-lang.c (d_language_defn): Adjust.
8291         * disasm.c (disassembler_options_completer): Adjust to work with a
8292         completion_tracker instead of a VEC.
8293         * f-lang.c (f_make_symbol_completion_list): Rename to ...
8294         (f_collect_symbol_completion_matches): ... this.  Adjust to work
8295         with a completion_tracker instead of a VEC.
8296         (f_language_defn): Adjust.
8297         * go-lang.c (go_language_defn): Adjust.
8298         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8299         Adjust to work with a completion_tracker instead of a VEC.
8300         * infrun.c (handle_completer): Likewise.
8301         * interps.c (interpreter_completer): Likewise.
8302         * interps.h (interpreter_completer): Likewise.
8303         * language.c (unknown_language_defn, auto_language_defn)
8304         (local_language_defn): Adjust.
8305         * language.h (language_defn::la_make_symbol_completion_list):
8306         Rename to ...
8307         (language_defn::la_collect_symbol_completion_matches): ... this
8308         and adjust to work with a completion_tracker instead of a VEC.
8309         * m2-lang.c (m2_language_defn): Adjust.
8310         * objc-lang.c (objc_language_defn): Adjust.
8311         * opencl-lang.c (opencl_language_defn): Adjust.
8312         * p-lang.c (pascal_language_defn): Adjust.
8313         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8314         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8315         with a completion_tracker.
8316         * rust-lang.c (rust_language_defn): Adjust.
8317         * symtab.c (free_completion_list, do_free_completion_list)
8318         (return_val, completion_tracker): Delete.
8319         (completion_list_add_name, completion_list_add_symbol)
8320         (completion_list_add_msymbol, completion_list_objc_symbol)
8321         (completion_list_add_fields, add_symtab_completions): Add
8322         completion_tracker parameter and use it.
8323         (default_make_symbol_completion_list_break_on_1): Rename to...
8324         (default_collect_symbol_completion_matches_break_on): ... this.
8325         Add completion_tracker parameter and use it instead of allocating
8326         a completion tracker here.
8327         (default_make_symbol_completion_list_break_on): Delete old
8328         implementation.
8329         (default_make_symbol_completion_list): Delete.
8330         (default_collect_symbol_completion_matches): New.
8331         (make_symbol_completion_list): Delete.
8332         (collect_symbol_completion_matches): New.
8333         (make_symbol_completion_type): Rename to ...
8334         (collect_symbol_completion_matches_type): ... this.  Add
8335         completion_tracker parameter and use it instead of VEC.
8336         (make_file_symbol_completion_list_1): Rename to...
8337         (collect_file_symbol_completion_matches): ... this.  Add
8338         completion_tracker parameter and use it instead of VEC.
8339         (make_file_symbol_completion_list): Delete.
8340         (add_filename_to_list): Use completion_list instead of a VEC.
8341         (add_partial_filename_data::list): Now a completion_list.
8342         (make_source_files_completion_list): Work with a completion_list
8343         instead of a VEC.
8344         * symtab.h: Include "completer.h".
8345         (default_make_symbol_completion_list_break_on)
8346         (default_make_symbol_completion_list, make_symbol_completion_list)
8347         (make_symbol_completion_type, make_file_symbol_completion_list)
8348         (make_source_files_completion_list): Delete.
8349         (default_collect_symbol_completion_matches_break_on)
8350         (default_collect_symbol_completion_matches)
8351         (collect_symbol_completion_matches)
8352         (collect_symbol_completion_matches_type)
8353         (collect_file_symbol_completion_matches)
8354         (make_source_files_completion_list): New.
8355         * top.c (init_main): Don't install a rl_completion_entry_function
8356         hook.  Install a rl_attempted_completion_function hook instead.
8357         * tui/tui-layout.c (layout_completer): Adjust to work with a
8358         completion_tracker.
8359         * tui/tui-regs.c (tui_reggroup_completer):
8360         * tui/tui-win.c (window_name_completer, focus_completer)
8361         (winheight_completer): Adjust to work with a completion_tracker.
8362         * value.c: Include "completer.h".
8363         (complete_internalvar): Adjust to work with a completion_tracker.
8364         * value.h (complete_internalvar): Likewise.
8365
8366 2017-07-17  Pedro Alves  <palves@redhat.com>
8367
8368         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8369         renames.
8370         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8371         comments to completer_ftype's declaration.
8372         <completer_handle_brkchars>: Change type to
8373         completer_handle_brkchars_ftype.
8374         * command.h (completer_ftype): Add describing comment and give
8375         names to parameters.
8376         (completer_ftype_void): Rename to ...
8377         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
8378         (set_cmd_completer_handle_brkchars): Adjust.
8379         * completer.c (filename_completer_handle_brkchars): New function.
8380         (complete_line_internal_normal_command): New function, factored
8381         out from ...
8382         (complete_line_internal): ... here.
8383         (command_completer_handle_brkchars)
8384         (default_completer_handle_brkchars)
8385         (completer_handle_brkchars_func_for_completer): New functions.
8386         * completer.h (set_gdb_completion_word_break_characters): Delete
8387         declaration.
8388         (completer_handle_brkchars_func_for_completer): New declaration.
8389         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8390         completer_handle_brkchars_func_for_completer.
8391
8392 2017-07-17  Pedro Alves  <palves@redhat.com>
8393
8394         * completer.c (symbol_completer): New function, based on
8395         make_symbol_completion_list_fn.
8396         * completer.h (symbol_completer): New declaration.
8397         * guile/scm-cmd.c (cmdscm_completers): Adjust.
8398         * python/py-cmd.c (completers): Adjust.
8399         * symtab.c (make_symbol_completion_list_fn): Delete.
8400         * symtab.h (make_symbol_completion_list_fn): Delete.
8401         * cli/cli-decode.c (add_cmd): Adjust.
8402
8403 2017-07-17  Pedro Alves  <palves@redhat.com>
8404
8405         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8406         * dwarf2read.c: Include "filename-seen-cache.h".
8407         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8408         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8409         * filename-seen-cache.c: New file.
8410         * filename-seen-cache.h: New file.
8411         * symtab.c: Include "filename-seen-cache.h".
8412         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8413         (create_filename_seen_cache, clear_filename_seen_cache)
8414         (delete_filename_seen_cache, filename_seen): Delete, parts moved
8415         to filename-seen-cache.h/filename-seen-cache.c.
8416         (output_source_filename, sources_info)
8417         (maybe_add_partial_symtab_filename)
8418         (make_source_files_completion_list): Adjust to use
8419         filename_seen_cache.
8420
8421 2017-07-17  Pedro Alves  <palves@redhat.com>
8422
8423         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8424         fields.
8425         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8426         dwarf2_debug_sections*)): New.
8427         (dwarf2_per_objfile::dwarf2_per_objfile(const
8428         dwarf2_per_objfile&)): Declare as deleted.
8429         (dwarf2_per_objfile::operator=): Declare as deleted.
8430         (dwarf2_per_objfile::dwarf2_per_objfile)
8431         (dwarf2_per_objfile::~dwarf2_per_objfile)
8432         (dwarf2_per_objfile::free_cached_comp_units): New.
8433         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8434         ctor.  Call dwarf2_per_objfile's ctor manually.
8435         (dwarf2_locate_sections): Deleted/refactored as ...
8436         (dwarf2_per_objfile::locate_sections): ... this new method.
8437         (free_cached_comp_units): Defer to
8438         dwarf2_per_objfile::free_cached_comp_units.
8439         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8440
8441 2017-07-14  Tom Tromey  <tom@tromey.com>
8442
8443         PR rust/21764:
8444         * rust-exp.y (convert_ast_to_expression): Add "want_type"
8445         parameter.
8446         <UNOP_SIZEOF>: Split into separate case.
8447         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
8448
8449 2017-07-14  Tom Tromey  <tom@tromey.com>
8450
8451         PR rust/21763:
8452         * symtab.c (symbol_matches_domain): Add language_rust to special
8453         case.
8454         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8455         treat LOC_TYPEDEF symbols as variables.
8456
8457 2017-07-14  Pedro Alves  <palves@redhat.com>
8458
8459         * symtab.c (make_file_symbol_completion_list_1): Iterate over
8460         symtabs matching all symtabs with SRCFILE as file name instead of
8461         only considering the first hit, with lookup_symtab.
8462
8463 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8464
8465         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8466         operator_name parameters.
8467         (gen_expr): Update function call.
8468
8469 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8470
8471         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8472         parameter.
8473         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8474         Likewise.
8475         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8476         parameter, use agent_expr::gdbarch instead, update function
8477         calls.
8478         (locexpr_tracepoint_var_ref): Likewise.
8479         (loclist_tracepoint_var_ref): Likewise.
8480         * ax-gdb.c (gen_trace_static_fields): Likewise.
8481         (gen_traced_pop): Likewise.
8482         (gen_frame_args_address): Likewise.
8483         (gen_frame_locals_address): Likewise.
8484         (gen_var_ref): Likewise.
8485         (gen_struct_ref_recursive): Likewise.
8486         (gen_static_field): Likewise.
8487         (gen_maybe_namespace_elt): Likewise.
8488         (gen_expr): Likewise.
8489         (gen_trace_for_var): Likewise.
8490         (gen_trace_for_expr): Likewise.
8491         (gen_trace_for_return_address): Likewise.
8492
8493 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8494
8495         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8496         parameter.
8497         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8498
8499 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8500
8501         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8502         from ax, update calls.
8503         (gen_usual_arithmetic): Likewise.
8504         (gen_integral_promotions): Likewise.
8505         (gen_bitfield_ref): Likewise.
8506         (gen_primitive_field): Likewise.
8507         (gen_struct_ref_recursive): Likewise.
8508         (gen_struct_ref): Likewise.
8509         (gen_maybe_namespace_elt): Likewise.
8510         (gen_struct_elt_for_reference): Likewise.
8511         (gen_namespace_elt): Likewise.
8512         (gen_aggregate_elt_ref): Likewise.
8513         (gen_expr): Get gdbarch from ax, update calls.
8514         (gen_expr_binop_rest): Likewise.
8515
8516 2017-07-13  Pedro Alves  <palves@redhat.com>
8517
8518         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8519         as default tdesc.
8520         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8521         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8522         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8523         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
8524         tdep.
8525         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8526         Get final tdesc from the tdep.
8527         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8528         default tdesc.
8529         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8530         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8531         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8532         Use it as default tdesc.
8533         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8534         down to amd_init_abi.  No longer handle fallback tdesc here.
8535         * amd64-tdep.h (tdesc_x32): Declare.
8536         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8537         parameter.
8538         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8539         as default tdesc.
8540
8541 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8542
8543         * s390-linux-tdep.c (s390_process_record): Add support for
8544         instructions new in arch12.
8545
8546 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8547
8548         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8549         PT_GETFSBASE and PT_GETGSBASE.
8550         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8551         PT_SETGSBASE.
8552
8553 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8554
8555         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8556         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8557         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8558         those rules.
8559         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8560         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8561         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8562         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8563         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8564         * features/i386/amd64.xml: Add 64bit-segments.xml.
8565         * features/i386/amd64-avx-avx512.c: Regenerated.
8566         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8567         * features/i386/amd64-avx-mpx.c: Regenerated.
8568         * features/i386/amd64-avx.c: Regenerated.
8569         * features/i386/amd64-mpx.c: Regenerated.
8570         * features/i386/amd64.c: Regenerated.
8571         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8572         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8573         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8574         * regformats/i386/amd64-avx.dat: Regenerated.
8575         * regformats/i386/amd64-mpx.dat: Regenerated.
8576         * regformats/i386/amd64.dat: Regenerated.
8577
8578 2017-07-10  Yao Qi  <yao.qi@linaro.org>
8579
8580         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8581         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8582
8583 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
8584
8585         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8586         unsetenv.
8587         * gnulib/aclocal.m4: Regenerate.
8588         * gnulib/config.in: Regenerate.
8589         * gnulib/configure: Regenerate.
8590         * gnulib/import/Makefile.am: Regenerate.
8591         * gnulib/import/Makefile.in: Regenerate.
8592         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8593         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8594         * gnulib/import/m4/environ.m4: New file.
8595         * gnulib/import/m4/setenv.m4: New file.
8596         * gnulib/import/setenv.c: New file.
8597         * gnulib/import/unsetenv.c: New file.
8598
8599 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
8600
8601         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8602         address when op is DW_OP_addr.
8603
8604 2017-07-09  Tom Tromey  <tom@tromey.com>
8605
8606         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8607         check and apply to outer type.
8608
8609 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8610
8611         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8612         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8613         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8614         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8615
8616 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8617
8618         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8619
8620 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8621
8622         * corelow.c (get_core_siginfo): Remove.
8623         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8624         instead of get_core_siginfo.
8625         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8626         * gdbarch.h: Re-generate.
8627         * gdbarch.c: Re-generate.
8628         * linux-tdep.c (linux_core_xfer_siginfo): New.
8629         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8630
8631 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8632
8633         * corelow.c (thread_section_name): Move to ...
8634         * gdbcore.h (thread_section_name): ... here.
8635
8636 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8637
8638         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8639         (struct siginfo32): New.
8640         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8641         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8642         via ptrace(PT_LWPINFO).
8643
8644 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8645
8646         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8647         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8648         (fbsd_get_siginfo_type): New.
8649         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8650         (_initialize_fbsd_tdep): New.
8651
8652 2017-07-06  David Blaikie  <dblaikie@gmail.com>
8653
8654         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8655         a singular dwo_unit*) to support multiple CUs in the same way that
8656         multiple TUs are supported.
8657         (create_cus_hash_table): Replace create_dwo_cu with a function for
8658         parsing multiple CUs from a DWO file.
8659         (open_and_init_dwo_file): Use create_cus_hash_table rather than
8660         create_dwo_cu.
8661         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8662         htab_find, rather than comparing the signature to a singleton CU in
8663         the dwo_file.
8664
8665 2017-07-06  Pedro Alves  <palves@redhat.com>
8666
8667         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8668
8669 2017-07-04  Pedro Alves  <palves@redhat.com>
8670
8671         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8672         * gdbtypes.h (TYPE_STATIC): Delete.
8673         (struct fn_field) <is_public, is_abstract, is_static, is_final,
8674         is_synchronized, is_native>: Delete.
8675         <dummy>: Bump.
8676         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8677         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8678         (TYPE_FN_FIELD_ABSTRACT): Delete.
8679
8680 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
8681
8682         * buffer.h (buffer_finish): Fix spelling mistakes.
8683
8684 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
8685
8686         * .dir-locals.el: Automatically switch to C-style comments in
8687         versions of Emacs that support the feature.
8688
8689 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8690             Pedro Alves  <palves@redhat.com>
8691
8692         PR cli/21688
8693         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
8694         (process_next_line): New variable 'inline_cmd'.
8695         Adjust 'if' clauses for "python", "compile" and "guile" to use
8696         'command_name_equals' and check for '!inline_cmd'.
8697
8698 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8699
8700         PR cli/21688
8701         * cli/cli-script.c (command_name_equals_not_inline): New function.
8702         (process_next_line): Adjust 'if' clauses for "python", "compile"
8703         and "guile" to use command_name_equals_not_inline.
8704
8705 2017-06-29  Pedro Alves  <palves@redhat.com>
8706
8707         * completer.c (expression_completer): Call
8708         linespec_location_completer instead of location_completer.
8709
8710 2017-06-29  Pedro Alves  <palves@redhat.com>
8711
8712         * completer.c (expression_completer): Remove code that recomputes
8713         'text' from 'word'.
8714
8715 2017-06-29  Yao Qi  <yao.qi@linaro.org>
8716
8717         * regformats/regdat.sh: Generate code with
8718         "ifndef IN_PROCESS_AGENT".
8719
8720 2017-06-28  Pedro Alves  <palves@redhat.com>
8721
8722         * command.h: Include "common/scoped_restore.h".
8723
8724 2017-06-28  Yao Qi  <yao.qi@linaro.org>
8725
8726         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
8727         instead of obstack_grow.
8728
8729 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
8730
8731         PR gdb/21337
8732         * symfile.c (reread_symbols): Call objfiles_changed just before
8733         read_symbols.
8734
8735 2017-06-27  Pedro Alves  <palves@redhat.com>
8736
8737         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
8738         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
8739         (completion_list_add_symbol, completion_list_add_msymbol):
8740         ... these new functions.
8741         (add_symtab_completions)
8742         (default_make_symbol_completion_list_break_on_1): Adjust.
8743
8744 2017-06-27  Pedro Alves  <palves@redhat.com>
8745
8746         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
8747         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
8748         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
8749         dtor.
8750         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
8751         'storage_obstack' field an auto_obstack.  In-class initialize all
8752         non-bitfield fields.  Make minsyms_read bool.
8753         * symfile.c (read_symbols): Adjust.
8754
8755 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
8756
8757         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
8758         (gdbsim_store_register): Likewise.
8759
8760 2017-06-27  Pedro Alves  <palves@redhat.com>
8761
8762         * c-exp.y (name_obstack): Now an auto_obstack.
8763         (yylex): Use auto_obstack::clear.
8764         (c_parse): Use auto_obstack::clear instead of reinitializing and
8765         freeing the obstack.
8766         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
8767         * d-exp.y (name_obstack): Now an auto_obstack.
8768         (yylex): Use auto_obstack::clear.
8769         (d_parse): Use auto_obstack::clear instead of reinitializing and
8770         freeing the obstack.
8771         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
8772         auto_obstack.
8773         * dwarf2read.c (create_addrmap_from_index)
8774         (dwarf2_build_psymtabs_hard)
8775         (update_enumeration_type_from_children): Likewise.
8776         * gdb_obstack.h (auto_obstack): New type.
8777         * go-exp.y (name_obstack): Now an auto_obstack.
8778         (build_packaged_name): Use auto_obstack::clear.
8779         (go_parse): Use auto_obstack::clear instead of reinitializing and
8780         freeing the obstack.
8781         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
8782         auto_obstack.
8783         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
8784         * rust-exp.y (work_obstack): Now an auto_obstack.
8785         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
8786         reinitializing and freeing the obstack.
8787         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
8788         (host_char_to_target): Use auto_obstack.
8789         * utils.h (make_cleanup_obstack_free): Delete declaration.
8790         * valprint.c (generic_emit_char, generic_printstr): Use
8791         auto_obstack.
8792
8793 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
8794
8795         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
8796         thread.
8797         (darwin_init_thread_list): Don't update dummy thread.
8798         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
8799
8800 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8801
8802         * record-full.c (netorder16): Remove.
8803
8804 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8805
8806         * common/diagnostics.h: Define macros for GCC.
8807         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
8808         * common/vec.h: Include diagnostics.h.
8809         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
8810         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
8811         warning.
8812
8813 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8814
8815         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
8816         New macro.
8817         * ada-lex.l: Ignore deprecated register warnings.
8818
8819 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8820
8821         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8822         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8823
8824 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8825
8826         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
8827         its own line.
8828
8829 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8830
8831         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
8832
8833 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
8834
8835         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
8836         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
8837         (xtensa_register_read_masked): Likewise.
8838
8839 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
8840
8841         * common/environ.c (gdb_environ::unset): Update comment.
8842
8843 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8844
8845         * python/py-unwind.c (pyuw_sniffer): Allocate space for
8846         registers.
8847
8848 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8849
8850         * record-full.c (record_full_exec_insn): Use byte_vector.
8851
8852 2017-06-22  Yao Qi  <yao.qi@linaro.org>
8853
8854         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
8855         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8856
8857 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8858
8859         * remote.c (cached_reg): Move from here...
8860         * regcache.h (cached_reg): ...to here.
8861         * python/py-unwind.c (struct reg_info): Remove.
8862         (cached_frame_info): Use cached_reg_t.
8863         (pyuw_prev_register): Likewise.
8864         (pyuw_sniffer): Use cached_reg_t and allocate registers.
8865         (pyuw_dealloc_cache): Free all registers.
8866
8867 2017-06-22  Pedro Alves  <palves@redhat.com>
8868             Simon Marchi  <simon.marchi@ericsson.com>
8869
8870         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
8871         warning.
8872         * common/diagnostics.h: New file.
8873
8874 2017-06-22  Pedro Alves  <palves@redhat.com>
8875
8876         * common/agent.h: Add include guards.
8877
8878 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
8879
8880         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
8881         talk about addressable units instead of bytes.
8882
8883 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8884
8885         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
8886         of '::const_iterator'.
8887
8888 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8889
8890         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8891         'unittests/environ-selftests.c'.
8892         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
8893         * charset.c (find_charset_names): Declare object 'iconv_env'.
8894         Update code to use 'iconv_env' object.  Remove call to
8895         'free_environ'.
8896         * common/environ.c: Include <utility>.
8897         (make_environ): Delete function.
8898         (free_environ): Delete function.
8899         (gdb_environ::clear): New function.
8900         (gdb_environ::operator=): New function.
8901         (gdb_environ::get): Likewise.
8902         (environ_vector): Delete function.
8903         (set_in_environ): Delete function.
8904         (gdb_environ::set): New function.
8905         (unset_in_environ): Delete function.
8906         (gdb_environ::unset): New function.
8907         (gdb_environ::envp): Likewise.
8908         * common/environ.h: Include <vector>.
8909         (struct gdb_environ): Delete; transform into...
8910         (class gdb_environ): ... this class.
8911         (free_environ): Delete prototype.
8912         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
8913         environ_vector): Likewise.
8914         * infcmd.c (run_command_1): Update code to call
8915         'envp' from 'gdb_environ' class.
8916         (environment_info): Update code to call methods from 'gdb_environ'
8917         class.
8918         (unset_environment_command): Likewise.
8919         (path_info): Likewise.
8920         (path_command): Likewise.
8921         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
8922         (inferior::inferior): Initialize 'environment' using the host's
8923         information.
8924         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
8925         Include "environ.h".
8926         (class inferior) <environment>: Change type from 'struct
8927         gdb_environ' to 'gdb_environ'.
8928         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
8929         methods from 'gdb_environ' class.
8930         * solib.c (solib_find_1): Likewise
8931         * unittests/environ-selftests.c: New file.
8932
8933 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8934
8935         * features/i386/i386-linux.xml: Exchange the order of including
8936         32bit-linux.xml and 32bit-sse.xml.
8937         * features/i386/i386-linux.c: Regenerated.
8938
8939 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8940
8941         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
8942         Delete copy ctor and assignment operator.
8943         (tdesc_type): Likewise.
8944         (tdesc_feature): Likewise.
8945         (tdesc_free_reg): Remove.
8946         (tdesc_create_reg): Use new.
8947         (tdesc_free_type): Remove.
8948         (tdesc_create_vector): Use new.
8949         (tdesc_create_union): Likewise.
8950         (tdesc_create_flags): Likewise.
8951         (tdesc_create_enum): Likewise.
8952         (tdesc_free_feature): Delete.
8953         (free_target_description): Use delete.
8954
8955 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
8956
8957         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
8958         registers.
8959
8960 2017-06-19  Pedro Alves  <palves@redhat.com>
8961
8962         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
8963         after gdb::unlinker.
8964
8965 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
8966
8967         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
8968         gdb_environ to access an environment variable.
8969
8970 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
8971
8972         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
8973         gdb_byte*.
8974
8975 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8976
8977         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
8978
8979 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8980
8981         * configure: Re-generate.
8982         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
8983
8984 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8985
8986         * configure: Re-generate.
8987         * warning.m4: Pass -Werror to compiler when checking for
8988         supported warning flags.
8989
8990 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8991
8992         * Makefile.in (COMPILE.pre): Add "-x c++".
8993
8994 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
8995             Pedro Alves  <palves@redhat.com>
8996             Yao Qi  <yao.qi@linaro.org>
8997
8998         * defs.h (RequireLongest): New.
8999         (extract_integer): Declare function template.
9000         (extract_signed_integer): Remove the declaration, but define it
9001         static inline.
9002         (extract_unsigned_integer): Likewise.
9003         (store_integer): Declare function template.
9004         (store_signed_integer): Remove the declaration, but define it
9005         static inline.
9006         (store_unsigned_integer): Likewise.
9007         * findvar.c (extract_integer): New function template.
9008         (extract_signed_integer): Remove.
9009         (extract_unsigned_integer): Remove.
9010         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9011         instantiations.
9012         (store_integer): New function template.
9013         (store_signed_integer): Remove.
9014         (store_unsigned_integer): Remove.
9015         (store_integer): Explicit instantiations.
9016         * regcache.c (regcache_raw_read_signed): Update.
9017         (regcache::raw_read): New function.
9018         (regcache::raw_read_signed): Remove.
9019         (regcache::raw_read_unsigned): Remove.
9020         (regcache_raw_read_unsigned): Update.
9021         (regcache_raw_write_unsigned): Update.
9022         (regcache::raw_write_signed): Remove.
9023         (regcache::raw_write): New function.
9024         (regcache_cooked_read_signed): Update.
9025         (regcache::raw_write_unsigned): Remove.
9026         (regcache::cooked_read_signed): Remove.
9027         (regcache_cooked_read_unsigned): Update.
9028         (regcache::cooked_read_unsigned): Remove.
9029         (regcache_cooked_write_signed): Update.
9030         (regcache_cooked_write_unsigned): Update.
9031         * regcache.h (regcache) <raw_read_signed>: Remove.
9032         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9033         <raw_read, raw_write>: New.
9034         <cooked_read_signed, cooked_write_signed>: Remove.
9035         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9036         <cooked_read, cooked_write>: New.
9037         * sh64-tdep.c (sh64_pseudo_register_read): Update.
9038         (sh64_pseudo_register_write): Update.
9039
9040 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
9041
9042         * arc-tdep.c (arc_disassembler_options): New variable.
9043         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9044         of default_print_insn.
9045         (arc_delayed_print_insn): Set info->section when needed,
9046         use default_print_insn to retrieve a disassembler.
9047
9048 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
9049
9050         PR gdb/21574
9051         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9052         to mention $SHELL and startup-with-shell.
9053
9054 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
9055
9056         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9057
9058 2017-06-14  Yao Qi  <yao.qi@linaro.org>
9059
9060         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9061         default_print_insn instead of print_insn_aarch64.
9062         * arm-tdep.c (gdb_print_insn_arm): Call
9063         default_print_insn instead of print_insn_big_arm
9064         and print_insn_little_arm.
9065         * i386-tdep.c (i386_print_insn): Call default_print_insn
9066         instead of print_insn_i386.
9067         * ia64-tdep.c (ia64_print_insn): Call
9068         default_print_insn instead of print_insn_ia64.
9069         * mips-tdep.c (gdb_print_insn_mips): Call
9070         default_print_insn instead of print_insn_big_mips
9071         and print_insn_little_mips.
9072         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9073         instead of print_insn_spu.
9074
9075 2017-06-14  Pedro Alves  <palves@redhat.com>
9076
9077         * ada-lang.c: Include "common/byte-vector.h".
9078         (ada_value_primitive_packed_val): Use gdb::byte_vector.
9079         * charset.c (wchar_iterator::iterate): Resize the vector instead
9080         of reserving it.
9081         * common/byte-vector.h: Include "common/def-vector.h".
9082         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9083         * cli/cli-dump.c: Include "common/byte-vector.h".
9084         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9085         * common/byte-vector.h: New file.
9086         * common/def-vector.h: New file.
9087         * common/default-init-alloc.h: New file.
9088         * dwarf2loc.c: Include "common/byte-vector.h".
9089         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9090         instead of reserving it.
9091         * dwarf2read.c: Include "common/byte-vector.h".
9092         (data_buf::m_vec): Now a gdb::byte_vector.
9093         * gdb_regex.c: Include "common/def-vector.h".
9094         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9095         * mi/mi-main.c: Include "common/byte-vector.h".
9096         (mi_cmd_data_read_memory): Use gdb::byte_vector.
9097         * printcmd.c: Include "common/byte-vector.h".
9098         (print_scalar_formatted): Use gdb::byte_vector.
9099         * valprint.c: Include "common/byte-vector.h".
9100         (maybe_negate_by_bytes, print_decimal_chars): Use
9101         gdb::byte_vector.
9102
9103 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9104
9105         * darwin-nat.c: Include "nat/fork-inferior.h".
9106
9107 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9108
9109         * configure.nat: Factor out Darwin bits that are not
9110         architecture-specific.  Add fork-inferior.o.
9111
9112 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9113
9114         * configure.nat: Factor out AIX bits that are not
9115         architecture-specific.  Add fork-inferior.o.
9116
9117 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9118
9119         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
9120         (read_pieced_value, write_pieced_value): ...here.  Reduce to
9121         wrappers that just call rw_pieced_value.
9122
9123 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9124
9125         * dwarf2loc.c (write_pieced_value): When writing the data for a
9126         memory piece, use write_memory_with_notification instead of
9127         write_memory.
9128
9129 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9130
9131         * valops.c (read_value_memory): Change embedded_offset to
9132         represent a bit offset instead of a byte offset.
9133         * value.h (read_value_memory): Adjust comment.
9134
9135 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9136
9137         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9138         dest_offset_bits and source_offset_bits.
9139         (write_pieced_value): Likewise.
9140
9141 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9142
9143         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9144         given by DW_OP_bit_piece.
9145         (write_pieced_value): Likewise.
9146
9147 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9148
9149         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9150         some other preparations to the places where sufficient information
9151         is available.
9152         (write_pieced_value): Likewise.
9153
9154 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9155
9156         * dwarf2loc.c (bits_to_bytes): New function.
9157         (read_pieced_value): Fix offset calculations for register pieces
9158         on big-endian targets.
9159         (write_pieced_value): Likewise.
9160
9161 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9162
9163         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9164         (write_pieced_value): Likewise.
9165
9166 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9167
9168         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9169         transfer the source value's least significant bits, instead of its
9170         lowest-addressed ones.  Rename type_len to max_offset.
9171         (read_pieced_value): Mirror above changes to write_pieced_value as
9172         applicable.
9173
9174 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9175
9176         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9177         truncate full bytes from dest_offset_bits before using it as an
9178         offset into the buffer.
9179
9180 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9181
9182         * dwarf2loc.c (write_pieced_value): Include transfer size in
9183         byte-wise check.
9184
9185 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9186
9187         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9188         calculation of this_size.
9189
9190 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9191
9192         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9193         when targeting a bit-field.
9194         (write_pieced_value): Likewise.
9195
9196 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9197
9198         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9199         (allocate_piece_closure): Drop addr_size parameter.
9200         (dwarf2_evaluate_loc_desc_full): Adjust call to
9201         allocate_piece_closure.
9202
9203 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9204
9205         PR gdb/21226
9206         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9207         the LSB end, independent of endianness.
9208
9209 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9210
9211         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9212         size capping.
9213
9214 2017-06-13  Yao Qi  <yao.qi@linaro.org>
9215
9216         * mips-linux-nat.c: Move include features/mips*-linux.c to
9217         mips-linux-tdep.c.
9218         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9219         to mips-linux-tdep.c.
9220         * mips-linux-tdep.c: Include features/mips*-linux.c
9221         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9222         functions.
9223         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9224         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9225         (tdesc_mips64_dsp_linux): Declare.
9226
9227 2017-06-12  Tom Tromey  <tom@tromey.com>
9228
9229         * valprint.h (val_print_type_code_int): Remove.
9230         * valprint.c (generic_val_print_int): Always call
9231         val_print_scalar_formatted.
9232         (val_print_type_code_int): Remove.
9233         * printcmd.c (print_scalar_formatted): Handle options->format==0.
9234         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9235         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9236         * ada-valprint.c (ada_val_print_num): Use
9237         val_print_scalar_formatted.
9238
9239 2017-06-12  Tom Tromey  <tom@tromey.com>
9240
9241         * printcmd.c (print_scalar_formatted): Unify the two switches.
9242         Don't convert scalars to LONGEST.
9243
9244 2017-06-12  Tom Tromey  <tom@tromey.com>
9245
9246         PR exp/16225:
9247         * valprint.h (print_decimal_chars): Update.
9248         * valprint.c (maybe_negate_by_bytes): New function.
9249         (print_decimal_chars): Add "is_signed" argument.
9250         * printcmd.c (print_scalar_formatted): Update.
9251
9252 2017-06-12  Tom Tromey  <tom@tromey.com>
9253
9254         PR exp/16225:
9255         * valprint.h (print_binary_chars, print_hex_chars): Update.
9256         * valprint.c (val_print_type_code_int): Update.
9257         (print_binary_chars): Add "zero_pad" argument.
9258         (emit_octal_digit): New function.
9259         (print_octal_chars): Don't zero-pad.
9260         (print_decimal_chars): Likewise.
9261         (print_hex_chars): Add "zero_pad" argument.
9262         * sh64-tdep.c (sh64_do_fp_register): Update.
9263         * regcache.c (regcache::dump): Update.
9264         * printcmd.c (print_scalar_formatted): Update.
9265         * infcmd.c (default_print_one_register_info): Update.
9266
9267 2017-06-12  Pedro Alves  <palves@redhat.com>
9268             Alan Hayward  <alan.hayward@arm.com>
9269
9270         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9271         (mips_eabi_push_dummy_call): Rename local 'regsize' to
9272         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
9273         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9274         Assert that abi_regsize bytes fit in 'ref_valbuf'.
9275
9276 2017-06-12  Pedro Alves  <palves@redhat.com>
9277
9278         * dwarf2read.c (mapped_symtab::data): Now a vector of
9279         symtab_index_entry instead of vector of
9280         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
9281         whether an element's name is NULL instead of checking whether the
9282         element itself is NULL.
9283         (find_slot): Change return type.  Adjust.
9284         (hash_expand, , add_index_entry, uniquify_cu_indices)
9285         (write_hash_table): Adjust.
9286
9287 2017-06-12  Pedro Alves  <palves@redhat.com>
9288
9289         * dwarf2read.c (recursively_count_psymbols): New function.
9290         (write_psymtabs_to_index): Call it to compute number of psyms and
9291         pass estimate size of psyms_seen to unordered_set's ctor.
9292
9293 2017-06-12  Pedro Alves  <palves@redhat.com>
9294
9295         * dwarf2read.c (write_hash_table): Check if key already exists
9296         before emplacing.
9297
9298 2017-06-12  Pedro Alves  <palves@redhat.com>
9299
9300         * dwarf2read.c (data_buf::append_space): Rename to...
9301         (data_buf::grow): ... this, and make private.  Adjust all callers.
9302         (data_buf::append_uint): New method.
9303         (add_address_entry, write_one_signatured_type)
9304         (write_psymtabs_to_index): Use it.
9305
9306 2017-06-12  Pedro Alves  <palves@redhat.com>
9307
9308         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9309         (file_write (FILE *, const std::vector<Elem>&)): Delete.
9310         (data_buf::file_write): Call ::fwrite directly.
9311
9312 2017-06-12  Pedro Alves  <palves@redhat.com>
9313
9314         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9315         std::vector::erase.
9316
9317 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9318
9319         Code cleanup: C++ify .gdb_index producer.
9320         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9321         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9322         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9323         (create_strtab, add_string): Remove.
9324         (file_write, data_buf): New.
9325         (struct symtab_index_entry): Use std::vector for cu_indices.
9326         (struct mapped_symtab): Use std::vector for data.
9327         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9328         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9329         Remove.
9330         (find_slot): Change return type.  Update it to the new data structures.
9331         (hash_expand, add_index_entry): Update it to the new data structures.
9332         (offset_type_compare): Remove.
9333         (uniquify_cu_indices): Update it to the new data structures.
9334         (c_str_view, c_str_view_hasher, vector_hasher): New.
9335         (add_indices_to_cpool): Remove.
9336         (write_hash_table): Update it to the new data structures.
9337         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9338         (eq_psymtab_cu_index): Remove.
9339         (psym_index_map): New typedef.
9340         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9341         reference and std::unordered_map for cu_index_htab.
9342         (add_address_entry, add_address_entry_worker, write_address_map)
9343         (write_psymbols): Update it to the new data structures.
9344         (write_obstack): Remove.
9345         (struct signatured_type_index_data): Change types_list to a data_buf
9346         reference and psyms_seen to a std::unordered_set reference.
9347         (write_one_signatured_type, recursively_write_psymbols)
9348         (write_psymtabs_to_index): Update it to the new data structures.
9349
9350 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
9351
9352         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9353         separate-debug-file commands.
9354         * symfile.h (separate_debug_file_debug): New global.
9355         * symfile.c (separate_debug_file_debug): New global.
9356         (separate_debug_file_exists, find_separate_debug_file): Add
9357         debug output.
9358         (_initialize_symfile): Add "set debug separate-debug-file"
9359         command.
9360         * build-id.c (build_id_to_debug_bfd,
9361         find_separate_debug_file_by_buildid): Add debug output.
9362
9363 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
9364
9365         * gdbarch.sh (displaced_step_free_closure): Remove.
9366         * gdbarch.h, gdbarch.c: Re-generate.
9367         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9368         displaced_step_free_closure.
9369         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9370         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9371         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9372         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9373         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9374         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9375         * arch-utils.h (simple_displaced_step_free_closure): Remove.
9376         * arch-utils.c (simple_displaced_step_free_closure): Remove.
9377         * infrun.c (displaced_step_clear): Call xfree instead of
9378         gdbarch_displaced_step_free_closure.
9379
9380 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
9381
9382         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9383         NULL".
9384
9385 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
9386
9387         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9388         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9389         (mn10300_push_dummy_call): Likewise.
9390
9391 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9392
9393         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9394
9395 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9396
9397         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9398
9399 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9400
9401         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9402         able to start inferiors using a shell.
9403         (New remote packets): Announce new packet "QStartupWithShell".
9404         * remote.c: Add PACKET_QStartupWithShell.
9405         (extended_remote_create_inferior): Handle new
9406         PACKET_QStartupWithShell.
9407         (remote_protocol_features) <QStartupWithShell>: New entry for
9408         PACKET_QStartupWithShell.
9409         (_initialize_remote): Call "add_packet_config_cmd" for
9410         QStartupShell.
9411
9412 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9413             Pedro Alves  <palves@redhat.com>
9414
9415         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9416         and "nat/fork-inferior.h".
9417         * common/common-inferior.h: New file, with contents from
9418         "gdb/inferior.h".
9419         * commom/common-utils.c: Include "common-utils.h".
9420         (stringify_argv): New function.
9421         * common/common-utils.h (stringify_argv): New prototype.
9422         * configure.nat: Add "fork-inferior.o" as a dependency for
9423         "*linux*", "fbsd*" and "nbsd*" hosts.
9424         * corefile.c (get_exec_file): Update comment.
9425         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9426         instead of "startup_inferior".
9427         (darwin_create_inferior): Call "add_thread_silent" after
9428         "fork_inferior".
9429         * fork-child.c: Cleanup unnecessary includes.
9430         (SHELL_FILE): Move to "common/common-fork-child.c".
9431         (environ): Likewise.
9432         (exec_wrapper): Initialize.
9433         (get_exec_wrapper): New function.
9434         (breakup_args): Move to "common/common-fork-child.c"; rename to
9435         "breakup_args_for_exec".
9436         (escape_bang_in_quoted_argument): Move to
9437         "common/common-fork-child.c".
9438         (saved_ui): New variable.
9439         (prefork_hook): New function.
9440         (postfork_hook): Likewise.
9441         (postfork_child_hook): Likewise.
9442         (gdb_startup_inferior): Likewise.
9443         (fork_inferior): Move to "common/common-fork-child.c".  Update
9444         function to support gdbserver.
9445         (startup_inferior): Likewise.
9446         * gdbcore.h (get_exec_file): Remove declaration.
9447         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9448         instead of "startup_inferior".  Call "add_thread_silent" after
9449         "fork_inferior".
9450         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9451         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9452         instead of "startup_inferior".  Call "add_thread_silent" after
9453         "fork_inferior".
9454         * inferior.h: Include "common-inferior.h".
9455         (trace_start_error): Move to "common/common-utils.h".
9456         (trace_start_error_with_name): Likewise.
9457         (fork_inferior): Move prototype to "nat/fork-inferior.h".
9458         (startup_inferior): Likewise.
9459         (gdb_startup_inferior): New prototype.
9460         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9461         * nat/fork-inferior.h: New file.
9462         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9463         instead of "startup_inferior".  Call "add_thread_silent" after
9464         "fork_inferior".
9465         * target.h (target_terminal_init): Move prototype to
9466         "target/target.h".
9467         (target_terminal_inferior): Likewise.
9468         (target_terminal_ours): Likewise.
9469         * target/target.h (target_terminal_init): New prototype, moved
9470         from "target.h".
9471         (target_terminal_inferior): Likewise.
9472         (target_terminal_ours): Likewise.
9473         * utils.c (gdb_flush_out_err): New function.
9474
9475 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9476
9477         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9478         * common/common-gdbthread.h: New file, with parts from
9479         "gdb/gdbthread.h".
9480         * gdbthread.h: Include "common-gdbthread.h".
9481         (switch_to_thread): Moved to "common/common-gdbthread.h".
9482
9483 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9484
9485         * Makefile.in (SFILES): Add "common/job-control.c".
9486         (HFILES_NO_SRCDIR): Add "common/job-control.h".
9487         (COMMON_OBS): Add "job-control.o".
9488         * common/job-control.c: New file, with contents from
9489         "gdb/inflow.c".
9490         * common/job-control.h: New file, with contents from "terminal.h".
9491         * fork-child.c: Include "job-control.h".
9492         * inflow.c: Include "job-control.h".
9493         (gdb_setpgid): Move to "common/common-inflow.c".
9494         (_initialize_inflow): Move setting of "job_control" to
9495         "handle_job_control".
9496         * terminal.h (job_control): Moved to "common/common-terminal.h".
9497         (gdb_setpgid): Likewise.
9498         * top.c: Include "job_control.h".
9499         * utils.c: Likewise.
9500         (job_control): Moved to "job-control.c".
9501
9502 2017-06-07  Pedro Alves  <palves@redhat.com>
9503
9504         * Makefile.in (SFILES): Add gdb_regex.c.
9505         (COMMON_OBS): Add gdb_regex.o.
9506         * ada-lang.c (ada_add_standard_exceptions)
9507         (ada_add_exceptions_from_frame, name_matches_regex)
9508         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9509         parameter type to compiled_regex.  Adjust.
9510         (ada_exceptions_list): Use compiled_regex.
9511         * break-catch-throw.c (exception_catchpoint::pattern): Now a
9512         std::unique_ptr<compiled_regex>.
9513         (exception_catchpoint::~exception_catchpoint): Remove regfree
9514         call.
9515         (check_status_exception_catchpoint): Adjust to use compiled_regex.
9516         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9517         * breakpoint.c (solib_catchpoint::compiled): Now a
9518         std::unique_ptr<compiled_regex>.
9519         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9520         (check_status_catch_solib): Adjust to use compiled_regex.
9521         (add_solib_catchpoint): Adjust to use compiled_regex.
9522         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9523         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9524         compiled_regex reference.  Adjust to use it.
9525         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9526         declaration.  Include "gdb_regex.h".
9527         (apropos_cmd): Change regex parameter to compiled_regex reference.
9528         * gdb_regex.c: New file.
9529         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9530         declarations.
9531         (class compiled_regex): New.
9532         * linux-tdep.c: Include "common/gdb_optional.h".
9533         (struct mapping_regexes): New, factored out from
9534         mapping_is_anonymous_p, and adjusted to use compiled_regex.
9535         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9536         gdb::optional and remove cleanups.  Adjust to compiled_regex.
9537         * probe.c: Include "common/gdb_optional.h".
9538         (collect_probes): Use compiled_regex and gdb::optional and remove
9539         cleanups.
9540         * skip.c: Include "common/gdb_optional.h".
9541         (skiplist_entry::compiled_function_regexp): Now a
9542         gdb::optional<compiled_regex>.
9543         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9544         (free_skiplist_entry): Remove regfree call.
9545         (compile_skip_regexp, skip_rfunction_p): Adjust to use
9546         compiled_regex and gdb::optional.
9547         * symtab.c: Include "common/gdb_optional.h".
9548         (search_symbols): Use compiled_regex and gdb::optional.
9549         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9550         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
9551         to gdb_regex.c.
9552
9553 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9554
9555         * regcache.c (regcache::save): Avoid buffer use.
9556         (regcache::dump): Likewise.
9557
9558 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9559
9560         * sh-tdep.c (sh_pseudo_register_read): Remove
9561         MAX_REGISTER_SIZE.
9562         (sh_pseudo_register_write): Likewise.
9563         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9564         (sh64_pseudo_register_write): Likewise
9565
9566 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9567
9568         * aarch64-tdep.c (aarch64_store_return_value): Use
9569         V_REGISTER_SIZE.
9570         (aarch64_pseudo_read_value): Likewise.
9571         (aarch64_pseudo_write): Likewise.
9572
9573 2017-06-06  Yao Qi  <yao.qi@linaro.org>
9574
9575         * regformats/regdef.h (set_register_cache): Remove the
9576         declaration.
9577
9578 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
9579
9580         * frame.c (frame_unwind_register_signed): Use
9581         frame_unwind_register_value.
9582
9583 2017-06-06  Pedro Alves  <palves@redhat.com>
9584
9585         PR breakpoints/21553
9586         * breakpoint.c (create_breakpoints_sal_default)
9587         (init_breakpoint_sal, create_breakpoint_sal): Use
9588         gdb::unique_xmalloc_ptr for string parameters.
9589         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9590         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
9591         (base_breakpoint_create_breakpoints_sal)
9592         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9593         (strace_marker_create_breakpoints_sal)
9594         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9595         string parameters.
9596         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9597         gdb::unique_xmalloc_ptr for string parameters.
9598         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9599         parameters.
9600
9601 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9602
9603         * alpha-tdep.c (alpha_register_to_value): Use
9604         get_frame_register_value.
9605         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9606
9607 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9608
9609         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9610         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9611         (ia64_value_to_register): Likewise.
9612         (ia64_extract_return_value): Likewise.
9613         (ia64_store_return_value): Likewise.
9614         (ia64_push_dummy_call): Likewise.
9615
9616 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
9617
9618         GDB 8.0 released.
9619
9620 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
9621
9622         * x86-linux-nat.c (struct arch_lwp_info): Remove.
9623
9624 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
9625
9626         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9627         parameter.
9628         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9629
9630 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
9631
9632         * event-loop.c (poll_timers): Unallocate timer using delete
9633         instead of xfree.
9634
9635 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9636
9637         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9638         (struct breakpoint) <~breakpoint>: New.
9639         (struct watchpoint): Inherit from breakpoint.
9640         <~watchpoint>: New.
9641         <base>: Remove.
9642         (struct tracepoint): Inherit from breakpoint.
9643         <base>: Remove.
9644         * breakpoint.c (longjmp_breakpoint_ops): Remove.
9645         (struct longjmp_breakpoint): Inherit from breakpoint.
9646         <~longjmp_breakpoint>: New.
9647         <base>: Remove.
9648         (new_breakpoint_from_type): Remove casts.
9649         (watchpoint_in_thread_scope): Remove reference to base field.
9650         (watchpoint_del_at_next_stop): Likewise.
9651         (update_watchpoint): Likewise.
9652         (watchpoint_check): Likewise.
9653         (bpstat_check_watchpoint): Likewise.
9654         (set_longjmp_breakpoint): Likewise.
9655         (struct fork_catchpoint): Inherit from breakpoint.
9656         <base>: Remove.
9657         (struct solib_catchpoint): Inherit from breakpoint.
9658         <~solib_catchpoint>: New.
9659         <base>: Remove.
9660         (dtor_catch_solib): Change to ...
9661         (solib_catchpoint::~solib_catchpoint): ... this.
9662         (breakpoint_hit_catch_solib): Remove reference to base field.
9663         (add_solib_catchpoint): Likewise.
9664         (create_fork_vfork_event_catchpoint): Likewise.
9665         (struct exec_catchpoint): Inherit from breakpoint.
9666         <~exec_catchpoint>: New.
9667         <base>: Remove.
9668         (dtor_catch_exec): Change to ...
9669         (exec_catchpoint::~exec_catchpoint): ... this.
9670         (dtor_watchpoint): Change to ...
9671         (watchpoint::~watchpoint): ... this.
9672         (watch_command_1): Remove reference to base field.
9673         (catch_exec_command_1): Likewise.
9674         (base_breakpoint_dtor): Change to ...
9675         (breakpoint::~breakpoint): ... this.
9676         (base_breakpoint_ops): Remove dtor field value.
9677         (longjmp_bkpt_dtor): Change to ...
9678         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9679         (strace_marker_create_breakpoints_sal): Remove reference to base
9680         field.
9681         (delete_breakpoint): Don't manually call breakpoint destructor.
9682         (create_tracepoint_from_upload): Remove reference to base field.
9683         (trace_pass_set_count): Likewise.
9684         (initialize_breakpoint_ops): Don't initialize
9685         momentary_breakpoint_ops, don't set dtors.
9686         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9687         <~ada_catchpoint>: New.
9688         <base>: Remove.
9689         (create_excep_cond_exprs): Remove reference to base field.
9690         (dtor_exception): Change to ...
9691         (ada_catchpoint::~ada_catchpoint): ... this.
9692         (dtor_catch_exception): Remove.
9693         (dtor_catch_exception_unhandled): Remove.
9694         (dtor_catch_assert): Remove.
9695         (create_ada_exception_catchpoint): Remove reference to base
9696         field.
9697         (initialize_ada_catchpoint_ops): Don't set dtors.
9698         * break-catch-sig.c (struct signal_catchpoint): Inherit from
9699         breakpoint.
9700         <~signal_catchpoint>: New.
9701         <base>: Remove.
9702         (signal_catchpoint_dtor): Change to ...
9703         (signal_catchpoint::~signal_catchpoint): ... this.
9704         (create_signal_catchpoint): Remove reference to base field.
9705         (initialize_signal_catchpoint_ops): Don't set dtor.
9706         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
9707         from breakpoint.
9708         <~syscall_catchpoint>: New.
9709         <base>: Remove.
9710         (dtor_catch_syscall): Change to ...
9711         (syscall_catchpoint::~syscall_catchpoint): ... this.
9712         (create_syscall_event_catchpoint): Remove reference to base
9713         field.
9714         (initialize_syscall_catchpoint_ops): Don't set dtor.
9715         * break-catch-throw.c (struct exception_catchpoint): Inherit
9716         from breakpoint.
9717         <~exception_catchpoint>: New.
9718         <base>: Remove.
9719         (dtor_exception_catchpoint): Change to ...
9720         (exception_catchpoint::~exception_catchpoint): ... this.
9721         (handle_gnu_v3_exceptions): Remove reference to base field.
9722         (initialize_throw_catchpoint_ops): Don't set dtor.
9723         * ctf.c (ctf_get_traceframe_address): Remove reference to base
9724         field.
9725         * remote.c (remote_get_tracepoint_status): Likewise.
9726         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
9727         * tracefile.c (tracefile_fetch_registers): Likewise.
9728         * tracepoint.c (actions_command): Likewise.
9729         (validate_actionline): Likewise.
9730         (tfind_1): Likewise.
9731         (get_traceframe_location): Likewise.
9732         (find_matching_tracepoint_location): Likewise.
9733         (parse_tracepoint_status): Likewise.
9734         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
9735
9736 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9737
9738         * breakpoint.c (struct longjmp_breakpoint): New struct.
9739         (is_tracepoint_type): Change return type to bool.
9740         (is_longjmp_type): New function.
9741         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
9742         (set_raw_breakpoint_without_location): Use
9743         new_breakpoint_from_type.
9744         (set_raw_breakpoint): Likewise.
9745
9746 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9747
9748         * breakpoint.c (new_breakpoint_from_type): New function.
9749         (create_breakpoint_sal): Use new_breakpoint_from_type and
9750         unique_ptr.
9751         (create_breakpoint): Likewise.
9752
9753 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
9754
9755         * memattr.c (mem_info_command): Rename to ...
9756         (info_mem_command): ... this.
9757         (mem_enable_command): Rename to ...
9758         (enable_mem_command): ... this.
9759         (mem_disable_command): Rename to ...
9760         (disable_mem_command): ... this.
9761         (mem_delete_command): Rename to ...
9762         (delete_mem_command): ... this.
9763         (_initialize_mem): Adjust function names.
9764
9765 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9766
9767         * btrace.c (handle_pt_insn_events): New.
9768         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
9769         STATUS.  Split into this and ...
9770         (handle_pt_insn_event_flags): ... this.
9771
9772 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9773
9774         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
9775         and struct pt_insn.resynced.
9776         * configure: Regenerated.
9777         * config.in: Regenerated.
9778
9779 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9780
9781         * btrace.c (ftrace_find_call_by_number): New function.
9782         (ftrace_new_function): Store objects, not pointers.
9783         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
9784         ftrace_new_gap, ftrace_update_function,
9785         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
9786         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
9787         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
9788         btrace_ends_with_single_insn, btrace_call_get): Account for
9789         btrace_thread_info::functions now storing objects.
9790         * btrace.h (struct btrace_thread_info): Add constructor.
9791         (struct btrace_thread_info) <functions>: Make std::vector.
9792         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
9793         Initialize with default values.
9794         * record-btrace.c (record_btrace_frame_sniffer): Account for
9795         btrace_thread_info::functions now storing objects.
9796
9797 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9798
9799         * btrace.c: Remove typedef bfun_s.
9800         (ftrace_new_gap): Directly add gaps to the list of gaps.
9801         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
9802         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
9803         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
9804         instead of gdb VEC.
9805
9806 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9807
9808         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
9809         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
9810         with btrace_thread_info::next_segment and
9811         btrace_thread_info::prev_segment.
9812         * btrace.h: Remove struct btrace_func_link.
9813         (struct btrace_function): Replace pair of function segment pointers
9814         with pair of indices.
9815         * python/py-record-btrace.c (btpy_call_prev_sibling,
9816         btpy_call_next_sibling): Replace references to
9817         btrace_thread_info::segment with btrace_thread_info::next_segment and
9818         btrace_thread_info::prev_segment.
9819         * record-btrace.c (record_btrace_frame_this_id): Use
9820         btrace_find_call_by_number.
9821
9822 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9823
9824         * btrace.c (ftrace_new_function, ftrace_fixup_level,
9825         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9826         btrace_insn_next, btrace_insn_prev): Remove references to
9827         btrace_thread_info::flow.
9828         * btrace.h (struct btrace_function): Remove FLOW.
9829
9830 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9831
9832         * btrace.c (ftrace_find_call_by_number): New function.
9833         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
9834         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
9835         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
9836         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
9837         index.
9838         * btrace.h (struct btrace_function): Turn UP into an index.
9839         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
9840         as an index.
9841         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
9842         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
9843         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
9844
9845 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9846
9847         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9848         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9849         ftrace_update_function, ftrace_compute_global_level_offset,
9850         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
9851         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
9852         btrace_insn_end, btrace_is_empty): Remove references to
9853         btrace_thread_info::begin and btrace_thread_info::end.
9854         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
9855         (struct btrace_thread_info) <functions>: Adjust comment.
9856         * record-btrace.c (record_btrace_start_replaying): Remove reference to
9857         btrace_thread_info::begin.
9858
9859 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9860
9861         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9862         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9863         ftrace_update_function): Remove arguments that implicitly were always
9864         BTINFO->END.
9865         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
9866         Don't pass BTINFO->END.
9867
9868 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9869
9870         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
9871         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
9872         btrace_find_insn_by_number): Replace function segment pointer with
9873         index.
9874         (btrace_insn_cmp): Simplify.
9875         * btrace.h: (struct btrace_insn_iterator) Rename index to
9876         insn_index.  Replace function segment pointer with index into function
9877         segment vector.
9878         * record-btrace.c (record_btrace_call_history): Replace function
9879         segment pointer use with index.
9880         (record_btrace_frame_sniffer): Retrieve function call segment through
9881         vector.
9882         (record_btrace_set_replay): Remove defunc't safety check.
9883
9884 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9885
9886         * btrace.c (btrace_ends_with_single_insn): New function.
9887         (btrace_call_get, btrace_call_number, btrace_call_begin,
9888         btrace_call_end, btrace_call_next, btrace_call_prev,
9889         btrace_find_call_by_number): Use index into call segment vector
9890         instead of pointer.
9891         (btrace_call_cmp): Simplify.
9892         * btrace.h (struct btrace_call_iterator): Replace function call segment
9893         pointer with index into vector.
9894         * record-btrace.c (record_btrace_call_history): Use index instead of
9895         pointer.
9896
9897 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9898
9899         * btrace.c (btrace_insn_begin, btrace_insn_end,
9900         btrace_find_insn_by_number): Add btinfo to iterator.
9901         * btrace.h (struct btrace_insn_iterator): Add btinfo.
9902
9903 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9904
9905         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
9906         and save pointers directly.
9907         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
9908         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
9909         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
9910         changed signature of functions.
9911         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
9912         (btrace_fetch): Remove code that adds btrace_function pointers to
9913         vector of btrace_functions.
9914         (btrace_clear): Simplify freeing vector of btrace_functions.
9915
9916 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9917
9918         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
9919         Replace VEC_* with std::vector functions.
9920         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
9921         (struct btrace_thread_info)<functions>: Change type to std::vector.
9922
9923 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9924
9925         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
9926         "Removed targets and native configurations" up.  Merge duplicate
9927         "New commands" sub-sections.  Add "New options" sub-sections.
9928
9929 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
9930
9931         * defs.h (copy_integer_to_size): New declaration.
9932         * findvar.c (copy_integer_to_size): New function.
9933         (do_cint_test): New selftest function.
9934         (copy_integer_to_size_test): Likewise.
9935         (_initialize_findvar): Likewise.
9936         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
9937         (mips_fbsd_collect_reg): Use raw_collect_integer.
9938         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
9939         (mips64_fill_gregset): Use raw_collect_integer
9940         (mips64_fill_fpregset): Use raw_supply_integer.
9941         * regcache.c (regcache::raw_supply_integer): New function.
9942         (regcache::raw_collect_integer): Likewise.
9943         * regcache.h: (regcache::raw_supply_integer): New declaration.
9944         (regcache::raw_collect_integer): Likewise.
9945
9946 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9947
9948         * Makefile.in (SFILES): Add gdbarch-selftests.c.
9949         (COMMON_OBS): Add gdbarch-selftests.o.
9950         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
9951         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
9952         * gdbarch-selftests.c: New file.
9953         * regcache.h (regcache) <~regcache>: Mark it virtual if
9954         GDB_SELF_TEST.
9955         <raw_write>: Likewise.
9956
9957 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9958
9959         * regcache.c (current_regcache): Change it to
9960         regcache::current_regcache.
9961         (regcache_observer_target_changed): Update.
9962         (regcache_thread_ptid_changed): Make it a regcache static
9963         method.
9964         (regcache_thread_ptid_changed): Update.
9965         (class regcache_access): New.
9966         (current_regcache_test): Update.
9967         (_initialize_regcache): Update.
9968         * regcache.h: Include forward_list.
9969         (regcache): Declare regcache_thread_ptid_changed and declare
9970         registers_changed_ptid as friend.
9971
9972 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9973
9974         * i387-tdep.c (i387_register_to_value): Use register_size
9975         instead of TYPE_LENGTH.
9976         * m68k-tdep.c (m68k_register_to_value): Likewise.
9977
9978 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9979
9980         * i387-tdep.c (i387_convert_register_p): Return false if type
9981         code isn't TYPE_CODE_FLT.
9982
9983 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9984
9985         * alpha-tdep.c (alpha_convert_register_p): Return true if type
9986         length is 4.
9987         (alpha_register_to_value): Remove type length check.
9988         (alpha_value_to_register): Likewise.
9989
9990 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9991
9992         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
9993         TYPE_CODE_FLT.
9994
9995 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9996
9997         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
9998         TYPE_CODE_FLT or not.
9999
10000 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10001
10002         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10003         * avr-tdep.c (avr_gdbarch_init): Likewise.
10004         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10005         * cris-tdep.c (cris_gdbarch_init): Likewise.
10006         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10007         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10008         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10009         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10010         * mep-tdep.c (mep_gdbarch_init): Likewise.
10011         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10012         * mips-tdep.c (mips_gdbarch_init): Likewise.
10013         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10014         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10015         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10016         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10017         * v850-tdep.c (v850_gdbarch_init): Likewise.
10018
10019 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10020
10021         * selftest-arch.c (tests_with_arch): Call registers_changed
10022         and reinit_frame_cache.
10023         * selftest.c (run_self_tests): Likewise.
10024
10025 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10026
10027         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10028         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10029
10030 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10031
10032         * rl78-tdep.c (rl78_gdbarch_init): Don't call
10033         set_gdbarch_print_insn.
10034
10035 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10036
10037         * h8300-tdep.c (h8300_gdbarch_init): Don't call
10038         set_gdbarch_print_insn.
10039
10040 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10041
10042         * alpha-tdep.c (alpha_gdbarch_init): Don't call
10043         set_gdbarch_print_insn.
10044         * arc-tdep.c (arc_gdbarch_init): Likewise.
10045         * arch-utils.c: include dis-asm.h.
10046         (default_print_insn): New function.
10047         * arch-utils.h (default_print_insn): Declare.
10048         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10049         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10050         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10051         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10052         * frv-tdep.c (frv_gdbarch_init): Likewise.
10053         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10054         * gdbarch.sh (print_insn): Use default_print_insn.
10055         * gdbarch.c: Regenerated.
10056         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10057         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10058         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10059         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10060         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10061         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10062         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10063         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10064         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10065         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10066         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10067         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10068         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10069         * mt-tdep.c (mt_gdbarch_init): Likewise.
10070         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10071         * nios2-tdep.c (nios2_print_insn): Remove.
10072         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10073         * rx-tdep.c (rx_gdbarch_init): Likewise.
10074         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10075         * score-tdep.c (score_print_insn): Remove.
10076         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10077         * sh-tdep.c (sh_gdbarch_init): Likewise.
10078         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10079         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10080         * tic6x-tdep.c (tic6x_print_insn): Remove.
10081         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10082         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10083         * v850-tdep.c (v850_gdbarch_init): Likewise.
10084         * vax-tdep.c (vax_gdbarch_init): Likewise.
10085         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10086         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10087
10088 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10089
10090         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10091         (MIPS_FP0_REGNUM): Remove.
10092         (MIPS_FSR_REGNUM): Remove.
10093         (mips_fbsd_supply_fpregs): Use mips_regnum.
10094         (mips_fbsd_supply_gregs): Likewise.
10095         (mips_fbsd_collect_fpregs): Likewise.
10096         (mips_fbsd_collect_gregs): Likewise.
10097
10098 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10099
10100         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10101         (getpfpregs_supplies): New function.
10102         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10103         getfpregs_supplies.
10104         (mips_fbsd_store_inferior_registers): Likewise.
10105
10106 2017-05-22  Pedro Alves <palves@redhat.com>
10107
10108         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10109         maintainer.
10110
10111 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
10112
10113         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10114         (store_register): Likewise.
10115         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10116         (get_decimal_float_return_value): Likewise.
10117         (do_ppc_sysv_return_value): Likewise.
10118         (ppc64_sysv_abi_push_integer): Likewise.
10119         (ppc64_sysv_abi_push_freg): Likewise.
10120         (ppc64_sysv_abi_return_value_base): Likewise.
10121         (ppc64_sysv_abi_return_value): Likewise.
10122         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10123         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10124         * rs6000-nat.c: Likewise.
10125         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10126         (rs6000_value_to_register): Likewise.
10127         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10128
10129 2017-05-21  Tom Tromey  <tom@tromey.com>
10130
10131         PR rust/21466:
10132         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10133         arrays as "[T]", not "[T; ]".
10134
10135 2017-05-19  Tom Tromey  <tom@tromey.com>
10136
10137         PR rust/21484:
10138         * rust-lang.c (exp_descriptor_rust): New function.
10139         (rust_language_defn): Use it.
10140         * p-lang.c (pascal_language_defn): Update.
10141         * opencl-lang.c (opencl_language_defn): Update.
10142         * objc-lang.c (objc_language_defn): Update.
10143         * m2-lang.c (m2_language_defn): Update.
10144         * language.h (struct language_defn)
10145         <la_watch_location_expression>: New member.
10146         * language.c (unknown_language_defn, auto_language_defn)
10147         (local_language_defn): Update.
10148         * go-lang.c (go_language_defn): Update.
10149         * f-lang.c (f_language_defn): Update.
10150         * d-lang.c (d_language_defn): Update.
10151         * c-lang.h (c_watch_location_expression): Declare.
10152         * c-lang.c (c_watch_location_expression): New function.
10153         (c_language_defn, cplus_language_defn, asm_language_defn)
10154         (minimal_language_defn): Use it.
10155         * breakpoint.c (watch_command_1): Call
10156         la_watch_location_expression.
10157         * ada-lang.c (ada_language_defn): Update.
10158
10159 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10160
10161         PR tui/21482
10162         * gdb_curses.h (NOMACROS): Define.
10163         (NCURSES_NOMACROS): Define.
10164
10165 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10166
10167         PR tui/21482
10168         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10169         arg to char *.
10170         * tui/tui-wingeneral.c (box_win): Likewise.
10171         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10172         (tui_show_source_line): Likewise.
10173         (tui_show_exec_info_content): Likewise.
10174
10175 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10176
10177         * sparc-tdep.c (sparc_structure_return_p)
10178         (sparc_arg_on_registers_p): New functions.
10179         (sparc32_store_arguments): Use them.
10180         * sparc64-tdep.c (sparc64_16_byte_align_p)
10181         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10182         Handle TYPE_CODE_ARRAY.
10183
10184 2017-05-17  Yao Qi  <yao.qi@linaro.org>
10185
10186         * cli/cli-decode.c (add_alias_cmd): New function.
10187         * command.h (add_alias_cmd): Declare.
10188         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10189         instead call add_alias_cmd.
10190
10191 2017-05-17  Pedro Alves  <palves@redhat.com>
10192
10193         * Makefile.in (nat_extra_makefile_frag): Rename to ...
10194         (nat_makefile_frag): ... this.  All references updated.
10195         * configure.ac: Likewise.
10196         * configure.nat: Likewise.  Enhance comments.
10197         * configure: Regenerate.
10198
10199 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10200
10201         * procfs.c (procfs_create_inferior): Change prototype to match
10202         definition.
10203
10204 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
10205
10206         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10207         C++ compiler warning.
10208
10209 2017-05-12  Tom Tromey  <tom@tromey.com>
10210
10211         PR rust/21483:
10212         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10213         recurse, just call value_struct_elt directly.
10214
10215 2017-05-12  Tom Tromey  <tom@tromey.com>
10216
10217         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10218         OP_RUST_ARRAY>: Fix.
10219
10220 2017-05-12  Tom Tromey  <tom@tromey.com>
10221
10222         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10223
10224 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10225
10226         * regcache.c: Include <forward_list>.
10227         (struct regcache_list): Remove.
10228         (current_regcache): Update.
10229         (get_thread_arch_aspace_regcache): Update for std::forward_list.
10230         (regcache_thread_ptid_changed): Likewise.
10231         (registers_changed_ptid): Likewise.
10232         (current_regcache_size): Likewise.
10233
10234 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10235
10236         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10237         (current_regcache_size): New function.
10238         (current_regcache_test): New function.
10239         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10240
10241 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10242
10243         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10244         (print_gp_register_row): Use get_frame_register_value.
10245
10246 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10247
10248         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10249         (mips_supply_fpregset): Likewise.
10250         (mips64_supply_gregset): Likewise.
10251
10252 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10253
10254         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
10255         regcache->raw_supply_zeroed.
10256
10257 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10258
10259         * configure.nat: Rearrange 'case' statements to match
10260         host before cpu.
10261
10262 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10263
10264         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
10265         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10266         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
10267         "@nat_extra_makefile_frag@".
10268         (Makefile): Remove dependency on "@frags@".
10269         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10270         (data-directory/Makefile): Likewise.
10271         * config/aarch64/linux.mh: Deleted; moved contents to
10272         "gdb/configure.nat".
10273         * config/alpha/alpha-linux.mh: Likewise.
10274         * config/alpha/nbsd.mh: Likewise.
10275         * config/arm/linux.mh: Likewise.
10276         * config/arm/nbsdelf.mh: Likewise.
10277         * config/i386/cygwin.mh: Likewise.
10278         * config/i386/cygwin64.mh: Likewise.
10279         * config/i386/darwin.mh: Likewise.
10280         * config/i386/fbsd.mh: Likewise.
10281         * config/i386/fbsd64.mh: Likewise.
10282         * config/i386/go32.mh: Likewise.
10283         * config/i386/i386gnu.mh: Likewise.
10284         * config/i386/i386sol2.mh: Likewise.
10285         * config/i386/linux.mh: Likewise.
10286         * config/i386/linux64.mh: Likewise.
10287         * config/i386/mingw.mh: Likewise.
10288         * config/i386/mingw64.mh: Likewise.
10289         * config/i386/nbsd64.mh: Likewise.
10290         * config/i386/nbsdelf.mh: Likewise.
10291         * config/i386/nto.mh: Likewise.
10292         * config/i386/obsd.mh: Likewise.
10293         * config/i386/obsd64.mh: Likewise.
10294         * config/i386/sol2-64.mh: Likewise.
10295         * config/ia64/linux.mh: Likewise.
10296         * config/m32r/linux.mh: Likewise.
10297         * config/m68k/linux.mh: Likewise.
10298         * config/m68k/nbsdelf.mh: Likewise.
10299         * config/m68k/obsd.mh: Likewise.
10300         * config/m88k/obsd.mh: Likewise.
10301         * config/mips/fbsd.mh: Likewise.
10302         * config/mips/linux.mh: Likewise.
10303         * config/mips/nbsd.mh: Likewise.
10304         * config/mips/obsd64.mh: Likewise.
10305         * config/pa/linux.mh: Likewise.
10306         * config/pa/nbsd.mh: Likewise.
10307         * config/pa/obsd.mh: Likewise.
10308         * config/powerpc/aix.mh: Likewise.
10309         * config/powerpc/fbsd.mh: Likewise.
10310         * config/powerpc/linux.mh: Likewise.
10311         * config/powerpc/nbsd.mh: Likewise.
10312         * config/powerpc/obsd.mh: Likewise.
10313         * config/powerpc/ppc64-linux.mh: Likewise.
10314         * config/powerpc/spu-linux.mh: Likewise.
10315         * config/s390/linux.mh: Likewise.
10316         * config/sh/nbsd.mh: Likewise.
10317         * config/sparc/fbsd.mh: Likewise.
10318         * config/sparc/linux.mh: Likewise.
10319         * config/sparc/linux64.mh: Likewise.
10320         * config/sparc/nbsd64.mh: Likewise.
10321         * config/sparc/nbsdelf.mh: Likewise.
10322         * config/sparc/obsd64.mh: Likewise.
10323         * config/sparc/sol2.mh: Likewise.
10324         * config/tilegx/linux.mh: Likewise.
10325         * config/vax/nbsdelf.mh: Likewise.
10326         * config/vax/obsd.mh: Likewise.
10327         * config/xtensa/linux.mh: Likewise.
10328         * config/i386/i386gnu.mn: New file, with excerpts from
10329         "config/i386/i386gnu.mh".
10330         * configure: Regenerate.
10331         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10332         *.mh files under "gdb/config".
10333         * configure.nat: New file, with contents from the
10334         "gdb/config/*/*.mh" files.
10335
10336 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
10337
10338         * btrace.c (btrace_clear): Free insn vector.
10339
10340 2017-05-05  Pedro Alves  <palves@redhat.com>
10341
10342         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10343         * configure: Regenerate.
10344
10345 2017-05-04  Pedro Alves  <palves@redhat.com>
10346
10347         * Makefile.in (SFILES): Add progspace-and-thread.c.
10348         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10349         (COMMON_OBS): Add progspace-and-thread.o.
10350         * breakpoint.c: Include "progspace-and-thread.h".
10351         (update_inserted_breakpoint_locations)
10352         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10353         Use scoped_restore_current_pspace_and_thread.
10354         (create_std_terminate_master_breakpoint): Use
10355         scoped_restore_current_program_space.
10356         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10357         (print_breakpoint_location): Use
10358         scoped_restore_current_program_space.
10359         (bp_loc_is_permanent): Use
10360         scoped_restore_current_pspace_and_thread.
10361         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10362         (download_tracepoint_locations): Use
10363         scoped_restore_current_pspace_and_thread.
10364         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10365         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10366         (enum step_over_calls_kind): Moved from inferior.h.
10367         (class scoped_restore_current_thread): New class.
10368         * gdbthread.h (make_cleanup_restore_current_thread): Delete
10369         declaration.
10370         (scoped_restore_current_thread): New class.
10371         * infcmd.c: Include "common/gdb_optional.h".
10372         (continue_1, proceed_after_attach): Use
10373         scoped_restore_current_thread.
10374         (notice_new_inferior): Use scoped_restore_current_thread.
10375         * inferior.c: Include "progspace-and-thread.h".
10376         (restore_inferior, save_current_inferior): Delete.
10377         (add_inferior_command, clone_inferior_command): Use
10378         scoped_restore_current_pspace_and_thread.
10379         * inferior.h (scoped_restore_current_inferior): New class.
10380         * infrun.c: Include "progspace-and-thread.h" and
10381         "common/gdb_optional.h".
10382         (follow_fork_inferior): Use
10383         scoped_restore_current_pspace_and_thread.
10384         (scoped_restore_exited_inferior): New class.
10385         (handle_vfork_child_exec_or_exit): Use
10386         scoped_restore_exited_inferior,
10387         scoped_restore_current_pspace_and_thread,
10388         scoped_restore_current_thread and scoped_restore.
10389         (fetch_inferior_event): Use scoped_restore_current_thread.
10390         * linespec.c (decode_line_full, decode_line_1): Use
10391         scoped_restore_current_program_space.
10392         * mi/mi-main.c: Include "progspace-and-thread.h".
10393         (exec_continue): Use scoped_restore_current_thread.
10394         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10395         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10396         * proc-service.c (ps_pglobal_lookup): Use
10397         scoped_restore_current_program_space.
10398         * progspace-and-thread.c: New file.
10399         * progspace-and-thread.h: New file.
10400         * progspace.c (release_program_space, clone_program_space): Use
10401         scoped_restore_current_program_space.
10402         (restore_program_space, save_current_program_space)
10403         (save_current_space_and_thread): Delete.
10404         (switch_to_program_space_and_thread): Moved to
10405         progspace-and-thread.c.
10406         * progspace.h (save_current_program_space)
10407         (save_current_space_and_thread): Delete declarations.
10408         (scoped_restore_current_program_space): New class.
10409         * remote.c (remote_btrace_maybe_reopen): Use
10410         scoped_restore_current_thread.
10411         * symtab.c: Include "progspace-and-thread.h".
10412         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10413         * thread.c (print_thread_info_1): Use
10414         scoped_restore_current_thread.
10415         (struct current_thread_cleanup): Delete.
10416         (do_restore_current_thread_cleanup)
10417         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10418         (scoped_restore_current_thread::~scoped_restore_current_thread):
10419         ... this new dtor.
10420         (make_cleanup_restore_current_thread): Rename/convert to ...
10421         (scoped_restore_current_thread::scoped_restore_current_thread):
10422         ... this new ctor.
10423         (thread_apply_all_command): Use scoped_restore_current_thread.
10424         (thread_apply_command): Use scoped_restore_current_thread.
10425         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10426         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10427
10428 2017-05-04  Pedro Alves  <palves@redhat.com>
10429
10430         * thread.c (make_cleanup_restore_current_thread): Move
10431         find_thread_ptid call before the is_stopped call.  Assert that the
10432         thread is found.  Replace is_stopped call by checking the thread's
10433         state directly.  Remove unnecessary NULL-thread check.
10434
10435 2017-05-04  Pedro Alves  <palves@redhat.com>
10436
10437         * corelow.c (thread_section_name): New class.
10438         (get_core_register_section, get_core_siginfo): Use it.
10439
10440 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10441
10442         * corelow.c (sniff_core_bfd): Remove extra semicolon.
10443         (get_core_register_section): Remove xfree of NULL pointer.
10444
10445 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
10446
10447         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10448         * regcache.c (regcache::raw_supply_zeroed): New function.
10449         * regcache.h (regcache::raw_supply_zeroed): New declaration.
10450
10451 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10452
10453         * gdbarch.sh: Remove commented out definition of
10454         TARGET_CHAR_BIT.
10455         * gdbarch.h: Re-generate.
10456
10457 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
10458
10459         * configure: Regenerate.
10460
10461 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
10462
10463         * solib-target.c (solib_target_relocate_section_addresses):
10464         Remove num_section_bases, num_bases, segment_bases variables.
10465
10466 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10467
10468         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10469
10470 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10471
10472         * solib-target.c: Include <vector>
10473         (struct lm_info_target) <~lm_info_target>: Remove.
10474         <segment_bases, section_bases>: Change type to
10475         std::vector<CORE_ADDR>.
10476         (library_list_start_segment, library_list_start_section,
10477         library_list_end_library,
10478         solib_target_relocate_section_addresses): Adjust.
10479
10480 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10481
10482         * gdbarch.sh (software_single_step): Change return type to
10483         std::vector<CORE_ADDR>.
10484         * gdbarch.c, gdbarch.h: Re-generate.
10485         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10486         Adjust.
10487         (arm_deal_with_atomic_sequence_raw): Adjust.
10488         (thumb_get_next_pcs_raw): Adjust.
10489         (arm_get_next_pcs_raw): Adjust.
10490         (arm_get_next_pcs): Adjust.
10491         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10492         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10493         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10494         (alpha_software_single_step): Adjust.
10495         * alpha-tdep.h (alpha_software_single_step): Adjust.
10496         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10497         * arm-tdep.c (arm_software_single_step): Adjust.
10498         (arm_breakpoint_kind_from_current_state): Adjust.
10499         * arm-tdep.h (arm_software_single_step): Adjust.
10500         * breakpoint.c (insert_single_step_breakpoint): Adjust.
10501         * cris-tdep.c (cris_software_single_step): Adjust.
10502         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10503         (micromips_deal_with_atomic_sequence): Adjust.
10504         (deal_with_atomic_sequence): Adjust.
10505         (mips_software_single_step): Adjust.
10506         * mips-tdep.h (mips_software_single_step): Adjust.
10507         * moxie-tdep.c (moxie_software_single_step): Adjust.
10508         * nios2-tdep.c (nios2_software_single_step): Adjust.
10509         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10510         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10511         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10512         * s390-linux-tdep.c (s390_software_single_step): Adjust.
10513         * sparc-tdep.c (sparc_software_single_step): Adjust.
10514         * spu-tdep.c (spu_software_single_step): Adjust.
10515         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10516
10517 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10518
10519         * gdbarch.sh: Use semi-colon as field separator instead of colon.
10520         * gdbarch.h: Re-generate.
10521
10522 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10523
10524         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10525         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10526         * python/py-instruction.c, python/py-instruction.h: New file.
10527         * python/py-record.c: Add py-instruction.h include.
10528         (gdbpy_initialize_record): Make gdb.Instruction a super class of
10529         gdb.RecordInstruction.
10530         * python/python-internal.h: Add gdbpy_initialize_instruction
10531         declaration.
10532         * python/python.c (do_start_initialization): Add
10533         gdbpy_initialize_instruction.
10534
10535 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10536
10537         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10538         Remove.
10539         (btrace_func_from_recpy_func): New function.
10540         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10541         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10542         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10543         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10544         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10545         Also, use new helper functions.
10546         (btpy_list_item): Use new helper functions.
10547         (recpy_bt_function_call_history): Use new type name.
10548         (btpy_call_getset): Remove.
10549         (gdbpy_initialize_btrace): Remove code to initialize
10550         gdb.BtraceFunctionCall.
10551         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10552         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10553         recpy_bt_func_prev, recpy_bt_func_next): New export.
10554         * python/py-record.c (recpy_func_type): New static object.
10555         (recpy_func_new, recpy_func_level, recpy_func_symbol,
10556         recpy_func_instructions, recpy_func_up, recpy_func_prev,
10557         recpy_func_next): New function.
10558         (recpy_element_hash, recpy_element_richcompare): Updated comment.
10559         (recpy_func_getset): New static object.
10560         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10561         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10562
10563 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10564
10565         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10566         (btpy_object, btpy_insn_type, btpy_new): Remove.
10567         (btpy_list_object): Use gdb.RecordInstruction type instead of
10568         gdb.BtraceInstruction type.
10569         (btrace_insn_from_recpy_insn): New function.
10570         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10571         btpy_new.
10572         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10573         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10574         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10575         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10576         instead of btpy_object.
10577         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10578         btpy_insn_data, btpy_insn_decode): Rename to ...
10579         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10580         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10581         recpy_bt_insn_decode): This.  Also, use new helper functions.
10582         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10583         recpy_insn_type.
10584         (btpy_insn_getset): Remove.
10585         (gdbpy_initialize_btrace): Remove code to initialize
10586         gdb.BtraceInstruction.  Use recpy_element_object.
10587         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10588         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10589         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10590         * python/py-record.c (recpy_insn_type): New static object.
10591         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10592         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10593         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10594         New function.
10595         (recpy_insn_getset): New static object.
10596         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10597         * python/py-record.h (recpy_element_object): New typedef.
10598         (recpy_insn_type, recpy_insn_new): New export.
10599
10600 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10601
10602         * py-record-btrace.c (btpy_insn_new): Removed.
10603         (btpy_insn_or_gap_new): New function.
10604         (btpy_insn_error): Removed.
10605         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10606         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10607         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10608         btpy_insn_or_gap_new instead of btpy_insn_new.
10609         (btpy_insn_getset): Remove btpy_insn_error.
10610         * py-record.c (recpy_gap_type): New static object.
10611         (recpy_gap_object): New typedef.
10612         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10613         recpy_gap_reason_string): New function.
10614         (recpy_gap_getset): New static object.
10615         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10616         * py-record.h (recpy_gap_new): New export.
10617
10618 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10619
10620         * python/py-record.c (recpy_ptid): Remove.
10621         (recpy_record_getset): Remove recpy_ptid.
10622
10623 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10624
10625         * btrace.c (btrace_fetch): Set inferior_ptid.
10626         * python/py-record-btrace.c: Add "py-record.h" include.
10627         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10628         recpy_bt_end, recpy_bt_instruction_history,
10629         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10630         in gdb.Record object instead of current ptid.
10631         * python/py-record.c: Include new "py-record.h" file.
10632         (recpy_record_object): Moved to py-record.h.
10633         * python/py-record.h: New file.
10634
10635 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10636
10637         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10638         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10639         indentation.
10640
10641 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
10642
10643         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10644         the past maintainers section.
10645
10646 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10647
10648         * infcmd.c (get_return_value): Use regcache ctor, and remove
10649         cleanup.
10650
10651 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10652             Pedro Alves  <palves@redhat.com>
10653
10654         * regcache.c (regcache::regcache): New tag dispatch ctor.
10655         (do_cooked_read): Moved above.
10656         (regcache_dup): Use the tag dispatch ctor..
10657         * regcache.h (regcache): Declare ctor, delete copy ctor and
10658         assignment operator, remove friend regcache_dup.
10659
10660 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10661
10662         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10663         call method save instead of regcache_cpy.
10664         * regcache.h (struct regcache): Make regcache_dup a friend.
10665
10666 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10667
10668         * regcache.c (struct regcache): Move to regcache.h
10669         (regcache::arch): New method.
10670         (regcache_get_ptid): Update.
10671         (get_regcache_arch): Call arch method.
10672         (get_regcache_aspace): Call method aspace.
10673         (register_buffer): Change it to method.
10674         (regcache_save): Change it to regcache::save.
10675         (regcache_restore): Likewise.
10676         (regcache_cpy_no_passthrough): Remove the declaration.
10677         (regcache_cpy): Call methods restore and cpy_no_passthrough.
10678         (regcache_cpy_no_passthrough): Change it to method
10679         cpy_no_passthrough.
10680         (regcache_register_status): Change it to method
10681         get_register_status.
10682         (regcache_invalidate): Change it to method invalidate.
10683         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10684         (regcache_raw_update): Change it to method raw_update.
10685         (regcache_raw_read): Likewise.
10686         (regcache_raw_read_signed): Likewise.
10687         (regcache_raw_read_unsigned): Likewise.
10688         (regcache_raw_write_signed): Likewise.
10689         (regcache_raw_write_unsigned): Likewise.
10690         (regcache_cooked_read): Likewise.
10691         (regcache_cooked_read_value): Likewise.
10692         (regcache_cooked_read_signed): Likewise.
10693         (regcache_cooked_read_unsigned): Likewise.
10694         (regcache_cooked_write_signed): Likewise.
10695         (regcache_cooked_write_unsigned): Likewise.
10696         (regcache_raw_set_cached_value): Likewise.
10697         (regcache_raw_write): Likewise.
10698         (regcache_cooked_write): Likewise.
10699         (regcache_xfer_part): Likewise.
10700         (regcache_raw_read_part): Likewise.
10701         (regcache_raw_write_part): Likewise.
10702         (regcache_cooked_read_part): Likewise.
10703         (regcache_cooked_write_part): Likewise.
10704         (regcache_raw_supply): Likewise.
10705         (regcache_raw_collect): Likewise.
10706         (regcache_transfer_regset): Likewise.
10707         (regcache_supply_regset): Likewise.
10708         (regcache_collect_regset): Likewise.
10709         (regcache_debug_print_register): Likewise.
10710         (enum regcache_dump_what): Move it to regcache.h.
10711         (regcache_dump): Change it to method dump.
10712         * regcache.h (enum regcache_dump_what): New.
10713         (class regcache): New.
10714         * target.c (target_fetch_registers): Call method
10715         debug_print_register.
10716         (target_store_registers): Likewise.
10717
10718 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10719
10720         * windows-nat.c (struct lm_info_windows): Initialize field.
10721         (windows_make_so): Allocate lm_info_windows with new.
10722         (windows_free_so): Free lm_info_windows with delete.
10723
10724 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10725
10726         * solib-darwin.c (struct lm_info_darwin): Initialize field.
10727         (darwin_current_sos): Allocate lm_info_darwin with new, remove
10728         cleanup.
10729         (darwin_free_so): Free lm_info_darwin with delete.
10730
10731 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10732
10733         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
10734         <l_addr_p>: Change type to bool.
10735         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
10736         (svr4_free_so): Free lm_info_svr4 with delete.
10737         (svr4_copy_library_list): Replace memcpy with call to copy
10738         constructor.
10739         (library_list_start_library, svr4_default_sos): Allocate
10740         lm_info_svr4 with new.
10741
10742 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10743
10744         * solib-target.c (struct lm_info_target): Add destructor,
10745         initialize fields.
10746         <name>: Change type to std::string.
10747         (library_list_start_library): Allocate lm_info_target with new.
10748         (solib_target_free_library_list): Free lm_info_target with
10749         delete.
10750         (solib_target_current_sos): Adapt to std::string.
10751         (solib_target_free_so): Free lm_info_target with delete.
10752
10753 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10754
10755         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
10756         fields.
10757         (frv_current_sos): Allocate lm_info_frv with new.
10758         (frv_relocate_main_executable): Free lm_info_frv with delete,
10759         allocate with new.
10760         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
10761
10762 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10763
10764         * solib-frv.c (struct lm_info_frv): Fix indentation.
10765
10766 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10767
10768         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
10769         map field.
10770         (dsbt_current_sos): Allocate lm_info_dsbt with new.
10771         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
10772         and allocate with new.
10773         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
10774
10775 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10776
10777         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
10778         <filename, member_name>: Change type to std::string.
10779         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
10780         (library_list_start_library): Allocate lm_info_aix with new.
10781         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
10782         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
10783         with copy constructor.
10784
10785 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10786
10787         * solist.h (struct lm_info): Remove.
10788         (struct lm_info_base): New class.
10789         (struct so_list) <lm_info>: Change type to lm_info_base *.
10790         * nto-tdep.c (struct lm_info): Remove.
10791         (lm_addr): Adjust.
10792         * solib-aix.c (struct lm_info): Rename to ...
10793         (struct lm_info_aix): ... this.  Extend lm_info_base.
10794         (lm_info_p): Rename to ...
10795         (lm_info_aix_p): ... this, and adjust.
10796         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
10797         solib_aix_parse_libraries, library_list_start_library,
10798         solib_aix_free_library_list, solib_aix_parse_libraries,
10799         solib_aix_get_library_list,
10800         solib_aix_relocate_section_addresses, solib_aix_free_so,
10801         solib_aix_get_section_offsets,
10802         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
10803         Adjust.
10804         (struct solib_aix_inferior_data) <library_list>: Adjust.
10805         * solib-darwin.c (struct lm_info): Rename to ...
10806         (struct lm_info_darwin): ... this.  Extend lm_info_base.
10807         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
10808         * solib-dsbt.c (struct lm_info): Rename to ...
10809         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
10810         (struct dsbt_info) <main_executable_lm_info): Adjust.
10811         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
10812         dsbt_relocate_section_addresses): Adjust.
10813         * solib-frv.c (struct lm_info): Rename to ...
10814         (struct lm_info_frv): ... this.  Extend lm_info_base.
10815         (main_executable_lm_info): Adjust.
10816         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
10817         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
10818         find_canonical_descriptor_in_load_object,
10819         frv_fdpic_find_canonical_descriptor): Adjust.
10820         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10821         to lm_info_svr4.
10822         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10823         svr4_clear_so, svr4_copy_library_list,
10824         library_list_start_library, svr4_default_sos, svr4_read_so_list,
10825         svr4_current_sos, svr4_fetch_objfile_link_map,
10826         solist_update_incremental): Adjust.
10827         * solib-svr4.h (struct lm_info_svr4): Move here from
10828         solib-svr4.c.
10829         * solib-target.c (struct lm_info): Rename to ...
10830         (struct lm_info_target): ... this.  Extend lm_info_base.
10831         (lm_info_p): Rename to ...
10832         (lm_info_target_p): ... this.
10833         (solib_target_parse_libraries, library_list_start_segment,
10834         library_list_start_section, library_list_start_library,
10835         library_list_end_library, solib_target_free_library_list,
10836         solib_target_current_sos, solib_target_free_so,
10837         solib_target_relocate_section_addresses): Adjust.
10838         * windows-nat.c (struct lm_info): Rename to ...
10839         (struct lm_info_windows): ... this.  Extend lm_info_base.
10840         (windows_make_so, handle_load_dll, handle_unload_dll,
10841         windows_xfer_shared_libraries): Adjust.
10842
10843 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10844
10845         * solib-darwin.c (struct darwin_so_list): Remove.
10846         (darwin_current_sos): Allocate an so_list object instead of a
10847         darwin_so_list, separately allocate an lm_info object.
10848         (darwin_free_so): Free lm_info.
10849
10850 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
10851
10852         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
10853         with fprintf_filtered.
10854
10855 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10856
10857         * regcache.c (regcache::regcache): New function.
10858         (regcache::~regcache): New function.
10859         (regcache_xmalloc_1): Remove.
10860         (regcache_xmalloc): Call new regcache.
10861         (regcache_xfree): Call delete regcache.
10862         (get_thread_arch_aspace_regcache): Call new regcache.
10863
10864 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10865
10866         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
10867         lwp instead of ptid_get_lwp.
10868
10869 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10870
10871         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
10872         lwp_info instead of getting from inferior_ptid.
10873
10874 2017-04-27  Keith Seitz  <keiths@redhat.com>
10875
10876         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
10877         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
10878         (CV_CONVERSION_BADNESS): Define.
10879         (rank_one_type): Remove overly restrictive rvalue reference
10880         rank checks.
10881         Add cv-qualifier checks and subranks for type equality.
10882         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
10883         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
10884         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
10885
10886 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
10887
10888         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
10889         count when creating the object.
10890
10891 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
10892             Ulrich Weigand  <uweigand@de.ibm.com>
10893
10894         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
10895         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
10896         is used in AIX.
10897         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
10898         (process_xcoff_symbol): Likewise.
10899         (scan_xcoff_symtab): Likewise.
10900
10901 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10902
10903         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
10904         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
10905         (ia64_access_reg): Use get_frame_register_unsigned.
10906         (ia64_access_rse_reg): Likewise.
10907         (ia64_libunwind_frame_prev_register): Likewise.
10908
10909 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
10910
10911         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
10912         * gdbarch.c: Regenerated.
10913         * gdbarch.h: Regenerated.
10914         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
10915         visibility external.
10916         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
10917         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
10918         (enum cfa_how_kind): Move to ...
10919         (struct dwarf2_frame_state_reg_info): Likewise.
10920         (struct dwarf2_frame_state): Likewise.
10921         * dwarf2-frame.h: ... here.
10922         (dwarf2_frame_state_alloc_regs): New declaration.
10923         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
10924         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
10925
10926 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10927
10928         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
10929         regcache_raw_read_unsigned.
10930         (xtensa_pseudo_register_write): Likewise.
10931
10932 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10933
10934         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
10935         (nds32_pseudo_register_write): Likewise.
10936
10937 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10938
10939         * regcache.c (struct regcache) <readonly_p>: Change its type
10940         to bool.
10941         (regcache_xmalloc_1): Update parameter type and callers update.
10942
10943 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10944
10945         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
10946         set_gdbarch_wchar_bit.
10947         * arm-tdep.c (arm_gdbarch_init): Likewise.
10948
10949 2017-04-25  Pedro Alves  <palves@redhat.com>
10950
10951         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
10952         (BothAreRelocatable, memcopy, memmove): Don't define.
10953         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
10954         macros.
10955
10956 2017-04-25  Pedro Alves  <palves@redhat.com>
10957
10958         * common/common-defs.h: Include "common/poison.h".
10959         * common/function-view.h: (Not, Or, Requires): Move to traits.h
10960         and adjust.
10961         * common/poison.h: New file.
10962         * common/traits.h: Include <type_traits>.
10963         (Not, Or, Requires): New, moved from common/function-view.h.
10964
10965 2017-04-25  Pedro Alves  <palves@redhat.com>
10966
10967         * breakpoint.h (struct breakpoint): In-class initialize all
10968         fields.  Make boolean fields "bool".
10969         * breakpoint.c (init_raw_breakpoint_without_location): Remove
10970         memset call and initializations no longer necessary.
10971
10972 2017-04-25  Pedro Alves  <palves@redhat.com>
10973
10974         * btrace.c (pt_btrace_insn_flags): Change parameter type to
10975         reference.
10976         (pt_btrace_insn): New function.
10977         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
10978
10979 2017-04-25  Pedro Alves  <palves@redhat.com>
10980
10981         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
10982         "base" field and inherit from "bp_location" instead.  Add
10983         non-default ctor.
10984         (allocate_location_exception): Use new non-default ctor.
10985         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
10986         (init_bp_location): Convert to ...
10987         (bp_location::bp_location): ... this new ctor, and remove memset
10988         call.
10989         (base_breakpoint_allocate_location): Use the new non-default ctor.
10990         * breakpoint.h (bp_location): Now a class.  Declare default and
10991         non-default ctors.  In-class initialize all members.
10992         (init_bp_location): Remove declaration.
10993
10994 2017-04-25  Pedro Alves  <palves@redhat.com>
10995
10996         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
10997         assignment operator.
10998
10999 2017-04-24  Yao Qi  <yao.qi@linaro.org>
11000
11001         * doublest.c (convert_doublest_to_floatformat): Call
11002         floatformat_totalsize_bytes.
11003
11004 2017-04-22  Tom Tromey  <tom@tromey.com>
11005
11006         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11007         ui_out_emit_list.
11008         * stack.c (print_frame): Use ui_out_emit_list.
11009         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11010         ui_out_emit_list.
11011         * mi/mi-main.c (print_one_inferior)
11012         (mi_cmd_data_list_register_names)
11013         (mi_cmd_data_list_register_values, mi_cmd_list_features)
11014         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11015         ui_out_emit_list.
11016         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11017         (mi_output_solib_attribs): Use ui_out_emit_list,
11018         ui_out_emit_tuple.
11019         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11020         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11021         (mi_cmd_stack_list_args, list_args_or_locals): Use
11022         ui_out_emit_list.
11023         * disasm.c (do_assembly_only): Use ui_out_emit_list.
11024         * breakpoint.c (print_solib_event, output_thread_groups): Use
11025         ui_out_emit_list.
11026
11027 2017-04-22  Tom Tromey  <tom@tromey.com>
11028
11029         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11030         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11031         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11032
11033 2017-04-22  Tom Tromey  <tom@tromey.com>
11034
11035         * tracepoint.c (tvariables_info_1)
11036         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11037
11038 2017-04-22  Tom Tromey  <tom@tromey.com>
11039
11040         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11041         annotate_arg_emitter.
11042         * breakpoint.c (print_mention_watchpoint)
11043         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11044         * annotate.h (struct annotate_arg_emitter): New.
11045
11046 2017-04-22  Tom Tromey  <tom@tromey.com>
11047
11048         * record-btrace.c (record_btrace_insn_history)
11049         (record_btrace_insn_history_range, record_btrace_call_history)
11050         (record_btrace_call_history_range): Use ui_out_emit_tuple.
11051         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11052         ui_out_emit_tuple.
11053         * stack.c (print_frame_info): Use ui_out_emit_tuple.
11054         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11055         * skip.c (skip_info): Use ui_out_emit_tuple.
11056         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11057         * progspace.c (print_program_space): Use ui_out_emit_tuple.
11058         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11059         * osdata.c (info_osdata): Use ui_out_emit_tuple.
11060         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11061         ui_out_emit_tuple.
11062         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11063         (output_register, mi_cmd_data_read_memory)
11064         (mi_cmd_data_read_memory_bytes, mi_load_progress)
11065         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11066         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11067         Use ui_out_emit_tuple.
11068         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11069         ui_out_emit_tuple.
11070         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11071         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11072         * linux-thread-db.c (info_auto_load_libthread_db): Use
11073         ui_out_emit_tuple.
11074         * inferior.c (print_inferior): Use ui_out_emit_tuple.
11075         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11076         * disasm.c (do_mixed_source_and_assembly_deprecated)
11077         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11078         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11079         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11080         * breakpoint.c (print_one_breakpoint_location)
11081         (print_one_breakpoint): Use ui_out_emit_tuple.
11082         * auto-load.c (print_script, info_auto_load_cmd): Use
11083         ui_out_emit_tuple.
11084         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11085
11086 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
11087
11088         * thread.c (print_thread_info_1): Remove dead code.
11089
11090 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11091
11092         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11093         GDB_SELF_TEST.
11094         * arm-tdep.c (selftests::arm_record_test): Likewise.
11095
11096 2017-04-21  Yao Qi  <yao.qi@linaro.org>
11097
11098         * regcache.c (regcache_restore): Remove argument 2.  Replace
11099         argument 3 with regcache.  Get register status from
11100         src->register_status and get register contents from
11101         register_buffer (src, regnum).
11102         (regcache_cpy): Update.
11103
11104 2017-04-19  Pedro Alves  <palves@redhat.com>
11105
11106         * gdbthread.h (thread): Add missing closing parenthesis in
11107         comment.
11108
11109 2017-04-19  Pedro Alves  <palves@redhat.com>
11110
11111         * common/refcounted-object.h: New file.
11112         * gdbthread.h: Include "common/refcounted-object.h".
11113         (thread_info): Inherit from refcounted_object and add comments.
11114         (thread_info::incref, thread_info::decref)
11115         (thread_info::m_refcount): Delete.
11116         (thread_info::deletable): Use the refcounted_object::refcount()
11117         method.
11118         * inferior.c (current_inferior_): Add comment.
11119         (set_current_inferior): Increment/decrement refcounts.
11120         (prune_inferiors, remove_inferior_command): Skip inferiors marked
11121         not-deletable instead of comparing with the current inferior.
11122         (initialize_inferiors): Increment the initial inferior's refcount.
11123         * inferior.h (struct inferior): Forward declare.
11124         Include "common/refcounted-object.h".
11125         (current_inferior, set_current_inferior): Move declaration to
11126         before struct inferior's definition, and fix comment.
11127         (inferior): Inherit from refcounted_object.  Add comments.
11128         * thread.c (switch_to_thread_no_regs): Reference the thread's
11129         inferior pointer directly instead of doing a ptid lookup.
11130         (switch_to_no_thread): New function.
11131         (switch_to_thread(thread_info *)): New function, factored out
11132         from ...
11133         (switch_to_thread(ptid_t)): ... this.
11134         (restore_current_thread): Delete.
11135         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11136         fields, and add 'inf' field.
11137         (do_restore_current_thread_cleanup): Check whether old->inf is
11138         alive instead of looking up an inferior by ptid.  Use
11139         switch_to_thread and switch_to_no_thread.
11140         (restore_current_thread_cleanup_dtor): Use old->inf directly
11141         instead of lookup up an inferior by id.  Decref the inferior.
11142         Don't restore 'removable'.
11143         (make_cleanup_restore_current_thread): Same the inferior pointer
11144         in old, instead of the inferior number.  Incref the inferior.
11145         Don't save/clear 'removable'.
11146
11147 2017-04-19  Pedro Alves  <palves@redhat.com>
11148
11149         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11150         unittests/scoped_restore-selftests.c.
11151         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11152         * common/scoped_restore.h (scoped_restore_base): Make "class".
11153         (scoped_restore_base::release): New public method.
11154         (scoped_restore_base::scoped_restore_base): New protected ctor.
11155         (scoped_restore_base::m_saved_var): New protected field.
11156         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11157         scoped_restore_base base class instead of m_saved_var directly.
11158         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11159         (scoped_restore_tmpl::scoped_restore_tmpl(const
11160         scoped_restore_tmpl<T>&)): Likewise.
11161         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11162         method.
11163         (scoped_restore_tmpl::saved_var): New method.
11164         (scoped_restore_tmpl::m_saved_var): Delete.
11165         * inferior.h (inferior::detaching): Now a bool.
11166         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11167         cleanup.
11168         * unittests/scoped_restore-selftests.c: New file.
11169
11170 2017-04-19  Pedro Alves  <palves@redhat.com>
11171
11172         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11173         Re-sort in alphabetic order.
11174
11175 2017-04-18  Pedro Alves  <palves@redhat.com>
11176
11177         * xml-support.c (obstack_xml_printf): Delete.
11178         * xml-support.h (obstack_xml_printf): Delete.
11179
11180 2017-04-18  Pedro Alves  <palves@redhat.com>
11181
11182         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11183         vdebug, verror, body_text, start_element, end_element, name,
11184         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11185         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11186         is_xinclude>: Make private and add m_ prefix.
11187         (gdb_xml_parser::body_text): New method, based on ...
11188         (gdb_xml_body_text): ... this.  Adjust.
11189         (gdb_xml_parser::vdebug): New method, based on ...
11190         (gdb_xml_debug): ... this.  Adjust.
11191         (gdb_xml_parser::verror): New method, based on ...
11192         (gdb_xml_error): ... this.  Adjust.
11193         (gdb_xml_parser::start_element): New method, based on ...
11194         (gdb_xml_start_element): ... this.  Adjust.
11195         (gdb_xml_start_element_wrapper): Defer to
11196         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11197         (gdb_xml_parser::end_element): New method, based on ...
11198         (gdb_xml_end_element_wrapper): ... this.  Adjust.
11199         (gdb_xml_parser::~gdb_xml_parser): Adjust.
11200         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11201         (gdb_xml_parser::use_dtd): New method, based on ...
11202         (gdb_xml_use_dtd): ... this.  Adjust.
11203         (gdb_xml_parser::parse): New method, based on ...
11204         (gdb_xml_parse): ... this.  Adjust.
11205         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11206         (xinclude_start_include): Adjust to call the parser's name method.
11207         (xml_xinclude_default, xml_xinclude_start_doctype)
11208         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11209         method.
11210         (xml_process_xincludes): Adjust to call parser methods.
11211         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11212         declarations.
11213
11214 2017-04-18  Pedro Alves  <palves@redhat.com>
11215
11216         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11217         gdb::optional<std::string>.
11218         * xml-support.c: Include <string>.
11219         (scope_level::scope_level(scope_level &&))
11220         (scope_level::~scope_level): Delete.
11221         (scope_level::body): Now a std::string.
11222         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11223         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11224         parameter.
11225         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11226         (xinclude_parsing_data::output): Now a std::string reference.
11227         (xinclude_start_include): Adjust.
11228         (xml_xinclude_default): Adjust.
11229         (xml_process_xincludes): Add 'output' parameter, and return bool.
11230         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11231         and return bool.
11232         * xml-tdesc.c: Include <unordered_map> and <string>.
11233         (tdesc_xml_cache): Delete.
11234         (tdesc_xml_cache_s): Delete.
11235         (xml_cache): Now an std::unordered_map.
11236         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11237         (target_fetch_description_xml): Change return type to
11238         gdb::optional<std::string>, and adjust.
11239         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11240         (target_fetch_description_xml): Change return type to
11241         gdb::optional<std::string>.
11242
11243 2017-04-18  Pedro Alves  <palves@redhat.com>
11244
11245         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11246         unittests/optional-selftests.c.
11247         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11248         * unittests/optional-selftests.c: New file.
11249         * unittests/optional/assignment/1.cc: New file.
11250         * unittests/optional/assignment/2.cc: New file.
11251         * unittests/optional/assignment/3.cc: New file.
11252         * unittests/optional/assignment/4.cc: New file.
11253         * unittests/optional/assignment/5.cc: New file.
11254         * unittests/optional/assignment/6.cc: New file.
11255         * unittests/optional/assignment/7.cc: New file.
11256         * unittests/optional/cons/copy.cc: New file.
11257         * unittests/optional/cons/default.cc: New file.
11258         * unittests/optional/cons/move.cc: New file.
11259         * unittests/optional/cons/value.cc: New file.
11260         * unittests/optional/in_place.cc: New file.
11261         * unittests/optional/observers/1.cc: New file.
11262         * unittests/optional/observers/2.cc: New file.
11263
11264 2017-04-18  Pedro Alves  <palves@redhat.com>
11265
11266         * common/gdb_optional.h: Include common/traits.h.
11267         (in_place_t): New type.
11268         (in_place): New constexpr variable.
11269         (optional::optional): Remove member initialization of
11270         m_instantiated.
11271         (optional::optional(in_place_t...)): New constructor.
11272         (optional::~optional): Use reset.
11273         (optional::optional(const optional&)): New.
11274         (optional::optional(const optional&&)): New.
11275         (optional::optional(T &)): New.
11276         (optional::optional(T &&)): New.
11277         (operator::operator=(const optional &)): New.
11278         (operator::operator=(optional &&)): New.
11279         (operator::operator= (const T &))
11280         (operator::operator= (T &&))
11281         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
11282         (operator::reset): New.
11283         (operator::m_instantiated):: Add in-class initializer.
11284         * common/traits.h: Include <type_traits>.
11285         (struct And): New types.
11286
11287 2017-04-18  Pedro Alves  <palves@redhat.com>
11288
11289         * xml-support.c: Include <vector>.
11290         (scope_level::scope_level(const gdb_xml_element *))
11291         (scope_level::scope_level(scope_level&&)): New.
11292         (scope_level::~scope_level): New.
11293         (scope_level_s): Delete.
11294         (gdb_xml_parser::scopes): Now a std::vector.
11295         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11296         Use std::vector.
11297         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11298         scope cleanup code.
11299         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11300         of the scopes member.  Use std::vector::emplace_back.
11301
11302 2017-04-18  Pedro Alves  <palves@redhat.com>
11303
11304         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
11305         a bool.
11306         (gdb_xml_end_element): Change type of first parameter.
11307         (gdb_xml_cleanup): Rename to ...
11308         (gdb_xml_parser::~gdb_xml_parser): ... this.
11309         (gdb_xml_create_parser_and_cleanup): Delete with ...
11310         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11311         to this new ctor.
11312         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11313         using gdb_xml_create_parser_and_cleanup.
11314         (xinclude_parsing_data): Add ctor/dtor.
11315         (xml_xinclude_cleanup): Delete.
11316         (xml_process_xincludes): Create a local xinclude_parsing_data
11317         instead of heap-allocating one.  Create a local gdb_xml_parser
11318         instead of heap-allocating one with
11319         gdb_xml_create_parser_and_cleanup.
11320
11321 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
11322
11323         PR threads/20743
11324         * fbsd-nat.c (resume_one_thread_cb): Remove.
11325         (resume_all_threads_cb): Remove.
11326         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11327         iterate_over_threads.
11328
11329 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11330
11331         * NEWS: Create a new section for the next release branch.
11332         Rename the section of the current branch, now that it has
11333         been cut.
11334
11335 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11336
11337         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11338         * version.in: Bump version to 8.0.50.DATE-git.
11339
11340 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
11341
11342         PR gdb/21385
11343         * windows-nat.c (windows_create_inferior): Declare 'allargs'
11344         independently of the host, and fix build breakage on Cygwin.
11345
11346 2017-04-13  Pedro Alves  <palves@redhat.com>
11347
11348         * inferior.c (free_inferior): Convert to ...
11349         (inferior::~inferior): ... this dtor.
11350         (inferior::inferior): New ctor, factored out from ...
11351         (add_inferior_silent): ... here.  Allocate the inferior with a new
11352         expression.
11353         (delete_inferior): Call delete instead of free_inferior.
11354         * inferior.h (gdb_environ, continuation): Forward declare.
11355         (inferior): Now a class.  Add in-class initialization to all
11356         members.  Make boolean fields bool, except 'detaching'.
11357         (inferior::inferior): New explicit ctor.
11358         (inferior::~inferior): New.
11359
11360 2017-04-13  Pedro Alves  <palves@redhat.com>
11361
11362         * inferior.c (init_inferior_list): Delete.
11363         * inferior.h (init_inferior_list): Delete.
11364
11365 2017-04-13  Pedro Alves  <palves@redhat.com>
11366
11367         PR threads/13217
11368         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11369         (top level): Call it twice, with different thread sets.
11370
11371 2017-04-13  Pedro Alves  <palves@redhat.com>
11372
11373         * thread.c: Include <algorithm>.
11374         (thread_array_cleanup): Delete.
11375         (scoped_inc_dec_ref): New class.
11376         (live_threads_count): New function.
11377         (set_thread_refcount): Delete.
11378         (tp_array_compar_ascending): Now a bool.
11379         (tp_array_compar): Convert to a std::sort comparison function.
11380         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11381         and live_threads_count.
11382
11383 2017-04-13  Pedro Alves  <palves@redhat.com>
11384
11385         * infrun.c (follow_fork_inferior): Also switch the current
11386         inferior.
11387
11388 2017-04-13  Pedro Alves  <palves@redhat.com>
11389
11390         * breakpoint.c (watch_command_1): Save watchpoint-frame info
11391         before calling create_internal_breakpoint.
11392
11393 2017-04-13  Pedro Alves  <palves@redhat.com>
11394
11395         * fork-child.c (execv_argv): New class.
11396         (breakup_args): Refactored as ...
11397         (execv_argv::init_for_no_shell): .. this method of execv_argv.
11398         Copy arguments to storage and replace separators with NULL
11399         terminators in place.
11400         (escape_bang_in_quoted_argument): Adjust to return bool.
11401         (execv_argv::execv_argv): New ctor.
11402         (execv_argv::init_for_shell): New method, factored out from
11403         fork_inferior.  Don't strdup strings into the vector.
11404         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
11405         Remove free_vector_argv call.
11406
11407 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11408
11409         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11410         tdep->rx_psw_type.
11411
11412 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11413
11414         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11415         * rx-tdep.c (rx_gdbarch_init): Likewise.
11416
11417 2017-04-13  Pedro Alves  <palves@redhat.com>
11418
11419         * breakpoint.h (struct breakpoint): Reindent.
11420
11421 2017-04-13  Pedro Alves  <palves@redhat.com>
11422
11423         * breakpoint.c (bp_location): Rename to ...
11424         (bp_locations): ... this.  All references updated.
11425         (bp_location_count): Rename to ...
11426         (bp_locations_count): ... this.  All references updated.
11427         (bp_location_placed_address_before_address_max): Rename to ...
11428         (bp_locations_placed_address_before_address_max): ... this.  All
11429         references updated.
11430         (bp_location_shadow_len_after_address_max): Rename to ...
11431         (bp_locations_shadow_len_after_address_max): ... this.  All
11432         references updated.
11433         (bp_location_compare_addrs): Rename to ...
11434         (bp_locations_compare_addrs): ... this.  All references updated.
11435         (bp_location_compare):Rename to ...
11436         (bp_locations_compare): ... this.  All references updated.
11437         (bp_location_target_extensions_update): Rename to ...
11438         (bp_locations_target_extensions_update): ... this.  All references
11439         updated.
11440
11441 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11442
11443         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11444         * common/common.m4: Check headers 'termios.h', 'termio.h' and
11445         'sgtty.h'.
11446         * common/gdb_termios.h: New file, with parts of "terminal.h".
11447         * inflow.c: Include "gdb_termios.h".
11448         * ser-unix.c: Include "gdb_termios.h".
11449         * terminal.h: Move terminal-related defines to
11450         "common/gdb_termios.h".
11451
11452 2017-04-12  Tom Tromey  <tom@tromey.com>
11453
11454         * probe.c (parse_probes): Update.
11455         * location.h (delete_event_location): Don't declare.
11456         (event_location_deleter::operator()): Update.
11457         * location.c (event_location_deleter::operator()): Rename from
11458         delete_event_location.
11459         * linespec.h (linespec_result) <location>: Change type to
11460         event_location_up.
11461         * linespec.c (canonicalize_linespec, event_location_to_sals)
11462         (decode_objc): Update.
11463         (linespec_result): Don't call delete_event_location.
11464         * breakpoint.c (create_breakpoints_sal)
11465         (bkpt_probe_create_sals_from_location)
11466         (strace_marker_create_sals_from_location): Update.
11467
11468 2017-04-12  Tom Tromey  <tom@tromey.com>
11469
11470         * linespec.h (struct linespec_result): Add constructor and
11471         destructor.
11472         (init_linespec_result, destroy_linespec_result)
11473         (make_cleanup_destroy_linespec_result): Don't declare.
11474         * linespec.c (init_linespec_result): Remove.
11475         (linespec_result::~linespec_result): Rename from
11476         destroy_linespec_result.  Update.
11477         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11478         Remove.
11479         * breakpoint.c (create_breakpoint, break_range_command)
11480         (decode_location_default): Update.
11481         * ax-gdb.c (agent_command_1): Update.
11482
11483 2017-04-12  Tom Tromey  <tom@tromey.com>
11484
11485         * remote.c (remote_download_tracepoint): Update.
11486         * python/py-breakpoint.c (bppy_get_location): Update.
11487         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11488         (gdbscm_breakpoint_location): Update.
11489         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11490         * breakpoint.h (struct breakpoint) <location, location_range_end>:
11491         Change type to event_location_up.
11492         * breakpoint.c (create_overlay_event_breakpoint)
11493         (create_longjmp_master_breakpoint)
11494         (create_std_terminate_master_breakpoint)
11495         (create_exception_master_breakpoint)
11496         (breakpoint_event_location_empty_p, print_breakpoint_location)
11497         (print_one_breakpoint_location, create_thread_event_breakpoint)
11498         (init_breakpoint_sal, create_breakpoint)
11499         (print_recreate_ranged_breakpoint, break_range_command)
11500         (init_ada_exception_breakpoint, say_where): Update.
11501         (base_breakpoint_dtor): Don't call delete_event_location.
11502         (bkpt_print_recreate, tracepoint_print_recreate)
11503         (dprintf_print_recreate, update_static_tracepoint)
11504         (breakpoint_re_set_default): Update.
11505
11506 2017-04-12  Tom Tromey  <tom@tromey.com>
11507
11508         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11509         type of "to_do".  Update.
11510         (compute_stack_depth): Use std::vector.
11511
11512 2017-04-12  Tom Tromey  <tom@tromey.com>
11513
11514         * printcmd.c (find_instruction_backward): Use std::vector.
11515
11516 2017-04-12  Tom Tromey  <tom@tromey.com>
11517
11518         * symfile.c (objfilep): Remove typedef.
11519         (reread_symbols): Use a std::vector.
11520
11521 2017-04-12  Tom Tromey  <tom@tromey.com>
11522
11523         * mi/mi-main.c (exec_direction_forward): Remove.
11524         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11525         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11526         scoped_restore.
11527         * guile/guile.c (guile_repl_command, guile_command)
11528         (gdbscm_execute_gdb_command): Use scoped_restore.
11529         * go-exp.y (go_parse): Use scoped_restore.
11530         * d-exp.y (d_parse): Use scoped_restore.
11531         * cli/cli-decode.c (cmd_func): Use scoped_restore.
11532         * c-exp.y (c_parse): Use scoped_restore.
11533
11534 2017-04-12  Tom Tromey  <tom@tromey.com>
11535
11536         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11537         (mi_parse): Update return type.
11538         (mi_parse_free): Remove.
11539         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11540         (mi_parse::~mi_parse): Rename from mi_parse_free.
11541         (mi_parse_cleanup): Remove.
11542         (mi_parse): Return a unique_ptr.  Use new.
11543         * mi/mi-main.c (mi_execute_command): Update.
11544
11545 2017-04-12  Tom Tromey  <tom@tromey.com>
11546
11547         * location.c (explicit_location_lex_one): Return a
11548         unique_xmalloc_ptr.
11549         (string_to_explicit_location): Update.  Remove cleanups.
11550
11551 2017-04-12  Tom Tromey  <tom@tromey.com>
11552
11553         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11554         (compare_value_and_voffset): Change type.  Update.
11555         (compute_vtable_size): Change type of "offset_vec".
11556         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
11557         (gnuv3_get_typeid): Remove extraneous declaration.
11558
11559 2017-04-12  Tom Tromey  <tom@tromey.com>
11560
11561         * charset.h (wchar_iterator): Fix comment.
11562
11563 2017-04-12  Tom Tromey  <tom@tromey.com>
11564
11565         * charset.c (iconv_wrapper): New class.
11566         (cleanup_iconv): Remove.
11567         (convert_between_encodings): Use it.
11568
11569 2017-04-12  Tom Tromey  <tom@tromey.com>
11570
11571         * symfile.h (increment_reading_symtab): Update type.
11572         * symfile.c (decrement_reading_symtab): Remove.
11573         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11574         * psymtab.c (psymtab_to_symtab): Update.
11575         * dwarf2read.c (dw2_instantiate_symtab): Update.
11576
11577 2017-04-12  Tom Tromey  <tom@tromey.com>
11578
11579         * jit.c (struct jit_reader): Declare separately.  Add constructor
11580         and destructor.  Change type of "handle".
11581         (loaded_jit_reader): Define separately.
11582         (jit_reader_load): Update.  New "new".
11583         (jit_reader_unload_command): Use "delete".
11584         * gdb-dlfcn.h (struct dlclose_deleter): New.
11585         (gdb_dlhandle_up): New typedef.
11586         (gdb_dlopen, gdb_dlsym): Update types.
11587         (gdb_dlclose): Remove.
11588         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11589         (gdb_dlsym): Change type of "handle".
11590         (make_cleanup_dlclose): Remove.
11591         (dlclose_deleter::operator()): Rename from gdb_dlclose.
11592         * compile/compile-c-support.c (load_libcc): Update.
11593
11594 2017-04-12  Tom Tromey  <tom@tromey.com>
11595
11596         * symtab.h (find_pcs_for_symtab_line): Change return type.
11597         * symtab.c (find_pcs_for_symtab_line): Change return type.
11598         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11599         type of "vec".  Update.
11600         (ltpy_get_pcs_for_line): Update.
11601         * linespec.c (decode_digits_ordinary): Update.
11602
11603 2017-04-12  Tom Tromey  <tom@tromey.com>
11604
11605         * tracepoint.c (actions_command): Update.
11606         * python/python.c (python_command, python_interactive_command):
11607         Update.
11608         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11609         * guile/guile.c (guile_command): Update.
11610         * defs.h (read_command_lines, read_command_lines_1): Return
11611         command_line_up.
11612         (command_lines_deleter): New struct.
11613         (command_line_up): New typedef.
11614         * compile/compile.c (compile_code_command)
11615         (compile_print_command): Update.
11616         * cli/cli-script.h (get_command_line, copy_command_lines): Return
11617         command_line_up.
11618         (make_cleanup_free_command_lines): Remove.
11619         * cli/cli-script.c (get_command_line, read_command_lines_1)
11620         (copy_command_lines): Return command_line_up.
11621         (while_command, if_command, read_command_lines, define_command)
11622         (document_command): Update.
11623         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11624         Remove.
11625         * breakpoint.h (breakpoint_set_commands): Change type of
11626         "commands".
11627         * breakpoint.c (breakpoint_set_commands): Change type of
11628         "commands".  Update.
11629         (do_map_commands_command, update_dprintf_command_list)
11630         (create_tracepoint_from_upload): Update.
11631
11632 2017-04-12  Tom Tromey  <tom@tromey.com>
11633
11634         * tracepoint.c (scope_info): Update.
11635         * spu-tdep.c (spu_catch_start): Update.
11636         * python/python.c (gdbpy_decode_line): Update.
11637         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11638         * python/py-breakpoint.c (bppy_init): Update.
11639         * probe.c (parse_probes): Update.
11640         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11641         * location.h (event_location_deleter): New struct.
11642         (event_location_up): New typedef.
11643         (new_linespec_location, new_address_location, new_probe_location)
11644         (new_explicit_location, copy_event_location)
11645         (string_to_event_location, string_to_event_location_basic)
11646         (string_to_explicit_location): Update return type.
11647         (make_cleanup_delete_event_location): Remove.
11648         * location.c (new_linespec_location, new_address_location)
11649         (new_probe_location, new_explicit_location, copy_event_location):
11650         Return event_location_up.
11651         (delete_event_location_cleanup)
11652         (make_cleanup_delete_event_location): Remove.
11653         (string_to_explicit_location, string_to_event_location_basic)
11654         (string_to_event_location): Return event_location_up.
11655         * linespec.c (canonicalize_linespec, event_location_to_sals)
11656         (decode_line_with_current_source)
11657         (decode_line_with_last_displayed, decode_objc): Update.
11658         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11659         * completer.c (location_completer): Update.
11660         * cli/cli-cmds.c (edit_command, list_command): Update.
11661         * breakpoint.c (create_overlay_event_breakpoint)
11662         (create_longjmp_master_breakpoint)
11663         (create_std_terminate_master_breakpoint)
11664         (create_exception_master_breakpoint)
11665         (create_thread_event_breakpoint): Update.
11666         (init_breakpoint_sal): Update.  Remove some dead code.
11667         (create_breakpoint_sal): Change type of "location".  Update.
11668         (create_breakpoints_sal, create_breakpoint, break_command_1)
11669         (dprintf_command, break_range_command, until_break_command)
11670         (init_ada_exception_breakpoint)
11671         (strace_marker_create_sals_from_location)
11672         (update_static_tracepoint, trace_command, ftrace_command)
11673         (strace_command, create_tracepoint_from_upload): Update.
11674         * break-catch-throw.c (re_set_exception_catchpoint): Update.
11675         * ax-gdb.c (agent_command_1): Update.
11676
11677 2017-04-12  Pedro Alves  <palves@redhat.com>
11678
11679         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11680         * configure.tgt: Handle i[34567]86-*-go32* and
11681         i[34567]86-*-msdosdjgpp*.
11682         * i386-tdep.c (i386_svr4_reg_to_regnum):
11683         Make extern.
11684         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11685         i386-go32-tdep.c.
11686         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11687         * i386-go32-tdep.c: New file.
11688         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
11689         declarations.
11690
11691 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
11692
11693         * aix-thread.c (pd_status2str): Change return type to const char *.
11694
11695 2017-04-12  Pedro Alves  <palves@redhat.com>
11696
11697         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
11698         calls to set_gdbarch_gnu_triplet_regexp.
11699
11700 2017-04-12  Pedro Alves  <palves@redhat.com>
11701
11702         PR gdb/21323
11703         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
11704         New enum value.
11705         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
11706         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
11707         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
11708         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
11709         * gdbarch.h, gdbarch.c: Regenerate.
11710         * aarch64-tdep.c (aarch64_gdbarch_init): Override
11711         gdbarch_wchar_bit and gdbarch_wchar_signed.
11712         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
11713         * arm-tdep.c (arm_gdbarch_init): Likewise.
11714         * avr-tdep.c (avr_gdbarch_init): Likewise.
11715         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
11716         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
11717         * i386-tdep.c (i386_go32_init_abi): Likewise.
11718         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11719         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11720         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11721         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11722         * sh-tdep.c (sh_gdbarch_init): Likewise.
11723         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11724         * sparc64-tdep.c (sparc64_init_abi): Likewise.
11725         * windows-tdep.c (windows_init_abi): Likewise.
11726         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11727
11728 2017-04-12  Pedro Alves  <palves@redhat.com>
11729
11730         PR c++/21323
11731         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
11732         cplus_primitive_type_char32_t>: New enum values.
11733         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
11734         and cplus_primitive_type_char32_t.
11735         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
11736         32, use the archtecture's built-in type for char16_t and char32_t,
11737         respectively.  Otherwise, fallback to init_integer_type as before,
11738         but make the type unsigned, and issue a complaint.
11739         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
11740
11741 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
11742
11743         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
11744         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
11745
11746 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11747
11748         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
11749         'const char *'.
11750
11751 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11752
11753         * common/common-utils.c (free_vector_argv): New function.
11754         * common/common-utils.h: Include <vector>.
11755         (free_vector_argv): New prototype.
11756         * darwin-nat.c (darwin_create_inferior): Rewrite function
11757         prototype in order to constify "exec_file" and accept a
11758         "std::string" for "allargs".
11759         * fork-child.c: Include <vector>.
11760         (breakup_args): Rewrite function, using C++.
11761         (fork_inferior): Rewrite function header, constify "exec_file_arg"
11762         and accept "std::string" for "allargs".  Update the code to
11763         calculate "argv" based on "allargs".  Update calls to "exec_fun"
11764         and "execvp".
11765         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
11766         order to constify "exec_file" and accept a "std::string" for
11767         "allargs".
11768         * go32-nat.c (go32_create_inferior): Likewise.
11769         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
11770         * infcmd.c (run_command_1): Constify "exec_file".  Use
11771         "std::string" for inferior arguments.
11772         * inferior.h (fork_inferior): Update prototype.
11773         * linux-nat.c (linux_nat_create_inferior): Rewrite function
11774         prototype in order to constify "exec_file" and accept a
11775         "std::string" for "allargs".
11776         * nto-procfs.c (procfs_create_inferior): Likewise.
11777         * procfs.c (procfs_create_inferior): Likewise.
11778         * remote-sim.c (gdbsim_create_inferior): Likewise.
11779         * remote.c (extended_remote_run): Update code to accept
11780         "std::string" as argument.
11781         (extended_remote_create_inferior): Rewrite function prototype in
11782         order to constify "exec_file" and accept a "std::string" for
11783         "allargs".
11784         * rs6000-nat.c (super_create_inferior): Likewise.
11785         (rs6000_create_inferior): Likewise.
11786         * target.h (struct target_ops) <to_create_inferior>: Likewise.
11787         * windows-nat.c (windows_create_inferior): Likewise.
11788
11789 2017-04-11  Pedro Alves  <palves@redhat.com>
11790
11791         * thread.c: Fix whitespace throughout.
11792
11793 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11794
11795         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
11796
11797 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
11798
11799         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
11800
11801 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
11802
11803         PR gdb/21364
11804         * osdata.c (info_osdata): Check if 'type' is an empty string
11805         instead of NULL.
11806
11807 2017-04-10  Pedro Alves  <palves@redhat.com>
11808
11809         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
11810         (ptid_to_global_thread_id, in_thread_list)
11811         (do_captured_list_thread_ids, set_resumed, set_running)
11812         (set_executing, set_stop_requested, finish_thread_state)
11813         (validate_registers_access, can_access_registers_ptid)
11814         (print_thread_info_1, switch_to_thread)
11815         (do_restore_current_thread_cleanup)
11816         (make_cleanup_restore_current_thread, thread_command)
11817         (thread_name_command): Use operator== instead of ptid_equal.
11818
11819 2017-04-10  Pedro Alves  <palves@redhat.com>
11820
11821         * thread.c (struct current_thread_cleanup) <next>: Delete field.
11822         (current_thread_cleanup_chain): Delete.
11823         (restore_current_thread_cleanup_dtor)
11824         (make_cleanup_restore_current_thread): Remove references to
11825         current_thread_cleanup_chain.
11826
11827 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
11828
11829         * msp430-tdep.c (msp430_pseudo_register_read): Never return
11830         REG_UNKNOWN.
11831
11832 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11833
11834         PR gdb/19942
11835         * gdbthread.h (thread_info::deletable): New method.
11836         (thread_info::incref): New method.
11837         (thread_info::decref): New method.
11838         (thread_info::refcount): Move it to private.
11839         * infrun.c (save_stop_context): Call inc_refcount.
11840         (release_stop_context_cleanup): Likewise.
11841         * thread.c (set_thread_exited): New function.
11842         (init_thread_list): Delete "tp" only it is deletable, otherwise
11843         call set_thread_exited.
11844         (delete_thread_1): Call set_thread_exited.
11845         (current_thread_cleanup) <inferior_pid>: Remove.
11846         <thread>: New field.
11847         (restore_current_thread_ptid_changed): Removed.
11848         (do_restore_current_thread_cleanup): Adjust.
11849         (restore_current_thread_cleanup_dtor): Don't call
11850         find_thread_ptid.
11851         (set_thread_refcount): Use dec_refcount.
11852         (make_cleanup_restore_current_thread): Adjust.
11853         (thread_apply_all_command): Call inc_refcount.
11854         (_initialize_thread): Don't call
11855         observer_attach_thread_ptid_changed.
11856
11857 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11858
11859         * thread.c (delete_thread_1): Hoist code on marking thread as
11860         exited.
11861
11862 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11863
11864         * windows-nat.c (windows_detach): Initialize ptid with
11865         minus_one_ptid.
11866
11867 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11868
11869         * unittests/ptid-selftests.c: Fix erroneous assert messages.
11870
11871 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
11872
11873         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
11874         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
11875         (bfin_pseudo_register_write): Likewise
11876
11877 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
11878
11879         * common/ptid.h (struct ptid): Change to...
11880         (class ptid_t): ... this.
11881         <ptid_t>: New constructors.
11882         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
11883         matches>: New methods.
11884         <make_null, make_minus_one>: New static methods.
11885         <pid>: Rename to...
11886         <m_pid>: ...this.
11887         <lwp>: Rename to...
11888         <m_lwp>: ...this.
11889         <tid>: Rename to...
11890         <m_tid>: ...this.
11891         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
11892         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
11893         as references, move comment to class ptid_t.
11894         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
11895         ptid_t static methods.
11896         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
11897         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
11898         Take ptid arguments as references, implement using ptid_t methods.
11899         * unittests/ptid-selftests.c: New file.
11900         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11901         unittests/ptid-selftests.c.
11902         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
11903
11904 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
11905
11906         * python/python.c (python_run_simple_file): Cast mode literal to
11907         non-const char pointer as expected by PyFile_FromString.
11908
11909 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
11910
11911         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
11912         minus_one_ptid and null_ptid.
11913
11914 2017-04-05  Pedro Alves  <palves@redhat.com>
11915
11916         * warning.m4 (build_warnings): Remove -Wno-write-strings.
11917         * configure: Regenerate.
11918
11919 2017-04-05  Pedro Alves  <palves@redhat.com>
11920
11921         * ada-exp.y (yyerror): Constify.
11922         * ada-lang.c (bound_name, get_selections)
11923         (ada_variant_discrim_type)
11924         (ada_variant_discrim_name, ada_value_struct_elt)
11925         (ada_lookup_struct_elt_type, is_unchecked_variant)
11926         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
11927         (catch_ada_exception_command_split)
11928         (catch_ada_assert_command_split, catch_assert_command)
11929         (ada_op_name): Constify.
11930         * ada-lang.h (ada_yyerror, get_selections)
11931         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
11932         * arc-tdep.c (arc_print_frame_cache): Constify.
11933         * arm-tdep.c (arm_skip_stub): Constify.
11934         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
11935         (gen_aggregate_elt_ref): Constify.
11936         * bcache.c (print_bcache_statistics): Constify.
11937         * bcache.h (print_bcache_statistics): Constify.
11938         * break-catch-throw.c (catch_exception_command_1):
11939         * breakpoint.c (struct ep_type_description::description):
11940         Constify.
11941         (add_solib_catchpoint): Constify.
11942         (catch_fork_command_1): Add cast.
11943         (add_catch_command): Constify.
11944         * breakpoint.h (add_catch_command, add_solib_catchpoint):
11945         Constify.
11946         * bsd-uthread.c (bsd_uthread_state): Constify.
11947         * buildsym.c (patch_subfile_names): Constify.
11948         * buildsym.h (next_symbol_text_func, patch_subfile_names):
11949         Constify.
11950         * c-exp.y (yyerror): Constify.
11951         (token::oper): Constify.
11952         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
11953         * c-varobj.c (cplus_describe_child): Constify.
11954         * charset.c (find_charset_names): Add cast.
11955         (find_charset_names): Constify array and add const_cast.
11956         * cli/cli-cmds.c (complete_command, cd_command): Constify.
11957         (edit_command): Constify.
11958         * cli/cli-decode.c (lookup_cmd): Constify.
11959         * cli/cli-dump.c (dump_memory_command, dump_value_command):
11960         Constify.
11961         (struct dump_context): Constify.
11962         (add_dump_command, restore_command): Constify.
11963         * cli/cli-script.c (get_command_line): Constify.
11964         * cli/cli-script.h (get_command_line): Constify.
11965         * cli/cli-utils.c (check_for_argument): Constify.
11966         * cli/cli-utils.h (check_for_argument): Constify.
11967         * coff-pe-read.c (struct read_pe_section_data): Constify.
11968         * command.h (lookup_cmd): Constify.
11969         * common/print-utils.c (decimal2str): Constify.
11970         * completer.c (gdb_print_filename): Constify.
11971         * corefile.c (set_gnutarget): Constify.
11972         * cp-name-parser.y (yyerror): Constify.
11973         * cp-valprint.c (cp_print_class_member): Constify.
11974         * cris-tdep.c (cris_register_name, crisv32_register_name):
11975         Constify.
11976         * d-exp.y (yyerror): Constify.
11977         (struct token::oper): Constify.
11978         * d-lang.h (d_yyerror): Constify.
11979         * dbxread.c (struct header_file_location::name): Constify.
11980         (add_old_header_file, add_new_header_file, last_function_name)
11981         (dbx_next_symbol_text, add_bincl_to_list)
11982         (find_corresponding_bincl_psymtab, set_namestring)
11983         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
11984         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
11985         * defs.h (command_line_input, print_address_symbolic)
11986         (deprecated_readline_begin_hook): Constify.
11987         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
11988         Constify.
11989         * event-top.c (handle_line_of_input): Constify and add cast.
11990         * exceptions.c (catch_errors): Constify.
11991         * exceptions.h (catch_errors): Constify.
11992         * expprint.c (print_subexp_standard, op_string, op_name)
11993         (op_name_standard, dump_raw_expression, dump_raw_expression):
11994         * expression.h (op_name, op_string, dump_raw_expression):
11995         Constify.
11996         * f-exp.y (yyerror): Constify.
11997         (struct token::oper): Constify.
11998         (struct f77_boolean_val::name): Constify.
11999         * f-lang.c (f_word_break_characters): Constify.
12000         * f-lang.h (f_yyerror): Constify.
12001         * fork-child.c (fork_inferior): Add cast.
12002         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12003         (new_variant): Constify.
12004         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12005         * gdbarch.c: Regenerate.
12006         * gdbcore.h (set_gnutarget): Constify.
12007         * go-exp.y (yyerror): Constify.
12008         (token::oper): Constify.
12009         * go-lang.h (go_yyerror): Constify.
12010         * go32-nat.c (go32_sysinfo): Constify.
12011         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12012         * guile/scm-cmd.c (cmdscm_function): Constify.
12013         * guile/scm-param.c (pascm_param_value): Constify.
12014         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12015         (h8300sx_register_name): Constify.
12016         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12017         Constify.
12018         * ia64-tdep.c (ia64_register_names): Constify.
12019         * infcmd.c (construct_inferior_arguments): Constify.
12020         (path_command, attach_post_wait): Constify.
12021         * language.c (show_range_command, show_case_command)
12022         (unk_lang_error): Constify.
12023         * language.h (language_defn::la_error)
12024         (language_defn::la_name_of_this): Constify.
12025         * linespec.c (decode_line_2): Constify.
12026         * linux-thread-db.c (thread_db_err_str): Constify.
12027         * lm32-tdep.c (lm32_register_name): Constify.
12028         * m2-exp.y (yyerror): Constify.
12029         * m2-lang.h (m2_yyerror): Constify.
12030         * m32r-tdep.c (m32r_register_names): Constify and make static.
12031         * m68hc11-tdep.c (m68hc11_register_names): Constify.
12032         * m88k-tdep.c (m88k_register_name): Constify.
12033         * macroexp.c (appendmem): Constify.
12034         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12035         (upgrade_type, parse_external, parse_partial_symbols)
12036         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12037         (new_symbol): Constify.
12038         * memattr.c (mem_info_command): Constify.
12039         * mep-tdep.c (register_name_from_keyword): Constify.
12040         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12041         Constify.
12042         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12043         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12044         * mi/mi-main.c (captured_mi_execute_command): Constify and add
12045         cast.
12046         (mi_execute_async_cli_command): Constify.
12047         * mips-tdep.c (mips_register_name): Constify.
12048         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12049         (am33_register_name, am33_2_register_name)
12050         * moxie-tdep.c (moxie_register_names): Constify.
12051         * nat/linux-osdata.c (osdata_type): Constify fields.
12052         * nto-tdep.c (nto_parse_redirection): Constify.
12053         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12054         (lookup_child_selector): Constify.
12055         (objc_methcall::name): Constify.
12056         * objc-lang.h (lookup_objc_class, lookup_child_selector)
12057         (lookup_struct_typedef): Constify.
12058         * objfiles.c (pc_in_section): Constify.
12059         * objfiles.h (pc_in_section): Constify.
12060         * p-exp.y (struct token::oper): Constify.
12061         (yyerror): Constify.
12062         * p-lang.h (pascal_yyerror): Constify.
12063         * parser-defs.h (op_name_standard): Constify.
12064         (op_print::string): Constify.
12065         (exp_descriptor::op_name): Constify.
12066         * printcmd.c (print_address_symbolic): Constify.
12067         * psymtab.c (print_partial_symbols): Constify.
12068         * python/py-breakpoint.c (stop_func): Constify.
12069         (bppy_get_expression): Constify.
12070         * python/py-cmd.c (cmdpy_completer::name): Constify.
12071         (cmdpy_function): Constify.
12072         * python/py-event.c (evpy_add_attribute)
12073         (gdbpy_initialize_event_generic): Constify.
12074         * python/py-event.h (evpy_add_attribute)
12075         (gdbpy_initialize_event_generic): Constify.
12076         * python/py-evts.c (add_new_registry): Constify.
12077         * python/py-finishbreakpoint.c (outofscope_func): Constify.
12078         * python/py-framefilter.c (get_py_iter_from_func): Constify.
12079         * python/py-inferior.c (get_buffer): Add cast.
12080         * python/py-param.c (parm_constant::name): Constify.
12081         * python/py-unwind.c (fprint_frame_id): Constify.
12082         * python/python.c (gdbpy_parameter_value): Constify.
12083         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12084         * remote.c (memory_packet_config::name): Constify.
12085         (show_packet_config_cmd, remote_write_bytes)
12086         (remote_buffer_add_string):
12087         * reverse.c (exec_reverse_once): Constify.
12088         * rs6000-tdep.c (variant::name, variant::description): Constify.
12089         * rust-exp.y (rustyyerror): Constify.
12090         * rust-lang.c (rust_op_name): Constify.
12091         * rust-lang.h (rustyyerror): Constify.
12092         * serial.h (serial_ops::name): Constify.
12093         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12094         (sh_sh3e_register_name, sh_sh2e_register_name)
12095         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12096         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12097         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12098         (sh_sh4al_dsp_register_name): Constify.
12099         * sh64-tdep.c (sh64_register_name): Constify.
12100         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12101         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12102         * stabsread.c (patch_block_stabs, read_type_number)
12103         (ref_map::stabs, ref_add, process_reference)
12104         (symbol_reference_defined, define_symbol, define_symbol)
12105         (error_type, read_type, read_member_functions, read_cpp_abbrev)
12106         (read_one_struct_field, read_struct_fields, read_baseclasses)
12107         (read_tilde_fields, read_struct_type, read_array_type)
12108         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12109         (read_huge_number, read_range_type, read_args, common_block_start)
12110         (find_name_end): Constify.
12111         * stabsread.h (common_block_start, define_symbol)
12112         (process_one_symbol, symbol_reference_defined, ref_add):
12113         * symfile.c (get_section_index, add_symbol_file_command):
12114         * symfile.h (get_section_index): Constify.
12115         * target-descriptions.c (tdesc_type::name): Constify.
12116         (tdesc_free_type): Add cast.
12117         * target.c (find_default_run_target):
12118         (add_deprecated_target_alias, find_default_run_target)
12119         (target_announce_detach): Constify.
12120         (do_option): Constify.
12121         * target.h (add_deprecated_target_alias): Constify.
12122         * thread.c (print_thread_info_1): Constify.
12123         * top.c (deprecated_readline_begin_hook, command_line_input):
12124         Constify.
12125         (init_main): Add casts.
12126         * top.h (handle_line_of_input): Constify.
12127         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12128         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12129         (tfind_command): Rename to ...
12130         (tfind_command_1): ... this and constify.
12131         (tfind_command): New function.
12132         (tfind_end_command, tfind_start_command): Adjust.
12133         (encode_source_string): Constify.
12134         * tracepoint.h (encode_source_string): Constify.
12135         * tui/tui-data.c (tui_partial_win_by_name): Constify.
12136         * tui/tui-data.h (tui_partial_win_by_name): Constify.
12137         * tui/tui-source.c (tui_set_source_content_nil): Constify.
12138         * tui/tui-source.h (tui_set_source_content_nil): Constify.
12139         * tui/tui-win.c (parse_scrolling_args): Constify.
12140         * tui/tui-windata.c (tui_erase_data_content): Constify.
12141         * tui/tui-windata.h (tui_erase_data_content): Constify.
12142         * tui/tui-winsource.c (tui_erase_source_content): Constify.
12143         * tui/tui.c (tui_enable): Add cast.
12144         * utils.c (defaulted_query): Constify.
12145         (init_page_info): Add cast.
12146         (puts_debug, subset_compare): Constify.
12147         * utils.h (subset_compare): Constify.
12148         * varobj.c (varobj_format_string): Constify.
12149         * varobj.h (varobj_format_string): Constify.
12150         * vax-tdep.c (vax_register_name): Constify.
12151         * windows-nat.c (windows_detach): Constify.
12152         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12153         * xml-support.c (gdb_xml_end_element): Constify.
12154         * xml-tdesc.c (tdesc_start_reg): Constify.
12155         * xstormy16-tdep.c (xstormy16_register_name): Constify.
12156         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12157         * xtensa-tdep.h (xtensa_register_t::name): Constify.
12158
12159 2017-04-05  Pedro Alves  <palves@redhat.com>
12160
12161         * proc-api.c (struct trans): Constify.
12162         (procfs_note): Constify.
12163         * proc-events.c (struct trans, syscall_table):
12164         * proc-flags.c (struct trans): Constify.
12165         * proc-utils.h (procfs_note): Constify.
12166         * proc-why.c (struct trans): Constify.
12167         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12168         (procfs_detach): Constify.
12169         * sol-thread.c (struct string_map): Constify.
12170         (td_err_string, td_state_string): Constify.
12171
12172 2017-04-05  Pedro Alves  <palves@redhat.com>
12173
12174         * proc-api.c (procfs_filename): Don't initialize
12175         procfs_filename.
12176         (prepare_to_trace): Assume procfs_filename is non-NULL.
12177         (_initialize_proc_api): Give procfs_filename a default value here.
12178
12179 2017-04-05  Pedro Alves  <palves@redhat.com>
12180
12181         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12182         'cond_string' parameter.
12183         (extract_exception_regexp): Constify 'string' parameter.
12184         (catch_exception_command_1): Constify.
12185         * breakpoint.c (init_catchpoint)
12186         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12187         parameter.
12188         (ep_parse_optional_if_clause, catch_fork_command_1)
12189         (catch_exec_command_1): Constify.
12190         * breakpoint.h (init_catchpoint): Constify 'cond_string'
12191         parameter.
12192         (ep_parse_optional_if_clause): Constify.
12193         * cli/cli-utils.c (remove_trailing_whitespace)
12194         (check_for_argument): Constify.
12195         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12196         non-const overload.
12197         (check_for_argument): Likewise.
12198
12199 2017-04-05  Pedro Alves  <palves@redhat.com>
12200
12201         * event-top.c (command_line_handler): Add cast to execute_command
12202         call.
12203         * record-btrace.c (cmd_record_btrace_bts_start)
12204         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12205         (cmd_record_btrace_start): Add cast to execute_command call.
12206         * record-full.c (record_full_goto_insn):
12207         * record.c (record_start, record_stop): Add cast to
12208         execute_command_to_string calls.
12209         (cmd_record_start): Add cast to execute_command calls.
12210
12211 2017-04-05  Pedro Alves  <palves@redhat.com>
12212
12213         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12214         static inline function.
12215         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12216         array and use gdb_PyArg_ParseTupleAndKeywords.
12217         * python/py-cmd.c (cmdpy_init): Likewise.
12218         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12219         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12220         (infpy_search_memory): Likewise.
12221         * python/py-objfile.c (objfpy_add_separate_debug_file)
12222         (gdbpy_lookup_objfile): Likewise.
12223         * python/py-symbol.c (gdbpy_lookup_symbol)
12224         (gdbpy_lookup_global_symbol): Likewise.
12225         * python/py-type.c (gdbpy_lookup_type): Likewise.
12226         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12227         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12228         Likewise.
12229
12230 2017-04-05  Pedro Alves  <palves@redhat.com>
12231
12232         * python/python-internal.h (gdb_PyGetSetDef): New type.
12233         * python/py-block.c (block_object_getset)
12234         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12235         * python/py-event.c (event_object_getset)
12236         (finish_breakpoint_object_getset): Likewise.
12237         * python/py-inferior.c (inferior_object_getset): Likewise.
12238         * python/py-infthread.c (thread_object_getset): Likewise.
12239         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12240         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12241         * python/py-objfile.c (objfile_getset): Likewise.
12242         * python/py-progspace.c (pspace_getset): Likewise.
12243         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12244         Likewise.
12245         * python/py-record.c (recpy_record_getset): Likewise.
12246         * python/py-symbol.c (symbol_object_getset): Likewise.
12247         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12248         Likewise.
12249         * python/py-type.c (type_object_getset, field_object_getset):
12250         Likewise.
12251         * python/py-value.c (value_object_getset): Likewise.
12252
12253 2017-04-05  Pedro Alves  <palves@redhat.com>
12254
12255         * python/python-internal.h (gdb_PyObject_CallMethod)
12256         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12257         New functions.
12258         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12259         (PySys_GetObject, PySys_SetPath): New macros.
12260
12261 2017-04-05  Pedro Alves  <palves@redhat.com>
12262
12263         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12264         info_osdata_command.
12265         * osdata.c (info_osdata_command): Rename to ...
12266         (info_osdata): ... this.  Constify 'type' parameter, and remove
12267         the 'from_tty' parameter.  Accept NULL TYPE.
12268         (info_osdata_command): New function.
12269         * osdata.h (info_osdata_command): Remove declaration.
12270         (info_osdata): New declaration.
12271
12272 2017-04-05  Pedro Alves  <palves@redhat.com>
12273
12274         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12275         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12276         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12277         parameter.
12278         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12279         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12280         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12281         parameter.
12282         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12283         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12284         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12285         (mi_cmd_file_list_exec_source_files)
12286         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12287         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12288         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12289         parameter.
12290         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12291         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12292         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12293         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12294         (mi_cmd_stack_info_frame): Constify 'command' parameter.
12295         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12296         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12297         'command' parameter.
12298         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12299         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12300         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12301         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12302         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12303         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12304         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12305         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12306         (mi_cmd_var_set_update_range): Constify 'command' parameter.
12307         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12308         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12309         parameter.
12310         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12311         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12312         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12313         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12314         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12315         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12316         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12317         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12318         (mi_cmd_data_list_changed_registers)
12319         (mi_cmd_data_write_register_values)
12320         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12321         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12322         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12323         (mi_cmd_list_features, mi_cmd_list_target_features)
12324         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12325         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12326         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12327         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12328         (mi_cmd_trace_frame_collected): Constify 'command'
12329         parameter.
12330         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12331         'command' parameter.
12332
12333 2017-04-05  Pedro Alves  <palves@redhat.com>
12334
12335         * ada-lang.c (ada_completer_word_break_characters): Now a const
12336         array.
12337         (ada_get_gdb_completer_word_break_characters): Constify.
12338         * completer.c (gdb_completer_command_word_break_characters)
12339         (gdb_completer_file_name_break_characters)
12340         (gdb_completer_quote_characters): Now const arrays.
12341         (get_gdb_completer_quote_characters): Constify.
12342         (set_rl_completer_word_break_characters): New function.
12343         (set_gdb_completion_word_break_characters)
12344         (complete_line_internal): Use it.
12345         * completer.h (get_gdb_completer_quote_characters): Constify.
12346         (set_rl_completer_word_break_characters): Declare.
12347         * f-lang.c (f_word_break_characters): Constify.
12348         * language.c (default_word_break_characters): Constify.
12349         * language.h (language_defn::la_word_break_characters): Constify.
12350         (default_word_break_characters): Constify.
12351         * top.c (init_main): Use set_rl_completer_word_break_characters.
12352
12353 2017-04-05  Pedro Alves  <palves@redhat.com>
12354
12355         * aix-thread.c (aix_thread_pid_to_str)
12356         (aix_thread_extra_thread_info): Constify.
12357         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12358         * bsd-uthread.c (bsd_uthread_extra_thread_info)
12359         (bsd_uthread_pid_to_str): Constify.
12360         * corelow.c (core_pid_to_str): Constify.
12361         * darwin-nat.c (darwin_pid_to_str): Constify.
12362         * fbsd-nat.c (fbsd_pid_to_str): Constify.
12363         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12364         Constify.
12365         * gnu-nat.c (gnu_pid_to_str): Constify.
12366         * go32-nat.c (go32_pid_to_str): Constify.
12367         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12368         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12369         * inferior.c (inferior_pid_to_str): Constify.
12370         * linux-nat.c (linux_nat_pid_to_str): Constify.
12371         * linux-tdep.c (linux_core_pid_to_str): Constify.
12372         * linux-thread-db.c (thread_db_pid_to_str)
12373         (thread_db_extra_thread_info): Constify.
12374         * nto-tdep.c (nto_extra_thread_info): Constify.
12375         * nto-tdep.h (nto_extra_thread_info): Constify.
12376         * obsd-nat.c (obsd_pid_to_str): Constify.
12377         * procfs.c (procfs_pid_to_str): Constify.
12378         * ravenscar-thread.c (ravenscar_extra_thread_info)
12379         (ravenscar_pid_to_str): Constify.
12380         * remote-sim.c (gdbsim_pid_to_str): Constify.
12381         * remote.c (remote_threads_extra_info, remote_pid_to_str):
12382         Constify.
12383         * sol-thread.c (solaris_pid_to_str): Constify.
12384         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12385         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12386         * target.c (default_pid_to_str, target_pid_to_str)
12387         (normal_pid_to_str, default_pid_to_str): Constify.
12388         * target.h (target_ops::to_pid_to_str)
12389         (target_ops::to_extra_thread_info): Constify.
12390         (target_pid_to_str, normal_pid_to_str): Constify.
12391         * windows-nat.c (windows_pid_to_str): Constify.
12392         * gdbarch.sh (core_pid_to_str): Constify.
12393         * target-delegates.c: Regenerate.
12394         * gdbarch.h, gdbarch.c: Regenerate.
12395
12396 2017-04-05  Pedro Alves  <palves@redhat.com>
12397
12398         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12399         the memory of the temporary warning_pre_print override.
12400         * utils.c (warning_pre_print): Constify.
12401         * utils.h (warning_pre_print): Constify.
12402
12403 2017-04-05  Pedro Alves  <palves@redhat.com>
12404
12405         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12406         (shell_command): New function.
12407         (make_command): Use std::string.
12408         (init_cli_cmds): Register shell_command instead of shell_escape.
12409
12410 2017-04-05  Pedro Alves  <palves@redhat.com>
12411
12412         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12413         * tracepoint.c (default_collect): Don't initialize.
12414
12415 2017-04-05  Pedro Alves  <palves@redhat.com>
12416
12417         * macroexp.c (macro_buffer::shared): Now a bool.
12418         (init_buffer): Update.
12419         (init_shared_buffer): Constify 'addr' parameter.
12420         (substitute_args, expand, macro_expand, macro_expand_next): Remove
12421         casts.
12422
12423 2017-04-05  Pedro Alves  <palves@redhat.com>
12424
12425         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12426         * disasm.c (set_disassembler_options): Constify local.
12427         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12428
12429 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
12430
12431         PR gdb/21352
12432         * tracefile.c (tsave_command): Fix argument parsing for '-r'
12433         option.
12434
12435 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12436
12437         * frame.c (frame_unwind_register_unsigned): Call
12438         frame_unwind_register_value.
12439
12440 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12441
12442         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12443         Use gdb_test_multiple, and don't match anchor.
12444
12445 2017-04-05  Pedro Alves  <palves@redhat.com>
12446
12447         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12448         (Write After Approval): Remove Simon Marchi.
12449
12450 2017-04-05  Pedro Alves  <palves@redhat.com>
12451
12452         * common/gdb_optional.h (optional::optional): Make constexpr and
12453         initialize m_dummy.
12454
12455 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12456
12457         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12458         (amd64fbsd_jmp_buf_reg_offset): Remove.
12459         (amd64fbsd_supply_uthread): Remove function.
12460         (amd64fbsd_collect_uthread): Remove function.
12461         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12462         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12463         (x86_64-*-freebsd*): Remove bsd-uthread.o.
12464         (fbsd-nat.c): Update comment.
12465         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12466         (i386fbsd_jmp_buf_reg_offset): Remove.
12467         (i386fbsd_supply_uthread): Remove function.
12468         (i386fbsd_collect_uthread): Remove function.
12469         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12470
12471 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12472
12473         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12474         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12475         * NEWS: Mention that support for FreeBSD/alpha was removed.
12476         * alpha-fbsd-tdep.c: Delete file.
12477         * config/alpha/fbsd.mh: Delete file.
12478         * configure.host: Delete alpha*-*-freebsd* and
12479         alpha*-*-kfreebsd*-gnu.
12480         * configure.tgt: Delete alpha*-*-freebsd* and
12481         alpha*-*-kfreebsd*-gnu.
12482
12483 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12484
12485         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12486         amd64bsd_store_inferior_registers): Use ptid from regcache.
12487
12488 2017-04-04  Pedro Alves  <palves@redhat.com>
12489
12490         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
12491         data fields, make them private and add "m_" prefixes.
12492         (lnp_state_machine::lnp_state_machine): New ctor.
12493         (record_line, check_line_address, handle_set_discriminator)
12494         (handle_set_address, handle_advance_pc, handle_special_opcode)
12495         (handle_advance_line, handle_set_file, handle_negate_stmt)
12496         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12497         (end_sequence, advance_line): New methods.
12498         (m_gdbarch, m_record_lines_p): New fields.
12499         (lnp_reader_state): Delete.
12500         (dwarf_record_line): Rename to ...
12501         (lnp_state_machine::record_line): ... adjust.
12502         (init_lnp_state_machine): Delete.
12503         (lnp_state_machine::lnp_state_machine): New.
12504         (check_line_address): Rename to ...
12505         (lnp_state_machine::check_line_address): This.
12506         (dwarf_decode_lines_1): Remove reference to "reader_state".
12507         Adjust lnp_state_machine having a non-default ctor.  Use bool.
12508         State machine internal state manipulation moved to
12509         lnp_state_machine methods.
12510
12511 2017-04-04  Pedro Alves  <palves@redhat.com>
12512
12513         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12514         unittests/offset-type-selftests.c.
12515         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12516         * common/offset-type.h: New file.
12517         * common/preprocessor.h: New file.
12518         * common/traits.h: New file.
12519         * common/valid-expr.h: New file.
12520         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
12521         sect_offset and cu_offset strong typedefs throughout.
12522         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12523         typedefs throughout.
12524         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
12525         sect_offset and cu_offset strong typedefs throughout.
12526         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12527         typedefs throughout.
12528         * gdbtypes.h: Include "common/offset-type.h".
12529         (cu_offset): Now an offset type (strong typedef) instead of a
12530         struct.
12531         (sect_offset): Likewise.
12532         (union call_site_parameter_u): Rename "param_offset" field to
12533         "param_cu_off".
12534         * unittests/offset-type-selftests.c: New file.
12535
12536 2017-04-04  Pedro Alves  <palves@redhat.com>
12537
12538         * common/underlying.h: New file.
12539         * dwarf2read.c: Include "common/gdb_optional.h" and
12540         "common/underlying.h".
12541         (dir_index, file_name_index): New types.
12542         (file_entry): Use them.
12543         (file_entry::include): Use to_underlying.
12544         (line_header::add_file_name): Use dir_index.
12545         (read_formatted_entries): Use gdb::optional.  Read form before
12546         writting to file_entry.
12547         (dwarf_decode_line_header): Use dir_index.
12548         (lnp_state_machine::current_file): Use to_underlying.
12549         (lnp_state_machine::file): Change type to file_name_index.
12550         (dwarf_record_line): Use to_underlying.
12551         (init_lnp_state_machine): Use file_name_index.
12552         (dwarf_decode_lines_1): Use dir_index and file_name_index.
12553
12554 2017-04-04  Pedro Alves  <palves@redhat.com>
12555
12556         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12557         operator bool, has_value and get methods.
12558
12559 2017-04-04  Pedro Alves  <palves@redhat.com>
12560
12561         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12562         fields.
12563         (line_header): Initialize all data fields.  Change type of
12564         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12565         Change type of include_dirs to std::vector<const char *>.  Remove
12566         num_include_dirs, include_dirs_size.  Change type of file_names to
12567         std::vector<file_entry>.  Remove num_file_names, file_names_size.
12568         (line_header::line_header): New.
12569         (line_header::add_include_dir, line_header::add_file_name): New
12570         methods.
12571         (line_header::include_dir_at): Remove NULL check.
12572         (line_header::file_name_at): Add const overload.
12573         (line_header_up): New unique_ptr typedef.
12574         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
12575         std::vector.  Remove free_line_header call.
12576         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
12577         free_line_header call.
12578         (free_cu_line_header): Delete.
12579         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12580         (setup_type_unit_groups): Use line_header_up instead of cleanups.
12581         Adjust to use std::vector.
12582         (free_line_header): Delete.
12583         (free_line_header_voidp): Use delete.
12584         (add_include_dir): Replace with ...
12585         (line_header::add_include_dir): ... this method.  Use std::vector.
12586         (add_file_name): Replace with ...
12587         (line_header::add_file_name): ... this method.  Use std::vector.
12588         (add_include_dir_stub): Delete.
12589         (read_formatted_entries): Remove memset.
12590         (dwarf_decode_line_header): Return a line_header_up instead of a
12591         raw pointer.  Remove cleanup handling.  Pass lambdas to
12592         read_formatted_entries.  Adjust to use line_header methods.
12593         (dwarf_decode_lines_1): Adjust to use line_header methods.
12594         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12595         use std::vector.
12596
12597 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
12598
12599         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12600         instead of struct ptid.
12601
12602 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
12603
12604         * frame.c (get_frame_register_bytes): Unwind using value.
12605         (put_frame_register_bytes): Likewise.
12606
12607 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
12608
12609         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12610         aggregate-like.
12611
12612 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
12613
12614         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12615
12616 2017-03-29  Yao Qi  <yao.qi@linaro.org>
12617
12618         * gdbthread.h (struct thread_info): Declare constructor and
12619         destructor.  Add some in-class member initializers.
12620         * thread.c (free_thread): Remove.
12621         (init_thread_list): Call delete instead of free_thread.
12622         (new_thread): Call thread_info constructor.
12623         (thread_info::thread_info): New function.
12624         (thread_info::~thread_info): New function.
12625         (delete_thread_1): Call delete instead of free_thread.
12626         (make_cleanup_restore_current_thread): Move tp and frame to
12627         inner block.
12628
12629 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12630
12631         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12632         (arc_skip_prologue): Likewise.
12633         (arc_make_frame_cache): Likewise.
12634         (arc_pv_get_operand): New function.
12635         (arc_is_in_prologue): Likewise.
12636         (arc_analyze_prologue): Likewise.
12637         (arc_print_frame_cache): Likewise.
12638         (MAX_PROLOGUE_LENGTH): New constant.
12639
12640 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12641
12642         * configure.tgt: Add arc-insn.o.
12643         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12644         (dump_arc_instruction_command): New function.
12645         (arc_fprintf_disasm): Likewise.
12646         (arc_disassemble_info): Likewise.
12647         (arc_insn_get_operand_value): Likewise.
12648         (arc_insn_get_operand_value_signed): Likewise.
12649         (arc_insn_get_memory_base_reg): Likewise.
12650         (arc_insn_get_memory_offset): Likewise.
12651         (arc_insn_get_branch_target): Likewise.
12652         (arc_insn_dump): Likewise.
12653         (arc_insn_get_linear_next_pc): Likewise.
12654         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12655         (arc_disassemble_info): Likewise.
12656         (arc_insn_get_branch_target): Likewise.
12657         (arc_insn_get_linear_next_pc): Likewise.
12658         * NEWS: Mention new "maint print arc arc-instruction".
12659
12660 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12661
12662         * arc-tdep (maintenance_print_arc_list): New variable.
12663         (maintenance_print_arc_command): New function.
12664
12665 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12666
12667         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12668         Add "limm" and "reserved".
12669         (arc_cannot_fetch_register, arc_cannot_store_register): Add
12670         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12671         * arc-tdep.h (arc_regnum): Likewise.
12672
12673 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12674
12675         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12676         for THREADPTR register.
12677         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12678         register.
12679         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12680         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12681         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12682
12683 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12684
12685         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12686         registers above gdbarch_num_regs (gdbarch) as privileged in
12687         call0 ABI.
12688
12689 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12690
12691         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12692         for a single specified register or for all registers in
12693         a0_base..a0_base + C0_NREGS range.
12694         (supply_gregset_reg): Call regcache_raw_supply for a single
12695         specified register or for all registers in a0_base..a0_base +
12696         C0_NREGS range.
12697
12698 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12699
12700         * arch/xtensa.h (C0_NREGS): Add definition.
12701         * xtensa-tdep.c (C0_NREGS): Remove definition.
12702
12703 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12704
12705         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
12706         Drop xtensa_default_isa initialization.
12707         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
12708
12709 2017-03-27  Pedro Alves  <palves@redhat.com>
12710
12711         * dwarf2read.c (file_entry) <dir_index>: Add comment.
12712         (file_entry::include_dir): New method.
12713         (line_header::include_dir_at, line_header::file_name_at): New
12714         methods.
12715         (setup_type_unit_groups, setup_type_unit_groups)
12716         (psymtab_include_file_name): Simplify using the new methods.
12717         (lnp_state_machine) <the_line_header>: New field.
12718         <file>: Add comment.
12719         (lnp_state_machine::current_file): New method.
12720         (dwarf_record_line): Simplify using the new methods.
12721         (init_lnp_state_machine): Initialize the "the_line_header" field.
12722         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
12723         Simplify using the new methods.
12724
12725 2017-03-27  Pedro Alves  <palves@redhat.com>
12726
12727         * cp-name-parser.y (make_empty): Delete.
12728         (demangler_special, nested_name, ptr_operator, array_indicator)
12729         (direct_declarator, declarator_1): Use fill_comp instead of
12730         make_empty.
12731
12732 2017-03-27  Pedro Alves  <palves@redhat.com>
12733
12734         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
12735         to ATTRIBUTE_PRINTF.
12736         * solib-target.c (library_list_start_list): Print "string" not
12737         "version".
12738         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
12739         gdb_xml_error call.
12740
12741 2017-03-27  Pedro Alves  <palves@redhat.com>
12742
12743         * dwarf2read.c (struct file_and_directory): New.
12744         (dwarf2_get_dwz_file): Adjust to use std::string.
12745         (dw2_get_file_names_reader): Adjust to use file_and_directory.
12746         (find_file_and_directory): Adjust to return a file_and_directory
12747         object.
12748         (read_file_scope): Adjust to use file_and_directory.  Remove
12749         make_cleanup/do_cleanups calls.
12750         (open_and_init_dwp_file): Adjust to use std::string.  Remove
12751         make_cleanup/do_cleanups calls.
12752         * python/python.c (do_start_initialization): Adjust to ldirname
12753         returning a std::string.
12754         * utils.c (ldirname): Now returns a std::string.
12755         * utils.h (ldirname): Change return type to std::string.
12756         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
12757         returning a std::string.
12758         * xml-tdesc.c (file_read_description_xml): Likewise.
12759
12760 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
12761
12762         * regcache.c (regcache_debug_print_register): New function.
12763         * regcache.h (regcache_debug_print_register): New declaration.
12764         * target.c (debug_print_register): Remove.
12765         (target_fetch_registers): Call regcache_debug_print_register.
12766         (target_store_registers): Likewise.
12767
12768 2017-03-24  Pádraig Brady  <pbrady@fb.com>
12769
12770         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
12771         reference beyond the 'lh->include_dirs' array before accessing to
12772         it.
12773         (psymtab_include_file_name): Likewise.
12774         (dwarf_decode_lines_1): Likewise.
12775         (dwarf_decode_lines): Likewise.
12776         (file_file_name): Likewise.
12777
12778 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
12779
12780         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
12781         inferior_ptid.
12782         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12783         ps_lsetfpregs): Likewise.
12784         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
12785         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12786         ps_lsetfpregs): Likewise.
12787         * target.c (target_fetch_registers, target_store_registers):
12788         Remove asserts.
12789
12790 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
12791
12792         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
12793
12794 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12795
12796         * aarch64-tdep.c (aarch64_process_record_test): Declare.
12797         (_initialize_aarch64_tdep): Register it.
12798         (aarch64_record_load_store): Handle PRFM instruction.
12799         (aarch64_process_record_test): New function.
12800
12801 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12802
12803         * aarch64-tdep.c (aarch64_record_load_store): Fix code
12804         indentation.
12805
12806 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12807
12808         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
12809
12810 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12811
12812         python/python.c (do_start_initialization): Fix memory leak.
12813
12814 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12815
12816         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
12817         using get_ptrace_pid.
12818         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12819         inferior_ptid.
12820         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12821         inferior_ptid instead of pid.
12822
12823 2017-03-22  Yao Qi  <yao.qi@linaro.org>
12824
12825         * aarch64-tdep.c: Wrap locally used classes in anonymous
12826         namespace.
12827         * arm-tdep.c: Likewise.
12828         * linespec.c: Likewise.
12829         * ui-out.c: Likewise.
12830
12831 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
12832
12833         PR gdb/19637
12834         * python/lib/gdb/printer/bound_registers.py: Import sys.
12835
12836 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12837
12838         * windows-nat.c (do_windows_fetch_inferior_registers): Add
12839         windows_thread_info parameter and use it instead of
12840         current_thread.
12841         (windows_fetch_inferior_registers): Don't set current_thread,
12842         pass the thread to do_windows_fetch_inferior_registers.  Use
12843         ptid from regcache instead of inferior_ptid.
12844         (do_windows_store_inferior_registers): Add windows_thread_info
12845         parameter and use it instead of current_thread.
12846         (windows_store_inferior_registers): Don't set current_thread,
12847         pass the thread to do_windows_store_inferior_registers.  Use
12848         ptid from regcache instead of inferior_ptid.
12849
12850 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12851
12852         * ser-mingw.c (ser_windows_raw): Remove reference to
12853         struct serial::current_timeout.
12854
12855 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
12856
12857         PR tdep/20928
12858         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
12859         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
12860         (sparc64_fsr_type): Fix %fsr decoding.
12861
12862 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
12863
12864         * python/py-record-btrace.c (btpy_insn_data): Change return type
12865         for Python 2.
12866
12867 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12868
12869         * spu-linux-nat.c (spu_fetch_inferior_registers,
12870         spu_store_inferior_registers): Use ptid from regcache, set and
12871         restore inferior_ptid.
12872         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
12873         Likewise.
12874
12875 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12876
12877         * i386-linux-nat.c (fetch_register, store_register,
12878         i386_linux_fetch_inferior_registers,
12879         i386_linux_store_inferior_registers): Use ptid from regcache.
12880         * ia64-linux-nat.c (ia64_linux_fetch_register,
12881         ia64_linux_store_register): Likewise.
12882         * inf-ptrace.c (inf_ptrace_fetch_register,
12883         inf_ptrace_store_register): Likewise.
12884         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
12885         m32r_linux_store_inferior_registers): Likewise.
12886         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
12887         m68kbsd_store_inferior_registers): Likewise.
12888         * m68k-linux-nat.c (fetch_register, store_register,
12889         m68k_linux_fetch_inferior_registers,
12890         m68k_linux_store_inferior_registers): Likewise.
12891         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
12892         m88kbsd_store_inferior_registers): Likewise.
12893         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
12894         mips_fbsd_store_inferior_registers): Likewise.
12895         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
12896         mips64_linux_regsets_store_registers): Likewise.
12897         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
12898         mipsnbsd_store_inferior_registers): Likewise.
12899         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
12900         mips64obsd_store_inferior_registers): Likewise.
12901         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
12902         Likewise.
12903         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
12904         ppcfbsd_store_inferior_registers): Likewise.
12905         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
12906         ppc_linux_store_inferior_registers): Likewise.
12907         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
12908         ppcnbsd_store_inferior_registers): Likewise.
12909         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
12910         ppcobsd_store_registers): Likewise.
12911         * procfs.c (procfs_fetch_registers, procfs_store_registers):
12912         Likewise.
12913         * ravenscar-thread.c (ravenscar_fetch_registers,
12914         ravenscar_store_registers, ravenscar_prepare_to_store):
12915         Likewise.
12916         * record-btrace.c (record_btrace_fetch_registers,
12917         record_btrace_store_registers, record_btrace_prepare_to_store):
12918         Likewise.
12919         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
12920         Lookup inferior using ptid from regcache, instead of
12921         current_inferior.
12922         * remote.c (remote_fetch_registers, remote_store_registers): Use
12923         ptid from regcache.
12924         * rs6000-nat.c (fetch_register, store_register): Likewise.
12925         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
12926         s390_linux_store_inferior_registers): Likewise.
12927         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
12928         shnbsd_store_inferior_registers): Likewise.
12929         * sol-thread.c (sol_thread_fetch_registers,
12930         sol_thread_store_registers): Likewise.
12931         * sparc-nat.c (sparc_fetch_inferior_registers,
12932         sparc_store_inferior_registers): Likewise.
12933         * tilegx-linux-nat.c (fetch_inferior_registers,
12934         store_inferior_registers): Likewise.
12935         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
12936         vaxbsd_store_inferior_registers): Likewise.
12937         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
12938         store_xtregs): Likewise.
12939
12940 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12941
12942         PR gdb/14441
12943         * NEWS: Mention support for rvalue references in GDB and python.
12944         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
12945         supports both lvalue and rvalue references.
12946
12947 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12948
12949         PR gdb/14441
12950         * gdbtypes.c (rank_one_type): Implement overloading
12951         resolution rules regarding rvalue references.
12952
12953 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12954
12955         PR gdb/14441
12956         * aarch64-tdep.c (aarch64_type_align)
12957         (aarch64_extract_return_value, aarch64_store_return_value): Change
12958         lvalue reference type checks to general reference type checks.
12959         * amd64-tdep.c (amd64_classify): Likewise.
12960         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
12961         Likewise.
12962         * arm-tdep.c (arm_type_align, arm_extract_return_value)
12963         (arm_store_return_value): Likewise.
12964         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
12965         * c-typeprint.c (c_print_type): Likewise.
12966         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
12967         (cplus_number_of_children, cplus_describe_child): Likewise.
12968         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
12969         * completer.c (expression_completer): Likewise.
12970         * cp-support.c (make_symbol_overload_list_adl_namespace):
12971         Likewise.
12972         * darwin-nat-info.c (info_mach_region_command): Likewise.
12973         * dwarf2loc.c (entry_data_value_coerce_ref)
12974         (value_of_dwarf_reg_entry): Likewise.
12975         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
12976         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
12977         Likewise.
12978         * findvar.c (extract_typed_address, store_typed_address):
12979         Likewise.
12980         * gdbtypes.c (rank_one_type): Likewise.
12981         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
12982         * infcall.c (value_arg_coerce): Likewise.
12983         * language.c (pointer_type): Likewise.
12984         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
12985         Likewise.
12986         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
12987         * mn10300-tdep.c (mn10300_type_align): Likewise.
12988         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
12989         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
12990         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
12991         Likewise.
12992         * printcmd.c (print_formatted, x_command): Likewise.
12993         * python/py-type.c (typy_get_composite, typy_template_argument):
12994         Likewise.
12995         * python/py-value.c (valpy_referenced_value)
12996         (valpy_get_dynamic_type, value_has_field): Likewise.
12997         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
12998         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
12999         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13000         * spu-tdep.c (spu_scalar_value_p): Likewise.
13001         * symtab.c (lookup_symbol_aux): Likewise.
13002         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13003         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13004         Likewise.
13005         * valops.c (value_cast_pointers, value_cast)
13006         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13007         (value_struct_elt, value_struct_elt_bitpos)
13008         (value_find_oload_method_list, find_overload_match)
13009         (value_rtti_indirect_type): Likewise.
13010         * valprint.c (val_print_scalar_type_p, generic_val_print):
13011         Likewise.
13012         * value.c (value_actual_type, value_as_address, unpack_long)
13013         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13014         (coerce_ref): Likewise.
13015         * varobj.c (varobj_get_value_type): Likewise.
13016
13017 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13018
13019         PR gdb/14441
13020         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13021         table of constants.
13022         * python/lib/gdb/command/explore.py: Support exploring values
13023         of rvalue reference types.
13024         * python/lib/gdb/types.py: Implement get_basic_type() for
13025         rvalue reference types.
13026         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13027         constant.
13028         * python/py-value.c (valpy_getitem): Add an rvalue reference
13029         check.
13030         (valpy_reference_value): Add new parameter "refcode".
13031         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13032         New wrappers for valpy_reference_value().
13033         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13034         (gdbpy_invoke_xmethod): Likewise.
13035
13036 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13037
13038         PR gdb/14441
13039         * dwarf2read.c (process_die, read_type_die_1): Handle the
13040         DW_TAG_rvalue_reference_type DIE.
13041         (read_tag_reference_type): Add new parameter "refcode".
13042
13043 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13044
13045         PR gdb/14441
13046         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13047         (c_type_print_modifier, c_type_print_varspec_suffix)
13048         (c_type_print_base): Support printing rvalue reference types.
13049         * c-valprint.c (c_val_print, c_value_print): Support printing
13050         rvalue reference values.
13051
13052 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13053
13054         PR gdb/14441
13055         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13056         typename.
13057         * cp-support.c (replace_typedefs): Handle
13058         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13059         * python/py-type.c (typy_lookup_type): Likewise.
13060
13061 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13062
13063         PR gdb/14441
13064         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13065         * parse.c (insert_type): Change assert statement.
13066         (follow_types): Handle rvalue reference types.
13067         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13068         constant.
13069
13070 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13071
13072         PR gdb/14441
13073         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13074         value_ref() interface.
13075         * c-valprint.c (c_value_print): Likewise.
13076         * infcall.c (value_arg_coerce): Likewise.
13077         * python/py-value.c (valpy_reference_value): Likewise.
13078         * valops.c (value_cast, value_reinterpret_cast)
13079         (value_dynamic_cast, typecmp): Likewise.
13080         (value_ref): Parameterize by kind of return value reference type.
13081         * value.h (value_ref): Add new parameter "refcode".
13082
13083 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13084
13085         PR gdb/14441
13086         * dwarf2read.c (read_tag_reference_type): Use
13087         lookup_lvalue_reference_type() instead of lookup_reference_type().
13088         * eval.c (evaluate_subexp_standard): Likewise.
13089         * f-exp.y: Likewise.
13090         * gdbtypes.c (make_reference_type, lookup_reference_type):
13091         Generalize with rvalue reference types.
13092         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13093         convenience wrappers for lookup_reference_type().
13094         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13095         reference kind parameter.
13096         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13097         wrappers for lookup_reference_type().
13098         * guile/scm-type.c (gdbscm_type_reference): Use
13099         lookup_lvalue_reference_type() instead of lookup_reference_type().
13100         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13101         * parse.c (follow_types): Likewise.
13102         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13103         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13104         Likewise.
13105         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13106         (gdbpy_invoke_xmethod): Likewise.
13107         * stabsread.c: Provide extra argument to make_reference_type()
13108         call.
13109         * valops.c (value_ref, value_rtti_indirect_type): Use
13110         lookup_lvalue_reference_type() instead of lookup_reference_type().
13111
13112 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13113
13114         PR gdb/14441
13115         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13116         (TYPE_IS_REFERENCE): New macro.
13117         (struct type): Add rvalue_reference_type field.
13118         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13119
13120 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13121
13122         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13123         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13124         New function definition.
13125         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13126         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13127         New function declaration.
13128         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13129         * mi/mi-interp.h: New file.
13130         * solib.c (info_sharedlibrary_command): Replace for loop with
13131         ALL_SO_LIBS macro
13132         * solib.h (update_solib_list): New function declaration.
13133         (so_list_head): Move macro.
13134         * solist.h (ALL_SO_LIBS): New macro.
13135
13136 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13137
13138         * infcmd.c (post_create_inferior): Remove unused argument in
13139         call to solib_add.
13140         * remote.c (remote_start_remote): Likewise.
13141         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13142         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13143         (enable_break): Likewise.
13144         * solib.c (update_solib_list): Remove unused target argument
13145         and its documentation.
13146         (solib_add): Remove unused target argument.  Remove unused
13147         argument in call to update_solib_list.
13148         (info_sharedlibrary_command): Remove unused argument in call
13149         to update_solib_list.
13150         (sharedlibrary_command): Remove unused argument in call to
13151         solib_add.
13152         (handle_solib_event): Likewise.
13153         (reload_shared_libraries): Likewise.
13154         * solib.h (solib_add): Remove unused target argument.
13155
13156 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13157
13158         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13159         (s390_displaced_step_fixup): Cover relative branches with the
13160         default fixup handling.  This fixes lack of support for some
13161         relative branch instructions.
13162
13163 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13164
13165         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13166         ptid from regcache.
13167
13168 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13169
13170         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13171         i386_darwin_store_inferior_registers): Use ptid from regcache.
13172
13173 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13174
13175         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13176         i386bsd_store_inferior_registers): Use ptid from regcache.
13177
13178 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13179
13180         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13181         hppaobsd_store_registers): Use ptid from regcache.
13182
13183 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13184
13185         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13186         hppanbsd_store_registers): Use ptid from regcache.
13187
13188 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13189
13190         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13191         from regcache.  Use get_ptrace_pid.
13192
13193 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13194
13195         * corelow.c (get_core_register_section): Use ptid from regcache,
13196         update doc.
13197
13198 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13199
13200         * bsd-uthread.c (bsd_uthread_fetch_registers,
13201         bsd_uthread_store_registers): Use ptid from regcache, set and
13202         restore inferior_ptid.
13203
13204 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13205
13206         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13207         fetch_fp_regs, store_register, store_regs, store_fp_register,
13208         store_fp_regs): Use ptid from regcache.
13209
13210 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13211
13212         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13213         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13214         store_vfp_regs): Use ptid from regcache.
13215
13216 2017-03-17  Pedro Alves  <palves@redhat.com>
13217
13218         PR remote/21188
13219         * ser-base.c (ser_base_wait_for): Add comment.
13220         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13221         version.
13222         * ser-unix.c (hardwire_raw): Remove reference to
13223         scb->current_timeout.
13224         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13225         (hardwire_ops): Install ser_base_readchar instead of
13226         hardwire_readchar.
13227         * serial.h (struct serial) <current_timeout, timeout_remaining>:
13228         Remove fields.
13229
13230 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
13231
13232         PR gdb/19637
13233         * python/lib/gdb/printer/bound_registers.py: Add support for
13234         Python 3.
13235
13236 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13237
13238         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13239         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13240         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13241         byte_offset to subobj_byte_offset.  Fix the handling of
13242         DWARF_VALUE_STACK on big-endian targets when coming via an
13243         implicit pointer.
13244         (dwarf2_evaluate_loc_desc): Adjust call to
13245         dwarf2_evaluate_loc_desc_full.
13246         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13247         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13248
13249 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13250
13251         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13252         and REVSH instructions.
13253
13254 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13255
13256         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13257         (arm_record_test): Declare.
13258         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13259         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13260         align with the manual.
13261         (thumb_record_misc): Adjust the code order to align with the
13262         manual.
13263         (thumb2_record_decode_insn_handler): Fix instruction matching.
13264         (instruction_reader_thumb): New class.
13265         (arm_record_test): New function.
13266
13267 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13268
13269         * arm-tdep.c (abstract_memory_reader): New class.
13270         (instruction_reader): New class.
13271         (extract_arm_insn): Add argument 'reader'.  Callers updated.
13272         (decode_insn): Likewise.
13273
13274 2017-03-16  Doug Evans  <dje@google.com>
13275
13276         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13277         member.  Change type of TYPE member to SCM.  All uses updated.
13278         (lsscm_make_lazy_string_smob): Add assert.
13279         (lsscm_make_lazy_string): Flag bad length values.
13280         (lsscm_elt_type): New function.
13281         (gdbscm_lazy_string_to_value): Rewrite to use
13282         lsscm_safe_lazy_string_to_value.
13283         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13284         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13285         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
13286         in incoming type.
13287         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13288         * guile/scm-type.c (tyscm_scm_to_type): New function.
13289
13290 2017-03-15  Doug Evans  <dje@google.com>
13291
13292         PR python/17728, python/18439, python/18779
13293         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13294         member.  Change type of TYPE member to PyObject *.  All uses updated.
13295         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13296         (gdbpy_create_lazy_string_object): Flag bad length values.
13297         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13298         Handle typedefs in incoming type.
13299         (stpy_lazy_string_elt_type): New function.
13300         (gdbpy_extract_lazy_string): Call it.
13301         * python/py-value.c (valpy_lazy_string): Flag bad length values.
13302         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
13303         typedefs in incoming type.
13304
13305 2017-03-16  Doug Evans  <dje@google.com>
13306
13307         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13308         * guile/scm-type.c (tyscm_scm_to_type): New function.
13309
13310 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
13311
13312         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13313         "ULONGEST" for "skip".
13314
13315 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13316
13317         PR gdb/21220
13318         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13319         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13320         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
13321         over ptrace peek/poke until end of buffer or error.
13322
13323 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
13324
13325         * parse.c (length_of_subexp): Make static.
13326         * parser-defs.h (length_of_subexp): Remove.
13327
13328 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13329
13330         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13331         as well.
13332
13333 2017-03-14  Pedro Alves  <palves@redhat.com>
13334
13335         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13336         (main): Use std::unique_ptr.  Remove calls to
13337         cp_demangled_name_parse_free.
13338
13339 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13340
13341         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13342         alphabsd_store_inferior_registers): Use regcache->ptid instead
13343         of inferior_ptid.
13344
13345 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13346
13347         * aix-thread.c (aix_thread_fetch_registers,
13348         aix_thread_store_registers): Use regcache->ptid instead of
13349         inferior_ptid.
13350
13351 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13352
13353         * aarch64-linux-nat.c (fetch_gregs_from_thread,
13354         store_gregs_to_thread, fetch_fpregs_from_thread,
13355         store_fpregs_to_thread): Use regcache->ptid instead of
13356         inferior_ptid.
13357
13358 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13359
13360         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13361         amd64_linux_fetch_inferior_registers): Use regcache->ptid
13362         instead of inferior_ptid.
13363
13364 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13365
13366         * target.c (target_fetch_registers, target_store_registers): Add
13367         assert.
13368
13369 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13370
13371         * regcache.h (regcache_get_ptid): New function.
13372         * regcache.c (regcache_get_ptid): New function.
13373
13374 2017-03-13  Mark Wielaard  <mark@klomp.org>
13375
13376         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13377
13378 2017-03-10  Keith Seitz  <keiths@redhat.com>
13379
13380         PR c++/8218
13381         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13382
13383 2017-03-08  Pedro Alves  <palves@redhat.com>
13384
13385         PR gdb/18360
13386         * infrun.c (start_step_over, do_target_resume, resume)
13387         (restart_threads): Assert we're not resuming a thread that is
13388         meant to be stopped.
13389         (infrun_thread_stop_requested_callback): Delete.
13390         (infrun_thread_stop_requested): If the thread is internally
13391         stopped, queue a pending stop event and clear the thread's
13392         inline-frame state.
13393         (handle_stop_requested): New function.
13394         (handle_syscall_event, handle_inferior_event_1): Use
13395         handle_stop_requested.
13396         (handle_stop_requested): New function.
13397         (handle_signal_stop): Set the thread's stop_signal here instead of
13398         at caller.
13399         (finish_step_over): Clear step over info unconditionally.
13400         (handle_signal_stop): If the user had interrupted the event
13401         thread, consider the stop a random signal.
13402         (handle_signal_stop) <signal arrived while stepping over
13403         breakpoint>: Don't restart threads here.
13404         (stop_waiting): Don't clear step-over info here.
13405
13406 2017-03-08  Pedro Alves  <palves@redhat.com>
13407
13408         PR 21206
13409         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13410         goes to argument 2, not 1.
13411
13412 2017-03-08  Pedro Alves  <palves@redhat.com>
13413
13414         PR cli/21218
13415         * top.c (gdb_readline_wrapper): Avoid passing NULL to
13416         display_gdb_prompt.
13417         (command_line_input): Add comment.
13418
13419 2017-03-08  Pedro Alves  <palves@redhat.com>
13420
13421         PR tui/21216
13422         * tui/tui-file.c (tui_file::write): New.
13423         * tui/tui-file.h (tui_file): Override "write".
13424         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13425         factored out from ...
13426         (tui_puts): ... here.
13427         (tui_putc): Use them.
13428         (tui_write): New function.
13429         * tui/tui-io.h (tui_write): Declare.
13430
13431 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
13432
13433         * Makefile.in (SFILES): Replace "environ.c" with
13434         "common/environ.c".
13435         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13436         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
13437         to...
13438         * common/environ.c: ... here.
13439         * environ.h: Moved to...
13440         * common/environ.h: ... here.
13441
13442 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13443
13444         * gdbarch.sh (pstring_ptr): New static function.
13445         (gdbarch_disassembler_options): Use it.
13446         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13447         not valid_disassembler_option->name.
13448         * gdbarch.c: Regenerate.
13449
13450 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13451
13452         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13453
13454 2017-03-07  Pedro Alves  <palves@redhat.com>
13455
13456         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13457
13458 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13459
13460         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13461         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13462         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13463         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13464
13465 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
13466
13467         * xtensa-linux-nat.c (fetch_gregs): Remove const.
13468
13469 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
13470
13471         * remote.c (remote_add_target_side_commands): Use range-based
13472         for loop.
13473
13474 2017-03-03  Yao Qi  <yao.qi@linaro.org>
13475
13476         PR gdb/21165
13477         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13478         value is lazy.
13479         * valprint.c (common_val_print): Likewise.
13480
13481 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
13482
13483         * NEWS: Mention new set/show disassembler-options commands.
13484         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13485         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13486         (prospective_options): New static variable.
13487         (gdb_disassembler::gdb_disassembler): Initialize
13488         m_di.disassembler_options.
13489         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13490         (get_disassembler_options): New function.
13491         (set_disassembler_options): Likewise.
13492         (set_disassembler_options_sfunc): Likewise.
13493         (show_disassembler_options_sfunc): Likewise.
13494         (disassembler_options_completer): Likewise.
13495         (_initialize_disasm): Likewise.
13496         * disasm.h (get_disassembler_options): New prototype.
13497         (set_disassembler_options): Likewise.
13498         * gdbarch.sh (gdbarch_disassembler_options): New variable.
13499         (gdbarch_verify_disassembler_options): Likewise.
13500         * gdbarch.c: Regenerate.
13501         * gdbarch.h: Likewise.
13502         * arm-tdep.c (num_disassembly_options): Delete.
13503         (set_disassembly_style): Likewise.
13504         (arm_disassembler_options): New static variable.
13505         (set_disassembly_style_sfunc): Convert short style name into long
13506         option name.  Call set_disassembler_options.
13507         (show_disassembly_style_sfunc): New function.
13508         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13509         set_gdbarch_verify_disassembler_options.
13510         (_initialize_arm_tdep): Delete regnames variable and update callers.
13511         (arm_disassembler_options): Initialize.
13512         (disasm_options): New variable.
13513         (num_disassembly_options): Rename from this...
13514         (num_disassembly_styles): ...to this.  Compute by scanning through
13515         disasm_options.
13516         (valid_disassembly_styles): Initialize using disasm_options.
13517         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13518         set_arm_regname_option.
13519         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13520         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13521         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13522         set_gdbarch_verify_disassembler_options.
13523         * s390-tdep.c (s390_disassembler_options): New static variable.
13524         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13525         set_gdbarch_verify_disassembler_options.
13526
13527 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13528
13529         * remote.c (remote_add_target_side_condition): Remove "struct"
13530         keyword from range-based for loop.
13531
13532 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13533
13534         * remote.c (remote_add_target_side_condition): Use range-based
13535         for loop.  Update comment.
13536
13537 2017-02-27  Yao Qi  <yao.qi@linaro.org>
13538
13539         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13540
13541 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
13542
13543         * regcache.c (regcache_raw_update): New function.
13544         (regcache_raw_read): Move code to regcache_raw_update.
13545         * regcache.h (regcache_raw_update): New declaration.
13546         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13547
13548 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
13549
13550         * dwarf2read.c (create_debug_type_hash_table): Initialize
13551         header.signature and header.type_offset_in_tu.
13552
13553 2017-02-24  Pedro Alves  <palves@redhat.com>
13554
13555         * symtab.c (make_file_symbol_completion_list_1): Use
13556         add_symtab_completions.
13557
13558 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13559
13560         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13561
13562 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13563
13564         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13565         I386_MAX_REGISTER_SIZE.
13566         (i386_pseudo_register_write): Likewise.
13567         (i386_process_record): Likewise.
13568         * i387-tdep.c (i387_supply_xsave): Likewise.
13569         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13570         (store_register): Likewise.
13571
13572 2017-02-23  Pedro Alves  <palves@redhat.com>
13573
13574         * ada-lang.c: Include "common/function-view.h".
13575         (ada_iterate_over_symbols): Adjust to use function_view as
13576         callback type.
13577         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13578         (ada_make_symbol_completion_list): Use a lambda.
13579         (ada_exc_search_name_matches): Delete.
13580         (name_matches_regex): New.
13581         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13582         * compile/compile-c-support.c: Include "common/function-view.h".
13583         (print_one_macro): Change prototype to accept a ui_file pointer.
13584         (write_macro_definitions): Use a lambda.
13585         * dwarf2read.c: Include "common/function-view.h".
13586         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13587         (dw2_expand_symtabs_matching): Adjust to use function_view as
13588         callback type.
13589         * language.h: Include "common/function-view.h".
13590         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13591         function_view as callback type.
13592         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13593         * linespec.c: Include "common/function-view.h".
13594         (collect_info::add_symbol): New method.
13595         (struct symbol_and_data_callback, iterate_inline_only, struct
13596         symbol_matcher_data, iterate_name_matcher): Delete.
13597         (iterate_over_all_matching_symtabs): Adjust to use function_view
13598         as callback type and lambdas.
13599         (iterate_over_file_blocks): Adjust to use function_view as
13600         callback type.
13601         (decode_compound_collector): Now a class with private fields.
13602         (decode_compound_collector::release_symbols): New method.
13603         (collect_one_symbol): Rename to...
13604         (decode_compound_collector::operator()): ... this and adjust.
13605         (lookup_prefix_sym): decode_compound_collector construction bits
13606         move to decode_compound_collector ctor.  Pass the
13607         decode_compound_collector object directly as callback.  Remove
13608         cleanups and use decode_compound_collector::release_symbols
13609         instead.
13610         (symtab_collector): Now a class with private fields.
13611         (symtab_collector::release_symtabs): New method.
13612         (add_symtabs_to_list): Rename to...
13613         (symtab_collector::operator()): ... this and adjust.
13614         (collect_symtabs_from_filename): symtab_collector construction
13615         bits move to symtab_collector ctor.  Pass the symtab_collector
13616         object directly as callback.  Remove cleanups and use
13617         symtab_collector::release_symtabs instead.
13618         (collect_symbols): Delete.
13619         (add_matching_symbols_to_info): Use lambdas.
13620         * macrocmd.c (print_macro_callback): Delete.
13621         (info_macro_command): Use a lambda.
13622         (info_macros_command): Pass print_macro_definition as callable
13623         directly.
13624         (print_one_macro): Remove 'ignore' parameter.
13625         (macro_list_command): Adjust.
13626         * macrotab.c (macro_for_each_data::fn): Now a function_view.
13627         (macro_for_each_data::user_data): Delete field.
13628         (foreach_macro): Adjust to call the function_view.
13629         (macro_for_each): Adjust to use function_view as callback type.
13630         (foreach_macro_in_scope): Adjust to call the function_view.
13631         (macro_for_each_in_scope): Adjust to use function_view as callback
13632         type.
13633         * macrotab.h: Include "common/function-view.h".
13634         (macro_callback_fn): Declare a prototype instead of a pointer.
13635         Remove "user_data" parameter.
13636         (macro_for_each, macro_for_each_in_scope): Adjust to use
13637         function_view as callback type.
13638         * psymtab.c (partial_map_expand_apply)
13639         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13640         Adjust to use function_view as callback type and to return bool.
13641         (psym_expand_symtabs_matching): Adjust to use function_view as
13642         callback types.
13643         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13644         to use function_view as callback type and to return bool.
13645         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13646         callback types.
13647         * symfile.c (expand_symtabs_matching): Adjust to use function_view
13648         as callback types.
13649         * symfile.h: Include "common/function-view.h".
13650         (expand_symtabs_file_matcher_ftype)
13651         (expand_symtabs_symbol_matcher_ftype)
13652         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13653         return bool.
13654         (quick_symbol_functions::map_symtabs_matching_filename)
13655         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13656         function_view as callback type and return bool.
13657         (expand_symtabs_matching): Adjust to use function_view as callback
13658         type.
13659         (maintenance_expand_name_matcher)
13660         (maintenance_expand_file_matcher): Delete.
13661         (maintenance_expand_symtabs): Use lambdas.
13662         * symtab.c (iterate_over_some_symtabs): Adjust to use
13663         function_view as callback types and return bool.
13664         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
13665         of a cleanup.
13666         (lookup_symtab_callback): Delete.
13667         (lookup_symtab): Use a lambda.
13668         (iterate_over_symbols): Adjust to use function_view as callback
13669         type.
13670         (struct search_symbols_data, search_symbols_file_matches)
13671         (search_symbols_name_matches): Delete.
13672         (search_symbols): Use a pair of lambdas.
13673         (struct add_name_data, add_macro_name, symbol_completion_matcher)
13674         (symtab_expansion_callback): Delete.
13675         (default_make_symbol_completion_list_break_on_1): Use lambdas.
13676         * symtab.h: Include "common/function-view.h".
13677         (iterate_over_some_symtabs): Adjust to use function_view as
13678         callback type and return bool.
13679         (iterate_over_symtabs): Adjust to use function_view as callback
13680         type.
13681         (symbol_found_callback_ftype): Remove 'data' parameter and return
13682         bool.
13683         (iterate_over_symbols): Adjust to use function_view as callback
13684         type.
13685
13686 2017-02-23  Pedro Alves  <palves@redhat.com>
13687
13688         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
13689         (%.o) <unittests/%.c>: New pattern.
13690         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
13691         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
13692         * common/function-view.h: New file.
13693         * unittests/function-view-selftests.c: New file.
13694         * configure: Regenerate.
13695
13696 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
13697
13698         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
13699         inferior_ptid.
13700         * go32-nat.c (go32_thread_alive): Likewise.
13701
13702 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13703
13704         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
13705         delete.
13706
13707 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13708
13709         * varobj.c (varobj_clear_saved_item): Use delete instead of
13710         xfree.
13711         (update_dynamic_varobj_children): Likewise.
13712
13713 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13714
13715         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
13716
13717 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
13718
13719         * common/enum-flags.h (enum_flags::enum_flags): Initialize
13720         m_enum_value to 0 in default constructor.
13721
13722 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
13723
13724         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
13725         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
13726         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
13727         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
13728         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
13729         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
13730         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
13731         IS_STORE_CONDITIONAL_INSN.
13732
13733 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13734
13735         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
13736
13737 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13738
13739         * NEWS (Changes since GDB 7.12): Add DWARF-5.
13740
13741 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13742
13743         * dwarf2read.c (skip_one_die, read_attribute_value)
13744         (dwarf2_const_value_attr, dump_die_shallow)
13745         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
13746         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
13747
13748 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13749
13750         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
13751         (dwarf_parse_macro_header): Accept DWARF version 5.
13752         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
13753
13754 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13755
13756         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
13757         DW_AT_GNU_*.
13758         * common/common-exceptions.h (enum errors): Likewise.
13759         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
13760         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
13761         (dwarf_expr_context::execute_stack_op): Likewise.
13762         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
13763         Likewise.
13764         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
13765         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
13766         (show_entry_values_debug, call_site_to_target_addr)
13767         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
13768         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
13769         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
13770         (value_of_dwarf_block_entry, indirect_pieced_value)
13771         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
13772         (disassemble_dwarf_expression): Likewise.
13773         * dwarf2read.c (process_die, inherit_abstract_dies)
13774         (read_call_site_scope): Likewise.
13775         * gdbtypes.h (struct func_type, struct call_site_parameter)
13776         (struct call_site): Likewise.
13777         * stack.c (read_frame_arg): Likewise.
13778         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
13779
13780 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13781
13782         * defs.h (read_unsigned_leb128): New declaration.
13783         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
13784         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
13785         (dwarf2_find_location_expression): Call also
13786         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
13787         * dwarf2loc.h (dwarf2_version): New declaration.
13788         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
13789         rnglists.
13790         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
13791         .debug_rnglists.
13792         (struct dwop_section_names): Add loclists_dwo.
13793         (dwop_section_names): Add .debug_loclists.dwo.
13794         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
13795         (struct dwarf2_per_cu_data): Add dwarf_version.
13796         (struct dwo_sections): Add loclists.
13797         (struct attr_abbrev): Add implicit_const.
13798         (read_indirect_line_string): New declaration.
13799         (read_unsigned_leb128): Delete declaration.
13800         (rcuh_kind): New definition.
13801         (read_and_check_comp_unit_head): Change parameter
13802         is_debug_types_section to section_kind.
13803         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
13804         (read_comp_unit_head): Change parameter abfd to section, add parameter
13805         section_kind.  Handle DWARF-5.
13806         (error_check_comp_unit_head): Accept also DWARF version 5.
13807         (read_and_check_comp_unit_head): Change parameter
13808         is_debug_types_section to section_kind.
13809         (read_and_check_type_unit_head): Delete function.
13810         (read_abbrev_offset): Handle DWARF-5.
13811         (create_debug_type_hash_table): Add parameter section_kind.  Process
13812         only DW_UT_type.  Use signature and type_offset_in_tu from struct
13813         comp_unit_head.
13814         (create_debug_types_hash_table): Update create_debug_type_hash_table
13815         caller.
13816         (create_all_type_units): Call create_debug_type_hash_table.
13817         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
13818         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13819         caller.
13820         (skip_one_die): Handle DW_FORM_implicit_const.
13821         (dwarf2_rnglists_process): New function.
13822         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13823         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13824         (read_attribute_value): Handle DW_FORM_implicit_const,
13825         DW_FORM_line_strp.
13826         (read_attribute): Handle DW_FORM_implicit_const.
13827         (read_indirect_string_at_offset_from): New function from
13828         read_indirect_string_at_offset.
13829         (read_indirect_string_at_offset): Call
13830         read_indirect_string_at_offset_from.
13831         (read_indirect_line_string_at_offset): New function.
13832         (read_indirect_string): New function comment.
13833         (read_indirect_line_string): New function.
13834         (read_unsigned_leb128): Make it global.
13835         (dwarf2_string_attr): Handle DWARF-5.
13836         (add_include_dir_stub, read_formatted_entries): New functions.
13837         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
13838         Handle DWARF-5.
13839         (per_cu_header_read_in): Update read_comp_unit_head caller.
13840         (dwarf2_version): New function.
13841         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
13842         rnglists.
13843         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
13844         fields.
13845
13846 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13847
13848         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
13849
13850 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13851
13852         * dwarf2read.c (dwarf2_ranges_process): New function from
13853         dwarf2_ranges_read.
13854         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
13855         dwarf2_ranges_process.
13856
13857 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13858
13859         * dwarf2read.c (create_debug_type_hash_table): New function from
13860         create_debug_types_hash_table.
13861         (create_debug_types_hash_table): Call create_debug_type_hash_table.
13862         (create_all_type_units, open_and_init_dwo_file): Update
13863         create_debug_types_hash_table callers.
13864
13865 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13866
13867         PR gdb/16188
13868         * fork-child.c (trace_start_error): Fix thinko.  va_end should
13869         refer to 'ap', not 'args'.
13870
13871 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13872             Pedro Alves  <palves@redhat.com>
13873
13874         PR gdb/16188
13875         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
13876         calls succeeded.
13877         * fork-child.c (trace_start_error): New function.
13878         (trace_start_error_with_name): Likewise.
13879         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
13880         * inf-ptrace.c (inf_ptrace_me): Likewise.
13881         * inferior.h (trace_start_error): New prototype.
13882         (trace_start_error_with_name): Likewise.
13883
13884 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
13885
13886         PR gdb/21164
13887         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
13888         NULL before using it.
13889         * symmisc.c (maintenance_print_symbols): Likewise.
13890         (maintenance_print_msymbols): Likewise.
13891
13892 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13893
13894         * NEWS: Add record Python bindings entry.
13895
13896 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13897
13898         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
13899         py-record-full.o.
13900         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
13901         * python/py-record-btrace.c, python/py-record-btrace.h,
13902         python/py-record-full.c, python/py-record-full.h: New file.
13903         * python/py-record.c: Add include for py-record-btrace.h and
13904         py-record-full.h.
13905         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
13906         recpy_instruction_history, recpy_function_call_history, recpy_begin,
13907         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
13908         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
13909         New definition.
13910         (gdbpy_initialize_btrace): New export.
13911         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
13912
13913 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13914
13915         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
13916         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
13917         * python/py-record.c: New file.
13918         * python/python-internal.h (gdbpy_start_recording,
13919         gdbpy_current_recording, gdpy_stop_recording,
13920         gdbpy_initialize_record): New export.
13921         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
13922         (python_GdbMethods): Add gdbpy_start_recording,
13923         gdbpy_current_recording and gdbpy_stop_recording.
13924
13925 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13926
13927         * record-btrace.c (record_btrace_record_method): New function.
13928         (init_record_btrace_ops): Initialize to_record_method.
13929         * record-full.c (record_full_record_method): New function.
13930         (init_record_full_ops, init_record_full_core_ops): Add
13931         record_full_record_method.
13932         * record.h (enum record_method): New enum.
13933         * target-debug.h (target_debug_print_enum_record_method: New define.
13934         * target-delegates.c: Regenerate.
13935         * target.c (target_record_method): New function.
13936         * target.h: Include record.h.
13937         (struct target_ops) <to_record_method>: New field.
13938         (target_record_method): New export.
13939
13940 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13941
13942         * record.h (record_start, record_stop): New export.
13943         * record.c (record_start, record_stop): New function.
13944
13945 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13946
13947         * btrace.c (btrace_fetch): Copy function call segments pointer
13948         into a vector.
13949         (btrace_clear): Clear the vector.
13950         (btrace_find_insn_by_number): Use binary search to find the correct
13951         function call segment.
13952         * btrace.h (brace_fun_p): New typedef.
13953         (struct btrace_thread_info) <functions>: New field.
13954
13955 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13956
13957         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
13958         * btrace.c (btrace_decode_error): ... here.  New function.
13959         * btrace.h (btrace_decode_error): New export.
13960
13961 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13962
13963         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
13964         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
13965         btrace_find_insn_by_number): Remove special case for gaps.
13966         * btrace.h (btrace_insn_get_error): New export.
13967         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
13968         * record-btrace.c (btrace_insn_history): Print number for gaps.
13969         (record_btrace_info, record_btrace_goto): Handle gaps.
13970
13971 2017-02-14  Tom Tromey  <tom@tromey.com>
13972
13973         PR python/13598:
13974         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
13975         event.
13976         * python/py-evts.c (gdbpy_initialize_py_events): Add
13977         before_prompt registry.
13978         * python/py-events.h (events_object) <before_prompt>: New field.
13979
13980 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
13981
13982         * btrace.c (ftrace_new_switch): Preserve up link and flags.
13983
13984 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
13985
13986         * symfile (_initialize_symfile): Add usage text to the load command's
13987         help text.
13988
13989 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
13990
13991         * utils.c (defaulted_query): Don't query on secondary UIs.
13992
13993 2017-02-10  Tom Tromey  <tom@tromey.com>
13994
13995         * rust-lang.c (rust_get_disr_info): Remove unused variable.
13996
13997 2017-02-10  Tom Tromey  <tom@tromey.com>
13998
13999         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14000         "cleanup" local.
14001         * python/py-type.c (typy_legacy_template_argument): Remove
14002         unnecessary "cleanup" local.
14003
14004 2017-02-10  Tom Tromey  <tom@tromey.com>
14005
14006         * python/python.c (do_start_initialization): New function, from
14007         _initialize_python.
14008         (_initialize_python): Call do_start_initialization.
14009         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14010         goto.
14011
14012 2017-02-10  Tom Tromey  <tom@tromey.com>
14013
14014         * python/py-prettyprint.c (pretty_print_one_value): Use
14015         gdbpy_ref.
14016
14017 2017-02-10  Tom Tromey  <tom@tromey.com>
14018
14019         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14020         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14021         gdbpy_ref.
14022         * python/py-type.c (field_new): Use gdbpy_ref.
14023         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14024         gdbpy_ref.
14025         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14026         (py_free_pspace): Likewise.
14027         (pspace_to_pspace_object): Likewise.
14028         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14029         (py_free_objfile): Likewise.
14030         (objfile_to_objfile_object): Likewise.
14031         * python/py-inferior.c (delete_thread_object): Use
14032         gdbpy_ref.
14033         (infpy_read_memory): Likewise.
14034         (py_free_inferior): Likewise.
14035         * python/py-evtregistry.c (create_eventregistry_object): Use
14036         gdbpy_ref.
14037         * python/py-event.c (create_event_object): Use gdbpy_ref.
14038
14039 2017-02-10  Tom Tromey  <tom@tromey.com>
14040
14041         * python/py-ref.h (gdbpy_ref_policy): Now a template.
14042         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14043         used.
14044         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14045         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14046         python/py-exitedevent.c, python/py-finishbreakpoint.c,
14047         python/py-framefilter.c, python/py-function.c,
14048         python/py-inferior.c, python/py-infevents.c,
14049         python/py-linetable.c, python/py-newobjfileevent.c,
14050         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14051         python/py-signalevent.c, python/py-stopevent.c,
14052         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14053         python/py-unwind.c, python/py-utils.c, python/py-value.c,
14054         python/py-varobj.c, python/py-xmethods.c, python/python.c,
14055         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14056
14057 2017-02-10  Tom Tromey  <tom@tromey.com>
14058
14059         * ui-out.h (ui_out_emit_type): New class.
14060         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14061         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14062         and ui_out_emit_tuple.
14063         (enumerate_locals): Likewise.
14064         (py_mi_print_variables, py_print_locals, py_print_args): Use
14065         ui_out_emit_list.
14066         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14067         ui_out_emit_list.
14068         * common/gdb_optional.h: New file.
14069
14070 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14071
14072         * MAINTAINERS (Write After Approval): Update my e-mail address.
14073
14074 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14075
14076         PR gdb/21122
14077         * breakpoint.c (_initialize_breakpoint): Update the help description
14078         of the 'commands' command to indicate that it takes a list argument.
14079
14080 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
14081
14082         * interps.c (current_interp_set_logging): Remove "return".
14083
14084 2017-02-09  Gary Benson  <gbenson@redhat.com>
14085
14086         * symtab.c (add_symtab_completions): Prevent NULL pointer
14087         dereference.
14088
14089 2017-02-08  Pedro Alves  <palves@redhat.com>
14090
14091         * interps.c (interp::interp): Remove reference to quiet_p.
14092         (interp_set): Make static.  Remove dead "Switching to" output
14093         code.
14094         (interp_quiet_p, interp_set_quiet): Delete.
14095         (interpreter_exec_cmd): Don't set the interpreter quiet.
14096         * interps.h (interp_quiet_p): Make static.
14097         (class interp) <quiet_p>: Remove field
14098
14099 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14100
14101         * cli/cli-decode.c (find_command_name_length): Make it extern.
14102         * cli/cli-decode.h (find_command_name_length): Declare.
14103         * cli/cli-script.c (command_name_equals, line_first_arg):
14104         New functions.
14105         (process_next_line): Use cli-decode to parse command names.
14106         (build_command_line): Make args a constant pointer.
14107
14108 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14109
14110         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14111         Remove case-insensitive search.
14112
14113 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
14114
14115         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14116         at the end of the line.  Avoids an ARI warning.
14117
14118 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
14119
14120         * NEWS: Mention support for record/replay of Intel 64 rdrand and
14121         rdseed instructions.
14122         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14123
14124 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
14125
14126         PR tdep/20936
14127         Provide and use sparc32 and sparc64 target description XML files.
14128         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14129         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14130         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14131         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14132         * features/sparc/sparc32-solaris.xml: New file.
14133         * features/sparc/sparc64-solaris.xml: New file.
14134         * features/sparc/sparc32-solaris.c: Generated.
14135         * features/sparc/sparc64-solaris.c: Generated.
14136         * sparc-tdep.h: Account for differences in target descriptions.
14137         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14138         (sparc32_register_type): Use target provided registers.
14139         (validate_tdesc_registers): New function.
14140         (sparc32_gdbarch_init): Use tdesc_has_registers.
14141         Set pseudoregister functions.
14142         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14143         (sparc64_register_type): Use target provided registers.
14144         (sparc64_init_abi): Set pseudoregister functions.
14145
14146 2017-02-03  Tom Tromey  <tom@tromey.com>
14147
14148         PR rust/21097:
14149         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14150         with a single member.
14151
14152 2017-02-03  Pedro Alves  <palves@redhat.com>
14153
14154         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14155         (cli_interp_base::~cli_interp_base): New.
14156         (cli_interp): New struct.
14157         (as_cli_interp): Cast the interp itself to cli_interp.
14158         (cli_interpreter_pre_command_loop): Rename to ...
14159         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
14160         parameter.
14161         (cli_interpreter_init): Rename to ...
14162         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
14163         boolean.  Make extern.
14164         (cli_interpreter_resume): Rename to ...
14165         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
14166         extern.
14167         (cli_interpreter_suspend): Rename to ...
14168         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
14169         extern.
14170         (cli_interpreter_exec): Rename to ...
14171         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
14172         extern.
14173         (cli_interpreter_supports_command_editing): Rename to ...
14174         (cli_interp_base::supports_command_editing): ... this.  Remove
14175         'interp' parameter.  Make extern.
14176         (cli_ui_out): Rename to ...
14177         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
14178         Make extern.
14179         (cli_set_logging): Rename to ...
14180         (cli_interp_base::set_logging): ... this.  Remove 'interp'
14181         parameter.  Make extern.
14182         (cli_interp_procs): Delete.
14183         (cli_interp_factory): Adjust to use "new".
14184         * cli/cli-interp.h: Include "interps.h".
14185         (struct cli_interp_base): New struct.
14186         * interps.c (struct interp): Delete.  Fields moved to interps.h.
14187         (interp_new): Delete.
14188         (interp::interp, interp::~interp): New.
14189         (interp_set): Use bool, and return void.  Assume the interpreter
14190         has suspend, init and resume methods, and that the all return
14191         void.
14192         (set_top_level_interpreter): interp_set returns void.
14193         (interp_ui_out): Adapt.
14194         (current_interp_set_logging): Adapt.
14195         (interp_data): Delete.
14196         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14197         (interp_exec): Adapt.
14198         (top_level_interpreter_data): Delete.
14199         * interps.h (interp_init_ftype, interp_resume_ftype)
14200         (interp_suspend_ftype, interp_exec_ftype)
14201         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14202         (class interp): New.
14203         (interp_new): Delete.
14204         (interp_set): Now returns void.  Use bool.
14205         (interp_data, top_level_interpreter_data): Delete.
14206         * mi/mi-common.h: Include interps.h.
14207         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
14208         init, resume, suspect, exec, interp_ui_out, set_logging and
14209         pre_command_loop methods.
14210         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14211         (mi_interpreter_init): Rename to ...
14212         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
14213         bool, return void and make extern.  Adjust.
14214         (mi_interpreter_resume): ... Rename to ...
14215         (mi_interp::resume): ... this.  Remove the 'data' parameter,
14216         return void and make extern.  Adjust.
14217         (mi_interpreter_suspend): ... Rename to ...
14218         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
14219         return void and make extern.  Adjust.
14220         (mi_interpreter_exec): ... Rename to ...
14221         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
14222         extern.  Adjust.
14223         (mi_interpreter_pre_command_loop): ... Rename to ...
14224         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
14225         parameter and make extern.
14226         (mi_on_normal_stop_1): Adjust.
14227         (mi_ui_out): Rename to ...
14228         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
14229         parameter and make extern.  Adjust.
14230         (mi_set_logging): Rename to ...
14231         (mi_interp::set_logging): ... this.  Remove the 'interp'
14232         parameter and make extern.  Adjust.
14233         (mi_interp_procs): Delete.
14234         (mi_interp_factory): Adjust to use 'new'.
14235         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14236         (mi_print_exception, mi_execute_command, mi_load_progress):
14237         Adjust.
14238         * tui/tui-interp.c (tui_interp): New class.
14239         (as_tui_interp): Return a tui_interp pointer.
14240         (tui_on_normal_stop, tui_on_signal_received)
14241         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14242         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14243         to use interp::interp_ui_out.
14244         (tui_init): Rename to ...
14245         (tui_interp::init): ... this.  Remove the 'self' parameter, use
14246         bool, return void and make extern.  Adjust.
14247         (tui_resume): Rename to ...
14248         (tui_interp::resume): ... this.  Remove the 'data' parameter,
14249         return void and make extern.  Adjust.
14250         (tui_suspend): Rename to ...
14251         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
14252         return void and make extern.  Adjust.
14253         (tui_ui_out): Rename to ...
14254         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
14255         parameter, and make extern.  Adjust.
14256         (tui_exec): Rename to ...
14257         (tui_interp::exec): ... this.  Remove the 'data' parameter and
14258         make extern.
14259         (tui_interp_procs): Delete.
14260         (tui_interp_factory): Use "new".
14261
14262 2017-02-02  Tom Tromey  <tom@tromey.com>
14263
14264         * rust-exp.y (ends_raw_string, space_then_number)
14265         (rust_identifier_start_p): Return bool.
14266         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14267         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14268         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14269         (rust_chartype_p): Return bool.
14270         (val_print_struct, rust_print_struct_def, rust_print_type):
14271         Update.
14272         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14273         Return bool.
14274
14275 2017-02-02  Tom Tromey  <tom@tromey.com>
14276
14277         * rust-lang.c: Reindent.
14278
14279 2017-02-02  Tom Tromey  <tom@tromey.com>
14280
14281         * rust-lang.h (rust_crate_for_block): Update.
14282         * rust-lang.c (rust_crate_for_block): Return std::string.
14283         (rust_get_disr_info): Use std:;string, not
14284         gdb::unique_xmalloc_ptr.
14285         * rust-exp.y (crate_name): Update.
14286
14287 2017-02-02  Pedro Alves  <palves@redhat.com>
14288
14289         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14290         field out of gdb_disassembler_test and make it static.
14291
14292 2017-02-02  Pedro Alves  <palves@redhat.com>
14293
14294         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14295         mi1_interp and mi_interp fields.
14296
14297 2017-02-02  Pedro Alves  <palves@redhat.com>
14298
14299         * cli/cli-interp.c (struct saved_output_files, saved_output):
14300         Moved from cli/cli-logging.c.
14301         (cli_set_logging): New function.
14302         (cli_interp_procs): Install cli_set_logging.
14303         * cli/cli-interp.h (make_logging_output, cli_set_logging):
14304         Declare.
14305         * cli/cli-logging.c (struct saved_output_files, saved_output):
14306         Moved to cli/cli-interp.c.
14307         (pop_output_files): Don't save outputs here.
14308         (make_logging_output): New function.
14309         (handle_redirections): Don't build tee nor save previous outputs
14310         here.
14311         * interps.c (current_interp_set_logging): Change prototype.
14312         Assume there's always a set_logging_proc method installed.
14313         * interps.h (interp_set_logging_ftype): Change prototype.
14314         (current_interp_set_logging): Change prototype and adjust comment.
14315         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
14316         use make_logging_output.
14317         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14318 2017-02-02  Pedro Alves  <palves@redhat.com>
14319
14320         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14321         from ...
14322         (set_logging_overwrite): ... here.
14323         (logging_no_redirect_file): Delete.
14324         (set_logging_redirect): Don't handle redirection on the fly.
14325         Instead warn that "logging off" / "logging on" is necessary.
14326         (pop_output_files): Delete references to logging_no_redirect_file.
14327         (show_logging_command): Always speak in terms of what will happen
14328         once logging is reenabled.
14329
14330 2017-02-02  Pedro Alves  <palves@redhat.com>
14331
14332         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14333
14334 2017-02-02  Pedro Alves  <palves@redhat.com>
14335
14336         * disasm.c (gdb_pretty_print_insn): Rename to ...
14337         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14338         Remove gdbarch parameter.  Adapt to clear the object's buffers
14339         instead of allocating new buffers, and to print using the object's
14340         gdb_disassembler instead of calling gdb_print_insn.
14341         (dump_insns): Use gdb_pretty_print_disassembler.
14342         * disasm.h (gdb_pretty_print_insn): Delete declaration.
14343         (gdb_pretty_print_disassembler): New class.
14344         * record-btrace.c (btrace_insn_history): Use
14345         gdb_pretty_print_disassembler.
14346
14347 2017-02-02  Pedro Alves  <palves@redhat.com>
14348
14349         * ada-lang.c (type_as_string): Use string_file.
14350         * ada-valprint.c (ada_print_floating): Use string_file.
14351         * ada-varobj.c (ada_varobj_scalar_image)
14352         (ada_varobj_get_value_image): Use string_file.
14353         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14354         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14355         * breakpoint.c (update_inserted_breakpoint_locations)
14356         (insert_breakpoint_locations, reattach_breakpoints)
14357         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14358         (print_it_watchpoint): Use string_file.
14359         (save_breakpoints): Use stdio_file.
14360         * c-exp.y (oper): Use string_file.
14361         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14362         tee_file.
14363         (pop_output_files): Use delete.
14364         (handle_redirections): Use stdio_file and tee_file.
14365         * cli/cli-setshow.c (do_show_command): Use string_file.
14366         * compile/compile-c-support.c (c_compute_program): Use
14367         string_file.
14368         * compile/compile-c-symbols.c (generate_vla_size): Take a
14369         'string_file &' instead of a 'ui_file *'.
14370         (generate_c_for_for_one_variable): Take a 'string_file &' instead
14371         of a 'ui_file *'.  Use string_file.
14372         (generate_c_for_variable_locations): Take a 'string_file &'
14373         instead of a 'ui_file *'.
14374         * compile/compile-internal.h (generate_c_for_for_one_variable):
14375         Take a 'string_file &' instead of a 'ui_file *'.
14376         * compile/compile-loc2c.c (push, pushf, unary, binary)
14377         (print_label, pushf_register_address, pushf_register)
14378         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14379         'ui_file *'.  Adjust.
14380         * compile/compile.c (compile_to_object): Use string_file.
14381         * compile/compile.h (compile_dwarf_expr_to_c)
14382         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14383         'ui_file *'.
14384         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14385         (replace_typedefs_qualified_name): Use string_file and
14386         obstack_copy0.
14387         * disasm.c (gdb_pretty_print_insn): Use string_file.
14388         (gdb_disassembly): Adjust reference the null_stream global.
14389         (do_ui_file_delete): Delete.
14390         (gdb_insn_length): Use null_stream.
14391         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14392         * dwarf2loc.c (dwarf2_compile_property_to_c)
14393         (locexpr_generate_c_location, loclist_generate_c_location): Take a
14394         'string_file &' instead of a 'ui_file *'.
14395         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14396         * dwarf2read.c (do_ui_file_peek_last): Delete.
14397         (dwarf2_compute_name): Use string_file.
14398         * event-top.c (gdb_setup_readline): Use stdio_file.
14399         * gdbarch.sh (verify_gdbarch): Use string_file.
14400         * gdbtypes.c (safe_parse_type): Use null_stream.
14401         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14402         string_file.
14403         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14404         'string_file *' instead of a 'ui_file *'.
14405         (gdbscm_arch_disassemble): Use string_file.
14406         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14407         * guile/scm-ports.c (class ioscm_file_port): Now a class that
14408         inherits from ui_file.
14409         (ioscm_file_port_delete, ioscm_file_port_rewind)
14410         (ioscm_file_port_put): Delete.
14411         (ioscm_file_port_write): Rename to ...
14412         (ioscm_file_port::write): ... this.  Remove file_port_magic
14413         checks.
14414         (ioscm_file_port_new): Delete.
14415         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14416         ui_file_up.
14417         * guile/scm-type.c (tyscm_type_name): Use string_file.
14418         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14419         Use string_file.
14420         * infcmd.c (print_return_value_1): Use string_file.
14421         * infrun.c (print_target_wait_results): Use string_file.
14422         * language.c (add_language): Use string_file.
14423         * location.c (explicit_to_string_internal): Use string_file.
14424         * main.c (captured_main_1): Use null_file.
14425         * maint.c (maintenance_print_architecture): Use stdio_file.
14426         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14427         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14428         event_channel>: Change type to mi_console_file pointer.
14429         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14430         (mi_console_file_delete): Delete.
14431         (struct mi_console_file): Delete.
14432         (mi_console_file_magic): Delete.
14433         (mi_console_file_new): Delete.
14434         (mi_console_file::mi_console_file): New.
14435         (mi_console_file_delete): Delete.
14436         (mi_console_file_fputs): Delete.
14437         (mi_console_file::write): New.
14438         (mi_console_raw_packet): Delete.
14439         (mi_console_file::flush): New.
14440         (mi_console_file_flush): Delete.
14441         (mi_console_set_raw): Rename to ...
14442         (mi_console_file::set_raw): ... this.
14443         * mi/mi-console.h (class mi_console_file): New class.
14444         (mi_console_file_new, mi_console_set_raw): Delete.
14445         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14446         (mi_set_logging): Use delete and tee_file.  Adjust.
14447         * mi/mi-main.c (output_register): Use string_file.
14448         (mi_cmd_data_evaluate_expression): Use string_file.
14449         (mi_cmd_data_read_memory): Use string_file.
14450         (mi_cmd_execute, print_variable_or_computed): Use string_file.
14451         * mi/mi-out.c (mi_ui_out::main_stream): New.
14452         (mi_ui_out::rewind): Use main_stream and
14453         string_file.
14454         (mi_ui_out::put): Use main_stream and string_file.
14455         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14456         Allocate a 'string_file' instead.
14457         (mi_out_new): Don't allocate a mem_fileopen stream here.
14458         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14459         (mi_ui_out::main_stream): Declare method.
14460         * printcmd.c (eval_command): Use string_file.
14461         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14462         * python/py-arch.c (archpy_disassemble): Use string_file.
14463         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14464         * python/py-frame.c (frapy_str): Use string_file.
14465         * python/py-framefilter.c (py_print_type, py_print_single_arg):
14466         Use string_file.
14467         * python/py-type.c (typy_str): Use string_file.
14468         * python/py-unwind.c (unwind_infopy_str): Use string_file.
14469         * python/py-value.c (valpy_str): Use string_file.
14470         * record-btrace.c (btrace_insn_history): Use string_file.
14471         * regcache.c (regcache_print): Use stdio_file.
14472         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14473         * remote.c (escape_buffer): Use string_file.
14474         * rust-lang.c (rust_get_disr_info): Use string_file.
14475         * serial.c (serial_open_ops_1): Use stdio_file.
14476         (do_serial_close): Use delete.
14477         * stack.c (print_frame_arg): Use string_file.
14478         (print_frame_args): Remove local mem_fileopen stream, not used.
14479         (print_frame): Use string_file.
14480         * symmisc.c (maintenance_print_symbols): Use stdio_file.
14481         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14482         Take a 'string_file *' instead of a 'ui_file *'.
14483         * top.c (new_ui): Use stdio_file and stderr_file.
14484         (free_ui): Use delete.
14485         (execute_command_to_string): Use string_file.
14486         (quit_confirm): Use string_file.
14487         * tracepoint.c (collection_list::append_exp): Use string_file.
14488         * tui/tui-disasm.c (tui_disassemble): Use string_file.
14489         * tui/tui-file.c: Don't include "ui-file.h".
14490         (enum streamtype, struct tui_stream): Delete.
14491         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14492         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14493         (tui_file::tui_file): New method.
14494         (tui_file_fputs): Delete.
14495         (tui_file_get_strbuf): Delete.
14496         (tui_file::puts): New method.
14497         (tui_file_adjust_strbuf): Delete.
14498         (tui_file_flush): Delete.
14499         (tui_file::flush): New method.
14500         * tui/tui-file.h: Tweak intro comment.
14501         Include ui-file.h.
14502         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14503         (tui_file_adjust_strbuf): Delete declarations.
14504         (class tui_file): New class.
14505         * tui/tui-io.c (tui_initialize_io): Use tui_file.
14506         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14507         (tui_register_format): Use string_stream.
14508         * tui/tui-stack.c (tui_make_status_line): Use string_file.
14509         (tui_get_function_from_frame): Use string_file.
14510         * typeprint.c (type_to_string): Use string_file.
14511         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14512         (null_stream): New global.
14513         (ui_file_delete): Delete.
14514         (ui_file::ui_file): New.
14515         (null_file_isatty): Delete.
14516         (ui_file::~ui_file): New.
14517         (null_file_rewind): Delete.
14518         (ui_file::printf): New.
14519         (null_file_put): Delete.
14520         (null_file_flush): Delete.
14521         (ui_file::putstr): New.
14522         (null_file_write): Delete.
14523         (ui_file::putstrn): New.
14524         (null_file_read): Delete.
14525         (ui_file::putc): New.
14526         (null_file_fputs): Delete.
14527         (null_file_write_async_safe): Delete.
14528         (ui_file::vprintf): New.
14529         (null_file_delete): Delete.
14530         (null_file::write): New.
14531         (null_file_fseek): Delete.
14532         (null_file::puts): New.
14533         (ui_file_data): Delete.
14534         (null_file::write_async_safe): New.
14535         (gdb_flush, ui_file_isatty): Adjust.
14536         (ui_file_put, ui_file_rewind): Delete.
14537         (ui_file_write): Adjust.
14538         (ui_file_write_for_put): Delete.
14539         (ui_file_write_async_safe, ui_file_read): Adjust.
14540         (ui_file_fseek): Delete.
14541         (fputs_unfiltered): Adjust.
14542         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14543         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14544         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14545         (set_ui_file_data): Delete.
14546         (string_file::~string_file, string_file::write)
14547         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14548         (do_ui_file_as_string, ui_file_as_string): Delete.
14549         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14550         (struct mem_file): Delete.
14551         (mem_file_new): Delete.
14552         (stdio_file::stdio_file): New.
14553         (mem_file_delete): Delete.
14554         (stdio_file::stdio_file): New.
14555         (mem_fileopen): Delete.
14556         (stdio_file::~stdio_file): New.
14557         (mem_file_rewind): Delete.
14558         (stdio_file::set_stream): New.
14559         (mem_file_put): Delete.
14560         (stdio_file::open): New.
14561         (mem_file_write): Delete.
14562         (stdio_file_magic, struct stdio_file): Delete.
14563         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14564         (stdio_file::flush): New.
14565         (stdio_file_read): Rename to ...
14566         (stdio_file::read): ... this.  Adjust.
14567         (stdio_file_write): Rename to ...
14568         (stdio_file::write): ... this.  Adjust.
14569         (stdio_file_write_async_safe): Rename to ...
14570         (stdio_file::write_async_safe) ... this.  Adjust.
14571         (stdio_file_fputs): Rename to ...
14572         (stdio_file::puts) ... this.  Adjust.
14573         (stdio_file_isatty): Delete.
14574         (stdio_file_fseek): Delete.
14575         (stdio_file::isatty): New.
14576         (stderr_file_write): Rename to ...
14577         (stderr_file::write) ... this.  Adjust.
14578         (stderr_file_fputs): Rename to ...
14579         (stderr_file::puts) ... this.  Adjust.
14580         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14581         (stderr_file::stderr_file): New.
14582         (tee_file_magic): Delete.
14583         (struct tee_file): Delete.
14584         (tee_file::tee_file): New.
14585         (tee_file_new): Delete.
14586         (tee_file::~tee_file): New.
14587         (tee_file_delete): Delete.
14588         (tee_file_flush): Rename to ...
14589         (tee_file::flush): ... this.  Adjust.
14590         (tee_file_write): Rename to ...
14591         (tee_file::write): ... this.  Adjust.
14592         (tee_file::write_async_safe): New.
14593         (tee_file_fputs): Rename to ...
14594         (tee_file::puts): ... this.  Adjust.
14595         (tee_file_isatty): Rename to ...
14596         (tee_file::isatty): ... this.  Adjust.
14597         * ui-file.h (struct obstack, struct ui_file): Don't
14598         forward-declare.
14599         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14600         (ui_file_write_ftype)
14601         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14602         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14603         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14604         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14605         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14606         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14607         (set_ui_file_fseek): Delete.
14608         (ui_file_data, ui_file_delete, ui_file_rewind)
14609         (struct ui_file): New.
14610         (ui_file_up): New.
14611         (class null_file): New.
14612         (null_stream): Declare.
14613         (ui_file_write_for_put, ui_file_put): Delete.
14614         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14615         Delete.
14616         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14617         (gdb_fopen, tee_file_new): Delete.
14618         (struct string_file): New.
14619         (struct stdio_file): New.
14620         (stdio_file_up): New.
14621         (struct stderr_file): New.
14622         (class tee_file): New.
14623         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14624         of a 'ui_file *'.  Adjust.
14625         * ui-out.h (class ui_out) <field_stream>: Likewise.
14626         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14627         (null_stream): Delete.
14628         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14629         Adjust.
14630         * utils.h (struct ui_file): Delete forward declaration..
14631         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14632         (error_stream): Take a 'string_file &' instead of a
14633         'ui_file *'.
14634         * varobj.c (varobj_value_get_print_value): Use string_file.
14635         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14636         * gdbarch.c: Regenerate.
14637
14638 2017-02-02  Pedro Alves  <palves@redhat.com>
14639
14640         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14641         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
14642         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
14643         Adjust to call gdb_print_insn instead of
14644         gdb_disassembler::print_insn.
14645         (dump_insns, do_mixed_source_and_assembly_deprecated)
14646         (do_mixed_source_and_assembly, do_assembly_only): Add back a
14647         'gdbarch' parameter.  Remove gdb_disassembler parameter.
14648         (gdb_disassembly): Don't allocate a gdb_disassembler here.
14649         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14650         declaration.
14651         (gdb_pretty_print_insn): Re-add declaration.
14652         * record-btrace.c (btrace_insn_history): Don't allocate a
14653         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
14654
14655 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
14656
14657         * disasm.h (gdb_disassembly): Remove file_string parameter.
14658         * disasm.c (gdb_disassembly): Likewise.
14659         * cli/cli-cmds.c (print_disassembly): Adapt.
14660         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14661         * stack.c (do_gdb_disassembly): Likewise.
14662
14663 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14664
14665         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14666         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14667         targets.  And if the implicit value is longer than needed, extract
14668         the first bytes instead of the "least significant" ones.
14669
14670 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14671
14672         * btrace.c (btrace_enable): Do not call btrace_add_pc for
14673         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14674         (btrace_fetch): Assert can_access_registers_ptid.
14675         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14676         validate_registers_access.
14677
14678 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14679
14680         * gdbthread.h (can_access_registers_ptid): New.
14681         * thread.c (can_access_registers_ptid): New.
14682
14683 2017-02-01  Pedro Alves  <palves@redhat.com>
14684
14685         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14686
14687 2017-01-31  Pedro Alves  <palves@redhat.com>
14688
14689         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
14690         Fix typos.
14691
14692 2017-01-31  Pedro Alves  <palves@redhat.com>
14693
14694         * stack.c (print_frame_args): Remove local mem_fileopen stream,
14695         not used.
14696
14697 2017-01-31  Pedro Alves  <palves@redhat.com>
14698
14699         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
14700
14701 2017-01-31  Pedro Alves  <palves@redhat.com>
14702
14703         * common/scoped_restore.h
14704         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
14705         change the value's parameter type to T2.
14706         (make_scoped_restore): Likewise.
14707
14708 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14709             Richard Henderson  <rth@redhat.com>
14710
14711         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
14712         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
14713         GS_BASE for older kernels.
14714         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
14715         GS_BASE for older kernels.
14716         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
14717         and GS_BASE to the offset table.
14718         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
14719         system register group.
14720         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
14721         for older kernels.
14722         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
14723         amd64 ABI.
14724         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
14725         AMD64_GSBASE_REGNUM.
14726         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
14727         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
14728         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
14729         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
14730         i386/64bit-segments.xml in those rules.
14731         * features/i386/64bit-segments.xml: New file.
14732         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
14733         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
14734         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
14735         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
14736         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
14737         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
14738         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
14739         * features/i386/amd64-avx-linux.c: Regenerated.
14740         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
14741         * features/i386/amd64-avx-mpx.c: Regenerated.
14742         * features/i386/amd64-avx512-linux.c: Regenerated.
14743         * features/i386/amd64-linux.c: Regenerated.
14744         * features/i386/amd64-mpx-linux.c: Regenerated.
14745         * features/i386/i386-avx-mpx-linux.c: Regenerated.
14746         * features/i386/i386-avx-mpx.c: Regenerated.
14747         * features/i386/x32-avx-linux.c: Regenerated.
14748         * features/i386/x32-avx512-linux.c: Regenerated.
14749         * regformats/i386/amd64-avx-linux.dat: Regenerated.
14750         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
14751         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
14752         * regformats/i386/amd64-linux.dat: Regenerated.
14753         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
14754         * regformats/i386/x32-avx-linux.dat: Regenerated.
14755         * regformats/i386/x32-avx512-linux.dat: Regenerated.
14756         * regformats/i386/x32-linux.dat: Regenerated.
14757
14758 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14759
14760         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
14761         Set to AMD64_NUM_REGS.
14762
14763 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14764
14765         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
14766         that checks validity of a register number.
14767
14768 2017-01-27  Kees Cook  <keescook@google.com>
14769
14770         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
14771         fetch_fpregs if target has fpa registers.
14772         (arm_linux_store_inferior_registers): Call store_fpregs if target
14773         has fpa registers.
14774
14775 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14776
14777         * cris-tdep.c (cris_gdbarch_init): Remove check for
14778         info.byte_order and force it to BFD_ENDIAN_LITTLE.
14779
14780 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
14781
14782         * corelow.c (get_core_register_section): Check for regset
14783         existence before checking for REGSET_VARIABLE_SIZE.
14784
14785 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14786             Pedro Alves  <palves@redhat.com>
14787
14788         PR gdb/20939
14789         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
14790         call memory_error, save memaddr instead.
14791         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
14792         negative, cal memory_error.
14793         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
14794
14795 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14796
14797         * disasm-selftests.c (memory_error_test): New function.
14798         (_initialize_disasm_selftests): Register memory_error_test.
14799
14800 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14801
14802         * Makefile.in (SFILES): Add disasm-selftests.c and
14803         selftest-arch.c.
14804         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
14805         * disasm-selftests.c: New file.
14806         * selftest-arch.c: New file.
14807         * selftest-arch.h: New file.
14808
14809 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14810
14811         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
14812         to bfd_arch_mep.  Don't return 0 if section is not
14813         found.  Call print_insn_mep.
14814
14815 2017-01-26  Pedro Alves  <palves@redhat.com>
14816             Yao Qi  <yao.qi@linaro.org>
14817
14818         * arm-tdep.c: Include "disasm.h".
14819         (gdb_print_insn_arm): Update code to get gdbarch.
14820         * disasm.c (dis_asm_read_memory): Change it to
14821         gdb_disassembler::dis_asm_read_memory.
14822         (dis_asm_memory_error): Likewise.
14823         (dis_asm_print_address): Likewise.
14824         (gdb_pretty_print_insn): Change it to
14825         gdb_disassembler::pretty_print_insn.
14826         (dump_insns): Add one argument gdb_disassemlber.  All
14827         callers updated.
14828         (do_mixed_source_and_assembly_deprecated): Likewise.
14829         (do_mixed_source_and_assembly): Likewise.
14830         (do_assembly_only): Likewise.
14831         (gdb_disassembler::gdb_disassembler): New.
14832         (gdb_disassembler::print_insn): New.
14833         * disasm.h (class gdb_disassembler): New.
14834         (gdb_pretty_print_insn): Remove declaration.
14835         (gdb_disassemble_info): Likewise.
14836         * guile/scm-disasm.c (class gdbscm_disassembler): New.
14837         (gdbscm_disasm_read_memory_worker): Update.
14838         (gdbscm_disasm_read_memory): Update.
14839         (gdbscm_disasm_memory_error): Remove.
14840         (gdbscm_disasm_print_address): Remove.
14841         (gdbscm_disassembler::gdbscm_disassembler): New.
14842         (gdbscm_print_insn_from_port): Update.
14843         * mips-tdep.c: Include disasm.h.
14844         (gdb_print_insn_mips): Update code to get gdbarch.
14845         * record-btrace.c (btrace_insn_history): Update.
14846         * spu-tdep.c: Include disasm.h.
14847         (struct spu_dis_asm_data): Remove.
14848         (struct spu_dis_asm_info): New.
14849         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
14850         SPU id.
14851         (gdb_print_insn_spu): Cast disassemble_info to
14852         spu_dis_asm_info.
14853
14854 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14855
14856         * disasm.c (do_ui_file_delete): Delete.
14857         (gdb_insn_length): Move code creating stream to ...
14858         * utils.c (null_stream): ... here.  New function.
14859         * utils.h (null_stream): Declare.
14860
14861 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
14862
14863         * python/py-inferior.c (find_thread_object): Return directly
14864         from the loop.  Remove "found" variable.
14865
14866 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
14867
14868         GDB 7.12.1 released.
14869
14870 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14871
14872         * python/py-function.c (fnpy_call): Reorder declarations to have
14873         the gdbpy_enter object declared first.
14874         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
14875
14876 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14877
14878         PR python/21068
14879         * python/python-internal.h (PyMem_RawMalloc): Define for
14880         Python < 3.4.
14881         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
14882         PyMem_RawMalloc instead of PyMem_Malloc.
14883
14884 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
14885             Luis Machado  <lgustavo@codesourcery.com>
14886
14887         * NEWS (New commands): Mention flash-erase.
14888         (New MI commands): Mention target-flash-erase.
14889         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
14890         command.
14891         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
14892         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
14893         * target.c (flash_erase_command): New function.
14894         (initialize_targets): Add new flash-erase command.
14895         * target.h (flash_erase_command): New declaration.
14896
14897 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
14898
14899         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
14900         HAVE_SYS_PROCFS_H is defined.
14901
14902 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14903
14904         * remote.c (struct cached_reg): Change data into a pointer.
14905         * (stop_reply_dtr): Free data pointers before deleting vector.
14906         (process_stop_reply): Likewise.
14907         (remote_parse_stop_reply): Allocate space for data
14908
14909 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14910
14911         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
14912         MAX_REGISTER_SIZE.
14913         (amd64_pseudo_register_read_value): Likewise.
14914         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
14915         (store_register_using_P): Likewise.
14916         * regcache.c (regcache_xfer_part): Likewise.
14917
14918 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
14919
14920         Split real and pseudo registers.
14921         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
14922         (sparc32_pseudo_regnum): New enum.
14923         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
14924         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
14925         (SPARC32_CP0_REGISTERS): New macro.
14926         (sparc32_pseudo_register_name): New function.
14927         (sparc32_register_name): Use sparc32_pseudo_register_name.
14928         (sparc32_pseudo_register_type): New function.
14929         (sparc32_register_type): Use sparc32_pseudo_register_type.
14930         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
14931         pseudo register numbers.
14932         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
14933         (SPARC64_CP0_REGISTERS): New macro.
14934         (sparc64_pseudo_register_name): New function.
14935         (sparc64_register_name): Use sparc64_pseudo_register_name.
14936         (sparc64_pseudo_register_type): New function.
14937         (sparc64_register_type): Use sparc64_pseudo_register_type.
14938         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
14939         pseudo register numbers.
14940         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
14941         sparc64_store_arguments): Handle pseudo register numbers.
14942
14943 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14944
14945         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
14946         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
14947         output.
14948         (getpkt_or_notif_sane_1): Likewise.
14949
14950 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14951
14952         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
14953         of CC.  Pass "-x c++-header" instead of "-x c".
14954
14955 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14956
14957         * remote.c (remote_can_async_p): Update comment.
14958
14959 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14960
14961         * linux-nat.c (linux_nat_can_async_p): Update comment.
14962
14963 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14964
14965         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
14966
14967 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
14968
14969         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
14970
14971 2017-01-10  Tom Tromey  <tom@tromey.com>
14972
14973         * python/py-type.c (typy_legacy_template_argument): Update.
14974         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
14975         ~demangle_parse_info): Declare new members.
14976         (cp_demangled_name_to_comp): Return unique_ptr.
14977         (cp_demangled_name_parse_free)
14978         (make_cleanup_cp_demangled_name_parse_free)
14979         (cp_new_demangle_parse_info): Remove.
14980         * cp-support.c (do_demangled_name_parse_free_cleanup)
14981         (make_cleanup_cp_demangled_name_parse_free): Remove.
14982         (inspect_type, cp_canonicalize_string_full)
14983         (cp_canonicalize_string): Update.
14984         (mangled_name_to_comp): Change return type.
14985         (cp_class_name_from_physname, method_name_from_physname)
14986         (cp_func_name, cp_remove_params): Update.
14987         * cp-name-parser.y (demangle_parse_info): New constructor, from
14988         cp_new_demangle_parse_info.
14989         (~demangle_parse_info): New destructor, from
14990         cp_demangled_name_parse_free.
14991         (cp_merge_demangle_parse_infos): Update.
14992         (cp_demangled_name_to_comp): Change return type.
14993
14994 2017-01-10  Tom Tromey  <tom@tromey.com>
14995
14996         * top.c (prevent_dont_repeat): Change return type.
14997         * python/python.c (execute_gdb_command): Use std::string.
14998         Update.
14999         * guile/guile.c (gdbscm_execute_gdb_command): Update.
15000         * command.h (prevent_dont_repeat): Change return type.
15001         * breakpoint.c (bpstat_do_actions_1): Update.
15002
15003 2017-01-10  Tom Tromey  <tom@tromey.com>
15004
15005         * value.h (scoped_value_mark::~scoped_value_mark): Call
15006         free_to_mark.
15007         (scoped_value_mark::free_to_mark): New method.
15008         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15009         scoped_value_mark.
15010
15011 2017-01-10  Tom Tromey  <tom@tromey.com>
15012
15013         * python/py-value.c (valpy_dereference, valpy_referenced_value)
15014         (valpy_reference_value, valpy_const_value, valpy_get_address)
15015         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15016         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15017         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15018         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15019         scoped_value_mark.
15020         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15021         * value.h (scoped_value_mark): New class.
15022
15023 2017-01-10  Tom Tromey  <tom@tromey.com>
15024
15025         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15026         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15027         * psymtab.c (discard_psymtabs_upto): Remove.
15028         (make_cleanup_discard_psymtabs): Remove.
15029         (struct psymtab_state): Remove.
15030
15031 2017-01-10  Tom Tromey  <tom@tromey.com>
15032
15033         * record-full.c (record_full_save_cleanups): Remove.
15034         (record_full_save): Use gdb::unlinker.
15035         * gcore.c (do_bfd_delete_cleanup): Remove.
15036         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
15037         cleanups.
15038         * dwarf2read.c (unlink_if_set): Remove.
15039         (write_psymtabs_to_index): Use gdb::unlinker.
15040         * common/gdb_unlinker.h: New file.
15041
15042 2017-01-10  Tom Tromey  <tom@tromey.com>
15043
15044         * windows-tdep.c (windows_xfer_shared_library): Update.
15045         * windows-nat.c (windows_make_so): Update.
15046         * utils.h (make_cleanup_bfd_unref): Remove.
15047         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15048         * symfile.h (symfile_bfd_open)
15049         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15050         * symfile.c (read_symbols, symbol_file_add)
15051         (separate_debug_file_exists): Update.
15052         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15053         (generic_load, reread_symbols): Update.
15054         * symfile-mem.c (symbol_file_add_from_memory): Update.
15055         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15056         (spu_symbol_file_add_from_memory): Update.
15057         * solist.h (struct target_so_ops) <bfd_open>: Return
15058         gdb_bfd_ref_ptr.
15059         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15060         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15061         gdb_bfd_ref_ptr.
15062         (solib_map_sections, reload_shared_libraries_1): Update.
15063         * solib-svr4.c (enable_break): Update.
15064         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15065         * solib-frv.c (enable_break2): Update.
15066         * solib-dsbt.c (enable_break): Update.
15067         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15068         gdb_bfd_ref_ptr.
15069         (darwin_solib_get_all_image_info_addr_at_init): Update.
15070         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15071         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15072         * record-full.c (record_full_save): Update.
15073         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15074         * procfs.c (insert_dbx_link_bpt_in_file): Update.
15075         * minidebug.c (find_separate_debug_file_in_section): Return
15076         gdb_bfd_ref_ptr.
15077         * machoread.c (macho_add_oso_symfile): Change abfd to
15078         gdb_bfd_ref_ptr.
15079         (macho_symfile_read_all_oso): Update.
15080         (macho_check_dsym): Return gdb_bfd_ref_ptr.
15081         (macho_symfile_read): Update.
15082         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15083         (jit_bfd_try_read_symtab): Update.
15084         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15085         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15086         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15087         gdb_bfd_ref_ptr.
15088         (gdb_bfd_ref_policy): New struct.
15089         (gdb_bfd_ref_ptr): New typedef.
15090         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15091         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15092         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15093         gdb_bfd_ref_ptr.
15094         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15095         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15096         (gcore_command): Update.
15097         * exec.c (exec_file_attach): Update.
15098         * elfread.c (elf_symfile_read): Update.
15099         * dwarf2read.c (dwarf2_get_dwz_file): Update.
15100         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15101         (open_and_init_dwo_file): Update.
15102         (open_dwp_file): Return gdb_bfd_ref_ptr.
15103         (open_and_init_dwp_file): Update.
15104         * corelow.c (core_open): Update.
15105         * compile/compile-object-load.c (compile_object_load): Update.
15106         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15107         * coffread.c (coff_symfile_read): Update.
15108         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15109         gdb_bfd_ref_ptr.  Rename.
15110         (dump_bfd_file, restore_command): Update.
15111         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15112         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15113         (find_separate_debug_file_by_buildid): Update.
15114
15115 2017-01-10  Tom Tromey  <tom@tromey.com>
15116
15117         * common/gdb_ref_ptr.h: New file.
15118         * python/py-ref.h (struct gdbpy_ref_policy): New.
15119         (gdbpy_ref): Now a typedef.
15120
15121 2017-01-10  Tom Tromey  <tom@tromey.com>
15122
15123         * utils.h (make_cleanup_htab_delete): Don't declare.
15124         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15125         Remove.
15126         * linespec.c (decode_compound_collector): Add constructor,
15127         destructor.
15128         (lookup_prefix_sym): Remove cleanup.
15129         (symtab_collector): Add constructor, destructor.
15130         (collect_symtabs_from_filename): Remove cleanup.
15131         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15132         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15133         Use htab_up.
15134         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15135         * dwarf2read.c (dw2_expand_symtabs_matching)
15136         (dw2_map_symbol_filenames, dwarf_decode_macros)
15137         (write_psymtabs_to_index): Use htab_up.
15138         * dwarf2loc.c (func_verify_no_selftailcall)
15139         (call_site_find_chain_1, func_verify_no_selftailcall)
15140         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15141         std::vector, gdb::unique_xmalloc_ptr.
15142         (call_sitep): Remove typedef.
15143         (dwarf2_locexpr_baton_eval): Remove unused variable.
15144
15145 2017-01-10  Tom Tromey  <tom@tromey.com>
15146
15147         * python/python-internal.h (make_cleanup_py_decref)
15148         (make_cleanup_py_xdecref): Don't declare.
15149         * python/py-utils.c (py_decref, make_cleanup_py_decref)
15150         (py_xdecref, make_cleanup_py_xdecref): Remove.
15151
15152 2017-01-10  Tom Tromey  <tom@tromey.com>
15153
15154         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15155         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15156
15157 2017-01-10  Tom Tromey  <tom@tromey.com>
15158
15159         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15160
15161 2017-01-10  Tom Tromey  <tom@tromey.com>
15162
15163         * python/py-utils.c (unicode_to_encoded_string)
15164         (python_string_to_target_string)
15165         (python_string_to_target_python_string)
15166         (python_string_to_host_string, gdbpy_obj_to_string)
15167         (get_addr_from_python): Use gdbpy_ref.
15168
15169 2017-01-10  Tom Tromey  <tom@tromey.com>
15170
15171         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15172         gdbpy_ref.
15173
15174 2017-01-10  Tom Tromey  <tom@tromey.com>
15175
15176         * python/python.c (eval_python_command, gdbpy_decode_line)
15177         (gdbpy_run_events, gdbpy_start_type_printers)
15178         (gdbpy_apply_type_printers): Use gdbpy_ref.
15179
15180 2017-01-10  Tom Tromey  <tom@tromey.com>
15181
15182         * python/py-param.c (get_doc_string, compute_enum_values): Use
15183         gdbpy_ref.
15184
15185 2017-01-10  Tom Tromey  <tom@tromey.com>
15186
15187         * python/py-inferior.c (find_thread_object, build_inferior_list):
15188         Use gdbpy_ref.
15189
15190 2017-01-10  Tom Tromey  <tom@tromey.com>
15191
15192         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15193
15194 2017-01-10  Tom Tromey  <tom@tromey.com>
15195
15196         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15197         gdbpy_ref.
15198
15199 2017-01-10  Tom Tromey  <tom@tromey.com>
15200
15201         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
15202         extra incref.
15203         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15204         Use gdbpy_ref.
15205
15206 2017-01-10  Tom Tromey  <tom@tromey.com>
15207
15208         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15209         gdbpy_ref.
15210
15211 2017-01-10  Tom Tromey  <tom@tromey.com>
15212
15213         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
15214         decref results of PyArg_ParseTupleAndKeywords.
15215
15216 2017-01-10  Tom Tromey  <tom@tromey.com>
15217
15218         * python/python.c (python_run_simple_file): Use
15219         unique_xmalloc_ptr, gdbpy_ref.
15220
15221 2017-01-10  Tom Tromey  <tom@tromey.com>
15222
15223         * python/py-prettyprint.c (print_stack_unless_memory_error)
15224         (print_string_repr, print_children): Use gdbpy_ref.
15225         (dummy_python_frame): New class.
15226         (dummy_python_frame::dummy_python_frame): Rename from
15227         push_dummy_python_frame.
15228         (py_restore_tstate): Remove.
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/python.c (ensure_python_env, restore_python_env):
15237         Remove.
15238         * python/python-internal.h (ensure_python_env): Don't declare.
15239         * varobj.h (varobj_ensure_python_env): Don't declare.
15240         * varobj.c (varobj_ensure_python_env): Remove.
15241
15242 2017-01-10  Tom Tromey  <tom@tromey.com>
15243
15244         * varobj.c (varobj_value_get_print_value): Use
15245         gdbpy_enter_varobj.
15246
15247 2017-01-10  Tom Tromey  <tom@tromey.com>
15248
15249         * python/py-prettyprint.c (print_string_repr, print_children):
15250         Update.
15251         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15252         of "encoding".
15253         * varobj.c (varobj_value_get_print_value): Update.
15254         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15255
15256 2017-01-10  Tom Tromey  <tom@tromey.com>
15257
15258         * varobj.c (varobj_get_display_hint)
15259         (dynamic_varobj_has_child_method, install_new_value_visualizer)
15260         (varobj_set_visualizer, free_variable): Use
15261         gdbpy_enter_varobj.
15262
15263 2017-01-10  Tom Tromey  <tom@tromey.com>
15264
15265         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15266         (do_finish_initialization): New function.  Use gdbpy_ref.
15267         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
15268         do_finish_initialization.
15269
15270 2017-01-10  Tom Tromey  <tom@tromey.com>
15271
15272         * python/py-param.c (get_set_value, get_show_value): Use
15273         gdbpy_enter, gdbpy_ref.
15274
15275 2017-01-10  Tom Tromey  <tom@tromey.com>
15276
15277         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15278
15279 2017-01-10  Tom Tromey  <tom@tromey.com>
15280
15281         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15282
15283 2017-01-10  Tom Tromey  <tom@tromey.com>
15284
15285         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15286         Use gdbpy_enter_varobj.
15287
15288 2017-01-10  Tom Tromey  <tom@tromey.com>
15289
15290         * varobj.c (gdbpy_enter_varobj): New constructor.
15291         * python/python-internal.h (gdbpy_enter_varobj): New class.
15292         * python/py-varobj.c (py_varobj_get_iterator): Use
15293         gdbpy_enter_varobj.
15294
15295 2017-01-10  Tom Tromey  <tom@tromey.com>
15296
15297         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15298         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15299         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15300         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15301         unique_xmalloc_ptr.
15302         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15303
15304 2017-01-10  Tom Tromey  <tom@tromey.com>
15305
15306         * python/py-xmethods.c (invoke_match_method): Use
15307         gdbpy_ref.
15308
15309 2017-01-10  Tom Tromey  <tom@tromey.com>
15310
15311         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15312         gdbpy_enter, gdbpy_ref.
15313
15314 2017-01-10  Tom Tromey  <tom@tromey.com>
15315
15316         * python/python.c (python_interactive_command): Use gdbpy_enter.
15317
15318 2017-01-10  Tom Tromey  <tom@tromey.com>
15319
15320         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15321         gdbpy_ref.
15322
15323 2017-01-10  Tom Tromey  <tom@tromey.com>
15324
15325         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15326         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15327
15328 2017-01-10  Tom Tromey  <tom@tromey.com>
15329
15330         * utils.h (htab_deleter): New struct.
15331         (htab_up): New typedef.
15332         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15333         gdbpy_enter, gdbpy_ref, htab_up.
15334
15335 2017-01-10  Tom Tromey  <tom@tromey.com>
15336
15337         * python/py-unwind.c (pending_frame_invalidate): Remove.
15338         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15339
15340 2017-01-10  Tom Tromey  <tom@tromey.com>
15341
15342         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15343         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15344
15345 2017-01-10  Tom Tromey  <tom@tromey.com>
15346
15347         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15348
15349 2017-01-10  Tom Tromey  <tom@tromey.com>
15350
15351         * python/python.c (gdbpy_eval_from_control_command)
15352         (gdbpy_source_script, gdbpy_run_events)
15353         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15354         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15355         gdbpy_enter.
15356
15357 2017-01-10  Tom Tromey  <tom@tromey.com>
15358
15359         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15360
15361 2017-01-10  Tom Tromey  <tom@tromey.com>
15362
15363         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15364
15365 2017-01-10  Tom Tromey  <tom@tromey.com>
15366
15367         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15368         (python_on_inferior_call_pre, python_on_inferior_call_post)
15369         (python_on_memory_change, python_on_register_change)
15370         (python_inferior_exit, python_new_objfile, add_thread_object)
15371         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15372
15373 2017-01-10  Tom Tromey  <tom@tromey.com>
15374
15375         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15376         (bpfinishpy_handle_exit): Use gdbpy_enter.
15377
15378 2017-01-10  Tom Tromey  <tom@tromey.com>
15379
15380         * python/py-cmd.c (cmdpy_destroyer)
15381         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15382         gdbpy_enter.
15383
15384 2017-01-10  Tom Tromey  <tom@tromey.com>
15385
15386         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15387         gdbpy_enter.
15388         (gdbpy_breakpoint_has_cond): Likewise.
15389
15390 2017-01-10  Tom Tromey  <tom@tromey.com>
15391
15392         * python/python.c (gdbpy_enter): New constructor.
15393         (~gdbpy_enter): New destructor.
15394         (restore_python_env, ensure_python_env): Rewrite.
15395         * python/python-internal.h (gdbpy_enter): New class.
15396
15397 2017-01-10  Tom Tromey  <tom@tromey.com>
15398
15399         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15400
15401 2017-01-10  Tom Tromey  <tom@tromey.com>
15402
15403         * python/py-value.c (value_has_field, get_field_flag)
15404         (get_field_type, valpy_getitem, convert_value_from_python): Use
15405         gdbpy_ref.
15406
15407 2017-01-10  Tom Tromey  <tom@tromey.com>
15408
15409         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15410         gdbpy_ref.
15411
15412 2017-01-10  Tom Tromey  <tom@tromey.com>
15413
15414         * python/py-prettyprint.c (search_pp_list)
15415         (find_pretty_printer_from_objfiles)
15416         (find_pretty_printer_from_progspace)
15417         (find_pretty_printer_from_gdb, find_pretty_printer)
15418         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15419         gdbpy_ref.
15420
15421 2017-01-10  Tom Tromey  <tom@tromey.com>
15422
15423         * python/py-param.c (call_doc_function): Use gdbpy_ref.
15424
15425 2017-01-10  Tom Tromey  <tom@tromey.com>
15426
15427         * python/py-linetable.c (build_line_table_tuple_from_pcs)
15428         (ltpy_get_all_source_lines): Use gdbpy_ref.
15429
15430 2017-01-10  Tom Tromey  <tom@tromey.com>
15431
15432         * python/py-framefilter.c (extract_sym, extract_value)
15433         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15434         gdbpy_ref.
15435
15436 2017-01-10  Tom Tromey  <tom@tromey.com>
15437
15438         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15439
15440 2017-01-10  Tom Tromey  <tom@tromey.com>
15441
15442         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15443
15444 2017-01-10  Tom Tromey  <tom@tromey.com>
15445
15446         * python/py-function.c (convert_values_to_python, fnpy_init): Use
15447         gdbpy_ref.
15448
15449 2017-01-10  Tom Tromey  <tom@tromey.com>
15450
15451         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15452
15453 2017-01-10  Tom Tromey  <tom@tromey.com>
15454
15455         * python/py-type.c (convert_field, make_fielditem, typy_fields)
15456         (typy_range): Use gdbpy_ref.
15457
15458 2017-01-10  Tom Tromey  <tom@tromey.com>
15459
15460         * python/py-threadevent.c (create_thread_event_object): Use
15461         gdbpy_ref.
15462         * python/py-stopevent.c (create_stop_event_object): Simplify.
15463         (emit_stop_event): Use gdbpy_ref.
15464         * python/py-signalevent.c (create_signal_event_object): Use
15465         gdbpy_ref.
15466         * python/py-newobjfileevent.c (create_new_objfile_event_object)
15467         (emit_new_objfile_event, create_clear_objfiles_event_object)
15468         (emit_clear_objfiles_event): Use gdbpy_ref.
15469         * python/py-infevents.c (create_inferior_call_event_object)
15470         (create_register_changed_event_object)
15471         (create_memory_changed_event_object, emit_inferior_call_event)
15472         (emit_memory_changed_event, emit_register_changed_event): Use
15473         gdbpy_ref.
15474         * python/py-exitedevent.c (create_exited_event_object)
15475         (emit_exited_event): Use gdbpy_ref.
15476         * python/py-event.h (evpy_emit_event): Remove
15477         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15478         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15479         * python/py-continueevent.c (emit_continue_event): Use
15480         gdbpy_ref.
15481         * python/py-breakpoint.c (gdbpy_breakpoint_created)
15482         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15483         gdbpy_ref.
15484         * python/py-bpevent.c (create_breakpoint_event_object): Use
15485         gdbpy_ref.
15486
15487 2017-01-10  Tom Tromey  <tom@tromey.com>
15488
15489         * python/py-ref.h: New file.
15490
15491 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15492
15493         * cli-out.c (cli_ui_out::do_redirect): Change return type to
15494         void.
15495         * cli-out.h (cli_ui_out::do_redirect): Likewise.
15496         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15497         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15498         * ui-out.c (ui_out::redirect): Likewise.
15499         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15500         * cli/cli-logging.c (set_logging_redirect): Update call site of
15501         ui_out::redirect.
15502         (handle_redirections): Likewise.
15503         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15504         * top.c (execute_command_to_string): Likewise.
15505         * utils.c (do_ui_out_redirect_pop): Likewise.
15506
15507 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15508
15509         * stack.c (_initialize_stack): Update "frame" command help message.
15510
15511 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
15512
15513         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15514
15515 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15516
15517         * x86-linux-nat.h: Include gdb_proc_service.h.
15518
15519 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15520
15521         * ser-base.h: Include serial.h.
15522
15523 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15524
15525         * ppc-linux-tdep.h: Include ppc-tdep.h.
15526
15527 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15528
15529         * nat/amd64-linux-siginfo.h: Include signal.h.
15530
15531 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15532
15533         * nat/aarch64-linux-hw-point.h: Include break-common.h.
15534
15535 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15536
15537         * mi/mi-parse.h: Include mi-cmds.h.
15538
15539 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15540
15541         * inf-loop.c: Don't include "target.h".
15542         * inf-loop.h: Include it here.
15543
15544 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15545
15546         * dfp.h: Include "dboulest.h" and "expression.h".
15547
15548 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15549
15550         * ax-gdb.h: Include "ax.h".
15551
15552 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15553
15554         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15555         with nat/gdb_ptrace.h.
15556
15557 2017-01-05  Yao Qi  <yao.qi@linaro.org>
15558
15559         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15560         new line.
15561         (mips64_fbsd_sigframe_init): Likewise.
15562
15563 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15564
15565         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15566         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15567
15568 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15569
15570         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15571         * NEWS: Mention new FreeBSD/mips native configuration.
15572         * config/mips/fbsd.mh: New file.
15573         * configure.host: Add mips*-*-freebsd*.
15574         * mips-fbsd-nat.c: New file.
15575
15576 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15577
15578         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15579         (ALLDEPFILES): Add mips-fbsd-tdep.c.
15580         * NEWS: Mention new FreeBSD/mips target.
15581         * configure.tgt: Add mips*-*-freebsd*.
15582         * mips-fbsd-tdep.c: New file.
15583         * mips-fbsd-tdep.h: New file.
15584
15585 2017-01-04  Yao Qi  <yao.qi@linaro.org>
15586
15587         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15588         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15589
15590 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15591
15592         Update copyright year range in all GDB files.
15593
15594 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15595
15596         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15597
15598 For older changes see ChangeLog-2016.
15599 \f
15600 Local Variables:
15601 mode: change-log
15602 left-margin: 8
15603 fill-column: 74
15604 version-control: never
15605 coding: utf-8
15606 End: