Use search_domain::FUNCTIONS_DOMAIN when setting breakpoints
[external/binutils.git] / gdb / ChangeLog
1 2017-11-08  Pedro Alves  <palves@redhat.com>
2
3         * linespec.c (iterate_over_all_matching_symtabs): Add
4         search_domain parameter.  Pass it down to expand_symtabs_matching.
5         (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
6         (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
7         search_domain.
8         (add_all_symbol_names_from_pspace): Add search_domain parameter.
9         Pass it down.
10         (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
11         symbols.
12         (add_matching_symbols_to_info): Add search_domain parameter.  Pass
13         it down.
14
15 2017-11-08  Pedro Alves  <palves@redhat.com>
16
17         * ada-lang.c (ada_make_symbol_completion_list): Remove text and
18         text_len locals and don't pass them down.
19         * symtab.c (completion_list_add_name): Remove
20         sym_text/sym_text_len parameters and adjust.
21         (completion_list_add_symbol, completion_list_add_msymbol)
22         (completion_list_objc_symbol, completion_list_add_fields)
23         (add_symtab_completions): Likewise.
24         (default_collect_symbol_completion_matches_break_on)
25         (collect_file_symbol_completion_matches): Remove sym_text_len
26         local and don't pass it down.
27         * symtab.h (completion_list_add_name): Remove
28         sym_text/sym_text_len parameters.
29
30 2017-11-08  Pedro Alves  <palves@redhat.com>
31
32         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
33         unittests/lookup_name_info-selftests.c.
34         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
35         * cp-support.c: Include "selftest.h".
36         (cp_remove_params_1): Rename from cp_remove_params.  Add
37         'require_param' parameter, and handle it.
38         (cp_remove_params): Reimplement.
39         (cp_remove_params_if_any): New.
40         (selftests::quote): New.
41         (selftests::check_remove_params): New.
42         (selftests::test_cp_remove_params): New.
43         (_initialize_cp_support): Install
44         selftests::test_cp_remove_params.
45         * cp-support.h (cp_remove_params_if_any): Declare.
46         * dwarf2read.c :Include "selftest.h".
47         (dw2_expand_symtabs_matching_symbol): Use
48         lookup_name_info::make_ignore_params.
49         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
50         (selftests::dw2_expand_symtabs_matching::string_or_null)
51         (selftests::dw2_expand_symtabs_matching::check_match)
52         (selftests::dw2_expand_symtabs_matching::test_symbols)
53         (selftests::dw2_expand_symtabs_matching::run_test): New.
54         (_initialize_dwarf2_read): Register
55         selftests::dw2_expand_symtabs_matching::run_test.
56         * psymtab.c (psym_expand_symtabs_matching): Use
57         lookup_name_info::make_ignore_params.
58         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
59         If the lookup name wants to ignore parameters, strip them.
60         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
61         code handling '('.
62         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
63         (default_collect_symbol_completion_matches_break_on): Don't try to
64         strip parameters.
65         * symtab.h (lookup_name_info::lookup_name_info): Add
66         'ignore_parameters' parameter.
67         (lookup_name_info::ignore_parameters)
68         (lookup_name_info::make_ignore_params): New methods.
69         (lookup_name_info::m_ignore_parameters): New field.
70         * unittests/lookup_name_info-selftests.c: New file.
71
72 2017-11-08  Pedro Alves  <palves@redhat.com>
73
74         * dwarf2read.c (dw2_expand_marked_cus)
75         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
76         (dw2_expand_symtabs_matching): Move further below.
77         (dw2_expand_marked_cus): Reindent.
78
79 2017-11-08  Pedro Alves  <palves@redhat.com>
80
81         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
82         (struct name_component): New.
83         (mapped_index::name_components): New field.
84         (mapped_index::symbol_name_at): New method.
85         (dwarf2_read_index): Call mapped_index ctor.
86         (dw2_map_matching_symbols): Add comment about name_components
87         table.
88         (dw2_expand_symtabs_matching): Factor part to...
89         (dw2_expand_symtabs_matching_symbol): ... this new function.
90         Build name components table, and lookup symbols in it before
91         calling the name matcher.
92         (dw2_expand_marked_cus): New, factored out from
93         dw2_expand_symtabs_matching.
94         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
95
96 2017-11-08   Pedro Alves  <palves@redhat.com>
97
98         * ada-lang.c (ada_encode): Rename to ..
99         (ada_encode_1): ... this.  Add throw_errors parameter and handle
100         it.
101         (ada_encode): Reimplement.
102         (match_name): Delete, folded into full_name.
103         (resolve_subexp): No longer pass the encoded name to
104         ada_lookup_symbol_list.
105         (should_use_wild_match): Delete.
106         (name_match_type_from_name): New.
107         (ada_lookup_simple_minsym): Use lookup_name_info and the
108         language's symbol_name_matcher_ftype.
109         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
110         (ada_add_block_renamings): Adjust to use lookup_name_info.
111         (ada_lookup_name): New.
112         (add_nonlocal_symbols, ada_add_all_symbols)
113         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
114         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
115         (ada_name_for_lookup): Delete.
116         (ada_lookup_encoded_symbol): Construct a verbatim name.
117         (wild_match): Reverse sense of return type.  Use bool.
118         (full_match): Reverse sense of return type.  Inline bits of old
119         match_name here.
120         (ada_add_block_symbols): Adjust to use lookup_name_info.
121         (symbol_completion_match): Delete, folded into...
122         (ada_lookup_name_info::matches): ... .this new method.
123         (symbol_completion_add): Delete.
124         (ada_collect_symbol_completion_matches): Add name_match_type
125         parameter.  Adjust to use lookup_name_info and
126         completion_list_add_name.
127         (get_var_value, ada_add_global_exceptions): Adjust to use
128         lookup_name_info.
129         (ada_get_symbol_name_cmp): Delete.
130         (do_wild_match, do_full_match): New functions.
131         (ada_lookup_name_info::ada_lookup_name_info): New method.
132         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
133         functions.
134         (ada_language_defn): Install ada_get_symbol_name_matcher.
135         * ada-lex.l (processId): If name starts with '<', copy it
136         verbatim.
137         * block.c (block_iter_match_step, block_iter_match_first)
138         (block_iter_match_next, block_lookup_symbol)
139         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
140         lookup_name_info.
141         * block.h (block_iter_match_first, block_iter_match_next)
142         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
143         * c-lang.c (c_language_defn, cplus_language_defn)
144         (asm_language_defn, minimal_language_defn): Adjust comments to
145         refer to la_get_symbol_name_matcher.
146         * completer.c (complete_files_symbols)
147         (collect_explicit_location_matches, symbol_completer): Pass a
148         symbol_name_match_type down.
149         * completer.h (class completion_match, completion_match_result):
150         New classes.
151         (completion_tracker::reset_completion_match_result): New method.
152         (completion_tracker::m_completion_match_result): New field.
153         * cp-support.c (make_symbol_overload_list_block): Adjust to use
154         lookup_name_info.
155         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
156         functions.
157         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
158         * d-lang.c: Adjust comments to refer to
159         la_get_symbol_name_matcher.
160         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
161         Adjust to use lookup_name_info.
162         (dict_iter_match_first, dict_iter_match_next)
163         (iter_match_first_hashed, iter_match_next_hashed)
164         (iter_match_first_linear, iter_match_next_linear): Adjust to work
165         with a lookup_name_info.
166         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
167         Likewise.
168         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
169         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
170         (gdb_index_symbol_name_matcher): New class.
171         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
172         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
173         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
174         with a symbol_name_match_type.
175         (f_language_defn): Adjust comments to refer to
176         la_get_symbol_name_matcher.
177         * go-lang.c (go_language_defn): Adjust comments to refer to
178         la_get_symbol_name_matcher.
179         * language.c (default_symbol_name_matcher)
180         (language_get_symbol_name_matcher): New functions.
181         (unknown_language_defn, auto_language_defn): Adjust comments to
182         refer to la_get_symbol_name_matcher.
183         * language.h (symbol_name_cmp_ftype): Delete.
184         (language_defn) <la_collect_symbol_completion_matches>: Add match
185         type parameter.
186         <la_get_symbol_name_cmp>: Delete field.
187         <la_get_symbol_name_matcher>: New field.
188         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
189         (default_symbol_name_matcher, language_get_symbol_name_matcher):
190         Declare.
191         * linespec.c (iterate_over_all_matching_symtabs)
192         (iterate_over_file_blocks): Adjust to use lookup_name_info.
193         (find_methods): Add language parameter, and use lookup_name_info
194         and the language's symbol_name_matcher_ftype.
195         (linespec_complete_function): Adjust.
196         (lookup_prefix_sym): Use lookup_name_info.
197         (add_all_symbol_names_from_pspace): Adjust.
198         (find_superclass_methods): Add language parameter and pass it
199         down.
200         (find_method): Pass symbol language down.
201         (find_linespec_symbols): Don't demangle or Ada encode here.
202         (search_minsyms_for_name): Add lookup_name_info parameter.
203         (add_matching_symbols_to_info): Add name_match_type parameter.
204         Use lookup_name_info.
205         * m2-lang.c (m2_language_defn): Adjust comments to refer to
206         la_get_symbol_name_matcher.
207         * minsyms.c: Include <algorithm>.
208         (add_minsym_to_demangled_hash_table): Remove table parameter and
209         add objfile parameter.  Use search_name_hash, and add language to
210         demangled languages vector.
211         (struct found_minimal_symbols): New struct.
212         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
213         New functions.
214         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
215         input names here.  Use lookup_name_info instead.  Lookup up
216         demangled names once for each language in the demangled names
217         vector.
218         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
219         demangled names once for each language in the demangled names
220         vector.
221         (build_minimal_symbol_hash_tables): Adjust.
222         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
223         lookup_name_info.
224         * objc-lang.c (objc_language_defn): Adjust comment to refer to
225         la_get_symbol_name_matcher.
226         * objfiles.h: Include <vector>.
227         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
228         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
229         la_get_symbol_name_matcher.
230         * p-lang.c (pascal_language_defn): Adjust comment to refer to
231         la_get_symbol_name_matcher.
232         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
233         (match_partial_symbol): Use symbol_name_match_type,
234         lookup_name_info and psymbol_name_matches.
235         (lookup_partial_symbol): Use lookup_name_info.
236         (map_block): Use symbol_name_match_type and lookup_name_info.
237         (psym_map_matching_symbols): Use symbol_name_match_type.
238         (psymbol_name_matches): New.
239         (recursively_search_psymtabs): Use lookup_name_info and
240         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
241         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
242         'kind' parameter to 'domain'.
243         * rust-lang.c (rust_language_defn): Adjust comment to refer to
244         la_get_symbol_name_matcher.
245         * symfile-debug.c (debug_qf_map_matching_symbols)
246         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
247         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
248         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
249         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
250         Adjust to use symbol_name_match_type.
251         <expand_symtabs_matching>: Adjust to use lookup_name_info.
252         (expand_symtabs_matching): Adjust to use lookup_name_info.
253         * symmisc.c (maintenance_expand_symtabs): Use
254         lookup_name_info::match_any ().
255         * symtab.c (symbol_matches_search_name): New.
256         (eq_symbol_entry): Adjust to use lookup_name_info and the
257         language's matcher.
258         (demangle_for_lookup_info::demangle_for_lookup_info): New.
259         (lookup_name_info::match_any): New.
260         (iterate_over_symbols, search_symbols): Use lookup_name_info.
261         (compare_symbol_name): Add language, lookup_name_info and
262         completion_match_result parameters, and use them.
263         (completion_list_add_name): Make extern.  Add language and
264         lookup_name_info parameters.  Use them.
265         (completion_list_add_symbol, completion_list_add_msymbol)
266         (completion_list_objc_symbol): Add lookup_name_info parameters and
267         adjust.  Pass down language.
268         (completion_list_add_fields): Add lookup_name_info parameters and
269         adjust.  Pass down language.
270         (add_symtab_completions): Add lookup_name_info parameters and
271         adjust.
272         (default_collect_symbol_completion_matches_break_on): Add
273         name_match_type parameter, and use it.  Use lookup_name_info.
274         (default_collect_symbol_completion_matches)
275         (collect_symbol_completion_matches): Add name_match_type
276         parameter, and pass it down.
277         (collect_symbol_completion_matches_type): Adjust.
278         (collect_file_symbol_completion_matches): Add name_match_type
279         parameter, and use lookup_name_info.
280         * symtab.h: Include <string> and "common/gdb_optional.h".
281         (enum class symbol_name_match_type): New.
282         (class ada_lookup_name_info): New.
283         (struct demangle_for_lookup_info): New.
284         (class lookup_name_info): New.
285         (symbol_name_matcher_ftype): New.
286         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
287         (symbol_matches_search_name): Declare.
288         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
289         (default_collect_symbol_completion_matches)
290         (collect_symbol_completion_matches)
291         (collect_file_symbol_completion_matches): Add name_match_type
292         parameter.
293         (iterate_over_symbols): Use lookup_name_info.
294         (completion_list_add_name): Declare.
295         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
296         (strncmp_iw_with_mode): Now extern.
297         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
298         (strncmp_iw_with_mode): Declare.
299
300 2017-11-08  Keith Seitz  <keiths@redhat.com>
301             Pedro Alves  <palves@redhat.com>
302
303         * ada-lang.c (ada_language_defn): Install
304         default_search_name_hash.
305         * buildsym.c (struct buildsym_compunit): <language>: New field.
306         (finish_block_internal): Pass language when creating dictionaries.
307         (start_buildsym_compunit, start_symtab): New language parameters.
308         Use them.
309         (restart_symtab): Pass down compilation unit's language.
310         * buildsym.h (enum language): Forward declare.
311         (start_symtab): New 'language' parameter.
312         * c-lang.c (c_language_defn, cplus_language_defn)
313         (asm_language_defn, minimal_language_defn): Install
314         default_search_name_hash.
315         * coffread.c (coff_start_symtab): Adjust.
316         * d-lang.c (d_language_defn): Install default_search_name_hash.
317         * dbxread.c (struct symloc): Add 'pst_language' field.
318         (PST_LANGUAGE): Define.
319         (start_psymtab, read_ofile_symtab): Use it.
320         (process_one_symbol): New 'language' parameter.  Pass it down.
321         * dictionary.c (struct dictionary) <language>: New field.
322         (DICT_LANGUAGE): Define.
323         (dict_create_hashed, dict_create_hashed_expandable)
324         (dict_create_linear, dict_create_linear_expandable): New parameter
325         'language'.  Set the dictionary's language.
326         (iter_match_first_hashed): Adjust to rename.
327         (insert_symbol_hashed): Assert we don't see mismatching
328         languages.  Adjust to rename.
329         (dict_hash): Rename to ...
330         (default_search_name_hash): ... this and make extern.
331         * dictionary.h (struct language_defn): Forward declare.
332         (dict_create_hashed): New parameter 'language'.
333         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
334         * f-lang.c (f_language_defn): Install default_search_name_hash.
335         * go-lang.c (go_language_defn): Install default_search_name_hash.
336         * jit.c (finalize_symtab): Pass compunit's language to dictionary
337         creation.
338         * language.c (unknown_language_defn, auto_language_defn):
339         * language.h (language_defn::la_search_name_hash): New field.
340         (default_search_name_hash): Declare.
341         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
342         * mdebugread.c (new_block): New parameter 'language'.
343         * mdebugread.c (parse_symbol): Pass symbol language to block
344         allocation.
345         (psymtab_to_symtab_1): Pass down language.
346         (new_symtab): Pass compunit's language to block allocation.
347         * objc-lang.c (objc_language_defn): Install
348         default_search_name_hash.
349         * opencl-lang.c (opencl_language_defn):
350         * p-lang.c (pascal_language_defn): Install
351         default_search_name_hash.
352         * rust-lang.c (rust_language_defn): Install
353         default_search_name_hash.
354         * stabsread.h (enum language): Forward declare.
355         (process_one_symbol): Add 'language' parameter.
356         * symtab.c (search_name_hash): New function.
357         * symtab.h (search_name_hash): Declare.
358         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
359
360 2017-11-08  Pedro Alves  <palves@redhat.com>
361
362         * cp-name-parser.y (main): Don't initialize extra_chars.
363
364 2017-11-07  Tom Tromey  <tom@tromey.com>
365
366         * event-top.h (command_handler): Constify.
367         * record-full.c (cmd_record_full_start): Update.
368         * thread.c (thread_apply_all_command): Update.
369         * printcmd.c (eval_command): Update.
370         * mi/mi-main.c (mi_execute_cli_command): Update.
371         (mi_execute_async_cli_command): Update.
372         * tui/tui-stack.c (tui_update_command): Update.
373         * cli/cli-interp.c (safe_execute_command): Constify.
374         * record.c (record_start): Update.
375         (record_start, record_stop, cmd_record_start): Update.
376         * record-btrace.c (cmd_record_btrace_bts_start): Update.
377         (cmd_record_btrace_pt_start): Update.
378         (cmd_record_btrace_start): Update.
379         (cmd_record_btrace_start): Update.
380         * reverse.c (exec_reverse_once): Update.
381         * python/python.c (execute_gdb_command): Don't copy the command.
382         * event-top.c (command_line_handler): Update.
383         (command_handler): Constify.
384         * defs.h (deprecated_call_command_hook): Constify.
385         * cli/cli-script.h (execute_user_command): Constify.
386         * cli/cli-script.c (execute_user_command): Constify.
387         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
388         (enum command_control_type): Update.
389         * main.c (catch_command_errors): Remove non-const overload.
390         (catch_command_errors_ftype): Remove.
391         * python/py-cmd.c (cmdpy_function): Constify.
392         * guile/scm-cmd.c (cmdscm_function): Constify.
393         * cli/cli-dump.c (call_dump_func): Constify.
394         * cli/cli-decode.c (do_const_cfunc): Constify.
395         (do_sfunc): Constify.
396         (cmd_func): Constify.
397         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
398         * top.h (execute_command): Constify.
399         * top.c (execute_command): Constify.
400         (execute_command_to_string): Constify.
401         (deprecated_call_command_hook): Constify.
402         * command.h (cmd_func): Constify.
403         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
404
405 2017-11-07  Tom Tromey  <tom@tromey.com>
406
407         * ada-lang.c (catch_ada_exception_command): Constify.
408         (catch_assert_command): Constify.
409         * break-catch-throw.c (catch_catch_command, catch_throw_command)
410         (catch_rethrow_command): Constify.
411         (catch_exception_command_1): Constify.
412         * breakpoint.h (add_catch_command): Constify.
413         * break-catch-syscall.c (catch_syscall_command_1): Constify.
414         (catch_syscall_split_args): Constify.
415         * break-catch-sig.c (catch_signal_command): Constify.
416         (catch_signal_split_args): Constify.
417         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
418         cmd_const_sfunc_ftype.
419         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
420         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
421         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
422         (add_setshow_string_cmd, struct cmd_list_element)
423         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
424         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
425         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
426         Constify.
427         (set_cmd_sfunc): Constify.
428         (empty_sfunc): Constify.
429         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
430         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
431         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
432         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
433         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
434         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
435         Constify.
436         (set_cmd_sfunc): Constify.
437         (cmd_sfunc_ftype): Remove.
438         * compile/compile.c (set_compile_args): Constify.
439         * infrun.c (set_disable_randomization): Constify.
440         * infcmd.c (set_args_command, set_cwd_command): Constify.
441         * breakpoint.c (set_condition_evaluation_mode): Constify.
442         (add_catch_command): Constify.
443         (catch_fork_command_1, catch_exec_command_1)
444         (catch_load_command_1, catch_unload_command_1): Constify.
445         (catch_load_or_unload): Constify.
446         * guile/scm-param.c (pascm_set_func): Constify.
447         (add_setshow_generic): Constify.
448         * python/py-param.c (get_set_value): Constify.
449         * top.h (set_verbose): Constify.
450         * tui/tui-win.c (tui_set_var_cmd): Constify.
451         * mi/mi-main.c (set_mi_async_command): Constify.
452         * cli/cli-logging.c (set_logging_overwrite)
453         (set_logging_redirect): Constify.
454         * value.c (set_max_value_size): Constify.
455         * valprint.c (set_input_radix, set_output_radix): Constify.
456         * utils.c (set_width_command, set_height_command): Constify.
457         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
458         * tracepoint.c (set_disconnected_tracing)
459         (set_circular_trace_buffer, set_trace_buffer_size)
460         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
461         * top.c (set_history_size_command, set_verbose, set_editing)
462         (set_gdb_datadir, set_history_filename): Constify.
463         * target.c (set_targetdebug, maint_set_target_async_command)
464         (maint_set_target_non_stop_command, set_target_permissions)
465         (set_write_memory_permission): Constify.
466         (open_target): Constify.
467         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
468         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
469         * symtab.c (set_symbol_cache_size_handler): Constify.
470         * symfile.c (set_ext_lang_command): Constify.
471         * symfile-debug.c (set_debug_symfile): Constify.
472         * source.c (set_directories_command): Constify.
473         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
474         * serial.c (set_parity): Constify.
475         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
476         * remote.c (set_remote_exec_file, set_remotebreak)
477         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
478         * record.c (set_record_insn_history_size)
479         (set_record_call_history_size): Constify.
480         * record-full.c (set_record_full_insn_max_num): Constify.
481         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
482         * osabi.c (set_osabi): Constify.
483         * mips-tdep.c (set_mips64_transfers_32bit_regs)
484         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
485         * maint.c (maintenance_set_profile_cmd): Constify.
486         * linux-thread-db.c (set_libthread_db_search_path): Constify.
487         * language.c (set_language_command, set_range_command)
488         (set_case_command): Constify.
489         * infrun.c (set_non_stop, set_observer_mode)
490         (set_stop_on_solib_events, set_schedlock_func)
491         (set_exec_direction_func): Constify.
492         * infcmd.c (set_inferior_tty_command): Constify.
493         * disasm.c (set_disassembler_options_sfunc): Constify.
494         * demangle.c (set_demangling_command): Constify.
495         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
496         * cris-tdep.c (set_cris_version, set_cris_mode)
497         (set_cris_dwarf2_cfi): Constify.
498         * corefile.c (set_gnutarget_command): Constify.
499         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
500         (set_target_wide_charset_sfunc): Constify.
501         * breakpoint.c (update_dprintf_commands): Constify.
502         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
503         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
504         (set_disassembly_style_sfunc): Constify.
505         * arch-utils.c (set_endian, set_architecture): Constify.
506         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
507         * agent.c (set_can_use_agent): Constify.
508
509 2017-11-07  Tom Tromey  <tom@tromey.com>
510
511         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
512         (go32_pde, go32_pte, go32_pte_for_address): Constify.
513         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
514         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
515         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
516         (parse_int_arg, show_thread_default_detach_sc_cmd)
517         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
518         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
519         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
520         (show_task_pause_cmd, set_task_detach_sc_cmd)
521         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
522         (set_noninvasive_cmd, set_thread_pause_cmd)
523         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
524         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
525         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
526         * windows-nat.c (display_selectors): Constify.
527         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
528         non-const "cfunc".
529         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
530         (cmd_cfunc_eq): Likewise.
531         (struct cmd_list_element): Likewise.
532         (do_cfunc): Remove.
533         (cli_user_command_p): Update.
534         * command.h (add_cmd): Remove non-const overload.
535         (cmd_cfunc_ftype): Remove typedef.
536         (cmd_cfunc_eq): Remove non-const overload.
537         * value.c (show_values): Constify.
538         * thread.c (thread_apply_all_command): Constify.
539         * symfile.c (load_command): Constify.
540         * source.c (directory_command): Constify.
541         * maint.c (maintenance_internal_error)
542         (maintenance_demangler_warning, maintenance_space_display)
543         (maintenance_print_architecture, maintenance_translate_address)
544         (maintenance_info_selftests, maintenance_internal_warning):
545         Constify.
546         * breakpoint.c (disable_trace_command, enable_trace_command):
547         Constify.
548         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
549         Constify.
550         (add_auto_load_safe_path): Constify.
551         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
552         * top.h (show_commands): Constify.
553         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
554         * sparc64-tdep.c (adi_examine_command): Constify.
555         (adi_assign_command): Constify.
556
557 2017-11-07  Tom Tromey  <tom@tromey.com>
558
559         * frame.h (info_locals_command, info_args_command): Constify.
560         * auto-load.h (auto_load_info_scripts): Constify.
561         * inferior.h (registers_info): Constify.
562         * copying.c: Rebuild.
563         * copying.awk: Constify generated commands.
564         * auto-load.c (auto_load_info_scripts)
565         (info_auto_load_gdb_scripts): Constify.
566         * cli/cli-decode.c (struct cmd_list_element): Take a
567         cmd_const_cfunc_ftype.
568         * command.h (add_info): Take a cmd_const_cfunc_ftype.
569         * tui/tui-win.c (tui_all_windows_info): Constify.
570         * python/py-auto-load.c (info_auto_load_python_scripts):
571         Constify.
572         * cli/cli-cmds.c (show_command): Remove non-const overload.
573         * tracepoint.c (info_tvariables_command, info_scope_command):
574         Constify.
575         (info_static_tracepoint_markers_command): Constify.
576         * thread.c (info_threads_command): Constify.
577         (print_thread_info_1): Constify.
578         * target.c (info_target_command): Constify.
579         * symtab.c (info_sources_command, info_functions_command)
580         (info_types_command): Constify.
581         (info_variables_command): Remove non-const overload.
582         * symfile.c (info_ext_lang_command): Constify.
583         * stack.c (info_frame_command, info_locals_command)
584         (info_args_command): Constify.
585         (backtrace_command): Remove non-const overload.
586         * source.c (info_source_command, info_line_command): Constify.
587         * solib.c (info_sharedlibrary_command): Constify.
588         * skip.c (info_skip_command): Constify.
589         * ser-go32.c (info_serial_command): Constify.
590         * reverse.c (info_bookmarks_command): Constify.
591         * printcmd.c (info_symbol_command, info_address_command)
592         (info_display_command): Constify.
593         * osdata.c (info_osdata_command): Constify.
594         * objc-lang.c (info_selectors_command, info_classes_command):
595         Constify.
596         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
597         * memattr.c (info_mem_command): Constify.
598         * macrocmd.c (info_macro_command, info_macros_command): Constify.
599         * linux-fork.c (info_checkpoints_command): Constify.
600         * infrun.c (info_signals_command): Constify.
601         * inflow.c (info_terminal_command): Constify.
602         * inferior.c (info_inferiors_command): Constify.
603         (print_inferior): Constify.
604         * infcmd.c (info_program_command, info_all_registers_command)
605         (info_registers_command, info_vector_command)
606         (info_float_command): Constify.
607         (registers_info): Constify.
608         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
609         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
610         Constify.
611         * f-valprint.c (info_common_command): Constify.
612         * dcache.c (info_dcache_command): Constify.
613         (dcache_info_1): Constify.
614         * darwin-nat-info.c (info_mach_tasks_command)
615         (info_mach_task_command, info_mach_ports_command)
616         (info_mach_port_command, info_mach_threads_command)
617         (info_mach_thread_command, info_mach_regions_command)
618         (info_mach_regions_recurse_command, info_mach_region_command)
619         (info_mach_exceptions_command): Constify.
620         (get_task_from_args): Constify.
621         * cp-support.c (info_vtbl_command): Constify.
622         * breakpoint.c (info_watchpoints_command)
623         (info_tracepoints_command): Constify.
624         (info_breakpoints_command): Remove non-const overload.
625         * avr-tdep.c (avr_io_reg_read_command): Constify.
626         * auxv.c (info_auxv_command): Constify.
627         * ada-tasks.c (info_tasks_command): Constify.
628         (info_task): Constify.
629         * ada-lang.c (info_exceptions_command): Constify.
630
631 2017-11-07  Tom Tromey  <tom@tromey.com>
632
633         * solib.h (no_shared_libraries): Constify.
634         * frame.h (return_command): Constify.
635         * cli/cli-cmds.h (quit_command): Constify.
636         * top.h (quit_command, execute_command): Constify.
637         * target.h (flash_erase_command): Constify.
638         * inferior.h (set_inferior_args, attach_command): Constify.
639         * tracepoint.h (start_tracing, stop_tracing): Constify.
640         * breakpoint.h (break_command, tbreak_command)
641         (hbreak_command_wrapper, thbreak_command_wrapper)
642         (rbreak_command_wrapper, watch_command_wrapper)
643         (awatch_command_wrapper, rwatch_command_wrapper)
644         (get_tracepoint_by_number): Constify.
645         * symtab.c (info_variables_command, rbreak_command)
646         (symtab_symbol_info): Constify.
647         (info_variables_command): Add non-const overload.
648         * top.c (dont_repeat_command): Constify.
649         * breakpoint.c (ignore_command, commands_command)
650         (condition_command, tbreak_command, hbreak_command)
651         (thbreak_command, clear_command, break_command)
652         (info_breakpoints_command, watch_command, rwatch_command)
653         (awatch_command, trace_command, ftrace_command, strace_command)
654         (trace_pass_command, break_range_command, dprintf_command)
655         (agent_printf_command, get_tracepoint_by_number)
656         (watch_maybe_just_location, trace_pass_command): Constify.
657         (info_breakpoints_command): Add non-const overload.
658         * tracefile.c (tsave_command): Constify.
659         * infcmd.c (attach_command, disconnect_command, signal_command)
660         (queue_signal_command, stepi_command, nexti_command)
661         (finish_command, next_command, step_command, until_command)
662         (advance_command, jump_command, continue_command, run_command)
663         (start_command, starti_command, interrupt_command)
664         (run_command_1, set_inferior_args, step_1): Constify.
665         * inferior.c (add_inferior_command, remove_inferior_command)
666         (clone_inferior_command): Constify.
667         * linux-fork.c (checkpoint_command, restart_command): Constify.
668         * windows-nat.c (signal_event_command): Constify.
669         * guile/guile.c (guile_repl_command, guile_command): Constify.
670         * printcmd.c (x_command, display_command, printf_command)
671         (output_command, set_command, call_command, print_command)
672         (eval_command): Constify.
673         (non_const_set_command): Remove.
674         (_initialize_printcmd): Update.
675         * source.c (forward_search_command, reverse_search_command):
676         Constify.
677         * jit.c (jit_reader_load_command, jit_reader_unload_command):
678         Constify.
679         * infrun.c (handle_command): Constify.
680         * memattr.c (mem_command): Constify.
681         * stack.c (return_command, up_command, up_silently_command)
682         (down_command, down_silently_command, frame_command)
683         (backtrace_command, func_command, backtrace_command_1): Constify.
684         (backtrace_command): Add non-const overload.
685         * remote-sim.c (simulator_command): Constify.
686         * exec.c (set_section_command): Constify.
687         * tracepoint.c (tdump_command, trace_variable_command)
688         (tstatus_command, tstop_command, tstart_command)
689         (end_actions_pseudocommand, while_stepping_pseudocommand)
690         (collect_pseudocommand, teval_pseudocommand, actions_command)
691         (start_tracing, stop_tracing): Constify.
692         * value.c (init_if_undefined_command): Constify.
693         * tui/tui-stack.c (tui_update_command): Constify.
694         * tui/tui-win.c (tui_refresh_all_command)
695         (tui_set_tab_width_command, tui_set_win_height_command)
696         (tui_set_focus_command, tui_scroll_forward_command)
697         (tui_scroll_backward_command, tui_scroll_left_command)
698         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
699         (tui_set_win_height): Constify.
700         * tui/tui-layout.c (tui_layout_command): Constify.
701         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
702         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
703         (proc_untrace_sysexit_cmd): Constify.
704         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
705         (threadset_test_cmd, threadlist_update_test_cmd)
706         (threadalive_test): Constify.
707         * objc-lang.c (print_object_command): Constify.
708         * command.h (add_com): Constify.
709         * cli/cli-dump.c (restore_command): Constify.
710         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
711         (help_command, complete_command, shell_command, edit_command)
712         (list_command, disassemble_command, make_command)
713         (apropos_command, alias_command): Constify.
714         * cli/cli-script.c (document_command, define_command)
715         (while_command, if_command, validate_comname): Constify.
716         * cli/cli-decode.c (struct cmd_list_element): Change type of
717         "fun".
718         * target.c (do_monitor_command, flash_erase_command): Constify.
719         * regcache.c (reg_flush_command): Constify.
720         * reverse.c (reverse_step, reverse_next, reverse_stepi)
721         (reverse_nexti, reverse_continue, reverse_finish)
722         (save_bookmark_command, goto_bookmark_command)
723         (exec_reverse_once): Constify.
724         * python/python.c (python_interactive_command, python_command):
725         Constify.
726         * typeprint.c (ptype_command, whatis_command, whatis_exp):
727         Constify.
728         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
729         * gcore.c (gcore_command): Constify.
730
731 2017-11-07  Tom Tromey  <tom@tromey.com>
732
733         * printcmd.c (x_command): Call set_repeat_arguments.
734         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
735         * top.c (repeat_arguments): New global.
736         (set_repeat_arguments): New function.
737         (execute_command): Handle repeat_arguments.
738         (show_commands): Calls set_repeat_arguments.
739         * command.h (set_repeat_arguments): Declare.
740
741 2017-11-07  Tom Tromey  <tom@tromey.com>
742
743         * stack.c (backtrace_command): Use std::string.
744         (backtrace_command_1): Make "count_exp" const.
745
746 2017-11-07  Tom Tromey  <tom@tromey.com>
747
748         * source.c (directory_switch, mod_path, add_path): Constify.
749         * defs.h (add_path, mod_path, directory_switch): Constify.
750         * mi/mi-cmd-env.c (env_mod_path): Constify.
751
752 2017-11-07  Tom Tromey  <tom@tromey.com>
753
754         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
755         (run_command_1, continue_command, step_1, jump_command)
756         (signal_command, until_command, advance_command, finish_command)
757         (attach_command): Update.
758
759 2017-11-07  Tom Tromey  <tom@tromey.com>
760
761         * command.h (set_cmd_cfunc): Don't declare.
762         * cli/cli-decode.c (set_cmd_cfunc): Now static.
763
764 2017-11-07  Tom Tromey  <tom@tromey.com>
765
766         * stack.c (select_frame_command): Constify.
767         * cli/cli-decode.c (add_com_suppress_notification): Constify.
768         * command.h (add_com_suppress_notification): Constify.
769
770 2017-11-07  Tom Tromey  <tom@tromey.com>
771
772         * breakpoint.c (stop_command): Constify.
773         * cli/cli-decode.c (struct cmd_list_element): Constify.
774         * command.h (add_abbrev_prefix_cmd): Constify.
775
776 2017-11-07  Pedro Alves  <palves@redhat.com>
777
778         * breakpoint.c (extract_bp_kind): New enum.
779         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
780         factored out from ...
781         (extract_bp_number_and_location): ... here.
782         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
783
784 2017-11-07  Pedro Alves  <palves@redhat.com>
785
786         * breakpoint.c (extract_bp_number_and_location): Change return
787         type to void.  Throw error instead of warning.
788         (enable_disable_command): Adjust.
789
790 2017-11-07  Xavier Roirand  <roirand@adacore.com>
791             Pedro Alves  <palves@redhat.com>
792
793         * breakpoint.c (map_breakpoint_number_range): New, factored out
794         from ...
795         (map_breakpoint_numbers): ... here.
796         (find_location_by_number): Change parameters from string to
797         breakpoint number and location.
798         (extract_bp_number_and_location): New function.
799         (enable_disable_bp_num_loc)
800         (enable_disable_breakpoint_location_range)
801         (enable_disable_command): New functions, factored out ...
802         (enable_command, disable_command): ... these functions, and
803         adjusted to support ranges.
804         * NEWS: Document enable/disable breakpoint location range feature.
805
806 2017-11-06  Luis Machado  <luis.machado@linaro.org>
807
808         * MAINTAINERS (Write After Approval): Update my e-mail address.
809
810 2017-11-06  Pedro Alves  <palves@redhat.com>
811
812         * gnu-nat.c (gnu_terminal_init): Delete.
813         (gnu_target): Don't install gnu_terminal_init.
814         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
815         (child_terminal_init): ... this function.
816
817 2017-11-06  Pedro Alves  <palves@redhat.com>
818
819         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
820         sgtty.h.
821         * config.in, configure: Regenerate.
822
823 2017-11-06  Pedro Alves  <palves@redhat.com>
824
825         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
826         (async_init_signals): Adjust.
827         (handle_stop_sig): Rename to ...
828         (handle_sigtstp): ... this.
829         (async_stop_sig): Rename to ...
830         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
831         SIGTSTP path.
832         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
833         instead of STOP_SIGNAL thoughout.
834         (handle_stop_sig): Rename to ...
835         (handle_sigtstp): ... this.
836         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
837
838 2017-11-06  Pedro Alves  <palves@redhat.com>
839
840         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
841         longer set flags twice in row.
842
843 2017-11-06  Pedro Alves  <palves@redhat.com>
844
845         * Makefile.in (SER_HARDWIRE): Update comment.
846         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
847         * common/gdb_termios.h: Delete file.
848         * common/job-control.c: Include termios.h and unistd.h instead of
849         gdb_termios.h.
850         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
851         check.
852         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
853         Remove sgtty code.
854         * configure.ac: No longer check for termio.h and sgtty.h.
855         * configure: Regenerate.
856         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
857         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
858         Replace PROCESS_GROUP_TYPE references with pid_t references
859         throughout.
860         (gdb_getpgrp): Delete.
861         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
862         (child_terminal_inferior): Remove comment.  Remove sgtty code.
863         (child_terminal_ours_1): Use tcgetpgrp directly instead of
864         gdb_getpgrp.  Use serial_set_tty_state instead aof
865         serial_noflush_set_tty_state.  Remove sgtty code.
866         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
867         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
868         (inferior_process_group): Now returns pid_t.
869         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
870         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
871         * ser-event.c (serial_event_ops): Update.
872         * ser-go32.c (dos_noflush_set_tty_state): Delete.
873         (dos_ops): Update.
874         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
875         * ser-pipe.c (pipe_ops): Update.
876         * ser-tcp.c (tcp_ops): Update.
877         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
878         HAVE_TERMIOS checks.
879         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
880         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
881         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
882         assume termios.
883         (hardwire_noflush_set_tty_state): Delete.
884         (hardwire_print_tty_state, hardwire_drain_output)
885         (hardwire_flush_output, hardwire_flush_input)
886         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
887         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
888         code, and assume termios.
889         (hardwire_ops): Update.
890         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
891         * serial.c (serial_noflush_set_tty_state): Delete.
892         * serial.h (serial_noflush_set_tty_state): Delete.
893         (serial_ops::noflush_set_tty_state): Delete.
894
895 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
896
897         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
898         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
899         (COMMON_OBS): Remove doublest.o and dfp.o.
900         Do not build target-float.c (instead of doublest.c)
901         with -Wformat-nonliteral.
902
903         * doublest.c: Remove file.
904         * doublest.h: Remove file.
905         * dfp.c: Remove file.
906         * dfp.h: Remove file.
907
908         * target-float.c: Do not include "doublest.h" and "dfp.h".
909         (DOUBLEST): Move here from doublest.h.
910         (enum float_kind): Likewise.
911         (FLOATFORMAT_CHAR_BIT): Likewise.
912         (FLOATFORMAT_LARGEST_BYTES): Likewise.
913         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
914         (floatformat_precision): Likewise.
915         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
916         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
917         Likewise.
918         (host_float_format, host_double_format, host_long_double_format):
919         Likewise.
920         (floatformat_to_string, floatformat_from_string): Likewise.
921         (floatformat_to_doublest): Likewise.  Also, inline the original
922         convert_floatformat_to_doublest.
923         (floatformat_from_doublest): Likewise.  Also, inline the original
924         convert_floatformat_from_doublest.
925
926         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
927         (MAX_DECIMAL_STRING): Move here from dfp.c.
928         (match_endianness): Likewise.
929         (set_decnumber_context, decimal_check_errors): Likewise.
930         (decimal_from_number, decimal_to_number): Likewise.
931         (decimal_to_string, decimal_from_string): Likewise.  Make static.
932         (decimal_from_longest, decimal_from_ulongest): Likewise.
933         (decimal_to_longest): Likewise.
934         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
935         (decimal_convert): Likewise.
936
937 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
938
939         * doublest.c: Do not include "gdbtypes.h".
940         (extract_typed_floating): Remove.
941         (store_typed_floating): Remove.
942         (convert_typed_floating): Remove.
943         * doublest.h (struct type): Remove.
944         (DOUBLEST_PRINT_FORMAT): Remove.
945         (DOUBLEST_SCAN_FORMAT): Remove.
946         (extract_typed_floating): Remove.
947         (store_typed_floating): Remove.
948         (convert_typed_floating): Remove.
949
950         * dfp.c (decimal_from_doublest): Remove.
951         (decimal_to_doublest): Remove.
952         * dfp.h: Do not include "doublest.h".
953         (decimal_from_doublest): Remove.
954         (decimal_to_doublest): Remove.
955
956         * value.c: Do not include "doublest.h" and "dfp.h".
957         (value_as_double): Remove.
958         (unpack_double): Remove.
959         (value_from_double): Remove.
960         (value_from_decfloat): Remove.
961         * value.h: Do not include "doublest.h".
962         (value_as_double): Remove.
963         (unpack_double): Remove.
964         (value_from_double): Remove.
965         (value_from_decfloat): Remove.
966
967 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
968
969         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
970         (i386_extract_return_value): Use target_float_convert.
971         (i386_store_return_value): Likewise.
972         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
973         (i387_value_to_register): Likewise.
974         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
975         (ia64_register_to_value): Use target_float_convert.
976         (ia64_value_to_register): Likewise.
977         (ia64_extract_return_value): Likewise.
978         (ia64_store_return_value): Likewise.
979         (ia64_push_dummy_call): Likewise.
980         * m68k-tdep.c: Include "target-float.h".
981         (m68k_register_to_value): Use target_float_convert.
982         (m68k_value_to_register): Likewise.
983         (m68k_svr4_extract_return_value): Likewise.
984         (m68k_svr4_store_return_value): Likewise.
985         * ppc-sysv-tdep.c: Include "target-float.h".
986         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
987         (do_ppc_sysv_return_value): Likewise.
988         (ppc64_sysv_abi_push_freg): Likewise.
989         (ppc64_sysv_abi_return_value_base): Likewise.
990         * rs6000-aix-tdep.c: Include "target-float.h".
991         (rs6000_push_dummy_call): Use target_float_convert.
992         (rs6000_return_value): Likewise.
993         * rs6000-lynx178-tdep.c: Include "target-float.h".
994         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
995         (rs6000_lynx178_return_value): Likewise.
996         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
997         (rs6000_register_to_value): Use target_float_convert.
998         (rs6000_value_to_register): Likewise.
999         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1000         (arm_extract_return_value): Use target_float_convert.
1001         (arm_store_return_value): Likewise.
1002         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1003         (sh_register_convert_to_virtual): Use target_float_convert.
1004         (sh_register_convert_to_raw): Likewise.
1005         * sh64-tdep.c: Include "target-float.h".
1006         (sh64_extract_return_value): Use target_float_convert.
1007         (sh64_register_convert_to_virtual): Likewise.
1008         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
1009
1010 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1011
1012         * target-float.c (floatformat_to_host_double): New function.
1013         (floatformat_from_host_double): Likewise.
1014         (target_float_to_host_double): Likewise.
1015         (target_float_from_host_double): Likewise.
1016         * target-float.h (target_float_to_host_double): Add prototype.
1017         (target_float_from_host_double): Likewise.
1018
1019         * guile/scm-value.c: Include "target-float.h".
1020         (gdbscm_value_to_real): Use target_float_to_host_double.
1021         Handle integer source values via value_as_long.
1022         * guile/scm-math.c: Include "target-float.h".  Do not include
1023         "doublest.h", "dfp.h", and "expression.h".
1024         (vlscm_convert_typed_number): Use target_float_from_host_double.
1025         (vlscm_convert_number): Likewise.
1026
1027         * python/py-value.c (valpy_float): Use target_float_to_host_double.
1028         (convert_value_from_python): Use target_float_from_host_double.
1029
1030 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1031
1032         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1033         (cast_from_fixed): Likewise.
1034         (ada_scaling_type): New function.
1035         (ada_delta): Return value instead of DOUBLEST.  Perform target
1036         arithmetic instead of host arithmetic.
1037         (scaling_factor): Rename to ...
1038         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
1039         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
1040         (ada_fixed_to_float): Remove.
1041         (ada_float_to_fixed): Remove.
1042         * ada-lang.h (ada_fixed_to_float): Remove.
1043         (ada_float_to_fixed): Remove.
1044         (ada_delta): Return value instead of DOUBLEST.
1045         (ada_scaling_factor): Add prototype.
1046
1047         * ada-typeprint.c: Include "target-float.h".
1048         (print_fixed_point_type): Perform target arithmetic instead of
1049         host arithmetic.
1050         * ada-valprint.c: Include "target-float.h".
1051         (ada_val_print_num): Perform target arithmetic instead of
1052         host arithmetic for fixed-point types.
1053
1054 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1055
1056         * target-float.c: Include <math.h>.
1057         (floatformat_binop): New function.
1058         (floatformat_compare): Likewise.
1059         (target_float_binop): Likewise.
1060         (target_float_compare): Likewise.
1061         * target-float.h: Include "expression.h".
1062         (target_float_binop): Add prototype.
1063         (target_float_compare): Likewise.
1064
1065         * valarith.c: Do not include "doublest.h" and "dfp.h".
1066         Include "common/byte-vector.h".
1067         (value_args_as_decimal): Remove, replace by ...
1068         (value_args_as_target_float): ... this function.  Handle both
1069         binary and decimal target floating-point formats.
1070         (scalar_binop): Handle both binary and decimal FP using
1071         value_args_as_target_float and target_float_binop.
1072         (value_equal): Handle both binary and decimal FP using
1073         value_args_as_target_float and target_float_compare.
1074         (value_less): Likewise.
1075         (value_pos): Handle all scalar types as simple copy.
1076         (value_neg): Handle all scalar types via BINOP_SUB from 0.
1077         * dfp.c (decimal_binop): Throw error instead of internal_error
1078         when called with an unsupported operation code.
1079
1080 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1081
1082         * target-float.c (target_float_to_string): New function.
1083         (target_float_from_string): New function.
1084         * target-float.h (target_float_to_string): Add prototype.
1085         (target_float_from_string): Add prototype.
1086
1087         * valprint.c: Include "target-float.h".  Do not include
1088         "doublest.h" and "dfp.h".
1089         (print_floating): Use target_float_to_string.
1090         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
1091         (printf_floating): Use target_float_to_string.
1092         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1093         (print_i387_value): Use target_float_to_string.
1094         * mips-tdep.c: Include "target-float.h".
1095         (mips_print_fp_register): Use target_float_to_string.
1096         * sh64-tdep.c: Include "target-float.h".
1097         (sh64_do_fp_register): Use target_float_to_string.
1098
1099         * parse.c: Include "target-float.h".  Do not include
1100         "doublest.h" and "dfp.h".
1101         (parse_float): Use target_float_from_string.
1102         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
1103         (define_symbol): Use target_float_from_string.
1104         * gdbarch-selftests.c: Include "target-float.h".
1105         (register_to_value_test): Use target_float_from_string.
1106
1107 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1108
1109         * Makefile.c (SFILES): Add target-float.c.
1110         (HFILES_NO_SRCDIR): Add target-float.h.
1111         (COMMON_OBS): Add target-float.o.
1112         * target-float.h: New file.
1113         * target-float.c: New file.
1114
1115         * doublest.c (floatformat_classify): Fix detection of float_zero.
1116
1117         * gdbtypes.c (is_floating_type): New function.
1118         * gdbtypes.h (is_floating_type): Add prototype.
1119
1120         * value.c: Do not include "floatformat.h".
1121         (unpack_double): Use target_float_is_valid.
1122         (is_floating_value): New function.
1123         * value.h (is_floating_value): Add prototype-
1124
1125         * valarith.c: Include "target-float.h".
1126         (value_logical_not): Use target_float_is_zero.
1127
1128         * python/py-value.c: Include "target-float.h".
1129         (valpy_nonzero): Use target_float_is_zero.
1130
1131 2017-11-04  Tom Tromey  <tom@tromey.com>
1132
1133         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1134
1135 2017-11-04  Tom Tromey  <tom@tromey.com>
1136
1137         * breakpoint.c (set_momentary_breakpoint): Return
1138         breakpoint_up.
1139         (until_break_command): Update.
1140         (new_until_break_fsm): Change argument types to
1141         breakpoint_up.
1142         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1143         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1144         Remove.
1145         * infcmd.c (finish_forward): Update.
1146         * breakpoint.h (set_momentary_breakpoint)
1147         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1148         (make_cleanup_delete_breakpoint): Remove.
1149         (struct breakpoint_deleter): New.
1150         (breakpoint_up): New typedef.
1151         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1152         (insert_exception_resume_breakpoint): Update.
1153         (insert_exception_resume_from_probe): Update.
1154         (insert_longjmp_resume_breakpoint): Update.
1155         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1156         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1157         * infcall.c (call_function_by_hand_dummy): Update
1158
1159 2017-11-04  Tom Tromey  <tom@tromey.com>
1160
1161         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1162
1163 2017-11-04  Tom Tromey  <tom@tromey.com>
1164
1165         * linux-tdep.c (linux_core_info_proc_mappings): Use
1166         gdb::def_vector.
1167         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
1168         "size" argument.
1169         (linux_corefile_thread): Update.
1170         (linux_make_corefile_notes): Remove unused variable.
1171
1172 2017-11-04  Tom Tromey  <tom@tromey.com>
1173
1174         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1175         gdb::byte_vector.
1176
1177 2017-11-04  Tom Tromey  <tom@tromey.com>
1178
1179         * objfiles.c (do_free_objfile_cleanup): Remove.
1180         * compile/compile-object-load.c (compile_object_load): Update.
1181         * objfiles.h (make_cleanup_free_objfile): Remove.
1182
1183 2017-11-04  Tom Tromey  <tom@tromey.com>
1184
1185         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1186         (adi_read_versions): Change "tags" to "gdb_byte *".
1187         (adi_print_versions): Likewise.
1188
1189 2017-11-04  Tom Tromey  <tom@tromey.com>
1190
1191         * breakpoint.c
1192         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1193         from start_rbreak_breakpoints.
1194         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1195         * breakpoint.h (class scoped_rbreak_breakpoints): New.
1196         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1197         * symtab.c (do_end_rbreak_breakpoints): Remove.
1198         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1199
1200 2017-11-04  Tom Tromey  <tom@tromey.com>
1201
1202         * cp-namespace.c (reset_directive_searched): Remove.
1203         (cp_lookup_symbol_via_imports): Use scoped_restore.
1204         * cp-support.c (reset_directive_searched): Remove.
1205         (make_symbol_overload_list_using): Use scoped_restore.
1206         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1207         (reset_directive_searched): Remove.
1208
1209 2017-11-04  Tom Tromey  <tom@tromey.com>
1210
1211         * symfile.c (find_separate_debug_file_by_debuglink): Use
1212         unique_xmalloc_ptr.
1213
1214 2017-11-04  Tom Tromey  <tom@tromey.com>
1215
1216         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1217         type of "info".
1218         (compute_stack_depth): Likewise.
1219         (do_compile_dwarf_expr_to_c): Use std::vector.
1220
1221 2017-11-04  Tom Tromey  <tom@tromey.com>
1222
1223         * compile/compile-object-load.c (link_callbacks_einfo): Use
1224         std::string.
1225
1226 2017-11-04  Tom Tromey  <tom@tromey.com>
1227
1228         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1229         Use scoped_free_pendings.
1230         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1231         scoped_free_pendings.
1232         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1233         (xcoff_initial_scan): Likewise.
1234         * buildsym.c (reset_symtab_globals): Update comment.
1235         (scoped_free_pendings): Rename from really_free_pendings.
1236         (prepare_for_building): Update comment.
1237         (buildsym_init): Likewise.
1238         * buildsym.h (class scoped_free_pendings): New class.
1239         (really_free_pendings): Don't declare.
1240
1241 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
1242
1243         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1244         output when converting a zero value to a special byteorder format.
1245
1246 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1247
1248         * frame.c (do_frame_register_read): Remove aspace.
1249         * jit.c (jit_frame_sniffer): Likwise.
1250         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1251         * regcache.c (regcache::regcache): Pass nullptr.
1252         (regcache_print): Caller updated.
1253         * regcache.h (regcache::regcache): Remove one constructor
1254         parameter aspace.
1255
1256 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1257
1258         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1259
1260 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1261
1262         * breakpoint.c (insert_single_step_breakpoints): Update.
1263         * frame.c (struct frame_info) <aspace>: Add const.
1264         (frame_save_as_regcache): Add const.
1265         (get_frame_address_space): Return const address_space *.
1266         * frame.h (get_frame_address_space): Update declaration.
1267         * infrun.c (struct step_over_info) <aspace>: Add const.
1268         (set_step_over_info): Make aspace const.
1269         (displaced_step_prepare_throw): Change variable const.
1270         (resume): Likewise.
1271         (proceed): Likewise.
1272         (adjust_pc_after_break): Likewise.
1273         (save_waitstatus): Likewise.
1274         (handle_signal_stop): Likewise.
1275         (keep_going_pass_signal): Likewise.
1276         * jit.c (jit_frame_sniffer): Add const.
1277         * mips-tdep.c (mips_single_step_through_delay): Likewise.
1278         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1279         * record-full.c (record_full_wait_1): Likewise.
1280         * regcache.c (regcache::regcache): Change parameter to const.
1281         * regcache.h (regcache::regcache): Likewise.
1282         (regcache::aspace): Return const address_space *.
1283         (regcache) <m_aspace>: Add const.
1284
1285 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1286
1287         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1288         * frame.c (create_sentinel_frame): Likewise.
1289         * infrun.c (displaced_step_prepare_throw): Likewise.
1290         (resume): Likewise.
1291         (thread_still_needs_step_over_bp): Likewise.
1292         (proceed): Likewise.
1293         (do_target_wait): Likewise.
1294         (adjust_pc_after_break): Likewise.
1295         (handle_syscall_event): Likewise.
1296         (save_waitstatus): Likewise.
1297         (handle_inferior_event_1): Likewise.
1298         (handle_signal_stop): Likewise.
1299         (keep_going_pass_signal): Likewise.
1300         * linux-nat.c (status_callback): Likewise.
1301         (save_stop_reason): Likewise.
1302         (resume_stopped_resumed_lwps): Likewise.
1303         * record-full.c (record_full_exec_insn): Likewise.
1304         (record_full_wait_1): Likewise.
1305         * regcache.c (get_regcache_aspace): Remove.
1306         * regcache.h (get_regcache_aspace): Remove.
1307
1308 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1309
1310         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1311         (init_regcache_descr): Use gdbarch_num_regs.
1312         (regcache::regcache): Likewise.
1313         (regcache::get_register_status): Likewise.
1314         (regcache::assert_raw_regnum): Likewise.
1315         (regcache::cooked_read): Likewise.
1316         (regcache::cooked_read_value): Likewise.
1317         (regcache::cooked_write): Likewise.
1318         (regcache::dump): Likewise.
1319         (regcache::num_raw_registers): New method.
1320         * regcache.h (class regcache) <num_raw_registers>: New.
1321
1322 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1323
1324         * regcache.c (regcache::assert_regnum): New method.
1325         (regcache::invalidate): Call assert_regnum.
1326         (regcache::raw_update): Likewise.
1327         (regcache::raw_write): Likewise.
1328         (regcache::raw_read_part): Likewise.
1329         (regcache::raw_write_part): Likewise.
1330         (regcache::raw_supply): Likewise.
1331         (regcache::raw_supply_integer): Likewise.
1332         (regcache::raw_supply_zeroed): Likewise.
1333         (regcache::raw_collect): Likewise.
1334         (regcache::raw_collect_integer): Likewise.
1335         * regcache.h (regcache::assert_regnum): Declare.
1336
1337 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1338
1339         * regcache.c (regcache::dump): Remove code.
1340
1341 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1342
1343         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1344         Remove.
1345         <sizeof_cooked_register_status>: Remove.
1346         (init_regcache_descr): Update.
1347         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1348         (regcache::save): Likewise.
1349         (regcache::dump): Likewise.
1350
1351 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
1352
1353         * ft32-tdep.c (ft32_fetch_instruction): New function.
1354         (ft32_analyze_prologue): Use ft32_fetch_instruction().
1355
1356 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
1357
1358         * cli/cli-script.c (execute_control_command): Rename to ...
1359         (execute_control_command_1): ... this.
1360         (execute_control_command): New function.
1361
1362 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
1363
1364         * tracepoint.c (tfind_command): Remove const_cast.
1365
1366 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
1367
1368         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1369
1370 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
1371
1372         * common/common-utils.h (in_inclusive_range): New function.
1373         * arm-tdep.c (arm_record_extension_space): Use
1374         in_inclusive_range.
1375         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1376         * cris-tdep.c (cris_spec_reg_applicable): Use
1377         in_inclusive_range.
1378
1379 2017-10-30  Pedro Alves  <palves@redhat.com>
1380             Simon Marchi <simon.marchi@ericsson.com>
1381
1382         * remote.c (remote_set_syscall_catchpoint): Build a std::string
1383         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1384
1385 2017-10-30  Pedro Alves  <palves@redhat.com>
1386
1387         * common/common-utils.c (string_appendf, string_vappendf): New
1388         functions.
1389         * common/common-utils.h (string_appendf, string_vappendf): New
1390         declarations.
1391         * unittests/common-utils-selftests.c (string_appendf_func)
1392         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1393         (string_vappendf_tests): New functions.
1394         (_initialize_common_utils_selftests): Register "string_appendf" and
1395         "string_vappendf tests".
1396
1397 2017-10-30  Pedro Alves  <palves@redhat.com>
1398
1399         * unittests/common-utils-selftests.c (format_func): New typedef.
1400         (string_printf_tests, string_vprintf_tests): Tests factored out
1401         and merged to ...
1402         (test_format_func): ... this new function.
1403         (string_printf_tests, string_vprintf_tests): Reimplement on top of
1404         test_format_func.
1405
1406 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1407
1408         * darwin-nat.c: Remove include of gdb.h.
1409
1410 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1411
1412         * xtensa-xtregs.c: Fix formatting issues.
1413
1414 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1415
1416         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1417
1418 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
1419
1420         PR python/21213
1421         * python/py-infthread.c (thpy_get_inferior): Increment reference
1422         of inferior before returning it.
1423
1424 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1425
1426         * unittests/common-utils-selftests.c (format): Add
1427         ATTRIBUTE_PRINTF.
1428
1429 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1430
1431         * xml-syscall.c (struct syscall_desc): Add constructor.
1432         <name>: Change type to std::string.
1433         (syscall_desc_up): New typedef.
1434         (syscall_desc_p): Remove typeder.
1435         (DEF_VEC_P(syscall_desc_p)): Remove.
1436         (struct syscall_group_desc): Add constructor.
1437         <name>: Change type to std::string.
1438         <syscalls>: Change type to std::vector.
1439         (syscall_group_desc_up): New typedef.
1440         (syscall_group_desc_p): Remove typedef.
1441         (DEF_VEC_P(syscall_group_desc_p)): Remove.
1442         (struct syscalls_info) <syscalls>: Change type to std::vector of
1443         unique_ptr.
1444         <groups>: Likewise.
1445         <my_gdb_datadir>: Change type to std::string.
1446         (syscalls_info_up): New typedef.
1447         (allocate_syscalls_info): Remove.
1448         (syscalls_info_free_syscalls_desc): Remove.
1449         (syscalls_info_free_syscall_group_desc): Remove.
1450         (free_syscalls_info): Remove.
1451         (make_cleanup_free_syscalls_info): Remove.
1452         (syscall_group_create_syscall_group_desc): Adjust.
1453         (syscall_group_add_syscall): Adjust.
1454         (syscall_create_syscall_desc): Adjust.
1455         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1456         (init_syscalls_info): Adjust.
1457         (syscall_group_get_group_by_name): Adjust.
1458         (xml_get_syscall_number): Adjust.
1459         (xml_get_syscall_name): Adjust.
1460         (xml_list_of_syscalls): Adjust.
1461         (xml_list_syscalls_by_group): Adjust.
1462         (xml_list_of_groups): Adjust.
1463
1464 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1465
1466         * probe.h: Don't include gdb_vecs.h.
1467         (DEF_VEC_P (probe_p)): Remove.
1468         (find_probes_in_objfile): Return an std::vector.
1469         * probe.c (find_probes_in_objfile): Likewise.
1470         * breakpoint.c (breakpoint_objfile_data)
1471         <longjmp_probes>: Change type to std::vector.
1472         <exception_probes>: Likewise.
1473         (free_breakpoint_probes): Don't manually free vectors.
1474         (create_longjmp_master_breakpoint): Adjust.
1475         (create_exception_master_breakpoint): Adjust.
1476         * solib-svr4.c (svr4_create_probe_breakpoints): Change
1477         parameter type, adjust.
1478         (svr4_create_solib_event_breakpoints): Adjust.
1479
1480 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1481
1482         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1483         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1484         with new.
1485         (free_breakpoint_probes): Rename to ...
1486         (free_breakpoint_objfile_data): ... this, and call delete on
1487         bp_objfile_data..
1488
1489 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1490
1491         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1492         (loaded_script_ptr): Remove typedef.
1493         (DEF_VEC_P (loaded_script_ptr)): Remove.
1494         (struct collect_matching_scripts_data): Add constructor.
1495         <scripts_p>: Change type to (pointer to) std::vector.
1496         (collect_matching_scripts_data): Adjust.
1497         (sort_scripts_by_name): Make suitable for std::sort.
1498         (print_scripts): Don't sort vector, adjust to std::vector.
1499         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1500
1501 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1502
1503         * symfile.c (filename_language): Make struct, not typedef.  Add
1504         constructor.
1505         <ext>: Change type to std::string.
1506         (DEF_VEC_O (filename_language)): Remove.
1507         (filename_language_table): Change type to std::vector.
1508         (add_filename_language): Adjust.
1509         (set_ext_lang_command): Adjust.
1510         (info_ext_lang_command): Adjust.
1511         (deduce_language_from_filename): Adjust.
1512         (class scoped_restore_filename_language_table): Remove.
1513         (test_filename_language): Use scoped_restore.
1514         (test_set_ext_lang_command): Use scoped_restore, adjust to
1515         std::vector change.
1516
1517 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1518
1519         * symfile.c: Include selftest.h.
1520         (class scoped_restore_filename_language_table): New.
1521         (test_filename_language): New test.
1522         (test_set_ext_lang_command): New test.
1523         (_initialize_symfile): Register tests.
1524
1525 2017-10-27  Keith Seitz  <keiths@redhat.com>
1526
1527         * breakpoint.c (print_breakpoint_location): Use the symbol saved
1528         in the bp_location, falling back to find_pc_sect_function when
1529         needed.
1530         (add_location_to_breakpoint): Save sal->symbol.
1531         * breakpoint.h (struct bp_location) <symbol>: New field.
1532         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1533         * symtab.h (struct symtab_and_line) <symbol>: New field.
1534
1535 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
1536
1537         PR gdb/13669
1538         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1539         to rewind obstack.
1540
1541 2017-10-26  Pedro Alves  <palves@redhat.com>
1542
1543         * remote.c (remote_async_terminal_ours_p): Delete.
1544         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1545         Remove references to 'remote_async_terminal_ours_p'.
1546
1547 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1548
1549         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1550
1551 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1552
1553         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1554         aspace const.
1555         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1556         Likewise.
1557         * breakpoint.c (bpstat_check_location): Remove cast.
1558         (breakpoint_hit_catch_fork): Make aspce const.
1559         (breakpoint_hit_catch_solib): Likewise.
1560         (breakpoint_hit_catch_exec): Likewise.
1561         (breakpoint_hit_ranged_breakpoint): Likewise.
1562         (breakpoint_hit_watchpoint): Likewise.
1563         (base_breakpoint_breakpoint_hit): Likewise.
1564         (bkpt_breakpoint_hit): Likewise.
1565         (dprintf_breakpoint_hit): Likewise.
1566         (tracepoint_breakpoint_hit): Likewise.
1567         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1568
1569 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1570
1571         * breakpoint.c (breakpoint_location_address_match): Change
1572         "struct address_space *" to "const address_space".
1573         (breakpoint_location_address_range_overlap): Likewise.
1574         (breakpoint_here_p): Likewise.
1575         (breakpoint_in_range_p): Likewise.
1576         (moribund_breakpoint_here_p): Likewise.
1577         (bp_location_inserted_here_p): Likewise.
1578         (software_breakpoint_inserted_here_p): Likewise.
1579         (hardware_breakpoint_inserted_here_p): Likewise.
1580         (hardware_watchpoint_inserted_in_range): Likewise.
1581         (bpstat_check_location): Likewise.
1582         (bpstat_stop_status): Likewise.
1583         (breakpoint_address_match): Likewise.
1584         (breakpoint_address_match_range): Likewise.
1585         (breakpoint_location_address_match): Likewise.
1586         (breakpoint_location_address_range_overlap): Likewise.
1587         (insert_single_step_breakpoint): Likewise.
1588         (breakpoint_has_location_inserted_here): Likewise.
1589         (single_step_breakpoint_inserted_here_p): Likewise.
1590         (pc_at_non_inline_function): Likewise.
1591         * breakpoint.h (bpstat_stop_status): Update declaration.
1592         (breakpoint_here_p): Likewise.
1593         (breakpoint_in_range_p): Likewise.
1594         (moribund_breakpoint_here_p): Likewise.
1595         (breakpoint_inserted_here_p): Likewise.
1596         (software_breakpoint_inserted_here_p): Likewise.
1597         (hardware_breakpoint_inserted_here_p): Likewise.
1598         (breakpoint_has_location_inserted_here): Likewise.
1599         (single_step_breakpoint_inserted_here_p): Likewise.
1600         (hardware_watchpoint_inserted_in_range): Likewise.
1601         (breakpoint_address_match): Likewise.
1602         (insert_single_step_breakpoint): Likewise.
1603         (pc_at_non_inline_function): Likewise.
1604         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1605         * record.c (record_check_stopped_by_breakpoint): Likewise.
1606         * record.h (record_check_stopped_by_breakpoint): Likewise.
1607         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1608
1609 2017-10-25  Yao Qi  <yao.qi@linaro.org>
1610
1611         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1612         regcache->arch () instead get_regcache_arch.
1613         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1614         Likewise.
1615         (aarch64_fbsd_store_inferior_registers): Likewise.
1616         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1617         (store_gregs_to_thread): Likewise.
1618         (fetch_fpregs_from_thread): Likewise.
1619         (store_fpregs_to_thread): Likewise.
1620         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1621         (aarch64_store_return_value): Likewise.
1622         (aarch64_software_single_step): Likewise.
1623         * aix-thread.c (aix_thread_wait): Likewise.
1624         (supply_reg32): Likewise.
1625         (supply_sprs64): Likewise.
1626         (supply_sprs32): Likewise.
1627         (fill_gprs64): Likewise.
1628         (fill_gprs32): Likewise.
1629         (fill_sprs64): Likewise.
1630         (fill_sprs32): Likewise.
1631         (store_regs_user_thread): Likewise.
1632         (store_regs_kernel_thread): Likewise.
1633         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1634         (alphabsd_store_inferior_registers): Likewise.
1635         * alpha-tdep.c (alpha_extract_return_value): Likewise.
1636         (alpha_store_return_value): Likewise.
1637         (alpha_deal_with_atomic_sequence): Likewise.
1638         (alpha_next_pc): Likewise.
1639         (alpha_software_single_step): Likewise.
1640         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1641         (amd64bsd_store_inferior_registers): Likewise.
1642         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1643         Likewise.
1644         (amd64_linux_store_inferior_registers): Likewise.
1645         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1646         (amd64_collect_native_gregset): Likewise.
1647         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1648         (amd64obsd_collect_uthread): Likewise.
1649         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1650         (amd64_collect_fpregset): Likewise.
1651         (amd64_supply_fxsave): Likewise.
1652         (amd64_supply_xsave): Likewise.
1653         (amd64_collect_fxsave): Likewise.
1654         (amd64_collect_xsave): Likewise.
1655         * arc-tdep.c (arc_write_pc): Likewise.
1656         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1657         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1658         (arm_fbsd_store_inferior_registers): Likewise.
1659         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1660         (store_vfp_regs): Likewise.
1661         (arm_linux_fetch_inferior_registers): Likewise.
1662         (arm_linux_store_inferior_registers): Likewise.
1663         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1664         (arm_linux_sigreturn_next_pc): Likewise.
1665         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1666         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1667         (fetch_register): Likewise.
1668         (store_register): Likewise.
1669         * arm-tdep.c (arm_is_thumb): Likewise.
1670         (displaced_in_arm_mode): Likewise.
1671         (bx_write_pc): Likewise.
1672         (arm_get_next_pcs_addr_bits_remove): Likewise.
1673         (arm_software_single_step): Likewise.
1674         (arm_extract_return_value): Likewise.
1675         (arm_store_return_value): Likewise.
1676         (arm_write_pc): Likewise.
1677         * bfin-tdep.c (bfin_extract_return_value): Likewise.
1678         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
1679         (bsd_uthread_store_registers): Likewise.
1680         * core-regset.c (fetch_core_registers): Likewise.
1681         * corelow.c (get_core_registers): Likewise.
1682         * cris-tdep.c (cris_store_return_value): Likewise.
1683         (cris_extract_return_value): Likewise.
1684         (find_step_target): Likewise.
1685         (find_step_target): Likewise.
1686         (cris_software_single_step): Likewise.
1687         * ctf.c (ctf_fetch_registers): Likewise.
1688         * darwin-nat.c (cancel_breakpoint): Likewise.
1689         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
1690         * frv-tdep.c (frv_extract_return_value): Likewise.
1691         * ft32-tdep.c (ft32_store_return_value): Likewise.
1692         (ft32_extract_return_value): Likewise.
1693         * go32-nat.c (fetch_register): Likewise.
1694         (go32_fetch_registers): Likewise.
1695         (go32_store_registers): Likewise.
1696         (store_register): Likewise.
1697         * h8300-tdep.c (h8300_extract_return_value): Likewise.
1698         (h8300_store_return_value): Likewise.
1699         * hppa-linux-nat.c (fetch_register): Likewise.
1700         (store_register): Likewise.
1701         (hppa_linux_fetch_inferior_registers): Likewise.
1702         (hppa_linux_store_inferior_registers): Likewise.
1703         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
1704         (i386_darwin_store_inferior_registers): Likewise.
1705         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
1706         (gnu_store_registers): Likewise.
1707         * i386-linux-nat.c (fetch_register): Likewise.
1708         (store_register): Likewise.
1709         (supply_gregset): Likewise.
1710         (fill_gregset): Likewise.
1711         (i386_linux_fetch_inferior_registers): Likewise.
1712         (i386_linux_store_inferior_registers): Likewise.
1713         (i386_linux_resume): Likewise.
1714         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
1715         Likewise.
1716         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
1717         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
1718         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
1719         (i386obsd_collect_uthread): Likewise.
1720         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1721         (i386_supply_gregset): Likewise.
1722         (i386_collect_gregset): Likewise.
1723         (i386_supply_fpregset): Likewise.
1724         (i386_collect_fpregset): Likewise.
1725         (i386_mpx_bd_base): Likewise.
1726         * i386-v4-nat.c (supply_fpregset): Likewise.
1727         (fill_fpregset): Likewise.
1728         * i387-tdep.c (i387_supply_fsave): Likewise.
1729         (i387_collect_fsave): Likewise.
1730         (i387_supply_fxsave): Likewise.
1731         (i387_collect_fxsave): Likewise.
1732         (i387_supply_xsave): Likewise.
1733         (i387_collect_xsave): Likewise.
1734         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
1735         (ia64_linux_store_registers): Likewise.
1736         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
1737         (ia64_extract_return_value): Likewise.
1738         (ia64_store_return_value): Likewise.
1739         (find_func_descr): Likewise.
1740         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
1741         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
1742         (inf_ptrace_store_registers): Likewise.
1743         * infrun.c (use_displaced_stepping): Likewise.
1744         (displaced_step_prepare_throw): Likewise.
1745         (resume): Likewise.
1746         (proceed): Likewise.
1747         (do_target_wait): Likewise.
1748         (adjust_pc_after_break): Likewise.
1749         (handle_inferior_event_1): Likewise.
1750         (handle_signal_stop): Likewise.
1751         (save_infcall_suspend_state): Likewise.
1752         (restore_infcall_suspend_state): Likewise.
1753         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
1754         * jit.c (jit_frame_prev_register): Likewise.
1755         * linux-nat.c (save_stop_reason): Likewise.
1756         (linux_nat_wait_1): Likewise.
1757         (resume_stopped_resumed_lwps): Likewise.
1758         * linux-record.c (record_linux_sockaddr): Likewise.
1759         (record_linux_msghdr): Likewise.
1760         (record_linux_system_call): Likewise.
1761         * linux-tdep.c (linux_collect_thread_registers): Likewise.
1762         * lm32-tdep.c (lm32_extract_return_value): Likewise.
1763         (lm32_store_return_value): Likewise.
1764         * m32c-tdep.c (m32c_read_flg): Likewise.
1765         (m32c_pseudo_register_read): Likewise.
1766         (m32c_pseudo_register_write): Likewise.
1767         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
1768         (m32r_linux_collect_gregset): Likewise.
1769         * m32r-tdep.c (m32r_store_return_value): Likewise.
1770         (m32r_extract_return_value): Likewise.
1771         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1772         (m68kbsd_collect_fpregset): Likewise.
1773         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
1774         * m68k-linux-nat.c (fetch_register): Likewise.
1775         (old_fetch_inferior_registers): Likewise.
1776         (old_store_inferior_registers): Likewise.
1777         (store_regs): Likewise.
1778         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
1779         (m68k_svr4_store_return_value): Likewise.
1780         * m88k-tdep.c (m88k_store_arguments): Likewise.
1781         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
1782         (mi_cmd_data_write_register_values): Likewise.
1783         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
1784         (mips_fbsd_store_inferior_registers): Likewise.
1785         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
1786         (mips_fbsd_supply_gregs): Likewise.
1787         (mips_fbsd_collect_fpregs): Likewise.
1788         (mips_fbsd_collect_gregs): Likewise.
1789         (mips_fbsd_supply_fpregset): Likewise.
1790         (mips_fbsd_collect_fpregset): Likewise.
1791         (mips_fbsd_supply_gregset): Likewise.
1792         (mips_fbsd_collect_gregset): Likewise.
1793         * mips-linux-nat.c (supply_gregset): Likewise.
1794         (fill_gregset): Likewise.
1795         (supply_fpregset): Likewise.
1796         (fill_fpregset): Likewise.
1797         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
1798         (mips_fill_gregset): Likewise.
1799         (mips_supply_fpregset): Likewise.
1800         (mips_fill_fpregset): Likewise.
1801         (mips64_supply_gregset): Likewise.
1802         (micromips_linux_sigframe_validate): Likewise.
1803         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
1804         (mipsnbsd_fetch_inferior_registers): Likewise.
1805         (mipsnbsd_store_inferior_registers): Likewise.
1806         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1807         (mipsnbsd_supply_gregset): Likewise.
1808         (mipsnbsd_iterate_over_regset_sections): Likewise.
1809         (mipsnbsd_supply_reg): Likewise.
1810         (mipsnbsd_supply_fpreg): Likewise.
1811         * mips-tdep.c (mips_in_frame_stub): Likewise.
1812         (mips_dummy_id): Likewise.
1813         (is_octeon_bbit_op): Likewise.
1814         (micromips_bc1_pc): Likewise.
1815         (extended_mips16_next_pc): Likewise.
1816         (mips16_next_pc): Likewise.
1817         (deal_with_atomic_sequence): Likewise.
1818         * moxie-tdep.c (moxie_process_readu): Likewise.
1819         * nios2-tdep.c (nios2_get_next_pc): Likewise.
1820         * nto-procfs.c (procfs_store_registers): Likewise.
1821         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
1822         (ppcfbsd_store_inferior_registers): Likewise.
1823         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
1824         (fetch_altivec_register): Likewise.
1825         (get_spe_registers): Likewise.
1826         (fetch_spe_register): Likewise.
1827         (fetch_altivec_registers): Likewise.
1828         (fetch_all_gp_regs): Likewise.
1829         (fetch_all_fp_regs): Likewise.
1830         (store_vsx_register): Likewise.
1831         (store_altivec_register): Likewise.
1832         (set_spe_registers): Likewise.
1833         (store_spe_register): Likewise.
1834         (store_altivec_registers): Likewise.
1835         (store_all_gp_regs): Likewise.
1836         (store_all_fp_regs): Likewise.
1837         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
1838         (ppc_linux_collect_gregset): Likewise.
1839         (ppc_canonicalize_syscall): Likewise.
1840         (ppc_linux_record_signal): Likewise.
1841         (ppu2spu_prev_register): Likewise.
1842         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
1843         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
1844         (ppcobsd_store_registers): Likewise.
1845         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
1846         Likewise.
1847         (ppc_ravenscar_generic_store_registers): Likewise.
1848         * procfs.c (procfs_fetch_registers): Likewise.
1849         (procfs_store_registers): Likewise.
1850         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
1851         (ravenscar_store_registers): Likewise.
1852         (ravenscar_prepare_to_store): Likewise.
1853         * record-btrace.c (record_btrace_fetch_registers): Likewise.
1854         * record-full.c (record_full_wait_1): Likewise.
1855         (record_full_registers_change): Likewise.
1856         (record_full_store_registers): Likewise.
1857         (record_full_core_fetch_registers): Likewise.
1858         (record_full_save): Likewise.
1859         (record_full_goto_insn): Likewise.
1860         * regcache.c (regcache_register_size): Likewise.
1861         (get_regcache_arch): Remove.
1862         (regcache_read_pc): Likewise.
1863         * regcache.h (get_regcache_arch): Remove.
1864         * remote-sim.c (gdbsim_fetch_register): Likewise.
1865         (gdbsim_store_register): Likewise.
1866         * remote.c (fetch_register_using_p): Likewise.
1867         (send_g_packet): Likewise.
1868         (remote_prepare_to_store): Likewise.
1869         (store_registers_using_G): Likewise.
1870         * reverse.c (save_bookmark_command): Likewise.
1871         (goto_bookmark_command): Likewise.
1872         * rs6000-aix-tdep.c (branch_dest): Likewise.
1873         * rs6000-nat.c (rs6000_ptrace64): Likewise.
1874         (fetch_register): Likewise.
1875         * rs6000-tdep.c (ppc_supply_reg): Likewise.
1876         (ppc_collect_reg): Likewise.
1877         (ppc_collect_gregset): Likewise.
1878         (ppc_collect_fpregset): Likewise.
1879         (ppc_collect_vsxregset): Likewise.
1880         (ppc_collect_vrregset): Likewise.
1881         (ppc_displaced_step_hw_singlestep): Likewise.
1882         (rs6000_pseudo_register_read): Likewise.
1883         (rs6000_pseudo_register_write): Likewise.
1884         * s390-linux-nat.c (supply_gregset): Likewise.
1885         (fill_gregset): Likewise.
1886         (s390_linux_fetch_inferior_registers): Likewise.
1887         * s390-linux-tdep.c (s390_write_pc): Likewise.
1888         (s390_software_single_step): Likewise.
1889         (s390_all_but_pc_registers_record): Likewise.
1890         (s390_linux_syscall_record): Likewise.
1891         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
1892         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
1893         (shnbsd_store_inferior_registers): Likewise.
1894         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
1895         (sh_extract_return_value_fpu): Likewise.
1896         (sh_store_return_value_nofpu): Likewise.
1897         (sh_corefile_supply_regset): Likewise.
1898         (sh_corefile_collect_regset): Likewise.
1899         * sh64-tdep.c (sh64_extract_return_value): Likewise.
1900         (sh64_store_return_value): Likewise.
1901         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
1902         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
1903         (sparc_store_inferior_registers): Likewise.
1904         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
1905         (sparc_ravenscar_prepare_to_store): Likewise.
1906         * sparc-tdep.c (sparc32_store_arguments): Likewise.
1907         (sparc_analyze_control_transfer): Likewise.
1908         (sparc_step_trap): Likewise.
1909         (sparc_software_single_step): Likewise.
1910         (sparc32_gdbarch_init): Likewise.
1911         (sparc_supply_rwindow): Likewise.
1912         (sparc_collect_rwindow): Likewise.
1913         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
1914         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
1915         (sparc64nbsd_collect_gregset): Likewise.
1916         (sparc64nbsd_supply_fpregset): Likewise.
1917         (sparc64nbsd_collect_fpregset): Likewise.
1918         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1919         (sparc64_supply_gregset): Likewise.
1920         (sparc64_collect_gregset): Likewise.
1921         (sparc64_supply_fpregset): Likewise.
1922         (sparc64_collect_fpregset): Likewise.
1923         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
1924         * spu-tdep.c (spu_unwind_sp): Likewise.
1925         (spu2ppu_prev_register): Likewise.
1926         (spu_memory_remove_breakpoint): Likewise.
1927         * stack.c (return_command): Likewise.
1928         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
1929         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
1930         * tracefile.c (trace_save_ctf): Likewise.
1931         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
1932         (do_windows_store_inferior_registers): Likewise.
1933         (windows_resume): Likewise.
1934         * xtensa-linux-nat.c (fill_gregset): Likewise.
1935         (supply_gregset_reg): Likewise.
1936         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
1937         (xtensa_register_read_masked): Likewise.
1938         (xtensa_supply_gregset): Likewise.
1939         (xtensa_extract_return_value): Likewise.
1940         (xtensa_store_return_value): Likewise.
1941
1942 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
1943
1944         * doublest.c (floatformat_from_string): New function.
1945         * doublest.h (floatformat_from_string): Add prototype.
1946
1947         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
1948         (OP_FLOAT): ... this.
1949         * expression.h: Do not include "doublest.h".
1950         (union exp_element): Replace doubleconst and decfloatconst by
1951         new element floatconst.
1952         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
1953         (ada_evaluate_subexp): Likewise.
1954         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
1955         OP_DOUBLE and OP_DECFLOAT.
1956         * expprint.c (print_subexp_standard): Likewise.
1957         (dump_subexp_body_standard): Likewise.
1958         * breakpoint.c (watchpoint_exp_is_const): Likewise.
1959
1960         * parse.c: Include "dfp.h".
1961         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1962         (write_exp_elt_floatcst): New function.
1963         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
1964         and OP_DECFLOAT.
1965         (operator_check_standard): Likewise.
1966         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
1967         Return target format buffer instead of host DOUBLEST.
1968         Use floatformat_from_string and decimal_from_string to parse
1969         either binary or decimal floating-point types.
1970         (parse_c_float): Remove.
1971         * parser-defs.h: Do not include "doublest.h".
1972         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1973         (write_exp_elt_floatcst): Add prototype.
1974         (parse_float): Update prototype.
1975         (parse_c_float): Remove.
1976
1977         * c-exp.y: Do not include "dfp.h".
1978         (typed_val_float): Use byte buffer instead of DOUBLEST.
1979         (typed_val_decfloat): Remove.
1980         (DECFLOAT): Remove.
1981         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1982         (parse_number): Update to new parse_float interface.
1983         Parse suffixes and determine type before calling parse_float.
1984         Handle decimal and binary FP types the same way.
1985
1986         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1987         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
1988         (parse_number): Update to new parse_float interface.
1989         Parse suffixes and determine type before calling parse_float.
1990
1991         * f-exp.y: Replace dval by typed_val_float.
1992         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1993         (parse_number): Use parse_float instead of atof.
1994
1995         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1996         (parse_go_float): Remove.
1997         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1998         (parse_number): Call parse_float instead of parse_go_float.
1999         Parse suffixes and determine type before calling parse_float.
2000
2001         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2002         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2003         (parse_number): Update to new parse_float interface.
2004         Parse suffixes and determine type before calling parse_float.
2005
2006         * m2-exp.y: Replace dval by byte buffer val.
2007         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2008         (parse_number): Call parse_float instead of atof.
2009
2010         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2011         (lex_number): Call parse_float instead of strtod.
2012         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2013         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2014         Use write_exp_elt_floatcst.
2015         (unit_testing): Remove static variable.
2016         (rust_type): Do not check unit_testing.
2017         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
2018
2019         * ada-exp.y (type_float, type_double): Remove.
2020         (typed_val_float): Use byte buffer instead of DOUBLEST.
2021         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2022         * ada-lex.l (processReal): Use parse_float instead of sscanf.
2023
2024 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
2025
2026         * aarch64-tdep.h (enum aarch64_regnum): Remove.
2027         * arch/aarch64.h: New file.
2028
2029 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2030
2031         * dfp.h (decimal_from_string): Use const reference for argument.
2032         * dfp.c (decimal_from_string): Likewise.
2033
2034 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2035
2036         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2037         * sh64-tdep.c (sh64_do_fp_register): Likewise.
2038         * mips-tdep.c (mips_print_fp_register): Likewise.
2039
2040 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2041
2042         * common/format.h (enum argclass): Replace decfloat_arg by
2043         dec32float_arg, dec64float_arg, and dec128float_arg.
2044         * common/format.c (parse_format_string): Update to return
2045         new decimal float argument classes.
2046
2047         * printcmd.c (printf_decfloat): Rename to ...
2048         (printf_floating): ... this.  Add argclass argument, and use it
2049         instead of parsing the format string again.  Add support for
2050         binary floating-point values, using floatformat_to_string.
2051         Convert value to the target format if it doesn't already match.
2052         (ui_printf): Call printf_floating instead of printf_decfloat,
2053         also for double_arg / long_double_arg.  Pass argclass.
2054
2055         * dfp.c (decimal_to_string): Add format string argument.
2056         * dfp.h (decimal_to_string): Likewise.
2057
2058         * doublest.c (floatformat_to_string): Add format string argument.
2059         * doublest.h (floatformat_to_string): Likewise.
2060
2061 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2062
2063         * doublest.c (floatformat_precision): New routine.
2064         (floatformat_to_string): Likewise.
2065         * doublest.c (floatformat_to_string): Add prototype.
2066
2067         * printcmd.c (print_scalar_formatted): Only call print_floating
2068         on floating-point types.
2069         * valprint.c: Do not include "floatformat.h".
2070         (generic_val_print_decfloat): Remove.
2071         (generic_val_print): Call generic_val_print_float for both
2072         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2073         (print_floating): Use floatformat_to_string.  Handle decimal float.
2074         (print_decimal_floating): Remove, merge into floatformat_to_string.
2075         * value.h (print_decimal_floating): Remove.
2076
2077         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2078
2079 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2080
2081         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2082
2083 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2084
2085         * memattr.h: Don't include vec.h.
2086         (struct mem_attrib): Initialize fields.
2087         <unknown>: New static method.
2088         (struct mem_region): Add constructors, operator<, initialize
2089         fields.
2090         * memattr.c: Include algorithm.
2091         (default_mem_attrib, unknown_mem_attrib): Remove.
2092         (user_mem_region_list): New global.
2093         (target_mem_region_list, mem_region_list): Change type to
2094         std::vector<mem_region>.
2095         (mem_use_target): Now a function.
2096         (target_mem_regions_valid): Change type to bool.
2097         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2098         (require_user_regions): Adjust.
2099         (require_target_regions): Adjust.
2100         (create_mem_region): Adjust.
2101         (lookup_mem_region): Adjust.
2102         (invalidate_target_mem_regions): Adjust.
2103         (mem_clear): Rename to...
2104         (user_mem_clear): ... this, and adjust.
2105         (mem_command): Adjust.
2106         (info_mem_command): Adjust.
2107         (mem_enable, enable_mem_command, mem_disable,
2108         disable_mem_command): Adjust.
2109         (mem_delete): Adjust.
2110         (delete_mem_command): Adjust.
2111         * memory-map.h (parse_memory_map): Return an std::vector.
2112         * memory-map.c (parse_memory_map): Likewise.
2113         (struct memory_map_parsing_data): Add constructor.
2114         <memory_map>: Point to std::vector.
2115         (memory_map_start_memory): Adjust.
2116         (memory_map_end_memory): Adjust.
2117         (memory_map_end_property): Adjust.
2118         (clear_result): Remove.
2119         * remote.c (remote_memory_map): Return an std::vector.
2120         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2121         Remove.
2122         (target_debug_print_mem_region_vector): New.
2123         * target-delegates.c: Regenerate.
2124         * target.h (mem_region_vector): New typedef.
2125         (to_memory_map): Return mem_region_vector.
2126         (target_memory_map): Return an std::vector.
2127         * target.c (target_memory_map): Return an std::vector.
2128         (flash_erase_command): Adjust.
2129
2130 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2131
2132         * memory-map.c (struct memory_map_parsing_data) <property_name>:
2133         Change type to std::string.
2134         (memory_map_start_property): Adjust.
2135         (memory_map_end_property): Adjust.
2136
2137 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2138
2139         * infrun.h: Include common/byte-vector.h.
2140         (struct displaced_step_closure): New struct.
2141         (struct buf_displaced_step_closure): New struct.
2142         * infrun.c (displaced_step_closure::~displaced_step_closure):
2143         Provide default implementation.
2144         (displaced_step_clear): Deallocate step closure with delete.
2145         * aarch64-tdep.c (displaced_step_closure): Rename to ...
2146         (aarch64_displaced_step_closure): ... this, extend
2147         displaced_step_closure.
2148         (aarch64_displaced_step_data) <dsc>: Change type to
2149         aarch64_displaced_step_closure.
2150         (aarch64_displaced_step_copy_insn): Adjust to type change, use
2151         unique_ptr.
2152         (aarch64_displaced_step_fixup): Add cast for displaced step
2153         closure.
2154         * amd64-tdep.c (displaced_step_closure): Rename to ...
2155         (amd64_displaced_step_closure): ... this, extend
2156         displaced_step_closure.
2157         <insn_buf>: Change type to std::vector<gdb_byte>.
2158         <max_len>: Remove.
2159         (fixup_riprel): Change type of DSC parameter, adjust to type
2160         change of insn_buf.
2161         (fixup_displaced_copy): Change type of DSC parameter.
2162         (amd64_displaced_step_copy_insn): Instantiate
2163         amd64_displaced_step_closure.
2164         (amd64_displaced_step_fixup): Add cast for closure type, adjust
2165         to type change of insn_buf.
2166         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2167         parameter DSC.
2168         (arm_linux_copy_svc): Likewise.
2169         (cleanup_kernel_helper_return): Likewise.
2170         (arm_catch_kernel_helper_return): Likewise.
2171         (arm_linux_displaced_step_copy_insn): Instantiate
2172         arm_displaced_step_closure.
2173         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2174         (displaced_read_reg): Change type of parameter DSC.
2175         (branch_write_pc): Likewise.
2176         (load_write_pc): Likewise.
2177         (alu_write_pc): Likewise.
2178         (displaced_write_reg): Likewise.
2179         (arm_copy_unmodified): Likewise.
2180         (thumb_copy_unmodified_32bit): Likewise.
2181         (thumb_copy_unmodified_16bit): Likewise.
2182         (cleanup_preload): Likewise.
2183         (install_preload): Likewise.
2184         (arm_copy_preload): Likewise.
2185         (thumb2_copy_preload): Likewise.
2186         (install_preload_reg): Likewise.
2187         (arm_copy_preload_reg): Likewise.
2188         (cleanup_copro_load_store): Likewise.
2189         (install_copro_load_store): Likewise.
2190         (arm_copy_copro_load_store) Likewise.
2191         (thumb2_copy_copro_load_store): Likewise.
2192         (cleanup_branch): Likewise.
2193         (install_b_bl_blx): Likewise.
2194         (arm_copy_b_bl_blx): Likewise.
2195         (thumb2_copy_b_bl_blx): Likewise.
2196         (thumb_copy_b): Likewise.
2197         (install_bx_blx_reg): Likewise.
2198         (arm_copy_bx_blx_reg): Likewise.
2199         (thumb_copy_bx_blx_reg): Likewise.
2200         (cleanup_alu_imm): Likewise.
2201         (arm_copy_alu_imm): Likewise.
2202         (thumb2_copy_alu_imm): Likewise.
2203         (cleanup_alu_reg): Likewise.
2204         (install_alu_reg): Likewise.
2205         (arm_copy_alu_reg): Likewise.
2206         (thumb_copy_alu_reg): Likewise.
2207         (cleanup_alu_shifted_reg): Likewise.
2208         (install_alu_shifted_reg): Likewise.
2209         (arm_copy_alu_shifted_reg): Likewise.
2210         (cleanup_load): Likewise.
2211         (cleanup_store): Likewise.
2212         (arm_copy_extra_ld_st): Likewise.
2213         (install_load_store): Likewise.
2214         (thumb2_copy_load_literal): Likewise.
2215         (thumb2_copy_load_reg_imm): Likewise.
2216         (arm_copy_ldr_str_ldrb_strb): Likewise.
2217         (cleanup_block_load_all): Likewise.
2218         (cleanup_block_store_pc): Likewise.
2219         (cleanup_block_load_pc): Likewise.
2220         (arm_copy_block_xfer): Likewise.
2221         (thumb2_copy_block_xfer): Likewise.
2222         (cleanup_svc): Likewise.
2223         (install_svc): Likewise.
2224         (arm_copy_svc): Likewise.
2225         (thumb_copy_svc): Likewise.
2226         (arm_copy_undef): Likewise.
2227         (thumb_32bit_copy_undef): Likewise.
2228         (arm_copy_unpred): Likewise.
2229         (arm_decode_misc_memhint_neon): Likewise.
2230         (arm_decode_unconditional): Likewise.
2231         (arm_decode_miscellaneous): Likewise.
2232         (arm_decode_dp_misc): Likewise.
2233         (arm_decode_ld_st_word_ubyte): Likewise.
2234         (arm_decode_media): Likewise.
2235         (arm_decode_b_bl_ldmstm): Likewise.
2236         (arm_decode_ext_reg_ld_st): Likewise.
2237         (thumb2_decode_dp_shift_reg): Likewise.
2238         (thumb2_decode_ext_reg_ld_st): Likewise.
2239         (arm_decode_svc_copro): Likewise.
2240         (thumb2_decode_svc_copro): Likewise.
2241         (install_pc_relative): Likewise.
2242         (thumb_copy_pc_relative_16bit): Likewise.
2243         (thumb_decode_pc_relative_16bit): Likewise.
2244         (thumb_copy_pc_relative_32bit): Likewise.
2245         (thumb_copy_16bit_ldr_literal): Likewise.
2246         (thumb_copy_cbnz_cbz): Likewise.
2247         (thumb2_copy_table_branch): Likewise.
2248         (cleanup_pop_pc_16bit_all): Likewise.
2249         (thumb_copy_pop_pc_16bit): Likewise.
2250         (thumb_process_displaced_16bit_insn): Likewise.
2251         (decode_thumb_32bit_ld_mem_hints): Likewise.
2252         (thumb_process_displaced_32bit_insn): Likewise.
2253         (thumb_process_displaced_insn): Likewise.
2254         (arm_process_displaced_insn): Likewise.
2255         (arm_displaced_init_closure): Likewise.
2256         (arm_displaced_step_fixup): Add cast for closure.
2257         * arm-tdep.h: Include infrun.h.
2258         (displaced_step_closure): Rename to ...
2259         (arm_displaced_step_closure): ... this, extend
2260         displaced_step_closure.
2261         <u::svc::copy_svc_os>: Change type of parameter DSC.
2262         <cleanup>: Likewise.
2263         (arm_process_displaced_insn): Likewise.
2264         (arm_displaced_init_closure): Likewise.
2265         (displaced_read_reg): Likewise.
2266         (displaced_write_reg): Likewise.
2267         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2268         Adjust.
2269         * i386-tdep.h: Include infrun.h.
2270         (i386_displaced_step_closure): New typedef.
2271         * i386-tdep.c (i386_displaced_step_copy_insn): Use
2272         i386_displaced_step_closure.
2273         (i386_displaced_step_fixup): Adjust.
2274         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2275         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2276         and unique_ptr.
2277         (ppc_displaced_step_fixup): Adjust.
2278         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2279         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2280         and unique_ptr.
2281         (s390_displaced_step_fixup): Adjust.
2282
2283 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2284
2285         * interps.h (interp_resume, interp_suspend, interp_set_temp):
2286         Remove declarations.
2287
2288 2017-10-20  Tom Tromey  <tom@tromey.com>
2289
2290         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2291         std::vector.
2292         (gdb_bfd_record_inclusion): Update.
2293         (bfdp): Remove typedef.
2294
2295 2017-10-20  Tom Tromey  <tom@tromey.com>
2296
2297         * gdb_bfd.c (gdb_bfd_ref): Use new.
2298         (struct gdb_bfd_data): Add constructor, destructor, and member
2299         initializers.
2300         (gdb_bfd_unref): Use delete.
2301
2302 2017-10-20  Tom Tromey  <tom@tromey.com>
2303
2304         * exec.c (exec_file_attach): Use new_bfd_ref.
2305         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2306         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2307         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2308         new_bfd_ref.
2309         * gdb_bfd.h (new_bfd_ref): New function.
2310
2311 2017-10-20  Pedro Alves  <palves@redhat.com>
2312
2313         * main.c (captured_command_loop): Add attribute noinline.
2314
2315 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
2316
2317         * interps.c (struct interp_factory): Add constructor.
2318         (interp_factory_p): Remove typedef.
2319         (DEF_VEC_P(interp_factory_p)): Remove.
2320         (interpreter_factories): Change type to std::vector.
2321         (interp_factory_register): Adjust.
2322         (interp_lookup): Adjust.
2323         (interpreter_completer): Adjust.
2324
2325 2017-10-19  Tom Tromey  <tom@tromey.com>
2326
2327         * break-catch-syscall.c (catch_syscall_completer): Use
2328         std::string, gdb::unique_xmalloc_ptr.
2329
2330 2017-10-19  Tom Tromey  <tom@tromey.com>
2331
2332         * infcall.c (call_function_by_hand_dummy): Use std::string.
2333
2334 2017-10-19  Tom Tromey  <tom@tromey.com>
2335
2336         * mi/mi-main.c (mi_cmd_execute): Update.
2337         * top.h (prepare_execute_command): Return scoped_value_mark.
2338         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2339         Add move constructor.
2340         * top.c (prepare_execute_command): Return scoped_value_mark.
2341         (execute_command): Update.
2342
2343 2017-10-19  Pedro Alves  <palves@redhat.com>
2344
2345         * xml-support.c (xml_fetch_content_from_file): Check fread's
2346         return.
2347
2348 2017-10-19  Pedro Alves  <palves@redhat.com>
2349
2350         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2351         async.
2352         (handle_error_fd): New function.
2353         (ser_base_async): Add/delete an event loop file handler for
2354         error_fd.
2355
2356 2017-10-19  Pedro Alves  <palves@redhat.com>
2357
2358         * xml-support.c (xml_fetch_content_from_file): Don't read in
2359         chunks.  Instead use fseek to determine the file's size, and read
2360         it in one go.
2361
2362 2017-11-18  Keith Seitz  <keiths@redhat.com>
2363
2364         * c-exp.y (oper): Canonicalize conversion operators of user-defined
2365         types.
2366         Add whitespace to front of type name.
2367
2368 2017-10-18  Keith Seitz  <keiths@redhat.com>
2369
2370         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2371         DW_AT_accessibility.
2372
2373 2017-10-18  Yao Qi  <yao.qi@linaro.org>
2374
2375         * features/tic6x-c62x-linux.c: Remove.
2376
2377 2017-10-17  Tom Tromey  <tom@tromey.com>
2378
2379         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2380         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2381         (do_mixed_source_and_assembly): Likewise.
2382
2383 2017-10-17  Tom Tromey  <tom@tromey.com>
2384
2385         * regcache.c (regcache::xfer_part): Remove assertion.
2386
2387 2017-10-17  Pedro Alves  <palves@redhat.com>
2388
2389         * xml-support.c (xml_fetch_content_from_file): Call
2390         unique_ptr::release() instead unique_ptr::get() when passing
2391         through xrealloc.
2392
2393 2017-10-17  Yao Qi  <yao.qi@linaro.org>
2394
2395         * regcache.c (regcache::xfer_part): Remove parameters read and
2396         write, add parameter is_raw.  All callers are updated.
2397
2398 2017-10-16  Keith Seitz  <keiths@redhat.com>
2399
2400         * c-typeprint.c (enum access_specifier): Moved here from
2401         c_type_print_base.
2402         (output_access_specifier): New function.
2403         (c_type_print_base): Consider typedefs when assessing
2404         whether access labels are needed.
2405         Use output_access_specifier as needed.
2406         Output access specifier for typedefs, if needed.
2407         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2408         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2409         fields.
2410         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2411         accessor macros.
2412
2413 2017-10-16  Tom Tromey  <tom@tromey.com>
2414
2415         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2416         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2417         * target.c (target_fileio_read_stralloc): Update.
2418         * sparc64-tdep.c (adi_is_addr_mapped): Update.
2419         * target.h (target_fileio_read_stralloc): Return
2420         unique_xmalloc_ptr.
2421
2422 2017-10-16  Tom Tromey  <tom@tromey.com>
2423
2424         * xml-syscall.c (xml_init_syscalls_info): Update.
2425         * xml-support.c (xinclude_start_include): Update.
2426         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2427         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2428         (xml_fetch_content_from_file): Likewise.
2429         * osdata.c (get_osdata): Update.
2430         * target.h (target_read_stralloc, target_get_osdata): Return
2431         unique_xmalloc_ptr.
2432         * solib-aix.c (solib_aix_get_library_list): Update.
2433         * solib-target.c (solib_target_current_sos): Update.
2434         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2435         * xml-tdesc.c (fetch_available_features_from_target): Update.
2436         (target_fetch_description_xml): Update.
2437         (file_read_description_xml): Update.
2438         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2439         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2440         (remote_pid_to_exec_file): Update.
2441         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2442         (target_get_osdata): Likewise.
2443
2444 2017-10-16  Tom Tromey  <tom@tromey.com>
2445
2446         * remote.c (remote_register_number_and_offset): Use std::vector.
2447         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2448         (putpkt_binary): Use gdb::def_vector.
2449         (compare_sections_command): Use gdb::byte_vector.
2450
2451 2017-10-16  Tom Tromey  <tom@tromey.com>
2452
2453         * ppc-linux-nat.c (hwdebug_insert_point): Use
2454         gdb::unique_xmalloc_ptr, XDUP.
2455
2456 2017-10-16  Tom Tromey  <tom@tromey.com>
2457
2458         * probe.c (parse_probes): Use std::string.
2459         (info_probes_for_ops, enable_probes_command)
2460         (disable_probes_command): Remove cleanups.
2461
2462 2017-10-16  Tom Tromey  <tom@tromey.com>
2463
2464         * buildsym.c (block_compar): Remove.
2465         (end_symtab_get_static_block): Use std::vector.
2466
2467 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
2468
2469         * memrange.h (struct mem_range): Define operator< and operator==.
2470         (mem_range_s): Remove.
2471         (DEF_VEC_O (mem_range_s)): Remove.
2472         (normalize_mem_ranges): Change parameter type to std::vector.
2473         * memrange.c (compare_mem_ranges): Remove.
2474         (normalize_mem_ranges): Change parameter type to std::vector,
2475         adjust to vector change.
2476         * exec.c (section_table_available_memory): Return vector, remove
2477         parameter.
2478         (section_table_read_available_memory): Adjust to std::vector
2479         change.
2480         * remote.c (remote_read_bytes): Adjust to std::vector
2481         change.
2482         * tracepoint.h (traceframe_available_memory): Change parameter
2483         type to std::vector.
2484         * tracepoint.c (traceframe_available_memory): Change parameter
2485         type to std::vector, adjust.
2486         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2487         std::vector change.
2488         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2489         unittests/memrange-selftests.c.
2490         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2491         * gdb/unittests/memrange-selftests.c: New file.
2492
2493 2017-10-16  Pedro Alves  <palves@redhat.com>
2494
2495         * elfread.c (probe_key_free): Rename range-for variable.
2496         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2497         (find_probe_by_pc, collect_probes): Rename range-for variable.
2498
2499 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2500
2501         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2502         * features/tic6x-c62x.c: Remove.
2503         * features/tic6x-c64x-linux.c: Remove.
2504         * features/tic6x-c64x.c: Remove.
2505         * features/tic6x-c64xp-linux.c: Remove.
2506         * features/tic6x-c64xp.c: Remove.
2507         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2508         initialize_tdesc_tic6x_*_linux functions.
2509         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2510         initialize_tdesc_tic6x_* functions.
2511
2512 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2513
2514         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2515         tic6x-c62x.
2516         * regformats/tic6x-c62x.dat: Remove.
2517         * regformats/tic6x-c64x.dat: Remove.
2518         * regformats/tic6x-c64xp.dat: Remove.
2519
2520 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2521
2522         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2523         (the !HAVE_LIBEXPAT version).
2524
2525 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2526
2527         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2528         const.
2529
2530 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2531
2532         * target.h: Include tracepoint.h.
2533         (enum trace_find_type): Move to tracepoint.h.
2534         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2535         * tracepoint.h: Don't include target.h
2536         (enum trace_find_type): Move from target.h.
2537         (parse_traceframe_info): Return a unique ptr.
2538         * tracepoint.c (current_traceframe_info): Change type to unique
2539         ptr.
2540         (free_traceframe_info): Remove.
2541         (clear_traceframe_info): Don't manually free
2542         current_traceframe_info.
2543         (free_result): Remove.
2544         (parse_traceframe_info): Return a unique ptr.
2545         (get_traceframe_info): Adjust to unique ptr.
2546         * ctf.c (ctf_traceframe_info): Return a unique ptr.
2547         * remote.c (remote_traceframe_info): Return a unique ptr.
2548         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2549         ptr.
2550         * target-debug.h (target_debug_print_traceframe_info_up): New
2551         macro.
2552         * target-delegates.c: Regenerate.
2553
2554 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2555
2556         * memrange.h (struct mem_range): Add constructors.
2557         * tracepoint.h (struct traceframe_info) <memory>: Change type to
2558         std::vector<mem_range>.
2559         * tracepoint.c (free_traceframe_info): Don't manually free
2560         vector.
2561         (traceframe_info_start_memory): Adjust to vector change.
2562         (traceframe_available_memory): Likewise.
2563         * tracefile-tfile.c (build_traceframe_info): Likewise.
2564         * ctf.c (ctf_traceframe_info): Likewise.
2565
2566 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2567
2568         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2569         std::vector<int>.
2570         * tracepoint.c (free_traceframe_info): Deallocate with delete.
2571         (traceframe_info_start_tvar): Adjust to vector change.
2572         (parse_traceframe_info): Allocate with new.
2573         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2574         vector change.
2575         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2576         change.
2577         tfile_traceframe_info): Allocate with new.
2578         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2579         change.
2580
2581 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2582
2583         * tracepoint.c (traceframe_info): Rename to...
2584         (current_traceframe_info): ...this.
2585         (clear_traceframe_info): Adjust.
2586         (get_traceframe_info): Adjust.
2587
2588 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2589
2590         * nat/linux-osdata.c: Include algorithm.
2591         (compare_processes): Remove.
2592         (struct pid_pgid_entry): New struct.
2593         (linux_xfer_osdata_processgroups): Use std::vector instead of
2594         XNEWVEC.
2595
2596 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2597
2598         * objfiles.h: Don't include symfile.h.
2599         (struct partial_symbol): Remove forward-declaration.
2600         (struct objfile) <global_psymbols, static_psymbols>: Change type
2601         to std::vector<partial_symbol *>.
2602         * objfiles.c (objfile::objfile): Don't memset those fields.
2603         (objfile::~objfile): Don't free those fields.
2604         * psympriv.h (struct psymbol_allocation_list): Remove
2605         forward-declaration.
2606         (add_psymbol_to_list): Change psymbol_allocation_list parameter
2607         to std::vector.
2608         (start_psymtab_common): Change parameters to std::vector.
2609         * psymtab.c: Include algorithm.
2610         (require_partial_symbols): Call shrink_to_fit.
2611         (find_pc_sect_psymbol): Adjust to vector change.
2612         (match_partial_symbol): Likewise.
2613         (lookup_partial_symbol): Likewise.
2614         (psym_relocate): Likewise.
2615         (dump_psymtab): Likewise.
2616         (recursively_search_psymtabs): Likewise.
2617         (compare_psymbols): Remove.
2618         (sort_pst_symbols): Adjust to vector change.
2619         (start_psymtab_common): Likewise.
2620         (end_psymtab_common): Likewise.
2621         (psymbol_bcache_full): De-constify return value.
2622         (add_psymbol_to_bcache): Likewise.
2623         (extend_psymbol_list): Remove.
2624         (append_psymbol_to_list): Adjust to vector change.
2625         (add_psymbol_to_list): Likewise.
2626         (init_psymbol_list): Likewise.
2627         (maintenance_info_psymtabs): Likewise.
2628         (maintenance_check_psymtabs): Likewise.
2629         * symfile.h (struct psymbol_allocation_list): Remove.
2630         * symfile.c (reread_symbols): Adjust to vector change.
2631         * dbxread.c (start_psymtab): Change type of parameters.
2632         (dbx_symfile_read): Adjust to vector change.
2633         (read_dbx_symtab): Likewise.
2634         (start_psymtab): Change type of parameters.
2635         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2636         (create_partial_symtab): Likewise.
2637         (add_partial_symbol): Likewise.
2638         (write_one_signatured_type): Likewise.
2639         (recursively_write_psymbols): Likewise.
2640         * mdebugread.c (parse_partial_symbols): Likewise.
2641         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2642         (scan_xcoff_symtab): Adjust to vector change.
2643         (xcoff_initial_scan): Likewise.
2644
2645 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
2646
2647         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2648
2649 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2650
2651         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2652         Remove s390x-*-expedite, add s390x-expedite.
2653
2654 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2655
2656         * features/s390-gs-linux64.c: Regenerated.
2657         * features/s390x-gs-linux64.c: Regenerated.
2658
2659 2017-10-13  Tom Tromey  <tom@tromey.com>
2660
2661         * compile/compile-object-run.c (do_module_cleanup): Use delete.
2662         * solib.c (update_solib_list, reload_shared_libraries_1): Use
2663         delete.
2664         * symfile.c (symbol_file_add_with_addrs): Use new.
2665         (symbol_file_add_separate): Update comment.
2666         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2667         * jit.c (jit_object_close_impl): Use new.
2668         (jit_unregister_code): Use delete.
2669         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2670         (~objfile): Rename from free_objfile.
2671         (free_objfile_separate_debug, do_free_objfile_cleanup)
2672         (free_all_objfiles, objfile_purge_solibs): Use delete.
2673         * objfiles.h (struct objfile): Add constructor and destructor.
2674         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
2675         (allocate_objfile, free_objfile): Don't declare.
2676         (struct objstats): Add initializers.
2677
2678 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2679
2680         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
2681         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
2682         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
2683         * gdbarch.h: Regenerate.
2684         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2685         Adjust comment.
2686         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
2687         (i386_displaced_step_fixup): Adjust comment.
2688         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
2689
2690 2017-10-12  Tom Tromey  <tom@tromey.com>
2691
2692         * prologue-value.h (pv_area::store_would_trash): Return bool.
2693         (pv_area::find_reg): Likewise.
2694         * prologue-value.c (pv_area::store_would_trash): Return bool.
2695         (pv_area::find_reg): Likewise.
2696
2697 2017-10-12  Tom Tromey  <tom@tromey.com>
2698
2699         * s390-linux-tdep.c (s390_store, s390_load)
2700         (s390_check_for_saved, s390_analyze_prologue): Update.
2701         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
2702         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
2703         * prologue-value.h (class pv_area): Move from prologue-value.c.
2704         Change names of members.  Add constructor, destructor, member
2705         functions.
2706         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
2707         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
2708         (pv_area_fetch, pv_area_scan): Don't declare.
2709         * prologue-value.c (struct pv_area::area_entry): Now member of
2710         pv_area.
2711         (struct pv_area): Move to prologue-value.h.
2712         (pv_area::pv_area): Rename from make_pv_area.
2713         (pv_area::~pv_area): Rename from free_pv_area.
2714         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
2715         (clear_entries, find_entry, overlaps, store_would_trash, store)
2716         (fetch, find_reg, scan): Now member of pv_area.
2717         Remove "area" argument.  Update.
2718         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
2719         Update.
2720         * mn10300-tdep.c (push_reg, check_for_saved)
2721         (mn10300_analyze_prologue): Update.
2722         * mep-tdep.c (is_arg_spill, check_for_saved)
2723         (mep_analyze_prologue): Update.
2724         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
2725         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
2726         (m32c_is_struct_return, m32c_analyze_prologue): Update.
2727         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
2728         Update.
2729         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
2730         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
2731
2732 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2733
2734         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
2735         * linux-nat.c (linux_nat_delete_thread): New variable.
2736         (lwp_free): Invoke linux_nat_delete_thread if set.
2737         (linux_nat_set_delete_thread): New function.
2738         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
2739         thread delete callback.
2740         * arm-linux-nat.c (arm_linux_delete_thread): New function.
2741         (_initialize_arm_linux_nat): Assign thread delete callback.
2742         * s390-linux-nat.c (s390_delete_thread): New function.
2743         (_initialize_s390_nat): Assign thread delete callback.
2744         * x86-linux-nat.c (x86_linux_add_target): Likewise.
2745         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
2746         function.
2747         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
2748         declaration.
2749         * nat/x86-linux.c (x86_linux_delete_thread): New function.
2750         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
2751
2752 2017-10-09  Tom Tromey  <tom@tromey.com>
2753
2754         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
2755         std::string.
2756         * tui/tui-layout.c (enum tui_status): Use std::string.
2757
2758 2017-10-11  Tom Tromey  <tom@tromey.com>
2759
2760         * gdbthread.h (thread_command): Constify.
2761         * inferior.h (detach_command): Constify.
2762         * top.h (set_history, show_history): Constify.
2763         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
2764         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
2765         * bsd-kvm.c (bsd_kvm_cmd): Constify.
2766         * printcmd.c (set_command): Constify.
2767         (non_const_set_command): New function.
2768         * dcache.c (set_dcache_command, show_dcache_command): Constify.
2769         * breakpoint.c (enable_command, disable_command, delete_command)
2770         (catch_command, tcatch_command, set_breakpoint_cmd)
2771         (show_breakpoint_cmd): Constify.
2772         * macrocmd.c (macro_command): Constify.
2773         * infcmd.c (unset_command, kill_command, detach_command)
2774         (info_proc_cmd): Constify.
2775         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
2776         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
2777         (info_auto_load_cmd): Constify.
2778         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
2779         (unset_tdesc_cmd): Constify.
2780         * ada-lang.c (set_ada_command, show_ada_command)
2781         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
2782         * guile/guile.c (set_guile_command, show_guile_command)
2783         (info_guile_command): Constify.
2784         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
2785         Constify.
2786         * skip.c (skip_command): Constify.
2787         * compile/compile.c (_initialize_compile): Constify.
2788         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
2789         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
2790         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
2791         (maint_btrace_pt_show_cmd): Constify.
2792         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
2793         Constify.
2794         * python/python.c (user_show_python, user_set_python): Constify.
2795         * mips-tdep.c (set_mips_command, show_mips_command)
2796         (set_mipsfpu_command): Constify.
2797         * record-btrace.c (cmd_record_btrace_start)
2798         (cmd_set_record_btrace, cmd_show_record_btrace)
2799         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
2800         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
2801         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
2802         Constify.
2803         * symfile.c (overlay_command): Constify.
2804         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2805         * cli/cli-logging.c (set_logging_command, show_logging_command):
2806         Constify.
2807         * cli/cli-dump.c (dump_command, append_command)
2808         (srec_dump_command, ihex_dump_command, verilog_dump_command)
2809         (tekhex_dump_command, binary_dump_command)
2810         (binary_append_command): Constify.
2811         * cli/cli-decode.c (struct cmd_list_element): Change type of
2812         "fun".
2813         * cli/cli-cmds.c (info_command, show_command, set_debug)
2814         (show_debug): Constify.
2815         (show_command): Add non-const overload.
2816         * top.c (set_history, show_history): Constify.
2817         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
2818         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
2819         * target.c (target_command): Constify.
2820         * sparc64-tdep.c (info_adi_command): Constify.
2821         * record-full.c (cmd_record_full_start): Constify.
2822         (set_record_full_command): Constify.  Fix typo.
2823         (show_record_full_command): Constify.
2824         * thread.c (thread_command, thread_apply_command): Constify.
2825         * memattr.c (dummy_cmd): Constify.
2826         * value.c (function_command): Constify.
2827         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
2828         * probe.c (info_probes_command): Constify.
2829         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
2830         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
2831         (show_thread_cmd, set_thread_default_cmd)
2832         (show_thread_default_cmd): Constify.
2833         (check_empty): Constify.
2834         * tracepoint.c (tfind_command): Constify.
2835         * cp-support.c (maint_cplus_command): Constify.
2836         * windows-tdep.c (info_w32_command): Constify.
2837         * record.c (cmd_record_start, set_record_command)
2838         (show_record_command, info_record_command, cmd_record_goto):
2839         Constify.
2840         * ravenscar-thread.c (set_ravenscar_command)
2841         (show_ravenscar_command): Constify.
2842         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
2843         Constify.
2844         (add_internal_problem_command): Remove casts.
2845         * arc-tdep.c (maintenance_print_arc_command): Constify.
2846         * valprint.c (set_print, show_print, set_print_raw)
2847         (show_print_raw): Constify.
2848         * maint.c (maintenance_command, maintenance_info_command)
2849         (maintenance_print_command, maintenance_set_cmd)
2850         (maintenance_show_cmd, set_per_command_cmd)
2851         (show_per_command_cmd, maintenance_check_command): Constify.
2852         * language.c (set_check, show_check): Constify.
2853         * typeprint.c (show_print_type, set_print_type): Constify.
2854         * go32-nat.c (go32_info_dos_command): Constify.
2855
2856 2017-10-11  Tom Tromey  <tom@tromey.com>
2857
2858         * breakpoint.c (prepare_re_set_context): Remove.
2859         (breakpoint_re_set_one): Update.  Don't use cleanups.
2860         (breakpoint_re_set): Use scoped_restore, std::string, and
2861         scoped_restore_current_language.
2862
2863 2017-10-11  Tom Tromey  <tom@tromey.com>
2864
2865         * breakpoint.c (commands_command_1): Use std::string.
2866         (cleanup_executing_breakpoints): Remove.
2867         (bpstat_do_actions_1): Use scoped_restore.
2868         (bpstat_check_watchpoint): Use std::string.
2869         (decode_static_tracepoint_spec): Likewise.
2870         (break_range_command): Likewise.
2871         (watch_command_1): Likewise.
2872         (compare_breakpoints): Change argument types.
2873         (clear_command): Use std::vector.
2874         (cleanup_executing_breakpoints): Remove.
2875         (update_global_location_list): Use unique_xmalloc_ptr.
2876         (strace_command): Remove unused declaration.
2877
2878 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2879
2880         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
2881         * NEWS: Mention new FreeBSD/arm native configuration.
2882         * configure.host: Add arm*-*-freebsd*.
2883         * configure.nat: Likewise.
2884         * arm-fbsd-nat.c: New file.
2885
2886 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2887
2888         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
2889         (ALLDEPFILES): Add arm-fbsd-tdep.c.
2890         * NEWS: Mention new FreeBSD/arm target.
2891         * configure.tgt: Add arm*-*-freebsd*.
2892         * arm-fbsd-tdep.c: New file.
2893         * arm-fbsd-tdep.h: New file.
2894
2895 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2896
2897         * linux-tdep.c (linux_make_corefile_notes): Remove call to
2898         `gdbarch_elfcore_write_linux_prpsinfo'.
2899         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
2900         method.
2901         (elf_internal_linux_prpsinfo): Remove declaration.
2902         * gdbarch.h: Regenerate.
2903         * gdbarch.c: Regenerate.
2904
2905 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2906
2907         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
2908         `set_gdbarch_elfcore_write_linux_prpsinfo'.
2909
2910 2017-10-11  Pedro Alves  <palves@redhat.com>
2911
2912         * breakpoint.c (reattach_breakpoints): Delete.
2913         * breakpoint.h (reattach_breakpoints): Delete.
2914
2915 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
2916
2917         * symfile.c (registered_sym_fns): Make struct, not typedef.
2918         (DEF_VEC_O (registered_sym_fns)): Remove.
2919         (symtab_fns): Change type to std::vector.
2920         (add_symtab_fns): Adjust.
2921         (find_sym_fns): Adjust.
2922
2923 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
2924
2925         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
2926         * arc-tdep.h (arc_arch_is_em): New function.
2927         (arc_arch_is_hs): Likewise.
2928
2929 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
2930
2931         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
2932         parentheses in the declaration.
2933         (macro_lookup_inclusion): Likewise.
2934         (macro_lookup_definition): Likewise.
2935         * p-lang.h (pascal_builtin_types): Likewise.
2936         * tui/tui-data.c (tui_win_list): Likewise.
2937         * tui/tui-data.h (tui_win_list): Likewise.
2938         * utils.h (make_cleanup_free_section_addr_info): Likewise.
2939
2940 2017-10-11  Mark Rages  <markrages@gmail.com>
2941
2942         * target-memory.c (block_boundaries): Fix for block address not
2943         aligned on block size.
2944
2945 2017-10-10  Pedro Alves <palves@redhat.com>
2946             Tom Tromey  <tom@tromey.com>
2947
2948         * breakpoint.c (struct captured_breakpoint_query_args)
2949         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
2950         (print_breakpoint): New.
2951         * breakpoint.h (print_breakpoint): Declare.
2952         * common/common-exceptions.h (enum return_reason): Remove
2953         references to catch_exceptions.
2954         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
2955         Delete.
2956         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
2957         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
2958         * gdb.h: Delete.
2959         * gdbthread.h (thread_select): Declare.
2960         * mi/mi-cmd-break.c: Don't include gdb.h.
2961         (breakpoint_notify): Use print_breakpoint.
2962         * mi/mi-cmd-catch.c: Don't include gdb.h.
2963         * mi/mi-interp.c: Don't include gdb.h.
2964         (mi_print_breakpoint_for_event): New.
2965         (mi_breakpoint_created, mi_breakpoint_modified): Use
2966         mi_print_breakpoint_for_event.
2967         * mi/mi-main.c: Don't include gdb.h.
2968         (mi_cmd_thread_select): Parse the global thread ID here.  Use
2969         thread_select instead of gdb_thread_select.
2970         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
2971         of using gdb_list_thread_ids.
2972         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
2973         FILEIO_ENOSYS here.
2974         (remote_fileio_request): Use TRY/CATCH instead of
2975         catch_exceptions.
2976         * symfile-mem.c (struct symbol_file_add_from_memory_args)
2977         (symbol_file_add_from_memory_wrapper): Delete.
2978         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
2979         * thread.c: Don't include gdb.h.
2980         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
2981         (thread_alive): Use thread_select.
2982         (do_captured_thread_select): Delete, parts salvaged as ...
2983         (thread_select): ... this new function.
2984         (gdb_thread_select): Delete.
2985
2986 2017-10-10  Pedro Alves  <palves@redhat.com>
2987             Tom Tromey  <tom@tromey.com>
2988
2989         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
2990         and reverse logic.
2991         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
2992         No longer macros.  Instead ...
2993         (enum wp_check_result): They're now values of this new
2994         enumeration.
2995         (watchpoint_check): Change return type to wp_check_result and
2996         parameter type to bpstat.
2997         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
2998         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
2999         catch_errors.  Reverse logic of watchpoint_check call.
3000         (breakpoint_re_set_one): Now returns void and takes a breakpoint
3001         pointer as parameter.
3002         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3003         * common/common-exceptions.c (throw_exception_sjlj): Update
3004         comments to avoid mentioning catch_errors.
3005         * exceptions.c (catch_errors): Delete.
3006         * exceptions.h: Update comments to avoid mentioning catch_errors.
3007         (catch_errors_ftype, catch_errors): Delete.
3008         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3009         (hook_stop_stub): Delete.
3010         (restore_selected_frame): Change return type to void, and
3011         parameter type to const frame_id &.
3012         (restore_infcall_control_state): Use TRY/CATCH instead of
3013         catch_errors.
3014         * main.c (captured_command_loop): Return void and remove
3015         parameter.  Remove references to catch_errors.
3016         (captured_main): Use TRY/CATCH instead of catch_errors.
3017         * objc-lang.c (objc_submethod_helper_data)
3018         (find_objc_msgcall_submethod_helper): Delete.
3019         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3020         catch_errors.
3021         * record-full.c (record_full_message): Return void.
3022         (record_full_message_args, record_full_message_wrapper): Delete.
3023         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3024         instead of catch_errors.
3025         * solib-aix.c (solib_aix_open_symbol_file_object): Change
3026         parameter type to int.
3027         * solib-darwin.c (open_symbol_file_object): Ditto.
3028         * solib-dsbt.c (open_symbol_file_object): Ditto.
3029         * solib-frv.c (open_symbol_file_object): Ditto.
3030         * solib-svr4.c (open_symbol_file_object): Ditto.
3031         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3032         * solib.c (update_solib_list): Use TRY/CATCH instead of
3033         catch_errors.
3034         * solist.h (struct target_so_ops) <open_symbol_file_object>:
3035         Change type.
3036         * symmisc.c (struct print_symbol_args): Remove.
3037         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3038         (print_symbol): Change type.
3039         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3040         and remove parameters.
3041         (catch_errors): New.
3042         (get_windows_debug_event): Adjust.
3043
3044 2017-10-09  Tom Tromey  <tom@tromey.com>
3045
3046         * mi/mi-main.c (free_splay_tree): Remove.
3047         (list_available_thread_groups): Use splay_tree_up.
3048         * common/gdb_splay_tree.h: New file.
3049
3050 2017-10-09  Tom Tromey  <tom@tromey.com>
3051
3052         * mi/mi-main.c (do_nothing): Remove.
3053         (list_available_thread_groups): Update.
3054
3055 2017-10-09  Pedro Alves  <palves@redhat.com>
3056
3057         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3058         reading registers when switching context.
3059
3060 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
3061
3062         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3063         (fbsd_convert_siginfo): Likewise.
3064         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3065
3066 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
3067
3068         * configure.ac (try_guile_versions): Remove guile-2.2.
3069         * configure: Regenerate.
3070
3071 2017-10-09  Tom Tromey  <tom@tromey.com>
3072
3073         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3074         (COMPILE.pre): Use $(CXX).
3075
3076 2017-10-09  Pedro Alves  <palves@redhat.com>
3077
3078         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3079         Use bool.
3080         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3081         * cp-support.h (cp_remove_params): Now returns a
3082         gdb::unique_xmalloc_ptr.
3083         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3084         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3085         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3086         returning a gdb::unique_xmalloc_ptr.
3087         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3088         * stack.c (find_frame_funname): Adjust to cp_remove_params
3089         returning a gdb::unique_xmalloc_ptr.
3090
3091 2017-10-08  Tom Tromey  <tom@tromey.com>
3092
3093         * dwarf2read.c (dwarf2_get_dwz_file): Use
3094         gdb::unique_xmalloc_ptr.
3095         (find_slot_in_mapped_hash): Likewise.
3096         (dwarf2_physname): Likewise.
3097         (create_dwo_unit_in_dwp_v1): Use std::string.
3098         (create_dwo_unit_in_dwp_v2): Likewise.
3099         (lookup_dwo_cutu): Likewise.
3100         (inherit_abstract_dies): Use std::vector.
3101         (read_array_type): Likewise.
3102         (dwarf_decode_macros): Remove unused declaration.
3103         (unsigned_int_compar): Remove.
3104         (dwarf2_build_psymtabs_hard): Use scoped_restore.
3105         (psymtabs_addrmap_cleanup): Remove.
3106
3107 2017-10-08  Tom Tromey  <tom@tromey.com>
3108
3109         * frame-unwind.c (frame_unwind_try_unwinder): Update.
3110         * frame.h (frame_cleanup_after_sniffer): Declare.
3111         (frame_prepare_for_sniffer): Return void.
3112         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
3113         type of argument.
3114         (frame_prepare_for_sniffer): Return void.
3115
3116 2017-10-08  Tom Tromey  <tom@tromey.com>
3117
3118         * utils.h (make_cleanup_value_free): Remove.
3119         * utils.c (do_value_free, struct cleanup): Remove.
3120         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3121         Use gdb_value_up.
3122         * value.h (struct value_deleter): New.
3123         (gdb_value_up): New typedef.
3124
3125 2017-10-08  Tom Tromey  <tom@tromey.com>
3126
3127         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3128         (make_cleanup_free_search_symbols): Remove.
3129         (search_symbols): Return std::vector.
3130         (symbol_search::compare_search_syms): Now member of
3131         symbol_search.  Change arguments.
3132         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
3133         (symtab_symbol_info, rbreak_command): Update.
3134         * symtab.h (struct symbol_search) <next>: Remove.
3135         Add constructors.
3136         (symbol_search::operator<): New function.
3137         (symbol_search::operator==): New function.
3138         (search_symbols): Remove std::vector.
3139         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3140         (symbol_search::compare_search_syms): Declare.
3141
3142 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3143
3144         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3145         arch/aarch64-insn.o.
3146         Remove one rule.
3147         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3148
3149 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3150
3151         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3152         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3153         arch/arm-linux.o respectively.
3154         * configure.tgt: Likewise.
3155
3156 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3157
3158         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3159         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3160
3161 2017-10-06  Pedro Alves  <palves@redhat.com>
3162
3163         * windows-nat.c: Include <algorithm>.
3164
3165 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3166
3167         * configure.tgt (i386_tobjs): New variable.
3168         (amd64_tobjs): New variable.
3169         Set $cpu_obs and $os_obs.
3170
3171 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3172
3173         * Makefile.in (CONFIG_SRC_SUBDIR): New.
3174         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3175         (clean): Remove object files and dependency files.
3176         (distclean): Remove the directory.
3177         * configure.ac: Invoke AC_CONFIG_COMMANDS.
3178         * configure: Re-generated.
3179         * configure.tgt: Replace amd64.o with arch/amd64.o.
3180
3181 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
3182
3183         PR build/22188
3184         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3185         and SETEND.
3186
3187 2017-10-05  Pedro Alves  <palves@redhat.com>
3188
3189         * linux-nat.c (linux_child_follow_fork): When following the parent
3190         and detaching the child, consult the parent thread's architecture
3191         instead of the child's.
3192
3193 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3194
3195         * ax.h: Do not include "doublest.h".
3196         (union agent_val): Remove.
3197
3198 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3199
3200         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3201         (decimal_to_string): Return std::string object.
3202         (decimal_from_string): Accept std::string object.  Return bool.
3203         (decimal_from_integral, decimal_from_doublest): Remove.
3204         (decimal_from_longest): Add prototype.
3205         (decimal_from_ulongest): Likewise.
3206         (decimal_to_longest): Likewise.
3207         (decimal_from_doublest): Likewise.
3208         * dfp.c: Do not include "gdbtypes.h" or "value.h".
3209         (MAX_DECIMAL_STRING): Move here.
3210         (decimal_to_string): Return std::string object.
3211         (decimal_from_string): Accept std::string object.  Return bool.
3212         (decimal_from_integral): Remove, replace by ...
3213         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3214         (decimal_to_longest): New function.
3215         (decimal_from_floating): Remove, replace by ...
3216         (decimal_from_doublest): ... this new function.
3217         (decimal_to_doublest): Update to new decimal_to_string interface.
3218
3219         * value.c (unpack_long): Use decimal_to_longest.
3220         * valops.c (value_cast): Use decimal_from_doublest instead of
3221         decimal_from_floating.  Use decimal_from_[u]longest isntead of
3222         decimal_from_integral.
3223         * valarith.c (value_args_as_decimal): Likewise.
3224         * valprint.c (print_decimal_floating): Update to new
3225         decimal_to_string interface.
3226         * printcmd.c (printf_decfloat): Likewise.
3227         * c-exp.y (parse_number): Update to new decimal_from_string interface.
3228
3229 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3230
3231         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
3232         * gdbtypes.c: Include "floatformat.h".
3233         * value.c: Likewise.
3234         * m68k-tdep.c: Likewise.
3235
3236         * findvar.c: Do not include "floatformat.h".
3237         * amd64-darwin-tdep.c: Likewise.
3238         * arm-linux-tdep.c: Likewise.
3239         * i386-darwin-tdep.c: Likewise.
3240         * i387-tdep.c: Likewise.
3241         * m68k-linux-tdep.c: Likewise.
3242         * mep-tdep.c: Likewise.
3243         * mips-tdep.c: Likewise.
3244         * nios2-tdep.c: Likewise.
3245         * s390-linux-tdep.c: Likewise.
3246         * sparc-obsd-tdep.c: Likewise.
3247         * sparc-tdep.c: Likewise.
3248         * sparc64-tdep.c: Likewise.
3249         * spu-tdep.c: Likewise.
3250         * tic6x-tdep.c: Likewise.
3251         * tilegx-tdep.c: Likewise.
3252         * vax-tdep.c: Likewise.
3253         * xstormy16-tdep.c: Likewise.
3254         * xtensa-tdep.c: Likewise.
3255
3256         * top.c: Do not include "doublest.h".
3257         * aarch64-tdep.c: Likewise.
3258         * alpha-tdep.c: Likewise.
3259         * arm-linux-tdep.c: Likewise.
3260         * m68k-linux-tdep.c: Likewise.
3261         * tilegx-tdep.c: Likewise.
3262         * xstormy16-tdep.c: Likewise.
3263
3264 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3265
3266         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3267         (mipsn32_fbsd_sigframe): Define.
3268         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3269         for FreeBSD/mipsn32.
3270
3271 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3272
3273         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3274         AT_HWCAP.
3275
3276 2017-10-05  Tristan Gingold  <tgingold@free.fr>
3277
3278         * MAINTAINERS (Misc): Update my email address.
3279
3280 2017-10-04  Pedro Alves  <palves@redhat.com>
3281
3282         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
3283         it instead of target_gdbarch.
3284         (get_remote_state, get_remote_packet_size): Adjust
3285         get_remote_arch_state calls, passing down target_gdbarch
3286         explicitly.
3287         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3288         'gdbarch' and use it instead of target_gdbarch.
3289         (get_memory_packet_size): Adjust get_remote_arch_state calls,
3290         passing down target_gdbarch explicitly.
3291         (struct stop_reply) <arch>: New field.
3292         (remote_parse_stop_reply): Use the stopped thread's architecture,
3293         not the current inferior's.  Save the architecture in the
3294         stop_reply.
3295         (process_stop_reply): Use the stop reply's architecture.
3296         (process_g_packet, remote_fetch_registers)
3297         (remote_prepare_to_store, store_registers_using_G)
3298         (remote_store_registers): Adjust get_remote_arch_state calls,
3299         using the regcache's architecture.
3300         (remote_get_trace_status): Adjust get_remote_arch_state calls,
3301         passing down target_gdbarch explicitly.
3302         * spu-multiarch.c (spu_thread_architecture): Defer to the target
3303         beneath instead of calling target_gdbarch.
3304         * target.c (default_thread_architecture): Use the specified
3305         inferior's architecture, instead of the current inferior's
3306         architecture (via target_gdbarch).
3307
3308 2017-10-04  Pedro Alves  <palves@redhat.com>
3309
3310         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3311         case.
3312         (regcache_print): Handle !target_has_registers here instead.
3313
3314 2017-10-04  Pedro Alves  <palves@redhat.com>
3315
3316         * frame.c (create_test_frame): Delete.
3317         * frame.h (create_test_frame): Delete.
3318         * gdbarch-selftests.c: Include gdbthread.h and target.h.
3319         (class regcache_test): Delete.
3320         (test_target_has_registers, test_target_has_stack)
3321         (test_target_has_memory, test_target_prepare_to_store)
3322         (test_target_store_registers): New functions.
3323         (test_target_ops): New class.
3324         (register_to_value_test): Error out if there's already a
3325         process_stratum (or higher) target pushed.  Create a fuller mock
3326         environment, with mock target_ops, inferior, address space, thread
3327         and inferior_ptid.
3328         * progspace.c (struct address_space): Move to ...
3329         * progspace.h (struct address_space): ... here.
3330         * regcache.h (regcache::~regcache, regcache::raw_write)
3331         [GDB_SELF_TEST]: No longer virtual.
3332
3333 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
3334
3335         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3336
3337 2017-10-04  Pedro Alves  <palves@redhat.com>
3338
3339         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3340         out of 'between TRY and CATCH'.
3341
3342 2017-10-04  Pedro Alves  <palves@redhat.com>
3343
3344         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3345         * common/common-exceptions.h (TRY): Open an outermost scope.
3346         Expand intro comment.
3347         (CATCH): Reindent.
3348         (END_CATCH): Close the outermost scope.
3349         * completer.c (complete_line_internal): Add missing END_CATCH.
3350
3351 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3352
3353         * NEWS (Changes since GDB 8.0): Add entry about new
3354         'set-cwd-on-gdbserver' feature.
3355         (New remote packets): Add entry for QSetWorkingDir.
3356         * common/common-inferior.h (set_inferior_cwd): New prototype.
3357         * infcmd.c (set_inferior_cwd): Remove "static".
3358         (show_cwd_command): Expand text to include remote debugging.
3359         * remote.c: Add PACKET_QSetWorkingDir.
3360         (remote_protocol_features) <QSetWorkingDir>: New entry for
3361         PACKET_QSetWorkingDir.
3362         (extended_remote_set_inferior_cwd): New function.
3363         (extended_remote_create_inferior): Call
3364         "extended_remote_set_inferior_cwd".
3365         (_initialize_remote): Call "add_packet_config_cmd" for
3366         QSetWorkingDir.
3367
3368 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3369
3370         * NEWS (New commands): Mention "set/show cwd".
3371         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3372         "cd" command's help text.
3373         * common/common-inferior.h (get_inferior_cwd): New prototype.
3374         * infcmd.c (inferior_cwd_scratch): New global variable.
3375         (set_inferior_cwd): New function.
3376         (get_inferior_cwd): Likewise.
3377         (set_cwd_command): Likewise.
3378         (show_cwd_command): Likewise.
3379         (_initialize_infcmd): Add "set/show cwd" commands.
3380         * inferior.h (class inferior) <cwd>: New field.
3381         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3382         (fork_inferior): Change inferior's cwd before its execution.
3383         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3384         to CreateProcess.
3385
3386 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3387
3388         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3389         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3390         (COMMON_OBS): Add gdb_tilde_expand.o.
3391         * common/gdb_tilde_expand.c: New file.
3392         * common/gdb_tilde_expand.h: Likewise.
3393
3394 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
3395
3396         * gdbarch.sh (objfile): Remove duplicate declaration.
3397         * gdbarch.h: Regenerate.
3398
3399 2017-10-03  Tom Tromey  <tom@tromey.com>
3400
3401         * utils.c (internal_vproblem): Use string_vprintf.
3402
3403 2017-10-03  Tom Tromey  <tom@tromey.com>
3404
3405         * printcmd.c (info_symbol_command): Use std::string.
3406
3407 2017-10-03  Tom Tromey  <tom@tromey.com>
3408
3409         * top.c (gdb_safe_append_history): Use std::string.
3410
3411 2017-10-03  Tom Tromey  <tom@tromey.com>
3412
3413         * event-top.c (stdin_event_handler): Update.
3414         * main.c (captured_main_1): Update.
3415         * top.h (make_delete_ui_cleanup): Remove.
3416         (struct ui): Add constructor and destructor.
3417         (new_ui, delete_ui): Remove.
3418         * top.c (make_delete_ui_cleanup): Remove.
3419         (new_ui_command): Use std::unique_ptr.
3420         (delete_ui_cleanup): Remove.
3421         (ui::ui): Rename from new_ui.  Update.
3422         (free_ui): Remove.
3423         (ui::~ui): Rename from delete_ui.  Update.
3424
3425 2017-10-03  Tom Tromey  <tom@tromey.com>
3426
3427         * symfile.c (load_progress): Use gdb::byte_vector.
3428
3429 2017-10-03  Tom Tromey  <tom@tromey.com>
3430
3431         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3432         declaration.
3433         * printcmd.c (x_command): Remove unused declaration.
3434         * symfile.c (symbol_file_command): Remove unused declaration.
3435
3436 2017-10-03  Tom Tromey  <tom@tromey.com>
3437
3438         * utils.c (internal_vproblem): Use std::string.
3439         (defaulted_query): Likewise.
3440
3441 2017-10-03  Tom Tromey  <tom@tromey.com>
3442
3443         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3444         * top.c (execute_command_to_string): Update.
3445         * utils.c (make_cleanup_restore_page_info): Remove.
3446         (do_restore_page_info_cleanup): Remove.
3447         (set_batch_flag_and_restore_page_info):
3448         New.
3449         (make_cleanup_restore_page_info): Remove.
3450         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3451         (~set_batch_flag_and_restore_page_info): New
3452         (make_cleanup_restore_uinteger): Remove.
3453         (make_cleanup_restore_integer): Remove.
3454         (struct restore_integer_closure): Remove.
3455         (restore_integer): Remove.
3456         * utils.h (struct set_batch_flag_and_restore_page_info): New
3457         class.
3458         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3459         (make_cleanup_restore_page_info): Remove.
3460         (make_cleanup_restore_uinteger) Remove.
3461         (make_cleanup_restore_integer) Remove.
3462
3463 2017-10-03  Tom Tromey  <tom@tromey.com>
3464
3465         * record-full.h (record_full_gdb_operation_disable_set): Return
3466         scoped_restore_tmpl<int>.
3467         * infrun.c (adjust_pc_after_break): Update.
3468         (handle_signal_stop): Update.
3469         * record-full.c (record_full_gdb_operation_disable_set): Return
3470         scoped_restore_tmpl<int>.
3471         (record_full_wait_1, record_full_insert_breakpoint)
3472         (record_full_remove_breakpoint, record_full_save)
3473         (record_full_goto_insn): Update.
3474
3475 2017-10-02  Tom Tromey  <tom@tromey.com>
3476
3477         PR rust/22236:
3478         * rust-lang.c (rust_val_print_str): New function.
3479         (val_print_struct): Call it.
3480         (rust_subscript): Preserve name of slice type.
3481
3482 2017-10-02  Tom Tromey  <tom@tromey.com>
3483
3484         * rust-lang.c (rust_subscript): Handle slices in
3485         EVAL_AVOID_SIDE_EFFECTS case.
3486
3487 2017-10-02  Tom Tromey  <tom@tromey.com>
3488
3489         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3490
3491 2017-10-02  Tom Tromey  <tom@tromey.com>
3492
3493         * rust-lang.h (rust_slice_type): Add "extern".
3494
3495 2017-10-02  Tom Tromey  <tom@tromey.com>
3496             Pedro Alves  <palves@redhat.com>
3497
3498         * ada-lang.h (ada_exc_info::operator<): Make const.
3499         (ada_exc_info::operator==): Make const.
3500         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3501         Make const.
3502
3503 2017-09-29  Tom Tromey  <tom@tromey.com>
3504
3505         * target.c (read_whatever_is_readable): Change type of "result".
3506         Update.
3507         (free_memory_read_result_vector): Remove.
3508         (read_memory_robust): Change return type.  Update.
3509         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
3510         bin2hex, std::string.
3511         * target.h (memory_read_result_s): Remove typedef.
3512         (free_memory_read_result_vector): Remove.
3513         (read_memory_robust): Return std::vector.
3514
3515 2017-09-29  Tom Tromey  <tom@tromey.com>
3516
3517         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3518
3519 2017-09-29  Tom Tromey  <tom@tromey.com>
3520
3521         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3522         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
3523         operator< and operator==.
3524         (ada_exceptions_list): Return a std::vector.
3525         * ada-lang.c (ada_exc_info::operator<): Rename from
3526         compare_ada_exception_info.
3527         (ada_exc_info::operator==): New.
3528         (sort_remove_dups_ada_exceptions_list): Change type of
3529         "exceptions".
3530         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3531         (ada_add_global_exceptions): Likewise.
3532         (ada_exceptions_list_1): Return a std::vector.
3533         (ada_exceptions_list): Likewise.
3534
3535 2017-09-29  Tom Tromey  <tom@tromey.com>
3536
3537         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3538         'std::set *'.
3539         (print_one_inferior): Update.
3540         (free_vector_of_ints): Remove.
3541         (list_available_thread_groups): Change "ids" to std::set.
3542         (mi_cmd_list_thread_groups): Update.
3543         (struct collect_cores_data) <core>: Now a std::set.
3544         (collect_cores): Update.
3545         (unique): Remove.
3546         (print_one_inferior): Update.
3547
3548 2017-09-29  Tom Tromey  <tom@tromey.com>
3549
3550         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3551         (mi_execute_async_cli_command): Likewise.
3552         (mi_cmd_trace_frame_collected): Use field_fmt.
3553
3554 2017-09-29  Tom Tromey  <tom@tromey.com>
3555
3556         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3557         gdb::byte_vector.
3558
3559 2017-09-29  Tom Tromey  <tom@tromey.com>
3560
3561         * mi/mi-parse.c (mi_parse): Remove unused declaration.
3562
3563 2017-09-29  Tom Tromey  <tom@tromey.com>
3564
3565         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3566
3567 2017-09-29  Tom Tromey  <tom@tromey.com>
3568
3569         * varobj.h (varobj_gen_name): Return std::string.
3570         * varobj.c (varobj_gen_name): Return std::string.
3571         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3572         (mi_cmd_var_delete): Don't copy "name".
3573
3574 2017-09-29  Tom Tromey  <tom@tromey.com>
3575
3576         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3577         (mi_cmd_break_insert_1): Update.
3578
3579 2017-09-29  Tom Tromey  <tom@tromey.com>
3580
3581         * target.h (make_scoped_defer_target_commit_resume): Update.
3582         * target.c (make_scoped_defer_target_commit_resume): Rename from
3583         make_cleanup_defer_target_commit_resume.  Return a
3584         scoped_restore.
3585         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3586
3587 2017-09-29  Tom Tromey  <tom@tromey.com>
3588
3589         * main.c (captured_main_1): Remove unused declaration.
3590         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3591
3592 2017-09-29  Tom Tromey  <tom@tromey.com>
3593
3594         * symtab.c (search_symbols): Remove unused outer cleanup.
3595         (make_source_files_completion_list): Remove unused declaration.
3596
3597 2017-09-29  Tom Tromey  <tom@tromey.com>
3598
3599         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3600
3601 2017-09-29  Tom Tromey  <tom@tromey.com>
3602
3603         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3604         gdb::byte_vector.
3605
3606 2017-09-29  Tom Tromey  <tom@tromey.com>
3607
3608         * complaints.c (vcomplaint): Use std::string.
3609
3610 2017-09-29  Tom Tromey  <tom@tromey.com>
3611
3612         * tracepoint.c (trace_variable_command): Use std::string.
3613         (encode_actions_1): Remove unused declarations.
3614         (create_tsv_from_upload): Use std::string.
3615
3616 2017-09-29  Tom Tromey  <tom@tromey.com>
3617
3618         * cp-support.c (gdb_demangle): Use std::string.
3619
3620 2017-09-29  Tom Tromey  <tom@tromey.com>
3621
3622         * stack.c (parse_frame_specification): Use std::string
3623         (info_frame_command): Use gdb::unique_xmalloc_ptr.
3624
3625 2017-09-29  Tom Tromey  <tom@tromey.com>
3626
3627         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3628
3629 2017-09-29  Tom Tromey  <tom@tromey.com>
3630
3631         * utils.c (vfprintf_maybe_filtered): Use std::string.
3632         (vfprintf_unfiltered): Likewise.
3633
3634 2017-09-29  Tom Tromey  <tom@tromey.com>
3635
3636         * event-top.c (top_level_prompt): Return std::string.
3637         (display_gdb_prompt): Update.
3638
3639 2017-09-29  Tom Tromey  <tom@tromey.com>
3640
3641         * unittests/common-utils-selftests.c (format): New function.
3642         (string_vprintf_tests): New function.
3643         (_initialize_common_utils_selftests): Register new tests.
3644         * common/common-utils.c (string_vprintf): New function.
3645         * common/common-utils.h (string_vprintf): Declare.
3646
3647 2017-09-29  Pedro Alves  <palves@redhat.com>
3648
3649         * common/rsp-low.c (unpack_varlen_hex): Constify.
3650         * common/rsp-low.h (unpack_varlen_hex): Constify.
3651         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3652         Constify.
3653         * remote.c (remote_set_permissions, read_ptid)
3654         (remote_current_thread, remote_get_threads_with_qthreadinfo)
3655         (remote_static_tracepoint_marker_at)
3656         (remote_static_tracepoint_markers_by_strid)
3657         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3658         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3659         (parse_tracepoint_definition, parse_tsv_definition)
3660         (parse_static_tracepoint_marker_definition): Constify.
3661         * tracepoint.h (parse_static_tracepoint_marker_definition)
3662         (parse_trace_status, parse_tracepoint_status)
3663         (parse_tracepoint_definition, parse_tsv_definition): Constify.
3664
3665 2017-09-29  Pedro Alves  <palves@redhat.com>
3666
3667         * remote.c (target_buf, target_buf_size): Delete.
3668         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3669         Use the connection's packet buffer instead.
3670         All callers adjusted.
3671         (_initialize_remote): Remove references to target_buf and
3672         target_buf_size.
3673
3674 2017-09-28  Pedro Alves  <palves@redhat.com>
3675
3676         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3677         unittests/common-utils-selftests.c.
3678         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
3679         (COMMON_OBS): Remove utils-selftests.o.
3680         * utils-selftests.c: Move to ...
3681         * unittests/common-utils-selftests.c: ... here and rename self
3682         test to "string_printf".
3683
3684 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
3685
3686         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
3687         having NULL cus or tus.
3688
3689 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3690
3691         * arm-tdep.c: (convert_from_extended): Remove.
3692         (convert_to_extended): Likewise.
3693         (arm_extract_return_value): Use convert_typed_floating.
3694         (arm_store_return_value): Likewise.
3695
3696         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3697         * sh-tdep.c: Do not include "floatformat.h".
3698         (sh_littlebyte_bigword_type): New function.
3699         (sh_register_convert_to_virtual): Use convert_typed_floating.
3700         (sh_register_convert_to_raw): Likewise.
3701         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3702         (sh64_littlebyte_bigword_type): New function.
3703         (sh64_extract_return_value): Use convert_typed_floating.
3704         (sh64_register_convert_to_virtual): Likewise.
3705         (sh64_register_convert_to_raw): Likewise.
3706
3707 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3708
3709         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
3710         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
3711
3712         * gdbtypes.h (union type_specific): Make field floatformat hold
3713         just a single struct floatformat, not an array.
3714         (floatformat_from_type): Move here.
3715         * gdbtypes.c (floatformat_from_type): Move here.  Update to
3716         changed TYPE_FLOATFORMAT definition.
3717         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
3718         (recursive_dump_type): Likewise.
3719         (init_float_type): Install correct floatformat for byte order.
3720         (arch_float_type): Likewise.
3721
3722 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3723
3724         * gdbtypes.c (init_type): Change incoming argument from
3725         length-in-bytes to length-in-bits.  Assert length is a
3726         multiple of TARGET_CHAR_BITS.
3727         (arch_type, arch_flags_type): Likewise.
3728         (init_integer_type): Update call to init_type.
3729         (init_character_type): Likewise.
3730         (init_boolean_type): Likewise.
3731         (init_float_type): Likewise.
3732         (init_decfloat_type): Likewise.
3733         (init_complex_type): Likewise.
3734         (init_pointer_type): Likewise.
3735         (objfile_type): Likewise.
3736         (arch_integer_type): Update call to arch_type.
3737         (arch_character_type): Likewise.
3738         (arch_boolean_type): Likewise.
3739         (arch_float_type): Likewise.
3740         (arch_decfloat_type): Likewise.
3741         (arch_complex_type): Likewise.
3742         (arch_pointer_type): Likewise.
3743         (gdbtypes_post_init): Likewise.
3744
3745         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
3746         (read_base_type): Likewise.
3747         * mdebugread.c (basic_type): Likewise.
3748         * stabsread.c (dbx_init_float_type): Likewise.
3749         (rs6000_builtin_type): Likewise.
3750         (read_range_type): Likewise.  Also, fix call to init_integer_type
3751         with erroneous length argument.
3752
3753         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
3754         * d-lang.c (build_d_types): Likewise.
3755         * f-lang.c (build_fortran_types): Likewise.
3756         * go-lang.c (build_go_types): Likewise.
3757         * opencl-lang.c (build_opencl_types): Likewise.
3758         * jit.c (finalize_symtab): Likewise.
3759         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
3760         (build_std_type_info_type): Likewise.
3761         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
3762         update call to arch_flags_type.
3763
3764         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
3765         arch_type.
3766         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
3767         * windows-tdep.c (windows_get_tlb_type): Likewise.
3768
3769         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
3770         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3771         * m32c-tdep.c (make_types): Likewise.
3772         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
3773         (rl78_psw_type): Update call to arch_flags_type.
3774         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
3775         * rx-tdep.c (rx_psw_type): Likewise.
3776         (rx_fpsw_type): Likewise.
3777         * sparc-tdep.c (sparc_psr_type): Likewise.
3778         (sparc_fsr_type): Likewise.
3779         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
3780         (sparc64_ccr_type): Likewise.
3781         (sparc64_fsr_type): Likewise.
3782         (sparc64_fprs_type): Likewise.
3783
3784 2017-09-27  Tom Tromey  <tom@tromey.com>
3785
3786         * findcmd.c (find_command): Constify.
3787
3788 2017-09-27  Tom Tromey  <tom@tromey.com>
3789
3790         * ada-tasks.c (task_command_1, task_command): Constify.
3791
3792 2017-09-27  Tom Tromey  <tom@tromey.com>
3793
3794         * symtab.c (maintenance_print_symbol_cache)
3795         (maintenance_flush_symbol_cache)
3796         (maintenance_print_symbol_cache_statistics): Constify.
3797
3798 2017-09-27  Tom Tromey  <tom@tromey.com>
3799
3800         * inferior.c (detach_inferior_command, kill_inferior_command)
3801         (inferior_command): Constify.
3802
3803 2017-09-27  Tom Tromey  <tom@tromey.com>
3804
3805         * regcache.c (regcache_print, maintenance_print_registers)
3806         (maintenance_print_raw_registers)
3807         (maintenance_print_cooked_registers)
3808         (maintenance_print_register_groups)
3809         (maintenance_print_remote_registers): Constify.
3810
3811 2017-09-27  Tom Tromey  <tom@tromey.com>
3812
3813         * printcmd.c (map_display_numbers, undisplay_command)
3814         (enable_disable_display_command, enable_display_command)
3815         (disable_display_command): Constify.
3816
3817 2017-09-27  Tom Tromey  <tom@tromey.com>
3818
3819         * breakpoint.h (delete_command): Don't declare.
3820         * breakpoint.c (delete_command, enable_once_command)
3821         (enable_count_command, enable_delete_command, breakpoint_1)
3822         (maintenance_info_breakpoints, stopin_command, stopat_command)
3823         (delete_command, delete_trace_command, save_breakpoints)
3824         (save_breakpoints_command, save_tracepoints_command): Constify.
3825
3826 2017-09-27  Tom Tromey  <tom@tromey.com>
3827
3828         * macrocmd.c (macro_expand_command, macro_expand_once_command)
3829         (skip_ws, extract_identifier, macro_define_command)
3830         (macro_undef_command, macro_list_command): Constify.
3831
3832 2017-09-27  Tom Tromey  <tom@tromey.com>
3833
3834         * infcmd.c (environment_info, set_environment_command)
3835         (unset_environment_command, path_info, info_proc_cmd_1)
3836         (info_proc_cmd_mappings, info_proc_cmd_stat)
3837         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
3838         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
3839
3840 2017-09-27  Tom Tromey  <tom@tromey.com>
3841
3842         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
3843         Constify.
3844
3845 2017-09-27  Tom Tromey  <tom@tromey.com>
3846
3847         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
3848
3849 2017-09-27  Tom Tromey  <tom@tromey.com>
3850
3851         * demangle.c (demangle_command): Constify.
3852
3853 2017-09-27  Tom Tromey  <tom@tromey.com>
3854
3855         * progspace.c (maintenance_info_program_spaces_command):
3856         Constify.
3857
3858 2017-09-27  Tom Tromey  <tom@tromey.com>
3859
3860         * compile/compile.c (check_raw_argument, compile_file_command)
3861         (compile_code_command, compile_print_command): Constify.
3862
3863 2017-09-27  Tom Tromey  <tom@tromey.com>
3864
3865         * reggroups.c (maintenance_print_reggroups): Constify.
3866
3867 2017-09-27  Tom Tromey  <tom@tromey.com>
3868
3869         * dwarf2read.c (save_gdb_index_command): Constify.
3870
3871 2017-09-27  Tom Tromey  <tom@tromey.com>
3872
3873         * stap-probe.c (info_probes_stap_command): Constify.
3874
3875 2017-09-27  Tom Tromey  <tom@tromey.com>
3876
3877         * fork-child.c (unset_exec_wrapper_command): Constify.
3878
3879 2017-09-27  Tom Tromey  <tom@tromey.com>
3880
3881         * btrace.c (get_uint, get_context_size, no_chunk)
3882         (maint_btrace_packet_history_cmd)
3883         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
3884         (maint_info_btrace_cmd): Constify.
3885
3886 2017-09-27  Tom Tromey  <tom@tromey.com>
3887
3888         * reverse.c (delete_bookmark_command): Constify.
3889
3890 2017-09-27  Tom Tromey  <tom@tromey.com>
3891
3892         * remote.c (set_memory_packet_size)
3893         (set_memory_write_packet_size, show_memory_write_packet_size)
3894         (set_memory_read_packet_size, show_memory_read_packet_size)
3895         (compare_sections_command, packet_command, remote_put_command)
3896         (remote_get_command, remote_delete_command): Constify.
3897
3898 2017-09-27  Tom Tromey  <tom@tromey.com>
3899
3900         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
3901         (set_mipsfpu_double_command, set_mipsfpu_none_command)
3902         (set_mipsfpu_auto_command): Constify.
3903
3904 2017-09-27  Tom Tromey  <tom@tromey.com>
3905
3906         * cli/cli-cmds.h (cd_command): Constify.
3907         * cli/cli-cmds.c (cd_command): Constify.
3908
3909 2017-09-27  Tom Tromey  <tom@tromey.com>
3910
3911         * thread.c (thread_name_command, thread_find_command): Constify.
3912
3913 2017-09-27  Tom Tromey  <tom@tromey.com>
3914
3915         * probe.c (enable_probes_command, disable_probes_command):
3916         Constify.
3917
3918 2017-09-27  Tom Tromey  <tom@tromey.com>
3919
3920         * symfile.c (symbol_file_command): Constify.
3921         * gdbcore.h (deprecated_file_changed_hook): Constify.
3922         * exec.c (deprecated_file_changed_hook, exec_file_command)
3923         (file_command): Constify.
3924         * defs.h (symbol_file_command): Constify.
3925
3926 2017-09-27  Tom Tromey  <tom@tromey.com>
3927
3928         * remote-fileio.c (set_system_call_allowed)
3929         (show_system_call_allowed): Constify.
3930
3931 2017-09-27  Tom Tromey  <tom@tromey.com>
3932
3933         * tracepoint.c (delete_trace_variable_command)
3934         (tfind_end_command, tfind_start_command, tfind_pc_command)
3935         (tfind_tracepoint_command, tfind_line_command)
3936         (tfind_range_command, tfind_outside_command): Constify.
3937
3938 2017-09-27  Tom Tromey  <tom@tromey.com>
3939
3940         * ax-gdb.c (maint_agent_printf_command, agent_command)
3941         (agent_eval_command): Constify.
3942
3943 2017-09-27  Tom Tromey  <tom@tromey.com>
3944
3945         * tracepoint.c (info_scope_command): Constify.
3946         * python/python.c (gdbpy_decode_line): Constify.
3947         * python/py-breakpoint.c (bppy_init): Constify.
3948         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
3949         * location.h: (new_linespec_location)
3950         (string_to_event_location_basic, string_to_event_location):
3951         Constify.
3952         * location.c (new_linespec_location)
3953         (string_to_event_location_basic, string_to_event_location):
3954         Constify.
3955         * linespec.h (decode_line_with_current_source)
3956         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
3957         * linespec.c (linespec_lex_to_end)
3958         (decode_line_with_current_source)
3959         (decode_line_with_last_displayed): Constify.
3960         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
3961         Constify.
3962         * cli/cli-cmds.c (edit_command, list_command): Constify.
3963         * breakpoint.h (until_break_command, watch_command_wrapper)
3964         (awatch_command_wrapper, rwatch_command_wrapper)
3965         (init_ada_exception_breakpoint): Constify.
3966         * breakpoint.c (break_command_1, dprintf_command)
3967         (break_range_command, watch_command_wrapper)
3968         (rwatch_command_wrapper, awatch_command_wrapper)
3969         (until_break_command, init_ada_exception_breakpoint)
3970         (strace_marker_create_sals_from_location, trace_command)
3971         (ftrace_command, strace_command, struct tracepoint): Constify.
3972         * ax-gdb.c (agent_command_1): Constify.
3973         * ada-lang.c (ada_exception_sal): Constify.
3974
3975 2017-09-27  Tom Tromey  <tom@tromey.com>
3976
3977         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
3978         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
3979         (get_context_size, no_chunk, get_insn_history_modifiers)
3980         (cmd_record_insn_history, get_call_history_modifiers)
3981         (cmd_record_call_history): Constify.
3982
3983 2017-09-27  Tom Tromey  <tom@tromey.com>
3984
3985         * source.c (show_substitute_path_command)
3986         (unset_substitute_path_command, set_substitute_path_command):
3987         Constify.
3988
3989 2017-09-27  Tom Tromey  <tom@tromey.com>
3990
3991         * typeprint.c (maintenance_print_type): Constify.
3992         * maint.c (maintenance_dump_me, maintenance_demangle)
3993         (maintenance_time_display, maintenance_info_sections)
3994         (maintenance_print_statistics, maintenance_deprecate)
3995         (maintenance_undeprecate): Constify.
3996         (maintenance_do_deprecate): Constify.  Use std::string.
3997         (maintenance_selftest): Constify.
3998         * gdbtypes.h (maintenance_print_type): Constify.
3999
4000 2017-09-27  Tom Tromey  <tom@tromey.com>
4001
4002         * hppa-tdep.c (unwind_command): Constify.
4003
4004 2017-09-27  Tom Tromey  <tom@tromey.com>
4005
4006         * target-descriptions.c (unset_tdesc_filename_cmd)
4007         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4008         Constify.
4009
4010 2017-09-27  Tom Tromey  <tom@tromey.com>
4011
4012         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4013
4014 2017-09-27  Tom Tromey  <tom@tromey.com>
4015
4016         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4017
4018 2017-09-27  Tom Tromey  <tom@tromey.com>
4019
4020         * tui/tui-regs.c (tui_reg_command): Constify.
4021
4022 2017-09-27  Tom Tromey  <tom@tromey.com>
4023
4024         * skip.c (skip_file_command, skip_function_command)
4025         (skip_enable_command, skip_disable_command, skip_delete_command):
4026         Constify.
4027
4028 2017-09-27  Tom Tromey  <tom@tromey.com>
4029
4030         * record-btrace.c (cmd_record_btrace_bts_start)
4031         (cmd_record_btrace_pt_start): Constify.
4032
4033 2017-09-27  Tom Tromey  <tom@tromey.com>
4034
4035         * symmisc.c (maintenance_print_symbols)
4036         (maintenance_print_msymbols, maintenance_print_objfiles)
4037         (maintenance_info_symtabs, maintenance_check_symtabs)
4038         (maintenance_expand_symtabs, maintenance_info_line_tables):
4039         Constify.
4040
4041 2017-09-27  Tom Tromey  <tom@tromey.com>
4042
4043         * top.c (new_ui_command): Constify.
4044
4045 2017-09-27  Tom Tromey  <tom@tromey.com>
4046
4047         * symfile.c (add_symbol_file_command)
4048         (remove_symbol_file_command, list_overlays_command)
4049         (map_overlay_command, unmap_overlay_command)
4050         (overlay_auto_command, overlay_manual_command)
4051         (overlay_off_command, overlay_load_command): Constify.
4052
4053 2017-09-27  Tom Tromey  <tom@tromey.com>
4054
4055         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4056         (info_spu_mailbox_command, info_spu_dma_command)
4057         (info_spu_proxydma_command): Constify.
4058
4059 2017-09-27  Tom Tromey  <tom@tromey.com>
4060
4061         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4062
4063 2017-09-27  Tom Tromey  <tom@tromey.com>
4064
4065         * cli/cli-script.c (user_defined_command): Constify.
4066
4067 2017-09-27  Tom Tromey  <tom@tromey.com>
4068
4069         * cli/cli-dump.c (dump_memory_command, dump_value_command)
4070         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4071         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4072         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4073         (dump_binary_value, append_binary_memory, append_binary_value):
4074         Constify.
4075         (struct dump_context) <func>: Constify.
4076         (add_dump_command): Update.
4077
4078 2017-09-27  Tom Tromey  <tom@tromey.com>
4079
4080         * cli/cli-cmds.c (show_version, show_configuration)
4081         (source_command, show_user): Constify.
4082
4083 2017-09-27  Tom Tromey  <tom@tromey.com>
4084
4085         * target.c (maintenance_print_target_stack): Constify.
4086
4087 2017-09-27  Tom Tromey  <tom@tromey.com>
4088
4089         * interps.c (interpreter_exec_cmd): Constify.
4090
4091 2017-09-27  Tom Tromey  <tom@tromey.com>
4092
4093         * record-full.c (cmd_record_full_restore): Constify.
4094
4095 2017-09-27  Tom Tromey  <tom@tromey.com>
4096
4097         * memattr.c (enable_mem_command, disable_mem_command)
4098         (delete_mem_command): Constify.
4099
4100 2017-09-27  Tom Tromey  <tom@tromey.com>
4101
4102         * value.c (show_convenience): Constify.
4103
4104 2017-09-27  Tom Tromey  <tom@tromey.com>
4105
4106         * gdbcore.h (core_file_command): Update.
4107         * corefile.c (core_file_command): Constify.
4108
4109 2017-09-27  Tom Tromey  <tom@tromey.com>
4110
4111         * user-regs.c (maintenance_print_user_registers): Constify.
4112
4113 2017-09-27  Tom Tromey  <tom@tromey.com>
4114
4115         * cp-namespace.c (maintenance_cplus_namespace): Constify.
4116
4117 2017-09-27  Tom Tromey  <tom@tromey.com>
4118
4119         * cp-support.c (first_component_command): Constify.
4120
4121 2017-09-27  Tom Tromey  <tom@tromey.com>
4122
4123         * psymtab.c (maintenance_print_psymbols)
4124         (maintenance_info_psymtabs, maintenance_check_psymtabs):
4125         Constify.
4126
4127 2017-09-27  Tom Tromey  <tom@tromey.com>
4128
4129         * windows-tdep.c (display_tib): Constify.
4130
4131 2017-09-27  Tom Tromey  <tom@tromey.com>
4132
4133         * linux-fork.c (delete_checkpoint_command)
4134         (detach_checkpoint_command): Constify.
4135
4136 2017-09-27  Tom Tromey  <tom@tromey.com>
4137
4138         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4139
4140 2017-09-27  Tom Tromey  <tom@tromey.com>
4141
4142         * arc-tdep.c (dump_arc_instruction_command): Constify.
4143
4144 2017-09-27  Tom Tromey  <tom@tromey.com>
4145
4146         * valprint.c (set_radix, show_radix): Constify.
4147
4148 2017-09-27  Tom Tromey  <tom@tromey.com>
4149
4150         * dtrace-probe.c (info_probes_dtrace_command): Constify.
4151
4152 2017-09-27  Tom Tromey  <tom@tromey.com>
4153
4154         * command.h (not_just_help_class_command): Update.
4155         * cli/cli-decode.h (not_just_help_class_command): Update.
4156         * cli/cli-decode.c (not_just_help_class_command): Constify.
4157
4158 2017-09-27  Tom Tromey  <tom@tromey.com>
4159
4160         * gdb_bfd.c (maintenance_info_bfds): Constify.
4161
4162 2017-09-27  Tom Tromey  <tom@tromey.com>
4163
4164         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4165         overloads.
4166         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
4167         (do_const_cfunc): New function.
4168         (cmd_cfunc_eq): New overload.
4169         (cli_user_command_p): Check do_const_cfunc.
4170         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4171         const_cfunc.
4172         * command.h (add_cmd): Add const overload and no-function
4173         overload.
4174         (set_cmd_cfunc): Add const overload.
4175         (cmd_const_cfunc_ftype): Declare.
4176         (cmd_cfunc_eq): Add const overload.
4177         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4178         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4179         overload.
4180
4181 2017-09-27  Tom Tromey  <tom@tromey.com>
4182
4183         * macroexp.c (get_next_token_for_substitution): New function.
4184         (substitute_args): Call it.  Check for __VA_OPT__.
4185
4186 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4187             Pedro Alves <palves@redhat.com>
4188
4189         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4190         producer_is_icc_lt_14.
4191         (producer_is_icc_lt_14): New function.
4192         (check_producer): Add code for checking version of ICC.
4193         (producer_is_icc): Move to producer.c.
4194         (read_structure_type): Restrict ICC workaround to ICC<14.
4195         * producer.c: Include selftest.h.
4196         (producer_is_icc, producer_parsing_tests, _initialize_producer):
4197         New functions.
4198         * producer.h (producer_is_icc): New declaration.
4199
4200 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4201
4202         * Makefile.in (SFILES): Add producer.c.
4203         (COMMON_OBS): Add producer.o
4204         * amd64-tdep.c (producer.h): Add new include.
4205         * dwarf2read.c (producer.h): Add new include.
4206         * producer.c: New file.
4207         * producer.h: New file.
4208         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4209         producer.c.
4210         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4211         producer.h.
4212
4213 2017-09-26  Matthias Klose  <doko@ubuntu.com>
4214
4215         * configure.ac: Search ncursesw before ncurses.
4216         Check ncursesw/ncurses.h before ncurses/ncurses.h.
4217         * gdb_curses.h: Include <ncursesw/ncurses.h>
4218         * config.in, configure: Regenerate.
4219
4220 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4221
4222         PR gdb/22185
4223         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4224         obsolete.
4225         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4226         Remove i386sol2 support.
4227         * configure.nat <i386sol2>: Remove.
4228         <sol2-64>: Fold into ...
4229         <sol2>: ... this.
4230         Move common settings to default section.
4231         Add sol-thread.o.
4232         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4233         x86_64-*-solaris2.1[0-9]*>: Rename to ...
4234         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4235         <i[34567]86-*-solaris*>: Remove.
4236         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4237
4238         * configure.ac: Remove wctype in libw check.
4239         (_MSE_INT_H): Don't define on Solaris 7-9.
4240         <solaris*>: Remove libthread_db.so.1 check.
4241         * configure: Regenerate.
4242         * config.in: Regenerate.
4243
4244         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4245         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4246         (gdb_ps_size_t): Remove.
4247         Use base types in users.
4248         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4249
4250         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4251
4252 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4253
4254         PR build/22206
4255         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4256         (adi_is_addr_mapped): Likewise.
4257         (PSR_ICC): Don't redefine.
4258         (PSR_IMPL): Likewise.
4259
4260 2017-09-25  Tom Tromey  <tom@tromey.com>
4261
4262         * regcache.c (regcache::dump): Use string_printf.
4263
4264 2017-09-25  Tom Tromey  <tom@tromey.com>
4265
4266         * regcache.c (class regcache_invalidator): New.
4267         (struct register_to_invalidate): Remove.
4268         (make_cleanup_regcache_invalidate): Remove.
4269         (regcache::raw_write): Use regcache_invalidator.
4270
4271 2017-09-25  Tom Tromey  <tom@tromey.com>
4272
4273         * spu-tdep.c (spu2ppu_sniffer): Update.
4274         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4275         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4276         Remove.
4277         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4278         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4279         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4280         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4281         (frame_pop): Update.
4282
4283 2017-09-25  Tom Tromey  <tom@tromey.com>
4284
4285         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4286         * regcache.h (regcache_xfree): Don't declare.
4287         * regcache.c (regcache_xfree): Remove.
4288         (do_regcache_xfree): Use delete.
4289         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4290         * linux-fork.c (free_fork): Use delete.
4291         (fork_save_infrun_state): Likewise.
4292         * jit.c (jit_dealloc_cache): Use delete.
4293         * infrun.c (discard_infcall_suspend_state): Use delete.
4294
4295 2017-09-25  Tom Tromey  <tom@tromey.com>
4296
4297         * regcache.h (regcache_xmalloc): Don't declare.
4298         (regcache_raw_set_cached_value): Update comment.
4299         * regcache.c (regcache_xmalloc): Remove.
4300         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4301         * jit.c (jit_frame_sniffer): Use new.
4302         * frame.c (frame_save_as_regcache): Use new.
4303
4304 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4305
4306         * NEWS: Advertise support for guarded-storage registers on IBM z.
4307
4308 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4309
4310         * s390-linux-nat.c (have_regset_gs): New static variable.
4311         (s390_linux_fetch_inferior_registers): Handle guarded-storage
4312         control block and guarded-storage broadcast control regsets.
4313         (s390_read_description): Detect whether the target has
4314         guarded-storage support, return appropriate tdesc.
4315         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4316         (features/s390x-gs-linux64.c): Likewise.
4317         (struct gdbarch_tdep) <have_gs>: New field.
4318         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4319         (s390_gsbc_regset): New variables.
4320         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4321         and s390_gsbc_regset, if applicable.
4322         (s390_core_read_description): Check whether core file was from a
4323         target with guarded-storage support; include appropriate regsets.
4324         (s390_gdbarch_init): Add registers for guarded-storage support.
4325         (_initialize_s390_tdep): Initialize new target descriptions that
4326         include registers for guarded-storage support.
4327         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4328         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4329         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4330         (S390_NUM_REGS): Adjust macro definition.
4331         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4332         (tdesc_s390x_gs_linux64): New declarations.
4333
4334 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4335
4336         * features/s390-gs-linux64.xml: New file.
4337         * features/s390-gs.xml: New file.
4338         * features/s390-gsbc.xml: New file.
4339         * features/s390x-gs-linux64.xml: New file.
4340         * features/Makefile (WHICH): Add s390-gs-linux64 and
4341         s390x-gs-linux64.
4342         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4343         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4344         * features/s390-gs-linux64.c: New generated file.
4345         * features/s390x-gs-linux64.c: New file.
4346         * regformats/s390-gs-linux64.dat: New file.
4347         * regformats/s390x-gs-linux64.dat: New file.
4348
4349 2017-09-23  Tom Tromey  <tom@tromey.com>
4350
4351         * defs.h (make_cleanup_override_quit_handler): Don't declare.
4352
4353 2017-09-22  Tom Tromey  <tom@tromey.com>
4354
4355         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4356         type to scoped_restore_tmpl.
4357         <scoped_input_handler>: Initialize m_quit_handler directly.
4358
4359 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4360
4361         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4362         (cd_command): Likewise.  Free "current_directory" before
4363         assigning to it.
4364         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4365         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4366         * top.c (gdb_dirbuf): Remove global declaration.
4367         * top.h (gdb_dirbuf): Likewise.
4368
4369 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4370
4371         * gnulib/aclocal.m4: Regenerate.
4372         * gnulib/config.in: Regenerate.
4373         * gnulib/configure: Regenerate.
4374         * gnulib/import/Makefile.am: Regenerate.
4375         * gnulib/import/Makefile.in: Regenerate.
4376         * gnulib/import/assure.h: New file.
4377         * gnulib/import/at-func.c: Likewise
4378         * gnulib/import/chdir-long.c: New file.
4379         * gnulib/import/chdir-long.h: New file.
4380         * gnulib/import/cloexec.c: New file.
4381         * gnulib/import/cloexec.h: New file.
4382         * gnulib/import/close.c: New file.
4383         * gnulib/import/closedir.c: New file.
4384         * gnulib/import/dirent-private.h: New file.
4385         * gnulib/import/dup-safer.c: New file.
4386         * gnulib/import/dup.c: New file.
4387         * gnulib/import/dup2.c: New file.
4388         * gnulib/import/error.c: New file.
4389         * gnulib/import/error.h: New file.
4390         * gnulib/import/exitfail.c: New file.
4391         * gnulib/import/exitfail.h: New file.
4392         * gnulib/import/fchdir.c: New file.
4393         * gnulib/import/fcntl.c: New file.
4394         * gnulib/import/fcntl.in.h: New file.
4395         * gnulib/import/fd-hook.c: New file.
4396         * gnulib/import/fd-hook.h: New file.
4397         * gnulib/import/fd-safer.c: New file.
4398         * gnulib/import/fdopendir.c: New file.
4399         * gnulib/import/filename.h: New file.
4400         * gnulib/import/filenamecat-lgpl.c: New file.
4401         * gnulib/import/filenamecat.h: New file.
4402         * gnulib/import/fstat.c: New file.
4403         * gnulib/import/fstatat.c: New file.
4404         * gnulib/import/getcwd-lgpl.c: New file.
4405         * gnulib/import/getcwd.c: New file.
4406         * gnulib/import/getdtablesize.c: New file.
4407         * gnulib/import/getlogin_r.c: New file.
4408         * gnulib/import/getprogname.c: New file.
4409         * gnulib/import/getprogname.h: New file.
4410         * gnulib/import/gettext.h: New file.
4411         * gnulib/import/glob-libc.h: New file.
4412         * gnulib/import/glob.c: New file.
4413         * gnulib/import/glob.in.h: New file.
4414         * gnulib/import/intprops.h: New file.
4415         * gnulib/import/m4/chdir-long.m4: New file.
4416         * gnulib/import/m4/close.m4: New file.
4417         * gnulib/import/m4/closedir.m4: New file.
4418         * gnulib/import/m4/d-ino.m4: New file.
4419         * gnulib/import/m4/d-type.m4: New file.
4420         * gnulib/import/m4/dup.m4: New file.
4421         * gnulib/import/m4/dup2.m4: New file.
4422         * gnulib/import/m4/error.m4: New file.
4423         * gnulib/import/m4/fchdir.m4: New file.
4424         * gnulib/import/m4/fcntl.m4: New file.
4425         * gnulib/import/m4/fcntl_h.m4: New file.
4426         * gnulib/import/m4/fdopendir.m4: New file.
4427         * gnulib/import/m4/filenamecat.m4: New file.
4428         * gnulib/import/m4/fstat.m4: New file.
4429         * gnulib/import/m4/fstatat.m4: New file.
4430         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4431         * gnulib/import/m4/getcwd-path-max.m4: New file.
4432         * gnulib/import/m4/getcwd.m4: New file.
4433         * gnulib/import/m4/getdtablesize.m4: New file.
4434         * gnulib/import/m4/getlogin_r.m4: New file.
4435         * gnulib/import/m4/getprogname.m4: New file.
4436         * gnulib/import/m4/glob.m4: New file.
4437         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4438         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4439         * gnulib/import/m4/mempcpy.m4: New file.
4440         * gnulib/import/m4/memrchr.m4: New file.
4441         * gnulib/import/m4/mode_t.m4: New file.
4442         * gnulib/import/m4/msvc-inval.m4: New file.
4443         * gnulib/import/m4/msvc-nothrow.m4: New file.
4444         * gnulib/import/m4/open.m4: New file.
4445         * gnulib/import/m4/openat.m4: New file.
4446         * gnulib/import/m4/opendir.m4: New file.
4447         * gnulib/import/m4/readdir.m4: New file.
4448         * gnulib/import/m4/realloc.m4: New file.
4449         * gnulib/import/m4/rewinddir.m4: New file.
4450         * gnulib/import/m4/save-cwd.m4: New file.
4451         * gnulib/import/m4/strdup.m4: New file.
4452         * gnulib/import/m4/strerror.m4: New file.
4453         * gnulib/import/m4/unistd-safer.m4: New file.
4454         * gnulib/import/mempcpy.c: New file.
4455         * gnulib/import/memrchr.c: New file.
4456         * gnulib/import/msvc-inval.c: New file.
4457         * gnulib/import/msvc-inval.h: New file.
4458         * gnulib/import/msvc-nothrow.c: New file.
4459         * gnulib/import/msvc-nothrow.h: New file.
4460         * gnulib/import/open.c: New file.
4461         * gnulib/import/openat-die.c: New file.
4462         * gnulib/import/openat-priv.h: New file.
4463         * gnulib/import/openat-proc.c: New file.
4464         * gnulib/import/openat.c: New file.
4465         * gnulib/import/openat.h: New file.
4466         * gnulib/import/opendir.c: New file.
4467         * gnulib/import/pipe-safer.c: New file.
4468         * gnulib/import/readdir.c: New file.
4469         * gnulib/import/realloc.c: New file.
4470         * gnulib/import/rewinddir.c: New file.
4471         * gnulib/import/save-cwd.c: New file.
4472         * gnulib/import/save-cwd.h: New file.
4473         * gnulib/import/strdup.c: New file.
4474         * gnulib/import/strerror-override.c: New file.
4475         * gnulib/import/strerror-override.h: New file.
4476         * gnulib/import/strerror.c: New file.
4477         * gnulib/import/unistd--.h: New file.
4478         * gnulib/import/unistd-safer.h: New file.
4479         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4480         "getcwd" and "glob".
4481         * ser-tcp.c: Undefine "close" before redefining it.
4482
4483 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4484
4485         * guile/scm-value.c (gdbscm_value_address): Initialize address,
4486         get rid of res_val.
4487
4488 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4489
4490         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4491         <sol2,sparc>: Likewise.
4492         <sol2-64,i386>: Likewise.
4493
4494         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4495         -Wdeprecated-declarations on *-*-solaris*.
4496         * configure: Regenerate.
4497
4498         * procfs.c: Include "nat/inferior.h".
4499         (procfs_info_proc): Fix typo.
4500
4501 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4502
4503         * remote.c (vector): Include.
4504         (struct private_thread_info): Add field, thread_handle.
4505         (free_private_thread_info): Deallocate storage associated with
4506         thread handle.
4507         (get_private_info_thread): Initialize `thread_handle' field.
4508         (struct thread_item): Add field, thread_handle.
4509         (clear_threads_listing_context): Deallocate storage associated
4510         with thread handle.
4511         (start_thread): Add support for "handle" attribute.
4512         (thread_attributes): Add "handle".
4513         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4514         field.
4515         (remote_update_thread_list): Update thread_handle.
4516         (remote_thread_handle_to_thread_info): New function.
4517         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4518
4519 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4520
4521         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4522         function.
4523         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4524         * python/python-internal.h (thread_object_type): Declare.
4525
4526 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4527
4528         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4529         (target_thread_handle_to_thread_info): Declare.
4530         * target.c (target_thread_handle_to_thread_info): New function.
4531         * target-delegates.c: Regenerate.
4532         * gdbthread.h (find_thread_by_handle): Declare.
4533         * thread.c (find_thread_by_handle): New function.
4534         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4535         function.
4536         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4537
4538 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4539
4540         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4541
4542 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4543
4544         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4545
4546 2017-09-21  Yao Qi  <yao.qi@linaro.org>
4547
4548         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4549         to gdb_target_obs.
4550
4551 2017-09-20  Tom Tromey  <tom@tromey.com>
4552
4553         * breakpoint.c (struct counted_command_line): Remove.
4554         (breakpoint_commands): Update.
4555         (alloc_counted_command_line, incref_counted_command_line)
4556         (decref_counted_command_line, do_cleanup_counted_command_line)
4557         (make_cleanup_decref_counted_command_line): Remove.
4558         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4559         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4560         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4561         (save_breakpoints): Update.
4562         * breakpoint.h (counted_command_line): Now a typedef to
4563         shared_ptr.
4564         (struct breakpoint) <commands>: Now a counted_command_line.
4565         (struct bpstats) <command>: Likewise.
4566
4567 2017-09-20  Tom Tromey  <tom@tromey.com>
4568
4569         * breakpoint.c (struct commands_info, do_map_commands_command):
4570         Remove.
4571         (commands_command_1): Update.
4572         (iterate_over_related_breakpoints): Take a function_view.
4573         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4574         (delete_command): Update.
4575         (map_breakpoint_numbers): Take a function_view.
4576         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4577         (disable_command): Update.
4578         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4579         (enable_command): Update.
4580         (struct disp_data, do_enable_breakpoint_disp)
4581         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4582         (do_map_enable_delete_breakpoint): Remove.
4583         (enable_once_command, enable_count_command, enable_delete_command)
4584         (delete_trace_variable_command): Update.
4585
4586 2017-09-20  Tom Tromey  <tom@tromey.com>
4587
4588         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
4589         (bpstat_clear): Use delete.
4590         (bpstats): New constructors.
4591         (bpstat_copy, bpstat_stop_status): Use new.
4592         (dprintf_after_condition_true): Update.
4593         * breakpoint.h (bpstats::bpstats): Add constructors.
4594         (bpstats::~bpstats): Add destructor.
4595
4596 2017-09-20  Pedro Alves  <palves@redhat.com>
4597
4598         * eval.c (make_params): Delete, refactored as ...
4599         (class fake_method): ... this new type's ctor.
4600         (fake_method::~fake_method): New.
4601         (evaluate_subexp_standard): Use 'fake_method'.
4602
4603 2017-09-20  Tom Tromey  <tom@tromey.com>
4604
4605         * windows-nat.c (get_windows_debug_event, windows_wait)
4606         (do_initial_windows_stuff, windows_attach): Update.
4607         * utils.c (vwarning, internal_vproblem): Update.
4608         (ui_unregister_input_event_handler_cleanup)
4609         (prepare_to_handle_input): Remove.
4610         (class scoped_input_handler): New.
4611         (defaulted_query, prompt_for_continue): Update.
4612         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4613         Update.
4614         * top.c (undo_terminal_modifications_before_exit): Update.
4615         * target/target.h (target_terminal_init, target_terminal_inferior)
4616         (target_terminal_ours): Don't declare.
4617         (class target_terminal): New.
4618         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4619         (target_terminal_ours_for_output)
4620         (make_cleanup_restore_target_terminal): Don't declare.
4621         (target_terminal_info): Remove.
4622         * target.c (enum terminal_state, terminal_state): Remove.
4623         (target_terminal::terminal_state): Define.
4624         (target_terminal::init): Rename from target_terminal_init.
4625         (target_terminal::inferior): Rename from
4626         target_terminal_inferior.
4627         (target_terminal::ours): Rename from target_terminal_ours.
4628         (target_terminal::ours_for_output): Rename from
4629         target_terminal_ours_for_output.
4630         (target_terminal::info): New method.
4631         (cleanup_restore_target_terminal)
4632         (make_cleanup_restore_target_terminal): Remove.
4633         * solib.c (handle_solib_event): Update.
4634         * remote.c (remote_serial_quit_handler): Update.
4635         (remote_terminal_inferior, remote_wait_as): Update.
4636         * record-full.c (record_full_wait_1): Update.
4637         * nto-procfs.c (procfs_create_inferior): Update.
4638         * nat/fork-inferior.c (startup_inferior): Update.
4639         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4640         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4641         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4642         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4643         (mi_breakpoint_created, mi_breakpoint_deleted)
4644         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4645         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4646         (mi_user_selected_context_changed, report_initial_inferior):
4647         Update.
4648         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4649         (linux_nat_terminal_inferior): Update.
4650         * infrun.c (follow_fork_inferior)
4651         (handle_vfork_child_exec_or_exit, do_target_resume)
4652         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4653         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4654         Update.
4655         * inflow.c (child_terminal_init, info_terminal_command): Update.
4656         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4657         (attach_command): Update.
4658         * infcall.c (call_thread_fsm_should_stop): Update.
4659         * gnu-nat.c (gnu_attach): Update.
4660         * extension.c (struct active_ext_lang_state)
4661         (restore_active_ext_lang): Update.
4662         * exceptions.c (print_flush): Update.
4663         * event-top.c (async_enable_stdin, default_quit_handler): Update.
4664         (struct quit_handler_cleanup_data, restore_quit_handler)
4665         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4666         Remove.
4667         * cp-support.c (gdb_demangle): Update.
4668         * breakpoint.c (update_inserted_breakpoint_locations)
4669         (insert_breakpoint_locations, handle_jit_event)
4670         (disable_breakpoints_in_unloaded_shlib): Update.
4671         * annotate.c (annotate_breakpoints_invalid)
4672         (annotate_frames_invalid): Update.
4673
4674 2017-09-20  Tom Tromey  <tom@tromey.com>
4675
4676         * main.c (catch_command_errors): Rename from
4677         catch_command_errors_const.
4678         (captured_main_1): Update.
4679
4680 2017-09-20  Pedro Alves  <palves@redhat.com>
4681
4682         * cli/cli-cmds.c (list_command): Use print_sal_location.
4683         (print_sal_location): New function.
4684         (ambiguous_line_spec): Use print_sal_location.
4685         * linespec.c (symbol_to_sal): Record the symbol in the sal.
4686         * symtab.c (find_function_start_sal): Likewise.
4687         * symtab.h (symtab_and_line::symbol): New field.
4688
4689 2017-09-20  Pedro Alves  <palves@redhat.com>
4690
4691         * linespec.c (minsym_found): Handle non-text minsyms.
4692         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
4693
4694 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4695
4696         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
4697         backslash.
4698
4699 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4700
4701         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
4702         vmovups instead vmovaps.
4703         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
4704
4705 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
4706
4707         * NEWS (Changes since GDB 8.0): Add starti.
4708         * infcmd.c (enum run_break): New.
4709         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
4710         case.
4711         (run_command): Use enum run_how.
4712         (start_command): Likewise.
4713         (starti_command): New function.
4714         (RUN_ARGS_HELP): New macro.
4715         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
4716         commands.  Add starti command.
4717
4718 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4719
4720         * Makefile.in (monitor.o): Remove the rule.
4721
4722 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4723
4724         * annotate.h (struct annotate_arg_emitter): Use
4725         DISABLE_COPY_AND_ASSIGN.
4726         * common/refcounted-object.h (refcounted_object): Likewise.
4727         * completer.h (struct completion_result): Likewise.
4728         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
4729         * filename-seen-cache.h (filename_seen_cache): Likewise.
4730         * gdbcore.h (thread_section_name): Likewise.
4731         * gdb_regex.h (compiled_regex): Likewise.
4732         * gdbthread.h (scoped_restore_current_thread): Likewise.
4733         * inferior.h (scoped_restore_current_inferior): Likewise.
4734         * jit.c (jit_reader): Likewise.
4735         * linespec.h (struct linespec_result): Likewise.
4736         * mi/mi-parse.h (struct mi_parse): Likewise.
4737         * nat/fork-inferior.c (execv_argv): Likewise.
4738         * progspace.h (scoped_restore_current_program_space): Likewise.
4739         * python/python-internal.h (class gdbpy_enter): Likewise.
4740         * regcache.h (regcache): Likewise.
4741         * target-descriptions.c (struct tdesc_reg): Likewise.
4742         (struct tdesc_type): Likewise.
4743         (struct tdesc_feature): Likewise.
4744         * ui-out.h (ui_out_emit_type): Likewise.
4745
4746 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
4747
4748         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
4749         label abort_expression.
4750
4751 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4752
4753         * common/buffer.c (buffer_xml_printf): Adjust.
4754         * common/xml-utils.c (xml_escape_text): Change return type to
4755         std::string, update code accordingly.
4756         * common/xml-utils.h (xml_escape_text): Change return type to
4757         std::string.
4758         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
4759         * windows-tdep.c (windows_xfer_shared_library): Adjust.
4760         * unittests/xml-utils-selftests.c (test_xml_escape_text):
4761         Adjust.
4762
4763 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4764
4765         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
4766         (SUBDIR_UNITTESTS_OBS): Add new object file.
4767         * unittests/xml-utils-selftests.c: New file.
4768
4769 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4770
4771         * common/selftest.h (selftest): New struct/interface.
4772         (register_test): Add name parameter, add new overload.
4773         (run_tests): Add filter parameter.
4774         (for_each_selftest_ftype): New typedef.
4775         (for_each_selftest): New declaration.
4776         * common/selftest.c (tests): Change type to
4777         map<string, unique_ptr<selftest>>.
4778         (simple_selftest): New struct.
4779         (register_test): New function.
4780         (register_test): Add name parameter and use it.
4781         (run_tests): Add filter parameter and use it.  Add prints.
4782         Adjust to vector -> map change.
4783         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
4784         registering selftests.
4785         * arm-tdep.c (_initialize_arm_tdep): Likewise.
4786         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
4787         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
4788         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
4789         * findvar.c (_initialize_findvar): Likewise.
4790         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
4791         * maint.c (maintenance_selftest): Update call to run_tests.
4792         (maintenance_info_selftests): New function.
4793         (_initialize_maint_cmds): Register "maintenance info selftests"
4794         command.  Update "maintenance selftest" doc.
4795         * regcache.c (_initialize_regcache): Add names when registering
4796         selftests.
4797         * rust-exp.y (_initialize_rust_exp): Likewise.
4798         * selftest-arch.c (gdbarch_selftest): New struct.
4799         (gdbarch_tests): Remove.
4800         (register_test_foreach_arch): Add name parameter.  Call
4801         register_test.
4802         (tests_with_arch): Remove, move most content to
4803         gdbarch_selftest::operator().
4804         (_initialize_selftests_foreach_arch): Remove.
4805         * selftest-arch.h (register_test_foreach_arch): Add name
4806         parameter.
4807         (run_tests_with_arch): New declaration.
4808         * utils-selftests.c (_initialize_utils_selftests): Add names
4809         when registering selftests.
4810         * utils.c (_initialize_utils): Likewise.
4811         * unittests/array-view-selftests.c
4812         (_initialize_array_view_selftests): Likewise.
4813         * unittests/environ-selftests.c (_initialize_environ_selftests):
4814         Likewise.
4815         * unittests/function-view-selftests.c
4816         (_initialize_function_view_selftests): Likewise.
4817         * unittests/offset-type-selftests.c
4818         (_initialize_offset_type_selftests): Likewise.
4819         * unittests/optional-selftests.c
4820         (_initialize_optional_selftests): Likewise.
4821         * unittests/scoped_restore-selftests.c
4822         (_initialize_scoped_restore_selftests): Likewise.
4823         * NEWS: Document "maintenance selftest" and "maint info
4824         selftests".
4825
4826 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4827
4828         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
4829         scoped_restore.
4830
4831 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4832
4833         * mi/mi-main.c (mi_load_progress): Make uiout variable
4834         a unique_ptr.
4835
4836 2017-09-15  Pedro Alves  <palves@redhat.com>
4837
4838         * compile/compile-c-types.c (convert_enum, convert_int)
4839         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
4840
4841 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
4842
4843         * dwarf2read.c (copy_string): Remove.
4844         (parse_macro_definition): Replace copy_string with savestring.
4845
4846 2017-09-15  Yao Qi  <yao.qi@linaro.org>
4847
4848         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
4849         gdb_target_obs.
4850         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
4851         Likewise.
4852         (i[34567]86-*-linux*): Likewise.
4853
4854 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4855
4856         * dwarf2expr.h (dwarf_stack_value): Add constructor.
4857         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
4858         <stack>: Change type to std::vector.
4859         <stack_len, stack_allocated>: Remove.
4860         <grow_stack>: Remove.
4861         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4862         (dwarf_expr_context::~dwarf_expr_context): Remove.
4863         (dwarf_expr_context::grow_stack): Remove.
4864         (dwarf_expr_context::push): Adjust.
4865         (dwarf_expr_context::pop): Adjust.
4866         (dwarf_expr_context::fetch): Adjust.
4867         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
4868         (dwarf_expr_context::stack_empty_p): Adjust.
4869         (dwarf_expr_context::execute_stack_op): Adjust.
4870
4871 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4872
4873         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
4874         return type to bool.
4875         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
4876
4877 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4878
4879         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
4880         Change type to bool.
4881         (dwarf_stack_value) <in_stack_memory>: Likewise.
4882         (dwarf_expr_context) <push_address>: Change parameter type to
4883         bool.
4884         <fetch_in_stack_memory>: Change return type to bool.
4885         <push>: Change parameter type to bool.
4886         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
4887         to bool.
4888         (dwarf_expr_context::push_address): Likewise.
4889         (dwarf_expr_context::fetch_in_stack_memory): Change return type
4890         to bool.
4891         (dwarf_expr_context::execute_stack_op): Adjust.
4892         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
4893
4894 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4895
4896         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
4897         (struct dwarf_expr_context) <n_pieces>: Remove.
4898         <pieces>: Change type to std::vector.
4899         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4900         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
4901         pieces.
4902         (dwarf_expr_context::add_piece): Adjust.
4903         * dwarf2loc.c (struct piece_closure): Initialize fields.
4904         <n_pieces>: Remove.
4905         <pieces>: Change type to std::vector.
4906         (allocate_piece_closure): Adjust, change parameter to
4907         std::vector rvalue and std::move it to piece_closure.
4908         (rw_pieced_value): Adjust.
4909         (check_pieced_synthetic_pointer): Adjust.
4910         (indirect_synthetic_pointer): Adjust.
4911         (coerce_pieced_ref): Adjust.
4912         (free_pieced_value_closure):  Adjust.  Use delete to free
4913         piece_closure.
4914         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
4915         to allocate_piece_closure.
4916         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
4917
4918 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4919
4920         * probe.h (probe_ops_cp): Remove typedef.
4921         (DEF_VEC_P (probe_ops_cp)): Remove.
4922         (all_probe_ops): Change type to std::vector.
4923         * probe.c (info_probes_for_ops): Adjust to vector change.
4924         (probe_linespec_to_ops): Likewise.
4925         (all_probe_ops): Change type to std::vector.
4926         (_initialize_probe): Adjust to vector change.
4927         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
4928         * elfread.c (elf_get_probes): Likewise.
4929         * stap-probe.c (_initialize_stap_probe): Likewise.
4930
4931 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4932
4933         * probe.h (struct bound_probe): Define constructors.
4934         * probe.c (bound_probe_s): Remove typedef.
4935         (DEF_VEC_O (bound_probe_s)): Remove VEC.
4936         (collect_probes): Change return type to std::vector, remove
4937         cleanup.
4938         (compare_probes): Return bool, change parameter type.  Change
4939         semantic to "less than".
4940         (gen_ui_out_table_header_info): Change parameter to std::vector
4941         and update.
4942         (exists_probe_with_pops): Likewise.
4943         (info_probes_for_ops): Update to std::vector change.
4944         (enable_probes_command): Likewise.
4945         (disable_probes_command): Likewise.
4946
4947 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4948
4949         * probe.h (struct probe_ops) <get_probes>: Change parameter from
4950         vec to std::vector.
4951         * probe.c (parse_probes_in_pspace): Update.
4952         (find_probes_in_objfile): Update.
4953         (find_probe_by_pc): Update.
4954         (collect_probes): Update.
4955         (probe_any_get_probes): Update.
4956         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
4957         return type to reference to std::vector.
4958         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
4959         std::vector and update.
4960         (dtrace_process_dof): Likewise.
4961         (dtrace_get_probes): Likewise.
4962         * elfread.c (elf_get_probes): Change return type to std::vector,
4963         store an std::vector in bfd_data.
4964         (probe_key_free): Update to std::vector.
4965         * stap-probe.c (handle_stap_probe): Change parameter to
4966         std::vector and update.
4967         (stap_get_probes): Likewise.
4968         * symfile-debug.c (debug_sym_get_probes): Change return type to
4969         std::vector and update.
4970
4971 2017-09-11  Tom Tromey  <tom@tromey.com>
4972
4973         * breakpoint.c (program_breakpoint_here_p): Update.
4974         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
4975         from make_show_memory_breakpoints_cleanup.  Return a
4976         scoped_restore_tmpl<int>.
4977         (restore_show_memory_breakpoints): Remove.
4978         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
4979         * mem-break.c (memory_validate_breakpoint): Update.
4980         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
4981         (ia64_memory_remove_breakpoint): Update.
4982         (ia64_breakpoint_from_pc): Update.
4983         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
4984         from make_show_memory_breakpoints_cleanup.
4985
4986 2017-09-11  Tom Tromey  <tom@tromey.com>
4987
4988         * d-namespace.c (d_lookup_symbol): Use std::string.
4989         (find_symbol_in_baseclass): Likewise.
4990
4991 2017-09-11  Tom Tromey  <tom@tromey.com>
4992
4993         * ctf.c (ctf_start): Use std::string.
4994
4995 2017-09-11  Tom Tromey  <tom@tromey.com>
4996
4997         * ada-lang.c (is_known_support_routine): Update.
4998         (ada_unhandled_exception_name_addr_from_raise): Update.
4999         * guile/scm-frame.c (gdbscm_frame_name): Update.
5000         * python/py-frame.c (frapy_name): Update.
5001         (frapy_function): Update.
5002         * stack.h (find_frame_funname): Update.
5003         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5004         (print_frame): Update.
5005
5006 2017-09-11  Tom Tromey  <tom@tromey.com>
5007
5008         * findcmd.c (put_bits): Take a gdb::byte_vector.
5009         (parse_find_args): Return gdb::byte_vector.  "args" now const.
5010         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
5011         cleanups.
5012         (find_command): Update.
5013
5014 2017-09-11  Tom Tromey  <tom@tromey.com>
5015
5016         * cli/cli-script.c (class scoped_restore_hook_in): New.
5017         (clear_hook_in_cleanup): Remove.
5018         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5019         scoped_restore_hook_in.
5020
5021 2017-09-11  Tom Tromey  <tom@tromey.com>
5022
5023         * cli/cli-script.c (restore_interp): Remove.
5024         (read_command_lines): Use scoped_restore_interp.
5025         * interps.c (scoped_restore_interp::set_temp): Rename from
5026         interp_set_temp.
5027         * interps.h (class scoped_restore_interp): New.
5028         (interp_set_temp): Remove.
5029
5030 2017-09-11  Tom Tromey  <tom@tromey.com>
5031
5032         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5033         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5034         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5035         scoped_restore.
5036         (mi_cmd_break_insert_1): Update.
5037         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5038         scoped_restore.
5039
5040 2017-09-11  Tom Tromey  <tom@tromey.com>
5041
5042         * demangle.c (demangle_command): Update.
5043         * breakpoint.c (disable_command): Update.
5044         (enable_command): Update.
5045         (find_location_by_number): Make "number" const.  Use
5046         get_number_trailer.
5047         * cli/cli-utils.c (extract_arg): Return std::string.
5048         * probe.c (parse_probe_linespec): Update.  Change types.
5049         (collect_probes): Take string arguments.
5050         (parse_probe_linespec): Likewise.
5051         (info_probes_for_ops): Update.
5052         (enable_probes_command): Update.
5053         (disable_probes_command): Update.
5054         * break-catch-sig.c (catch_signal_split_args): Update.
5055         * mi/mi-parse.c (mi_parse): Update.
5056
5057 2017-09-11  Tom Tromey  <tom@tromey.com>
5058
5059         * language.h (language_enum): Make argument const.
5060         * language.c (language_enum): Make argument const.
5061
5062 2017-09-11  Tom Tromey  <tom@tromey.com>
5063
5064         * common/common-utils.h (skip_to_space): Remove macro, redeclare
5065         as function.
5066         (skip_to_space): Rename from skip_to_space_const.
5067         * common/common-utils.c (skip_to_space): New function.
5068         (skip_to_space): Rename from skip_to_space_const.
5069         * cli/cli-utils.h (get_number): Rename from get_number_const.
5070         (extract_arg): Rename from extract_arg_const.
5071         * cli/cli-utils.c (get_number): Rename from get_number_const.
5072         (extract_arg): Rename from extract_arg_const.
5073         (number_or_range_parser::get_number): Use ::get_number.
5074         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5075         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5076         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5077         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5078         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5079         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5080         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5081         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5082
5083 2017-09-11  Tom Tromey  <tom@tromey.com>
5084
5085         * python/python.c (do_start_initialization): Use
5086         py-event-types.def to initialize types.
5087         Define all object type structures.
5088         * python/python-internal.h: Don't declare event initialization
5089         functions.
5090         * python/py-threadevent.c (thread_event_object_type): Don't
5091         define.
5092         * python/py-stopevent.c (stop_event_object_type): Don't define.
5093         * python/py-signalevent.c (signal_event_object_type): Don't
5094         declare or define.
5095         * python/py-newobjfileevent.c (new_objfile_event_object_type)
5096         (clear_objfiles_event_object_type): Don't declare or define.
5097         * python/py-infevents.c (inferior_call_pre_event_object_type)
5098         (inferior_call_post_event_object_type)
5099         (register_changed_event_object_type)
5100         (memory_changed_event_object_type): Don't declare or define.
5101         * python/py-inferior.c (new_thread_event_object_type)
5102         (new_inferior_event_object_type)
5103         (inferior_deleted_event_object_type): Don't declare or define.
5104         * python/py-exitedevent.c (exited_event_object_type): Don't
5105         declare or define.
5106         * python/py-evts.c (gdbpy_initialize_py_events): Use
5107         py-all-events.def.
5108         * python/py-events.h (thread_event_object_type): Don't declare.
5109         (events_object): Use py-all-events.def.
5110         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
5111         py-event-types.def.
5112         * python/py-event-types.def: New file.
5113         * python/py-continueevent.c (create_continue_event_object): Don't
5114         declare or define.
5115         * python/py-bpevent.c (breakpoint_event_object_type): Don't
5116         declare or define.
5117         * python/py-all-events.def: New file.
5118
5119 2017-09-11  Tom Tromey  <tom@tromey.com>
5120
5121         * python/py-threadevent.c (create_thread_event_object): Return
5122         gdbpy_ref.
5123         * python/py-stopevent.h (create_stop_event_object)
5124         (create_breakpoint_event_object, create_signal_event_object):
5125         Update.
5126         * python/py-stopevent.c (create_stop_event_object): Return
5127         gdbpy_ref.
5128         (emit_stop_event): Update.
5129         * python/py-signalevent.c (create_signal_event_object): Return
5130         gdbpy_ref.
5131         * python/py-infevents.c (create_inferior_call_event_object):
5132         Update.
5133         * python/py-event.h (create_event_object)
5134         (create_thread_event_object): Update.
5135         * python/py-event.c (create_event_object): Return gdbpy_ref.
5136         * python/py-continueevent.c: Return gdbpy_ref.
5137         * python/py-bpevent.c (create_breakpoint_event_object): Return
5138         gdbpy_ref.
5139
5140 2017-09-11  Tom Tromey  <tom@tromey.com>
5141
5142         PR python/15622:
5143         * NEWS: Add entry.
5144         * python/python.c (do_start_initialization): Initialize new event
5145         types.
5146         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5147         (gdbpy_initialize_inferior_deleted_event)
5148         (gdbpy_initialize_new_thread_event): Declare.
5149         * python/py-threadevent.c (create_thread_event_object): Add option
5150         "thread" parameter.
5151         * python/py-inferior.c (new_thread_event_object_type)
5152         (new_inferior_event_object_type)
5153         (inferior_deleted_event_object_type): Declare.
5154         (python_new_inferior, python_inferior_deleted): New functions.
5155         (add_thread_object): Emit new_thread event.
5156         (gdbpy_initialize_inferior): Attach new functions to corresponding
5157         observers.
5158         (new_thread, new_inferior, inferior_deleted): Define new event
5159         types.
5160         * python/py-evts.c (gdbpy_initialize_py_events): Add new
5161         registries.
5162         * python/py-events.h (events_object) <new_inferior,
5163         inferior_deleted, new_thread>: New fields.
5164         * python/py-event.h (create_thread_event_breakpoint): Add optional
5165         "thread" parameter.
5166
5167 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5168
5169         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5170         check current_ui instead.
5171         (internal_vproblem): Likewise.
5172
5173 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
5174
5175         * thread.c (print_thread_info_1): Remove unnecessary calls to
5176         uiout->is_mi_like_p.
5177
5178 2017-09-09  Tom Tromey  <tom@tromey.com>
5179
5180         * namespace.h (add_using_directive): Update.
5181         * namespace.c (add_using_directive): Change type of excludes to
5182         std::vector.
5183         * dwarf2read.c (read_import_statement): Use std::vector.
5184         (read_namespace): Update.
5185         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5186
5187 2017-09-09  Tom Tromey  <tom@tromey.com>
5188
5189         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5190
5191 2017-09-09  Tom Tromey  <tom@tromey.com>
5192
5193         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5194
5195 2017-09-09  Tom Tromey  <tom@tromey.com>
5196
5197         * stack.c (func_command): Use gdb::def_vector.
5198
5199 2017-09-09  Tom Tromey  <tom@tromey.com>
5200
5201         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5202         ui_out_emit_list, ui_out_emit_tuple.
5203         (mi_cmd_var_update): Likewise.
5204
5205 2017-09-09  Tom Tromey  <tom@tromey.com>
5206
5207         * mi/mi-interp.c (mi_user_selected_context_changed): Use
5208         ui_out_redirect_pop.
5209         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5210         ui_out_redirect_pop.
5211         * utils.c (do_ui_out_redirect_pop)
5212         (make_cleanup_ui_out_redirect_pop): Remove.
5213         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5214         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5215         * ui-out.h (ui_out_redirect_pop): New class.
5216
5217 2017-09-09  Tom Tromey  <tom@tromey.com>
5218
5219         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5220         (list_available_thread_groups, mi_cmd_list_thread_groups)
5221         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5222         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5223         Likewise.
5224
5225 2017-09-09  Tom Tromey  <tom@tromey.com>
5226
5227         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5228         ui_out_emit_tuple.
5229
5230 2017-09-09  Tom Tromey  <tom@tromey.com>
5231
5232         * target.c (flash_erase_command): Use ui_out_emit_tuple.
5233         * stack.c (print_frame): Use ui_out_emit_tuple.
5234         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5235         (info_spu_mailbox_command, info_spu_dma_command)
5236         (info_spu_proxydma_command): Likewise.
5237         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5238         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5239         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5240         ui_out_emit_tuple.
5241         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5242
5243 2017-09-09  Tom Tromey  <tom@tromey.com>
5244
5245         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5246         (class ui_out_emit_table): Update comment.
5247         * ui-out.c (do_cleanup_table_end)
5248         (make_cleanup_ui_out_table_begin_end): Remove.
5249         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5250         (info_spu_dma_cmdlist): Likewise.
5251         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5252         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5253         ui_out_emit_table.
5254
5255 2017-09-09  Tom Tromey  <tom@tromey.com>
5256
5257         * thread.c (print_thread_info_1): Use ui_out_emit_table,
5258         ui_out_emit_list, gdb::optional.
5259
5260 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
5261
5262         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5263         prototype.
5264         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5265         prototype.
5266         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5267         prototype.
5268         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5269         * ada-exp.y: Remove _initialize_ada_exp prototype.
5270         * ada-lang.c: Remove _initialize_ada_language prototype.
5271         * ada-tasks.c: Remove _initialize_tasks prototype.
5272         * addrmap.c: Remove _initialize_addrmap prototype.
5273         * agent.c: Remove _initialize_agent prototype.
5274         * aix-thread.c: Remove _initialize_aix_thread prototype.
5275         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5276         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5277         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5278         prototype.
5279         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5280         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5281         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5282         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5283         prototype.
5284         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5285         prototype.
5286         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5287         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5288         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5289         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5290         prototype.
5291         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5292         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5293         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5294         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5295         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5296         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5297         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5298         prototype.
5299         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5300         prototype.
5301         * annotate.c: Remove _initialize_annotate prototype.
5302         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5303         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5304         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5305         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5306         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5307         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5308         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5309         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5310         prototype.
5311         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5312         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5313         * auto-load.c: Remove _initialize_auto_load prototype.
5314         * auxv.c: Remove _initialize_auxv prototype.
5315         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5316         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5317         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5318         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5319         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5320         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5321         prototype.
5322         * break-catch-throw.c: Remove _initialize_break_catch_throw
5323         prototype.
5324         * breakpoint.c: Remove _initialize_breakpoint prototype.
5325         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5326         * btrace.c: Remove _initialize_btrace prototype.
5327         * charset.c: Remove _initialize_charset prototype.
5328         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5329         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5330         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5331         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5332         * cli/cli-script.c: Remove _initialize_cli_script prototype.
5333         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5334         * coffread.c: Remove _initialize_coffread prototype.
5335         * compile/compile.c: Remove _initialize_compile prototype.
5336         * complaints.c: Remove _initialize_complaints prototype.
5337         * completer.c: Remove _initialize_completer prototype.
5338         * copying.awk: Remove _initialize_copying prototype.
5339         * copying.c: Regenerate.
5340         * core-regset.c: Remove _initialize_core_regset prototype.
5341         * corefile.c: Remove _initialize_core prototype.
5342         * corelow.c: Remove _initialize_corelow prototype.
5343         * cp-abi.c: Remove _initialize_cp_abi prototype.
5344         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5345         * cp-support.c: Remove _initialize_cp_support prototype.
5346         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5347         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5348         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5349         * ctf.c: Remove _initialize_ctf prototype.
5350         * d-lang.c: Remove _initialize_d_language prototype.
5351         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5352         prototype.
5353         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5354         * dbxread.c: Remove _initialize_dbxread prototype.
5355         * dcache.c: Remove _initialize_dcache prototype.
5356         * demangle.c: Remove _initialize_demangler prototype.
5357         * disasm-selftests.c: Remove _initialize_disasm_selftests
5358         prototype.
5359         * disasm.c: Remove _initialize_disasm prototype.
5360         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5361         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5362         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5363         prototype.
5364         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5365         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5366         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5367         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5368         * elfread.c: Remove _initialize_elfread prototype.
5369         * exec.c: Remove _initialize_exec prototype.
5370         * extension.c: Remove _initialize_extension prototype.
5371         * f-lang.c: Remove _initialize_f_language prototype.
5372         * f-valprint.c: Remove _initialize_f_valprint prototype.
5373         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5374         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5375         * filesystem.c: Remove _initialize_filesystem prototype.
5376         * findcmd.c: Remove _initialize_mem_search prototype.
5377         * fork-child.c: Remove _initialize_fork_child prototype.
5378         * frame-base.c: Remove _initialize_frame_base prototype.
5379         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5380         * frame.c: Remove _initialize_frame prototype.
5381         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5382         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5383         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5384         * gcore.c: Remove _initialize_gcore prototype.
5385         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5386         * gdbarch.c: Regenerate.
5387         * gdbarch.sh: Remove _initialize_gdbarch prototype.
5388         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5389         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5390         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5391         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5392         * go-lang.c: Remove _initialize_go_language prototype.
5393         * go32-nat.c: Remove _initialize_go32_nat prototype.
5394         * guile/guile.c: Remove _initialize_guile prototype.
5395         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5396         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5397         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5398         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5399         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5400         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5401         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5402         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5403         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5404         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5405         prototype.
5406         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5407         prototype.
5408         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5409         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5410         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5411         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5412         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5413         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5414         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5415         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5416         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5417         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5418         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5419         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5420         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5421         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5422         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5423         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5424         prototype.
5425         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5426         prototype.
5427         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5428         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5429         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5430         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5431         * infcall.c: Remove _initialize_infcall prototype.
5432         * infcmd.c: Remove _initialize_infcmd prototype.
5433         * inferior.c: Remove _initialize_inferiors prototype.
5434         * inflow.c: Remove _initialize_inflow prototype.
5435         * infrun.c: Remove _initialize_infrun prototype.
5436         * interps.c: Remove _initialize_interpreter prototype.
5437         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5438         * jit.c: Remove _initialize_jit prototype.
5439         * language.c: Remove _initialize_language prototype.
5440         * linux-fork.c: Remove _initialize_linux_fork prototype.
5441         * linux-nat.c: Remove _initialize_linux_nat prototype.
5442         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5443         * linux-thread-db.c: Remove _initialize_thread_db prototype.
5444         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5445         * m2-lang.c: Remove _initialize_m2_language prototype.
5446         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5447         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5448         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5449         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5450         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5451         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5452         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5453         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5454         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5455         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5456         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5457         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5458         * machoread.c: Remove _initialize_machoread prototype.
5459         * macrocmd.c: Remove _initialize_macrocmd prototype.
5460         * macroscope.c: Remove _initialize_macroscope prototype.
5461         * maint.c: Remove _initialize_maint_cmds prototype.
5462         * mdebugread.c: Remove _initialize_mdebugread prototype.
5463         * memattr.c: Remove _initialize_mem prototype.
5464         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5465         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5466         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5467         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5468         * mi/mi-main.c: Remove _initialize_mi_main prototype.
5469         * microblaze-linux-tdep.c: Remove
5470         _initialize_microblaze_linux_tdep prototype.
5471         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5472         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5473         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5474         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5475         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5476         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5477         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5478         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5479         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5480         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5481         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5482         prototype.
5483         * mipsread.c: Remove _initialize_mipsread prototype.
5484         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5485         prototype.
5486         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5487         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5488         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5489         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5490         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5491         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5492         prototype.
5493         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5494         * nto-procfs.c: Remove _initialize_procfs prototype.
5495         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5496         * objc-lang.c: Remove _initialize_objc_language prototype.
5497         * objfiles.c: Remove _initialize_objfiles prototype.
5498         * observer.c: Remove observer_test_first_notification_function,
5499         observer_test_second_notification_function,
5500         observer_test_third_notification_function, and
5501         _initialize_observer prototypes.
5502         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5503         * osabi.c: Remove _initialize_gdb_osabi prototype.
5504         * osdata.c: Remove _initialize_osdata prototype.
5505         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5506         * parse.c: Remove _initialize_parse prototype.
5507         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5508         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5509         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5510         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5511         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5512         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5513         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5514         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5515         * printcmd.c: Remove _initialize_printcmd prototype.
5516         * probe.c: Remove _initialize_probe prototype.
5517         * proc-api.c: Remove _initialize_proc_api prototype.
5518         * proc-events.c: Remove _initialize_proc_events prototype.
5519         * proc-service.c: Remove _initialize_proc_service prototype.
5520         * procfs.c: Remove _initialize_procfs prototype.
5521         * psymtab.c: Remove _initialize_psymtab prototype.
5522         * python/python.c: Remove _initialize_python prototype.
5523         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5524         * record-btrace.c: Remove _initialize_record_btrace prototype.
5525         * record-full.c: Remove _initialize_record_full prototype.
5526         * record.c: Remove _initialize_record prototype.
5527         * regcache.c: Remove _initialize_regcache prototype.
5528         * reggroups.c: Remove _initialize_reggroup prototype.
5529         * remote-notif.c: Remove _initialize_notif prototype.
5530         * remote-sim.c: Remove _initialize_remote_sim prototype.
5531         * remote.c: Remove _initialize_remote prototype.
5532         * reverse.c: Remove _initialize_reverse prototype.
5533         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5534         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5535         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5536         prototype.
5537         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5538         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5539         * rust-exp.y: Remove _initialize_rust_exp prototype.
5540         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5541         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5542         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5543         * score-tdep.c: Remove _initialize_score_tdep prototype.
5544         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5545         prototype.
5546         * ser-go32.c: Remove _initialize_ser_dos prototype.
5547         * ser-mingw.c: Remove _initialize_ser_windows prototype.
5548         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5549         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5550         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5551         * serial.c: Remove _initialize_serial prototype.
5552         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5553         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5554         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5555         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5556         * skip.c: Remove _initialize_step_skip prototype.
5557         * sol-thread.c: Remove _initialize_sol_thread prototype.
5558         * solib-aix.c: Remove _initialize_solib_aix prototype.
5559         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5560         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5561         * solib-frv.c: Remove _initialize_frv_solib prototype.
5562         * solib-spu.c: Remove _initialize_spu_solib prototype.
5563         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5564         * solib-target.c: Remove _initialize_solib_target prototype.
5565         * solib.c: Remove _initialize_solib prototype.
5566         * source.c: Remove _initialize_source prototype.
5567         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5568         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5569         prototype.
5570         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5571         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5572         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5573         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5574         prototype.
5575         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5576         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5577         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5578         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5579         prototype.
5580         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5581         prototype.
5582         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5583         prototype.
5584         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5585         prototype.
5586         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5587         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5588         prototype.
5589         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5590         prototype.
5591         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5592         prototype.
5593         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5594         prototype.
5595         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5596         prototype.
5597         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5598         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5599         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5600         * stabsread.c: Remove _initialize_stabsread prototype.
5601         * stack.c: Remove _initialize_stack prototype.
5602         * stap-probe.c: Remove _initialize_stap_probe prototype.
5603         * std-regs.c: Remove _initialize_frame_reg prototype.
5604         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5605         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5606         * symfile.c: Remove _initialize_symfile prototype.
5607         * symmisc.c: Remove _initialize_symmisc prototype.
5608         * symtab.c: Remove _initialize_symtab prototype.
5609         * target-dcache.c: Remove _initialize_target_dcache prototype.
5610         * target-descriptions.c: Remove _initialize_target_descriptions
5611         prototype.
5612         * thread.c: Remove _initialize_thread prototype.
5613         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5614         prototype.
5615         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5616         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5617         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5618         prototype.
5619         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5620         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5621         * tracefile.c: Remove _initialize_tracefile prototype.
5622         * tracepoint.c: Remove _initialize_tracepoint prototype.
5623         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5624         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5625         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5626         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5627         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5628         * tui/tui-win.c: Remove _initialize_tui_win prototype.
5629         * tui/tui.c: Remove _initialize_tui prototype.
5630         * typeprint.c: Remove _initialize_typeprint prototype.
5631         * user-regs.c: Remove _initialize_user_regs prototype.
5632         * utils.c: Remove _initialize_utils prototype.
5633         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5634         * valarith.c: Remove _initialize_valarith prototype.
5635         * valops.c: Remove _initialize_valops prototype.
5636         * valprint.c: Remove _initialize_valprint prototype.
5637         * value.c: Remove _initialize_values prototype.
5638         * varobj.c: Remove _initialize_varobj prototype.
5639         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5640         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5641         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5642         * windows-nat.c: Remove _initialize_windows_nat,
5643         _initialize_check_for_gdb_ini, and _initialize_loadable
5644         prototypes.
5645         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5646         * xcoffread.c: Remove _initialize_xcoffread prototype.
5647         * xml-support.c: Remove _initialize_xml_support prototype.
5648         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5649         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5650         prototype.
5651         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5652         prototype.
5653         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5654
5655 2017-09-08  Keith Seitz  <keiths@redhat.com>
5656
5657         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5658         field.
5659
5660 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
5661
5662         * f-valprint.c (f_val_print): Remove check for one byte
5663         sized integers. Remove printing of character type.
5664
5665 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
5666             Christoph Weinmann  <christoph.t.weinmann@intel.com>
5667             Bernhard Heckel  <bernhard.heckel@intel.com>
5668
5669         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5670         to maintain proper indentation when printing pointers/refs.
5671
5672 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5673
5674         GDB 8.0.1 released.
5675
5676 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5677
5678         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
5679
5680 2017-09-05  Tom Tromey  <tom@tromey.com>
5681
5682         * parse.c (funcall_chain): Now a std::vector.
5683         (start_arglist, end_arglist): Simplify.
5684         (free_funcalls): Remove.
5685         (parse_exp_in_context_1): Remove cleanup.
5686
5687 2017-09-05  Tom Tromey  <tom@tromey.com>
5688
5689         * go-exp.y (go_parse): Don't create a cleanup.
5690
5691 2017-09-05  Tom Tromey  <tom@tromey.com>
5692
5693         * d-exp.y (PrimaryExpression): Use std::string.
5694         (d_parse): Don't create a cleanup.
5695
5696 2017-09-05  Tom Tromey  <tom@tromey.com>
5697
5698         * utils.c (do_clear_parser_state): Remove.
5699         (make_cleanup_clear_parser_state): Remove.
5700         * p-exp.y (pascal_parse): Use scoped_restore.
5701         * m2-exp.y (m2_parse): Use scoped_restore.
5702         * f-exp.y (f_parse): Use scoped_restore.
5703         * d-exp.y (d_parse): Use scoped_restore.
5704         * c-exp.y (c_parse): Use scoped_restore.
5705         * ada-exp.y (ada_parse): Use scoped_restore.
5706         * utils.h (make_cleanup_clear_parser_state): Remove.
5707
5708 2017-09-06  Keith Seitz  <keiths@redhat.com>
5709
5710         * dwarf2read.c (dw2_linkage_name_attr): New function.
5711         (dw2_linkage_name): New function.
5712         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
5713         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
5714         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
5715
5716 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5717
5718         * config/djgpp/djconfig.sh: Correct shell portability issue.
5719
5720 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5721
5722         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
5723
5724 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5725
5726         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
5727         * NEWS: Mention new FreeBSD/mips native configuration.
5728         * configure.host: Add aarch64*-*-freebsd*.
5729         * configure.nat: Likewise.
5730         * aarch64-fbsd-nat.c: New file.
5731
5732 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5733
5734         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
5735         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
5736         * NEWS: Mention new FreeBSD/aarch64 target.
5737         * configure.tgt: Add aarch64*-*-freebsd*.
5738         * aarch64-fbsd-tdep.c: New file.
5739         * aarch64-fbsd-tdep.h: New file.
5740
5741 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5742
5743         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
5744
5745 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
5746
5747         * parse.c (find_minsym_type_and_address): Don't relocate addresses
5748         of TLS symbols.
5749
5750 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5751
5752         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
5753         call.
5754
5755 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5756
5757         * infrun.c (follow_exec): Call add_thread after
5758         target_find_description.
5759
5760 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5761
5762         * infrun.c (handle_inferior_event_1): When exec'ing, read
5763         stop_pc after follow_exec.
5764
5765 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5766
5767         * remote.c (process_g_packet): Update error message.
5768
5769 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5770
5771         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
5772         targets.
5773
5774 2017-09-05  Pedro Alves  <palves@redhat.com>
5775
5776         * eval.c (eval_call, evaluate_funcall): New functions, factored
5777         out from ...
5778         (evaluate_subexp_standard): ... this.
5779
5780 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5781
5782         * amd64-tdep.c (amd64_target_description): Create target
5783         descriptions.
5784         (_initialize_amd64_tdep): Don't call functions
5785         initialize_tdesc_amd64_*.  Add self tests.
5786         * arch/amd64.c (amd64_create_target_description): Add parameter
5787         is_linux.  Call set_tdesc_osabi if is_linux is true.
5788         * arch/amd64.h (amd64_create_target_description): Update the
5789         declaration.
5790         * arch/i386.c (i386_create_target_description): Add parameter
5791         is_linux.  Call set_tdesc_osabi if is_linux is true.
5792         * arch/i386.h (i386_create_target_description): Update
5793         declaration.
5794         * configure.tgt: Add i386.o to gdb_target_obs.
5795         * features/Makefile (XMLTOC): Remove i386/*.xml.
5796         * features/i386/amd64-avx-avx512.c: Remove.
5797         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
5798         * features/i386/amd64-avx-mpx.c: Remove.
5799         * features/i386/amd64-avx.c: Remove.
5800         * features/i386/amd64-mpx.c: Remove.
5801         * features/i386/amd64.c: Remove.
5802         * features/i386/i386-avx-avx512.c: Remove.
5803         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
5804         * features/i386/i386-avx-mpx.c: Remove.
5805         * features/i386/i386-avx.c: Remove.
5806         * features/i386/i386-mmx.c: Remove.
5807         * features/i386/i386-mpx.c: Remove.
5808         * features/i386/i386.c: Remove.
5809         * i386-tdep.c: Don't include features/i386/i386*.c., include
5810         target-descriptions.h and arch/i386.h.
5811         (i386_target_description): Create target descriptions.
5812         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
5813         functions.  Do self tests.
5814
5815 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5816
5817         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
5818         * features/i386/amd64-avx-avx512-linux.c: Removed.
5819         * features/i386/amd64-avx-linux.c: Removed.
5820         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
5821         * features/i386/amd64-avx-mpx-linux.c: Removed.
5822         * features/i386/amd64-linux.c: Removed.
5823         * features/i386/amd64-mpx-linux.c: Removed.
5824         * features/i386/x32-avx-avx512-linux.c: Removed.
5825         * features/i386/x32-avx-linux.c: Removed.
5826         * features/i386/x32-linux.c: Removed.
5827
5828 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5829
5830         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
5831         features/i386/*.c.
5832         (amd64_linux_read_description): Call
5833         amd64_create_target_description.
5834         * arch/amd64.c: New file.
5835         * arch/amd64.h: New file.
5836         * configure.tgt (x86_64-*-linux*): Append amd64.o.
5837         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
5838
5839 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5840
5841         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
5842         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
5843         (amd64_linux_read_description): Create target descriptions.
5844         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
5845         functions.  Add unit tests.
5846         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
5847         x32-core.xml.
5848         * features/i386/64bit-avx.c: Generated.
5849         * features/i386/64bit-avx512.c: Generated.
5850         * features/i386/64bit-core.c: Generated.
5851         * features/i386/64bit-linux.c: Generated.
5852         * features/i386/64bit-mpx.c: Generated.
5853         * features/i386/64bit-pkeys.c: Generated.
5854         * features/i386/64bit-segments.c: Generated.
5855         * features/i386/64bit-sse.c: Generated.
5856         * features/i386/x32-core.c: Generated.
5857         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
5858         c files for amd64-linux and x32-linux.
5859
5860 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5861
5862         * amd64-linux-tdep.c (amd64_linux_read_description): New
5863         function.
5864         (amd64_linux_core_read_description): Call
5865         amd64_linux_read_description.
5866         (amd64_linux_init_abi): Likewise.
5867         (amd64_x32_linux_init_abi): Likewise.
5868         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
5869         * x86-linux-nat.c (x86_linux_read_description): Call
5870         amd64_linux_read_description.
5871
5872 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5873
5874         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
5875         comments.
5876
5877 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5878
5879         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
5880         * features/i386/i386-avx-avx512-linux.c: Remove.
5881         * features/i386/i386-avx-linux.c: Remove.
5882         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
5883         * features/i386/i386-avx-mpx-linux.c: Remove.
5884         * features/i386/i386-linux.c: Remove.
5885         * features/i386/i386-mmx-linux.c: Remove.
5886         * features/i386/i386-mpx-linux.c: Remove.
5887
5888 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5889
5890         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
5891         (SFILES): Add arch/i386.c.
5892         (HFILES_NO_SRCDIR): Add arch/i386.h.
5893         * arch/i386.c: New file.
5894         * arch/i386.h: New file.
5895         * arch/tdesc.h (allocate_target_description): Declare.
5896         (set_tdesc_architecture): Declare.
5897         (set_tdesc_osabi): Declare.
5898         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
5899         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
5900         include arch/i386.h.
5901         (i386_linux_read_description): Remove code and call
5902         i386_create_target_description.
5903         (set_tdesc_architecture): New function.
5904         (set_tdesc_osabi): New function.
5905         * target-descriptions.h (allocate_target_description): Remove.
5906
5907 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5908
5909         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
5910         * target-descriptions.c (tdesc_create_feature): Likewise, and
5911         adjust code.
5912         * features/i386/32bit-avx.c: Re-generated.
5913         * features/i386/32bit-avx512.c: Re-generated.
5914         * features/i386/32bit-core.c: Re-generated.
5915         * features/i386/32bit-linux.c: Re-generated.
5916         * features/i386/32bit-mpx.c: Re-generated.
5917         * features/i386/32bit-pkeys.c: Re-generated.
5918         * features/i386/32bit-sse.c: Re-generated.
5919
5920 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5921
5922         * regformats/regdef.h (struct reg): Override operator == and !=.
5923
5924 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5925
5926         * arch/tdesc.h: New file.
5927         * regformats/regdat.sh: Generate code using tdesc_create_reg.
5928         * target-descriptions.c: Update comments.
5929         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
5930         declarations.
5931         * features/i386/32bit-avx.c: Re-generated.
5932         * features/i386/32bit-avx512.c: Re-generated.
5933         * features/i386/32bit-core.c: Re-generated.
5934         * features/i386/32bit-linux.c: Re-generated.
5935         * features/i386/32bit-mpx.c: Re-generated.
5936         * features/i386/32bit-pkeys.c: Re-generated.
5937         * features/i386/32bit-sse.c: Re-generated.
5938
5939 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5940
5941         * regformats/regdat.sh: Update generated code.
5942
5943 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5944
5945         * regformats/regdat.sh: Adjust code order.
5946
5947 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5948
5949         * expprint.c (dump_subexp_body_standard): Use constant format
5950         string in fprintf_filtered call.
5951
5952 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5953
5954         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
5955         NetBSD/i386.
5956         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
5957
5958 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5959
5960         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
5961
5962 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5963
5964         * bsd-kvm.o: Define _KMEMUSER.
5965         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
5966         * configure: Regenerate.
5967
5968 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5969
5970         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
5971         * i386-fbsd-nat.c: Likewise.
5972
5973 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5974
5975         * unittests/array-view-selftests.c: Add include of <array>.
5976
5977 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5978
5979         * spu-tdep.c (flush_ea_cache): Add missing argument to
5980         call_function_by_hand.
5981
5982 2017-09-04  Pedro Alves  <palves@redhat.com>
5983
5984         * NEWS (Safer support for debugging with no debug info): New.
5985
5986 2017-09-04  Pedro Alves  <palves@redhat.com>
5987
5988         * c-exp.y (function_method, function_method_void): Add current
5989         instance flags to TYPE_INSTANCE.
5990         * dwarf2read.c (check_modifier): New.
5991         (compute_delayed_physnames): Assert that only C++ adds delayed
5992         physnames.  Mark fn_fields as const/volatile depending on
5993         physname.
5994         * eval.c (make_params): New type_instance_flags parameter.  Use
5995         it as the new type's instance flags.
5996         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
5997         flags element and pass it to make_params.
5998         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
5999         instance flags element.
6000         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6001         * gdbtypes.h: Include "enum-flags.h".
6002         (type_instance_flags): New enum-flags type.
6003         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6004         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6005         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6006         (follow_type_instance_flags): New function.
6007         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6008         * parser-defs.h (follow_type_instance_flags): Declare.
6009         * valops.c (value_struct_elt_for_reference): const/volatile must
6010         match too.
6011
6012 2017-09-04  Pedro Alves  <palves@redhat.com>
6013
6014         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6015         function/method scopes; lookup the nested name as a function local
6016         static variable.
6017
6018 2017-09-04  Pedro Alves  <palves@redhat.com>
6019
6020         (%type <voidval>): Add function_method.
6021         * c-exp.y (exp): New production for calls with no arguments.
6022         (function_method, function_method_void_or_typelist): New
6023         productions.
6024         (exp): New production for "method()::static_var".
6025         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6026         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6027         Handle OP_FUNC_STATIC_VAR.
6028         * parse.c (operator_length_standard):
6029         Handle OP_FUNC_STATIC_VAR.
6030
6031 2017-09-04  Pedro Alves  <palves@redhat.com>
6032
6033         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6034         handling.
6035         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6036         Ditto.
6037         * parse.c (operator_length_standard, operator_check_standard):
6038         Ditto.
6039         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6040
6041 2017-09-04  Pedro Alves  <palves@redhat.com>
6042
6043         * ax-gdb.c: Include "typeprint.h".
6044         (gen_expr_for_cast): New function.
6045         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6046         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6047         type is unknown.
6048         * dwarf2read.c (new_symbol_full): Fallback to int instead of
6049         nodebug_data_symbol.
6050         * eval.c: Include "typeprint.h".
6051         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6052         Error out if symbol has unknown type.
6053         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6054         evaluate_subexp_for_cast.
6055         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6056         OP_VAR_MSYM_VALUE.
6057         (evaluate_subexp_for_cast): New function.
6058         * gdbtypes.c (init_nodebug_var_type): New function.
6059         (objfile_type): Use it to initialize types of variables with no
6060         debug info.
6061         * typeprint.c (error_unknown_type): New.
6062         * typeprint.h (error_unknown_type): New declaration.
6063         * compile/compile-c-types.c (convert_type_basic): Handle
6064         TYPE_CODE_ERROR; warn and fallback to int for variables with
6065         unknown type.
6066
6067 2017-09-04  Pedro Alves  <palves@redhat.com>
6068
6069         * eval.c (evaluate_var_value): New function, factored out from ...
6070         (evaluate_subexp_standard): ... here.
6071
6072 2017-09-04  Pedro Alves  <palves@redhat.com>
6073
6074         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6075         Remove useless assignments to 'op'.
6076
6077 2017-09-04  Pedro Alves  <palves@redhat.com>
6078
6079         * eval.c (eval_skip_value): New function.
6080         (evaluate_subexp_standard): Use it.
6081
6082 2017-09-04  Pedro Alves  <palves@redhat.com>
6083
6084         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6085         function name from symbol/minsym and pass it to
6086         error_call_unknown_return_type.
6087
6088 2017-09-04  Pedro Alves  <palves@redhat.com>
6089
6090         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6091         * ax-gdb.c (gen_msym_var_ref): New function.
6092         (gen_expr): Handle OP_VAR_MSYM_VALUE.
6093         * eval.c (evaluate_var_msym_value): New function.
6094         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6095         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6096         to call_function_by_hand.
6097         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6098         Handle OP_VAR_MSYM_VALUE.
6099         (union exp_element) <msymbol>: New field.
6100         * minsyms.h (struct type): Forward declare.
6101         (find_minsym_type_and_address): Declare.
6102         * parse.c (write_exp_elt_msym): New function.
6103         (write_exp_msymbol): Delete, refactored as ...
6104         (find_minsym_type_and_address): ... this new function.
6105         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6106         (operator_length_standard, operator_check_standard): Handle
6107         OP_VAR_MSYM_VALUE.
6108         * std-operator.def (OP_VAR_MSYM_VALUE): New.
6109
6110 2017-09-04  Pedro Alves  <palves@redhat.com>
6111
6112         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6113         TYPE_GNU_IFUNC specially here.  Throw error if return type is
6114         unknown.
6115         * ada-typeprint.c (print_func_type): Handle functions with unknown
6116         return type.
6117         * c-typeprint.c (c_type_print_base): Handle functions and methods
6118         with unknown return type.
6119         * compile/compile-c-symbols.c (convert_symbol_bmsym)
6120         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6121         * compile/compile-c-types.c: Include "objfiles.h".
6122         (convert_func): For functions with unknown return type, warn and
6123         default to int.
6124         * compile/compile-object-run.c (compile_object_run): Adjust call
6125         to call_function_by_hand_dummy.
6126         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6127         call_function_by_hand.
6128         * eval.c (evaluate_subexp_standard): Adjust calls to
6129         call_function_by_hand.  Handle functions and methods with unknown
6130         return type.  Pass expect_type to call_function_by_hand.
6131         * f-typeprint.c (f_type_print_base): Handle functions with unknown
6132         return type.
6133         * gcore.c (call_target_sbrk): Adjust call to
6134         call_function_by_hand.
6135         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6136         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
6137         an integer address type instead of nodebug.
6138         * guile/scm-value.c (gdbscm_value_call): Adjust call to
6139         call_function_by_hand.
6140         * infcall.c (error_call_unknown_return_type): New function.
6141         (call_function_by_hand): New "default_return_type" parameter.
6142         Pass it down.
6143         (call_function_by_hand_dummy): New "default_return_type"
6144         parameter.  Use it instead of defaulting to int.  If there's no
6145         default and the return type is unknown, throw an error.  If
6146         there's a default return type, and the called function has no
6147         debug info, then assume the function is prototyped.
6148         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6149         New "default_return_type" parameter.
6150         (error_call_unknown_return_type): New declaration.
6151         * linux-fork.c (call_lseek): Cast return type of lseek.
6152         (inferior_call_waitpid, checkpoint_command): Adjust calls to
6153         call_function_by_hand.
6154         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6155         calls to call_function_by_hand.
6156         * m2-typeprint.c (m2_procedure): Handle functions with unknown
6157         return type.
6158         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6159         (value_nsstring, print_object_command): Adjust calls to
6160         call_function_by_hand.
6161         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6162         functions with unknown return type.
6163         (pascal_type_print_func_varspec_suffix): New function.
6164         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6165         TYPE_CODE_METHOD>: Use it.
6166         * python/py-value.c (valpy_call): Adjust call to
6167         call_function_by_hand.
6168         * rust-lang.c (rust_evaluate_funcall): Adjust call to
6169         call_function_by_hand.
6170         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6171         call_function_by_hand.
6172         * valops.c (value_allocate_space_in_inferior): Adjust call to
6173         call_function_by_hand.
6174         * typeprint.c (type_print_unknown_return_type): New function.
6175         * typeprint.h (type_print_unknown_return_type): New declaration.
6176
6177 2017-09-04  Pedro Alves  <palves@redhat.com>
6178
6179         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6180         types with more than one parameter as prototyped.
6181
6182 2017-09-04  Pedro Alves  <palves@redhat.com>
6183
6184         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6185         (disassemble_command): Use gdb_disassembly_flags instead of bare
6186         int.
6187         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6188         (dump_insns, do_mixed_source_and_assembly_deprecated)
6189         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6190         Use gdb_disassembly_flags instead of bare int.
6191         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6192         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6193         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6194         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
6195         (enum gdb_disassembly_flag): ... values of this new enumeration.
6196         (gdb_disassembly_flags): Define.
6197         (gdb_disassembly)
6198         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6199         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6200         gdb_disassembly_flags instead of bare int.
6201         * record-btrace.c (btrace_insn_history)
6202         (record_btrace_insn_history, record_btrace_insn_history_range)
6203         (record_btrace_insn_history_from): Use gdb_disassembly_flags
6204         instead of bare int.
6205         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6206         Use gdb_disassembly_flags instead of bare int.
6207         * target-debug.h (target_debug_print_gdb_disassembly_flags):
6208         Define.
6209         * target-delegates.c: Regenerate.
6210         * target.c (target_insn_history, target_insn_history_from)
6211         (target_insn_history_range): Use gdb_disassembly_flags instead of
6212         bare int.
6213         * target.h: Include "disasm.h".
6214         (struct target_ops) <to_insn_history, to_insn_history_from,
6215         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6216         int.
6217         (target_insn_history, target_insn_history_from)
6218         (target_insn_history_range): Use gdb_disassembly_flags instead of
6219         bare int.
6220
6221 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6222
6223         * cli/cli-script.c (build_command_line): For if/while commands,
6224         check whether args is empty.
6225
6226 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6227
6228         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6229         (enum command_control_type): Likewise.
6230         (struct command_line): Likewise.
6231         (free_command_lines): Likewise.
6232         (struct command_lines_deleter): Likewise.
6233         (command_line_up): Likewise.
6234         (read_command_lines): Likewise.
6235         (read_command_lines_1): Likewise.
6236         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6237         (enum command_control_type): Likewise.
6238         (struct command_line): Likewise.
6239         (free_command_lines): Likewise.
6240         (struct command_lines_deleter): Likewise.
6241         (command_line_up): Likewise.
6242         (read_command_lines): Likewise.
6243         (read_command_lines_1): Likewise.
6244         * breakpoint.h: Include cli/cli-script.h.
6245         * extension-priv.h: Likewise.
6246         * gdbcmd.h: Likewise.
6247
6248 2017-09-04  Pedro Alves  <palves@redhat.com>
6249
6250         * ada-lang.c (is_known_support_routine): Move sal declaration to
6251         where it is initialized.
6252         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6253         (parse_breakpoint_sals, decode_static_tracepoint_spec)
6254         (clear_command, update_static_tracepoint): Remove init_sal
6255         references.  Move declarations closer to initializations.
6256         * cli/cli-cmds.c (list_command): Move sal declarations closer to
6257         initializations.
6258         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6259         references.  Move sal declarations closer to initializations.
6260         * frame.c (find_frame_sal): Return a symtab_and_line via function
6261         return instead of output parameter.  Remove init_sal references.
6262         * frame.h (find_frame_sal): Return a symtab_and_line via function
6263         return instead of output parameter.
6264         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6265         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6266         instead of memset.
6267         (gdbscm_find_pc_line): Remove init_sal reference.
6268         * infcall.c (call_function_by_hand_dummy): Remove init_sal
6269         references.  Move declarations closer to initializations.
6270         * infcmd.c (set_step_frame): Update.  Move declarations closer to
6271         initializations.
6272         (finish_backward): Remove init_sal references.  Move declarations
6273         closer to initializations.
6274         * infrun.c (process_event_stop_test, handle_step_into_function)
6275         (insert_hp_step_resume_breakpoint_at_frame)
6276         (insert_step_resume_breakpoint_at_caller): Likewise.
6277         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6278         (symbol_to_sal): Likewise.
6279         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6280         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6281         to its initialization.
6282         * reverse.c (save_bookmark_command): Use new/delete.  Remove
6283         init_sal references.  Move declarations closer to initializations.
6284         * source.c (get_current_source_symtab_and_line): Remove brace
6285         initialization.
6286         (set_current_source_symtab_and_line): Now takes the sal by const
6287         reference.  Remove brace initialization.
6288         (line_info): Remove init_sal reference.
6289         * source.h (set_current_source_symtab_and_line): Now takes a
6290         symtab_and_line via const reference.
6291         * stack.c (set_current_sal_from_frame): Adjust.
6292         (print_frame_info): Adjust.
6293         (get_last_displayed_sal): Return the sal via function return
6294         instead of via output parameter.  Simplify.
6295         (frame_info): Adjust.
6296         * stack.h (get_last_displayed_sal): Return the sal via function
6297         return instead of via output parameter.
6298         * symtab.c (init_sal): Delete.
6299         (find_pc_sect_line): Remove init_sal references.  Move
6300         declarations closer to initializations.
6301         (find_function_start_sal): Remove init_sal references.  Move
6302         declarations closer to initializations.
6303         * symtab.h (struct symtab_and_line): In-class initialize all
6304         fields.
6305         * tracepoint.c (set_traceframe_context)
6306         (print_one_static_tracepoint_marker): Remove init_sal references.
6307         Move declarations closer to initializations.
6308         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6309         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
6310         declarations closer to initializations.
6311         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6312         init_sal references.  Adjust.
6313
6314 2017-09-04  Pedro Alves  <palves@redhat.com>
6315
6316         * ax-gdb.c (agent_command_1): Use range-for.
6317         * break-catch-throw.c (re_set_exception_catchpoint): Update.
6318         * breakpoint.c: Include "common/array-view.h".
6319         (init_breakpoint_sal, create_breakpoint_sal): Change sals
6320         parameter from struct symtabs_and_lines to
6321         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
6322         (breakpoint_sals_to_pc): Change sals parameter from struct
6323         symtabs_and_lines to std::vector reference.
6324         (check_fast_tracepoint_sals): Change sals parameter from struct
6325         symtabs_and_lines to std::array_view.  Use range-for.
6326         (decode_static_tracepoint_spec): Return a std::vector instead of
6327         symtabs_and_lines.  Update.
6328         (create_breakpoint): Update.
6329         (break_range_command, until_break_command, clear_command): Update.
6330         (base_breakpoint_decode_location, bkpt_decode_location)
6331         (bkpt_probe_create_sals_from_location)
6332         (bkpt_probe_decode_location, tracepoint_decode_location)
6333         (tracepoint_probe_decode_location)
6334         (strace_marker_create_sals_from_location): Return a std::vector
6335         instead of symtabs_and_lines.
6336         (strace_marker_create_breakpoints_sal): Update.
6337         (strace_marker_decode_location): Return a std::vector instead of
6338         symtabs_and_lines.  Update.
6339         (update_breakpoint_locations): Change struct symtabs_and_lines
6340         parameters to gdb::array_view.  Adjust.
6341         (location_to_sals): Return a std::vector instead of
6342         symtabs_and_lines.  Update.
6343         (breakpoint_re_set_default): Use std::vector instead of struct
6344         symtabs_and_lines.
6345         (decode_location_default): Return a std::vector instead of
6346         symtabs_and_lines.  Update.
6347         * breakpoint.h: Include "common/array-view.h".
6348         (struct breakpoint_ops) <decode_location>: Now returns a
6349         std::vector instead of returning a symtabs_and_lines via output
6350         parameter.
6351         (update_breakpoint_locations): Change sals parameters to use
6352         gdb::array_view.
6353         * cli/cli-cmds.c (edit_command, list_command): Update to use
6354         std::vector and gdb::array_view.
6355         (ambiguous_line_spec): Adjust to use gdb::array_view and
6356         range-for.
6357         (compare_symtabs): Rename to ...
6358         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
6359         const reference and adjust.
6360         (filter_sals): Rewrite using std::vector and standard algorithms.
6361         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6362         (jump_command): Update to use std::vector.
6363         * linespec.c (struct linespec_state) <canonical_names>: Update
6364         comment.
6365         (add_sal_to_sals_basic): Delete.
6366         (add_sal_to_sals, filter_results, convert_results_to_lsals)
6367         (decode_line_2, create_sals_line_offset)
6368         (convert_address_location_to_sals, convert_linespec_to_sals)
6369         (convert_explicit_location_to_sals, parse_linespec)
6370         (event_location_to_sals, decode_line_full, decode_line_1)
6371         (decode_line_with_current_source)
6372         (decode_line_with_last_displayed, decode_objc)
6373         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6374         (linespec_result::~linespec_result): Adjust to use std::vector
6375         instead of symtabs_and_lines.
6376         * linespec.h (linespec_sals::sals): Now a std::vector.
6377         (struct linespec_result): Use std::vector, bool, and in-class
6378         initialization.
6379         (decode_line_1, decode_line_with_current_source)
6380         (decode_line_with_last_displayed): Return std::vector.
6381         * macrocmd.c (info_macros_command): Use std::vector.
6382         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6383         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6384         std::vector.
6385         * probe.h (parse_probes): Return a std::vector.
6386         * python/python.c (gdbpy_decode_line): Use std::vector and
6387         gdb::array_view.
6388         * source.c (select_source_symtab, line_info): Use std::vector.
6389         * stack.c (func_command): Use std::vector.
6390         * symtab.h (struct symtabs_and_lines): Delete.
6391         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6392
6393 2017-09-04  Pedro Alves  <palves@redhat.com>
6394
6395         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6396         unittests/array-view-selftests.c.
6397         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6398         * common/array-view.h: New file.
6399         * unittests/array-view-selftests.c: New file.
6400
6401 2017-09-04  Pedro Alves  <palves@redhat.com>
6402
6403         * cli/cli-cmds.c (edit_command): Pass message to
6404         ambiguous_line_spec.
6405         (list_command): Pass message to ambiguous_line_spec.  Say
6406         "first"/"last" instead of "start" and "end" to be consistent with
6407         the manual.
6408         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
6409         them to print formatted message.
6410
6411 2017-09-04  Pedro Alves  <palves@redhat.com>
6412
6413         * btrace.c (ftrace_add_pt): Pass btrace_insn to
6414         ftrace_update_insns by reference instead of pointer.
6415
6416 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6417
6418         * i386-go32-tdep.c: Include x86-xstate.h.
6419         (i386_go32_init_abi): Call i386_target_description.
6420         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6421         if xcr0 is X86_XSTATE_X87_MASK.
6422         * i386-tdep.h (tdesc_i386): Remove the declaration.
6423         (tdesc_i386_mmx): Likewise.
6424
6425 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6426
6427         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6428         X86_XSTATE_SSE_MASK instead of 0.
6429
6430 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6431
6432         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6433         i386_target_description.
6434         * i386-fbsd-nat.c (i386fbsd_read_description): Call
6435         i386_target_description.
6436         * i386-tdep.c (i386_gdbarch_init): Likewise.
6437
6438 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6439
6440         * amd64-darwin-tdep.c: Include "x86-xstate.h".
6441         (x86_darwin_init_abi_64): Call amd64_target_description.
6442         * amd64-dicos-tdep.c: Likewise.
6443         * amd64-fbsd-nat.c: Likewise.
6444         * amd64-fbsd-tdep.c: Likewise.
6445         * amd64-nbsd-tdep.c: Likewise.
6446         * amd64-obsd-tdep.c: Likewise.
6447         * amd64-sol2-tdep.c: Likewise.
6448         * amd64-windows-tdep.c: Likewise.
6449         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6450
6451 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6452
6453         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6454         (btrace_function) <insn>: Change type to use std::vector.
6455         * btrace.c (ftrace_debug, ftrace_call_num_insn,
6456         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6457         ftrace_update_insns, ftrace_compute_global_level_offset,
6458         btrace_stitch_bts, btrace_clear, btrace_insn_get,
6459         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6460         change to std::vector.
6461         (ftrace_update_insns): Adjust to change to std::vector, change
6462         type of INSN parameter.
6463         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6464         * record-btrace.c (btrace_call_history_insn_range,
6465         btrace_compute_src_line_range,
6466         record_btrace_frame_prev_register): Adjust to change to
6467         std::vector.
6468         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6469         to change to std::vector.
6470
6471 2017-09-03  Tom Tromey  <tom@tromey.com>
6472
6473         * corefile.c (reopen_exec_file): Use std::string.
6474
6475 2017-09-03  Tom Tromey  <tom@tromey.com>
6476
6477         * compile/compile.c (compile_register_name_mangled): Return
6478         std::string.
6479         * compile/compile-loc2c.c (pushf_register_address): Update.
6480         (pushf_register): Update.
6481         * compile/compile-c-types.c (convert_array): Update.
6482         * compile/compile-c-symbols.c (generate_vla_size): Update.
6483         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6484         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6485         (convert_one_symbol): Update.
6486         (generate_c_for_for_one_variable): Update.
6487         * compile/compile-c-support.c (c_get_range_decl_name): Return a
6488         std::string.
6489         (generate_register_struct): Update.
6490         * compile/compile-internal.h (c_get_range_decl_name): Return a
6491         std::string.
6492         (compile_register_name_mangled): Return std::string.
6493
6494 2017-09-03  Tom Tromey  <tom@tromey.com>
6495
6496         * utils.c (perror_string): Return a std::string.
6497         (throw_perror_with_name, perror_warning_with_name): Update.
6498
6499 2017-09-03  Tom Tromey  <tom@tromey.com>
6500
6501         * demangle.c (demangle_command): Use std::string,
6502         unique_xmalloc_ptr.
6503
6504 2017-09-03  Tom Tromey  <tom@tromey.com>
6505
6506         * cli/cli-setshow.c (do_set_command): Use std::string.
6507
6508 2017-09-03  Tom Tromey  <tom@tromey.com>
6509
6510         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6511
6512 2017-09-03  Tom Tromey  <tom@tromey.com>
6513
6514         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6515
6516 2017-09-03  Tom Tromey  <tom@tromey.com>
6517
6518         * mi/mi-cmd-env.c (env_execute_cli_command): Use
6519         gdb::unique_xmalloc_ptr.
6520
6521 2017-09-03  Tom Tromey  <tom@tromey.com>
6522
6523         * thread.c (print_thread_info_1): Use string_printf.
6524         (thread_apply_command, thread_apply_all_command): Use
6525         std::string.
6526
6527 2017-09-03  Tom Tromey  <tom@tromey.com>
6528
6529         * valprint.c (val_print_string): Update.
6530         * gdbcore.h (memory_error_message): Return std::string.
6531         * corefile.c (memory_error_message): Return std::string.
6532         (memory_error): Update.
6533         * breakpoint.c (insert_bp_location): Update.
6534
6535 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
6536
6537         * target/waitstatus.h (target_waitstatus_to_string): Change
6538         return type to std::string.
6539         * target/waitstatus.c (target_waitstatus_to_string): Return
6540         std::string.
6541         * target.h (target_waitstatus_to_string): Remove declaration.
6542         * infrun.c (resume, clear_proceed_status_thread,
6543         print_target_wait_results, do_target_wait, save_waitstatus,
6544         stop_all_threads): Adjust.
6545         * record-btrace.c (record_btrace_wait): Adjust.
6546         * target-debug.h
6547         (target_debug_print_struct_target_waitstatus_p): Adjust.
6548
6549 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6550
6551         PR gdb/22046
6552         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6553         detection.
6554
6555 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
6556
6557         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6558         for setting/unsetting environment variables on the remote target.
6559         (New remote packets): Add entries for QEnvironmentHexEncoded,
6560         QEnvironmentUnset and QEnvironmentReset.
6561         * common/environ.c (gdb_environ::operator=): Extend method to
6562         handle m_user_set_env_list and m_user_unset_env_list.
6563         (gdb_environ::clear): Likewise.
6564         (match_var_in_string): Change type of first parameter from 'char
6565         *' to 'const char *'.
6566         (gdb_environ::set): Extend method to handle
6567         m_user_set_env_list and m_user_unset_env_list.
6568         (gdb_environ::unset): Likewise.
6569         (gdb_environ::clear_user_set_env): New method.
6570         (gdb_environ::user_set_envp): Likewise.
6571         (gdb_environ::user_unset_envp): Likewise.
6572         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6573         m_user_unset_env_list on move constructor/assignment.
6574         (unset): Add new default parameter 'update_unset_list = true'.
6575         (clear_user_set_env): New method.
6576         (user_set_envp): Likewise.
6577         (user_unset_envp): Likewise.
6578         (m_user_set_env_list): New std::set.
6579         (m_user_unset_env_list): Likewise.
6580         * common/rsp-low.c (hex2str): New function.
6581         (bin2hex): New overload for bin2hex function.
6582         * common/rsp-low.c (hex2str): New prototype.
6583         (str2hex): New overload prototype.
6584         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6585         QEnvironmentUnset and QEnvironmentReset.
6586         (remote_protocol_features): Add QEnvironmentHexEncoded,
6587         QEnvironmentUnset and QEnvironmentReset packets.
6588         (send_environment_packet): New function.
6589         (extended_remote_environment_support): Likewise.
6590         (extended_remote_create_inferior): Call
6591         extended_remote_environment_support.
6592         (_initialize_remote): Add QEnvironmentHexEncoded,
6593         QEnvironmentUnset and QEnvironmentReset packet configs.
6594         * unittests/environ-selftests.c (gdb_selftest_env_var):
6595         New variable.
6596         (test_vector_initialization): New function.
6597         (test_init_from_host_environ): Likewise.
6598         (test_reinit_from_host_environ): Likewise.
6599         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6600         Likewise.
6601         (test_unset_set_empty_vector): Likewise.
6602         (test_vector_clear): Likewise.
6603         (test_std_move): Likewise.
6604         (test_move_constructor):
6605         (test_self_move): Likewise.
6606         (test_set_unset_reset): Likewise.
6607         (run_tests): Rewrite in terms of the functions above.
6608
6609 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
6610
6611         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6612         (adi_available): Use a temp variable of type CORE_ADDR as argument
6613         3 when calling target_auxv_search.
6614         (adi_normalize_address): Use masks and xor operators to calculate
6615         normalized address.
6616         (adi_read_versions, adi_write_versions, adi_print_versions)
6617         (do_examine, do_assign): Use paddress.
6618
6619 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
6620
6621         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6622         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6623         out of loop and add supply of FIR.
6624         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6625         add collect of FIR.
6626
6627 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
6628
6629         PR gdb/21827
6630         * cli/cli-script.c (define_command): Don't convert command name
6631         to lower case.
6632
6633 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
6634
6635         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6636         Update all callers accordingly. Remove all code blocks handling
6637         the case where DISPP is not NULL.
6638
6639 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6640
6641         PR symtab/22003
6642         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6643         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6644         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6645
6646 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6647
6648         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6649         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6650         (read_comp_units_from_section): New parameter abbrev_section, use
6651         read_and_check_comp_unit_head, allocate signatured_type if needed.
6652         (create_all_comp_units): Update read_comp_units_from_section caller.
6653
6654 2017-08-23  Pedro Alves  <palves@redhat.com>
6655
6656         PR remote/21852
6657         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6658         to null_ptid and switch to thread without reading the registers
6659         after adding the inferior.
6660
6661 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6662
6663         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6664         compile-gcc.
6665         * compile/compile.c (compile_gcc, show_compile_gcc): New.
6666         (compile_to_object): Implement compile_gcc.
6667         (_initialize_compile): Install "set compile-gcc".  Initialize
6668         compile_gcc.
6669
6670 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6671
6672         * compile/compile.c (compile_to_object): Conditionally call
6673         set_verbose.  Conditionally call compile or compile_v0.
6674
6675 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
6676
6677         * sparc64-tdep.h: (adi_normalize_address): New export.
6678         * sparc-nat.h: (open_adi_tag_fd): New export.
6679         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
6680         * sparc64-linux-tdep.c:
6681         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
6682         (sparc64_linux_handle_segmentation_fault): New function.
6683         (sparc64_linux_init_abi): Register
6684         sparc64_linux_handle_segmentation_fault
6685         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
6686         (sparc64_addr_bits_remove): New function.
6687         (sparc64_init_abi): Register sparc64_addr_bits_remove.
6688         (MAX_PROC_NAME_SIZE): New macro.
6689         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
6690         (sparc64adilist): New variable.
6691         (adi_proc_list): New variable.
6692         (find_adi_info): New function.
6693         (add_adi_info): New function.
6694         (get_adi_info_proc): New function.
6695         (get_adi_info): New function.
6696         (info_adi_command): New function.
6697         (read_maps_entry): New function.
6698         (adi_available): New function.
6699         (adi_normalize_address): New function.
6700         (adi_align_address): New function.
6701         (adi_convert_byte_count): New function.
6702         (adi_tag_fd): New function.
6703         (adi_is_addr_mapped): New function.
6704         (adi_read_versions): New function.
6705         (adi_write_versions): New function.
6706         (adi_print_versions): New function.
6707         (do_examine): New function.
6708         (do_assign): New function.
6709         (adi_examine_command): New function.
6710         (adi_assign_command): New function.
6711         (_initialize_sparc64_adi_tdep): New function.
6712
6713 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
6714
6715         * breakpoint.c (breakpoints_info): Rename to ...
6716         (info_breakpoints_command): ... this.
6717         (watchpoints_info): Rename to ...
6718         (info_watchpoints_command): ... this.
6719         (tracepoints_info): Rename to ...
6720         (info_tracepoints_command): ... this.
6721         (_initialize_breakpoint): Adjust.
6722         * dcache.c (dcache_info): Rename to ...
6723         (info_display_command): ... this.
6724         (_initialize_dcache): Adjust.
6725         * frame.h (args_info): Rename to ...
6726         (info_args_command): ... this.
6727         (locals_info): Rename to ...
6728         (info_locals_command): ... this.
6729         * infcmd.c (nofp_registers_info): Rename to ...
6730         (info_registers_command): ... this.
6731         (float_info): Rename to ...
6732         (info_float_command): ... this.
6733         (program_info): Rename to ...
6734         (info_program_command): ... this.
6735         (all_registers_info): Rename to ...
6736         (info_all_registers_command): ... this.
6737         (vector_info): Rename to ...
6738         (info_vector_command): ... this.
6739         (float_info): Rename to ...
6740         (info_float_command): ... this.
6741         (_initialize_infcmd): Adjust.
6742         * inferior.h (term_info): Rename to ...
6743         (info_terminal_command): ... this.
6744         * inflow.c (term_info): Rename to ...
6745         (info_terminal_command): ... this.
6746         (_initialize_inflow): Adjust.
6747         * infrun.c (signals_info): Rename to ...
6748         (info_signals_command): ... this.
6749         (_initialize_infrun): Adjust.
6750         * objc-lang.c (classes_info): Rename to ...
6751         (info_classes_command): ... this.
6752         (selectors_info): Rename to ...
6753         (info_selectors_command): ... this.
6754         (_initialize_objc_language): Adjust.
6755         * printcmd.c (sym_info): Rename to ...
6756         (info_symbol_command): ... this.
6757         (address_info): Rename to ...
6758         (info_address_command): ... this.
6759         (display_info): Rename to ...
6760         (info_display_command): ... this.
6761         (_initialize_printcmd): Adjust.
6762         * reverse.c (bookmarks_info): Rename to ...
6763         (info_breakpoints_command): ... this.
6764         (_initialize_reverse): Adjust.
6765         * ser-go32.c (dos_info): Rename to ...
6766         (info_serial_command): ... this.
6767         (_initialize_ser_dos): Adjust.
6768         * skip.c (skip_info): Rename to ...
6769         (info_skip_command): ... this.
6770         (_initialize_step_skip): Adjust.
6771         * source.c (line_info): Rename to ...
6772         (info_line_command): ... this.
6773         (source_info): Rename to ...
6774         (info_source_command)
6775         * stack.c (frame_info): Rename to ...
6776         (info_frame_command): ... this.
6777         (locals_info): Rename to ...
6778         (info_locals_command): ... this.
6779         (args_info): Rename to ...
6780         (info_args_command): ... this.
6781         (_initialize_stack): Adjust.
6782         * symtab.c (sources_info): Rename to ...
6783         (info_sources_command): ... this.
6784         (variables_info): Rename to ...
6785         (info_variables_command): ... this.
6786         (functions_info): Rename to ...
6787         (info_functions_command): ... this.
6788         (types_info): Rename to ...
6789         (info_types_command): ... this.
6790         (_initialize_symtab): Adjust.
6791         * target.c (target_info): Rename to ...
6792         (info_target_command): ... this.
6793         (initialize_targets): Adjust.
6794         * tracepoint.c (tvariables_info): Rename to ...
6795         (info_tvariables_command): ... this.
6796         (scope_info): Rename to ...
6797         (info_scope_command): ... this.
6798         (trace_dump_actions): Adjust.
6799         (_initialize_tracepoint): Adjust.
6800
6801 2017-08-22  Tom Tromey  <tom@tromey.com>
6802
6803         * breakpoint.h (install_breakpoint): Update.
6804         * breakpoint.c (add_solib_catchpoint): Update.
6805         (install_breakpoint): Change argument to a std::unique_ptr.
6806         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6807         (create_breakpoint_sal, create_breakpoint): Update.
6808         (watch_command_1, catch_exec_command_1)
6809         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6810         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6811         Return the breakpoint.
6812         (set_raw_breakpoint_without_location, set_raw_breakpoint)
6813         (new_single_step_breakpoint): Update.
6814         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
6815         std::unique_ptr.
6816         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6817         std::unique_ptr.
6818         * break-catch-sig.c (create_signal_catchpoint): Use
6819         std::unique_ptr.
6820         * ada-lang.c (create_ada_exception_catchpoint): Use
6821         std::unique_ptr.
6822
6823 2017-08-22  Tom Tromey  <tom@tromey.com>
6824
6825         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
6826
6827 2017-08-22  Tom Tromey  <tom@tromey.com>
6828
6829         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
6830         (lookup_partial_symbol): Update.
6831
6832 2017-08-22  Tom Tromey  <tom@tromey.com>
6833
6834         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
6835         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
6836         (find_and_open_source, symtab_to_fullname): Update.
6837         * psymtab.c (psymtab_to_fullname): Update.
6838
6839 2017-08-22  Tom Tromey  <tom@tromey.com>
6840
6841         * exec.c (exec_file_attach): Update.
6842         * linux-thread-db.c (try_thread_db_load): Update.
6843         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
6844         * utils.c (gdb_realpath): Change return type.
6845         (gdb_realpath_keepfile): Update.
6846         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
6847         (_initialize_utils): Register the new self test.
6848         * source.c (openp): Update.
6849         (find_and_open_source): Update.
6850         * nto-tdep.c (nto_find_and_open_solib): Update.
6851         * main.c (set_gdb_data_directory): Update.
6852         (captured_main_1): Update.
6853         * dwarf2read.c (dwarf2_get_dwz_file): Update
6854         (dw2_map_symbol_filenames): Update.
6855         * auto-load.c (auto_load_safe_path_vec_update): Update.
6856         (filename_is_in_auto_load_safe_path_vec): Change type of
6857         "filename_realp".
6858         (auto_load_objfile_script): Update.
6859         (file_is_auto_load_safe): Update.  Use std::string.
6860         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
6861
6862 2017-08-22  Tom Tromey  <tom@tromey.com>
6863
6864         * utils.c (gdb_realpath_keepfile): Return a
6865         gdb::unique_xmalloc_ptr.
6866         * exec.c (exec_file_attach): Update.
6867         * utils.h (gdb_realpath_keepfile): Return a
6868         gdb::unique_xmalloc_ptr.
6869
6870 2017-08-22  Tom Tromey  <tom@tromey.com>
6871
6872         * compile/compile.c (compile_file_command): Use
6873         gdb::unique_xmalloc_ptr, std::string.
6874         * utils.c (gdb_abspath): Change return type.
6875         * source.c (openp): Update.
6876         * objfiles.c (allocate_objfile): Update.
6877         * main.c (set_gdb_data_directory): Update.
6878         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
6879
6880 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
6881
6882         * cli-cmds.c (list_commands): List actual code around more than
6883         one location.
6884
6885 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
6886
6887         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
6888
6889 2017-08-21  Pedro Alves  <palves@redhat.com>
6890
6891         PR gdb/19487
6892         * c-exp.y (variable production): Handle function aliases.
6893         * minsyms.c (msymbol_is_text): New function.
6894         * minsyms.h (msymbol_is_text): Declare.
6895         * symtab.c (find_function_alias_target): New function.
6896         * symtab.h (find_function_alias_target): Declare.
6897
6898 2017-08-21  Pedro Alves  <palves@redhat.com>
6899
6900         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
6901         typedefs.
6902         * typeprint.c (whatis_exp): If handling "whatis", and expression
6903         is OP_TYPE, strip one typedef level.  Otherwise don't strip
6904         typedefs here.
6905         * valops.c (value_cast): Save "to" type before resolving
6906         stubs/typedefs.  Use that type as resulting value's type.
6907
6908 2017-08-18  Tom Tromey  <tom@tromey.com>
6909             Pedro Alves  <palves@redhat.com>
6910
6911         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
6912         * sol-thread.c (sol_thread_resume, sol_thread_wait)
6913         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
6914         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
6915         * proc-service.c (ps_xfer_memory): Use scoped_restore.
6916         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
6917         (linux_get_siginfo_data): Add "thread" argument.  Use
6918         scoped_restore.
6919         * linux-nat.c (linux_child_follow_fork)
6920         (check_stopped_by_watchpoint): Use scoped_restore.
6921         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
6922         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
6923         (restore_inferior_ptid, save_inferior_ptid): Remove.
6924         * btrace.c (btrace_fetch): Use scoped_restore.
6925         * bsd-uthread.c (bsd_uthread_fetch_registers)
6926         (bsd_uthread_store_registers): Use scoped_restore.
6927         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
6928         scoped_restore.
6929         * aix-thread.c (aix_thread_resume, aix_thread_wait)
6930         (aix_thread_xfer_partial): Use scoped_restore.
6931         * inferior.h (save_inferior_ptid): Remove.
6932
6933 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6934
6935         PR tdep/21818
6936         * arm-tdep.c (gdb_print_insn_arm): Mark
6937         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
6938
6939 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6940
6941         * NEWS: Mention GDBserver's new option "--selftest".
6942         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
6943         * selftest.c: Move it to common/selftest.c.
6944         * selftest.h: Move it to common/selftest.h.
6945         * selftest-arch.c (reset): New function.
6946         (tests_with_arch): Call reset.
6947
6948 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6949
6950         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
6951         instead of exception_fprintf and printf_filtered.
6952
6953 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6954
6955         * selftest.c (register_self_test): Rename it to
6956         selftests::register_test.
6957         (run_self_tests): selftest::run_tests.
6958         * selftest.h: Update declarations.
6959         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
6960         selftests::register_test_foreach_arch.
6961         * selftest-arch.h: Update declaration.
6962         * aarch64-tdep.c: Update.
6963         * arm-tdep.c: Likewise.
6964         * disasm-selftests.c: Likewise.
6965         * dwarf2loc.c: Likewise.
6966         * dwarf2-frame.c: Likewise.
6967         * findvar.c: Likewise.
6968         * gdbarch-selftests.c: Likewise.
6969         * maint.c (maintenance_selftest): Likewise.
6970         * regcache.c: Likewise.
6971         * rust-exp.y: Likewise.
6972         * selftest-arch.c: Likewise.
6973         * unittests/environ-selftests.c: Likewise.
6974         * unittests/function-view-selftests.c: Likewise.
6975         * unittests/offset-type-selftests.c: Likewise.
6976         * unittests/optional-selftests.c: Likewise.
6977         * unittests/scoped_restore-selftests.c: Likewise.
6978         * utils-selftests.c: Likewise.
6979
6980 2017-08-17  Pedro Alves  <palves@redhat.com>
6981
6982         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
6983         local.
6984
6985 2017-08-17  Pedro Alves  <palves@redhat.com>
6986
6987         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
6988         field.
6989         (reset_die_in_process): Delete, replaced by ...
6990         (process_die_scope): ... this new class.  Make it responsible for
6991         freeing cu->line_header too.
6992         (process_die): Use process_die_scope.
6993         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
6994         cu->line_header_die_owner.  Don't release the line header if it's
6995         owned by the CU.
6996         (setup_type_unit_groups): Make the CU/DIE own the line header.
6997         Don't release the line header here.
6998
6999 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
7000
7001         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7002
7003 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7004
7005         * NEWS: Mention new shortcuts for nexti and stepi in TUI
7006         Single-Key mode
7007
7008 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7009
7010         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7011         mode command list.
7012
7013 2017-08-15  Stafford Horne  <shorne@gmail.com>
7014
7015         * MAINTAINERS (Write After Approval): Add Stafford Horne.
7016
7017 2017-08-15  Stafford Horne  <shorne@gmail.com>
7018
7019         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7020
7021 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
7022
7023         PR gdb/21954
7024         * infcmd.c (unset_environment_command): Use the 'clear' method on
7025         the environment instead of resetting it.
7026
7027 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
7028
7029         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7030         platforms.
7031
7032 2017-08-14  Tom Tromey  <tom@tromey.com>
7033
7034         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7035         (print_binary_chars): Likewise.
7036         (BITS_IN_BYTES): Remove.
7037
7038 2017-08-14  Tom Tromey  <tom@tromey.com>
7039
7040         PR gdb/21675
7041         * valprint.c (LOW_ZERO): Change value to 034.
7042         (print_octal_chars): Add static_asserts for octal constants.
7043         * printcmd.c (print_scalar_formatted): Add 'd' case.
7044
7045 2017-08-11  Tom Tromey  <tom@tromey.com>
7046
7047         * symfile.c (add_symbol_file_command): Use std::vector.
7048
7049 2017-08-14  Tom Tromey  <tom@tromey.com>
7050
7051         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7052         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7053         std::move.
7054         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7055
7056 2017-08-11  Pedro Alves  <palves@redhat.com>
7057
7058         * infrun.c (process_event_stop_test): Adjust
7059         function_name_is_marked_for_skip call.
7060         * skip.c: Include <list>.
7061         (skiplist_entry): Make it a class with private fields, and
7062         getters/setters.
7063         (skiplist_entry_chain): Delete.
7064         (skiplist_entries): New.
7065         (skiplist_entry_count): Delete.
7066         (highest_skiplist_entry_num): New.
7067         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7068         (add_skiplist_entry): Delete.
7069         (skiplist_entry::skiplist_entry): New.
7070         (skiplist_entry::add_entry): New.
7071         (skip_file_command, skip_function): Adjust.
7072         (compile_skip_regexp): Delete.
7073         (skip_command): Don't compile regexp here.  Adjust to use
7074         skiplist_entry::add_entry.
7075         (skip_info): Adjust to use range-for and getters.
7076         (skip_enable_command, skip_disable_command): Adjust to use
7077         range-for and setters.
7078         (skip_delete_command): Adjust to use std::list.
7079         (add_skiplist_entry): Delete.
7080         (skip_file_p): Delete, refactored as ...
7081         (skiplist_entry::do_skip_file_p): ... this new method.
7082         (skip_gfile_p): Delete, refactored as ...
7083         (skiplist_entry::do_gskip_file_p): ... this new method.
7084         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7085         (skiplist_entry::skip_function_p): ... this new method.
7086         (function_name_is_marked_for_skip): Now returns bool, and takes
7087         the function sal by const reference.  Adjust to use range-for and
7088         skiplist_entry methods.
7089         (_initialize_step_skip): Remove references to
7090         skiplist_entry_chain, skiplist_entry_count.
7091         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7092         takes the function sal by const reference.
7093
7094 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7095
7096         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7097         (dwarf2_frame_cache): Remove reset_cache_cleanup.
7098         (dwarf2_frame_cache):
7099         * frame-unwind.c (frame_unwind_try_unwinder): Catch
7100         RETURN_MASK_ALL and set *this_case to NULL.
7101         * frame-unwind.h: Update comments.
7102
7103 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7104
7105         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7106         (dwarf2_frame_state_copy_regs): Remove.
7107         (dwarf2_frame_state_free_regs): Remove.
7108         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7109         (dwarf2_restore_rule): Call method .alloc_regs instead of
7110         dwarf2_frame_state_alloc_regs.
7111         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
7112         constructor.  Call std::move.
7113         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7114         (dwarf2_frame_cache): Likewise.
7115
7116         [GDB_SELF_TEST]: Include selftest.h and
7117         selftest-arch.h.
7118         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7119         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7120         execute_cfa_program_test.
7121
7122         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7123         copy ctor, assignment operator, move assignment.
7124         <alloc_regs>: New method.
7125         <swap>: New method.
7126         (struct dwarf2_frame_state): Delete dtor.
7127         (dwarf2_frame_state_alloc_regs): Remove declaration.
7128         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7129         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7130
7131 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7132
7133         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7134         (dwarf2_frame_state::dwarf2_frame_state): New.
7135         (dwarf2_frame_state::~dwarf2_frame_state): New.
7136         (dwarf2_fetch_cfa_info): Update.
7137         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
7138         rather than a pointer.  Update code.
7139         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7140         dtor.
7141         <data_align, code_align, retaddr_column>: Change them to const.
7142         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7143         to bool.
7144
7145 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7146
7147         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7148         <loc.exp>: New field.
7149         * dwarf2-frame.c (execute_cfa_program): Update.
7150         (dwarf2_frame_prev_register): Update.
7151
7152 2017-08-10  Pedro Alves  <palves@redhat.com>
7153
7154         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7155
7156 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7157
7158         * fbsd-nat.c (struct fbsd_fork_info): Remove.
7159         (fbsd_pending_children): Use std::list.
7160         (fbsd_remember_child): Likewise.
7161         (fbsd_is_child_pending): Likewise.
7162         (fbsd_pending_vfork_done): Use std::forward_list.
7163         (fbsd_add_vfork_done): Likewise.
7164         (fbsd_is_vfork_done_pending): Likewise.
7165         (fbsd_next_vfork_done): Likewise.
7166
7167 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7168
7169         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7170         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7171         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7172         for `mapfilename'.
7173         (fbsd_xfer_partial): Use gdb::byte_vector.
7174         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7175
7176 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7177
7178         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7179         "filestuff.h".
7180         (fbsd_find_memory_regions): Fix `mapfile' initialization.
7181
7182 2017-08-09  Tom Tromey  <tom@tromey.com>
7183
7184         * skip.c (skiplist_entry): New constructor.
7185         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7186         (skiplist_entry::file_is_glob): Now bool.
7187         (skiplist_entry::file, skiplist_entry::function): Now
7188         std::string.
7189         (make_skip_entry): Return a unique_ptr.  Use new.
7190         (free_skiplist_entry, free_skiplist_entry_cleanup)
7191         (make_free_skiplist_entry_cleanup): Remove.
7192         (skip_command, skip_disable_command, add_skiplist_entry)
7193         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7194         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7195         (function_name_is_marked_for_skip): Update.
7196         (skip_delete_command): Update.  Use delete.
7197
7198 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
7199
7200         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7201         (aarch64_linux_core_read_description): New function.
7202         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7203
7204 2017-08-09  Pedro Alves  <palves@redhat.com>
7205
7206         * cp-name-parser.y (cp_comp_to_string): Return a
7207         gdb::unique_xmalloc_ptr<char>.
7208         * cp-support.c (replace_typedefs_qualified_name)
7209         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7210         (cp_canonicalize_string_full): Use op= instead of explicit
7211         convertion.
7212         (cp_class_name_from_physname, method_name_from_physname)
7213         (cp_func_name, cp_remove_params): Adjust to use
7214         gdb::unique_xmalloc_ptr<char>.
7215         * cp-support.h (cp_comp_to_string): Return a
7216         gdb::unique_xmalloc_ptr<char>.
7217         * python/py-type.c (typy_lookup_type): Adjust to use
7218         gdb::unique_xmalloc_ptr<char>.
7219
7220 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
7221
7222         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7223
7224 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
7225             Yao Qi  <yao.qi@linaro.org>
7226
7227         * cp-support.c (cp_canonicalize_string_full): Use
7228         gdb::unique_xmalloc_ptr<char>.
7229         (cp_canonicalize_string): Likewise.
7230
7231 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7232
7233         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7234         * regformats/i386/amd64-avx-avx512.dat: Remove.
7235         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7236         * regformats/i386/amd64-avx-mpx.dat:Remove.
7237         * regformats/i386/amd64-avx.dat: Remove.
7238         * regformats/i386/amd64-mpx.dat: Remove.
7239         * regformats/i386/i386-avx-avx512.dat: Remove.
7240         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7241         * regformats/i386/i386-avx-mpx.dat: Remove.
7242         * regformats/i386/i386-mmx.dat: Remove.
7243         * regformats/i386/i386-mpx.dat: Remove.
7244
7245 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7246
7247         * amd64-tdep.h (tdesc_x32): Remove the declaration.
7248         * amd64-tdep.c: Don't include features/i386/x32*.c.
7249         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7250         functions.
7251         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7252         and i386/x32-avx-avx512.
7253         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7254         and i386/x32.xml.
7255         * features/i386/x32-avx-avx512.c: Removed.
7256         * features/i386/x32-avx-avx512.xml: Removed.
7257         * features/i386/x32-avx.c: Removed.
7258         * features/i386/x32-avx.xml: Removed.
7259         * features/i386/x32.c: Removed.
7260         * features/i386/x32.xml: Removed.
7261         * regformats/i386/x32-avx-avx512.dat: Removed.
7262         * regformats/i386/x32-avx.dat: Removed.
7263         * regformats/i386/x32.dat: Removed.
7264
7265 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7266
7267         PR breakpoints/21886
7268         * mem-break.c (default_memory_insert_breakpoint): Use
7269         `->placed_address' rather than `->reqstd_address' for the
7270         breakpoint location.
7271
7272 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7273
7274         * arch-utils.c (default_print_insn): Remove arch/mach/endian
7275         assertions.
7276
7277 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7278
7279         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7280         a union of `tdep_info', `tdesc_data' and `id'.
7281         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7282         rather than `info.tdep_info'.
7283         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7284         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7285         * i386-tdep.c (i386_gdbarch_init): Likewise.
7286         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7287         * mips-tdep.c (mips_gdbarch_init): Likewise.
7288         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7289         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7290         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7291         `info.tdep_info'.
7292         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7293         `info.tdep_info'.
7294         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7295         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7296         `info.tdep_info'.
7297         * spu-tdep.c (spu_gdbarch_init): Likewise.
7298         * gdbarch.h: Regenerate.
7299
7300 2017-08-07  Leszek Swirski  <leszeks@google.com>
7301
7302         PR symtab/20899
7303         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7304
7305 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
7306
7307         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7308         (gdbsim_open): Rename gdb_argv args object to argv.
7309
7310 2017-08-05  Tom Tromey  <tom@tromey.com>
7311
7312         * compile/compile-object-load.c (compile_object_load): Use
7313         gdb::unique_xmalloc_ptr.
7314         * cli/cli-dump.c (scan_filename): Rename from
7315         scan_filename_with_cleanup.  Change return type.
7316         (scan_expression): Rename from scan_expression_with_cleanup.
7317         Change return type.
7318         (dump_memory_to_file, dump_value_to_file, restore_command):
7319         Use gdb::unique_xmalloc_ptr.  Update.
7320         * cli/cli-cmds.c (find_and_open_script): Use
7321         gdb::unique_xmalloc_ptr.
7322         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7323         * symmisc.c (maintenance_print_symbols)
7324         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7325         * symfile.c (symfile_bfd_open, generic_load)
7326         (add_symbol_file_command, remove_symbol_file_command): Use
7327         gdb::unique_xmalloc_ptr.
7328         * source.c (openp): Use gdb::unique_xmalloc_ptr.
7329         * psymtab.c (maintenance_print_psymbols): Use
7330         gdb::unique_xmalloc_ptr.
7331         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7332         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7333         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7334         (reload_shared_libraries_1): Likewise.
7335
7336 2017-08-05  Tom Tromey  <tom@tromey.com>
7337
7338         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7339         (rust_op_vector, rust_set_vector): New typedefs.
7340         (current_parser): New global.
7341         (work_obstack): Change to pointer type.  Update all users.
7342         (rust_ast, pstate): Remove globals.
7343         (struct rust_parser): New.
7344         (%union) <params, field_inits>: Change type.
7345         (start, tuple_expr, unit_expr, struct_expr_list, literal)
7346         (field_expr, expr_list, maybe_expr_list, type_list): Update.
7347         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7348         (convert_params_to_types, convert_params_to_expression): Change
7349         type of "params".
7350         (ast_string): Change type of "fields".
7351         (rust_parse): Make a rust_parser.  Remove cleanups.
7352         (rust_lex_tests): Make and install an auto_obstack.
7353
7354 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7355
7356         * configure.srv (ipa_x32_linux_regobj): New.
7357         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7358         instead of X86_TDESC_AVX512.
7359         (initialize_low_tracepoint): Call
7360         init_registers_x32_avx_avx512_linux.
7361
7362 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7363
7364         * utils.h (gdb_argv): Add namespace std for nullptr_t.
7365
7366 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7367
7368         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7369
7370 2017-08-03  Tom Tromey  <tom@tromey.com>
7371
7372         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7373         Remove.
7374         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7375
7376 2017-08-03  Tom Tromey  <tom@tromey.com>
7377
7378         * python/py-param.c (compute_enum_values): Use gdb_argv.
7379
7380 2017-08-03  Tom Tromey  <tom@tromey.com>
7381
7382         * utils.h (struct gdb_argv_deleter): New.
7383         (gdb_argv): New class.
7384         * utils.c (gdb_argv::reset): New method.
7385         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7386         * tracefile.c (tsave_command): Use gdb_argv.
7387         * top.c (new_ui_command): Use gdb_argv.
7388         * symmisc.c (maintenance_print_symbols)
7389         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7390         * symfile.c (symbol_file_command, generic_load)
7391         (remove_symbol_file_command): Use gdb_argv.
7392         * stack.c (backtrace_command): Use gdb_argv.
7393         * source.c (add_path, show_substitute_path_command)
7394         (unset_substitute_path_command, set_substitute_path_command):
7395         Use gdb_argv.
7396         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
7397         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7398         * remote.c (extended_remote_run, remote_put_command)
7399         (remote_get_command, remote_delete_command): Use gdb_argv.
7400         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7401         (gdbsim_open): Use gdb_argv.
7402         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7403         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7404         * procfs.c (procfs_info_proc): Use gdb_argv.
7405         * interps.c (interpreter_exec_cmd): Use gdb_argv.
7406         * infrun.c (handle_command): Use gdb_argv.
7407         * inferior.c (add_inferior_command, clone_inferior_command):
7408         Use gdb_argv.
7409         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7410         * exec.c (exec_file_command): Use gdb_argv.
7411         * cli/cli-cmds.c (alias_command): Use gdb_argv.
7412         * compile/compile.c (build_argc_argv): Use gdb_argv.
7413
7414 2017-08-03  Tom Tromey  <tom@tromey.com>
7415
7416         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7417
7418 2017-08-03  Tom Tromey  <tom@tromey.com>
7419
7420         * python/python.c (compute_python_string): Return std::string.
7421         (gdbpy_eval_from_control_command): Update.
7422         (do_start_initialization): Use std::string.
7423         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7424         xstrprintf.
7425         * python/py-breakpoint.c (local_setattro): Use string_printf, not
7426         xstrprintf.
7427
7428 2017-08-03  Tom Tromey  <tom@tromey.com>
7429
7430         * top.h (do_restore_instream_cleanup): Remove.
7431         * top.c (do_restore_instream_cleanup): Remove.
7432         (read_command_file): Use scoped_restore.
7433         * cli/cli-script.c (execute_user_command): Use scoped_restore.
7434
7435 2017-08-03  Tom Tromey  <tom@tromey.com>
7436
7437         * cli/cli-script.c (execute_user_command)
7438         (execute_control_command): Use scoped_restore.
7439
7440 2017-08-03  Tom Tromey  <tom@tromey.com>
7441
7442         * cli/cli-script.c (do_restore_user_call_depth): Remove.
7443         (execute_user_command): Remove user_call_depth; use
7444         user_args_stack's size instead.
7445
7446 2017-08-03  Tom Tromey  <tom@tromey.com>
7447
7448         * top.h (in_user_command): Remove.
7449         * top.c (in_user_command): Remove.
7450         * cli/cli-script.c (do_restore_user_call_depth)
7451         (execute_user_command): Update.
7452
7453 2017-08-03  Tom Tromey  <tom@tromey.com>
7454
7455         * valops.c (search_struct_method): Use gdb::byte_vector.
7456         * valarith.c (value_concat): Use std::vector.
7457         * target.c (memory_xfer_partial): Use gdb::byte_vector.
7458         (simple_search_memory): Likewise.
7459         * printcmd.c (find_string_backward): Use gdb::byte_vector.
7460         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7461         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7462         * elfread.c (elf_rel_plt_read): Use std::string.
7463         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7464         * cli/cli-dump.c (restore_section_callback): Use
7465         gdb::byte_vector.
7466
7467 2017-08-03  Tom Tromey  <tom@tromey.com>
7468
7469         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7470
7471 2017-08-03  Tom Tromey  <tom@tromey.com>
7472
7473         * tui/tui-regs.c (tui_restore_gdbout): Remove.
7474         (tui_register_format): Use scoped_restore.
7475
7476 2017-08-03  Tom Tromey  <tom@tromey.com>
7477
7478         * reverse.c (exec_direction_default): Remove.
7479         (exec_reverse_once): Use scoped_restore.
7480         * remote.c (restore_remote_timeout): Remove.
7481         (remote_flash_erase, remote_flash_write, remote_flash_done)
7482         (readchar, remote_serial_write): Use scoped_restore.
7483         * cli/cli-script.c (struct source_cleanup_lines_args)
7484         (source_cleanup_lines): Remove.
7485         (script_from_file): Use scoped_restore.
7486         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7487         (source_command): Use scoped_restore.
7488
7489 2017-08-03  Tom Tromey  <tom@tromey.com>
7490
7491         * utils.h (make_cleanup_free_so): Remove.
7492         * utils.c (do_free_so, make_cleanup_free_so): Remove.
7493         * solist.h (struct so_deleter): New.
7494         (so_list_up): New typedef.
7495         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7496
7497 2017-08-03  Tom Tromey  <tom@tromey.com>
7498
7499         * utils.h (make_cleanup_restore_current_language): Remove.
7500         * utils.c (do_restore_current_language)
7501         (make_cleanup_restore_current_language): Remove.
7502         * parse.c (parse_exp_in_context_1)
7503         (parse_expression_with_language): Use
7504         scoped_restore_current_language.
7505         * mi/mi-main.c (mi_cmd_execute): Use
7506         scoped_restore_current_language.
7507         * language.h (scoped_restore_current_language): New class.
7508
7509 2017-08-03  Tom Tromey  <tom@tromey.com>
7510
7511         * compile/compile.c (cleanup_unlink_file): Remove.
7512         (compile_to_object): Use gdb::unlinker.
7513         (eval_compile_command): Likewise.
7514
7515 2017-08-03  Tom Tromey  <tom@tromey.com>
7516
7517         * utils.h (make_cleanup_fclose): Remove.
7518         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7519
7520 2017-08-03  Tom Tromey  <tom@tromey.com>
7521
7522         * top.c (open_terminal_stream): Return gdb_file_up.
7523         (new_ui_command): Update.
7524
7525 2017-08-03  Tom Tromey  <tom@tromey.com>
7526
7527         * source.c (print_source_lines_base, forward_search_command)
7528         (reverse_search_command): Use gdb_file_up.
7529
7530 2017-08-03  Tom Tromey  <tom@tromey.com>
7531
7532         * fbsd-nat.c (fbsd_find_memory_regions): Update.
7533
7534 2017-08-03  Tom Tromey  <tom@tromey.com>
7535
7536         * cli/cli-cmds.c (find_and_open_script): Change return type.
7537         Remove "streamp" and "full_path" parameters.
7538         (source_script_with_search): Update.
7539         * auto-load.c (source_script_file): Update.
7540         * cli/cli-cmds.h (find_and_open_script): Change type.
7541         (open_script): New struct.
7542
7543 2017-08-03  Tom Tromey  <tom@tromey.com>
7544
7545         * xml-support.c (xml_fetch_content_from_file): Update.
7546         * ui-file.c (stdio_file::open): Update.
7547         * tracefile-tfile.c (tfile_start): Update.
7548         * remote.c (remote_file_put, remote_file_get): Update.
7549         * nat/linux-procfs.c (linux_proc_get_int)
7550         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7551         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7552         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7553         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7554         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7555         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7556         * linux-nat.c (linux_proc_pending_signals): Update.
7557         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7558         (file_closer): Remove.
7559         * compile/compile.c (compile_to_object): Update.
7560         * common/filestuff.h (struct gdb_file_deleter): New.
7561         (gdb_file_up): New typedef.
7562         (gdb_fopen_cloexec): Change return type.
7563         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7564         * cli/cli-dump.c (fopen_with_cleanup): Remove.
7565         (dump_binary_file, restore_binary_file): Update.
7566         * auto-load.c (auto_load_objfile_script_1): Update.
7567
7568 2017-08-03  Tom Tromey  <tom@tromey.com>
7569
7570         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7571         (info_static_tracepoint_markers_command): Likewise.
7572         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7573         * skip.c (skip_info): Use ui_out_emit_table.
7574         * progspace.c (print_program_space): Use ui_out_emit_table.
7575         * osdata.c (info_osdata): Use ui_out_emit_table.
7576         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7577         ui_out_emit_table.
7578         * linux-thread-db.c (info_auto_load_libthread_db): Use
7579         ui_out_emit_table.
7580         * inferior.c (print_inferior): Use ui_out_emit_table.
7581         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7582         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7583         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7584         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7585         * ui-out.h (class ui_out_emit_table): New.
7586
7587 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
7588
7589         * mips-tdep.c (mips_fpu_type_str): New function.
7590         (mips_dump_tdep): Call it.
7591
7592 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
7593
7594         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7595         `->mips_fpu_type'.
7596
7597 2017-07-31  Xavier Roirand  <roirand@adacore.com>
7598
7599         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7600
7601 2017-07-27  Xavier Roirand  <roirand@adacore.com>
7602
7603         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7604
7605 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7606
7607         * cli/cli-cmds.c (maintenancechecklist): New variable.
7608         * gdbcmd.h (maintenancechecklist): Declare it.
7609         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7610         Call i386_linux_read_description with different masks.
7611         * maint.c (maintenance_check_command): New function.
7612         (_initialize_maint_cmds): Call add_prefix_cmd.
7613         * target-descriptions.c (tdesc_reg): override operator != and ==.
7614         (tdesc_type): Likewise.
7615         (tdesc_feature): Likewise.
7616         (target_desc): Likewise.
7617         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7618         (maintenance_check_xml_descriptions): New function.
7619         (_initialize_target_descriptions) Add command "xml-descriptions".
7620         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7621
7622 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7623
7624         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7625         Include features/i386/32bit-*.c.
7626         (i386_linux_read_description): Generate target description if it
7627         doesn't exist.
7628         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7629         functions.
7630         * features/i386/32bit-linux.c: Re-generated.
7631         * features/i386/32bit-sse.c: Likewise.
7632         * target-descriptions.c (print_c_feature::visit): Print code to
7633         set register number if needed.
7634         (print_c_feature) <m_next_regnum>: New field.
7635
7636 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7637
7638         * features/Makefile (CFILES): Rename with TDESC_CFILES.
7639         (FEATURE_XMLFILES): New.
7640         (FEATURE_CFILES): New.
7641         New rules.
7642         (clean-cfiles): Remove generated c files.
7643         * features/i386/32bit-avx.c: Generated.
7644         * features/i386/32bit-avx512.c: Generated.
7645         * features/i386/32bit-core.c: Generated.
7646         * features/i386/32bit-linux.c: Generated.
7647         * features/i386/32bit-mpx.c: Generated.
7648         * features/i386/32bit-pkeys.c: Generated.
7649         * features/i386/32bit-sse.c: Generated.
7650         * target-descriptions.c: Include algorithm.
7651         (tdesc_element_visitor): Add method visit_end.
7652         (print_c_tdesc): Implement visit_end.
7653         (print_c_tdesc:: m_filename_after_features): Move it to
7654         protected.
7655         (print_c_feature): New class.
7656         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7657         name starts with "i386/32bit-".
7658
7659 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7660
7661         * target-descriptions.c (tdesc_element_visitor): New class.
7662         (tdesc_element): New class.
7663         (tdesc_reg): Inherit from tdesc_element.
7664         (tdesc_reg::accept): New function.
7665         (tdesc_type): Inherit from tdesc_element.
7666         (tdesc_type::accept): New function.
7667         (tdesc_feature): Inherit from tdesc_element.
7668         (tdesc_feature::accept): New function.
7669         (target_desc): Inherit from tdesc_element.
7670         (target_desc::target_desc): New.
7671         (target_desc::~target_desc): New.
7672         (target_desc::accept): New.
7673         (allocate_target_description): Use new.
7674         (free_target_description): Use delete.
7675         (print_c_tdesc): New class.
7676         (maint_print_c_tdesc_cmd): Adjust.
7677
7678         * features/aarch64.c: Re-generated.
7679         * features/arc-arcompact.c: Re-generated.
7680         * features/arc-v2.c: Re-generated.
7681         * features/arm/arm-with-iwmmxt.c: Re-generated.
7682         * features/arm/arm-with-m.c: Re-generated.
7683         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
7684         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
7685         * features/arm/arm-with-neon.c: Re-generated.
7686         * features/arm/arm-with-vfpv2.c: Re-generated.
7687         * features/arm/arm-with-vfpv3.c: Re-generated.
7688         * features/i386/amd64-avx-avx512.c: Re-generated.
7689         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7690         * features/i386/amd64-avx.c: Re-generated.
7691         * features/i386/amd64-avx-linux.c: Re-generated.
7692         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
7693         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7694         * features/i386/amd64-avx-mpx.c: Re-generated.
7695         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
7696         * features/i386/amd64.c: Re-generated.
7697         * features/i386/amd64-linux.c: Re-generated.
7698         * features/i386/amd64-mpx.c: Re-generated.
7699         * features/i386/amd64-mpx-linux.c: Re-generated.
7700         * features/i386/i386-avx-avx512.c: Re-generated.
7701         * features/i386/i386-avx-avx512-linux.c: Re-generated.
7702         * features/i386/i386-avx.c: Re-generated.
7703         * features/i386/i386-avx-linux.c: Re-generated.
7704         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
7705         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
7706         * features/i386/i386-avx-mpx.c: Re-generated.
7707         * features/i386/i386-avx-mpx-linux.c: Re-generated.
7708         * features/i386/i386.c: Re-generated.
7709         * features/i386/i386-linux.c: Re-generated.
7710         * features/i386/i386-mmx.c: Re-generated.
7711         * features/i386/i386-mmx-linux.c: Re-generated.
7712         * features/i386/i386-mpx.c: Re-generated.
7713         * features/i386/i386-mpx-linux.c: Re-generated.
7714         * features/i386/x32-avx-avx512.c: Re-generated.
7715         * features/i386/x32-avx-avx512-linux.c: Re-generated.
7716         * features/i386/x32-avx.c: Re-generated.
7717         * features/i386/x32-avx-linux.c: Re-generated.
7718         * features/i386/x32.c: Re-generated.
7719         * features/i386/x32-linux.c: Re-generated.
7720         * features/microblaze.c: Re-generated.
7721         * features/microblaze-with-stack-protect.c: Re-generated.
7722         * features/mips64-dsp-linux.c: Re-generated.
7723         * features/mips64-linux.c: Re-generated.
7724         * features/mips-dsp-linux.c: Re-generated.
7725         * features/mips-linux.c: Re-generated.
7726         * features/nds32.c: Re-generated.
7727         * features/nios2.c: Re-generated.
7728         * features/nios2-linux.c: Re-generated.
7729         * features/rs6000/powerpc-32.c: Re-generated.
7730         * features/rs6000/powerpc-32l.c: Re-generated.
7731         * features/rs6000/powerpc-403.c: Re-generated.
7732         * features/rs6000/powerpc-403gc.c : Re-generated.
7733         * features/rs6000/powerpc-405.c: Re-generated.
7734         * features/rs6000/powerpc-505.c: Re-generated.
7735         * features/rs6000/powerpc-601.c: Re-generated.
7736         * features/rs6000/powerpc-602.c: Re-generated.
7737         * features/rs6000/powerpc-603.c: Re-generated.
7738         * features/rs6000/powerpc-604.c: Re-generated.
7739         * features/rs6000/powerpc-64.c: Re-generated.
7740         * features/rs6000/powerpc-64l.c: Re-generated.
7741         * features/rs6000/powerpc-7400.c: Re-generated.
7742         * features/rs6000/powerpc-750.c: Re-generated.
7743         * features/rs6000/powerpc-860.c: Re-generated.
7744         * features/rs6000/powerpc-altivec32.c: Re-generated.
7745         * features/rs6000/powerpc-altivec32l.c: Re-generated.
7746         * features/rs6000/powerpc-altivec64.c: Re-generated.
7747         * features/rs6000/powerpc-altivec64l.c: Re-generated.
7748         * features/rs6000/powerpc-cell32l.c: Re-generated.
7749         * features/rs6000/powerpc-cell64l.c: Re-generated.
7750         * features/rs6000/powerpc-e500.c: Re-generated.
7751         * features/rs6000/powerpc-e500l.c: Re-generated.
7752         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
7753         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
7754         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
7755         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
7756         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
7757         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
7758         * features/rs6000/powerpc-vsx32.c: Re-generated.
7759         * features/rs6000/powerpc-vsx32l.c: Re-generated.
7760         * features/rs6000/powerpc-vsx64.c: Re-generated.
7761         * features/rs6000/powerpc-vsx64l.c: Re-generated.
7762         * features/rs6000/rs6000.c: Re-generated.
7763         * features/s390-linux32.c: Re-generated.
7764         * features/s390-linux32v1.c: Re-generated.
7765         * features/s390-linux32v2.c: Re-generated.
7766         * features/s390-linux64.c: Re-generated.
7767         * features/s390-linux64v1.c: Re-generated.
7768         * features/s390-linux64v2.c: Re-generated.
7769         * features/s390-te-linux64.c: Re-generated.
7770         * features/s390-tevx-linux64.c: Re-generated.
7771         * features/s390-vx-linux64.c: Re-generated.
7772         * features/s390x-linux64.c: Re-generated.
7773         * features/s390x-linux64v1.c: Re-generated.
7774         * features/s390x-linux64v2.c: Re-generated.
7775         * features/s390x-te-linux64.c: Re-generated.
7776         * features/s390x-tevx-linux64.c: Re-generated.
7777         * features/s390x-vx-linux64.c: Re-generated.
7778         * features/sparc/sparc32-solaris.c: Re-generated.
7779         * features/sparc/sparc64-solaris.c: Re-generated.
7780         * features/tic6x-c62x.c: Re-generated.
7781         * features/tic6x-c62x-linux.c: Re-generated.
7782         * features/tic6x-c64x.c: Re-generated.
7783         * features/tic6x-c64x-linux.c: Re-generated.
7784         * features/tic6x-c64xp.c: Re-generated.
7785         * features/tic6x-c64xp-linux.c: Re-generated.
7786
7787 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7788
7789         * i386-linux-tdep.c (i386_linux_read_description): New function.
7790         (i386_linux_core_read_description): Call
7791         i386_linux_read_description.
7792         * i386-linux-tdep.h (i386_linux_read_description): Declare.
7793         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
7794         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
7795         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
7796         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
7797         * x86-linux-nat.c (x86_linux_read_description): Call
7798         i386_linux_read_description.
7799
7800 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7801
7802         * NEWS: Mention it.
7803         * features/Makefile (%.c: %.xml): Pass the xml file name to
7804         command "maint print c-tdesc".
7805         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7806         name from 'arg'.
7807
7808 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7809
7810         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
7811         in-class initialization.
7812         (tdesc_create_feature): Call new instead of XCNEW.
7813         (free_target_description): Ue delete.
7814
7815 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
7816
7817         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
7818
7819 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7820
7821         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
7822         constant.
7823         (amd64_x32_init_abi): Likewise.
7824         * amd64-tdep.h (amd64_init_abi): Update declaration.
7825         (amd64_x32_init_abi): Likewise.
7826
7827 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7828
7829         PR tdep/21717
7830         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
7831         condition for FPSCR.
7832         (arm_linux_store_inferior_registers): Likewise.
7833
7834 2017-07-22  Tom Tromey  <tom@tromey.com>
7835
7836         * break-catch-syscall.c (struct catch_syscall_inferior_data)
7837         <syscalls_counts>: Now a std::vector.
7838         (get_catch_syscall_inferior_data): Use "new".
7839         (catch_syscall_inferior_data_cleanup): Use "delete".
7840         (insert_catch_syscall, remove_catch_syscall)
7841         (clear_syscall_counts): Update.
7842
7843 2017-07-22  Tom Tromey  <tom@tromey.com>
7844
7845         * break-catch-syscall.c (syscall_catchpoint)
7846         <syscalls_to_be_caught>: Now a std::vector<int>
7847         (~syscall_catchpoint): Remove.
7848         (insert_catch_syscall, remove_catch_syscall)
7849         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
7850         (print_mention_catch_syscall, print_recreate_catch_syscall):
7851         Update.
7852         (create_syscall_event_catchpoint): Change type of "filter"
7853         parameter.
7854         (catch_syscall_split_args): Return a std::vector.
7855         (catch_syscall_command_1, catching_syscall_number_1): Update.
7856
7857 2017-07-22  Tom Tromey  <tom@tromey.com>
7858
7859         * break-catch-throw.c (struct exception_catchpoint)
7860         <exception_rx>: Now a std::string.
7861         (~exception_catchpoint): Remove.
7862         (print_one_detail_exception_catchpoint): Update.
7863         (handle_gnu_v3_exceptions): Change type of except_rx.
7864         (extract_exception_regexp): Return a std::string.
7865         (catch_exception_command_1): Update.
7866
7867 2017-07-22  Tom Tromey  <tom@tromey.com>
7868
7869         * break-catch-sig.c (gdb_signal_type): Remove typedef.
7870         (struct signal_catchpoint) <signals_to_be_caught>: Now a
7871         std::vector.
7872         <catch_all>: Now a bool.
7873         (~signal_catchpoint): Remove.
7874         (signal_catchpoint_insert_location)
7875         (signal_catchpoint_remove_location)
7876         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
7877         (signal_catchpoint_print_mention)
7878         (signal_catchpoint_print_recreate)
7879         (signal_catchpoint_explains_signal): Update.
7880         (create_signal_catchpoint): Change type of "filter" and
7881         "catch_all".
7882         (catch_signal_split_args): Return a std::vector.  Change type of
7883         "catch_all".
7884         (catch_signal_command): Update.
7885
7886 2017-07-20  Pedro Alves  <palves@redhat.com>
7887
7888         * ada-lang.c (ada_language_defn): Make extern.
7889         (_initialize_ada_language): Remove add_language call.
7890         * c-lang.c (c_language_defn, cplus_language_defn)
7891         (asm_language_defn, minimal_language_defn): Make extern.
7892         (_initialize_c_language): Delete.
7893         * completer.c (compare_cstrings): Delete, moved to utils.h.
7894         * d-lang.c (d_language_defn): Make extern.
7895         (_initialize_d_language): Remove add_language calls.
7896         * defs.h (enum language): Add comment.
7897         * f-lang.c (f_language_defn): Make extern.
7898         (_initialize_f_language): Remove add_language call.
7899         * go-lang.c (go_language_defn): Make extern.
7900         (_initialize_go_language): Remove add_language call.
7901         * language.c: Include <algorithm>.
7902         (languages): Redefine as const array.
7903         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
7904         (set_language_command): Handle "local".  Use for-range loop.
7905         (set_language): Remove loop.
7906         (language_enum): Rewrite.
7907         (language_def, language_str): Remove loops.
7908         (add_language): Delete.
7909         (add_set_language_command): New, based on add_languages.
7910         (skip_language_trampoline): Adjust.
7911         (local_language_defn): Delete.
7912         (language_gdbarch_post_init): Adjust.
7913         (_initialize_language): Remove add_language calls.  Call
7914         add_set_language_command.
7915         * language.h (add_language): Delete.
7916         (auto_language_defn)
7917         (unknown_language_defn, minimal_language_defn, ada_language_defn)
7918         (asm_language_defn, c_language_defn, cplus_language_defn)
7919         (d_language_defn, f_language_defn, go_language_defn)
7920         (m2_language_defn, objc_language_defn, opencl_language_defn)
7921         (pascal_language_defn, rust_language_defn): Declare.
7922         * m2-lang.c (m2_language_defn): Make extern.
7923         (_initialize_m2_language): Remove add_language call.
7924         * objc-lang.c (objc_language_defn): Make extern.
7925         (_initialize_objc_language): Remove add_language call.
7926         * opencl-lang.c (opencl_language_defn): Make extern.
7927         (_initialize_opencl_language): Remove add_language call.
7928         * p-lang.c (pascal_language_defn): Make extern.
7929         (_initialize_pascal_language): Delete.
7930         * rust-lang.c (rust_language_defn): Make extern.
7931         (_initialize_rust_language): Delete.
7932         * utils.h (compare_cstrings): New static inline function.
7933
7934 2017-07-20  Pedro Alves  <palves@redhat.com>
7935
7936         * ada-lang.c (ada_to_fixed_type_1): Adjust.
7937         (get_var_value): Constify parameters.
7938         (get_int_var_value): Change prototype.
7939         (to_fixed_range_type): Adjust.
7940         * ada-lang.h (get_int_var_value): Change prototype.
7941
7942 2017-07-20  Pedro Alves  <palves@redhat.com>
7943
7944         * dwarf2read.c (dw2_lookup_symbol): Use
7945         SYMBOL_MATCHES_SEARCH_NAME.
7946         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
7947
7948 2017-07-20  Pedro Alves  <palves@redhat.com>
7949
7950         * block.c (block_iter_name_step, block_iter_name_first)
7951         (block_iter_name_next): Delete.
7952         (block_lookup_symbol_primary): Adjust to use
7953         dict_iter_match_first/dict_iter_match_next.
7954         * block.h (block_iter_name_first, block_iter_name_next): Delete
7955         declarations.
7956         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
7957         dict_iter_match_first/dict_iter_match_next.
7958
7959 2017-07-20  Pedro Alves  <palves@redhat.com>
7960
7961         * cp-support.c (cp_find_first_component_aux): Add missing case for
7962         end of string.
7963
7964 2017-07-18  David Blaikie  <dblaikie@gmail.com>
7965
7966         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
7967         of dwo_cu's dwo_file.
7968
7969 2017-07-18  Yao Qi  <yao.qi@linaro.org>
7970
7971         * remote.c (store_registers_using_G): Remove one line comment.
7972
7973 2017-07-18  Yao Qi  <yao.qi@linaro.org>
7974
7975         * regcache.c (regcache_cpy): Simplify it.
7976         (regcache::cpy_no_passthrough): Remove it.
7977         * regcache.h (cpy_no_passthrough): Remove it.
7978         (regcache_dup, regcache_cpy): Update comments.
7979
7980 2017-07-18  Pedro Alves  <palves@redhat.com>
7981
7982         * remote-sim.c (sim_command_completer): Adjust to work with a
7983         completion_tracker instead of a VEC.
7984
7985 2017-07-17  Pedro Alves  <palves@redhat.com>
7986
7987         * completer.c (complete_source_filenames): New function.
7988         (complete_address_and_linespec_locations): New function.
7989         (location_completer): Use complete_address_and_linespec_locations.
7990         (completion_tracker::build_completion_result): Honor the tracker's
7991         request to suppress append.
7992         * completer.h (completion_tracker::suppress_append_ws)
7993         (completion_tracker::set_suppress_append_ws): New methods.
7994         (completion_tracker::m_suppress_append_ws): New field.
7995         (complete_source_filenames): New declaration.
7996         * linespec.c (linespec_complete_what): New.
7997         (struct ls_parser) <complete_what, completion_word,
7998         completion_quote_char, completion_quote_end, completion_tracker>:
7999         New fields.
8000         (string_find_incomplete_keyword_at_end): New.
8001         (linespec_lexer_lex_string): Record quote char.  If in completion
8002         mode, don't throw.
8003         (linespec_lexer_consume_token): Advance the completion word point.
8004         (linespec_lexer_peek_token): Save/restore completion info.
8005         (save_stream_and_consume_token): New.
8006         (set_completion_after_number): New.
8007         (linespec_parse_basic): Set what to complete next depending on
8008         token.  Handle function and label completions specially.
8009         (parse_linespec): Disable objc shortcut in completion mode.  Set
8010         what to complete next depending on token type.  Skip keyword if in
8011         completion mode.
8012         (complete_linespec_component, linespec_complete): New.
8013         * linespec.h (linespec_complete): Declare.
8014
8015 2017-07-17  Pedro Alves  <palves@redhat.com>
8016
8017         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8018         Handle 'operator<' / 'operator<<'.
8019
8020 2017-07-17  Pedro Alves  <palves@redhat.com>
8021
8022         * completer.c (collect_explicit_location_matches): Handle
8023         MATCH_LABEL.
8024         (convert_explicit_location_to_linespec): New, factored out from
8025         ...
8026         (convert_explicit_location_to_sals): ... this.
8027         (complete_label): New.
8028         (linespec_complete_label, find_label_symbols_in_block): New.
8029         (find_label_symbols): Add completion_mode parameter and adjust to
8030         call find_label_symbols_in_block.
8031         * linespec.h (linespec_complete_label): Declare.
8032
8033 2017-07-17  Pedro Alves  <palves@redhat.com>
8034
8035         * ada-lang.c (ada_collect_symbol_completion_matches): Add
8036         complete_symbol_mode parameter.
8037         * cli/cli-cmds.c (complete_command): Get the completion result out
8038         of the handle_brkchars tracker if used a custom word point.
8039         * completer.c: Include "linespec.h".
8040         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8041         (advance_to_expression_complete_word_point): New.
8042         (completion_tracker::completes_to_completion_word): New.
8043         (complete_files_symbols): Pass down
8044         complete_symbol_mode::EXPRESSION.
8045         (explicit_options, probe_options): New.
8046         (collect_explicit_location_matches): Complete on the
8047         explictit_loc->foo instead of word.  Use
8048         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
8049         keyword and options completions.
8050         (backup_text_ptr): Delete.
8051         (skip_keyword): New.
8052         (complete_explicit_location): Remove 'word' parameter.  Add
8053         language, quoted_arg_start and quoted_arg_end parameters.
8054         Rewrite, parsing left to right.
8055         (location_completer): Rewrite.
8056         (location_completer_handle_brkchars): New function.
8057         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8058         (enum complete_line_internal_reason): Adjust comments.
8059         (completion_tracker::discard_completions): New.
8060         (completer_handle_brkchars_func_for_completer): Handle
8061         location_completer.
8062         (gdb_custom_word_point_brkchars)
8063         (gdb_org_rl_basic_quote_characters): New.
8064         (gdb_completion_word_break_characters_throw)
8065         (completion_find_completion_word): Handle trackers that use a
8066         custom word point.
8067         (completion_tracker::advance_custom_word_point_by): New.
8068         (completion_tracker::build_completion_result): Don't rely on
8069         readline appending the quote char.
8070         (gdb_rl_attempted_completion_function_throw): Handle trackers that
8071         use a custom word point.
8072         (gdb_rl_attempted_completion_function): Restore
8073         rl_basic_quote_characters.
8074         * completer.h (class completion_tracker): Extend intro comment.
8075         (completion_tracker::set_quote_char)
8076         (completion_tracker::quote_char)
8077         (completion_tracker::set_use_custom_word_point)
8078         (completion_tracker::use_custom_word_point)
8079         (completion_tracker::custom_word_point)
8080         (completion_tracker::set_custom_word_point)
8081         (completion_tracker::advance_custom_word_point_by)
8082         (completion_tracker::completes_to_completion_word)
8083         (completion_tracker::discard_completions): New methods.
8084         (completion_tracker::m_quote_char)
8085         (completion_tracker::m_use_custom_word_point)
8086         (completion_tracker::m_custom_word_point): New fields.
8087         (advance_to_expression_complete_word_point): Declare.
8088         * f-lang.c (f_collect_symbol_completion_matches): Add
8089         complete_symbol_mode parameter.
8090         * language.h (struct language_defn)
8091         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8092         parameter.
8093         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
8094         (linespec_complete_function): New function.
8095         (linespec_lexer_lex_keyword): Adjust.
8096         * linespec.h (linespec_keywords, linespec_complete_function): New
8097         declarations.
8098         * location.c (find_end_quote): New function.
8099         (explicit_location_lex_one): Add explicit_completion_info
8100         parameter.  Save quoting info.  Don't throw if being called for
8101         completion.  Don't handle Ada operators here.
8102         (is_cp_operator, skip_op_false_positives, first_of)
8103         (explicit_location_lex_one_function): New function.
8104         (string_to_explicit_location): Replace 'dont_throw' parameter with
8105         an explicit_completion_info pointer parameter.  Handle it.  Don't
8106         use explicit_location_lex_one to lex function names.  Use
8107         explicit_location_lex_one_function instead.
8108         * location.h (struct explicit_completion_info): New.
8109         (string_to_explicit_location): Replace 'dont_throw' parameter with
8110         an explicit_completion_info pointer parameter.
8111         * symtab.c (default_collect_symbol_completion_matches_break_on):
8112         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
8113         (default_collect_symbol_completion_matches)
8114         (collect_symbol_completion_matches): Add complete_symbol_mode
8115         parameter.
8116         (collect_symbol_completion_matches_type): Pass down
8117         complete_symbol_mode::EXPRESSION.
8118         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8119         parameter.  Handle LINESPEC mode.
8120         * symtab.h (complete_symbol_mode): New.
8121         (default_collect_symbol_completion_matches_break_on)
8122         (default_collect_symbol_completion_matches)
8123         (collect_symbol_completion_matches)
8124         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8125         parameter.
8126
8127 2017-07-17  Pedro Alves  <palves@redhat.com>
8128
8129         * utils.c (enum class strncmp_iw_mode): New.
8130         (strcmp_iw): Rename to ...
8131         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
8132         parameters.  Handle them.
8133         (strncmp_iw): New.
8134         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8135         * utils.h (strncmp_iw): Declare.
8136         (strcmp_iw): Move describing comments here.
8137
8138 2017-07-17  Pedro Alves  <palves@redhat.com>
8139
8140         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8141         CP_OPERATOR_STR.
8142         * c-typeprint.c (is_type_conversion_operator): Use
8143         CP_OPERATOR_STR.
8144         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8145         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8146         CP_OPERATOR_LEN.
8147         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8148         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8149         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8150         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8151         CP_OPERATOR_STR.
8152         * location.c: Include "cp-support.h".
8153         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8154         CP_OPERATOR_STR.
8155         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8156         CP_OPERATOR_LEN.
8157
8158 2017-07-17  Pedro Alves  <palves@redhat.com>
8159
8160         * cli/cli-cmds.c (complete_command): Use a completion tracker
8161         along with completion_find_completion_word for handle_brkchars
8162         phase.
8163         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8164         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8165         (struct gdb_rl_completion_word_info): New.
8166         (gdb_rl_find_completion_word): New.
8167         (completion_find_completion_word): New.
8168         * completer.h (completion_find_completion_word): Declare.
8169
8170 2017-07-17  Pedro Alves  <palves@redhat.com>
8171
8172         * ada-lang.c (symbol_completion_match): Adjust comments.
8173         (symbol_completion_add): Replace vector parameter with
8174         completion_tracker parameter.  Use it.
8175         (ada_make_symbol_completion_list): Rename to...
8176         (ada_collect_symbol_completion_matches): ... this.  Add
8177         completion_tracker parameter and use it.
8178         (ada_language_defn): Adjust.
8179         * break-catch-syscall.c (catch_syscall_completer): Adjust
8180         prototype and work with completion_tracker instead of VEC.
8181         * breakpoint.c (condition_completer): Adjust prototype and work
8182         with completion_tracker instead of VEC.
8183         * c-lang.c (c_language_defn, cplus_language_defn)
8184         (asm_language_defn, minimal_language_defn): Adjust to renames.
8185         * cli/cli-cmds.c (complete_command): Rework using
8186         completion_tracker.  Catch exceptions when completing.
8187         * cli/cli-decode.c (integer_unlimited_completer)
8188         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8189         with completion_tracker instead of VEC.
8190         * command.h (struct completion_tracker): Forward declare.
8191         (completer_ftype, completer_handle_brkchars_ftype): Change
8192         types.
8193         (complete_on_cmdlist, complete_on_enum): Adjust.
8194         * completer.c: Include <algorithm>.
8195         (struct gdb_completer_state): New.
8196         (current_completion): New global.
8197         (readline_line_completion_function): Delete.
8198         (noop_completer, filename_completer)
8199         (filename_completer_handle_brkchars, complete_files_symbols)
8200         (linespec_location_completer): Adjust to work with a
8201         completion_tracker instead of a VEC.
8202         (string_or_empty): New.
8203         (collect_explicit_location_matches): Adjust to work with a
8204         completion_tracker instead of a VEC.
8205         (explicit_location_completer): Rename to ...
8206         (complete_explicit_location): ... this and adjust to work with a
8207         completion_tracker instead of a VEC.
8208         (location_completer): Adjust to work with a completion_tracker
8209         instead of a VEC.
8210         (add_struct_fields): Adjust to work with a completion_list instead
8211         of VEC.
8212         (expression_completer): Rename to ...
8213         (complete_expression): ... this and adjust to work with a
8214         completion_tracker instead of a VEC.  Use complete_files_symbols.
8215         (expression_completer): Reimplement on top of complete_expression.
8216         (symbol_completer): Adjust to work with a completion_tracker
8217         instead of a VEC.
8218         (enum complete_line_internal_reason): Add describing comments.
8219         (complete_line_internal_normal_command): Adjust to work with a
8220         completion_tracker instead of a VEC.
8221         (complete_line_internal): Rename to ...
8222         (complete_line_internal_1): ... this and adjust to work with a
8223         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
8224         handle_brkchars phase.
8225         (new_completion_tracker): Delete.
8226         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8227         complete_line_internal_1.
8228         (free_completion_tracker): Delete.
8229         (INITIAL_COMPLETION_HTAB_SIZE): New.
8230         (completion_tracker::completion_tracker)
8231         (completion_tracker::~completion_tracker): New.
8232         (maybe_add_completion): Delete.
8233         (completion_tracker::maybe_add_completion)
8234         (completion_tracker::add_completion)
8235         (completion_tracker::add_completions): New.
8236         (throw_max_completions_reached_error): Delete.
8237         (complete_line): Adjust to work with a completion_tracker instead
8238         of a VEC.  Don't create a completion_tracker_t or check for max
8239         completions here.
8240         (command_completer, command_completer_handle_brkchars)
8241         (signal_completer, reg_or_group_completer_1)
8242         (reg_or_group_completer, default_completer_handle_brkchars):
8243         Adjust to work with a completion_tracker.
8244         (gdb_completion_word_break_characters_throw): New.
8245         (gdb_completion_word_break_characters): Reimplement.
8246         (line_completion_function): Delete.
8247         (completion_tracker::recompute_lowest_common_denominator)
8248         (expand_preserving_ws)
8249         (completion_tracker::build_completion_result)
8250         (completion_result::completion_result)
8251         (completion_result::completion_result)
8252         (completion_result::~completion_result)
8253         (completion_result::completion_result)
8254         (completion_result::release_match_list, compare_cstrings)
8255         (completion_result::sort_match_list)
8256         (completion_result::reset_match_list)
8257         (gdb_rl_attempted_completion_function_throw)
8258         (gdb_rl_attempted_completion_function): New.
8259         * completer.h (completion_list, struct completion_result)
8260         (class completion_tracker): New.
8261         (complete_line): Add completion_tracker parameter.
8262         (readline_line_completion_function): Delete.
8263         (gdb_rl_attempted_completion_function): New.
8264         (noop_completer, filename_completer, expression_completer)
8265         (location_completer, symbol_completer, command_completer)
8266         (signal_completer, reg_or_group_completer): Update prototypes.
8267         (completion_tracker_t, new_completion_tracker)
8268         (make_cleanup_free_completion_tracker): Delete.
8269         (enum maybe_add_completion_enum): Delete.
8270         (maybe_add_completion): Delete.
8271         (throw_max_completions_reached_error): Delete.
8272         * corefile.c (complete_set_gnutarget): Adjust to work with a
8273         completion_tracker instead of a VEC.
8274         * cp-abi.c (cp_abi_completer): Adjust to work with a
8275         completion_tracker instead of a VEC.
8276         * d-lang.c (d_language_defn): Adjust.
8277         * disasm.c (disassembler_options_completer): Adjust to work with a
8278         completion_tracker instead of a VEC.
8279         * f-lang.c (f_make_symbol_completion_list): Rename to ...
8280         (f_collect_symbol_completion_matches): ... this.  Adjust to work
8281         with a completion_tracker instead of a VEC.
8282         (f_language_defn): Adjust.
8283         * go-lang.c (go_language_defn): Adjust.
8284         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8285         Adjust to work with a completion_tracker instead of a VEC.
8286         * infrun.c (handle_completer): Likewise.
8287         * interps.c (interpreter_completer): Likewise.
8288         * interps.h (interpreter_completer): Likewise.
8289         * language.c (unknown_language_defn, auto_language_defn)
8290         (local_language_defn): Adjust.
8291         * language.h (language_defn::la_make_symbol_completion_list):
8292         Rename to ...
8293         (language_defn::la_collect_symbol_completion_matches): ... this
8294         and adjust to work with a completion_tracker instead of a VEC.
8295         * m2-lang.c (m2_language_defn): Adjust.
8296         * objc-lang.c (objc_language_defn): Adjust.
8297         * opencl-lang.c (opencl_language_defn): Adjust.
8298         * p-lang.c (pascal_language_defn): Adjust.
8299         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8300         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8301         with a completion_tracker.
8302         * rust-lang.c (rust_language_defn): Adjust.
8303         * symtab.c (free_completion_list, do_free_completion_list)
8304         (return_val, completion_tracker): Delete.
8305         (completion_list_add_name, completion_list_add_symbol)
8306         (completion_list_add_msymbol, completion_list_objc_symbol)
8307         (completion_list_add_fields, add_symtab_completions): Add
8308         completion_tracker parameter and use it.
8309         (default_make_symbol_completion_list_break_on_1): Rename to...
8310         (default_collect_symbol_completion_matches_break_on): ... this.
8311         Add completion_tracker parameter and use it instead of allocating
8312         a completion tracker here.
8313         (default_make_symbol_completion_list_break_on): Delete old
8314         implementation.
8315         (default_make_symbol_completion_list): Delete.
8316         (default_collect_symbol_completion_matches): New.
8317         (make_symbol_completion_list): Delete.
8318         (collect_symbol_completion_matches): New.
8319         (make_symbol_completion_type): Rename to ...
8320         (collect_symbol_completion_matches_type): ... this.  Add
8321         completion_tracker parameter and use it instead of VEC.
8322         (make_file_symbol_completion_list_1): Rename to...
8323         (collect_file_symbol_completion_matches): ... this.  Add
8324         completion_tracker parameter and use it instead of VEC.
8325         (make_file_symbol_completion_list): Delete.
8326         (add_filename_to_list): Use completion_list instead of a VEC.
8327         (add_partial_filename_data::list): Now a completion_list.
8328         (make_source_files_completion_list): Work with a completion_list
8329         instead of a VEC.
8330         * symtab.h: Include "completer.h".
8331         (default_make_symbol_completion_list_break_on)
8332         (default_make_symbol_completion_list, make_symbol_completion_list)
8333         (make_symbol_completion_type, make_file_symbol_completion_list)
8334         (make_source_files_completion_list): Delete.
8335         (default_collect_symbol_completion_matches_break_on)
8336         (default_collect_symbol_completion_matches)
8337         (collect_symbol_completion_matches)
8338         (collect_symbol_completion_matches_type)
8339         (collect_file_symbol_completion_matches)
8340         (make_source_files_completion_list): New.
8341         * top.c (init_main): Don't install a rl_completion_entry_function
8342         hook.  Install a rl_attempted_completion_function hook instead.
8343         * tui/tui-layout.c (layout_completer): Adjust to work with a
8344         completion_tracker.
8345         * tui/tui-regs.c (tui_reggroup_completer):
8346         * tui/tui-win.c (window_name_completer, focus_completer)
8347         (winheight_completer): Adjust to work with a completion_tracker.
8348         * value.c: Include "completer.h".
8349         (complete_internalvar): Adjust to work with a completion_tracker.
8350         * value.h (complete_internalvar): Likewise.
8351
8352 2017-07-17  Pedro Alves  <palves@redhat.com>
8353
8354         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8355         renames.
8356         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8357         comments to completer_ftype's declaration.
8358         <completer_handle_brkchars>: Change type to
8359         completer_handle_brkchars_ftype.
8360         * command.h (completer_ftype): Add describing comment and give
8361         names to parameters.
8362         (completer_ftype_void): Rename to ...
8363         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
8364         (set_cmd_completer_handle_brkchars): Adjust.
8365         * completer.c (filename_completer_handle_brkchars): New function.
8366         (complete_line_internal_normal_command): New function, factored
8367         out from ...
8368         (complete_line_internal): ... here.
8369         (command_completer_handle_brkchars)
8370         (default_completer_handle_brkchars)
8371         (completer_handle_brkchars_func_for_completer): New functions.
8372         * completer.h (set_gdb_completion_word_break_characters): Delete
8373         declaration.
8374         (completer_handle_brkchars_func_for_completer): New declaration.
8375         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8376         completer_handle_brkchars_func_for_completer.
8377
8378 2017-07-17  Pedro Alves  <palves@redhat.com>
8379
8380         * completer.c (symbol_completer): New function, based on
8381         make_symbol_completion_list_fn.
8382         * completer.h (symbol_completer): New declaration.
8383         * guile/scm-cmd.c (cmdscm_completers): Adjust.
8384         * python/py-cmd.c (completers): Adjust.
8385         * symtab.c (make_symbol_completion_list_fn): Delete.
8386         * symtab.h (make_symbol_completion_list_fn): Delete.
8387         * cli/cli-decode.c (add_cmd): Adjust.
8388
8389 2017-07-17  Pedro Alves  <palves@redhat.com>
8390
8391         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8392         * dwarf2read.c: Include "filename-seen-cache.h".
8393         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8394         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8395         * filename-seen-cache.c: New file.
8396         * filename-seen-cache.h: New file.
8397         * symtab.c: Include "filename-seen-cache.h".
8398         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8399         (create_filename_seen_cache, clear_filename_seen_cache)
8400         (delete_filename_seen_cache, filename_seen): Delete, parts moved
8401         to filename-seen-cache.h/filename-seen-cache.c.
8402         (output_source_filename, sources_info)
8403         (maybe_add_partial_symtab_filename)
8404         (make_source_files_completion_list): Adjust to use
8405         filename_seen_cache.
8406
8407 2017-07-17  Pedro Alves  <palves@redhat.com>
8408
8409         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8410         fields.
8411         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8412         dwarf2_debug_sections*)): New.
8413         (dwarf2_per_objfile::dwarf2_per_objfile(const
8414         dwarf2_per_objfile&)): Declare as deleted.
8415         (dwarf2_per_objfile::operator=): Declare as deleted.
8416         (dwarf2_per_objfile::dwarf2_per_objfile)
8417         (dwarf2_per_objfile::~dwarf2_per_objfile)
8418         (dwarf2_per_objfile::free_cached_comp_units): New.
8419         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8420         ctor.  Call dwarf2_per_objfile's ctor manually.
8421         (dwarf2_locate_sections): Deleted/refactored as ...
8422         (dwarf2_per_objfile::locate_sections): ... this new method.
8423         (free_cached_comp_units): Defer to
8424         dwarf2_per_objfile::free_cached_comp_units.
8425         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8426
8427 2017-07-14  Tom Tromey  <tom@tromey.com>
8428
8429         PR rust/21764:
8430         * rust-exp.y (convert_ast_to_expression): Add "want_type"
8431         parameter.
8432         <UNOP_SIZEOF>: Split into separate case.
8433         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
8434
8435 2017-07-14  Tom Tromey  <tom@tromey.com>
8436
8437         PR rust/21763:
8438         * symtab.c (symbol_matches_domain): Add language_rust to special
8439         case.
8440         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8441         treat LOC_TYPEDEF symbols as variables.
8442
8443 2017-07-14  Pedro Alves  <palves@redhat.com>
8444
8445         * symtab.c (make_file_symbol_completion_list_1): Iterate over
8446         symtabs matching all symtabs with SRCFILE as file name instead of
8447         only considering the first hit, with lookup_symtab.
8448
8449 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8450
8451         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8452         operator_name parameters.
8453         (gen_expr): Update function call.
8454
8455 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8456
8457         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8458         parameter.
8459         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8460         Likewise.
8461         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8462         parameter, use agent_expr::gdbarch instead, update function
8463         calls.
8464         (locexpr_tracepoint_var_ref): Likewise.
8465         (loclist_tracepoint_var_ref): Likewise.
8466         * ax-gdb.c (gen_trace_static_fields): Likewise.
8467         (gen_traced_pop): Likewise.
8468         (gen_frame_args_address): Likewise.
8469         (gen_frame_locals_address): Likewise.
8470         (gen_var_ref): Likewise.
8471         (gen_struct_ref_recursive): Likewise.
8472         (gen_static_field): Likewise.
8473         (gen_maybe_namespace_elt): Likewise.
8474         (gen_expr): Likewise.
8475         (gen_trace_for_var): Likewise.
8476         (gen_trace_for_expr): Likewise.
8477         (gen_trace_for_return_address): Likewise.
8478
8479 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8480
8481         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8482         parameter.
8483         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8484
8485 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8486
8487         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8488         from ax, update calls.
8489         (gen_usual_arithmetic): Likewise.
8490         (gen_integral_promotions): Likewise.
8491         (gen_bitfield_ref): Likewise.
8492         (gen_primitive_field): Likewise.
8493         (gen_struct_ref_recursive): Likewise.
8494         (gen_struct_ref): Likewise.
8495         (gen_maybe_namespace_elt): Likewise.
8496         (gen_struct_elt_for_reference): Likewise.
8497         (gen_namespace_elt): Likewise.
8498         (gen_aggregate_elt_ref): Likewise.
8499         (gen_expr): Get gdbarch from ax, update calls.
8500         (gen_expr_binop_rest): Likewise.
8501
8502 2017-07-13  Pedro Alves  <palves@redhat.com>
8503
8504         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8505         as default tdesc.
8506         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8507         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8508         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8509         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
8510         tdep.
8511         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8512         Get final tdesc from the tdep.
8513         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8514         default tdesc.
8515         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8516         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8517         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8518         Use it as default tdesc.
8519         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8520         down to amd_init_abi.  No longer handle fallback tdesc here.
8521         * amd64-tdep.h (tdesc_x32): Declare.
8522         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8523         parameter.
8524         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8525         as default tdesc.
8526
8527 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8528
8529         * s390-linux-tdep.c (s390_process_record): Add support for
8530         instructions new in arch12.
8531
8532 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8533
8534         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8535         PT_GETFSBASE and PT_GETGSBASE.
8536         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8537         PT_SETGSBASE.
8538
8539 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8540
8541         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8542         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8543         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8544         those rules.
8545         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8546         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8547         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8548         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8549         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8550         * features/i386/amd64.xml: Add 64bit-segments.xml.
8551         * features/i386/amd64-avx-avx512.c: Regenerated.
8552         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8553         * features/i386/amd64-avx-mpx.c: Regenerated.
8554         * features/i386/amd64-avx.c: Regenerated.
8555         * features/i386/amd64-mpx.c: Regenerated.
8556         * features/i386/amd64.c: Regenerated.
8557         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8558         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8559         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8560         * regformats/i386/amd64-avx.dat: Regenerated.
8561         * regformats/i386/amd64-mpx.dat: Regenerated.
8562         * regformats/i386/amd64.dat: Regenerated.
8563
8564 2017-07-10  Yao Qi  <yao.qi@linaro.org>
8565
8566         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8567         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8568
8569 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
8570
8571         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8572         unsetenv.
8573         * gnulib/aclocal.m4: Regenerate.
8574         * gnulib/config.in: Regenerate.
8575         * gnulib/configure: Regenerate.
8576         * gnulib/import/Makefile.am: Regenerate.
8577         * gnulib/import/Makefile.in: Regenerate.
8578         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8579         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8580         * gnulib/import/m4/environ.m4: New file.
8581         * gnulib/import/m4/setenv.m4: New file.
8582         * gnulib/import/setenv.c: New file.
8583         * gnulib/import/unsetenv.c: New file.
8584
8585 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
8586
8587         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8588         address when op is DW_OP_addr.
8589
8590 2017-07-09  Tom Tromey  <tom@tromey.com>
8591
8592         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8593         check and apply to outer type.
8594
8595 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8596
8597         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8598         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8599         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8600         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8601
8602 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8603
8604         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8605
8606 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8607
8608         * corelow.c (get_core_siginfo): Remove.
8609         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8610         instead of get_core_siginfo.
8611         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8612         * gdbarch.h: Re-generate.
8613         * gdbarch.c: Re-generate.
8614         * linux-tdep.c (linux_core_xfer_siginfo): New.
8615         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8616
8617 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8618
8619         * corelow.c (thread_section_name): Move to ...
8620         * gdbcore.h (thread_section_name): ... here.
8621
8622 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8623
8624         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8625         (struct siginfo32): New.
8626         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8627         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8628         via ptrace(PT_LWPINFO).
8629
8630 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8631
8632         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8633         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8634         (fbsd_get_siginfo_type): New.
8635         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8636         (_initialize_fbsd_tdep): New.
8637
8638 2017-07-06  David Blaikie  <dblaikie@gmail.com>
8639
8640         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8641         a singular dwo_unit*) to support multiple CUs in the same way that
8642         multiple TUs are supported.
8643         (create_cus_hash_table): Replace create_dwo_cu with a function for
8644         parsing multiple CUs from a DWO file.
8645         (open_and_init_dwo_file): Use create_cus_hash_table rather than
8646         create_dwo_cu.
8647         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8648         htab_find, rather than comparing the signature to a singleton CU in
8649         the dwo_file.
8650
8651 2017-07-06  Pedro Alves  <palves@redhat.com>
8652
8653         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8654
8655 2017-07-04  Pedro Alves  <palves@redhat.com>
8656
8657         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8658         * gdbtypes.h (TYPE_STATIC): Delete.
8659         (struct fn_field) <is_public, is_abstract, is_static, is_final,
8660         is_synchronized, is_native>: Delete.
8661         <dummy>: Bump.
8662         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8663         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8664         (TYPE_FN_FIELD_ABSTRACT): Delete.
8665
8666 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
8667
8668         * buffer.h (buffer_finish): Fix spelling mistakes.
8669
8670 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
8671
8672         * .dir-locals.el: Automatically switch to C-style comments in
8673         versions of Emacs that support the feature.
8674
8675 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8676             Pedro Alves  <palves@redhat.com>
8677
8678         PR cli/21688
8679         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
8680         (process_next_line): New variable 'inline_cmd'.
8681         Adjust 'if' clauses for "python", "compile" and "guile" to use
8682         'command_name_equals' and check for '!inline_cmd'.
8683
8684 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8685
8686         PR cli/21688
8687         * cli/cli-script.c (command_name_equals_not_inline): New function.
8688         (process_next_line): Adjust 'if' clauses for "python", "compile"
8689         and "guile" to use command_name_equals_not_inline.
8690
8691 2017-06-29  Pedro Alves  <palves@redhat.com>
8692
8693         * completer.c (expression_completer): Call
8694         linespec_location_completer instead of location_completer.
8695
8696 2017-06-29  Pedro Alves  <palves@redhat.com>
8697
8698         * completer.c (expression_completer): Remove code that recomputes
8699         'text' from 'word'.
8700
8701 2017-06-29  Yao Qi  <yao.qi@linaro.org>
8702
8703         * regformats/regdat.sh: Generate code with
8704         "ifndef IN_PROCESS_AGENT".
8705
8706 2017-06-28  Pedro Alves  <palves@redhat.com>
8707
8708         * command.h: Include "common/scoped_restore.h".
8709
8710 2017-06-28  Yao Qi  <yao.qi@linaro.org>
8711
8712         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
8713         instead of obstack_grow.
8714
8715 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
8716
8717         PR gdb/21337
8718         * symfile.c (reread_symbols): Call objfiles_changed just before
8719         read_symbols.
8720
8721 2017-06-27  Pedro Alves  <palves@redhat.com>
8722
8723         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
8724         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
8725         (completion_list_add_symbol, completion_list_add_msymbol):
8726         ... these new functions.
8727         (add_symtab_completions)
8728         (default_make_symbol_completion_list_break_on_1): Adjust.
8729
8730 2017-06-27  Pedro Alves  <palves@redhat.com>
8731
8732         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
8733         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
8734         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
8735         dtor.
8736         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
8737         'storage_obstack' field an auto_obstack.  In-class initialize all
8738         non-bitfield fields.  Make minsyms_read bool.
8739         * symfile.c (read_symbols): Adjust.
8740
8741 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
8742
8743         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
8744         (gdbsim_store_register): Likewise.
8745
8746 2017-06-27  Pedro Alves  <palves@redhat.com>
8747
8748         * c-exp.y (name_obstack): Now an auto_obstack.
8749         (yylex): Use auto_obstack::clear.
8750         (c_parse): Use auto_obstack::clear instead of reinitializing and
8751         freeing the obstack.
8752         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
8753         * d-exp.y (name_obstack): Now an auto_obstack.
8754         (yylex): Use auto_obstack::clear.
8755         (d_parse): Use auto_obstack::clear instead of reinitializing and
8756         freeing the obstack.
8757         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
8758         auto_obstack.
8759         * dwarf2read.c (create_addrmap_from_index)
8760         (dwarf2_build_psymtabs_hard)
8761         (update_enumeration_type_from_children): Likewise.
8762         * gdb_obstack.h (auto_obstack): New type.
8763         * go-exp.y (name_obstack): Now an auto_obstack.
8764         (build_packaged_name): Use auto_obstack::clear.
8765         (go_parse): Use auto_obstack::clear instead of reinitializing and
8766         freeing the obstack.
8767         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
8768         auto_obstack.
8769         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
8770         * rust-exp.y (work_obstack): Now an auto_obstack.
8771         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
8772         reinitializing and freeing the obstack.
8773         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
8774         (host_char_to_target): Use auto_obstack.
8775         * utils.h (make_cleanup_obstack_free): Delete declaration.
8776         * valprint.c (generic_emit_char, generic_printstr): Use
8777         auto_obstack.
8778
8779 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
8780
8781         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
8782         thread.
8783         (darwin_init_thread_list): Don't update dummy thread.
8784         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
8785
8786 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8787
8788         * record-full.c (netorder16): Remove.
8789
8790 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8791
8792         * common/diagnostics.h: Define macros for GCC.
8793         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
8794         * common/vec.h: Include diagnostics.h.
8795         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
8796         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
8797         warning.
8798
8799 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8800
8801         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
8802         New macro.
8803         * ada-lex.l: Ignore deprecated register warnings.
8804
8805 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8806
8807         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8808         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8809
8810 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8811
8812         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
8813         its own line.
8814
8815 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8816
8817         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
8818
8819 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
8820
8821         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
8822         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
8823         (xtensa_register_read_masked): Likewise.
8824
8825 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
8826
8827         * common/environ.c (gdb_environ::unset): Update comment.
8828
8829 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8830
8831         * python/py-unwind.c (pyuw_sniffer): Allocate space for
8832         registers.
8833
8834 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8835
8836         * record-full.c (record_full_exec_insn): Use byte_vector.
8837
8838 2017-06-22  Yao Qi  <yao.qi@linaro.org>
8839
8840         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
8841         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8842
8843 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8844
8845         * remote.c (cached_reg): Move from here...
8846         * regcache.h (cached_reg): ...to here.
8847         * python/py-unwind.c (struct reg_info): Remove.
8848         (cached_frame_info): Use cached_reg_t.
8849         (pyuw_prev_register): Likewise.
8850         (pyuw_sniffer): Use cached_reg_t and allocate registers.
8851         (pyuw_dealloc_cache): Free all registers.
8852
8853 2017-06-22  Pedro Alves  <palves@redhat.com>
8854             Simon Marchi  <simon.marchi@ericsson.com>
8855
8856         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
8857         warning.
8858         * common/diagnostics.h: New file.
8859
8860 2017-06-22  Pedro Alves  <palves@redhat.com>
8861
8862         * common/agent.h: Add include guards.
8863
8864 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
8865
8866         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
8867         talk about addressable units instead of bytes.
8868
8869 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8870
8871         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
8872         of '::const_iterator'.
8873
8874 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8875
8876         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8877         'unittests/environ-selftests.c'.
8878         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
8879         * charset.c (find_charset_names): Declare object 'iconv_env'.
8880         Update code to use 'iconv_env' object.  Remove call to
8881         'free_environ'.
8882         * common/environ.c: Include <utility>.
8883         (make_environ): Delete function.
8884         (free_environ): Delete function.
8885         (gdb_environ::clear): New function.
8886         (gdb_environ::operator=): New function.
8887         (gdb_environ::get): Likewise.
8888         (environ_vector): Delete function.
8889         (set_in_environ): Delete function.
8890         (gdb_environ::set): New function.
8891         (unset_in_environ): Delete function.
8892         (gdb_environ::unset): New function.
8893         (gdb_environ::envp): Likewise.
8894         * common/environ.h: Include <vector>.
8895         (struct gdb_environ): Delete; transform into...
8896         (class gdb_environ): ... this class.
8897         (free_environ): Delete prototype.
8898         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
8899         environ_vector): Likewise.
8900         * infcmd.c (run_command_1): Update code to call
8901         'envp' from 'gdb_environ' class.
8902         (environment_info): Update code to call methods from 'gdb_environ'
8903         class.
8904         (unset_environment_command): Likewise.
8905         (path_info): Likewise.
8906         (path_command): Likewise.
8907         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
8908         (inferior::inferior): Initialize 'environment' using the host's
8909         information.
8910         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
8911         Include "environ.h".
8912         (class inferior) <environment>: Change type from 'struct
8913         gdb_environ' to 'gdb_environ'.
8914         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
8915         methods from 'gdb_environ' class.
8916         * solib.c (solib_find_1): Likewise
8917         * unittests/environ-selftests.c: New file.
8918
8919 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8920
8921         * features/i386/i386-linux.xml: Exchange the order of including
8922         32bit-linux.xml and 32bit-sse.xml.
8923         * features/i386/i386-linux.c: Regenerated.
8924
8925 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8926
8927         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
8928         Delete copy ctor and assignment operator.
8929         (tdesc_type): Likewise.
8930         (tdesc_feature): Likewise.
8931         (tdesc_free_reg): Remove.
8932         (tdesc_create_reg): Use new.
8933         (tdesc_free_type): Remove.
8934         (tdesc_create_vector): Use new.
8935         (tdesc_create_union): Likewise.
8936         (tdesc_create_flags): Likewise.
8937         (tdesc_create_enum): Likewise.
8938         (tdesc_free_feature): Delete.
8939         (free_target_description): Use delete.
8940
8941 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
8942
8943         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
8944         registers.
8945
8946 2017-06-19  Pedro Alves  <palves@redhat.com>
8947
8948         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
8949         after gdb::unlinker.
8950
8951 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
8952
8953         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
8954         gdb_environ to access an environment variable.
8955
8956 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
8957
8958         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
8959         gdb_byte*.
8960
8961 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8962
8963         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
8964
8965 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8966
8967         * configure: Re-generate.
8968         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
8969
8970 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8971
8972         * configure: Re-generate.
8973         * warning.m4: Pass -Werror to compiler when checking for
8974         supported warning flags.
8975
8976 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8977
8978         * Makefile.in (COMPILE.pre): Add "-x c++".
8979
8980 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
8981             Pedro Alves  <palves@redhat.com>
8982             Yao Qi  <yao.qi@linaro.org>
8983
8984         * defs.h (RequireLongest): New.
8985         (extract_integer): Declare function template.
8986         (extract_signed_integer): Remove the declaration, but define it
8987         static inline.
8988         (extract_unsigned_integer): Likewise.
8989         (store_integer): Declare function template.
8990         (store_signed_integer): Remove the declaration, but define it
8991         static inline.
8992         (store_unsigned_integer): Likewise.
8993         * findvar.c (extract_integer): New function template.
8994         (extract_signed_integer): Remove.
8995         (extract_unsigned_integer): Remove.
8996         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
8997         instantiations.
8998         (store_integer): New function template.
8999         (store_signed_integer): Remove.
9000         (store_unsigned_integer): Remove.
9001         (store_integer): Explicit instantiations.
9002         * regcache.c (regcache_raw_read_signed): Update.
9003         (regcache::raw_read): New function.
9004         (regcache::raw_read_signed): Remove.
9005         (regcache::raw_read_unsigned): Remove.
9006         (regcache_raw_read_unsigned): Update.
9007         (regcache_raw_write_unsigned): Update.
9008         (regcache::raw_write_signed): Remove.
9009         (regcache::raw_write): New function.
9010         (regcache_cooked_read_signed): Update.
9011         (regcache::raw_write_unsigned): Remove.
9012         (regcache::cooked_read_signed): Remove.
9013         (regcache_cooked_read_unsigned): Update.
9014         (regcache::cooked_read_unsigned): Remove.
9015         (regcache_cooked_write_signed): Update.
9016         (regcache_cooked_write_unsigned): Update.
9017         * regcache.h (regcache) <raw_read_signed>: Remove.
9018         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9019         <raw_read, raw_write>: New.
9020         <cooked_read_signed, cooked_write_signed>: Remove.
9021         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9022         <cooked_read, cooked_write>: New.
9023         * sh64-tdep.c (sh64_pseudo_register_read): Update.
9024         (sh64_pseudo_register_write): Update.
9025
9026 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
9027
9028         * arc-tdep.c (arc_disassembler_options): New variable.
9029         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9030         of default_print_insn.
9031         (arc_delayed_print_insn): Set info->section when needed,
9032         use default_print_insn to retrieve a disassembler.
9033
9034 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
9035
9036         PR gdb/21574
9037         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9038         to mention $SHELL and startup-with-shell.
9039
9040 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
9041
9042         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9043
9044 2017-06-14  Yao Qi  <yao.qi@linaro.org>
9045
9046         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9047         default_print_insn instead of print_insn_aarch64.
9048         * arm-tdep.c (gdb_print_insn_arm): Call
9049         default_print_insn instead of print_insn_big_arm
9050         and print_insn_little_arm.
9051         * i386-tdep.c (i386_print_insn): Call default_print_insn
9052         instead of print_insn_i386.
9053         * ia64-tdep.c (ia64_print_insn): Call
9054         default_print_insn instead of print_insn_ia64.
9055         * mips-tdep.c (gdb_print_insn_mips): Call
9056         default_print_insn instead of print_insn_big_mips
9057         and print_insn_little_mips.
9058         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9059         instead of print_insn_spu.
9060
9061 2017-06-14  Pedro Alves  <palves@redhat.com>
9062
9063         * ada-lang.c: Include "common/byte-vector.h".
9064         (ada_value_primitive_packed_val): Use gdb::byte_vector.
9065         * charset.c (wchar_iterator::iterate): Resize the vector instead
9066         of reserving it.
9067         * common/byte-vector.h: Include "common/def-vector.h".
9068         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9069         * cli/cli-dump.c: Include "common/byte-vector.h".
9070         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9071         * common/byte-vector.h: New file.
9072         * common/def-vector.h: New file.
9073         * common/default-init-alloc.h: New file.
9074         * dwarf2loc.c: Include "common/byte-vector.h".
9075         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9076         instead of reserving it.
9077         * dwarf2read.c: Include "common/byte-vector.h".
9078         (data_buf::m_vec): Now a gdb::byte_vector.
9079         * gdb_regex.c: Include "common/def-vector.h".
9080         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9081         * mi/mi-main.c: Include "common/byte-vector.h".
9082         (mi_cmd_data_read_memory): Use gdb::byte_vector.
9083         * printcmd.c: Include "common/byte-vector.h".
9084         (print_scalar_formatted): Use gdb::byte_vector.
9085         * valprint.c: Include "common/byte-vector.h".
9086         (maybe_negate_by_bytes, print_decimal_chars): Use
9087         gdb::byte_vector.
9088
9089 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9090
9091         * darwin-nat.c: Include "nat/fork-inferior.h".
9092
9093 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9094
9095         * configure.nat: Factor out Darwin bits that are not
9096         architecture-specific.  Add fork-inferior.o.
9097
9098 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9099
9100         * configure.nat: Factor out AIX bits that are not
9101         architecture-specific.  Add fork-inferior.o.
9102
9103 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9104
9105         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
9106         (read_pieced_value, write_pieced_value): ...here.  Reduce to
9107         wrappers that just call rw_pieced_value.
9108
9109 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9110
9111         * dwarf2loc.c (write_pieced_value): When writing the data for a
9112         memory piece, use write_memory_with_notification instead of
9113         write_memory.
9114
9115 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9116
9117         * valops.c (read_value_memory): Change embedded_offset to
9118         represent a bit offset instead of a byte offset.
9119         * value.h (read_value_memory): Adjust comment.
9120
9121 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9122
9123         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9124         dest_offset_bits and source_offset_bits.
9125         (write_pieced_value): Likewise.
9126
9127 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9128
9129         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9130         given by DW_OP_bit_piece.
9131         (write_pieced_value): Likewise.
9132
9133 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9134
9135         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9136         some other preparations to the places where sufficient information
9137         is available.
9138         (write_pieced_value): Likewise.
9139
9140 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9141
9142         * dwarf2loc.c (bits_to_bytes): New function.
9143         (read_pieced_value): Fix offset calculations for register pieces
9144         on big-endian targets.
9145         (write_pieced_value): Likewise.
9146
9147 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9148
9149         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9150         (write_pieced_value): Likewise.
9151
9152 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9153
9154         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9155         transfer the source value's least significant bits, instead of its
9156         lowest-addressed ones.  Rename type_len to max_offset.
9157         (read_pieced_value): Mirror above changes to write_pieced_value as
9158         applicable.
9159
9160 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9161
9162         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9163         truncate full bytes from dest_offset_bits before using it as an
9164         offset into the buffer.
9165
9166 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9167
9168         * dwarf2loc.c (write_pieced_value): Include transfer size in
9169         byte-wise check.
9170
9171 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9172
9173         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9174         calculation of this_size.
9175
9176 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9177
9178         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9179         when targeting a bit-field.
9180         (write_pieced_value): Likewise.
9181
9182 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9183
9184         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9185         (allocate_piece_closure): Drop addr_size parameter.
9186         (dwarf2_evaluate_loc_desc_full): Adjust call to
9187         allocate_piece_closure.
9188
9189 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9190
9191         PR gdb/21226
9192         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9193         the LSB end, independent of endianness.
9194
9195 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9196
9197         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9198         size capping.
9199
9200 2017-06-13  Yao Qi  <yao.qi@linaro.org>
9201
9202         * mips-linux-nat.c: Move include features/mips*-linux.c to
9203         mips-linux-tdep.c.
9204         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9205         to mips-linux-tdep.c.
9206         * mips-linux-tdep.c: Include features/mips*-linux.c
9207         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9208         functions.
9209         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9210         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9211         (tdesc_mips64_dsp_linux): Declare.
9212
9213 2017-06-12  Tom Tromey  <tom@tromey.com>
9214
9215         * valprint.h (val_print_type_code_int): Remove.
9216         * valprint.c (generic_val_print_int): Always call
9217         val_print_scalar_formatted.
9218         (val_print_type_code_int): Remove.
9219         * printcmd.c (print_scalar_formatted): Handle options->format==0.
9220         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9221         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9222         * ada-valprint.c (ada_val_print_num): Use
9223         val_print_scalar_formatted.
9224
9225 2017-06-12  Tom Tromey  <tom@tromey.com>
9226
9227         * printcmd.c (print_scalar_formatted): Unify the two switches.
9228         Don't convert scalars to LONGEST.
9229
9230 2017-06-12  Tom Tromey  <tom@tromey.com>
9231
9232         PR exp/16225:
9233         * valprint.h (print_decimal_chars): Update.
9234         * valprint.c (maybe_negate_by_bytes): New function.
9235         (print_decimal_chars): Add "is_signed" argument.
9236         * printcmd.c (print_scalar_formatted): Update.
9237
9238 2017-06-12  Tom Tromey  <tom@tromey.com>
9239
9240         PR exp/16225:
9241         * valprint.h (print_binary_chars, print_hex_chars): Update.
9242         * valprint.c (val_print_type_code_int): Update.
9243         (print_binary_chars): Add "zero_pad" argument.
9244         (emit_octal_digit): New function.
9245         (print_octal_chars): Don't zero-pad.
9246         (print_decimal_chars): Likewise.
9247         (print_hex_chars): Add "zero_pad" argument.
9248         * sh64-tdep.c (sh64_do_fp_register): Update.
9249         * regcache.c (regcache::dump): Update.
9250         * printcmd.c (print_scalar_formatted): Update.
9251         * infcmd.c (default_print_one_register_info): Update.
9252
9253 2017-06-12  Pedro Alves  <palves@redhat.com>
9254             Alan Hayward  <alan.hayward@arm.com>
9255
9256         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9257         (mips_eabi_push_dummy_call): Rename local 'regsize' to
9258         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
9259         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9260         Assert that abi_regsize bytes fit in 'ref_valbuf'.
9261
9262 2017-06-12  Pedro Alves  <palves@redhat.com>
9263
9264         * dwarf2read.c (mapped_symtab::data): Now a vector of
9265         symtab_index_entry instead of vector of
9266         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
9267         whether an element's name is NULL instead of checking whether the
9268         element itself is NULL.
9269         (find_slot): Change return type.  Adjust.
9270         (hash_expand, , add_index_entry, uniquify_cu_indices)
9271         (write_hash_table): Adjust.
9272
9273 2017-06-12  Pedro Alves  <palves@redhat.com>
9274
9275         * dwarf2read.c (recursively_count_psymbols): New function.
9276         (write_psymtabs_to_index): Call it to compute number of psyms and
9277         pass estimate size of psyms_seen to unordered_set's ctor.
9278
9279 2017-06-12  Pedro Alves  <palves@redhat.com>
9280
9281         * dwarf2read.c (write_hash_table): Check if key already exists
9282         before emplacing.
9283
9284 2017-06-12  Pedro Alves  <palves@redhat.com>
9285
9286         * dwarf2read.c (data_buf::append_space): Rename to...
9287         (data_buf::grow): ... this, and make private.  Adjust all callers.
9288         (data_buf::append_uint): New method.
9289         (add_address_entry, write_one_signatured_type)
9290         (write_psymtabs_to_index): Use it.
9291
9292 2017-06-12  Pedro Alves  <palves@redhat.com>
9293
9294         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9295         (file_write (FILE *, const std::vector<Elem>&)): Delete.
9296         (data_buf::file_write): Call ::fwrite directly.
9297
9298 2017-06-12  Pedro Alves  <palves@redhat.com>
9299
9300         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9301         std::vector::erase.
9302
9303 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9304
9305         Code cleanup: C++ify .gdb_index producer.
9306         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9307         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9308         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9309         (create_strtab, add_string): Remove.
9310         (file_write, data_buf): New.
9311         (struct symtab_index_entry): Use std::vector for cu_indices.
9312         (struct mapped_symtab): Use std::vector for data.
9313         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9314         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9315         Remove.
9316         (find_slot): Change return type.  Update it to the new data structures.
9317         (hash_expand, add_index_entry): Update it to the new data structures.
9318         (offset_type_compare): Remove.
9319         (uniquify_cu_indices): Update it to the new data structures.
9320         (c_str_view, c_str_view_hasher, vector_hasher): New.
9321         (add_indices_to_cpool): Remove.
9322         (write_hash_table): Update it to the new data structures.
9323         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9324         (eq_psymtab_cu_index): Remove.
9325         (psym_index_map): New typedef.
9326         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9327         reference and std::unordered_map for cu_index_htab.
9328         (add_address_entry, add_address_entry_worker, write_address_map)
9329         (write_psymbols): Update it to the new data structures.
9330         (write_obstack): Remove.
9331         (struct signatured_type_index_data): Change types_list to a data_buf
9332         reference and psyms_seen to a std::unordered_set reference.
9333         (write_one_signatured_type, recursively_write_psymbols)
9334         (write_psymtabs_to_index): Update it to the new data structures.
9335
9336 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
9337
9338         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9339         separate-debug-file commands.
9340         * symfile.h (separate_debug_file_debug): New global.
9341         * symfile.c (separate_debug_file_debug): New global.
9342         (separate_debug_file_exists, find_separate_debug_file): Add
9343         debug output.
9344         (_initialize_symfile): Add "set debug separate-debug-file"
9345         command.
9346         * build-id.c (build_id_to_debug_bfd,
9347         find_separate_debug_file_by_buildid): Add debug output.
9348
9349 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
9350
9351         * gdbarch.sh (displaced_step_free_closure): Remove.
9352         * gdbarch.h, gdbarch.c: Re-generate.
9353         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9354         displaced_step_free_closure.
9355         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9356         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9357         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9358         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9359         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9360         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9361         * arch-utils.h (simple_displaced_step_free_closure): Remove.
9362         * arch-utils.c (simple_displaced_step_free_closure): Remove.
9363         * infrun.c (displaced_step_clear): Call xfree instead of
9364         gdbarch_displaced_step_free_closure.
9365
9366 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
9367
9368         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9369         NULL".
9370
9371 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
9372
9373         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9374         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9375         (mn10300_push_dummy_call): Likewise.
9376
9377 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9378
9379         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9380
9381 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9382
9383         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9384
9385 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9386
9387         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9388         able to start inferiors using a shell.
9389         (New remote packets): Announce new packet "QStartupWithShell".
9390         * remote.c: Add PACKET_QStartupWithShell.
9391         (extended_remote_create_inferior): Handle new
9392         PACKET_QStartupWithShell.
9393         (remote_protocol_features) <QStartupWithShell>: New entry for
9394         PACKET_QStartupWithShell.
9395         (_initialize_remote): Call "add_packet_config_cmd" for
9396         QStartupShell.
9397
9398 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9399             Pedro Alves  <palves@redhat.com>
9400
9401         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9402         and "nat/fork-inferior.h".
9403         * common/common-inferior.h: New file, with contents from
9404         "gdb/inferior.h".
9405         * commom/common-utils.c: Include "common-utils.h".
9406         (stringify_argv): New function.
9407         * common/common-utils.h (stringify_argv): New prototype.
9408         * configure.nat: Add "fork-inferior.o" as a dependency for
9409         "*linux*", "fbsd*" and "nbsd*" hosts.
9410         * corefile.c (get_exec_file): Update comment.
9411         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9412         instead of "startup_inferior".
9413         (darwin_create_inferior): Call "add_thread_silent" after
9414         "fork_inferior".
9415         * fork-child.c: Cleanup unnecessary includes.
9416         (SHELL_FILE): Move to "common/common-fork-child.c".
9417         (environ): Likewise.
9418         (exec_wrapper): Initialize.
9419         (get_exec_wrapper): New function.
9420         (breakup_args): Move to "common/common-fork-child.c"; rename to
9421         "breakup_args_for_exec".
9422         (escape_bang_in_quoted_argument): Move to
9423         "common/common-fork-child.c".
9424         (saved_ui): New variable.
9425         (prefork_hook): New function.
9426         (postfork_hook): Likewise.
9427         (postfork_child_hook): Likewise.
9428         (gdb_startup_inferior): Likewise.
9429         (fork_inferior): Move to "common/common-fork-child.c".  Update
9430         function to support gdbserver.
9431         (startup_inferior): Likewise.
9432         * gdbcore.h (get_exec_file): Remove declaration.
9433         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9434         instead of "startup_inferior".  Call "add_thread_silent" after
9435         "fork_inferior".
9436         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9437         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9438         instead of "startup_inferior".  Call "add_thread_silent" after
9439         "fork_inferior".
9440         * inferior.h: Include "common-inferior.h".
9441         (trace_start_error): Move to "common/common-utils.h".
9442         (trace_start_error_with_name): Likewise.
9443         (fork_inferior): Move prototype to "nat/fork-inferior.h".
9444         (startup_inferior): Likewise.
9445         (gdb_startup_inferior): New prototype.
9446         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9447         * nat/fork-inferior.h: New file.
9448         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9449         instead of "startup_inferior".  Call "add_thread_silent" after
9450         "fork_inferior".
9451         * target.h (target_terminal_init): Move prototype to
9452         "target/target.h".
9453         (target_terminal_inferior): Likewise.
9454         (target_terminal_ours): Likewise.
9455         * target/target.h (target_terminal_init): New prototype, moved
9456         from "target.h".
9457         (target_terminal_inferior): Likewise.
9458         (target_terminal_ours): Likewise.
9459         * utils.c (gdb_flush_out_err): New function.
9460
9461 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9462
9463         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9464         * common/common-gdbthread.h: New file, with parts from
9465         "gdb/gdbthread.h".
9466         * gdbthread.h: Include "common-gdbthread.h".
9467         (switch_to_thread): Moved to "common/common-gdbthread.h".
9468
9469 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9470
9471         * Makefile.in (SFILES): Add "common/job-control.c".
9472         (HFILES_NO_SRCDIR): Add "common/job-control.h".
9473         (COMMON_OBS): Add "job-control.o".
9474         * common/job-control.c: New file, with contents from
9475         "gdb/inflow.c".
9476         * common/job-control.h: New file, with contents from "terminal.h".
9477         * fork-child.c: Include "job-control.h".
9478         * inflow.c: Include "job-control.h".
9479         (gdb_setpgid): Move to "common/common-inflow.c".
9480         (_initialize_inflow): Move setting of "job_control" to
9481         "handle_job_control".
9482         * terminal.h (job_control): Moved to "common/common-terminal.h".
9483         (gdb_setpgid): Likewise.
9484         * top.c: Include "job_control.h".
9485         * utils.c: Likewise.
9486         (job_control): Moved to "job-control.c".
9487
9488 2017-06-07  Pedro Alves  <palves@redhat.com>
9489
9490         * Makefile.in (SFILES): Add gdb_regex.c.
9491         (COMMON_OBS): Add gdb_regex.o.
9492         * ada-lang.c (ada_add_standard_exceptions)
9493         (ada_add_exceptions_from_frame, name_matches_regex)
9494         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9495         parameter type to compiled_regex.  Adjust.
9496         (ada_exceptions_list): Use compiled_regex.
9497         * break-catch-throw.c (exception_catchpoint::pattern): Now a
9498         std::unique_ptr<compiled_regex>.
9499         (exception_catchpoint::~exception_catchpoint): Remove regfree
9500         call.
9501         (check_status_exception_catchpoint): Adjust to use compiled_regex.
9502         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9503         * breakpoint.c (solib_catchpoint::compiled): Now a
9504         std::unique_ptr<compiled_regex>.
9505         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9506         (check_status_catch_solib): Adjust to use compiled_regex.
9507         (add_solib_catchpoint): Adjust to use compiled_regex.
9508         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9509         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9510         compiled_regex reference.  Adjust to use it.
9511         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9512         declaration.  Include "gdb_regex.h".
9513         (apropos_cmd): Change regex parameter to compiled_regex reference.
9514         * gdb_regex.c: New file.
9515         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9516         declarations.
9517         (class compiled_regex): New.
9518         * linux-tdep.c: Include "common/gdb_optional.h".
9519         (struct mapping_regexes): New, factored out from
9520         mapping_is_anonymous_p, and adjusted to use compiled_regex.
9521         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9522         gdb::optional and remove cleanups.  Adjust to compiled_regex.
9523         * probe.c: Include "common/gdb_optional.h".
9524         (collect_probes): Use compiled_regex and gdb::optional and remove
9525         cleanups.
9526         * skip.c: Include "common/gdb_optional.h".
9527         (skiplist_entry::compiled_function_regexp): Now a
9528         gdb::optional<compiled_regex>.
9529         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9530         (free_skiplist_entry): Remove regfree call.
9531         (compile_skip_regexp, skip_rfunction_p): Adjust to use
9532         compiled_regex and gdb::optional.
9533         * symtab.c: Include "common/gdb_optional.h".
9534         (search_symbols): Use compiled_regex and gdb::optional.
9535         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9536         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
9537         to gdb_regex.c.
9538
9539 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9540
9541         * regcache.c (regcache::save): Avoid buffer use.
9542         (regcache::dump): Likewise.
9543
9544 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9545
9546         * sh-tdep.c (sh_pseudo_register_read): Remove
9547         MAX_REGISTER_SIZE.
9548         (sh_pseudo_register_write): Likewise.
9549         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9550         (sh64_pseudo_register_write): Likewise
9551
9552 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9553
9554         * aarch64-tdep.c (aarch64_store_return_value): Use
9555         V_REGISTER_SIZE.
9556         (aarch64_pseudo_read_value): Likewise.
9557         (aarch64_pseudo_write): Likewise.
9558
9559 2017-06-06  Yao Qi  <yao.qi@linaro.org>
9560
9561         * regformats/regdef.h (set_register_cache): Remove the
9562         declaration.
9563
9564 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
9565
9566         * frame.c (frame_unwind_register_signed): Use
9567         frame_unwind_register_value.
9568
9569 2017-06-06  Pedro Alves  <palves@redhat.com>
9570
9571         PR breakpoints/21553
9572         * breakpoint.c (create_breakpoints_sal_default)
9573         (init_breakpoint_sal, create_breakpoint_sal): Use
9574         gdb::unique_xmalloc_ptr for string parameters.
9575         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9576         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
9577         (base_breakpoint_create_breakpoints_sal)
9578         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9579         (strace_marker_create_breakpoints_sal)
9580         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9581         string parameters.
9582         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9583         gdb::unique_xmalloc_ptr for string parameters.
9584         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9585         parameters.
9586
9587 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9588
9589         * alpha-tdep.c (alpha_register_to_value): Use
9590         get_frame_register_value.
9591         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9592
9593 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9594
9595         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9596         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9597         (ia64_value_to_register): Likewise.
9598         (ia64_extract_return_value): Likewise.
9599         (ia64_store_return_value): Likewise.
9600         (ia64_push_dummy_call): Likewise.
9601
9602 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
9603
9604         GDB 8.0 released.
9605
9606 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
9607
9608         * x86-linux-nat.c (struct arch_lwp_info): Remove.
9609
9610 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
9611
9612         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9613         parameter.
9614         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9615
9616 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
9617
9618         * event-loop.c (poll_timers): Unallocate timer using delete
9619         instead of xfree.
9620
9621 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9622
9623         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9624         (struct breakpoint) <~breakpoint>: New.
9625         (struct watchpoint): Inherit from breakpoint.
9626         <~watchpoint>: New.
9627         <base>: Remove.
9628         (struct tracepoint): Inherit from breakpoint.
9629         <base>: Remove.
9630         * breakpoint.c (longjmp_breakpoint_ops): Remove.
9631         (struct longjmp_breakpoint): Inherit from breakpoint.
9632         <~longjmp_breakpoint>: New.
9633         <base>: Remove.
9634         (new_breakpoint_from_type): Remove casts.
9635         (watchpoint_in_thread_scope): Remove reference to base field.
9636         (watchpoint_del_at_next_stop): Likewise.
9637         (update_watchpoint): Likewise.
9638         (watchpoint_check): Likewise.
9639         (bpstat_check_watchpoint): Likewise.
9640         (set_longjmp_breakpoint): Likewise.
9641         (struct fork_catchpoint): Inherit from breakpoint.
9642         <base>: Remove.
9643         (struct solib_catchpoint): Inherit from breakpoint.
9644         <~solib_catchpoint>: New.
9645         <base>: Remove.
9646         (dtor_catch_solib): Change to ...
9647         (solib_catchpoint::~solib_catchpoint): ... this.
9648         (breakpoint_hit_catch_solib): Remove reference to base field.
9649         (add_solib_catchpoint): Likewise.
9650         (create_fork_vfork_event_catchpoint): Likewise.
9651         (struct exec_catchpoint): Inherit from breakpoint.
9652         <~exec_catchpoint>: New.
9653         <base>: Remove.
9654         (dtor_catch_exec): Change to ...
9655         (exec_catchpoint::~exec_catchpoint): ... this.
9656         (dtor_watchpoint): Change to ...
9657         (watchpoint::~watchpoint): ... this.
9658         (watch_command_1): Remove reference to base field.
9659         (catch_exec_command_1): Likewise.
9660         (base_breakpoint_dtor): Change to ...
9661         (breakpoint::~breakpoint): ... this.
9662         (base_breakpoint_ops): Remove dtor field value.
9663         (longjmp_bkpt_dtor): Change to ...
9664         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9665         (strace_marker_create_breakpoints_sal): Remove reference to base
9666         field.
9667         (delete_breakpoint): Don't manually call breakpoint destructor.
9668         (create_tracepoint_from_upload): Remove reference to base field.
9669         (trace_pass_set_count): Likewise.
9670         (initialize_breakpoint_ops): Don't initialize
9671         momentary_breakpoint_ops, don't set dtors.
9672         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9673         <~ada_catchpoint>: New.
9674         <base>: Remove.
9675         (create_excep_cond_exprs): Remove reference to base field.
9676         (dtor_exception): Change to ...
9677         (ada_catchpoint::~ada_catchpoint): ... this.
9678         (dtor_catch_exception): Remove.
9679         (dtor_catch_exception_unhandled): Remove.
9680         (dtor_catch_assert): Remove.
9681         (create_ada_exception_catchpoint): Remove reference to base
9682         field.
9683         (initialize_ada_catchpoint_ops): Don't set dtors.
9684         * break-catch-sig.c (struct signal_catchpoint): Inherit from
9685         breakpoint.
9686         <~signal_catchpoint>: New.
9687         <base>: Remove.
9688         (signal_catchpoint_dtor): Change to ...
9689         (signal_catchpoint::~signal_catchpoint): ... this.
9690         (create_signal_catchpoint): Remove reference to base field.
9691         (initialize_signal_catchpoint_ops): Don't set dtor.
9692         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
9693         from breakpoint.
9694         <~syscall_catchpoint>: New.
9695         <base>: Remove.
9696         (dtor_catch_syscall): Change to ...
9697         (syscall_catchpoint::~syscall_catchpoint): ... this.
9698         (create_syscall_event_catchpoint): Remove reference to base
9699         field.
9700         (initialize_syscall_catchpoint_ops): Don't set dtor.
9701         * break-catch-throw.c (struct exception_catchpoint): Inherit
9702         from breakpoint.
9703         <~exception_catchpoint>: New.
9704         <base>: Remove.
9705         (dtor_exception_catchpoint): Change to ...
9706         (exception_catchpoint::~exception_catchpoint): ... this.
9707         (handle_gnu_v3_exceptions): Remove reference to base field.
9708         (initialize_throw_catchpoint_ops): Don't set dtor.
9709         * ctf.c (ctf_get_traceframe_address): Remove reference to base
9710         field.
9711         * remote.c (remote_get_tracepoint_status): Likewise.
9712         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
9713         * tracefile.c (tracefile_fetch_registers): Likewise.
9714         * tracepoint.c (actions_command): Likewise.
9715         (validate_actionline): Likewise.
9716         (tfind_1): Likewise.
9717         (get_traceframe_location): Likewise.
9718         (find_matching_tracepoint_location): Likewise.
9719         (parse_tracepoint_status): Likewise.
9720         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
9721
9722 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9723
9724         * breakpoint.c (struct longjmp_breakpoint): New struct.
9725         (is_tracepoint_type): Change return type to bool.
9726         (is_longjmp_type): New function.
9727         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
9728         (set_raw_breakpoint_without_location): Use
9729         new_breakpoint_from_type.
9730         (set_raw_breakpoint): Likewise.
9731
9732 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9733
9734         * breakpoint.c (new_breakpoint_from_type): New function.
9735         (create_breakpoint_sal): Use new_breakpoint_from_type and
9736         unique_ptr.
9737         (create_breakpoint): Likewise.
9738
9739 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
9740
9741         * memattr.c (mem_info_command): Rename to ...
9742         (info_mem_command): ... this.
9743         (mem_enable_command): Rename to ...
9744         (enable_mem_command): ... this.
9745         (mem_disable_command): Rename to ...
9746         (disable_mem_command): ... this.
9747         (mem_delete_command): Rename to ...
9748         (delete_mem_command): ... this.
9749         (_initialize_mem): Adjust function names.
9750
9751 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9752
9753         * btrace.c (handle_pt_insn_events): New.
9754         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
9755         STATUS.  Split into this and ...
9756         (handle_pt_insn_event_flags): ... this.
9757
9758 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9759
9760         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
9761         and struct pt_insn.resynced.
9762         * configure: Regenerated.
9763         * config.in: Regenerated.
9764
9765 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9766
9767         * btrace.c (ftrace_find_call_by_number): New function.
9768         (ftrace_new_function): Store objects, not pointers.
9769         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
9770         ftrace_new_gap, ftrace_update_function,
9771         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
9772         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
9773         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
9774         btrace_ends_with_single_insn, btrace_call_get): Account for
9775         btrace_thread_info::functions now storing objects.
9776         * btrace.h (struct btrace_thread_info): Add constructor.
9777         (struct btrace_thread_info) <functions>: Make std::vector.
9778         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
9779         Initialize with default values.
9780         * record-btrace.c (record_btrace_frame_sniffer): Account for
9781         btrace_thread_info::functions now storing objects.
9782
9783 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9784
9785         * btrace.c: Remove typedef bfun_s.
9786         (ftrace_new_gap): Directly add gaps to the list of gaps.
9787         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
9788         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
9789         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
9790         instead of gdb VEC.
9791
9792 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9793
9794         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
9795         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
9796         with btrace_thread_info::next_segment and
9797         btrace_thread_info::prev_segment.
9798         * btrace.h: Remove struct btrace_func_link.
9799         (struct btrace_function): Replace pair of function segment pointers
9800         with pair of indices.
9801         * python/py-record-btrace.c (btpy_call_prev_sibling,
9802         btpy_call_next_sibling): Replace references to
9803         btrace_thread_info::segment with btrace_thread_info::next_segment and
9804         btrace_thread_info::prev_segment.
9805         * record-btrace.c (record_btrace_frame_this_id): Use
9806         btrace_find_call_by_number.
9807
9808 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9809
9810         * btrace.c (ftrace_new_function, ftrace_fixup_level,
9811         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9812         btrace_insn_next, btrace_insn_prev): Remove references to
9813         btrace_thread_info::flow.
9814         * btrace.h (struct btrace_function): Remove FLOW.
9815
9816 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9817
9818         * btrace.c (ftrace_find_call_by_number): New function.
9819         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
9820         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
9821         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
9822         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
9823         index.
9824         * btrace.h (struct btrace_function): Turn UP into an index.
9825         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
9826         as an index.
9827         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
9828         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
9829         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
9830
9831 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9832
9833         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9834         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9835         ftrace_update_function, ftrace_compute_global_level_offset,
9836         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
9837         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
9838         btrace_insn_end, btrace_is_empty): Remove references to
9839         btrace_thread_info::begin and btrace_thread_info::end.
9840         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
9841         (struct btrace_thread_info) <functions>: Adjust comment.
9842         * record-btrace.c (record_btrace_start_replaying): Remove reference to
9843         btrace_thread_info::begin.
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): Remove arguments that implicitly were always
9850         BTINFO->END.
9851         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
9852         Don't pass BTINFO->END.
9853
9854 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9855
9856         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
9857         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
9858         btrace_find_insn_by_number): Replace function segment pointer with
9859         index.
9860         (btrace_insn_cmp): Simplify.
9861         * btrace.h: (struct btrace_insn_iterator) Rename index to
9862         insn_index.  Replace function segment pointer with index into function
9863         segment vector.
9864         * record-btrace.c (record_btrace_call_history): Replace function
9865         segment pointer use with index.
9866         (record_btrace_frame_sniffer): Retrieve function call segment through
9867         vector.
9868         (record_btrace_set_replay): Remove defunc't safety check.
9869
9870 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9871
9872         * btrace.c (btrace_ends_with_single_insn): New function.
9873         (btrace_call_get, btrace_call_number, btrace_call_begin,
9874         btrace_call_end, btrace_call_next, btrace_call_prev,
9875         btrace_find_call_by_number): Use index into call segment vector
9876         instead of pointer.
9877         (btrace_call_cmp): Simplify.
9878         * btrace.h (struct btrace_call_iterator): Replace function call segment
9879         pointer with index into vector.
9880         * record-btrace.c (record_btrace_call_history): Use index instead of
9881         pointer.
9882
9883 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9884
9885         * btrace.c (btrace_insn_begin, btrace_insn_end,
9886         btrace_find_insn_by_number): Add btinfo to iterator.
9887         * btrace.h (struct btrace_insn_iterator): Add btinfo.
9888
9889 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9890
9891         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
9892         and save pointers directly.
9893         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
9894         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
9895         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
9896         changed signature of functions.
9897         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
9898         (btrace_fetch): Remove code that adds btrace_function pointers to
9899         vector of btrace_functions.
9900         (btrace_clear): Simplify freeing vector of btrace_functions.
9901
9902 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9903
9904         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
9905         Replace VEC_* with std::vector functions.
9906         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
9907         (struct btrace_thread_info)<functions>: Change type to std::vector.
9908
9909 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9910
9911         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
9912         "Removed targets and native configurations" up.  Merge duplicate
9913         "New commands" sub-sections.  Add "New options" sub-sections.
9914
9915 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
9916
9917         * defs.h (copy_integer_to_size): New declaration.
9918         * findvar.c (copy_integer_to_size): New function.
9919         (do_cint_test): New selftest function.
9920         (copy_integer_to_size_test): Likewise.
9921         (_initialize_findvar): Likewise.
9922         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
9923         (mips_fbsd_collect_reg): Use raw_collect_integer.
9924         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
9925         (mips64_fill_gregset): Use raw_collect_integer
9926         (mips64_fill_fpregset): Use raw_supply_integer.
9927         * regcache.c (regcache::raw_supply_integer): New function.
9928         (regcache::raw_collect_integer): Likewise.
9929         * regcache.h: (regcache::raw_supply_integer): New declaration.
9930         (regcache::raw_collect_integer): Likewise.
9931
9932 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9933
9934         * Makefile.in (SFILES): Add gdbarch-selftests.c.
9935         (COMMON_OBS): Add gdbarch-selftests.o.
9936         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
9937         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
9938         * gdbarch-selftests.c: New file.
9939         * regcache.h (regcache) <~regcache>: Mark it virtual if
9940         GDB_SELF_TEST.
9941         <raw_write>: Likewise.
9942
9943 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9944
9945         * regcache.c (current_regcache): Change it to
9946         regcache::current_regcache.
9947         (regcache_observer_target_changed): Update.
9948         (regcache_thread_ptid_changed): Make it a regcache static
9949         method.
9950         (regcache_thread_ptid_changed): Update.
9951         (class regcache_access): New.
9952         (current_regcache_test): Update.
9953         (_initialize_regcache): Update.
9954         * regcache.h: Include forward_list.
9955         (regcache): Declare regcache_thread_ptid_changed and declare
9956         registers_changed_ptid as friend.
9957
9958 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9959
9960         * i387-tdep.c (i387_register_to_value): Use register_size
9961         instead of TYPE_LENGTH.
9962         * m68k-tdep.c (m68k_register_to_value): Likewise.
9963
9964 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9965
9966         * i387-tdep.c (i387_convert_register_p): Return false if type
9967         code isn't TYPE_CODE_FLT.
9968
9969 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9970
9971         * alpha-tdep.c (alpha_convert_register_p): Return true if type
9972         length is 4.
9973         (alpha_register_to_value): Remove type length check.
9974         (alpha_value_to_register): Likewise.
9975
9976 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9977
9978         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
9979         TYPE_CODE_FLT.
9980
9981 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9982
9983         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
9984         TYPE_CODE_FLT or not.
9985
9986 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9987
9988         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
9989         * avr-tdep.c (avr_gdbarch_init): Likewise.
9990         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9991         * cris-tdep.c (cris_gdbarch_init): Likewise.
9992         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9993         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9994         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9995         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
9996         * mep-tdep.c (mep_gdbarch_init): Likewise.
9997         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9998         * mips-tdep.c (mips_gdbarch_init): Likewise.
9999         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10000         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10001         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10002         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10003         * v850-tdep.c (v850_gdbarch_init): Likewise.
10004
10005 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10006
10007         * selftest-arch.c (tests_with_arch): Call registers_changed
10008         and reinit_frame_cache.
10009         * selftest.c (run_self_tests): Likewise.
10010
10011 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10012
10013         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10014         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10015
10016 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10017
10018         * rl78-tdep.c (rl78_gdbarch_init): Don't call
10019         set_gdbarch_print_insn.
10020
10021 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10022
10023         * h8300-tdep.c (h8300_gdbarch_init): Don't call
10024         set_gdbarch_print_insn.
10025
10026 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10027
10028         * alpha-tdep.c (alpha_gdbarch_init): Don't call
10029         set_gdbarch_print_insn.
10030         * arc-tdep.c (arc_gdbarch_init): Likewise.
10031         * arch-utils.c: include dis-asm.h.
10032         (default_print_insn): New function.
10033         * arch-utils.h (default_print_insn): Declare.
10034         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10035         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10036         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10037         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10038         * frv-tdep.c (frv_gdbarch_init): Likewise.
10039         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10040         * gdbarch.sh (print_insn): Use default_print_insn.
10041         * gdbarch.c: Regenerated.
10042         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10043         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10044         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10045         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10046         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10047         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10048         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10049         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10050         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10051         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10052         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10053         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10054         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10055         * mt-tdep.c (mt_gdbarch_init): Likewise.
10056         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10057         * nios2-tdep.c (nios2_print_insn): Remove.
10058         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10059         * rx-tdep.c (rx_gdbarch_init): Likewise.
10060         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10061         * score-tdep.c (score_print_insn): Remove.
10062         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10063         * sh-tdep.c (sh_gdbarch_init): Likewise.
10064         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10065         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10066         * tic6x-tdep.c (tic6x_print_insn): Remove.
10067         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10068         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10069         * v850-tdep.c (v850_gdbarch_init): Likewise.
10070         * vax-tdep.c (vax_gdbarch_init): Likewise.
10071         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10072         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10073
10074 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10075
10076         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10077         (MIPS_FP0_REGNUM): Remove.
10078         (MIPS_FSR_REGNUM): Remove.
10079         (mips_fbsd_supply_fpregs): Use mips_regnum.
10080         (mips_fbsd_supply_gregs): Likewise.
10081         (mips_fbsd_collect_fpregs): Likewise.
10082         (mips_fbsd_collect_gregs): Likewise.
10083
10084 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10085
10086         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10087         (getpfpregs_supplies): New function.
10088         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10089         getfpregs_supplies.
10090         (mips_fbsd_store_inferior_registers): Likewise.
10091
10092 2017-05-22  Pedro Alves <palves@redhat.com>
10093
10094         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10095         maintainer.
10096
10097 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
10098
10099         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10100         (store_register): Likewise.
10101         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10102         (get_decimal_float_return_value): Likewise.
10103         (do_ppc_sysv_return_value): Likewise.
10104         (ppc64_sysv_abi_push_integer): Likewise.
10105         (ppc64_sysv_abi_push_freg): Likewise.
10106         (ppc64_sysv_abi_return_value_base): Likewise.
10107         (ppc64_sysv_abi_return_value): Likewise.
10108         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10109         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10110         * rs6000-nat.c: Likewise.
10111         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10112         (rs6000_value_to_register): Likewise.
10113         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10114
10115 2017-05-21  Tom Tromey  <tom@tromey.com>
10116
10117         PR rust/21466:
10118         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10119         arrays as "[T]", not "[T; ]".
10120
10121 2017-05-19  Tom Tromey  <tom@tromey.com>
10122
10123         PR rust/21484:
10124         * rust-lang.c (exp_descriptor_rust): New function.
10125         (rust_language_defn): Use it.
10126         * p-lang.c (pascal_language_defn): Update.
10127         * opencl-lang.c (opencl_language_defn): Update.
10128         * objc-lang.c (objc_language_defn): Update.
10129         * m2-lang.c (m2_language_defn): Update.
10130         * language.h (struct language_defn)
10131         <la_watch_location_expression>: New member.
10132         * language.c (unknown_language_defn, auto_language_defn)
10133         (local_language_defn): Update.
10134         * go-lang.c (go_language_defn): Update.
10135         * f-lang.c (f_language_defn): Update.
10136         * d-lang.c (d_language_defn): Update.
10137         * c-lang.h (c_watch_location_expression): Declare.
10138         * c-lang.c (c_watch_location_expression): New function.
10139         (c_language_defn, cplus_language_defn, asm_language_defn)
10140         (minimal_language_defn): Use it.
10141         * breakpoint.c (watch_command_1): Call
10142         la_watch_location_expression.
10143         * ada-lang.c (ada_language_defn): Update.
10144
10145 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10146
10147         PR tui/21482
10148         * gdb_curses.h (NOMACROS): Define.
10149         (NCURSES_NOMACROS): Define.
10150
10151 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10152
10153         PR tui/21482
10154         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10155         arg to char *.
10156         * tui/tui-wingeneral.c (box_win): Likewise.
10157         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10158         (tui_show_source_line): Likewise.
10159         (tui_show_exec_info_content): Likewise.
10160
10161 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10162
10163         * sparc-tdep.c (sparc_structure_return_p)
10164         (sparc_arg_on_registers_p): New functions.
10165         (sparc32_store_arguments): Use them.
10166         * sparc64-tdep.c (sparc64_16_byte_align_p)
10167         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10168         Handle TYPE_CODE_ARRAY.
10169
10170 2017-05-17  Yao Qi  <yao.qi@linaro.org>
10171
10172         * cli/cli-decode.c (add_alias_cmd): New function.
10173         * command.h (add_alias_cmd): Declare.
10174         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10175         instead call add_alias_cmd.
10176
10177 2017-05-17  Pedro Alves  <palves@redhat.com>
10178
10179         * Makefile.in (nat_extra_makefile_frag): Rename to ...
10180         (nat_makefile_frag): ... this.  All references updated.
10181         * configure.ac: Likewise.
10182         * configure.nat: Likewise.  Enhance comments.
10183         * configure: Regenerate.
10184
10185 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10186
10187         * procfs.c (procfs_create_inferior): Change prototype to match
10188         definition.
10189
10190 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
10191
10192         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10193         C++ compiler warning.
10194
10195 2017-05-12  Tom Tromey  <tom@tromey.com>
10196
10197         PR rust/21483:
10198         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10199         recurse, just call value_struct_elt directly.
10200
10201 2017-05-12  Tom Tromey  <tom@tromey.com>
10202
10203         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10204         OP_RUST_ARRAY>: Fix.
10205
10206 2017-05-12  Tom Tromey  <tom@tromey.com>
10207
10208         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10209
10210 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10211
10212         * regcache.c: Include <forward_list>.
10213         (struct regcache_list): Remove.
10214         (current_regcache): Update.
10215         (get_thread_arch_aspace_regcache): Update for std::forward_list.
10216         (regcache_thread_ptid_changed): Likewise.
10217         (registers_changed_ptid): Likewise.
10218         (current_regcache_size): Likewise.
10219
10220 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10221
10222         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10223         (current_regcache_size): New function.
10224         (current_regcache_test): New function.
10225         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10226
10227 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10228
10229         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10230         (print_gp_register_row): Use get_frame_register_value.
10231
10232 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10233
10234         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10235         (mips_supply_fpregset): Likewise.
10236         (mips64_supply_gregset): Likewise.
10237
10238 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10239
10240         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
10241         regcache->raw_supply_zeroed.
10242
10243 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10244
10245         * configure.nat: Rearrange 'case' statements to match
10246         host before cpu.
10247
10248 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10249
10250         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
10251         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10252         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
10253         "@nat_extra_makefile_frag@".
10254         (Makefile): Remove dependency on "@frags@".
10255         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10256         (data-directory/Makefile): Likewise.
10257         * config/aarch64/linux.mh: Deleted; moved contents to
10258         "gdb/configure.nat".
10259         * config/alpha/alpha-linux.mh: Likewise.
10260         * config/alpha/nbsd.mh: Likewise.
10261         * config/arm/linux.mh: Likewise.
10262         * config/arm/nbsdelf.mh: Likewise.
10263         * config/i386/cygwin.mh: Likewise.
10264         * config/i386/cygwin64.mh: Likewise.
10265         * config/i386/darwin.mh: Likewise.
10266         * config/i386/fbsd.mh: Likewise.
10267         * config/i386/fbsd64.mh: Likewise.
10268         * config/i386/go32.mh: Likewise.
10269         * config/i386/i386gnu.mh: Likewise.
10270         * config/i386/i386sol2.mh: Likewise.
10271         * config/i386/linux.mh: Likewise.
10272         * config/i386/linux64.mh: Likewise.
10273         * config/i386/mingw.mh: Likewise.
10274         * config/i386/mingw64.mh: Likewise.
10275         * config/i386/nbsd64.mh: Likewise.
10276         * config/i386/nbsdelf.mh: Likewise.
10277         * config/i386/nto.mh: Likewise.
10278         * config/i386/obsd.mh: Likewise.
10279         * config/i386/obsd64.mh: Likewise.
10280         * config/i386/sol2-64.mh: Likewise.
10281         * config/ia64/linux.mh: Likewise.
10282         * config/m32r/linux.mh: Likewise.
10283         * config/m68k/linux.mh: Likewise.
10284         * config/m68k/nbsdelf.mh: Likewise.
10285         * config/m68k/obsd.mh: Likewise.
10286         * config/m88k/obsd.mh: Likewise.
10287         * config/mips/fbsd.mh: Likewise.
10288         * config/mips/linux.mh: Likewise.
10289         * config/mips/nbsd.mh: Likewise.
10290         * config/mips/obsd64.mh: Likewise.
10291         * config/pa/linux.mh: Likewise.
10292         * config/pa/nbsd.mh: Likewise.
10293         * config/pa/obsd.mh: Likewise.
10294         * config/powerpc/aix.mh: Likewise.
10295         * config/powerpc/fbsd.mh: Likewise.
10296         * config/powerpc/linux.mh: Likewise.
10297         * config/powerpc/nbsd.mh: Likewise.
10298         * config/powerpc/obsd.mh: Likewise.
10299         * config/powerpc/ppc64-linux.mh: Likewise.
10300         * config/powerpc/spu-linux.mh: Likewise.
10301         * config/s390/linux.mh: Likewise.
10302         * config/sh/nbsd.mh: Likewise.
10303         * config/sparc/fbsd.mh: Likewise.
10304         * config/sparc/linux.mh: Likewise.
10305         * config/sparc/linux64.mh: Likewise.
10306         * config/sparc/nbsd64.mh: Likewise.
10307         * config/sparc/nbsdelf.mh: Likewise.
10308         * config/sparc/obsd64.mh: Likewise.
10309         * config/sparc/sol2.mh: Likewise.
10310         * config/tilegx/linux.mh: Likewise.
10311         * config/vax/nbsdelf.mh: Likewise.
10312         * config/vax/obsd.mh: Likewise.
10313         * config/xtensa/linux.mh: Likewise.
10314         * config/i386/i386gnu.mn: New file, with excerpts from
10315         "config/i386/i386gnu.mh".
10316         * configure: Regenerate.
10317         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10318         *.mh files under "gdb/config".
10319         * configure.nat: New file, with contents from the
10320         "gdb/config/*/*.mh" files.
10321
10322 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
10323
10324         * btrace.c (btrace_clear): Free insn vector.
10325
10326 2017-05-05  Pedro Alves  <palves@redhat.com>
10327
10328         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10329         * configure: Regenerate.
10330
10331 2017-05-04  Pedro Alves  <palves@redhat.com>
10332
10333         * Makefile.in (SFILES): Add progspace-and-thread.c.
10334         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10335         (COMMON_OBS): Add progspace-and-thread.o.
10336         * breakpoint.c: Include "progspace-and-thread.h".
10337         (update_inserted_breakpoint_locations)
10338         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10339         Use scoped_restore_current_pspace_and_thread.
10340         (create_std_terminate_master_breakpoint): Use
10341         scoped_restore_current_program_space.
10342         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10343         (print_breakpoint_location): Use
10344         scoped_restore_current_program_space.
10345         (bp_loc_is_permanent): Use
10346         scoped_restore_current_pspace_and_thread.
10347         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10348         (download_tracepoint_locations): Use
10349         scoped_restore_current_pspace_and_thread.
10350         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10351         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10352         (enum step_over_calls_kind): Moved from inferior.h.
10353         (class scoped_restore_current_thread): New class.
10354         * gdbthread.h (make_cleanup_restore_current_thread): Delete
10355         declaration.
10356         (scoped_restore_current_thread): New class.
10357         * infcmd.c: Include "common/gdb_optional.h".
10358         (continue_1, proceed_after_attach): Use
10359         scoped_restore_current_thread.
10360         (notice_new_inferior): Use scoped_restore_current_thread.
10361         * inferior.c: Include "progspace-and-thread.h".
10362         (restore_inferior, save_current_inferior): Delete.
10363         (add_inferior_command, clone_inferior_command): Use
10364         scoped_restore_current_pspace_and_thread.
10365         * inferior.h (scoped_restore_current_inferior): New class.
10366         * infrun.c: Include "progspace-and-thread.h" and
10367         "common/gdb_optional.h".
10368         (follow_fork_inferior): Use
10369         scoped_restore_current_pspace_and_thread.
10370         (scoped_restore_exited_inferior): New class.
10371         (handle_vfork_child_exec_or_exit): Use
10372         scoped_restore_exited_inferior,
10373         scoped_restore_current_pspace_and_thread,
10374         scoped_restore_current_thread and scoped_restore.
10375         (fetch_inferior_event): Use scoped_restore_current_thread.
10376         * linespec.c (decode_line_full, decode_line_1): Use
10377         scoped_restore_current_program_space.
10378         * mi/mi-main.c: Include "progspace-and-thread.h".
10379         (exec_continue): Use scoped_restore_current_thread.
10380         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10381         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10382         * proc-service.c (ps_pglobal_lookup): Use
10383         scoped_restore_current_program_space.
10384         * progspace-and-thread.c: New file.
10385         * progspace-and-thread.h: New file.
10386         * progspace.c (release_program_space, clone_program_space): Use
10387         scoped_restore_current_program_space.
10388         (restore_program_space, save_current_program_space)
10389         (save_current_space_and_thread): Delete.
10390         (switch_to_program_space_and_thread): Moved to
10391         progspace-and-thread.c.
10392         * progspace.h (save_current_program_space)
10393         (save_current_space_and_thread): Delete declarations.
10394         (scoped_restore_current_program_space): New class.
10395         * remote.c (remote_btrace_maybe_reopen): Use
10396         scoped_restore_current_thread.
10397         * symtab.c: Include "progspace-and-thread.h".
10398         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10399         * thread.c (print_thread_info_1): Use
10400         scoped_restore_current_thread.
10401         (struct current_thread_cleanup): Delete.
10402         (do_restore_current_thread_cleanup)
10403         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10404         (scoped_restore_current_thread::~scoped_restore_current_thread):
10405         ... this new dtor.
10406         (make_cleanup_restore_current_thread): Rename/convert to ...
10407         (scoped_restore_current_thread::scoped_restore_current_thread):
10408         ... this new ctor.
10409         (thread_apply_all_command): Use scoped_restore_current_thread.
10410         (thread_apply_command): Use scoped_restore_current_thread.
10411         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10412         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10413
10414 2017-05-04  Pedro Alves  <palves@redhat.com>
10415
10416         * thread.c (make_cleanup_restore_current_thread): Move
10417         find_thread_ptid call before the is_stopped call.  Assert that the
10418         thread is found.  Replace is_stopped call by checking the thread's
10419         state directly.  Remove unnecessary NULL-thread check.
10420
10421 2017-05-04  Pedro Alves  <palves@redhat.com>
10422
10423         * corelow.c (thread_section_name): New class.
10424         (get_core_register_section, get_core_siginfo): Use it.
10425
10426 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10427
10428         * corelow.c (sniff_core_bfd): Remove extra semicolon.
10429         (get_core_register_section): Remove xfree of NULL pointer.
10430
10431 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
10432
10433         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10434         * regcache.c (regcache::raw_supply_zeroed): New function.
10435         * regcache.h (regcache::raw_supply_zeroed): New declaration.
10436
10437 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10438
10439         * gdbarch.sh: Remove commented out definition of
10440         TARGET_CHAR_BIT.
10441         * gdbarch.h: Re-generate.
10442
10443 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
10444
10445         * configure: Regenerate.
10446
10447 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
10448
10449         * solib-target.c (solib_target_relocate_section_addresses):
10450         Remove num_section_bases, num_bases, segment_bases variables.
10451
10452 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10453
10454         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10455
10456 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10457
10458         * solib-target.c: Include <vector>
10459         (struct lm_info_target) <~lm_info_target>: Remove.
10460         <segment_bases, section_bases>: Change type to
10461         std::vector<CORE_ADDR>.
10462         (library_list_start_segment, library_list_start_section,
10463         library_list_end_library,
10464         solib_target_relocate_section_addresses): Adjust.
10465
10466 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10467
10468         * gdbarch.sh (software_single_step): Change return type to
10469         std::vector<CORE_ADDR>.
10470         * gdbarch.c, gdbarch.h: Re-generate.
10471         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10472         Adjust.
10473         (arm_deal_with_atomic_sequence_raw): Adjust.
10474         (thumb_get_next_pcs_raw): Adjust.
10475         (arm_get_next_pcs_raw): Adjust.
10476         (arm_get_next_pcs): Adjust.
10477         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10478         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10479         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10480         (alpha_software_single_step): Adjust.
10481         * alpha-tdep.h (alpha_software_single_step): Adjust.
10482         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10483         * arm-tdep.c (arm_software_single_step): Adjust.
10484         (arm_breakpoint_kind_from_current_state): Adjust.
10485         * arm-tdep.h (arm_software_single_step): Adjust.
10486         * breakpoint.c (insert_single_step_breakpoint): Adjust.
10487         * cris-tdep.c (cris_software_single_step): Adjust.
10488         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10489         (micromips_deal_with_atomic_sequence): Adjust.
10490         (deal_with_atomic_sequence): Adjust.
10491         (mips_software_single_step): Adjust.
10492         * mips-tdep.h (mips_software_single_step): Adjust.
10493         * moxie-tdep.c (moxie_software_single_step): Adjust.
10494         * nios2-tdep.c (nios2_software_single_step): Adjust.
10495         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10496         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10497         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10498         * s390-linux-tdep.c (s390_software_single_step): Adjust.
10499         * sparc-tdep.c (sparc_software_single_step): Adjust.
10500         * spu-tdep.c (spu_software_single_step): Adjust.
10501         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10502
10503 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10504
10505         * gdbarch.sh: Use semi-colon as field separator instead of colon.
10506         * gdbarch.h: Re-generate.
10507
10508 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10509
10510         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10511         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10512         * python/py-instruction.c, python/py-instruction.h: New file.
10513         * python/py-record.c: Add py-instruction.h include.
10514         (gdbpy_initialize_record): Make gdb.Instruction a super class of
10515         gdb.RecordInstruction.
10516         * python/python-internal.h: Add gdbpy_initialize_instruction
10517         declaration.
10518         * python/python.c (do_start_initialization): Add
10519         gdbpy_initialize_instruction.
10520
10521 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10522
10523         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10524         Remove.
10525         (btrace_func_from_recpy_func): New function.
10526         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10527         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10528         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10529         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10530         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10531         Also, use new helper functions.
10532         (btpy_list_item): Use new helper functions.
10533         (recpy_bt_function_call_history): Use new type name.
10534         (btpy_call_getset): Remove.
10535         (gdbpy_initialize_btrace): Remove code to initialize
10536         gdb.BtraceFunctionCall.
10537         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10538         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10539         recpy_bt_func_prev, recpy_bt_func_next): New export.
10540         * python/py-record.c (recpy_func_type): New static object.
10541         (recpy_func_new, recpy_func_level, recpy_func_symbol,
10542         recpy_func_instructions, recpy_func_up, recpy_func_prev,
10543         recpy_func_next): New function.
10544         (recpy_element_hash, recpy_element_richcompare): Updated comment.
10545         (recpy_func_getset): New static object.
10546         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10547         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10548
10549 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10550
10551         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10552         (btpy_object, btpy_insn_type, btpy_new): Remove.
10553         (btpy_list_object): Use gdb.RecordInstruction type instead of
10554         gdb.BtraceInstruction type.
10555         (btrace_insn_from_recpy_insn): New function.
10556         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10557         btpy_new.
10558         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10559         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10560         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10561         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10562         instead of btpy_object.
10563         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10564         btpy_insn_data, btpy_insn_decode): Rename to ...
10565         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10566         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10567         recpy_bt_insn_decode): This.  Also, use new helper functions.
10568         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10569         recpy_insn_type.
10570         (btpy_insn_getset): Remove.
10571         (gdbpy_initialize_btrace): Remove code to initialize
10572         gdb.BtraceInstruction.  Use recpy_element_object.
10573         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10574         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10575         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10576         * python/py-record.c (recpy_insn_type): New static object.
10577         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10578         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10579         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10580         New function.
10581         (recpy_insn_getset): New static object.
10582         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10583         * python/py-record.h (recpy_element_object): New typedef.
10584         (recpy_insn_type, recpy_insn_new): New export.
10585
10586 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10587
10588         * py-record-btrace.c (btpy_insn_new): Removed.
10589         (btpy_insn_or_gap_new): New function.
10590         (btpy_insn_error): Removed.
10591         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10592         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10593         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10594         btpy_insn_or_gap_new instead of btpy_insn_new.
10595         (btpy_insn_getset): Remove btpy_insn_error.
10596         * py-record.c (recpy_gap_type): New static object.
10597         (recpy_gap_object): New typedef.
10598         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10599         recpy_gap_reason_string): New function.
10600         (recpy_gap_getset): New static object.
10601         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10602         * py-record.h (recpy_gap_new): New export.
10603
10604 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10605
10606         * python/py-record.c (recpy_ptid): Remove.
10607         (recpy_record_getset): Remove recpy_ptid.
10608
10609 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10610
10611         * btrace.c (btrace_fetch): Set inferior_ptid.
10612         * python/py-record-btrace.c: Add "py-record.h" include.
10613         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10614         recpy_bt_end, recpy_bt_instruction_history,
10615         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10616         in gdb.Record object instead of current ptid.
10617         * python/py-record.c: Include new "py-record.h" file.
10618         (recpy_record_object): Moved to py-record.h.
10619         * python/py-record.h: New file.
10620
10621 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10622
10623         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10624         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10625         indentation.
10626
10627 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
10628
10629         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10630         the past maintainers section.
10631
10632 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10633
10634         * infcmd.c (get_return_value): Use regcache ctor, and remove
10635         cleanup.
10636
10637 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10638             Pedro Alves  <palves@redhat.com>
10639
10640         * regcache.c (regcache::regcache): New tag dispatch ctor.
10641         (do_cooked_read): Moved above.
10642         (regcache_dup): Use the tag dispatch ctor..
10643         * regcache.h (regcache): Declare ctor, delete copy ctor and
10644         assignment operator, remove friend regcache_dup.
10645
10646 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10647
10648         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10649         call method save instead of regcache_cpy.
10650         * regcache.h (struct regcache): Make regcache_dup a friend.
10651
10652 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10653
10654         * regcache.c (struct regcache): Move to regcache.h
10655         (regcache::arch): New method.
10656         (regcache_get_ptid): Update.
10657         (get_regcache_arch): Call arch method.
10658         (get_regcache_aspace): Call method aspace.
10659         (register_buffer): Change it to method.
10660         (regcache_save): Change it to regcache::save.
10661         (regcache_restore): Likewise.
10662         (regcache_cpy_no_passthrough): Remove the declaration.
10663         (regcache_cpy): Call methods restore and cpy_no_passthrough.
10664         (regcache_cpy_no_passthrough): Change it to method
10665         cpy_no_passthrough.
10666         (regcache_register_status): Change it to method
10667         get_register_status.
10668         (regcache_invalidate): Change it to method invalidate.
10669         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10670         (regcache_raw_update): Change it to method raw_update.
10671         (regcache_raw_read): Likewise.
10672         (regcache_raw_read_signed): Likewise.
10673         (regcache_raw_read_unsigned): Likewise.
10674         (regcache_raw_write_signed): Likewise.
10675         (regcache_raw_write_unsigned): Likewise.
10676         (regcache_cooked_read): Likewise.
10677         (regcache_cooked_read_value): Likewise.
10678         (regcache_cooked_read_signed): Likewise.
10679         (regcache_cooked_read_unsigned): Likewise.
10680         (regcache_cooked_write_signed): Likewise.
10681         (regcache_cooked_write_unsigned): Likewise.
10682         (regcache_raw_set_cached_value): Likewise.
10683         (regcache_raw_write): Likewise.
10684         (regcache_cooked_write): Likewise.
10685         (regcache_xfer_part): Likewise.
10686         (regcache_raw_read_part): Likewise.
10687         (regcache_raw_write_part): Likewise.
10688         (regcache_cooked_read_part): Likewise.
10689         (regcache_cooked_write_part): Likewise.
10690         (regcache_raw_supply): Likewise.
10691         (regcache_raw_collect): Likewise.
10692         (regcache_transfer_regset): Likewise.
10693         (regcache_supply_regset): Likewise.
10694         (regcache_collect_regset): Likewise.
10695         (regcache_debug_print_register): Likewise.
10696         (enum regcache_dump_what): Move it to regcache.h.
10697         (regcache_dump): Change it to method dump.
10698         * regcache.h (enum regcache_dump_what): New.
10699         (class regcache): New.
10700         * target.c (target_fetch_registers): Call method
10701         debug_print_register.
10702         (target_store_registers): Likewise.
10703
10704 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10705
10706         * windows-nat.c (struct lm_info_windows): Initialize field.
10707         (windows_make_so): Allocate lm_info_windows with new.
10708         (windows_free_so): Free lm_info_windows with delete.
10709
10710 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10711
10712         * solib-darwin.c (struct lm_info_darwin): Initialize field.
10713         (darwin_current_sos): Allocate lm_info_darwin with new, remove
10714         cleanup.
10715         (darwin_free_so): Free lm_info_darwin with delete.
10716
10717 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10718
10719         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
10720         <l_addr_p>: Change type to bool.
10721         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
10722         (svr4_free_so): Free lm_info_svr4 with delete.
10723         (svr4_copy_library_list): Replace memcpy with call to copy
10724         constructor.
10725         (library_list_start_library, svr4_default_sos): Allocate
10726         lm_info_svr4 with new.
10727
10728 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10729
10730         * solib-target.c (struct lm_info_target): Add destructor,
10731         initialize fields.
10732         <name>: Change type to std::string.
10733         (library_list_start_library): Allocate lm_info_target with new.
10734         (solib_target_free_library_list): Free lm_info_target with
10735         delete.
10736         (solib_target_current_sos): Adapt to std::string.
10737         (solib_target_free_so): Free lm_info_target with delete.
10738
10739 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10740
10741         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
10742         fields.
10743         (frv_current_sos): Allocate lm_info_frv with new.
10744         (frv_relocate_main_executable): Free lm_info_frv with delete,
10745         allocate with new.
10746         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
10747
10748 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10749
10750         * solib-frv.c (struct lm_info_frv): Fix indentation.
10751
10752 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10753
10754         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
10755         map field.
10756         (dsbt_current_sos): Allocate lm_info_dsbt with new.
10757         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
10758         and allocate with new.
10759         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
10760
10761 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10762
10763         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
10764         <filename, member_name>: Change type to std::string.
10765         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
10766         (library_list_start_library): Allocate lm_info_aix with new.
10767         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
10768         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
10769         with copy constructor.
10770
10771 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10772
10773         * solist.h (struct lm_info): Remove.
10774         (struct lm_info_base): New class.
10775         (struct so_list) <lm_info>: Change type to lm_info_base *.
10776         * nto-tdep.c (struct lm_info): Remove.
10777         (lm_addr): Adjust.
10778         * solib-aix.c (struct lm_info): Rename to ...
10779         (struct lm_info_aix): ... this.  Extend lm_info_base.
10780         (lm_info_p): Rename to ...
10781         (lm_info_aix_p): ... this, and adjust.
10782         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
10783         solib_aix_parse_libraries, library_list_start_library,
10784         solib_aix_free_library_list, solib_aix_parse_libraries,
10785         solib_aix_get_library_list,
10786         solib_aix_relocate_section_addresses, solib_aix_free_so,
10787         solib_aix_get_section_offsets,
10788         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
10789         Adjust.
10790         (struct solib_aix_inferior_data) <library_list>: Adjust.
10791         * solib-darwin.c (struct lm_info): Rename to ...
10792         (struct lm_info_darwin): ... this.  Extend lm_info_base.
10793         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
10794         * solib-dsbt.c (struct lm_info): Rename to ...
10795         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
10796         (struct dsbt_info) <main_executable_lm_info): Adjust.
10797         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
10798         dsbt_relocate_section_addresses): Adjust.
10799         * solib-frv.c (struct lm_info): Rename to ...
10800         (struct lm_info_frv): ... this.  Extend lm_info_base.
10801         (main_executable_lm_info): Adjust.
10802         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
10803         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
10804         find_canonical_descriptor_in_load_object,
10805         frv_fdpic_find_canonical_descriptor): Adjust.
10806         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10807         to lm_info_svr4.
10808         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10809         svr4_clear_so, svr4_copy_library_list,
10810         library_list_start_library, svr4_default_sos, svr4_read_so_list,
10811         svr4_current_sos, svr4_fetch_objfile_link_map,
10812         solist_update_incremental): Adjust.
10813         * solib-svr4.h (struct lm_info_svr4): Move here from
10814         solib-svr4.c.
10815         * solib-target.c (struct lm_info): Rename to ...
10816         (struct lm_info_target): ... this.  Extend lm_info_base.
10817         (lm_info_p): Rename to ...
10818         (lm_info_target_p): ... this.
10819         (solib_target_parse_libraries, library_list_start_segment,
10820         library_list_start_section, library_list_start_library,
10821         library_list_end_library, solib_target_free_library_list,
10822         solib_target_current_sos, solib_target_free_so,
10823         solib_target_relocate_section_addresses): Adjust.
10824         * windows-nat.c (struct lm_info): Rename to ...
10825         (struct lm_info_windows): ... this.  Extend lm_info_base.
10826         (windows_make_so, handle_load_dll, handle_unload_dll,
10827         windows_xfer_shared_libraries): Adjust.
10828
10829 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10830
10831         * solib-darwin.c (struct darwin_so_list): Remove.
10832         (darwin_current_sos): Allocate an so_list object instead of a
10833         darwin_so_list, separately allocate an lm_info object.
10834         (darwin_free_so): Free lm_info.
10835
10836 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
10837
10838         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
10839         with fprintf_filtered.
10840
10841 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10842
10843         * regcache.c (regcache::regcache): New function.
10844         (regcache::~regcache): New function.
10845         (regcache_xmalloc_1): Remove.
10846         (regcache_xmalloc): Call new regcache.
10847         (regcache_xfree): Call delete regcache.
10848         (get_thread_arch_aspace_regcache): Call new regcache.
10849
10850 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10851
10852         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
10853         lwp instead of ptid_get_lwp.
10854
10855 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10856
10857         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
10858         lwp_info instead of getting from inferior_ptid.
10859
10860 2017-04-27  Keith Seitz  <keiths@redhat.com>
10861
10862         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
10863         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
10864         (CV_CONVERSION_BADNESS): Define.
10865         (rank_one_type): Remove overly restrictive rvalue reference
10866         rank checks.
10867         Add cv-qualifier checks and subranks for type equality.
10868         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
10869         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
10870         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
10871
10872 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
10873
10874         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
10875         count when creating the object.
10876
10877 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
10878             Ulrich Weigand  <uweigand@de.ibm.com>
10879
10880         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
10881         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
10882         is used in AIX.
10883         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
10884         (process_xcoff_symbol): Likewise.
10885         (scan_xcoff_symtab): Likewise.
10886
10887 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10888
10889         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
10890         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
10891         (ia64_access_reg): Use get_frame_register_unsigned.
10892         (ia64_access_rse_reg): Likewise.
10893         (ia64_libunwind_frame_prev_register): Likewise.
10894
10895 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
10896
10897         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
10898         * gdbarch.c: Regenerated.
10899         * gdbarch.h: Regenerated.
10900         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
10901         visibility external.
10902         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
10903         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
10904         (enum cfa_how_kind): Move to ...
10905         (struct dwarf2_frame_state_reg_info): Likewise.
10906         (struct dwarf2_frame_state): Likewise.
10907         * dwarf2-frame.h: ... here.
10908         (dwarf2_frame_state_alloc_regs): New declaration.
10909         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
10910         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
10911
10912 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10913
10914         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
10915         regcache_raw_read_unsigned.
10916         (xtensa_pseudo_register_write): Likewise.
10917
10918 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10919
10920         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
10921         (nds32_pseudo_register_write): Likewise.
10922
10923 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10924
10925         * regcache.c (struct regcache) <readonly_p>: Change its type
10926         to bool.
10927         (regcache_xmalloc_1): Update parameter type and callers update.
10928
10929 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10930
10931         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
10932         set_gdbarch_wchar_bit.
10933         * arm-tdep.c (arm_gdbarch_init): Likewise.
10934
10935 2017-04-25  Pedro Alves  <palves@redhat.com>
10936
10937         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
10938         (BothAreRelocatable, memcopy, memmove): Don't define.
10939         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
10940         macros.
10941
10942 2017-04-25  Pedro Alves  <palves@redhat.com>
10943
10944         * common/common-defs.h: Include "common/poison.h".
10945         * common/function-view.h: (Not, Or, Requires): Move to traits.h
10946         and adjust.
10947         * common/poison.h: New file.
10948         * common/traits.h: Include <type_traits>.
10949         (Not, Or, Requires): New, moved from common/function-view.h.
10950
10951 2017-04-25  Pedro Alves  <palves@redhat.com>
10952
10953         * breakpoint.h (struct breakpoint): In-class initialize all
10954         fields.  Make boolean fields "bool".
10955         * breakpoint.c (init_raw_breakpoint_without_location): Remove
10956         memset call and initializations no longer necessary.
10957
10958 2017-04-25  Pedro Alves  <palves@redhat.com>
10959
10960         * btrace.c (pt_btrace_insn_flags): Change parameter type to
10961         reference.
10962         (pt_btrace_insn): New function.
10963         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
10964
10965 2017-04-25  Pedro Alves  <palves@redhat.com>
10966
10967         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
10968         "base" field and inherit from "bp_location" instead.  Add
10969         non-default ctor.
10970         (allocate_location_exception): Use new non-default ctor.
10971         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
10972         (init_bp_location): Convert to ...
10973         (bp_location::bp_location): ... this new ctor, and remove memset
10974         call.
10975         (base_breakpoint_allocate_location): Use the new non-default ctor.
10976         * breakpoint.h (bp_location): Now a class.  Declare default and
10977         non-default ctors.  In-class initialize all members.
10978         (init_bp_location): Remove declaration.
10979
10980 2017-04-25  Pedro Alves  <palves@redhat.com>
10981
10982         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
10983         assignment operator.
10984
10985 2017-04-24  Yao Qi  <yao.qi@linaro.org>
10986
10987         * doublest.c (convert_doublest_to_floatformat): Call
10988         floatformat_totalsize_bytes.
10989
10990 2017-04-22  Tom Tromey  <tom@tromey.com>
10991
10992         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
10993         ui_out_emit_list.
10994         * stack.c (print_frame): Use ui_out_emit_list.
10995         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10996         ui_out_emit_list.
10997         * mi/mi-main.c (print_one_inferior)
10998         (mi_cmd_data_list_register_names)
10999         (mi_cmd_data_list_register_values, mi_cmd_list_features)
11000         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11001         ui_out_emit_list.
11002         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11003         (mi_output_solib_attribs): Use ui_out_emit_list,
11004         ui_out_emit_tuple.
11005         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11006         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11007         (mi_cmd_stack_list_args, list_args_or_locals): Use
11008         ui_out_emit_list.
11009         * disasm.c (do_assembly_only): Use ui_out_emit_list.
11010         * breakpoint.c (print_solib_event, output_thread_groups): Use
11011         ui_out_emit_list.
11012
11013 2017-04-22  Tom Tromey  <tom@tromey.com>
11014
11015         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11016         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11017         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11018
11019 2017-04-22  Tom Tromey  <tom@tromey.com>
11020
11021         * tracepoint.c (tvariables_info_1)
11022         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11023
11024 2017-04-22  Tom Tromey  <tom@tromey.com>
11025
11026         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11027         annotate_arg_emitter.
11028         * breakpoint.c (print_mention_watchpoint)
11029         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11030         * annotate.h (struct annotate_arg_emitter): New.
11031
11032 2017-04-22  Tom Tromey  <tom@tromey.com>
11033
11034         * record-btrace.c (record_btrace_insn_history)
11035         (record_btrace_insn_history_range, record_btrace_call_history)
11036         (record_btrace_call_history_range): Use ui_out_emit_tuple.
11037         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11038         ui_out_emit_tuple.
11039         * stack.c (print_frame_info): Use ui_out_emit_tuple.
11040         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11041         * skip.c (skip_info): Use ui_out_emit_tuple.
11042         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11043         * progspace.c (print_program_space): Use ui_out_emit_tuple.
11044         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11045         * osdata.c (info_osdata): Use ui_out_emit_tuple.
11046         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11047         ui_out_emit_tuple.
11048         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11049         (output_register, mi_cmd_data_read_memory)
11050         (mi_cmd_data_read_memory_bytes, mi_load_progress)
11051         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11052         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11053         Use ui_out_emit_tuple.
11054         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11055         ui_out_emit_tuple.
11056         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11057         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11058         * linux-thread-db.c (info_auto_load_libthread_db): Use
11059         ui_out_emit_tuple.
11060         * inferior.c (print_inferior): Use ui_out_emit_tuple.
11061         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11062         * disasm.c (do_mixed_source_and_assembly_deprecated)
11063         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11064         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11065         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11066         * breakpoint.c (print_one_breakpoint_location)
11067         (print_one_breakpoint): Use ui_out_emit_tuple.
11068         * auto-load.c (print_script, info_auto_load_cmd): Use
11069         ui_out_emit_tuple.
11070         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11071
11072 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
11073
11074         * thread.c (print_thread_info_1): Remove dead code.
11075
11076 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11077
11078         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11079         GDB_SELF_TEST.
11080         * arm-tdep.c (selftests::arm_record_test): Likewise.
11081
11082 2017-04-21  Yao Qi  <yao.qi@linaro.org>
11083
11084         * regcache.c (regcache_restore): Remove argument 2.  Replace
11085         argument 3 with regcache.  Get register status from
11086         src->register_status and get register contents from
11087         register_buffer (src, regnum).
11088         (regcache_cpy): Update.
11089
11090 2017-04-19  Pedro Alves  <palves@redhat.com>
11091
11092         * gdbthread.h (thread): Add missing closing parenthesis in
11093         comment.
11094
11095 2017-04-19  Pedro Alves  <palves@redhat.com>
11096
11097         * common/refcounted-object.h: New file.
11098         * gdbthread.h: Include "common/refcounted-object.h".
11099         (thread_info): Inherit from refcounted_object and add comments.
11100         (thread_info::incref, thread_info::decref)
11101         (thread_info::m_refcount): Delete.
11102         (thread_info::deletable): Use the refcounted_object::refcount()
11103         method.
11104         * inferior.c (current_inferior_): Add comment.
11105         (set_current_inferior): Increment/decrement refcounts.
11106         (prune_inferiors, remove_inferior_command): Skip inferiors marked
11107         not-deletable instead of comparing with the current inferior.
11108         (initialize_inferiors): Increment the initial inferior's refcount.
11109         * inferior.h (struct inferior): Forward declare.
11110         Include "common/refcounted-object.h".
11111         (current_inferior, set_current_inferior): Move declaration to
11112         before struct inferior's definition, and fix comment.
11113         (inferior): Inherit from refcounted_object.  Add comments.
11114         * thread.c (switch_to_thread_no_regs): Reference the thread's
11115         inferior pointer directly instead of doing a ptid lookup.
11116         (switch_to_no_thread): New function.
11117         (switch_to_thread(thread_info *)): New function, factored out
11118         from ...
11119         (switch_to_thread(ptid_t)): ... this.
11120         (restore_current_thread): Delete.
11121         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11122         fields, and add 'inf' field.
11123         (do_restore_current_thread_cleanup): Check whether old->inf is
11124         alive instead of looking up an inferior by ptid.  Use
11125         switch_to_thread and switch_to_no_thread.
11126         (restore_current_thread_cleanup_dtor): Use old->inf directly
11127         instead of lookup up an inferior by id.  Decref the inferior.
11128         Don't restore 'removable'.
11129         (make_cleanup_restore_current_thread): Same the inferior pointer
11130         in old, instead of the inferior number.  Incref the inferior.
11131         Don't save/clear 'removable'.
11132
11133 2017-04-19  Pedro Alves  <palves@redhat.com>
11134
11135         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11136         unittests/scoped_restore-selftests.c.
11137         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11138         * common/scoped_restore.h (scoped_restore_base): Make "class".
11139         (scoped_restore_base::release): New public method.
11140         (scoped_restore_base::scoped_restore_base): New protected ctor.
11141         (scoped_restore_base::m_saved_var): New protected field.
11142         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11143         scoped_restore_base base class instead of m_saved_var directly.
11144         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11145         (scoped_restore_tmpl::scoped_restore_tmpl(const
11146         scoped_restore_tmpl<T>&)): Likewise.
11147         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11148         method.
11149         (scoped_restore_tmpl::saved_var): New method.
11150         (scoped_restore_tmpl::m_saved_var): Delete.
11151         * inferior.h (inferior::detaching): Now a bool.
11152         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11153         cleanup.
11154         * unittests/scoped_restore-selftests.c: New file.
11155
11156 2017-04-19  Pedro Alves  <palves@redhat.com>
11157
11158         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11159         Re-sort in alphabetic order.
11160
11161 2017-04-18  Pedro Alves  <palves@redhat.com>
11162
11163         * xml-support.c (obstack_xml_printf): Delete.
11164         * xml-support.h (obstack_xml_printf): Delete.
11165
11166 2017-04-18  Pedro Alves  <palves@redhat.com>
11167
11168         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11169         vdebug, verror, body_text, start_element, end_element, name,
11170         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11171         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11172         is_xinclude>: Make private and add m_ prefix.
11173         (gdb_xml_parser::body_text): New method, based on ...
11174         (gdb_xml_body_text): ... this.  Adjust.
11175         (gdb_xml_parser::vdebug): New method, based on ...
11176         (gdb_xml_debug): ... this.  Adjust.
11177         (gdb_xml_parser::verror): New method, based on ...
11178         (gdb_xml_error): ... this.  Adjust.
11179         (gdb_xml_parser::start_element): New method, based on ...
11180         (gdb_xml_start_element): ... this.  Adjust.
11181         (gdb_xml_start_element_wrapper): Defer to
11182         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11183         (gdb_xml_parser::end_element): New method, based on ...
11184         (gdb_xml_end_element_wrapper): ... this.  Adjust.
11185         (gdb_xml_parser::~gdb_xml_parser): Adjust.
11186         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11187         (gdb_xml_parser::use_dtd): New method, based on ...
11188         (gdb_xml_use_dtd): ... this.  Adjust.
11189         (gdb_xml_parser::parse): New method, based on ...
11190         (gdb_xml_parse): ... this.  Adjust.
11191         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11192         (xinclude_start_include): Adjust to call the parser's name method.
11193         (xml_xinclude_default, xml_xinclude_start_doctype)
11194         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11195         method.
11196         (xml_process_xincludes): Adjust to call parser methods.
11197         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11198         declarations.
11199
11200 2017-04-18  Pedro Alves  <palves@redhat.com>
11201
11202         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11203         gdb::optional<std::string>.
11204         * xml-support.c: Include <string>.
11205         (scope_level::scope_level(scope_level &&))
11206         (scope_level::~scope_level): Delete.
11207         (scope_level::body): Now a std::string.
11208         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11209         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11210         parameter.
11211         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11212         (xinclude_parsing_data::output): Now a std::string reference.
11213         (xinclude_start_include): Adjust.
11214         (xml_xinclude_default): Adjust.
11215         (xml_process_xincludes): Add 'output' parameter, and return bool.
11216         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11217         and return bool.
11218         * xml-tdesc.c: Include <unordered_map> and <string>.
11219         (tdesc_xml_cache): Delete.
11220         (tdesc_xml_cache_s): Delete.
11221         (xml_cache): Now an std::unordered_map.
11222         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11223         (target_fetch_description_xml): Change return type to
11224         gdb::optional<std::string>, and adjust.
11225         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11226         (target_fetch_description_xml): Change return type to
11227         gdb::optional<std::string>.
11228
11229 2017-04-18  Pedro Alves  <palves@redhat.com>
11230
11231         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11232         unittests/optional-selftests.c.
11233         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11234         * unittests/optional-selftests.c: New file.
11235         * unittests/optional/assignment/1.cc: New file.
11236         * unittests/optional/assignment/2.cc: New file.
11237         * unittests/optional/assignment/3.cc: New file.
11238         * unittests/optional/assignment/4.cc: New file.
11239         * unittests/optional/assignment/5.cc: New file.
11240         * unittests/optional/assignment/6.cc: New file.
11241         * unittests/optional/assignment/7.cc: New file.
11242         * unittests/optional/cons/copy.cc: New file.
11243         * unittests/optional/cons/default.cc: New file.
11244         * unittests/optional/cons/move.cc: New file.
11245         * unittests/optional/cons/value.cc: New file.
11246         * unittests/optional/in_place.cc: New file.
11247         * unittests/optional/observers/1.cc: New file.
11248         * unittests/optional/observers/2.cc: New file.
11249
11250 2017-04-18  Pedro Alves  <palves@redhat.com>
11251
11252         * common/gdb_optional.h: Include common/traits.h.
11253         (in_place_t): New type.
11254         (in_place): New constexpr variable.
11255         (optional::optional): Remove member initialization of
11256         m_instantiated.
11257         (optional::optional(in_place_t...)): New constructor.
11258         (optional::~optional): Use reset.
11259         (optional::optional(const optional&)): New.
11260         (optional::optional(const optional&&)): New.
11261         (optional::optional(T &)): New.
11262         (optional::optional(T &&)): New.
11263         (operator::operator=(const optional &)): New.
11264         (operator::operator=(optional &&)): New.
11265         (operator::operator= (const T &))
11266         (operator::operator= (T &&))
11267         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
11268         (operator::reset): New.
11269         (operator::m_instantiated):: Add in-class initializer.
11270         * common/traits.h: Include <type_traits>.
11271         (struct And): New types.
11272
11273 2017-04-18  Pedro Alves  <palves@redhat.com>
11274
11275         * xml-support.c: Include <vector>.
11276         (scope_level::scope_level(const gdb_xml_element *))
11277         (scope_level::scope_level(scope_level&&)): New.
11278         (scope_level::~scope_level): New.
11279         (scope_level_s): Delete.
11280         (gdb_xml_parser::scopes): Now a std::vector.
11281         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11282         Use std::vector.
11283         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11284         scope cleanup code.
11285         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11286         of the scopes member.  Use std::vector::emplace_back.
11287
11288 2017-04-18  Pedro Alves  <palves@redhat.com>
11289
11290         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
11291         a bool.
11292         (gdb_xml_end_element): Change type of first parameter.
11293         (gdb_xml_cleanup): Rename to ...
11294         (gdb_xml_parser::~gdb_xml_parser): ... this.
11295         (gdb_xml_create_parser_and_cleanup): Delete with ...
11296         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11297         to this new ctor.
11298         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11299         using gdb_xml_create_parser_and_cleanup.
11300         (xinclude_parsing_data): Add ctor/dtor.
11301         (xml_xinclude_cleanup): Delete.
11302         (xml_process_xincludes): Create a local xinclude_parsing_data
11303         instead of heap-allocating one.  Create a local gdb_xml_parser
11304         instead of heap-allocating one with
11305         gdb_xml_create_parser_and_cleanup.
11306
11307 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
11308
11309         PR threads/20743
11310         * fbsd-nat.c (resume_one_thread_cb): Remove.
11311         (resume_all_threads_cb): Remove.
11312         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11313         iterate_over_threads.
11314
11315 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11316
11317         * NEWS: Create a new section for the next release branch.
11318         Rename the section of the current branch, now that it has
11319         been cut.
11320
11321 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11322
11323         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11324         * version.in: Bump version to 8.0.50.DATE-git.
11325
11326 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
11327
11328         PR gdb/21385
11329         * windows-nat.c (windows_create_inferior): Declare 'allargs'
11330         independently of the host, and fix build breakage on Cygwin.
11331
11332 2017-04-13  Pedro Alves  <palves@redhat.com>
11333
11334         * inferior.c (free_inferior): Convert to ...
11335         (inferior::~inferior): ... this dtor.
11336         (inferior::inferior): New ctor, factored out from ...
11337         (add_inferior_silent): ... here.  Allocate the inferior with a new
11338         expression.
11339         (delete_inferior): Call delete instead of free_inferior.
11340         * inferior.h (gdb_environ, continuation): Forward declare.
11341         (inferior): Now a class.  Add in-class initialization to all
11342         members.  Make boolean fields bool, except 'detaching'.
11343         (inferior::inferior): New explicit ctor.
11344         (inferior::~inferior): New.
11345
11346 2017-04-13  Pedro Alves  <palves@redhat.com>
11347
11348         * inferior.c (init_inferior_list): Delete.
11349         * inferior.h (init_inferior_list): Delete.
11350
11351 2017-04-13  Pedro Alves  <palves@redhat.com>
11352
11353         PR threads/13217
11354         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11355         (top level): Call it twice, with different thread sets.
11356
11357 2017-04-13  Pedro Alves  <palves@redhat.com>
11358
11359         * thread.c: Include <algorithm>.
11360         (thread_array_cleanup): Delete.
11361         (scoped_inc_dec_ref): New class.
11362         (live_threads_count): New function.
11363         (set_thread_refcount): Delete.
11364         (tp_array_compar_ascending): Now a bool.
11365         (tp_array_compar): Convert to a std::sort comparison function.
11366         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11367         and live_threads_count.
11368
11369 2017-04-13  Pedro Alves  <palves@redhat.com>
11370
11371         * infrun.c (follow_fork_inferior): Also switch the current
11372         inferior.
11373
11374 2017-04-13  Pedro Alves  <palves@redhat.com>
11375
11376         * breakpoint.c (watch_command_1): Save watchpoint-frame info
11377         before calling create_internal_breakpoint.
11378
11379 2017-04-13  Pedro Alves  <palves@redhat.com>
11380
11381         * fork-child.c (execv_argv): New class.
11382         (breakup_args): Refactored as ...
11383         (execv_argv::init_for_no_shell): .. this method of execv_argv.
11384         Copy arguments to storage and replace separators with NULL
11385         terminators in place.
11386         (escape_bang_in_quoted_argument): Adjust to return bool.
11387         (execv_argv::execv_argv): New ctor.
11388         (execv_argv::init_for_shell): New method, factored out from
11389         fork_inferior.  Don't strdup strings into the vector.
11390         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
11391         Remove free_vector_argv call.
11392
11393 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11394
11395         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11396         tdep->rx_psw_type.
11397
11398 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11399
11400         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11401         * rx-tdep.c (rx_gdbarch_init): Likewise.
11402
11403 2017-04-13  Pedro Alves  <palves@redhat.com>
11404
11405         * breakpoint.h (struct breakpoint): Reindent.
11406
11407 2017-04-13  Pedro Alves  <palves@redhat.com>
11408
11409         * breakpoint.c (bp_location): Rename to ...
11410         (bp_locations): ... this.  All references updated.
11411         (bp_location_count): Rename to ...
11412         (bp_locations_count): ... this.  All references updated.
11413         (bp_location_placed_address_before_address_max): Rename to ...
11414         (bp_locations_placed_address_before_address_max): ... this.  All
11415         references updated.
11416         (bp_location_shadow_len_after_address_max): Rename to ...
11417         (bp_locations_shadow_len_after_address_max): ... this.  All
11418         references updated.
11419         (bp_location_compare_addrs): Rename to ...
11420         (bp_locations_compare_addrs): ... this.  All references updated.
11421         (bp_location_compare):Rename to ...
11422         (bp_locations_compare): ... this.  All references updated.
11423         (bp_location_target_extensions_update): Rename to ...
11424         (bp_locations_target_extensions_update): ... this.  All references
11425         updated.
11426
11427 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11428
11429         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11430         * common/common.m4: Check headers 'termios.h', 'termio.h' and
11431         'sgtty.h'.
11432         * common/gdb_termios.h: New file, with parts of "terminal.h".
11433         * inflow.c: Include "gdb_termios.h".
11434         * ser-unix.c: Include "gdb_termios.h".
11435         * terminal.h: Move terminal-related defines to
11436         "common/gdb_termios.h".
11437
11438 2017-04-12  Tom Tromey  <tom@tromey.com>
11439
11440         * probe.c (parse_probes): Update.
11441         * location.h (delete_event_location): Don't declare.
11442         (event_location_deleter::operator()): Update.
11443         * location.c (event_location_deleter::operator()): Rename from
11444         delete_event_location.
11445         * linespec.h (linespec_result) <location>: Change type to
11446         event_location_up.
11447         * linespec.c (canonicalize_linespec, event_location_to_sals)
11448         (decode_objc): Update.
11449         (linespec_result): Don't call delete_event_location.
11450         * breakpoint.c (create_breakpoints_sal)
11451         (bkpt_probe_create_sals_from_location)
11452         (strace_marker_create_sals_from_location): Update.
11453
11454 2017-04-12  Tom Tromey  <tom@tromey.com>
11455
11456         * linespec.h (struct linespec_result): Add constructor and
11457         destructor.
11458         (init_linespec_result, destroy_linespec_result)
11459         (make_cleanup_destroy_linespec_result): Don't declare.
11460         * linespec.c (init_linespec_result): Remove.
11461         (linespec_result::~linespec_result): Rename from
11462         destroy_linespec_result.  Update.
11463         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11464         Remove.
11465         * breakpoint.c (create_breakpoint, break_range_command)
11466         (decode_location_default): Update.
11467         * ax-gdb.c (agent_command_1): Update.
11468
11469 2017-04-12  Tom Tromey  <tom@tromey.com>
11470
11471         * remote.c (remote_download_tracepoint): Update.
11472         * python/py-breakpoint.c (bppy_get_location): Update.
11473         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11474         (gdbscm_breakpoint_location): Update.
11475         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11476         * breakpoint.h (struct breakpoint) <location, location_range_end>:
11477         Change type to event_location_up.
11478         * breakpoint.c (create_overlay_event_breakpoint)
11479         (create_longjmp_master_breakpoint)
11480         (create_std_terminate_master_breakpoint)
11481         (create_exception_master_breakpoint)
11482         (breakpoint_event_location_empty_p, print_breakpoint_location)
11483         (print_one_breakpoint_location, create_thread_event_breakpoint)
11484         (init_breakpoint_sal, create_breakpoint)
11485         (print_recreate_ranged_breakpoint, break_range_command)
11486         (init_ada_exception_breakpoint, say_where): Update.
11487         (base_breakpoint_dtor): Don't call delete_event_location.
11488         (bkpt_print_recreate, tracepoint_print_recreate)
11489         (dprintf_print_recreate, update_static_tracepoint)
11490         (breakpoint_re_set_default): Update.
11491
11492 2017-04-12  Tom Tromey  <tom@tromey.com>
11493
11494         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11495         type of "to_do".  Update.
11496         (compute_stack_depth): Use std::vector.
11497
11498 2017-04-12  Tom Tromey  <tom@tromey.com>
11499
11500         * printcmd.c (find_instruction_backward): Use std::vector.
11501
11502 2017-04-12  Tom Tromey  <tom@tromey.com>
11503
11504         * symfile.c (objfilep): Remove typedef.
11505         (reread_symbols): Use a std::vector.
11506
11507 2017-04-12  Tom Tromey  <tom@tromey.com>
11508
11509         * mi/mi-main.c (exec_direction_forward): Remove.
11510         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11511         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11512         scoped_restore.
11513         * guile/guile.c (guile_repl_command, guile_command)
11514         (gdbscm_execute_gdb_command): Use scoped_restore.
11515         * go-exp.y (go_parse): Use scoped_restore.
11516         * d-exp.y (d_parse): Use scoped_restore.
11517         * cli/cli-decode.c (cmd_func): Use scoped_restore.
11518         * c-exp.y (c_parse): Use scoped_restore.
11519
11520 2017-04-12  Tom Tromey  <tom@tromey.com>
11521
11522         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11523         (mi_parse): Update return type.
11524         (mi_parse_free): Remove.
11525         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11526         (mi_parse::~mi_parse): Rename from mi_parse_free.
11527         (mi_parse_cleanup): Remove.
11528         (mi_parse): Return a unique_ptr.  Use new.
11529         * mi/mi-main.c (mi_execute_command): Update.
11530
11531 2017-04-12  Tom Tromey  <tom@tromey.com>
11532
11533         * location.c (explicit_location_lex_one): Return a
11534         unique_xmalloc_ptr.
11535         (string_to_explicit_location): Update.  Remove cleanups.
11536
11537 2017-04-12  Tom Tromey  <tom@tromey.com>
11538
11539         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11540         (compare_value_and_voffset): Change type.  Update.
11541         (compute_vtable_size): Change type of "offset_vec".
11542         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
11543         (gnuv3_get_typeid): Remove extraneous declaration.
11544
11545 2017-04-12  Tom Tromey  <tom@tromey.com>
11546
11547         * charset.h (wchar_iterator): Fix comment.
11548
11549 2017-04-12  Tom Tromey  <tom@tromey.com>
11550
11551         * charset.c (iconv_wrapper): New class.
11552         (cleanup_iconv): Remove.
11553         (convert_between_encodings): Use it.
11554
11555 2017-04-12  Tom Tromey  <tom@tromey.com>
11556
11557         * symfile.h (increment_reading_symtab): Update type.
11558         * symfile.c (decrement_reading_symtab): Remove.
11559         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11560         * psymtab.c (psymtab_to_symtab): Update.
11561         * dwarf2read.c (dw2_instantiate_symtab): Update.
11562
11563 2017-04-12  Tom Tromey  <tom@tromey.com>
11564
11565         * jit.c (struct jit_reader): Declare separately.  Add constructor
11566         and destructor.  Change type of "handle".
11567         (loaded_jit_reader): Define separately.
11568         (jit_reader_load): Update.  New "new".
11569         (jit_reader_unload_command): Use "delete".
11570         * gdb-dlfcn.h (struct dlclose_deleter): New.
11571         (gdb_dlhandle_up): New typedef.
11572         (gdb_dlopen, gdb_dlsym): Update types.
11573         (gdb_dlclose): Remove.
11574         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11575         (gdb_dlsym): Change type of "handle".
11576         (make_cleanup_dlclose): Remove.
11577         (dlclose_deleter::operator()): Rename from gdb_dlclose.
11578         * compile/compile-c-support.c (load_libcc): Update.
11579
11580 2017-04-12  Tom Tromey  <tom@tromey.com>
11581
11582         * symtab.h (find_pcs_for_symtab_line): Change return type.
11583         * symtab.c (find_pcs_for_symtab_line): Change return type.
11584         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11585         type of "vec".  Update.
11586         (ltpy_get_pcs_for_line): Update.
11587         * linespec.c (decode_digits_ordinary): Update.
11588
11589 2017-04-12  Tom Tromey  <tom@tromey.com>
11590
11591         * tracepoint.c (actions_command): Update.
11592         * python/python.c (python_command, python_interactive_command):
11593         Update.
11594         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11595         * guile/guile.c (guile_command): Update.
11596         * defs.h (read_command_lines, read_command_lines_1): Return
11597         command_line_up.
11598         (command_lines_deleter): New struct.
11599         (command_line_up): New typedef.
11600         * compile/compile.c (compile_code_command)
11601         (compile_print_command): Update.
11602         * cli/cli-script.h (get_command_line, copy_command_lines): Return
11603         command_line_up.
11604         (make_cleanup_free_command_lines): Remove.
11605         * cli/cli-script.c (get_command_line, read_command_lines_1)
11606         (copy_command_lines): Return command_line_up.
11607         (while_command, if_command, read_command_lines, define_command)
11608         (document_command): Update.
11609         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11610         Remove.
11611         * breakpoint.h (breakpoint_set_commands): Change type of
11612         "commands".
11613         * breakpoint.c (breakpoint_set_commands): Change type of
11614         "commands".  Update.
11615         (do_map_commands_command, update_dprintf_command_list)
11616         (create_tracepoint_from_upload): Update.
11617
11618 2017-04-12  Tom Tromey  <tom@tromey.com>
11619
11620         * tracepoint.c (scope_info): Update.
11621         * spu-tdep.c (spu_catch_start): Update.
11622         * python/python.c (gdbpy_decode_line): Update.
11623         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11624         * python/py-breakpoint.c (bppy_init): Update.
11625         * probe.c (parse_probes): Update.
11626         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11627         * location.h (event_location_deleter): New struct.
11628         (event_location_up): New typedef.
11629         (new_linespec_location, new_address_location, new_probe_location)
11630         (new_explicit_location, copy_event_location)
11631         (string_to_event_location, string_to_event_location_basic)
11632         (string_to_explicit_location): Update return type.
11633         (make_cleanup_delete_event_location): Remove.
11634         * location.c (new_linespec_location, new_address_location)
11635         (new_probe_location, new_explicit_location, copy_event_location):
11636         Return event_location_up.
11637         (delete_event_location_cleanup)
11638         (make_cleanup_delete_event_location): Remove.
11639         (string_to_explicit_location, string_to_event_location_basic)
11640         (string_to_event_location): Return event_location_up.
11641         * linespec.c (canonicalize_linespec, event_location_to_sals)
11642         (decode_line_with_current_source)
11643         (decode_line_with_last_displayed, decode_objc): Update.
11644         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11645         * completer.c (location_completer): Update.
11646         * cli/cli-cmds.c (edit_command, list_command): Update.
11647         * breakpoint.c (create_overlay_event_breakpoint)
11648         (create_longjmp_master_breakpoint)
11649         (create_std_terminate_master_breakpoint)
11650         (create_exception_master_breakpoint)
11651         (create_thread_event_breakpoint): Update.
11652         (init_breakpoint_sal): Update.  Remove some dead code.
11653         (create_breakpoint_sal): Change type of "location".  Update.
11654         (create_breakpoints_sal, create_breakpoint, break_command_1)
11655         (dprintf_command, break_range_command, until_break_command)
11656         (init_ada_exception_breakpoint)
11657         (strace_marker_create_sals_from_location)
11658         (update_static_tracepoint, trace_command, ftrace_command)
11659         (strace_command, create_tracepoint_from_upload): Update.
11660         * break-catch-throw.c (re_set_exception_catchpoint): Update.
11661         * ax-gdb.c (agent_command_1): Update.
11662
11663 2017-04-12  Pedro Alves  <palves@redhat.com>
11664
11665         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11666         * configure.tgt: Handle i[34567]86-*-go32* and
11667         i[34567]86-*-msdosdjgpp*.
11668         * i386-tdep.c (i386_svr4_reg_to_regnum):
11669         Make extern.
11670         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11671         i386-go32-tdep.c.
11672         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11673         * i386-go32-tdep.c: New file.
11674         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
11675         declarations.
11676
11677 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
11678
11679         * aix-thread.c (pd_status2str): Change return type to const char *.
11680
11681 2017-04-12  Pedro Alves  <palves@redhat.com>
11682
11683         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
11684         calls to set_gdbarch_gnu_triplet_regexp.
11685
11686 2017-04-12  Pedro Alves  <palves@redhat.com>
11687
11688         PR gdb/21323
11689         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
11690         New enum value.
11691         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
11692         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
11693         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
11694         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
11695         * gdbarch.h, gdbarch.c: Regenerate.
11696         * aarch64-tdep.c (aarch64_gdbarch_init): Override
11697         gdbarch_wchar_bit and gdbarch_wchar_signed.
11698         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
11699         * arm-tdep.c (arm_gdbarch_init): Likewise.
11700         * avr-tdep.c (avr_gdbarch_init): Likewise.
11701         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
11702         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
11703         * i386-tdep.c (i386_go32_init_abi): Likewise.
11704         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11705         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11706         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11707         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11708         * sh-tdep.c (sh_gdbarch_init): Likewise.
11709         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11710         * sparc64-tdep.c (sparc64_init_abi): Likewise.
11711         * windows-tdep.c (windows_init_abi): Likewise.
11712         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11713
11714 2017-04-12  Pedro Alves  <palves@redhat.com>
11715
11716         PR c++/21323
11717         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
11718         cplus_primitive_type_char32_t>: New enum values.
11719         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
11720         and cplus_primitive_type_char32_t.
11721         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
11722         32, use the archtecture's built-in type for char16_t and char32_t,
11723         respectively.  Otherwise, fallback to init_integer_type as before,
11724         but make the type unsigned, and issue a complaint.
11725         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
11726
11727 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
11728
11729         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
11730         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
11731
11732 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11733
11734         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
11735         'const char *'.
11736
11737 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11738
11739         * common/common-utils.c (free_vector_argv): New function.
11740         * common/common-utils.h: Include <vector>.
11741         (free_vector_argv): New prototype.
11742         * darwin-nat.c (darwin_create_inferior): Rewrite function
11743         prototype in order to constify "exec_file" and accept a
11744         "std::string" for "allargs".
11745         * fork-child.c: Include <vector>.
11746         (breakup_args): Rewrite function, using C++.
11747         (fork_inferior): Rewrite function header, constify "exec_file_arg"
11748         and accept "std::string" for "allargs".  Update the code to
11749         calculate "argv" based on "allargs".  Update calls to "exec_fun"
11750         and "execvp".
11751         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
11752         order to constify "exec_file" and accept a "std::string" for
11753         "allargs".
11754         * go32-nat.c (go32_create_inferior): Likewise.
11755         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
11756         * infcmd.c (run_command_1): Constify "exec_file".  Use
11757         "std::string" for inferior arguments.
11758         * inferior.h (fork_inferior): Update prototype.
11759         * linux-nat.c (linux_nat_create_inferior): Rewrite function
11760         prototype in order to constify "exec_file" and accept a
11761         "std::string" for "allargs".
11762         * nto-procfs.c (procfs_create_inferior): Likewise.
11763         * procfs.c (procfs_create_inferior): Likewise.
11764         * remote-sim.c (gdbsim_create_inferior): Likewise.
11765         * remote.c (extended_remote_run): Update code to accept
11766         "std::string" as argument.
11767         (extended_remote_create_inferior): Rewrite function prototype in
11768         order to constify "exec_file" and accept a "std::string" for
11769         "allargs".
11770         * rs6000-nat.c (super_create_inferior): Likewise.
11771         (rs6000_create_inferior): Likewise.
11772         * target.h (struct target_ops) <to_create_inferior>: Likewise.
11773         * windows-nat.c (windows_create_inferior): Likewise.
11774
11775 2017-04-11  Pedro Alves  <palves@redhat.com>
11776
11777         * thread.c: Fix whitespace throughout.
11778
11779 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11780
11781         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
11782
11783 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
11784
11785         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
11786
11787 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
11788
11789         PR gdb/21364
11790         * osdata.c (info_osdata): Check if 'type' is an empty string
11791         instead of NULL.
11792
11793 2017-04-10  Pedro Alves  <palves@redhat.com>
11794
11795         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
11796         (ptid_to_global_thread_id, in_thread_list)
11797         (do_captured_list_thread_ids, set_resumed, set_running)
11798         (set_executing, set_stop_requested, finish_thread_state)
11799         (validate_registers_access, can_access_registers_ptid)
11800         (print_thread_info_1, switch_to_thread)
11801         (do_restore_current_thread_cleanup)
11802         (make_cleanup_restore_current_thread, thread_command)
11803         (thread_name_command): Use operator== instead of ptid_equal.
11804
11805 2017-04-10  Pedro Alves  <palves@redhat.com>
11806
11807         * thread.c (struct current_thread_cleanup) <next>: Delete field.
11808         (current_thread_cleanup_chain): Delete.
11809         (restore_current_thread_cleanup_dtor)
11810         (make_cleanup_restore_current_thread): Remove references to
11811         current_thread_cleanup_chain.
11812
11813 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
11814
11815         * msp430-tdep.c (msp430_pseudo_register_read): Never return
11816         REG_UNKNOWN.
11817
11818 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11819
11820         PR gdb/19942
11821         * gdbthread.h (thread_info::deletable): New method.
11822         (thread_info::incref): New method.
11823         (thread_info::decref): New method.
11824         (thread_info::refcount): Move it to private.
11825         * infrun.c (save_stop_context): Call inc_refcount.
11826         (release_stop_context_cleanup): Likewise.
11827         * thread.c (set_thread_exited): New function.
11828         (init_thread_list): Delete "tp" only it is deletable, otherwise
11829         call set_thread_exited.
11830         (delete_thread_1): Call set_thread_exited.
11831         (current_thread_cleanup) <inferior_pid>: Remove.
11832         <thread>: New field.
11833         (restore_current_thread_ptid_changed): Removed.
11834         (do_restore_current_thread_cleanup): Adjust.
11835         (restore_current_thread_cleanup_dtor): Don't call
11836         find_thread_ptid.
11837         (set_thread_refcount): Use dec_refcount.
11838         (make_cleanup_restore_current_thread): Adjust.
11839         (thread_apply_all_command): Call inc_refcount.
11840         (_initialize_thread): Don't call
11841         observer_attach_thread_ptid_changed.
11842
11843 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11844
11845         * thread.c (delete_thread_1): Hoist code on marking thread as
11846         exited.
11847
11848 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11849
11850         * windows-nat.c (windows_detach): Initialize ptid with
11851         minus_one_ptid.
11852
11853 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11854
11855         * unittests/ptid-selftests.c: Fix erroneous assert messages.
11856
11857 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
11858
11859         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
11860         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
11861         (bfin_pseudo_register_write): Likewise
11862
11863 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
11864
11865         * common/ptid.h (struct ptid): Change to...
11866         (class ptid_t): ... this.
11867         <ptid_t>: New constructors.
11868         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
11869         matches>: New methods.
11870         <make_null, make_minus_one>: New static methods.
11871         <pid>: Rename to...
11872         <m_pid>: ...this.
11873         <lwp>: Rename to...
11874         <m_lwp>: ...this.
11875         <tid>: Rename to...
11876         <m_tid>: ...this.
11877         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
11878         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
11879         as references, move comment to class ptid_t.
11880         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
11881         ptid_t static methods.
11882         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
11883         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
11884         Take ptid arguments as references, implement using ptid_t methods.
11885         * unittests/ptid-selftests.c: New file.
11886         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11887         unittests/ptid-selftests.c.
11888         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
11889
11890 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
11891
11892         * python/python.c (python_run_simple_file): Cast mode literal to
11893         non-const char pointer as expected by PyFile_FromString.
11894
11895 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
11896
11897         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
11898         minus_one_ptid and null_ptid.
11899
11900 2017-04-05  Pedro Alves  <palves@redhat.com>
11901
11902         * warning.m4 (build_warnings): Remove -Wno-write-strings.
11903         * configure: Regenerate.
11904
11905 2017-04-05  Pedro Alves  <palves@redhat.com>
11906
11907         * ada-exp.y (yyerror): Constify.
11908         * ada-lang.c (bound_name, get_selections)
11909         (ada_variant_discrim_type)
11910         (ada_variant_discrim_name, ada_value_struct_elt)
11911         (ada_lookup_struct_elt_type, is_unchecked_variant)
11912         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
11913         (catch_ada_exception_command_split)
11914         (catch_ada_assert_command_split, catch_assert_command)
11915         (ada_op_name): Constify.
11916         * ada-lang.h (ada_yyerror, get_selections)
11917         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
11918         * arc-tdep.c (arc_print_frame_cache): Constify.
11919         * arm-tdep.c (arm_skip_stub): Constify.
11920         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
11921         (gen_aggregate_elt_ref): Constify.
11922         * bcache.c (print_bcache_statistics): Constify.
11923         * bcache.h (print_bcache_statistics): Constify.
11924         * break-catch-throw.c (catch_exception_command_1):
11925         * breakpoint.c (struct ep_type_description::description):
11926         Constify.
11927         (add_solib_catchpoint): Constify.
11928         (catch_fork_command_1): Add cast.
11929         (add_catch_command): Constify.
11930         * breakpoint.h (add_catch_command, add_solib_catchpoint):
11931         Constify.
11932         * bsd-uthread.c (bsd_uthread_state): Constify.
11933         * buildsym.c (patch_subfile_names): Constify.
11934         * buildsym.h (next_symbol_text_func, patch_subfile_names):
11935         Constify.
11936         * c-exp.y (yyerror): Constify.
11937         (token::oper): Constify.
11938         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
11939         * c-varobj.c (cplus_describe_child): Constify.
11940         * charset.c (find_charset_names): Add cast.
11941         (find_charset_names): Constify array and add const_cast.
11942         * cli/cli-cmds.c (complete_command, cd_command): Constify.
11943         (edit_command): Constify.
11944         * cli/cli-decode.c (lookup_cmd): Constify.
11945         * cli/cli-dump.c (dump_memory_command, dump_value_command):
11946         Constify.
11947         (struct dump_context): Constify.
11948         (add_dump_command, restore_command): Constify.
11949         * cli/cli-script.c (get_command_line): Constify.
11950         * cli/cli-script.h (get_command_line): Constify.
11951         * cli/cli-utils.c (check_for_argument): Constify.
11952         * cli/cli-utils.h (check_for_argument): Constify.
11953         * coff-pe-read.c (struct read_pe_section_data): Constify.
11954         * command.h (lookup_cmd): Constify.
11955         * common/print-utils.c (decimal2str): Constify.
11956         * completer.c (gdb_print_filename): Constify.
11957         * corefile.c (set_gnutarget): Constify.
11958         * cp-name-parser.y (yyerror): Constify.
11959         * cp-valprint.c (cp_print_class_member): Constify.
11960         * cris-tdep.c (cris_register_name, crisv32_register_name):
11961         Constify.
11962         * d-exp.y (yyerror): Constify.
11963         (struct token::oper): Constify.
11964         * d-lang.h (d_yyerror): Constify.
11965         * dbxread.c (struct header_file_location::name): Constify.
11966         (add_old_header_file, add_new_header_file, last_function_name)
11967         (dbx_next_symbol_text, add_bincl_to_list)
11968         (find_corresponding_bincl_psymtab, set_namestring)
11969         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
11970         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
11971         * defs.h (command_line_input, print_address_symbolic)
11972         (deprecated_readline_begin_hook): Constify.
11973         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
11974         Constify.
11975         * event-top.c (handle_line_of_input): Constify and add cast.
11976         * exceptions.c (catch_errors): Constify.
11977         * exceptions.h (catch_errors): Constify.
11978         * expprint.c (print_subexp_standard, op_string, op_name)
11979         (op_name_standard, dump_raw_expression, dump_raw_expression):
11980         * expression.h (op_name, op_string, dump_raw_expression):
11981         Constify.
11982         * f-exp.y (yyerror): Constify.
11983         (struct token::oper): Constify.
11984         (struct f77_boolean_val::name): Constify.
11985         * f-lang.c (f_word_break_characters): Constify.
11986         * f-lang.h (f_yyerror): Constify.
11987         * fork-child.c (fork_inferior): Add cast.
11988         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
11989         (new_variant): Constify.
11990         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
11991         * gdbarch.c: Regenerate.
11992         * gdbcore.h (set_gnutarget): Constify.
11993         * go-exp.y (yyerror): Constify.
11994         (token::oper): Constify.
11995         * go-lang.h (go_yyerror): Constify.
11996         * go32-nat.c (go32_sysinfo): Constify.
11997         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
11998         * guile/scm-cmd.c (cmdscm_function): Constify.
11999         * guile/scm-param.c (pascm_param_value): Constify.
12000         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12001         (h8300sx_register_name): Constify.
12002         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12003         Constify.
12004         * ia64-tdep.c (ia64_register_names): Constify.
12005         * infcmd.c (construct_inferior_arguments): Constify.
12006         (path_command, attach_post_wait): Constify.
12007         * language.c (show_range_command, show_case_command)
12008         (unk_lang_error): Constify.
12009         * language.h (language_defn::la_error)
12010         (language_defn::la_name_of_this): Constify.
12011         * linespec.c (decode_line_2): Constify.
12012         * linux-thread-db.c (thread_db_err_str): Constify.
12013         * lm32-tdep.c (lm32_register_name): Constify.
12014         * m2-exp.y (yyerror): Constify.
12015         * m2-lang.h (m2_yyerror): Constify.
12016         * m32r-tdep.c (m32r_register_names): Constify and make static.
12017         * m68hc11-tdep.c (m68hc11_register_names): Constify.
12018         * m88k-tdep.c (m88k_register_name): Constify.
12019         * macroexp.c (appendmem): Constify.
12020         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12021         (upgrade_type, parse_external, parse_partial_symbols)
12022         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12023         (new_symbol): Constify.
12024         * memattr.c (mem_info_command): Constify.
12025         * mep-tdep.c (register_name_from_keyword): Constify.
12026         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12027         Constify.
12028         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12029         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12030         * mi/mi-main.c (captured_mi_execute_command): Constify and add
12031         cast.
12032         (mi_execute_async_cli_command): Constify.
12033         * mips-tdep.c (mips_register_name): Constify.
12034         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12035         (am33_register_name, am33_2_register_name)
12036         * moxie-tdep.c (moxie_register_names): Constify.
12037         * nat/linux-osdata.c (osdata_type): Constify fields.
12038         * nto-tdep.c (nto_parse_redirection): Constify.
12039         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12040         (lookup_child_selector): Constify.
12041         (objc_methcall::name): Constify.
12042         * objc-lang.h (lookup_objc_class, lookup_child_selector)
12043         (lookup_struct_typedef): Constify.
12044         * objfiles.c (pc_in_section): Constify.
12045         * objfiles.h (pc_in_section): Constify.
12046         * p-exp.y (struct token::oper): Constify.
12047         (yyerror): Constify.
12048         * p-lang.h (pascal_yyerror): Constify.
12049         * parser-defs.h (op_name_standard): Constify.
12050         (op_print::string): Constify.
12051         (exp_descriptor::op_name): Constify.
12052         * printcmd.c (print_address_symbolic): Constify.
12053         * psymtab.c (print_partial_symbols): Constify.
12054         * python/py-breakpoint.c (stop_func): Constify.
12055         (bppy_get_expression): Constify.
12056         * python/py-cmd.c (cmdpy_completer::name): Constify.
12057         (cmdpy_function): Constify.
12058         * python/py-event.c (evpy_add_attribute)
12059         (gdbpy_initialize_event_generic): Constify.
12060         * python/py-event.h (evpy_add_attribute)
12061         (gdbpy_initialize_event_generic): Constify.
12062         * python/py-evts.c (add_new_registry): Constify.
12063         * python/py-finishbreakpoint.c (outofscope_func): Constify.
12064         * python/py-framefilter.c (get_py_iter_from_func): Constify.
12065         * python/py-inferior.c (get_buffer): Add cast.
12066         * python/py-param.c (parm_constant::name): Constify.
12067         * python/py-unwind.c (fprint_frame_id): Constify.
12068         * python/python.c (gdbpy_parameter_value): Constify.
12069         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12070         * remote.c (memory_packet_config::name): Constify.
12071         (show_packet_config_cmd, remote_write_bytes)
12072         (remote_buffer_add_string):
12073         * reverse.c (exec_reverse_once): Constify.
12074         * rs6000-tdep.c (variant::name, variant::description): Constify.
12075         * rust-exp.y (rustyyerror): Constify.
12076         * rust-lang.c (rust_op_name): Constify.
12077         * rust-lang.h (rustyyerror): Constify.
12078         * serial.h (serial_ops::name): Constify.
12079         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12080         (sh_sh3e_register_name, sh_sh2e_register_name)
12081         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12082         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12083         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12084         (sh_sh4al_dsp_register_name): Constify.
12085         * sh64-tdep.c (sh64_register_name): Constify.
12086         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12087         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12088         * stabsread.c (patch_block_stabs, read_type_number)
12089         (ref_map::stabs, ref_add, process_reference)
12090         (symbol_reference_defined, define_symbol, define_symbol)
12091         (error_type, read_type, read_member_functions, read_cpp_abbrev)
12092         (read_one_struct_field, read_struct_fields, read_baseclasses)
12093         (read_tilde_fields, read_struct_type, read_array_type)
12094         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12095         (read_huge_number, read_range_type, read_args, common_block_start)
12096         (find_name_end): Constify.
12097         * stabsread.h (common_block_start, define_symbol)
12098         (process_one_symbol, symbol_reference_defined, ref_add):
12099         * symfile.c (get_section_index, add_symbol_file_command):
12100         * symfile.h (get_section_index): Constify.
12101         * target-descriptions.c (tdesc_type::name): Constify.
12102         (tdesc_free_type): Add cast.
12103         * target.c (find_default_run_target):
12104         (add_deprecated_target_alias, find_default_run_target)
12105         (target_announce_detach): Constify.
12106         (do_option): Constify.
12107         * target.h (add_deprecated_target_alias): Constify.
12108         * thread.c (print_thread_info_1): Constify.
12109         * top.c (deprecated_readline_begin_hook, command_line_input):
12110         Constify.
12111         (init_main): Add casts.
12112         * top.h (handle_line_of_input): Constify.
12113         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12114         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12115         (tfind_command): Rename to ...
12116         (tfind_command_1): ... this and constify.
12117         (tfind_command): New function.
12118         (tfind_end_command, tfind_start_command): Adjust.
12119         (encode_source_string): Constify.
12120         * tracepoint.h (encode_source_string): Constify.
12121         * tui/tui-data.c (tui_partial_win_by_name): Constify.
12122         * tui/tui-data.h (tui_partial_win_by_name): Constify.
12123         * tui/tui-source.c (tui_set_source_content_nil): Constify.
12124         * tui/tui-source.h (tui_set_source_content_nil): Constify.
12125         * tui/tui-win.c (parse_scrolling_args): Constify.
12126         * tui/tui-windata.c (tui_erase_data_content): Constify.
12127         * tui/tui-windata.h (tui_erase_data_content): Constify.
12128         * tui/tui-winsource.c (tui_erase_source_content): Constify.
12129         * tui/tui.c (tui_enable): Add cast.
12130         * utils.c (defaulted_query): Constify.
12131         (init_page_info): Add cast.
12132         (puts_debug, subset_compare): Constify.
12133         * utils.h (subset_compare): Constify.
12134         * varobj.c (varobj_format_string): Constify.
12135         * varobj.h (varobj_format_string): Constify.
12136         * vax-tdep.c (vax_register_name): Constify.
12137         * windows-nat.c (windows_detach): Constify.
12138         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12139         * xml-support.c (gdb_xml_end_element): Constify.
12140         * xml-tdesc.c (tdesc_start_reg): Constify.
12141         * xstormy16-tdep.c (xstormy16_register_name): Constify.
12142         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12143         * xtensa-tdep.h (xtensa_register_t::name): Constify.
12144
12145 2017-04-05  Pedro Alves  <palves@redhat.com>
12146
12147         * proc-api.c (struct trans): Constify.
12148         (procfs_note): Constify.
12149         * proc-events.c (struct trans, syscall_table):
12150         * proc-flags.c (struct trans): Constify.
12151         * proc-utils.h (procfs_note): Constify.
12152         * proc-why.c (struct trans): Constify.
12153         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12154         (procfs_detach): Constify.
12155         * sol-thread.c (struct string_map): Constify.
12156         (td_err_string, td_state_string): Constify.
12157
12158 2017-04-05  Pedro Alves  <palves@redhat.com>
12159
12160         * proc-api.c (procfs_filename): Don't initialize
12161         procfs_filename.
12162         (prepare_to_trace): Assume procfs_filename is non-NULL.
12163         (_initialize_proc_api): Give procfs_filename a default value here.
12164
12165 2017-04-05  Pedro Alves  <palves@redhat.com>
12166
12167         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12168         'cond_string' parameter.
12169         (extract_exception_regexp): Constify 'string' parameter.
12170         (catch_exception_command_1): Constify.
12171         * breakpoint.c (init_catchpoint)
12172         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12173         parameter.
12174         (ep_parse_optional_if_clause, catch_fork_command_1)
12175         (catch_exec_command_1): Constify.
12176         * breakpoint.h (init_catchpoint): Constify 'cond_string'
12177         parameter.
12178         (ep_parse_optional_if_clause): Constify.
12179         * cli/cli-utils.c (remove_trailing_whitespace)
12180         (check_for_argument): Constify.
12181         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12182         non-const overload.
12183         (check_for_argument): Likewise.
12184
12185 2017-04-05  Pedro Alves  <palves@redhat.com>
12186
12187         * event-top.c (command_line_handler): Add cast to execute_command
12188         call.
12189         * record-btrace.c (cmd_record_btrace_bts_start)
12190         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12191         (cmd_record_btrace_start): Add cast to execute_command call.
12192         * record-full.c (record_full_goto_insn):
12193         * record.c (record_start, record_stop): Add cast to
12194         execute_command_to_string calls.
12195         (cmd_record_start): Add cast to execute_command calls.
12196
12197 2017-04-05  Pedro Alves  <palves@redhat.com>
12198
12199         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12200         static inline function.
12201         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12202         array and use gdb_PyArg_ParseTupleAndKeywords.
12203         * python/py-cmd.c (cmdpy_init): Likewise.
12204         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12205         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12206         (infpy_search_memory): Likewise.
12207         * python/py-objfile.c (objfpy_add_separate_debug_file)
12208         (gdbpy_lookup_objfile): Likewise.
12209         * python/py-symbol.c (gdbpy_lookup_symbol)
12210         (gdbpy_lookup_global_symbol): Likewise.
12211         * python/py-type.c (gdbpy_lookup_type): Likewise.
12212         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12213         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12214         Likewise.
12215
12216 2017-04-05  Pedro Alves  <palves@redhat.com>
12217
12218         * python/python-internal.h (gdb_PyGetSetDef): New type.
12219         * python/py-block.c (block_object_getset)
12220         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12221         * python/py-event.c (event_object_getset)
12222         (finish_breakpoint_object_getset): Likewise.
12223         * python/py-inferior.c (inferior_object_getset): Likewise.
12224         * python/py-infthread.c (thread_object_getset): Likewise.
12225         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12226         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12227         * python/py-objfile.c (objfile_getset): Likewise.
12228         * python/py-progspace.c (pspace_getset): Likewise.
12229         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12230         Likewise.
12231         * python/py-record.c (recpy_record_getset): Likewise.
12232         * python/py-symbol.c (symbol_object_getset): Likewise.
12233         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12234         Likewise.
12235         * python/py-type.c (type_object_getset, field_object_getset):
12236         Likewise.
12237         * python/py-value.c (value_object_getset): Likewise.
12238
12239 2017-04-05  Pedro Alves  <palves@redhat.com>
12240
12241         * python/python-internal.h (gdb_PyObject_CallMethod)
12242         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12243         New functions.
12244         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12245         (PySys_GetObject, PySys_SetPath): New macros.
12246
12247 2017-04-05  Pedro Alves  <palves@redhat.com>
12248
12249         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12250         info_osdata_command.
12251         * osdata.c (info_osdata_command): Rename to ...
12252         (info_osdata): ... this.  Constify 'type' parameter, and remove
12253         the 'from_tty' parameter.  Accept NULL TYPE.
12254         (info_osdata_command): New function.
12255         * osdata.h (info_osdata_command): Remove declaration.
12256         (info_osdata): New declaration.
12257
12258 2017-04-05  Pedro Alves  <palves@redhat.com>
12259
12260         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12261         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12262         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12263         parameter.
12264         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12265         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12266         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12267         parameter.
12268         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12269         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12270         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12271         (mi_cmd_file_list_exec_source_files)
12272         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12273         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12274         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12275         parameter.
12276         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12277         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12278         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12279         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12280         (mi_cmd_stack_info_frame): Constify 'command' parameter.
12281         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12282         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12283         'command' parameter.
12284         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12285         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12286         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12287         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12288         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12289         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12290         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12291         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12292         (mi_cmd_var_set_update_range): Constify 'command' parameter.
12293         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12294         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12295         parameter.
12296         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12297         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12298         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12299         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12300         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12301         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12302         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12303         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12304         (mi_cmd_data_list_changed_registers)
12305         (mi_cmd_data_write_register_values)
12306         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12307         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12308         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12309         (mi_cmd_list_features, mi_cmd_list_target_features)
12310         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12311         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12312         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12313         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12314         (mi_cmd_trace_frame_collected): Constify 'command'
12315         parameter.
12316         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12317         'command' parameter.
12318
12319 2017-04-05  Pedro Alves  <palves@redhat.com>
12320
12321         * ada-lang.c (ada_completer_word_break_characters): Now a const
12322         array.
12323         (ada_get_gdb_completer_word_break_characters): Constify.
12324         * completer.c (gdb_completer_command_word_break_characters)
12325         (gdb_completer_file_name_break_characters)
12326         (gdb_completer_quote_characters): Now const arrays.
12327         (get_gdb_completer_quote_characters): Constify.
12328         (set_rl_completer_word_break_characters): New function.
12329         (set_gdb_completion_word_break_characters)
12330         (complete_line_internal): Use it.
12331         * completer.h (get_gdb_completer_quote_characters): Constify.
12332         (set_rl_completer_word_break_characters): Declare.
12333         * f-lang.c (f_word_break_characters): Constify.
12334         * language.c (default_word_break_characters): Constify.
12335         * language.h (language_defn::la_word_break_characters): Constify.
12336         (default_word_break_characters): Constify.
12337         * top.c (init_main): Use set_rl_completer_word_break_characters.
12338
12339 2017-04-05  Pedro Alves  <palves@redhat.com>
12340
12341         * aix-thread.c (aix_thread_pid_to_str)
12342         (aix_thread_extra_thread_info): Constify.
12343         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12344         * bsd-uthread.c (bsd_uthread_extra_thread_info)
12345         (bsd_uthread_pid_to_str): Constify.
12346         * corelow.c (core_pid_to_str): Constify.
12347         * darwin-nat.c (darwin_pid_to_str): Constify.
12348         * fbsd-nat.c (fbsd_pid_to_str): Constify.
12349         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12350         Constify.
12351         * gnu-nat.c (gnu_pid_to_str): Constify.
12352         * go32-nat.c (go32_pid_to_str): Constify.
12353         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12354         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12355         * inferior.c (inferior_pid_to_str): Constify.
12356         * linux-nat.c (linux_nat_pid_to_str): Constify.
12357         * linux-tdep.c (linux_core_pid_to_str): Constify.
12358         * linux-thread-db.c (thread_db_pid_to_str)
12359         (thread_db_extra_thread_info): Constify.
12360         * nto-tdep.c (nto_extra_thread_info): Constify.
12361         * nto-tdep.h (nto_extra_thread_info): Constify.
12362         * obsd-nat.c (obsd_pid_to_str): Constify.
12363         * procfs.c (procfs_pid_to_str): Constify.
12364         * ravenscar-thread.c (ravenscar_extra_thread_info)
12365         (ravenscar_pid_to_str): Constify.
12366         * remote-sim.c (gdbsim_pid_to_str): Constify.
12367         * remote.c (remote_threads_extra_info, remote_pid_to_str):
12368         Constify.
12369         * sol-thread.c (solaris_pid_to_str): Constify.
12370         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12371         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12372         * target.c (default_pid_to_str, target_pid_to_str)
12373         (normal_pid_to_str, default_pid_to_str): Constify.
12374         * target.h (target_ops::to_pid_to_str)
12375         (target_ops::to_extra_thread_info): Constify.
12376         (target_pid_to_str, normal_pid_to_str): Constify.
12377         * windows-nat.c (windows_pid_to_str): Constify.
12378         * gdbarch.sh (core_pid_to_str): Constify.
12379         * target-delegates.c: Regenerate.
12380         * gdbarch.h, gdbarch.c: Regenerate.
12381
12382 2017-04-05  Pedro Alves  <palves@redhat.com>
12383
12384         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12385         the memory of the temporary warning_pre_print override.
12386         * utils.c (warning_pre_print): Constify.
12387         * utils.h (warning_pre_print): Constify.
12388
12389 2017-04-05  Pedro Alves  <palves@redhat.com>
12390
12391         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12392         (shell_command): New function.
12393         (make_command): Use std::string.
12394         (init_cli_cmds): Register shell_command instead of shell_escape.
12395
12396 2017-04-05  Pedro Alves  <palves@redhat.com>
12397
12398         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12399         * tracepoint.c (default_collect): Don't initialize.
12400
12401 2017-04-05  Pedro Alves  <palves@redhat.com>
12402
12403         * macroexp.c (macro_buffer::shared): Now a bool.
12404         (init_buffer): Update.
12405         (init_shared_buffer): Constify 'addr' parameter.
12406         (substitute_args, expand, macro_expand, macro_expand_next): Remove
12407         casts.
12408
12409 2017-04-05  Pedro Alves  <palves@redhat.com>
12410
12411         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12412         * disasm.c (set_disassembler_options): Constify local.
12413         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12414
12415 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
12416
12417         PR gdb/21352
12418         * tracefile.c (tsave_command): Fix argument parsing for '-r'
12419         option.
12420
12421 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12422
12423         * frame.c (frame_unwind_register_unsigned): Call
12424         frame_unwind_register_value.
12425
12426 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12427
12428         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12429         Use gdb_test_multiple, and don't match anchor.
12430
12431 2017-04-05  Pedro Alves  <palves@redhat.com>
12432
12433         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12434         (Write After Approval): Remove Simon Marchi.
12435
12436 2017-04-05  Pedro Alves  <palves@redhat.com>
12437
12438         * common/gdb_optional.h (optional::optional): Make constexpr and
12439         initialize m_dummy.
12440
12441 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12442
12443         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12444         (amd64fbsd_jmp_buf_reg_offset): Remove.
12445         (amd64fbsd_supply_uthread): Remove function.
12446         (amd64fbsd_collect_uthread): Remove function.
12447         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12448         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12449         (x86_64-*-freebsd*): Remove bsd-uthread.o.
12450         (fbsd-nat.c): Update comment.
12451         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12452         (i386fbsd_jmp_buf_reg_offset): Remove.
12453         (i386fbsd_supply_uthread): Remove function.
12454         (i386fbsd_collect_uthread): Remove function.
12455         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12456
12457 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12458
12459         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12460         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12461         * NEWS: Mention that support for FreeBSD/alpha was removed.
12462         * alpha-fbsd-tdep.c: Delete file.
12463         * config/alpha/fbsd.mh: Delete file.
12464         * configure.host: Delete alpha*-*-freebsd* and
12465         alpha*-*-kfreebsd*-gnu.
12466         * configure.tgt: Delete alpha*-*-freebsd* and
12467         alpha*-*-kfreebsd*-gnu.
12468
12469 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12470
12471         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12472         amd64bsd_store_inferior_registers): Use ptid from regcache.
12473
12474 2017-04-04  Pedro Alves  <palves@redhat.com>
12475
12476         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
12477         data fields, make them private and add "m_" prefixes.
12478         (lnp_state_machine::lnp_state_machine): New ctor.
12479         (record_line, check_line_address, handle_set_discriminator)
12480         (handle_set_address, handle_advance_pc, handle_special_opcode)
12481         (handle_advance_line, handle_set_file, handle_negate_stmt)
12482         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12483         (end_sequence, advance_line): New methods.
12484         (m_gdbarch, m_record_lines_p): New fields.
12485         (lnp_reader_state): Delete.
12486         (dwarf_record_line): Rename to ...
12487         (lnp_state_machine::record_line): ... adjust.
12488         (init_lnp_state_machine): Delete.
12489         (lnp_state_machine::lnp_state_machine): New.
12490         (check_line_address): Rename to ...
12491         (lnp_state_machine::check_line_address): This.
12492         (dwarf_decode_lines_1): Remove reference to "reader_state".
12493         Adjust lnp_state_machine having a non-default ctor.  Use bool.
12494         State machine internal state manipulation moved to
12495         lnp_state_machine methods.
12496
12497 2017-04-04  Pedro Alves  <palves@redhat.com>
12498
12499         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12500         unittests/offset-type-selftests.c.
12501         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12502         * common/offset-type.h: New file.
12503         * common/preprocessor.h: New file.
12504         * common/traits.h: New file.
12505         * common/valid-expr.h: New file.
12506         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
12507         sect_offset and cu_offset strong typedefs throughout.
12508         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12509         typedefs throughout.
12510         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
12511         sect_offset and cu_offset strong typedefs throughout.
12512         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12513         typedefs throughout.
12514         * gdbtypes.h: Include "common/offset-type.h".
12515         (cu_offset): Now an offset type (strong typedef) instead of a
12516         struct.
12517         (sect_offset): Likewise.
12518         (union call_site_parameter_u): Rename "param_offset" field to
12519         "param_cu_off".
12520         * unittests/offset-type-selftests.c: New file.
12521
12522 2017-04-04  Pedro Alves  <palves@redhat.com>
12523
12524         * common/underlying.h: New file.
12525         * dwarf2read.c: Include "common/gdb_optional.h" and
12526         "common/underlying.h".
12527         (dir_index, file_name_index): New types.
12528         (file_entry): Use them.
12529         (file_entry::include): Use to_underlying.
12530         (line_header::add_file_name): Use dir_index.
12531         (read_formatted_entries): Use gdb::optional.  Read form before
12532         writting to file_entry.
12533         (dwarf_decode_line_header): Use dir_index.
12534         (lnp_state_machine::current_file): Use to_underlying.
12535         (lnp_state_machine::file): Change type to file_name_index.
12536         (dwarf_record_line): Use to_underlying.
12537         (init_lnp_state_machine): Use file_name_index.
12538         (dwarf_decode_lines_1): Use dir_index and file_name_index.
12539
12540 2017-04-04  Pedro Alves  <palves@redhat.com>
12541
12542         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12543         operator bool, has_value and get methods.
12544
12545 2017-04-04  Pedro Alves  <palves@redhat.com>
12546
12547         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12548         fields.
12549         (line_header): Initialize all data fields.  Change type of
12550         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12551         Change type of include_dirs to std::vector<const char *>.  Remove
12552         num_include_dirs, include_dirs_size.  Change type of file_names to
12553         std::vector<file_entry>.  Remove num_file_names, file_names_size.
12554         (line_header::line_header): New.
12555         (line_header::add_include_dir, line_header::add_file_name): New
12556         methods.
12557         (line_header::include_dir_at): Remove NULL check.
12558         (line_header::file_name_at): Add const overload.
12559         (line_header_up): New unique_ptr typedef.
12560         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
12561         std::vector.  Remove free_line_header call.
12562         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
12563         free_line_header call.
12564         (free_cu_line_header): Delete.
12565         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12566         (setup_type_unit_groups): Use line_header_up instead of cleanups.
12567         Adjust to use std::vector.
12568         (free_line_header): Delete.
12569         (free_line_header_voidp): Use delete.
12570         (add_include_dir): Replace with ...
12571         (line_header::add_include_dir): ... this method.  Use std::vector.
12572         (add_file_name): Replace with ...
12573         (line_header::add_file_name): ... this method.  Use std::vector.
12574         (add_include_dir_stub): Delete.
12575         (read_formatted_entries): Remove memset.
12576         (dwarf_decode_line_header): Return a line_header_up instead of a
12577         raw pointer.  Remove cleanup handling.  Pass lambdas to
12578         read_formatted_entries.  Adjust to use line_header methods.
12579         (dwarf_decode_lines_1): Adjust to use line_header methods.
12580         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12581         use std::vector.
12582
12583 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
12584
12585         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12586         instead of struct ptid.
12587
12588 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
12589
12590         * frame.c (get_frame_register_bytes): Unwind using value.
12591         (put_frame_register_bytes): Likewise.
12592
12593 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
12594
12595         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12596         aggregate-like.
12597
12598 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
12599
12600         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12601
12602 2017-03-29  Yao Qi  <yao.qi@linaro.org>
12603
12604         * gdbthread.h (struct thread_info): Declare constructor and
12605         destructor.  Add some in-class member initializers.
12606         * thread.c (free_thread): Remove.
12607         (init_thread_list): Call delete instead of free_thread.
12608         (new_thread): Call thread_info constructor.
12609         (thread_info::thread_info): New function.
12610         (thread_info::~thread_info): New function.
12611         (delete_thread_1): Call delete instead of free_thread.
12612         (make_cleanup_restore_current_thread): Move tp and frame to
12613         inner block.
12614
12615 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12616
12617         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12618         (arc_skip_prologue): Likewise.
12619         (arc_make_frame_cache): Likewise.
12620         (arc_pv_get_operand): New function.
12621         (arc_is_in_prologue): Likewise.
12622         (arc_analyze_prologue): Likewise.
12623         (arc_print_frame_cache): Likewise.
12624         (MAX_PROLOGUE_LENGTH): New constant.
12625
12626 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12627
12628         * configure.tgt: Add arc-insn.o.
12629         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12630         (dump_arc_instruction_command): New function.
12631         (arc_fprintf_disasm): Likewise.
12632         (arc_disassemble_info): Likewise.
12633         (arc_insn_get_operand_value): Likewise.
12634         (arc_insn_get_operand_value_signed): Likewise.
12635         (arc_insn_get_memory_base_reg): Likewise.
12636         (arc_insn_get_memory_offset): Likewise.
12637         (arc_insn_get_branch_target): Likewise.
12638         (arc_insn_dump): Likewise.
12639         (arc_insn_get_linear_next_pc): Likewise.
12640         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12641         (arc_disassemble_info): Likewise.
12642         (arc_insn_get_branch_target): Likewise.
12643         (arc_insn_get_linear_next_pc): Likewise.
12644         * NEWS: Mention new "maint print arc arc-instruction".
12645
12646 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12647
12648         * arc-tdep (maintenance_print_arc_list): New variable.
12649         (maintenance_print_arc_command): New function.
12650
12651 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12652
12653         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12654         Add "limm" and "reserved".
12655         (arc_cannot_fetch_register, arc_cannot_store_register): Add
12656         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12657         * arc-tdep.h (arc_regnum): Likewise.
12658
12659 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12660
12661         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12662         for THREADPTR register.
12663         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12664         register.
12665         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12666         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12667         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12668
12669 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12670
12671         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12672         registers above gdbarch_num_regs (gdbarch) as privileged in
12673         call0 ABI.
12674
12675 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12676
12677         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12678         for a single specified register or for all registers in
12679         a0_base..a0_base + C0_NREGS range.
12680         (supply_gregset_reg): Call regcache_raw_supply for a single
12681         specified register or for all registers in a0_base..a0_base +
12682         C0_NREGS range.
12683
12684 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12685
12686         * arch/xtensa.h (C0_NREGS): Add definition.
12687         * xtensa-tdep.c (C0_NREGS): Remove definition.
12688
12689 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12690
12691         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
12692         Drop xtensa_default_isa initialization.
12693         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
12694
12695 2017-03-27  Pedro Alves  <palves@redhat.com>
12696
12697         * dwarf2read.c (file_entry) <dir_index>: Add comment.
12698         (file_entry::include_dir): New method.
12699         (line_header::include_dir_at, line_header::file_name_at): New
12700         methods.
12701         (setup_type_unit_groups, setup_type_unit_groups)
12702         (psymtab_include_file_name): Simplify using the new methods.
12703         (lnp_state_machine) <the_line_header>: New field.
12704         <file>: Add comment.
12705         (lnp_state_machine::current_file): New method.
12706         (dwarf_record_line): Simplify using the new methods.
12707         (init_lnp_state_machine): Initialize the "the_line_header" field.
12708         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
12709         Simplify using the new methods.
12710
12711 2017-03-27  Pedro Alves  <palves@redhat.com>
12712
12713         * cp-name-parser.y (make_empty): Delete.
12714         (demangler_special, nested_name, ptr_operator, array_indicator)
12715         (direct_declarator, declarator_1): Use fill_comp instead of
12716         make_empty.
12717
12718 2017-03-27  Pedro Alves  <palves@redhat.com>
12719
12720         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
12721         to ATTRIBUTE_PRINTF.
12722         * solib-target.c (library_list_start_list): Print "string" not
12723         "version".
12724         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
12725         gdb_xml_error call.
12726
12727 2017-03-27  Pedro Alves  <palves@redhat.com>
12728
12729         * dwarf2read.c (struct file_and_directory): New.
12730         (dwarf2_get_dwz_file): Adjust to use std::string.
12731         (dw2_get_file_names_reader): Adjust to use file_and_directory.
12732         (find_file_and_directory): Adjust to return a file_and_directory
12733         object.
12734         (read_file_scope): Adjust to use file_and_directory.  Remove
12735         make_cleanup/do_cleanups calls.
12736         (open_and_init_dwp_file): Adjust to use std::string.  Remove
12737         make_cleanup/do_cleanups calls.
12738         * python/python.c (do_start_initialization): Adjust to ldirname
12739         returning a std::string.
12740         * utils.c (ldirname): Now returns a std::string.
12741         * utils.h (ldirname): Change return type to std::string.
12742         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
12743         returning a std::string.
12744         * xml-tdesc.c (file_read_description_xml): Likewise.
12745
12746 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
12747
12748         * regcache.c (regcache_debug_print_register): New function.
12749         * regcache.h (regcache_debug_print_register): New declaration.
12750         * target.c (debug_print_register): Remove.
12751         (target_fetch_registers): Call regcache_debug_print_register.
12752         (target_store_registers): Likewise.
12753
12754 2017-03-24  Pádraig Brady  <pbrady@fb.com>
12755
12756         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
12757         reference beyond the 'lh->include_dirs' array before accessing to
12758         it.
12759         (psymtab_include_file_name): Likewise.
12760         (dwarf_decode_lines_1): Likewise.
12761         (dwarf_decode_lines): Likewise.
12762         (file_file_name): Likewise.
12763
12764 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
12765
12766         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
12767         inferior_ptid.
12768         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12769         ps_lsetfpregs): Likewise.
12770         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
12771         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12772         ps_lsetfpregs): Likewise.
12773         * target.c (target_fetch_registers, target_store_registers):
12774         Remove asserts.
12775
12776 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
12777
12778         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
12779
12780 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12781
12782         * aarch64-tdep.c (aarch64_process_record_test): Declare.
12783         (_initialize_aarch64_tdep): Register it.
12784         (aarch64_record_load_store): Handle PRFM instruction.
12785         (aarch64_process_record_test): New function.
12786
12787 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12788
12789         * aarch64-tdep.c (aarch64_record_load_store): Fix code
12790         indentation.
12791
12792 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12793
12794         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
12795
12796 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12797
12798         python/python.c (do_start_initialization): Fix memory leak.
12799
12800 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12801
12802         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
12803         using get_ptrace_pid.
12804         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12805         inferior_ptid.
12806         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12807         inferior_ptid instead of pid.
12808
12809 2017-03-22  Yao Qi  <yao.qi@linaro.org>
12810
12811         * aarch64-tdep.c: Wrap locally used classes in anonymous
12812         namespace.
12813         * arm-tdep.c: Likewise.
12814         * linespec.c: Likewise.
12815         * ui-out.c: Likewise.
12816
12817 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
12818
12819         PR gdb/19637
12820         * python/lib/gdb/printer/bound_registers.py: Import sys.
12821
12822 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12823
12824         * windows-nat.c (do_windows_fetch_inferior_registers): Add
12825         windows_thread_info parameter and use it instead of
12826         current_thread.
12827         (windows_fetch_inferior_registers): Don't set current_thread,
12828         pass the thread to do_windows_fetch_inferior_registers.  Use
12829         ptid from regcache instead of inferior_ptid.
12830         (do_windows_store_inferior_registers): Add windows_thread_info
12831         parameter and use it instead of current_thread.
12832         (windows_store_inferior_registers): Don't set current_thread,
12833         pass the thread to do_windows_store_inferior_registers.  Use
12834         ptid from regcache instead of inferior_ptid.
12835
12836 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12837
12838         * ser-mingw.c (ser_windows_raw): Remove reference to
12839         struct serial::current_timeout.
12840
12841 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
12842
12843         PR tdep/20928
12844         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
12845         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
12846         (sparc64_fsr_type): Fix %fsr decoding.
12847
12848 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
12849
12850         * python/py-record-btrace.c (btpy_insn_data): Change return type
12851         for Python 2.
12852
12853 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12854
12855         * spu-linux-nat.c (spu_fetch_inferior_registers,
12856         spu_store_inferior_registers): Use ptid from regcache, set and
12857         restore inferior_ptid.
12858         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
12859         Likewise.
12860
12861 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12862
12863         * i386-linux-nat.c (fetch_register, store_register,
12864         i386_linux_fetch_inferior_registers,
12865         i386_linux_store_inferior_registers): Use ptid from regcache.
12866         * ia64-linux-nat.c (ia64_linux_fetch_register,
12867         ia64_linux_store_register): Likewise.
12868         * inf-ptrace.c (inf_ptrace_fetch_register,
12869         inf_ptrace_store_register): Likewise.
12870         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
12871         m32r_linux_store_inferior_registers): Likewise.
12872         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
12873         m68kbsd_store_inferior_registers): Likewise.
12874         * m68k-linux-nat.c (fetch_register, store_register,
12875         m68k_linux_fetch_inferior_registers,
12876         m68k_linux_store_inferior_registers): Likewise.
12877         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
12878         m88kbsd_store_inferior_registers): Likewise.
12879         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
12880         mips_fbsd_store_inferior_registers): Likewise.
12881         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
12882         mips64_linux_regsets_store_registers): Likewise.
12883         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
12884         mipsnbsd_store_inferior_registers): Likewise.
12885         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
12886         mips64obsd_store_inferior_registers): Likewise.
12887         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
12888         Likewise.
12889         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
12890         ppcfbsd_store_inferior_registers): Likewise.
12891         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
12892         ppc_linux_store_inferior_registers): Likewise.
12893         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
12894         ppcnbsd_store_inferior_registers): Likewise.
12895         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
12896         ppcobsd_store_registers): Likewise.
12897         * procfs.c (procfs_fetch_registers, procfs_store_registers):
12898         Likewise.
12899         * ravenscar-thread.c (ravenscar_fetch_registers,
12900         ravenscar_store_registers, ravenscar_prepare_to_store):
12901         Likewise.
12902         * record-btrace.c (record_btrace_fetch_registers,
12903         record_btrace_store_registers, record_btrace_prepare_to_store):
12904         Likewise.
12905         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
12906         Lookup inferior using ptid from regcache, instead of
12907         current_inferior.
12908         * remote.c (remote_fetch_registers, remote_store_registers): Use
12909         ptid from regcache.
12910         * rs6000-nat.c (fetch_register, store_register): Likewise.
12911         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
12912         s390_linux_store_inferior_registers): Likewise.
12913         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
12914         shnbsd_store_inferior_registers): Likewise.
12915         * sol-thread.c (sol_thread_fetch_registers,
12916         sol_thread_store_registers): Likewise.
12917         * sparc-nat.c (sparc_fetch_inferior_registers,
12918         sparc_store_inferior_registers): Likewise.
12919         * tilegx-linux-nat.c (fetch_inferior_registers,
12920         store_inferior_registers): Likewise.
12921         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
12922         vaxbsd_store_inferior_registers): Likewise.
12923         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
12924         store_xtregs): Likewise.
12925
12926 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12927
12928         PR gdb/14441
12929         * NEWS: Mention support for rvalue references in GDB and python.
12930         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
12931         supports both lvalue and rvalue references.
12932
12933 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12934
12935         PR gdb/14441
12936         * gdbtypes.c (rank_one_type): Implement overloading
12937         resolution rules regarding rvalue references.
12938
12939 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12940
12941         PR gdb/14441
12942         * aarch64-tdep.c (aarch64_type_align)
12943         (aarch64_extract_return_value, aarch64_store_return_value): Change
12944         lvalue reference type checks to general reference type checks.
12945         * amd64-tdep.c (amd64_classify): Likewise.
12946         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
12947         Likewise.
12948         * arm-tdep.c (arm_type_align, arm_extract_return_value)
12949         (arm_store_return_value): Likewise.
12950         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
12951         * c-typeprint.c (c_print_type): Likewise.
12952         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
12953         (cplus_number_of_children, cplus_describe_child): Likewise.
12954         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
12955         * completer.c (expression_completer): Likewise.
12956         * cp-support.c (make_symbol_overload_list_adl_namespace):
12957         Likewise.
12958         * darwin-nat-info.c (info_mach_region_command): Likewise.
12959         * dwarf2loc.c (entry_data_value_coerce_ref)
12960         (value_of_dwarf_reg_entry): Likewise.
12961         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
12962         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
12963         Likewise.
12964         * findvar.c (extract_typed_address, store_typed_address):
12965         Likewise.
12966         * gdbtypes.c (rank_one_type): Likewise.
12967         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
12968         * infcall.c (value_arg_coerce): Likewise.
12969         * language.c (pointer_type): Likewise.
12970         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
12971         Likewise.
12972         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
12973         * mn10300-tdep.c (mn10300_type_align): Likewise.
12974         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
12975         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
12976         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
12977         Likewise.
12978         * printcmd.c (print_formatted, x_command): Likewise.
12979         * python/py-type.c (typy_get_composite, typy_template_argument):
12980         Likewise.
12981         * python/py-value.c (valpy_referenced_value)
12982         (valpy_get_dynamic_type, value_has_field): Likewise.
12983         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
12984         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
12985         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
12986         * spu-tdep.c (spu_scalar_value_p): Likewise.
12987         * symtab.c (lookup_symbol_aux): Likewise.
12988         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
12989         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
12990         Likewise.
12991         * valops.c (value_cast_pointers, value_cast)
12992         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
12993         (value_struct_elt, value_struct_elt_bitpos)
12994         (value_find_oload_method_list, find_overload_match)
12995         (value_rtti_indirect_type): Likewise.
12996         * valprint.c (val_print_scalar_type_p, generic_val_print):
12997         Likewise.
12998         * value.c (value_actual_type, value_as_address, unpack_long)
12999         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13000         (coerce_ref): Likewise.
13001         * varobj.c (varobj_get_value_type): Likewise.
13002
13003 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13004
13005         PR gdb/14441
13006         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13007         table of constants.
13008         * python/lib/gdb/command/explore.py: Support exploring values
13009         of rvalue reference types.
13010         * python/lib/gdb/types.py: Implement get_basic_type() for
13011         rvalue reference types.
13012         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13013         constant.
13014         * python/py-value.c (valpy_getitem): Add an rvalue reference
13015         check.
13016         (valpy_reference_value): Add new parameter "refcode".
13017         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13018         New wrappers for valpy_reference_value().
13019         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13020         (gdbpy_invoke_xmethod): Likewise.
13021
13022 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13023
13024         PR gdb/14441
13025         * dwarf2read.c (process_die, read_type_die_1): Handle the
13026         DW_TAG_rvalue_reference_type DIE.
13027         (read_tag_reference_type): Add new parameter "refcode".
13028
13029 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13030
13031         PR gdb/14441
13032         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13033         (c_type_print_modifier, c_type_print_varspec_suffix)
13034         (c_type_print_base): Support printing rvalue reference types.
13035         * c-valprint.c (c_val_print, c_value_print): Support printing
13036         rvalue reference values.
13037
13038 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13039
13040         PR gdb/14441
13041         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13042         typename.
13043         * cp-support.c (replace_typedefs): Handle
13044         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13045         * python/py-type.c (typy_lookup_type): Likewise.
13046
13047 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13048
13049         PR gdb/14441
13050         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13051         * parse.c (insert_type): Change assert statement.
13052         (follow_types): Handle rvalue reference types.
13053         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13054         constant.
13055
13056 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13057
13058         PR gdb/14441
13059         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13060         value_ref() interface.
13061         * c-valprint.c (c_value_print): Likewise.
13062         * infcall.c (value_arg_coerce): Likewise.
13063         * python/py-value.c (valpy_reference_value): Likewise.
13064         * valops.c (value_cast, value_reinterpret_cast)
13065         (value_dynamic_cast, typecmp): Likewise.
13066         (value_ref): Parameterize by kind of return value reference type.
13067         * value.h (value_ref): Add new parameter "refcode".
13068
13069 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13070
13071         PR gdb/14441
13072         * dwarf2read.c (read_tag_reference_type): Use
13073         lookup_lvalue_reference_type() instead of lookup_reference_type().
13074         * eval.c (evaluate_subexp_standard): Likewise.
13075         * f-exp.y: Likewise.
13076         * gdbtypes.c (make_reference_type, lookup_reference_type):
13077         Generalize with rvalue reference types.
13078         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13079         convenience wrappers for lookup_reference_type().
13080         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13081         reference kind parameter.
13082         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13083         wrappers for lookup_reference_type().
13084         * guile/scm-type.c (gdbscm_type_reference): Use
13085         lookup_lvalue_reference_type() instead of lookup_reference_type().
13086         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13087         * parse.c (follow_types): Likewise.
13088         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13089         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13090         Likewise.
13091         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13092         (gdbpy_invoke_xmethod): Likewise.
13093         * stabsread.c: Provide extra argument to make_reference_type()
13094         call.
13095         * valops.c (value_ref, value_rtti_indirect_type): Use
13096         lookup_lvalue_reference_type() instead of lookup_reference_type().
13097
13098 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13099
13100         PR gdb/14441
13101         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13102         (TYPE_IS_REFERENCE): New macro.
13103         (struct type): Add rvalue_reference_type field.
13104         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13105
13106 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13107
13108         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13109         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13110         New function definition.
13111         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13112         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13113         New function declaration.
13114         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13115         * mi/mi-interp.h: New file.
13116         * solib.c (info_sharedlibrary_command): Replace for loop with
13117         ALL_SO_LIBS macro
13118         * solib.h (update_solib_list): New function declaration.
13119         (so_list_head): Move macro.
13120         * solist.h (ALL_SO_LIBS): New macro.
13121
13122 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13123
13124         * infcmd.c (post_create_inferior): Remove unused argument in
13125         call to solib_add.
13126         * remote.c (remote_start_remote): Likewise.
13127         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13128         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13129         (enable_break): Likewise.
13130         * solib.c (update_solib_list): Remove unused target argument
13131         and its documentation.
13132         (solib_add): Remove unused target argument.  Remove unused
13133         argument in call to update_solib_list.
13134         (info_sharedlibrary_command): Remove unused argument in call
13135         to update_solib_list.
13136         (sharedlibrary_command): Remove unused argument in call to
13137         solib_add.
13138         (handle_solib_event): Likewise.
13139         (reload_shared_libraries): Likewise.
13140         * solib.h (solib_add): Remove unused target argument.
13141
13142 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13143
13144         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13145         (s390_displaced_step_fixup): Cover relative branches with the
13146         default fixup handling.  This fixes lack of support for some
13147         relative branch instructions.
13148
13149 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13150
13151         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13152         ptid from regcache.
13153
13154 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13155
13156         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13157         i386_darwin_store_inferior_registers): Use ptid from regcache.
13158
13159 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13160
13161         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13162         i386bsd_store_inferior_registers): Use ptid from regcache.
13163
13164 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13165
13166         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13167         hppaobsd_store_registers): Use ptid from regcache.
13168
13169 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13170
13171         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13172         hppanbsd_store_registers): Use ptid from regcache.
13173
13174 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13175
13176         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13177         from regcache.  Use get_ptrace_pid.
13178
13179 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13180
13181         * corelow.c (get_core_register_section): Use ptid from regcache,
13182         update doc.
13183
13184 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13185
13186         * bsd-uthread.c (bsd_uthread_fetch_registers,
13187         bsd_uthread_store_registers): Use ptid from regcache, set and
13188         restore inferior_ptid.
13189
13190 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13191
13192         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13193         fetch_fp_regs, store_register, store_regs, store_fp_register,
13194         store_fp_regs): Use ptid from regcache.
13195
13196 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13197
13198         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13199         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13200         store_vfp_regs): Use ptid from regcache.
13201
13202 2017-03-17  Pedro Alves  <palves@redhat.com>
13203
13204         PR remote/21188
13205         * ser-base.c (ser_base_wait_for): Add comment.
13206         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13207         version.
13208         * ser-unix.c (hardwire_raw): Remove reference to
13209         scb->current_timeout.
13210         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13211         (hardwire_ops): Install ser_base_readchar instead of
13212         hardwire_readchar.
13213         * serial.h (struct serial) <current_timeout, timeout_remaining>:
13214         Remove fields.
13215
13216 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
13217
13218         PR gdb/19637
13219         * python/lib/gdb/printer/bound_registers.py: Add support for
13220         Python 3.
13221
13222 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13223
13224         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13225         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13226         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13227         byte_offset to subobj_byte_offset.  Fix the handling of
13228         DWARF_VALUE_STACK on big-endian targets when coming via an
13229         implicit pointer.
13230         (dwarf2_evaluate_loc_desc): Adjust call to
13231         dwarf2_evaluate_loc_desc_full.
13232         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13233         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13234
13235 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13236
13237         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13238         and REVSH instructions.
13239
13240 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13241
13242         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13243         (arm_record_test): Declare.
13244         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13245         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13246         align with the manual.
13247         (thumb_record_misc): Adjust the code order to align with the
13248         manual.
13249         (thumb2_record_decode_insn_handler): Fix instruction matching.
13250         (instruction_reader_thumb): New class.
13251         (arm_record_test): New function.
13252
13253 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13254
13255         * arm-tdep.c (abstract_memory_reader): New class.
13256         (instruction_reader): New class.
13257         (extract_arm_insn): Add argument 'reader'.  Callers updated.
13258         (decode_insn): Likewise.
13259
13260 2017-03-16  Doug Evans  <dje@google.com>
13261
13262         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13263         member.  Change type of TYPE member to SCM.  All uses updated.
13264         (lsscm_make_lazy_string_smob): Add assert.
13265         (lsscm_make_lazy_string): Flag bad length values.
13266         (lsscm_elt_type): New function.
13267         (gdbscm_lazy_string_to_value): Rewrite to use
13268         lsscm_safe_lazy_string_to_value.
13269         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13270         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13271         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
13272         in incoming type.
13273         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13274         * guile/scm-type.c (tyscm_scm_to_type): New function.
13275
13276 2017-03-15  Doug Evans  <dje@google.com>
13277
13278         PR python/17728, python/18439, python/18779
13279         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13280         member.  Change type of TYPE member to PyObject *.  All uses updated.
13281         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13282         (gdbpy_create_lazy_string_object): Flag bad length values.
13283         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13284         Handle typedefs in incoming type.
13285         (stpy_lazy_string_elt_type): New function.
13286         (gdbpy_extract_lazy_string): Call it.
13287         * python/py-value.c (valpy_lazy_string): Flag bad length values.
13288         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
13289         typedefs in incoming type.
13290
13291 2017-03-16  Doug Evans  <dje@google.com>
13292
13293         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13294         * guile/scm-type.c (tyscm_scm_to_type): New function.
13295
13296 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
13297
13298         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13299         "ULONGEST" for "skip".
13300
13301 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13302
13303         PR gdb/21220
13304         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13305         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13306         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
13307         over ptrace peek/poke until end of buffer or error.
13308
13309 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
13310
13311         * parse.c (length_of_subexp): Make static.
13312         * parser-defs.h (length_of_subexp): Remove.
13313
13314 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13315
13316         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13317         as well.
13318
13319 2017-03-14  Pedro Alves  <palves@redhat.com>
13320
13321         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13322         (main): Use std::unique_ptr.  Remove calls to
13323         cp_demangled_name_parse_free.
13324
13325 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13326
13327         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13328         alphabsd_store_inferior_registers): Use regcache->ptid instead
13329         of inferior_ptid.
13330
13331 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13332
13333         * aix-thread.c (aix_thread_fetch_registers,
13334         aix_thread_store_registers): Use regcache->ptid instead of
13335         inferior_ptid.
13336
13337 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13338
13339         * aarch64-linux-nat.c (fetch_gregs_from_thread,
13340         store_gregs_to_thread, fetch_fpregs_from_thread,
13341         store_fpregs_to_thread): Use regcache->ptid instead of
13342         inferior_ptid.
13343
13344 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13345
13346         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13347         amd64_linux_fetch_inferior_registers): Use regcache->ptid
13348         instead of inferior_ptid.
13349
13350 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13351
13352         * target.c (target_fetch_registers, target_store_registers): Add
13353         assert.
13354
13355 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13356
13357         * regcache.h (regcache_get_ptid): New function.
13358         * regcache.c (regcache_get_ptid): New function.
13359
13360 2017-03-13  Mark Wielaard  <mark@klomp.org>
13361
13362         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13363
13364 2017-03-10  Keith Seitz  <keiths@redhat.com>
13365
13366         PR c++/8218
13367         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13368
13369 2017-03-08  Pedro Alves  <palves@redhat.com>
13370
13371         PR gdb/18360
13372         * infrun.c (start_step_over, do_target_resume, resume)
13373         (restart_threads): Assert we're not resuming a thread that is
13374         meant to be stopped.
13375         (infrun_thread_stop_requested_callback): Delete.
13376         (infrun_thread_stop_requested): If the thread is internally
13377         stopped, queue a pending stop event and clear the thread's
13378         inline-frame state.
13379         (handle_stop_requested): New function.
13380         (handle_syscall_event, handle_inferior_event_1): Use
13381         handle_stop_requested.
13382         (handle_stop_requested): New function.
13383         (handle_signal_stop): Set the thread's stop_signal here instead of
13384         at caller.
13385         (finish_step_over): Clear step over info unconditionally.
13386         (handle_signal_stop): If the user had interrupted the event
13387         thread, consider the stop a random signal.
13388         (handle_signal_stop) <signal arrived while stepping over
13389         breakpoint>: Don't restart threads here.
13390         (stop_waiting): Don't clear step-over info here.
13391
13392 2017-03-08  Pedro Alves  <palves@redhat.com>
13393
13394         PR 21206
13395         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13396         goes to argument 2, not 1.
13397
13398 2017-03-08  Pedro Alves  <palves@redhat.com>
13399
13400         PR cli/21218
13401         * top.c (gdb_readline_wrapper): Avoid passing NULL to
13402         display_gdb_prompt.
13403         (command_line_input): Add comment.
13404
13405 2017-03-08  Pedro Alves  <palves@redhat.com>
13406
13407         PR tui/21216
13408         * tui/tui-file.c (tui_file::write): New.
13409         * tui/tui-file.h (tui_file): Override "write".
13410         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13411         factored out from ...
13412         (tui_puts): ... here.
13413         (tui_putc): Use them.
13414         (tui_write): New function.
13415         * tui/tui-io.h (tui_write): Declare.
13416
13417 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
13418
13419         * Makefile.in (SFILES): Replace "environ.c" with
13420         "common/environ.c".
13421         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13422         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
13423         to...
13424         * common/environ.c: ... here.
13425         * environ.h: Moved to...
13426         * common/environ.h: ... here.
13427
13428 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13429
13430         * gdbarch.sh (pstring_ptr): New static function.
13431         (gdbarch_disassembler_options): Use it.
13432         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13433         not valid_disassembler_option->name.
13434         * gdbarch.c: Regenerate.
13435
13436 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13437
13438         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13439
13440 2017-03-07  Pedro Alves  <palves@redhat.com>
13441
13442         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13443
13444 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13445
13446         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13447         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13448         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13449         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13450
13451 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
13452
13453         * xtensa-linux-nat.c (fetch_gregs): Remove const.
13454
13455 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
13456
13457         * remote.c (remote_add_target_side_commands): Use range-based
13458         for loop.
13459
13460 2017-03-03  Yao Qi  <yao.qi@linaro.org>
13461
13462         PR gdb/21165
13463         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13464         value is lazy.
13465         * valprint.c (common_val_print): Likewise.
13466
13467 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
13468
13469         * NEWS: Mention new set/show disassembler-options commands.
13470         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13471         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13472         (prospective_options): New static variable.
13473         (gdb_disassembler::gdb_disassembler): Initialize
13474         m_di.disassembler_options.
13475         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13476         (get_disassembler_options): New function.
13477         (set_disassembler_options): Likewise.
13478         (set_disassembler_options_sfunc): Likewise.
13479         (show_disassembler_options_sfunc): Likewise.
13480         (disassembler_options_completer): Likewise.
13481         (_initialize_disasm): Likewise.
13482         * disasm.h (get_disassembler_options): New prototype.
13483         (set_disassembler_options): Likewise.
13484         * gdbarch.sh (gdbarch_disassembler_options): New variable.
13485         (gdbarch_verify_disassembler_options): Likewise.
13486         * gdbarch.c: Regenerate.
13487         * gdbarch.h: Likewise.
13488         * arm-tdep.c (num_disassembly_options): Delete.
13489         (set_disassembly_style): Likewise.
13490         (arm_disassembler_options): New static variable.
13491         (set_disassembly_style_sfunc): Convert short style name into long
13492         option name.  Call set_disassembler_options.
13493         (show_disassembly_style_sfunc): New function.
13494         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13495         set_gdbarch_verify_disassembler_options.
13496         (_initialize_arm_tdep): Delete regnames variable and update callers.
13497         (arm_disassembler_options): Initialize.
13498         (disasm_options): New variable.
13499         (num_disassembly_options): Rename from this...
13500         (num_disassembly_styles): ...to this.  Compute by scanning through
13501         disasm_options.
13502         (valid_disassembly_styles): Initialize using disasm_options.
13503         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13504         set_arm_regname_option.
13505         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13506         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13507         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13508         set_gdbarch_verify_disassembler_options.
13509         * s390-tdep.c (s390_disassembler_options): New static variable.
13510         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13511         set_gdbarch_verify_disassembler_options.
13512
13513 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13514
13515         * remote.c (remote_add_target_side_condition): Remove "struct"
13516         keyword from range-based for loop.
13517
13518 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13519
13520         * remote.c (remote_add_target_side_condition): Use range-based
13521         for loop.  Update comment.
13522
13523 2017-02-27  Yao Qi  <yao.qi@linaro.org>
13524
13525         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13526
13527 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
13528
13529         * regcache.c (regcache_raw_update): New function.
13530         (regcache_raw_read): Move code to regcache_raw_update.
13531         * regcache.h (regcache_raw_update): New declaration.
13532         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13533
13534 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
13535
13536         * dwarf2read.c (create_debug_type_hash_table): Initialize
13537         header.signature and header.type_offset_in_tu.
13538
13539 2017-02-24  Pedro Alves  <palves@redhat.com>
13540
13541         * symtab.c (make_file_symbol_completion_list_1): Use
13542         add_symtab_completions.
13543
13544 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13545
13546         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13547
13548 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13549
13550         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13551         I386_MAX_REGISTER_SIZE.
13552         (i386_pseudo_register_write): Likewise.
13553         (i386_process_record): Likewise.
13554         * i387-tdep.c (i387_supply_xsave): Likewise.
13555         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13556         (store_register): Likewise.
13557
13558 2017-02-23  Pedro Alves  <palves@redhat.com>
13559
13560         * ada-lang.c: Include "common/function-view.h".
13561         (ada_iterate_over_symbols): Adjust to use function_view as
13562         callback type.
13563         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13564         (ada_make_symbol_completion_list): Use a lambda.
13565         (ada_exc_search_name_matches): Delete.
13566         (name_matches_regex): New.
13567         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13568         * compile/compile-c-support.c: Include "common/function-view.h".
13569         (print_one_macro): Change prototype to accept a ui_file pointer.
13570         (write_macro_definitions): Use a lambda.
13571         * dwarf2read.c: Include "common/function-view.h".
13572         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13573         (dw2_expand_symtabs_matching): Adjust to use function_view as
13574         callback type.
13575         * language.h: Include "common/function-view.h".
13576         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13577         function_view as callback type.
13578         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13579         * linespec.c: Include "common/function-view.h".
13580         (collect_info::add_symbol): New method.
13581         (struct symbol_and_data_callback, iterate_inline_only, struct
13582         symbol_matcher_data, iterate_name_matcher): Delete.
13583         (iterate_over_all_matching_symtabs): Adjust to use function_view
13584         as callback type and lambdas.
13585         (iterate_over_file_blocks): Adjust to use function_view as
13586         callback type.
13587         (decode_compound_collector): Now a class with private fields.
13588         (decode_compound_collector::release_symbols): New method.
13589         (collect_one_symbol): Rename to...
13590         (decode_compound_collector::operator()): ... this and adjust.
13591         (lookup_prefix_sym): decode_compound_collector construction bits
13592         move to decode_compound_collector ctor.  Pass the
13593         decode_compound_collector object directly as callback.  Remove
13594         cleanups and use decode_compound_collector::release_symbols
13595         instead.
13596         (symtab_collector): Now a class with private fields.
13597         (symtab_collector::release_symtabs): New method.
13598         (add_symtabs_to_list): Rename to...
13599         (symtab_collector::operator()): ... this and adjust.
13600         (collect_symtabs_from_filename): symtab_collector construction
13601         bits move to symtab_collector ctor.  Pass the symtab_collector
13602         object directly as callback.  Remove cleanups and use
13603         symtab_collector::release_symtabs instead.
13604         (collect_symbols): Delete.
13605         (add_matching_symbols_to_info): Use lambdas.
13606         * macrocmd.c (print_macro_callback): Delete.
13607         (info_macro_command): Use a lambda.
13608         (info_macros_command): Pass print_macro_definition as callable
13609         directly.
13610         (print_one_macro): Remove 'ignore' parameter.
13611         (macro_list_command): Adjust.
13612         * macrotab.c (macro_for_each_data::fn): Now a function_view.
13613         (macro_for_each_data::user_data): Delete field.
13614         (foreach_macro): Adjust to call the function_view.
13615         (macro_for_each): Adjust to use function_view as callback type.
13616         (foreach_macro_in_scope): Adjust to call the function_view.
13617         (macro_for_each_in_scope): Adjust to use function_view as callback
13618         type.
13619         * macrotab.h: Include "common/function-view.h".
13620         (macro_callback_fn): Declare a prototype instead of a pointer.
13621         Remove "user_data" parameter.
13622         (macro_for_each, macro_for_each_in_scope): Adjust to use
13623         function_view as callback type.
13624         * psymtab.c (partial_map_expand_apply)
13625         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13626         Adjust to use function_view as callback type and to return bool.
13627         (psym_expand_symtabs_matching): Adjust to use function_view as
13628         callback types.
13629         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13630         to use function_view as callback type and to return bool.
13631         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13632         callback types.
13633         * symfile.c (expand_symtabs_matching): Adjust to use function_view
13634         as callback types.
13635         * symfile.h: Include "common/function-view.h".
13636         (expand_symtabs_file_matcher_ftype)
13637         (expand_symtabs_symbol_matcher_ftype)
13638         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13639         return bool.
13640         (quick_symbol_functions::map_symtabs_matching_filename)
13641         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13642         function_view as callback type and return bool.
13643         (expand_symtabs_matching): Adjust to use function_view as callback
13644         type.
13645         (maintenance_expand_name_matcher)
13646         (maintenance_expand_file_matcher): Delete.
13647         (maintenance_expand_symtabs): Use lambdas.
13648         * symtab.c (iterate_over_some_symtabs): Adjust to use
13649         function_view as callback types and return bool.
13650         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
13651         of a cleanup.
13652         (lookup_symtab_callback): Delete.
13653         (lookup_symtab): Use a lambda.
13654         (iterate_over_symbols): Adjust to use function_view as callback
13655         type.
13656         (struct search_symbols_data, search_symbols_file_matches)
13657         (search_symbols_name_matches): Delete.
13658         (search_symbols): Use a pair of lambdas.
13659         (struct add_name_data, add_macro_name, symbol_completion_matcher)
13660         (symtab_expansion_callback): Delete.
13661         (default_make_symbol_completion_list_break_on_1): Use lambdas.
13662         * symtab.h: Include "common/function-view.h".
13663         (iterate_over_some_symtabs): Adjust to use function_view as
13664         callback type and return bool.
13665         (iterate_over_symtabs): Adjust to use function_view as callback
13666         type.
13667         (symbol_found_callback_ftype): Remove 'data' parameter and return
13668         bool.
13669         (iterate_over_symbols): Adjust to use function_view as callback
13670         type.
13671
13672 2017-02-23  Pedro Alves  <palves@redhat.com>
13673
13674         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
13675         (%.o) <unittests/%.c>: New pattern.
13676         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
13677         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
13678         * common/function-view.h: New file.
13679         * unittests/function-view-selftests.c: New file.
13680         * configure: Regenerate.
13681
13682 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
13683
13684         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
13685         inferior_ptid.
13686         * go32-nat.c (go32_thread_alive): Likewise.
13687
13688 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13689
13690         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
13691         delete.
13692
13693 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13694
13695         * varobj.c (varobj_clear_saved_item): Use delete instead of
13696         xfree.
13697         (update_dynamic_varobj_children): Likewise.
13698
13699 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13700
13701         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
13702
13703 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
13704
13705         * common/enum-flags.h (enum_flags::enum_flags): Initialize
13706         m_enum_value to 0 in default constructor.
13707
13708 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
13709
13710         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
13711         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
13712         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
13713         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
13714         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
13715         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
13716         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
13717         IS_STORE_CONDITIONAL_INSN.
13718
13719 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13720
13721         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
13722
13723 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13724
13725         * NEWS (Changes since GDB 7.12): Add DWARF-5.
13726
13727 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13728
13729         * dwarf2read.c (skip_one_die, read_attribute_value)
13730         (dwarf2_const_value_attr, dump_die_shallow)
13731         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
13732         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
13733
13734 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13735
13736         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
13737         (dwarf_parse_macro_header): Accept DWARF version 5.
13738         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
13739
13740 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13741
13742         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
13743         DW_AT_GNU_*.
13744         * common/common-exceptions.h (enum errors): Likewise.
13745         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
13746         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
13747         (dwarf_expr_context::execute_stack_op): Likewise.
13748         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
13749         Likewise.
13750         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
13751         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
13752         (show_entry_values_debug, call_site_to_target_addr)
13753         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
13754         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
13755         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
13756         (value_of_dwarf_block_entry, indirect_pieced_value)
13757         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
13758         (disassemble_dwarf_expression): Likewise.
13759         * dwarf2read.c (process_die, inherit_abstract_dies)
13760         (read_call_site_scope): Likewise.
13761         * gdbtypes.h (struct func_type, struct call_site_parameter)
13762         (struct call_site): Likewise.
13763         * stack.c (read_frame_arg): Likewise.
13764         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
13765
13766 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13767
13768         * defs.h (read_unsigned_leb128): New declaration.
13769         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
13770         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
13771         (dwarf2_find_location_expression): Call also
13772         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
13773         * dwarf2loc.h (dwarf2_version): New declaration.
13774         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
13775         rnglists.
13776         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
13777         .debug_rnglists.
13778         (struct dwop_section_names): Add loclists_dwo.
13779         (dwop_section_names): Add .debug_loclists.dwo.
13780         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
13781         (struct dwarf2_per_cu_data): Add dwarf_version.
13782         (struct dwo_sections): Add loclists.
13783         (struct attr_abbrev): Add implicit_const.
13784         (read_indirect_line_string): New declaration.
13785         (read_unsigned_leb128): Delete declaration.
13786         (rcuh_kind): New definition.
13787         (read_and_check_comp_unit_head): Change parameter
13788         is_debug_types_section to section_kind.
13789         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
13790         (read_comp_unit_head): Change parameter abfd to section, add parameter
13791         section_kind.  Handle DWARF-5.
13792         (error_check_comp_unit_head): Accept also DWARF version 5.
13793         (read_and_check_comp_unit_head): Change parameter
13794         is_debug_types_section to section_kind.
13795         (read_and_check_type_unit_head): Delete function.
13796         (read_abbrev_offset): Handle DWARF-5.
13797         (create_debug_type_hash_table): Add parameter section_kind.  Process
13798         only DW_UT_type.  Use signature and type_offset_in_tu from struct
13799         comp_unit_head.
13800         (create_debug_types_hash_table): Update create_debug_type_hash_table
13801         caller.
13802         (create_all_type_units): Call create_debug_type_hash_table.
13803         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
13804         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13805         caller.
13806         (skip_one_die): Handle DW_FORM_implicit_const.
13807         (dwarf2_rnglists_process): New function.
13808         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13809         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13810         (read_attribute_value): Handle DW_FORM_implicit_const,
13811         DW_FORM_line_strp.
13812         (read_attribute): Handle DW_FORM_implicit_const.
13813         (read_indirect_string_at_offset_from): New function from
13814         read_indirect_string_at_offset.
13815         (read_indirect_string_at_offset): Call
13816         read_indirect_string_at_offset_from.
13817         (read_indirect_line_string_at_offset): New function.
13818         (read_indirect_string): New function comment.
13819         (read_indirect_line_string): New function.
13820         (read_unsigned_leb128): Make it global.
13821         (dwarf2_string_attr): Handle DWARF-5.
13822         (add_include_dir_stub, read_formatted_entries): New functions.
13823         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
13824         Handle DWARF-5.
13825         (per_cu_header_read_in): Update read_comp_unit_head caller.
13826         (dwarf2_version): New function.
13827         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
13828         rnglists.
13829         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
13830         fields.
13831
13832 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13833
13834         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
13835
13836 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13837
13838         * dwarf2read.c (dwarf2_ranges_process): New function from
13839         dwarf2_ranges_read.
13840         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
13841         dwarf2_ranges_process.
13842
13843 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13844
13845         * dwarf2read.c (create_debug_type_hash_table): New function from
13846         create_debug_types_hash_table.
13847         (create_debug_types_hash_table): Call create_debug_type_hash_table.
13848         (create_all_type_units, open_and_init_dwo_file): Update
13849         create_debug_types_hash_table callers.
13850
13851 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13852
13853         PR gdb/16188
13854         * fork-child.c (trace_start_error): Fix thinko.  va_end should
13855         refer to 'ap', not 'args'.
13856
13857 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13858             Pedro Alves  <palves@redhat.com>
13859
13860         PR gdb/16188
13861         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
13862         calls succeeded.
13863         * fork-child.c (trace_start_error): New function.
13864         (trace_start_error_with_name): Likewise.
13865         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
13866         * inf-ptrace.c (inf_ptrace_me): Likewise.
13867         * inferior.h (trace_start_error): New prototype.
13868         (trace_start_error_with_name): Likewise.
13869
13870 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
13871
13872         PR gdb/21164
13873         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
13874         NULL before using it.
13875         * symmisc.c (maintenance_print_symbols): Likewise.
13876         (maintenance_print_msymbols): Likewise.
13877
13878 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13879
13880         * NEWS: Add record Python bindings entry.
13881
13882 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13883
13884         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
13885         py-record-full.o.
13886         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
13887         * python/py-record-btrace.c, python/py-record-btrace.h,
13888         python/py-record-full.c, python/py-record-full.h: New file.
13889         * python/py-record.c: Add include for py-record-btrace.h and
13890         py-record-full.h.
13891         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
13892         recpy_instruction_history, recpy_function_call_history, recpy_begin,
13893         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
13894         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
13895         New definition.
13896         (gdbpy_initialize_btrace): New export.
13897         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
13898
13899 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13900
13901         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
13902         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
13903         * python/py-record.c: New file.
13904         * python/python-internal.h (gdbpy_start_recording,
13905         gdbpy_current_recording, gdpy_stop_recording,
13906         gdbpy_initialize_record): New export.
13907         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
13908         (python_GdbMethods): Add gdbpy_start_recording,
13909         gdbpy_current_recording and gdbpy_stop_recording.
13910
13911 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13912
13913         * record-btrace.c (record_btrace_record_method): New function.
13914         (init_record_btrace_ops): Initialize to_record_method.
13915         * record-full.c (record_full_record_method): New function.
13916         (init_record_full_ops, init_record_full_core_ops): Add
13917         record_full_record_method.
13918         * record.h (enum record_method): New enum.
13919         * target-debug.h (target_debug_print_enum_record_method: New define.
13920         * target-delegates.c: Regenerate.
13921         * target.c (target_record_method): New function.
13922         * target.h: Include record.h.
13923         (struct target_ops) <to_record_method>: New field.
13924         (target_record_method): New export.
13925
13926 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13927
13928         * record.h (record_start, record_stop): New export.
13929         * record.c (record_start, record_stop): New function.
13930
13931 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13932
13933         * btrace.c (btrace_fetch): Copy function call segments pointer
13934         into a vector.
13935         (btrace_clear): Clear the vector.
13936         (btrace_find_insn_by_number): Use binary search to find the correct
13937         function call segment.
13938         * btrace.h (brace_fun_p): New typedef.
13939         (struct btrace_thread_info) <functions>: New field.
13940
13941 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13942
13943         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
13944         * btrace.c (btrace_decode_error): ... here.  New function.
13945         * btrace.h (btrace_decode_error): New export.
13946
13947 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13948
13949         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
13950         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
13951         btrace_find_insn_by_number): Remove special case for gaps.
13952         * btrace.h (btrace_insn_get_error): New export.
13953         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
13954         * record-btrace.c (btrace_insn_history): Print number for gaps.
13955         (record_btrace_info, record_btrace_goto): Handle gaps.
13956
13957 2017-02-14  Tom Tromey  <tom@tromey.com>
13958
13959         PR python/13598:
13960         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
13961         event.
13962         * python/py-evts.c (gdbpy_initialize_py_events): Add
13963         before_prompt registry.
13964         * python/py-events.h (events_object) <before_prompt>: New field.
13965
13966 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
13967
13968         * btrace.c (ftrace_new_switch): Preserve up link and flags.
13969
13970 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
13971
13972         * symfile (_initialize_symfile): Add usage text to the load command's
13973         help text.
13974
13975 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
13976
13977         * utils.c (defaulted_query): Don't query on secondary UIs.
13978
13979 2017-02-10  Tom Tromey  <tom@tromey.com>
13980
13981         * rust-lang.c (rust_get_disr_info): Remove unused variable.
13982
13983 2017-02-10  Tom Tromey  <tom@tromey.com>
13984
13985         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
13986         "cleanup" local.
13987         * python/py-type.c (typy_legacy_template_argument): Remove
13988         unnecessary "cleanup" local.
13989
13990 2017-02-10  Tom Tromey  <tom@tromey.com>
13991
13992         * python/python.c (do_start_initialization): New function, from
13993         _initialize_python.
13994         (_initialize_python): Call do_start_initialization.
13995         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
13996         goto.
13997
13998 2017-02-10  Tom Tromey  <tom@tromey.com>
13999
14000         * python/py-prettyprint.c (pretty_print_one_value): Use
14001         gdbpy_ref.
14002
14003 2017-02-10  Tom Tromey  <tom@tromey.com>
14004
14005         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14006         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14007         gdbpy_ref.
14008         * python/py-type.c (field_new): Use gdbpy_ref.
14009         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14010         gdbpy_ref.
14011         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14012         (py_free_pspace): Likewise.
14013         (pspace_to_pspace_object): Likewise.
14014         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14015         (py_free_objfile): Likewise.
14016         (objfile_to_objfile_object): Likewise.
14017         * python/py-inferior.c (delete_thread_object): Use
14018         gdbpy_ref.
14019         (infpy_read_memory): Likewise.
14020         (py_free_inferior): Likewise.
14021         * python/py-evtregistry.c (create_eventregistry_object): Use
14022         gdbpy_ref.
14023         * python/py-event.c (create_event_object): Use gdbpy_ref.
14024
14025 2017-02-10  Tom Tromey  <tom@tromey.com>
14026
14027         * python/py-ref.h (gdbpy_ref_policy): Now a template.
14028         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14029         used.
14030         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14031         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14032         python/py-exitedevent.c, python/py-finishbreakpoint.c,
14033         python/py-framefilter.c, python/py-function.c,
14034         python/py-inferior.c, python/py-infevents.c,
14035         python/py-linetable.c, python/py-newobjfileevent.c,
14036         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14037         python/py-signalevent.c, python/py-stopevent.c,
14038         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14039         python/py-unwind.c, python/py-utils.c, python/py-value.c,
14040         python/py-varobj.c, python/py-xmethods.c, python/python.c,
14041         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14042
14043 2017-02-10  Tom Tromey  <tom@tromey.com>
14044
14045         * ui-out.h (ui_out_emit_type): New class.
14046         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14047         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14048         and ui_out_emit_tuple.
14049         (enumerate_locals): Likewise.
14050         (py_mi_print_variables, py_print_locals, py_print_args): Use
14051         ui_out_emit_list.
14052         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14053         ui_out_emit_list.
14054         * common/gdb_optional.h: New file.
14055
14056 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14057
14058         * MAINTAINERS (Write After Approval): Update my e-mail address.
14059
14060 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14061
14062         PR gdb/21122
14063         * breakpoint.c (_initialize_breakpoint): Update the help description
14064         of the 'commands' command to indicate that it takes a list argument.
14065
14066 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
14067
14068         * interps.c (current_interp_set_logging): Remove "return".
14069
14070 2017-02-09  Gary Benson  <gbenson@redhat.com>
14071
14072         * symtab.c (add_symtab_completions): Prevent NULL pointer
14073         dereference.
14074
14075 2017-02-08  Pedro Alves  <palves@redhat.com>
14076
14077         * interps.c (interp::interp): Remove reference to quiet_p.
14078         (interp_set): Make static.  Remove dead "Switching to" output
14079         code.
14080         (interp_quiet_p, interp_set_quiet): Delete.
14081         (interpreter_exec_cmd): Don't set the interpreter quiet.
14082         * interps.h (interp_quiet_p): Make static.
14083         (class interp) <quiet_p>: Remove field
14084
14085 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14086
14087         * cli/cli-decode.c (find_command_name_length): Make it extern.
14088         * cli/cli-decode.h (find_command_name_length): Declare.
14089         * cli/cli-script.c (command_name_equals, line_first_arg):
14090         New functions.
14091         (process_next_line): Use cli-decode to parse command names.
14092         (build_command_line): Make args a constant pointer.
14093
14094 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14095
14096         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14097         Remove case-insensitive search.
14098
14099 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
14100
14101         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14102         at the end of the line.  Avoids an ARI warning.
14103
14104 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
14105
14106         * NEWS: Mention support for record/replay of Intel 64 rdrand and
14107         rdseed instructions.
14108         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14109
14110 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
14111
14112         PR tdep/20936
14113         Provide and use sparc32 and sparc64 target description XML files.
14114         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14115         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14116         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14117         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14118         * features/sparc/sparc32-solaris.xml: New file.
14119         * features/sparc/sparc64-solaris.xml: New file.
14120         * features/sparc/sparc32-solaris.c: Generated.
14121         * features/sparc/sparc64-solaris.c: Generated.
14122         * sparc-tdep.h: Account for differences in target descriptions.
14123         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14124         (sparc32_register_type): Use target provided registers.
14125         (validate_tdesc_registers): New function.
14126         (sparc32_gdbarch_init): Use tdesc_has_registers.
14127         Set pseudoregister functions.
14128         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14129         (sparc64_register_type): Use target provided registers.
14130         (sparc64_init_abi): Set pseudoregister functions.
14131
14132 2017-02-03  Tom Tromey  <tom@tromey.com>
14133
14134         PR rust/21097:
14135         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14136         with a single member.
14137
14138 2017-02-03  Pedro Alves  <palves@redhat.com>
14139
14140         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14141         (cli_interp_base::~cli_interp_base): New.
14142         (cli_interp): New struct.
14143         (as_cli_interp): Cast the interp itself to cli_interp.
14144         (cli_interpreter_pre_command_loop): Rename to ...
14145         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
14146         parameter.
14147         (cli_interpreter_init): Rename to ...
14148         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
14149         boolean.  Make extern.
14150         (cli_interpreter_resume): Rename to ...
14151         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
14152         extern.
14153         (cli_interpreter_suspend): Rename to ...
14154         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
14155         extern.
14156         (cli_interpreter_exec): Rename to ...
14157         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
14158         extern.
14159         (cli_interpreter_supports_command_editing): Rename to ...
14160         (cli_interp_base::supports_command_editing): ... this.  Remove
14161         'interp' parameter.  Make extern.
14162         (cli_ui_out): Rename to ...
14163         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
14164         Make extern.
14165         (cli_set_logging): Rename to ...
14166         (cli_interp_base::set_logging): ... this.  Remove 'interp'
14167         parameter.  Make extern.
14168         (cli_interp_procs): Delete.
14169         (cli_interp_factory): Adjust to use "new".
14170         * cli/cli-interp.h: Include "interps.h".
14171         (struct cli_interp_base): New struct.
14172         * interps.c (struct interp): Delete.  Fields moved to interps.h.
14173         (interp_new): Delete.
14174         (interp::interp, interp::~interp): New.
14175         (interp_set): Use bool, and return void.  Assume the interpreter
14176         has suspend, init and resume methods, and that the all return
14177         void.
14178         (set_top_level_interpreter): interp_set returns void.
14179         (interp_ui_out): Adapt.
14180         (current_interp_set_logging): Adapt.
14181         (interp_data): Delete.
14182         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14183         (interp_exec): Adapt.
14184         (top_level_interpreter_data): Delete.
14185         * interps.h (interp_init_ftype, interp_resume_ftype)
14186         (interp_suspend_ftype, interp_exec_ftype)
14187         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14188         (class interp): New.
14189         (interp_new): Delete.
14190         (interp_set): Now returns void.  Use bool.
14191         (interp_data, top_level_interpreter_data): Delete.
14192         * mi/mi-common.h: Include interps.h.
14193         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
14194         init, resume, suspect, exec, interp_ui_out, set_logging and
14195         pre_command_loop methods.
14196         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14197         (mi_interpreter_init): Rename to ...
14198         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
14199         bool, return void and make extern.  Adjust.
14200         (mi_interpreter_resume): ... Rename to ...
14201         (mi_interp::resume): ... this.  Remove the 'data' parameter,
14202         return void and make extern.  Adjust.
14203         (mi_interpreter_suspend): ... Rename to ...
14204         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
14205         return void and make extern.  Adjust.
14206         (mi_interpreter_exec): ... Rename to ...
14207         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
14208         extern.  Adjust.
14209         (mi_interpreter_pre_command_loop): ... Rename to ...
14210         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
14211         parameter and make extern.
14212         (mi_on_normal_stop_1): Adjust.
14213         (mi_ui_out): Rename to ...
14214         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
14215         parameter and make extern.  Adjust.
14216         (mi_set_logging): Rename to ...
14217         (mi_interp::set_logging): ... this.  Remove the 'interp'
14218         parameter and make extern.  Adjust.
14219         (mi_interp_procs): Delete.
14220         (mi_interp_factory): Adjust to use 'new'.
14221         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14222         (mi_print_exception, mi_execute_command, mi_load_progress):
14223         Adjust.
14224         * tui/tui-interp.c (tui_interp): New class.
14225         (as_tui_interp): Return a tui_interp pointer.
14226         (tui_on_normal_stop, tui_on_signal_received)
14227         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14228         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14229         to use interp::interp_ui_out.
14230         (tui_init): Rename to ...
14231         (tui_interp::init): ... this.  Remove the 'self' parameter, use
14232         bool, return void and make extern.  Adjust.
14233         (tui_resume): Rename to ...
14234         (tui_interp::resume): ... this.  Remove the 'data' parameter,
14235         return void and make extern.  Adjust.
14236         (tui_suspend): Rename to ...
14237         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
14238         return void and make extern.  Adjust.
14239         (tui_ui_out): Rename to ...
14240         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
14241         parameter, and make extern.  Adjust.
14242         (tui_exec): Rename to ...
14243         (tui_interp::exec): ... this.  Remove the 'data' parameter and
14244         make extern.
14245         (tui_interp_procs): Delete.
14246         (tui_interp_factory): Use "new".
14247
14248 2017-02-02  Tom Tromey  <tom@tromey.com>
14249
14250         * rust-exp.y (ends_raw_string, space_then_number)
14251         (rust_identifier_start_p): Return bool.
14252         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14253         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14254         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14255         (rust_chartype_p): Return bool.
14256         (val_print_struct, rust_print_struct_def, rust_print_type):
14257         Update.
14258         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14259         Return bool.
14260
14261 2017-02-02  Tom Tromey  <tom@tromey.com>
14262
14263         * rust-lang.c: Reindent.
14264
14265 2017-02-02  Tom Tromey  <tom@tromey.com>
14266
14267         * rust-lang.h (rust_crate_for_block): Update.
14268         * rust-lang.c (rust_crate_for_block): Return std::string.
14269         (rust_get_disr_info): Use std:;string, not
14270         gdb::unique_xmalloc_ptr.
14271         * rust-exp.y (crate_name): Update.
14272
14273 2017-02-02  Pedro Alves  <palves@redhat.com>
14274
14275         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14276         field out of gdb_disassembler_test and make it static.
14277
14278 2017-02-02  Pedro Alves  <palves@redhat.com>
14279
14280         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14281         mi1_interp and mi_interp fields.
14282
14283 2017-02-02  Pedro Alves  <palves@redhat.com>
14284
14285         * cli/cli-interp.c (struct saved_output_files, saved_output):
14286         Moved from cli/cli-logging.c.
14287         (cli_set_logging): New function.
14288         (cli_interp_procs): Install cli_set_logging.
14289         * cli/cli-interp.h (make_logging_output, cli_set_logging):
14290         Declare.
14291         * cli/cli-logging.c (struct saved_output_files, saved_output):
14292         Moved to cli/cli-interp.c.
14293         (pop_output_files): Don't save outputs here.
14294         (make_logging_output): New function.
14295         (handle_redirections): Don't build tee nor save previous outputs
14296         here.
14297         * interps.c (current_interp_set_logging): Change prototype.
14298         Assume there's always a set_logging_proc method installed.
14299         * interps.h (interp_set_logging_ftype): Change prototype.
14300         (current_interp_set_logging): Change prototype and adjust comment.
14301         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
14302         use make_logging_output.
14303         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14304 2017-02-02  Pedro Alves  <palves@redhat.com>
14305
14306         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14307         from ...
14308         (set_logging_overwrite): ... here.
14309         (logging_no_redirect_file): Delete.
14310         (set_logging_redirect): Don't handle redirection on the fly.
14311         Instead warn that "logging off" / "logging on" is necessary.
14312         (pop_output_files): Delete references to logging_no_redirect_file.
14313         (show_logging_command): Always speak in terms of what will happen
14314         once logging is reenabled.
14315
14316 2017-02-02  Pedro Alves  <palves@redhat.com>
14317
14318         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14319
14320 2017-02-02  Pedro Alves  <palves@redhat.com>
14321
14322         * disasm.c (gdb_pretty_print_insn): Rename to ...
14323         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14324         Remove gdbarch parameter.  Adapt to clear the object's buffers
14325         instead of allocating new buffers, and to print using the object's
14326         gdb_disassembler instead of calling gdb_print_insn.
14327         (dump_insns): Use gdb_pretty_print_disassembler.
14328         * disasm.h (gdb_pretty_print_insn): Delete declaration.
14329         (gdb_pretty_print_disassembler): New class.
14330         * record-btrace.c (btrace_insn_history): Use
14331         gdb_pretty_print_disassembler.
14332
14333 2017-02-02  Pedro Alves  <palves@redhat.com>
14334
14335         * ada-lang.c (type_as_string): Use string_file.
14336         * ada-valprint.c (ada_print_floating): Use string_file.
14337         * ada-varobj.c (ada_varobj_scalar_image)
14338         (ada_varobj_get_value_image): Use string_file.
14339         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14340         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14341         * breakpoint.c (update_inserted_breakpoint_locations)
14342         (insert_breakpoint_locations, reattach_breakpoints)
14343         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14344         (print_it_watchpoint): Use string_file.
14345         (save_breakpoints): Use stdio_file.
14346         * c-exp.y (oper): Use string_file.
14347         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14348         tee_file.
14349         (pop_output_files): Use delete.
14350         (handle_redirections): Use stdio_file and tee_file.
14351         * cli/cli-setshow.c (do_show_command): Use string_file.
14352         * compile/compile-c-support.c (c_compute_program): Use
14353         string_file.
14354         * compile/compile-c-symbols.c (generate_vla_size): Take a
14355         'string_file &' instead of a 'ui_file *'.
14356         (generate_c_for_for_one_variable): Take a 'string_file &' instead
14357         of a 'ui_file *'.  Use string_file.
14358         (generate_c_for_variable_locations): Take a 'string_file &'
14359         instead of a 'ui_file *'.
14360         * compile/compile-internal.h (generate_c_for_for_one_variable):
14361         Take a 'string_file &' instead of a 'ui_file *'.
14362         * compile/compile-loc2c.c (push, pushf, unary, binary)
14363         (print_label, pushf_register_address, pushf_register)
14364         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14365         'ui_file *'.  Adjust.
14366         * compile/compile.c (compile_to_object): Use string_file.
14367         * compile/compile.h (compile_dwarf_expr_to_c)
14368         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14369         'ui_file *'.
14370         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14371         (replace_typedefs_qualified_name): Use string_file and
14372         obstack_copy0.
14373         * disasm.c (gdb_pretty_print_insn): Use string_file.
14374         (gdb_disassembly): Adjust reference the null_stream global.
14375         (do_ui_file_delete): Delete.
14376         (gdb_insn_length): Use null_stream.
14377         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14378         * dwarf2loc.c (dwarf2_compile_property_to_c)
14379         (locexpr_generate_c_location, loclist_generate_c_location): Take a
14380         'string_file &' instead of a 'ui_file *'.
14381         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14382         * dwarf2read.c (do_ui_file_peek_last): Delete.
14383         (dwarf2_compute_name): Use string_file.
14384         * event-top.c (gdb_setup_readline): Use stdio_file.
14385         * gdbarch.sh (verify_gdbarch): Use string_file.
14386         * gdbtypes.c (safe_parse_type): Use null_stream.
14387         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14388         string_file.
14389         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14390         'string_file *' instead of a 'ui_file *'.
14391         (gdbscm_arch_disassemble): Use string_file.
14392         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14393         * guile/scm-ports.c (class ioscm_file_port): Now a class that
14394         inherits from ui_file.
14395         (ioscm_file_port_delete, ioscm_file_port_rewind)
14396         (ioscm_file_port_put): Delete.
14397         (ioscm_file_port_write): Rename to ...
14398         (ioscm_file_port::write): ... this.  Remove file_port_magic
14399         checks.
14400         (ioscm_file_port_new): Delete.
14401         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14402         ui_file_up.
14403         * guile/scm-type.c (tyscm_type_name): Use string_file.
14404         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14405         Use string_file.
14406         * infcmd.c (print_return_value_1): Use string_file.
14407         * infrun.c (print_target_wait_results): Use string_file.
14408         * language.c (add_language): Use string_file.
14409         * location.c (explicit_to_string_internal): Use string_file.
14410         * main.c (captured_main_1): Use null_file.
14411         * maint.c (maintenance_print_architecture): Use stdio_file.
14412         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14413         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14414         event_channel>: Change type to mi_console_file pointer.
14415         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14416         (mi_console_file_delete): Delete.
14417         (struct mi_console_file): Delete.
14418         (mi_console_file_magic): Delete.
14419         (mi_console_file_new): Delete.
14420         (mi_console_file::mi_console_file): New.
14421         (mi_console_file_delete): Delete.
14422         (mi_console_file_fputs): Delete.
14423         (mi_console_file::write): New.
14424         (mi_console_raw_packet): Delete.
14425         (mi_console_file::flush): New.
14426         (mi_console_file_flush): Delete.
14427         (mi_console_set_raw): Rename to ...
14428         (mi_console_file::set_raw): ... this.
14429         * mi/mi-console.h (class mi_console_file): New class.
14430         (mi_console_file_new, mi_console_set_raw): Delete.
14431         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14432         (mi_set_logging): Use delete and tee_file.  Adjust.
14433         * mi/mi-main.c (output_register): Use string_file.
14434         (mi_cmd_data_evaluate_expression): Use string_file.
14435         (mi_cmd_data_read_memory): Use string_file.
14436         (mi_cmd_execute, print_variable_or_computed): Use string_file.
14437         * mi/mi-out.c (mi_ui_out::main_stream): New.
14438         (mi_ui_out::rewind): Use main_stream and
14439         string_file.
14440         (mi_ui_out::put): Use main_stream and string_file.
14441         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14442         Allocate a 'string_file' instead.
14443         (mi_out_new): Don't allocate a mem_fileopen stream here.
14444         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14445         (mi_ui_out::main_stream): Declare method.
14446         * printcmd.c (eval_command): Use string_file.
14447         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14448         * python/py-arch.c (archpy_disassemble): Use string_file.
14449         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14450         * python/py-frame.c (frapy_str): Use string_file.
14451         * python/py-framefilter.c (py_print_type, py_print_single_arg):
14452         Use string_file.
14453         * python/py-type.c (typy_str): Use string_file.
14454         * python/py-unwind.c (unwind_infopy_str): Use string_file.
14455         * python/py-value.c (valpy_str): Use string_file.
14456         * record-btrace.c (btrace_insn_history): Use string_file.
14457         * regcache.c (regcache_print): Use stdio_file.
14458         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14459         * remote.c (escape_buffer): Use string_file.
14460         * rust-lang.c (rust_get_disr_info): Use string_file.
14461         * serial.c (serial_open_ops_1): Use stdio_file.
14462         (do_serial_close): Use delete.
14463         * stack.c (print_frame_arg): Use string_file.
14464         (print_frame_args): Remove local mem_fileopen stream, not used.
14465         (print_frame): Use string_file.
14466         * symmisc.c (maintenance_print_symbols): Use stdio_file.
14467         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14468         Take a 'string_file *' instead of a 'ui_file *'.
14469         * top.c (new_ui): Use stdio_file and stderr_file.
14470         (free_ui): Use delete.
14471         (execute_command_to_string): Use string_file.
14472         (quit_confirm): Use string_file.
14473         * tracepoint.c (collection_list::append_exp): Use string_file.
14474         * tui/tui-disasm.c (tui_disassemble): Use string_file.
14475         * tui/tui-file.c: Don't include "ui-file.h".
14476         (enum streamtype, struct tui_stream): Delete.
14477         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14478         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14479         (tui_file::tui_file): New method.
14480         (tui_file_fputs): Delete.
14481         (tui_file_get_strbuf): Delete.
14482         (tui_file::puts): New method.
14483         (tui_file_adjust_strbuf): Delete.
14484         (tui_file_flush): Delete.
14485         (tui_file::flush): New method.
14486         * tui/tui-file.h: Tweak intro comment.
14487         Include ui-file.h.
14488         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14489         (tui_file_adjust_strbuf): Delete declarations.
14490         (class tui_file): New class.
14491         * tui/tui-io.c (tui_initialize_io): Use tui_file.
14492         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14493         (tui_register_format): Use string_stream.
14494         * tui/tui-stack.c (tui_make_status_line): Use string_file.
14495         (tui_get_function_from_frame): Use string_file.
14496         * typeprint.c (type_to_string): Use string_file.
14497         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14498         (null_stream): New global.
14499         (ui_file_delete): Delete.
14500         (ui_file::ui_file): New.
14501         (null_file_isatty): Delete.
14502         (ui_file::~ui_file): New.
14503         (null_file_rewind): Delete.
14504         (ui_file::printf): New.
14505         (null_file_put): Delete.
14506         (null_file_flush): Delete.
14507         (ui_file::putstr): New.
14508         (null_file_write): Delete.
14509         (ui_file::putstrn): New.
14510         (null_file_read): Delete.
14511         (ui_file::putc): New.
14512         (null_file_fputs): Delete.
14513         (null_file_write_async_safe): Delete.
14514         (ui_file::vprintf): New.
14515         (null_file_delete): Delete.
14516         (null_file::write): New.
14517         (null_file_fseek): Delete.
14518         (null_file::puts): New.
14519         (ui_file_data): Delete.
14520         (null_file::write_async_safe): New.
14521         (gdb_flush, ui_file_isatty): Adjust.
14522         (ui_file_put, ui_file_rewind): Delete.
14523         (ui_file_write): Adjust.
14524         (ui_file_write_for_put): Delete.
14525         (ui_file_write_async_safe, ui_file_read): Adjust.
14526         (ui_file_fseek): Delete.
14527         (fputs_unfiltered): Adjust.
14528         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14529         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14530         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14531         (set_ui_file_data): Delete.
14532         (string_file::~string_file, string_file::write)
14533         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14534         (do_ui_file_as_string, ui_file_as_string): Delete.
14535         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14536         (struct mem_file): Delete.
14537         (mem_file_new): Delete.
14538         (stdio_file::stdio_file): New.
14539         (mem_file_delete): Delete.
14540         (stdio_file::stdio_file): New.
14541         (mem_fileopen): Delete.
14542         (stdio_file::~stdio_file): New.
14543         (mem_file_rewind): Delete.
14544         (stdio_file::set_stream): New.
14545         (mem_file_put): Delete.
14546         (stdio_file::open): New.
14547         (mem_file_write): Delete.
14548         (stdio_file_magic, struct stdio_file): Delete.
14549         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14550         (stdio_file::flush): New.
14551         (stdio_file_read): Rename to ...
14552         (stdio_file::read): ... this.  Adjust.
14553         (stdio_file_write): Rename to ...
14554         (stdio_file::write): ... this.  Adjust.
14555         (stdio_file_write_async_safe): Rename to ...
14556         (stdio_file::write_async_safe) ... this.  Adjust.
14557         (stdio_file_fputs): Rename to ...
14558         (stdio_file::puts) ... this.  Adjust.
14559         (stdio_file_isatty): Delete.
14560         (stdio_file_fseek): Delete.
14561         (stdio_file::isatty): New.
14562         (stderr_file_write): Rename to ...
14563         (stderr_file::write) ... this.  Adjust.
14564         (stderr_file_fputs): Rename to ...
14565         (stderr_file::puts) ... this.  Adjust.
14566         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14567         (stderr_file::stderr_file): New.
14568         (tee_file_magic): Delete.
14569         (struct tee_file): Delete.
14570         (tee_file::tee_file): New.
14571         (tee_file_new): Delete.
14572         (tee_file::~tee_file): New.
14573         (tee_file_delete): Delete.
14574         (tee_file_flush): Rename to ...
14575         (tee_file::flush): ... this.  Adjust.
14576         (tee_file_write): Rename to ...
14577         (tee_file::write): ... this.  Adjust.
14578         (tee_file::write_async_safe): New.
14579         (tee_file_fputs): Rename to ...
14580         (tee_file::puts): ... this.  Adjust.
14581         (tee_file_isatty): Rename to ...
14582         (tee_file::isatty): ... this.  Adjust.
14583         * ui-file.h (struct obstack, struct ui_file): Don't
14584         forward-declare.
14585         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14586         (ui_file_write_ftype)
14587         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14588         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14589         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14590         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14591         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14592         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14593         (set_ui_file_fseek): Delete.
14594         (ui_file_data, ui_file_delete, ui_file_rewind)
14595         (struct ui_file): New.
14596         (ui_file_up): New.
14597         (class null_file): New.
14598         (null_stream): Declare.
14599         (ui_file_write_for_put, ui_file_put): Delete.
14600         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14601         Delete.
14602         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14603         (gdb_fopen, tee_file_new): Delete.
14604         (struct string_file): New.
14605         (struct stdio_file): New.
14606         (stdio_file_up): New.
14607         (struct stderr_file): New.
14608         (class tee_file): New.
14609         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14610         of a 'ui_file *'.  Adjust.
14611         * ui-out.h (class ui_out) <field_stream>: Likewise.
14612         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14613         (null_stream): Delete.
14614         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14615         Adjust.
14616         * utils.h (struct ui_file): Delete forward declaration..
14617         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14618         (error_stream): Take a 'string_file &' instead of a
14619         'ui_file *'.
14620         * varobj.c (varobj_value_get_print_value): Use string_file.
14621         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14622         * gdbarch.c: Regenerate.
14623
14624 2017-02-02  Pedro Alves  <palves@redhat.com>
14625
14626         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14627         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
14628         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
14629         Adjust to call gdb_print_insn instead of
14630         gdb_disassembler::print_insn.
14631         (dump_insns, do_mixed_source_and_assembly_deprecated)
14632         (do_mixed_source_and_assembly, do_assembly_only): Add back a
14633         'gdbarch' parameter.  Remove gdb_disassembler parameter.
14634         (gdb_disassembly): Don't allocate a gdb_disassembler here.
14635         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14636         declaration.
14637         (gdb_pretty_print_insn): Re-add declaration.
14638         * record-btrace.c (btrace_insn_history): Don't allocate a
14639         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
14640
14641 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
14642
14643         * disasm.h (gdb_disassembly): Remove file_string parameter.
14644         * disasm.c (gdb_disassembly): Likewise.
14645         * cli/cli-cmds.c (print_disassembly): Adapt.
14646         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14647         * stack.c (do_gdb_disassembly): Likewise.
14648
14649 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14650
14651         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14652         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14653         targets.  And if the implicit value is longer than needed, extract
14654         the first bytes instead of the "least significant" ones.
14655
14656 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14657
14658         * btrace.c (btrace_enable): Do not call btrace_add_pc for
14659         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14660         (btrace_fetch): Assert can_access_registers_ptid.
14661         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14662         validate_registers_access.
14663
14664 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14665
14666         * gdbthread.h (can_access_registers_ptid): New.
14667         * thread.c (can_access_registers_ptid): New.
14668
14669 2017-02-01  Pedro Alves  <palves@redhat.com>
14670
14671         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14672
14673 2017-01-31  Pedro Alves  <palves@redhat.com>
14674
14675         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
14676         Fix typos.
14677
14678 2017-01-31  Pedro Alves  <palves@redhat.com>
14679
14680         * stack.c (print_frame_args): Remove local mem_fileopen stream,
14681         not used.
14682
14683 2017-01-31  Pedro Alves  <palves@redhat.com>
14684
14685         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
14686
14687 2017-01-31  Pedro Alves  <palves@redhat.com>
14688
14689         * common/scoped_restore.h
14690         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
14691         change the value's parameter type to T2.
14692         (make_scoped_restore): Likewise.
14693
14694 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14695             Richard Henderson  <rth@redhat.com>
14696
14697         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
14698         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
14699         GS_BASE for older kernels.
14700         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
14701         GS_BASE for older kernels.
14702         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
14703         and GS_BASE to the offset table.
14704         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
14705         system register group.
14706         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
14707         for older kernels.
14708         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
14709         amd64 ABI.
14710         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
14711         AMD64_GSBASE_REGNUM.
14712         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
14713         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
14714         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
14715         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
14716         i386/64bit-segments.xml in those rules.
14717         * features/i386/64bit-segments.xml: New file.
14718         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
14719         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
14720         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
14721         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
14722         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
14723         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
14724         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
14725         * features/i386/amd64-avx-linux.c: Regenerated.
14726         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
14727         * features/i386/amd64-avx-mpx.c: Regenerated.
14728         * features/i386/amd64-avx512-linux.c: Regenerated.
14729         * features/i386/amd64-linux.c: Regenerated.
14730         * features/i386/amd64-mpx-linux.c: Regenerated.
14731         * features/i386/i386-avx-mpx-linux.c: Regenerated.
14732         * features/i386/i386-avx-mpx.c: Regenerated.
14733         * features/i386/x32-avx-linux.c: Regenerated.
14734         * features/i386/x32-avx512-linux.c: Regenerated.
14735         * regformats/i386/amd64-avx-linux.dat: Regenerated.
14736         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
14737         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
14738         * regformats/i386/amd64-linux.dat: Regenerated.
14739         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
14740         * regformats/i386/x32-avx-linux.dat: Regenerated.
14741         * regformats/i386/x32-avx512-linux.dat: Regenerated.
14742         * regformats/i386/x32-linux.dat: Regenerated.
14743
14744 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14745
14746         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
14747         Set to AMD64_NUM_REGS.
14748
14749 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14750
14751         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
14752         that checks validity of a register number.
14753
14754 2017-01-27  Kees Cook  <keescook@google.com>
14755
14756         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
14757         fetch_fpregs if target has fpa registers.
14758         (arm_linux_store_inferior_registers): Call store_fpregs if target
14759         has fpa registers.
14760
14761 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14762
14763         * cris-tdep.c (cris_gdbarch_init): Remove check for
14764         info.byte_order and force it to BFD_ENDIAN_LITTLE.
14765
14766 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
14767
14768         * corelow.c (get_core_register_section): Check for regset
14769         existence before checking for REGSET_VARIABLE_SIZE.
14770
14771 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14772             Pedro Alves  <palves@redhat.com>
14773
14774         PR gdb/20939
14775         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
14776         call memory_error, save memaddr instead.
14777         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
14778         negative, cal memory_error.
14779         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
14780
14781 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14782
14783         * disasm-selftests.c (memory_error_test): New function.
14784         (_initialize_disasm_selftests): Register memory_error_test.
14785
14786 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14787
14788         * Makefile.in (SFILES): Add disasm-selftests.c and
14789         selftest-arch.c.
14790         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
14791         * disasm-selftests.c: New file.
14792         * selftest-arch.c: New file.
14793         * selftest-arch.h: New file.
14794
14795 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14796
14797         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
14798         to bfd_arch_mep.  Don't return 0 if section is not
14799         found.  Call print_insn_mep.
14800
14801 2017-01-26  Pedro Alves  <palves@redhat.com>
14802             Yao Qi  <yao.qi@linaro.org>
14803
14804         * arm-tdep.c: Include "disasm.h".
14805         (gdb_print_insn_arm): Update code to get gdbarch.
14806         * disasm.c (dis_asm_read_memory): Change it to
14807         gdb_disassembler::dis_asm_read_memory.
14808         (dis_asm_memory_error): Likewise.
14809         (dis_asm_print_address): Likewise.
14810         (gdb_pretty_print_insn): Change it to
14811         gdb_disassembler::pretty_print_insn.
14812         (dump_insns): Add one argument gdb_disassemlber.  All
14813         callers updated.
14814         (do_mixed_source_and_assembly_deprecated): Likewise.
14815         (do_mixed_source_and_assembly): Likewise.
14816         (do_assembly_only): Likewise.
14817         (gdb_disassembler::gdb_disassembler): New.
14818         (gdb_disassembler::print_insn): New.
14819         * disasm.h (class gdb_disassembler): New.
14820         (gdb_pretty_print_insn): Remove declaration.
14821         (gdb_disassemble_info): Likewise.
14822         * guile/scm-disasm.c (class gdbscm_disassembler): New.
14823         (gdbscm_disasm_read_memory_worker): Update.
14824         (gdbscm_disasm_read_memory): Update.
14825         (gdbscm_disasm_memory_error): Remove.
14826         (gdbscm_disasm_print_address): Remove.
14827         (gdbscm_disassembler::gdbscm_disassembler): New.
14828         (gdbscm_print_insn_from_port): Update.
14829         * mips-tdep.c: Include disasm.h.
14830         (gdb_print_insn_mips): Update code to get gdbarch.
14831         * record-btrace.c (btrace_insn_history): Update.
14832         * spu-tdep.c: Include disasm.h.
14833         (struct spu_dis_asm_data): Remove.
14834         (struct spu_dis_asm_info): New.
14835         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
14836         SPU id.
14837         (gdb_print_insn_spu): Cast disassemble_info to
14838         spu_dis_asm_info.
14839
14840 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14841
14842         * disasm.c (do_ui_file_delete): Delete.
14843         (gdb_insn_length): Move code creating stream to ...
14844         * utils.c (null_stream): ... here.  New function.
14845         * utils.h (null_stream): Declare.
14846
14847 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
14848
14849         * python/py-inferior.c (find_thread_object): Return directly
14850         from the loop.  Remove "found" variable.
14851
14852 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
14853
14854         GDB 7.12.1 released.
14855
14856 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14857
14858         * python/py-function.c (fnpy_call): Reorder declarations to have
14859         the gdbpy_enter object declared first.
14860         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
14861
14862 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14863
14864         PR python/21068
14865         * python/python-internal.h (PyMem_RawMalloc): Define for
14866         Python < 3.4.
14867         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
14868         PyMem_RawMalloc instead of PyMem_Malloc.
14869
14870 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
14871             Luis Machado  <lgustavo@codesourcery.com>
14872
14873         * NEWS (New commands): Mention flash-erase.
14874         (New MI commands): Mention target-flash-erase.
14875         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
14876         command.
14877         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
14878         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
14879         * target.c (flash_erase_command): New function.
14880         (initialize_targets): Add new flash-erase command.
14881         * target.h (flash_erase_command): New declaration.
14882
14883 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
14884
14885         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
14886         HAVE_SYS_PROCFS_H is defined.
14887
14888 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14889
14890         * remote.c (struct cached_reg): Change data into a pointer.
14891         * (stop_reply_dtr): Free data pointers before deleting vector.
14892         (process_stop_reply): Likewise.
14893         (remote_parse_stop_reply): Allocate space for data
14894
14895 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14896
14897         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
14898         MAX_REGISTER_SIZE.
14899         (amd64_pseudo_register_read_value): Likewise.
14900         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
14901         (store_register_using_P): Likewise.
14902         * regcache.c (regcache_xfer_part): Likewise.
14903
14904 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
14905
14906         Split real and pseudo registers.
14907         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
14908         (sparc32_pseudo_regnum): New enum.
14909         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
14910         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
14911         (SPARC32_CP0_REGISTERS): New macro.
14912         (sparc32_pseudo_register_name): New function.
14913         (sparc32_register_name): Use sparc32_pseudo_register_name.
14914         (sparc32_pseudo_register_type): New function.
14915         (sparc32_register_type): Use sparc32_pseudo_register_type.
14916         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
14917         pseudo register numbers.
14918         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
14919         (SPARC64_CP0_REGISTERS): New macro.
14920         (sparc64_pseudo_register_name): New function.
14921         (sparc64_register_name): Use sparc64_pseudo_register_name.
14922         (sparc64_pseudo_register_type): New function.
14923         (sparc64_register_type): Use sparc64_pseudo_register_type.
14924         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
14925         pseudo register numbers.
14926         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
14927         sparc64_store_arguments): Handle pseudo register numbers.
14928
14929 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14930
14931         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
14932         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
14933         output.
14934         (getpkt_or_notif_sane_1): Likewise.
14935
14936 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14937
14938         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
14939         of CC.  Pass "-x c++-header" instead of "-x c".
14940
14941 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14942
14943         * remote.c (remote_can_async_p): Update comment.
14944
14945 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14946
14947         * linux-nat.c (linux_nat_can_async_p): Update comment.
14948
14949 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14950
14951         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
14952
14953 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
14954
14955         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
14956
14957 2017-01-10  Tom Tromey  <tom@tromey.com>
14958
14959         * python/py-type.c (typy_legacy_template_argument): Update.
14960         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
14961         ~demangle_parse_info): Declare new members.
14962         (cp_demangled_name_to_comp): Return unique_ptr.
14963         (cp_demangled_name_parse_free)
14964         (make_cleanup_cp_demangled_name_parse_free)
14965         (cp_new_demangle_parse_info): Remove.
14966         * cp-support.c (do_demangled_name_parse_free_cleanup)
14967         (make_cleanup_cp_demangled_name_parse_free): Remove.
14968         (inspect_type, cp_canonicalize_string_full)
14969         (cp_canonicalize_string): Update.
14970         (mangled_name_to_comp): Change return type.
14971         (cp_class_name_from_physname, method_name_from_physname)
14972         (cp_func_name, cp_remove_params): Update.
14973         * cp-name-parser.y (demangle_parse_info): New constructor, from
14974         cp_new_demangle_parse_info.
14975         (~demangle_parse_info): New destructor, from
14976         cp_demangled_name_parse_free.
14977         (cp_merge_demangle_parse_infos): Update.
14978         (cp_demangled_name_to_comp): Change return type.
14979
14980 2017-01-10  Tom Tromey  <tom@tromey.com>
14981
14982         * top.c (prevent_dont_repeat): Change return type.
14983         * python/python.c (execute_gdb_command): Use std::string.
14984         Update.
14985         * guile/guile.c (gdbscm_execute_gdb_command): Update.
14986         * command.h (prevent_dont_repeat): Change return type.
14987         * breakpoint.c (bpstat_do_actions_1): Update.
14988
14989 2017-01-10  Tom Tromey  <tom@tromey.com>
14990
14991         * value.h (scoped_value_mark::~scoped_value_mark): Call
14992         free_to_mark.
14993         (scoped_value_mark::free_to_mark): New method.
14994         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
14995         scoped_value_mark.
14996
14997 2017-01-10  Tom Tromey  <tom@tromey.com>
14998
14999         * python/py-value.c (valpy_dereference, valpy_referenced_value)
15000         (valpy_reference_value, valpy_const_value, valpy_get_address)
15001         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15002         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15003         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15004         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15005         scoped_value_mark.
15006         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15007         * value.h (scoped_value_mark): New class.
15008
15009 2017-01-10  Tom Tromey  <tom@tromey.com>
15010
15011         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15012         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15013         * psymtab.c (discard_psymtabs_upto): Remove.
15014         (make_cleanup_discard_psymtabs): Remove.
15015         (struct psymtab_state): Remove.
15016
15017 2017-01-10  Tom Tromey  <tom@tromey.com>
15018
15019         * record-full.c (record_full_save_cleanups): Remove.
15020         (record_full_save): Use gdb::unlinker.
15021         * gcore.c (do_bfd_delete_cleanup): Remove.
15022         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
15023         cleanups.
15024         * dwarf2read.c (unlink_if_set): Remove.
15025         (write_psymtabs_to_index): Use gdb::unlinker.
15026         * common/gdb_unlinker.h: New file.
15027
15028 2017-01-10  Tom Tromey  <tom@tromey.com>
15029
15030         * windows-tdep.c (windows_xfer_shared_library): Update.
15031         * windows-nat.c (windows_make_so): Update.
15032         * utils.h (make_cleanup_bfd_unref): Remove.
15033         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15034         * symfile.h (symfile_bfd_open)
15035         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15036         * symfile.c (read_symbols, symbol_file_add)
15037         (separate_debug_file_exists): Update.
15038         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15039         (generic_load, reread_symbols): Update.
15040         * symfile-mem.c (symbol_file_add_from_memory): Update.
15041         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15042         (spu_symbol_file_add_from_memory): Update.
15043         * solist.h (struct target_so_ops) <bfd_open>: Return
15044         gdb_bfd_ref_ptr.
15045         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15046         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15047         gdb_bfd_ref_ptr.
15048         (solib_map_sections, reload_shared_libraries_1): Update.
15049         * solib-svr4.c (enable_break): Update.
15050         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15051         * solib-frv.c (enable_break2): Update.
15052         * solib-dsbt.c (enable_break): Update.
15053         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15054         gdb_bfd_ref_ptr.
15055         (darwin_solib_get_all_image_info_addr_at_init): Update.
15056         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15057         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15058         * record-full.c (record_full_save): Update.
15059         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15060         * procfs.c (insert_dbx_link_bpt_in_file): Update.
15061         * minidebug.c (find_separate_debug_file_in_section): Return
15062         gdb_bfd_ref_ptr.
15063         * machoread.c (macho_add_oso_symfile): Change abfd to
15064         gdb_bfd_ref_ptr.
15065         (macho_symfile_read_all_oso): Update.
15066         (macho_check_dsym): Return gdb_bfd_ref_ptr.
15067         (macho_symfile_read): Update.
15068         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15069         (jit_bfd_try_read_symtab): Update.
15070         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15071         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15072         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15073         gdb_bfd_ref_ptr.
15074         (gdb_bfd_ref_policy): New struct.
15075         (gdb_bfd_ref_ptr): New typedef.
15076         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15077         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15078         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15079         gdb_bfd_ref_ptr.
15080         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15081         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15082         (gcore_command): Update.
15083         * exec.c (exec_file_attach): Update.
15084         * elfread.c (elf_symfile_read): Update.
15085         * dwarf2read.c (dwarf2_get_dwz_file): Update.
15086         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15087         (open_and_init_dwo_file): Update.
15088         (open_dwp_file): Return gdb_bfd_ref_ptr.
15089         (open_and_init_dwp_file): Update.
15090         * corelow.c (core_open): Update.
15091         * compile/compile-object-load.c (compile_object_load): Update.
15092         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15093         * coffread.c (coff_symfile_read): Update.
15094         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15095         gdb_bfd_ref_ptr.  Rename.
15096         (dump_bfd_file, restore_command): Update.
15097         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15098         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15099         (find_separate_debug_file_by_buildid): Update.
15100
15101 2017-01-10  Tom Tromey  <tom@tromey.com>
15102
15103         * common/gdb_ref_ptr.h: New file.
15104         * python/py-ref.h (struct gdbpy_ref_policy): New.
15105         (gdbpy_ref): Now a typedef.
15106
15107 2017-01-10  Tom Tromey  <tom@tromey.com>
15108
15109         * utils.h (make_cleanup_htab_delete): Don't declare.
15110         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15111         Remove.
15112         * linespec.c (decode_compound_collector): Add constructor,
15113         destructor.
15114         (lookup_prefix_sym): Remove cleanup.
15115         (symtab_collector): Add constructor, destructor.
15116         (collect_symtabs_from_filename): Remove cleanup.
15117         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15118         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15119         Use htab_up.
15120         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15121         * dwarf2read.c (dw2_expand_symtabs_matching)
15122         (dw2_map_symbol_filenames, dwarf_decode_macros)
15123         (write_psymtabs_to_index): Use htab_up.
15124         * dwarf2loc.c (func_verify_no_selftailcall)
15125         (call_site_find_chain_1, func_verify_no_selftailcall)
15126         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15127         std::vector, gdb::unique_xmalloc_ptr.
15128         (call_sitep): Remove typedef.
15129         (dwarf2_locexpr_baton_eval): Remove unused variable.
15130
15131 2017-01-10  Tom Tromey  <tom@tromey.com>
15132
15133         * python/python-internal.h (make_cleanup_py_decref)
15134         (make_cleanup_py_xdecref): Don't declare.
15135         * python/py-utils.c (py_decref, make_cleanup_py_decref)
15136         (py_xdecref, make_cleanup_py_xdecref): Remove.
15137
15138 2017-01-10  Tom Tromey  <tom@tromey.com>
15139
15140         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15141         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15142
15143 2017-01-10  Tom Tromey  <tom@tromey.com>
15144
15145         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15146
15147 2017-01-10  Tom Tromey  <tom@tromey.com>
15148
15149         * python/py-utils.c (unicode_to_encoded_string)
15150         (python_string_to_target_string)
15151         (python_string_to_target_python_string)
15152         (python_string_to_host_string, gdbpy_obj_to_string)
15153         (get_addr_from_python): Use gdbpy_ref.
15154
15155 2017-01-10  Tom Tromey  <tom@tromey.com>
15156
15157         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15158         gdbpy_ref.
15159
15160 2017-01-10  Tom Tromey  <tom@tromey.com>
15161
15162         * python/python.c (eval_python_command, gdbpy_decode_line)
15163         (gdbpy_run_events, gdbpy_start_type_printers)
15164         (gdbpy_apply_type_printers): Use gdbpy_ref.
15165
15166 2017-01-10  Tom Tromey  <tom@tromey.com>
15167
15168         * python/py-param.c (get_doc_string, compute_enum_values): Use
15169         gdbpy_ref.
15170
15171 2017-01-10  Tom Tromey  <tom@tromey.com>
15172
15173         * python/py-inferior.c (find_thread_object, build_inferior_list):
15174         Use gdbpy_ref.
15175
15176 2017-01-10  Tom Tromey  <tom@tromey.com>
15177
15178         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15179
15180 2017-01-10  Tom Tromey  <tom@tromey.com>
15181
15182         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15183         gdbpy_ref.
15184
15185 2017-01-10  Tom Tromey  <tom@tromey.com>
15186
15187         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
15188         extra incref.
15189         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15190         Use gdbpy_ref.
15191
15192 2017-01-10  Tom Tromey  <tom@tromey.com>
15193
15194         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15195         gdbpy_ref.
15196
15197 2017-01-10  Tom Tromey  <tom@tromey.com>
15198
15199         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
15200         decref results of PyArg_ParseTupleAndKeywords.
15201
15202 2017-01-10  Tom Tromey  <tom@tromey.com>
15203
15204         * python/python.c (python_run_simple_file): Use
15205         unique_xmalloc_ptr, gdbpy_ref.
15206
15207 2017-01-10  Tom Tromey  <tom@tromey.com>
15208
15209         * python/py-prettyprint.c (print_stack_unless_memory_error)
15210         (print_string_repr, print_children): Use gdbpy_ref.
15211         (dummy_python_frame): New class.
15212         (dummy_python_frame::dummy_python_frame): Rename from
15213         push_dummy_python_frame.
15214         (py_restore_tstate): Remove.
15215
15216 2017-01-10  Tom Tromey  <tom@tromey.com>
15217
15218         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15219
15220 2017-01-10  Tom Tromey  <tom@tromey.com>
15221
15222         * python/python.c (ensure_python_env, restore_python_env):
15223         Remove.
15224         * python/python-internal.h (ensure_python_env): Don't declare.
15225         * varobj.h (varobj_ensure_python_env): Don't declare.
15226         * varobj.c (varobj_ensure_python_env): Remove.
15227
15228 2017-01-10  Tom Tromey  <tom@tromey.com>
15229
15230         * varobj.c (varobj_value_get_print_value): Use
15231         gdbpy_enter_varobj.
15232
15233 2017-01-10  Tom Tromey  <tom@tromey.com>
15234
15235         * python/py-prettyprint.c (print_string_repr, print_children):
15236         Update.
15237         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15238         of "encoding".
15239         * varobj.c (varobj_value_get_print_value): Update.
15240         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15241
15242 2017-01-10  Tom Tromey  <tom@tromey.com>
15243
15244         * varobj.c (varobj_get_display_hint)
15245         (dynamic_varobj_has_child_method, install_new_value_visualizer)
15246         (varobj_set_visualizer, free_variable): Use
15247         gdbpy_enter_varobj.
15248
15249 2017-01-10  Tom Tromey  <tom@tromey.com>
15250
15251         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15252         (do_finish_initialization): New function.  Use gdbpy_ref.
15253         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
15254         do_finish_initialization.
15255
15256 2017-01-10  Tom Tromey  <tom@tromey.com>
15257
15258         * python/py-param.c (get_set_value, get_show_value): Use
15259         gdbpy_enter, gdbpy_ref.
15260
15261 2017-01-10  Tom Tromey  <tom@tromey.com>
15262
15263         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15264
15265 2017-01-10  Tom Tromey  <tom@tromey.com>
15266
15267         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15268
15269 2017-01-10  Tom Tromey  <tom@tromey.com>
15270
15271         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15272         Use gdbpy_enter_varobj.
15273
15274 2017-01-10  Tom Tromey  <tom@tromey.com>
15275
15276         * varobj.c (gdbpy_enter_varobj): New constructor.
15277         * python/python-internal.h (gdbpy_enter_varobj): New class.
15278         * python/py-varobj.c (py_varobj_get_iterator): Use
15279         gdbpy_enter_varobj.
15280
15281 2017-01-10  Tom Tromey  <tom@tromey.com>
15282
15283         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15284         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15285         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15286         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15287         unique_xmalloc_ptr.
15288         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15289
15290 2017-01-10  Tom Tromey  <tom@tromey.com>
15291
15292         * python/py-xmethods.c (invoke_match_method): Use
15293         gdbpy_ref.
15294
15295 2017-01-10  Tom Tromey  <tom@tromey.com>
15296
15297         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15298         gdbpy_enter, gdbpy_ref.
15299
15300 2017-01-10  Tom Tromey  <tom@tromey.com>
15301
15302         * python/python.c (python_interactive_command): Use gdbpy_enter.
15303
15304 2017-01-10  Tom Tromey  <tom@tromey.com>
15305
15306         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15307         gdbpy_ref.
15308
15309 2017-01-10  Tom Tromey  <tom@tromey.com>
15310
15311         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15312         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15313
15314 2017-01-10  Tom Tromey  <tom@tromey.com>
15315
15316         * utils.h (htab_deleter): New struct.
15317         (htab_up): New typedef.
15318         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15319         gdbpy_enter, gdbpy_ref, htab_up.
15320
15321 2017-01-10  Tom Tromey  <tom@tromey.com>
15322
15323         * python/py-unwind.c (pending_frame_invalidate): Remove.
15324         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15325
15326 2017-01-10  Tom Tromey  <tom@tromey.com>
15327
15328         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15329         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15330
15331 2017-01-10  Tom Tromey  <tom@tromey.com>
15332
15333         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15334
15335 2017-01-10  Tom Tromey  <tom@tromey.com>
15336
15337         * python/python.c (gdbpy_eval_from_control_command)
15338         (gdbpy_source_script, gdbpy_run_events)
15339         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15340         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15341         gdbpy_enter.
15342
15343 2017-01-10  Tom Tromey  <tom@tromey.com>
15344
15345         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15346
15347 2017-01-10  Tom Tromey  <tom@tromey.com>
15348
15349         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15350
15351 2017-01-10  Tom Tromey  <tom@tromey.com>
15352
15353         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15354         (python_on_inferior_call_pre, python_on_inferior_call_post)
15355         (python_on_memory_change, python_on_register_change)
15356         (python_inferior_exit, python_new_objfile, add_thread_object)
15357         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15358
15359 2017-01-10  Tom Tromey  <tom@tromey.com>
15360
15361         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15362         (bpfinishpy_handle_exit): Use gdbpy_enter.
15363
15364 2017-01-10  Tom Tromey  <tom@tromey.com>
15365
15366         * python/py-cmd.c (cmdpy_destroyer)
15367         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15368         gdbpy_enter.
15369
15370 2017-01-10  Tom Tromey  <tom@tromey.com>
15371
15372         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15373         gdbpy_enter.
15374         (gdbpy_breakpoint_has_cond): Likewise.
15375
15376 2017-01-10  Tom Tromey  <tom@tromey.com>
15377
15378         * python/python.c (gdbpy_enter): New constructor.
15379         (~gdbpy_enter): New destructor.
15380         (restore_python_env, ensure_python_env): Rewrite.
15381         * python/python-internal.h (gdbpy_enter): New class.
15382
15383 2017-01-10  Tom Tromey  <tom@tromey.com>
15384
15385         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15386
15387 2017-01-10  Tom Tromey  <tom@tromey.com>
15388
15389         * python/py-value.c (value_has_field, get_field_flag)
15390         (get_field_type, valpy_getitem, convert_value_from_python): Use
15391         gdbpy_ref.
15392
15393 2017-01-10  Tom Tromey  <tom@tromey.com>
15394
15395         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15396         gdbpy_ref.
15397
15398 2017-01-10  Tom Tromey  <tom@tromey.com>
15399
15400         * python/py-prettyprint.c (search_pp_list)
15401         (find_pretty_printer_from_objfiles)
15402         (find_pretty_printer_from_progspace)
15403         (find_pretty_printer_from_gdb, find_pretty_printer)
15404         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15405         gdbpy_ref.
15406
15407 2017-01-10  Tom Tromey  <tom@tromey.com>
15408
15409         * python/py-param.c (call_doc_function): Use gdbpy_ref.
15410
15411 2017-01-10  Tom Tromey  <tom@tromey.com>
15412
15413         * python/py-linetable.c (build_line_table_tuple_from_pcs)
15414         (ltpy_get_all_source_lines): Use gdbpy_ref.
15415
15416 2017-01-10  Tom Tromey  <tom@tromey.com>
15417
15418         * python/py-framefilter.c (extract_sym, extract_value)
15419         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15420         gdbpy_ref.
15421
15422 2017-01-10  Tom Tromey  <tom@tromey.com>
15423
15424         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15425
15426 2017-01-10  Tom Tromey  <tom@tromey.com>
15427
15428         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15429
15430 2017-01-10  Tom Tromey  <tom@tromey.com>
15431
15432         * python/py-function.c (convert_values_to_python, fnpy_init): Use
15433         gdbpy_ref.
15434
15435 2017-01-10  Tom Tromey  <tom@tromey.com>
15436
15437         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15438
15439 2017-01-10  Tom Tromey  <tom@tromey.com>
15440
15441         * python/py-type.c (convert_field, make_fielditem, typy_fields)
15442         (typy_range): Use gdbpy_ref.
15443
15444 2017-01-10  Tom Tromey  <tom@tromey.com>
15445
15446         * python/py-threadevent.c (create_thread_event_object): Use
15447         gdbpy_ref.
15448         * python/py-stopevent.c (create_stop_event_object): Simplify.
15449         (emit_stop_event): Use gdbpy_ref.
15450         * python/py-signalevent.c (create_signal_event_object): Use
15451         gdbpy_ref.
15452         * python/py-newobjfileevent.c (create_new_objfile_event_object)
15453         (emit_new_objfile_event, create_clear_objfiles_event_object)
15454         (emit_clear_objfiles_event): Use gdbpy_ref.
15455         * python/py-infevents.c (create_inferior_call_event_object)
15456         (create_register_changed_event_object)
15457         (create_memory_changed_event_object, emit_inferior_call_event)
15458         (emit_memory_changed_event, emit_register_changed_event): Use
15459         gdbpy_ref.
15460         * python/py-exitedevent.c (create_exited_event_object)
15461         (emit_exited_event): Use gdbpy_ref.
15462         * python/py-event.h (evpy_emit_event): Remove
15463         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15464         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15465         * python/py-continueevent.c (emit_continue_event): Use
15466         gdbpy_ref.
15467         * python/py-breakpoint.c (gdbpy_breakpoint_created)
15468         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15469         gdbpy_ref.
15470         * python/py-bpevent.c (create_breakpoint_event_object): Use
15471         gdbpy_ref.
15472
15473 2017-01-10  Tom Tromey  <tom@tromey.com>
15474
15475         * python/py-ref.h: New file.
15476
15477 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15478
15479         * cli-out.c (cli_ui_out::do_redirect): Change return type to
15480         void.
15481         * cli-out.h (cli_ui_out::do_redirect): Likewise.
15482         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15483         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15484         * ui-out.c (ui_out::redirect): Likewise.
15485         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15486         * cli/cli-logging.c (set_logging_redirect): Update call site of
15487         ui_out::redirect.
15488         (handle_redirections): Likewise.
15489         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15490         * top.c (execute_command_to_string): Likewise.
15491         * utils.c (do_ui_out_redirect_pop): Likewise.
15492
15493 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15494
15495         * stack.c (_initialize_stack): Update "frame" command help message.
15496
15497 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
15498
15499         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15500
15501 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15502
15503         * x86-linux-nat.h: Include gdb_proc_service.h.
15504
15505 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15506
15507         * ser-base.h: Include serial.h.
15508
15509 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15510
15511         * ppc-linux-tdep.h: Include ppc-tdep.h.
15512
15513 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15514
15515         * nat/amd64-linux-siginfo.h: Include signal.h.
15516
15517 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15518
15519         * nat/aarch64-linux-hw-point.h: Include break-common.h.
15520
15521 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15522
15523         * mi/mi-parse.h: Include mi-cmds.h.
15524
15525 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15526
15527         * inf-loop.c: Don't include "target.h".
15528         * inf-loop.h: Include it here.
15529
15530 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15531
15532         * dfp.h: Include "dboulest.h" and "expression.h".
15533
15534 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15535
15536         * ax-gdb.h: Include "ax.h".
15537
15538 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15539
15540         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15541         with nat/gdb_ptrace.h.
15542
15543 2017-01-05  Yao Qi  <yao.qi@linaro.org>
15544
15545         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15546         new line.
15547         (mips64_fbsd_sigframe_init): Likewise.
15548
15549 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15550
15551         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15552         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15553
15554 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15555
15556         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15557         * NEWS: Mention new FreeBSD/mips native configuration.
15558         * config/mips/fbsd.mh: New file.
15559         * configure.host: Add mips*-*-freebsd*.
15560         * mips-fbsd-nat.c: New file.
15561
15562 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15563
15564         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15565         (ALLDEPFILES): Add mips-fbsd-tdep.c.
15566         * NEWS: Mention new FreeBSD/mips target.
15567         * configure.tgt: Add mips*-*-freebsd*.
15568         * mips-fbsd-tdep.c: New file.
15569         * mips-fbsd-tdep.h: New file.
15570
15571 2017-01-04  Yao Qi  <yao.qi@linaro.org>
15572
15573         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15574         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15575
15576 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15577
15578         Update copyright year range in all GDB files.
15579
15580 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15581
15582         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15583
15584 For older changes see ChangeLog-2016.
15585 \f
15586 Local Variables:
15587 mode: change-log
15588 left-margin: 8
15589 fill-column: 74
15590 version-control: never
15591 coding: utf-8
15592 End: