Remove features/nios2-linux.c
[external/binutils.git] / gdb / ChangeLog
1 2017-11-15  Yao Qi  <yao.qi@linaro.org>
2
3         * features/Makefile (XMLTOC): Remove nios2-linux.xml.
4         * features/nios2-linux.c: Remove.
5         * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
6         initialize_tdesc_nios2_linux.
7
8 2017-11-15  Yao Qi  <yao.qi@linaro.org>
9
10         * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
11         M68HC11_LAST_HARD_REG + 1.
12
13 2017-11-14  Paul Carroll  <pcarroll@codesourcery.com>
14
15         PR gdb/22388
16         * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
17         remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
18         Return TARGET_XFER_EOF if size of returned data is 0.
19
20 2017-11-14  Simon Marchi  <simon.marchi@ericsson.com>
21
22         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
23         memory-map-selftests.c.
24         (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
25         * memory-map.c (memory_map_start_memory): Fix computation of hi
26         address.
27         * unittests/memory-map-selftests.c: New file.
28
29 2017-11-09  Joel Brobecker  <brobecker@adacore.com>
30
31         * ada-lang.c: Fix some typos in the general command documenting
32         how Ada expressions are being evaluated and how their result
33         is printed.
34
35 2017-11-09  Tom Tromey  <tom@tromey.com>
36
37         * psymtab.c (psymbol_hash): Do not hash string contents.
38         (psymbol_compare): Add comment.
39
40 2017-11-09  Tom Tromey  <tom@tromey.com>
41
42         * dictionary.c (dict_hash): Move "TKB" check into the "switch".
43
44 2017-11-08  Joel Brobecker  <brobecker@adacore.com>
45
46         * ada-exp.y (write_var_from_sym): Remove parameter
47         "orig_left_context".  Update all callers.
48
49 2017-11-08  Simon Marchi  <simon.marchi@ericsson.com>
50
51         * tracepoint.h (class collection_list) <stringify>: Return
52         std::vector<std::string>.
53         (encode_actions_rsp): Change parameters to
54         std::vector<std::string> *.
55         * tracepoint.c (collection_list::stringify): Return
56         std::vector<std::string> and adjust accordingly.
57         (encode_actions_rsp): Changee parameters to
58         std::vector<std::string> and adjust accordingly.
59         * remote.c (free_actions_list),
60         free_actions_list_cleanup_wrapper): Remove.
61         (remote_download_tracepoint): Adjust to std::vector.
62
63 2017-11-08  Tom Tromey  <tom@tromey.com>
64
65         * dwarf2read.c (symbolp): Remove typedef.
66         (read_func_scope): Use std::vector.
67         (process_structure_scope): Use std::vector.
68
69 2017-11-08  Pedro Alves  <palves@redhat.com>
70
71         * ada-lang.c (ada_make_symbol_completion_list): Use
72         completion_skip_symbol.
73         * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
74         (symbol_is_function_or_method(symbol*)): New.
75         (add_symtab_completions): Add complete_symbol_mode parameter.  Use
76         completion_skip_symbol.
77         (default_collect_symbol_completion_matches_break_on): Use
78         completion_skip_symbol.  Pass down mode.
79         (collect_file_symbol_completion_matches): Pass down mode.
80         * symtab.h (symbol_is_function_or_method): New declarations.
81         (completion_skip_symbol): New template function.
82
83 2017-11-08  Pedro Alves  <palves@redhat.com>
84
85         * linespec.c (iterate_over_all_matching_symtabs): Add
86         search_domain parameter.  Pass it down to expand_symtabs_matching.
87         (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
88         (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
89         search_domain.
90         (add_all_symbol_names_from_pspace): Add search_domain parameter.
91         Pass it down.
92         (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
93         symbols.
94         (add_matching_symbols_to_info): Add search_domain parameter.  Pass
95         it down.
96
97 2017-11-08  Pedro Alves  <palves@redhat.com>
98
99         * ada-lang.c (ada_make_symbol_completion_list): Remove text and
100         text_len locals and don't pass them down.
101         * symtab.c (completion_list_add_name): Remove
102         sym_text/sym_text_len parameters and adjust.
103         (completion_list_add_symbol, completion_list_add_msymbol)
104         (completion_list_objc_symbol, completion_list_add_fields)
105         (add_symtab_completions): Likewise.
106         (default_collect_symbol_completion_matches_break_on)
107         (collect_file_symbol_completion_matches): Remove sym_text_len
108         local and don't pass it down.
109         * symtab.h (completion_list_add_name): Remove
110         sym_text/sym_text_len parameters.
111
112 2017-11-08  Pedro Alves  <palves@redhat.com>
113
114         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
115         unittests/lookup_name_info-selftests.c.
116         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
117         * cp-support.c: Include "selftest.h".
118         (cp_remove_params_1): Rename from cp_remove_params.  Add
119         'require_param' parameter, and handle it.
120         (cp_remove_params): Reimplement.
121         (cp_remove_params_if_any): New.
122         (selftests::quote): New.
123         (selftests::check_remove_params): New.
124         (selftests::test_cp_remove_params): New.
125         (_initialize_cp_support): Install
126         selftests::test_cp_remove_params.
127         * cp-support.h (cp_remove_params_if_any): Declare.
128         * dwarf2read.c :Include "selftest.h".
129         (dw2_expand_symtabs_matching_symbol): Use
130         lookup_name_info::make_ignore_params.
131         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
132         (selftests::dw2_expand_symtabs_matching::string_or_null)
133         (selftests::dw2_expand_symtabs_matching::check_match)
134         (selftests::dw2_expand_symtabs_matching::test_symbols)
135         (selftests::dw2_expand_symtabs_matching::run_test): New.
136         (_initialize_dwarf2_read): Register
137         selftests::dw2_expand_symtabs_matching::run_test.
138         * psymtab.c (psym_expand_symtabs_matching): Use
139         lookup_name_info::make_ignore_params.
140         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
141         If the lookup name wants to ignore parameters, strip them.
142         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
143         code handling '('.
144         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
145         (default_collect_symbol_completion_matches_break_on): Don't try to
146         strip parameters.
147         * symtab.h (lookup_name_info::lookup_name_info): Add
148         'ignore_parameters' parameter.
149         (lookup_name_info::ignore_parameters)
150         (lookup_name_info::make_ignore_params): New methods.
151         (lookup_name_info::m_ignore_parameters): New field.
152         * unittests/lookup_name_info-selftests.c: New file.
153
154 2017-11-08  Pedro Alves  <palves@redhat.com>
155
156         * dwarf2read.c (dw2_expand_marked_cus)
157         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
158         (dw2_expand_symtabs_matching): Move further below.
159         (dw2_expand_marked_cus): Reindent.
160
161 2017-11-08  Pedro Alves  <palves@redhat.com>
162
163         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
164         (struct name_component): New.
165         (mapped_index::name_components): New field.
166         (mapped_index::symbol_name_at): New method.
167         (dwarf2_read_index): Call mapped_index ctor.
168         (dw2_map_matching_symbols): Add comment about name_components
169         table.
170         (dw2_expand_symtabs_matching): Factor part to...
171         (dw2_expand_symtabs_matching_symbol): ... this new function.
172         Build name components table, and lookup symbols in it before
173         calling the name matcher.
174         (dw2_expand_marked_cus): New, factored out from
175         dw2_expand_symtabs_matching.
176         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
177
178 2017-11-08   Pedro Alves  <palves@redhat.com>
179
180         * ada-lang.c (ada_encode): Rename to ..
181         (ada_encode_1): ... this.  Add throw_errors parameter and handle
182         it.
183         (ada_encode): Reimplement.
184         (match_name): Delete, folded into full_name.
185         (resolve_subexp): No longer pass the encoded name to
186         ada_lookup_symbol_list.
187         (should_use_wild_match): Delete.
188         (name_match_type_from_name): New.
189         (ada_lookup_simple_minsym): Use lookup_name_info and the
190         language's symbol_name_matcher_ftype.
191         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
192         (ada_add_block_renamings): Adjust to use lookup_name_info.
193         (ada_lookup_name): New.
194         (add_nonlocal_symbols, ada_add_all_symbols)
195         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
196         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
197         (ada_name_for_lookup): Delete.
198         (ada_lookup_encoded_symbol): Construct a verbatim name.
199         (wild_match): Reverse sense of return type.  Use bool.
200         (full_match): Reverse sense of return type.  Inline bits of old
201         match_name here.
202         (ada_add_block_symbols): Adjust to use lookup_name_info.
203         (symbol_completion_match): Delete, folded into...
204         (ada_lookup_name_info::matches): ... .this new method.
205         (symbol_completion_add): Delete.
206         (ada_collect_symbol_completion_matches): Add name_match_type
207         parameter.  Adjust to use lookup_name_info and
208         completion_list_add_name.
209         (get_var_value, ada_add_global_exceptions): Adjust to use
210         lookup_name_info.
211         (ada_get_symbol_name_cmp): Delete.
212         (do_wild_match, do_full_match): New functions.
213         (ada_lookup_name_info::ada_lookup_name_info): New method.
214         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
215         functions.
216         (ada_language_defn): Install ada_get_symbol_name_matcher.
217         * ada-lex.l (processId): If name starts with '<', copy it
218         verbatim.
219         * block.c (block_iter_match_step, block_iter_match_first)
220         (block_iter_match_next, block_lookup_symbol)
221         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
222         lookup_name_info.
223         * block.h (block_iter_match_first, block_iter_match_next)
224         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
225         * c-lang.c (c_language_defn, cplus_language_defn)
226         (asm_language_defn, minimal_language_defn): Adjust comments to
227         refer to la_get_symbol_name_matcher.
228         * completer.c (complete_files_symbols)
229         (collect_explicit_location_matches, symbol_completer): Pass a
230         symbol_name_match_type down.
231         * completer.h (class completion_match, completion_match_result):
232         New classes.
233         (completion_tracker::reset_completion_match_result): New method.
234         (completion_tracker::m_completion_match_result): New field.
235         * cp-support.c (make_symbol_overload_list_block): Adjust to use
236         lookup_name_info.
237         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
238         functions.
239         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
240         * d-lang.c: Adjust comments to refer to
241         la_get_symbol_name_matcher.
242         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
243         Adjust to use lookup_name_info.
244         (dict_iter_match_first, dict_iter_match_next)
245         (iter_match_first_hashed, iter_match_next_hashed)
246         (iter_match_first_linear, iter_match_next_linear): Adjust to work
247         with a lookup_name_info.
248         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
249         Likewise.
250         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
251         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
252         (gdb_index_symbol_name_matcher): New class.
253         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
254         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
255         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
256         with a symbol_name_match_type.
257         (f_language_defn): Adjust comments to refer to
258         la_get_symbol_name_matcher.
259         * go-lang.c (go_language_defn): Adjust comments to refer to
260         la_get_symbol_name_matcher.
261         * language.c (default_symbol_name_matcher)
262         (language_get_symbol_name_matcher): New functions.
263         (unknown_language_defn, auto_language_defn): Adjust comments to
264         refer to la_get_symbol_name_matcher.
265         * language.h (symbol_name_cmp_ftype): Delete.
266         (language_defn) <la_collect_symbol_completion_matches>: Add match
267         type parameter.
268         <la_get_symbol_name_cmp>: Delete field.
269         <la_get_symbol_name_matcher>: New field.
270         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
271         (default_symbol_name_matcher, language_get_symbol_name_matcher):
272         Declare.
273         * linespec.c (iterate_over_all_matching_symtabs)
274         (iterate_over_file_blocks): Adjust to use lookup_name_info.
275         (find_methods): Add language parameter, and use lookup_name_info
276         and the language's symbol_name_matcher_ftype.
277         (linespec_complete_function): Adjust.
278         (lookup_prefix_sym): Use lookup_name_info.
279         (add_all_symbol_names_from_pspace): Adjust.
280         (find_superclass_methods): Add language parameter and pass it
281         down.
282         (find_method): Pass symbol language down.
283         (find_linespec_symbols): Don't demangle or Ada encode here.
284         (search_minsyms_for_name): Add lookup_name_info parameter.
285         (add_matching_symbols_to_info): Add name_match_type parameter.
286         Use lookup_name_info.
287         * m2-lang.c (m2_language_defn): Adjust comments to refer to
288         la_get_symbol_name_matcher.
289         * minsyms.c: Include <algorithm>.
290         (add_minsym_to_demangled_hash_table): Remove table parameter and
291         add objfile parameter.  Use search_name_hash, and add language to
292         demangled languages vector.
293         (struct found_minimal_symbols): New struct.
294         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
295         New functions.
296         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
297         input names here.  Use lookup_name_info instead.  Lookup up
298         demangled names once for each language in the demangled names
299         vector.
300         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
301         demangled names once for each language in the demangled names
302         vector.
303         (build_minimal_symbol_hash_tables): Adjust.
304         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
305         lookup_name_info.
306         * objc-lang.c (objc_language_defn): Adjust comment to refer to
307         la_get_symbol_name_matcher.
308         * objfiles.h: Include <vector>.
309         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
310         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
311         la_get_symbol_name_matcher.
312         * p-lang.c (pascal_language_defn): Adjust comment to refer to
313         la_get_symbol_name_matcher.
314         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
315         (match_partial_symbol): Use symbol_name_match_type,
316         lookup_name_info and psymbol_name_matches.
317         (lookup_partial_symbol): Use lookup_name_info.
318         (map_block): Use symbol_name_match_type and lookup_name_info.
319         (psym_map_matching_symbols): Use symbol_name_match_type.
320         (psymbol_name_matches): New.
321         (recursively_search_psymtabs): Use lookup_name_info and
322         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
323         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
324         'kind' parameter to 'domain'.
325         * rust-lang.c (rust_language_defn): Adjust comment to refer to
326         la_get_symbol_name_matcher.
327         * symfile-debug.c (debug_qf_map_matching_symbols)
328         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
329         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
330         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
331         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
332         Adjust to use symbol_name_match_type.
333         <expand_symtabs_matching>: Adjust to use lookup_name_info.
334         (expand_symtabs_matching): Adjust to use lookup_name_info.
335         * symmisc.c (maintenance_expand_symtabs): Use
336         lookup_name_info::match_any ().
337         * symtab.c (symbol_matches_search_name): New.
338         (eq_symbol_entry): Adjust to use lookup_name_info and the
339         language's matcher.
340         (demangle_for_lookup_info::demangle_for_lookup_info): New.
341         (lookup_name_info::match_any): New.
342         (iterate_over_symbols, search_symbols): Use lookup_name_info.
343         (compare_symbol_name): Add language, lookup_name_info and
344         completion_match_result parameters, and use them.
345         (completion_list_add_name): Make extern.  Add language and
346         lookup_name_info parameters.  Use them.
347         (completion_list_add_symbol, completion_list_add_msymbol)
348         (completion_list_objc_symbol): Add lookup_name_info parameters and
349         adjust.  Pass down language.
350         (completion_list_add_fields): Add lookup_name_info parameters and
351         adjust.  Pass down language.
352         (add_symtab_completions): Add lookup_name_info parameters and
353         adjust.
354         (default_collect_symbol_completion_matches_break_on): Add
355         name_match_type parameter, and use it.  Use lookup_name_info.
356         (default_collect_symbol_completion_matches)
357         (collect_symbol_completion_matches): Add name_match_type
358         parameter, and pass it down.
359         (collect_symbol_completion_matches_type): Adjust.
360         (collect_file_symbol_completion_matches): Add name_match_type
361         parameter, and use lookup_name_info.
362         * symtab.h: Include <string> and "common/gdb_optional.h".
363         (enum class symbol_name_match_type): New.
364         (class ada_lookup_name_info): New.
365         (struct demangle_for_lookup_info): New.
366         (class lookup_name_info): New.
367         (symbol_name_matcher_ftype): New.
368         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
369         (symbol_matches_search_name): Declare.
370         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
371         (default_collect_symbol_completion_matches)
372         (collect_symbol_completion_matches)
373         (collect_file_symbol_completion_matches): Add name_match_type
374         parameter.
375         (iterate_over_symbols): Use lookup_name_info.
376         (completion_list_add_name): Declare.
377         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
378         (strncmp_iw_with_mode): Now extern.
379         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
380         (strncmp_iw_with_mode): Declare.
381
382 2017-11-08  Keith Seitz  <keiths@redhat.com>
383             Pedro Alves  <palves@redhat.com>
384
385         * ada-lang.c (ada_language_defn): Install
386         default_search_name_hash.
387         * buildsym.c (struct buildsym_compunit): <language>: New field.
388         (finish_block_internal): Pass language when creating dictionaries.
389         (start_buildsym_compunit, start_symtab): New language parameters.
390         Use them.
391         (restart_symtab): Pass down compilation unit's language.
392         * buildsym.h (enum language): Forward declare.
393         (start_symtab): New 'language' parameter.
394         * c-lang.c (c_language_defn, cplus_language_defn)
395         (asm_language_defn, minimal_language_defn): Install
396         default_search_name_hash.
397         * coffread.c (coff_start_symtab): Adjust.
398         * d-lang.c (d_language_defn): Install default_search_name_hash.
399         * dbxread.c (struct symloc): Add 'pst_language' field.
400         (PST_LANGUAGE): Define.
401         (start_psymtab, read_ofile_symtab): Use it.
402         (process_one_symbol): New 'language' parameter.  Pass it down.
403         * dictionary.c (struct dictionary) <language>: New field.
404         (DICT_LANGUAGE): Define.
405         (dict_create_hashed, dict_create_hashed_expandable)
406         (dict_create_linear, dict_create_linear_expandable): New parameter
407         'language'.  Set the dictionary's language.
408         (iter_match_first_hashed): Adjust to rename.
409         (insert_symbol_hashed): Assert we don't see mismatching
410         languages.  Adjust to rename.
411         (dict_hash): Rename to ...
412         (default_search_name_hash): ... this and make extern.
413         * dictionary.h (struct language_defn): Forward declare.
414         (dict_create_hashed): New parameter 'language'.
415         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
416         * f-lang.c (f_language_defn): Install default_search_name_hash.
417         * go-lang.c (go_language_defn): Install default_search_name_hash.
418         * jit.c (finalize_symtab): Pass compunit's language to dictionary
419         creation.
420         * language.c (unknown_language_defn, auto_language_defn):
421         * language.h (language_defn::la_search_name_hash): New field.
422         (default_search_name_hash): Declare.
423         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
424         * mdebugread.c (new_block): New parameter 'language'.
425         * mdebugread.c (parse_symbol): Pass symbol language to block
426         allocation.
427         (psymtab_to_symtab_1): Pass down language.
428         (new_symtab): Pass compunit's language to block allocation.
429         * objc-lang.c (objc_language_defn): Install
430         default_search_name_hash.
431         * opencl-lang.c (opencl_language_defn):
432         * p-lang.c (pascal_language_defn): Install
433         default_search_name_hash.
434         * rust-lang.c (rust_language_defn): Install
435         default_search_name_hash.
436         * stabsread.h (enum language): Forward declare.
437         (process_one_symbol): Add 'language' parameter.
438         * symtab.c (search_name_hash): New function.
439         * symtab.h (search_name_hash): Declare.
440         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
441
442 2017-11-08  Pedro Alves  <palves@redhat.com>
443
444         * cp-name-parser.y (main): Don't initialize extra_chars.
445
446 2017-11-07  Tom Tromey  <tom@tromey.com>
447
448         * event-top.h (command_handler): Constify.
449         * record-full.c (cmd_record_full_start): Update.
450         * thread.c (thread_apply_all_command): Update.
451         * printcmd.c (eval_command): Update.
452         * mi/mi-main.c (mi_execute_cli_command): Update.
453         (mi_execute_async_cli_command): Update.
454         * tui/tui-stack.c (tui_update_command): Update.
455         * cli/cli-interp.c (safe_execute_command): Constify.
456         * record.c (record_start): Update.
457         (record_start, record_stop, cmd_record_start): Update.
458         * record-btrace.c (cmd_record_btrace_bts_start): Update.
459         (cmd_record_btrace_pt_start): Update.
460         (cmd_record_btrace_start): Update.
461         (cmd_record_btrace_start): Update.
462         * reverse.c (exec_reverse_once): Update.
463         * python/python.c (execute_gdb_command): Don't copy the command.
464         * event-top.c (command_line_handler): Update.
465         (command_handler): Constify.
466         * defs.h (deprecated_call_command_hook): Constify.
467         * cli/cli-script.h (execute_user_command): Constify.
468         * cli/cli-script.c (execute_user_command): Constify.
469         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
470         (enum command_control_type): Update.
471         * main.c (catch_command_errors): Remove non-const overload.
472         (catch_command_errors_ftype): Remove.
473         * python/py-cmd.c (cmdpy_function): Constify.
474         * guile/scm-cmd.c (cmdscm_function): Constify.
475         * cli/cli-dump.c (call_dump_func): Constify.
476         * cli/cli-decode.c (do_const_cfunc): Constify.
477         (do_sfunc): Constify.
478         (cmd_func): Constify.
479         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
480         * top.h (execute_command): Constify.
481         * top.c (execute_command): Constify.
482         (execute_command_to_string): Constify.
483         (deprecated_call_command_hook): Constify.
484         * command.h (cmd_func): Constify.
485         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
486
487 2017-11-07  Tom Tromey  <tom@tromey.com>
488
489         * ada-lang.c (catch_ada_exception_command): Constify.
490         (catch_assert_command): Constify.
491         * break-catch-throw.c (catch_catch_command, catch_throw_command)
492         (catch_rethrow_command): Constify.
493         (catch_exception_command_1): Constify.
494         * breakpoint.h (add_catch_command): Constify.
495         * break-catch-syscall.c (catch_syscall_command_1): Constify.
496         (catch_syscall_split_args): Constify.
497         * break-catch-sig.c (catch_signal_command): Constify.
498         (catch_signal_split_args): Constify.
499         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
500         cmd_const_sfunc_ftype.
501         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
502         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
503         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
504         (add_setshow_string_cmd, struct cmd_list_element)
505         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
506         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
507         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
508         Constify.
509         (set_cmd_sfunc): Constify.
510         (empty_sfunc): Constify.
511         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
512         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
513         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
514         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
515         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
516         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
517         Constify.
518         (set_cmd_sfunc): Constify.
519         (cmd_sfunc_ftype): Remove.
520         * compile/compile.c (set_compile_args): Constify.
521         * infrun.c (set_disable_randomization): Constify.
522         * infcmd.c (set_args_command, set_cwd_command): Constify.
523         * breakpoint.c (set_condition_evaluation_mode): Constify.
524         (add_catch_command): Constify.
525         (catch_fork_command_1, catch_exec_command_1)
526         (catch_load_command_1, catch_unload_command_1): Constify.
527         (catch_load_or_unload): Constify.
528         * guile/scm-param.c (pascm_set_func): Constify.
529         (add_setshow_generic): Constify.
530         * python/py-param.c (get_set_value): Constify.
531         * top.h (set_verbose): Constify.
532         * tui/tui-win.c (tui_set_var_cmd): Constify.
533         * mi/mi-main.c (set_mi_async_command): Constify.
534         * cli/cli-logging.c (set_logging_overwrite)
535         (set_logging_redirect): Constify.
536         * value.c (set_max_value_size): Constify.
537         * valprint.c (set_input_radix, set_output_radix): Constify.
538         * utils.c (set_width_command, set_height_command): Constify.
539         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
540         * tracepoint.c (set_disconnected_tracing)
541         (set_circular_trace_buffer, set_trace_buffer_size)
542         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
543         * top.c (set_history_size_command, set_verbose, set_editing)
544         (set_gdb_datadir, set_history_filename): Constify.
545         * target.c (set_targetdebug, maint_set_target_async_command)
546         (maint_set_target_non_stop_command, set_target_permissions)
547         (set_write_memory_permission): Constify.
548         (open_target): Constify.
549         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
550         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
551         * symtab.c (set_symbol_cache_size_handler): Constify.
552         * symfile.c (set_ext_lang_command): Constify.
553         * symfile-debug.c (set_debug_symfile): Constify.
554         * source.c (set_directories_command): Constify.
555         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
556         * serial.c (set_parity): Constify.
557         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
558         * remote.c (set_remote_exec_file, set_remotebreak)
559         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
560         * record.c (set_record_insn_history_size)
561         (set_record_call_history_size): Constify.
562         * record-full.c (set_record_full_insn_max_num): Constify.
563         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
564         * osabi.c (set_osabi): Constify.
565         * mips-tdep.c (set_mips64_transfers_32bit_regs)
566         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
567         * maint.c (maintenance_set_profile_cmd): Constify.
568         * linux-thread-db.c (set_libthread_db_search_path): Constify.
569         * language.c (set_language_command, set_range_command)
570         (set_case_command): Constify.
571         * infrun.c (set_non_stop, set_observer_mode)
572         (set_stop_on_solib_events, set_schedlock_func)
573         (set_exec_direction_func): Constify.
574         * infcmd.c (set_inferior_tty_command): Constify.
575         * disasm.c (set_disassembler_options_sfunc): Constify.
576         * demangle.c (set_demangling_command): Constify.
577         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
578         * cris-tdep.c (set_cris_version, set_cris_mode)
579         (set_cris_dwarf2_cfi): Constify.
580         * corefile.c (set_gnutarget_command): Constify.
581         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
582         (set_target_wide_charset_sfunc): Constify.
583         * breakpoint.c (update_dprintf_commands): Constify.
584         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
585         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
586         (set_disassembly_style_sfunc): Constify.
587         * arch-utils.c (set_endian, set_architecture): Constify.
588         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
589         * agent.c (set_can_use_agent): Constify.
590
591 2017-11-07  Tom Tromey  <tom@tromey.com>
592
593         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
594         (go32_pde, go32_pte, go32_pte_for_address): Constify.
595         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
596         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
597         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
598         (parse_int_arg, show_thread_default_detach_sc_cmd)
599         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
600         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
601         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
602         (show_task_pause_cmd, set_task_detach_sc_cmd)
603         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
604         (set_noninvasive_cmd, set_thread_pause_cmd)
605         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
606         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
607         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
608         * windows-nat.c (display_selectors): Constify.
609         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
610         non-const "cfunc".
611         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
612         (cmd_cfunc_eq): Likewise.
613         (struct cmd_list_element): Likewise.
614         (do_cfunc): Remove.
615         (cli_user_command_p): Update.
616         * command.h (add_cmd): Remove non-const overload.
617         (cmd_cfunc_ftype): Remove typedef.
618         (cmd_cfunc_eq): Remove non-const overload.
619         * value.c (show_values): Constify.
620         * thread.c (thread_apply_all_command): Constify.
621         * symfile.c (load_command): Constify.
622         * source.c (directory_command): Constify.
623         * maint.c (maintenance_internal_error)
624         (maintenance_demangler_warning, maintenance_space_display)
625         (maintenance_print_architecture, maintenance_translate_address)
626         (maintenance_info_selftests, maintenance_internal_warning):
627         Constify.
628         * breakpoint.c (disable_trace_command, enable_trace_command):
629         Constify.
630         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
631         Constify.
632         (add_auto_load_safe_path): Constify.
633         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
634         * top.h (show_commands): Constify.
635         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
636         * sparc64-tdep.c (adi_examine_command): Constify.
637         (adi_assign_command): Constify.
638
639 2017-11-07  Tom Tromey  <tom@tromey.com>
640
641         * frame.h (info_locals_command, info_args_command): Constify.
642         * auto-load.h (auto_load_info_scripts): Constify.
643         * inferior.h (registers_info): Constify.
644         * copying.c: Rebuild.
645         * copying.awk: Constify generated commands.
646         * auto-load.c (auto_load_info_scripts)
647         (info_auto_load_gdb_scripts): Constify.
648         * cli/cli-decode.c (struct cmd_list_element): Take a
649         cmd_const_cfunc_ftype.
650         * command.h (add_info): Take a cmd_const_cfunc_ftype.
651         * tui/tui-win.c (tui_all_windows_info): Constify.
652         * python/py-auto-load.c (info_auto_load_python_scripts):
653         Constify.
654         * cli/cli-cmds.c (show_command): Remove non-const overload.
655         * tracepoint.c (info_tvariables_command, info_scope_command):
656         Constify.
657         (info_static_tracepoint_markers_command): Constify.
658         * thread.c (info_threads_command): Constify.
659         (print_thread_info_1): Constify.
660         * target.c (info_target_command): Constify.
661         * symtab.c (info_sources_command, info_functions_command)
662         (info_types_command): Constify.
663         (info_variables_command): Remove non-const overload.
664         * symfile.c (info_ext_lang_command): Constify.
665         * stack.c (info_frame_command, info_locals_command)
666         (info_args_command): Constify.
667         (backtrace_command): Remove non-const overload.
668         * source.c (info_source_command, info_line_command): Constify.
669         * solib.c (info_sharedlibrary_command): Constify.
670         * skip.c (info_skip_command): Constify.
671         * ser-go32.c (info_serial_command): Constify.
672         * reverse.c (info_bookmarks_command): Constify.
673         * printcmd.c (info_symbol_command, info_address_command)
674         (info_display_command): Constify.
675         * osdata.c (info_osdata_command): Constify.
676         * objc-lang.c (info_selectors_command, info_classes_command):
677         Constify.
678         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
679         * memattr.c (info_mem_command): Constify.
680         * macrocmd.c (info_macro_command, info_macros_command): Constify.
681         * linux-fork.c (info_checkpoints_command): Constify.
682         * infrun.c (info_signals_command): Constify.
683         * inflow.c (info_terminal_command): Constify.
684         * inferior.c (info_inferiors_command): Constify.
685         (print_inferior): Constify.
686         * infcmd.c (info_program_command, info_all_registers_command)
687         (info_registers_command, info_vector_command)
688         (info_float_command): Constify.
689         (registers_info): Constify.
690         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
691         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
692         Constify.
693         * f-valprint.c (info_common_command): Constify.
694         * dcache.c (info_dcache_command): Constify.
695         (dcache_info_1): Constify.
696         * darwin-nat-info.c (info_mach_tasks_command)
697         (info_mach_task_command, info_mach_ports_command)
698         (info_mach_port_command, info_mach_threads_command)
699         (info_mach_thread_command, info_mach_regions_command)
700         (info_mach_regions_recurse_command, info_mach_region_command)
701         (info_mach_exceptions_command): Constify.
702         (get_task_from_args): Constify.
703         * cp-support.c (info_vtbl_command): Constify.
704         * breakpoint.c (info_watchpoints_command)
705         (info_tracepoints_command): Constify.
706         (info_breakpoints_command): Remove non-const overload.
707         * avr-tdep.c (avr_io_reg_read_command): Constify.
708         * auxv.c (info_auxv_command): Constify.
709         * ada-tasks.c (info_tasks_command): Constify.
710         (info_task): Constify.
711         * ada-lang.c (info_exceptions_command): Constify.
712
713 2017-11-07  Tom Tromey  <tom@tromey.com>
714
715         * solib.h (no_shared_libraries): Constify.
716         * frame.h (return_command): Constify.
717         * cli/cli-cmds.h (quit_command): Constify.
718         * top.h (quit_command, execute_command): Constify.
719         * target.h (flash_erase_command): Constify.
720         * inferior.h (set_inferior_args, attach_command): Constify.
721         * tracepoint.h (start_tracing, stop_tracing): Constify.
722         * breakpoint.h (break_command, tbreak_command)
723         (hbreak_command_wrapper, thbreak_command_wrapper)
724         (rbreak_command_wrapper, watch_command_wrapper)
725         (awatch_command_wrapper, rwatch_command_wrapper)
726         (get_tracepoint_by_number): Constify.
727         * symtab.c (info_variables_command, rbreak_command)
728         (symtab_symbol_info): Constify.
729         (info_variables_command): Add non-const overload.
730         * top.c (dont_repeat_command): Constify.
731         * breakpoint.c (ignore_command, commands_command)
732         (condition_command, tbreak_command, hbreak_command)
733         (thbreak_command, clear_command, break_command)
734         (info_breakpoints_command, watch_command, rwatch_command)
735         (awatch_command, trace_command, ftrace_command, strace_command)
736         (trace_pass_command, break_range_command, dprintf_command)
737         (agent_printf_command, get_tracepoint_by_number)
738         (watch_maybe_just_location, trace_pass_command): Constify.
739         (info_breakpoints_command): Add non-const overload.
740         * tracefile.c (tsave_command): Constify.
741         * infcmd.c (attach_command, disconnect_command, signal_command)
742         (queue_signal_command, stepi_command, nexti_command)
743         (finish_command, next_command, step_command, until_command)
744         (advance_command, jump_command, continue_command, run_command)
745         (start_command, starti_command, interrupt_command)
746         (run_command_1, set_inferior_args, step_1): Constify.
747         * inferior.c (add_inferior_command, remove_inferior_command)
748         (clone_inferior_command): Constify.
749         * linux-fork.c (checkpoint_command, restart_command): Constify.
750         * windows-nat.c (signal_event_command): Constify.
751         * guile/guile.c (guile_repl_command, guile_command): Constify.
752         * printcmd.c (x_command, display_command, printf_command)
753         (output_command, set_command, call_command, print_command)
754         (eval_command): Constify.
755         (non_const_set_command): Remove.
756         (_initialize_printcmd): Update.
757         * source.c (forward_search_command, reverse_search_command):
758         Constify.
759         * jit.c (jit_reader_load_command, jit_reader_unload_command):
760         Constify.
761         * infrun.c (handle_command): Constify.
762         * memattr.c (mem_command): Constify.
763         * stack.c (return_command, up_command, up_silently_command)
764         (down_command, down_silently_command, frame_command)
765         (backtrace_command, func_command, backtrace_command_1): Constify.
766         (backtrace_command): Add non-const overload.
767         * remote-sim.c (simulator_command): Constify.
768         * exec.c (set_section_command): Constify.
769         * tracepoint.c (tdump_command, trace_variable_command)
770         (tstatus_command, tstop_command, tstart_command)
771         (end_actions_pseudocommand, while_stepping_pseudocommand)
772         (collect_pseudocommand, teval_pseudocommand, actions_command)
773         (start_tracing, stop_tracing): Constify.
774         * value.c (init_if_undefined_command): Constify.
775         * tui/tui-stack.c (tui_update_command): Constify.
776         * tui/tui-win.c (tui_refresh_all_command)
777         (tui_set_tab_width_command, tui_set_win_height_command)
778         (tui_set_focus_command, tui_scroll_forward_command)
779         (tui_scroll_backward_command, tui_scroll_left_command)
780         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
781         (tui_set_win_height): Constify.
782         * tui/tui-layout.c (tui_layout_command): Constify.
783         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
784         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
785         (proc_untrace_sysexit_cmd): Constify.
786         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
787         (threadset_test_cmd, threadlist_update_test_cmd)
788         (threadalive_test): Constify.
789         * objc-lang.c (print_object_command): Constify.
790         * command.h (add_com): Constify.
791         * cli/cli-dump.c (restore_command): Constify.
792         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
793         (help_command, complete_command, shell_command, edit_command)
794         (list_command, disassemble_command, make_command)
795         (apropos_command, alias_command): Constify.
796         * cli/cli-script.c (document_command, define_command)
797         (while_command, if_command, validate_comname): Constify.
798         * cli/cli-decode.c (struct cmd_list_element): Change type of
799         "fun".
800         * target.c (do_monitor_command, flash_erase_command): Constify.
801         * regcache.c (reg_flush_command): Constify.
802         * reverse.c (reverse_step, reverse_next, reverse_stepi)
803         (reverse_nexti, reverse_continue, reverse_finish)
804         (save_bookmark_command, goto_bookmark_command)
805         (exec_reverse_once): Constify.
806         * python/python.c (python_interactive_command, python_command):
807         Constify.
808         * typeprint.c (ptype_command, whatis_command, whatis_exp):
809         Constify.
810         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
811         * gcore.c (gcore_command): Constify.
812
813 2017-11-07  Tom Tromey  <tom@tromey.com>
814
815         * printcmd.c (x_command): Call set_repeat_arguments.
816         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
817         * top.c (repeat_arguments): New global.
818         (set_repeat_arguments): New function.
819         (execute_command): Handle repeat_arguments.
820         (show_commands): Calls set_repeat_arguments.
821         * command.h (set_repeat_arguments): Declare.
822
823 2017-11-07  Tom Tromey  <tom@tromey.com>
824
825         * stack.c (backtrace_command): Use std::string.
826         (backtrace_command_1): Make "count_exp" const.
827
828 2017-11-07  Tom Tromey  <tom@tromey.com>
829
830         * source.c (directory_switch, mod_path, add_path): Constify.
831         * defs.h (add_path, mod_path, directory_switch): Constify.
832         * mi/mi-cmd-env.c (env_mod_path): Constify.
833
834 2017-11-07  Tom Tromey  <tom@tromey.com>
835
836         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
837         (run_command_1, continue_command, step_1, jump_command)
838         (signal_command, until_command, advance_command, finish_command)
839         (attach_command): Update.
840
841 2017-11-07  Tom Tromey  <tom@tromey.com>
842
843         * command.h (set_cmd_cfunc): Don't declare.
844         * cli/cli-decode.c (set_cmd_cfunc): Now static.
845
846 2017-11-07  Tom Tromey  <tom@tromey.com>
847
848         * stack.c (select_frame_command): Constify.
849         * cli/cli-decode.c (add_com_suppress_notification): Constify.
850         * command.h (add_com_suppress_notification): Constify.
851
852 2017-11-07  Tom Tromey  <tom@tromey.com>
853
854         * breakpoint.c (stop_command): Constify.
855         * cli/cli-decode.c (struct cmd_list_element): Constify.
856         * command.h (add_abbrev_prefix_cmd): Constify.
857
858 2017-11-07  Pedro Alves  <palves@redhat.com>
859
860         * breakpoint.c (extract_bp_kind): New enum.
861         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
862         factored out from ...
863         (extract_bp_number_and_location): ... here.
864         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
865
866 2017-11-07  Pedro Alves  <palves@redhat.com>
867
868         * breakpoint.c (extract_bp_number_and_location): Change return
869         type to void.  Throw error instead of warning.
870         (enable_disable_command): Adjust.
871
872 2017-11-07  Xavier Roirand  <roirand@adacore.com>
873             Pedro Alves  <palves@redhat.com>
874
875         * breakpoint.c (map_breakpoint_number_range): New, factored out
876         from ...
877         (map_breakpoint_numbers): ... here.
878         (find_location_by_number): Change parameters from string to
879         breakpoint number and location.
880         (extract_bp_number_and_location): New function.
881         (enable_disable_bp_num_loc)
882         (enable_disable_breakpoint_location_range)
883         (enable_disable_command): New functions, factored out ...
884         (enable_command, disable_command): ... these functions, and
885         adjusted to support ranges.
886         * NEWS: Document enable/disable breakpoint location range feature.
887
888 2017-11-06  Luis Machado  <luis.machado@linaro.org>
889
890         * MAINTAINERS (Write After Approval): Update my e-mail address.
891
892 2017-11-06  Pedro Alves  <palves@redhat.com>
893
894         * gnu-nat.c (gnu_terminal_init): Delete.
895         (gnu_target): Don't install gnu_terminal_init.
896         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
897         (child_terminal_init): ... this function.
898
899 2017-11-06  Pedro Alves  <palves@redhat.com>
900
901         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
902         sgtty.h.
903         * config.in, configure: Regenerate.
904
905 2017-11-06  Pedro Alves  <palves@redhat.com>
906
907         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
908         (async_init_signals): Adjust.
909         (handle_stop_sig): Rename to ...
910         (handle_sigtstp): ... this.
911         (async_stop_sig): Rename to ...
912         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
913         SIGTSTP path.
914         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
915         instead of STOP_SIGNAL thoughout.
916         (handle_stop_sig): Rename to ...
917         (handle_sigtstp): ... this.
918         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
919
920 2017-11-06  Pedro Alves  <palves@redhat.com>
921
922         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
923         longer set flags twice in row.
924
925 2017-11-06  Pedro Alves  <palves@redhat.com>
926
927         * Makefile.in (SER_HARDWIRE): Update comment.
928         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
929         * common/gdb_termios.h: Delete file.
930         * common/job-control.c: Include termios.h and unistd.h instead of
931         gdb_termios.h.
932         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
933         check.
934         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
935         Remove sgtty code.
936         * configure.ac: No longer check for termio.h and sgtty.h.
937         * configure: Regenerate.
938         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
939         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
940         Replace PROCESS_GROUP_TYPE references with pid_t references
941         throughout.
942         (gdb_getpgrp): Delete.
943         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
944         (child_terminal_inferior): Remove comment.  Remove sgtty code.
945         (child_terminal_ours_1): Use tcgetpgrp directly instead of
946         gdb_getpgrp.  Use serial_set_tty_state instead aof
947         serial_noflush_set_tty_state.  Remove sgtty code.
948         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
949         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
950         (inferior_process_group): Now returns pid_t.
951         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
952         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
953         * ser-event.c (serial_event_ops): Update.
954         * ser-go32.c (dos_noflush_set_tty_state): Delete.
955         (dos_ops): Update.
956         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
957         * ser-pipe.c (pipe_ops): Update.
958         * ser-tcp.c (tcp_ops): Update.
959         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
960         HAVE_TERMIOS checks.
961         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
962         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
963         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
964         assume termios.
965         (hardwire_noflush_set_tty_state): Delete.
966         (hardwire_print_tty_state, hardwire_drain_output)
967         (hardwire_flush_output, hardwire_flush_input)
968         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
969         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
970         code, and assume termios.
971         (hardwire_ops): Update.
972         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
973         * serial.c (serial_noflush_set_tty_state): Delete.
974         * serial.h (serial_noflush_set_tty_state): Delete.
975         (serial_ops::noflush_set_tty_state): Delete.
976
977 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
978
979         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
980         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
981         (COMMON_OBS): Remove doublest.o and dfp.o.
982         Do not build target-float.c (instead of doublest.c)
983         with -Wformat-nonliteral.
984
985         * doublest.c: Remove file.
986         * doublest.h: Remove file.
987         * dfp.c: Remove file.
988         * dfp.h: Remove file.
989
990         * target-float.c: Do not include "doublest.h" and "dfp.h".
991         (DOUBLEST): Move here from doublest.h.
992         (enum float_kind): Likewise.
993         (FLOATFORMAT_CHAR_BIT): Likewise.
994         (FLOATFORMAT_LARGEST_BYTES): Likewise.
995         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
996         (floatformat_precision): Likewise.
997         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
998         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
999         Likewise.
1000         (host_float_format, host_double_format, host_long_double_format):
1001         Likewise.
1002         (floatformat_to_string, floatformat_from_string): Likewise.
1003         (floatformat_to_doublest): Likewise.  Also, inline the original
1004         convert_floatformat_to_doublest.
1005         (floatformat_from_doublest): Likewise.  Also, inline the original
1006         convert_floatformat_from_doublest.
1007
1008         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1009         (MAX_DECIMAL_STRING): Move here from dfp.c.
1010         (match_endianness): Likewise.
1011         (set_decnumber_context, decimal_check_errors): Likewise.
1012         (decimal_from_number, decimal_to_number): Likewise.
1013         (decimal_to_string, decimal_from_string): Likewise.  Make static.
1014         (decimal_from_longest, decimal_from_ulongest): Likewise.
1015         (decimal_to_longest): Likewise.
1016         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1017         (decimal_convert): Likewise.
1018
1019 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1020
1021         * doublest.c: Do not include "gdbtypes.h".
1022         (extract_typed_floating): Remove.
1023         (store_typed_floating): Remove.
1024         (convert_typed_floating): Remove.
1025         * doublest.h (struct type): Remove.
1026         (DOUBLEST_PRINT_FORMAT): Remove.
1027         (DOUBLEST_SCAN_FORMAT): Remove.
1028         (extract_typed_floating): Remove.
1029         (store_typed_floating): Remove.
1030         (convert_typed_floating): Remove.
1031
1032         * dfp.c (decimal_from_doublest): Remove.
1033         (decimal_to_doublest): Remove.
1034         * dfp.h: Do not include "doublest.h".
1035         (decimal_from_doublest): Remove.
1036         (decimal_to_doublest): Remove.
1037
1038         * value.c: Do not include "doublest.h" and "dfp.h".
1039         (value_as_double): Remove.
1040         (unpack_double): Remove.
1041         (value_from_double): Remove.
1042         (value_from_decfloat): Remove.
1043         * value.h: Do not include "doublest.h".
1044         (value_as_double): Remove.
1045         (unpack_double): Remove.
1046         (value_from_double): Remove.
1047         (value_from_decfloat): Remove.
1048
1049 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1050
1051         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1052         (i386_extract_return_value): Use target_float_convert.
1053         (i386_store_return_value): Likewise.
1054         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1055         (i387_value_to_register): Likewise.
1056         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1057         (ia64_register_to_value): Use target_float_convert.
1058         (ia64_value_to_register): Likewise.
1059         (ia64_extract_return_value): Likewise.
1060         (ia64_store_return_value): Likewise.
1061         (ia64_push_dummy_call): Likewise.
1062         * m68k-tdep.c: Include "target-float.h".
1063         (m68k_register_to_value): Use target_float_convert.
1064         (m68k_value_to_register): Likewise.
1065         (m68k_svr4_extract_return_value): Likewise.
1066         (m68k_svr4_store_return_value): Likewise.
1067         * ppc-sysv-tdep.c: Include "target-float.h".
1068         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1069         (do_ppc_sysv_return_value): Likewise.
1070         (ppc64_sysv_abi_push_freg): Likewise.
1071         (ppc64_sysv_abi_return_value_base): Likewise.
1072         * rs6000-aix-tdep.c: Include "target-float.h".
1073         (rs6000_push_dummy_call): Use target_float_convert.
1074         (rs6000_return_value): Likewise.
1075         * rs6000-lynx178-tdep.c: Include "target-float.h".
1076         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1077         (rs6000_lynx178_return_value): Likewise.
1078         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1079         (rs6000_register_to_value): Use target_float_convert.
1080         (rs6000_value_to_register): Likewise.
1081         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1082         (arm_extract_return_value): Use target_float_convert.
1083         (arm_store_return_value): Likewise.
1084         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1085         (sh_register_convert_to_virtual): Use target_float_convert.
1086         (sh_register_convert_to_raw): Likewise.
1087         * sh64-tdep.c: Include "target-float.h".
1088         (sh64_extract_return_value): Use target_float_convert.
1089         (sh64_register_convert_to_virtual): Likewise.
1090         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
1091
1092 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1093
1094         * target-float.c (floatformat_to_host_double): New function.
1095         (floatformat_from_host_double): Likewise.
1096         (target_float_to_host_double): Likewise.
1097         (target_float_from_host_double): Likewise.
1098         * target-float.h (target_float_to_host_double): Add prototype.
1099         (target_float_from_host_double): Likewise.
1100
1101         * guile/scm-value.c: Include "target-float.h".
1102         (gdbscm_value_to_real): Use target_float_to_host_double.
1103         Handle integer source values via value_as_long.
1104         * guile/scm-math.c: Include "target-float.h".  Do not include
1105         "doublest.h", "dfp.h", and "expression.h".
1106         (vlscm_convert_typed_number): Use target_float_from_host_double.
1107         (vlscm_convert_number): Likewise.
1108
1109         * python/py-value.c (valpy_float): Use target_float_to_host_double.
1110         (convert_value_from_python): Use target_float_from_host_double.
1111
1112 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1113
1114         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1115         (cast_from_fixed): Likewise.
1116         (ada_scaling_type): New function.
1117         (ada_delta): Return value instead of DOUBLEST.  Perform target
1118         arithmetic instead of host arithmetic.
1119         (scaling_factor): Rename to ...
1120         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
1121         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
1122         (ada_fixed_to_float): Remove.
1123         (ada_float_to_fixed): Remove.
1124         * ada-lang.h (ada_fixed_to_float): Remove.
1125         (ada_float_to_fixed): Remove.
1126         (ada_delta): Return value instead of DOUBLEST.
1127         (ada_scaling_factor): Add prototype.
1128
1129         * ada-typeprint.c: Include "target-float.h".
1130         (print_fixed_point_type): Perform target arithmetic instead of
1131         host arithmetic.
1132         * ada-valprint.c: Include "target-float.h".
1133         (ada_val_print_num): Perform target arithmetic instead of
1134         host arithmetic for fixed-point types.
1135
1136 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1137
1138         * target-float.c: Include <math.h>.
1139         (floatformat_binop): New function.
1140         (floatformat_compare): Likewise.
1141         (target_float_binop): Likewise.
1142         (target_float_compare): Likewise.
1143         * target-float.h: Include "expression.h".
1144         (target_float_binop): Add prototype.
1145         (target_float_compare): Likewise.
1146
1147         * valarith.c: Do not include "doublest.h" and "dfp.h".
1148         Include "common/byte-vector.h".
1149         (value_args_as_decimal): Remove, replace by ...
1150         (value_args_as_target_float): ... this function.  Handle both
1151         binary and decimal target floating-point formats.
1152         (scalar_binop): Handle both binary and decimal FP using
1153         value_args_as_target_float and target_float_binop.
1154         (value_equal): Handle both binary and decimal FP using
1155         value_args_as_target_float and target_float_compare.
1156         (value_less): Likewise.
1157         (value_pos): Handle all scalar types as simple copy.
1158         (value_neg): Handle all scalar types via BINOP_SUB from 0.
1159         * dfp.c (decimal_binop): Throw error instead of internal_error
1160         when called with an unsupported operation code.
1161
1162 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1163
1164         * target-float.c (target_float_to_string): New function.
1165         (target_float_from_string): New function.
1166         * target-float.h (target_float_to_string): Add prototype.
1167         (target_float_from_string): Add prototype.
1168
1169         * valprint.c: Include "target-float.h".  Do not include
1170         "doublest.h" and "dfp.h".
1171         (print_floating): Use target_float_to_string.
1172         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
1173         (printf_floating): Use target_float_to_string.
1174         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1175         (print_i387_value): Use target_float_to_string.
1176         * mips-tdep.c: Include "target-float.h".
1177         (mips_print_fp_register): Use target_float_to_string.
1178         * sh64-tdep.c: Include "target-float.h".
1179         (sh64_do_fp_register): Use target_float_to_string.
1180
1181         * parse.c: Include "target-float.h".  Do not include
1182         "doublest.h" and "dfp.h".
1183         (parse_float): Use target_float_from_string.
1184         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
1185         (define_symbol): Use target_float_from_string.
1186         * gdbarch-selftests.c: Include "target-float.h".
1187         (register_to_value_test): Use target_float_from_string.
1188
1189 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1190
1191         * Makefile.c (SFILES): Add target-float.c.
1192         (HFILES_NO_SRCDIR): Add target-float.h.
1193         (COMMON_OBS): Add target-float.o.
1194         * target-float.h: New file.
1195         * target-float.c: New file.
1196
1197         * doublest.c (floatformat_classify): Fix detection of float_zero.
1198
1199         * gdbtypes.c (is_floating_type): New function.
1200         * gdbtypes.h (is_floating_type): Add prototype.
1201
1202         * value.c: Do not include "floatformat.h".
1203         (unpack_double): Use target_float_is_valid.
1204         (is_floating_value): New function.
1205         * value.h (is_floating_value): Add prototype-
1206
1207         * valarith.c: Include "target-float.h".
1208         (value_logical_not): Use target_float_is_zero.
1209
1210         * python/py-value.c: Include "target-float.h".
1211         (valpy_nonzero): Use target_float_is_zero.
1212
1213 2017-11-04  Tom Tromey  <tom@tromey.com>
1214
1215         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1216
1217 2017-11-04  Tom Tromey  <tom@tromey.com>
1218
1219         * breakpoint.c (set_momentary_breakpoint): Return
1220         breakpoint_up.
1221         (until_break_command): Update.
1222         (new_until_break_fsm): Change argument types to
1223         breakpoint_up.
1224         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1225         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1226         Remove.
1227         * infcmd.c (finish_forward): Update.
1228         * breakpoint.h (set_momentary_breakpoint)
1229         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1230         (make_cleanup_delete_breakpoint): Remove.
1231         (struct breakpoint_deleter): New.
1232         (breakpoint_up): New typedef.
1233         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1234         (insert_exception_resume_breakpoint): Update.
1235         (insert_exception_resume_from_probe): Update.
1236         (insert_longjmp_resume_breakpoint): Update.
1237         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1238         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1239         * infcall.c (call_function_by_hand_dummy): Update
1240
1241 2017-11-04  Tom Tromey  <tom@tromey.com>
1242
1243         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1244
1245 2017-11-04  Tom Tromey  <tom@tromey.com>
1246
1247         * linux-tdep.c (linux_core_info_proc_mappings): Use
1248         gdb::def_vector.
1249         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
1250         "size" argument.
1251         (linux_corefile_thread): Update.
1252         (linux_make_corefile_notes): Remove unused variable.
1253
1254 2017-11-04  Tom Tromey  <tom@tromey.com>
1255
1256         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1257         gdb::byte_vector.
1258
1259 2017-11-04  Tom Tromey  <tom@tromey.com>
1260
1261         * objfiles.c (do_free_objfile_cleanup): Remove.
1262         * compile/compile-object-load.c (compile_object_load): Update.
1263         * objfiles.h (make_cleanup_free_objfile): Remove.
1264
1265 2017-11-04  Tom Tromey  <tom@tromey.com>
1266
1267         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1268         (adi_read_versions): Change "tags" to "gdb_byte *".
1269         (adi_print_versions): Likewise.
1270
1271 2017-11-04  Tom Tromey  <tom@tromey.com>
1272
1273         * breakpoint.c
1274         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1275         from start_rbreak_breakpoints.
1276         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1277         * breakpoint.h (class scoped_rbreak_breakpoints): New.
1278         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1279         * symtab.c (do_end_rbreak_breakpoints): Remove.
1280         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1281
1282 2017-11-04  Tom Tromey  <tom@tromey.com>
1283
1284         * cp-namespace.c (reset_directive_searched): Remove.
1285         (cp_lookup_symbol_via_imports): Use scoped_restore.
1286         * cp-support.c (reset_directive_searched): Remove.
1287         (make_symbol_overload_list_using): Use scoped_restore.
1288         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1289         (reset_directive_searched): Remove.
1290
1291 2017-11-04  Tom Tromey  <tom@tromey.com>
1292
1293         * symfile.c (find_separate_debug_file_by_debuglink): Use
1294         unique_xmalloc_ptr.
1295
1296 2017-11-04  Tom Tromey  <tom@tromey.com>
1297
1298         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1299         type of "info".
1300         (compute_stack_depth): Likewise.
1301         (do_compile_dwarf_expr_to_c): Use std::vector.
1302
1303 2017-11-04  Tom Tromey  <tom@tromey.com>
1304
1305         * compile/compile-object-load.c (link_callbacks_einfo): Use
1306         std::string.
1307
1308 2017-11-04  Tom Tromey  <tom@tromey.com>
1309
1310         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1311         Use scoped_free_pendings.
1312         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1313         scoped_free_pendings.
1314         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1315         (xcoff_initial_scan): Likewise.
1316         * buildsym.c (reset_symtab_globals): Update comment.
1317         (scoped_free_pendings): Rename from really_free_pendings.
1318         (prepare_for_building): Update comment.
1319         (buildsym_init): Likewise.
1320         * buildsym.h (class scoped_free_pendings): New class.
1321         (really_free_pendings): Don't declare.
1322
1323 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
1324
1325         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1326         output when converting a zero value to a special byteorder format.
1327
1328 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1329
1330         * frame.c (do_frame_register_read): Remove aspace.
1331         * jit.c (jit_frame_sniffer): Likwise.
1332         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1333         * regcache.c (regcache::regcache): Pass nullptr.
1334         (regcache_print): Caller updated.
1335         * regcache.h (regcache::regcache): Remove one constructor
1336         parameter aspace.
1337
1338 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1339
1340         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1341
1342 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1343
1344         * breakpoint.c (insert_single_step_breakpoints): Update.
1345         * frame.c (struct frame_info) <aspace>: Add const.
1346         (frame_save_as_regcache): Add const.
1347         (get_frame_address_space): Return const address_space *.
1348         * frame.h (get_frame_address_space): Update declaration.
1349         * infrun.c (struct step_over_info) <aspace>: Add const.
1350         (set_step_over_info): Make aspace const.
1351         (displaced_step_prepare_throw): Change variable const.
1352         (resume): Likewise.
1353         (proceed): Likewise.
1354         (adjust_pc_after_break): Likewise.
1355         (save_waitstatus): Likewise.
1356         (handle_signal_stop): Likewise.
1357         (keep_going_pass_signal): Likewise.
1358         * jit.c (jit_frame_sniffer): Add const.
1359         * mips-tdep.c (mips_single_step_through_delay): Likewise.
1360         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1361         * record-full.c (record_full_wait_1): Likewise.
1362         * regcache.c (regcache::regcache): Change parameter to const.
1363         * regcache.h (regcache::regcache): Likewise.
1364         (regcache::aspace): Return const address_space *.
1365         (regcache) <m_aspace>: Add const.
1366
1367 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1368
1369         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1370         * frame.c (create_sentinel_frame): Likewise.
1371         * infrun.c (displaced_step_prepare_throw): Likewise.
1372         (resume): Likewise.
1373         (thread_still_needs_step_over_bp): Likewise.
1374         (proceed): Likewise.
1375         (do_target_wait): Likewise.
1376         (adjust_pc_after_break): Likewise.
1377         (handle_syscall_event): Likewise.
1378         (save_waitstatus): Likewise.
1379         (handle_inferior_event_1): Likewise.
1380         (handle_signal_stop): Likewise.
1381         (keep_going_pass_signal): Likewise.
1382         * linux-nat.c (status_callback): Likewise.
1383         (save_stop_reason): Likewise.
1384         (resume_stopped_resumed_lwps): Likewise.
1385         * record-full.c (record_full_exec_insn): Likewise.
1386         (record_full_wait_1): Likewise.
1387         * regcache.c (get_regcache_aspace): Remove.
1388         * regcache.h (get_regcache_aspace): Remove.
1389
1390 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1391
1392         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1393         (init_regcache_descr): Use gdbarch_num_regs.
1394         (regcache::regcache): Likewise.
1395         (regcache::get_register_status): Likewise.
1396         (regcache::assert_raw_regnum): Likewise.
1397         (regcache::cooked_read): Likewise.
1398         (regcache::cooked_read_value): Likewise.
1399         (regcache::cooked_write): Likewise.
1400         (regcache::dump): Likewise.
1401         (regcache::num_raw_registers): New method.
1402         * regcache.h (class regcache) <num_raw_registers>: New.
1403
1404 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1405
1406         * regcache.c (regcache::assert_regnum): New method.
1407         (regcache::invalidate): Call assert_regnum.
1408         (regcache::raw_update): Likewise.
1409         (regcache::raw_write): Likewise.
1410         (regcache::raw_read_part): Likewise.
1411         (regcache::raw_write_part): Likewise.
1412         (regcache::raw_supply): Likewise.
1413         (regcache::raw_supply_integer): Likewise.
1414         (regcache::raw_supply_zeroed): Likewise.
1415         (regcache::raw_collect): Likewise.
1416         (regcache::raw_collect_integer): Likewise.
1417         * regcache.h (regcache::assert_regnum): Declare.
1418
1419 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1420
1421         * regcache.c (regcache::dump): Remove code.
1422
1423 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1424
1425         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1426         Remove.
1427         <sizeof_cooked_register_status>: Remove.
1428         (init_regcache_descr): Update.
1429         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1430         (regcache::save): Likewise.
1431         (regcache::dump): Likewise.
1432
1433 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
1434
1435         * ft32-tdep.c (ft32_fetch_instruction): New function.
1436         (ft32_analyze_prologue): Use ft32_fetch_instruction().
1437
1438 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
1439
1440         * cli/cli-script.c (execute_control_command): Rename to ...
1441         (execute_control_command_1): ... this.
1442         (execute_control_command): New function.
1443
1444 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
1445
1446         * tracepoint.c (tfind_command): Remove const_cast.
1447
1448 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
1449
1450         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1451
1452 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
1453
1454         * common/common-utils.h (in_inclusive_range): New function.
1455         * arm-tdep.c (arm_record_extension_space): Use
1456         in_inclusive_range.
1457         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1458         * cris-tdep.c (cris_spec_reg_applicable): Use
1459         in_inclusive_range.
1460
1461 2017-10-30  Pedro Alves  <palves@redhat.com>
1462             Simon Marchi <simon.marchi@ericsson.com>
1463
1464         * remote.c (remote_set_syscall_catchpoint): Build a std::string
1465         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1466
1467 2017-10-30  Pedro Alves  <palves@redhat.com>
1468
1469         * common/common-utils.c (string_appendf, string_vappendf): New
1470         functions.
1471         * common/common-utils.h (string_appendf, string_vappendf): New
1472         declarations.
1473         * unittests/common-utils-selftests.c (string_appendf_func)
1474         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1475         (string_vappendf_tests): New functions.
1476         (_initialize_common_utils_selftests): Register "string_appendf" and
1477         "string_vappendf tests".
1478
1479 2017-10-30  Pedro Alves  <palves@redhat.com>
1480
1481         * unittests/common-utils-selftests.c (format_func): New typedef.
1482         (string_printf_tests, string_vprintf_tests): Tests factored out
1483         and merged to ...
1484         (test_format_func): ... this new function.
1485         (string_printf_tests, string_vprintf_tests): Reimplement on top of
1486         test_format_func.
1487
1488 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1489
1490         * darwin-nat.c: Remove include of gdb.h.
1491
1492 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1493
1494         * xtensa-xtregs.c: Fix formatting issues.
1495
1496 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1497
1498         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1499
1500 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
1501
1502         PR python/21213
1503         * python/py-infthread.c (thpy_get_inferior): Increment reference
1504         of inferior before returning it.
1505
1506 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1507
1508         * unittests/common-utils-selftests.c (format): Add
1509         ATTRIBUTE_PRINTF.
1510
1511 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1512
1513         * xml-syscall.c (struct syscall_desc): Add constructor.
1514         <name>: Change type to std::string.
1515         (syscall_desc_up): New typedef.
1516         (syscall_desc_p): Remove typeder.
1517         (DEF_VEC_P(syscall_desc_p)): Remove.
1518         (struct syscall_group_desc): Add constructor.
1519         <name>: Change type to std::string.
1520         <syscalls>: Change type to std::vector.
1521         (syscall_group_desc_up): New typedef.
1522         (syscall_group_desc_p): Remove typedef.
1523         (DEF_VEC_P(syscall_group_desc_p)): Remove.
1524         (struct syscalls_info) <syscalls>: Change type to std::vector of
1525         unique_ptr.
1526         <groups>: Likewise.
1527         <my_gdb_datadir>: Change type to std::string.
1528         (syscalls_info_up): New typedef.
1529         (allocate_syscalls_info): Remove.
1530         (syscalls_info_free_syscalls_desc): Remove.
1531         (syscalls_info_free_syscall_group_desc): Remove.
1532         (free_syscalls_info): Remove.
1533         (make_cleanup_free_syscalls_info): Remove.
1534         (syscall_group_create_syscall_group_desc): Adjust.
1535         (syscall_group_add_syscall): Adjust.
1536         (syscall_create_syscall_desc): Adjust.
1537         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1538         (init_syscalls_info): Adjust.
1539         (syscall_group_get_group_by_name): Adjust.
1540         (xml_get_syscall_number): Adjust.
1541         (xml_get_syscall_name): Adjust.
1542         (xml_list_of_syscalls): Adjust.
1543         (xml_list_syscalls_by_group): Adjust.
1544         (xml_list_of_groups): Adjust.
1545
1546 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1547
1548         * probe.h: Don't include gdb_vecs.h.
1549         (DEF_VEC_P (probe_p)): Remove.
1550         (find_probes_in_objfile): Return an std::vector.
1551         * probe.c (find_probes_in_objfile): Likewise.
1552         * breakpoint.c (breakpoint_objfile_data)
1553         <longjmp_probes>: Change type to std::vector.
1554         <exception_probes>: Likewise.
1555         (free_breakpoint_probes): Don't manually free vectors.
1556         (create_longjmp_master_breakpoint): Adjust.
1557         (create_exception_master_breakpoint): Adjust.
1558         * solib-svr4.c (svr4_create_probe_breakpoints): Change
1559         parameter type, adjust.
1560         (svr4_create_solib_event_breakpoints): Adjust.
1561
1562 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1563
1564         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1565         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1566         with new.
1567         (free_breakpoint_probes): Rename to ...
1568         (free_breakpoint_objfile_data): ... this, and call delete on
1569         bp_objfile_data..
1570
1571 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1572
1573         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1574         (loaded_script_ptr): Remove typedef.
1575         (DEF_VEC_P (loaded_script_ptr)): Remove.
1576         (struct collect_matching_scripts_data): Add constructor.
1577         <scripts_p>: Change type to (pointer to) std::vector.
1578         (collect_matching_scripts_data): Adjust.
1579         (sort_scripts_by_name): Make suitable for std::sort.
1580         (print_scripts): Don't sort vector, adjust to std::vector.
1581         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1582
1583 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1584
1585         * symfile.c (filename_language): Make struct, not typedef.  Add
1586         constructor.
1587         <ext>: Change type to std::string.
1588         (DEF_VEC_O (filename_language)): Remove.
1589         (filename_language_table): Change type to std::vector.
1590         (add_filename_language): Adjust.
1591         (set_ext_lang_command): Adjust.
1592         (info_ext_lang_command): Adjust.
1593         (deduce_language_from_filename): Adjust.
1594         (class scoped_restore_filename_language_table): Remove.
1595         (test_filename_language): Use scoped_restore.
1596         (test_set_ext_lang_command): Use scoped_restore, adjust to
1597         std::vector change.
1598
1599 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1600
1601         * symfile.c: Include selftest.h.
1602         (class scoped_restore_filename_language_table): New.
1603         (test_filename_language): New test.
1604         (test_set_ext_lang_command): New test.
1605         (_initialize_symfile): Register tests.
1606
1607 2017-10-27  Keith Seitz  <keiths@redhat.com>
1608
1609         * breakpoint.c (print_breakpoint_location): Use the symbol saved
1610         in the bp_location, falling back to find_pc_sect_function when
1611         needed.
1612         (add_location_to_breakpoint): Save sal->symbol.
1613         * breakpoint.h (struct bp_location) <symbol>: New field.
1614         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1615         * symtab.h (struct symtab_and_line) <symbol>: New field.
1616
1617 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
1618
1619         PR gdb/13669
1620         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1621         to rewind obstack.
1622
1623 2017-10-26  Pedro Alves  <palves@redhat.com>
1624
1625         * remote.c (remote_async_terminal_ours_p): Delete.
1626         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1627         Remove references to 'remote_async_terminal_ours_p'.
1628
1629 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1630
1631         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1632
1633 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1634
1635         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1636         aspace const.
1637         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1638         Likewise.
1639         * breakpoint.c (bpstat_check_location): Remove cast.
1640         (breakpoint_hit_catch_fork): Make aspce const.
1641         (breakpoint_hit_catch_solib): Likewise.
1642         (breakpoint_hit_catch_exec): Likewise.
1643         (breakpoint_hit_ranged_breakpoint): Likewise.
1644         (breakpoint_hit_watchpoint): Likewise.
1645         (base_breakpoint_breakpoint_hit): Likewise.
1646         (bkpt_breakpoint_hit): Likewise.
1647         (dprintf_breakpoint_hit): Likewise.
1648         (tracepoint_breakpoint_hit): Likewise.
1649         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1650
1651 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1652
1653         * breakpoint.c (breakpoint_location_address_match): Change
1654         "struct address_space *" to "const address_space".
1655         (breakpoint_location_address_range_overlap): Likewise.
1656         (breakpoint_here_p): Likewise.
1657         (breakpoint_in_range_p): Likewise.
1658         (moribund_breakpoint_here_p): Likewise.
1659         (bp_location_inserted_here_p): Likewise.
1660         (software_breakpoint_inserted_here_p): Likewise.
1661         (hardware_breakpoint_inserted_here_p): Likewise.
1662         (hardware_watchpoint_inserted_in_range): Likewise.
1663         (bpstat_check_location): Likewise.
1664         (bpstat_stop_status): Likewise.
1665         (breakpoint_address_match): Likewise.
1666         (breakpoint_address_match_range): Likewise.
1667         (breakpoint_location_address_match): Likewise.
1668         (breakpoint_location_address_range_overlap): Likewise.
1669         (insert_single_step_breakpoint): Likewise.
1670         (breakpoint_has_location_inserted_here): Likewise.
1671         (single_step_breakpoint_inserted_here_p): Likewise.
1672         (pc_at_non_inline_function): Likewise.
1673         * breakpoint.h (bpstat_stop_status): Update declaration.
1674         (breakpoint_here_p): Likewise.
1675         (breakpoint_in_range_p): Likewise.
1676         (moribund_breakpoint_here_p): Likewise.
1677         (breakpoint_inserted_here_p): Likewise.
1678         (software_breakpoint_inserted_here_p): Likewise.
1679         (hardware_breakpoint_inserted_here_p): Likewise.
1680         (breakpoint_has_location_inserted_here): Likewise.
1681         (single_step_breakpoint_inserted_here_p): Likewise.
1682         (hardware_watchpoint_inserted_in_range): Likewise.
1683         (breakpoint_address_match): Likewise.
1684         (insert_single_step_breakpoint): Likewise.
1685         (pc_at_non_inline_function): Likewise.
1686         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1687         * record.c (record_check_stopped_by_breakpoint): Likewise.
1688         * record.h (record_check_stopped_by_breakpoint): Likewise.
1689         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1690
1691 2017-10-25  Yao Qi  <yao.qi@linaro.org>
1692
1693         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1694         regcache->arch () instead get_regcache_arch.
1695         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1696         Likewise.
1697         (aarch64_fbsd_store_inferior_registers): Likewise.
1698         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1699         (store_gregs_to_thread): Likewise.
1700         (fetch_fpregs_from_thread): Likewise.
1701         (store_fpregs_to_thread): Likewise.
1702         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1703         (aarch64_store_return_value): Likewise.
1704         (aarch64_software_single_step): Likewise.
1705         * aix-thread.c (aix_thread_wait): Likewise.
1706         (supply_reg32): Likewise.
1707         (supply_sprs64): Likewise.
1708         (supply_sprs32): Likewise.
1709         (fill_gprs64): Likewise.
1710         (fill_gprs32): Likewise.
1711         (fill_sprs64): Likewise.
1712         (fill_sprs32): Likewise.
1713         (store_regs_user_thread): Likewise.
1714         (store_regs_kernel_thread): Likewise.
1715         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1716         (alphabsd_store_inferior_registers): Likewise.
1717         * alpha-tdep.c (alpha_extract_return_value): Likewise.
1718         (alpha_store_return_value): Likewise.
1719         (alpha_deal_with_atomic_sequence): Likewise.
1720         (alpha_next_pc): Likewise.
1721         (alpha_software_single_step): Likewise.
1722         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1723         (amd64bsd_store_inferior_registers): Likewise.
1724         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1725         Likewise.
1726         (amd64_linux_store_inferior_registers): Likewise.
1727         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1728         (amd64_collect_native_gregset): Likewise.
1729         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1730         (amd64obsd_collect_uthread): Likewise.
1731         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1732         (amd64_collect_fpregset): Likewise.
1733         (amd64_supply_fxsave): Likewise.
1734         (amd64_supply_xsave): Likewise.
1735         (amd64_collect_fxsave): Likewise.
1736         (amd64_collect_xsave): Likewise.
1737         * arc-tdep.c (arc_write_pc): Likewise.
1738         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1739         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1740         (arm_fbsd_store_inferior_registers): Likewise.
1741         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1742         (store_vfp_regs): Likewise.
1743         (arm_linux_fetch_inferior_registers): Likewise.
1744         (arm_linux_store_inferior_registers): Likewise.
1745         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1746         (arm_linux_sigreturn_next_pc): Likewise.
1747         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1748         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1749         (fetch_register): Likewise.
1750         (store_register): Likewise.
1751         * arm-tdep.c (arm_is_thumb): Likewise.
1752         (displaced_in_arm_mode): Likewise.
1753         (bx_write_pc): Likewise.
1754         (arm_get_next_pcs_addr_bits_remove): Likewise.
1755         (arm_software_single_step): Likewise.
1756         (arm_extract_return_value): Likewise.
1757         (arm_store_return_value): Likewise.
1758         (arm_write_pc): Likewise.
1759         * bfin-tdep.c (bfin_extract_return_value): Likewise.
1760         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
1761         (bsd_uthread_store_registers): Likewise.
1762         * core-regset.c (fetch_core_registers): Likewise.
1763         * corelow.c (get_core_registers): Likewise.
1764         * cris-tdep.c (cris_store_return_value): Likewise.
1765         (cris_extract_return_value): Likewise.
1766         (find_step_target): Likewise.
1767         (find_step_target): Likewise.
1768         (cris_software_single_step): Likewise.
1769         * ctf.c (ctf_fetch_registers): Likewise.
1770         * darwin-nat.c (cancel_breakpoint): Likewise.
1771         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
1772         * frv-tdep.c (frv_extract_return_value): Likewise.
1773         * ft32-tdep.c (ft32_store_return_value): Likewise.
1774         (ft32_extract_return_value): Likewise.
1775         * go32-nat.c (fetch_register): Likewise.
1776         (go32_fetch_registers): Likewise.
1777         (go32_store_registers): Likewise.
1778         (store_register): Likewise.
1779         * h8300-tdep.c (h8300_extract_return_value): Likewise.
1780         (h8300_store_return_value): Likewise.
1781         * hppa-linux-nat.c (fetch_register): Likewise.
1782         (store_register): Likewise.
1783         (hppa_linux_fetch_inferior_registers): Likewise.
1784         (hppa_linux_store_inferior_registers): Likewise.
1785         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
1786         (i386_darwin_store_inferior_registers): Likewise.
1787         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
1788         (gnu_store_registers): Likewise.
1789         * i386-linux-nat.c (fetch_register): Likewise.
1790         (store_register): Likewise.
1791         (supply_gregset): Likewise.
1792         (fill_gregset): Likewise.
1793         (i386_linux_fetch_inferior_registers): Likewise.
1794         (i386_linux_store_inferior_registers): Likewise.
1795         (i386_linux_resume): Likewise.
1796         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
1797         Likewise.
1798         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
1799         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
1800         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
1801         (i386obsd_collect_uthread): Likewise.
1802         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1803         (i386_supply_gregset): Likewise.
1804         (i386_collect_gregset): Likewise.
1805         (i386_supply_fpregset): Likewise.
1806         (i386_collect_fpregset): Likewise.
1807         (i386_mpx_bd_base): Likewise.
1808         * i386-v4-nat.c (supply_fpregset): Likewise.
1809         (fill_fpregset): Likewise.
1810         * i387-tdep.c (i387_supply_fsave): Likewise.
1811         (i387_collect_fsave): Likewise.
1812         (i387_supply_fxsave): Likewise.
1813         (i387_collect_fxsave): Likewise.
1814         (i387_supply_xsave): Likewise.
1815         (i387_collect_xsave): Likewise.
1816         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
1817         (ia64_linux_store_registers): Likewise.
1818         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
1819         (ia64_extract_return_value): Likewise.
1820         (ia64_store_return_value): Likewise.
1821         (find_func_descr): Likewise.
1822         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
1823         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
1824         (inf_ptrace_store_registers): Likewise.
1825         * infrun.c (use_displaced_stepping): Likewise.
1826         (displaced_step_prepare_throw): Likewise.
1827         (resume): Likewise.
1828         (proceed): Likewise.
1829         (do_target_wait): Likewise.
1830         (adjust_pc_after_break): Likewise.
1831         (handle_inferior_event_1): Likewise.
1832         (handle_signal_stop): Likewise.
1833         (save_infcall_suspend_state): Likewise.
1834         (restore_infcall_suspend_state): Likewise.
1835         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
1836         * jit.c (jit_frame_prev_register): Likewise.
1837         * linux-nat.c (save_stop_reason): Likewise.
1838         (linux_nat_wait_1): Likewise.
1839         (resume_stopped_resumed_lwps): Likewise.
1840         * linux-record.c (record_linux_sockaddr): Likewise.
1841         (record_linux_msghdr): Likewise.
1842         (record_linux_system_call): Likewise.
1843         * linux-tdep.c (linux_collect_thread_registers): Likewise.
1844         * lm32-tdep.c (lm32_extract_return_value): Likewise.
1845         (lm32_store_return_value): Likewise.
1846         * m32c-tdep.c (m32c_read_flg): Likewise.
1847         (m32c_pseudo_register_read): Likewise.
1848         (m32c_pseudo_register_write): Likewise.
1849         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
1850         (m32r_linux_collect_gregset): Likewise.
1851         * m32r-tdep.c (m32r_store_return_value): Likewise.
1852         (m32r_extract_return_value): Likewise.
1853         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1854         (m68kbsd_collect_fpregset): Likewise.
1855         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
1856         * m68k-linux-nat.c (fetch_register): Likewise.
1857         (old_fetch_inferior_registers): Likewise.
1858         (old_store_inferior_registers): Likewise.
1859         (store_regs): Likewise.
1860         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
1861         (m68k_svr4_store_return_value): Likewise.
1862         * m88k-tdep.c (m88k_store_arguments): Likewise.
1863         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
1864         (mi_cmd_data_write_register_values): Likewise.
1865         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
1866         (mips_fbsd_store_inferior_registers): Likewise.
1867         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
1868         (mips_fbsd_supply_gregs): Likewise.
1869         (mips_fbsd_collect_fpregs): Likewise.
1870         (mips_fbsd_collect_gregs): Likewise.
1871         (mips_fbsd_supply_fpregset): Likewise.
1872         (mips_fbsd_collect_fpregset): Likewise.
1873         (mips_fbsd_supply_gregset): Likewise.
1874         (mips_fbsd_collect_gregset): Likewise.
1875         * mips-linux-nat.c (supply_gregset): Likewise.
1876         (fill_gregset): Likewise.
1877         (supply_fpregset): Likewise.
1878         (fill_fpregset): Likewise.
1879         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
1880         (mips_fill_gregset): Likewise.
1881         (mips_supply_fpregset): Likewise.
1882         (mips_fill_fpregset): Likewise.
1883         (mips64_supply_gregset): Likewise.
1884         (micromips_linux_sigframe_validate): Likewise.
1885         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
1886         (mipsnbsd_fetch_inferior_registers): Likewise.
1887         (mipsnbsd_store_inferior_registers): Likewise.
1888         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1889         (mipsnbsd_supply_gregset): Likewise.
1890         (mipsnbsd_iterate_over_regset_sections): Likewise.
1891         (mipsnbsd_supply_reg): Likewise.
1892         (mipsnbsd_supply_fpreg): Likewise.
1893         * mips-tdep.c (mips_in_frame_stub): Likewise.
1894         (mips_dummy_id): Likewise.
1895         (is_octeon_bbit_op): Likewise.
1896         (micromips_bc1_pc): Likewise.
1897         (extended_mips16_next_pc): Likewise.
1898         (mips16_next_pc): Likewise.
1899         (deal_with_atomic_sequence): Likewise.
1900         * moxie-tdep.c (moxie_process_readu): Likewise.
1901         * nios2-tdep.c (nios2_get_next_pc): Likewise.
1902         * nto-procfs.c (procfs_store_registers): Likewise.
1903         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
1904         (ppcfbsd_store_inferior_registers): Likewise.
1905         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
1906         (fetch_altivec_register): Likewise.
1907         (get_spe_registers): Likewise.
1908         (fetch_spe_register): Likewise.
1909         (fetch_altivec_registers): Likewise.
1910         (fetch_all_gp_regs): Likewise.
1911         (fetch_all_fp_regs): Likewise.
1912         (store_vsx_register): Likewise.
1913         (store_altivec_register): Likewise.
1914         (set_spe_registers): Likewise.
1915         (store_spe_register): Likewise.
1916         (store_altivec_registers): Likewise.
1917         (store_all_gp_regs): Likewise.
1918         (store_all_fp_regs): Likewise.
1919         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
1920         (ppc_linux_collect_gregset): Likewise.
1921         (ppc_canonicalize_syscall): Likewise.
1922         (ppc_linux_record_signal): Likewise.
1923         (ppu2spu_prev_register): Likewise.
1924         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
1925         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
1926         (ppcobsd_store_registers): Likewise.
1927         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
1928         Likewise.
1929         (ppc_ravenscar_generic_store_registers): Likewise.
1930         * procfs.c (procfs_fetch_registers): Likewise.
1931         (procfs_store_registers): Likewise.
1932         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
1933         (ravenscar_store_registers): Likewise.
1934         (ravenscar_prepare_to_store): Likewise.
1935         * record-btrace.c (record_btrace_fetch_registers): Likewise.
1936         * record-full.c (record_full_wait_1): Likewise.
1937         (record_full_registers_change): Likewise.
1938         (record_full_store_registers): Likewise.
1939         (record_full_core_fetch_registers): Likewise.
1940         (record_full_save): Likewise.
1941         (record_full_goto_insn): Likewise.
1942         * regcache.c (regcache_register_size): Likewise.
1943         (get_regcache_arch): Remove.
1944         (regcache_read_pc): Likewise.
1945         * regcache.h (get_regcache_arch): Remove.
1946         * remote-sim.c (gdbsim_fetch_register): Likewise.
1947         (gdbsim_store_register): Likewise.
1948         * remote.c (fetch_register_using_p): Likewise.
1949         (send_g_packet): Likewise.
1950         (remote_prepare_to_store): Likewise.
1951         (store_registers_using_G): Likewise.
1952         * reverse.c (save_bookmark_command): Likewise.
1953         (goto_bookmark_command): Likewise.
1954         * rs6000-aix-tdep.c (branch_dest): Likewise.
1955         * rs6000-nat.c (rs6000_ptrace64): Likewise.
1956         (fetch_register): Likewise.
1957         * rs6000-tdep.c (ppc_supply_reg): Likewise.
1958         (ppc_collect_reg): Likewise.
1959         (ppc_collect_gregset): Likewise.
1960         (ppc_collect_fpregset): Likewise.
1961         (ppc_collect_vsxregset): Likewise.
1962         (ppc_collect_vrregset): Likewise.
1963         (ppc_displaced_step_hw_singlestep): Likewise.
1964         (rs6000_pseudo_register_read): Likewise.
1965         (rs6000_pseudo_register_write): Likewise.
1966         * s390-linux-nat.c (supply_gregset): Likewise.
1967         (fill_gregset): Likewise.
1968         (s390_linux_fetch_inferior_registers): Likewise.
1969         * s390-linux-tdep.c (s390_write_pc): Likewise.
1970         (s390_software_single_step): Likewise.
1971         (s390_all_but_pc_registers_record): Likewise.
1972         (s390_linux_syscall_record): Likewise.
1973         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
1974         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
1975         (shnbsd_store_inferior_registers): Likewise.
1976         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
1977         (sh_extract_return_value_fpu): Likewise.
1978         (sh_store_return_value_nofpu): Likewise.
1979         (sh_corefile_supply_regset): Likewise.
1980         (sh_corefile_collect_regset): Likewise.
1981         * sh64-tdep.c (sh64_extract_return_value): Likewise.
1982         (sh64_store_return_value): Likewise.
1983         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
1984         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
1985         (sparc_store_inferior_registers): Likewise.
1986         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
1987         (sparc_ravenscar_prepare_to_store): Likewise.
1988         * sparc-tdep.c (sparc32_store_arguments): Likewise.
1989         (sparc_analyze_control_transfer): Likewise.
1990         (sparc_step_trap): Likewise.
1991         (sparc_software_single_step): Likewise.
1992         (sparc32_gdbarch_init): Likewise.
1993         (sparc_supply_rwindow): Likewise.
1994         (sparc_collect_rwindow): Likewise.
1995         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
1996         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
1997         (sparc64nbsd_collect_gregset): Likewise.
1998         (sparc64nbsd_supply_fpregset): Likewise.
1999         (sparc64nbsd_collect_fpregset): Likewise.
2000         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2001         (sparc64_supply_gregset): Likewise.
2002         (sparc64_collect_gregset): Likewise.
2003         (sparc64_supply_fpregset): Likewise.
2004         (sparc64_collect_fpregset): Likewise.
2005         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2006         * spu-tdep.c (spu_unwind_sp): Likewise.
2007         (spu2ppu_prev_register): Likewise.
2008         (spu_memory_remove_breakpoint): Likewise.
2009         * stack.c (return_command): Likewise.
2010         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2011         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2012         * tracefile.c (trace_save_ctf): Likewise.
2013         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2014         (do_windows_store_inferior_registers): Likewise.
2015         (windows_resume): Likewise.
2016         * xtensa-linux-nat.c (fill_gregset): Likewise.
2017         (supply_gregset_reg): Likewise.
2018         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2019         (xtensa_register_read_masked): Likewise.
2020         (xtensa_supply_gregset): Likewise.
2021         (xtensa_extract_return_value): Likewise.
2022         (xtensa_store_return_value): Likewise.
2023
2024 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
2025
2026         * doublest.c (floatformat_from_string): New function.
2027         * doublest.h (floatformat_from_string): Add prototype.
2028
2029         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2030         (OP_FLOAT): ... this.
2031         * expression.h: Do not include "doublest.h".
2032         (union exp_element): Replace doubleconst and decfloatconst by
2033         new element floatconst.
2034         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2035         (ada_evaluate_subexp): Likewise.
2036         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2037         OP_DOUBLE and OP_DECFLOAT.
2038         * expprint.c (print_subexp_standard): Likewise.
2039         (dump_subexp_body_standard): Likewise.
2040         * breakpoint.c (watchpoint_exp_is_const): Likewise.
2041
2042         * parse.c: Include "dfp.h".
2043         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2044         (write_exp_elt_floatcst): New function.
2045         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2046         and OP_DECFLOAT.
2047         (operator_check_standard): Likewise.
2048         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
2049         Return target format buffer instead of host DOUBLEST.
2050         Use floatformat_from_string and decimal_from_string to parse
2051         either binary or decimal floating-point types.
2052         (parse_c_float): Remove.
2053         * parser-defs.h: Do not include "doublest.h".
2054         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2055         (write_exp_elt_floatcst): Add prototype.
2056         (parse_float): Update prototype.
2057         (parse_c_float): Remove.
2058
2059         * c-exp.y: Do not include "dfp.h".
2060         (typed_val_float): Use byte buffer instead of DOUBLEST.
2061         (typed_val_decfloat): Remove.
2062         (DECFLOAT): Remove.
2063         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2064         (parse_number): Update to new parse_float interface.
2065         Parse suffixes and determine type before calling parse_float.
2066         Handle decimal and binary FP types the same way.
2067
2068         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2069         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2070         (parse_number): Update to new parse_float interface.
2071         Parse suffixes and determine type before calling parse_float.
2072
2073         * f-exp.y: Replace dval by typed_val_float.
2074         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2075         (parse_number): Use parse_float instead of atof.
2076
2077         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2078         (parse_go_float): Remove.
2079         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2080         (parse_number): Call parse_float instead of parse_go_float.
2081         Parse suffixes and determine type before calling parse_float.
2082
2083         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2084         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2085         (parse_number): Update to new parse_float interface.
2086         Parse suffixes and determine type before calling parse_float.
2087
2088         * m2-exp.y: Replace dval by byte buffer val.
2089         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2090         (parse_number): Call parse_float instead of atof.
2091
2092         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2093         (lex_number): Call parse_float instead of strtod.
2094         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2095         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2096         Use write_exp_elt_floatcst.
2097         (unit_testing): Remove static variable.
2098         (rust_type): Do not check unit_testing.
2099         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
2100
2101         * ada-exp.y (type_float, type_double): Remove.
2102         (typed_val_float): Use byte buffer instead of DOUBLEST.
2103         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2104         * ada-lex.l (processReal): Use parse_float instead of sscanf.
2105
2106 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
2107
2108         * aarch64-tdep.h (enum aarch64_regnum): Remove.
2109         * arch/aarch64.h: New file.
2110
2111 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2112
2113         * dfp.h (decimal_from_string): Use const reference for argument.
2114         * dfp.c (decimal_from_string): Likewise.
2115
2116 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2117
2118         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2119         * sh64-tdep.c (sh64_do_fp_register): Likewise.
2120         * mips-tdep.c (mips_print_fp_register): Likewise.
2121
2122 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2123
2124         * common/format.h (enum argclass): Replace decfloat_arg by
2125         dec32float_arg, dec64float_arg, and dec128float_arg.
2126         * common/format.c (parse_format_string): Update to return
2127         new decimal float argument classes.
2128
2129         * printcmd.c (printf_decfloat): Rename to ...
2130         (printf_floating): ... this.  Add argclass argument, and use it
2131         instead of parsing the format string again.  Add support for
2132         binary floating-point values, using floatformat_to_string.
2133         Convert value to the target format if it doesn't already match.
2134         (ui_printf): Call printf_floating instead of printf_decfloat,
2135         also for double_arg / long_double_arg.  Pass argclass.
2136
2137         * dfp.c (decimal_to_string): Add format string argument.
2138         * dfp.h (decimal_to_string): Likewise.
2139
2140         * doublest.c (floatformat_to_string): Add format string argument.
2141         * doublest.h (floatformat_to_string): Likewise.
2142
2143 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2144
2145         * doublest.c (floatformat_precision): New routine.
2146         (floatformat_to_string): Likewise.
2147         * doublest.c (floatformat_to_string): Add prototype.
2148
2149         * printcmd.c (print_scalar_formatted): Only call print_floating
2150         on floating-point types.
2151         * valprint.c: Do not include "floatformat.h".
2152         (generic_val_print_decfloat): Remove.
2153         (generic_val_print): Call generic_val_print_float for both
2154         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2155         (print_floating): Use floatformat_to_string.  Handle decimal float.
2156         (print_decimal_floating): Remove, merge into floatformat_to_string.
2157         * value.h (print_decimal_floating): Remove.
2158
2159         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2160
2161 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2162
2163         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2164
2165 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2166
2167         * memattr.h: Don't include vec.h.
2168         (struct mem_attrib): Initialize fields.
2169         <unknown>: New static method.
2170         (struct mem_region): Add constructors, operator<, initialize
2171         fields.
2172         * memattr.c: Include algorithm.
2173         (default_mem_attrib, unknown_mem_attrib): Remove.
2174         (user_mem_region_list): New global.
2175         (target_mem_region_list, mem_region_list): Change type to
2176         std::vector<mem_region>.
2177         (mem_use_target): Now a function.
2178         (target_mem_regions_valid): Change type to bool.
2179         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2180         (require_user_regions): Adjust.
2181         (require_target_regions): Adjust.
2182         (create_mem_region): Adjust.
2183         (lookup_mem_region): Adjust.
2184         (invalidate_target_mem_regions): Adjust.
2185         (mem_clear): Rename to...
2186         (user_mem_clear): ... this, and adjust.
2187         (mem_command): Adjust.
2188         (info_mem_command): Adjust.
2189         (mem_enable, enable_mem_command, mem_disable,
2190         disable_mem_command): Adjust.
2191         (mem_delete): Adjust.
2192         (delete_mem_command): Adjust.
2193         * memory-map.h (parse_memory_map): Return an std::vector.
2194         * memory-map.c (parse_memory_map): Likewise.
2195         (struct memory_map_parsing_data): Add constructor.
2196         <memory_map>: Point to std::vector.
2197         (memory_map_start_memory): Adjust.
2198         (memory_map_end_memory): Adjust.
2199         (memory_map_end_property): Adjust.
2200         (clear_result): Remove.
2201         * remote.c (remote_memory_map): Return an std::vector.
2202         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2203         Remove.
2204         (target_debug_print_mem_region_vector): New.
2205         * target-delegates.c: Regenerate.
2206         * target.h (mem_region_vector): New typedef.
2207         (to_memory_map): Return mem_region_vector.
2208         (target_memory_map): Return an std::vector.
2209         * target.c (target_memory_map): Return an std::vector.
2210         (flash_erase_command): Adjust.
2211
2212 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2213
2214         * memory-map.c (struct memory_map_parsing_data) <property_name>:
2215         Change type to std::string.
2216         (memory_map_start_property): Adjust.
2217         (memory_map_end_property): Adjust.
2218
2219 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2220
2221         * infrun.h: Include common/byte-vector.h.
2222         (struct displaced_step_closure): New struct.
2223         (struct buf_displaced_step_closure): New struct.
2224         * infrun.c (displaced_step_closure::~displaced_step_closure):
2225         Provide default implementation.
2226         (displaced_step_clear): Deallocate step closure with delete.
2227         * aarch64-tdep.c (displaced_step_closure): Rename to ...
2228         (aarch64_displaced_step_closure): ... this, extend
2229         displaced_step_closure.
2230         (aarch64_displaced_step_data) <dsc>: Change type to
2231         aarch64_displaced_step_closure.
2232         (aarch64_displaced_step_copy_insn): Adjust to type change, use
2233         unique_ptr.
2234         (aarch64_displaced_step_fixup): Add cast for displaced step
2235         closure.
2236         * amd64-tdep.c (displaced_step_closure): Rename to ...
2237         (amd64_displaced_step_closure): ... this, extend
2238         displaced_step_closure.
2239         <insn_buf>: Change type to std::vector<gdb_byte>.
2240         <max_len>: Remove.
2241         (fixup_riprel): Change type of DSC parameter, adjust to type
2242         change of insn_buf.
2243         (fixup_displaced_copy): Change type of DSC parameter.
2244         (amd64_displaced_step_copy_insn): Instantiate
2245         amd64_displaced_step_closure.
2246         (amd64_displaced_step_fixup): Add cast for closure type, adjust
2247         to type change of insn_buf.
2248         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2249         parameter DSC.
2250         (arm_linux_copy_svc): Likewise.
2251         (cleanup_kernel_helper_return): Likewise.
2252         (arm_catch_kernel_helper_return): Likewise.
2253         (arm_linux_displaced_step_copy_insn): Instantiate
2254         arm_displaced_step_closure.
2255         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2256         (displaced_read_reg): Change type of parameter DSC.
2257         (branch_write_pc): Likewise.
2258         (load_write_pc): Likewise.
2259         (alu_write_pc): Likewise.
2260         (displaced_write_reg): Likewise.
2261         (arm_copy_unmodified): Likewise.
2262         (thumb_copy_unmodified_32bit): Likewise.
2263         (thumb_copy_unmodified_16bit): Likewise.
2264         (cleanup_preload): Likewise.
2265         (install_preload): Likewise.
2266         (arm_copy_preload): Likewise.
2267         (thumb2_copy_preload): Likewise.
2268         (install_preload_reg): Likewise.
2269         (arm_copy_preload_reg): Likewise.
2270         (cleanup_copro_load_store): Likewise.
2271         (install_copro_load_store): Likewise.
2272         (arm_copy_copro_load_store) Likewise.
2273         (thumb2_copy_copro_load_store): Likewise.
2274         (cleanup_branch): Likewise.
2275         (install_b_bl_blx): Likewise.
2276         (arm_copy_b_bl_blx): Likewise.
2277         (thumb2_copy_b_bl_blx): Likewise.
2278         (thumb_copy_b): Likewise.
2279         (install_bx_blx_reg): Likewise.
2280         (arm_copy_bx_blx_reg): Likewise.
2281         (thumb_copy_bx_blx_reg): Likewise.
2282         (cleanup_alu_imm): Likewise.
2283         (arm_copy_alu_imm): Likewise.
2284         (thumb2_copy_alu_imm): Likewise.
2285         (cleanup_alu_reg): Likewise.
2286         (install_alu_reg): Likewise.
2287         (arm_copy_alu_reg): Likewise.
2288         (thumb_copy_alu_reg): Likewise.
2289         (cleanup_alu_shifted_reg): Likewise.
2290         (install_alu_shifted_reg): Likewise.
2291         (arm_copy_alu_shifted_reg): Likewise.
2292         (cleanup_load): Likewise.
2293         (cleanup_store): Likewise.
2294         (arm_copy_extra_ld_st): Likewise.
2295         (install_load_store): Likewise.
2296         (thumb2_copy_load_literal): Likewise.
2297         (thumb2_copy_load_reg_imm): Likewise.
2298         (arm_copy_ldr_str_ldrb_strb): Likewise.
2299         (cleanup_block_load_all): Likewise.
2300         (cleanup_block_store_pc): Likewise.
2301         (cleanup_block_load_pc): Likewise.
2302         (arm_copy_block_xfer): Likewise.
2303         (thumb2_copy_block_xfer): Likewise.
2304         (cleanup_svc): Likewise.
2305         (install_svc): Likewise.
2306         (arm_copy_svc): Likewise.
2307         (thumb_copy_svc): Likewise.
2308         (arm_copy_undef): Likewise.
2309         (thumb_32bit_copy_undef): Likewise.
2310         (arm_copy_unpred): Likewise.
2311         (arm_decode_misc_memhint_neon): Likewise.
2312         (arm_decode_unconditional): Likewise.
2313         (arm_decode_miscellaneous): Likewise.
2314         (arm_decode_dp_misc): Likewise.
2315         (arm_decode_ld_st_word_ubyte): Likewise.
2316         (arm_decode_media): Likewise.
2317         (arm_decode_b_bl_ldmstm): Likewise.
2318         (arm_decode_ext_reg_ld_st): Likewise.
2319         (thumb2_decode_dp_shift_reg): Likewise.
2320         (thumb2_decode_ext_reg_ld_st): Likewise.
2321         (arm_decode_svc_copro): Likewise.
2322         (thumb2_decode_svc_copro): Likewise.
2323         (install_pc_relative): Likewise.
2324         (thumb_copy_pc_relative_16bit): Likewise.
2325         (thumb_decode_pc_relative_16bit): Likewise.
2326         (thumb_copy_pc_relative_32bit): Likewise.
2327         (thumb_copy_16bit_ldr_literal): Likewise.
2328         (thumb_copy_cbnz_cbz): Likewise.
2329         (thumb2_copy_table_branch): Likewise.
2330         (cleanup_pop_pc_16bit_all): Likewise.
2331         (thumb_copy_pop_pc_16bit): Likewise.
2332         (thumb_process_displaced_16bit_insn): Likewise.
2333         (decode_thumb_32bit_ld_mem_hints): Likewise.
2334         (thumb_process_displaced_32bit_insn): Likewise.
2335         (thumb_process_displaced_insn): Likewise.
2336         (arm_process_displaced_insn): Likewise.
2337         (arm_displaced_init_closure): Likewise.
2338         (arm_displaced_step_fixup): Add cast for closure.
2339         * arm-tdep.h: Include infrun.h.
2340         (displaced_step_closure): Rename to ...
2341         (arm_displaced_step_closure): ... this, extend
2342         displaced_step_closure.
2343         <u::svc::copy_svc_os>: Change type of parameter DSC.
2344         <cleanup>: Likewise.
2345         (arm_process_displaced_insn): Likewise.
2346         (arm_displaced_init_closure): Likewise.
2347         (displaced_read_reg): Likewise.
2348         (displaced_write_reg): Likewise.
2349         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2350         Adjust.
2351         * i386-tdep.h: Include infrun.h.
2352         (i386_displaced_step_closure): New typedef.
2353         * i386-tdep.c (i386_displaced_step_copy_insn): Use
2354         i386_displaced_step_closure.
2355         (i386_displaced_step_fixup): Adjust.
2356         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2357         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2358         and unique_ptr.
2359         (ppc_displaced_step_fixup): Adjust.
2360         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2361         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2362         and unique_ptr.
2363         (s390_displaced_step_fixup): Adjust.
2364
2365 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2366
2367         * interps.h (interp_resume, interp_suspend, interp_set_temp):
2368         Remove declarations.
2369
2370 2017-10-20  Tom Tromey  <tom@tromey.com>
2371
2372         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2373         std::vector.
2374         (gdb_bfd_record_inclusion): Update.
2375         (bfdp): Remove typedef.
2376
2377 2017-10-20  Tom Tromey  <tom@tromey.com>
2378
2379         * gdb_bfd.c (gdb_bfd_ref): Use new.
2380         (struct gdb_bfd_data): Add constructor, destructor, and member
2381         initializers.
2382         (gdb_bfd_unref): Use delete.
2383
2384 2017-10-20  Tom Tromey  <tom@tromey.com>
2385
2386         * exec.c (exec_file_attach): Use new_bfd_ref.
2387         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2388         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2389         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2390         new_bfd_ref.
2391         * gdb_bfd.h (new_bfd_ref): New function.
2392
2393 2017-10-20  Pedro Alves  <palves@redhat.com>
2394
2395         * main.c (captured_command_loop): Add attribute noinline.
2396
2397 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
2398
2399         * interps.c (struct interp_factory): Add constructor.
2400         (interp_factory_p): Remove typedef.
2401         (DEF_VEC_P(interp_factory_p)): Remove.
2402         (interpreter_factories): Change type to std::vector.
2403         (interp_factory_register): Adjust.
2404         (interp_lookup): Adjust.
2405         (interpreter_completer): Adjust.
2406
2407 2017-10-19  Tom Tromey  <tom@tromey.com>
2408
2409         * break-catch-syscall.c (catch_syscall_completer): Use
2410         std::string, gdb::unique_xmalloc_ptr.
2411
2412 2017-10-19  Tom Tromey  <tom@tromey.com>
2413
2414         * infcall.c (call_function_by_hand_dummy): Use std::string.
2415
2416 2017-10-19  Tom Tromey  <tom@tromey.com>
2417
2418         * mi/mi-main.c (mi_cmd_execute): Update.
2419         * top.h (prepare_execute_command): Return scoped_value_mark.
2420         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2421         Add move constructor.
2422         * top.c (prepare_execute_command): Return scoped_value_mark.
2423         (execute_command): Update.
2424
2425 2017-10-19  Pedro Alves  <palves@redhat.com>
2426
2427         * xml-support.c (xml_fetch_content_from_file): Check fread's
2428         return.
2429
2430 2017-10-19  Pedro Alves  <palves@redhat.com>
2431
2432         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2433         async.
2434         (handle_error_fd): New function.
2435         (ser_base_async): Add/delete an event loop file handler for
2436         error_fd.
2437
2438 2017-10-19  Pedro Alves  <palves@redhat.com>
2439
2440         * xml-support.c (xml_fetch_content_from_file): Don't read in
2441         chunks.  Instead use fseek to determine the file's size, and read
2442         it in one go.
2443
2444 2017-11-18  Keith Seitz  <keiths@redhat.com>
2445
2446         * c-exp.y (oper): Canonicalize conversion operators of user-defined
2447         types.
2448         Add whitespace to front of type name.
2449
2450 2017-10-18  Keith Seitz  <keiths@redhat.com>
2451
2452         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2453         DW_AT_accessibility.
2454
2455 2017-10-18  Yao Qi  <yao.qi@linaro.org>
2456
2457         * features/tic6x-c62x-linux.c: Remove.
2458
2459 2017-10-17  Tom Tromey  <tom@tromey.com>
2460
2461         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2462         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2463         (do_mixed_source_and_assembly): Likewise.
2464
2465 2017-10-17  Tom Tromey  <tom@tromey.com>
2466
2467         * regcache.c (regcache::xfer_part): Remove assertion.
2468
2469 2017-10-17  Pedro Alves  <palves@redhat.com>
2470
2471         * xml-support.c (xml_fetch_content_from_file): Call
2472         unique_ptr::release() instead unique_ptr::get() when passing
2473         through xrealloc.
2474
2475 2017-10-17  Yao Qi  <yao.qi@linaro.org>
2476
2477         * regcache.c (regcache::xfer_part): Remove parameters read and
2478         write, add parameter is_raw.  All callers are updated.
2479
2480 2017-10-16  Keith Seitz  <keiths@redhat.com>
2481
2482         * c-typeprint.c (enum access_specifier): Moved here from
2483         c_type_print_base.
2484         (output_access_specifier): New function.
2485         (c_type_print_base): Consider typedefs when assessing
2486         whether access labels are needed.
2487         Use output_access_specifier as needed.
2488         Output access specifier for typedefs, if needed.
2489         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2490         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2491         fields.
2492         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2493         accessor macros.
2494
2495 2017-10-16  Tom Tromey  <tom@tromey.com>
2496
2497         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2498         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2499         * target.c (target_fileio_read_stralloc): Update.
2500         * sparc64-tdep.c (adi_is_addr_mapped): Update.
2501         * target.h (target_fileio_read_stralloc): Return
2502         unique_xmalloc_ptr.
2503
2504 2017-10-16  Tom Tromey  <tom@tromey.com>
2505
2506         * xml-syscall.c (xml_init_syscalls_info): Update.
2507         * xml-support.c (xinclude_start_include): Update.
2508         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2509         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2510         (xml_fetch_content_from_file): Likewise.
2511         * osdata.c (get_osdata): Update.
2512         * target.h (target_read_stralloc, target_get_osdata): Return
2513         unique_xmalloc_ptr.
2514         * solib-aix.c (solib_aix_get_library_list): Update.
2515         * solib-target.c (solib_target_current_sos): Update.
2516         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2517         * xml-tdesc.c (fetch_available_features_from_target): Update.
2518         (target_fetch_description_xml): Update.
2519         (file_read_description_xml): Update.
2520         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2521         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2522         (remote_pid_to_exec_file): Update.
2523         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2524         (target_get_osdata): Likewise.
2525
2526 2017-10-16  Tom Tromey  <tom@tromey.com>
2527
2528         * remote.c (remote_register_number_and_offset): Use std::vector.
2529         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2530         (putpkt_binary): Use gdb::def_vector.
2531         (compare_sections_command): Use gdb::byte_vector.
2532
2533 2017-10-16  Tom Tromey  <tom@tromey.com>
2534
2535         * ppc-linux-nat.c (hwdebug_insert_point): Use
2536         gdb::unique_xmalloc_ptr, XDUP.
2537
2538 2017-10-16  Tom Tromey  <tom@tromey.com>
2539
2540         * probe.c (parse_probes): Use std::string.
2541         (info_probes_for_ops, enable_probes_command)
2542         (disable_probes_command): Remove cleanups.
2543
2544 2017-10-16  Tom Tromey  <tom@tromey.com>
2545
2546         * buildsym.c (block_compar): Remove.
2547         (end_symtab_get_static_block): Use std::vector.
2548
2549 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
2550
2551         * memrange.h (struct mem_range): Define operator< and operator==.
2552         (mem_range_s): Remove.
2553         (DEF_VEC_O (mem_range_s)): Remove.
2554         (normalize_mem_ranges): Change parameter type to std::vector.
2555         * memrange.c (compare_mem_ranges): Remove.
2556         (normalize_mem_ranges): Change parameter type to std::vector,
2557         adjust to vector change.
2558         * exec.c (section_table_available_memory): Return vector, remove
2559         parameter.
2560         (section_table_read_available_memory): Adjust to std::vector
2561         change.
2562         * remote.c (remote_read_bytes): Adjust to std::vector
2563         change.
2564         * tracepoint.h (traceframe_available_memory): Change parameter
2565         type to std::vector.
2566         * tracepoint.c (traceframe_available_memory): Change parameter
2567         type to std::vector, adjust.
2568         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2569         std::vector change.
2570         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2571         unittests/memrange-selftests.c.
2572         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2573         * gdb/unittests/memrange-selftests.c: New file.
2574
2575 2017-10-16  Pedro Alves  <palves@redhat.com>
2576
2577         * elfread.c (probe_key_free): Rename range-for variable.
2578         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2579         (find_probe_by_pc, collect_probes): Rename range-for variable.
2580
2581 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2582
2583         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2584         * features/tic6x-c62x.c: Remove.
2585         * features/tic6x-c64x-linux.c: Remove.
2586         * features/tic6x-c64x.c: Remove.
2587         * features/tic6x-c64xp-linux.c: Remove.
2588         * features/tic6x-c64xp.c: Remove.
2589         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2590         initialize_tdesc_tic6x_*_linux functions.
2591         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2592         initialize_tdesc_tic6x_* functions.
2593
2594 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2595
2596         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2597         tic6x-c62x.
2598         * regformats/tic6x-c62x.dat: Remove.
2599         * regformats/tic6x-c64x.dat: Remove.
2600         * regformats/tic6x-c64xp.dat: Remove.
2601
2602 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2603
2604         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2605         (the !HAVE_LIBEXPAT version).
2606
2607 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2608
2609         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2610         const.
2611
2612 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2613
2614         * target.h: Include tracepoint.h.
2615         (enum trace_find_type): Move to tracepoint.h.
2616         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2617         * tracepoint.h: Don't include target.h
2618         (enum trace_find_type): Move from target.h.
2619         (parse_traceframe_info): Return a unique ptr.
2620         * tracepoint.c (current_traceframe_info): Change type to unique
2621         ptr.
2622         (free_traceframe_info): Remove.
2623         (clear_traceframe_info): Don't manually free
2624         current_traceframe_info.
2625         (free_result): Remove.
2626         (parse_traceframe_info): Return a unique ptr.
2627         (get_traceframe_info): Adjust to unique ptr.
2628         * ctf.c (ctf_traceframe_info): Return a unique ptr.
2629         * remote.c (remote_traceframe_info): Return a unique ptr.
2630         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2631         ptr.
2632         * target-debug.h (target_debug_print_traceframe_info_up): New
2633         macro.
2634         * target-delegates.c: Regenerate.
2635
2636 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2637
2638         * memrange.h (struct mem_range): Add constructors.
2639         * tracepoint.h (struct traceframe_info) <memory>: Change type to
2640         std::vector<mem_range>.
2641         * tracepoint.c (free_traceframe_info): Don't manually free
2642         vector.
2643         (traceframe_info_start_memory): Adjust to vector change.
2644         (traceframe_available_memory): Likewise.
2645         * tracefile-tfile.c (build_traceframe_info): Likewise.
2646         * ctf.c (ctf_traceframe_info): Likewise.
2647
2648 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2649
2650         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2651         std::vector<int>.
2652         * tracepoint.c (free_traceframe_info): Deallocate with delete.
2653         (traceframe_info_start_tvar): Adjust to vector change.
2654         (parse_traceframe_info): Allocate with new.
2655         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2656         vector change.
2657         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2658         change.
2659         tfile_traceframe_info): Allocate with new.
2660         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2661         change.
2662
2663 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2664
2665         * tracepoint.c (traceframe_info): Rename to...
2666         (current_traceframe_info): ...this.
2667         (clear_traceframe_info): Adjust.
2668         (get_traceframe_info): Adjust.
2669
2670 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2671
2672         * nat/linux-osdata.c: Include algorithm.
2673         (compare_processes): Remove.
2674         (struct pid_pgid_entry): New struct.
2675         (linux_xfer_osdata_processgroups): Use std::vector instead of
2676         XNEWVEC.
2677
2678 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2679
2680         * objfiles.h: Don't include symfile.h.
2681         (struct partial_symbol): Remove forward-declaration.
2682         (struct objfile) <global_psymbols, static_psymbols>: Change type
2683         to std::vector<partial_symbol *>.
2684         * objfiles.c (objfile::objfile): Don't memset those fields.
2685         (objfile::~objfile): Don't free those fields.
2686         * psympriv.h (struct psymbol_allocation_list): Remove
2687         forward-declaration.
2688         (add_psymbol_to_list): Change psymbol_allocation_list parameter
2689         to std::vector.
2690         (start_psymtab_common): Change parameters to std::vector.
2691         * psymtab.c: Include algorithm.
2692         (require_partial_symbols): Call shrink_to_fit.
2693         (find_pc_sect_psymbol): Adjust to vector change.
2694         (match_partial_symbol): Likewise.
2695         (lookup_partial_symbol): Likewise.
2696         (psym_relocate): Likewise.
2697         (dump_psymtab): Likewise.
2698         (recursively_search_psymtabs): Likewise.
2699         (compare_psymbols): Remove.
2700         (sort_pst_symbols): Adjust to vector change.
2701         (start_psymtab_common): Likewise.
2702         (end_psymtab_common): Likewise.
2703         (psymbol_bcache_full): De-constify return value.
2704         (add_psymbol_to_bcache): Likewise.
2705         (extend_psymbol_list): Remove.
2706         (append_psymbol_to_list): Adjust to vector change.
2707         (add_psymbol_to_list): Likewise.
2708         (init_psymbol_list): Likewise.
2709         (maintenance_info_psymtabs): Likewise.
2710         (maintenance_check_psymtabs): Likewise.
2711         * symfile.h (struct psymbol_allocation_list): Remove.
2712         * symfile.c (reread_symbols): Adjust to vector change.
2713         * dbxread.c (start_psymtab): Change type of parameters.
2714         (dbx_symfile_read): Adjust to vector change.
2715         (read_dbx_symtab): Likewise.
2716         (start_psymtab): Change type of parameters.
2717         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2718         (create_partial_symtab): Likewise.
2719         (add_partial_symbol): Likewise.
2720         (write_one_signatured_type): Likewise.
2721         (recursively_write_psymbols): Likewise.
2722         * mdebugread.c (parse_partial_symbols): Likewise.
2723         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2724         (scan_xcoff_symtab): Adjust to vector change.
2725         (xcoff_initial_scan): Likewise.
2726
2727 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
2728
2729         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2730
2731 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2732
2733         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2734         Remove s390x-*-expedite, add s390x-expedite.
2735
2736 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2737
2738         * features/s390-gs-linux64.c: Regenerated.
2739         * features/s390x-gs-linux64.c: Regenerated.
2740
2741 2017-10-13  Tom Tromey  <tom@tromey.com>
2742
2743         * compile/compile-object-run.c (do_module_cleanup): Use delete.
2744         * solib.c (update_solib_list, reload_shared_libraries_1): Use
2745         delete.
2746         * symfile.c (symbol_file_add_with_addrs): Use new.
2747         (symbol_file_add_separate): Update comment.
2748         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2749         * jit.c (jit_object_close_impl): Use new.
2750         (jit_unregister_code): Use delete.
2751         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2752         (~objfile): Rename from free_objfile.
2753         (free_objfile_separate_debug, do_free_objfile_cleanup)
2754         (free_all_objfiles, objfile_purge_solibs): Use delete.
2755         * objfiles.h (struct objfile): Add constructor and destructor.
2756         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
2757         (allocate_objfile, free_objfile): Don't declare.
2758         (struct objstats): Add initializers.
2759
2760 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2761
2762         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
2763         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
2764         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
2765         * gdbarch.h: Regenerate.
2766         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2767         Adjust comment.
2768         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
2769         (i386_displaced_step_fixup): Adjust comment.
2770         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
2771
2772 2017-10-12  Tom Tromey  <tom@tromey.com>
2773
2774         * prologue-value.h (pv_area::store_would_trash): Return bool.
2775         (pv_area::find_reg): Likewise.
2776         * prologue-value.c (pv_area::store_would_trash): Return bool.
2777         (pv_area::find_reg): Likewise.
2778
2779 2017-10-12  Tom Tromey  <tom@tromey.com>
2780
2781         * s390-linux-tdep.c (s390_store, s390_load)
2782         (s390_check_for_saved, s390_analyze_prologue): Update.
2783         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
2784         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
2785         * prologue-value.h (class pv_area): Move from prologue-value.c.
2786         Change names of members.  Add constructor, destructor, member
2787         functions.
2788         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
2789         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
2790         (pv_area_fetch, pv_area_scan): Don't declare.
2791         * prologue-value.c (struct pv_area::area_entry): Now member of
2792         pv_area.
2793         (struct pv_area): Move to prologue-value.h.
2794         (pv_area::pv_area): Rename from make_pv_area.
2795         (pv_area::~pv_area): Rename from free_pv_area.
2796         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
2797         (clear_entries, find_entry, overlaps, store_would_trash, store)
2798         (fetch, find_reg, scan): Now member of pv_area.
2799         Remove "area" argument.  Update.
2800         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
2801         Update.
2802         * mn10300-tdep.c (push_reg, check_for_saved)
2803         (mn10300_analyze_prologue): Update.
2804         * mep-tdep.c (is_arg_spill, check_for_saved)
2805         (mep_analyze_prologue): Update.
2806         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
2807         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
2808         (m32c_is_struct_return, m32c_analyze_prologue): Update.
2809         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
2810         Update.
2811         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
2812         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
2813
2814 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2815
2816         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
2817         * linux-nat.c (linux_nat_delete_thread): New variable.
2818         (lwp_free): Invoke linux_nat_delete_thread if set.
2819         (linux_nat_set_delete_thread): New function.
2820         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
2821         thread delete callback.
2822         * arm-linux-nat.c (arm_linux_delete_thread): New function.
2823         (_initialize_arm_linux_nat): Assign thread delete callback.
2824         * s390-linux-nat.c (s390_delete_thread): New function.
2825         (_initialize_s390_nat): Assign thread delete callback.
2826         * x86-linux-nat.c (x86_linux_add_target): Likewise.
2827         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
2828         function.
2829         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
2830         declaration.
2831         * nat/x86-linux.c (x86_linux_delete_thread): New function.
2832         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
2833
2834 2017-10-09  Tom Tromey  <tom@tromey.com>
2835
2836         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
2837         std::string.
2838         * tui/tui-layout.c (enum tui_status): Use std::string.
2839
2840 2017-10-11  Tom Tromey  <tom@tromey.com>
2841
2842         * gdbthread.h (thread_command): Constify.
2843         * inferior.h (detach_command): Constify.
2844         * top.h (set_history, show_history): Constify.
2845         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
2846         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
2847         * bsd-kvm.c (bsd_kvm_cmd): Constify.
2848         * printcmd.c (set_command): Constify.
2849         (non_const_set_command): New function.
2850         * dcache.c (set_dcache_command, show_dcache_command): Constify.
2851         * breakpoint.c (enable_command, disable_command, delete_command)
2852         (catch_command, tcatch_command, set_breakpoint_cmd)
2853         (show_breakpoint_cmd): Constify.
2854         * macrocmd.c (macro_command): Constify.
2855         * infcmd.c (unset_command, kill_command, detach_command)
2856         (info_proc_cmd): Constify.
2857         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
2858         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
2859         (info_auto_load_cmd): Constify.
2860         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
2861         (unset_tdesc_cmd): Constify.
2862         * ada-lang.c (set_ada_command, show_ada_command)
2863         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
2864         * guile/guile.c (set_guile_command, show_guile_command)
2865         (info_guile_command): Constify.
2866         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
2867         Constify.
2868         * skip.c (skip_command): Constify.
2869         * compile/compile.c (_initialize_compile): Constify.
2870         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
2871         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
2872         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
2873         (maint_btrace_pt_show_cmd): Constify.
2874         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
2875         Constify.
2876         * python/python.c (user_show_python, user_set_python): Constify.
2877         * mips-tdep.c (set_mips_command, show_mips_command)
2878         (set_mipsfpu_command): Constify.
2879         * record-btrace.c (cmd_record_btrace_start)
2880         (cmd_set_record_btrace, cmd_show_record_btrace)
2881         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
2882         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
2883         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
2884         Constify.
2885         * symfile.c (overlay_command): Constify.
2886         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2887         * cli/cli-logging.c (set_logging_command, show_logging_command):
2888         Constify.
2889         * cli/cli-dump.c (dump_command, append_command)
2890         (srec_dump_command, ihex_dump_command, verilog_dump_command)
2891         (tekhex_dump_command, binary_dump_command)
2892         (binary_append_command): Constify.
2893         * cli/cli-decode.c (struct cmd_list_element): Change type of
2894         "fun".
2895         * cli/cli-cmds.c (info_command, show_command, set_debug)
2896         (show_debug): Constify.
2897         (show_command): Add non-const overload.
2898         * top.c (set_history, show_history): Constify.
2899         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
2900         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
2901         * target.c (target_command): Constify.
2902         * sparc64-tdep.c (info_adi_command): Constify.
2903         * record-full.c (cmd_record_full_start): Constify.
2904         (set_record_full_command): Constify.  Fix typo.
2905         (show_record_full_command): Constify.
2906         * thread.c (thread_command, thread_apply_command): Constify.
2907         * memattr.c (dummy_cmd): Constify.
2908         * value.c (function_command): Constify.
2909         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
2910         * probe.c (info_probes_command): Constify.
2911         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
2912         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
2913         (show_thread_cmd, set_thread_default_cmd)
2914         (show_thread_default_cmd): Constify.
2915         (check_empty): Constify.
2916         * tracepoint.c (tfind_command): Constify.
2917         * cp-support.c (maint_cplus_command): Constify.
2918         * windows-tdep.c (info_w32_command): Constify.
2919         * record.c (cmd_record_start, set_record_command)
2920         (show_record_command, info_record_command, cmd_record_goto):
2921         Constify.
2922         * ravenscar-thread.c (set_ravenscar_command)
2923         (show_ravenscar_command): Constify.
2924         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
2925         Constify.
2926         (add_internal_problem_command): Remove casts.
2927         * arc-tdep.c (maintenance_print_arc_command): Constify.
2928         * valprint.c (set_print, show_print, set_print_raw)
2929         (show_print_raw): Constify.
2930         * maint.c (maintenance_command, maintenance_info_command)
2931         (maintenance_print_command, maintenance_set_cmd)
2932         (maintenance_show_cmd, set_per_command_cmd)
2933         (show_per_command_cmd, maintenance_check_command): Constify.
2934         * language.c (set_check, show_check): Constify.
2935         * typeprint.c (show_print_type, set_print_type): Constify.
2936         * go32-nat.c (go32_info_dos_command): Constify.
2937
2938 2017-10-11  Tom Tromey  <tom@tromey.com>
2939
2940         * breakpoint.c (prepare_re_set_context): Remove.
2941         (breakpoint_re_set_one): Update.  Don't use cleanups.
2942         (breakpoint_re_set): Use scoped_restore, std::string, and
2943         scoped_restore_current_language.
2944
2945 2017-10-11  Tom Tromey  <tom@tromey.com>
2946
2947         * breakpoint.c (commands_command_1): Use std::string.
2948         (cleanup_executing_breakpoints): Remove.
2949         (bpstat_do_actions_1): Use scoped_restore.
2950         (bpstat_check_watchpoint): Use std::string.
2951         (decode_static_tracepoint_spec): Likewise.
2952         (break_range_command): Likewise.
2953         (watch_command_1): Likewise.
2954         (compare_breakpoints): Change argument types.
2955         (clear_command): Use std::vector.
2956         (cleanup_executing_breakpoints): Remove.
2957         (update_global_location_list): Use unique_xmalloc_ptr.
2958         (strace_command): Remove unused declaration.
2959
2960 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2961
2962         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
2963         * NEWS: Mention new FreeBSD/arm native configuration.
2964         * configure.host: Add arm*-*-freebsd*.
2965         * configure.nat: Likewise.
2966         * arm-fbsd-nat.c: New file.
2967
2968 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2969
2970         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
2971         (ALLDEPFILES): Add arm-fbsd-tdep.c.
2972         * NEWS: Mention new FreeBSD/arm target.
2973         * configure.tgt: Add arm*-*-freebsd*.
2974         * arm-fbsd-tdep.c: New file.
2975         * arm-fbsd-tdep.h: New file.
2976
2977 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2978
2979         * linux-tdep.c (linux_make_corefile_notes): Remove call to
2980         `gdbarch_elfcore_write_linux_prpsinfo'.
2981         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
2982         method.
2983         (elf_internal_linux_prpsinfo): Remove declaration.
2984         * gdbarch.h: Regenerate.
2985         * gdbarch.c: Regenerate.
2986
2987 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2988
2989         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
2990         `set_gdbarch_elfcore_write_linux_prpsinfo'.
2991
2992 2017-10-11  Pedro Alves  <palves@redhat.com>
2993
2994         * breakpoint.c (reattach_breakpoints): Delete.
2995         * breakpoint.h (reattach_breakpoints): Delete.
2996
2997 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
2998
2999         * symfile.c (registered_sym_fns): Make struct, not typedef.
3000         (DEF_VEC_O (registered_sym_fns)): Remove.
3001         (symtab_fns): Change type to std::vector.
3002         (add_symtab_fns): Adjust.
3003         (find_sym_fns): Adjust.
3004
3005 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
3006
3007         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3008         * arc-tdep.h (arc_arch_is_em): New function.
3009         (arc_arch_is_hs): Likewise.
3010
3011 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
3012
3013         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3014         parentheses in the declaration.
3015         (macro_lookup_inclusion): Likewise.
3016         (macro_lookup_definition): Likewise.
3017         * p-lang.h (pascal_builtin_types): Likewise.
3018         * tui/tui-data.c (tui_win_list): Likewise.
3019         * tui/tui-data.h (tui_win_list): Likewise.
3020         * utils.h (make_cleanup_free_section_addr_info): Likewise.
3021
3022 2017-10-11  Mark Rages  <markrages@gmail.com>
3023
3024         * target-memory.c (block_boundaries): Fix for block address not
3025         aligned on block size.
3026
3027 2017-10-10  Pedro Alves <palves@redhat.com>
3028             Tom Tromey  <tom@tromey.com>
3029
3030         * breakpoint.c (struct captured_breakpoint_query_args)
3031         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3032         (print_breakpoint): New.
3033         * breakpoint.h (print_breakpoint): Declare.
3034         * common/common-exceptions.h (enum return_reason): Remove
3035         references to catch_exceptions.
3036         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3037         Delete.
3038         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3039         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3040         * gdb.h: Delete.
3041         * gdbthread.h (thread_select): Declare.
3042         * mi/mi-cmd-break.c: Don't include gdb.h.
3043         (breakpoint_notify): Use print_breakpoint.
3044         * mi/mi-cmd-catch.c: Don't include gdb.h.
3045         * mi/mi-interp.c: Don't include gdb.h.
3046         (mi_print_breakpoint_for_event): New.
3047         (mi_breakpoint_created, mi_breakpoint_modified): Use
3048         mi_print_breakpoint_for_event.
3049         * mi/mi-main.c: Don't include gdb.h.
3050         (mi_cmd_thread_select): Parse the global thread ID here.  Use
3051         thread_select instead of gdb_thread_select.
3052         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3053         of using gdb_list_thread_ids.
3054         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
3055         FILEIO_ENOSYS here.
3056         (remote_fileio_request): Use TRY/CATCH instead of
3057         catch_exceptions.
3058         * symfile-mem.c (struct symbol_file_add_from_memory_args)
3059         (symbol_file_add_from_memory_wrapper): Delete.
3060         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3061         * thread.c: Don't include gdb.h.
3062         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3063         (thread_alive): Use thread_select.
3064         (do_captured_thread_select): Delete, parts salvaged as ...
3065         (thread_select): ... this new function.
3066         (gdb_thread_select): Delete.
3067
3068 2017-10-10  Pedro Alves  <palves@redhat.com>
3069             Tom Tromey  <tom@tromey.com>
3070
3071         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3072         and reverse logic.
3073         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3074         No longer macros.  Instead ...
3075         (enum wp_check_result): They're now values of this new
3076         enumeration.
3077         (watchpoint_check): Change return type to wp_check_result and
3078         parameter type to bpstat.
3079         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3080         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3081         catch_errors.  Reverse logic of watchpoint_check call.
3082         (breakpoint_re_set_one): Now returns void and takes a breakpoint
3083         pointer as parameter.
3084         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3085         * common/common-exceptions.c (throw_exception_sjlj): Update
3086         comments to avoid mentioning catch_errors.
3087         * exceptions.c (catch_errors): Delete.
3088         * exceptions.h: Update comments to avoid mentioning catch_errors.
3089         (catch_errors_ftype, catch_errors): Delete.
3090         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3091         (hook_stop_stub): Delete.
3092         (restore_selected_frame): Change return type to void, and
3093         parameter type to const frame_id &.
3094         (restore_infcall_control_state): Use TRY/CATCH instead of
3095         catch_errors.
3096         * main.c (captured_command_loop): Return void and remove
3097         parameter.  Remove references to catch_errors.
3098         (captured_main): Use TRY/CATCH instead of catch_errors.
3099         * objc-lang.c (objc_submethod_helper_data)
3100         (find_objc_msgcall_submethod_helper): Delete.
3101         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3102         catch_errors.
3103         * record-full.c (record_full_message): Return void.
3104         (record_full_message_args, record_full_message_wrapper): Delete.
3105         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3106         instead of catch_errors.
3107         * solib-aix.c (solib_aix_open_symbol_file_object): Change
3108         parameter type to int.
3109         * solib-darwin.c (open_symbol_file_object): Ditto.
3110         * solib-dsbt.c (open_symbol_file_object): Ditto.
3111         * solib-frv.c (open_symbol_file_object): Ditto.
3112         * solib-svr4.c (open_symbol_file_object): Ditto.
3113         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3114         * solib.c (update_solib_list): Use TRY/CATCH instead of
3115         catch_errors.
3116         * solist.h (struct target_so_ops) <open_symbol_file_object>:
3117         Change type.
3118         * symmisc.c (struct print_symbol_args): Remove.
3119         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3120         (print_symbol): Change type.
3121         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3122         and remove parameters.
3123         (catch_errors): New.
3124         (get_windows_debug_event): Adjust.
3125
3126 2017-10-09  Tom Tromey  <tom@tromey.com>
3127
3128         * mi/mi-main.c (free_splay_tree): Remove.
3129         (list_available_thread_groups): Use splay_tree_up.
3130         * common/gdb_splay_tree.h: New file.
3131
3132 2017-10-09  Tom Tromey  <tom@tromey.com>
3133
3134         * mi/mi-main.c (do_nothing): Remove.
3135         (list_available_thread_groups): Update.
3136
3137 2017-10-09  Pedro Alves  <palves@redhat.com>
3138
3139         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3140         reading registers when switching context.
3141
3142 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
3143
3144         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3145         (fbsd_convert_siginfo): Likewise.
3146         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3147
3148 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
3149
3150         * configure.ac (try_guile_versions): Remove guile-2.2.
3151         * configure: Regenerate.
3152
3153 2017-10-09  Tom Tromey  <tom@tromey.com>
3154
3155         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3156         (COMPILE.pre): Use $(CXX).
3157
3158 2017-10-09  Pedro Alves  <palves@redhat.com>
3159
3160         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3161         Use bool.
3162         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3163         * cp-support.h (cp_remove_params): Now returns a
3164         gdb::unique_xmalloc_ptr.
3165         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3166         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3167         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3168         returning a gdb::unique_xmalloc_ptr.
3169         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3170         * stack.c (find_frame_funname): Adjust to cp_remove_params
3171         returning a gdb::unique_xmalloc_ptr.
3172
3173 2017-10-08  Tom Tromey  <tom@tromey.com>
3174
3175         * dwarf2read.c (dwarf2_get_dwz_file): Use
3176         gdb::unique_xmalloc_ptr.
3177         (find_slot_in_mapped_hash): Likewise.
3178         (dwarf2_physname): Likewise.
3179         (create_dwo_unit_in_dwp_v1): Use std::string.
3180         (create_dwo_unit_in_dwp_v2): Likewise.
3181         (lookup_dwo_cutu): Likewise.
3182         (inherit_abstract_dies): Use std::vector.
3183         (read_array_type): Likewise.
3184         (dwarf_decode_macros): Remove unused declaration.
3185         (unsigned_int_compar): Remove.
3186         (dwarf2_build_psymtabs_hard): Use scoped_restore.
3187         (psymtabs_addrmap_cleanup): Remove.
3188
3189 2017-10-08  Tom Tromey  <tom@tromey.com>
3190
3191         * frame-unwind.c (frame_unwind_try_unwinder): Update.
3192         * frame.h (frame_cleanup_after_sniffer): Declare.
3193         (frame_prepare_for_sniffer): Return void.
3194         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
3195         type of argument.
3196         (frame_prepare_for_sniffer): Return void.
3197
3198 2017-10-08  Tom Tromey  <tom@tromey.com>
3199
3200         * utils.h (make_cleanup_value_free): Remove.
3201         * utils.c (do_value_free, struct cleanup): Remove.
3202         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3203         Use gdb_value_up.
3204         * value.h (struct value_deleter): New.
3205         (gdb_value_up): New typedef.
3206
3207 2017-10-08  Tom Tromey  <tom@tromey.com>
3208
3209         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3210         (make_cleanup_free_search_symbols): Remove.
3211         (search_symbols): Return std::vector.
3212         (symbol_search::compare_search_syms): Now member of
3213         symbol_search.  Change arguments.
3214         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
3215         (symtab_symbol_info, rbreak_command): Update.
3216         * symtab.h (struct symbol_search) <next>: Remove.
3217         Add constructors.
3218         (symbol_search::operator<): New function.
3219         (symbol_search::operator==): New function.
3220         (search_symbols): Remove std::vector.
3221         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3222         (symbol_search::compare_search_syms): Declare.
3223
3224 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3225
3226         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3227         arch/aarch64-insn.o.
3228         Remove one rule.
3229         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3230
3231 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3232
3233         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3234         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3235         arch/arm-linux.o respectively.
3236         * configure.tgt: Likewise.
3237
3238 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3239
3240         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3241         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3242
3243 2017-10-06  Pedro Alves  <palves@redhat.com>
3244
3245         * windows-nat.c: Include <algorithm>.
3246
3247 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3248
3249         * configure.tgt (i386_tobjs): New variable.
3250         (amd64_tobjs): New variable.
3251         Set $cpu_obs and $os_obs.
3252
3253 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3254
3255         * Makefile.in (CONFIG_SRC_SUBDIR): New.
3256         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3257         (clean): Remove object files and dependency files.
3258         (distclean): Remove the directory.
3259         * configure.ac: Invoke AC_CONFIG_COMMANDS.
3260         * configure: Re-generated.
3261         * configure.tgt: Replace amd64.o with arch/amd64.o.
3262
3263 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
3264
3265         PR build/22188
3266         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3267         and SETEND.
3268
3269 2017-10-05  Pedro Alves  <palves@redhat.com>
3270
3271         * linux-nat.c (linux_child_follow_fork): When following the parent
3272         and detaching the child, consult the parent thread's architecture
3273         instead of the child's.
3274
3275 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3276
3277         * ax.h: Do not include "doublest.h".
3278         (union agent_val): Remove.
3279
3280 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3281
3282         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3283         (decimal_to_string): Return std::string object.
3284         (decimal_from_string): Accept std::string object.  Return bool.
3285         (decimal_from_integral, decimal_from_doublest): Remove.
3286         (decimal_from_longest): Add prototype.
3287         (decimal_from_ulongest): Likewise.
3288         (decimal_to_longest): Likewise.
3289         (decimal_from_doublest): Likewise.
3290         * dfp.c: Do not include "gdbtypes.h" or "value.h".
3291         (MAX_DECIMAL_STRING): Move here.
3292         (decimal_to_string): Return std::string object.
3293         (decimal_from_string): Accept std::string object.  Return bool.
3294         (decimal_from_integral): Remove, replace by ...
3295         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3296         (decimal_to_longest): New function.
3297         (decimal_from_floating): Remove, replace by ...
3298         (decimal_from_doublest): ... this new function.
3299         (decimal_to_doublest): Update to new decimal_to_string interface.
3300
3301         * value.c (unpack_long): Use decimal_to_longest.
3302         * valops.c (value_cast): Use decimal_from_doublest instead of
3303         decimal_from_floating.  Use decimal_from_[u]longest isntead of
3304         decimal_from_integral.
3305         * valarith.c (value_args_as_decimal): Likewise.
3306         * valprint.c (print_decimal_floating): Update to new
3307         decimal_to_string interface.
3308         * printcmd.c (printf_decfloat): Likewise.
3309         * c-exp.y (parse_number): Update to new decimal_from_string interface.
3310
3311 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3312
3313         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
3314         * gdbtypes.c: Include "floatformat.h".
3315         * value.c: Likewise.
3316         * m68k-tdep.c: Likewise.
3317
3318         * findvar.c: Do not include "floatformat.h".
3319         * amd64-darwin-tdep.c: Likewise.
3320         * arm-linux-tdep.c: Likewise.
3321         * i386-darwin-tdep.c: Likewise.
3322         * i387-tdep.c: Likewise.
3323         * m68k-linux-tdep.c: Likewise.
3324         * mep-tdep.c: Likewise.
3325         * mips-tdep.c: Likewise.
3326         * nios2-tdep.c: Likewise.
3327         * s390-linux-tdep.c: Likewise.
3328         * sparc-obsd-tdep.c: Likewise.
3329         * sparc-tdep.c: Likewise.
3330         * sparc64-tdep.c: Likewise.
3331         * spu-tdep.c: Likewise.
3332         * tic6x-tdep.c: Likewise.
3333         * tilegx-tdep.c: Likewise.
3334         * vax-tdep.c: Likewise.
3335         * xstormy16-tdep.c: Likewise.
3336         * xtensa-tdep.c: Likewise.
3337
3338         * top.c: Do not include "doublest.h".
3339         * aarch64-tdep.c: Likewise.
3340         * alpha-tdep.c: Likewise.
3341         * arm-linux-tdep.c: Likewise.
3342         * m68k-linux-tdep.c: Likewise.
3343         * tilegx-tdep.c: Likewise.
3344         * xstormy16-tdep.c: Likewise.
3345
3346 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3347
3348         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3349         (mipsn32_fbsd_sigframe): Define.
3350         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3351         for FreeBSD/mipsn32.
3352
3353 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3354
3355         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3356         AT_HWCAP.
3357
3358 2017-10-05  Tristan Gingold  <tgingold@free.fr>
3359
3360         * MAINTAINERS (Misc): Update my email address.
3361
3362 2017-10-04  Pedro Alves  <palves@redhat.com>
3363
3364         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
3365         it instead of target_gdbarch.
3366         (get_remote_state, get_remote_packet_size): Adjust
3367         get_remote_arch_state calls, passing down target_gdbarch
3368         explicitly.
3369         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3370         'gdbarch' and use it instead of target_gdbarch.
3371         (get_memory_packet_size): Adjust get_remote_arch_state calls,
3372         passing down target_gdbarch explicitly.
3373         (struct stop_reply) <arch>: New field.
3374         (remote_parse_stop_reply): Use the stopped thread's architecture,
3375         not the current inferior's.  Save the architecture in the
3376         stop_reply.
3377         (process_stop_reply): Use the stop reply's architecture.
3378         (process_g_packet, remote_fetch_registers)
3379         (remote_prepare_to_store, store_registers_using_G)
3380         (remote_store_registers): Adjust get_remote_arch_state calls,
3381         using the regcache's architecture.
3382         (remote_get_trace_status): Adjust get_remote_arch_state calls,
3383         passing down target_gdbarch explicitly.
3384         * spu-multiarch.c (spu_thread_architecture): Defer to the target
3385         beneath instead of calling target_gdbarch.
3386         * target.c (default_thread_architecture): Use the specified
3387         inferior's architecture, instead of the current inferior's
3388         architecture (via target_gdbarch).
3389
3390 2017-10-04  Pedro Alves  <palves@redhat.com>
3391
3392         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3393         case.
3394         (regcache_print): Handle !target_has_registers here instead.
3395
3396 2017-10-04  Pedro Alves  <palves@redhat.com>
3397
3398         * frame.c (create_test_frame): Delete.
3399         * frame.h (create_test_frame): Delete.
3400         * gdbarch-selftests.c: Include gdbthread.h and target.h.
3401         (class regcache_test): Delete.
3402         (test_target_has_registers, test_target_has_stack)
3403         (test_target_has_memory, test_target_prepare_to_store)
3404         (test_target_store_registers): New functions.
3405         (test_target_ops): New class.
3406         (register_to_value_test): Error out if there's already a
3407         process_stratum (or higher) target pushed.  Create a fuller mock
3408         environment, with mock target_ops, inferior, address space, thread
3409         and inferior_ptid.
3410         * progspace.c (struct address_space): Move to ...
3411         * progspace.h (struct address_space): ... here.
3412         * regcache.h (regcache::~regcache, regcache::raw_write)
3413         [GDB_SELF_TEST]: No longer virtual.
3414
3415 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
3416
3417         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3418
3419 2017-10-04  Pedro Alves  <palves@redhat.com>
3420
3421         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3422         out of 'between TRY and CATCH'.
3423
3424 2017-10-04  Pedro Alves  <palves@redhat.com>
3425
3426         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3427         * common/common-exceptions.h (TRY): Open an outermost scope.
3428         Expand intro comment.
3429         (CATCH): Reindent.
3430         (END_CATCH): Close the outermost scope.
3431         * completer.c (complete_line_internal): Add missing END_CATCH.
3432
3433 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3434
3435         * NEWS (Changes since GDB 8.0): Add entry about new
3436         'set-cwd-on-gdbserver' feature.
3437         (New remote packets): Add entry for QSetWorkingDir.
3438         * common/common-inferior.h (set_inferior_cwd): New prototype.
3439         * infcmd.c (set_inferior_cwd): Remove "static".
3440         (show_cwd_command): Expand text to include remote debugging.
3441         * remote.c: Add PACKET_QSetWorkingDir.
3442         (remote_protocol_features) <QSetWorkingDir>: New entry for
3443         PACKET_QSetWorkingDir.
3444         (extended_remote_set_inferior_cwd): New function.
3445         (extended_remote_create_inferior): Call
3446         "extended_remote_set_inferior_cwd".
3447         (_initialize_remote): Call "add_packet_config_cmd" for
3448         QSetWorkingDir.
3449
3450 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3451
3452         * NEWS (New commands): Mention "set/show cwd".
3453         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3454         "cd" command's help text.
3455         * common/common-inferior.h (get_inferior_cwd): New prototype.
3456         * infcmd.c (inferior_cwd_scratch): New global variable.
3457         (set_inferior_cwd): New function.
3458         (get_inferior_cwd): Likewise.
3459         (set_cwd_command): Likewise.
3460         (show_cwd_command): Likewise.
3461         (_initialize_infcmd): Add "set/show cwd" commands.
3462         * inferior.h (class inferior) <cwd>: New field.
3463         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3464         (fork_inferior): Change inferior's cwd before its execution.
3465         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3466         to CreateProcess.
3467
3468 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3469
3470         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3471         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3472         (COMMON_OBS): Add gdb_tilde_expand.o.
3473         * common/gdb_tilde_expand.c: New file.
3474         * common/gdb_tilde_expand.h: Likewise.
3475
3476 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
3477
3478         * gdbarch.sh (objfile): Remove duplicate declaration.
3479         * gdbarch.h: Regenerate.
3480
3481 2017-10-03  Tom Tromey  <tom@tromey.com>
3482
3483         * utils.c (internal_vproblem): Use string_vprintf.
3484
3485 2017-10-03  Tom Tromey  <tom@tromey.com>
3486
3487         * printcmd.c (info_symbol_command): Use std::string.
3488
3489 2017-10-03  Tom Tromey  <tom@tromey.com>
3490
3491         * top.c (gdb_safe_append_history): Use std::string.
3492
3493 2017-10-03  Tom Tromey  <tom@tromey.com>
3494
3495         * event-top.c (stdin_event_handler): Update.
3496         * main.c (captured_main_1): Update.
3497         * top.h (make_delete_ui_cleanup): Remove.
3498         (struct ui): Add constructor and destructor.
3499         (new_ui, delete_ui): Remove.
3500         * top.c (make_delete_ui_cleanup): Remove.
3501         (new_ui_command): Use std::unique_ptr.
3502         (delete_ui_cleanup): Remove.
3503         (ui::ui): Rename from new_ui.  Update.
3504         (free_ui): Remove.
3505         (ui::~ui): Rename from delete_ui.  Update.
3506
3507 2017-10-03  Tom Tromey  <tom@tromey.com>
3508
3509         * symfile.c (load_progress): Use gdb::byte_vector.
3510
3511 2017-10-03  Tom Tromey  <tom@tromey.com>
3512
3513         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3514         declaration.
3515         * printcmd.c (x_command): Remove unused declaration.
3516         * symfile.c (symbol_file_command): Remove unused declaration.
3517
3518 2017-10-03  Tom Tromey  <tom@tromey.com>
3519
3520         * utils.c (internal_vproblem): Use std::string.
3521         (defaulted_query): Likewise.
3522
3523 2017-10-03  Tom Tromey  <tom@tromey.com>
3524
3525         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3526         * top.c (execute_command_to_string): Update.
3527         * utils.c (make_cleanup_restore_page_info): Remove.
3528         (do_restore_page_info_cleanup): Remove.
3529         (set_batch_flag_and_restore_page_info):
3530         New.
3531         (make_cleanup_restore_page_info): Remove.
3532         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3533         (~set_batch_flag_and_restore_page_info): New
3534         (make_cleanup_restore_uinteger): Remove.
3535         (make_cleanup_restore_integer): Remove.
3536         (struct restore_integer_closure): Remove.
3537         (restore_integer): Remove.
3538         * utils.h (struct set_batch_flag_and_restore_page_info): New
3539         class.
3540         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3541         (make_cleanup_restore_page_info): Remove.
3542         (make_cleanup_restore_uinteger) Remove.
3543         (make_cleanup_restore_integer) Remove.
3544
3545 2017-10-03  Tom Tromey  <tom@tromey.com>
3546
3547         * record-full.h (record_full_gdb_operation_disable_set): Return
3548         scoped_restore_tmpl<int>.
3549         * infrun.c (adjust_pc_after_break): Update.
3550         (handle_signal_stop): Update.
3551         * record-full.c (record_full_gdb_operation_disable_set): Return
3552         scoped_restore_tmpl<int>.
3553         (record_full_wait_1, record_full_insert_breakpoint)
3554         (record_full_remove_breakpoint, record_full_save)
3555         (record_full_goto_insn): Update.
3556
3557 2017-10-02  Tom Tromey  <tom@tromey.com>
3558
3559         PR rust/22236:
3560         * rust-lang.c (rust_val_print_str): New function.
3561         (val_print_struct): Call it.
3562         (rust_subscript): Preserve name of slice type.
3563
3564 2017-10-02  Tom Tromey  <tom@tromey.com>
3565
3566         * rust-lang.c (rust_subscript): Handle slices in
3567         EVAL_AVOID_SIDE_EFFECTS case.
3568
3569 2017-10-02  Tom Tromey  <tom@tromey.com>
3570
3571         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3572
3573 2017-10-02  Tom Tromey  <tom@tromey.com>
3574
3575         * rust-lang.h (rust_slice_type): Add "extern".
3576
3577 2017-10-02  Tom Tromey  <tom@tromey.com>
3578             Pedro Alves  <palves@redhat.com>
3579
3580         * ada-lang.h (ada_exc_info::operator<): Make const.
3581         (ada_exc_info::operator==): Make const.
3582         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3583         Make const.
3584
3585 2017-09-29  Tom Tromey  <tom@tromey.com>
3586
3587         * target.c (read_whatever_is_readable): Change type of "result".
3588         Update.
3589         (free_memory_read_result_vector): Remove.
3590         (read_memory_robust): Change return type.  Update.
3591         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
3592         bin2hex, std::string.
3593         * target.h (memory_read_result_s): Remove typedef.
3594         (free_memory_read_result_vector): Remove.
3595         (read_memory_robust): Return std::vector.
3596
3597 2017-09-29  Tom Tromey  <tom@tromey.com>
3598
3599         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3600
3601 2017-09-29  Tom Tromey  <tom@tromey.com>
3602
3603         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3604         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
3605         operator< and operator==.
3606         (ada_exceptions_list): Return a std::vector.
3607         * ada-lang.c (ada_exc_info::operator<): Rename from
3608         compare_ada_exception_info.
3609         (ada_exc_info::operator==): New.
3610         (sort_remove_dups_ada_exceptions_list): Change type of
3611         "exceptions".
3612         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3613         (ada_add_global_exceptions): Likewise.
3614         (ada_exceptions_list_1): Return a std::vector.
3615         (ada_exceptions_list): Likewise.
3616
3617 2017-09-29  Tom Tromey  <tom@tromey.com>
3618
3619         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3620         'std::set *'.
3621         (print_one_inferior): Update.
3622         (free_vector_of_ints): Remove.
3623         (list_available_thread_groups): Change "ids" to std::set.
3624         (mi_cmd_list_thread_groups): Update.
3625         (struct collect_cores_data) <core>: Now a std::set.
3626         (collect_cores): Update.
3627         (unique): Remove.
3628         (print_one_inferior): Update.
3629
3630 2017-09-29  Tom Tromey  <tom@tromey.com>
3631
3632         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3633         (mi_execute_async_cli_command): Likewise.
3634         (mi_cmd_trace_frame_collected): Use field_fmt.
3635
3636 2017-09-29  Tom Tromey  <tom@tromey.com>
3637
3638         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3639         gdb::byte_vector.
3640
3641 2017-09-29  Tom Tromey  <tom@tromey.com>
3642
3643         * mi/mi-parse.c (mi_parse): Remove unused declaration.
3644
3645 2017-09-29  Tom Tromey  <tom@tromey.com>
3646
3647         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3648
3649 2017-09-29  Tom Tromey  <tom@tromey.com>
3650
3651         * varobj.h (varobj_gen_name): Return std::string.
3652         * varobj.c (varobj_gen_name): Return std::string.
3653         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3654         (mi_cmd_var_delete): Don't copy "name".
3655
3656 2017-09-29  Tom Tromey  <tom@tromey.com>
3657
3658         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3659         (mi_cmd_break_insert_1): Update.
3660
3661 2017-09-29  Tom Tromey  <tom@tromey.com>
3662
3663         * target.h (make_scoped_defer_target_commit_resume): Update.
3664         * target.c (make_scoped_defer_target_commit_resume): Rename from
3665         make_cleanup_defer_target_commit_resume.  Return a
3666         scoped_restore.
3667         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3668
3669 2017-09-29  Tom Tromey  <tom@tromey.com>
3670
3671         * main.c (captured_main_1): Remove unused declaration.
3672         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3673
3674 2017-09-29  Tom Tromey  <tom@tromey.com>
3675
3676         * symtab.c (search_symbols): Remove unused outer cleanup.
3677         (make_source_files_completion_list): Remove unused declaration.
3678
3679 2017-09-29  Tom Tromey  <tom@tromey.com>
3680
3681         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3682
3683 2017-09-29  Tom Tromey  <tom@tromey.com>
3684
3685         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3686         gdb::byte_vector.
3687
3688 2017-09-29  Tom Tromey  <tom@tromey.com>
3689
3690         * complaints.c (vcomplaint): Use std::string.
3691
3692 2017-09-29  Tom Tromey  <tom@tromey.com>
3693
3694         * tracepoint.c (trace_variable_command): Use std::string.
3695         (encode_actions_1): Remove unused declarations.
3696         (create_tsv_from_upload): Use std::string.
3697
3698 2017-09-29  Tom Tromey  <tom@tromey.com>
3699
3700         * cp-support.c (gdb_demangle): Use std::string.
3701
3702 2017-09-29  Tom Tromey  <tom@tromey.com>
3703
3704         * stack.c (parse_frame_specification): Use std::string
3705         (info_frame_command): Use gdb::unique_xmalloc_ptr.
3706
3707 2017-09-29  Tom Tromey  <tom@tromey.com>
3708
3709         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3710
3711 2017-09-29  Tom Tromey  <tom@tromey.com>
3712
3713         * utils.c (vfprintf_maybe_filtered): Use std::string.
3714         (vfprintf_unfiltered): Likewise.
3715
3716 2017-09-29  Tom Tromey  <tom@tromey.com>
3717
3718         * event-top.c (top_level_prompt): Return std::string.
3719         (display_gdb_prompt): Update.
3720
3721 2017-09-29  Tom Tromey  <tom@tromey.com>
3722
3723         * unittests/common-utils-selftests.c (format): New function.
3724         (string_vprintf_tests): New function.
3725         (_initialize_common_utils_selftests): Register new tests.
3726         * common/common-utils.c (string_vprintf): New function.
3727         * common/common-utils.h (string_vprintf): Declare.
3728
3729 2017-09-29  Pedro Alves  <palves@redhat.com>
3730
3731         * common/rsp-low.c (unpack_varlen_hex): Constify.
3732         * common/rsp-low.h (unpack_varlen_hex): Constify.
3733         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3734         Constify.
3735         * remote.c (remote_set_permissions, read_ptid)
3736         (remote_current_thread, remote_get_threads_with_qthreadinfo)
3737         (remote_static_tracepoint_marker_at)
3738         (remote_static_tracepoint_markers_by_strid)
3739         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3740         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3741         (parse_tracepoint_definition, parse_tsv_definition)
3742         (parse_static_tracepoint_marker_definition): Constify.
3743         * tracepoint.h (parse_static_tracepoint_marker_definition)
3744         (parse_trace_status, parse_tracepoint_status)
3745         (parse_tracepoint_definition, parse_tsv_definition): Constify.
3746
3747 2017-09-29  Pedro Alves  <palves@redhat.com>
3748
3749         * remote.c (target_buf, target_buf_size): Delete.
3750         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3751         Use the connection's packet buffer instead.
3752         All callers adjusted.
3753         (_initialize_remote): Remove references to target_buf and
3754         target_buf_size.
3755
3756 2017-09-28  Pedro Alves  <palves@redhat.com>
3757
3758         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3759         unittests/common-utils-selftests.c.
3760         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
3761         (COMMON_OBS): Remove utils-selftests.o.
3762         * utils-selftests.c: Move to ...
3763         * unittests/common-utils-selftests.c: ... here and rename self
3764         test to "string_printf".
3765
3766 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
3767
3768         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
3769         having NULL cus or tus.
3770
3771 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3772
3773         * arm-tdep.c: (convert_from_extended): Remove.
3774         (convert_to_extended): Likewise.
3775         (arm_extract_return_value): Use convert_typed_floating.
3776         (arm_store_return_value): Likewise.
3777
3778         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3779         * sh-tdep.c: Do not include "floatformat.h".
3780         (sh_littlebyte_bigword_type): New function.
3781         (sh_register_convert_to_virtual): Use convert_typed_floating.
3782         (sh_register_convert_to_raw): Likewise.
3783         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3784         (sh64_littlebyte_bigword_type): New function.
3785         (sh64_extract_return_value): Use convert_typed_floating.
3786         (sh64_register_convert_to_virtual): Likewise.
3787         (sh64_register_convert_to_raw): Likewise.
3788
3789 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3790
3791         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
3792         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
3793
3794         * gdbtypes.h (union type_specific): Make field floatformat hold
3795         just a single struct floatformat, not an array.
3796         (floatformat_from_type): Move here.
3797         * gdbtypes.c (floatformat_from_type): Move here.  Update to
3798         changed TYPE_FLOATFORMAT definition.
3799         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
3800         (recursive_dump_type): Likewise.
3801         (init_float_type): Install correct floatformat for byte order.
3802         (arch_float_type): Likewise.
3803
3804 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3805
3806         * gdbtypes.c (init_type): Change incoming argument from
3807         length-in-bytes to length-in-bits.  Assert length is a
3808         multiple of TARGET_CHAR_BITS.
3809         (arch_type, arch_flags_type): Likewise.
3810         (init_integer_type): Update call to init_type.
3811         (init_character_type): Likewise.
3812         (init_boolean_type): Likewise.
3813         (init_float_type): Likewise.
3814         (init_decfloat_type): Likewise.
3815         (init_complex_type): Likewise.
3816         (init_pointer_type): Likewise.
3817         (objfile_type): Likewise.
3818         (arch_integer_type): Update call to arch_type.
3819         (arch_character_type): Likewise.
3820         (arch_boolean_type): Likewise.
3821         (arch_float_type): Likewise.
3822         (arch_decfloat_type): Likewise.
3823         (arch_complex_type): Likewise.
3824         (arch_pointer_type): Likewise.
3825         (gdbtypes_post_init): Likewise.
3826
3827         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
3828         (read_base_type): Likewise.
3829         * mdebugread.c (basic_type): Likewise.
3830         * stabsread.c (dbx_init_float_type): Likewise.
3831         (rs6000_builtin_type): Likewise.
3832         (read_range_type): Likewise.  Also, fix call to init_integer_type
3833         with erroneous length argument.
3834
3835         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
3836         * d-lang.c (build_d_types): Likewise.
3837         * f-lang.c (build_fortran_types): Likewise.
3838         * go-lang.c (build_go_types): Likewise.
3839         * opencl-lang.c (build_opencl_types): Likewise.
3840         * jit.c (finalize_symtab): Likewise.
3841         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
3842         (build_std_type_info_type): Likewise.
3843         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
3844         update call to arch_flags_type.
3845
3846         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
3847         arch_type.
3848         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
3849         * windows-tdep.c (windows_get_tlb_type): Likewise.
3850
3851         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
3852         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3853         * m32c-tdep.c (make_types): Likewise.
3854         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
3855         (rl78_psw_type): Update call to arch_flags_type.
3856         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
3857         * rx-tdep.c (rx_psw_type): Likewise.
3858         (rx_fpsw_type): Likewise.
3859         * sparc-tdep.c (sparc_psr_type): Likewise.
3860         (sparc_fsr_type): Likewise.
3861         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
3862         (sparc64_ccr_type): Likewise.
3863         (sparc64_fsr_type): Likewise.
3864         (sparc64_fprs_type): Likewise.
3865
3866 2017-09-27  Tom Tromey  <tom@tromey.com>
3867
3868         * findcmd.c (find_command): Constify.
3869
3870 2017-09-27  Tom Tromey  <tom@tromey.com>
3871
3872         * ada-tasks.c (task_command_1, task_command): Constify.
3873
3874 2017-09-27  Tom Tromey  <tom@tromey.com>
3875
3876         * symtab.c (maintenance_print_symbol_cache)
3877         (maintenance_flush_symbol_cache)
3878         (maintenance_print_symbol_cache_statistics): Constify.
3879
3880 2017-09-27  Tom Tromey  <tom@tromey.com>
3881
3882         * inferior.c (detach_inferior_command, kill_inferior_command)
3883         (inferior_command): Constify.
3884
3885 2017-09-27  Tom Tromey  <tom@tromey.com>
3886
3887         * regcache.c (regcache_print, maintenance_print_registers)
3888         (maintenance_print_raw_registers)
3889         (maintenance_print_cooked_registers)
3890         (maintenance_print_register_groups)
3891         (maintenance_print_remote_registers): Constify.
3892
3893 2017-09-27  Tom Tromey  <tom@tromey.com>
3894
3895         * printcmd.c (map_display_numbers, undisplay_command)
3896         (enable_disable_display_command, enable_display_command)
3897         (disable_display_command): Constify.
3898
3899 2017-09-27  Tom Tromey  <tom@tromey.com>
3900
3901         * breakpoint.h (delete_command): Don't declare.
3902         * breakpoint.c (delete_command, enable_once_command)
3903         (enable_count_command, enable_delete_command, breakpoint_1)
3904         (maintenance_info_breakpoints, stopin_command, stopat_command)
3905         (delete_command, delete_trace_command, save_breakpoints)
3906         (save_breakpoints_command, save_tracepoints_command): Constify.
3907
3908 2017-09-27  Tom Tromey  <tom@tromey.com>
3909
3910         * macrocmd.c (macro_expand_command, macro_expand_once_command)
3911         (skip_ws, extract_identifier, macro_define_command)
3912         (macro_undef_command, macro_list_command): Constify.
3913
3914 2017-09-27  Tom Tromey  <tom@tromey.com>
3915
3916         * infcmd.c (environment_info, set_environment_command)
3917         (unset_environment_command, path_info, info_proc_cmd_1)
3918         (info_proc_cmd_mappings, info_proc_cmd_stat)
3919         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
3920         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
3921
3922 2017-09-27  Tom Tromey  <tom@tromey.com>
3923
3924         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
3925         Constify.
3926
3927 2017-09-27  Tom Tromey  <tom@tromey.com>
3928
3929         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
3930
3931 2017-09-27  Tom Tromey  <tom@tromey.com>
3932
3933         * demangle.c (demangle_command): Constify.
3934
3935 2017-09-27  Tom Tromey  <tom@tromey.com>
3936
3937         * progspace.c (maintenance_info_program_spaces_command):
3938         Constify.
3939
3940 2017-09-27  Tom Tromey  <tom@tromey.com>
3941
3942         * compile/compile.c (check_raw_argument, compile_file_command)
3943         (compile_code_command, compile_print_command): Constify.
3944
3945 2017-09-27  Tom Tromey  <tom@tromey.com>
3946
3947         * reggroups.c (maintenance_print_reggroups): Constify.
3948
3949 2017-09-27  Tom Tromey  <tom@tromey.com>
3950
3951         * dwarf2read.c (save_gdb_index_command): Constify.
3952
3953 2017-09-27  Tom Tromey  <tom@tromey.com>
3954
3955         * stap-probe.c (info_probes_stap_command): Constify.
3956
3957 2017-09-27  Tom Tromey  <tom@tromey.com>
3958
3959         * fork-child.c (unset_exec_wrapper_command): Constify.
3960
3961 2017-09-27  Tom Tromey  <tom@tromey.com>
3962
3963         * btrace.c (get_uint, get_context_size, no_chunk)
3964         (maint_btrace_packet_history_cmd)
3965         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
3966         (maint_info_btrace_cmd): Constify.
3967
3968 2017-09-27  Tom Tromey  <tom@tromey.com>
3969
3970         * reverse.c (delete_bookmark_command): Constify.
3971
3972 2017-09-27  Tom Tromey  <tom@tromey.com>
3973
3974         * remote.c (set_memory_packet_size)
3975         (set_memory_write_packet_size, show_memory_write_packet_size)
3976         (set_memory_read_packet_size, show_memory_read_packet_size)
3977         (compare_sections_command, packet_command, remote_put_command)
3978         (remote_get_command, remote_delete_command): Constify.
3979
3980 2017-09-27  Tom Tromey  <tom@tromey.com>
3981
3982         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
3983         (set_mipsfpu_double_command, set_mipsfpu_none_command)
3984         (set_mipsfpu_auto_command): Constify.
3985
3986 2017-09-27  Tom Tromey  <tom@tromey.com>
3987
3988         * cli/cli-cmds.h (cd_command): Constify.
3989         * cli/cli-cmds.c (cd_command): Constify.
3990
3991 2017-09-27  Tom Tromey  <tom@tromey.com>
3992
3993         * thread.c (thread_name_command, thread_find_command): Constify.
3994
3995 2017-09-27  Tom Tromey  <tom@tromey.com>
3996
3997         * probe.c (enable_probes_command, disable_probes_command):
3998         Constify.
3999
4000 2017-09-27  Tom Tromey  <tom@tromey.com>
4001
4002         * symfile.c (symbol_file_command): Constify.
4003         * gdbcore.h (deprecated_file_changed_hook): Constify.
4004         * exec.c (deprecated_file_changed_hook, exec_file_command)
4005         (file_command): Constify.
4006         * defs.h (symbol_file_command): Constify.
4007
4008 2017-09-27  Tom Tromey  <tom@tromey.com>
4009
4010         * remote-fileio.c (set_system_call_allowed)
4011         (show_system_call_allowed): Constify.
4012
4013 2017-09-27  Tom Tromey  <tom@tromey.com>
4014
4015         * tracepoint.c (delete_trace_variable_command)
4016         (tfind_end_command, tfind_start_command, tfind_pc_command)
4017         (tfind_tracepoint_command, tfind_line_command)
4018         (tfind_range_command, tfind_outside_command): Constify.
4019
4020 2017-09-27  Tom Tromey  <tom@tromey.com>
4021
4022         * ax-gdb.c (maint_agent_printf_command, agent_command)
4023         (agent_eval_command): Constify.
4024
4025 2017-09-27  Tom Tromey  <tom@tromey.com>
4026
4027         * tracepoint.c (info_scope_command): Constify.
4028         * python/python.c (gdbpy_decode_line): Constify.
4029         * python/py-breakpoint.c (bppy_init): Constify.
4030         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4031         * location.h: (new_linespec_location)
4032         (string_to_event_location_basic, string_to_event_location):
4033         Constify.
4034         * location.c (new_linespec_location)
4035         (string_to_event_location_basic, string_to_event_location):
4036         Constify.
4037         * linespec.h (decode_line_with_current_source)
4038         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4039         * linespec.c (linespec_lex_to_end)
4040         (decode_line_with_current_source)
4041         (decode_line_with_last_displayed): Constify.
4042         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4043         Constify.
4044         * cli/cli-cmds.c (edit_command, list_command): Constify.
4045         * breakpoint.h (until_break_command, watch_command_wrapper)
4046         (awatch_command_wrapper, rwatch_command_wrapper)
4047         (init_ada_exception_breakpoint): Constify.
4048         * breakpoint.c (break_command_1, dprintf_command)
4049         (break_range_command, watch_command_wrapper)
4050         (rwatch_command_wrapper, awatch_command_wrapper)
4051         (until_break_command, init_ada_exception_breakpoint)
4052         (strace_marker_create_sals_from_location, trace_command)
4053         (ftrace_command, strace_command, struct tracepoint): Constify.
4054         * ax-gdb.c (agent_command_1): Constify.
4055         * ada-lang.c (ada_exception_sal): Constify.
4056
4057 2017-09-27  Tom Tromey  <tom@tromey.com>
4058
4059         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4060         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4061         (get_context_size, no_chunk, get_insn_history_modifiers)
4062         (cmd_record_insn_history, get_call_history_modifiers)
4063         (cmd_record_call_history): Constify.
4064
4065 2017-09-27  Tom Tromey  <tom@tromey.com>
4066
4067         * source.c (show_substitute_path_command)
4068         (unset_substitute_path_command, set_substitute_path_command):
4069         Constify.
4070
4071 2017-09-27  Tom Tromey  <tom@tromey.com>
4072
4073         * typeprint.c (maintenance_print_type): Constify.
4074         * maint.c (maintenance_dump_me, maintenance_demangle)
4075         (maintenance_time_display, maintenance_info_sections)
4076         (maintenance_print_statistics, maintenance_deprecate)
4077         (maintenance_undeprecate): Constify.
4078         (maintenance_do_deprecate): Constify.  Use std::string.
4079         (maintenance_selftest): Constify.
4080         * gdbtypes.h (maintenance_print_type): Constify.
4081
4082 2017-09-27  Tom Tromey  <tom@tromey.com>
4083
4084         * hppa-tdep.c (unwind_command): Constify.
4085
4086 2017-09-27  Tom Tromey  <tom@tromey.com>
4087
4088         * target-descriptions.c (unset_tdesc_filename_cmd)
4089         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4090         Constify.
4091
4092 2017-09-27  Tom Tromey  <tom@tromey.com>
4093
4094         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4095
4096 2017-09-27  Tom Tromey  <tom@tromey.com>
4097
4098         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4099
4100 2017-09-27  Tom Tromey  <tom@tromey.com>
4101
4102         * tui/tui-regs.c (tui_reg_command): Constify.
4103
4104 2017-09-27  Tom Tromey  <tom@tromey.com>
4105
4106         * skip.c (skip_file_command, skip_function_command)
4107         (skip_enable_command, skip_disable_command, skip_delete_command):
4108         Constify.
4109
4110 2017-09-27  Tom Tromey  <tom@tromey.com>
4111
4112         * record-btrace.c (cmd_record_btrace_bts_start)
4113         (cmd_record_btrace_pt_start): Constify.
4114
4115 2017-09-27  Tom Tromey  <tom@tromey.com>
4116
4117         * symmisc.c (maintenance_print_symbols)
4118         (maintenance_print_msymbols, maintenance_print_objfiles)
4119         (maintenance_info_symtabs, maintenance_check_symtabs)
4120         (maintenance_expand_symtabs, maintenance_info_line_tables):
4121         Constify.
4122
4123 2017-09-27  Tom Tromey  <tom@tromey.com>
4124
4125         * top.c (new_ui_command): Constify.
4126
4127 2017-09-27  Tom Tromey  <tom@tromey.com>
4128
4129         * symfile.c (add_symbol_file_command)
4130         (remove_symbol_file_command, list_overlays_command)
4131         (map_overlay_command, unmap_overlay_command)
4132         (overlay_auto_command, overlay_manual_command)
4133         (overlay_off_command, overlay_load_command): Constify.
4134
4135 2017-09-27  Tom Tromey  <tom@tromey.com>
4136
4137         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4138         (info_spu_mailbox_command, info_spu_dma_command)
4139         (info_spu_proxydma_command): Constify.
4140
4141 2017-09-27  Tom Tromey  <tom@tromey.com>
4142
4143         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4144
4145 2017-09-27  Tom Tromey  <tom@tromey.com>
4146
4147         * cli/cli-script.c (user_defined_command): Constify.
4148
4149 2017-09-27  Tom Tromey  <tom@tromey.com>
4150
4151         * cli/cli-dump.c (dump_memory_command, dump_value_command)
4152         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4153         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4154         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4155         (dump_binary_value, append_binary_memory, append_binary_value):
4156         Constify.
4157         (struct dump_context) <func>: Constify.
4158         (add_dump_command): Update.
4159
4160 2017-09-27  Tom Tromey  <tom@tromey.com>
4161
4162         * cli/cli-cmds.c (show_version, show_configuration)
4163         (source_command, show_user): Constify.
4164
4165 2017-09-27  Tom Tromey  <tom@tromey.com>
4166
4167         * target.c (maintenance_print_target_stack): Constify.
4168
4169 2017-09-27  Tom Tromey  <tom@tromey.com>
4170
4171         * interps.c (interpreter_exec_cmd): Constify.
4172
4173 2017-09-27  Tom Tromey  <tom@tromey.com>
4174
4175         * record-full.c (cmd_record_full_restore): Constify.
4176
4177 2017-09-27  Tom Tromey  <tom@tromey.com>
4178
4179         * memattr.c (enable_mem_command, disable_mem_command)
4180         (delete_mem_command): Constify.
4181
4182 2017-09-27  Tom Tromey  <tom@tromey.com>
4183
4184         * value.c (show_convenience): Constify.
4185
4186 2017-09-27  Tom Tromey  <tom@tromey.com>
4187
4188         * gdbcore.h (core_file_command): Update.
4189         * corefile.c (core_file_command): Constify.
4190
4191 2017-09-27  Tom Tromey  <tom@tromey.com>
4192
4193         * user-regs.c (maintenance_print_user_registers): Constify.
4194
4195 2017-09-27  Tom Tromey  <tom@tromey.com>
4196
4197         * cp-namespace.c (maintenance_cplus_namespace): Constify.
4198
4199 2017-09-27  Tom Tromey  <tom@tromey.com>
4200
4201         * cp-support.c (first_component_command): Constify.
4202
4203 2017-09-27  Tom Tromey  <tom@tromey.com>
4204
4205         * psymtab.c (maintenance_print_psymbols)
4206         (maintenance_info_psymtabs, maintenance_check_psymtabs):
4207         Constify.
4208
4209 2017-09-27  Tom Tromey  <tom@tromey.com>
4210
4211         * windows-tdep.c (display_tib): Constify.
4212
4213 2017-09-27  Tom Tromey  <tom@tromey.com>
4214
4215         * linux-fork.c (delete_checkpoint_command)
4216         (detach_checkpoint_command): Constify.
4217
4218 2017-09-27  Tom Tromey  <tom@tromey.com>
4219
4220         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4221
4222 2017-09-27  Tom Tromey  <tom@tromey.com>
4223
4224         * arc-tdep.c (dump_arc_instruction_command): Constify.
4225
4226 2017-09-27  Tom Tromey  <tom@tromey.com>
4227
4228         * valprint.c (set_radix, show_radix): Constify.
4229
4230 2017-09-27  Tom Tromey  <tom@tromey.com>
4231
4232         * dtrace-probe.c (info_probes_dtrace_command): Constify.
4233
4234 2017-09-27  Tom Tromey  <tom@tromey.com>
4235
4236         * command.h (not_just_help_class_command): Update.
4237         * cli/cli-decode.h (not_just_help_class_command): Update.
4238         * cli/cli-decode.c (not_just_help_class_command): Constify.
4239
4240 2017-09-27  Tom Tromey  <tom@tromey.com>
4241
4242         * gdb_bfd.c (maintenance_info_bfds): Constify.
4243
4244 2017-09-27  Tom Tromey  <tom@tromey.com>
4245
4246         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4247         overloads.
4248         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
4249         (do_const_cfunc): New function.
4250         (cmd_cfunc_eq): New overload.
4251         (cli_user_command_p): Check do_const_cfunc.
4252         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4253         const_cfunc.
4254         * command.h (add_cmd): Add const overload and no-function
4255         overload.
4256         (set_cmd_cfunc): Add const overload.
4257         (cmd_const_cfunc_ftype): Declare.
4258         (cmd_cfunc_eq): Add const overload.
4259         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4260         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4261         overload.
4262
4263 2017-09-27  Tom Tromey  <tom@tromey.com>
4264
4265         * macroexp.c (get_next_token_for_substitution): New function.
4266         (substitute_args): Call it.  Check for __VA_OPT__.
4267
4268 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4269             Pedro Alves <palves@redhat.com>
4270
4271         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4272         producer_is_icc_lt_14.
4273         (producer_is_icc_lt_14): New function.
4274         (check_producer): Add code for checking version of ICC.
4275         (producer_is_icc): Move to producer.c.
4276         (read_structure_type): Restrict ICC workaround to ICC<14.
4277         * producer.c: Include selftest.h.
4278         (producer_is_icc, producer_parsing_tests, _initialize_producer):
4279         New functions.
4280         * producer.h (producer_is_icc): New declaration.
4281
4282 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4283
4284         * Makefile.in (SFILES): Add producer.c.
4285         (COMMON_OBS): Add producer.o
4286         * amd64-tdep.c (producer.h): Add new include.
4287         * dwarf2read.c (producer.h): Add new include.
4288         * producer.c: New file.
4289         * producer.h: New file.
4290         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4291         producer.c.
4292         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4293         producer.h.
4294
4295 2017-09-26  Matthias Klose  <doko@ubuntu.com>
4296
4297         * configure.ac: Search ncursesw before ncurses.
4298         Check ncursesw/ncurses.h before ncurses/ncurses.h.
4299         * gdb_curses.h: Include <ncursesw/ncurses.h>
4300         * config.in, configure: Regenerate.
4301
4302 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4303
4304         PR gdb/22185
4305         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4306         obsolete.
4307         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4308         Remove i386sol2 support.
4309         * configure.nat <i386sol2>: Remove.
4310         <sol2-64>: Fold into ...
4311         <sol2>: ... this.
4312         Move common settings to default section.
4313         Add sol-thread.o.
4314         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4315         x86_64-*-solaris2.1[0-9]*>: Rename to ...
4316         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4317         <i[34567]86-*-solaris*>: Remove.
4318         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4319
4320         * configure.ac: Remove wctype in libw check.
4321         (_MSE_INT_H): Don't define on Solaris 7-9.
4322         <solaris*>: Remove libthread_db.so.1 check.
4323         * configure: Regenerate.
4324         * config.in: Regenerate.
4325
4326         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4327         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4328         (gdb_ps_size_t): Remove.
4329         Use base types in users.
4330         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4331
4332         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4333
4334 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4335
4336         PR build/22206
4337         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4338         (adi_is_addr_mapped): Likewise.
4339         (PSR_ICC): Don't redefine.
4340         (PSR_IMPL): Likewise.
4341
4342 2017-09-25  Tom Tromey  <tom@tromey.com>
4343
4344         * regcache.c (regcache::dump): Use string_printf.
4345
4346 2017-09-25  Tom Tromey  <tom@tromey.com>
4347
4348         * regcache.c (class regcache_invalidator): New.
4349         (struct register_to_invalidate): Remove.
4350         (make_cleanup_regcache_invalidate): Remove.
4351         (regcache::raw_write): Use regcache_invalidator.
4352
4353 2017-09-25  Tom Tromey  <tom@tromey.com>
4354
4355         * spu-tdep.c (spu2ppu_sniffer): Update.
4356         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4357         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4358         Remove.
4359         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4360         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4361         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4362         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4363         (frame_pop): Update.
4364
4365 2017-09-25  Tom Tromey  <tom@tromey.com>
4366
4367         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4368         * regcache.h (regcache_xfree): Don't declare.
4369         * regcache.c (regcache_xfree): Remove.
4370         (do_regcache_xfree): Use delete.
4371         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4372         * linux-fork.c (free_fork): Use delete.
4373         (fork_save_infrun_state): Likewise.
4374         * jit.c (jit_dealloc_cache): Use delete.
4375         * infrun.c (discard_infcall_suspend_state): Use delete.
4376
4377 2017-09-25  Tom Tromey  <tom@tromey.com>
4378
4379         * regcache.h (regcache_xmalloc): Don't declare.
4380         (regcache_raw_set_cached_value): Update comment.
4381         * regcache.c (regcache_xmalloc): Remove.
4382         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4383         * jit.c (jit_frame_sniffer): Use new.
4384         * frame.c (frame_save_as_regcache): Use new.
4385
4386 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4387
4388         * NEWS: Advertise support for guarded-storage registers on IBM z.
4389
4390 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4391
4392         * s390-linux-nat.c (have_regset_gs): New static variable.
4393         (s390_linux_fetch_inferior_registers): Handle guarded-storage
4394         control block and guarded-storage broadcast control regsets.
4395         (s390_read_description): Detect whether the target has
4396         guarded-storage support, return appropriate tdesc.
4397         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4398         (features/s390x-gs-linux64.c): Likewise.
4399         (struct gdbarch_tdep) <have_gs>: New field.
4400         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4401         (s390_gsbc_regset): New variables.
4402         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4403         and s390_gsbc_regset, if applicable.
4404         (s390_core_read_description): Check whether core file was from a
4405         target with guarded-storage support; include appropriate regsets.
4406         (s390_gdbarch_init): Add registers for guarded-storage support.
4407         (_initialize_s390_tdep): Initialize new target descriptions that
4408         include registers for guarded-storage support.
4409         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4410         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4411         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4412         (S390_NUM_REGS): Adjust macro definition.
4413         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4414         (tdesc_s390x_gs_linux64): New declarations.
4415
4416 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4417
4418         * features/s390-gs-linux64.xml: New file.
4419         * features/s390-gs.xml: New file.
4420         * features/s390-gsbc.xml: New file.
4421         * features/s390x-gs-linux64.xml: New file.
4422         * features/Makefile (WHICH): Add s390-gs-linux64 and
4423         s390x-gs-linux64.
4424         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4425         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4426         * features/s390-gs-linux64.c: New generated file.
4427         * features/s390x-gs-linux64.c: New file.
4428         * regformats/s390-gs-linux64.dat: New file.
4429         * regformats/s390x-gs-linux64.dat: New file.
4430
4431 2017-09-23  Tom Tromey  <tom@tromey.com>
4432
4433         * defs.h (make_cleanup_override_quit_handler): Don't declare.
4434
4435 2017-09-22  Tom Tromey  <tom@tromey.com>
4436
4437         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4438         type to scoped_restore_tmpl.
4439         <scoped_input_handler>: Initialize m_quit_handler directly.
4440
4441 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4442
4443         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4444         (cd_command): Likewise.  Free "current_directory" before
4445         assigning to it.
4446         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4447         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4448         * top.c (gdb_dirbuf): Remove global declaration.
4449         * top.h (gdb_dirbuf): Likewise.
4450
4451 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4452
4453         * gnulib/aclocal.m4: Regenerate.
4454         * gnulib/config.in: Regenerate.
4455         * gnulib/configure: Regenerate.
4456         * gnulib/import/Makefile.am: Regenerate.
4457         * gnulib/import/Makefile.in: Regenerate.
4458         * gnulib/import/assure.h: New file.
4459         * gnulib/import/at-func.c: Likewise
4460         * gnulib/import/chdir-long.c: New file.
4461         * gnulib/import/chdir-long.h: New file.
4462         * gnulib/import/cloexec.c: New file.
4463         * gnulib/import/cloexec.h: New file.
4464         * gnulib/import/close.c: New file.
4465         * gnulib/import/closedir.c: New file.
4466         * gnulib/import/dirent-private.h: New file.
4467         * gnulib/import/dup-safer.c: New file.
4468         * gnulib/import/dup.c: New file.
4469         * gnulib/import/dup2.c: New file.
4470         * gnulib/import/error.c: New file.
4471         * gnulib/import/error.h: New file.
4472         * gnulib/import/exitfail.c: New file.
4473         * gnulib/import/exitfail.h: New file.
4474         * gnulib/import/fchdir.c: New file.
4475         * gnulib/import/fcntl.c: New file.
4476         * gnulib/import/fcntl.in.h: New file.
4477         * gnulib/import/fd-hook.c: New file.
4478         * gnulib/import/fd-hook.h: New file.
4479         * gnulib/import/fd-safer.c: New file.
4480         * gnulib/import/fdopendir.c: New file.
4481         * gnulib/import/filename.h: New file.
4482         * gnulib/import/filenamecat-lgpl.c: New file.
4483         * gnulib/import/filenamecat.h: New file.
4484         * gnulib/import/fstat.c: New file.
4485         * gnulib/import/fstatat.c: New file.
4486         * gnulib/import/getcwd-lgpl.c: New file.
4487         * gnulib/import/getcwd.c: New file.
4488         * gnulib/import/getdtablesize.c: New file.
4489         * gnulib/import/getlogin_r.c: New file.
4490         * gnulib/import/getprogname.c: New file.
4491         * gnulib/import/getprogname.h: New file.
4492         * gnulib/import/gettext.h: New file.
4493         * gnulib/import/glob-libc.h: New file.
4494         * gnulib/import/glob.c: New file.
4495         * gnulib/import/glob.in.h: New file.
4496         * gnulib/import/intprops.h: New file.
4497         * gnulib/import/m4/chdir-long.m4: New file.
4498         * gnulib/import/m4/close.m4: New file.
4499         * gnulib/import/m4/closedir.m4: New file.
4500         * gnulib/import/m4/d-ino.m4: New file.
4501         * gnulib/import/m4/d-type.m4: New file.
4502         * gnulib/import/m4/dup.m4: New file.
4503         * gnulib/import/m4/dup2.m4: New file.
4504         * gnulib/import/m4/error.m4: New file.
4505         * gnulib/import/m4/fchdir.m4: New file.
4506         * gnulib/import/m4/fcntl.m4: New file.
4507         * gnulib/import/m4/fcntl_h.m4: New file.
4508         * gnulib/import/m4/fdopendir.m4: New file.
4509         * gnulib/import/m4/filenamecat.m4: New file.
4510         * gnulib/import/m4/fstat.m4: New file.
4511         * gnulib/import/m4/fstatat.m4: New file.
4512         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4513         * gnulib/import/m4/getcwd-path-max.m4: New file.
4514         * gnulib/import/m4/getcwd.m4: New file.
4515         * gnulib/import/m4/getdtablesize.m4: New file.
4516         * gnulib/import/m4/getlogin_r.m4: New file.
4517         * gnulib/import/m4/getprogname.m4: New file.
4518         * gnulib/import/m4/glob.m4: New file.
4519         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4520         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4521         * gnulib/import/m4/mempcpy.m4: New file.
4522         * gnulib/import/m4/memrchr.m4: New file.
4523         * gnulib/import/m4/mode_t.m4: New file.
4524         * gnulib/import/m4/msvc-inval.m4: New file.
4525         * gnulib/import/m4/msvc-nothrow.m4: New file.
4526         * gnulib/import/m4/open.m4: New file.
4527         * gnulib/import/m4/openat.m4: New file.
4528         * gnulib/import/m4/opendir.m4: New file.
4529         * gnulib/import/m4/readdir.m4: New file.
4530         * gnulib/import/m4/realloc.m4: New file.
4531         * gnulib/import/m4/rewinddir.m4: New file.
4532         * gnulib/import/m4/save-cwd.m4: New file.
4533         * gnulib/import/m4/strdup.m4: New file.
4534         * gnulib/import/m4/strerror.m4: New file.
4535         * gnulib/import/m4/unistd-safer.m4: New file.
4536         * gnulib/import/mempcpy.c: New file.
4537         * gnulib/import/memrchr.c: New file.
4538         * gnulib/import/msvc-inval.c: New file.
4539         * gnulib/import/msvc-inval.h: New file.
4540         * gnulib/import/msvc-nothrow.c: New file.
4541         * gnulib/import/msvc-nothrow.h: New file.
4542         * gnulib/import/open.c: New file.
4543         * gnulib/import/openat-die.c: New file.
4544         * gnulib/import/openat-priv.h: New file.
4545         * gnulib/import/openat-proc.c: New file.
4546         * gnulib/import/openat.c: New file.
4547         * gnulib/import/openat.h: New file.
4548         * gnulib/import/opendir.c: New file.
4549         * gnulib/import/pipe-safer.c: New file.
4550         * gnulib/import/readdir.c: New file.
4551         * gnulib/import/realloc.c: New file.
4552         * gnulib/import/rewinddir.c: New file.
4553         * gnulib/import/save-cwd.c: New file.
4554         * gnulib/import/save-cwd.h: New file.
4555         * gnulib/import/strdup.c: New file.
4556         * gnulib/import/strerror-override.c: New file.
4557         * gnulib/import/strerror-override.h: New file.
4558         * gnulib/import/strerror.c: New file.
4559         * gnulib/import/unistd--.h: New file.
4560         * gnulib/import/unistd-safer.h: New file.
4561         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4562         "getcwd" and "glob".
4563         * ser-tcp.c: Undefine "close" before redefining it.
4564
4565 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4566
4567         * guile/scm-value.c (gdbscm_value_address): Initialize address,
4568         get rid of res_val.
4569
4570 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4571
4572         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4573         <sol2,sparc>: Likewise.
4574         <sol2-64,i386>: Likewise.
4575
4576         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4577         -Wdeprecated-declarations on *-*-solaris*.
4578         * configure: Regenerate.
4579
4580         * procfs.c: Include "nat/inferior.h".
4581         (procfs_info_proc): Fix typo.
4582
4583 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4584
4585         * remote.c (vector): Include.
4586         (struct private_thread_info): Add field, thread_handle.
4587         (free_private_thread_info): Deallocate storage associated with
4588         thread handle.
4589         (get_private_info_thread): Initialize `thread_handle' field.
4590         (struct thread_item): Add field, thread_handle.
4591         (clear_threads_listing_context): Deallocate storage associated
4592         with thread handle.
4593         (start_thread): Add support for "handle" attribute.
4594         (thread_attributes): Add "handle".
4595         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4596         field.
4597         (remote_update_thread_list): Update thread_handle.
4598         (remote_thread_handle_to_thread_info): New function.
4599         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4600
4601 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4602
4603         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4604         function.
4605         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4606         * python/python-internal.h (thread_object_type): Declare.
4607
4608 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4609
4610         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4611         (target_thread_handle_to_thread_info): Declare.
4612         * target.c (target_thread_handle_to_thread_info): New function.
4613         * target-delegates.c: Regenerate.
4614         * gdbthread.h (find_thread_by_handle): Declare.
4615         * thread.c (find_thread_by_handle): New function.
4616         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4617         function.
4618         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4619
4620 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4621
4622         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4623
4624 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4625
4626         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4627
4628 2017-09-21  Yao Qi  <yao.qi@linaro.org>
4629
4630         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4631         to gdb_target_obs.
4632
4633 2017-09-20  Tom Tromey  <tom@tromey.com>
4634
4635         * breakpoint.c (struct counted_command_line): Remove.
4636         (breakpoint_commands): Update.
4637         (alloc_counted_command_line, incref_counted_command_line)
4638         (decref_counted_command_line, do_cleanup_counted_command_line)
4639         (make_cleanup_decref_counted_command_line): Remove.
4640         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4641         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4642         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4643         (save_breakpoints): Update.
4644         * breakpoint.h (counted_command_line): Now a typedef to
4645         shared_ptr.
4646         (struct breakpoint) <commands>: Now a counted_command_line.
4647         (struct bpstats) <command>: Likewise.
4648
4649 2017-09-20  Tom Tromey  <tom@tromey.com>
4650
4651         * breakpoint.c (struct commands_info, do_map_commands_command):
4652         Remove.
4653         (commands_command_1): Update.
4654         (iterate_over_related_breakpoints): Take a function_view.
4655         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4656         (delete_command): Update.
4657         (map_breakpoint_numbers): Take a function_view.
4658         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4659         (disable_command): Update.
4660         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4661         (enable_command): Update.
4662         (struct disp_data, do_enable_breakpoint_disp)
4663         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4664         (do_map_enable_delete_breakpoint): Remove.
4665         (enable_once_command, enable_count_command, enable_delete_command)
4666         (delete_trace_variable_command): Update.
4667
4668 2017-09-20  Tom Tromey  <tom@tromey.com>
4669
4670         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
4671         (bpstat_clear): Use delete.
4672         (bpstats): New constructors.
4673         (bpstat_copy, bpstat_stop_status): Use new.
4674         (dprintf_after_condition_true): Update.
4675         * breakpoint.h (bpstats::bpstats): Add constructors.
4676         (bpstats::~bpstats): Add destructor.
4677
4678 2017-09-20  Pedro Alves  <palves@redhat.com>
4679
4680         * eval.c (make_params): Delete, refactored as ...
4681         (class fake_method): ... this new type's ctor.
4682         (fake_method::~fake_method): New.
4683         (evaluate_subexp_standard): Use 'fake_method'.
4684
4685 2017-09-20  Tom Tromey  <tom@tromey.com>
4686
4687         * windows-nat.c (get_windows_debug_event, windows_wait)
4688         (do_initial_windows_stuff, windows_attach): Update.
4689         * utils.c (vwarning, internal_vproblem): Update.
4690         (ui_unregister_input_event_handler_cleanup)
4691         (prepare_to_handle_input): Remove.
4692         (class scoped_input_handler): New.
4693         (defaulted_query, prompt_for_continue): Update.
4694         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4695         Update.
4696         * top.c (undo_terminal_modifications_before_exit): Update.
4697         * target/target.h (target_terminal_init, target_terminal_inferior)
4698         (target_terminal_ours): Don't declare.
4699         (class target_terminal): New.
4700         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4701         (target_terminal_ours_for_output)
4702         (make_cleanup_restore_target_terminal): Don't declare.
4703         (target_terminal_info): Remove.
4704         * target.c (enum terminal_state, terminal_state): Remove.
4705         (target_terminal::terminal_state): Define.
4706         (target_terminal::init): Rename from target_terminal_init.
4707         (target_terminal::inferior): Rename from
4708         target_terminal_inferior.
4709         (target_terminal::ours): Rename from target_terminal_ours.
4710         (target_terminal::ours_for_output): Rename from
4711         target_terminal_ours_for_output.
4712         (target_terminal::info): New method.
4713         (cleanup_restore_target_terminal)
4714         (make_cleanup_restore_target_terminal): Remove.
4715         * solib.c (handle_solib_event): Update.
4716         * remote.c (remote_serial_quit_handler): Update.
4717         (remote_terminal_inferior, remote_wait_as): Update.
4718         * record-full.c (record_full_wait_1): Update.
4719         * nto-procfs.c (procfs_create_inferior): Update.
4720         * nat/fork-inferior.c (startup_inferior): Update.
4721         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4722         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4723         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4724         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4725         (mi_breakpoint_created, mi_breakpoint_deleted)
4726         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4727         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4728         (mi_user_selected_context_changed, report_initial_inferior):
4729         Update.
4730         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4731         (linux_nat_terminal_inferior): Update.
4732         * infrun.c (follow_fork_inferior)
4733         (handle_vfork_child_exec_or_exit, do_target_resume)
4734         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4735         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4736         Update.
4737         * inflow.c (child_terminal_init, info_terminal_command): Update.
4738         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4739         (attach_command): Update.
4740         * infcall.c (call_thread_fsm_should_stop): Update.
4741         * gnu-nat.c (gnu_attach): Update.
4742         * extension.c (struct active_ext_lang_state)
4743         (restore_active_ext_lang): Update.
4744         * exceptions.c (print_flush): Update.
4745         * event-top.c (async_enable_stdin, default_quit_handler): Update.
4746         (struct quit_handler_cleanup_data, restore_quit_handler)
4747         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4748         Remove.
4749         * cp-support.c (gdb_demangle): Update.
4750         * breakpoint.c (update_inserted_breakpoint_locations)
4751         (insert_breakpoint_locations, handle_jit_event)
4752         (disable_breakpoints_in_unloaded_shlib): Update.
4753         * annotate.c (annotate_breakpoints_invalid)
4754         (annotate_frames_invalid): Update.
4755
4756 2017-09-20  Tom Tromey  <tom@tromey.com>
4757
4758         * main.c (catch_command_errors): Rename from
4759         catch_command_errors_const.
4760         (captured_main_1): Update.
4761
4762 2017-09-20  Pedro Alves  <palves@redhat.com>
4763
4764         * cli/cli-cmds.c (list_command): Use print_sal_location.
4765         (print_sal_location): New function.
4766         (ambiguous_line_spec): Use print_sal_location.
4767         * linespec.c (symbol_to_sal): Record the symbol in the sal.
4768         * symtab.c (find_function_start_sal): Likewise.
4769         * symtab.h (symtab_and_line::symbol): New field.
4770
4771 2017-09-20  Pedro Alves  <palves@redhat.com>
4772
4773         * linespec.c (minsym_found): Handle non-text minsyms.
4774         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
4775
4776 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4777
4778         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
4779         backslash.
4780
4781 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4782
4783         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
4784         vmovups instead vmovaps.
4785         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
4786
4787 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
4788
4789         * NEWS (Changes since GDB 8.0): Add starti.
4790         * infcmd.c (enum run_break): New.
4791         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
4792         case.
4793         (run_command): Use enum run_how.
4794         (start_command): Likewise.
4795         (starti_command): New function.
4796         (RUN_ARGS_HELP): New macro.
4797         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
4798         commands.  Add starti command.
4799
4800 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4801
4802         * Makefile.in (monitor.o): Remove the rule.
4803
4804 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4805
4806         * annotate.h (struct annotate_arg_emitter): Use
4807         DISABLE_COPY_AND_ASSIGN.
4808         * common/refcounted-object.h (refcounted_object): Likewise.
4809         * completer.h (struct completion_result): Likewise.
4810         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
4811         * filename-seen-cache.h (filename_seen_cache): Likewise.
4812         * gdbcore.h (thread_section_name): Likewise.
4813         * gdb_regex.h (compiled_regex): Likewise.
4814         * gdbthread.h (scoped_restore_current_thread): Likewise.
4815         * inferior.h (scoped_restore_current_inferior): Likewise.
4816         * jit.c (jit_reader): Likewise.
4817         * linespec.h (struct linespec_result): Likewise.
4818         * mi/mi-parse.h (struct mi_parse): Likewise.
4819         * nat/fork-inferior.c (execv_argv): Likewise.
4820         * progspace.h (scoped_restore_current_program_space): Likewise.
4821         * python/python-internal.h (class gdbpy_enter): Likewise.
4822         * regcache.h (regcache): Likewise.
4823         * target-descriptions.c (struct tdesc_reg): Likewise.
4824         (struct tdesc_type): Likewise.
4825         (struct tdesc_feature): Likewise.
4826         * ui-out.h (ui_out_emit_type): Likewise.
4827
4828 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
4829
4830         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
4831         label abort_expression.
4832
4833 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4834
4835         * common/buffer.c (buffer_xml_printf): Adjust.
4836         * common/xml-utils.c (xml_escape_text): Change return type to
4837         std::string, update code accordingly.
4838         * common/xml-utils.h (xml_escape_text): Change return type to
4839         std::string.
4840         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
4841         * windows-tdep.c (windows_xfer_shared_library): Adjust.
4842         * unittests/xml-utils-selftests.c (test_xml_escape_text):
4843         Adjust.
4844
4845 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4846
4847         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
4848         (SUBDIR_UNITTESTS_OBS): Add new object file.
4849         * unittests/xml-utils-selftests.c: New file.
4850
4851 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4852
4853         * common/selftest.h (selftest): New struct/interface.
4854         (register_test): Add name parameter, add new overload.
4855         (run_tests): Add filter parameter.
4856         (for_each_selftest_ftype): New typedef.
4857         (for_each_selftest): New declaration.
4858         * common/selftest.c (tests): Change type to
4859         map<string, unique_ptr<selftest>>.
4860         (simple_selftest): New struct.
4861         (register_test): New function.
4862         (register_test): Add name parameter and use it.
4863         (run_tests): Add filter parameter and use it.  Add prints.
4864         Adjust to vector -> map change.
4865         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
4866         registering selftests.
4867         * arm-tdep.c (_initialize_arm_tdep): Likewise.
4868         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
4869         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
4870         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
4871         * findvar.c (_initialize_findvar): Likewise.
4872         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
4873         * maint.c (maintenance_selftest): Update call to run_tests.
4874         (maintenance_info_selftests): New function.
4875         (_initialize_maint_cmds): Register "maintenance info selftests"
4876         command.  Update "maintenance selftest" doc.
4877         * regcache.c (_initialize_regcache): Add names when registering
4878         selftests.
4879         * rust-exp.y (_initialize_rust_exp): Likewise.
4880         * selftest-arch.c (gdbarch_selftest): New struct.
4881         (gdbarch_tests): Remove.
4882         (register_test_foreach_arch): Add name parameter.  Call
4883         register_test.
4884         (tests_with_arch): Remove, move most content to
4885         gdbarch_selftest::operator().
4886         (_initialize_selftests_foreach_arch): Remove.
4887         * selftest-arch.h (register_test_foreach_arch): Add name
4888         parameter.
4889         (run_tests_with_arch): New declaration.
4890         * utils-selftests.c (_initialize_utils_selftests): Add names
4891         when registering selftests.
4892         * utils.c (_initialize_utils): Likewise.
4893         * unittests/array-view-selftests.c
4894         (_initialize_array_view_selftests): Likewise.
4895         * unittests/environ-selftests.c (_initialize_environ_selftests):
4896         Likewise.
4897         * unittests/function-view-selftests.c
4898         (_initialize_function_view_selftests): Likewise.
4899         * unittests/offset-type-selftests.c
4900         (_initialize_offset_type_selftests): Likewise.
4901         * unittests/optional-selftests.c
4902         (_initialize_optional_selftests): Likewise.
4903         * unittests/scoped_restore-selftests.c
4904         (_initialize_scoped_restore_selftests): Likewise.
4905         * NEWS: Document "maintenance selftest" and "maint info
4906         selftests".
4907
4908 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4909
4910         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
4911         scoped_restore.
4912
4913 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4914
4915         * mi/mi-main.c (mi_load_progress): Make uiout variable
4916         a unique_ptr.
4917
4918 2017-09-15  Pedro Alves  <palves@redhat.com>
4919
4920         * compile/compile-c-types.c (convert_enum, convert_int)
4921         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
4922
4923 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
4924
4925         * dwarf2read.c (copy_string): Remove.
4926         (parse_macro_definition): Replace copy_string with savestring.
4927
4928 2017-09-15  Yao Qi  <yao.qi@linaro.org>
4929
4930         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
4931         gdb_target_obs.
4932         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
4933         Likewise.
4934         (i[34567]86-*-linux*): Likewise.
4935
4936 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4937
4938         * dwarf2expr.h (dwarf_stack_value): Add constructor.
4939         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
4940         <stack>: Change type to std::vector.
4941         <stack_len, stack_allocated>: Remove.
4942         <grow_stack>: Remove.
4943         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4944         (dwarf_expr_context::~dwarf_expr_context): Remove.
4945         (dwarf_expr_context::grow_stack): Remove.
4946         (dwarf_expr_context::push): Adjust.
4947         (dwarf_expr_context::pop): Adjust.
4948         (dwarf_expr_context::fetch): Adjust.
4949         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
4950         (dwarf_expr_context::stack_empty_p): Adjust.
4951         (dwarf_expr_context::execute_stack_op): Adjust.
4952
4953 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4954
4955         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
4956         return type to bool.
4957         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
4958
4959 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4960
4961         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
4962         Change type to bool.
4963         (dwarf_stack_value) <in_stack_memory>: Likewise.
4964         (dwarf_expr_context) <push_address>: Change parameter type to
4965         bool.
4966         <fetch_in_stack_memory>: Change return type to bool.
4967         <push>: Change parameter type to bool.
4968         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
4969         to bool.
4970         (dwarf_expr_context::push_address): Likewise.
4971         (dwarf_expr_context::fetch_in_stack_memory): Change return type
4972         to bool.
4973         (dwarf_expr_context::execute_stack_op): Adjust.
4974         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
4975
4976 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4977
4978         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
4979         (struct dwarf_expr_context) <n_pieces>: Remove.
4980         <pieces>: Change type to std::vector.
4981         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4982         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
4983         pieces.
4984         (dwarf_expr_context::add_piece): Adjust.
4985         * dwarf2loc.c (struct piece_closure): Initialize fields.
4986         <n_pieces>: Remove.
4987         <pieces>: Change type to std::vector.
4988         (allocate_piece_closure): Adjust, change parameter to
4989         std::vector rvalue and std::move it to piece_closure.
4990         (rw_pieced_value): Adjust.
4991         (check_pieced_synthetic_pointer): Adjust.
4992         (indirect_synthetic_pointer): Adjust.
4993         (coerce_pieced_ref): Adjust.
4994         (free_pieced_value_closure):  Adjust.  Use delete to free
4995         piece_closure.
4996         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
4997         to allocate_piece_closure.
4998         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
4999
5000 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5001
5002         * probe.h (probe_ops_cp): Remove typedef.
5003         (DEF_VEC_P (probe_ops_cp)): Remove.
5004         (all_probe_ops): Change type to std::vector.
5005         * probe.c (info_probes_for_ops): Adjust to vector change.
5006         (probe_linespec_to_ops): Likewise.
5007         (all_probe_ops): Change type to std::vector.
5008         (_initialize_probe): Adjust to vector change.
5009         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5010         * elfread.c (elf_get_probes): Likewise.
5011         * stap-probe.c (_initialize_stap_probe): Likewise.
5012
5013 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5014
5015         * probe.h (struct bound_probe): Define constructors.
5016         * probe.c (bound_probe_s): Remove typedef.
5017         (DEF_VEC_O (bound_probe_s)): Remove VEC.
5018         (collect_probes): Change return type to std::vector, remove
5019         cleanup.
5020         (compare_probes): Return bool, change parameter type.  Change
5021         semantic to "less than".
5022         (gen_ui_out_table_header_info): Change parameter to std::vector
5023         and update.
5024         (exists_probe_with_pops): Likewise.
5025         (info_probes_for_ops): Update to std::vector change.
5026         (enable_probes_command): Likewise.
5027         (disable_probes_command): Likewise.
5028
5029 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5030
5031         * probe.h (struct probe_ops) <get_probes>: Change parameter from
5032         vec to std::vector.
5033         * probe.c (parse_probes_in_pspace): Update.
5034         (find_probes_in_objfile): Update.
5035         (find_probe_by_pc): Update.
5036         (collect_probes): Update.
5037         (probe_any_get_probes): Update.
5038         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5039         return type to reference to std::vector.
5040         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5041         std::vector and update.
5042         (dtrace_process_dof): Likewise.
5043         (dtrace_get_probes): Likewise.
5044         * elfread.c (elf_get_probes): Change return type to std::vector,
5045         store an std::vector in bfd_data.
5046         (probe_key_free): Update to std::vector.
5047         * stap-probe.c (handle_stap_probe): Change parameter to
5048         std::vector and update.
5049         (stap_get_probes): Likewise.
5050         * symfile-debug.c (debug_sym_get_probes): Change return type to
5051         std::vector and update.
5052
5053 2017-09-11  Tom Tromey  <tom@tromey.com>
5054
5055         * breakpoint.c (program_breakpoint_here_p): Update.
5056         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5057         from make_show_memory_breakpoints_cleanup.  Return a
5058         scoped_restore_tmpl<int>.
5059         (restore_show_memory_breakpoints): Remove.
5060         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5061         * mem-break.c (memory_validate_breakpoint): Update.
5062         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5063         (ia64_memory_remove_breakpoint): Update.
5064         (ia64_breakpoint_from_pc): Update.
5065         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5066         from make_show_memory_breakpoints_cleanup.
5067
5068 2017-09-11  Tom Tromey  <tom@tromey.com>
5069
5070         * d-namespace.c (d_lookup_symbol): Use std::string.
5071         (find_symbol_in_baseclass): Likewise.
5072
5073 2017-09-11  Tom Tromey  <tom@tromey.com>
5074
5075         * ctf.c (ctf_start): Use std::string.
5076
5077 2017-09-11  Tom Tromey  <tom@tromey.com>
5078
5079         * ada-lang.c (is_known_support_routine): Update.
5080         (ada_unhandled_exception_name_addr_from_raise): Update.
5081         * guile/scm-frame.c (gdbscm_frame_name): Update.
5082         * python/py-frame.c (frapy_name): Update.
5083         (frapy_function): Update.
5084         * stack.h (find_frame_funname): Update.
5085         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5086         (print_frame): Update.
5087
5088 2017-09-11  Tom Tromey  <tom@tromey.com>
5089
5090         * findcmd.c (put_bits): Take a gdb::byte_vector.
5091         (parse_find_args): Return gdb::byte_vector.  "args" now const.
5092         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
5093         cleanups.
5094         (find_command): Update.
5095
5096 2017-09-11  Tom Tromey  <tom@tromey.com>
5097
5098         * cli/cli-script.c (class scoped_restore_hook_in): New.
5099         (clear_hook_in_cleanup): Remove.
5100         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5101         scoped_restore_hook_in.
5102
5103 2017-09-11  Tom Tromey  <tom@tromey.com>
5104
5105         * cli/cli-script.c (restore_interp): Remove.
5106         (read_command_lines): Use scoped_restore_interp.
5107         * interps.c (scoped_restore_interp::set_temp): Rename from
5108         interp_set_temp.
5109         * interps.h (class scoped_restore_interp): New.
5110         (interp_set_temp): Remove.
5111
5112 2017-09-11  Tom Tromey  <tom@tromey.com>
5113
5114         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5115         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5116         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5117         scoped_restore.
5118         (mi_cmd_break_insert_1): Update.
5119         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5120         scoped_restore.
5121
5122 2017-09-11  Tom Tromey  <tom@tromey.com>
5123
5124         * demangle.c (demangle_command): Update.
5125         * breakpoint.c (disable_command): Update.
5126         (enable_command): Update.
5127         (find_location_by_number): Make "number" const.  Use
5128         get_number_trailer.
5129         * cli/cli-utils.c (extract_arg): Return std::string.
5130         * probe.c (parse_probe_linespec): Update.  Change types.
5131         (collect_probes): Take string arguments.
5132         (parse_probe_linespec): Likewise.
5133         (info_probes_for_ops): Update.
5134         (enable_probes_command): Update.
5135         (disable_probes_command): Update.
5136         * break-catch-sig.c (catch_signal_split_args): Update.
5137         * mi/mi-parse.c (mi_parse): Update.
5138
5139 2017-09-11  Tom Tromey  <tom@tromey.com>
5140
5141         * language.h (language_enum): Make argument const.
5142         * language.c (language_enum): Make argument const.
5143
5144 2017-09-11  Tom Tromey  <tom@tromey.com>
5145
5146         * common/common-utils.h (skip_to_space): Remove macro, redeclare
5147         as function.
5148         (skip_to_space): Rename from skip_to_space_const.
5149         * common/common-utils.c (skip_to_space): New function.
5150         (skip_to_space): Rename from skip_to_space_const.
5151         * cli/cli-utils.h (get_number): Rename from get_number_const.
5152         (extract_arg): Rename from extract_arg_const.
5153         * cli/cli-utils.c (get_number): Rename from get_number_const.
5154         (extract_arg): Rename from extract_arg_const.
5155         (number_or_range_parser::get_number): Use ::get_number.
5156         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5157         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5158         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5159         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5160         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5161         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5162         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5163         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5164
5165 2017-09-11  Tom Tromey  <tom@tromey.com>
5166
5167         * python/python.c (do_start_initialization): Use
5168         py-event-types.def to initialize types.
5169         Define all object type structures.
5170         * python/python-internal.h: Don't declare event initialization
5171         functions.
5172         * python/py-threadevent.c (thread_event_object_type): Don't
5173         define.
5174         * python/py-stopevent.c (stop_event_object_type): Don't define.
5175         * python/py-signalevent.c (signal_event_object_type): Don't
5176         declare or define.
5177         * python/py-newobjfileevent.c (new_objfile_event_object_type)
5178         (clear_objfiles_event_object_type): Don't declare or define.
5179         * python/py-infevents.c (inferior_call_pre_event_object_type)
5180         (inferior_call_post_event_object_type)
5181         (register_changed_event_object_type)
5182         (memory_changed_event_object_type): Don't declare or define.
5183         * python/py-inferior.c (new_thread_event_object_type)
5184         (new_inferior_event_object_type)
5185         (inferior_deleted_event_object_type): Don't declare or define.
5186         * python/py-exitedevent.c (exited_event_object_type): Don't
5187         declare or define.
5188         * python/py-evts.c (gdbpy_initialize_py_events): Use
5189         py-all-events.def.
5190         * python/py-events.h (thread_event_object_type): Don't declare.
5191         (events_object): Use py-all-events.def.
5192         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
5193         py-event-types.def.
5194         * python/py-event-types.def: New file.
5195         * python/py-continueevent.c (create_continue_event_object): Don't
5196         declare or define.
5197         * python/py-bpevent.c (breakpoint_event_object_type): Don't
5198         declare or define.
5199         * python/py-all-events.def: New file.
5200
5201 2017-09-11  Tom Tromey  <tom@tromey.com>
5202
5203         * python/py-threadevent.c (create_thread_event_object): Return
5204         gdbpy_ref.
5205         * python/py-stopevent.h (create_stop_event_object)
5206         (create_breakpoint_event_object, create_signal_event_object):
5207         Update.
5208         * python/py-stopevent.c (create_stop_event_object): Return
5209         gdbpy_ref.
5210         (emit_stop_event): Update.
5211         * python/py-signalevent.c (create_signal_event_object): Return
5212         gdbpy_ref.
5213         * python/py-infevents.c (create_inferior_call_event_object):
5214         Update.
5215         * python/py-event.h (create_event_object)
5216         (create_thread_event_object): Update.
5217         * python/py-event.c (create_event_object): Return gdbpy_ref.
5218         * python/py-continueevent.c: Return gdbpy_ref.
5219         * python/py-bpevent.c (create_breakpoint_event_object): Return
5220         gdbpy_ref.
5221
5222 2017-09-11  Tom Tromey  <tom@tromey.com>
5223
5224         PR python/15622:
5225         * NEWS: Add entry.
5226         * python/python.c (do_start_initialization): Initialize new event
5227         types.
5228         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5229         (gdbpy_initialize_inferior_deleted_event)
5230         (gdbpy_initialize_new_thread_event): Declare.
5231         * python/py-threadevent.c (create_thread_event_object): Add option
5232         "thread" parameter.
5233         * python/py-inferior.c (new_thread_event_object_type)
5234         (new_inferior_event_object_type)
5235         (inferior_deleted_event_object_type): Declare.
5236         (python_new_inferior, python_inferior_deleted): New functions.
5237         (add_thread_object): Emit new_thread event.
5238         (gdbpy_initialize_inferior): Attach new functions to corresponding
5239         observers.
5240         (new_thread, new_inferior, inferior_deleted): Define new event
5241         types.
5242         * python/py-evts.c (gdbpy_initialize_py_events): Add new
5243         registries.
5244         * python/py-events.h (events_object) <new_inferior,
5245         inferior_deleted, new_thread>: New fields.
5246         * python/py-event.h (create_thread_event_breakpoint): Add optional
5247         "thread" parameter.
5248
5249 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5250
5251         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5252         check current_ui instead.
5253         (internal_vproblem): Likewise.
5254
5255 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
5256
5257         * thread.c (print_thread_info_1): Remove unnecessary calls to
5258         uiout->is_mi_like_p.
5259
5260 2017-09-09  Tom Tromey  <tom@tromey.com>
5261
5262         * namespace.h (add_using_directive): Update.
5263         * namespace.c (add_using_directive): Change type of excludes to
5264         std::vector.
5265         * dwarf2read.c (read_import_statement): Use std::vector.
5266         (read_namespace): Update.
5267         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5268
5269 2017-09-09  Tom Tromey  <tom@tromey.com>
5270
5271         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5272
5273 2017-09-09  Tom Tromey  <tom@tromey.com>
5274
5275         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5276
5277 2017-09-09  Tom Tromey  <tom@tromey.com>
5278
5279         * stack.c (func_command): Use gdb::def_vector.
5280
5281 2017-09-09  Tom Tromey  <tom@tromey.com>
5282
5283         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5284         ui_out_emit_list, ui_out_emit_tuple.
5285         (mi_cmd_var_update): Likewise.
5286
5287 2017-09-09  Tom Tromey  <tom@tromey.com>
5288
5289         * mi/mi-interp.c (mi_user_selected_context_changed): Use
5290         ui_out_redirect_pop.
5291         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5292         ui_out_redirect_pop.
5293         * utils.c (do_ui_out_redirect_pop)
5294         (make_cleanup_ui_out_redirect_pop): Remove.
5295         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5296         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5297         * ui-out.h (ui_out_redirect_pop): New class.
5298
5299 2017-09-09  Tom Tromey  <tom@tromey.com>
5300
5301         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5302         (list_available_thread_groups, mi_cmd_list_thread_groups)
5303         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5304         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5305         Likewise.
5306
5307 2017-09-09  Tom Tromey  <tom@tromey.com>
5308
5309         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5310         ui_out_emit_tuple.
5311
5312 2017-09-09  Tom Tromey  <tom@tromey.com>
5313
5314         * target.c (flash_erase_command): Use ui_out_emit_tuple.
5315         * stack.c (print_frame): Use ui_out_emit_tuple.
5316         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5317         (info_spu_mailbox_command, info_spu_dma_command)
5318         (info_spu_proxydma_command): Likewise.
5319         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5320         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5321         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5322         ui_out_emit_tuple.
5323         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5324
5325 2017-09-09  Tom Tromey  <tom@tromey.com>
5326
5327         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5328         (class ui_out_emit_table): Update comment.
5329         * ui-out.c (do_cleanup_table_end)
5330         (make_cleanup_ui_out_table_begin_end): Remove.
5331         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5332         (info_spu_dma_cmdlist): Likewise.
5333         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5334         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5335         ui_out_emit_table.
5336
5337 2017-09-09  Tom Tromey  <tom@tromey.com>
5338
5339         * thread.c (print_thread_info_1): Use ui_out_emit_table,
5340         ui_out_emit_list, gdb::optional.
5341
5342 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
5343
5344         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5345         prototype.
5346         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5347         prototype.
5348         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5349         prototype.
5350         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5351         * ada-exp.y: Remove _initialize_ada_exp prototype.
5352         * ada-lang.c: Remove _initialize_ada_language prototype.
5353         * ada-tasks.c: Remove _initialize_tasks prototype.
5354         * addrmap.c: Remove _initialize_addrmap prototype.
5355         * agent.c: Remove _initialize_agent prototype.
5356         * aix-thread.c: Remove _initialize_aix_thread prototype.
5357         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5358         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5359         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5360         prototype.
5361         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5362         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5363         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5364         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5365         prototype.
5366         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5367         prototype.
5368         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5369         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5370         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5371         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5372         prototype.
5373         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5374         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5375         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5376         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5377         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5378         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5379         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5380         prototype.
5381         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5382         prototype.
5383         * annotate.c: Remove _initialize_annotate prototype.
5384         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5385         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5386         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5387         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5388         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5389         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5390         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5391         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5392         prototype.
5393         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5394         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5395         * auto-load.c: Remove _initialize_auto_load prototype.
5396         * auxv.c: Remove _initialize_auxv prototype.
5397         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5398         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5399         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5400         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5401         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5402         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5403         prototype.
5404         * break-catch-throw.c: Remove _initialize_break_catch_throw
5405         prototype.
5406         * breakpoint.c: Remove _initialize_breakpoint prototype.
5407         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5408         * btrace.c: Remove _initialize_btrace prototype.
5409         * charset.c: Remove _initialize_charset prototype.
5410         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5411         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5412         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5413         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5414         * cli/cli-script.c: Remove _initialize_cli_script prototype.
5415         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5416         * coffread.c: Remove _initialize_coffread prototype.
5417         * compile/compile.c: Remove _initialize_compile prototype.
5418         * complaints.c: Remove _initialize_complaints prototype.
5419         * completer.c: Remove _initialize_completer prototype.
5420         * copying.awk: Remove _initialize_copying prototype.
5421         * copying.c: Regenerate.
5422         * core-regset.c: Remove _initialize_core_regset prototype.
5423         * corefile.c: Remove _initialize_core prototype.
5424         * corelow.c: Remove _initialize_corelow prototype.
5425         * cp-abi.c: Remove _initialize_cp_abi prototype.
5426         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5427         * cp-support.c: Remove _initialize_cp_support prototype.
5428         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5429         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5430         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5431         * ctf.c: Remove _initialize_ctf prototype.
5432         * d-lang.c: Remove _initialize_d_language prototype.
5433         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5434         prototype.
5435         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5436         * dbxread.c: Remove _initialize_dbxread prototype.
5437         * dcache.c: Remove _initialize_dcache prototype.
5438         * demangle.c: Remove _initialize_demangler prototype.
5439         * disasm-selftests.c: Remove _initialize_disasm_selftests
5440         prototype.
5441         * disasm.c: Remove _initialize_disasm prototype.
5442         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5443         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5444         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5445         prototype.
5446         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5447         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5448         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5449         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5450         * elfread.c: Remove _initialize_elfread prototype.
5451         * exec.c: Remove _initialize_exec prototype.
5452         * extension.c: Remove _initialize_extension prototype.
5453         * f-lang.c: Remove _initialize_f_language prototype.
5454         * f-valprint.c: Remove _initialize_f_valprint prototype.
5455         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5456         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5457         * filesystem.c: Remove _initialize_filesystem prototype.
5458         * findcmd.c: Remove _initialize_mem_search prototype.
5459         * fork-child.c: Remove _initialize_fork_child prototype.
5460         * frame-base.c: Remove _initialize_frame_base prototype.
5461         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5462         * frame.c: Remove _initialize_frame prototype.
5463         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5464         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5465         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5466         * gcore.c: Remove _initialize_gcore prototype.
5467         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5468         * gdbarch.c: Regenerate.
5469         * gdbarch.sh: Remove _initialize_gdbarch prototype.
5470         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5471         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5472         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5473         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5474         * go-lang.c: Remove _initialize_go_language prototype.
5475         * go32-nat.c: Remove _initialize_go32_nat prototype.
5476         * guile/guile.c: Remove _initialize_guile prototype.
5477         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5478         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5479         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5480         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5481         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5482         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5483         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5484         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5485         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5486         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5487         prototype.
5488         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5489         prototype.
5490         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5491         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5492         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5493         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5494         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5495         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5496         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5497         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5498         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5499         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5500         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5501         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5502         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5503         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5504         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5505         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5506         prototype.
5507         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5508         prototype.
5509         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5510         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5511         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5512         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5513         * infcall.c: Remove _initialize_infcall prototype.
5514         * infcmd.c: Remove _initialize_infcmd prototype.
5515         * inferior.c: Remove _initialize_inferiors prototype.
5516         * inflow.c: Remove _initialize_inflow prototype.
5517         * infrun.c: Remove _initialize_infrun prototype.
5518         * interps.c: Remove _initialize_interpreter prototype.
5519         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5520         * jit.c: Remove _initialize_jit prototype.
5521         * language.c: Remove _initialize_language prototype.
5522         * linux-fork.c: Remove _initialize_linux_fork prototype.
5523         * linux-nat.c: Remove _initialize_linux_nat prototype.
5524         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5525         * linux-thread-db.c: Remove _initialize_thread_db prototype.
5526         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5527         * m2-lang.c: Remove _initialize_m2_language prototype.
5528         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5529         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5530         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5531         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5532         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5533         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5534         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5535         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5536         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5537         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5538         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5539         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5540         * machoread.c: Remove _initialize_machoread prototype.
5541         * macrocmd.c: Remove _initialize_macrocmd prototype.
5542         * macroscope.c: Remove _initialize_macroscope prototype.
5543         * maint.c: Remove _initialize_maint_cmds prototype.
5544         * mdebugread.c: Remove _initialize_mdebugread prototype.
5545         * memattr.c: Remove _initialize_mem prototype.
5546         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5547         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5548         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5549         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5550         * mi/mi-main.c: Remove _initialize_mi_main prototype.
5551         * microblaze-linux-tdep.c: Remove
5552         _initialize_microblaze_linux_tdep prototype.
5553         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5554         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5555         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5556         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5557         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5558         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5559         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5560         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5561         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5562         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5563         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5564         prototype.
5565         * mipsread.c: Remove _initialize_mipsread prototype.
5566         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5567         prototype.
5568         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5569         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5570         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5571         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5572         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5573         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5574         prototype.
5575         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5576         * nto-procfs.c: Remove _initialize_procfs prototype.
5577         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5578         * objc-lang.c: Remove _initialize_objc_language prototype.
5579         * objfiles.c: Remove _initialize_objfiles prototype.
5580         * observer.c: Remove observer_test_first_notification_function,
5581         observer_test_second_notification_function,
5582         observer_test_third_notification_function, and
5583         _initialize_observer prototypes.
5584         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5585         * osabi.c: Remove _initialize_gdb_osabi prototype.
5586         * osdata.c: Remove _initialize_osdata prototype.
5587         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5588         * parse.c: Remove _initialize_parse prototype.
5589         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5590         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5591         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5592         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5593         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5594         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5595         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5596         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5597         * printcmd.c: Remove _initialize_printcmd prototype.
5598         * probe.c: Remove _initialize_probe prototype.
5599         * proc-api.c: Remove _initialize_proc_api prototype.
5600         * proc-events.c: Remove _initialize_proc_events prototype.
5601         * proc-service.c: Remove _initialize_proc_service prototype.
5602         * procfs.c: Remove _initialize_procfs prototype.
5603         * psymtab.c: Remove _initialize_psymtab prototype.
5604         * python/python.c: Remove _initialize_python prototype.
5605         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5606         * record-btrace.c: Remove _initialize_record_btrace prototype.
5607         * record-full.c: Remove _initialize_record_full prototype.
5608         * record.c: Remove _initialize_record prototype.
5609         * regcache.c: Remove _initialize_regcache prototype.
5610         * reggroups.c: Remove _initialize_reggroup prototype.
5611         * remote-notif.c: Remove _initialize_notif prototype.
5612         * remote-sim.c: Remove _initialize_remote_sim prototype.
5613         * remote.c: Remove _initialize_remote prototype.
5614         * reverse.c: Remove _initialize_reverse prototype.
5615         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5616         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5617         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5618         prototype.
5619         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5620         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5621         * rust-exp.y: Remove _initialize_rust_exp prototype.
5622         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5623         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5624         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5625         * score-tdep.c: Remove _initialize_score_tdep prototype.
5626         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5627         prototype.
5628         * ser-go32.c: Remove _initialize_ser_dos prototype.
5629         * ser-mingw.c: Remove _initialize_ser_windows prototype.
5630         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5631         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5632         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5633         * serial.c: Remove _initialize_serial prototype.
5634         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5635         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5636         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5637         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5638         * skip.c: Remove _initialize_step_skip prototype.
5639         * sol-thread.c: Remove _initialize_sol_thread prototype.
5640         * solib-aix.c: Remove _initialize_solib_aix prototype.
5641         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5642         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5643         * solib-frv.c: Remove _initialize_frv_solib prototype.
5644         * solib-spu.c: Remove _initialize_spu_solib prototype.
5645         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5646         * solib-target.c: Remove _initialize_solib_target prototype.
5647         * solib.c: Remove _initialize_solib prototype.
5648         * source.c: Remove _initialize_source prototype.
5649         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5650         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5651         prototype.
5652         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5653         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5654         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5655         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5656         prototype.
5657         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5658         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5659         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5660         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5661         prototype.
5662         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5663         prototype.
5664         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5665         prototype.
5666         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5667         prototype.
5668         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5669         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5670         prototype.
5671         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5672         prototype.
5673         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5674         prototype.
5675         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5676         prototype.
5677         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5678         prototype.
5679         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5680         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5681         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5682         * stabsread.c: Remove _initialize_stabsread prototype.
5683         * stack.c: Remove _initialize_stack prototype.
5684         * stap-probe.c: Remove _initialize_stap_probe prototype.
5685         * std-regs.c: Remove _initialize_frame_reg prototype.
5686         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5687         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5688         * symfile.c: Remove _initialize_symfile prototype.
5689         * symmisc.c: Remove _initialize_symmisc prototype.
5690         * symtab.c: Remove _initialize_symtab prototype.
5691         * target-dcache.c: Remove _initialize_target_dcache prototype.
5692         * target-descriptions.c: Remove _initialize_target_descriptions
5693         prototype.
5694         * thread.c: Remove _initialize_thread prototype.
5695         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5696         prototype.
5697         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5698         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5699         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5700         prototype.
5701         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5702         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5703         * tracefile.c: Remove _initialize_tracefile prototype.
5704         * tracepoint.c: Remove _initialize_tracepoint prototype.
5705         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5706         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5707         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5708         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5709         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5710         * tui/tui-win.c: Remove _initialize_tui_win prototype.
5711         * tui/tui.c: Remove _initialize_tui prototype.
5712         * typeprint.c: Remove _initialize_typeprint prototype.
5713         * user-regs.c: Remove _initialize_user_regs prototype.
5714         * utils.c: Remove _initialize_utils prototype.
5715         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5716         * valarith.c: Remove _initialize_valarith prototype.
5717         * valops.c: Remove _initialize_valops prototype.
5718         * valprint.c: Remove _initialize_valprint prototype.
5719         * value.c: Remove _initialize_values prototype.
5720         * varobj.c: Remove _initialize_varobj prototype.
5721         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5722         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5723         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5724         * windows-nat.c: Remove _initialize_windows_nat,
5725         _initialize_check_for_gdb_ini, and _initialize_loadable
5726         prototypes.
5727         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5728         * xcoffread.c: Remove _initialize_xcoffread prototype.
5729         * xml-support.c: Remove _initialize_xml_support prototype.
5730         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5731         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5732         prototype.
5733         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5734         prototype.
5735         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5736
5737 2017-09-08  Keith Seitz  <keiths@redhat.com>
5738
5739         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5740         field.
5741
5742 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
5743
5744         * f-valprint.c (f_val_print): Remove check for one byte
5745         sized integers. Remove printing of character type.
5746
5747 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
5748             Christoph Weinmann  <christoph.t.weinmann@intel.com>
5749             Bernhard Heckel  <bernhard.heckel@intel.com>
5750
5751         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5752         to maintain proper indentation when printing pointers/refs.
5753
5754 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5755
5756         GDB 8.0.1 released.
5757
5758 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5759
5760         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
5761
5762 2017-09-05  Tom Tromey  <tom@tromey.com>
5763
5764         * parse.c (funcall_chain): Now a std::vector.
5765         (start_arglist, end_arglist): Simplify.
5766         (free_funcalls): Remove.
5767         (parse_exp_in_context_1): Remove cleanup.
5768
5769 2017-09-05  Tom Tromey  <tom@tromey.com>
5770
5771         * go-exp.y (go_parse): Don't create a cleanup.
5772
5773 2017-09-05  Tom Tromey  <tom@tromey.com>
5774
5775         * d-exp.y (PrimaryExpression): Use std::string.
5776         (d_parse): Don't create a cleanup.
5777
5778 2017-09-05  Tom Tromey  <tom@tromey.com>
5779
5780         * utils.c (do_clear_parser_state): Remove.
5781         (make_cleanup_clear_parser_state): Remove.
5782         * p-exp.y (pascal_parse): Use scoped_restore.
5783         * m2-exp.y (m2_parse): Use scoped_restore.
5784         * f-exp.y (f_parse): Use scoped_restore.
5785         * d-exp.y (d_parse): Use scoped_restore.
5786         * c-exp.y (c_parse): Use scoped_restore.
5787         * ada-exp.y (ada_parse): Use scoped_restore.
5788         * utils.h (make_cleanup_clear_parser_state): Remove.
5789
5790 2017-09-06  Keith Seitz  <keiths@redhat.com>
5791
5792         * dwarf2read.c (dw2_linkage_name_attr): New function.
5793         (dw2_linkage_name): New function.
5794         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
5795         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
5796         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
5797
5798 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5799
5800         * config/djgpp/djconfig.sh: Correct shell portability issue.
5801
5802 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5803
5804         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
5805
5806 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5807
5808         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
5809         * NEWS: Mention new FreeBSD/mips native configuration.
5810         * configure.host: Add aarch64*-*-freebsd*.
5811         * configure.nat: Likewise.
5812         * aarch64-fbsd-nat.c: New file.
5813
5814 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5815
5816         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
5817         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
5818         * NEWS: Mention new FreeBSD/aarch64 target.
5819         * configure.tgt: Add aarch64*-*-freebsd*.
5820         * aarch64-fbsd-tdep.c: New file.
5821         * aarch64-fbsd-tdep.h: New file.
5822
5823 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5824
5825         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
5826
5827 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
5828
5829         * parse.c (find_minsym_type_and_address): Don't relocate addresses
5830         of TLS symbols.
5831
5832 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5833
5834         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
5835         call.
5836
5837 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5838
5839         * infrun.c (follow_exec): Call add_thread after
5840         target_find_description.
5841
5842 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5843
5844         * infrun.c (handle_inferior_event_1): When exec'ing, read
5845         stop_pc after follow_exec.
5846
5847 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5848
5849         * remote.c (process_g_packet): Update error message.
5850
5851 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5852
5853         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
5854         targets.
5855
5856 2017-09-05  Pedro Alves  <palves@redhat.com>
5857
5858         * eval.c (eval_call, evaluate_funcall): New functions, factored
5859         out from ...
5860         (evaluate_subexp_standard): ... this.
5861
5862 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5863
5864         * amd64-tdep.c (amd64_target_description): Create target
5865         descriptions.
5866         (_initialize_amd64_tdep): Don't call functions
5867         initialize_tdesc_amd64_*.  Add self tests.
5868         * arch/amd64.c (amd64_create_target_description): Add parameter
5869         is_linux.  Call set_tdesc_osabi if is_linux is true.
5870         * arch/amd64.h (amd64_create_target_description): Update the
5871         declaration.
5872         * arch/i386.c (i386_create_target_description): Add parameter
5873         is_linux.  Call set_tdesc_osabi if is_linux is true.
5874         * arch/i386.h (i386_create_target_description): Update
5875         declaration.
5876         * configure.tgt: Add i386.o to gdb_target_obs.
5877         * features/Makefile (XMLTOC): Remove i386/*.xml.
5878         * features/i386/amd64-avx-avx512.c: Remove.
5879         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
5880         * features/i386/amd64-avx-mpx.c: Remove.
5881         * features/i386/amd64-avx.c: Remove.
5882         * features/i386/amd64-mpx.c: Remove.
5883         * features/i386/amd64.c: Remove.
5884         * features/i386/i386-avx-avx512.c: Remove.
5885         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
5886         * features/i386/i386-avx-mpx.c: Remove.
5887         * features/i386/i386-avx.c: Remove.
5888         * features/i386/i386-mmx.c: Remove.
5889         * features/i386/i386-mpx.c: Remove.
5890         * features/i386/i386.c: Remove.
5891         * i386-tdep.c: Don't include features/i386/i386*.c., include
5892         target-descriptions.h and arch/i386.h.
5893         (i386_target_description): Create target descriptions.
5894         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
5895         functions.  Do self tests.
5896
5897 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5898
5899         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
5900         * features/i386/amd64-avx-avx512-linux.c: Removed.
5901         * features/i386/amd64-avx-linux.c: Removed.
5902         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
5903         * features/i386/amd64-avx-mpx-linux.c: Removed.
5904         * features/i386/amd64-linux.c: Removed.
5905         * features/i386/amd64-mpx-linux.c: Removed.
5906         * features/i386/x32-avx-avx512-linux.c: Removed.
5907         * features/i386/x32-avx-linux.c: Removed.
5908         * features/i386/x32-linux.c: Removed.
5909
5910 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5911
5912         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
5913         features/i386/*.c.
5914         (amd64_linux_read_description): Call
5915         amd64_create_target_description.
5916         * arch/amd64.c: New file.
5917         * arch/amd64.h: New file.
5918         * configure.tgt (x86_64-*-linux*): Append amd64.o.
5919         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
5920
5921 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5922
5923         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
5924         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
5925         (amd64_linux_read_description): Create target descriptions.
5926         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
5927         functions.  Add unit tests.
5928         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
5929         x32-core.xml.
5930         * features/i386/64bit-avx.c: Generated.
5931         * features/i386/64bit-avx512.c: Generated.
5932         * features/i386/64bit-core.c: Generated.
5933         * features/i386/64bit-linux.c: Generated.
5934         * features/i386/64bit-mpx.c: Generated.
5935         * features/i386/64bit-pkeys.c: Generated.
5936         * features/i386/64bit-segments.c: Generated.
5937         * features/i386/64bit-sse.c: Generated.
5938         * features/i386/x32-core.c: Generated.
5939         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
5940         c files for amd64-linux and x32-linux.
5941
5942 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5943
5944         * amd64-linux-tdep.c (amd64_linux_read_description): New
5945         function.
5946         (amd64_linux_core_read_description): Call
5947         amd64_linux_read_description.
5948         (amd64_linux_init_abi): Likewise.
5949         (amd64_x32_linux_init_abi): Likewise.
5950         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
5951         * x86-linux-nat.c (x86_linux_read_description): Call
5952         amd64_linux_read_description.
5953
5954 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5955
5956         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
5957         comments.
5958
5959 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5960
5961         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
5962         * features/i386/i386-avx-avx512-linux.c: Remove.
5963         * features/i386/i386-avx-linux.c: Remove.
5964         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
5965         * features/i386/i386-avx-mpx-linux.c: Remove.
5966         * features/i386/i386-linux.c: Remove.
5967         * features/i386/i386-mmx-linux.c: Remove.
5968         * features/i386/i386-mpx-linux.c: Remove.
5969
5970 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5971
5972         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
5973         (SFILES): Add arch/i386.c.
5974         (HFILES_NO_SRCDIR): Add arch/i386.h.
5975         * arch/i386.c: New file.
5976         * arch/i386.h: New file.
5977         * arch/tdesc.h (allocate_target_description): Declare.
5978         (set_tdesc_architecture): Declare.
5979         (set_tdesc_osabi): Declare.
5980         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
5981         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
5982         include arch/i386.h.
5983         (i386_linux_read_description): Remove code and call
5984         i386_create_target_description.
5985         (set_tdesc_architecture): New function.
5986         (set_tdesc_osabi): New function.
5987         * target-descriptions.h (allocate_target_description): Remove.
5988
5989 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5990
5991         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
5992         * target-descriptions.c (tdesc_create_feature): Likewise, and
5993         adjust code.
5994         * features/i386/32bit-avx.c: Re-generated.
5995         * features/i386/32bit-avx512.c: Re-generated.
5996         * features/i386/32bit-core.c: Re-generated.
5997         * features/i386/32bit-linux.c: Re-generated.
5998         * features/i386/32bit-mpx.c: Re-generated.
5999         * features/i386/32bit-pkeys.c: Re-generated.
6000         * features/i386/32bit-sse.c: Re-generated.
6001
6002 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6003
6004         * regformats/regdef.h (struct reg): Override operator == and !=.
6005
6006 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6007
6008         * arch/tdesc.h: New file.
6009         * regformats/regdat.sh: Generate code using tdesc_create_reg.
6010         * target-descriptions.c: Update comments.
6011         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
6012         declarations.
6013         * features/i386/32bit-avx.c: Re-generated.
6014         * features/i386/32bit-avx512.c: Re-generated.
6015         * features/i386/32bit-core.c: Re-generated.
6016         * features/i386/32bit-linux.c: Re-generated.
6017         * features/i386/32bit-mpx.c: Re-generated.
6018         * features/i386/32bit-pkeys.c: Re-generated.
6019         * features/i386/32bit-sse.c: Re-generated.
6020
6021 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6022
6023         * regformats/regdat.sh: Update generated code.
6024
6025 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6026
6027         * regformats/regdat.sh: Adjust code order.
6028
6029 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6030
6031         * expprint.c (dump_subexp_body_standard): Use constant format
6032         string in fprintf_filtered call.
6033
6034 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6035
6036         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6037         NetBSD/i386.
6038         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6039
6040 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6041
6042         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6043
6044 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6045
6046         * bsd-kvm.o: Define _KMEMUSER.
6047         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6048         * configure: Regenerate.
6049
6050 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6051
6052         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6053         * i386-fbsd-nat.c: Likewise.
6054
6055 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6056
6057         * unittests/array-view-selftests.c: Add include of <array>.
6058
6059 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6060
6061         * spu-tdep.c (flush_ea_cache): Add missing argument to
6062         call_function_by_hand.
6063
6064 2017-09-04  Pedro Alves  <palves@redhat.com>
6065
6066         * NEWS (Safer support for debugging with no debug info): New.
6067
6068 2017-09-04  Pedro Alves  <palves@redhat.com>
6069
6070         * c-exp.y (function_method, function_method_void): Add current
6071         instance flags to TYPE_INSTANCE.
6072         * dwarf2read.c (check_modifier): New.
6073         (compute_delayed_physnames): Assert that only C++ adds delayed
6074         physnames.  Mark fn_fields as const/volatile depending on
6075         physname.
6076         * eval.c (make_params): New type_instance_flags parameter.  Use
6077         it as the new type's instance flags.
6078         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6079         flags element and pass it to make_params.
6080         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6081         instance flags element.
6082         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6083         * gdbtypes.h: Include "enum-flags.h".
6084         (type_instance_flags): New enum-flags type.
6085         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6086         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6087         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6088         (follow_type_instance_flags): New function.
6089         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6090         * parser-defs.h (follow_type_instance_flags): Declare.
6091         * valops.c (value_struct_elt_for_reference): const/volatile must
6092         match too.
6093
6094 2017-09-04  Pedro Alves  <palves@redhat.com>
6095
6096         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6097         function/method scopes; lookup the nested name as a function local
6098         static variable.
6099
6100 2017-09-04  Pedro Alves  <palves@redhat.com>
6101
6102         (%type <voidval>): Add function_method.
6103         * c-exp.y (exp): New production for calls with no arguments.
6104         (function_method, function_method_void_or_typelist): New
6105         productions.
6106         (exp): New production for "method()::static_var".
6107         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6108         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6109         Handle OP_FUNC_STATIC_VAR.
6110         * parse.c (operator_length_standard):
6111         Handle OP_FUNC_STATIC_VAR.
6112
6113 2017-09-04  Pedro Alves  <palves@redhat.com>
6114
6115         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6116         handling.
6117         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6118         Ditto.
6119         * parse.c (operator_length_standard, operator_check_standard):
6120         Ditto.
6121         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6122
6123 2017-09-04  Pedro Alves  <palves@redhat.com>
6124
6125         * ax-gdb.c: Include "typeprint.h".
6126         (gen_expr_for_cast): New function.
6127         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6128         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6129         type is unknown.
6130         * dwarf2read.c (new_symbol_full): Fallback to int instead of
6131         nodebug_data_symbol.
6132         * eval.c: Include "typeprint.h".
6133         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6134         Error out if symbol has unknown type.
6135         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6136         evaluate_subexp_for_cast.
6137         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6138         OP_VAR_MSYM_VALUE.
6139         (evaluate_subexp_for_cast): New function.
6140         * gdbtypes.c (init_nodebug_var_type): New function.
6141         (objfile_type): Use it to initialize types of variables with no
6142         debug info.
6143         * typeprint.c (error_unknown_type): New.
6144         * typeprint.h (error_unknown_type): New declaration.
6145         * compile/compile-c-types.c (convert_type_basic): Handle
6146         TYPE_CODE_ERROR; warn and fallback to int for variables with
6147         unknown type.
6148
6149 2017-09-04  Pedro Alves  <palves@redhat.com>
6150
6151         * eval.c (evaluate_var_value): New function, factored out from ...
6152         (evaluate_subexp_standard): ... here.
6153
6154 2017-09-04  Pedro Alves  <palves@redhat.com>
6155
6156         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6157         Remove useless assignments to 'op'.
6158
6159 2017-09-04  Pedro Alves  <palves@redhat.com>
6160
6161         * eval.c (eval_skip_value): New function.
6162         (evaluate_subexp_standard): Use it.
6163
6164 2017-09-04  Pedro Alves  <palves@redhat.com>
6165
6166         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6167         function name from symbol/minsym and pass it to
6168         error_call_unknown_return_type.
6169
6170 2017-09-04  Pedro Alves  <palves@redhat.com>
6171
6172         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6173         * ax-gdb.c (gen_msym_var_ref): New function.
6174         (gen_expr): Handle OP_VAR_MSYM_VALUE.
6175         * eval.c (evaluate_var_msym_value): New function.
6176         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6177         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6178         to call_function_by_hand.
6179         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6180         Handle OP_VAR_MSYM_VALUE.
6181         (union exp_element) <msymbol>: New field.
6182         * minsyms.h (struct type): Forward declare.
6183         (find_minsym_type_and_address): Declare.
6184         * parse.c (write_exp_elt_msym): New function.
6185         (write_exp_msymbol): Delete, refactored as ...
6186         (find_minsym_type_and_address): ... this new function.
6187         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6188         (operator_length_standard, operator_check_standard): Handle
6189         OP_VAR_MSYM_VALUE.
6190         * std-operator.def (OP_VAR_MSYM_VALUE): New.
6191
6192 2017-09-04  Pedro Alves  <palves@redhat.com>
6193
6194         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6195         TYPE_GNU_IFUNC specially here.  Throw error if return type is
6196         unknown.
6197         * ada-typeprint.c (print_func_type): Handle functions with unknown
6198         return type.
6199         * c-typeprint.c (c_type_print_base): Handle functions and methods
6200         with unknown return type.
6201         * compile/compile-c-symbols.c (convert_symbol_bmsym)
6202         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6203         * compile/compile-c-types.c: Include "objfiles.h".
6204         (convert_func): For functions with unknown return type, warn and
6205         default to int.
6206         * compile/compile-object-run.c (compile_object_run): Adjust call
6207         to call_function_by_hand_dummy.
6208         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6209         call_function_by_hand.
6210         * eval.c (evaluate_subexp_standard): Adjust calls to
6211         call_function_by_hand.  Handle functions and methods with unknown
6212         return type.  Pass expect_type to call_function_by_hand.
6213         * f-typeprint.c (f_type_print_base): Handle functions with unknown
6214         return type.
6215         * gcore.c (call_target_sbrk): Adjust call to
6216         call_function_by_hand.
6217         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6218         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
6219         an integer address type instead of nodebug.
6220         * guile/scm-value.c (gdbscm_value_call): Adjust call to
6221         call_function_by_hand.
6222         * infcall.c (error_call_unknown_return_type): New function.
6223         (call_function_by_hand): New "default_return_type" parameter.
6224         Pass it down.
6225         (call_function_by_hand_dummy): New "default_return_type"
6226         parameter.  Use it instead of defaulting to int.  If there's no
6227         default and the return type is unknown, throw an error.  If
6228         there's a default return type, and the called function has no
6229         debug info, then assume the function is prototyped.
6230         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6231         New "default_return_type" parameter.
6232         (error_call_unknown_return_type): New declaration.
6233         * linux-fork.c (call_lseek): Cast return type of lseek.
6234         (inferior_call_waitpid, checkpoint_command): Adjust calls to
6235         call_function_by_hand.
6236         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6237         calls to call_function_by_hand.
6238         * m2-typeprint.c (m2_procedure): Handle functions with unknown
6239         return type.
6240         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6241         (value_nsstring, print_object_command): Adjust calls to
6242         call_function_by_hand.
6243         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6244         functions with unknown return type.
6245         (pascal_type_print_func_varspec_suffix): New function.
6246         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6247         TYPE_CODE_METHOD>: Use it.
6248         * python/py-value.c (valpy_call): Adjust call to
6249         call_function_by_hand.
6250         * rust-lang.c (rust_evaluate_funcall): Adjust call to
6251         call_function_by_hand.
6252         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6253         call_function_by_hand.
6254         * valops.c (value_allocate_space_in_inferior): Adjust call to
6255         call_function_by_hand.
6256         * typeprint.c (type_print_unknown_return_type): New function.
6257         * typeprint.h (type_print_unknown_return_type): New declaration.
6258
6259 2017-09-04  Pedro Alves  <palves@redhat.com>
6260
6261         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6262         types with more than one parameter as prototyped.
6263
6264 2017-09-04  Pedro Alves  <palves@redhat.com>
6265
6266         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6267         (disassemble_command): Use gdb_disassembly_flags instead of bare
6268         int.
6269         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6270         (dump_insns, do_mixed_source_and_assembly_deprecated)
6271         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6272         Use gdb_disassembly_flags instead of bare int.
6273         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6274         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6275         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6276         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
6277         (enum gdb_disassembly_flag): ... values of this new enumeration.
6278         (gdb_disassembly_flags): Define.
6279         (gdb_disassembly)
6280         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6281         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6282         gdb_disassembly_flags instead of bare int.
6283         * record-btrace.c (btrace_insn_history)
6284         (record_btrace_insn_history, record_btrace_insn_history_range)
6285         (record_btrace_insn_history_from): Use gdb_disassembly_flags
6286         instead of bare int.
6287         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6288         Use gdb_disassembly_flags instead of bare int.
6289         * target-debug.h (target_debug_print_gdb_disassembly_flags):
6290         Define.
6291         * target-delegates.c: Regenerate.
6292         * target.c (target_insn_history, target_insn_history_from)
6293         (target_insn_history_range): Use gdb_disassembly_flags instead of
6294         bare int.
6295         * target.h: Include "disasm.h".
6296         (struct target_ops) <to_insn_history, to_insn_history_from,
6297         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6298         int.
6299         (target_insn_history, target_insn_history_from)
6300         (target_insn_history_range): Use gdb_disassembly_flags instead of
6301         bare int.
6302
6303 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6304
6305         * cli/cli-script.c (build_command_line): For if/while commands,
6306         check whether args is empty.
6307
6308 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6309
6310         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6311         (enum command_control_type): Likewise.
6312         (struct command_line): Likewise.
6313         (free_command_lines): Likewise.
6314         (struct command_lines_deleter): Likewise.
6315         (command_line_up): Likewise.
6316         (read_command_lines): Likewise.
6317         (read_command_lines_1): Likewise.
6318         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6319         (enum command_control_type): Likewise.
6320         (struct command_line): Likewise.
6321         (free_command_lines): Likewise.
6322         (struct command_lines_deleter): Likewise.
6323         (command_line_up): Likewise.
6324         (read_command_lines): Likewise.
6325         (read_command_lines_1): Likewise.
6326         * breakpoint.h: Include cli/cli-script.h.
6327         * extension-priv.h: Likewise.
6328         * gdbcmd.h: Likewise.
6329
6330 2017-09-04  Pedro Alves  <palves@redhat.com>
6331
6332         * ada-lang.c (is_known_support_routine): Move sal declaration to
6333         where it is initialized.
6334         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6335         (parse_breakpoint_sals, decode_static_tracepoint_spec)
6336         (clear_command, update_static_tracepoint): Remove init_sal
6337         references.  Move declarations closer to initializations.
6338         * cli/cli-cmds.c (list_command): Move sal declarations closer to
6339         initializations.
6340         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6341         references.  Move sal declarations closer to initializations.
6342         * frame.c (find_frame_sal): Return a symtab_and_line via function
6343         return instead of output parameter.  Remove init_sal references.
6344         * frame.h (find_frame_sal): Return a symtab_and_line via function
6345         return instead of output parameter.
6346         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6347         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6348         instead of memset.
6349         (gdbscm_find_pc_line): Remove init_sal reference.
6350         * infcall.c (call_function_by_hand_dummy): Remove init_sal
6351         references.  Move declarations closer to initializations.
6352         * infcmd.c (set_step_frame): Update.  Move declarations closer to
6353         initializations.
6354         (finish_backward): Remove init_sal references.  Move declarations
6355         closer to initializations.
6356         * infrun.c (process_event_stop_test, handle_step_into_function)
6357         (insert_hp_step_resume_breakpoint_at_frame)
6358         (insert_step_resume_breakpoint_at_caller): Likewise.
6359         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6360         (symbol_to_sal): Likewise.
6361         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6362         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6363         to its initialization.
6364         * reverse.c (save_bookmark_command): Use new/delete.  Remove
6365         init_sal references.  Move declarations closer to initializations.
6366         * source.c (get_current_source_symtab_and_line): Remove brace
6367         initialization.
6368         (set_current_source_symtab_and_line): Now takes the sal by const
6369         reference.  Remove brace initialization.
6370         (line_info): Remove init_sal reference.
6371         * source.h (set_current_source_symtab_and_line): Now takes a
6372         symtab_and_line via const reference.
6373         * stack.c (set_current_sal_from_frame): Adjust.
6374         (print_frame_info): Adjust.
6375         (get_last_displayed_sal): Return the sal via function return
6376         instead of via output parameter.  Simplify.
6377         (frame_info): Adjust.
6378         * stack.h (get_last_displayed_sal): Return the sal via function
6379         return instead of via output parameter.
6380         * symtab.c (init_sal): Delete.
6381         (find_pc_sect_line): Remove init_sal references.  Move
6382         declarations closer to initializations.
6383         (find_function_start_sal): Remove init_sal references.  Move
6384         declarations closer to initializations.
6385         * symtab.h (struct symtab_and_line): In-class initialize all
6386         fields.
6387         * tracepoint.c (set_traceframe_context)
6388         (print_one_static_tracepoint_marker): Remove init_sal references.
6389         Move declarations closer to initializations.
6390         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6391         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
6392         declarations closer to initializations.
6393         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6394         init_sal references.  Adjust.
6395
6396 2017-09-04  Pedro Alves  <palves@redhat.com>
6397
6398         * ax-gdb.c (agent_command_1): Use range-for.
6399         * break-catch-throw.c (re_set_exception_catchpoint): Update.
6400         * breakpoint.c: Include "common/array-view.h".
6401         (init_breakpoint_sal, create_breakpoint_sal): Change sals
6402         parameter from struct symtabs_and_lines to
6403         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
6404         (breakpoint_sals_to_pc): Change sals parameter from struct
6405         symtabs_and_lines to std::vector reference.
6406         (check_fast_tracepoint_sals): Change sals parameter from struct
6407         symtabs_and_lines to std::array_view.  Use range-for.
6408         (decode_static_tracepoint_spec): Return a std::vector instead of
6409         symtabs_and_lines.  Update.
6410         (create_breakpoint): Update.
6411         (break_range_command, until_break_command, clear_command): Update.
6412         (base_breakpoint_decode_location, bkpt_decode_location)
6413         (bkpt_probe_create_sals_from_location)
6414         (bkpt_probe_decode_location, tracepoint_decode_location)
6415         (tracepoint_probe_decode_location)
6416         (strace_marker_create_sals_from_location): Return a std::vector
6417         instead of symtabs_and_lines.
6418         (strace_marker_create_breakpoints_sal): Update.
6419         (strace_marker_decode_location): Return a std::vector instead of
6420         symtabs_and_lines.  Update.
6421         (update_breakpoint_locations): Change struct symtabs_and_lines
6422         parameters to gdb::array_view.  Adjust.
6423         (location_to_sals): Return a std::vector instead of
6424         symtabs_and_lines.  Update.
6425         (breakpoint_re_set_default): Use std::vector instead of struct
6426         symtabs_and_lines.
6427         (decode_location_default): Return a std::vector instead of
6428         symtabs_and_lines.  Update.
6429         * breakpoint.h: Include "common/array-view.h".
6430         (struct breakpoint_ops) <decode_location>: Now returns a
6431         std::vector instead of returning a symtabs_and_lines via output
6432         parameter.
6433         (update_breakpoint_locations): Change sals parameters to use
6434         gdb::array_view.
6435         * cli/cli-cmds.c (edit_command, list_command): Update to use
6436         std::vector and gdb::array_view.
6437         (ambiguous_line_spec): Adjust to use gdb::array_view and
6438         range-for.
6439         (compare_symtabs): Rename to ...
6440         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
6441         const reference and adjust.
6442         (filter_sals): Rewrite using std::vector and standard algorithms.
6443         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6444         (jump_command): Update to use std::vector.
6445         * linespec.c (struct linespec_state) <canonical_names>: Update
6446         comment.
6447         (add_sal_to_sals_basic): Delete.
6448         (add_sal_to_sals, filter_results, convert_results_to_lsals)
6449         (decode_line_2, create_sals_line_offset)
6450         (convert_address_location_to_sals, convert_linespec_to_sals)
6451         (convert_explicit_location_to_sals, parse_linespec)
6452         (event_location_to_sals, decode_line_full, decode_line_1)
6453         (decode_line_with_current_source)
6454         (decode_line_with_last_displayed, decode_objc)
6455         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6456         (linespec_result::~linespec_result): Adjust to use std::vector
6457         instead of symtabs_and_lines.
6458         * linespec.h (linespec_sals::sals): Now a std::vector.
6459         (struct linespec_result): Use std::vector, bool, and in-class
6460         initialization.
6461         (decode_line_1, decode_line_with_current_source)
6462         (decode_line_with_last_displayed): Return std::vector.
6463         * macrocmd.c (info_macros_command): Use std::vector.
6464         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6465         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6466         std::vector.
6467         * probe.h (parse_probes): Return a std::vector.
6468         * python/python.c (gdbpy_decode_line): Use std::vector and
6469         gdb::array_view.
6470         * source.c (select_source_symtab, line_info): Use std::vector.
6471         * stack.c (func_command): Use std::vector.
6472         * symtab.h (struct symtabs_and_lines): Delete.
6473         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6474
6475 2017-09-04  Pedro Alves  <palves@redhat.com>
6476
6477         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6478         unittests/array-view-selftests.c.
6479         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6480         * common/array-view.h: New file.
6481         * unittests/array-view-selftests.c: New file.
6482
6483 2017-09-04  Pedro Alves  <palves@redhat.com>
6484
6485         * cli/cli-cmds.c (edit_command): Pass message to
6486         ambiguous_line_spec.
6487         (list_command): Pass message to ambiguous_line_spec.  Say
6488         "first"/"last" instead of "start" and "end" to be consistent with
6489         the manual.
6490         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
6491         them to print formatted message.
6492
6493 2017-09-04  Pedro Alves  <palves@redhat.com>
6494
6495         * btrace.c (ftrace_add_pt): Pass btrace_insn to
6496         ftrace_update_insns by reference instead of pointer.
6497
6498 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6499
6500         * i386-go32-tdep.c: Include x86-xstate.h.
6501         (i386_go32_init_abi): Call i386_target_description.
6502         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6503         if xcr0 is X86_XSTATE_X87_MASK.
6504         * i386-tdep.h (tdesc_i386): Remove the declaration.
6505         (tdesc_i386_mmx): Likewise.
6506
6507 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6508
6509         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6510         X86_XSTATE_SSE_MASK instead of 0.
6511
6512 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6513
6514         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6515         i386_target_description.
6516         * i386-fbsd-nat.c (i386fbsd_read_description): Call
6517         i386_target_description.
6518         * i386-tdep.c (i386_gdbarch_init): Likewise.
6519
6520 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6521
6522         * amd64-darwin-tdep.c: Include "x86-xstate.h".
6523         (x86_darwin_init_abi_64): Call amd64_target_description.
6524         * amd64-dicos-tdep.c: Likewise.
6525         * amd64-fbsd-nat.c: Likewise.
6526         * amd64-fbsd-tdep.c: Likewise.
6527         * amd64-nbsd-tdep.c: Likewise.
6528         * amd64-obsd-tdep.c: Likewise.
6529         * amd64-sol2-tdep.c: Likewise.
6530         * amd64-windows-tdep.c: Likewise.
6531         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6532
6533 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6534
6535         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6536         (btrace_function) <insn>: Change type to use std::vector.
6537         * btrace.c (ftrace_debug, ftrace_call_num_insn,
6538         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6539         ftrace_update_insns, ftrace_compute_global_level_offset,
6540         btrace_stitch_bts, btrace_clear, btrace_insn_get,
6541         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6542         change to std::vector.
6543         (ftrace_update_insns): Adjust to change to std::vector, change
6544         type of INSN parameter.
6545         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6546         * record-btrace.c (btrace_call_history_insn_range,
6547         btrace_compute_src_line_range,
6548         record_btrace_frame_prev_register): Adjust to change to
6549         std::vector.
6550         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6551         to change to std::vector.
6552
6553 2017-09-03  Tom Tromey  <tom@tromey.com>
6554
6555         * corefile.c (reopen_exec_file): Use std::string.
6556
6557 2017-09-03  Tom Tromey  <tom@tromey.com>
6558
6559         * compile/compile.c (compile_register_name_mangled): Return
6560         std::string.
6561         * compile/compile-loc2c.c (pushf_register_address): Update.
6562         (pushf_register): Update.
6563         * compile/compile-c-types.c (convert_array): Update.
6564         * compile/compile-c-symbols.c (generate_vla_size): Update.
6565         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6566         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6567         (convert_one_symbol): Update.
6568         (generate_c_for_for_one_variable): Update.
6569         * compile/compile-c-support.c (c_get_range_decl_name): Return a
6570         std::string.
6571         (generate_register_struct): Update.
6572         * compile/compile-internal.h (c_get_range_decl_name): Return a
6573         std::string.
6574         (compile_register_name_mangled): Return std::string.
6575
6576 2017-09-03  Tom Tromey  <tom@tromey.com>
6577
6578         * utils.c (perror_string): Return a std::string.
6579         (throw_perror_with_name, perror_warning_with_name): Update.
6580
6581 2017-09-03  Tom Tromey  <tom@tromey.com>
6582
6583         * demangle.c (demangle_command): Use std::string,
6584         unique_xmalloc_ptr.
6585
6586 2017-09-03  Tom Tromey  <tom@tromey.com>
6587
6588         * cli/cli-setshow.c (do_set_command): Use std::string.
6589
6590 2017-09-03  Tom Tromey  <tom@tromey.com>
6591
6592         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6593
6594 2017-09-03  Tom Tromey  <tom@tromey.com>
6595
6596         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6597
6598 2017-09-03  Tom Tromey  <tom@tromey.com>
6599
6600         * mi/mi-cmd-env.c (env_execute_cli_command): Use
6601         gdb::unique_xmalloc_ptr.
6602
6603 2017-09-03  Tom Tromey  <tom@tromey.com>
6604
6605         * thread.c (print_thread_info_1): Use string_printf.
6606         (thread_apply_command, thread_apply_all_command): Use
6607         std::string.
6608
6609 2017-09-03  Tom Tromey  <tom@tromey.com>
6610
6611         * valprint.c (val_print_string): Update.
6612         * gdbcore.h (memory_error_message): Return std::string.
6613         * corefile.c (memory_error_message): Return std::string.
6614         (memory_error): Update.
6615         * breakpoint.c (insert_bp_location): Update.
6616
6617 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
6618
6619         * target/waitstatus.h (target_waitstatus_to_string): Change
6620         return type to std::string.
6621         * target/waitstatus.c (target_waitstatus_to_string): Return
6622         std::string.
6623         * target.h (target_waitstatus_to_string): Remove declaration.
6624         * infrun.c (resume, clear_proceed_status_thread,
6625         print_target_wait_results, do_target_wait, save_waitstatus,
6626         stop_all_threads): Adjust.
6627         * record-btrace.c (record_btrace_wait): Adjust.
6628         * target-debug.h
6629         (target_debug_print_struct_target_waitstatus_p): Adjust.
6630
6631 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6632
6633         PR gdb/22046
6634         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6635         detection.
6636
6637 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
6638
6639         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6640         for setting/unsetting environment variables on the remote target.
6641         (New remote packets): Add entries for QEnvironmentHexEncoded,
6642         QEnvironmentUnset and QEnvironmentReset.
6643         * common/environ.c (gdb_environ::operator=): Extend method to
6644         handle m_user_set_env_list and m_user_unset_env_list.
6645         (gdb_environ::clear): Likewise.
6646         (match_var_in_string): Change type of first parameter from 'char
6647         *' to 'const char *'.
6648         (gdb_environ::set): Extend method to handle
6649         m_user_set_env_list and m_user_unset_env_list.
6650         (gdb_environ::unset): Likewise.
6651         (gdb_environ::clear_user_set_env): New method.
6652         (gdb_environ::user_set_envp): Likewise.
6653         (gdb_environ::user_unset_envp): Likewise.
6654         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6655         m_user_unset_env_list on move constructor/assignment.
6656         (unset): Add new default parameter 'update_unset_list = true'.
6657         (clear_user_set_env): New method.
6658         (user_set_envp): Likewise.
6659         (user_unset_envp): Likewise.
6660         (m_user_set_env_list): New std::set.
6661         (m_user_unset_env_list): Likewise.
6662         * common/rsp-low.c (hex2str): New function.
6663         (bin2hex): New overload for bin2hex function.
6664         * common/rsp-low.c (hex2str): New prototype.
6665         (str2hex): New overload prototype.
6666         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6667         QEnvironmentUnset and QEnvironmentReset.
6668         (remote_protocol_features): Add QEnvironmentHexEncoded,
6669         QEnvironmentUnset and QEnvironmentReset packets.
6670         (send_environment_packet): New function.
6671         (extended_remote_environment_support): Likewise.
6672         (extended_remote_create_inferior): Call
6673         extended_remote_environment_support.
6674         (_initialize_remote): Add QEnvironmentHexEncoded,
6675         QEnvironmentUnset and QEnvironmentReset packet configs.
6676         * unittests/environ-selftests.c (gdb_selftest_env_var):
6677         New variable.
6678         (test_vector_initialization): New function.
6679         (test_init_from_host_environ): Likewise.
6680         (test_reinit_from_host_environ): Likewise.
6681         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6682         Likewise.
6683         (test_unset_set_empty_vector): Likewise.
6684         (test_vector_clear): Likewise.
6685         (test_std_move): Likewise.
6686         (test_move_constructor):
6687         (test_self_move): Likewise.
6688         (test_set_unset_reset): Likewise.
6689         (run_tests): Rewrite in terms of the functions above.
6690
6691 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
6692
6693         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6694         (adi_available): Use a temp variable of type CORE_ADDR as argument
6695         3 when calling target_auxv_search.
6696         (adi_normalize_address): Use masks and xor operators to calculate
6697         normalized address.
6698         (adi_read_versions, adi_write_versions, adi_print_versions)
6699         (do_examine, do_assign): Use paddress.
6700
6701 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
6702
6703         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6704         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6705         out of loop and add supply of FIR.
6706         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6707         add collect of FIR.
6708
6709 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
6710
6711         PR gdb/21827
6712         * cli/cli-script.c (define_command): Don't convert command name
6713         to lower case.
6714
6715 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
6716
6717         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6718         Update all callers accordingly. Remove all code blocks handling
6719         the case where DISPP is not NULL.
6720
6721 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6722
6723         PR symtab/22003
6724         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6725         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6726         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6727
6728 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6729
6730         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6731         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6732         (read_comp_units_from_section): New parameter abbrev_section, use
6733         read_and_check_comp_unit_head, allocate signatured_type if needed.
6734         (create_all_comp_units): Update read_comp_units_from_section caller.
6735
6736 2017-08-23  Pedro Alves  <palves@redhat.com>
6737
6738         PR remote/21852
6739         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6740         to null_ptid and switch to thread without reading the registers
6741         after adding the inferior.
6742
6743 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6744
6745         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6746         compile-gcc.
6747         * compile/compile.c (compile_gcc, show_compile_gcc): New.
6748         (compile_to_object): Implement compile_gcc.
6749         (_initialize_compile): Install "set compile-gcc".  Initialize
6750         compile_gcc.
6751
6752 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6753
6754         * compile/compile.c (compile_to_object): Conditionally call
6755         set_verbose.  Conditionally call compile or compile_v0.
6756
6757 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
6758
6759         * sparc64-tdep.h: (adi_normalize_address): New export.
6760         * sparc-nat.h: (open_adi_tag_fd): New export.
6761         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
6762         * sparc64-linux-tdep.c:
6763         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
6764         (sparc64_linux_handle_segmentation_fault): New function.
6765         (sparc64_linux_init_abi): Register
6766         sparc64_linux_handle_segmentation_fault
6767         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
6768         (sparc64_addr_bits_remove): New function.
6769         (sparc64_init_abi): Register sparc64_addr_bits_remove.
6770         (MAX_PROC_NAME_SIZE): New macro.
6771         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
6772         (sparc64adilist): New variable.
6773         (adi_proc_list): New variable.
6774         (find_adi_info): New function.
6775         (add_adi_info): New function.
6776         (get_adi_info_proc): New function.
6777         (get_adi_info): New function.
6778         (info_adi_command): New function.
6779         (read_maps_entry): New function.
6780         (adi_available): New function.
6781         (adi_normalize_address): New function.
6782         (adi_align_address): New function.
6783         (adi_convert_byte_count): New function.
6784         (adi_tag_fd): New function.
6785         (adi_is_addr_mapped): New function.
6786         (adi_read_versions): New function.
6787         (adi_write_versions): New function.
6788         (adi_print_versions): New function.
6789         (do_examine): New function.
6790         (do_assign): New function.
6791         (adi_examine_command): New function.
6792         (adi_assign_command): New function.
6793         (_initialize_sparc64_adi_tdep): New function.
6794
6795 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
6796
6797         * breakpoint.c (breakpoints_info): Rename to ...
6798         (info_breakpoints_command): ... this.
6799         (watchpoints_info): Rename to ...
6800         (info_watchpoints_command): ... this.
6801         (tracepoints_info): Rename to ...
6802         (info_tracepoints_command): ... this.
6803         (_initialize_breakpoint): Adjust.
6804         * dcache.c (dcache_info): Rename to ...
6805         (info_display_command): ... this.
6806         (_initialize_dcache): Adjust.
6807         * frame.h (args_info): Rename to ...
6808         (info_args_command): ... this.
6809         (locals_info): Rename to ...
6810         (info_locals_command): ... this.
6811         * infcmd.c (nofp_registers_info): Rename to ...
6812         (info_registers_command): ... this.
6813         (float_info): Rename to ...
6814         (info_float_command): ... this.
6815         (program_info): Rename to ...
6816         (info_program_command): ... this.
6817         (all_registers_info): Rename to ...
6818         (info_all_registers_command): ... this.
6819         (vector_info): Rename to ...
6820         (info_vector_command): ... this.
6821         (float_info): Rename to ...
6822         (info_float_command): ... this.
6823         (_initialize_infcmd): Adjust.
6824         * inferior.h (term_info): Rename to ...
6825         (info_terminal_command): ... this.
6826         * inflow.c (term_info): Rename to ...
6827         (info_terminal_command): ... this.
6828         (_initialize_inflow): Adjust.
6829         * infrun.c (signals_info): Rename to ...
6830         (info_signals_command): ... this.
6831         (_initialize_infrun): Adjust.
6832         * objc-lang.c (classes_info): Rename to ...
6833         (info_classes_command): ... this.
6834         (selectors_info): Rename to ...
6835         (info_selectors_command): ... this.
6836         (_initialize_objc_language): Adjust.
6837         * printcmd.c (sym_info): Rename to ...
6838         (info_symbol_command): ... this.
6839         (address_info): Rename to ...
6840         (info_address_command): ... this.
6841         (display_info): Rename to ...
6842         (info_display_command): ... this.
6843         (_initialize_printcmd): Adjust.
6844         * reverse.c (bookmarks_info): Rename to ...
6845         (info_breakpoints_command): ... this.
6846         (_initialize_reverse): Adjust.
6847         * ser-go32.c (dos_info): Rename to ...
6848         (info_serial_command): ... this.
6849         (_initialize_ser_dos): Adjust.
6850         * skip.c (skip_info): Rename to ...
6851         (info_skip_command): ... this.
6852         (_initialize_step_skip): Adjust.
6853         * source.c (line_info): Rename to ...
6854         (info_line_command): ... this.
6855         (source_info): Rename to ...
6856         (info_source_command)
6857         * stack.c (frame_info): Rename to ...
6858         (info_frame_command): ... this.
6859         (locals_info): Rename to ...
6860         (info_locals_command): ... this.
6861         (args_info): Rename to ...
6862         (info_args_command): ... this.
6863         (_initialize_stack): Adjust.
6864         * symtab.c (sources_info): Rename to ...
6865         (info_sources_command): ... this.
6866         (variables_info): Rename to ...
6867         (info_variables_command): ... this.
6868         (functions_info): Rename to ...
6869         (info_functions_command): ... this.
6870         (types_info): Rename to ...
6871         (info_types_command): ... this.
6872         (_initialize_symtab): Adjust.
6873         * target.c (target_info): Rename to ...
6874         (info_target_command): ... this.
6875         (initialize_targets): Adjust.
6876         * tracepoint.c (tvariables_info): Rename to ...
6877         (info_tvariables_command): ... this.
6878         (scope_info): Rename to ...
6879         (info_scope_command): ... this.
6880         (trace_dump_actions): Adjust.
6881         (_initialize_tracepoint): Adjust.
6882
6883 2017-08-22  Tom Tromey  <tom@tromey.com>
6884
6885         * breakpoint.h (install_breakpoint): Update.
6886         * breakpoint.c (add_solib_catchpoint): Update.
6887         (install_breakpoint): Change argument to a std::unique_ptr.
6888         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6889         (create_breakpoint_sal, create_breakpoint): Update.
6890         (watch_command_1, catch_exec_command_1)
6891         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6892         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6893         Return the breakpoint.
6894         (set_raw_breakpoint_without_location, set_raw_breakpoint)
6895         (new_single_step_breakpoint): Update.
6896         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
6897         std::unique_ptr.
6898         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6899         std::unique_ptr.
6900         * break-catch-sig.c (create_signal_catchpoint): Use
6901         std::unique_ptr.
6902         * ada-lang.c (create_ada_exception_catchpoint): Use
6903         std::unique_ptr.
6904
6905 2017-08-22  Tom Tromey  <tom@tromey.com>
6906
6907         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
6908
6909 2017-08-22  Tom Tromey  <tom@tromey.com>
6910
6911         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
6912         (lookup_partial_symbol): Update.
6913
6914 2017-08-22  Tom Tromey  <tom@tromey.com>
6915
6916         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
6917         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
6918         (find_and_open_source, symtab_to_fullname): Update.
6919         * psymtab.c (psymtab_to_fullname): Update.
6920
6921 2017-08-22  Tom Tromey  <tom@tromey.com>
6922
6923         * exec.c (exec_file_attach): Update.
6924         * linux-thread-db.c (try_thread_db_load): Update.
6925         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
6926         * utils.c (gdb_realpath): Change return type.
6927         (gdb_realpath_keepfile): Update.
6928         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
6929         (_initialize_utils): Register the new self test.
6930         * source.c (openp): Update.
6931         (find_and_open_source): Update.
6932         * nto-tdep.c (nto_find_and_open_solib): Update.
6933         * main.c (set_gdb_data_directory): Update.
6934         (captured_main_1): Update.
6935         * dwarf2read.c (dwarf2_get_dwz_file): Update
6936         (dw2_map_symbol_filenames): Update.
6937         * auto-load.c (auto_load_safe_path_vec_update): Update.
6938         (filename_is_in_auto_load_safe_path_vec): Change type of
6939         "filename_realp".
6940         (auto_load_objfile_script): Update.
6941         (file_is_auto_load_safe): Update.  Use std::string.
6942         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
6943
6944 2017-08-22  Tom Tromey  <tom@tromey.com>
6945
6946         * utils.c (gdb_realpath_keepfile): Return a
6947         gdb::unique_xmalloc_ptr.
6948         * exec.c (exec_file_attach): Update.
6949         * utils.h (gdb_realpath_keepfile): Return a
6950         gdb::unique_xmalloc_ptr.
6951
6952 2017-08-22  Tom Tromey  <tom@tromey.com>
6953
6954         * compile/compile.c (compile_file_command): Use
6955         gdb::unique_xmalloc_ptr, std::string.
6956         * utils.c (gdb_abspath): Change return type.
6957         * source.c (openp): Update.
6958         * objfiles.c (allocate_objfile): Update.
6959         * main.c (set_gdb_data_directory): Update.
6960         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
6961
6962 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
6963
6964         * cli-cmds.c (list_commands): List actual code around more than
6965         one location.
6966
6967 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
6968
6969         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
6970
6971 2017-08-21  Pedro Alves  <palves@redhat.com>
6972
6973         PR gdb/19487
6974         * c-exp.y (variable production): Handle function aliases.
6975         * minsyms.c (msymbol_is_text): New function.
6976         * minsyms.h (msymbol_is_text): Declare.
6977         * symtab.c (find_function_alias_target): New function.
6978         * symtab.h (find_function_alias_target): Declare.
6979
6980 2017-08-21  Pedro Alves  <palves@redhat.com>
6981
6982         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
6983         typedefs.
6984         * typeprint.c (whatis_exp): If handling "whatis", and expression
6985         is OP_TYPE, strip one typedef level.  Otherwise don't strip
6986         typedefs here.
6987         * valops.c (value_cast): Save "to" type before resolving
6988         stubs/typedefs.  Use that type as resulting value's type.
6989
6990 2017-08-18  Tom Tromey  <tom@tromey.com>
6991             Pedro Alves  <palves@redhat.com>
6992
6993         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
6994         * sol-thread.c (sol_thread_resume, sol_thread_wait)
6995         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
6996         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
6997         * proc-service.c (ps_xfer_memory): Use scoped_restore.
6998         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
6999         (linux_get_siginfo_data): Add "thread" argument.  Use
7000         scoped_restore.
7001         * linux-nat.c (linux_child_follow_fork)
7002         (check_stopped_by_watchpoint): Use scoped_restore.
7003         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7004         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7005         (restore_inferior_ptid, save_inferior_ptid): Remove.
7006         * btrace.c (btrace_fetch): Use scoped_restore.
7007         * bsd-uthread.c (bsd_uthread_fetch_registers)
7008         (bsd_uthread_store_registers): Use scoped_restore.
7009         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7010         scoped_restore.
7011         * aix-thread.c (aix_thread_resume, aix_thread_wait)
7012         (aix_thread_xfer_partial): Use scoped_restore.
7013         * inferior.h (save_inferior_ptid): Remove.
7014
7015 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7016
7017         PR tdep/21818
7018         * arm-tdep.c (gdb_print_insn_arm): Mark
7019         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7020
7021 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7022
7023         * NEWS: Mention GDBserver's new option "--selftest".
7024         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7025         * selftest.c: Move it to common/selftest.c.
7026         * selftest.h: Move it to common/selftest.h.
7027         * selftest-arch.c (reset): New function.
7028         (tests_with_arch): Call reset.
7029
7030 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7031
7032         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
7033         instead of exception_fprintf and printf_filtered.
7034
7035 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7036
7037         * selftest.c (register_self_test): Rename it to
7038         selftests::register_test.
7039         (run_self_tests): selftest::run_tests.
7040         * selftest.h: Update declarations.
7041         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7042         selftests::register_test_foreach_arch.
7043         * selftest-arch.h: Update declaration.
7044         * aarch64-tdep.c: Update.
7045         * arm-tdep.c: Likewise.
7046         * disasm-selftests.c: Likewise.
7047         * dwarf2loc.c: Likewise.
7048         * dwarf2-frame.c: Likewise.
7049         * findvar.c: Likewise.
7050         * gdbarch-selftests.c: Likewise.
7051         * maint.c (maintenance_selftest): Likewise.
7052         * regcache.c: Likewise.
7053         * rust-exp.y: Likewise.
7054         * selftest-arch.c: Likewise.
7055         * unittests/environ-selftests.c: Likewise.
7056         * unittests/function-view-selftests.c: Likewise.
7057         * unittests/offset-type-selftests.c: Likewise.
7058         * unittests/optional-selftests.c: Likewise.
7059         * unittests/scoped_restore-selftests.c: Likewise.
7060         * utils-selftests.c: Likewise.
7061
7062 2017-08-17  Pedro Alves  <palves@redhat.com>
7063
7064         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7065         local.
7066
7067 2017-08-17  Pedro Alves  <palves@redhat.com>
7068
7069         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7070         field.
7071         (reset_die_in_process): Delete, replaced by ...
7072         (process_die_scope): ... this new class.  Make it responsible for
7073         freeing cu->line_header too.
7074         (process_die): Use process_die_scope.
7075         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7076         cu->line_header_die_owner.  Don't release the line header if it's
7077         owned by the CU.
7078         (setup_type_unit_groups): Make the CU/DIE own the line header.
7079         Don't release the line header here.
7080
7081 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
7082
7083         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7084
7085 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7086
7087         * NEWS: Mention new shortcuts for nexti and stepi in TUI
7088         Single-Key mode
7089
7090 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7091
7092         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7093         mode command list.
7094
7095 2017-08-15  Stafford Horne  <shorne@gmail.com>
7096
7097         * MAINTAINERS (Write After Approval): Add Stafford Horne.
7098
7099 2017-08-15  Stafford Horne  <shorne@gmail.com>
7100
7101         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7102
7103 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
7104
7105         PR gdb/21954
7106         * infcmd.c (unset_environment_command): Use the 'clear' method on
7107         the environment instead of resetting it.
7108
7109 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
7110
7111         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7112         platforms.
7113
7114 2017-08-14  Tom Tromey  <tom@tromey.com>
7115
7116         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7117         (print_binary_chars): Likewise.
7118         (BITS_IN_BYTES): Remove.
7119
7120 2017-08-14  Tom Tromey  <tom@tromey.com>
7121
7122         PR gdb/21675
7123         * valprint.c (LOW_ZERO): Change value to 034.
7124         (print_octal_chars): Add static_asserts for octal constants.
7125         * printcmd.c (print_scalar_formatted): Add 'd' case.
7126
7127 2017-08-11  Tom Tromey  <tom@tromey.com>
7128
7129         * symfile.c (add_symbol_file_command): Use std::vector.
7130
7131 2017-08-14  Tom Tromey  <tom@tromey.com>
7132
7133         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7134         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7135         std::move.
7136         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7137
7138 2017-08-11  Pedro Alves  <palves@redhat.com>
7139
7140         * infrun.c (process_event_stop_test): Adjust
7141         function_name_is_marked_for_skip call.
7142         * skip.c: Include <list>.
7143         (skiplist_entry): Make it a class with private fields, and
7144         getters/setters.
7145         (skiplist_entry_chain): Delete.
7146         (skiplist_entries): New.
7147         (skiplist_entry_count): Delete.
7148         (highest_skiplist_entry_num): New.
7149         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7150         (add_skiplist_entry): Delete.
7151         (skiplist_entry::skiplist_entry): New.
7152         (skiplist_entry::add_entry): New.
7153         (skip_file_command, skip_function): Adjust.
7154         (compile_skip_regexp): Delete.
7155         (skip_command): Don't compile regexp here.  Adjust to use
7156         skiplist_entry::add_entry.
7157         (skip_info): Adjust to use range-for and getters.
7158         (skip_enable_command, skip_disable_command): Adjust to use
7159         range-for and setters.
7160         (skip_delete_command): Adjust to use std::list.
7161         (add_skiplist_entry): Delete.
7162         (skip_file_p): Delete, refactored as ...
7163         (skiplist_entry::do_skip_file_p): ... this new method.
7164         (skip_gfile_p): Delete, refactored as ...
7165         (skiplist_entry::do_gskip_file_p): ... this new method.
7166         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7167         (skiplist_entry::skip_function_p): ... this new method.
7168         (function_name_is_marked_for_skip): Now returns bool, and takes
7169         the function sal by const reference.  Adjust to use range-for and
7170         skiplist_entry methods.
7171         (_initialize_step_skip): Remove references to
7172         skiplist_entry_chain, skiplist_entry_count.
7173         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7174         takes the function sal by const reference.
7175
7176 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7177
7178         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7179         (dwarf2_frame_cache): Remove reset_cache_cleanup.
7180         (dwarf2_frame_cache):
7181         * frame-unwind.c (frame_unwind_try_unwinder): Catch
7182         RETURN_MASK_ALL and set *this_case to NULL.
7183         * frame-unwind.h: Update comments.
7184
7185 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7186
7187         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7188         (dwarf2_frame_state_copy_regs): Remove.
7189         (dwarf2_frame_state_free_regs): Remove.
7190         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7191         (dwarf2_restore_rule): Call method .alloc_regs instead of
7192         dwarf2_frame_state_alloc_regs.
7193         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
7194         constructor.  Call std::move.
7195         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7196         (dwarf2_frame_cache): Likewise.
7197
7198         [GDB_SELF_TEST]: Include selftest.h and
7199         selftest-arch.h.
7200         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7201         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7202         execute_cfa_program_test.
7203
7204         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7205         copy ctor, assignment operator, move assignment.
7206         <alloc_regs>: New method.
7207         <swap>: New method.
7208         (struct dwarf2_frame_state): Delete dtor.
7209         (dwarf2_frame_state_alloc_regs): Remove declaration.
7210         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7211         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7212
7213 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7214
7215         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7216         (dwarf2_frame_state::dwarf2_frame_state): New.
7217         (dwarf2_frame_state::~dwarf2_frame_state): New.
7218         (dwarf2_fetch_cfa_info): Update.
7219         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
7220         rather than a pointer.  Update code.
7221         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7222         dtor.
7223         <data_align, code_align, retaddr_column>: Change them to const.
7224         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7225         to bool.
7226
7227 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7228
7229         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7230         <loc.exp>: New field.
7231         * dwarf2-frame.c (execute_cfa_program): Update.
7232         (dwarf2_frame_prev_register): Update.
7233
7234 2017-08-10  Pedro Alves  <palves@redhat.com>
7235
7236         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7237
7238 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7239
7240         * fbsd-nat.c (struct fbsd_fork_info): Remove.
7241         (fbsd_pending_children): Use std::list.
7242         (fbsd_remember_child): Likewise.
7243         (fbsd_is_child_pending): Likewise.
7244         (fbsd_pending_vfork_done): Use std::forward_list.
7245         (fbsd_add_vfork_done): Likewise.
7246         (fbsd_is_vfork_done_pending): Likewise.
7247         (fbsd_next_vfork_done): Likewise.
7248
7249 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7250
7251         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7252         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7253         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7254         for `mapfilename'.
7255         (fbsd_xfer_partial): Use gdb::byte_vector.
7256         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7257
7258 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7259
7260         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7261         "filestuff.h".
7262         (fbsd_find_memory_regions): Fix `mapfile' initialization.
7263
7264 2017-08-09  Tom Tromey  <tom@tromey.com>
7265
7266         * skip.c (skiplist_entry): New constructor.
7267         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7268         (skiplist_entry::file_is_glob): Now bool.
7269         (skiplist_entry::file, skiplist_entry::function): Now
7270         std::string.
7271         (make_skip_entry): Return a unique_ptr.  Use new.
7272         (free_skiplist_entry, free_skiplist_entry_cleanup)
7273         (make_free_skiplist_entry_cleanup): Remove.
7274         (skip_command, skip_disable_command, add_skiplist_entry)
7275         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7276         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7277         (function_name_is_marked_for_skip): Update.
7278         (skip_delete_command): Update.  Use delete.
7279
7280 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
7281
7282         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7283         (aarch64_linux_core_read_description): New function.
7284         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7285
7286 2017-08-09  Pedro Alves  <palves@redhat.com>
7287
7288         * cp-name-parser.y (cp_comp_to_string): Return a
7289         gdb::unique_xmalloc_ptr<char>.
7290         * cp-support.c (replace_typedefs_qualified_name)
7291         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7292         (cp_canonicalize_string_full): Use op= instead of explicit
7293         convertion.
7294         (cp_class_name_from_physname, method_name_from_physname)
7295         (cp_func_name, cp_remove_params): Adjust to use
7296         gdb::unique_xmalloc_ptr<char>.
7297         * cp-support.h (cp_comp_to_string): Return a
7298         gdb::unique_xmalloc_ptr<char>.
7299         * python/py-type.c (typy_lookup_type): Adjust to use
7300         gdb::unique_xmalloc_ptr<char>.
7301
7302 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
7303
7304         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7305
7306 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
7307             Yao Qi  <yao.qi@linaro.org>
7308
7309         * cp-support.c (cp_canonicalize_string_full): Use
7310         gdb::unique_xmalloc_ptr<char>.
7311         (cp_canonicalize_string): Likewise.
7312
7313 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7314
7315         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7316         * regformats/i386/amd64-avx-avx512.dat: Remove.
7317         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7318         * regformats/i386/amd64-avx-mpx.dat:Remove.
7319         * regformats/i386/amd64-avx.dat: Remove.
7320         * regformats/i386/amd64-mpx.dat: Remove.
7321         * regformats/i386/i386-avx-avx512.dat: Remove.
7322         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7323         * regformats/i386/i386-avx-mpx.dat: Remove.
7324         * regformats/i386/i386-mmx.dat: Remove.
7325         * regformats/i386/i386-mpx.dat: Remove.
7326
7327 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7328
7329         * amd64-tdep.h (tdesc_x32): Remove the declaration.
7330         * amd64-tdep.c: Don't include features/i386/x32*.c.
7331         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7332         functions.
7333         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7334         and i386/x32-avx-avx512.
7335         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7336         and i386/x32.xml.
7337         * features/i386/x32-avx-avx512.c: Removed.
7338         * features/i386/x32-avx-avx512.xml: Removed.
7339         * features/i386/x32-avx.c: Removed.
7340         * features/i386/x32-avx.xml: Removed.
7341         * features/i386/x32.c: Removed.
7342         * features/i386/x32.xml: Removed.
7343         * regformats/i386/x32-avx-avx512.dat: Removed.
7344         * regformats/i386/x32-avx.dat: Removed.
7345         * regformats/i386/x32.dat: Removed.
7346
7347 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7348
7349         PR breakpoints/21886
7350         * mem-break.c (default_memory_insert_breakpoint): Use
7351         `->placed_address' rather than `->reqstd_address' for the
7352         breakpoint location.
7353
7354 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7355
7356         * arch-utils.c (default_print_insn): Remove arch/mach/endian
7357         assertions.
7358
7359 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7360
7361         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7362         a union of `tdep_info', `tdesc_data' and `id'.
7363         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7364         rather than `info.tdep_info'.
7365         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7366         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7367         * i386-tdep.c (i386_gdbarch_init): Likewise.
7368         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7369         * mips-tdep.c (mips_gdbarch_init): Likewise.
7370         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7371         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7372         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7373         `info.tdep_info'.
7374         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7375         `info.tdep_info'.
7376         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7377         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7378         `info.tdep_info'.
7379         * spu-tdep.c (spu_gdbarch_init): Likewise.
7380         * gdbarch.h: Regenerate.
7381
7382 2017-08-07  Leszek Swirski  <leszeks@google.com>
7383
7384         PR symtab/20899
7385         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7386
7387 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
7388
7389         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7390         (gdbsim_open): Rename gdb_argv args object to argv.
7391
7392 2017-08-05  Tom Tromey  <tom@tromey.com>
7393
7394         * compile/compile-object-load.c (compile_object_load): Use
7395         gdb::unique_xmalloc_ptr.
7396         * cli/cli-dump.c (scan_filename): Rename from
7397         scan_filename_with_cleanup.  Change return type.
7398         (scan_expression): Rename from scan_expression_with_cleanup.
7399         Change return type.
7400         (dump_memory_to_file, dump_value_to_file, restore_command):
7401         Use gdb::unique_xmalloc_ptr.  Update.
7402         * cli/cli-cmds.c (find_and_open_script): Use
7403         gdb::unique_xmalloc_ptr.
7404         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7405         * symmisc.c (maintenance_print_symbols)
7406         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7407         * symfile.c (symfile_bfd_open, generic_load)
7408         (add_symbol_file_command, remove_symbol_file_command): Use
7409         gdb::unique_xmalloc_ptr.
7410         * source.c (openp): Use gdb::unique_xmalloc_ptr.
7411         * psymtab.c (maintenance_print_psymbols): Use
7412         gdb::unique_xmalloc_ptr.
7413         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7414         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7415         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7416         (reload_shared_libraries_1): Likewise.
7417
7418 2017-08-05  Tom Tromey  <tom@tromey.com>
7419
7420         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7421         (rust_op_vector, rust_set_vector): New typedefs.
7422         (current_parser): New global.
7423         (work_obstack): Change to pointer type.  Update all users.
7424         (rust_ast, pstate): Remove globals.
7425         (struct rust_parser): New.
7426         (%union) <params, field_inits>: Change type.
7427         (start, tuple_expr, unit_expr, struct_expr_list, literal)
7428         (field_expr, expr_list, maybe_expr_list, type_list): Update.
7429         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7430         (convert_params_to_types, convert_params_to_expression): Change
7431         type of "params".
7432         (ast_string): Change type of "fields".
7433         (rust_parse): Make a rust_parser.  Remove cleanups.
7434         (rust_lex_tests): Make and install an auto_obstack.
7435
7436 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7437
7438         * configure.srv (ipa_x32_linux_regobj): New.
7439         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7440         instead of X86_TDESC_AVX512.
7441         (initialize_low_tracepoint): Call
7442         init_registers_x32_avx_avx512_linux.
7443
7444 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7445
7446         * utils.h (gdb_argv): Add namespace std for nullptr_t.
7447
7448 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7449
7450         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7451
7452 2017-08-03  Tom Tromey  <tom@tromey.com>
7453
7454         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7455         Remove.
7456         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7457
7458 2017-08-03  Tom Tromey  <tom@tromey.com>
7459
7460         * python/py-param.c (compute_enum_values): Use gdb_argv.
7461
7462 2017-08-03  Tom Tromey  <tom@tromey.com>
7463
7464         * utils.h (struct gdb_argv_deleter): New.
7465         (gdb_argv): New class.
7466         * utils.c (gdb_argv::reset): New method.
7467         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7468         * tracefile.c (tsave_command): Use gdb_argv.
7469         * top.c (new_ui_command): Use gdb_argv.
7470         * symmisc.c (maintenance_print_symbols)
7471         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7472         * symfile.c (symbol_file_command, generic_load)
7473         (remove_symbol_file_command): Use gdb_argv.
7474         * stack.c (backtrace_command): Use gdb_argv.
7475         * source.c (add_path, show_substitute_path_command)
7476         (unset_substitute_path_command, set_substitute_path_command):
7477         Use gdb_argv.
7478         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
7479         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7480         * remote.c (extended_remote_run, remote_put_command)
7481         (remote_get_command, remote_delete_command): Use gdb_argv.
7482         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7483         (gdbsim_open): Use gdb_argv.
7484         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7485         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7486         * procfs.c (procfs_info_proc): Use gdb_argv.
7487         * interps.c (interpreter_exec_cmd): Use gdb_argv.
7488         * infrun.c (handle_command): Use gdb_argv.
7489         * inferior.c (add_inferior_command, clone_inferior_command):
7490         Use gdb_argv.
7491         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7492         * exec.c (exec_file_command): Use gdb_argv.
7493         * cli/cli-cmds.c (alias_command): Use gdb_argv.
7494         * compile/compile.c (build_argc_argv): Use gdb_argv.
7495
7496 2017-08-03  Tom Tromey  <tom@tromey.com>
7497
7498         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7499
7500 2017-08-03  Tom Tromey  <tom@tromey.com>
7501
7502         * python/python.c (compute_python_string): Return std::string.
7503         (gdbpy_eval_from_control_command): Update.
7504         (do_start_initialization): Use std::string.
7505         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7506         xstrprintf.
7507         * python/py-breakpoint.c (local_setattro): Use string_printf, not
7508         xstrprintf.
7509
7510 2017-08-03  Tom Tromey  <tom@tromey.com>
7511
7512         * top.h (do_restore_instream_cleanup): Remove.
7513         * top.c (do_restore_instream_cleanup): Remove.
7514         (read_command_file): Use scoped_restore.
7515         * cli/cli-script.c (execute_user_command): Use scoped_restore.
7516
7517 2017-08-03  Tom Tromey  <tom@tromey.com>
7518
7519         * cli/cli-script.c (execute_user_command)
7520         (execute_control_command): Use scoped_restore.
7521
7522 2017-08-03  Tom Tromey  <tom@tromey.com>
7523
7524         * cli/cli-script.c (do_restore_user_call_depth): Remove.
7525         (execute_user_command): Remove user_call_depth; use
7526         user_args_stack's size instead.
7527
7528 2017-08-03  Tom Tromey  <tom@tromey.com>
7529
7530         * top.h (in_user_command): Remove.
7531         * top.c (in_user_command): Remove.
7532         * cli/cli-script.c (do_restore_user_call_depth)
7533         (execute_user_command): Update.
7534
7535 2017-08-03  Tom Tromey  <tom@tromey.com>
7536
7537         * valops.c (search_struct_method): Use gdb::byte_vector.
7538         * valarith.c (value_concat): Use std::vector.
7539         * target.c (memory_xfer_partial): Use gdb::byte_vector.
7540         (simple_search_memory): Likewise.
7541         * printcmd.c (find_string_backward): Use gdb::byte_vector.
7542         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7543         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7544         * elfread.c (elf_rel_plt_read): Use std::string.
7545         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7546         * cli/cli-dump.c (restore_section_callback): Use
7547         gdb::byte_vector.
7548
7549 2017-08-03  Tom Tromey  <tom@tromey.com>
7550
7551         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7552
7553 2017-08-03  Tom Tromey  <tom@tromey.com>
7554
7555         * tui/tui-regs.c (tui_restore_gdbout): Remove.
7556         (tui_register_format): Use scoped_restore.
7557
7558 2017-08-03  Tom Tromey  <tom@tromey.com>
7559
7560         * reverse.c (exec_direction_default): Remove.
7561         (exec_reverse_once): Use scoped_restore.
7562         * remote.c (restore_remote_timeout): Remove.
7563         (remote_flash_erase, remote_flash_write, remote_flash_done)
7564         (readchar, remote_serial_write): Use scoped_restore.
7565         * cli/cli-script.c (struct source_cleanup_lines_args)
7566         (source_cleanup_lines): Remove.
7567         (script_from_file): Use scoped_restore.
7568         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7569         (source_command): Use scoped_restore.
7570
7571 2017-08-03  Tom Tromey  <tom@tromey.com>
7572
7573         * utils.h (make_cleanup_free_so): Remove.
7574         * utils.c (do_free_so, make_cleanup_free_so): Remove.
7575         * solist.h (struct so_deleter): New.
7576         (so_list_up): New typedef.
7577         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7578
7579 2017-08-03  Tom Tromey  <tom@tromey.com>
7580
7581         * utils.h (make_cleanup_restore_current_language): Remove.
7582         * utils.c (do_restore_current_language)
7583         (make_cleanup_restore_current_language): Remove.
7584         * parse.c (parse_exp_in_context_1)
7585         (parse_expression_with_language): Use
7586         scoped_restore_current_language.
7587         * mi/mi-main.c (mi_cmd_execute): Use
7588         scoped_restore_current_language.
7589         * language.h (scoped_restore_current_language): New class.
7590
7591 2017-08-03  Tom Tromey  <tom@tromey.com>
7592
7593         * compile/compile.c (cleanup_unlink_file): Remove.
7594         (compile_to_object): Use gdb::unlinker.
7595         (eval_compile_command): Likewise.
7596
7597 2017-08-03  Tom Tromey  <tom@tromey.com>
7598
7599         * utils.h (make_cleanup_fclose): Remove.
7600         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7601
7602 2017-08-03  Tom Tromey  <tom@tromey.com>
7603
7604         * top.c (open_terminal_stream): Return gdb_file_up.
7605         (new_ui_command): Update.
7606
7607 2017-08-03  Tom Tromey  <tom@tromey.com>
7608
7609         * source.c (print_source_lines_base, forward_search_command)
7610         (reverse_search_command): Use gdb_file_up.
7611
7612 2017-08-03  Tom Tromey  <tom@tromey.com>
7613
7614         * fbsd-nat.c (fbsd_find_memory_regions): Update.
7615
7616 2017-08-03  Tom Tromey  <tom@tromey.com>
7617
7618         * cli/cli-cmds.c (find_and_open_script): Change return type.
7619         Remove "streamp" and "full_path" parameters.
7620         (source_script_with_search): Update.
7621         * auto-load.c (source_script_file): Update.
7622         * cli/cli-cmds.h (find_and_open_script): Change type.
7623         (open_script): New struct.
7624
7625 2017-08-03  Tom Tromey  <tom@tromey.com>
7626
7627         * xml-support.c (xml_fetch_content_from_file): Update.
7628         * ui-file.c (stdio_file::open): Update.
7629         * tracefile-tfile.c (tfile_start): Update.
7630         * remote.c (remote_file_put, remote_file_get): Update.
7631         * nat/linux-procfs.c (linux_proc_get_int)
7632         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7633         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7634         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7635         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7636         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7637         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7638         * linux-nat.c (linux_proc_pending_signals): Update.
7639         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7640         (file_closer): Remove.
7641         * compile/compile.c (compile_to_object): Update.
7642         * common/filestuff.h (struct gdb_file_deleter): New.
7643         (gdb_file_up): New typedef.
7644         (gdb_fopen_cloexec): Change return type.
7645         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7646         * cli/cli-dump.c (fopen_with_cleanup): Remove.
7647         (dump_binary_file, restore_binary_file): Update.
7648         * auto-load.c (auto_load_objfile_script_1): Update.
7649
7650 2017-08-03  Tom Tromey  <tom@tromey.com>
7651
7652         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7653         (info_static_tracepoint_markers_command): Likewise.
7654         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7655         * skip.c (skip_info): Use ui_out_emit_table.
7656         * progspace.c (print_program_space): Use ui_out_emit_table.
7657         * osdata.c (info_osdata): Use ui_out_emit_table.
7658         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7659         ui_out_emit_table.
7660         * linux-thread-db.c (info_auto_load_libthread_db): Use
7661         ui_out_emit_table.
7662         * inferior.c (print_inferior): Use ui_out_emit_table.
7663         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7664         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7665         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7666         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7667         * ui-out.h (class ui_out_emit_table): New.
7668
7669 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
7670
7671         * mips-tdep.c (mips_fpu_type_str): New function.
7672         (mips_dump_tdep): Call it.
7673
7674 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
7675
7676         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7677         `->mips_fpu_type'.
7678
7679 2017-07-31  Xavier Roirand  <roirand@adacore.com>
7680
7681         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7682
7683 2017-07-27  Xavier Roirand  <roirand@adacore.com>
7684
7685         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7686
7687 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7688
7689         * cli/cli-cmds.c (maintenancechecklist): New variable.
7690         * gdbcmd.h (maintenancechecklist): Declare it.
7691         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7692         Call i386_linux_read_description with different masks.
7693         * maint.c (maintenance_check_command): New function.
7694         (_initialize_maint_cmds): Call add_prefix_cmd.
7695         * target-descriptions.c (tdesc_reg): override operator != and ==.
7696         (tdesc_type): Likewise.
7697         (tdesc_feature): Likewise.
7698         (target_desc): Likewise.
7699         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7700         (maintenance_check_xml_descriptions): New function.
7701         (_initialize_target_descriptions) Add command "xml-descriptions".
7702         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7703
7704 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7705
7706         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7707         Include features/i386/32bit-*.c.
7708         (i386_linux_read_description): Generate target description if it
7709         doesn't exist.
7710         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7711         functions.
7712         * features/i386/32bit-linux.c: Re-generated.
7713         * features/i386/32bit-sse.c: Likewise.
7714         * target-descriptions.c (print_c_feature::visit): Print code to
7715         set register number if needed.
7716         (print_c_feature) <m_next_regnum>: New field.
7717
7718 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7719
7720         * features/Makefile (CFILES): Rename with TDESC_CFILES.
7721         (FEATURE_XMLFILES): New.
7722         (FEATURE_CFILES): New.
7723         New rules.
7724         (clean-cfiles): Remove generated c files.
7725         * features/i386/32bit-avx.c: Generated.
7726         * features/i386/32bit-avx512.c: Generated.
7727         * features/i386/32bit-core.c: Generated.
7728         * features/i386/32bit-linux.c: Generated.
7729         * features/i386/32bit-mpx.c: Generated.
7730         * features/i386/32bit-pkeys.c: Generated.
7731         * features/i386/32bit-sse.c: Generated.
7732         * target-descriptions.c: Include algorithm.
7733         (tdesc_element_visitor): Add method visit_end.
7734         (print_c_tdesc): Implement visit_end.
7735         (print_c_tdesc:: m_filename_after_features): Move it to
7736         protected.
7737         (print_c_feature): New class.
7738         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7739         name starts with "i386/32bit-".
7740
7741 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7742
7743         * target-descriptions.c (tdesc_element_visitor): New class.
7744         (tdesc_element): New class.
7745         (tdesc_reg): Inherit from tdesc_element.
7746         (tdesc_reg::accept): New function.
7747         (tdesc_type): Inherit from tdesc_element.
7748         (tdesc_type::accept): New function.
7749         (tdesc_feature): Inherit from tdesc_element.
7750         (tdesc_feature::accept): New function.
7751         (target_desc): Inherit from tdesc_element.
7752         (target_desc::target_desc): New.
7753         (target_desc::~target_desc): New.
7754         (target_desc::accept): New.
7755         (allocate_target_description): Use new.
7756         (free_target_description): Use delete.
7757         (print_c_tdesc): New class.
7758         (maint_print_c_tdesc_cmd): Adjust.
7759
7760         * features/aarch64.c: Re-generated.
7761         * features/arc-arcompact.c: Re-generated.
7762         * features/arc-v2.c: Re-generated.
7763         * features/arm/arm-with-iwmmxt.c: Re-generated.
7764         * features/arm/arm-with-m.c: Re-generated.
7765         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
7766         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
7767         * features/arm/arm-with-neon.c: Re-generated.
7768         * features/arm/arm-with-vfpv2.c: Re-generated.
7769         * features/arm/arm-with-vfpv3.c: Re-generated.
7770         * features/i386/amd64-avx-avx512.c: Re-generated.
7771         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7772         * features/i386/amd64-avx.c: Re-generated.
7773         * features/i386/amd64-avx-linux.c: Re-generated.
7774         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
7775         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7776         * features/i386/amd64-avx-mpx.c: Re-generated.
7777         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
7778         * features/i386/amd64.c: Re-generated.
7779         * features/i386/amd64-linux.c: Re-generated.
7780         * features/i386/amd64-mpx.c: Re-generated.
7781         * features/i386/amd64-mpx-linux.c: Re-generated.
7782         * features/i386/i386-avx-avx512.c: Re-generated.
7783         * features/i386/i386-avx-avx512-linux.c: Re-generated.
7784         * features/i386/i386-avx.c: Re-generated.
7785         * features/i386/i386-avx-linux.c: Re-generated.
7786         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
7787         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
7788         * features/i386/i386-avx-mpx.c: Re-generated.
7789         * features/i386/i386-avx-mpx-linux.c: Re-generated.
7790         * features/i386/i386.c: Re-generated.
7791         * features/i386/i386-linux.c: Re-generated.
7792         * features/i386/i386-mmx.c: Re-generated.
7793         * features/i386/i386-mmx-linux.c: Re-generated.
7794         * features/i386/i386-mpx.c: Re-generated.
7795         * features/i386/i386-mpx-linux.c: Re-generated.
7796         * features/i386/x32-avx-avx512.c: Re-generated.
7797         * features/i386/x32-avx-avx512-linux.c: Re-generated.
7798         * features/i386/x32-avx.c: Re-generated.
7799         * features/i386/x32-avx-linux.c: Re-generated.
7800         * features/i386/x32.c: Re-generated.
7801         * features/i386/x32-linux.c: Re-generated.
7802         * features/microblaze.c: Re-generated.
7803         * features/microblaze-with-stack-protect.c: Re-generated.
7804         * features/mips64-dsp-linux.c: Re-generated.
7805         * features/mips64-linux.c: Re-generated.
7806         * features/mips-dsp-linux.c: Re-generated.
7807         * features/mips-linux.c: Re-generated.
7808         * features/nds32.c: Re-generated.
7809         * features/nios2.c: Re-generated.
7810         * features/nios2-linux.c: Re-generated.
7811         * features/rs6000/powerpc-32.c: Re-generated.
7812         * features/rs6000/powerpc-32l.c: Re-generated.
7813         * features/rs6000/powerpc-403.c: Re-generated.
7814         * features/rs6000/powerpc-403gc.c : Re-generated.
7815         * features/rs6000/powerpc-405.c: Re-generated.
7816         * features/rs6000/powerpc-505.c: Re-generated.
7817         * features/rs6000/powerpc-601.c: Re-generated.
7818         * features/rs6000/powerpc-602.c: Re-generated.
7819         * features/rs6000/powerpc-603.c: Re-generated.
7820         * features/rs6000/powerpc-604.c: Re-generated.
7821         * features/rs6000/powerpc-64.c: Re-generated.
7822         * features/rs6000/powerpc-64l.c: Re-generated.
7823         * features/rs6000/powerpc-7400.c: Re-generated.
7824         * features/rs6000/powerpc-750.c: Re-generated.
7825         * features/rs6000/powerpc-860.c: Re-generated.
7826         * features/rs6000/powerpc-altivec32.c: Re-generated.
7827         * features/rs6000/powerpc-altivec32l.c: Re-generated.
7828         * features/rs6000/powerpc-altivec64.c: Re-generated.
7829         * features/rs6000/powerpc-altivec64l.c: Re-generated.
7830         * features/rs6000/powerpc-cell32l.c: Re-generated.
7831         * features/rs6000/powerpc-cell64l.c: Re-generated.
7832         * features/rs6000/powerpc-e500.c: Re-generated.
7833         * features/rs6000/powerpc-e500l.c: Re-generated.
7834         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
7835         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
7836         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
7837         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
7838         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
7839         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
7840         * features/rs6000/powerpc-vsx32.c: Re-generated.
7841         * features/rs6000/powerpc-vsx32l.c: Re-generated.
7842         * features/rs6000/powerpc-vsx64.c: Re-generated.
7843         * features/rs6000/powerpc-vsx64l.c: Re-generated.
7844         * features/rs6000/rs6000.c: Re-generated.
7845         * features/s390-linux32.c: Re-generated.
7846         * features/s390-linux32v1.c: Re-generated.
7847         * features/s390-linux32v2.c: Re-generated.
7848         * features/s390-linux64.c: Re-generated.
7849         * features/s390-linux64v1.c: Re-generated.
7850         * features/s390-linux64v2.c: Re-generated.
7851         * features/s390-te-linux64.c: Re-generated.
7852         * features/s390-tevx-linux64.c: Re-generated.
7853         * features/s390-vx-linux64.c: Re-generated.
7854         * features/s390x-linux64.c: Re-generated.
7855         * features/s390x-linux64v1.c: Re-generated.
7856         * features/s390x-linux64v2.c: Re-generated.
7857         * features/s390x-te-linux64.c: Re-generated.
7858         * features/s390x-tevx-linux64.c: Re-generated.
7859         * features/s390x-vx-linux64.c: Re-generated.
7860         * features/sparc/sparc32-solaris.c: Re-generated.
7861         * features/sparc/sparc64-solaris.c: Re-generated.
7862         * features/tic6x-c62x.c: Re-generated.
7863         * features/tic6x-c62x-linux.c: Re-generated.
7864         * features/tic6x-c64x.c: Re-generated.
7865         * features/tic6x-c64x-linux.c: Re-generated.
7866         * features/tic6x-c64xp.c: Re-generated.
7867         * features/tic6x-c64xp-linux.c: Re-generated.
7868
7869 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7870
7871         * i386-linux-tdep.c (i386_linux_read_description): New function.
7872         (i386_linux_core_read_description): Call
7873         i386_linux_read_description.
7874         * i386-linux-tdep.h (i386_linux_read_description): Declare.
7875         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
7876         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
7877         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
7878         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
7879         * x86-linux-nat.c (x86_linux_read_description): Call
7880         i386_linux_read_description.
7881
7882 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7883
7884         * NEWS: Mention it.
7885         * features/Makefile (%.c: %.xml): Pass the xml file name to
7886         command "maint print c-tdesc".
7887         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7888         name from 'arg'.
7889
7890 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7891
7892         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
7893         in-class initialization.
7894         (tdesc_create_feature): Call new instead of XCNEW.
7895         (free_target_description): Ue delete.
7896
7897 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
7898
7899         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
7900
7901 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7902
7903         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
7904         constant.
7905         (amd64_x32_init_abi): Likewise.
7906         * amd64-tdep.h (amd64_init_abi): Update declaration.
7907         (amd64_x32_init_abi): Likewise.
7908
7909 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7910
7911         PR tdep/21717
7912         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
7913         condition for FPSCR.
7914         (arm_linux_store_inferior_registers): Likewise.
7915
7916 2017-07-22  Tom Tromey  <tom@tromey.com>
7917
7918         * break-catch-syscall.c (struct catch_syscall_inferior_data)
7919         <syscalls_counts>: Now a std::vector.
7920         (get_catch_syscall_inferior_data): Use "new".
7921         (catch_syscall_inferior_data_cleanup): Use "delete".
7922         (insert_catch_syscall, remove_catch_syscall)
7923         (clear_syscall_counts): Update.
7924
7925 2017-07-22  Tom Tromey  <tom@tromey.com>
7926
7927         * break-catch-syscall.c (syscall_catchpoint)
7928         <syscalls_to_be_caught>: Now a std::vector<int>
7929         (~syscall_catchpoint): Remove.
7930         (insert_catch_syscall, remove_catch_syscall)
7931         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
7932         (print_mention_catch_syscall, print_recreate_catch_syscall):
7933         Update.
7934         (create_syscall_event_catchpoint): Change type of "filter"
7935         parameter.
7936         (catch_syscall_split_args): Return a std::vector.
7937         (catch_syscall_command_1, catching_syscall_number_1): Update.
7938
7939 2017-07-22  Tom Tromey  <tom@tromey.com>
7940
7941         * break-catch-throw.c (struct exception_catchpoint)
7942         <exception_rx>: Now a std::string.
7943         (~exception_catchpoint): Remove.
7944         (print_one_detail_exception_catchpoint): Update.
7945         (handle_gnu_v3_exceptions): Change type of except_rx.
7946         (extract_exception_regexp): Return a std::string.
7947         (catch_exception_command_1): Update.
7948
7949 2017-07-22  Tom Tromey  <tom@tromey.com>
7950
7951         * break-catch-sig.c (gdb_signal_type): Remove typedef.
7952         (struct signal_catchpoint) <signals_to_be_caught>: Now a
7953         std::vector.
7954         <catch_all>: Now a bool.
7955         (~signal_catchpoint): Remove.
7956         (signal_catchpoint_insert_location)
7957         (signal_catchpoint_remove_location)
7958         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
7959         (signal_catchpoint_print_mention)
7960         (signal_catchpoint_print_recreate)
7961         (signal_catchpoint_explains_signal): Update.
7962         (create_signal_catchpoint): Change type of "filter" and
7963         "catch_all".
7964         (catch_signal_split_args): Return a std::vector.  Change type of
7965         "catch_all".
7966         (catch_signal_command): Update.
7967
7968 2017-07-20  Pedro Alves  <palves@redhat.com>
7969
7970         * ada-lang.c (ada_language_defn): Make extern.
7971         (_initialize_ada_language): Remove add_language call.
7972         * c-lang.c (c_language_defn, cplus_language_defn)
7973         (asm_language_defn, minimal_language_defn): Make extern.
7974         (_initialize_c_language): Delete.
7975         * completer.c (compare_cstrings): Delete, moved to utils.h.
7976         * d-lang.c (d_language_defn): Make extern.
7977         (_initialize_d_language): Remove add_language calls.
7978         * defs.h (enum language): Add comment.
7979         * f-lang.c (f_language_defn): Make extern.
7980         (_initialize_f_language): Remove add_language call.
7981         * go-lang.c (go_language_defn): Make extern.
7982         (_initialize_go_language): Remove add_language call.
7983         * language.c: Include <algorithm>.
7984         (languages): Redefine as const array.
7985         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
7986         (set_language_command): Handle "local".  Use for-range loop.
7987         (set_language): Remove loop.
7988         (language_enum): Rewrite.
7989         (language_def, language_str): Remove loops.
7990         (add_language): Delete.
7991         (add_set_language_command): New, based on add_languages.
7992         (skip_language_trampoline): Adjust.
7993         (local_language_defn): Delete.
7994         (language_gdbarch_post_init): Adjust.
7995         (_initialize_language): Remove add_language calls.  Call
7996         add_set_language_command.
7997         * language.h (add_language): Delete.
7998         (auto_language_defn)
7999         (unknown_language_defn, minimal_language_defn, ada_language_defn)
8000         (asm_language_defn, c_language_defn, cplus_language_defn)
8001         (d_language_defn, f_language_defn, go_language_defn)
8002         (m2_language_defn, objc_language_defn, opencl_language_defn)
8003         (pascal_language_defn, rust_language_defn): Declare.
8004         * m2-lang.c (m2_language_defn): Make extern.
8005         (_initialize_m2_language): Remove add_language call.
8006         * objc-lang.c (objc_language_defn): Make extern.
8007         (_initialize_objc_language): Remove add_language call.
8008         * opencl-lang.c (opencl_language_defn): Make extern.
8009         (_initialize_opencl_language): Remove add_language call.
8010         * p-lang.c (pascal_language_defn): Make extern.
8011         (_initialize_pascal_language): Delete.
8012         * rust-lang.c (rust_language_defn): Make extern.
8013         (_initialize_rust_language): Delete.
8014         * utils.h (compare_cstrings): New static inline function.
8015
8016 2017-07-20  Pedro Alves  <palves@redhat.com>
8017
8018         * ada-lang.c (ada_to_fixed_type_1): Adjust.
8019         (get_var_value): Constify parameters.
8020         (get_int_var_value): Change prototype.
8021         (to_fixed_range_type): Adjust.
8022         * ada-lang.h (get_int_var_value): Change prototype.
8023
8024 2017-07-20  Pedro Alves  <palves@redhat.com>
8025
8026         * dwarf2read.c (dw2_lookup_symbol): Use
8027         SYMBOL_MATCHES_SEARCH_NAME.
8028         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8029
8030 2017-07-20  Pedro Alves  <palves@redhat.com>
8031
8032         * block.c (block_iter_name_step, block_iter_name_first)
8033         (block_iter_name_next): Delete.
8034         (block_lookup_symbol_primary): Adjust to use
8035         dict_iter_match_first/dict_iter_match_next.
8036         * block.h (block_iter_name_first, block_iter_name_next): Delete
8037         declarations.
8038         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8039         dict_iter_match_first/dict_iter_match_next.
8040
8041 2017-07-20  Pedro Alves  <palves@redhat.com>
8042
8043         * cp-support.c (cp_find_first_component_aux): Add missing case for
8044         end of string.
8045
8046 2017-07-18  David Blaikie  <dblaikie@gmail.com>
8047
8048         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8049         of dwo_cu's dwo_file.
8050
8051 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8052
8053         * remote.c (store_registers_using_G): Remove one line comment.
8054
8055 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8056
8057         * regcache.c (regcache_cpy): Simplify it.
8058         (regcache::cpy_no_passthrough): Remove it.
8059         * regcache.h (cpy_no_passthrough): Remove it.
8060         (regcache_dup, regcache_cpy): Update comments.
8061
8062 2017-07-18  Pedro Alves  <palves@redhat.com>
8063
8064         * remote-sim.c (sim_command_completer): Adjust to work with a
8065         completion_tracker instead of a VEC.
8066
8067 2017-07-17  Pedro Alves  <palves@redhat.com>
8068
8069         * completer.c (complete_source_filenames): New function.
8070         (complete_address_and_linespec_locations): New function.
8071         (location_completer): Use complete_address_and_linespec_locations.
8072         (completion_tracker::build_completion_result): Honor the tracker's
8073         request to suppress append.
8074         * completer.h (completion_tracker::suppress_append_ws)
8075         (completion_tracker::set_suppress_append_ws): New methods.
8076         (completion_tracker::m_suppress_append_ws): New field.
8077         (complete_source_filenames): New declaration.
8078         * linespec.c (linespec_complete_what): New.
8079         (struct ls_parser) <complete_what, completion_word,
8080         completion_quote_char, completion_quote_end, completion_tracker>:
8081         New fields.
8082         (string_find_incomplete_keyword_at_end): New.
8083         (linespec_lexer_lex_string): Record quote char.  If in completion
8084         mode, don't throw.
8085         (linespec_lexer_consume_token): Advance the completion word point.
8086         (linespec_lexer_peek_token): Save/restore completion info.
8087         (save_stream_and_consume_token): New.
8088         (set_completion_after_number): New.
8089         (linespec_parse_basic): Set what to complete next depending on
8090         token.  Handle function and label completions specially.
8091         (parse_linespec): Disable objc shortcut in completion mode.  Set
8092         what to complete next depending on token type.  Skip keyword if in
8093         completion mode.
8094         (complete_linespec_component, linespec_complete): New.
8095         * linespec.h (linespec_complete): Declare.
8096
8097 2017-07-17  Pedro Alves  <palves@redhat.com>
8098
8099         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8100         Handle 'operator<' / 'operator<<'.
8101
8102 2017-07-17  Pedro Alves  <palves@redhat.com>
8103
8104         * completer.c (collect_explicit_location_matches): Handle
8105         MATCH_LABEL.
8106         (convert_explicit_location_to_linespec): New, factored out from
8107         ...
8108         (convert_explicit_location_to_sals): ... this.
8109         (complete_label): New.
8110         (linespec_complete_label, find_label_symbols_in_block): New.
8111         (find_label_symbols): Add completion_mode parameter and adjust to
8112         call find_label_symbols_in_block.
8113         * linespec.h (linespec_complete_label): Declare.
8114
8115 2017-07-17  Pedro Alves  <palves@redhat.com>
8116
8117         * ada-lang.c (ada_collect_symbol_completion_matches): Add
8118         complete_symbol_mode parameter.
8119         * cli/cli-cmds.c (complete_command): Get the completion result out
8120         of the handle_brkchars tracker if used a custom word point.
8121         * completer.c: Include "linespec.h".
8122         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8123         (advance_to_expression_complete_word_point): New.
8124         (completion_tracker::completes_to_completion_word): New.
8125         (complete_files_symbols): Pass down
8126         complete_symbol_mode::EXPRESSION.
8127         (explicit_options, probe_options): New.
8128         (collect_explicit_location_matches): Complete on the
8129         explictit_loc->foo instead of word.  Use
8130         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
8131         keyword and options completions.
8132         (backup_text_ptr): Delete.
8133         (skip_keyword): New.
8134         (complete_explicit_location): Remove 'word' parameter.  Add
8135         language, quoted_arg_start and quoted_arg_end parameters.
8136         Rewrite, parsing left to right.
8137         (location_completer): Rewrite.
8138         (location_completer_handle_brkchars): New function.
8139         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8140         (enum complete_line_internal_reason): Adjust comments.
8141         (completion_tracker::discard_completions): New.
8142         (completer_handle_brkchars_func_for_completer): Handle
8143         location_completer.
8144         (gdb_custom_word_point_brkchars)
8145         (gdb_org_rl_basic_quote_characters): New.
8146         (gdb_completion_word_break_characters_throw)
8147         (completion_find_completion_word): Handle trackers that use a
8148         custom word point.
8149         (completion_tracker::advance_custom_word_point_by): New.
8150         (completion_tracker::build_completion_result): Don't rely on
8151         readline appending the quote char.
8152         (gdb_rl_attempted_completion_function_throw): Handle trackers that
8153         use a custom word point.
8154         (gdb_rl_attempted_completion_function): Restore
8155         rl_basic_quote_characters.
8156         * completer.h (class completion_tracker): Extend intro comment.
8157         (completion_tracker::set_quote_char)
8158         (completion_tracker::quote_char)
8159         (completion_tracker::set_use_custom_word_point)
8160         (completion_tracker::use_custom_word_point)
8161         (completion_tracker::custom_word_point)
8162         (completion_tracker::set_custom_word_point)
8163         (completion_tracker::advance_custom_word_point_by)
8164         (completion_tracker::completes_to_completion_word)
8165         (completion_tracker::discard_completions): New methods.
8166         (completion_tracker::m_quote_char)
8167         (completion_tracker::m_use_custom_word_point)
8168         (completion_tracker::m_custom_word_point): New fields.
8169         (advance_to_expression_complete_word_point): Declare.
8170         * f-lang.c (f_collect_symbol_completion_matches): Add
8171         complete_symbol_mode parameter.
8172         * language.h (struct language_defn)
8173         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8174         parameter.
8175         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
8176         (linespec_complete_function): New function.
8177         (linespec_lexer_lex_keyword): Adjust.
8178         * linespec.h (linespec_keywords, linespec_complete_function): New
8179         declarations.
8180         * location.c (find_end_quote): New function.
8181         (explicit_location_lex_one): Add explicit_completion_info
8182         parameter.  Save quoting info.  Don't throw if being called for
8183         completion.  Don't handle Ada operators here.
8184         (is_cp_operator, skip_op_false_positives, first_of)
8185         (explicit_location_lex_one_function): New function.
8186         (string_to_explicit_location): Replace 'dont_throw' parameter with
8187         an explicit_completion_info pointer parameter.  Handle it.  Don't
8188         use explicit_location_lex_one to lex function names.  Use
8189         explicit_location_lex_one_function instead.
8190         * location.h (struct explicit_completion_info): New.
8191         (string_to_explicit_location): Replace 'dont_throw' parameter with
8192         an explicit_completion_info pointer parameter.
8193         * symtab.c (default_collect_symbol_completion_matches_break_on):
8194         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
8195         (default_collect_symbol_completion_matches)
8196         (collect_symbol_completion_matches): Add complete_symbol_mode
8197         parameter.
8198         (collect_symbol_completion_matches_type): Pass down
8199         complete_symbol_mode::EXPRESSION.
8200         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8201         parameter.  Handle LINESPEC mode.
8202         * symtab.h (complete_symbol_mode): New.
8203         (default_collect_symbol_completion_matches_break_on)
8204         (default_collect_symbol_completion_matches)
8205         (collect_symbol_completion_matches)
8206         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8207         parameter.
8208
8209 2017-07-17  Pedro Alves  <palves@redhat.com>
8210
8211         * utils.c (enum class strncmp_iw_mode): New.
8212         (strcmp_iw): Rename to ...
8213         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
8214         parameters.  Handle them.
8215         (strncmp_iw): New.
8216         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8217         * utils.h (strncmp_iw): Declare.
8218         (strcmp_iw): Move describing comments here.
8219
8220 2017-07-17  Pedro Alves  <palves@redhat.com>
8221
8222         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8223         CP_OPERATOR_STR.
8224         * c-typeprint.c (is_type_conversion_operator): Use
8225         CP_OPERATOR_STR.
8226         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8227         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8228         CP_OPERATOR_LEN.
8229         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8230         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8231         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8232         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8233         CP_OPERATOR_STR.
8234         * location.c: Include "cp-support.h".
8235         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8236         CP_OPERATOR_STR.
8237         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8238         CP_OPERATOR_LEN.
8239
8240 2017-07-17  Pedro Alves  <palves@redhat.com>
8241
8242         * cli/cli-cmds.c (complete_command): Use a completion tracker
8243         along with completion_find_completion_word for handle_brkchars
8244         phase.
8245         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8246         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8247         (struct gdb_rl_completion_word_info): New.
8248         (gdb_rl_find_completion_word): New.
8249         (completion_find_completion_word): New.
8250         * completer.h (completion_find_completion_word): Declare.
8251
8252 2017-07-17  Pedro Alves  <palves@redhat.com>
8253
8254         * ada-lang.c (symbol_completion_match): Adjust comments.
8255         (symbol_completion_add): Replace vector parameter with
8256         completion_tracker parameter.  Use it.
8257         (ada_make_symbol_completion_list): Rename to...
8258         (ada_collect_symbol_completion_matches): ... this.  Add
8259         completion_tracker parameter and use it.
8260         (ada_language_defn): Adjust.
8261         * break-catch-syscall.c (catch_syscall_completer): Adjust
8262         prototype and work with completion_tracker instead of VEC.
8263         * breakpoint.c (condition_completer): Adjust prototype and work
8264         with completion_tracker instead of VEC.
8265         * c-lang.c (c_language_defn, cplus_language_defn)
8266         (asm_language_defn, minimal_language_defn): Adjust to renames.
8267         * cli/cli-cmds.c (complete_command): Rework using
8268         completion_tracker.  Catch exceptions when completing.
8269         * cli/cli-decode.c (integer_unlimited_completer)
8270         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8271         with completion_tracker instead of VEC.
8272         * command.h (struct completion_tracker): Forward declare.
8273         (completer_ftype, completer_handle_brkchars_ftype): Change
8274         types.
8275         (complete_on_cmdlist, complete_on_enum): Adjust.
8276         * completer.c: Include <algorithm>.
8277         (struct gdb_completer_state): New.
8278         (current_completion): New global.
8279         (readline_line_completion_function): Delete.
8280         (noop_completer, filename_completer)
8281         (filename_completer_handle_brkchars, complete_files_symbols)
8282         (linespec_location_completer): Adjust to work with a
8283         completion_tracker instead of a VEC.
8284         (string_or_empty): New.
8285         (collect_explicit_location_matches): Adjust to work with a
8286         completion_tracker instead of a VEC.
8287         (explicit_location_completer): Rename to ...
8288         (complete_explicit_location): ... this and adjust to work with a
8289         completion_tracker instead of a VEC.
8290         (location_completer): Adjust to work with a completion_tracker
8291         instead of a VEC.
8292         (add_struct_fields): Adjust to work with a completion_list instead
8293         of VEC.
8294         (expression_completer): Rename to ...
8295         (complete_expression): ... this and adjust to work with a
8296         completion_tracker instead of a VEC.  Use complete_files_symbols.
8297         (expression_completer): Reimplement on top of complete_expression.
8298         (symbol_completer): Adjust to work with a completion_tracker
8299         instead of a VEC.
8300         (enum complete_line_internal_reason): Add describing comments.
8301         (complete_line_internal_normal_command): Adjust to work with a
8302         completion_tracker instead of a VEC.
8303         (complete_line_internal): Rename to ...
8304         (complete_line_internal_1): ... this and adjust to work with a
8305         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
8306         handle_brkchars phase.
8307         (new_completion_tracker): Delete.
8308         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8309         complete_line_internal_1.
8310         (free_completion_tracker): Delete.
8311         (INITIAL_COMPLETION_HTAB_SIZE): New.
8312         (completion_tracker::completion_tracker)
8313         (completion_tracker::~completion_tracker): New.
8314         (maybe_add_completion): Delete.
8315         (completion_tracker::maybe_add_completion)
8316         (completion_tracker::add_completion)
8317         (completion_tracker::add_completions): New.
8318         (throw_max_completions_reached_error): Delete.
8319         (complete_line): Adjust to work with a completion_tracker instead
8320         of a VEC.  Don't create a completion_tracker_t or check for max
8321         completions here.
8322         (command_completer, command_completer_handle_brkchars)
8323         (signal_completer, reg_or_group_completer_1)
8324         (reg_or_group_completer, default_completer_handle_brkchars):
8325         Adjust to work with a completion_tracker.
8326         (gdb_completion_word_break_characters_throw): New.
8327         (gdb_completion_word_break_characters): Reimplement.
8328         (line_completion_function): Delete.
8329         (completion_tracker::recompute_lowest_common_denominator)
8330         (expand_preserving_ws)
8331         (completion_tracker::build_completion_result)
8332         (completion_result::completion_result)
8333         (completion_result::completion_result)
8334         (completion_result::~completion_result)
8335         (completion_result::completion_result)
8336         (completion_result::release_match_list, compare_cstrings)
8337         (completion_result::sort_match_list)
8338         (completion_result::reset_match_list)
8339         (gdb_rl_attempted_completion_function_throw)
8340         (gdb_rl_attempted_completion_function): New.
8341         * completer.h (completion_list, struct completion_result)
8342         (class completion_tracker): New.
8343         (complete_line): Add completion_tracker parameter.
8344         (readline_line_completion_function): Delete.
8345         (gdb_rl_attempted_completion_function): New.
8346         (noop_completer, filename_completer, expression_completer)
8347         (location_completer, symbol_completer, command_completer)
8348         (signal_completer, reg_or_group_completer): Update prototypes.
8349         (completion_tracker_t, new_completion_tracker)
8350         (make_cleanup_free_completion_tracker): Delete.
8351         (enum maybe_add_completion_enum): Delete.
8352         (maybe_add_completion): Delete.
8353         (throw_max_completions_reached_error): Delete.
8354         * corefile.c (complete_set_gnutarget): Adjust to work with a
8355         completion_tracker instead of a VEC.
8356         * cp-abi.c (cp_abi_completer): Adjust to work with a
8357         completion_tracker instead of a VEC.
8358         * d-lang.c (d_language_defn): Adjust.
8359         * disasm.c (disassembler_options_completer): Adjust to work with a
8360         completion_tracker instead of a VEC.
8361         * f-lang.c (f_make_symbol_completion_list): Rename to ...
8362         (f_collect_symbol_completion_matches): ... this.  Adjust to work
8363         with a completion_tracker instead of a VEC.
8364         (f_language_defn): Adjust.
8365         * go-lang.c (go_language_defn): Adjust.
8366         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8367         Adjust to work with a completion_tracker instead of a VEC.
8368         * infrun.c (handle_completer): Likewise.
8369         * interps.c (interpreter_completer): Likewise.
8370         * interps.h (interpreter_completer): Likewise.
8371         * language.c (unknown_language_defn, auto_language_defn)
8372         (local_language_defn): Adjust.
8373         * language.h (language_defn::la_make_symbol_completion_list):
8374         Rename to ...
8375         (language_defn::la_collect_symbol_completion_matches): ... this
8376         and adjust to work with a completion_tracker instead of a VEC.
8377         * m2-lang.c (m2_language_defn): Adjust.
8378         * objc-lang.c (objc_language_defn): Adjust.
8379         * opencl-lang.c (opencl_language_defn): Adjust.
8380         * p-lang.c (pascal_language_defn): Adjust.
8381         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8382         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8383         with a completion_tracker.
8384         * rust-lang.c (rust_language_defn): Adjust.
8385         * symtab.c (free_completion_list, do_free_completion_list)
8386         (return_val, completion_tracker): Delete.
8387         (completion_list_add_name, completion_list_add_symbol)
8388         (completion_list_add_msymbol, completion_list_objc_symbol)
8389         (completion_list_add_fields, add_symtab_completions): Add
8390         completion_tracker parameter and use it.
8391         (default_make_symbol_completion_list_break_on_1): Rename to...
8392         (default_collect_symbol_completion_matches_break_on): ... this.
8393         Add completion_tracker parameter and use it instead of allocating
8394         a completion tracker here.
8395         (default_make_symbol_completion_list_break_on): Delete old
8396         implementation.
8397         (default_make_symbol_completion_list): Delete.
8398         (default_collect_symbol_completion_matches): New.
8399         (make_symbol_completion_list): Delete.
8400         (collect_symbol_completion_matches): New.
8401         (make_symbol_completion_type): Rename to ...
8402         (collect_symbol_completion_matches_type): ... this.  Add
8403         completion_tracker parameter and use it instead of VEC.
8404         (make_file_symbol_completion_list_1): Rename to...
8405         (collect_file_symbol_completion_matches): ... this.  Add
8406         completion_tracker parameter and use it instead of VEC.
8407         (make_file_symbol_completion_list): Delete.
8408         (add_filename_to_list): Use completion_list instead of a VEC.
8409         (add_partial_filename_data::list): Now a completion_list.
8410         (make_source_files_completion_list): Work with a completion_list
8411         instead of a VEC.
8412         * symtab.h: Include "completer.h".
8413         (default_make_symbol_completion_list_break_on)
8414         (default_make_symbol_completion_list, make_symbol_completion_list)
8415         (make_symbol_completion_type, make_file_symbol_completion_list)
8416         (make_source_files_completion_list): Delete.
8417         (default_collect_symbol_completion_matches_break_on)
8418         (default_collect_symbol_completion_matches)
8419         (collect_symbol_completion_matches)
8420         (collect_symbol_completion_matches_type)
8421         (collect_file_symbol_completion_matches)
8422         (make_source_files_completion_list): New.
8423         * top.c (init_main): Don't install a rl_completion_entry_function
8424         hook.  Install a rl_attempted_completion_function hook instead.
8425         * tui/tui-layout.c (layout_completer): Adjust to work with a
8426         completion_tracker.
8427         * tui/tui-regs.c (tui_reggroup_completer):
8428         * tui/tui-win.c (window_name_completer, focus_completer)
8429         (winheight_completer): Adjust to work with a completion_tracker.
8430         * value.c: Include "completer.h".
8431         (complete_internalvar): Adjust to work with a completion_tracker.
8432         * value.h (complete_internalvar): Likewise.
8433
8434 2017-07-17  Pedro Alves  <palves@redhat.com>
8435
8436         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8437         renames.
8438         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8439         comments to completer_ftype's declaration.
8440         <completer_handle_brkchars>: Change type to
8441         completer_handle_brkchars_ftype.
8442         * command.h (completer_ftype): Add describing comment and give
8443         names to parameters.
8444         (completer_ftype_void): Rename to ...
8445         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
8446         (set_cmd_completer_handle_brkchars): Adjust.
8447         * completer.c (filename_completer_handle_brkchars): New function.
8448         (complete_line_internal_normal_command): New function, factored
8449         out from ...
8450         (complete_line_internal): ... here.
8451         (command_completer_handle_brkchars)
8452         (default_completer_handle_brkchars)
8453         (completer_handle_brkchars_func_for_completer): New functions.
8454         * completer.h (set_gdb_completion_word_break_characters): Delete
8455         declaration.
8456         (completer_handle_brkchars_func_for_completer): New declaration.
8457         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8458         completer_handle_brkchars_func_for_completer.
8459
8460 2017-07-17  Pedro Alves  <palves@redhat.com>
8461
8462         * completer.c (symbol_completer): New function, based on
8463         make_symbol_completion_list_fn.
8464         * completer.h (symbol_completer): New declaration.
8465         * guile/scm-cmd.c (cmdscm_completers): Adjust.
8466         * python/py-cmd.c (completers): Adjust.
8467         * symtab.c (make_symbol_completion_list_fn): Delete.
8468         * symtab.h (make_symbol_completion_list_fn): Delete.
8469         * cli/cli-decode.c (add_cmd): Adjust.
8470
8471 2017-07-17  Pedro Alves  <palves@redhat.com>
8472
8473         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8474         * dwarf2read.c: Include "filename-seen-cache.h".
8475         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8476         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8477         * filename-seen-cache.c: New file.
8478         * filename-seen-cache.h: New file.
8479         * symtab.c: Include "filename-seen-cache.h".
8480         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8481         (create_filename_seen_cache, clear_filename_seen_cache)
8482         (delete_filename_seen_cache, filename_seen): Delete, parts moved
8483         to filename-seen-cache.h/filename-seen-cache.c.
8484         (output_source_filename, sources_info)
8485         (maybe_add_partial_symtab_filename)
8486         (make_source_files_completion_list): Adjust to use
8487         filename_seen_cache.
8488
8489 2017-07-17  Pedro Alves  <palves@redhat.com>
8490
8491         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8492         fields.
8493         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8494         dwarf2_debug_sections*)): New.
8495         (dwarf2_per_objfile::dwarf2_per_objfile(const
8496         dwarf2_per_objfile&)): Declare as deleted.
8497         (dwarf2_per_objfile::operator=): Declare as deleted.
8498         (dwarf2_per_objfile::dwarf2_per_objfile)
8499         (dwarf2_per_objfile::~dwarf2_per_objfile)
8500         (dwarf2_per_objfile::free_cached_comp_units): New.
8501         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8502         ctor.  Call dwarf2_per_objfile's ctor manually.
8503         (dwarf2_locate_sections): Deleted/refactored as ...
8504         (dwarf2_per_objfile::locate_sections): ... this new method.
8505         (free_cached_comp_units): Defer to
8506         dwarf2_per_objfile::free_cached_comp_units.
8507         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8508
8509 2017-07-14  Tom Tromey  <tom@tromey.com>
8510
8511         PR rust/21764:
8512         * rust-exp.y (convert_ast_to_expression): Add "want_type"
8513         parameter.
8514         <UNOP_SIZEOF>: Split into separate case.
8515         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
8516
8517 2017-07-14  Tom Tromey  <tom@tromey.com>
8518
8519         PR rust/21763:
8520         * symtab.c (symbol_matches_domain): Add language_rust to special
8521         case.
8522         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8523         treat LOC_TYPEDEF symbols as variables.
8524
8525 2017-07-14  Pedro Alves  <palves@redhat.com>
8526
8527         * symtab.c (make_file_symbol_completion_list_1): Iterate over
8528         symtabs matching all symtabs with SRCFILE as file name instead of
8529         only considering the first hit, with lookup_symtab.
8530
8531 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8532
8533         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8534         operator_name parameters.
8535         (gen_expr): Update function call.
8536
8537 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8538
8539         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8540         parameter.
8541         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8542         Likewise.
8543         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8544         parameter, use agent_expr::gdbarch instead, update function
8545         calls.
8546         (locexpr_tracepoint_var_ref): Likewise.
8547         (loclist_tracepoint_var_ref): Likewise.
8548         * ax-gdb.c (gen_trace_static_fields): Likewise.
8549         (gen_traced_pop): Likewise.
8550         (gen_frame_args_address): Likewise.
8551         (gen_frame_locals_address): Likewise.
8552         (gen_var_ref): Likewise.
8553         (gen_struct_ref_recursive): Likewise.
8554         (gen_static_field): Likewise.
8555         (gen_maybe_namespace_elt): Likewise.
8556         (gen_expr): Likewise.
8557         (gen_trace_for_var): Likewise.
8558         (gen_trace_for_expr): Likewise.
8559         (gen_trace_for_return_address): Likewise.
8560
8561 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8562
8563         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8564         parameter.
8565         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8566
8567 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8568
8569         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8570         from ax, update calls.
8571         (gen_usual_arithmetic): Likewise.
8572         (gen_integral_promotions): Likewise.
8573         (gen_bitfield_ref): Likewise.
8574         (gen_primitive_field): Likewise.
8575         (gen_struct_ref_recursive): Likewise.
8576         (gen_struct_ref): Likewise.
8577         (gen_maybe_namespace_elt): Likewise.
8578         (gen_struct_elt_for_reference): Likewise.
8579         (gen_namespace_elt): Likewise.
8580         (gen_aggregate_elt_ref): Likewise.
8581         (gen_expr): Get gdbarch from ax, update calls.
8582         (gen_expr_binop_rest): Likewise.
8583
8584 2017-07-13  Pedro Alves  <palves@redhat.com>
8585
8586         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8587         as default tdesc.
8588         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8589         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8590         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8591         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
8592         tdep.
8593         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8594         Get final tdesc from the tdep.
8595         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8596         default tdesc.
8597         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8598         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8599         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8600         Use it as default tdesc.
8601         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8602         down to amd_init_abi.  No longer handle fallback tdesc here.
8603         * amd64-tdep.h (tdesc_x32): Declare.
8604         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8605         parameter.
8606         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8607         as default tdesc.
8608
8609 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8610
8611         * s390-linux-tdep.c (s390_process_record): Add support for
8612         instructions new in arch12.
8613
8614 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8615
8616         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8617         PT_GETFSBASE and PT_GETGSBASE.
8618         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8619         PT_SETGSBASE.
8620
8621 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8622
8623         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8624         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8625         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8626         those rules.
8627         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8628         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8629         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8630         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8631         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8632         * features/i386/amd64.xml: Add 64bit-segments.xml.
8633         * features/i386/amd64-avx-avx512.c: Regenerated.
8634         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8635         * features/i386/amd64-avx-mpx.c: Regenerated.
8636         * features/i386/amd64-avx.c: Regenerated.
8637         * features/i386/amd64-mpx.c: Regenerated.
8638         * features/i386/amd64.c: Regenerated.
8639         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8640         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8641         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8642         * regformats/i386/amd64-avx.dat: Regenerated.
8643         * regformats/i386/amd64-mpx.dat: Regenerated.
8644         * regformats/i386/amd64.dat: Regenerated.
8645
8646 2017-07-10  Yao Qi  <yao.qi@linaro.org>
8647
8648         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8649         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8650
8651 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
8652
8653         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8654         unsetenv.
8655         * gnulib/aclocal.m4: Regenerate.
8656         * gnulib/config.in: Regenerate.
8657         * gnulib/configure: Regenerate.
8658         * gnulib/import/Makefile.am: Regenerate.
8659         * gnulib/import/Makefile.in: Regenerate.
8660         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8661         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8662         * gnulib/import/m4/environ.m4: New file.
8663         * gnulib/import/m4/setenv.m4: New file.
8664         * gnulib/import/setenv.c: New file.
8665         * gnulib/import/unsetenv.c: New file.
8666
8667 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
8668
8669         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8670         address when op is DW_OP_addr.
8671
8672 2017-07-09  Tom Tromey  <tom@tromey.com>
8673
8674         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8675         check and apply to outer type.
8676
8677 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8678
8679         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8680         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8681         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8682         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8683
8684 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8685
8686         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8687
8688 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8689
8690         * corelow.c (get_core_siginfo): Remove.
8691         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8692         instead of get_core_siginfo.
8693         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8694         * gdbarch.h: Re-generate.
8695         * gdbarch.c: Re-generate.
8696         * linux-tdep.c (linux_core_xfer_siginfo): New.
8697         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8698
8699 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8700
8701         * corelow.c (thread_section_name): Move to ...
8702         * gdbcore.h (thread_section_name): ... here.
8703
8704 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8705
8706         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8707         (struct siginfo32): New.
8708         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8709         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8710         via ptrace(PT_LWPINFO).
8711
8712 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8713
8714         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8715         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8716         (fbsd_get_siginfo_type): New.
8717         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8718         (_initialize_fbsd_tdep): New.
8719
8720 2017-07-06  David Blaikie  <dblaikie@gmail.com>
8721
8722         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8723         a singular dwo_unit*) to support multiple CUs in the same way that
8724         multiple TUs are supported.
8725         (create_cus_hash_table): Replace create_dwo_cu with a function for
8726         parsing multiple CUs from a DWO file.
8727         (open_and_init_dwo_file): Use create_cus_hash_table rather than
8728         create_dwo_cu.
8729         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8730         htab_find, rather than comparing the signature to a singleton CU in
8731         the dwo_file.
8732
8733 2017-07-06  Pedro Alves  <palves@redhat.com>
8734
8735         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8736
8737 2017-07-04  Pedro Alves  <palves@redhat.com>
8738
8739         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8740         * gdbtypes.h (TYPE_STATIC): Delete.
8741         (struct fn_field) <is_public, is_abstract, is_static, is_final,
8742         is_synchronized, is_native>: Delete.
8743         <dummy>: Bump.
8744         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8745         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8746         (TYPE_FN_FIELD_ABSTRACT): Delete.
8747
8748 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
8749
8750         * buffer.h (buffer_finish): Fix spelling mistakes.
8751
8752 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
8753
8754         * .dir-locals.el: Automatically switch to C-style comments in
8755         versions of Emacs that support the feature.
8756
8757 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8758             Pedro Alves  <palves@redhat.com>
8759
8760         PR cli/21688
8761         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
8762         (process_next_line): New variable 'inline_cmd'.
8763         Adjust 'if' clauses for "python", "compile" and "guile" to use
8764         'command_name_equals' and check for '!inline_cmd'.
8765
8766 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8767
8768         PR cli/21688
8769         * cli/cli-script.c (command_name_equals_not_inline): New function.
8770         (process_next_line): Adjust 'if' clauses for "python", "compile"
8771         and "guile" to use command_name_equals_not_inline.
8772
8773 2017-06-29  Pedro Alves  <palves@redhat.com>
8774
8775         * completer.c (expression_completer): Call
8776         linespec_location_completer instead of location_completer.
8777
8778 2017-06-29  Pedro Alves  <palves@redhat.com>
8779
8780         * completer.c (expression_completer): Remove code that recomputes
8781         'text' from 'word'.
8782
8783 2017-06-29  Yao Qi  <yao.qi@linaro.org>
8784
8785         * regformats/regdat.sh: Generate code with
8786         "ifndef IN_PROCESS_AGENT".
8787
8788 2017-06-28  Pedro Alves  <palves@redhat.com>
8789
8790         * command.h: Include "common/scoped_restore.h".
8791
8792 2017-06-28  Yao Qi  <yao.qi@linaro.org>
8793
8794         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
8795         instead of obstack_grow.
8796
8797 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
8798
8799         PR gdb/21337
8800         * symfile.c (reread_symbols): Call objfiles_changed just before
8801         read_symbols.
8802
8803 2017-06-27  Pedro Alves  <palves@redhat.com>
8804
8805         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
8806         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
8807         (completion_list_add_symbol, completion_list_add_msymbol):
8808         ... these new functions.
8809         (add_symtab_completions)
8810         (default_make_symbol_completion_list_break_on_1): Adjust.
8811
8812 2017-06-27  Pedro Alves  <palves@redhat.com>
8813
8814         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
8815         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
8816         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
8817         dtor.
8818         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
8819         'storage_obstack' field an auto_obstack.  In-class initialize all
8820         non-bitfield fields.  Make minsyms_read bool.
8821         * symfile.c (read_symbols): Adjust.
8822
8823 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
8824
8825         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
8826         (gdbsim_store_register): Likewise.
8827
8828 2017-06-27  Pedro Alves  <palves@redhat.com>
8829
8830         * c-exp.y (name_obstack): Now an auto_obstack.
8831         (yylex): Use auto_obstack::clear.
8832         (c_parse): Use auto_obstack::clear instead of reinitializing and
8833         freeing the obstack.
8834         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
8835         * d-exp.y (name_obstack): Now an auto_obstack.
8836         (yylex): Use auto_obstack::clear.
8837         (d_parse): Use auto_obstack::clear instead of reinitializing and
8838         freeing the obstack.
8839         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
8840         auto_obstack.
8841         * dwarf2read.c (create_addrmap_from_index)
8842         (dwarf2_build_psymtabs_hard)
8843         (update_enumeration_type_from_children): Likewise.
8844         * gdb_obstack.h (auto_obstack): New type.
8845         * go-exp.y (name_obstack): Now an auto_obstack.
8846         (build_packaged_name): Use auto_obstack::clear.
8847         (go_parse): Use auto_obstack::clear instead of reinitializing and
8848         freeing the obstack.
8849         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
8850         auto_obstack.
8851         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
8852         * rust-exp.y (work_obstack): Now an auto_obstack.
8853         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
8854         reinitializing and freeing the obstack.
8855         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
8856         (host_char_to_target): Use auto_obstack.
8857         * utils.h (make_cleanup_obstack_free): Delete declaration.
8858         * valprint.c (generic_emit_char, generic_printstr): Use
8859         auto_obstack.
8860
8861 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
8862
8863         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
8864         thread.
8865         (darwin_init_thread_list): Don't update dummy thread.
8866         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
8867
8868 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8869
8870         * record-full.c (netorder16): Remove.
8871
8872 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8873
8874         * common/diagnostics.h: Define macros for GCC.
8875         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
8876         * common/vec.h: Include diagnostics.h.
8877         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
8878         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
8879         warning.
8880
8881 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8882
8883         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
8884         New macro.
8885         * ada-lex.l: Ignore deprecated register warnings.
8886
8887 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8888
8889         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8890         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8891
8892 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8893
8894         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
8895         its own line.
8896
8897 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8898
8899         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
8900
8901 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
8902
8903         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
8904         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
8905         (xtensa_register_read_masked): Likewise.
8906
8907 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
8908
8909         * common/environ.c (gdb_environ::unset): Update comment.
8910
8911 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8912
8913         * python/py-unwind.c (pyuw_sniffer): Allocate space for
8914         registers.
8915
8916 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8917
8918         * record-full.c (record_full_exec_insn): Use byte_vector.
8919
8920 2017-06-22  Yao Qi  <yao.qi@linaro.org>
8921
8922         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
8923         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8924
8925 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8926
8927         * remote.c (cached_reg): Move from here...
8928         * regcache.h (cached_reg): ...to here.
8929         * python/py-unwind.c (struct reg_info): Remove.
8930         (cached_frame_info): Use cached_reg_t.
8931         (pyuw_prev_register): Likewise.
8932         (pyuw_sniffer): Use cached_reg_t and allocate registers.
8933         (pyuw_dealloc_cache): Free all registers.
8934
8935 2017-06-22  Pedro Alves  <palves@redhat.com>
8936             Simon Marchi  <simon.marchi@ericsson.com>
8937
8938         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
8939         warning.
8940         * common/diagnostics.h: New file.
8941
8942 2017-06-22  Pedro Alves  <palves@redhat.com>
8943
8944         * common/agent.h: Add include guards.
8945
8946 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
8947
8948         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
8949         talk about addressable units instead of bytes.
8950
8951 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8952
8953         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
8954         of '::const_iterator'.
8955
8956 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8957
8958         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8959         'unittests/environ-selftests.c'.
8960         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
8961         * charset.c (find_charset_names): Declare object 'iconv_env'.
8962         Update code to use 'iconv_env' object.  Remove call to
8963         'free_environ'.
8964         * common/environ.c: Include <utility>.
8965         (make_environ): Delete function.
8966         (free_environ): Delete function.
8967         (gdb_environ::clear): New function.
8968         (gdb_environ::operator=): New function.
8969         (gdb_environ::get): Likewise.
8970         (environ_vector): Delete function.
8971         (set_in_environ): Delete function.
8972         (gdb_environ::set): New function.
8973         (unset_in_environ): Delete function.
8974         (gdb_environ::unset): New function.
8975         (gdb_environ::envp): Likewise.
8976         * common/environ.h: Include <vector>.
8977         (struct gdb_environ): Delete; transform into...
8978         (class gdb_environ): ... this class.
8979         (free_environ): Delete prototype.
8980         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
8981         environ_vector): Likewise.
8982         * infcmd.c (run_command_1): Update code to call
8983         'envp' from 'gdb_environ' class.
8984         (environment_info): Update code to call methods from 'gdb_environ'
8985         class.
8986         (unset_environment_command): Likewise.
8987         (path_info): Likewise.
8988         (path_command): Likewise.
8989         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
8990         (inferior::inferior): Initialize 'environment' using the host's
8991         information.
8992         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
8993         Include "environ.h".
8994         (class inferior) <environment>: Change type from 'struct
8995         gdb_environ' to 'gdb_environ'.
8996         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
8997         methods from 'gdb_environ' class.
8998         * solib.c (solib_find_1): Likewise
8999         * unittests/environ-selftests.c: New file.
9000
9001 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9002
9003         * features/i386/i386-linux.xml: Exchange the order of including
9004         32bit-linux.xml and 32bit-sse.xml.
9005         * features/i386/i386-linux.c: Regenerated.
9006
9007 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9008
9009         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9010         Delete copy ctor and assignment operator.
9011         (tdesc_type): Likewise.
9012         (tdesc_feature): Likewise.
9013         (tdesc_free_reg): Remove.
9014         (tdesc_create_reg): Use new.
9015         (tdesc_free_type): Remove.
9016         (tdesc_create_vector): Use new.
9017         (tdesc_create_union): Likewise.
9018         (tdesc_create_flags): Likewise.
9019         (tdesc_create_enum): Likewise.
9020         (tdesc_free_feature): Delete.
9021         (free_target_description): Use delete.
9022
9023 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
9024
9025         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9026         registers.
9027
9028 2017-06-19  Pedro Alves  <palves@redhat.com>
9029
9030         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9031         after gdb::unlinker.
9032
9033 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
9034
9035         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9036         gdb_environ to access an environment variable.
9037
9038 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
9039
9040         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9041         gdb_byte*.
9042
9043 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9044
9045         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9046
9047 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9048
9049         * configure: Re-generate.
9050         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9051
9052 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9053
9054         * configure: Re-generate.
9055         * warning.m4: Pass -Werror to compiler when checking for
9056         supported warning flags.
9057
9058 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9059
9060         * Makefile.in (COMPILE.pre): Add "-x c++".
9061
9062 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
9063             Pedro Alves  <palves@redhat.com>
9064             Yao Qi  <yao.qi@linaro.org>
9065
9066         * defs.h (RequireLongest): New.
9067         (extract_integer): Declare function template.
9068         (extract_signed_integer): Remove the declaration, but define it
9069         static inline.
9070         (extract_unsigned_integer): Likewise.
9071         (store_integer): Declare function template.
9072         (store_signed_integer): Remove the declaration, but define it
9073         static inline.
9074         (store_unsigned_integer): Likewise.
9075         * findvar.c (extract_integer): New function template.
9076         (extract_signed_integer): Remove.
9077         (extract_unsigned_integer): Remove.
9078         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9079         instantiations.
9080         (store_integer): New function template.
9081         (store_signed_integer): Remove.
9082         (store_unsigned_integer): Remove.
9083         (store_integer): Explicit instantiations.
9084         * regcache.c (regcache_raw_read_signed): Update.
9085         (regcache::raw_read): New function.
9086         (regcache::raw_read_signed): Remove.
9087         (regcache::raw_read_unsigned): Remove.
9088         (regcache_raw_read_unsigned): Update.
9089         (regcache_raw_write_unsigned): Update.
9090         (regcache::raw_write_signed): Remove.
9091         (regcache::raw_write): New function.
9092         (regcache_cooked_read_signed): Update.
9093         (regcache::raw_write_unsigned): Remove.
9094         (regcache::cooked_read_signed): Remove.
9095         (regcache_cooked_read_unsigned): Update.
9096         (regcache::cooked_read_unsigned): Remove.
9097         (regcache_cooked_write_signed): Update.
9098         (regcache_cooked_write_unsigned): Update.
9099         * regcache.h (regcache) <raw_read_signed>: Remove.
9100         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9101         <raw_read, raw_write>: New.
9102         <cooked_read_signed, cooked_write_signed>: Remove.
9103         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9104         <cooked_read, cooked_write>: New.
9105         * sh64-tdep.c (sh64_pseudo_register_read): Update.
9106         (sh64_pseudo_register_write): Update.
9107
9108 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
9109
9110         * arc-tdep.c (arc_disassembler_options): New variable.
9111         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9112         of default_print_insn.
9113         (arc_delayed_print_insn): Set info->section when needed,
9114         use default_print_insn to retrieve a disassembler.
9115
9116 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
9117
9118         PR gdb/21574
9119         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9120         to mention $SHELL and startup-with-shell.
9121
9122 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
9123
9124         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9125
9126 2017-06-14  Yao Qi  <yao.qi@linaro.org>
9127
9128         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9129         default_print_insn instead of print_insn_aarch64.
9130         * arm-tdep.c (gdb_print_insn_arm): Call
9131         default_print_insn instead of print_insn_big_arm
9132         and print_insn_little_arm.
9133         * i386-tdep.c (i386_print_insn): Call default_print_insn
9134         instead of print_insn_i386.
9135         * ia64-tdep.c (ia64_print_insn): Call
9136         default_print_insn instead of print_insn_ia64.
9137         * mips-tdep.c (gdb_print_insn_mips): Call
9138         default_print_insn instead of print_insn_big_mips
9139         and print_insn_little_mips.
9140         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9141         instead of print_insn_spu.
9142
9143 2017-06-14  Pedro Alves  <palves@redhat.com>
9144
9145         * ada-lang.c: Include "common/byte-vector.h".
9146         (ada_value_primitive_packed_val): Use gdb::byte_vector.
9147         * charset.c (wchar_iterator::iterate): Resize the vector instead
9148         of reserving it.
9149         * common/byte-vector.h: Include "common/def-vector.h".
9150         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9151         * cli/cli-dump.c: Include "common/byte-vector.h".
9152         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9153         * common/byte-vector.h: New file.
9154         * common/def-vector.h: New file.
9155         * common/default-init-alloc.h: New file.
9156         * dwarf2loc.c: Include "common/byte-vector.h".
9157         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9158         instead of reserving it.
9159         * dwarf2read.c: Include "common/byte-vector.h".
9160         (data_buf::m_vec): Now a gdb::byte_vector.
9161         * gdb_regex.c: Include "common/def-vector.h".
9162         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9163         * mi/mi-main.c: Include "common/byte-vector.h".
9164         (mi_cmd_data_read_memory): Use gdb::byte_vector.
9165         * printcmd.c: Include "common/byte-vector.h".
9166         (print_scalar_formatted): Use gdb::byte_vector.
9167         * valprint.c: Include "common/byte-vector.h".
9168         (maybe_negate_by_bytes, print_decimal_chars): Use
9169         gdb::byte_vector.
9170
9171 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9172
9173         * darwin-nat.c: Include "nat/fork-inferior.h".
9174
9175 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9176
9177         * configure.nat: Factor out Darwin bits that are not
9178         architecture-specific.  Add fork-inferior.o.
9179
9180 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9181
9182         * configure.nat: Factor out AIX bits that are not
9183         architecture-specific.  Add fork-inferior.o.
9184
9185 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9186
9187         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
9188         (read_pieced_value, write_pieced_value): ...here.  Reduce to
9189         wrappers that just call rw_pieced_value.
9190
9191 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9192
9193         * dwarf2loc.c (write_pieced_value): When writing the data for a
9194         memory piece, use write_memory_with_notification instead of
9195         write_memory.
9196
9197 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9198
9199         * valops.c (read_value_memory): Change embedded_offset to
9200         represent a bit offset instead of a byte offset.
9201         * value.h (read_value_memory): Adjust comment.
9202
9203 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9204
9205         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9206         dest_offset_bits and source_offset_bits.
9207         (write_pieced_value): Likewise.
9208
9209 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9210
9211         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9212         given by DW_OP_bit_piece.
9213         (write_pieced_value): Likewise.
9214
9215 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9216
9217         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9218         some other preparations to the places where sufficient information
9219         is available.
9220         (write_pieced_value): Likewise.
9221
9222 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9223
9224         * dwarf2loc.c (bits_to_bytes): New function.
9225         (read_pieced_value): Fix offset calculations for register pieces
9226         on big-endian targets.
9227         (write_pieced_value): Likewise.
9228
9229 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9230
9231         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9232         (write_pieced_value): Likewise.
9233
9234 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9235
9236         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9237         transfer the source value's least significant bits, instead of its
9238         lowest-addressed ones.  Rename type_len to max_offset.
9239         (read_pieced_value): Mirror above changes to write_pieced_value as
9240         applicable.
9241
9242 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9243
9244         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9245         truncate full bytes from dest_offset_bits before using it as an
9246         offset into the buffer.
9247
9248 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9249
9250         * dwarf2loc.c (write_pieced_value): Include transfer size in
9251         byte-wise check.
9252
9253 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9254
9255         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9256         calculation of this_size.
9257
9258 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9259
9260         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9261         when targeting a bit-field.
9262         (write_pieced_value): Likewise.
9263
9264 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9265
9266         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9267         (allocate_piece_closure): Drop addr_size parameter.
9268         (dwarf2_evaluate_loc_desc_full): Adjust call to
9269         allocate_piece_closure.
9270
9271 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9272
9273         PR gdb/21226
9274         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9275         the LSB end, independent of endianness.
9276
9277 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9278
9279         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9280         size capping.
9281
9282 2017-06-13  Yao Qi  <yao.qi@linaro.org>
9283
9284         * mips-linux-nat.c: Move include features/mips*-linux.c to
9285         mips-linux-tdep.c.
9286         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9287         to mips-linux-tdep.c.
9288         * mips-linux-tdep.c: Include features/mips*-linux.c
9289         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9290         functions.
9291         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9292         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9293         (tdesc_mips64_dsp_linux): Declare.
9294
9295 2017-06-12  Tom Tromey  <tom@tromey.com>
9296
9297         * valprint.h (val_print_type_code_int): Remove.
9298         * valprint.c (generic_val_print_int): Always call
9299         val_print_scalar_formatted.
9300         (val_print_type_code_int): Remove.
9301         * printcmd.c (print_scalar_formatted): Handle options->format==0.
9302         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9303         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9304         * ada-valprint.c (ada_val_print_num): Use
9305         val_print_scalar_formatted.
9306
9307 2017-06-12  Tom Tromey  <tom@tromey.com>
9308
9309         * printcmd.c (print_scalar_formatted): Unify the two switches.
9310         Don't convert scalars to LONGEST.
9311
9312 2017-06-12  Tom Tromey  <tom@tromey.com>
9313
9314         PR exp/16225:
9315         * valprint.h (print_decimal_chars): Update.
9316         * valprint.c (maybe_negate_by_bytes): New function.
9317         (print_decimal_chars): Add "is_signed" argument.
9318         * printcmd.c (print_scalar_formatted): Update.
9319
9320 2017-06-12  Tom Tromey  <tom@tromey.com>
9321
9322         PR exp/16225:
9323         * valprint.h (print_binary_chars, print_hex_chars): Update.
9324         * valprint.c (val_print_type_code_int): Update.
9325         (print_binary_chars): Add "zero_pad" argument.
9326         (emit_octal_digit): New function.
9327         (print_octal_chars): Don't zero-pad.
9328         (print_decimal_chars): Likewise.
9329         (print_hex_chars): Add "zero_pad" argument.
9330         * sh64-tdep.c (sh64_do_fp_register): Update.
9331         * regcache.c (regcache::dump): Update.
9332         * printcmd.c (print_scalar_formatted): Update.
9333         * infcmd.c (default_print_one_register_info): Update.
9334
9335 2017-06-12  Pedro Alves  <palves@redhat.com>
9336             Alan Hayward  <alan.hayward@arm.com>
9337
9338         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9339         (mips_eabi_push_dummy_call): Rename local 'regsize' to
9340         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
9341         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9342         Assert that abi_regsize bytes fit in 'ref_valbuf'.
9343
9344 2017-06-12  Pedro Alves  <palves@redhat.com>
9345
9346         * dwarf2read.c (mapped_symtab::data): Now a vector of
9347         symtab_index_entry instead of vector of
9348         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
9349         whether an element's name is NULL instead of checking whether the
9350         element itself is NULL.
9351         (find_slot): Change return type.  Adjust.
9352         (hash_expand, , add_index_entry, uniquify_cu_indices)
9353         (write_hash_table): Adjust.
9354
9355 2017-06-12  Pedro Alves  <palves@redhat.com>
9356
9357         * dwarf2read.c (recursively_count_psymbols): New function.
9358         (write_psymtabs_to_index): Call it to compute number of psyms and
9359         pass estimate size of psyms_seen to unordered_set's ctor.
9360
9361 2017-06-12  Pedro Alves  <palves@redhat.com>
9362
9363         * dwarf2read.c (write_hash_table): Check if key already exists
9364         before emplacing.
9365
9366 2017-06-12  Pedro Alves  <palves@redhat.com>
9367
9368         * dwarf2read.c (data_buf::append_space): Rename to...
9369         (data_buf::grow): ... this, and make private.  Adjust all callers.
9370         (data_buf::append_uint): New method.
9371         (add_address_entry, write_one_signatured_type)
9372         (write_psymtabs_to_index): Use it.
9373
9374 2017-06-12  Pedro Alves  <palves@redhat.com>
9375
9376         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9377         (file_write (FILE *, const std::vector<Elem>&)): Delete.
9378         (data_buf::file_write): Call ::fwrite directly.
9379
9380 2017-06-12  Pedro Alves  <palves@redhat.com>
9381
9382         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9383         std::vector::erase.
9384
9385 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9386
9387         Code cleanup: C++ify .gdb_index producer.
9388         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9389         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9390         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9391         (create_strtab, add_string): Remove.
9392         (file_write, data_buf): New.
9393         (struct symtab_index_entry): Use std::vector for cu_indices.
9394         (struct mapped_symtab): Use std::vector for data.
9395         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9396         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9397         Remove.
9398         (find_slot): Change return type.  Update it to the new data structures.
9399         (hash_expand, add_index_entry): Update it to the new data structures.
9400         (offset_type_compare): Remove.
9401         (uniquify_cu_indices): Update it to the new data structures.
9402         (c_str_view, c_str_view_hasher, vector_hasher): New.
9403         (add_indices_to_cpool): Remove.
9404         (write_hash_table): Update it to the new data structures.
9405         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9406         (eq_psymtab_cu_index): Remove.
9407         (psym_index_map): New typedef.
9408         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9409         reference and std::unordered_map for cu_index_htab.
9410         (add_address_entry, add_address_entry_worker, write_address_map)
9411         (write_psymbols): Update it to the new data structures.
9412         (write_obstack): Remove.
9413         (struct signatured_type_index_data): Change types_list to a data_buf
9414         reference and psyms_seen to a std::unordered_set reference.
9415         (write_one_signatured_type, recursively_write_psymbols)
9416         (write_psymtabs_to_index): Update it to the new data structures.
9417
9418 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
9419
9420         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9421         separate-debug-file commands.
9422         * symfile.h (separate_debug_file_debug): New global.
9423         * symfile.c (separate_debug_file_debug): New global.
9424         (separate_debug_file_exists, find_separate_debug_file): Add
9425         debug output.
9426         (_initialize_symfile): Add "set debug separate-debug-file"
9427         command.
9428         * build-id.c (build_id_to_debug_bfd,
9429         find_separate_debug_file_by_buildid): Add debug output.
9430
9431 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
9432
9433         * gdbarch.sh (displaced_step_free_closure): Remove.
9434         * gdbarch.h, gdbarch.c: Re-generate.
9435         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9436         displaced_step_free_closure.
9437         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9438         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9439         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9440         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9441         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9442         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9443         * arch-utils.h (simple_displaced_step_free_closure): Remove.
9444         * arch-utils.c (simple_displaced_step_free_closure): Remove.
9445         * infrun.c (displaced_step_clear): Call xfree instead of
9446         gdbarch_displaced_step_free_closure.
9447
9448 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
9449
9450         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9451         NULL".
9452
9453 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
9454
9455         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9456         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9457         (mn10300_push_dummy_call): Likewise.
9458
9459 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9460
9461         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9462
9463 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9464
9465         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9466
9467 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9468
9469         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9470         able to start inferiors using a shell.
9471         (New remote packets): Announce new packet "QStartupWithShell".
9472         * remote.c: Add PACKET_QStartupWithShell.
9473         (extended_remote_create_inferior): Handle new
9474         PACKET_QStartupWithShell.
9475         (remote_protocol_features) <QStartupWithShell>: New entry for
9476         PACKET_QStartupWithShell.
9477         (_initialize_remote): Call "add_packet_config_cmd" for
9478         QStartupShell.
9479
9480 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9481             Pedro Alves  <palves@redhat.com>
9482
9483         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9484         and "nat/fork-inferior.h".
9485         * common/common-inferior.h: New file, with contents from
9486         "gdb/inferior.h".
9487         * commom/common-utils.c: Include "common-utils.h".
9488         (stringify_argv): New function.
9489         * common/common-utils.h (stringify_argv): New prototype.
9490         * configure.nat: Add "fork-inferior.o" as a dependency for
9491         "*linux*", "fbsd*" and "nbsd*" hosts.
9492         * corefile.c (get_exec_file): Update comment.
9493         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9494         instead of "startup_inferior".
9495         (darwin_create_inferior): Call "add_thread_silent" after
9496         "fork_inferior".
9497         * fork-child.c: Cleanup unnecessary includes.
9498         (SHELL_FILE): Move to "common/common-fork-child.c".
9499         (environ): Likewise.
9500         (exec_wrapper): Initialize.
9501         (get_exec_wrapper): New function.
9502         (breakup_args): Move to "common/common-fork-child.c"; rename to
9503         "breakup_args_for_exec".
9504         (escape_bang_in_quoted_argument): Move to
9505         "common/common-fork-child.c".
9506         (saved_ui): New variable.
9507         (prefork_hook): New function.
9508         (postfork_hook): Likewise.
9509         (postfork_child_hook): Likewise.
9510         (gdb_startup_inferior): Likewise.
9511         (fork_inferior): Move to "common/common-fork-child.c".  Update
9512         function to support gdbserver.
9513         (startup_inferior): Likewise.
9514         * gdbcore.h (get_exec_file): Remove declaration.
9515         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9516         instead of "startup_inferior".  Call "add_thread_silent" after
9517         "fork_inferior".
9518         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9519         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9520         instead of "startup_inferior".  Call "add_thread_silent" after
9521         "fork_inferior".
9522         * inferior.h: Include "common-inferior.h".
9523         (trace_start_error): Move to "common/common-utils.h".
9524         (trace_start_error_with_name): Likewise.
9525         (fork_inferior): Move prototype to "nat/fork-inferior.h".
9526         (startup_inferior): Likewise.
9527         (gdb_startup_inferior): New prototype.
9528         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9529         * nat/fork-inferior.h: New file.
9530         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9531         instead of "startup_inferior".  Call "add_thread_silent" after
9532         "fork_inferior".
9533         * target.h (target_terminal_init): Move prototype to
9534         "target/target.h".
9535         (target_terminal_inferior): Likewise.
9536         (target_terminal_ours): Likewise.
9537         * target/target.h (target_terminal_init): New prototype, moved
9538         from "target.h".
9539         (target_terminal_inferior): Likewise.
9540         (target_terminal_ours): Likewise.
9541         * utils.c (gdb_flush_out_err): New function.
9542
9543 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9544
9545         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9546         * common/common-gdbthread.h: New file, with parts from
9547         "gdb/gdbthread.h".
9548         * gdbthread.h: Include "common-gdbthread.h".
9549         (switch_to_thread): Moved to "common/common-gdbthread.h".
9550
9551 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9552
9553         * Makefile.in (SFILES): Add "common/job-control.c".
9554         (HFILES_NO_SRCDIR): Add "common/job-control.h".
9555         (COMMON_OBS): Add "job-control.o".
9556         * common/job-control.c: New file, with contents from
9557         "gdb/inflow.c".
9558         * common/job-control.h: New file, with contents from "terminal.h".
9559         * fork-child.c: Include "job-control.h".
9560         * inflow.c: Include "job-control.h".
9561         (gdb_setpgid): Move to "common/common-inflow.c".
9562         (_initialize_inflow): Move setting of "job_control" to
9563         "handle_job_control".
9564         * terminal.h (job_control): Moved to "common/common-terminal.h".
9565         (gdb_setpgid): Likewise.
9566         * top.c: Include "job_control.h".
9567         * utils.c: Likewise.
9568         (job_control): Moved to "job-control.c".
9569
9570 2017-06-07  Pedro Alves  <palves@redhat.com>
9571
9572         * Makefile.in (SFILES): Add gdb_regex.c.
9573         (COMMON_OBS): Add gdb_regex.o.
9574         * ada-lang.c (ada_add_standard_exceptions)
9575         (ada_add_exceptions_from_frame, name_matches_regex)
9576         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9577         parameter type to compiled_regex.  Adjust.
9578         (ada_exceptions_list): Use compiled_regex.
9579         * break-catch-throw.c (exception_catchpoint::pattern): Now a
9580         std::unique_ptr<compiled_regex>.
9581         (exception_catchpoint::~exception_catchpoint): Remove regfree
9582         call.
9583         (check_status_exception_catchpoint): Adjust to use compiled_regex.
9584         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9585         * breakpoint.c (solib_catchpoint::compiled): Now a
9586         std::unique_ptr<compiled_regex>.
9587         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9588         (check_status_catch_solib): Adjust to use compiled_regex.
9589         (add_solib_catchpoint): Adjust to use compiled_regex.
9590         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9591         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9592         compiled_regex reference.  Adjust to use it.
9593         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9594         declaration.  Include "gdb_regex.h".
9595         (apropos_cmd): Change regex parameter to compiled_regex reference.
9596         * gdb_regex.c: New file.
9597         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9598         declarations.
9599         (class compiled_regex): New.
9600         * linux-tdep.c: Include "common/gdb_optional.h".
9601         (struct mapping_regexes): New, factored out from
9602         mapping_is_anonymous_p, and adjusted to use compiled_regex.
9603         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9604         gdb::optional and remove cleanups.  Adjust to compiled_regex.
9605         * probe.c: Include "common/gdb_optional.h".
9606         (collect_probes): Use compiled_regex and gdb::optional and remove
9607         cleanups.
9608         * skip.c: Include "common/gdb_optional.h".
9609         (skiplist_entry::compiled_function_regexp): Now a
9610         gdb::optional<compiled_regex>.
9611         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9612         (free_skiplist_entry): Remove regfree call.
9613         (compile_skip_regexp, skip_rfunction_p): Adjust to use
9614         compiled_regex and gdb::optional.
9615         * symtab.c: Include "common/gdb_optional.h".
9616         (search_symbols): Use compiled_regex and gdb::optional.
9617         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9618         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
9619         to gdb_regex.c.
9620
9621 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9622
9623         * regcache.c (regcache::save): Avoid buffer use.
9624         (regcache::dump): Likewise.
9625
9626 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9627
9628         * sh-tdep.c (sh_pseudo_register_read): Remove
9629         MAX_REGISTER_SIZE.
9630         (sh_pseudo_register_write): Likewise.
9631         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9632         (sh64_pseudo_register_write): Likewise
9633
9634 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9635
9636         * aarch64-tdep.c (aarch64_store_return_value): Use
9637         V_REGISTER_SIZE.
9638         (aarch64_pseudo_read_value): Likewise.
9639         (aarch64_pseudo_write): Likewise.
9640
9641 2017-06-06  Yao Qi  <yao.qi@linaro.org>
9642
9643         * regformats/regdef.h (set_register_cache): Remove the
9644         declaration.
9645
9646 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
9647
9648         * frame.c (frame_unwind_register_signed): Use
9649         frame_unwind_register_value.
9650
9651 2017-06-06  Pedro Alves  <palves@redhat.com>
9652
9653         PR breakpoints/21553
9654         * breakpoint.c (create_breakpoints_sal_default)
9655         (init_breakpoint_sal, create_breakpoint_sal): Use
9656         gdb::unique_xmalloc_ptr for string parameters.
9657         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9658         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
9659         (base_breakpoint_create_breakpoints_sal)
9660         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9661         (strace_marker_create_breakpoints_sal)
9662         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9663         string parameters.
9664         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9665         gdb::unique_xmalloc_ptr for string parameters.
9666         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9667         parameters.
9668
9669 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9670
9671         * alpha-tdep.c (alpha_register_to_value): Use
9672         get_frame_register_value.
9673         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9674
9675 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9676
9677         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9678         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9679         (ia64_value_to_register): Likewise.
9680         (ia64_extract_return_value): Likewise.
9681         (ia64_store_return_value): Likewise.
9682         (ia64_push_dummy_call): Likewise.
9683
9684 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
9685
9686         GDB 8.0 released.
9687
9688 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
9689
9690         * x86-linux-nat.c (struct arch_lwp_info): Remove.
9691
9692 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
9693
9694         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9695         parameter.
9696         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9697
9698 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
9699
9700         * event-loop.c (poll_timers): Unallocate timer using delete
9701         instead of xfree.
9702
9703 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9704
9705         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9706         (struct breakpoint) <~breakpoint>: New.
9707         (struct watchpoint): Inherit from breakpoint.
9708         <~watchpoint>: New.
9709         <base>: Remove.
9710         (struct tracepoint): Inherit from breakpoint.
9711         <base>: Remove.
9712         * breakpoint.c (longjmp_breakpoint_ops): Remove.
9713         (struct longjmp_breakpoint): Inherit from breakpoint.
9714         <~longjmp_breakpoint>: New.
9715         <base>: Remove.
9716         (new_breakpoint_from_type): Remove casts.
9717         (watchpoint_in_thread_scope): Remove reference to base field.
9718         (watchpoint_del_at_next_stop): Likewise.
9719         (update_watchpoint): Likewise.
9720         (watchpoint_check): Likewise.
9721         (bpstat_check_watchpoint): Likewise.
9722         (set_longjmp_breakpoint): Likewise.
9723         (struct fork_catchpoint): Inherit from breakpoint.
9724         <base>: Remove.
9725         (struct solib_catchpoint): Inherit from breakpoint.
9726         <~solib_catchpoint>: New.
9727         <base>: Remove.
9728         (dtor_catch_solib): Change to ...
9729         (solib_catchpoint::~solib_catchpoint): ... this.
9730         (breakpoint_hit_catch_solib): Remove reference to base field.
9731         (add_solib_catchpoint): Likewise.
9732         (create_fork_vfork_event_catchpoint): Likewise.
9733         (struct exec_catchpoint): Inherit from breakpoint.
9734         <~exec_catchpoint>: New.
9735         <base>: Remove.
9736         (dtor_catch_exec): Change to ...
9737         (exec_catchpoint::~exec_catchpoint): ... this.
9738         (dtor_watchpoint): Change to ...
9739         (watchpoint::~watchpoint): ... this.
9740         (watch_command_1): Remove reference to base field.
9741         (catch_exec_command_1): Likewise.
9742         (base_breakpoint_dtor): Change to ...
9743         (breakpoint::~breakpoint): ... this.
9744         (base_breakpoint_ops): Remove dtor field value.
9745         (longjmp_bkpt_dtor): Change to ...
9746         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9747         (strace_marker_create_breakpoints_sal): Remove reference to base
9748         field.
9749         (delete_breakpoint): Don't manually call breakpoint destructor.
9750         (create_tracepoint_from_upload): Remove reference to base field.
9751         (trace_pass_set_count): Likewise.
9752         (initialize_breakpoint_ops): Don't initialize
9753         momentary_breakpoint_ops, don't set dtors.
9754         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9755         <~ada_catchpoint>: New.
9756         <base>: Remove.
9757         (create_excep_cond_exprs): Remove reference to base field.
9758         (dtor_exception): Change to ...
9759         (ada_catchpoint::~ada_catchpoint): ... this.
9760         (dtor_catch_exception): Remove.
9761         (dtor_catch_exception_unhandled): Remove.
9762         (dtor_catch_assert): Remove.
9763         (create_ada_exception_catchpoint): Remove reference to base
9764         field.
9765         (initialize_ada_catchpoint_ops): Don't set dtors.
9766         * break-catch-sig.c (struct signal_catchpoint): Inherit from
9767         breakpoint.
9768         <~signal_catchpoint>: New.
9769         <base>: Remove.
9770         (signal_catchpoint_dtor): Change to ...
9771         (signal_catchpoint::~signal_catchpoint): ... this.
9772         (create_signal_catchpoint): Remove reference to base field.
9773         (initialize_signal_catchpoint_ops): Don't set dtor.
9774         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
9775         from breakpoint.
9776         <~syscall_catchpoint>: New.
9777         <base>: Remove.
9778         (dtor_catch_syscall): Change to ...
9779         (syscall_catchpoint::~syscall_catchpoint): ... this.
9780         (create_syscall_event_catchpoint): Remove reference to base
9781         field.
9782         (initialize_syscall_catchpoint_ops): Don't set dtor.
9783         * break-catch-throw.c (struct exception_catchpoint): Inherit
9784         from breakpoint.
9785         <~exception_catchpoint>: New.
9786         <base>: Remove.
9787         (dtor_exception_catchpoint): Change to ...
9788         (exception_catchpoint::~exception_catchpoint): ... this.
9789         (handle_gnu_v3_exceptions): Remove reference to base field.
9790         (initialize_throw_catchpoint_ops): Don't set dtor.
9791         * ctf.c (ctf_get_traceframe_address): Remove reference to base
9792         field.
9793         * remote.c (remote_get_tracepoint_status): Likewise.
9794         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
9795         * tracefile.c (tracefile_fetch_registers): Likewise.
9796         * tracepoint.c (actions_command): Likewise.
9797         (validate_actionline): Likewise.
9798         (tfind_1): Likewise.
9799         (get_traceframe_location): Likewise.
9800         (find_matching_tracepoint_location): Likewise.
9801         (parse_tracepoint_status): Likewise.
9802         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
9803
9804 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9805
9806         * breakpoint.c (struct longjmp_breakpoint): New struct.
9807         (is_tracepoint_type): Change return type to bool.
9808         (is_longjmp_type): New function.
9809         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
9810         (set_raw_breakpoint_without_location): Use
9811         new_breakpoint_from_type.
9812         (set_raw_breakpoint): Likewise.
9813
9814 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9815
9816         * breakpoint.c (new_breakpoint_from_type): New function.
9817         (create_breakpoint_sal): Use new_breakpoint_from_type and
9818         unique_ptr.
9819         (create_breakpoint): Likewise.
9820
9821 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
9822
9823         * memattr.c (mem_info_command): Rename to ...
9824         (info_mem_command): ... this.
9825         (mem_enable_command): Rename to ...
9826         (enable_mem_command): ... this.
9827         (mem_disable_command): Rename to ...
9828         (disable_mem_command): ... this.
9829         (mem_delete_command): Rename to ...
9830         (delete_mem_command): ... this.
9831         (_initialize_mem): Adjust function names.
9832
9833 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9834
9835         * btrace.c (handle_pt_insn_events): New.
9836         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
9837         STATUS.  Split into this and ...
9838         (handle_pt_insn_event_flags): ... this.
9839
9840 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9841
9842         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
9843         and struct pt_insn.resynced.
9844         * configure: Regenerated.
9845         * config.in: Regenerated.
9846
9847 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9848
9849         * btrace.c (ftrace_find_call_by_number): New function.
9850         (ftrace_new_function): Store objects, not pointers.
9851         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
9852         ftrace_new_gap, ftrace_update_function,
9853         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
9854         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
9855         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
9856         btrace_ends_with_single_insn, btrace_call_get): Account for
9857         btrace_thread_info::functions now storing objects.
9858         * btrace.h (struct btrace_thread_info): Add constructor.
9859         (struct btrace_thread_info) <functions>: Make std::vector.
9860         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
9861         Initialize with default values.
9862         * record-btrace.c (record_btrace_frame_sniffer): Account for
9863         btrace_thread_info::functions now storing objects.
9864
9865 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9866
9867         * btrace.c: Remove typedef bfun_s.
9868         (ftrace_new_gap): Directly add gaps to the list of gaps.
9869         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
9870         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
9871         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
9872         instead of gdb VEC.
9873
9874 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9875
9876         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
9877         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
9878         with btrace_thread_info::next_segment and
9879         btrace_thread_info::prev_segment.
9880         * btrace.h: Remove struct btrace_func_link.
9881         (struct btrace_function): Replace pair of function segment pointers
9882         with pair of indices.
9883         * python/py-record-btrace.c (btpy_call_prev_sibling,
9884         btpy_call_next_sibling): Replace references to
9885         btrace_thread_info::segment with btrace_thread_info::next_segment and
9886         btrace_thread_info::prev_segment.
9887         * record-btrace.c (record_btrace_frame_this_id): Use
9888         btrace_find_call_by_number.
9889
9890 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9891
9892         * btrace.c (ftrace_new_function, ftrace_fixup_level,
9893         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9894         btrace_insn_next, btrace_insn_prev): Remove references to
9895         btrace_thread_info::flow.
9896         * btrace.h (struct btrace_function): Remove FLOW.
9897
9898 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9899
9900         * btrace.c (ftrace_find_call_by_number): New function.
9901         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
9902         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
9903         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
9904         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
9905         index.
9906         * btrace.h (struct btrace_function): Turn UP into an index.
9907         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
9908         as an index.
9909         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
9910         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
9911         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
9912
9913 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9914
9915         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9916         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9917         ftrace_update_function, ftrace_compute_global_level_offset,
9918         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
9919         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
9920         btrace_insn_end, btrace_is_empty): Remove references to
9921         btrace_thread_info::begin and btrace_thread_info::end.
9922         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
9923         (struct btrace_thread_info) <functions>: Adjust comment.
9924         * record-btrace.c (record_btrace_start_replaying): Remove reference to
9925         btrace_thread_info::begin.
9926
9927 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9928
9929         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9930         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9931         ftrace_update_function): Remove arguments that implicitly were always
9932         BTINFO->END.
9933         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
9934         Don't pass BTINFO->END.
9935
9936 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9937
9938         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
9939         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
9940         btrace_find_insn_by_number): Replace function segment pointer with
9941         index.
9942         (btrace_insn_cmp): Simplify.
9943         * btrace.h: (struct btrace_insn_iterator) Rename index to
9944         insn_index.  Replace function segment pointer with index into function
9945         segment vector.
9946         * record-btrace.c (record_btrace_call_history): Replace function
9947         segment pointer use with index.
9948         (record_btrace_frame_sniffer): Retrieve function call segment through
9949         vector.
9950         (record_btrace_set_replay): Remove defunc't safety check.
9951
9952 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9953
9954         * btrace.c (btrace_ends_with_single_insn): New function.
9955         (btrace_call_get, btrace_call_number, btrace_call_begin,
9956         btrace_call_end, btrace_call_next, btrace_call_prev,
9957         btrace_find_call_by_number): Use index into call segment vector
9958         instead of pointer.
9959         (btrace_call_cmp): Simplify.
9960         * btrace.h (struct btrace_call_iterator): Replace function call segment
9961         pointer with index into vector.
9962         * record-btrace.c (record_btrace_call_history): Use index instead of
9963         pointer.
9964
9965 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9966
9967         * btrace.c (btrace_insn_begin, btrace_insn_end,
9968         btrace_find_insn_by_number): Add btinfo to iterator.
9969         * btrace.h (struct btrace_insn_iterator): Add btinfo.
9970
9971 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9972
9973         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
9974         and save pointers directly.
9975         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
9976         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
9977         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
9978         changed signature of functions.
9979         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
9980         (btrace_fetch): Remove code that adds btrace_function pointers to
9981         vector of btrace_functions.
9982         (btrace_clear): Simplify freeing vector of btrace_functions.
9983
9984 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9985
9986         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
9987         Replace VEC_* with std::vector functions.
9988         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
9989         (struct btrace_thread_info)<functions>: Change type to std::vector.
9990
9991 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9992
9993         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
9994         "Removed targets and native configurations" up.  Merge duplicate
9995         "New commands" sub-sections.  Add "New options" sub-sections.
9996
9997 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
9998
9999         * defs.h (copy_integer_to_size): New declaration.
10000         * findvar.c (copy_integer_to_size): New function.
10001         (do_cint_test): New selftest function.
10002         (copy_integer_to_size_test): Likewise.
10003         (_initialize_findvar): Likewise.
10004         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10005         (mips_fbsd_collect_reg): Use raw_collect_integer.
10006         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10007         (mips64_fill_gregset): Use raw_collect_integer
10008         (mips64_fill_fpregset): Use raw_supply_integer.
10009         * regcache.c (regcache::raw_supply_integer): New function.
10010         (regcache::raw_collect_integer): Likewise.
10011         * regcache.h: (regcache::raw_supply_integer): New declaration.
10012         (regcache::raw_collect_integer): Likewise.
10013
10014 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10015
10016         * Makefile.in (SFILES): Add gdbarch-selftests.c.
10017         (COMMON_OBS): Add gdbarch-selftests.o.
10018         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10019         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10020         * gdbarch-selftests.c: New file.
10021         * regcache.h (regcache) <~regcache>: Mark it virtual if
10022         GDB_SELF_TEST.
10023         <raw_write>: Likewise.
10024
10025 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10026
10027         * regcache.c (current_regcache): Change it to
10028         regcache::current_regcache.
10029         (regcache_observer_target_changed): Update.
10030         (regcache_thread_ptid_changed): Make it a regcache static
10031         method.
10032         (regcache_thread_ptid_changed): Update.
10033         (class regcache_access): New.
10034         (current_regcache_test): Update.
10035         (_initialize_regcache): Update.
10036         * regcache.h: Include forward_list.
10037         (regcache): Declare regcache_thread_ptid_changed and declare
10038         registers_changed_ptid as friend.
10039
10040 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10041
10042         * i387-tdep.c (i387_register_to_value): Use register_size
10043         instead of TYPE_LENGTH.
10044         * m68k-tdep.c (m68k_register_to_value): Likewise.
10045
10046 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10047
10048         * i387-tdep.c (i387_convert_register_p): Return false if type
10049         code isn't TYPE_CODE_FLT.
10050
10051 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10052
10053         * alpha-tdep.c (alpha_convert_register_p): Return true if type
10054         length is 4.
10055         (alpha_register_to_value): Remove type length check.
10056         (alpha_value_to_register): Likewise.
10057
10058 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10059
10060         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10061         TYPE_CODE_FLT.
10062
10063 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10064
10065         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10066         TYPE_CODE_FLT or not.
10067
10068 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10069
10070         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10071         * avr-tdep.c (avr_gdbarch_init): Likewise.
10072         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10073         * cris-tdep.c (cris_gdbarch_init): Likewise.
10074         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10075         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10076         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10077         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10078         * mep-tdep.c (mep_gdbarch_init): Likewise.
10079         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10080         * mips-tdep.c (mips_gdbarch_init): Likewise.
10081         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10082         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10083         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10084         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10085         * v850-tdep.c (v850_gdbarch_init): Likewise.
10086
10087 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10088
10089         * selftest-arch.c (tests_with_arch): Call registers_changed
10090         and reinit_frame_cache.
10091         * selftest.c (run_self_tests): Likewise.
10092
10093 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10094
10095         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10096         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10097
10098 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10099
10100         * rl78-tdep.c (rl78_gdbarch_init): Don't call
10101         set_gdbarch_print_insn.
10102
10103 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10104
10105         * h8300-tdep.c (h8300_gdbarch_init): Don't call
10106         set_gdbarch_print_insn.
10107
10108 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10109
10110         * alpha-tdep.c (alpha_gdbarch_init): Don't call
10111         set_gdbarch_print_insn.
10112         * arc-tdep.c (arc_gdbarch_init): Likewise.
10113         * arch-utils.c: include dis-asm.h.
10114         (default_print_insn): New function.
10115         * arch-utils.h (default_print_insn): Declare.
10116         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10117         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10118         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10119         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10120         * frv-tdep.c (frv_gdbarch_init): Likewise.
10121         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10122         * gdbarch.sh (print_insn): Use default_print_insn.
10123         * gdbarch.c: Regenerated.
10124         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10125         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10126         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10127         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10128         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10129         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10130         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10131         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10132         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10133         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10134         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10135         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10136         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10137         * mt-tdep.c (mt_gdbarch_init): Likewise.
10138         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10139         * nios2-tdep.c (nios2_print_insn): Remove.
10140         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10141         * rx-tdep.c (rx_gdbarch_init): Likewise.
10142         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10143         * score-tdep.c (score_print_insn): Remove.
10144         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10145         * sh-tdep.c (sh_gdbarch_init): Likewise.
10146         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10147         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10148         * tic6x-tdep.c (tic6x_print_insn): Remove.
10149         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10150         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10151         * v850-tdep.c (v850_gdbarch_init): Likewise.
10152         * vax-tdep.c (vax_gdbarch_init): Likewise.
10153         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10154         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10155
10156 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10157
10158         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10159         (MIPS_FP0_REGNUM): Remove.
10160         (MIPS_FSR_REGNUM): Remove.
10161         (mips_fbsd_supply_fpregs): Use mips_regnum.
10162         (mips_fbsd_supply_gregs): Likewise.
10163         (mips_fbsd_collect_fpregs): Likewise.
10164         (mips_fbsd_collect_gregs): Likewise.
10165
10166 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10167
10168         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10169         (getpfpregs_supplies): New function.
10170         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10171         getfpregs_supplies.
10172         (mips_fbsd_store_inferior_registers): Likewise.
10173
10174 2017-05-22  Pedro Alves <palves@redhat.com>
10175
10176         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10177         maintainer.
10178
10179 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
10180
10181         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10182         (store_register): Likewise.
10183         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10184         (get_decimal_float_return_value): Likewise.
10185         (do_ppc_sysv_return_value): Likewise.
10186         (ppc64_sysv_abi_push_integer): Likewise.
10187         (ppc64_sysv_abi_push_freg): Likewise.
10188         (ppc64_sysv_abi_return_value_base): Likewise.
10189         (ppc64_sysv_abi_return_value): Likewise.
10190         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10191         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10192         * rs6000-nat.c: Likewise.
10193         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10194         (rs6000_value_to_register): Likewise.
10195         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10196
10197 2017-05-21  Tom Tromey  <tom@tromey.com>
10198
10199         PR rust/21466:
10200         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10201         arrays as "[T]", not "[T; ]".
10202
10203 2017-05-19  Tom Tromey  <tom@tromey.com>
10204
10205         PR rust/21484:
10206         * rust-lang.c (exp_descriptor_rust): New function.
10207         (rust_language_defn): Use it.
10208         * p-lang.c (pascal_language_defn): Update.
10209         * opencl-lang.c (opencl_language_defn): Update.
10210         * objc-lang.c (objc_language_defn): Update.
10211         * m2-lang.c (m2_language_defn): Update.
10212         * language.h (struct language_defn)
10213         <la_watch_location_expression>: New member.
10214         * language.c (unknown_language_defn, auto_language_defn)
10215         (local_language_defn): Update.
10216         * go-lang.c (go_language_defn): Update.
10217         * f-lang.c (f_language_defn): Update.
10218         * d-lang.c (d_language_defn): Update.
10219         * c-lang.h (c_watch_location_expression): Declare.
10220         * c-lang.c (c_watch_location_expression): New function.
10221         (c_language_defn, cplus_language_defn, asm_language_defn)
10222         (minimal_language_defn): Use it.
10223         * breakpoint.c (watch_command_1): Call
10224         la_watch_location_expression.
10225         * ada-lang.c (ada_language_defn): Update.
10226
10227 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10228
10229         PR tui/21482
10230         * gdb_curses.h (NOMACROS): Define.
10231         (NCURSES_NOMACROS): Define.
10232
10233 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10234
10235         PR tui/21482
10236         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10237         arg to char *.
10238         * tui/tui-wingeneral.c (box_win): Likewise.
10239         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10240         (tui_show_source_line): Likewise.
10241         (tui_show_exec_info_content): Likewise.
10242
10243 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10244
10245         * sparc-tdep.c (sparc_structure_return_p)
10246         (sparc_arg_on_registers_p): New functions.
10247         (sparc32_store_arguments): Use them.
10248         * sparc64-tdep.c (sparc64_16_byte_align_p)
10249         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10250         Handle TYPE_CODE_ARRAY.
10251
10252 2017-05-17  Yao Qi  <yao.qi@linaro.org>
10253
10254         * cli/cli-decode.c (add_alias_cmd): New function.
10255         * command.h (add_alias_cmd): Declare.
10256         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10257         instead call add_alias_cmd.
10258
10259 2017-05-17  Pedro Alves  <palves@redhat.com>
10260
10261         * Makefile.in (nat_extra_makefile_frag): Rename to ...
10262         (nat_makefile_frag): ... this.  All references updated.
10263         * configure.ac: Likewise.
10264         * configure.nat: Likewise.  Enhance comments.
10265         * configure: Regenerate.
10266
10267 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10268
10269         * procfs.c (procfs_create_inferior): Change prototype to match
10270         definition.
10271
10272 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
10273
10274         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10275         C++ compiler warning.
10276
10277 2017-05-12  Tom Tromey  <tom@tromey.com>
10278
10279         PR rust/21483:
10280         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10281         recurse, just call value_struct_elt directly.
10282
10283 2017-05-12  Tom Tromey  <tom@tromey.com>
10284
10285         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10286         OP_RUST_ARRAY>: Fix.
10287
10288 2017-05-12  Tom Tromey  <tom@tromey.com>
10289
10290         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10291
10292 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10293
10294         * regcache.c: Include <forward_list>.
10295         (struct regcache_list): Remove.
10296         (current_regcache): Update.
10297         (get_thread_arch_aspace_regcache): Update for std::forward_list.
10298         (regcache_thread_ptid_changed): Likewise.
10299         (registers_changed_ptid): Likewise.
10300         (current_regcache_size): Likewise.
10301
10302 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10303
10304         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10305         (current_regcache_size): New function.
10306         (current_regcache_test): New function.
10307         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10308
10309 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10310
10311         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10312         (print_gp_register_row): Use get_frame_register_value.
10313
10314 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10315
10316         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10317         (mips_supply_fpregset): Likewise.
10318         (mips64_supply_gregset): Likewise.
10319
10320 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10321
10322         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
10323         regcache->raw_supply_zeroed.
10324
10325 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10326
10327         * configure.nat: Rearrange 'case' statements to match
10328         host before cpu.
10329
10330 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10331
10332         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
10333         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10334         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
10335         "@nat_extra_makefile_frag@".
10336         (Makefile): Remove dependency on "@frags@".
10337         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10338         (data-directory/Makefile): Likewise.
10339         * config/aarch64/linux.mh: Deleted; moved contents to
10340         "gdb/configure.nat".
10341         * config/alpha/alpha-linux.mh: Likewise.
10342         * config/alpha/nbsd.mh: Likewise.
10343         * config/arm/linux.mh: Likewise.
10344         * config/arm/nbsdelf.mh: Likewise.
10345         * config/i386/cygwin.mh: Likewise.
10346         * config/i386/cygwin64.mh: Likewise.
10347         * config/i386/darwin.mh: Likewise.
10348         * config/i386/fbsd.mh: Likewise.
10349         * config/i386/fbsd64.mh: Likewise.
10350         * config/i386/go32.mh: Likewise.
10351         * config/i386/i386gnu.mh: Likewise.
10352         * config/i386/i386sol2.mh: Likewise.
10353         * config/i386/linux.mh: Likewise.
10354         * config/i386/linux64.mh: Likewise.
10355         * config/i386/mingw.mh: Likewise.
10356         * config/i386/mingw64.mh: Likewise.
10357         * config/i386/nbsd64.mh: Likewise.
10358         * config/i386/nbsdelf.mh: Likewise.
10359         * config/i386/nto.mh: Likewise.
10360         * config/i386/obsd.mh: Likewise.
10361         * config/i386/obsd64.mh: Likewise.
10362         * config/i386/sol2-64.mh: Likewise.
10363         * config/ia64/linux.mh: Likewise.
10364         * config/m32r/linux.mh: Likewise.
10365         * config/m68k/linux.mh: Likewise.
10366         * config/m68k/nbsdelf.mh: Likewise.
10367         * config/m68k/obsd.mh: Likewise.
10368         * config/m88k/obsd.mh: Likewise.
10369         * config/mips/fbsd.mh: Likewise.
10370         * config/mips/linux.mh: Likewise.
10371         * config/mips/nbsd.mh: Likewise.
10372         * config/mips/obsd64.mh: Likewise.
10373         * config/pa/linux.mh: Likewise.
10374         * config/pa/nbsd.mh: Likewise.
10375         * config/pa/obsd.mh: Likewise.
10376         * config/powerpc/aix.mh: Likewise.
10377         * config/powerpc/fbsd.mh: Likewise.
10378         * config/powerpc/linux.mh: Likewise.
10379         * config/powerpc/nbsd.mh: Likewise.
10380         * config/powerpc/obsd.mh: Likewise.
10381         * config/powerpc/ppc64-linux.mh: Likewise.
10382         * config/powerpc/spu-linux.mh: Likewise.
10383         * config/s390/linux.mh: Likewise.
10384         * config/sh/nbsd.mh: Likewise.
10385         * config/sparc/fbsd.mh: Likewise.
10386         * config/sparc/linux.mh: Likewise.
10387         * config/sparc/linux64.mh: Likewise.
10388         * config/sparc/nbsd64.mh: Likewise.
10389         * config/sparc/nbsdelf.mh: Likewise.
10390         * config/sparc/obsd64.mh: Likewise.
10391         * config/sparc/sol2.mh: Likewise.
10392         * config/tilegx/linux.mh: Likewise.
10393         * config/vax/nbsdelf.mh: Likewise.
10394         * config/vax/obsd.mh: Likewise.
10395         * config/xtensa/linux.mh: Likewise.
10396         * config/i386/i386gnu.mn: New file, with excerpts from
10397         "config/i386/i386gnu.mh".
10398         * configure: Regenerate.
10399         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10400         *.mh files under "gdb/config".
10401         * configure.nat: New file, with contents from the
10402         "gdb/config/*/*.mh" files.
10403
10404 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
10405
10406         * btrace.c (btrace_clear): Free insn vector.
10407
10408 2017-05-05  Pedro Alves  <palves@redhat.com>
10409
10410         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10411         * configure: Regenerate.
10412
10413 2017-05-04  Pedro Alves  <palves@redhat.com>
10414
10415         * Makefile.in (SFILES): Add progspace-and-thread.c.
10416         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10417         (COMMON_OBS): Add progspace-and-thread.o.
10418         * breakpoint.c: Include "progspace-and-thread.h".
10419         (update_inserted_breakpoint_locations)
10420         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10421         Use scoped_restore_current_pspace_and_thread.
10422         (create_std_terminate_master_breakpoint): Use
10423         scoped_restore_current_program_space.
10424         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10425         (print_breakpoint_location): Use
10426         scoped_restore_current_program_space.
10427         (bp_loc_is_permanent): Use
10428         scoped_restore_current_pspace_and_thread.
10429         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10430         (download_tracepoint_locations): Use
10431         scoped_restore_current_pspace_and_thread.
10432         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10433         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10434         (enum step_over_calls_kind): Moved from inferior.h.
10435         (class scoped_restore_current_thread): New class.
10436         * gdbthread.h (make_cleanup_restore_current_thread): Delete
10437         declaration.
10438         (scoped_restore_current_thread): New class.
10439         * infcmd.c: Include "common/gdb_optional.h".
10440         (continue_1, proceed_after_attach): Use
10441         scoped_restore_current_thread.
10442         (notice_new_inferior): Use scoped_restore_current_thread.
10443         * inferior.c: Include "progspace-and-thread.h".
10444         (restore_inferior, save_current_inferior): Delete.
10445         (add_inferior_command, clone_inferior_command): Use
10446         scoped_restore_current_pspace_and_thread.
10447         * inferior.h (scoped_restore_current_inferior): New class.
10448         * infrun.c: Include "progspace-and-thread.h" and
10449         "common/gdb_optional.h".
10450         (follow_fork_inferior): Use
10451         scoped_restore_current_pspace_and_thread.
10452         (scoped_restore_exited_inferior): New class.
10453         (handle_vfork_child_exec_or_exit): Use
10454         scoped_restore_exited_inferior,
10455         scoped_restore_current_pspace_and_thread,
10456         scoped_restore_current_thread and scoped_restore.
10457         (fetch_inferior_event): Use scoped_restore_current_thread.
10458         * linespec.c (decode_line_full, decode_line_1): Use
10459         scoped_restore_current_program_space.
10460         * mi/mi-main.c: Include "progspace-and-thread.h".
10461         (exec_continue): Use scoped_restore_current_thread.
10462         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10463         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10464         * proc-service.c (ps_pglobal_lookup): Use
10465         scoped_restore_current_program_space.
10466         * progspace-and-thread.c: New file.
10467         * progspace-and-thread.h: New file.
10468         * progspace.c (release_program_space, clone_program_space): Use
10469         scoped_restore_current_program_space.
10470         (restore_program_space, save_current_program_space)
10471         (save_current_space_and_thread): Delete.
10472         (switch_to_program_space_and_thread): Moved to
10473         progspace-and-thread.c.
10474         * progspace.h (save_current_program_space)
10475         (save_current_space_and_thread): Delete declarations.
10476         (scoped_restore_current_program_space): New class.
10477         * remote.c (remote_btrace_maybe_reopen): Use
10478         scoped_restore_current_thread.
10479         * symtab.c: Include "progspace-and-thread.h".
10480         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10481         * thread.c (print_thread_info_1): Use
10482         scoped_restore_current_thread.
10483         (struct current_thread_cleanup): Delete.
10484         (do_restore_current_thread_cleanup)
10485         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10486         (scoped_restore_current_thread::~scoped_restore_current_thread):
10487         ... this new dtor.
10488         (make_cleanup_restore_current_thread): Rename/convert to ...
10489         (scoped_restore_current_thread::scoped_restore_current_thread):
10490         ... this new ctor.
10491         (thread_apply_all_command): Use scoped_restore_current_thread.
10492         (thread_apply_command): Use scoped_restore_current_thread.
10493         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10494         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10495
10496 2017-05-04  Pedro Alves  <palves@redhat.com>
10497
10498         * thread.c (make_cleanup_restore_current_thread): Move
10499         find_thread_ptid call before the is_stopped call.  Assert that the
10500         thread is found.  Replace is_stopped call by checking the thread's
10501         state directly.  Remove unnecessary NULL-thread check.
10502
10503 2017-05-04  Pedro Alves  <palves@redhat.com>
10504
10505         * corelow.c (thread_section_name): New class.
10506         (get_core_register_section, get_core_siginfo): Use it.
10507
10508 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10509
10510         * corelow.c (sniff_core_bfd): Remove extra semicolon.
10511         (get_core_register_section): Remove xfree of NULL pointer.
10512
10513 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
10514
10515         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10516         * regcache.c (regcache::raw_supply_zeroed): New function.
10517         * regcache.h (regcache::raw_supply_zeroed): New declaration.
10518
10519 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10520
10521         * gdbarch.sh: Remove commented out definition of
10522         TARGET_CHAR_BIT.
10523         * gdbarch.h: Re-generate.
10524
10525 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
10526
10527         * configure: Regenerate.
10528
10529 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
10530
10531         * solib-target.c (solib_target_relocate_section_addresses):
10532         Remove num_section_bases, num_bases, segment_bases variables.
10533
10534 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10535
10536         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10537
10538 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10539
10540         * solib-target.c: Include <vector>
10541         (struct lm_info_target) <~lm_info_target>: Remove.
10542         <segment_bases, section_bases>: Change type to
10543         std::vector<CORE_ADDR>.
10544         (library_list_start_segment, library_list_start_section,
10545         library_list_end_library,
10546         solib_target_relocate_section_addresses): Adjust.
10547
10548 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10549
10550         * gdbarch.sh (software_single_step): Change return type to
10551         std::vector<CORE_ADDR>.
10552         * gdbarch.c, gdbarch.h: Re-generate.
10553         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10554         Adjust.
10555         (arm_deal_with_atomic_sequence_raw): Adjust.
10556         (thumb_get_next_pcs_raw): Adjust.
10557         (arm_get_next_pcs_raw): Adjust.
10558         (arm_get_next_pcs): Adjust.
10559         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10560         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10561         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10562         (alpha_software_single_step): Adjust.
10563         * alpha-tdep.h (alpha_software_single_step): Adjust.
10564         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10565         * arm-tdep.c (arm_software_single_step): Adjust.
10566         (arm_breakpoint_kind_from_current_state): Adjust.
10567         * arm-tdep.h (arm_software_single_step): Adjust.
10568         * breakpoint.c (insert_single_step_breakpoint): Adjust.
10569         * cris-tdep.c (cris_software_single_step): Adjust.
10570         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10571         (micromips_deal_with_atomic_sequence): Adjust.
10572         (deal_with_atomic_sequence): Adjust.
10573         (mips_software_single_step): Adjust.
10574         * mips-tdep.h (mips_software_single_step): Adjust.
10575         * moxie-tdep.c (moxie_software_single_step): Adjust.
10576         * nios2-tdep.c (nios2_software_single_step): Adjust.
10577         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10578         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10579         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10580         * s390-linux-tdep.c (s390_software_single_step): Adjust.
10581         * sparc-tdep.c (sparc_software_single_step): Adjust.
10582         * spu-tdep.c (spu_software_single_step): Adjust.
10583         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10584
10585 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10586
10587         * gdbarch.sh: Use semi-colon as field separator instead of colon.
10588         * gdbarch.h: Re-generate.
10589
10590 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10591
10592         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10593         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10594         * python/py-instruction.c, python/py-instruction.h: New file.
10595         * python/py-record.c: Add py-instruction.h include.
10596         (gdbpy_initialize_record): Make gdb.Instruction a super class of
10597         gdb.RecordInstruction.
10598         * python/python-internal.h: Add gdbpy_initialize_instruction
10599         declaration.
10600         * python/python.c (do_start_initialization): Add
10601         gdbpy_initialize_instruction.
10602
10603 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10604
10605         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10606         Remove.
10607         (btrace_func_from_recpy_func): New function.
10608         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10609         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10610         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10611         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10612         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10613         Also, use new helper functions.
10614         (btpy_list_item): Use new helper functions.
10615         (recpy_bt_function_call_history): Use new type name.
10616         (btpy_call_getset): Remove.
10617         (gdbpy_initialize_btrace): Remove code to initialize
10618         gdb.BtraceFunctionCall.
10619         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10620         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10621         recpy_bt_func_prev, recpy_bt_func_next): New export.
10622         * python/py-record.c (recpy_func_type): New static object.
10623         (recpy_func_new, recpy_func_level, recpy_func_symbol,
10624         recpy_func_instructions, recpy_func_up, recpy_func_prev,
10625         recpy_func_next): New function.
10626         (recpy_element_hash, recpy_element_richcompare): Updated comment.
10627         (recpy_func_getset): New static object.
10628         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10629         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10630
10631 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10632
10633         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10634         (btpy_object, btpy_insn_type, btpy_new): Remove.
10635         (btpy_list_object): Use gdb.RecordInstruction type instead of
10636         gdb.BtraceInstruction type.
10637         (btrace_insn_from_recpy_insn): New function.
10638         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10639         btpy_new.
10640         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10641         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10642         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10643         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10644         instead of btpy_object.
10645         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10646         btpy_insn_data, btpy_insn_decode): Rename to ...
10647         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10648         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10649         recpy_bt_insn_decode): This.  Also, use new helper functions.
10650         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10651         recpy_insn_type.
10652         (btpy_insn_getset): Remove.
10653         (gdbpy_initialize_btrace): Remove code to initialize
10654         gdb.BtraceInstruction.  Use recpy_element_object.
10655         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10656         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10657         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10658         * python/py-record.c (recpy_insn_type): New static object.
10659         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10660         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10661         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10662         New function.
10663         (recpy_insn_getset): New static object.
10664         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10665         * python/py-record.h (recpy_element_object): New typedef.
10666         (recpy_insn_type, recpy_insn_new): New export.
10667
10668 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10669
10670         * py-record-btrace.c (btpy_insn_new): Removed.
10671         (btpy_insn_or_gap_new): New function.
10672         (btpy_insn_error): Removed.
10673         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10674         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10675         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10676         btpy_insn_or_gap_new instead of btpy_insn_new.
10677         (btpy_insn_getset): Remove btpy_insn_error.
10678         * py-record.c (recpy_gap_type): New static object.
10679         (recpy_gap_object): New typedef.
10680         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10681         recpy_gap_reason_string): New function.
10682         (recpy_gap_getset): New static object.
10683         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10684         * py-record.h (recpy_gap_new): New export.
10685
10686 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10687
10688         * python/py-record.c (recpy_ptid): Remove.
10689         (recpy_record_getset): Remove recpy_ptid.
10690
10691 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10692
10693         * btrace.c (btrace_fetch): Set inferior_ptid.
10694         * python/py-record-btrace.c: Add "py-record.h" include.
10695         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10696         recpy_bt_end, recpy_bt_instruction_history,
10697         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10698         in gdb.Record object instead of current ptid.
10699         * python/py-record.c: Include new "py-record.h" file.
10700         (recpy_record_object): Moved to py-record.h.
10701         * python/py-record.h: New file.
10702
10703 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10704
10705         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10706         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10707         indentation.
10708
10709 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
10710
10711         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10712         the past maintainers section.
10713
10714 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10715
10716         * infcmd.c (get_return_value): Use regcache ctor, and remove
10717         cleanup.
10718
10719 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10720             Pedro Alves  <palves@redhat.com>
10721
10722         * regcache.c (regcache::regcache): New tag dispatch ctor.
10723         (do_cooked_read): Moved above.
10724         (regcache_dup): Use the tag dispatch ctor..
10725         * regcache.h (regcache): Declare ctor, delete copy ctor and
10726         assignment operator, remove friend regcache_dup.
10727
10728 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10729
10730         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10731         call method save instead of regcache_cpy.
10732         * regcache.h (struct regcache): Make regcache_dup a friend.
10733
10734 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10735
10736         * regcache.c (struct regcache): Move to regcache.h
10737         (regcache::arch): New method.
10738         (regcache_get_ptid): Update.
10739         (get_regcache_arch): Call arch method.
10740         (get_regcache_aspace): Call method aspace.
10741         (register_buffer): Change it to method.
10742         (regcache_save): Change it to regcache::save.
10743         (regcache_restore): Likewise.
10744         (regcache_cpy_no_passthrough): Remove the declaration.
10745         (regcache_cpy): Call methods restore and cpy_no_passthrough.
10746         (regcache_cpy_no_passthrough): Change it to method
10747         cpy_no_passthrough.
10748         (regcache_register_status): Change it to method
10749         get_register_status.
10750         (regcache_invalidate): Change it to method invalidate.
10751         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10752         (regcache_raw_update): Change it to method raw_update.
10753         (regcache_raw_read): Likewise.
10754         (regcache_raw_read_signed): Likewise.
10755         (regcache_raw_read_unsigned): Likewise.
10756         (regcache_raw_write_signed): Likewise.
10757         (regcache_raw_write_unsigned): Likewise.
10758         (regcache_cooked_read): Likewise.
10759         (regcache_cooked_read_value): Likewise.
10760         (regcache_cooked_read_signed): Likewise.
10761         (regcache_cooked_read_unsigned): Likewise.
10762         (regcache_cooked_write_signed): Likewise.
10763         (regcache_cooked_write_unsigned): Likewise.
10764         (regcache_raw_set_cached_value): Likewise.
10765         (regcache_raw_write): Likewise.
10766         (regcache_cooked_write): Likewise.
10767         (regcache_xfer_part): Likewise.
10768         (regcache_raw_read_part): Likewise.
10769         (regcache_raw_write_part): Likewise.
10770         (regcache_cooked_read_part): Likewise.
10771         (regcache_cooked_write_part): Likewise.
10772         (regcache_raw_supply): Likewise.
10773         (regcache_raw_collect): Likewise.
10774         (regcache_transfer_regset): Likewise.
10775         (regcache_supply_regset): Likewise.
10776         (regcache_collect_regset): Likewise.
10777         (regcache_debug_print_register): Likewise.
10778         (enum regcache_dump_what): Move it to regcache.h.
10779         (regcache_dump): Change it to method dump.
10780         * regcache.h (enum regcache_dump_what): New.
10781         (class regcache): New.
10782         * target.c (target_fetch_registers): Call method
10783         debug_print_register.
10784         (target_store_registers): Likewise.
10785
10786 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10787
10788         * windows-nat.c (struct lm_info_windows): Initialize field.
10789         (windows_make_so): Allocate lm_info_windows with new.
10790         (windows_free_so): Free lm_info_windows with delete.
10791
10792 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10793
10794         * solib-darwin.c (struct lm_info_darwin): Initialize field.
10795         (darwin_current_sos): Allocate lm_info_darwin with new, remove
10796         cleanup.
10797         (darwin_free_so): Free lm_info_darwin with delete.
10798
10799 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10800
10801         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
10802         <l_addr_p>: Change type to bool.
10803         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
10804         (svr4_free_so): Free lm_info_svr4 with delete.
10805         (svr4_copy_library_list): Replace memcpy with call to copy
10806         constructor.
10807         (library_list_start_library, svr4_default_sos): Allocate
10808         lm_info_svr4 with new.
10809
10810 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10811
10812         * solib-target.c (struct lm_info_target): Add destructor,
10813         initialize fields.
10814         <name>: Change type to std::string.
10815         (library_list_start_library): Allocate lm_info_target with new.
10816         (solib_target_free_library_list): Free lm_info_target with
10817         delete.
10818         (solib_target_current_sos): Adapt to std::string.
10819         (solib_target_free_so): Free lm_info_target with delete.
10820
10821 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10822
10823         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
10824         fields.
10825         (frv_current_sos): Allocate lm_info_frv with new.
10826         (frv_relocate_main_executable): Free lm_info_frv with delete,
10827         allocate with new.
10828         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
10829
10830 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10831
10832         * solib-frv.c (struct lm_info_frv): Fix indentation.
10833
10834 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10835
10836         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
10837         map field.
10838         (dsbt_current_sos): Allocate lm_info_dsbt with new.
10839         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
10840         and allocate with new.
10841         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
10842
10843 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10844
10845         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
10846         <filename, member_name>: Change type to std::string.
10847         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
10848         (library_list_start_library): Allocate lm_info_aix with new.
10849         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
10850         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
10851         with copy constructor.
10852
10853 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10854
10855         * solist.h (struct lm_info): Remove.
10856         (struct lm_info_base): New class.
10857         (struct so_list) <lm_info>: Change type to lm_info_base *.
10858         * nto-tdep.c (struct lm_info): Remove.
10859         (lm_addr): Adjust.
10860         * solib-aix.c (struct lm_info): Rename to ...
10861         (struct lm_info_aix): ... this.  Extend lm_info_base.
10862         (lm_info_p): Rename to ...
10863         (lm_info_aix_p): ... this, and adjust.
10864         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
10865         solib_aix_parse_libraries, library_list_start_library,
10866         solib_aix_free_library_list, solib_aix_parse_libraries,
10867         solib_aix_get_library_list,
10868         solib_aix_relocate_section_addresses, solib_aix_free_so,
10869         solib_aix_get_section_offsets,
10870         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
10871         Adjust.
10872         (struct solib_aix_inferior_data) <library_list>: Adjust.
10873         * solib-darwin.c (struct lm_info): Rename to ...
10874         (struct lm_info_darwin): ... this.  Extend lm_info_base.
10875         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
10876         * solib-dsbt.c (struct lm_info): Rename to ...
10877         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
10878         (struct dsbt_info) <main_executable_lm_info): Adjust.
10879         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
10880         dsbt_relocate_section_addresses): Adjust.
10881         * solib-frv.c (struct lm_info): Rename to ...
10882         (struct lm_info_frv): ... this.  Extend lm_info_base.
10883         (main_executable_lm_info): Adjust.
10884         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
10885         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
10886         find_canonical_descriptor_in_load_object,
10887         frv_fdpic_find_canonical_descriptor): Adjust.
10888         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10889         to lm_info_svr4.
10890         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10891         svr4_clear_so, svr4_copy_library_list,
10892         library_list_start_library, svr4_default_sos, svr4_read_so_list,
10893         svr4_current_sos, svr4_fetch_objfile_link_map,
10894         solist_update_incremental): Adjust.
10895         * solib-svr4.h (struct lm_info_svr4): Move here from
10896         solib-svr4.c.
10897         * solib-target.c (struct lm_info): Rename to ...
10898         (struct lm_info_target): ... this.  Extend lm_info_base.
10899         (lm_info_p): Rename to ...
10900         (lm_info_target_p): ... this.
10901         (solib_target_parse_libraries, library_list_start_segment,
10902         library_list_start_section, library_list_start_library,
10903         library_list_end_library, solib_target_free_library_list,
10904         solib_target_current_sos, solib_target_free_so,
10905         solib_target_relocate_section_addresses): Adjust.
10906         * windows-nat.c (struct lm_info): Rename to ...
10907         (struct lm_info_windows): ... this.  Extend lm_info_base.
10908         (windows_make_so, handle_load_dll, handle_unload_dll,
10909         windows_xfer_shared_libraries): Adjust.
10910
10911 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10912
10913         * solib-darwin.c (struct darwin_so_list): Remove.
10914         (darwin_current_sos): Allocate an so_list object instead of a
10915         darwin_so_list, separately allocate an lm_info object.
10916         (darwin_free_so): Free lm_info.
10917
10918 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
10919
10920         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
10921         with fprintf_filtered.
10922
10923 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10924
10925         * regcache.c (regcache::regcache): New function.
10926         (regcache::~regcache): New function.
10927         (regcache_xmalloc_1): Remove.
10928         (regcache_xmalloc): Call new regcache.
10929         (regcache_xfree): Call delete regcache.
10930         (get_thread_arch_aspace_regcache): Call new regcache.
10931
10932 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10933
10934         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
10935         lwp instead of ptid_get_lwp.
10936
10937 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10938
10939         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
10940         lwp_info instead of getting from inferior_ptid.
10941
10942 2017-04-27  Keith Seitz  <keiths@redhat.com>
10943
10944         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
10945         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
10946         (CV_CONVERSION_BADNESS): Define.
10947         (rank_one_type): Remove overly restrictive rvalue reference
10948         rank checks.
10949         Add cv-qualifier checks and subranks for type equality.
10950         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
10951         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
10952         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
10953
10954 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
10955
10956         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
10957         count when creating the object.
10958
10959 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
10960             Ulrich Weigand  <uweigand@de.ibm.com>
10961
10962         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
10963         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
10964         is used in AIX.
10965         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
10966         (process_xcoff_symbol): Likewise.
10967         (scan_xcoff_symtab): Likewise.
10968
10969 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10970
10971         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
10972         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
10973         (ia64_access_reg): Use get_frame_register_unsigned.
10974         (ia64_access_rse_reg): Likewise.
10975         (ia64_libunwind_frame_prev_register): Likewise.
10976
10977 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
10978
10979         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
10980         * gdbarch.c: Regenerated.
10981         * gdbarch.h: Regenerated.
10982         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
10983         visibility external.
10984         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
10985         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
10986         (enum cfa_how_kind): Move to ...
10987         (struct dwarf2_frame_state_reg_info): Likewise.
10988         (struct dwarf2_frame_state): Likewise.
10989         * dwarf2-frame.h: ... here.
10990         (dwarf2_frame_state_alloc_regs): New declaration.
10991         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
10992         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
10993
10994 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10995
10996         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
10997         regcache_raw_read_unsigned.
10998         (xtensa_pseudo_register_write): Likewise.
10999
11000 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11001
11002         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11003         (nds32_pseudo_register_write): Likewise.
11004
11005 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11006
11007         * regcache.c (struct regcache) <readonly_p>: Change its type
11008         to bool.
11009         (regcache_xmalloc_1): Update parameter type and callers update.
11010
11011 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11012
11013         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11014         set_gdbarch_wchar_bit.
11015         * arm-tdep.c (arm_gdbarch_init): Likewise.
11016
11017 2017-04-25  Pedro Alves  <palves@redhat.com>
11018
11019         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11020         (BothAreRelocatable, memcopy, memmove): Don't define.
11021         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11022         macros.
11023
11024 2017-04-25  Pedro Alves  <palves@redhat.com>
11025
11026         * common/common-defs.h: Include "common/poison.h".
11027         * common/function-view.h: (Not, Or, Requires): Move to traits.h
11028         and adjust.
11029         * common/poison.h: New file.
11030         * common/traits.h: Include <type_traits>.
11031         (Not, Or, Requires): New, moved from common/function-view.h.
11032
11033 2017-04-25  Pedro Alves  <palves@redhat.com>
11034
11035         * breakpoint.h (struct breakpoint): In-class initialize all
11036         fields.  Make boolean fields "bool".
11037         * breakpoint.c (init_raw_breakpoint_without_location): Remove
11038         memset call and initializations no longer necessary.
11039
11040 2017-04-25  Pedro Alves  <palves@redhat.com>
11041
11042         * btrace.c (pt_btrace_insn_flags): Change parameter type to
11043         reference.
11044         (pt_btrace_insn): New function.
11045         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11046
11047 2017-04-25  Pedro Alves  <palves@redhat.com>
11048
11049         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
11050         "base" field and inherit from "bp_location" instead.  Add
11051         non-default ctor.
11052         (allocate_location_exception): Use new non-default ctor.
11053         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11054         (init_bp_location): Convert to ...
11055         (bp_location::bp_location): ... this new ctor, and remove memset
11056         call.
11057         (base_breakpoint_allocate_location): Use the new non-default ctor.
11058         * breakpoint.h (bp_location): Now a class.  Declare default and
11059         non-default ctors.  In-class initialize all members.
11060         (init_bp_location): Remove declaration.
11061
11062 2017-04-25  Pedro Alves  <palves@redhat.com>
11063
11064         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11065         assignment operator.
11066
11067 2017-04-24  Yao Qi  <yao.qi@linaro.org>
11068
11069         * doublest.c (convert_doublest_to_floatformat): Call
11070         floatformat_totalsize_bytes.
11071
11072 2017-04-22  Tom Tromey  <tom@tromey.com>
11073
11074         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11075         ui_out_emit_list.
11076         * stack.c (print_frame): Use ui_out_emit_list.
11077         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11078         ui_out_emit_list.
11079         * mi/mi-main.c (print_one_inferior)
11080         (mi_cmd_data_list_register_names)
11081         (mi_cmd_data_list_register_values, mi_cmd_list_features)
11082         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11083         ui_out_emit_list.
11084         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11085         (mi_output_solib_attribs): Use ui_out_emit_list,
11086         ui_out_emit_tuple.
11087         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11088         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11089         (mi_cmd_stack_list_args, list_args_or_locals): Use
11090         ui_out_emit_list.
11091         * disasm.c (do_assembly_only): Use ui_out_emit_list.
11092         * breakpoint.c (print_solib_event, output_thread_groups): Use
11093         ui_out_emit_list.
11094
11095 2017-04-22  Tom Tromey  <tom@tromey.com>
11096
11097         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11098         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11099         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11100
11101 2017-04-22  Tom Tromey  <tom@tromey.com>
11102
11103         * tracepoint.c (tvariables_info_1)
11104         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11105
11106 2017-04-22  Tom Tromey  <tom@tromey.com>
11107
11108         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11109         annotate_arg_emitter.
11110         * breakpoint.c (print_mention_watchpoint)
11111         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11112         * annotate.h (struct annotate_arg_emitter): New.
11113
11114 2017-04-22  Tom Tromey  <tom@tromey.com>
11115
11116         * record-btrace.c (record_btrace_insn_history)
11117         (record_btrace_insn_history_range, record_btrace_call_history)
11118         (record_btrace_call_history_range): Use ui_out_emit_tuple.
11119         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11120         ui_out_emit_tuple.
11121         * stack.c (print_frame_info): Use ui_out_emit_tuple.
11122         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11123         * skip.c (skip_info): Use ui_out_emit_tuple.
11124         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11125         * progspace.c (print_program_space): Use ui_out_emit_tuple.
11126         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11127         * osdata.c (info_osdata): Use ui_out_emit_tuple.
11128         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11129         ui_out_emit_tuple.
11130         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11131         (output_register, mi_cmd_data_read_memory)
11132         (mi_cmd_data_read_memory_bytes, mi_load_progress)
11133         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11134         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11135         Use ui_out_emit_tuple.
11136         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11137         ui_out_emit_tuple.
11138         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11139         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11140         * linux-thread-db.c (info_auto_load_libthread_db): Use
11141         ui_out_emit_tuple.
11142         * inferior.c (print_inferior): Use ui_out_emit_tuple.
11143         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11144         * disasm.c (do_mixed_source_and_assembly_deprecated)
11145         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11146         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11147         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11148         * breakpoint.c (print_one_breakpoint_location)
11149         (print_one_breakpoint): Use ui_out_emit_tuple.
11150         * auto-load.c (print_script, info_auto_load_cmd): Use
11151         ui_out_emit_tuple.
11152         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11153
11154 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
11155
11156         * thread.c (print_thread_info_1): Remove dead code.
11157
11158 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11159
11160         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11161         GDB_SELF_TEST.
11162         * arm-tdep.c (selftests::arm_record_test): Likewise.
11163
11164 2017-04-21  Yao Qi  <yao.qi@linaro.org>
11165
11166         * regcache.c (regcache_restore): Remove argument 2.  Replace
11167         argument 3 with regcache.  Get register status from
11168         src->register_status and get register contents from
11169         register_buffer (src, regnum).
11170         (regcache_cpy): Update.
11171
11172 2017-04-19  Pedro Alves  <palves@redhat.com>
11173
11174         * gdbthread.h (thread): Add missing closing parenthesis in
11175         comment.
11176
11177 2017-04-19  Pedro Alves  <palves@redhat.com>
11178
11179         * common/refcounted-object.h: New file.
11180         * gdbthread.h: Include "common/refcounted-object.h".
11181         (thread_info): Inherit from refcounted_object and add comments.
11182         (thread_info::incref, thread_info::decref)
11183         (thread_info::m_refcount): Delete.
11184         (thread_info::deletable): Use the refcounted_object::refcount()
11185         method.
11186         * inferior.c (current_inferior_): Add comment.
11187         (set_current_inferior): Increment/decrement refcounts.
11188         (prune_inferiors, remove_inferior_command): Skip inferiors marked
11189         not-deletable instead of comparing with the current inferior.
11190         (initialize_inferiors): Increment the initial inferior's refcount.
11191         * inferior.h (struct inferior): Forward declare.
11192         Include "common/refcounted-object.h".
11193         (current_inferior, set_current_inferior): Move declaration to
11194         before struct inferior's definition, and fix comment.
11195         (inferior): Inherit from refcounted_object.  Add comments.
11196         * thread.c (switch_to_thread_no_regs): Reference the thread's
11197         inferior pointer directly instead of doing a ptid lookup.
11198         (switch_to_no_thread): New function.
11199         (switch_to_thread(thread_info *)): New function, factored out
11200         from ...
11201         (switch_to_thread(ptid_t)): ... this.
11202         (restore_current_thread): Delete.
11203         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11204         fields, and add 'inf' field.
11205         (do_restore_current_thread_cleanup): Check whether old->inf is
11206         alive instead of looking up an inferior by ptid.  Use
11207         switch_to_thread and switch_to_no_thread.
11208         (restore_current_thread_cleanup_dtor): Use old->inf directly
11209         instead of lookup up an inferior by id.  Decref the inferior.
11210         Don't restore 'removable'.
11211         (make_cleanup_restore_current_thread): Same the inferior pointer
11212         in old, instead of the inferior number.  Incref the inferior.
11213         Don't save/clear 'removable'.
11214
11215 2017-04-19  Pedro Alves  <palves@redhat.com>
11216
11217         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11218         unittests/scoped_restore-selftests.c.
11219         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11220         * common/scoped_restore.h (scoped_restore_base): Make "class".
11221         (scoped_restore_base::release): New public method.
11222         (scoped_restore_base::scoped_restore_base): New protected ctor.
11223         (scoped_restore_base::m_saved_var): New protected field.
11224         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11225         scoped_restore_base base class instead of m_saved_var directly.
11226         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11227         (scoped_restore_tmpl::scoped_restore_tmpl(const
11228         scoped_restore_tmpl<T>&)): Likewise.
11229         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11230         method.
11231         (scoped_restore_tmpl::saved_var): New method.
11232         (scoped_restore_tmpl::m_saved_var): Delete.
11233         * inferior.h (inferior::detaching): Now a bool.
11234         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11235         cleanup.
11236         * unittests/scoped_restore-selftests.c: New file.
11237
11238 2017-04-19  Pedro Alves  <palves@redhat.com>
11239
11240         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11241         Re-sort in alphabetic order.
11242
11243 2017-04-18  Pedro Alves  <palves@redhat.com>
11244
11245         * xml-support.c (obstack_xml_printf): Delete.
11246         * xml-support.h (obstack_xml_printf): Delete.
11247
11248 2017-04-18  Pedro Alves  <palves@redhat.com>
11249
11250         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11251         vdebug, verror, body_text, start_element, end_element, name,
11252         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11253         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11254         is_xinclude>: Make private and add m_ prefix.
11255         (gdb_xml_parser::body_text): New method, based on ...
11256         (gdb_xml_body_text): ... this.  Adjust.
11257         (gdb_xml_parser::vdebug): New method, based on ...
11258         (gdb_xml_debug): ... this.  Adjust.
11259         (gdb_xml_parser::verror): New method, based on ...
11260         (gdb_xml_error): ... this.  Adjust.
11261         (gdb_xml_parser::start_element): New method, based on ...
11262         (gdb_xml_start_element): ... this.  Adjust.
11263         (gdb_xml_start_element_wrapper): Defer to
11264         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11265         (gdb_xml_parser::end_element): New method, based on ...
11266         (gdb_xml_end_element_wrapper): ... this.  Adjust.
11267         (gdb_xml_parser::~gdb_xml_parser): Adjust.
11268         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11269         (gdb_xml_parser::use_dtd): New method, based on ...
11270         (gdb_xml_use_dtd): ... this.  Adjust.
11271         (gdb_xml_parser::parse): New method, based on ...
11272         (gdb_xml_parse): ... this.  Adjust.
11273         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11274         (xinclude_start_include): Adjust to call the parser's name method.
11275         (xml_xinclude_default, xml_xinclude_start_doctype)
11276         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11277         method.
11278         (xml_process_xincludes): Adjust to call parser methods.
11279         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11280         declarations.
11281
11282 2017-04-18  Pedro Alves  <palves@redhat.com>
11283
11284         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11285         gdb::optional<std::string>.
11286         * xml-support.c: Include <string>.
11287         (scope_level::scope_level(scope_level &&))
11288         (scope_level::~scope_level): Delete.
11289         (scope_level::body): Now a std::string.
11290         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11291         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11292         parameter.
11293         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11294         (xinclude_parsing_data::output): Now a std::string reference.
11295         (xinclude_start_include): Adjust.
11296         (xml_xinclude_default): Adjust.
11297         (xml_process_xincludes): Add 'output' parameter, and return bool.
11298         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11299         and return bool.
11300         * xml-tdesc.c: Include <unordered_map> and <string>.
11301         (tdesc_xml_cache): Delete.
11302         (tdesc_xml_cache_s): Delete.
11303         (xml_cache): Now an std::unordered_map.
11304         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11305         (target_fetch_description_xml): Change return type to
11306         gdb::optional<std::string>, and adjust.
11307         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11308         (target_fetch_description_xml): Change return type to
11309         gdb::optional<std::string>.
11310
11311 2017-04-18  Pedro Alves  <palves@redhat.com>
11312
11313         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11314         unittests/optional-selftests.c.
11315         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11316         * unittests/optional-selftests.c: New file.
11317         * unittests/optional/assignment/1.cc: New file.
11318         * unittests/optional/assignment/2.cc: New file.
11319         * unittests/optional/assignment/3.cc: New file.
11320         * unittests/optional/assignment/4.cc: New file.
11321         * unittests/optional/assignment/5.cc: New file.
11322         * unittests/optional/assignment/6.cc: New file.
11323         * unittests/optional/assignment/7.cc: New file.
11324         * unittests/optional/cons/copy.cc: New file.
11325         * unittests/optional/cons/default.cc: New file.
11326         * unittests/optional/cons/move.cc: New file.
11327         * unittests/optional/cons/value.cc: New file.
11328         * unittests/optional/in_place.cc: New file.
11329         * unittests/optional/observers/1.cc: New file.
11330         * unittests/optional/observers/2.cc: New file.
11331
11332 2017-04-18  Pedro Alves  <palves@redhat.com>
11333
11334         * common/gdb_optional.h: Include common/traits.h.
11335         (in_place_t): New type.
11336         (in_place): New constexpr variable.
11337         (optional::optional): Remove member initialization of
11338         m_instantiated.
11339         (optional::optional(in_place_t...)): New constructor.
11340         (optional::~optional): Use reset.
11341         (optional::optional(const optional&)): New.
11342         (optional::optional(const optional&&)): New.
11343         (optional::optional(T &)): New.
11344         (optional::optional(T &&)): New.
11345         (operator::operator=(const optional &)): New.
11346         (operator::operator=(optional &&)): New.
11347         (operator::operator= (const T &))
11348         (operator::operator= (T &&))
11349         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
11350         (operator::reset): New.
11351         (operator::m_instantiated):: Add in-class initializer.
11352         * common/traits.h: Include <type_traits>.
11353         (struct And): New types.
11354
11355 2017-04-18  Pedro Alves  <palves@redhat.com>
11356
11357         * xml-support.c: Include <vector>.
11358         (scope_level::scope_level(const gdb_xml_element *))
11359         (scope_level::scope_level(scope_level&&)): New.
11360         (scope_level::~scope_level): New.
11361         (scope_level_s): Delete.
11362         (gdb_xml_parser::scopes): Now a std::vector.
11363         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11364         Use std::vector.
11365         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11366         scope cleanup code.
11367         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11368         of the scopes member.  Use std::vector::emplace_back.
11369
11370 2017-04-18  Pedro Alves  <palves@redhat.com>
11371
11372         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
11373         a bool.
11374         (gdb_xml_end_element): Change type of first parameter.
11375         (gdb_xml_cleanup): Rename to ...
11376         (gdb_xml_parser::~gdb_xml_parser): ... this.
11377         (gdb_xml_create_parser_and_cleanup): Delete with ...
11378         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11379         to this new ctor.
11380         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11381         using gdb_xml_create_parser_and_cleanup.
11382         (xinclude_parsing_data): Add ctor/dtor.
11383         (xml_xinclude_cleanup): Delete.
11384         (xml_process_xincludes): Create a local xinclude_parsing_data
11385         instead of heap-allocating one.  Create a local gdb_xml_parser
11386         instead of heap-allocating one with
11387         gdb_xml_create_parser_and_cleanup.
11388
11389 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
11390
11391         PR threads/20743
11392         * fbsd-nat.c (resume_one_thread_cb): Remove.
11393         (resume_all_threads_cb): Remove.
11394         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11395         iterate_over_threads.
11396
11397 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11398
11399         * NEWS: Create a new section for the next release branch.
11400         Rename the section of the current branch, now that it has
11401         been cut.
11402
11403 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11404
11405         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11406         * version.in: Bump version to 8.0.50.DATE-git.
11407
11408 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
11409
11410         PR gdb/21385
11411         * windows-nat.c (windows_create_inferior): Declare 'allargs'
11412         independently of the host, and fix build breakage on Cygwin.
11413
11414 2017-04-13  Pedro Alves  <palves@redhat.com>
11415
11416         * inferior.c (free_inferior): Convert to ...
11417         (inferior::~inferior): ... this dtor.
11418         (inferior::inferior): New ctor, factored out from ...
11419         (add_inferior_silent): ... here.  Allocate the inferior with a new
11420         expression.
11421         (delete_inferior): Call delete instead of free_inferior.
11422         * inferior.h (gdb_environ, continuation): Forward declare.
11423         (inferior): Now a class.  Add in-class initialization to all
11424         members.  Make boolean fields bool, except 'detaching'.
11425         (inferior::inferior): New explicit ctor.
11426         (inferior::~inferior): New.
11427
11428 2017-04-13  Pedro Alves  <palves@redhat.com>
11429
11430         * inferior.c (init_inferior_list): Delete.
11431         * inferior.h (init_inferior_list): Delete.
11432
11433 2017-04-13  Pedro Alves  <palves@redhat.com>
11434
11435         PR threads/13217
11436         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11437         (top level): Call it twice, with different thread sets.
11438
11439 2017-04-13  Pedro Alves  <palves@redhat.com>
11440
11441         * thread.c: Include <algorithm>.
11442         (thread_array_cleanup): Delete.
11443         (scoped_inc_dec_ref): New class.
11444         (live_threads_count): New function.
11445         (set_thread_refcount): Delete.
11446         (tp_array_compar_ascending): Now a bool.
11447         (tp_array_compar): Convert to a std::sort comparison function.
11448         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11449         and live_threads_count.
11450
11451 2017-04-13  Pedro Alves  <palves@redhat.com>
11452
11453         * infrun.c (follow_fork_inferior): Also switch the current
11454         inferior.
11455
11456 2017-04-13  Pedro Alves  <palves@redhat.com>
11457
11458         * breakpoint.c (watch_command_1): Save watchpoint-frame info
11459         before calling create_internal_breakpoint.
11460
11461 2017-04-13  Pedro Alves  <palves@redhat.com>
11462
11463         * fork-child.c (execv_argv): New class.
11464         (breakup_args): Refactored as ...
11465         (execv_argv::init_for_no_shell): .. this method of execv_argv.
11466         Copy arguments to storage and replace separators with NULL
11467         terminators in place.
11468         (escape_bang_in_quoted_argument): Adjust to return bool.
11469         (execv_argv::execv_argv): New ctor.
11470         (execv_argv::init_for_shell): New method, factored out from
11471         fork_inferior.  Don't strdup strings into the vector.
11472         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
11473         Remove free_vector_argv call.
11474
11475 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11476
11477         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11478         tdep->rx_psw_type.
11479
11480 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11481
11482         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11483         * rx-tdep.c (rx_gdbarch_init): Likewise.
11484
11485 2017-04-13  Pedro Alves  <palves@redhat.com>
11486
11487         * breakpoint.h (struct breakpoint): Reindent.
11488
11489 2017-04-13  Pedro Alves  <palves@redhat.com>
11490
11491         * breakpoint.c (bp_location): Rename to ...
11492         (bp_locations): ... this.  All references updated.
11493         (bp_location_count): Rename to ...
11494         (bp_locations_count): ... this.  All references updated.
11495         (bp_location_placed_address_before_address_max): Rename to ...
11496         (bp_locations_placed_address_before_address_max): ... this.  All
11497         references updated.
11498         (bp_location_shadow_len_after_address_max): Rename to ...
11499         (bp_locations_shadow_len_after_address_max): ... this.  All
11500         references updated.
11501         (bp_location_compare_addrs): Rename to ...
11502         (bp_locations_compare_addrs): ... this.  All references updated.
11503         (bp_location_compare):Rename to ...
11504         (bp_locations_compare): ... this.  All references updated.
11505         (bp_location_target_extensions_update): Rename to ...
11506         (bp_locations_target_extensions_update): ... this.  All references
11507         updated.
11508
11509 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11510
11511         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11512         * common/common.m4: Check headers 'termios.h', 'termio.h' and
11513         'sgtty.h'.
11514         * common/gdb_termios.h: New file, with parts of "terminal.h".
11515         * inflow.c: Include "gdb_termios.h".
11516         * ser-unix.c: Include "gdb_termios.h".
11517         * terminal.h: Move terminal-related defines to
11518         "common/gdb_termios.h".
11519
11520 2017-04-12  Tom Tromey  <tom@tromey.com>
11521
11522         * probe.c (parse_probes): Update.
11523         * location.h (delete_event_location): Don't declare.
11524         (event_location_deleter::operator()): Update.
11525         * location.c (event_location_deleter::operator()): Rename from
11526         delete_event_location.
11527         * linespec.h (linespec_result) <location>: Change type to
11528         event_location_up.
11529         * linespec.c (canonicalize_linespec, event_location_to_sals)
11530         (decode_objc): Update.
11531         (linespec_result): Don't call delete_event_location.
11532         * breakpoint.c (create_breakpoints_sal)
11533         (bkpt_probe_create_sals_from_location)
11534         (strace_marker_create_sals_from_location): Update.
11535
11536 2017-04-12  Tom Tromey  <tom@tromey.com>
11537
11538         * linespec.h (struct linespec_result): Add constructor and
11539         destructor.
11540         (init_linespec_result, destroy_linespec_result)
11541         (make_cleanup_destroy_linespec_result): Don't declare.
11542         * linespec.c (init_linespec_result): Remove.
11543         (linespec_result::~linespec_result): Rename from
11544         destroy_linespec_result.  Update.
11545         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11546         Remove.
11547         * breakpoint.c (create_breakpoint, break_range_command)
11548         (decode_location_default): Update.
11549         * ax-gdb.c (agent_command_1): Update.
11550
11551 2017-04-12  Tom Tromey  <tom@tromey.com>
11552
11553         * remote.c (remote_download_tracepoint): Update.
11554         * python/py-breakpoint.c (bppy_get_location): Update.
11555         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11556         (gdbscm_breakpoint_location): Update.
11557         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11558         * breakpoint.h (struct breakpoint) <location, location_range_end>:
11559         Change type to event_location_up.
11560         * breakpoint.c (create_overlay_event_breakpoint)
11561         (create_longjmp_master_breakpoint)
11562         (create_std_terminate_master_breakpoint)
11563         (create_exception_master_breakpoint)
11564         (breakpoint_event_location_empty_p, print_breakpoint_location)
11565         (print_one_breakpoint_location, create_thread_event_breakpoint)
11566         (init_breakpoint_sal, create_breakpoint)
11567         (print_recreate_ranged_breakpoint, break_range_command)
11568         (init_ada_exception_breakpoint, say_where): Update.
11569         (base_breakpoint_dtor): Don't call delete_event_location.
11570         (bkpt_print_recreate, tracepoint_print_recreate)
11571         (dprintf_print_recreate, update_static_tracepoint)
11572         (breakpoint_re_set_default): Update.
11573
11574 2017-04-12  Tom Tromey  <tom@tromey.com>
11575
11576         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11577         type of "to_do".  Update.
11578         (compute_stack_depth): Use std::vector.
11579
11580 2017-04-12  Tom Tromey  <tom@tromey.com>
11581
11582         * printcmd.c (find_instruction_backward): Use std::vector.
11583
11584 2017-04-12  Tom Tromey  <tom@tromey.com>
11585
11586         * symfile.c (objfilep): Remove typedef.
11587         (reread_symbols): Use a std::vector.
11588
11589 2017-04-12  Tom Tromey  <tom@tromey.com>
11590
11591         * mi/mi-main.c (exec_direction_forward): Remove.
11592         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11593         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11594         scoped_restore.
11595         * guile/guile.c (guile_repl_command, guile_command)
11596         (gdbscm_execute_gdb_command): Use scoped_restore.
11597         * go-exp.y (go_parse): Use scoped_restore.
11598         * d-exp.y (d_parse): Use scoped_restore.
11599         * cli/cli-decode.c (cmd_func): Use scoped_restore.
11600         * c-exp.y (c_parse): Use scoped_restore.
11601
11602 2017-04-12  Tom Tromey  <tom@tromey.com>
11603
11604         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11605         (mi_parse): Update return type.
11606         (mi_parse_free): Remove.
11607         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11608         (mi_parse::~mi_parse): Rename from mi_parse_free.
11609         (mi_parse_cleanup): Remove.
11610         (mi_parse): Return a unique_ptr.  Use new.
11611         * mi/mi-main.c (mi_execute_command): Update.
11612
11613 2017-04-12  Tom Tromey  <tom@tromey.com>
11614
11615         * location.c (explicit_location_lex_one): Return a
11616         unique_xmalloc_ptr.
11617         (string_to_explicit_location): Update.  Remove cleanups.
11618
11619 2017-04-12  Tom Tromey  <tom@tromey.com>
11620
11621         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11622         (compare_value_and_voffset): Change type.  Update.
11623         (compute_vtable_size): Change type of "offset_vec".
11624         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
11625         (gnuv3_get_typeid): Remove extraneous declaration.
11626
11627 2017-04-12  Tom Tromey  <tom@tromey.com>
11628
11629         * charset.h (wchar_iterator): Fix comment.
11630
11631 2017-04-12  Tom Tromey  <tom@tromey.com>
11632
11633         * charset.c (iconv_wrapper): New class.
11634         (cleanup_iconv): Remove.
11635         (convert_between_encodings): Use it.
11636
11637 2017-04-12  Tom Tromey  <tom@tromey.com>
11638
11639         * symfile.h (increment_reading_symtab): Update type.
11640         * symfile.c (decrement_reading_symtab): Remove.
11641         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11642         * psymtab.c (psymtab_to_symtab): Update.
11643         * dwarf2read.c (dw2_instantiate_symtab): Update.
11644
11645 2017-04-12  Tom Tromey  <tom@tromey.com>
11646
11647         * jit.c (struct jit_reader): Declare separately.  Add constructor
11648         and destructor.  Change type of "handle".
11649         (loaded_jit_reader): Define separately.
11650         (jit_reader_load): Update.  New "new".
11651         (jit_reader_unload_command): Use "delete".
11652         * gdb-dlfcn.h (struct dlclose_deleter): New.
11653         (gdb_dlhandle_up): New typedef.
11654         (gdb_dlopen, gdb_dlsym): Update types.
11655         (gdb_dlclose): Remove.
11656         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11657         (gdb_dlsym): Change type of "handle".
11658         (make_cleanup_dlclose): Remove.
11659         (dlclose_deleter::operator()): Rename from gdb_dlclose.
11660         * compile/compile-c-support.c (load_libcc): Update.
11661
11662 2017-04-12  Tom Tromey  <tom@tromey.com>
11663
11664         * symtab.h (find_pcs_for_symtab_line): Change return type.
11665         * symtab.c (find_pcs_for_symtab_line): Change return type.
11666         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11667         type of "vec".  Update.
11668         (ltpy_get_pcs_for_line): Update.
11669         * linespec.c (decode_digits_ordinary): Update.
11670
11671 2017-04-12  Tom Tromey  <tom@tromey.com>
11672
11673         * tracepoint.c (actions_command): Update.
11674         * python/python.c (python_command, python_interactive_command):
11675         Update.
11676         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11677         * guile/guile.c (guile_command): Update.
11678         * defs.h (read_command_lines, read_command_lines_1): Return
11679         command_line_up.
11680         (command_lines_deleter): New struct.
11681         (command_line_up): New typedef.
11682         * compile/compile.c (compile_code_command)
11683         (compile_print_command): Update.
11684         * cli/cli-script.h (get_command_line, copy_command_lines): Return
11685         command_line_up.
11686         (make_cleanup_free_command_lines): Remove.
11687         * cli/cli-script.c (get_command_line, read_command_lines_1)
11688         (copy_command_lines): Return command_line_up.
11689         (while_command, if_command, read_command_lines, define_command)
11690         (document_command): Update.
11691         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11692         Remove.
11693         * breakpoint.h (breakpoint_set_commands): Change type of
11694         "commands".
11695         * breakpoint.c (breakpoint_set_commands): Change type of
11696         "commands".  Update.
11697         (do_map_commands_command, update_dprintf_command_list)
11698         (create_tracepoint_from_upload): Update.
11699
11700 2017-04-12  Tom Tromey  <tom@tromey.com>
11701
11702         * tracepoint.c (scope_info): Update.
11703         * spu-tdep.c (spu_catch_start): Update.
11704         * python/python.c (gdbpy_decode_line): Update.
11705         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11706         * python/py-breakpoint.c (bppy_init): Update.
11707         * probe.c (parse_probes): Update.
11708         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11709         * location.h (event_location_deleter): New struct.
11710         (event_location_up): New typedef.
11711         (new_linespec_location, new_address_location, new_probe_location)
11712         (new_explicit_location, copy_event_location)
11713         (string_to_event_location, string_to_event_location_basic)
11714         (string_to_explicit_location): Update return type.
11715         (make_cleanup_delete_event_location): Remove.
11716         * location.c (new_linespec_location, new_address_location)
11717         (new_probe_location, new_explicit_location, copy_event_location):
11718         Return event_location_up.
11719         (delete_event_location_cleanup)
11720         (make_cleanup_delete_event_location): Remove.
11721         (string_to_explicit_location, string_to_event_location_basic)
11722         (string_to_event_location): Return event_location_up.
11723         * linespec.c (canonicalize_linespec, event_location_to_sals)
11724         (decode_line_with_current_source)
11725         (decode_line_with_last_displayed, decode_objc): Update.
11726         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11727         * completer.c (location_completer): Update.
11728         * cli/cli-cmds.c (edit_command, list_command): Update.
11729         * breakpoint.c (create_overlay_event_breakpoint)
11730         (create_longjmp_master_breakpoint)
11731         (create_std_terminate_master_breakpoint)
11732         (create_exception_master_breakpoint)
11733         (create_thread_event_breakpoint): Update.
11734         (init_breakpoint_sal): Update.  Remove some dead code.
11735         (create_breakpoint_sal): Change type of "location".  Update.
11736         (create_breakpoints_sal, create_breakpoint, break_command_1)
11737         (dprintf_command, break_range_command, until_break_command)
11738         (init_ada_exception_breakpoint)
11739         (strace_marker_create_sals_from_location)
11740         (update_static_tracepoint, trace_command, ftrace_command)
11741         (strace_command, create_tracepoint_from_upload): Update.
11742         * break-catch-throw.c (re_set_exception_catchpoint): Update.
11743         * ax-gdb.c (agent_command_1): Update.
11744
11745 2017-04-12  Pedro Alves  <palves@redhat.com>
11746
11747         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11748         * configure.tgt: Handle i[34567]86-*-go32* and
11749         i[34567]86-*-msdosdjgpp*.
11750         * i386-tdep.c (i386_svr4_reg_to_regnum):
11751         Make extern.
11752         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11753         i386-go32-tdep.c.
11754         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11755         * i386-go32-tdep.c: New file.
11756         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
11757         declarations.
11758
11759 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
11760
11761         * aix-thread.c (pd_status2str): Change return type to const char *.
11762
11763 2017-04-12  Pedro Alves  <palves@redhat.com>
11764
11765         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
11766         calls to set_gdbarch_gnu_triplet_regexp.
11767
11768 2017-04-12  Pedro Alves  <palves@redhat.com>
11769
11770         PR gdb/21323
11771         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
11772         New enum value.
11773         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
11774         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
11775         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
11776         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
11777         * gdbarch.h, gdbarch.c: Regenerate.
11778         * aarch64-tdep.c (aarch64_gdbarch_init): Override
11779         gdbarch_wchar_bit and gdbarch_wchar_signed.
11780         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
11781         * arm-tdep.c (arm_gdbarch_init): Likewise.
11782         * avr-tdep.c (avr_gdbarch_init): Likewise.
11783         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
11784         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
11785         * i386-tdep.c (i386_go32_init_abi): Likewise.
11786         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11787         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11788         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11789         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11790         * sh-tdep.c (sh_gdbarch_init): Likewise.
11791         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11792         * sparc64-tdep.c (sparc64_init_abi): Likewise.
11793         * windows-tdep.c (windows_init_abi): Likewise.
11794         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11795
11796 2017-04-12  Pedro Alves  <palves@redhat.com>
11797
11798         PR c++/21323
11799         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
11800         cplus_primitive_type_char32_t>: New enum values.
11801         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
11802         and cplus_primitive_type_char32_t.
11803         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
11804         32, use the archtecture's built-in type for char16_t and char32_t,
11805         respectively.  Otherwise, fallback to init_integer_type as before,
11806         but make the type unsigned, and issue a complaint.
11807         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
11808
11809 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
11810
11811         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
11812         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
11813
11814 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11815
11816         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
11817         'const char *'.
11818
11819 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11820
11821         * common/common-utils.c (free_vector_argv): New function.
11822         * common/common-utils.h: Include <vector>.
11823         (free_vector_argv): New prototype.
11824         * darwin-nat.c (darwin_create_inferior): Rewrite function
11825         prototype in order to constify "exec_file" and accept a
11826         "std::string" for "allargs".
11827         * fork-child.c: Include <vector>.
11828         (breakup_args): Rewrite function, using C++.
11829         (fork_inferior): Rewrite function header, constify "exec_file_arg"
11830         and accept "std::string" for "allargs".  Update the code to
11831         calculate "argv" based on "allargs".  Update calls to "exec_fun"
11832         and "execvp".
11833         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
11834         order to constify "exec_file" and accept a "std::string" for
11835         "allargs".
11836         * go32-nat.c (go32_create_inferior): Likewise.
11837         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
11838         * infcmd.c (run_command_1): Constify "exec_file".  Use
11839         "std::string" for inferior arguments.
11840         * inferior.h (fork_inferior): Update prototype.
11841         * linux-nat.c (linux_nat_create_inferior): Rewrite function
11842         prototype in order to constify "exec_file" and accept a
11843         "std::string" for "allargs".
11844         * nto-procfs.c (procfs_create_inferior): Likewise.
11845         * procfs.c (procfs_create_inferior): Likewise.
11846         * remote-sim.c (gdbsim_create_inferior): Likewise.
11847         * remote.c (extended_remote_run): Update code to accept
11848         "std::string" as argument.
11849         (extended_remote_create_inferior): Rewrite function prototype in
11850         order to constify "exec_file" and accept a "std::string" for
11851         "allargs".
11852         * rs6000-nat.c (super_create_inferior): Likewise.
11853         (rs6000_create_inferior): Likewise.
11854         * target.h (struct target_ops) <to_create_inferior>: Likewise.
11855         * windows-nat.c (windows_create_inferior): Likewise.
11856
11857 2017-04-11  Pedro Alves  <palves@redhat.com>
11858
11859         * thread.c: Fix whitespace throughout.
11860
11861 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11862
11863         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
11864
11865 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
11866
11867         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
11868
11869 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
11870
11871         PR gdb/21364
11872         * osdata.c (info_osdata): Check if 'type' is an empty string
11873         instead of NULL.
11874
11875 2017-04-10  Pedro Alves  <palves@redhat.com>
11876
11877         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
11878         (ptid_to_global_thread_id, in_thread_list)
11879         (do_captured_list_thread_ids, set_resumed, set_running)
11880         (set_executing, set_stop_requested, finish_thread_state)
11881         (validate_registers_access, can_access_registers_ptid)
11882         (print_thread_info_1, switch_to_thread)
11883         (do_restore_current_thread_cleanup)
11884         (make_cleanup_restore_current_thread, thread_command)
11885         (thread_name_command): Use operator== instead of ptid_equal.
11886
11887 2017-04-10  Pedro Alves  <palves@redhat.com>
11888
11889         * thread.c (struct current_thread_cleanup) <next>: Delete field.
11890         (current_thread_cleanup_chain): Delete.
11891         (restore_current_thread_cleanup_dtor)
11892         (make_cleanup_restore_current_thread): Remove references to
11893         current_thread_cleanup_chain.
11894
11895 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
11896
11897         * msp430-tdep.c (msp430_pseudo_register_read): Never return
11898         REG_UNKNOWN.
11899
11900 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11901
11902         PR gdb/19942
11903         * gdbthread.h (thread_info::deletable): New method.
11904         (thread_info::incref): New method.
11905         (thread_info::decref): New method.
11906         (thread_info::refcount): Move it to private.
11907         * infrun.c (save_stop_context): Call inc_refcount.
11908         (release_stop_context_cleanup): Likewise.
11909         * thread.c (set_thread_exited): New function.
11910         (init_thread_list): Delete "tp" only it is deletable, otherwise
11911         call set_thread_exited.
11912         (delete_thread_1): Call set_thread_exited.
11913         (current_thread_cleanup) <inferior_pid>: Remove.
11914         <thread>: New field.
11915         (restore_current_thread_ptid_changed): Removed.
11916         (do_restore_current_thread_cleanup): Adjust.
11917         (restore_current_thread_cleanup_dtor): Don't call
11918         find_thread_ptid.
11919         (set_thread_refcount): Use dec_refcount.
11920         (make_cleanup_restore_current_thread): Adjust.
11921         (thread_apply_all_command): Call inc_refcount.
11922         (_initialize_thread): Don't call
11923         observer_attach_thread_ptid_changed.
11924
11925 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11926
11927         * thread.c (delete_thread_1): Hoist code on marking thread as
11928         exited.
11929
11930 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11931
11932         * windows-nat.c (windows_detach): Initialize ptid with
11933         minus_one_ptid.
11934
11935 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11936
11937         * unittests/ptid-selftests.c: Fix erroneous assert messages.
11938
11939 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
11940
11941         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
11942         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
11943         (bfin_pseudo_register_write): Likewise
11944
11945 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
11946
11947         * common/ptid.h (struct ptid): Change to...
11948         (class ptid_t): ... this.
11949         <ptid_t>: New constructors.
11950         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
11951         matches>: New methods.
11952         <make_null, make_minus_one>: New static methods.
11953         <pid>: Rename to...
11954         <m_pid>: ...this.
11955         <lwp>: Rename to...
11956         <m_lwp>: ...this.
11957         <tid>: Rename to...
11958         <m_tid>: ...this.
11959         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
11960         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
11961         as references, move comment to class ptid_t.
11962         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
11963         ptid_t static methods.
11964         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
11965         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
11966         Take ptid arguments as references, implement using ptid_t methods.
11967         * unittests/ptid-selftests.c: New file.
11968         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11969         unittests/ptid-selftests.c.
11970         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
11971
11972 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
11973
11974         * python/python.c (python_run_simple_file): Cast mode literal to
11975         non-const char pointer as expected by PyFile_FromString.
11976
11977 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
11978
11979         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
11980         minus_one_ptid and null_ptid.
11981
11982 2017-04-05  Pedro Alves  <palves@redhat.com>
11983
11984         * warning.m4 (build_warnings): Remove -Wno-write-strings.
11985         * configure: Regenerate.
11986
11987 2017-04-05  Pedro Alves  <palves@redhat.com>
11988
11989         * ada-exp.y (yyerror): Constify.
11990         * ada-lang.c (bound_name, get_selections)
11991         (ada_variant_discrim_type)
11992         (ada_variant_discrim_name, ada_value_struct_elt)
11993         (ada_lookup_struct_elt_type, is_unchecked_variant)
11994         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
11995         (catch_ada_exception_command_split)
11996         (catch_ada_assert_command_split, catch_assert_command)
11997         (ada_op_name): Constify.
11998         * ada-lang.h (ada_yyerror, get_selections)
11999         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12000         * arc-tdep.c (arc_print_frame_cache): Constify.
12001         * arm-tdep.c (arm_skip_stub): Constify.
12002         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12003         (gen_aggregate_elt_ref): Constify.
12004         * bcache.c (print_bcache_statistics): Constify.
12005         * bcache.h (print_bcache_statistics): Constify.
12006         * break-catch-throw.c (catch_exception_command_1):
12007         * breakpoint.c (struct ep_type_description::description):
12008         Constify.
12009         (add_solib_catchpoint): Constify.
12010         (catch_fork_command_1): Add cast.
12011         (add_catch_command): Constify.
12012         * breakpoint.h (add_catch_command, add_solib_catchpoint):
12013         Constify.
12014         * bsd-uthread.c (bsd_uthread_state): Constify.
12015         * buildsym.c (patch_subfile_names): Constify.
12016         * buildsym.h (next_symbol_text_func, patch_subfile_names):
12017         Constify.
12018         * c-exp.y (yyerror): Constify.
12019         (token::oper): Constify.
12020         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12021         * c-varobj.c (cplus_describe_child): Constify.
12022         * charset.c (find_charset_names): Add cast.
12023         (find_charset_names): Constify array and add const_cast.
12024         * cli/cli-cmds.c (complete_command, cd_command): Constify.
12025         (edit_command): Constify.
12026         * cli/cli-decode.c (lookup_cmd): Constify.
12027         * cli/cli-dump.c (dump_memory_command, dump_value_command):
12028         Constify.
12029         (struct dump_context): Constify.
12030         (add_dump_command, restore_command): Constify.
12031         * cli/cli-script.c (get_command_line): Constify.
12032         * cli/cli-script.h (get_command_line): Constify.
12033         * cli/cli-utils.c (check_for_argument): Constify.
12034         * cli/cli-utils.h (check_for_argument): Constify.
12035         * coff-pe-read.c (struct read_pe_section_data): Constify.
12036         * command.h (lookup_cmd): Constify.
12037         * common/print-utils.c (decimal2str): Constify.
12038         * completer.c (gdb_print_filename): Constify.
12039         * corefile.c (set_gnutarget): Constify.
12040         * cp-name-parser.y (yyerror): Constify.
12041         * cp-valprint.c (cp_print_class_member): Constify.
12042         * cris-tdep.c (cris_register_name, crisv32_register_name):
12043         Constify.
12044         * d-exp.y (yyerror): Constify.
12045         (struct token::oper): Constify.
12046         * d-lang.h (d_yyerror): Constify.
12047         * dbxread.c (struct header_file_location::name): Constify.
12048         (add_old_header_file, add_new_header_file, last_function_name)
12049         (dbx_next_symbol_text, add_bincl_to_list)
12050         (find_corresponding_bincl_psymtab, set_namestring)
12051         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12052         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12053         * defs.h (command_line_input, print_address_symbolic)
12054         (deprecated_readline_begin_hook): Constify.
12055         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12056         Constify.
12057         * event-top.c (handle_line_of_input): Constify and add cast.
12058         * exceptions.c (catch_errors): Constify.
12059         * exceptions.h (catch_errors): Constify.
12060         * expprint.c (print_subexp_standard, op_string, op_name)
12061         (op_name_standard, dump_raw_expression, dump_raw_expression):
12062         * expression.h (op_name, op_string, dump_raw_expression):
12063         Constify.
12064         * f-exp.y (yyerror): Constify.
12065         (struct token::oper): Constify.
12066         (struct f77_boolean_val::name): Constify.
12067         * f-lang.c (f_word_break_characters): Constify.
12068         * f-lang.h (f_yyerror): Constify.
12069         * fork-child.c (fork_inferior): Add cast.
12070         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12071         (new_variant): Constify.
12072         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12073         * gdbarch.c: Regenerate.
12074         * gdbcore.h (set_gnutarget): Constify.
12075         * go-exp.y (yyerror): Constify.
12076         (token::oper): Constify.
12077         * go-lang.h (go_yyerror): Constify.
12078         * go32-nat.c (go32_sysinfo): Constify.
12079         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12080         * guile/scm-cmd.c (cmdscm_function): Constify.
12081         * guile/scm-param.c (pascm_param_value): Constify.
12082         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12083         (h8300sx_register_name): Constify.
12084         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12085         Constify.
12086         * ia64-tdep.c (ia64_register_names): Constify.
12087         * infcmd.c (construct_inferior_arguments): Constify.
12088         (path_command, attach_post_wait): Constify.
12089         * language.c (show_range_command, show_case_command)
12090         (unk_lang_error): Constify.
12091         * language.h (language_defn::la_error)
12092         (language_defn::la_name_of_this): Constify.
12093         * linespec.c (decode_line_2): Constify.
12094         * linux-thread-db.c (thread_db_err_str): Constify.
12095         * lm32-tdep.c (lm32_register_name): Constify.
12096         * m2-exp.y (yyerror): Constify.
12097         * m2-lang.h (m2_yyerror): Constify.
12098         * m32r-tdep.c (m32r_register_names): Constify and make static.
12099         * m68hc11-tdep.c (m68hc11_register_names): Constify.
12100         * m88k-tdep.c (m88k_register_name): Constify.
12101         * macroexp.c (appendmem): Constify.
12102         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12103         (upgrade_type, parse_external, parse_partial_symbols)
12104         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12105         (new_symbol): Constify.
12106         * memattr.c (mem_info_command): Constify.
12107         * mep-tdep.c (register_name_from_keyword): Constify.
12108         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12109         Constify.
12110         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12111         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12112         * mi/mi-main.c (captured_mi_execute_command): Constify and add
12113         cast.
12114         (mi_execute_async_cli_command): Constify.
12115         * mips-tdep.c (mips_register_name): Constify.
12116         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12117         (am33_register_name, am33_2_register_name)
12118         * moxie-tdep.c (moxie_register_names): Constify.
12119         * nat/linux-osdata.c (osdata_type): Constify fields.
12120         * nto-tdep.c (nto_parse_redirection): Constify.
12121         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12122         (lookup_child_selector): Constify.
12123         (objc_methcall::name): Constify.
12124         * objc-lang.h (lookup_objc_class, lookup_child_selector)
12125         (lookup_struct_typedef): Constify.
12126         * objfiles.c (pc_in_section): Constify.
12127         * objfiles.h (pc_in_section): Constify.
12128         * p-exp.y (struct token::oper): Constify.
12129         (yyerror): Constify.
12130         * p-lang.h (pascal_yyerror): Constify.
12131         * parser-defs.h (op_name_standard): Constify.
12132         (op_print::string): Constify.
12133         (exp_descriptor::op_name): Constify.
12134         * printcmd.c (print_address_symbolic): Constify.
12135         * psymtab.c (print_partial_symbols): Constify.
12136         * python/py-breakpoint.c (stop_func): Constify.
12137         (bppy_get_expression): Constify.
12138         * python/py-cmd.c (cmdpy_completer::name): Constify.
12139         (cmdpy_function): Constify.
12140         * python/py-event.c (evpy_add_attribute)
12141         (gdbpy_initialize_event_generic): Constify.
12142         * python/py-event.h (evpy_add_attribute)
12143         (gdbpy_initialize_event_generic): Constify.
12144         * python/py-evts.c (add_new_registry): Constify.
12145         * python/py-finishbreakpoint.c (outofscope_func): Constify.
12146         * python/py-framefilter.c (get_py_iter_from_func): Constify.
12147         * python/py-inferior.c (get_buffer): Add cast.
12148         * python/py-param.c (parm_constant::name): Constify.
12149         * python/py-unwind.c (fprint_frame_id): Constify.
12150         * python/python.c (gdbpy_parameter_value): Constify.
12151         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12152         * remote.c (memory_packet_config::name): Constify.
12153         (show_packet_config_cmd, remote_write_bytes)
12154         (remote_buffer_add_string):
12155         * reverse.c (exec_reverse_once): Constify.
12156         * rs6000-tdep.c (variant::name, variant::description): Constify.
12157         * rust-exp.y (rustyyerror): Constify.
12158         * rust-lang.c (rust_op_name): Constify.
12159         * rust-lang.h (rustyyerror): Constify.
12160         * serial.h (serial_ops::name): Constify.
12161         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12162         (sh_sh3e_register_name, sh_sh2e_register_name)
12163         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12164         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12165         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12166         (sh_sh4al_dsp_register_name): Constify.
12167         * sh64-tdep.c (sh64_register_name): Constify.
12168         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12169         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12170         * stabsread.c (patch_block_stabs, read_type_number)
12171         (ref_map::stabs, ref_add, process_reference)
12172         (symbol_reference_defined, define_symbol, define_symbol)
12173         (error_type, read_type, read_member_functions, read_cpp_abbrev)
12174         (read_one_struct_field, read_struct_fields, read_baseclasses)
12175         (read_tilde_fields, read_struct_type, read_array_type)
12176         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12177         (read_huge_number, read_range_type, read_args, common_block_start)
12178         (find_name_end): Constify.
12179         * stabsread.h (common_block_start, define_symbol)
12180         (process_one_symbol, symbol_reference_defined, ref_add):
12181         * symfile.c (get_section_index, add_symbol_file_command):
12182         * symfile.h (get_section_index): Constify.
12183         * target-descriptions.c (tdesc_type::name): Constify.
12184         (tdesc_free_type): Add cast.
12185         * target.c (find_default_run_target):
12186         (add_deprecated_target_alias, find_default_run_target)
12187         (target_announce_detach): Constify.
12188         (do_option): Constify.
12189         * target.h (add_deprecated_target_alias): Constify.
12190         * thread.c (print_thread_info_1): Constify.
12191         * top.c (deprecated_readline_begin_hook, command_line_input):
12192         Constify.
12193         (init_main): Add casts.
12194         * top.h (handle_line_of_input): Constify.
12195         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12196         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12197         (tfind_command): Rename to ...
12198         (tfind_command_1): ... this and constify.
12199         (tfind_command): New function.
12200         (tfind_end_command, tfind_start_command): Adjust.
12201         (encode_source_string): Constify.
12202         * tracepoint.h (encode_source_string): Constify.
12203         * tui/tui-data.c (tui_partial_win_by_name): Constify.
12204         * tui/tui-data.h (tui_partial_win_by_name): Constify.
12205         * tui/tui-source.c (tui_set_source_content_nil): Constify.
12206         * tui/tui-source.h (tui_set_source_content_nil): Constify.
12207         * tui/tui-win.c (parse_scrolling_args): Constify.
12208         * tui/tui-windata.c (tui_erase_data_content): Constify.
12209         * tui/tui-windata.h (tui_erase_data_content): Constify.
12210         * tui/tui-winsource.c (tui_erase_source_content): Constify.
12211         * tui/tui.c (tui_enable): Add cast.
12212         * utils.c (defaulted_query): Constify.
12213         (init_page_info): Add cast.
12214         (puts_debug, subset_compare): Constify.
12215         * utils.h (subset_compare): Constify.
12216         * varobj.c (varobj_format_string): Constify.
12217         * varobj.h (varobj_format_string): Constify.
12218         * vax-tdep.c (vax_register_name): Constify.
12219         * windows-nat.c (windows_detach): Constify.
12220         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12221         * xml-support.c (gdb_xml_end_element): Constify.
12222         * xml-tdesc.c (tdesc_start_reg): Constify.
12223         * xstormy16-tdep.c (xstormy16_register_name): Constify.
12224         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12225         * xtensa-tdep.h (xtensa_register_t::name): Constify.
12226
12227 2017-04-05  Pedro Alves  <palves@redhat.com>
12228
12229         * proc-api.c (struct trans): Constify.
12230         (procfs_note): Constify.
12231         * proc-events.c (struct trans, syscall_table):
12232         * proc-flags.c (struct trans): Constify.
12233         * proc-utils.h (procfs_note): Constify.
12234         * proc-why.c (struct trans): Constify.
12235         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12236         (procfs_detach): Constify.
12237         * sol-thread.c (struct string_map): Constify.
12238         (td_err_string, td_state_string): Constify.
12239
12240 2017-04-05  Pedro Alves  <palves@redhat.com>
12241
12242         * proc-api.c (procfs_filename): Don't initialize
12243         procfs_filename.
12244         (prepare_to_trace): Assume procfs_filename is non-NULL.
12245         (_initialize_proc_api): Give procfs_filename a default value here.
12246
12247 2017-04-05  Pedro Alves  <palves@redhat.com>
12248
12249         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12250         'cond_string' parameter.
12251         (extract_exception_regexp): Constify 'string' parameter.
12252         (catch_exception_command_1): Constify.
12253         * breakpoint.c (init_catchpoint)
12254         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12255         parameter.
12256         (ep_parse_optional_if_clause, catch_fork_command_1)
12257         (catch_exec_command_1): Constify.
12258         * breakpoint.h (init_catchpoint): Constify 'cond_string'
12259         parameter.
12260         (ep_parse_optional_if_clause): Constify.
12261         * cli/cli-utils.c (remove_trailing_whitespace)
12262         (check_for_argument): Constify.
12263         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12264         non-const overload.
12265         (check_for_argument): Likewise.
12266
12267 2017-04-05  Pedro Alves  <palves@redhat.com>
12268
12269         * event-top.c (command_line_handler): Add cast to execute_command
12270         call.
12271         * record-btrace.c (cmd_record_btrace_bts_start)
12272         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12273         (cmd_record_btrace_start): Add cast to execute_command call.
12274         * record-full.c (record_full_goto_insn):
12275         * record.c (record_start, record_stop): Add cast to
12276         execute_command_to_string calls.
12277         (cmd_record_start): Add cast to execute_command calls.
12278
12279 2017-04-05  Pedro Alves  <palves@redhat.com>
12280
12281         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12282         static inline function.
12283         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12284         array and use gdb_PyArg_ParseTupleAndKeywords.
12285         * python/py-cmd.c (cmdpy_init): Likewise.
12286         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12287         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12288         (infpy_search_memory): Likewise.
12289         * python/py-objfile.c (objfpy_add_separate_debug_file)
12290         (gdbpy_lookup_objfile): Likewise.
12291         * python/py-symbol.c (gdbpy_lookup_symbol)
12292         (gdbpy_lookup_global_symbol): Likewise.
12293         * python/py-type.c (gdbpy_lookup_type): Likewise.
12294         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12295         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12296         Likewise.
12297
12298 2017-04-05  Pedro Alves  <palves@redhat.com>
12299
12300         * python/python-internal.h (gdb_PyGetSetDef): New type.
12301         * python/py-block.c (block_object_getset)
12302         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12303         * python/py-event.c (event_object_getset)
12304         (finish_breakpoint_object_getset): Likewise.
12305         * python/py-inferior.c (inferior_object_getset): Likewise.
12306         * python/py-infthread.c (thread_object_getset): Likewise.
12307         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12308         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12309         * python/py-objfile.c (objfile_getset): Likewise.
12310         * python/py-progspace.c (pspace_getset): Likewise.
12311         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12312         Likewise.
12313         * python/py-record.c (recpy_record_getset): Likewise.
12314         * python/py-symbol.c (symbol_object_getset): Likewise.
12315         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12316         Likewise.
12317         * python/py-type.c (type_object_getset, field_object_getset):
12318         Likewise.
12319         * python/py-value.c (value_object_getset): Likewise.
12320
12321 2017-04-05  Pedro Alves  <palves@redhat.com>
12322
12323         * python/python-internal.h (gdb_PyObject_CallMethod)
12324         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12325         New functions.
12326         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12327         (PySys_GetObject, PySys_SetPath): New macros.
12328
12329 2017-04-05  Pedro Alves  <palves@redhat.com>
12330
12331         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12332         info_osdata_command.
12333         * osdata.c (info_osdata_command): Rename to ...
12334         (info_osdata): ... this.  Constify 'type' parameter, and remove
12335         the 'from_tty' parameter.  Accept NULL TYPE.
12336         (info_osdata_command): New function.
12337         * osdata.h (info_osdata_command): Remove declaration.
12338         (info_osdata): New declaration.
12339
12340 2017-04-05  Pedro Alves  <palves@redhat.com>
12341
12342         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12343         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12344         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12345         parameter.
12346         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12347         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12348         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12349         parameter.
12350         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12351         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12352         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12353         (mi_cmd_file_list_exec_source_files)
12354         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12355         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12356         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12357         parameter.
12358         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12359         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12360         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12361         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12362         (mi_cmd_stack_info_frame): Constify 'command' parameter.
12363         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12364         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12365         'command' parameter.
12366         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12367         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12368         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12369         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12370         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12371         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12372         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12373         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12374         (mi_cmd_var_set_update_range): Constify 'command' parameter.
12375         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12376         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12377         parameter.
12378         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12379         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12380         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12381         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12382         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12383         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12384         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12385         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12386         (mi_cmd_data_list_changed_registers)
12387         (mi_cmd_data_write_register_values)
12388         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12389         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12390         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12391         (mi_cmd_list_features, mi_cmd_list_target_features)
12392         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12393         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12394         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12395         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12396         (mi_cmd_trace_frame_collected): Constify 'command'
12397         parameter.
12398         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12399         'command' parameter.
12400
12401 2017-04-05  Pedro Alves  <palves@redhat.com>
12402
12403         * ada-lang.c (ada_completer_word_break_characters): Now a const
12404         array.
12405         (ada_get_gdb_completer_word_break_characters): Constify.
12406         * completer.c (gdb_completer_command_word_break_characters)
12407         (gdb_completer_file_name_break_characters)
12408         (gdb_completer_quote_characters): Now const arrays.
12409         (get_gdb_completer_quote_characters): Constify.
12410         (set_rl_completer_word_break_characters): New function.
12411         (set_gdb_completion_word_break_characters)
12412         (complete_line_internal): Use it.
12413         * completer.h (get_gdb_completer_quote_characters): Constify.
12414         (set_rl_completer_word_break_characters): Declare.
12415         * f-lang.c (f_word_break_characters): Constify.
12416         * language.c (default_word_break_characters): Constify.
12417         * language.h (language_defn::la_word_break_characters): Constify.
12418         (default_word_break_characters): Constify.
12419         * top.c (init_main): Use set_rl_completer_word_break_characters.
12420
12421 2017-04-05  Pedro Alves  <palves@redhat.com>
12422
12423         * aix-thread.c (aix_thread_pid_to_str)
12424         (aix_thread_extra_thread_info): Constify.
12425         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12426         * bsd-uthread.c (bsd_uthread_extra_thread_info)
12427         (bsd_uthread_pid_to_str): Constify.
12428         * corelow.c (core_pid_to_str): Constify.
12429         * darwin-nat.c (darwin_pid_to_str): Constify.
12430         * fbsd-nat.c (fbsd_pid_to_str): Constify.
12431         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12432         Constify.
12433         * gnu-nat.c (gnu_pid_to_str): Constify.
12434         * go32-nat.c (go32_pid_to_str): Constify.
12435         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12436         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12437         * inferior.c (inferior_pid_to_str): Constify.
12438         * linux-nat.c (linux_nat_pid_to_str): Constify.
12439         * linux-tdep.c (linux_core_pid_to_str): Constify.
12440         * linux-thread-db.c (thread_db_pid_to_str)
12441         (thread_db_extra_thread_info): Constify.
12442         * nto-tdep.c (nto_extra_thread_info): Constify.
12443         * nto-tdep.h (nto_extra_thread_info): Constify.
12444         * obsd-nat.c (obsd_pid_to_str): Constify.
12445         * procfs.c (procfs_pid_to_str): Constify.
12446         * ravenscar-thread.c (ravenscar_extra_thread_info)
12447         (ravenscar_pid_to_str): Constify.
12448         * remote-sim.c (gdbsim_pid_to_str): Constify.
12449         * remote.c (remote_threads_extra_info, remote_pid_to_str):
12450         Constify.
12451         * sol-thread.c (solaris_pid_to_str): Constify.
12452         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12453         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12454         * target.c (default_pid_to_str, target_pid_to_str)
12455         (normal_pid_to_str, default_pid_to_str): Constify.
12456         * target.h (target_ops::to_pid_to_str)
12457         (target_ops::to_extra_thread_info): Constify.
12458         (target_pid_to_str, normal_pid_to_str): Constify.
12459         * windows-nat.c (windows_pid_to_str): Constify.
12460         * gdbarch.sh (core_pid_to_str): Constify.
12461         * target-delegates.c: Regenerate.
12462         * gdbarch.h, gdbarch.c: Regenerate.
12463
12464 2017-04-05  Pedro Alves  <palves@redhat.com>
12465
12466         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12467         the memory of the temporary warning_pre_print override.
12468         * utils.c (warning_pre_print): Constify.
12469         * utils.h (warning_pre_print): Constify.
12470
12471 2017-04-05  Pedro Alves  <palves@redhat.com>
12472
12473         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12474         (shell_command): New function.
12475         (make_command): Use std::string.
12476         (init_cli_cmds): Register shell_command instead of shell_escape.
12477
12478 2017-04-05  Pedro Alves  <palves@redhat.com>
12479
12480         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12481         * tracepoint.c (default_collect): Don't initialize.
12482
12483 2017-04-05  Pedro Alves  <palves@redhat.com>
12484
12485         * macroexp.c (macro_buffer::shared): Now a bool.
12486         (init_buffer): Update.
12487         (init_shared_buffer): Constify 'addr' parameter.
12488         (substitute_args, expand, macro_expand, macro_expand_next): Remove
12489         casts.
12490
12491 2017-04-05  Pedro Alves  <palves@redhat.com>
12492
12493         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12494         * disasm.c (set_disassembler_options): Constify local.
12495         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12496
12497 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
12498
12499         PR gdb/21352
12500         * tracefile.c (tsave_command): Fix argument parsing for '-r'
12501         option.
12502
12503 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12504
12505         * frame.c (frame_unwind_register_unsigned): Call
12506         frame_unwind_register_value.
12507
12508 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12509
12510         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12511         Use gdb_test_multiple, and don't match anchor.
12512
12513 2017-04-05  Pedro Alves  <palves@redhat.com>
12514
12515         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12516         (Write After Approval): Remove Simon Marchi.
12517
12518 2017-04-05  Pedro Alves  <palves@redhat.com>
12519
12520         * common/gdb_optional.h (optional::optional): Make constexpr and
12521         initialize m_dummy.
12522
12523 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12524
12525         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12526         (amd64fbsd_jmp_buf_reg_offset): Remove.
12527         (amd64fbsd_supply_uthread): Remove function.
12528         (amd64fbsd_collect_uthread): Remove function.
12529         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12530         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12531         (x86_64-*-freebsd*): Remove bsd-uthread.o.
12532         (fbsd-nat.c): Update comment.
12533         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12534         (i386fbsd_jmp_buf_reg_offset): Remove.
12535         (i386fbsd_supply_uthread): Remove function.
12536         (i386fbsd_collect_uthread): Remove function.
12537         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12538
12539 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12540
12541         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12542         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12543         * NEWS: Mention that support for FreeBSD/alpha was removed.
12544         * alpha-fbsd-tdep.c: Delete file.
12545         * config/alpha/fbsd.mh: Delete file.
12546         * configure.host: Delete alpha*-*-freebsd* and
12547         alpha*-*-kfreebsd*-gnu.
12548         * configure.tgt: Delete alpha*-*-freebsd* and
12549         alpha*-*-kfreebsd*-gnu.
12550
12551 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12552
12553         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12554         amd64bsd_store_inferior_registers): Use ptid from regcache.
12555
12556 2017-04-04  Pedro Alves  <palves@redhat.com>
12557
12558         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
12559         data fields, make them private and add "m_" prefixes.
12560         (lnp_state_machine::lnp_state_machine): New ctor.
12561         (record_line, check_line_address, handle_set_discriminator)
12562         (handle_set_address, handle_advance_pc, handle_special_opcode)
12563         (handle_advance_line, handle_set_file, handle_negate_stmt)
12564         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12565         (end_sequence, advance_line): New methods.
12566         (m_gdbarch, m_record_lines_p): New fields.
12567         (lnp_reader_state): Delete.
12568         (dwarf_record_line): Rename to ...
12569         (lnp_state_machine::record_line): ... adjust.
12570         (init_lnp_state_machine): Delete.
12571         (lnp_state_machine::lnp_state_machine): New.
12572         (check_line_address): Rename to ...
12573         (lnp_state_machine::check_line_address): This.
12574         (dwarf_decode_lines_1): Remove reference to "reader_state".
12575         Adjust lnp_state_machine having a non-default ctor.  Use bool.
12576         State machine internal state manipulation moved to
12577         lnp_state_machine methods.
12578
12579 2017-04-04  Pedro Alves  <palves@redhat.com>
12580
12581         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12582         unittests/offset-type-selftests.c.
12583         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12584         * common/offset-type.h: New file.
12585         * common/preprocessor.h: New file.
12586         * common/traits.h: New file.
12587         * common/valid-expr.h: New file.
12588         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
12589         sect_offset and cu_offset strong typedefs throughout.
12590         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12591         typedefs throughout.
12592         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
12593         sect_offset and cu_offset strong typedefs throughout.
12594         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12595         typedefs throughout.
12596         * gdbtypes.h: Include "common/offset-type.h".
12597         (cu_offset): Now an offset type (strong typedef) instead of a
12598         struct.
12599         (sect_offset): Likewise.
12600         (union call_site_parameter_u): Rename "param_offset" field to
12601         "param_cu_off".
12602         * unittests/offset-type-selftests.c: New file.
12603
12604 2017-04-04  Pedro Alves  <palves@redhat.com>
12605
12606         * common/underlying.h: New file.
12607         * dwarf2read.c: Include "common/gdb_optional.h" and
12608         "common/underlying.h".
12609         (dir_index, file_name_index): New types.
12610         (file_entry): Use them.
12611         (file_entry::include): Use to_underlying.
12612         (line_header::add_file_name): Use dir_index.
12613         (read_formatted_entries): Use gdb::optional.  Read form before
12614         writting to file_entry.
12615         (dwarf_decode_line_header): Use dir_index.
12616         (lnp_state_machine::current_file): Use to_underlying.
12617         (lnp_state_machine::file): Change type to file_name_index.
12618         (dwarf_record_line): Use to_underlying.
12619         (init_lnp_state_machine): Use file_name_index.
12620         (dwarf_decode_lines_1): Use dir_index and file_name_index.
12621
12622 2017-04-04  Pedro Alves  <palves@redhat.com>
12623
12624         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12625         operator bool, has_value and get methods.
12626
12627 2017-04-04  Pedro Alves  <palves@redhat.com>
12628
12629         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12630         fields.
12631         (line_header): Initialize all data fields.  Change type of
12632         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12633         Change type of include_dirs to std::vector<const char *>.  Remove
12634         num_include_dirs, include_dirs_size.  Change type of file_names to
12635         std::vector<file_entry>.  Remove num_file_names, file_names_size.
12636         (line_header::line_header): New.
12637         (line_header::add_include_dir, line_header::add_file_name): New
12638         methods.
12639         (line_header::include_dir_at): Remove NULL check.
12640         (line_header::file_name_at): Add const overload.
12641         (line_header_up): New unique_ptr typedef.
12642         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
12643         std::vector.  Remove free_line_header call.
12644         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
12645         free_line_header call.
12646         (free_cu_line_header): Delete.
12647         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12648         (setup_type_unit_groups): Use line_header_up instead of cleanups.
12649         Adjust to use std::vector.
12650         (free_line_header): Delete.
12651         (free_line_header_voidp): Use delete.
12652         (add_include_dir): Replace with ...
12653         (line_header::add_include_dir): ... this method.  Use std::vector.
12654         (add_file_name): Replace with ...
12655         (line_header::add_file_name): ... this method.  Use std::vector.
12656         (add_include_dir_stub): Delete.
12657         (read_formatted_entries): Remove memset.
12658         (dwarf_decode_line_header): Return a line_header_up instead of a
12659         raw pointer.  Remove cleanup handling.  Pass lambdas to
12660         read_formatted_entries.  Adjust to use line_header methods.
12661         (dwarf_decode_lines_1): Adjust to use line_header methods.
12662         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12663         use std::vector.
12664
12665 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
12666
12667         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12668         instead of struct ptid.
12669
12670 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
12671
12672         * frame.c (get_frame_register_bytes): Unwind using value.
12673         (put_frame_register_bytes): Likewise.
12674
12675 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
12676
12677         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12678         aggregate-like.
12679
12680 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
12681
12682         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12683
12684 2017-03-29  Yao Qi  <yao.qi@linaro.org>
12685
12686         * gdbthread.h (struct thread_info): Declare constructor and
12687         destructor.  Add some in-class member initializers.
12688         * thread.c (free_thread): Remove.
12689         (init_thread_list): Call delete instead of free_thread.
12690         (new_thread): Call thread_info constructor.
12691         (thread_info::thread_info): New function.
12692         (thread_info::~thread_info): New function.
12693         (delete_thread_1): Call delete instead of free_thread.
12694         (make_cleanup_restore_current_thread): Move tp and frame to
12695         inner block.
12696
12697 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12698
12699         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12700         (arc_skip_prologue): Likewise.
12701         (arc_make_frame_cache): Likewise.
12702         (arc_pv_get_operand): New function.
12703         (arc_is_in_prologue): Likewise.
12704         (arc_analyze_prologue): Likewise.
12705         (arc_print_frame_cache): Likewise.
12706         (MAX_PROLOGUE_LENGTH): New constant.
12707
12708 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12709
12710         * configure.tgt: Add arc-insn.o.
12711         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12712         (dump_arc_instruction_command): New function.
12713         (arc_fprintf_disasm): Likewise.
12714         (arc_disassemble_info): Likewise.
12715         (arc_insn_get_operand_value): Likewise.
12716         (arc_insn_get_operand_value_signed): Likewise.
12717         (arc_insn_get_memory_base_reg): Likewise.
12718         (arc_insn_get_memory_offset): Likewise.
12719         (arc_insn_get_branch_target): Likewise.
12720         (arc_insn_dump): Likewise.
12721         (arc_insn_get_linear_next_pc): Likewise.
12722         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12723         (arc_disassemble_info): Likewise.
12724         (arc_insn_get_branch_target): Likewise.
12725         (arc_insn_get_linear_next_pc): Likewise.
12726         * NEWS: Mention new "maint print arc arc-instruction".
12727
12728 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12729
12730         * arc-tdep (maintenance_print_arc_list): New variable.
12731         (maintenance_print_arc_command): New function.
12732
12733 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12734
12735         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12736         Add "limm" and "reserved".
12737         (arc_cannot_fetch_register, arc_cannot_store_register): Add
12738         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12739         * arc-tdep.h (arc_regnum): Likewise.
12740
12741 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12742
12743         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12744         for THREADPTR register.
12745         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12746         register.
12747         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12748         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12749         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12750
12751 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12752
12753         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12754         registers above gdbarch_num_regs (gdbarch) as privileged in
12755         call0 ABI.
12756
12757 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12758
12759         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12760         for a single specified register or for all registers in
12761         a0_base..a0_base + C0_NREGS range.
12762         (supply_gregset_reg): Call regcache_raw_supply for a single
12763         specified register or for all registers in a0_base..a0_base +
12764         C0_NREGS range.
12765
12766 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12767
12768         * arch/xtensa.h (C0_NREGS): Add definition.
12769         * xtensa-tdep.c (C0_NREGS): Remove definition.
12770
12771 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12772
12773         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
12774         Drop xtensa_default_isa initialization.
12775         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
12776
12777 2017-03-27  Pedro Alves  <palves@redhat.com>
12778
12779         * dwarf2read.c (file_entry) <dir_index>: Add comment.
12780         (file_entry::include_dir): New method.
12781         (line_header::include_dir_at, line_header::file_name_at): New
12782         methods.
12783         (setup_type_unit_groups, setup_type_unit_groups)
12784         (psymtab_include_file_name): Simplify using the new methods.
12785         (lnp_state_machine) <the_line_header>: New field.
12786         <file>: Add comment.
12787         (lnp_state_machine::current_file): New method.
12788         (dwarf_record_line): Simplify using the new methods.
12789         (init_lnp_state_machine): Initialize the "the_line_header" field.
12790         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
12791         Simplify using the new methods.
12792
12793 2017-03-27  Pedro Alves  <palves@redhat.com>
12794
12795         * cp-name-parser.y (make_empty): Delete.
12796         (demangler_special, nested_name, ptr_operator, array_indicator)
12797         (direct_declarator, declarator_1): Use fill_comp instead of
12798         make_empty.
12799
12800 2017-03-27  Pedro Alves  <palves@redhat.com>
12801
12802         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
12803         to ATTRIBUTE_PRINTF.
12804         * solib-target.c (library_list_start_list): Print "string" not
12805         "version".
12806         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
12807         gdb_xml_error call.
12808
12809 2017-03-27  Pedro Alves  <palves@redhat.com>
12810
12811         * dwarf2read.c (struct file_and_directory): New.
12812         (dwarf2_get_dwz_file): Adjust to use std::string.
12813         (dw2_get_file_names_reader): Adjust to use file_and_directory.
12814         (find_file_and_directory): Adjust to return a file_and_directory
12815         object.
12816         (read_file_scope): Adjust to use file_and_directory.  Remove
12817         make_cleanup/do_cleanups calls.
12818         (open_and_init_dwp_file): Adjust to use std::string.  Remove
12819         make_cleanup/do_cleanups calls.
12820         * python/python.c (do_start_initialization): Adjust to ldirname
12821         returning a std::string.
12822         * utils.c (ldirname): Now returns a std::string.
12823         * utils.h (ldirname): Change return type to std::string.
12824         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
12825         returning a std::string.
12826         * xml-tdesc.c (file_read_description_xml): Likewise.
12827
12828 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
12829
12830         * regcache.c (regcache_debug_print_register): New function.
12831         * regcache.h (regcache_debug_print_register): New declaration.
12832         * target.c (debug_print_register): Remove.
12833         (target_fetch_registers): Call regcache_debug_print_register.
12834         (target_store_registers): Likewise.
12835
12836 2017-03-24  Pádraig Brady  <pbrady@fb.com>
12837
12838         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
12839         reference beyond the 'lh->include_dirs' array before accessing to
12840         it.
12841         (psymtab_include_file_name): Likewise.
12842         (dwarf_decode_lines_1): Likewise.
12843         (dwarf_decode_lines): Likewise.
12844         (file_file_name): Likewise.
12845
12846 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
12847
12848         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
12849         inferior_ptid.
12850         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12851         ps_lsetfpregs): Likewise.
12852         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
12853         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12854         ps_lsetfpregs): Likewise.
12855         * target.c (target_fetch_registers, target_store_registers):
12856         Remove asserts.
12857
12858 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
12859
12860         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
12861
12862 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12863
12864         * aarch64-tdep.c (aarch64_process_record_test): Declare.
12865         (_initialize_aarch64_tdep): Register it.
12866         (aarch64_record_load_store): Handle PRFM instruction.
12867         (aarch64_process_record_test): New function.
12868
12869 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12870
12871         * aarch64-tdep.c (aarch64_record_load_store): Fix code
12872         indentation.
12873
12874 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12875
12876         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
12877
12878 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12879
12880         python/python.c (do_start_initialization): Fix memory leak.
12881
12882 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12883
12884         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
12885         using get_ptrace_pid.
12886         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12887         inferior_ptid.
12888         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12889         inferior_ptid instead of pid.
12890
12891 2017-03-22  Yao Qi  <yao.qi@linaro.org>
12892
12893         * aarch64-tdep.c: Wrap locally used classes in anonymous
12894         namespace.
12895         * arm-tdep.c: Likewise.
12896         * linespec.c: Likewise.
12897         * ui-out.c: Likewise.
12898
12899 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
12900
12901         PR gdb/19637
12902         * python/lib/gdb/printer/bound_registers.py: Import sys.
12903
12904 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12905
12906         * windows-nat.c (do_windows_fetch_inferior_registers): Add
12907         windows_thread_info parameter and use it instead of
12908         current_thread.
12909         (windows_fetch_inferior_registers): Don't set current_thread,
12910         pass the thread to do_windows_fetch_inferior_registers.  Use
12911         ptid from regcache instead of inferior_ptid.
12912         (do_windows_store_inferior_registers): Add windows_thread_info
12913         parameter and use it instead of current_thread.
12914         (windows_store_inferior_registers): Don't set current_thread,
12915         pass the thread to do_windows_store_inferior_registers.  Use
12916         ptid from regcache instead of inferior_ptid.
12917
12918 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12919
12920         * ser-mingw.c (ser_windows_raw): Remove reference to
12921         struct serial::current_timeout.
12922
12923 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
12924
12925         PR tdep/20928
12926         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
12927         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
12928         (sparc64_fsr_type): Fix %fsr decoding.
12929
12930 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
12931
12932         * python/py-record-btrace.c (btpy_insn_data): Change return type
12933         for Python 2.
12934
12935 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12936
12937         * spu-linux-nat.c (spu_fetch_inferior_registers,
12938         spu_store_inferior_registers): Use ptid from regcache, set and
12939         restore inferior_ptid.
12940         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
12941         Likewise.
12942
12943 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12944
12945         * i386-linux-nat.c (fetch_register, store_register,
12946         i386_linux_fetch_inferior_registers,
12947         i386_linux_store_inferior_registers): Use ptid from regcache.
12948         * ia64-linux-nat.c (ia64_linux_fetch_register,
12949         ia64_linux_store_register): Likewise.
12950         * inf-ptrace.c (inf_ptrace_fetch_register,
12951         inf_ptrace_store_register): Likewise.
12952         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
12953         m32r_linux_store_inferior_registers): Likewise.
12954         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
12955         m68kbsd_store_inferior_registers): Likewise.
12956         * m68k-linux-nat.c (fetch_register, store_register,
12957         m68k_linux_fetch_inferior_registers,
12958         m68k_linux_store_inferior_registers): Likewise.
12959         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
12960         m88kbsd_store_inferior_registers): Likewise.
12961         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
12962         mips_fbsd_store_inferior_registers): Likewise.
12963         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
12964         mips64_linux_regsets_store_registers): Likewise.
12965         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
12966         mipsnbsd_store_inferior_registers): Likewise.
12967         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
12968         mips64obsd_store_inferior_registers): Likewise.
12969         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
12970         Likewise.
12971         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
12972         ppcfbsd_store_inferior_registers): Likewise.
12973         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
12974         ppc_linux_store_inferior_registers): Likewise.
12975         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
12976         ppcnbsd_store_inferior_registers): Likewise.
12977         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
12978         ppcobsd_store_registers): Likewise.
12979         * procfs.c (procfs_fetch_registers, procfs_store_registers):
12980         Likewise.
12981         * ravenscar-thread.c (ravenscar_fetch_registers,
12982         ravenscar_store_registers, ravenscar_prepare_to_store):
12983         Likewise.
12984         * record-btrace.c (record_btrace_fetch_registers,
12985         record_btrace_store_registers, record_btrace_prepare_to_store):
12986         Likewise.
12987         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
12988         Lookup inferior using ptid from regcache, instead of
12989         current_inferior.
12990         * remote.c (remote_fetch_registers, remote_store_registers): Use
12991         ptid from regcache.
12992         * rs6000-nat.c (fetch_register, store_register): Likewise.
12993         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
12994         s390_linux_store_inferior_registers): Likewise.
12995         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
12996         shnbsd_store_inferior_registers): Likewise.
12997         * sol-thread.c (sol_thread_fetch_registers,
12998         sol_thread_store_registers): Likewise.
12999         * sparc-nat.c (sparc_fetch_inferior_registers,
13000         sparc_store_inferior_registers): Likewise.
13001         * tilegx-linux-nat.c (fetch_inferior_registers,
13002         store_inferior_registers): Likewise.
13003         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13004         vaxbsd_store_inferior_registers): Likewise.
13005         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13006         store_xtregs): Likewise.
13007
13008 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13009
13010         PR gdb/14441
13011         * NEWS: Mention support for rvalue references in GDB and python.
13012         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13013         supports both lvalue and rvalue references.
13014
13015 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13016
13017         PR gdb/14441
13018         * gdbtypes.c (rank_one_type): Implement overloading
13019         resolution rules regarding rvalue references.
13020
13021 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13022
13023         PR gdb/14441
13024         * aarch64-tdep.c (aarch64_type_align)
13025         (aarch64_extract_return_value, aarch64_store_return_value): Change
13026         lvalue reference type checks to general reference type checks.
13027         * amd64-tdep.c (amd64_classify): Likewise.
13028         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13029         Likewise.
13030         * arm-tdep.c (arm_type_align, arm_extract_return_value)
13031         (arm_store_return_value): Likewise.
13032         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13033         * c-typeprint.c (c_print_type): Likewise.
13034         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13035         (cplus_number_of_children, cplus_describe_child): Likewise.
13036         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13037         * completer.c (expression_completer): Likewise.
13038         * cp-support.c (make_symbol_overload_list_adl_namespace):
13039         Likewise.
13040         * darwin-nat-info.c (info_mach_region_command): Likewise.
13041         * dwarf2loc.c (entry_data_value_coerce_ref)
13042         (value_of_dwarf_reg_entry): Likewise.
13043         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13044         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13045         Likewise.
13046         * findvar.c (extract_typed_address, store_typed_address):
13047         Likewise.
13048         * gdbtypes.c (rank_one_type): Likewise.
13049         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13050         * infcall.c (value_arg_coerce): Likewise.
13051         * language.c (pointer_type): Likewise.
13052         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13053         Likewise.
13054         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13055         * mn10300-tdep.c (mn10300_type_align): Likewise.
13056         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13057         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13058         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13059         Likewise.
13060         * printcmd.c (print_formatted, x_command): Likewise.
13061         * python/py-type.c (typy_get_composite, typy_template_argument):
13062         Likewise.
13063         * python/py-value.c (valpy_referenced_value)
13064         (valpy_get_dynamic_type, value_has_field): Likewise.
13065         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13066         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13067         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13068         * spu-tdep.c (spu_scalar_value_p): Likewise.
13069         * symtab.c (lookup_symbol_aux): Likewise.
13070         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13071         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13072         Likewise.
13073         * valops.c (value_cast_pointers, value_cast)
13074         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13075         (value_struct_elt, value_struct_elt_bitpos)
13076         (value_find_oload_method_list, find_overload_match)
13077         (value_rtti_indirect_type): Likewise.
13078         * valprint.c (val_print_scalar_type_p, generic_val_print):
13079         Likewise.
13080         * value.c (value_actual_type, value_as_address, unpack_long)
13081         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13082         (coerce_ref): Likewise.
13083         * varobj.c (varobj_get_value_type): Likewise.
13084
13085 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13086
13087         PR gdb/14441
13088         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13089         table of constants.
13090         * python/lib/gdb/command/explore.py: Support exploring values
13091         of rvalue reference types.
13092         * python/lib/gdb/types.py: Implement get_basic_type() for
13093         rvalue reference types.
13094         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13095         constant.
13096         * python/py-value.c (valpy_getitem): Add an rvalue reference
13097         check.
13098         (valpy_reference_value): Add new parameter "refcode".
13099         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13100         New wrappers for valpy_reference_value().
13101         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13102         (gdbpy_invoke_xmethod): Likewise.
13103
13104 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13105
13106         PR gdb/14441
13107         * dwarf2read.c (process_die, read_type_die_1): Handle the
13108         DW_TAG_rvalue_reference_type DIE.
13109         (read_tag_reference_type): Add new parameter "refcode".
13110
13111 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13112
13113         PR gdb/14441
13114         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13115         (c_type_print_modifier, c_type_print_varspec_suffix)
13116         (c_type_print_base): Support printing rvalue reference types.
13117         * c-valprint.c (c_val_print, c_value_print): Support printing
13118         rvalue reference values.
13119
13120 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13121
13122         PR gdb/14441
13123         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13124         typename.
13125         * cp-support.c (replace_typedefs): Handle
13126         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13127         * python/py-type.c (typy_lookup_type): Likewise.
13128
13129 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13130
13131         PR gdb/14441
13132         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13133         * parse.c (insert_type): Change assert statement.
13134         (follow_types): Handle rvalue reference types.
13135         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13136         constant.
13137
13138 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13139
13140         PR gdb/14441
13141         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13142         value_ref() interface.
13143         * c-valprint.c (c_value_print): Likewise.
13144         * infcall.c (value_arg_coerce): Likewise.
13145         * python/py-value.c (valpy_reference_value): Likewise.
13146         * valops.c (value_cast, value_reinterpret_cast)
13147         (value_dynamic_cast, typecmp): Likewise.
13148         (value_ref): Parameterize by kind of return value reference type.
13149         * value.h (value_ref): Add new parameter "refcode".
13150
13151 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13152
13153         PR gdb/14441
13154         * dwarf2read.c (read_tag_reference_type): Use
13155         lookup_lvalue_reference_type() instead of lookup_reference_type().
13156         * eval.c (evaluate_subexp_standard): Likewise.
13157         * f-exp.y: Likewise.
13158         * gdbtypes.c (make_reference_type, lookup_reference_type):
13159         Generalize with rvalue reference types.
13160         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13161         convenience wrappers for lookup_reference_type().
13162         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13163         reference kind parameter.
13164         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13165         wrappers for lookup_reference_type().
13166         * guile/scm-type.c (gdbscm_type_reference): Use
13167         lookup_lvalue_reference_type() instead of lookup_reference_type().
13168         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13169         * parse.c (follow_types): Likewise.
13170         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13171         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13172         Likewise.
13173         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13174         (gdbpy_invoke_xmethod): Likewise.
13175         * stabsread.c: Provide extra argument to make_reference_type()
13176         call.
13177         * valops.c (value_ref, value_rtti_indirect_type): Use
13178         lookup_lvalue_reference_type() instead of lookup_reference_type().
13179
13180 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13181
13182         PR gdb/14441
13183         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13184         (TYPE_IS_REFERENCE): New macro.
13185         (struct type): Add rvalue_reference_type field.
13186         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13187
13188 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13189
13190         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13191         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13192         New function definition.
13193         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13194         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13195         New function declaration.
13196         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13197         * mi/mi-interp.h: New file.
13198         * solib.c (info_sharedlibrary_command): Replace for loop with
13199         ALL_SO_LIBS macro
13200         * solib.h (update_solib_list): New function declaration.
13201         (so_list_head): Move macro.
13202         * solist.h (ALL_SO_LIBS): New macro.
13203
13204 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13205
13206         * infcmd.c (post_create_inferior): Remove unused argument in
13207         call to solib_add.
13208         * remote.c (remote_start_remote): Likewise.
13209         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13210         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13211         (enable_break): Likewise.
13212         * solib.c (update_solib_list): Remove unused target argument
13213         and its documentation.
13214         (solib_add): Remove unused target argument.  Remove unused
13215         argument in call to update_solib_list.
13216         (info_sharedlibrary_command): Remove unused argument in call
13217         to update_solib_list.
13218         (sharedlibrary_command): Remove unused argument in call to
13219         solib_add.
13220         (handle_solib_event): Likewise.
13221         (reload_shared_libraries): Likewise.
13222         * solib.h (solib_add): Remove unused target argument.
13223
13224 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13225
13226         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13227         (s390_displaced_step_fixup): Cover relative branches with the
13228         default fixup handling.  This fixes lack of support for some
13229         relative branch instructions.
13230
13231 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13232
13233         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13234         ptid from regcache.
13235
13236 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13237
13238         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13239         i386_darwin_store_inferior_registers): Use ptid from regcache.
13240
13241 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13242
13243         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13244         i386bsd_store_inferior_registers): Use ptid from regcache.
13245
13246 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13247
13248         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13249         hppaobsd_store_registers): Use ptid from regcache.
13250
13251 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13252
13253         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13254         hppanbsd_store_registers): Use ptid from regcache.
13255
13256 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13257
13258         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13259         from regcache.  Use get_ptrace_pid.
13260
13261 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13262
13263         * corelow.c (get_core_register_section): Use ptid from regcache,
13264         update doc.
13265
13266 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13267
13268         * bsd-uthread.c (bsd_uthread_fetch_registers,
13269         bsd_uthread_store_registers): Use ptid from regcache, set and
13270         restore inferior_ptid.
13271
13272 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13273
13274         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13275         fetch_fp_regs, store_register, store_regs, store_fp_register,
13276         store_fp_regs): Use ptid from regcache.
13277
13278 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13279
13280         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13281         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13282         store_vfp_regs): Use ptid from regcache.
13283
13284 2017-03-17  Pedro Alves  <palves@redhat.com>
13285
13286         PR remote/21188
13287         * ser-base.c (ser_base_wait_for): Add comment.
13288         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13289         version.
13290         * ser-unix.c (hardwire_raw): Remove reference to
13291         scb->current_timeout.
13292         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13293         (hardwire_ops): Install ser_base_readchar instead of
13294         hardwire_readchar.
13295         * serial.h (struct serial) <current_timeout, timeout_remaining>:
13296         Remove fields.
13297
13298 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
13299
13300         PR gdb/19637
13301         * python/lib/gdb/printer/bound_registers.py: Add support for
13302         Python 3.
13303
13304 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13305
13306         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13307         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13308         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13309         byte_offset to subobj_byte_offset.  Fix the handling of
13310         DWARF_VALUE_STACK on big-endian targets when coming via an
13311         implicit pointer.
13312         (dwarf2_evaluate_loc_desc): Adjust call to
13313         dwarf2_evaluate_loc_desc_full.
13314         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13315         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13316
13317 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13318
13319         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13320         and REVSH instructions.
13321
13322 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13323
13324         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13325         (arm_record_test): Declare.
13326         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13327         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13328         align with the manual.
13329         (thumb_record_misc): Adjust the code order to align with the
13330         manual.
13331         (thumb2_record_decode_insn_handler): Fix instruction matching.
13332         (instruction_reader_thumb): New class.
13333         (arm_record_test): New function.
13334
13335 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13336
13337         * arm-tdep.c (abstract_memory_reader): New class.
13338         (instruction_reader): New class.
13339         (extract_arm_insn): Add argument 'reader'.  Callers updated.
13340         (decode_insn): Likewise.
13341
13342 2017-03-16  Doug Evans  <dje@google.com>
13343
13344         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13345         member.  Change type of TYPE member to SCM.  All uses updated.
13346         (lsscm_make_lazy_string_smob): Add assert.
13347         (lsscm_make_lazy_string): Flag bad length values.
13348         (lsscm_elt_type): New function.
13349         (gdbscm_lazy_string_to_value): Rewrite to use
13350         lsscm_safe_lazy_string_to_value.
13351         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13352         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13353         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
13354         in incoming type.
13355         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13356         * guile/scm-type.c (tyscm_scm_to_type): New function.
13357
13358 2017-03-15  Doug Evans  <dje@google.com>
13359
13360         PR python/17728, python/18439, python/18779
13361         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13362         member.  Change type of TYPE member to PyObject *.  All uses updated.
13363         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13364         (gdbpy_create_lazy_string_object): Flag bad length values.
13365         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13366         Handle typedefs in incoming type.
13367         (stpy_lazy_string_elt_type): New function.
13368         (gdbpy_extract_lazy_string): Call it.
13369         * python/py-value.c (valpy_lazy_string): Flag bad length values.
13370         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
13371         typedefs in incoming type.
13372
13373 2017-03-16  Doug Evans  <dje@google.com>
13374
13375         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13376         * guile/scm-type.c (tyscm_scm_to_type): New function.
13377
13378 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
13379
13380         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13381         "ULONGEST" for "skip".
13382
13383 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13384
13385         PR gdb/21220
13386         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13387         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13388         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
13389         over ptrace peek/poke until end of buffer or error.
13390
13391 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
13392
13393         * parse.c (length_of_subexp): Make static.
13394         * parser-defs.h (length_of_subexp): Remove.
13395
13396 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13397
13398         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13399         as well.
13400
13401 2017-03-14  Pedro Alves  <palves@redhat.com>
13402
13403         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13404         (main): Use std::unique_ptr.  Remove calls to
13405         cp_demangled_name_parse_free.
13406
13407 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13408
13409         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13410         alphabsd_store_inferior_registers): Use regcache->ptid instead
13411         of inferior_ptid.
13412
13413 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13414
13415         * aix-thread.c (aix_thread_fetch_registers,
13416         aix_thread_store_registers): Use regcache->ptid instead of
13417         inferior_ptid.
13418
13419 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13420
13421         * aarch64-linux-nat.c (fetch_gregs_from_thread,
13422         store_gregs_to_thread, fetch_fpregs_from_thread,
13423         store_fpregs_to_thread): Use regcache->ptid instead of
13424         inferior_ptid.
13425
13426 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13427
13428         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13429         amd64_linux_fetch_inferior_registers): Use regcache->ptid
13430         instead of inferior_ptid.
13431
13432 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13433
13434         * target.c (target_fetch_registers, target_store_registers): Add
13435         assert.
13436
13437 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13438
13439         * regcache.h (regcache_get_ptid): New function.
13440         * regcache.c (regcache_get_ptid): New function.
13441
13442 2017-03-13  Mark Wielaard  <mark@klomp.org>
13443
13444         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13445
13446 2017-03-10  Keith Seitz  <keiths@redhat.com>
13447
13448         PR c++/8218
13449         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13450
13451 2017-03-08  Pedro Alves  <palves@redhat.com>
13452
13453         PR gdb/18360
13454         * infrun.c (start_step_over, do_target_resume, resume)
13455         (restart_threads): Assert we're not resuming a thread that is
13456         meant to be stopped.
13457         (infrun_thread_stop_requested_callback): Delete.
13458         (infrun_thread_stop_requested): If the thread is internally
13459         stopped, queue a pending stop event and clear the thread's
13460         inline-frame state.
13461         (handle_stop_requested): New function.
13462         (handle_syscall_event, handle_inferior_event_1): Use
13463         handle_stop_requested.
13464         (handle_stop_requested): New function.
13465         (handle_signal_stop): Set the thread's stop_signal here instead of
13466         at caller.
13467         (finish_step_over): Clear step over info unconditionally.
13468         (handle_signal_stop): If the user had interrupted the event
13469         thread, consider the stop a random signal.
13470         (handle_signal_stop) <signal arrived while stepping over
13471         breakpoint>: Don't restart threads here.
13472         (stop_waiting): Don't clear step-over info here.
13473
13474 2017-03-08  Pedro Alves  <palves@redhat.com>
13475
13476         PR 21206
13477         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13478         goes to argument 2, not 1.
13479
13480 2017-03-08  Pedro Alves  <palves@redhat.com>
13481
13482         PR cli/21218
13483         * top.c (gdb_readline_wrapper): Avoid passing NULL to
13484         display_gdb_prompt.
13485         (command_line_input): Add comment.
13486
13487 2017-03-08  Pedro Alves  <palves@redhat.com>
13488
13489         PR tui/21216
13490         * tui/tui-file.c (tui_file::write): New.
13491         * tui/tui-file.h (tui_file): Override "write".
13492         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13493         factored out from ...
13494         (tui_puts): ... here.
13495         (tui_putc): Use them.
13496         (tui_write): New function.
13497         * tui/tui-io.h (tui_write): Declare.
13498
13499 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
13500
13501         * Makefile.in (SFILES): Replace "environ.c" with
13502         "common/environ.c".
13503         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13504         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
13505         to...
13506         * common/environ.c: ... here.
13507         * environ.h: Moved to...
13508         * common/environ.h: ... here.
13509
13510 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13511
13512         * gdbarch.sh (pstring_ptr): New static function.
13513         (gdbarch_disassembler_options): Use it.
13514         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13515         not valid_disassembler_option->name.
13516         * gdbarch.c: Regenerate.
13517
13518 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13519
13520         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13521
13522 2017-03-07  Pedro Alves  <palves@redhat.com>
13523
13524         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13525
13526 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13527
13528         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13529         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13530         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13531         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13532
13533 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
13534
13535         * xtensa-linux-nat.c (fetch_gregs): Remove const.
13536
13537 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
13538
13539         * remote.c (remote_add_target_side_commands): Use range-based
13540         for loop.
13541
13542 2017-03-03  Yao Qi  <yao.qi@linaro.org>
13543
13544         PR gdb/21165
13545         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13546         value is lazy.
13547         * valprint.c (common_val_print): Likewise.
13548
13549 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
13550
13551         * NEWS: Mention new set/show disassembler-options commands.
13552         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13553         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13554         (prospective_options): New static variable.
13555         (gdb_disassembler::gdb_disassembler): Initialize
13556         m_di.disassembler_options.
13557         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13558         (get_disassembler_options): New function.
13559         (set_disassembler_options): Likewise.
13560         (set_disassembler_options_sfunc): Likewise.
13561         (show_disassembler_options_sfunc): Likewise.
13562         (disassembler_options_completer): Likewise.
13563         (_initialize_disasm): Likewise.
13564         * disasm.h (get_disassembler_options): New prototype.
13565         (set_disassembler_options): Likewise.
13566         * gdbarch.sh (gdbarch_disassembler_options): New variable.
13567         (gdbarch_verify_disassembler_options): Likewise.
13568         * gdbarch.c: Regenerate.
13569         * gdbarch.h: Likewise.
13570         * arm-tdep.c (num_disassembly_options): Delete.
13571         (set_disassembly_style): Likewise.
13572         (arm_disassembler_options): New static variable.
13573         (set_disassembly_style_sfunc): Convert short style name into long
13574         option name.  Call set_disassembler_options.
13575         (show_disassembly_style_sfunc): New function.
13576         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13577         set_gdbarch_verify_disassembler_options.
13578         (_initialize_arm_tdep): Delete regnames variable and update callers.
13579         (arm_disassembler_options): Initialize.
13580         (disasm_options): New variable.
13581         (num_disassembly_options): Rename from this...
13582         (num_disassembly_styles): ...to this.  Compute by scanning through
13583         disasm_options.
13584         (valid_disassembly_styles): Initialize using disasm_options.
13585         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13586         set_arm_regname_option.
13587         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13588         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13589         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13590         set_gdbarch_verify_disassembler_options.
13591         * s390-tdep.c (s390_disassembler_options): New static variable.
13592         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13593         set_gdbarch_verify_disassembler_options.
13594
13595 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13596
13597         * remote.c (remote_add_target_side_condition): Remove "struct"
13598         keyword from range-based for loop.
13599
13600 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13601
13602         * remote.c (remote_add_target_side_condition): Use range-based
13603         for loop.  Update comment.
13604
13605 2017-02-27  Yao Qi  <yao.qi@linaro.org>
13606
13607         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13608
13609 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
13610
13611         * regcache.c (regcache_raw_update): New function.
13612         (regcache_raw_read): Move code to regcache_raw_update.
13613         * regcache.h (regcache_raw_update): New declaration.
13614         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13615
13616 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
13617
13618         * dwarf2read.c (create_debug_type_hash_table): Initialize
13619         header.signature and header.type_offset_in_tu.
13620
13621 2017-02-24  Pedro Alves  <palves@redhat.com>
13622
13623         * symtab.c (make_file_symbol_completion_list_1): Use
13624         add_symtab_completions.
13625
13626 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13627
13628         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13629
13630 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13631
13632         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13633         I386_MAX_REGISTER_SIZE.
13634         (i386_pseudo_register_write): Likewise.
13635         (i386_process_record): Likewise.
13636         * i387-tdep.c (i387_supply_xsave): Likewise.
13637         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13638         (store_register): Likewise.
13639
13640 2017-02-23  Pedro Alves  <palves@redhat.com>
13641
13642         * ada-lang.c: Include "common/function-view.h".
13643         (ada_iterate_over_symbols): Adjust to use function_view as
13644         callback type.
13645         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13646         (ada_make_symbol_completion_list): Use a lambda.
13647         (ada_exc_search_name_matches): Delete.
13648         (name_matches_regex): New.
13649         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13650         * compile/compile-c-support.c: Include "common/function-view.h".
13651         (print_one_macro): Change prototype to accept a ui_file pointer.
13652         (write_macro_definitions): Use a lambda.
13653         * dwarf2read.c: Include "common/function-view.h".
13654         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13655         (dw2_expand_symtabs_matching): Adjust to use function_view as
13656         callback type.
13657         * language.h: Include "common/function-view.h".
13658         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13659         function_view as callback type.
13660         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13661         * linespec.c: Include "common/function-view.h".
13662         (collect_info::add_symbol): New method.
13663         (struct symbol_and_data_callback, iterate_inline_only, struct
13664         symbol_matcher_data, iterate_name_matcher): Delete.
13665         (iterate_over_all_matching_symtabs): Adjust to use function_view
13666         as callback type and lambdas.
13667         (iterate_over_file_blocks): Adjust to use function_view as
13668         callback type.
13669         (decode_compound_collector): Now a class with private fields.
13670         (decode_compound_collector::release_symbols): New method.
13671         (collect_one_symbol): Rename to...
13672         (decode_compound_collector::operator()): ... this and adjust.
13673         (lookup_prefix_sym): decode_compound_collector construction bits
13674         move to decode_compound_collector ctor.  Pass the
13675         decode_compound_collector object directly as callback.  Remove
13676         cleanups and use decode_compound_collector::release_symbols
13677         instead.
13678         (symtab_collector): Now a class with private fields.
13679         (symtab_collector::release_symtabs): New method.
13680         (add_symtabs_to_list): Rename to...
13681         (symtab_collector::operator()): ... this and adjust.
13682         (collect_symtabs_from_filename): symtab_collector construction
13683         bits move to symtab_collector ctor.  Pass the symtab_collector
13684         object directly as callback.  Remove cleanups and use
13685         symtab_collector::release_symtabs instead.
13686         (collect_symbols): Delete.
13687         (add_matching_symbols_to_info): Use lambdas.
13688         * macrocmd.c (print_macro_callback): Delete.
13689         (info_macro_command): Use a lambda.
13690         (info_macros_command): Pass print_macro_definition as callable
13691         directly.
13692         (print_one_macro): Remove 'ignore' parameter.
13693         (macro_list_command): Adjust.
13694         * macrotab.c (macro_for_each_data::fn): Now a function_view.
13695         (macro_for_each_data::user_data): Delete field.
13696         (foreach_macro): Adjust to call the function_view.
13697         (macro_for_each): Adjust to use function_view as callback type.
13698         (foreach_macro_in_scope): Adjust to call the function_view.
13699         (macro_for_each_in_scope): Adjust to use function_view as callback
13700         type.
13701         * macrotab.h: Include "common/function-view.h".
13702         (macro_callback_fn): Declare a prototype instead of a pointer.
13703         Remove "user_data" parameter.
13704         (macro_for_each, macro_for_each_in_scope): Adjust to use
13705         function_view as callback type.
13706         * psymtab.c (partial_map_expand_apply)
13707         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13708         Adjust to use function_view as callback type and to return bool.
13709         (psym_expand_symtabs_matching): Adjust to use function_view as
13710         callback types.
13711         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13712         to use function_view as callback type and to return bool.
13713         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13714         callback types.
13715         * symfile.c (expand_symtabs_matching): Adjust to use function_view
13716         as callback types.
13717         * symfile.h: Include "common/function-view.h".
13718         (expand_symtabs_file_matcher_ftype)
13719         (expand_symtabs_symbol_matcher_ftype)
13720         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13721         return bool.
13722         (quick_symbol_functions::map_symtabs_matching_filename)
13723         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13724         function_view as callback type and return bool.
13725         (expand_symtabs_matching): Adjust to use function_view as callback
13726         type.
13727         (maintenance_expand_name_matcher)
13728         (maintenance_expand_file_matcher): Delete.
13729         (maintenance_expand_symtabs): Use lambdas.
13730         * symtab.c (iterate_over_some_symtabs): Adjust to use
13731         function_view as callback types and return bool.
13732         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
13733         of a cleanup.
13734         (lookup_symtab_callback): Delete.
13735         (lookup_symtab): Use a lambda.
13736         (iterate_over_symbols): Adjust to use function_view as callback
13737         type.
13738         (struct search_symbols_data, search_symbols_file_matches)
13739         (search_symbols_name_matches): Delete.
13740         (search_symbols): Use a pair of lambdas.
13741         (struct add_name_data, add_macro_name, symbol_completion_matcher)
13742         (symtab_expansion_callback): Delete.
13743         (default_make_symbol_completion_list_break_on_1): Use lambdas.
13744         * symtab.h: Include "common/function-view.h".
13745         (iterate_over_some_symtabs): Adjust to use function_view as
13746         callback type and return bool.
13747         (iterate_over_symtabs): Adjust to use function_view as callback
13748         type.
13749         (symbol_found_callback_ftype): Remove 'data' parameter and return
13750         bool.
13751         (iterate_over_symbols): Adjust to use function_view as callback
13752         type.
13753
13754 2017-02-23  Pedro Alves  <palves@redhat.com>
13755
13756         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
13757         (%.o) <unittests/%.c>: New pattern.
13758         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
13759         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
13760         * common/function-view.h: New file.
13761         * unittests/function-view-selftests.c: New file.
13762         * configure: Regenerate.
13763
13764 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
13765
13766         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
13767         inferior_ptid.
13768         * go32-nat.c (go32_thread_alive): Likewise.
13769
13770 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13771
13772         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
13773         delete.
13774
13775 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13776
13777         * varobj.c (varobj_clear_saved_item): Use delete instead of
13778         xfree.
13779         (update_dynamic_varobj_children): Likewise.
13780
13781 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13782
13783         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
13784
13785 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
13786
13787         * common/enum-flags.h (enum_flags::enum_flags): Initialize
13788         m_enum_value to 0 in default constructor.
13789
13790 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
13791
13792         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
13793         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
13794         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
13795         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
13796         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
13797         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
13798         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
13799         IS_STORE_CONDITIONAL_INSN.
13800
13801 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13802
13803         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
13804
13805 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13806
13807         * NEWS (Changes since GDB 7.12): Add DWARF-5.
13808
13809 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13810
13811         * dwarf2read.c (skip_one_die, read_attribute_value)
13812         (dwarf2_const_value_attr, dump_die_shallow)
13813         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
13814         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
13815
13816 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13817
13818         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
13819         (dwarf_parse_macro_header): Accept DWARF version 5.
13820         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
13821
13822 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13823
13824         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
13825         DW_AT_GNU_*.
13826         * common/common-exceptions.h (enum errors): Likewise.
13827         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
13828         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
13829         (dwarf_expr_context::execute_stack_op): Likewise.
13830         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
13831         Likewise.
13832         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
13833         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
13834         (show_entry_values_debug, call_site_to_target_addr)
13835         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
13836         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
13837         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
13838         (value_of_dwarf_block_entry, indirect_pieced_value)
13839         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
13840         (disassemble_dwarf_expression): Likewise.
13841         * dwarf2read.c (process_die, inherit_abstract_dies)
13842         (read_call_site_scope): Likewise.
13843         * gdbtypes.h (struct func_type, struct call_site_parameter)
13844         (struct call_site): Likewise.
13845         * stack.c (read_frame_arg): Likewise.
13846         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
13847
13848 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13849
13850         * defs.h (read_unsigned_leb128): New declaration.
13851         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
13852         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
13853         (dwarf2_find_location_expression): Call also
13854         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
13855         * dwarf2loc.h (dwarf2_version): New declaration.
13856         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
13857         rnglists.
13858         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
13859         .debug_rnglists.
13860         (struct dwop_section_names): Add loclists_dwo.
13861         (dwop_section_names): Add .debug_loclists.dwo.
13862         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
13863         (struct dwarf2_per_cu_data): Add dwarf_version.
13864         (struct dwo_sections): Add loclists.
13865         (struct attr_abbrev): Add implicit_const.
13866         (read_indirect_line_string): New declaration.
13867         (read_unsigned_leb128): Delete declaration.
13868         (rcuh_kind): New definition.
13869         (read_and_check_comp_unit_head): Change parameter
13870         is_debug_types_section to section_kind.
13871         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
13872         (read_comp_unit_head): Change parameter abfd to section, add parameter
13873         section_kind.  Handle DWARF-5.
13874         (error_check_comp_unit_head): Accept also DWARF version 5.
13875         (read_and_check_comp_unit_head): Change parameter
13876         is_debug_types_section to section_kind.
13877         (read_and_check_type_unit_head): Delete function.
13878         (read_abbrev_offset): Handle DWARF-5.
13879         (create_debug_type_hash_table): Add parameter section_kind.  Process
13880         only DW_UT_type.  Use signature and type_offset_in_tu from struct
13881         comp_unit_head.
13882         (create_debug_types_hash_table): Update create_debug_type_hash_table
13883         caller.
13884         (create_all_type_units): Call create_debug_type_hash_table.
13885         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
13886         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13887         caller.
13888         (skip_one_die): Handle DW_FORM_implicit_const.
13889         (dwarf2_rnglists_process): New function.
13890         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13891         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13892         (read_attribute_value): Handle DW_FORM_implicit_const,
13893         DW_FORM_line_strp.
13894         (read_attribute): Handle DW_FORM_implicit_const.
13895         (read_indirect_string_at_offset_from): New function from
13896         read_indirect_string_at_offset.
13897         (read_indirect_string_at_offset): Call
13898         read_indirect_string_at_offset_from.
13899         (read_indirect_line_string_at_offset): New function.
13900         (read_indirect_string): New function comment.
13901         (read_indirect_line_string): New function.
13902         (read_unsigned_leb128): Make it global.
13903         (dwarf2_string_attr): Handle DWARF-5.
13904         (add_include_dir_stub, read_formatted_entries): New functions.
13905         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
13906         Handle DWARF-5.
13907         (per_cu_header_read_in): Update read_comp_unit_head caller.
13908         (dwarf2_version): New function.
13909         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
13910         rnglists.
13911         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
13912         fields.
13913
13914 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13915
13916         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
13917
13918 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13919
13920         * dwarf2read.c (dwarf2_ranges_process): New function from
13921         dwarf2_ranges_read.
13922         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
13923         dwarf2_ranges_process.
13924
13925 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13926
13927         * dwarf2read.c (create_debug_type_hash_table): New function from
13928         create_debug_types_hash_table.
13929         (create_debug_types_hash_table): Call create_debug_type_hash_table.
13930         (create_all_type_units, open_and_init_dwo_file): Update
13931         create_debug_types_hash_table callers.
13932
13933 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13934
13935         PR gdb/16188
13936         * fork-child.c (trace_start_error): Fix thinko.  va_end should
13937         refer to 'ap', not 'args'.
13938
13939 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13940             Pedro Alves  <palves@redhat.com>
13941
13942         PR gdb/16188
13943         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
13944         calls succeeded.
13945         * fork-child.c (trace_start_error): New function.
13946         (trace_start_error_with_name): Likewise.
13947         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
13948         * inf-ptrace.c (inf_ptrace_me): Likewise.
13949         * inferior.h (trace_start_error): New prototype.
13950         (trace_start_error_with_name): Likewise.
13951
13952 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
13953
13954         PR gdb/21164
13955         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
13956         NULL before using it.
13957         * symmisc.c (maintenance_print_symbols): Likewise.
13958         (maintenance_print_msymbols): Likewise.
13959
13960 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13961
13962         * NEWS: Add record Python bindings entry.
13963
13964 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13965
13966         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
13967         py-record-full.o.
13968         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
13969         * python/py-record-btrace.c, python/py-record-btrace.h,
13970         python/py-record-full.c, python/py-record-full.h: New file.
13971         * python/py-record.c: Add include for py-record-btrace.h and
13972         py-record-full.h.
13973         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
13974         recpy_instruction_history, recpy_function_call_history, recpy_begin,
13975         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
13976         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
13977         New definition.
13978         (gdbpy_initialize_btrace): New export.
13979         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
13980
13981 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13982
13983         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
13984         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
13985         * python/py-record.c: New file.
13986         * python/python-internal.h (gdbpy_start_recording,
13987         gdbpy_current_recording, gdpy_stop_recording,
13988         gdbpy_initialize_record): New export.
13989         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
13990         (python_GdbMethods): Add gdbpy_start_recording,
13991         gdbpy_current_recording and gdbpy_stop_recording.
13992
13993 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13994
13995         * record-btrace.c (record_btrace_record_method): New function.
13996         (init_record_btrace_ops): Initialize to_record_method.
13997         * record-full.c (record_full_record_method): New function.
13998         (init_record_full_ops, init_record_full_core_ops): Add
13999         record_full_record_method.
14000         * record.h (enum record_method): New enum.
14001         * target-debug.h (target_debug_print_enum_record_method: New define.
14002         * target-delegates.c: Regenerate.
14003         * target.c (target_record_method): New function.
14004         * target.h: Include record.h.
14005         (struct target_ops) <to_record_method>: New field.
14006         (target_record_method): New export.
14007
14008 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14009
14010         * record.h (record_start, record_stop): New export.
14011         * record.c (record_start, record_stop): New function.
14012
14013 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14014
14015         * btrace.c (btrace_fetch): Copy function call segments pointer
14016         into a vector.
14017         (btrace_clear): Clear the vector.
14018         (btrace_find_insn_by_number): Use binary search to find the correct
14019         function call segment.
14020         * btrace.h (brace_fun_p): New typedef.
14021         (struct btrace_thread_info) <functions>: New field.
14022
14023 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14024
14025         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14026         * btrace.c (btrace_decode_error): ... here.  New function.
14027         * btrace.h (btrace_decode_error): New export.
14028
14029 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14030
14031         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14032         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14033         btrace_find_insn_by_number): Remove special case for gaps.
14034         * btrace.h (btrace_insn_get_error): New export.
14035         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14036         * record-btrace.c (btrace_insn_history): Print number for gaps.
14037         (record_btrace_info, record_btrace_goto): Handle gaps.
14038
14039 2017-02-14  Tom Tromey  <tom@tromey.com>
14040
14041         PR python/13598:
14042         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14043         event.
14044         * python/py-evts.c (gdbpy_initialize_py_events): Add
14045         before_prompt registry.
14046         * python/py-events.h (events_object) <before_prompt>: New field.
14047
14048 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
14049
14050         * btrace.c (ftrace_new_switch): Preserve up link and flags.
14051
14052 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
14053
14054         * symfile (_initialize_symfile): Add usage text to the load command's
14055         help text.
14056
14057 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
14058
14059         * utils.c (defaulted_query): Don't query on secondary UIs.
14060
14061 2017-02-10  Tom Tromey  <tom@tromey.com>
14062
14063         * rust-lang.c (rust_get_disr_info): Remove unused variable.
14064
14065 2017-02-10  Tom Tromey  <tom@tromey.com>
14066
14067         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14068         "cleanup" local.
14069         * python/py-type.c (typy_legacy_template_argument): Remove
14070         unnecessary "cleanup" local.
14071
14072 2017-02-10  Tom Tromey  <tom@tromey.com>
14073
14074         * python/python.c (do_start_initialization): New function, from
14075         _initialize_python.
14076         (_initialize_python): Call do_start_initialization.
14077         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14078         goto.
14079
14080 2017-02-10  Tom Tromey  <tom@tromey.com>
14081
14082         * python/py-prettyprint.c (pretty_print_one_value): Use
14083         gdbpy_ref.
14084
14085 2017-02-10  Tom Tromey  <tom@tromey.com>
14086
14087         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14088         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14089         gdbpy_ref.
14090         * python/py-type.c (field_new): Use gdbpy_ref.
14091         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14092         gdbpy_ref.
14093         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14094         (py_free_pspace): Likewise.
14095         (pspace_to_pspace_object): Likewise.
14096         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14097         (py_free_objfile): Likewise.
14098         (objfile_to_objfile_object): Likewise.
14099         * python/py-inferior.c (delete_thread_object): Use
14100         gdbpy_ref.
14101         (infpy_read_memory): Likewise.
14102         (py_free_inferior): Likewise.
14103         * python/py-evtregistry.c (create_eventregistry_object): Use
14104         gdbpy_ref.
14105         * python/py-event.c (create_event_object): Use gdbpy_ref.
14106
14107 2017-02-10  Tom Tromey  <tom@tromey.com>
14108
14109         * python/py-ref.h (gdbpy_ref_policy): Now a template.
14110         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14111         used.
14112         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14113         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14114         python/py-exitedevent.c, python/py-finishbreakpoint.c,
14115         python/py-framefilter.c, python/py-function.c,
14116         python/py-inferior.c, python/py-infevents.c,
14117         python/py-linetable.c, python/py-newobjfileevent.c,
14118         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14119         python/py-signalevent.c, python/py-stopevent.c,
14120         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14121         python/py-unwind.c, python/py-utils.c, python/py-value.c,
14122         python/py-varobj.c, python/py-xmethods.c, python/python.c,
14123         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14124
14125 2017-02-10  Tom Tromey  <tom@tromey.com>
14126
14127         * ui-out.h (ui_out_emit_type): New class.
14128         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14129         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14130         and ui_out_emit_tuple.
14131         (enumerate_locals): Likewise.
14132         (py_mi_print_variables, py_print_locals, py_print_args): Use
14133         ui_out_emit_list.
14134         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14135         ui_out_emit_list.
14136         * common/gdb_optional.h: New file.
14137
14138 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14139
14140         * MAINTAINERS (Write After Approval): Update my e-mail address.
14141
14142 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14143
14144         PR gdb/21122
14145         * breakpoint.c (_initialize_breakpoint): Update the help description
14146         of the 'commands' command to indicate that it takes a list argument.
14147
14148 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
14149
14150         * interps.c (current_interp_set_logging): Remove "return".
14151
14152 2017-02-09  Gary Benson  <gbenson@redhat.com>
14153
14154         * symtab.c (add_symtab_completions): Prevent NULL pointer
14155         dereference.
14156
14157 2017-02-08  Pedro Alves  <palves@redhat.com>
14158
14159         * interps.c (interp::interp): Remove reference to quiet_p.
14160         (interp_set): Make static.  Remove dead "Switching to" output
14161         code.
14162         (interp_quiet_p, interp_set_quiet): Delete.
14163         (interpreter_exec_cmd): Don't set the interpreter quiet.
14164         * interps.h (interp_quiet_p): Make static.
14165         (class interp) <quiet_p>: Remove field
14166
14167 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14168
14169         * cli/cli-decode.c (find_command_name_length): Make it extern.
14170         * cli/cli-decode.h (find_command_name_length): Declare.
14171         * cli/cli-script.c (command_name_equals, line_first_arg):
14172         New functions.
14173         (process_next_line): Use cli-decode to parse command names.
14174         (build_command_line): Make args a constant pointer.
14175
14176 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14177
14178         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14179         Remove case-insensitive search.
14180
14181 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
14182
14183         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14184         at the end of the line.  Avoids an ARI warning.
14185
14186 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
14187
14188         * NEWS: Mention support for record/replay of Intel 64 rdrand and
14189         rdseed instructions.
14190         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14191
14192 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
14193
14194         PR tdep/20936
14195         Provide and use sparc32 and sparc64 target description XML files.
14196         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14197         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14198         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14199         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14200         * features/sparc/sparc32-solaris.xml: New file.
14201         * features/sparc/sparc64-solaris.xml: New file.
14202         * features/sparc/sparc32-solaris.c: Generated.
14203         * features/sparc/sparc64-solaris.c: Generated.
14204         * sparc-tdep.h: Account for differences in target descriptions.
14205         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14206         (sparc32_register_type): Use target provided registers.
14207         (validate_tdesc_registers): New function.
14208         (sparc32_gdbarch_init): Use tdesc_has_registers.
14209         Set pseudoregister functions.
14210         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14211         (sparc64_register_type): Use target provided registers.
14212         (sparc64_init_abi): Set pseudoregister functions.
14213
14214 2017-02-03  Tom Tromey  <tom@tromey.com>
14215
14216         PR rust/21097:
14217         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14218         with a single member.
14219
14220 2017-02-03  Pedro Alves  <palves@redhat.com>
14221
14222         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14223         (cli_interp_base::~cli_interp_base): New.
14224         (cli_interp): New struct.
14225         (as_cli_interp): Cast the interp itself to cli_interp.
14226         (cli_interpreter_pre_command_loop): Rename to ...
14227         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
14228         parameter.
14229         (cli_interpreter_init): Rename to ...
14230         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
14231         boolean.  Make extern.
14232         (cli_interpreter_resume): Rename to ...
14233         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
14234         extern.
14235         (cli_interpreter_suspend): Rename to ...
14236         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
14237         extern.
14238         (cli_interpreter_exec): Rename to ...
14239         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
14240         extern.
14241         (cli_interpreter_supports_command_editing): Rename to ...
14242         (cli_interp_base::supports_command_editing): ... this.  Remove
14243         'interp' parameter.  Make extern.
14244         (cli_ui_out): Rename to ...
14245         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
14246         Make extern.
14247         (cli_set_logging): Rename to ...
14248         (cli_interp_base::set_logging): ... this.  Remove 'interp'
14249         parameter.  Make extern.
14250         (cli_interp_procs): Delete.
14251         (cli_interp_factory): Adjust to use "new".
14252         * cli/cli-interp.h: Include "interps.h".
14253         (struct cli_interp_base): New struct.
14254         * interps.c (struct interp): Delete.  Fields moved to interps.h.
14255         (interp_new): Delete.
14256         (interp::interp, interp::~interp): New.
14257         (interp_set): Use bool, and return void.  Assume the interpreter
14258         has suspend, init and resume methods, and that the all return
14259         void.
14260         (set_top_level_interpreter): interp_set returns void.
14261         (interp_ui_out): Adapt.
14262         (current_interp_set_logging): Adapt.
14263         (interp_data): Delete.
14264         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14265         (interp_exec): Adapt.
14266         (top_level_interpreter_data): Delete.
14267         * interps.h (interp_init_ftype, interp_resume_ftype)
14268         (interp_suspend_ftype, interp_exec_ftype)
14269         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14270         (class interp): New.
14271         (interp_new): Delete.
14272         (interp_set): Now returns void.  Use bool.
14273         (interp_data, top_level_interpreter_data): Delete.
14274         * mi/mi-common.h: Include interps.h.
14275         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
14276         init, resume, suspect, exec, interp_ui_out, set_logging and
14277         pre_command_loop methods.
14278         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14279         (mi_interpreter_init): Rename to ...
14280         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
14281         bool, return void and make extern.  Adjust.
14282         (mi_interpreter_resume): ... Rename to ...
14283         (mi_interp::resume): ... this.  Remove the 'data' parameter,
14284         return void and make extern.  Adjust.
14285         (mi_interpreter_suspend): ... Rename to ...
14286         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
14287         return void and make extern.  Adjust.
14288         (mi_interpreter_exec): ... Rename to ...
14289         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
14290         extern.  Adjust.
14291         (mi_interpreter_pre_command_loop): ... Rename to ...
14292         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
14293         parameter and make extern.
14294         (mi_on_normal_stop_1): Adjust.
14295         (mi_ui_out): Rename to ...
14296         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
14297         parameter and make extern.  Adjust.
14298         (mi_set_logging): Rename to ...
14299         (mi_interp::set_logging): ... this.  Remove the 'interp'
14300         parameter and make extern.  Adjust.
14301         (mi_interp_procs): Delete.
14302         (mi_interp_factory): Adjust to use 'new'.
14303         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14304         (mi_print_exception, mi_execute_command, mi_load_progress):
14305         Adjust.
14306         * tui/tui-interp.c (tui_interp): New class.
14307         (as_tui_interp): Return a tui_interp pointer.
14308         (tui_on_normal_stop, tui_on_signal_received)
14309         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14310         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14311         to use interp::interp_ui_out.
14312         (tui_init): Rename to ...
14313         (tui_interp::init): ... this.  Remove the 'self' parameter, use
14314         bool, return void and make extern.  Adjust.
14315         (tui_resume): Rename to ...
14316         (tui_interp::resume): ... this.  Remove the 'data' parameter,
14317         return void and make extern.  Adjust.
14318         (tui_suspend): Rename to ...
14319         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
14320         return void and make extern.  Adjust.
14321         (tui_ui_out): Rename to ...
14322         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
14323         parameter, and make extern.  Adjust.
14324         (tui_exec): Rename to ...
14325         (tui_interp::exec): ... this.  Remove the 'data' parameter and
14326         make extern.
14327         (tui_interp_procs): Delete.
14328         (tui_interp_factory): Use "new".
14329
14330 2017-02-02  Tom Tromey  <tom@tromey.com>
14331
14332         * rust-exp.y (ends_raw_string, space_then_number)
14333         (rust_identifier_start_p): Return bool.
14334         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14335         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14336         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14337         (rust_chartype_p): Return bool.
14338         (val_print_struct, rust_print_struct_def, rust_print_type):
14339         Update.
14340         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14341         Return bool.
14342
14343 2017-02-02  Tom Tromey  <tom@tromey.com>
14344
14345         * rust-lang.c: Reindent.
14346
14347 2017-02-02  Tom Tromey  <tom@tromey.com>
14348
14349         * rust-lang.h (rust_crate_for_block): Update.
14350         * rust-lang.c (rust_crate_for_block): Return std::string.
14351         (rust_get_disr_info): Use std:;string, not
14352         gdb::unique_xmalloc_ptr.
14353         * rust-exp.y (crate_name): Update.
14354
14355 2017-02-02  Pedro Alves  <palves@redhat.com>
14356
14357         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14358         field out of gdb_disassembler_test and make it static.
14359
14360 2017-02-02  Pedro Alves  <palves@redhat.com>
14361
14362         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14363         mi1_interp and mi_interp fields.
14364
14365 2017-02-02  Pedro Alves  <palves@redhat.com>
14366
14367         * cli/cli-interp.c (struct saved_output_files, saved_output):
14368         Moved from cli/cli-logging.c.
14369         (cli_set_logging): New function.
14370         (cli_interp_procs): Install cli_set_logging.
14371         * cli/cli-interp.h (make_logging_output, cli_set_logging):
14372         Declare.
14373         * cli/cli-logging.c (struct saved_output_files, saved_output):
14374         Moved to cli/cli-interp.c.
14375         (pop_output_files): Don't save outputs here.
14376         (make_logging_output): New function.
14377         (handle_redirections): Don't build tee nor save previous outputs
14378         here.
14379         * interps.c (current_interp_set_logging): Change prototype.
14380         Assume there's always a set_logging_proc method installed.
14381         * interps.h (interp_set_logging_ftype): Change prototype.
14382         (current_interp_set_logging): Change prototype and adjust comment.
14383         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
14384         use make_logging_output.
14385         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14386 2017-02-02  Pedro Alves  <palves@redhat.com>
14387
14388         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14389         from ...
14390         (set_logging_overwrite): ... here.
14391         (logging_no_redirect_file): Delete.
14392         (set_logging_redirect): Don't handle redirection on the fly.
14393         Instead warn that "logging off" / "logging on" is necessary.
14394         (pop_output_files): Delete references to logging_no_redirect_file.
14395         (show_logging_command): Always speak in terms of what will happen
14396         once logging is reenabled.
14397
14398 2017-02-02  Pedro Alves  <palves@redhat.com>
14399
14400         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14401
14402 2017-02-02  Pedro Alves  <palves@redhat.com>
14403
14404         * disasm.c (gdb_pretty_print_insn): Rename to ...
14405         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14406         Remove gdbarch parameter.  Adapt to clear the object's buffers
14407         instead of allocating new buffers, and to print using the object's
14408         gdb_disassembler instead of calling gdb_print_insn.
14409         (dump_insns): Use gdb_pretty_print_disassembler.
14410         * disasm.h (gdb_pretty_print_insn): Delete declaration.
14411         (gdb_pretty_print_disassembler): New class.
14412         * record-btrace.c (btrace_insn_history): Use
14413         gdb_pretty_print_disassembler.
14414
14415 2017-02-02  Pedro Alves  <palves@redhat.com>
14416
14417         * ada-lang.c (type_as_string): Use string_file.
14418         * ada-valprint.c (ada_print_floating): Use string_file.
14419         * ada-varobj.c (ada_varobj_scalar_image)
14420         (ada_varobj_get_value_image): Use string_file.
14421         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14422         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14423         * breakpoint.c (update_inserted_breakpoint_locations)
14424         (insert_breakpoint_locations, reattach_breakpoints)
14425         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14426         (print_it_watchpoint): Use string_file.
14427         (save_breakpoints): Use stdio_file.
14428         * c-exp.y (oper): Use string_file.
14429         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14430         tee_file.
14431         (pop_output_files): Use delete.
14432         (handle_redirections): Use stdio_file and tee_file.
14433         * cli/cli-setshow.c (do_show_command): Use string_file.
14434         * compile/compile-c-support.c (c_compute_program): Use
14435         string_file.
14436         * compile/compile-c-symbols.c (generate_vla_size): Take a
14437         'string_file &' instead of a 'ui_file *'.
14438         (generate_c_for_for_one_variable): Take a 'string_file &' instead
14439         of a 'ui_file *'.  Use string_file.
14440         (generate_c_for_variable_locations): Take a 'string_file &'
14441         instead of a 'ui_file *'.
14442         * compile/compile-internal.h (generate_c_for_for_one_variable):
14443         Take a 'string_file &' instead of a 'ui_file *'.
14444         * compile/compile-loc2c.c (push, pushf, unary, binary)
14445         (print_label, pushf_register_address, pushf_register)
14446         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14447         'ui_file *'.  Adjust.
14448         * compile/compile.c (compile_to_object): Use string_file.
14449         * compile/compile.h (compile_dwarf_expr_to_c)
14450         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14451         'ui_file *'.
14452         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14453         (replace_typedefs_qualified_name): Use string_file and
14454         obstack_copy0.
14455         * disasm.c (gdb_pretty_print_insn): Use string_file.
14456         (gdb_disassembly): Adjust reference the null_stream global.
14457         (do_ui_file_delete): Delete.
14458         (gdb_insn_length): Use null_stream.
14459         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14460         * dwarf2loc.c (dwarf2_compile_property_to_c)
14461         (locexpr_generate_c_location, loclist_generate_c_location): Take a
14462         'string_file &' instead of a 'ui_file *'.
14463         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14464         * dwarf2read.c (do_ui_file_peek_last): Delete.
14465         (dwarf2_compute_name): Use string_file.
14466         * event-top.c (gdb_setup_readline): Use stdio_file.
14467         * gdbarch.sh (verify_gdbarch): Use string_file.
14468         * gdbtypes.c (safe_parse_type): Use null_stream.
14469         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14470         string_file.
14471         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14472         'string_file *' instead of a 'ui_file *'.
14473         (gdbscm_arch_disassemble): Use string_file.
14474         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14475         * guile/scm-ports.c (class ioscm_file_port): Now a class that
14476         inherits from ui_file.
14477         (ioscm_file_port_delete, ioscm_file_port_rewind)
14478         (ioscm_file_port_put): Delete.
14479         (ioscm_file_port_write): Rename to ...
14480         (ioscm_file_port::write): ... this.  Remove file_port_magic
14481         checks.
14482         (ioscm_file_port_new): Delete.
14483         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14484         ui_file_up.
14485         * guile/scm-type.c (tyscm_type_name): Use string_file.
14486         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14487         Use string_file.
14488         * infcmd.c (print_return_value_1): Use string_file.
14489         * infrun.c (print_target_wait_results): Use string_file.
14490         * language.c (add_language): Use string_file.
14491         * location.c (explicit_to_string_internal): Use string_file.
14492         * main.c (captured_main_1): Use null_file.
14493         * maint.c (maintenance_print_architecture): Use stdio_file.
14494         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14495         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14496         event_channel>: Change type to mi_console_file pointer.
14497         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14498         (mi_console_file_delete): Delete.
14499         (struct mi_console_file): Delete.
14500         (mi_console_file_magic): Delete.
14501         (mi_console_file_new): Delete.
14502         (mi_console_file::mi_console_file): New.
14503         (mi_console_file_delete): Delete.
14504         (mi_console_file_fputs): Delete.
14505         (mi_console_file::write): New.
14506         (mi_console_raw_packet): Delete.
14507         (mi_console_file::flush): New.
14508         (mi_console_file_flush): Delete.
14509         (mi_console_set_raw): Rename to ...
14510         (mi_console_file::set_raw): ... this.
14511         * mi/mi-console.h (class mi_console_file): New class.
14512         (mi_console_file_new, mi_console_set_raw): Delete.
14513         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14514         (mi_set_logging): Use delete and tee_file.  Adjust.
14515         * mi/mi-main.c (output_register): Use string_file.
14516         (mi_cmd_data_evaluate_expression): Use string_file.
14517         (mi_cmd_data_read_memory): Use string_file.
14518         (mi_cmd_execute, print_variable_or_computed): Use string_file.
14519         * mi/mi-out.c (mi_ui_out::main_stream): New.
14520         (mi_ui_out::rewind): Use main_stream and
14521         string_file.
14522         (mi_ui_out::put): Use main_stream and string_file.
14523         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14524         Allocate a 'string_file' instead.
14525         (mi_out_new): Don't allocate a mem_fileopen stream here.
14526         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14527         (mi_ui_out::main_stream): Declare method.
14528         * printcmd.c (eval_command): Use string_file.
14529         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14530         * python/py-arch.c (archpy_disassemble): Use string_file.
14531         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14532         * python/py-frame.c (frapy_str): Use string_file.
14533         * python/py-framefilter.c (py_print_type, py_print_single_arg):
14534         Use string_file.
14535         * python/py-type.c (typy_str): Use string_file.
14536         * python/py-unwind.c (unwind_infopy_str): Use string_file.
14537         * python/py-value.c (valpy_str): Use string_file.
14538         * record-btrace.c (btrace_insn_history): Use string_file.
14539         * regcache.c (regcache_print): Use stdio_file.
14540         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14541         * remote.c (escape_buffer): Use string_file.
14542         * rust-lang.c (rust_get_disr_info): Use string_file.
14543         * serial.c (serial_open_ops_1): Use stdio_file.
14544         (do_serial_close): Use delete.
14545         * stack.c (print_frame_arg): Use string_file.
14546         (print_frame_args): Remove local mem_fileopen stream, not used.
14547         (print_frame): Use string_file.
14548         * symmisc.c (maintenance_print_symbols): Use stdio_file.
14549         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14550         Take a 'string_file *' instead of a 'ui_file *'.
14551         * top.c (new_ui): Use stdio_file and stderr_file.
14552         (free_ui): Use delete.
14553         (execute_command_to_string): Use string_file.
14554         (quit_confirm): Use string_file.
14555         * tracepoint.c (collection_list::append_exp): Use string_file.
14556         * tui/tui-disasm.c (tui_disassemble): Use string_file.
14557         * tui/tui-file.c: Don't include "ui-file.h".
14558         (enum streamtype, struct tui_stream): Delete.
14559         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14560         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14561         (tui_file::tui_file): New method.
14562         (tui_file_fputs): Delete.
14563         (tui_file_get_strbuf): Delete.
14564         (tui_file::puts): New method.
14565         (tui_file_adjust_strbuf): Delete.
14566         (tui_file_flush): Delete.
14567         (tui_file::flush): New method.
14568         * tui/tui-file.h: Tweak intro comment.
14569         Include ui-file.h.
14570         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14571         (tui_file_adjust_strbuf): Delete declarations.
14572         (class tui_file): New class.
14573         * tui/tui-io.c (tui_initialize_io): Use tui_file.
14574         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14575         (tui_register_format): Use string_stream.
14576         * tui/tui-stack.c (tui_make_status_line): Use string_file.
14577         (tui_get_function_from_frame): Use string_file.
14578         * typeprint.c (type_to_string): Use string_file.
14579         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14580         (null_stream): New global.
14581         (ui_file_delete): Delete.
14582         (ui_file::ui_file): New.
14583         (null_file_isatty): Delete.
14584         (ui_file::~ui_file): New.
14585         (null_file_rewind): Delete.
14586         (ui_file::printf): New.
14587         (null_file_put): Delete.
14588         (null_file_flush): Delete.
14589         (ui_file::putstr): New.
14590         (null_file_write): Delete.
14591         (ui_file::putstrn): New.
14592         (null_file_read): Delete.
14593         (ui_file::putc): New.
14594         (null_file_fputs): Delete.
14595         (null_file_write_async_safe): Delete.
14596         (ui_file::vprintf): New.
14597         (null_file_delete): Delete.
14598         (null_file::write): New.
14599         (null_file_fseek): Delete.
14600         (null_file::puts): New.
14601         (ui_file_data): Delete.
14602         (null_file::write_async_safe): New.
14603         (gdb_flush, ui_file_isatty): Adjust.
14604         (ui_file_put, ui_file_rewind): Delete.
14605         (ui_file_write): Adjust.
14606         (ui_file_write_for_put): Delete.
14607         (ui_file_write_async_safe, ui_file_read): Adjust.
14608         (ui_file_fseek): Delete.
14609         (fputs_unfiltered): Adjust.
14610         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14611         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14612         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14613         (set_ui_file_data): Delete.
14614         (string_file::~string_file, string_file::write)
14615         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14616         (do_ui_file_as_string, ui_file_as_string): Delete.
14617         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14618         (struct mem_file): Delete.
14619         (mem_file_new): Delete.
14620         (stdio_file::stdio_file): New.
14621         (mem_file_delete): Delete.
14622         (stdio_file::stdio_file): New.
14623         (mem_fileopen): Delete.
14624         (stdio_file::~stdio_file): New.
14625         (mem_file_rewind): Delete.
14626         (stdio_file::set_stream): New.
14627         (mem_file_put): Delete.
14628         (stdio_file::open): New.
14629         (mem_file_write): Delete.
14630         (stdio_file_magic, struct stdio_file): Delete.
14631         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14632         (stdio_file::flush): New.
14633         (stdio_file_read): Rename to ...
14634         (stdio_file::read): ... this.  Adjust.
14635         (stdio_file_write): Rename to ...
14636         (stdio_file::write): ... this.  Adjust.
14637         (stdio_file_write_async_safe): Rename to ...
14638         (stdio_file::write_async_safe) ... this.  Adjust.
14639         (stdio_file_fputs): Rename to ...
14640         (stdio_file::puts) ... this.  Adjust.
14641         (stdio_file_isatty): Delete.
14642         (stdio_file_fseek): Delete.
14643         (stdio_file::isatty): New.
14644         (stderr_file_write): Rename to ...
14645         (stderr_file::write) ... this.  Adjust.
14646         (stderr_file_fputs): Rename to ...
14647         (stderr_file::puts) ... this.  Adjust.
14648         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14649         (stderr_file::stderr_file): New.
14650         (tee_file_magic): Delete.
14651         (struct tee_file): Delete.
14652         (tee_file::tee_file): New.
14653         (tee_file_new): Delete.
14654         (tee_file::~tee_file): New.
14655         (tee_file_delete): Delete.
14656         (tee_file_flush): Rename to ...
14657         (tee_file::flush): ... this.  Adjust.
14658         (tee_file_write): Rename to ...
14659         (tee_file::write): ... this.  Adjust.
14660         (tee_file::write_async_safe): New.
14661         (tee_file_fputs): Rename to ...
14662         (tee_file::puts): ... this.  Adjust.
14663         (tee_file_isatty): Rename to ...
14664         (tee_file::isatty): ... this.  Adjust.
14665         * ui-file.h (struct obstack, struct ui_file): Don't
14666         forward-declare.
14667         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14668         (ui_file_write_ftype)
14669         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14670         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14671         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14672         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14673         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14674         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14675         (set_ui_file_fseek): Delete.
14676         (ui_file_data, ui_file_delete, ui_file_rewind)
14677         (struct ui_file): New.
14678         (ui_file_up): New.
14679         (class null_file): New.
14680         (null_stream): Declare.
14681         (ui_file_write_for_put, ui_file_put): Delete.
14682         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14683         Delete.
14684         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14685         (gdb_fopen, tee_file_new): Delete.
14686         (struct string_file): New.
14687         (struct stdio_file): New.
14688         (stdio_file_up): New.
14689         (struct stderr_file): New.
14690         (class tee_file): New.
14691         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14692         of a 'ui_file *'.  Adjust.
14693         * ui-out.h (class ui_out) <field_stream>: Likewise.
14694         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14695         (null_stream): Delete.
14696         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14697         Adjust.
14698         * utils.h (struct ui_file): Delete forward declaration..
14699         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14700         (error_stream): Take a 'string_file &' instead of a
14701         'ui_file *'.
14702         * varobj.c (varobj_value_get_print_value): Use string_file.
14703         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14704         * gdbarch.c: Regenerate.
14705
14706 2017-02-02  Pedro Alves  <palves@redhat.com>
14707
14708         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14709         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
14710         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
14711         Adjust to call gdb_print_insn instead of
14712         gdb_disassembler::print_insn.
14713         (dump_insns, do_mixed_source_and_assembly_deprecated)
14714         (do_mixed_source_and_assembly, do_assembly_only): Add back a
14715         'gdbarch' parameter.  Remove gdb_disassembler parameter.
14716         (gdb_disassembly): Don't allocate a gdb_disassembler here.
14717         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14718         declaration.
14719         (gdb_pretty_print_insn): Re-add declaration.
14720         * record-btrace.c (btrace_insn_history): Don't allocate a
14721         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
14722
14723 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
14724
14725         * disasm.h (gdb_disassembly): Remove file_string parameter.
14726         * disasm.c (gdb_disassembly): Likewise.
14727         * cli/cli-cmds.c (print_disassembly): Adapt.
14728         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14729         * stack.c (do_gdb_disassembly): Likewise.
14730
14731 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14732
14733         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14734         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14735         targets.  And if the implicit value is longer than needed, extract
14736         the first bytes instead of the "least significant" ones.
14737
14738 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14739
14740         * btrace.c (btrace_enable): Do not call btrace_add_pc for
14741         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14742         (btrace_fetch): Assert can_access_registers_ptid.
14743         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14744         validate_registers_access.
14745
14746 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14747
14748         * gdbthread.h (can_access_registers_ptid): New.
14749         * thread.c (can_access_registers_ptid): New.
14750
14751 2017-02-01  Pedro Alves  <palves@redhat.com>
14752
14753         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14754
14755 2017-01-31  Pedro Alves  <palves@redhat.com>
14756
14757         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
14758         Fix typos.
14759
14760 2017-01-31  Pedro Alves  <palves@redhat.com>
14761
14762         * stack.c (print_frame_args): Remove local mem_fileopen stream,
14763         not used.
14764
14765 2017-01-31  Pedro Alves  <palves@redhat.com>
14766
14767         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
14768
14769 2017-01-31  Pedro Alves  <palves@redhat.com>
14770
14771         * common/scoped_restore.h
14772         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
14773         change the value's parameter type to T2.
14774         (make_scoped_restore): Likewise.
14775
14776 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14777             Richard Henderson  <rth@redhat.com>
14778
14779         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
14780         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
14781         GS_BASE for older kernels.
14782         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
14783         GS_BASE for older kernels.
14784         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
14785         and GS_BASE to the offset table.
14786         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
14787         system register group.
14788         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
14789         for older kernels.
14790         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
14791         amd64 ABI.
14792         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
14793         AMD64_GSBASE_REGNUM.
14794         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
14795         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
14796         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
14797         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
14798         i386/64bit-segments.xml in those rules.
14799         * features/i386/64bit-segments.xml: New file.
14800         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
14801         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
14802         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
14803         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
14804         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
14805         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
14806         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
14807         * features/i386/amd64-avx-linux.c: Regenerated.
14808         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
14809         * features/i386/amd64-avx-mpx.c: Regenerated.
14810         * features/i386/amd64-avx512-linux.c: Regenerated.
14811         * features/i386/amd64-linux.c: Regenerated.
14812         * features/i386/amd64-mpx-linux.c: Regenerated.
14813         * features/i386/i386-avx-mpx-linux.c: Regenerated.
14814         * features/i386/i386-avx-mpx.c: Regenerated.
14815         * features/i386/x32-avx-linux.c: Regenerated.
14816         * features/i386/x32-avx512-linux.c: Regenerated.
14817         * regformats/i386/amd64-avx-linux.dat: Regenerated.
14818         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
14819         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
14820         * regformats/i386/amd64-linux.dat: Regenerated.
14821         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
14822         * regformats/i386/x32-avx-linux.dat: Regenerated.
14823         * regformats/i386/x32-avx512-linux.dat: Regenerated.
14824         * regformats/i386/x32-linux.dat: Regenerated.
14825
14826 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14827
14828         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
14829         Set to AMD64_NUM_REGS.
14830
14831 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14832
14833         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
14834         that checks validity of a register number.
14835
14836 2017-01-27  Kees Cook  <keescook@google.com>
14837
14838         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
14839         fetch_fpregs if target has fpa registers.
14840         (arm_linux_store_inferior_registers): Call store_fpregs if target
14841         has fpa registers.
14842
14843 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14844
14845         * cris-tdep.c (cris_gdbarch_init): Remove check for
14846         info.byte_order and force it to BFD_ENDIAN_LITTLE.
14847
14848 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
14849
14850         * corelow.c (get_core_register_section): Check for regset
14851         existence before checking for REGSET_VARIABLE_SIZE.
14852
14853 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14854             Pedro Alves  <palves@redhat.com>
14855
14856         PR gdb/20939
14857         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
14858         call memory_error, save memaddr instead.
14859         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
14860         negative, cal memory_error.
14861         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
14862
14863 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14864
14865         * disasm-selftests.c (memory_error_test): New function.
14866         (_initialize_disasm_selftests): Register memory_error_test.
14867
14868 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14869
14870         * Makefile.in (SFILES): Add disasm-selftests.c and
14871         selftest-arch.c.
14872         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
14873         * disasm-selftests.c: New file.
14874         * selftest-arch.c: New file.
14875         * selftest-arch.h: New file.
14876
14877 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14878
14879         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
14880         to bfd_arch_mep.  Don't return 0 if section is not
14881         found.  Call print_insn_mep.
14882
14883 2017-01-26  Pedro Alves  <palves@redhat.com>
14884             Yao Qi  <yao.qi@linaro.org>
14885
14886         * arm-tdep.c: Include "disasm.h".
14887         (gdb_print_insn_arm): Update code to get gdbarch.
14888         * disasm.c (dis_asm_read_memory): Change it to
14889         gdb_disassembler::dis_asm_read_memory.
14890         (dis_asm_memory_error): Likewise.
14891         (dis_asm_print_address): Likewise.
14892         (gdb_pretty_print_insn): Change it to
14893         gdb_disassembler::pretty_print_insn.
14894         (dump_insns): Add one argument gdb_disassemlber.  All
14895         callers updated.
14896         (do_mixed_source_and_assembly_deprecated): Likewise.
14897         (do_mixed_source_and_assembly): Likewise.
14898         (do_assembly_only): Likewise.
14899         (gdb_disassembler::gdb_disassembler): New.
14900         (gdb_disassembler::print_insn): New.
14901         * disasm.h (class gdb_disassembler): New.
14902         (gdb_pretty_print_insn): Remove declaration.
14903         (gdb_disassemble_info): Likewise.
14904         * guile/scm-disasm.c (class gdbscm_disassembler): New.
14905         (gdbscm_disasm_read_memory_worker): Update.
14906         (gdbscm_disasm_read_memory): Update.
14907         (gdbscm_disasm_memory_error): Remove.
14908         (gdbscm_disasm_print_address): Remove.
14909         (gdbscm_disassembler::gdbscm_disassembler): New.
14910         (gdbscm_print_insn_from_port): Update.
14911         * mips-tdep.c: Include disasm.h.
14912         (gdb_print_insn_mips): Update code to get gdbarch.
14913         * record-btrace.c (btrace_insn_history): Update.
14914         * spu-tdep.c: Include disasm.h.
14915         (struct spu_dis_asm_data): Remove.
14916         (struct spu_dis_asm_info): New.
14917         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
14918         SPU id.
14919         (gdb_print_insn_spu): Cast disassemble_info to
14920         spu_dis_asm_info.
14921
14922 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14923
14924         * disasm.c (do_ui_file_delete): Delete.
14925         (gdb_insn_length): Move code creating stream to ...
14926         * utils.c (null_stream): ... here.  New function.
14927         * utils.h (null_stream): Declare.
14928
14929 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
14930
14931         * python/py-inferior.c (find_thread_object): Return directly
14932         from the loop.  Remove "found" variable.
14933
14934 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
14935
14936         GDB 7.12.1 released.
14937
14938 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14939
14940         * python/py-function.c (fnpy_call): Reorder declarations to have
14941         the gdbpy_enter object declared first.
14942         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
14943
14944 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14945
14946         PR python/21068
14947         * python/python-internal.h (PyMem_RawMalloc): Define for
14948         Python < 3.4.
14949         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
14950         PyMem_RawMalloc instead of PyMem_Malloc.
14951
14952 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
14953             Luis Machado  <lgustavo@codesourcery.com>
14954
14955         * NEWS (New commands): Mention flash-erase.
14956         (New MI commands): Mention target-flash-erase.
14957         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
14958         command.
14959         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
14960         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
14961         * target.c (flash_erase_command): New function.
14962         (initialize_targets): Add new flash-erase command.
14963         * target.h (flash_erase_command): New declaration.
14964
14965 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
14966
14967         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
14968         HAVE_SYS_PROCFS_H is defined.
14969
14970 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14971
14972         * remote.c (struct cached_reg): Change data into a pointer.
14973         * (stop_reply_dtr): Free data pointers before deleting vector.
14974         (process_stop_reply): Likewise.
14975         (remote_parse_stop_reply): Allocate space for data
14976
14977 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14978
14979         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
14980         MAX_REGISTER_SIZE.
14981         (amd64_pseudo_register_read_value): Likewise.
14982         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
14983         (store_register_using_P): Likewise.
14984         * regcache.c (regcache_xfer_part): Likewise.
14985
14986 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
14987
14988         Split real and pseudo registers.
14989         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
14990         (sparc32_pseudo_regnum): New enum.
14991         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
14992         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
14993         (SPARC32_CP0_REGISTERS): New macro.
14994         (sparc32_pseudo_register_name): New function.
14995         (sparc32_register_name): Use sparc32_pseudo_register_name.
14996         (sparc32_pseudo_register_type): New function.
14997         (sparc32_register_type): Use sparc32_pseudo_register_type.
14998         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
14999         pseudo register numbers.
15000         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15001         (SPARC64_CP0_REGISTERS): New macro.
15002         (sparc64_pseudo_register_name): New function.
15003         (sparc64_register_name): Use sparc64_pseudo_register_name.
15004         (sparc64_pseudo_register_type): New function.
15005         (sparc64_register_type): Use sparc64_pseudo_register_type.
15006         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15007         pseudo register numbers.
15008         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15009         sparc64_store_arguments): Handle pseudo register numbers.
15010
15011 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15012
15013         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15014         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15015         output.
15016         (getpkt_or_notif_sane_1): Likewise.
15017
15018 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15019
15020         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15021         of CC.  Pass "-x c++-header" instead of "-x c".
15022
15023 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15024
15025         * remote.c (remote_can_async_p): Update comment.
15026
15027 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15028
15029         * linux-nat.c (linux_nat_can_async_p): Update comment.
15030
15031 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15032
15033         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15034
15035 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
15036
15037         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15038
15039 2017-01-10  Tom Tromey  <tom@tromey.com>
15040
15041         * python/py-type.c (typy_legacy_template_argument): Update.
15042         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15043         ~demangle_parse_info): Declare new members.
15044         (cp_demangled_name_to_comp): Return unique_ptr.
15045         (cp_demangled_name_parse_free)
15046         (make_cleanup_cp_demangled_name_parse_free)
15047         (cp_new_demangle_parse_info): Remove.
15048         * cp-support.c (do_demangled_name_parse_free_cleanup)
15049         (make_cleanup_cp_demangled_name_parse_free): Remove.
15050         (inspect_type, cp_canonicalize_string_full)
15051         (cp_canonicalize_string): Update.
15052         (mangled_name_to_comp): Change return type.
15053         (cp_class_name_from_physname, method_name_from_physname)
15054         (cp_func_name, cp_remove_params): Update.
15055         * cp-name-parser.y (demangle_parse_info): New constructor, from
15056         cp_new_demangle_parse_info.
15057         (~demangle_parse_info): New destructor, from
15058         cp_demangled_name_parse_free.
15059         (cp_merge_demangle_parse_infos): Update.
15060         (cp_demangled_name_to_comp): Change return type.
15061
15062 2017-01-10  Tom Tromey  <tom@tromey.com>
15063
15064         * top.c (prevent_dont_repeat): Change return type.
15065         * python/python.c (execute_gdb_command): Use std::string.
15066         Update.
15067         * guile/guile.c (gdbscm_execute_gdb_command): Update.
15068         * command.h (prevent_dont_repeat): Change return type.
15069         * breakpoint.c (bpstat_do_actions_1): Update.
15070
15071 2017-01-10  Tom Tromey  <tom@tromey.com>
15072
15073         * value.h (scoped_value_mark::~scoped_value_mark): Call
15074         free_to_mark.
15075         (scoped_value_mark::free_to_mark): New method.
15076         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15077         scoped_value_mark.
15078
15079 2017-01-10  Tom Tromey  <tom@tromey.com>
15080
15081         * python/py-value.c (valpy_dereference, valpy_referenced_value)
15082         (valpy_reference_value, valpy_const_value, valpy_get_address)
15083         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15084         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15085         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15086         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15087         scoped_value_mark.
15088         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15089         * value.h (scoped_value_mark): New class.
15090
15091 2017-01-10  Tom Tromey  <tom@tromey.com>
15092
15093         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15094         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15095         * psymtab.c (discard_psymtabs_upto): Remove.
15096         (make_cleanup_discard_psymtabs): Remove.
15097         (struct psymtab_state): Remove.
15098
15099 2017-01-10  Tom Tromey  <tom@tromey.com>
15100
15101         * record-full.c (record_full_save_cleanups): Remove.
15102         (record_full_save): Use gdb::unlinker.
15103         * gcore.c (do_bfd_delete_cleanup): Remove.
15104         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
15105         cleanups.
15106         * dwarf2read.c (unlink_if_set): Remove.
15107         (write_psymtabs_to_index): Use gdb::unlinker.
15108         * common/gdb_unlinker.h: New file.
15109
15110 2017-01-10  Tom Tromey  <tom@tromey.com>
15111
15112         * windows-tdep.c (windows_xfer_shared_library): Update.
15113         * windows-nat.c (windows_make_so): Update.
15114         * utils.h (make_cleanup_bfd_unref): Remove.
15115         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15116         * symfile.h (symfile_bfd_open)
15117         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15118         * symfile.c (read_symbols, symbol_file_add)
15119         (separate_debug_file_exists): Update.
15120         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15121         (generic_load, reread_symbols): Update.
15122         * symfile-mem.c (symbol_file_add_from_memory): Update.
15123         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15124         (spu_symbol_file_add_from_memory): Update.
15125         * solist.h (struct target_so_ops) <bfd_open>: Return
15126         gdb_bfd_ref_ptr.
15127         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15128         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15129         gdb_bfd_ref_ptr.
15130         (solib_map_sections, reload_shared_libraries_1): Update.
15131         * solib-svr4.c (enable_break): Update.
15132         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15133         * solib-frv.c (enable_break2): Update.
15134         * solib-dsbt.c (enable_break): Update.
15135         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15136         gdb_bfd_ref_ptr.
15137         (darwin_solib_get_all_image_info_addr_at_init): Update.
15138         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15139         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15140         * record-full.c (record_full_save): Update.
15141         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15142         * procfs.c (insert_dbx_link_bpt_in_file): Update.
15143         * minidebug.c (find_separate_debug_file_in_section): Return
15144         gdb_bfd_ref_ptr.
15145         * machoread.c (macho_add_oso_symfile): Change abfd to
15146         gdb_bfd_ref_ptr.
15147         (macho_symfile_read_all_oso): Update.
15148         (macho_check_dsym): Return gdb_bfd_ref_ptr.
15149         (macho_symfile_read): Update.
15150         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15151         (jit_bfd_try_read_symtab): Update.
15152         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15153         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15154         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15155         gdb_bfd_ref_ptr.
15156         (gdb_bfd_ref_policy): New struct.
15157         (gdb_bfd_ref_ptr): New typedef.
15158         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15159         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15160         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15161         gdb_bfd_ref_ptr.
15162         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15163         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15164         (gcore_command): Update.
15165         * exec.c (exec_file_attach): Update.
15166         * elfread.c (elf_symfile_read): Update.
15167         * dwarf2read.c (dwarf2_get_dwz_file): Update.
15168         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15169         (open_and_init_dwo_file): Update.
15170         (open_dwp_file): Return gdb_bfd_ref_ptr.
15171         (open_and_init_dwp_file): Update.
15172         * corelow.c (core_open): Update.
15173         * compile/compile-object-load.c (compile_object_load): Update.
15174         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15175         * coffread.c (coff_symfile_read): Update.
15176         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15177         gdb_bfd_ref_ptr.  Rename.
15178         (dump_bfd_file, restore_command): Update.
15179         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15180         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15181         (find_separate_debug_file_by_buildid): Update.
15182
15183 2017-01-10  Tom Tromey  <tom@tromey.com>
15184
15185         * common/gdb_ref_ptr.h: New file.
15186         * python/py-ref.h (struct gdbpy_ref_policy): New.
15187         (gdbpy_ref): Now a typedef.
15188
15189 2017-01-10  Tom Tromey  <tom@tromey.com>
15190
15191         * utils.h (make_cleanup_htab_delete): Don't declare.
15192         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15193         Remove.
15194         * linespec.c (decode_compound_collector): Add constructor,
15195         destructor.
15196         (lookup_prefix_sym): Remove cleanup.
15197         (symtab_collector): Add constructor, destructor.
15198         (collect_symtabs_from_filename): Remove cleanup.
15199         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15200         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15201         Use htab_up.
15202         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15203         * dwarf2read.c (dw2_expand_symtabs_matching)
15204         (dw2_map_symbol_filenames, dwarf_decode_macros)
15205         (write_psymtabs_to_index): Use htab_up.
15206         * dwarf2loc.c (func_verify_no_selftailcall)
15207         (call_site_find_chain_1, func_verify_no_selftailcall)
15208         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15209         std::vector, gdb::unique_xmalloc_ptr.
15210         (call_sitep): Remove typedef.
15211         (dwarf2_locexpr_baton_eval): Remove unused variable.
15212
15213 2017-01-10  Tom Tromey  <tom@tromey.com>
15214
15215         * python/python-internal.h (make_cleanup_py_decref)
15216         (make_cleanup_py_xdecref): Don't declare.
15217         * python/py-utils.c (py_decref, make_cleanup_py_decref)
15218         (py_xdecref, make_cleanup_py_xdecref): Remove.
15219
15220 2017-01-10  Tom Tromey  <tom@tromey.com>
15221
15222         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15223         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15224
15225 2017-01-10  Tom Tromey  <tom@tromey.com>
15226
15227         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15228
15229 2017-01-10  Tom Tromey  <tom@tromey.com>
15230
15231         * python/py-utils.c (unicode_to_encoded_string)
15232         (python_string_to_target_string)
15233         (python_string_to_target_python_string)
15234         (python_string_to_host_string, gdbpy_obj_to_string)
15235         (get_addr_from_python): Use gdbpy_ref.
15236
15237 2017-01-10  Tom Tromey  <tom@tromey.com>
15238
15239         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15240         gdbpy_ref.
15241
15242 2017-01-10  Tom Tromey  <tom@tromey.com>
15243
15244         * python/python.c (eval_python_command, gdbpy_decode_line)
15245         (gdbpy_run_events, gdbpy_start_type_printers)
15246         (gdbpy_apply_type_printers): Use gdbpy_ref.
15247
15248 2017-01-10  Tom Tromey  <tom@tromey.com>
15249
15250         * python/py-param.c (get_doc_string, compute_enum_values): Use
15251         gdbpy_ref.
15252
15253 2017-01-10  Tom Tromey  <tom@tromey.com>
15254
15255         * python/py-inferior.c (find_thread_object, build_inferior_list):
15256         Use gdbpy_ref.
15257
15258 2017-01-10  Tom Tromey  <tom@tromey.com>
15259
15260         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15261
15262 2017-01-10  Tom Tromey  <tom@tromey.com>
15263
15264         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15265         gdbpy_ref.
15266
15267 2017-01-10  Tom Tromey  <tom@tromey.com>
15268
15269         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
15270         extra incref.
15271         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15272         Use gdbpy_ref.
15273
15274 2017-01-10  Tom Tromey  <tom@tromey.com>
15275
15276         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15277         gdbpy_ref.
15278
15279 2017-01-10  Tom Tromey  <tom@tromey.com>
15280
15281         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
15282         decref results of PyArg_ParseTupleAndKeywords.
15283
15284 2017-01-10  Tom Tromey  <tom@tromey.com>
15285
15286         * python/python.c (python_run_simple_file): Use
15287         unique_xmalloc_ptr, gdbpy_ref.
15288
15289 2017-01-10  Tom Tromey  <tom@tromey.com>
15290
15291         * python/py-prettyprint.c (print_stack_unless_memory_error)
15292         (print_string_repr, print_children): Use gdbpy_ref.
15293         (dummy_python_frame): New class.
15294         (dummy_python_frame::dummy_python_frame): Rename from
15295         push_dummy_python_frame.
15296         (py_restore_tstate): Remove.
15297
15298 2017-01-10  Tom Tromey  <tom@tromey.com>
15299
15300         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15301
15302 2017-01-10  Tom Tromey  <tom@tromey.com>
15303
15304         * python/python.c (ensure_python_env, restore_python_env):
15305         Remove.
15306         * python/python-internal.h (ensure_python_env): Don't declare.
15307         * varobj.h (varobj_ensure_python_env): Don't declare.
15308         * varobj.c (varobj_ensure_python_env): Remove.
15309
15310 2017-01-10  Tom Tromey  <tom@tromey.com>
15311
15312         * varobj.c (varobj_value_get_print_value): Use
15313         gdbpy_enter_varobj.
15314
15315 2017-01-10  Tom Tromey  <tom@tromey.com>
15316
15317         * python/py-prettyprint.c (print_string_repr, print_children):
15318         Update.
15319         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15320         of "encoding".
15321         * varobj.c (varobj_value_get_print_value): Update.
15322         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15323
15324 2017-01-10  Tom Tromey  <tom@tromey.com>
15325
15326         * varobj.c (varobj_get_display_hint)
15327         (dynamic_varobj_has_child_method, install_new_value_visualizer)
15328         (varobj_set_visualizer, free_variable): Use
15329         gdbpy_enter_varobj.
15330
15331 2017-01-10  Tom Tromey  <tom@tromey.com>
15332
15333         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15334         (do_finish_initialization): New function.  Use gdbpy_ref.
15335         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
15336         do_finish_initialization.
15337
15338 2017-01-10  Tom Tromey  <tom@tromey.com>
15339
15340         * python/py-param.c (get_set_value, get_show_value): Use
15341         gdbpy_enter, gdbpy_ref.
15342
15343 2017-01-10  Tom Tromey  <tom@tromey.com>
15344
15345         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15346
15347 2017-01-10  Tom Tromey  <tom@tromey.com>
15348
15349         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15350
15351 2017-01-10  Tom Tromey  <tom@tromey.com>
15352
15353         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15354         Use gdbpy_enter_varobj.
15355
15356 2017-01-10  Tom Tromey  <tom@tromey.com>
15357
15358         * varobj.c (gdbpy_enter_varobj): New constructor.
15359         * python/python-internal.h (gdbpy_enter_varobj): New class.
15360         * python/py-varobj.c (py_varobj_get_iterator): Use
15361         gdbpy_enter_varobj.
15362
15363 2017-01-10  Tom Tromey  <tom@tromey.com>
15364
15365         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15366         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15367         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15368         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15369         unique_xmalloc_ptr.
15370         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15371
15372 2017-01-10  Tom Tromey  <tom@tromey.com>
15373
15374         * python/py-xmethods.c (invoke_match_method): Use
15375         gdbpy_ref.
15376
15377 2017-01-10  Tom Tromey  <tom@tromey.com>
15378
15379         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15380         gdbpy_enter, gdbpy_ref.
15381
15382 2017-01-10  Tom Tromey  <tom@tromey.com>
15383
15384         * python/python.c (python_interactive_command): Use gdbpy_enter.
15385
15386 2017-01-10  Tom Tromey  <tom@tromey.com>
15387
15388         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15389         gdbpy_ref.
15390
15391 2017-01-10  Tom Tromey  <tom@tromey.com>
15392
15393         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15394         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15395
15396 2017-01-10  Tom Tromey  <tom@tromey.com>
15397
15398         * utils.h (htab_deleter): New struct.
15399         (htab_up): New typedef.
15400         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15401         gdbpy_enter, gdbpy_ref, htab_up.
15402
15403 2017-01-10  Tom Tromey  <tom@tromey.com>
15404
15405         * python/py-unwind.c (pending_frame_invalidate): Remove.
15406         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15407
15408 2017-01-10  Tom Tromey  <tom@tromey.com>
15409
15410         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15411         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15412
15413 2017-01-10  Tom Tromey  <tom@tromey.com>
15414
15415         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15416
15417 2017-01-10  Tom Tromey  <tom@tromey.com>
15418
15419         * python/python.c (gdbpy_eval_from_control_command)
15420         (gdbpy_source_script, gdbpy_run_events)
15421         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15422         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15423         gdbpy_enter.
15424
15425 2017-01-10  Tom Tromey  <tom@tromey.com>
15426
15427         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15428
15429 2017-01-10  Tom Tromey  <tom@tromey.com>
15430
15431         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15432
15433 2017-01-10  Tom Tromey  <tom@tromey.com>
15434
15435         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15436         (python_on_inferior_call_pre, python_on_inferior_call_post)
15437         (python_on_memory_change, python_on_register_change)
15438         (python_inferior_exit, python_new_objfile, add_thread_object)
15439         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15440
15441 2017-01-10  Tom Tromey  <tom@tromey.com>
15442
15443         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15444         (bpfinishpy_handle_exit): Use gdbpy_enter.
15445
15446 2017-01-10  Tom Tromey  <tom@tromey.com>
15447
15448         * python/py-cmd.c (cmdpy_destroyer)
15449         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15450         gdbpy_enter.
15451
15452 2017-01-10  Tom Tromey  <tom@tromey.com>
15453
15454         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15455         gdbpy_enter.
15456         (gdbpy_breakpoint_has_cond): Likewise.
15457
15458 2017-01-10  Tom Tromey  <tom@tromey.com>
15459
15460         * python/python.c (gdbpy_enter): New constructor.
15461         (~gdbpy_enter): New destructor.
15462         (restore_python_env, ensure_python_env): Rewrite.
15463         * python/python-internal.h (gdbpy_enter): New class.
15464
15465 2017-01-10  Tom Tromey  <tom@tromey.com>
15466
15467         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15468
15469 2017-01-10  Tom Tromey  <tom@tromey.com>
15470
15471         * python/py-value.c (value_has_field, get_field_flag)
15472         (get_field_type, valpy_getitem, convert_value_from_python): Use
15473         gdbpy_ref.
15474
15475 2017-01-10  Tom Tromey  <tom@tromey.com>
15476
15477         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15478         gdbpy_ref.
15479
15480 2017-01-10  Tom Tromey  <tom@tromey.com>
15481
15482         * python/py-prettyprint.c (search_pp_list)
15483         (find_pretty_printer_from_objfiles)
15484         (find_pretty_printer_from_progspace)
15485         (find_pretty_printer_from_gdb, find_pretty_printer)
15486         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15487         gdbpy_ref.
15488
15489 2017-01-10  Tom Tromey  <tom@tromey.com>
15490
15491         * python/py-param.c (call_doc_function): Use gdbpy_ref.
15492
15493 2017-01-10  Tom Tromey  <tom@tromey.com>
15494
15495         * python/py-linetable.c (build_line_table_tuple_from_pcs)
15496         (ltpy_get_all_source_lines): Use gdbpy_ref.
15497
15498 2017-01-10  Tom Tromey  <tom@tromey.com>
15499
15500         * python/py-framefilter.c (extract_sym, extract_value)
15501         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15502         gdbpy_ref.
15503
15504 2017-01-10  Tom Tromey  <tom@tromey.com>
15505
15506         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15507
15508 2017-01-10  Tom Tromey  <tom@tromey.com>
15509
15510         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15511
15512 2017-01-10  Tom Tromey  <tom@tromey.com>
15513
15514         * python/py-function.c (convert_values_to_python, fnpy_init): Use
15515         gdbpy_ref.
15516
15517 2017-01-10  Tom Tromey  <tom@tromey.com>
15518
15519         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15520
15521 2017-01-10  Tom Tromey  <tom@tromey.com>
15522
15523         * python/py-type.c (convert_field, make_fielditem, typy_fields)
15524         (typy_range): Use gdbpy_ref.
15525
15526 2017-01-10  Tom Tromey  <tom@tromey.com>
15527
15528         * python/py-threadevent.c (create_thread_event_object): Use
15529         gdbpy_ref.
15530         * python/py-stopevent.c (create_stop_event_object): Simplify.
15531         (emit_stop_event): Use gdbpy_ref.
15532         * python/py-signalevent.c (create_signal_event_object): Use
15533         gdbpy_ref.
15534         * python/py-newobjfileevent.c (create_new_objfile_event_object)
15535         (emit_new_objfile_event, create_clear_objfiles_event_object)
15536         (emit_clear_objfiles_event): Use gdbpy_ref.
15537         * python/py-infevents.c (create_inferior_call_event_object)
15538         (create_register_changed_event_object)
15539         (create_memory_changed_event_object, emit_inferior_call_event)
15540         (emit_memory_changed_event, emit_register_changed_event): Use
15541         gdbpy_ref.
15542         * python/py-exitedevent.c (create_exited_event_object)
15543         (emit_exited_event): Use gdbpy_ref.
15544         * python/py-event.h (evpy_emit_event): Remove
15545         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15546         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15547         * python/py-continueevent.c (emit_continue_event): Use
15548         gdbpy_ref.
15549         * python/py-breakpoint.c (gdbpy_breakpoint_created)
15550         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15551         gdbpy_ref.
15552         * python/py-bpevent.c (create_breakpoint_event_object): Use
15553         gdbpy_ref.
15554
15555 2017-01-10  Tom Tromey  <tom@tromey.com>
15556
15557         * python/py-ref.h: New file.
15558
15559 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15560
15561         * cli-out.c (cli_ui_out::do_redirect): Change return type to
15562         void.
15563         * cli-out.h (cli_ui_out::do_redirect): Likewise.
15564         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15565         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15566         * ui-out.c (ui_out::redirect): Likewise.
15567         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15568         * cli/cli-logging.c (set_logging_redirect): Update call site of
15569         ui_out::redirect.
15570         (handle_redirections): Likewise.
15571         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15572         * top.c (execute_command_to_string): Likewise.
15573         * utils.c (do_ui_out_redirect_pop): Likewise.
15574
15575 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15576
15577         * stack.c (_initialize_stack): Update "frame" command help message.
15578
15579 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
15580
15581         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15582
15583 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15584
15585         * x86-linux-nat.h: Include gdb_proc_service.h.
15586
15587 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15588
15589         * ser-base.h: Include serial.h.
15590
15591 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15592
15593         * ppc-linux-tdep.h: Include ppc-tdep.h.
15594
15595 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15596
15597         * nat/amd64-linux-siginfo.h: Include signal.h.
15598
15599 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15600
15601         * nat/aarch64-linux-hw-point.h: Include break-common.h.
15602
15603 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15604
15605         * mi/mi-parse.h: Include mi-cmds.h.
15606
15607 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15608
15609         * inf-loop.c: Don't include "target.h".
15610         * inf-loop.h: Include it here.
15611
15612 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15613
15614         * dfp.h: Include "dboulest.h" and "expression.h".
15615
15616 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15617
15618         * ax-gdb.h: Include "ax.h".
15619
15620 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15621
15622         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15623         with nat/gdb_ptrace.h.
15624
15625 2017-01-05  Yao Qi  <yao.qi@linaro.org>
15626
15627         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15628         new line.
15629         (mips64_fbsd_sigframe_init): Likewise.
15630
15631 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15632
15633         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15634         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15635
15636 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15637
15638         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15639         * NEWS: Mention new FreeBSD/mips native configuration.
15640         * config/mips/fbsd.mh: New file.
15641         * configure.host: Add mips*-*-freebsd*.
15642         * mips-fbsd-nat.c: New file.
15643
15644 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15645
15646         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15647         (ALLDEPFILES): Add mips-fbsd-tdep.c.
15648         * NEWS: Mention new FreeBSD/mips target.
15649         * configure.tgt: Add mips*-*-freebsd*.
15650         * mips-fbsd-tdep.c: New file.
15651         * mips-fbsd-tdep.h: New file.
15652
15653 2017-01-04  Yao Qi  <yao.qi@linaro.org>
15654
15655         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15656         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15657
15658 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15659
15660         Update copyright year range in all GDB files.
15661
15662 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15663
15664         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15665
15666 For older changes see ChangeLog-2016.
15667 \f
15668 Local Variables:
15669 mode: change-log
15670 left-margin: 8
15671 fill-column: 74
15672 version-control: never
15673 coding: utf-8
15674 End: