tui-win: Replace VEC with std::vector
[external/binutils.git] / gdb / ChangeLog
1 2017-11-15  Simon Marchi  <simon.marchi@ericsson.com>
2
3         * tui/tui-win.c (window_name_completer): Replace VEC with
4         std::vector.
5
6 2017-11-15  Andrew Cagney  <cagney@gnu.org>
7
8         * MAINTAINERS: Remove no-longer applicable entries.
9
10 2017-11-15  Andrew Cagney  <cagney@gnu.org>
11
12         * MAINTAINERS: Move self to Past Maintainers.
13
14 2017-11-15  Yao Qi  <yao.qi@linaro.org>
15
16         * features/Makefile (XMLTOC): Remove nios2-linux.xml.
17         * features/nios2-linux.c: Remove.
18         * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
19         initialize_tdesc_nios2_linux.
20
21 2017-11-15  Yao Qi  <yao.qi@linaro.org>
22
23         * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
24         M68HC11_LAST_HARD_REG + 1.
25
26 2017-11-14  Paul Carroll  <pcarroll@codesourcery.com>
27
28         PR gdb/22388
29         * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
30         remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
31         Return TARGET_XFER_EOF if size of returned data is 0.
32
33 2017-11-14  Simon Marchi  <simon.marchi@ericsson.com>
34
35         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
36         memory-map-selftests.c.
37         (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
38         * memory-map.c (memory_map_start_memory): Fix computation of hi
39         address.
40         * unittests/memory-map-selftests.c: New file.
41
42 2017-11-09  Joel Brobecker  <brobecker@adacore.com>
43
44         * ada-lang.c: Fix some typos in the general command documenting
45         how Ada expressions are being evaluated and how their result
46         is printed.
47
48 2017-11-09  Tom Tromey  <tom@tromey.com>
49
50         * psymtab.c (psymbol_hash): Do not hash string contents.
51         (psymbol_compare): Add comment.
52
53 2017-11-09  Tom Tromey  <tom@tromey.com>
54
55         * dictionary.c (dict_hash): Move "TKB" check into the "switch".
56
57 2017-11-08  Joel Brobecker  <brobecker@adacore.com>
58
59         * ada-exp.y (write_var_from_sym): Remove parameter
60         "orig_left_context".  Update all callers.
61
62 2017-11-08  Simon Marchi  <simon.marchi@ericsson.com>
63
64         * tracepoint.h (class collection_list) <stringify>: Return
65         std::vector<std::string>.
66         (encode_actions_rsp): Change parameters to
67         std::vector<std::string> *.
68         * tracepoint.c (collection_list::stringify): Return
69         std::vector<std::string> and adjust accordingly.
70         (encode_actions_rsp): Changee parameters to
71         std::vector<std::string> and adjust accordingly.
72         * remote.c (free_actions_list),
73         free_actions_list_cleanup_wrapper): Remove.
74         (remote_download_tracepoint): Adjust to std::vector.
75
76 2017-11-08  Tom Tromey  <tom@tromey.com>
77
78         * dwarf2read.c (symbolp): Remove typedef.
79         (read_func_scope): Use std::vector.
80         (process_structure_scope): Use std::vector.
81
82 2017-11-08  Pedro Alves  <palves@redhat.com>
83
84         * ada-lang.c (ada_make_symbol_completion_list): Use
85         completion_skip_symbol.
86         * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
87         (symbol_is_function_or_method(symbol*)): New.
88         (add_symtab_completions): Add complete_symbol_mode parameter.  Use
89         completion_skip_symbol.
90         (default_collect_symbol_completion_matches_break_on): Use
91         completion_skip_symbol.  Pass down mode.
92         (collect_file_symbol_completion_matches): Pass down mode.
93         * symtab.h (symbol_is_function_or_method): New declarations.
94         (completion_skip_symbol): New template function.
95
96 2017-11-08  Pedro Alves  <palves@redhat.com>
97
98         * linespec.c (iterate_over_all_matching_symtabs): Add
99         search_domain parameter.  Pass it down to expand_symtabs_matching.
100         (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
101         (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
102         search_domain.
103         (add_all_symbol_names_from_pspace): Add search_domain parameter.
104         Pass it down.
105         (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
106         symbols.
107         (add_matching_symbols_to_info): Add search_domain parameter.  Pass
108         it down.
109
110 2017-11-08  Pedro Alves  <palves@redhat.com>
111
112         * ada-lang.c (ada_make_symbol_completion_list): Remove text and
113         text_len locals and don't pass them down.
114         * symtab.c (completion_list_add_name): Remove
115         sym_text/sym_text_len parameters and adjust.
116         (completion_list_add_symbol, completion_list_add_msymbol)
117         (completion_list_objc_symbol, completion_list_add_fields)
118         (add_symtab_completions): Likewise.
119         (default_collect_symbol_completion_matches_break_on)
120         (collect_file_symbol_completion_matches): Remove sym_text_len
121         local and don't pass it down.
122         * symtab.h (completion_list_add_name): Remove
123         sym_text/sym_text_len parameters.
124
125 2017-11-08  Pedro Alves  <palves@redhat.com>
126
127         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
128         unittests/lookup_name_info-selftests.c.
129         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
130         * cp-support.c: Include "selftest.h".
131         (cp_remove_params_1): Rename from cp_remove_params.  Add
132         'require_param' parameter, and handle it.
133         (cp_remove_params): Reimplement.
134         (cp_remove_params_if_any): New.
135         (selftests::quote): New.
136         (selftests::check_remove_params): New.
137         (selftests::test_cp_remove_params): New.
138         (_initialize_cp_support): Install
139         selftests::test_cp_remove_params.
140         * cp-support.h (cp_remove_params_if_any): Declare.
141         * dwarf2read.c :Include "selftest.h".
142         (dw2_expand_symtabs_matching_symbol): Use
143         lookup_name_info::make_ignore_params.
144         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
145         (selftests::dw2_expand_symtabs_matching::string_or_null)
146         (selftests::dw2_expand_symtabs_matching::check_match)
147         (selftests::dw2_expand_symtabs_matching::test_symbols)
148         (selftests::dw2_expand_symtabs_matching::run_test): New.
149         (_initialize_dwarf2_read): Register
150         selftests::dw2_expand_symtabs_matching::run_test.
151         * psymtab.c (psym_expand_symtabs_matching): Use
152         lookup_name_info::make_ignore_params.
153         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
154         If the lookup name wants to ignore parameters, strip them.
155         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
156         code handling '('.
157         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
158         (default_collect_symbol_completion_matches_break_on): Don't try to
159         strip parameters.
160         * symtab.h (lookup_name_info::lookup_name_info): Add
161         'ignore_parameters' parameter.
162         (lookup_name_info::ignore_parameters)
163         (lookup_name_info::make_ignore_params): New methods.
164         (lookup_name_info::m_ignore_parameters): New field.
165         * unittests/lookup_name_info-selftests.c: New file.
166
167 2017-11-08  Pedro Alves  <palves@redhat.com>
168
169         * dwarf2read.c (dw2_expand_marked_cus)
170         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
171         (dw2_expand_symtabs_matching): Move further below.
172         (dw2_expand_marked_cus): Reindent.
173
174 2017-11-08  Pedro Alves  <palves@redhat.com>
175
176         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
177         (struct name_component): New.
178         (mapped_index::name_components): New field.
179         (mapped_index::symbol_name_at): New method.
180         (dwarf2_read_index): Call mapped_index ctor.
181         (dw2_map_matching_symbols): Add comment about name_components
182         table.
183         (dw2_expand_symtabs_matching): Factor part to...
184         (dw2_expand_symtabs_matching_symbol): ... this new function.
185         Build name components table, and lookup symbols in it before
186         calling the name matcher.
187         (dw2_expand_marked_cus): New, factored out from
188         dw2_expand_symtabs_matching.
189         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
190
191 2017-11-08   Pedro Alves  <palves@redhat.com>
192
193         * ada-lang.c (ada_encode): Rename to ..
194         (ada_encode_1): ... this.  Add throw_errors parameter and handle
195         it.
196         (ada_encode): Reimplement.
197         (match_name): Delete, folded into full_name.
198         (resolve_subexp): No longer pass the encoded name to
199         ada_lookup_symbol_list.
200         (should_use_wild_match): Delete.
201         (name_match_type_from_name): New.
202         (ada_lookup_simple_minsym): Use lookup_name_info and the
203         language's symbol_name_matcher_ftype.
204         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
205         (ada_add_block_renamings): Adjust to use lookup_name_info.
206         (ada_lookup_name): New.
207         (add_nonlocal_symbols, ada_add_all_symbols)
208         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
209         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
210         (ada_name_for_lookup): Delete.
211         (ada_lookup_encoded_symbol): Construct a verbatim name.
212         (wild_match): Reverse sense of return type.  Use bool.
213         (full_match): Reverse sense of return type.  Inline bits of old
214         match_name here.
215         (ada_add_block_symbols): Adjust to use lookup_name_info.
216         (symbol_completion_match): Delete, folded into...
217         (ada_lookup_name_info::matches): ... .this new method.
218         (symbol_completion_add): Delete.
219         (ada_collect_symbol_completion_matches): Add name_match_type
220         parameter.  Adjust to use lookup_name_info and
221         completion_list_add_name.
222         (get_var_value, ada_add_global_exceptions): Adjust to use
223         lookup_name_info.
224         (ada_get_symbol_name_cmp): Delete.
225         (do_wild_match, do_full_match): New functions.
226         (ada_lookup_name_info::ada_lookup_name_info): New method.
227         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
228         functions.
229         (ada_language_defn): Install ada_get_symbol_name_matcher.
230         * ada-lex.l (processId): If name starts with '<', copy it
231         verbatim.
232         * block.c (block_iter_match_step, block_iter_match_first)
233         (block_iter_match_next, block_lookup_symbol)
234         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
235         lookup_name_info.
236         * block.h (block_iter_match_first, block_iter_match_next)
237         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
238         * c-lang.c (c_language_defn, cplus_language_defn)
239         (asm_language_defn, minimal_language_defn): Adjust comments to
240         refer to la_get_symbol_name_matcher.
241         * completer.c (complete_files_symbols)
242         (collect_explicit_location_matches, symbol_completer): Pass a
243         symbol_name_match_type down.
244         * completer.h (class completion_match, completion_match_result):
245         New classes.
246         (completion_tracker::reset_completion_match_result): New method.
247         (completion_tracker::m_completion_match_result): New field.
248         * cp-support.c (make_symbol_overload_list_block): Adjust to use
249         lookup_name_info.
250         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
251         functions.
252         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
253         * d-lang.c: Adjust comments to refer to
254         la_get_symbol_name_matcher.
255         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
256         Adjust to use lookup_name_info.
257         (dict_iter_match_first, dict_iter_match_next)
258         (iter_match_first_hashed, iter_match_next_hashed)
259         (iter_match_first_linear, iter_match_next_linear): Adjust to work
260         with a lookup_name_info.
261         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
262         Likewise.
263         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
264         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
265         (gdb_index_symbol_name_matcher): New class.
266         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
267         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
268         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
269         with a symbol_name_match_type.
270         (f_language_defn): Adjust comments to refer to
271         la_get_symbol_name_matcher.
272         * go-lang.c (go_language_defn): Adjust comments to refer to
273         la_get_symbol_name_matcher.
274         * language.c (default_symbol_name_matcher)
275         (language_get_symbol_name_matcher): New functions.
276         (unknown_language_defn, auto_language_defn): Adjust comments to
277         refer to la_get_symbol_name_matcher.
278         * language.h (symbol_name_cmp_ftype): Delete.
279         (language_defn) <la_collect_symbol_completion_matches>: Add match
280         type parameter.
281         <la_get_symbol_name_cmp>: Delete field.
282         <la_get_symbol_name_matcher>: New field.
283         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
284         (default_symbol_name_matcher, language_get_symbol_name_matcher):
285         Declare.
286         * linespec.c (iterate_over_all_matching_symtabs)
287         (iterate_over_file_blocks): Adjust to use lookup_name_info.
288         (find_methods): Add language parameter, and use lookup_name_info
289         and the language's symbol_name_matcher_ftype.
290         (linespec_complete_function): Adjust.
291         (lookup_prefix_sym): Use lookup_name_info.
292         (add_all_symbol_names_from_pspace): Adjust.
293         (find_superclass_methods): Add language parameter and pass it
294         down.
295         (find_method): Pass symbol language down.
296         (find_linespec_symbols): Don't demangle or Ada encode here.
297         (search_minsyms_for_name): Add lookup_name_info parameter.
298         (add_matching_symbols_to_info): Add name_match_type parameter.
299         Use lookup_name_info.
300         * m2-lang.c (m2_language_defn): Adjust comments to refer to
301         la_get_symbol_name_matcher.
302         * minsyms.c: Include <algorithm>.
303         (add_minsym_to_demangled_hash_table): Remove table parameter and
304         add objfile parameter.  Use search_name_hash, and add language to
305         demangled languages vector.
306         (struct found_minimal_symbols): New struct.
307         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
308         New functions.
309         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
310         input names here.  Use lookup_name_info instead.  Lookup up
311         demangled names once for each language in the demangled names
312         vector.
313         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
314         demangled names once for each language in the demangled names
315         vector.
316         (build_minimal_symbol_hash_tables): Adjust.
317         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
318         lookup_name_info.
319         * objc-lang.c (objc_language_defn): Adjust comment to refer to
320         la_get_symbol_name_matcher.
321         * objfiles.h: Include <vector>.
322         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
323         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
324         la_get_symbol_name_matcher.
325         * p-lang.c (pascal_language_defn): Adjust comment to refer to
326         la_get_symbol_name_matcher.
327         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
328         (match_partial_symbol): Use symbol_name_match_type,
329         lookup_name_info and psymbol_name_matches.
330         (lookup_partial_symbol): Use lookup_name_info.
331         (map_block): Use symbol_name_match_type and lookup_name_info.
332         (psym_map_matching_symbols): Use symbol_name_match_type.
333         (psymbol_name_matches): New.
334         (recursively_search_psymtabs): Use lookup_name_info and
335         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
336         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
337         'kind' parameter to 'domain'.
338         * rust-lang.c (rust_language_defn): Adjust comment to refer to
339         la_get_symbol_name_matcher.
340         * symfile-debug.c (debug_qf_map_matching_symbols)
341         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
342         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
343         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
344         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
345         Adjust to use symbol_name_match_type.
346         <expand_symtabs_matching>: Adjust to use lookup_name_info.
347         (expand_symtabs_matching): Adjust to use lookup_name_info.
348         * symmisc.c (maintenance_expand_symtabs): Use
349         lookup_name_info::match_any ().
350         * symtab.c (symbol_matches_search_name): New.
351         (eq_symbol_entry): Adjust to use lookup_name_info and the
352         language's matcher.
353         (demangle_for_lookup_info::demangle_for_lookup_info): New.
354         (lookup_name_info::match_any): New.
355         (iterate_over_symbols, search_symbols): Use lookup_name_info.
356         (compare_symbol_name): Add language, lookup_name_info and
357         completion_match_result parameters, and use them.
358         (completion_list_add_name): Make extern.  Add language and
359         lookup_name_info parameters.  Use them.
360         (completion_list_add_symbol, completion_list_add_msymbol)
361         (completion_list_objc_symbol): Add lookup_name_info parameters and
362         adjust.  Pass down language.
363         (completion_list_add_fields): Add lookup_name_info parameters and
364         adjust.  Pass down language.
365         (add_symtab_completions): Add lookup_name_info parameters and
366         adjust.
367         (default_collect_symbol_completion_matches_break_on): Add
368         name_match_type parameter, and use it.  Use lookup_name_info.
369         (default_collect_symbol_completion_matches)
370         (collect_symbol_completion_matches): Add name_match_type
371         parameter, and pass it down.
372         (collect_symbol_completion_matches_type): Adjust.
373         (collect_file_symbol_completion_matches): Add name_match_type
374         parameter, and use lookup_name_info.
375         * symtab.h: Include <string> and "common/gdb_optional.h".
376         (enum class symbol_name_match_type): New.
377         (class ada_lookup_name_info): New.
378         (struct demangle_for_lookup_info): New.
379         (class lookup_name_info): New.
380         (symbol_name_matcher_ftype): New.
381         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
382         (symbol_matches_search_name): Declare.
383         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
384         (default_collect_symbol_completion_matches)
385         (collect_symbol_completion_matches)
386         (collect_file_symbol_completion_matches): Add name_match_type
387         parameter.
388         (iterate_over_symbols): Use lookup_name_info.
389         (completion_list_add_name): Declare.
390         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
391         (strncmp_iw_with_mode): Now extern.
392         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
393         (strncmp_iw_with_mode): Declare.
394
395 2017-11-08  Keith Seitz  <keiths@redhat.com>
396             Pedro Alves  <palves@redhat.com>
397
398         * ada-lang.c (ada_language_defn): Install
399         default_search_name_hash.
400         * buildsym.c (struct buildsym_compunit): <language>: New field.
401         (finish_block_internal): Pass language when creating dictionaries.
402         (start_buildsym_compunit, start_symtab): New language parameters.
403         Use them.
404         (restart_symtab): Pass down compilation unit's language.
405         * buildsym.h (enum language): Forward declare.
406         (start_symtab): New 'language' parameter.
407         * c-lang.c (c_language_defn, cplus_language_defn)
408         (asm_language_defn, minimal_language_defn): Install
409         default_search_name_hash.
410         * coffread.c (coff_start_symtab): Adjust.
411         * d-lang.c (d_language_defn): Install default_search_name_hash.
412         * dbxread.c (struct symloc): Add 'pst_language' field.
413         (PST_LANGUAGE): Define.
414         (start_psymtab, read_ofile_symtab): Use it.
415         (process_one_symbol): New 'language' parameter.  Pass it down.
416         * dictionary.c (struct dictionary) <language>: New field.
417         (DICT_LANGUAGE): Define.
418         (dict_create_hashed, dict_create_hashed_expandable)
419         (dict_create_linear, dict_create_linear_expandable): New parameter
420         'language'.  Set the dictionary's language.
421         (iter_match_first_hashed): Adjust to rename.
422         (insert_symbol_hashed): Assert we don't see mismatching
423         languages.  Adjust to rename.
424         (dict_hash): Rename to ...
425         (default_search_name_hash): ... this and make extern.
426         * dictionary.h (struct language_defn): Forward declare.
427         (dict_create_hashed): New parameter 'language'.
428         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
429         * f-lang.c (f_language_defn): Install default_search_name_hash.
430         * go-lang.c (go_language_defn): Install default_search_name_hash.
431         * jit.c (finalize_symtab): Pass compunit's language to dictionary
432         creation.
433         * language.c (unknown_language_defn, auto_language_defn):
434         * language.h (language_defn::la_search_name_hash): New field.
435         (default_search_name_hash): Declare.
436         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
437         * mdebugread.c (new_block): New parameter 'language'.
438         * mdebugread.c (parse_symbol): Pass symbol language to block
439         allocation.
440         (psymtab_to_symtab_1): Pass down language.
441         (new_symtab): Pass compunit's language to block allocation.
442         * objc-lang.c (objc_language_defn): Install
443         default_search_name_hash.
444         * opencl-lang.c (opencl_language_defn):
445         * p-lang.c (pascal_language_defn): Install
446         default_search_name_hash.
447         * rust-lang.c (rust_language_defn): Install
448         default_search_name_hash.
449         * stabsread.h (enum language): Forward declare.
450         (process_one_symbol): Add 'language' parameter.
451         * symtab.c (search_name_hash): New function.
452         * symtab.h (search_name_hash): Declare.
453         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
454
455 2017-11-08  Pedro Alves  <palves@redhat.com>
456
457         * cp-name-parser.y (main): Don't initialize extra_chars.
458
459 2017-11-07  Tom Tromey  <tom@tromey.com>
460
461         * event-top.h (command_handler): Constify.
462         * record-full.c (cmd_record_full_start): Update.
463         * thread.c (thread_apply_all_command): Update.
464         * printcmd.c (eval_command): Update.
465         * mi/mi-main.c (mi_execute_cli_command): Update.
466         (mi_execute_async_cli_command): Update.
467         * tui/tui-stack.c (tui_update_command): Update.
468         * cli/cli-interp.c (safe_execute_command): Constify.
469         * record.c (record_start): Update.
470         (record_start, record_stop, cmd_record_start): Update.
471         * record-btrace.c (cmd_record_btrace_bts_start): Update.
472         (cmd_record_btrace_pt_start): Update.
473         (cmd_record_btrace_start): Update.
474         (cmd_record_btrace_start): Update.
475         * reverse.c (exec_reverse_once): Update.
476         * python/python.c (execute_gdb_command): Don't copy the command.
477         * event-top.c (command_line_handler): Update.
478         (command_handler): Constify.
479         * defs.h (deprecated_call_command_hook): Constify.
480         * cli/cli-script.h (execute_user_command): Constify.
481         * cli/cli-script.c (execute_user_command): Constify.
482         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
483         (enum command_control_type): Update.
484         * main.c (catch_command_errors): Remove non-const overload.
485         (catch_command_errors_ftype): Remove.
486         * python/py-cmd.c (cmdpy_function): Constify.
487         * guile/scm-cmd.c (cmdscm_function): Constify.
488         * cli/cli-dump.c (call_dump_func): Constify.
489         * cli/cli-decode.c (do_const_cfunc): Constify.
490         (do_sfunc): Constify.
491         (cmd_func): Constify.
492         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
493         * top.h (execute_command): Constify.
494         * top.c (execute_command): Constify.
495         (execute_command_to_string): Constify.
496         (deprecated_call_command_hook): Constify.
497         * command.h (cmd_func): Constify.
498         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
499
500 2017-11-07  Tom Tromey  <tom@tromey.com>
501
502         * ada-lang.c (catch_ada_exception_command): Constify.
503         (catch_assert_command): Constify.
504         * break-catch-throw.c (catch_catch_command, catch_throw_command)
505         (catch_rethrow_command): Constify.
506         (catch_exception_command_1): Constify.
507         * breakpoint.h (add_catch_command): Constify.
508         * break-catch-syscall.c (catch_syscall_command_1): Constify.
509         (catch_syscall_split_args): Constify.
510         * break-catch-sig.c (catch_signal_command): Constify.
511         (catch_signal_split_args): Constify.
512         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
513         cmd_const_sfunc_ftype.
514         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
515         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
516         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
517         (add_setshow_string_cmd, struct cmd_list_element)
518         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
519         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
520         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
521         Constify.
522         (set_cmd_sfunc): Constify.
523         (empty_sfunc): Constify.
524         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
525         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
526         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
527         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
528         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
529         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
530         Constify.
531         (set_cmd_sfunc): Constify.
532         (cmd_sfunc_ftype): Remove.
533         * compile/compile.c (set_compile_args): Constify.
534         * infrun.c (set_disable_randomization): Constify.
535         * infcmd.c (set_args_command, set_cwd_command): Constify.
536         * breakpoint.c (set_condition_evaluation_mode): Constify.
537         (add_catch_command): Constify.
538         (catch_fork_command_1, catch_exec_command_1)
539         (catch_load_command_1, catch_unload_command_1): Constify.
540         (catch_load_or_unload): Constify.
541         * guile/scm-param.c (pascm_set_func): Constify.
542         (add_setshow_generic): Constify.
543         * python/py-param.c (get_set_value): Constify.
544         * top.h (set_verbose): Constify.
545         * tui/tui-win.c (tui_set_var_cmd): Constify.
546         * mi/mi-main.c (set_mi_async_command): Constify.
547         * cli/cli-logging.c (set_logging_overwrite)
548         (set_logging_redirect): Constify.
549         * value.c (set_max_value_size): Constify.
550         * valprint.c (set_input_radix, set_output_radix): Constify.
551         * utils.c (set_width_command, set_height_command): Constify.
552         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
553         * tracepoint.c (set_disconnected_tracing)
554         (set_circular_trace_buffer, set_trace_buffer_size)
555         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
556         * top.c (set_history_size_command, set_verbose, set_editing)
557         (set_gdb_datadir, set_history_filename): Constify.
558         * target.c (set_targetdebug, maint_set_target_async_command)
559         (maint_set_target_non_stop_command, set_target_permissions)
560         (set_write_memory_permission): Constify.
561         (open_target): Constify.
562         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
563         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
564         * symtab.c (set_symbol_cache_size_handler): Constify.
565         * symfile.c (set_ext_lang_command): Constify.
566         * symfile-debug.c (set_debug_symfile): Constify.
567         * source.c (set_directories_command): Constify.
568         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
569         * serial.c (set_parity): Constify.
570         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
571         * remote.c (set_remote_exec_file, set_remotebreak)
572         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
573         * record.c (set_record_insn_history_size)
574         (set_record_call_history_size): Constify.
575         * record-full.c (set_record_full_insn_max_num): Constify.
576         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
577         * osabi.c (set_osabi): Constify.
578         * mips-tdep.c (set_mips64_transfers_32bit_regs)
579         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
580         * maint.c (maintenance_set_profile_cmd): Constify.
581         * linux-thread-db.c (set_libthread_db_search_path): Constify.
582         * language.c (set_language_command, set_range_command)
583         (set_case_command): Constify.
584         * infrun.c (set_non_stop, set_observer_mode)
585         (set_stop_on_solib_events, set_schedlock_func)
586         (set_exec_direction_func): Constify.
587         * infcmd.c (set_inferior_tty_command): Constify.
588         * disasm.c (set_disassembler_options_sfunc): Constify.
589         * demangle.c (set_demangling_command): Constify.
590         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
591         * cris-tdep.c (set_cris_version, set_cris_mode)
592         (set_cris_dwarf2_cfi): Constify.
593         * corefile.c (set_gnutarget_command): Constify.
594         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
595         (set_target_wide_charset_sfunc): Constify.
596         * breakpoint.c (update_dprintf_commands): Constify.
597         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
598         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
599         (set_disassembly_style_sfunc): Constify.
600         * arch-utils.c (set_endian, set_architecture): Constify.
601         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
602         * agent.c (set_can_use_agent): Constify.
603
604 2017-11-07  Tom Tromey  <tom@tromey.com>
605
606         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
607         (go32_pde, go32_pte, go32_pte_for_address): Constify.
608         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
609         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
610         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
611         (parse_int_arg, show_thread_default_detach_sc_cmd)
612         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
613         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
614         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
615         (show_task_pause_cmd, set_task_detach_sc_cmd)
616         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
617         (set_noninvasive_cmd, set_thread_pause_cmd)
618         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
619         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
620         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
621         * windows-nat.c (display_selectors): Constify.
622         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
623         non-const "cfunc".
624         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
625         (cmd_cfunc_eq): Likewise.
626         (struct cmd_list_element): Likewise.
627         (do_cfunc): Remove.
628         (cli_user_command_p): Update.
629         * command.h (add_cmd): Remove non-const overload.
630         (cmd_cfunc_ftype): Remove typedef.
631         (cmd_cfunc_eq): Remove non-const overload.
632         * value.c (show_values): Constify.
633         * thread.c (thread_apply_all_command): Constify.
634         * symfile.c (load_command): Constify.
635         * source.c (directory_command): Constify.
636         * maint.c (maintenance_internal_error)
637         (maintenance_demangler_warning, maintenance_space_display)
638         (maintenance_print_architecture, maintenance_translate_address)
639         (maintenance_info_selftests, maintenance_internal_warning):
640         Constify.
641         * breakpoint.c (disable_trace_command, enable_trace_command):
642         Constify.
643         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
644         Constify.
645         (add_auto_load_safe_path): Constify.
646         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
647         * top.h (show_commands): Constify.
648         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
649         * sparc64-tdep.c (adi_examine_command): Constify.
650         (adi_assign_command): Constify.
651
652 2017-11-07  Tom Tromey  <tom@tromey.com>
653
654         * frame.h (info_locals_command, info_args_command): Constify.
655         * auto-load.h (auto_load_info_scripts): Constify.
656         * inferior.h (registers_info): Constify.
657         * copying.c: Rebuild.
658         * copying.awk: Constify generated commands.
659         * auto-load.c (auto_load_info_scripts)
660         (info_auto_load_gdb_scripts): Constify.
661         * cli/cli-decode.c (struct cmd_list_element): Take a
662         cmd_const_cfunc_ftype.
663         * command.h (add_info): Take a cmd_const_cfunc_ftype.
664         * tui/tui-win.c (tui_all_windows_info): Constify.
665         * python/py-auto-load.c (info_auto_load_python_scripts):
666         Constify.
667         * cli/cli-cmds.c (show_command): Remove non-const overload.
668         * tracepoint.c (info_tvariables_command, info_scope_command):
669         Constify.
670         (info_static_tracepoint_markers_command): Constify.
671         * thread.c (info_threads_command): Constify.
672         (print_thread_info_1): Constify.
673         * target.c (info_target_command): Constify.
674         * symtab.c (info_sources_command, info_functions_command)
675         (info_types_command): Constify.
676         (info_variables_command): Remove non-const overload.
677         * symfile.c (info_ext_lang_command): Constify.
678         * stack.c (info_frame_command, info_locals_command)
679         (info_args_command): Constify.
680         (backtrace_command): Remove non-const overload.
681         * source.c (info_source_command, info_line_command): Constify.
682         * solib.c (info_sharedlibrary_command): Constify.
683         * skip.c (info_skip_command): Constify.
684         * ser-go32.c (info_serial_command): Constify.
685         * reverse.c (info_bookmarks_command): Constify.
686         * printcmd.c (info_symbol_command, info_address_command)
687         (info_display_command): Constify.
688         * osdata.c (info_osdata_command): Constify.
689         * objc-lang.c (info_selectors_command, info_classes_command):
690         Constify.
691         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
692         * memattr.c (info_mem_command): Constify.
693         * macrocmd.c (info_macro_command, info_macros_command): Constify.
694         * linux-fork.c (info_checkpoints_command): Constify.
695         * infrun.c (info_signals_command): Constify.
696         * inflow.c (info_terminal_command): Constify.
697         * inferior.c (info_inferiors_command): Constify.
698         (print_inferior): Constify.
699         * infcmd.c (info_program_command, info_all_registers_command)
700         (info_registers_command, info_vector_command)
701         (info_float_command): Constify.
702         (registers_info): Constify.
703         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
704         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
705         Constify.
706         * f-valprint.c (info_common_command): Constify.
707         * dcache.c (info_dcache_command): Constify.
708         (dcache_info_1): Constify.
709         * darwin-nat-info.c (info_mach_tasks_command)
710         (info_mach_task_command, info_mach_ports_command)
711         (info_mach_port_command, info_mach_threads_command)
712         (info_mach_thread_command, info_mach_regions_command)
713         (info_mach_regions_recurse_command, info_mach_region_command)
714         (info_mach_exceptions_command): Constify.
715         (get_task_from_args): Constify.
716         * cp-support.c (info_vtbl_command): Constify.
717         * breakpoint.c (info_watchpoints_command)
718         (info_tracepoints_command): Constify.
719         (info_breakpoints_command): Remove non-const overload.
720         * avr-tdep.c (avr_io_reg_read_command): Constify.
721         * auxv.c (info_auxv_command): Constify.
722         * ada-tasks.c (info_tasks_command): Constify.
723         (info_task): Constify.
724         * ada-lang.c (info_exceptions_command): Constify.
725
726 2017-11-07  Tom Tromey  <tom@tromey.com>
727
728         * solib.h (no_shared_libraries): Constify.
729         * frame.h (return_command): Constify.
730         * cli/cli-cmds.h (quit_command): Constify.
731         * top.h (quit_command, execute_command): Constify.
732         * target.h (flash_erase_command): Constify.
733         * inferior.h (set_inferior_args, attach_command): Constify.
734         * tracepoint.h (start_tracing, stop_tracing): Constify.
735         * breakpoint.h (break_command, tbreak_command)
736         (hbreak_command_wrapper, thbreak_command_wrapper)
737         (rbreak_command_wrapper, watch_command_wrapper)
738         (awatch_command_wrapper, rwatch_command_wrapper)
739         (get_tracepoint_by_number): Constify.
740         * symtab.c (info_variables_command, rbreak_command)
741         (symtab_symbol_info): Constify.
742         (info_variables_command): Add non-const overload.
743         * top.c (dont_repeat_command): Constify.
744         * breakpoint.c (ignore_command, commands_command)
745         (condition_command, tbreak_command, hbreak_command)
746         (thbreak_command, clear_command, break_command)
747         (info_breakpoints_command, watch_command, rwatch_command)
748         (awatch_command, trace_command, ftrace_command, strace_command)
749         (trace_pass_command, break_range_command, dprintf_command)
750         (agent_printf_command, get_tracepoint_by_number)
751         (watch_maybe_just_location, trace_pass_command): Constify.
752         (info_breakpoints_command): Add non-const overload.
753         * tracefile.c (tsave_command): Constify.
754         * infcmd.c (attach_command, disconnect_command, signal_command)
755         (queue_signal_command, stepi_command, nexti_command)
756         (finish_command, next_command, step_command, until_command)
757         (advance_command, jump_command, continue_command, run_command)
758         (start_command, starti_command, interrupt_command)
759         (run_command_1, set_inferior_args, step_1): Constify.
760         * inferior.c (add_inferior_command, remove_inferior_command)
761         (clone_inferior_command): Constify.
762         * linux-fork.c (checkpoint_command, restart_command): Constify.
763         * windows-nat.c (signal_event_command): Constify.
764         * guile/guile.c (guile_repl_command, guile_command): Constify.
765         * printcmd.c (x_command, display_command, printf_command)
766         (output_command, set_command, call_command, print_command)
767         (eval_command): Constify.
768         (non_const_set_command): Remove.
769         (_initialize_printcmd): Update.
770         * source.c (forward_search_command, reverse_search_command):
771         Constify.
772         * jit.c (jit_reader_load_command, jit_reader_unload_command):
773         Constify.
774         * infrun.c (handle_command): Constify.
775         * memattr.c (mem_command): Constify.
776         * stack.c (return_command, up_command, up_silently_command)
777         (down_command, down_silently_command, frame_command)
778         (backtrace_command, func_command, backtrace_command_1): Constify.
779         (backtrace_command): Add non-const overload.
780         * remote-sim.c (simulator_command): Constify.
781         * exec.c (set_section_command): Constify.
782         * tracepoint.c (tdump_command, trace_variable_command)
783         (tstatus_command, tstop_command, tstart_command)
784         (end_actions_pseudocommand, while_stepping_pseudocommand)
785         (collect_pseudocommand, teval_pseudocommand, actions_command)
786         (start_tracing, stop_tracing): Constify.
787         * value.c (init_if_undefined_command): Constify.
788         * tui/tui-stack.c (tui_update_command): Constify.
789         * tui/tui-win.c (tui_refresh_all_command)
790         (tui_set_tab_width_command, tui_set_win_height_command)
791         (tui_set_focus_command, tui_scroll_forward_command)
792         (tui_scroll_backward_command, tui_scroll_left_command)
793         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
794         (tui_set_win_height): Constify.
795         * tui/tui-layout.c (tui_layout_command): Constify.
796         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
797         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
798         (proc_untrace_sysexit_cmd): Constify.
799         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
800         (threadset_test_cmd, threadlist_update_test_cmd)
801         (threadalive_test): Constify.
802         * objc-lang.c (print_object_command): Constify.
803         * command.h (add_com): Constify.
804         * cli/cli-dump.c (restore_command): Constify.
805         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
806         (help_command, complete_command, shell_command, edit_command)
807         (list_command, disassemble_command, make_command)
808         (apropos_command, alias_command): Constify.
809         * cli/cli-script.c (document_command, define_command)
810         (while_command, if_command, validate_comname): Constify.
811         * cli/cli-decode.c (struct cmd_list_element): Change type of
812         "fun".
813         * target.c (do_monitor_command, flash_erase_command): Constify.
814         * regcache.c (reg_flush_command): Constify.
815         * reverse.c (reverse_step, reverse_next, reverse_stepi)
816         (reverse_nexti, reverse_continue, reverse_finish)
817         (save_bookmark_command, goto_bookmark_command)
818         (exec_reverse_once): Constify.
819         * python/python.c (python_interactive_command, python_command):
820         Constify.
821         * typeprint.c (ptype_command, whatis_command, whatis_exp):
822         Constify.
823         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
824         * gcore.c (gcore_command): Constify.
825
826 2017-11-07  Tom Tromey  <tom@tromey.com>
827
828         * printcmd.c (x_command): Call set_repeat_arguments.
829         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
830         * top.c (repeat_arguments): New global.
831         (set_repeat_arguments): New function.
832         (execute_command): Handle repeat_arguments.
833         (show_commands): Calls set_repeat_arguments.
834         * command.h (set_repeat_arguments): Declare.
835
836 2017-11-07  Tom Tromey  <tom@tromey.com>
837
838         * stack.c (backtrace_command): Use std::string.
839         (backtrace_command_1): Make "count_exp" const.
840
841 2017-11-07  Tom Tromey  <tom@tromey.com>
842
843         * source.c (directory_switch, mod_path, add_path): Constify.
844         * defs.h (add_path, mod_path, directory_switch): Constify.
845         * mi/mi-cmd-env.c (env_mod_path): Constify.
846
847 2017-11-07  Tom Tromey  <tom@tromey.com>
848
849         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
850         (run_command_1, continue_command, step_1, jump_command)
851         (signal_command, until_command, advance_command, finish_command)
852         (attach_command): Update.
853
854 2017-11-07  Tom Tromey  <tom@tromey.com>
855
856         * command.h (set_cmd_cfunc): Don't declare.
857         * cli/cli-decode.c (set_cmd_cfunc): Now static.
858
859 2017-11-07  Tom Tromey  <tom@tromey.com>
860
861         * stack.c (select_frame_command): Constify.
862         * cli/cli-decode.c (add_com_suppress_notification): Constify.
863         * command.h (add_com_suppress_notification): Constify.
864
865 2017-11-07  Tom Tromey  <tom@tromey.com>
866
867         * breakpoint.c (stop_command): Constify.
868         * cli/cli-decode.c (struct cmd_list_element): Constify.
869         * command.h (add_abbrev_prefix_cmd): Constify.
870
871 2017-11-07  Pedro Alves  <palves@redhat.com>
872
873         * breakpoint.c (extract_bp_kind): New enum.
874         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
875         factored out from ...
876         (extract_bp_number_and_location): ... here.
877         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
878
879 2017-11-07  Pedro Alves  <palves@redhat.com>
880
881         * breakpoint.c (extract_bp_number_and_location): Change return
882         type to void.  Throw error instead of warning.
883         (enable_disable_command): Adjust.
884
885 2017-11-07  Xavier Roirand  <roirand@adacore.com>
886             Pedro Alves  <palves@redhat.com>
887
888         * breakpoint.c (map_breakpoint_number_range): New, factored out
889         from ...
890         (map_breakpoint_numbers): ... here.
891         (find_location_by_number): Change parameters from string to
892         breakpoint number and location.
893         (extract_bp_number_and_location): New function.
894         (enable_disable_bp_num_loc)
895         (enable_disable_breakpoint_location_range)
896         (enable_disable_command): New functions, factored out ...
897         (enable_command, disable_command): ... these functions, and
898         adjusted to support ranges.
899         * NEWS: Document enable/disable breakpoint location range feature.
900
901 2017-11-06  Luis Machado  <luis.machado@linaro.org>
902
903         * MAINTAINERS (Write After Approval): Update my e-mail address.
904
905 2017-11-06  Pedro Alves  <palves@redhat.com>
906
907         * gnu-nat.c (gnu_terminal_init): Delete.
908         (gnu_target): Don't install gnu_terminal_init.
909         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
910         (child_terminal_init): ... this function.
911
912 2017-11-06  Pedro Alves  <palves@redhat.com>
913
914         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
915         sgtty.h.
916         * config.in, configure: Regenerate.
917
918 2017-11-06  Pedro Alves  <palves@redhat.com>
919
920         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
921         (async_init_signals): Adjust.
922         (handle_stop_sig): Rename to ...
923         (handle_sigtstp): ... this.
924         (async_stop_sig): Rename to ...
925         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
926         SIGTSTP path.
927         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
928         instead of STOP_SIGNAL thoughout.
929         (handle_stop_sig): Rename to ...
930         (handle_sigtstp): ... this.
931         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
932
933 2017-11-06  Pedro Alves  <palves@redhat.com>
934
935         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
936         longer set flags twice in row.
937
938 2017-11-06  Pedro Alves  <palves@redhat.com>
939
940         * Makefile.in (SER_HARDWIRE): Update comment.
941         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
942         * common/gdb_termios.h: Delete file.
943         * common/job-control.c: Include termios.h and unistd.h instead of
944         gdb_termios.h.
945         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
946         check.
947         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
948         Remove sgtty code.
949         * configure.ac: No longer check for termio.h and sgtty.h.
950         * configure: Regenerate.
951         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
952         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
953         Replace PROCESS_GROUP_TYPE references with pid_t references
954         throughout.
955         (gdb_getpgrp): Delete.
956         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
957         (child_terminal_inferior): Remove comment.  Remove sgtty code.
958         (child_terminal_ours_1): Use tcgetpgrp directly instead of
959         gdb_getpgrp.  Use serial_set_tty_state instead aof
960         serial_noflush_set_tty_state.  Remove sgtty code.
961         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
962         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
963         (inferior_process_group): Now returns pid_t.
964         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
965         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
966         * ser-event.c (serial_event_ops): Update.
967         * ser-go32.c (dos_noflush_set_tty_state): Delete.
968         (dos_ops): Update.
969         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
970         * ser-pipe.c (pipe_ops): Update.
971         * ser-tcp.c (tcp_ops): Update.
972         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
973         HAVE_TERMIOS checks.
974         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
975         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
976         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
977         assume termios.
978         (hardwire_noflush_set_tty_state): Delete.
979         (hardwire_print_tty_state, hardwire_drain_output)
980         (hardwire_flush_output, hardwire_flush_input)
981         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
982         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
983         code, and assume termios.
984         (hardwire_ops): Update.
985         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
986         * serial.c (serial_noflush_set_tty_state): Delete.
987         * serial.h (serial_noflush_set_tty_state): Delete.
988         (serial_ops::noflush_set_tty_state): Delete.
989
990 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
991
992         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
993         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
994         (COMMON_OBS): Remove doublest.o and dfp.o.
995         Do not build target-float.c (instead of doublest.c)
996         with -Wformat-nonliteral.
997
998         * doublest.c: Remove file.
999         * doublest.h: Remove file.
1000         * dfp.c: Remove file.
1001         * dfp.h: Remove file.
1002
1003         * target-float.c: Do not include "doublest.h" and "dfp.h".
1004         (DOUBLEST): Move here from doublest.h.
1005         (enum float_kind): Likewise.
1006         (FLOATFORMAT_CHAR_BIT): Likewise.
1007         (FLOATFORMAT_LARGEST_BYTES): Likewise.
1008         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
1009         (floatformat_precision): Likewise.
1010         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1011         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1012         Likewise.
1013         (host_float_format, host_double_format, host_long_double_format):
1014         Likewise.
1015         (floatformat_to_string, floatformat_from_string): Likewise.
1016         (floatformat_to_doublest): Likewise.  Also, inline the original
1017         convert_floatformat_to_doublest.
1018         (floatformat_from_doublest): Likewise.  Also, inline the original
1019         convert_floatformat_from_doublest.
1020
1021         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1022         (MAX_DECIMAL_STRING): Move here from dfp.c.
1023         (match_endianness): Likewise.
1024         (set_decnumber_context, decimal_check_errors): Likewise.
1025         (decimal_from_number, decimal_to_number): Likewise.
1026         (decimal_to_string, decimal_from_string): Likewise.  Make static.
1027         (decimal_from_longest, decimal_from_ulongest): Likewise.
1028         (decimal_to_longest): Likewise.
1029         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1030         (decimal_convert): Likewise.
1031
1032 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1033
1034         * doublest.c: Do not include "gdbtypes.h".
1035         (extract_typed_floating): Remove.
1036         (store_typed_floating): Remove.
1037         (convert_typed_floating): Remove.
1038         * doublest.h (struct type): Remove.
1039         (DOUBLEST_PRINT_FORMAT): Remove.
1040         (DOUBLEST_SCAN_FORMAT): Remove.
1041         (extract_typed_floating): Remove.
1042         (store_typed_floating): Remove.
1043         (convert_typed_floating): Remove.
1044
1045         * dfp.c (decimal_from_doublest): Remove.
1046         (decimal_to_doublest): Remove.
1047         * dfp.h: Do not include "doublest.h".
1048         (decimal_from_doublest): Remove.
1049         (decimal_to_doublest): Remove.
1050
1051         * value.c: Do not include "doublest.h" and "dfp.h".
1052         (value_as_double): Remove.
1053         (unpack_double): Remove.
1054         (value_from_double): Remove.
1055         (value_from_decfloat): Remove.
1056         * value.h: Do not include "doublest.h".
1057         (value_as_double): Remove.
1058         (unpack_double): Remove.
1059         (value_from_double): Remove.
1060         (value_from_decfloat): Remove.
1061
1062 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1063
1064         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1065         (i386_extract_return_value): Use target_float_convert.
1066         (i386_store_return_value): Likewise.
1067         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1068         (i387_value_to_register): Likewise.
1069         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1070         (ia64_register_to_value): Use target_float_convert.
1071         (ia64_value_to_register): Likewise.
1072         (ia64_extract_return_value): Likewise.
1073         (ia64_store_return_value): Likewise.
1074         (ia64_push_dummy_call): Likewise.
1075         * m68k-tdep.c: Include "target-float.h".
1076         (m68k_register_to_value): Use target_float_convert.
1077         (m68k_value_to_register): Likewise.
1078         (m68k_svr4_extract_return_value): Likewise.
1079         (m68k_svr4_store_return_value): Likewise.
1080         * ppc-sysv-tdep.c: Include "target-float.h".
1081         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1082         (do_ppc_sysv_return_value): Likewise.
1083         (ppc64_sysv_abi_push_freg): Likewise.
1084         (ppc64_sysv_abi_return_value_base): Likewise.
1085         * rs6000-aix-tdep.c: Include "target-float.h".
1086         (rs6000_push_dummy_call): Use target_float_convert.
1087         (rs6000_return_value): Likewise.
1088         * rs6000-lynx178-tdep.c: Include "target-float.h".
1089         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1090         (rs6000_lynx178_return_value): Likewise.
1091         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1092         (rs6000_register_to_value): Use target_float_convert.
1093         (rs6000_value_to_register): Likewise.
1094         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1095         (arm_extract_return_value): Use target_float_convert.
1096         (arm_store_return_value): Likewise.
1097         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1098         (sh_register_convert_to_virtual): Use target_float_convert.
1099         (sh_register_convert_to_raw): Likewise.
1100         * sh64-tdep.c: Include "target-float.h".
1101         (sh64_extract_return_value): Use target_float_convert.
1102         (sh64_register_convert_to_virtual): Likewise.
1103         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
1104
1105 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1106
1107         * target-float.c (floatformat_to_host_double): New function.
1108         (floatformat_from_host_double): Likewise.
1109         (target_float_to_host_double): Likewise.
1110         (target_float_from_host_double): Likewise.
1111         * target-float.h (target_float_to_host_double): Add prototype.
1112         (target_float_from_host_double): Likewise.
1113
1114         * guile/scm-value.c: Include "target-float.h".
1115         (gdbscm_value_to_real): Use target_float_to_host_double.
1116         Handle integer source values via value_as_long.
1117         * guile/scm-math.c: Include "target-float.h".  Do not include
1118         "doublest.h", "dfp.h", and "expression.h".
1119         (vlscm_convert_typed_number): Use target_float_from_host_double.
1120         (vlscm_convert_number): Likewise.
1121
1122         * python/py-value.c (valpy_float): Use target_float_to_host_double.
1123         (convert_value_from_python): Use target_float_from_host_double.
1124
1125 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1126
1127         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1128         (cast_from_fixed): Likewise.
1129         (ada_scaling_type): New function.
1130         (ada_delta): Return value instead of DOUBLEST.  Perform target
1131         arithmetic instead of host arithmetic.
1132         (scaling_factor): Rename to ...
1133         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
1134         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
1135         (ada_fixed_to_float): Remove.
1136         (ada_float_to_fixed): Remove.
1137         * ada-lang.h (ada_fixed_to_float): Remove.
1138         (ada_float_to_fixed): Remove.
1139         (ada_delta): Return value instead of DOUBLEST.
1140         (ada_scaling_factor): Add prototype.
1141
1142         * ada-typeprint.c: Include "target-float.h".
1143         (print_fixed_point_type): Perform target arithmetic instead of
1144         host arithmetic.
1145         * ada-valprint.c: Include "target-float.h".
1146         (ada_val_print_num): Perform target arithmetic instead of
1147         host arithmetic for fixed-point types.
1148
1149 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1150
1151         * target-float.c: Include <math.h>.
1152         (floatformat_binop): New function.
1153         (floatformat_compare): Likewise.
1154         (target_float_binop): Likewise.
1155         (target_float_compare): Likewise.
1156         * target-float.h: Include "expression.h".
1157         (target_float_binop): Add prototype.
1158         (target_float_compare): Likewise.
1159
1160         * valarith.c: Do not include "doublest.h" and "dfp.h".
1161         Include "common/byte-vector.h".
1162         (value_args_as_decimal): Remove, replace by ...
1163         (value_args_as_target_float): ... this function.  Handle both
1164         binary and decimal target floating-point formats.
1165         (scalar_binop): Handle both binary and decimal FP using
1166         value_args_as_target_float and target_float_binop.
1167         (value_equal): Handle both binary and decimal FP using
1168         value_args_as_target_float and target_float_compare.
1169         (value_less): Likewise.
1170         (value_pos): Handle all scalar types as simple copy.
1171         (value_neg): Handle all scalar types via BINOP_SUB from 0.
1172         * dfp.c (decimal_binop): Throw error instead of internal_error
1173         when called with an unsupported operation code.
1174
1175 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1176
1177         * target-float.c (target_float_to_string): New function.
1178         (target_float_from_string): New function.
1179         * target-float.h (target_float_to_string): Add prototype.
1180         (target_float_from_string): Add prototype.
1181
1182         * valprint.c: Include "target-float.h".  Do not include
1183         "doublest.h" and "dfp.h".
1184         (print_floating): Use target_float_to_string.
1185         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
1186         (printf_floating): Use target_float_to_string.
1187         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1188         (print_i387_value): Use target_float_to_string.
1189         * mips-tdep.c: Include "target-float.h".
1190         (mips_print_fp_register): Use target_float_to_string.
1191         * sh64-tdep.c: Include "target-float.h".
1192         (sh64_do_fp_register): Use target_float_to_string.
1193
1194         * parse.c: Include "target-float.h".  Do not include
1195         "doublest.h" and "dfp.h".
1196         (parse_float): Use target_float_from_string.
1197         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
1198         (define_symbol): Use target_float_from_string.
1199         * gdbarch-selftests.c: Include "target-float.h".
1200         (register_to_value_test): Use target_float_from_string.
1201
1202 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1203
1204         * Makefile.c (SFILES): Add target-float.c.
1205         (HFILES_NO_SRCDIR): Add target-float.h.
1206         (COMMON_OBS): Add target-float.o.
1207         * target-float.h: New file.
1208         * target-float.c: New file.
1209
1210         * doublest.c (floatformat_classify): Fix detection of float_zero.
1211
1212         * gdbtypes.c (is_floating_type): New function.
1213         * gdbtypes.h (is_floating_type): Add prototype.
1214
1215         * value.c: Do not include "floatformat.h".
1216         (unpack_double): Use target_float_is_valid.
1217         (is_floating_value): New function.
1218         * value.h (is_floating_value): Add prototype-
1219
1220         * valarith.c: Include "target-float.h".
1221         (value_logical_not): Use target_float_is_zero.
1222
1223         * python/py-value.c: Include "target-float.h".
1224         (valpy_nonzero): Use target_float_is_zero.
1225
1226 2017-11-04  Tom Tromey  <tom@tromey.com>
1227
1228         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1229
1230 2017-11-04  Tom Tromey  <tom@tromey.com>
1231
1232         * breakpoint.c (set_momentary_breakpoint): Return
1233         breakpoint_up.
1234         (until_break_command): Update.
1235         (new_until_break_fsm): Change argument types to
1236         breakpoint_up.
1237         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1238         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1239         Remove.
1240         * infcmd.c (finish_forward): Update.
1241         * breakpoint.h (set_momentary_breakpoint)
1242         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1243         (make_cleanup_delete_breakpoint): Remove.
1244         (struct breakpoint_deleter): New.
1245         (breakpoint_up): New typedef.
1246         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1247         (insert_exception_resume_breakpoint): Update.
1248         (insert_exception_resume_from_probe): Update.
1249         (insert_longjmp_resume_breakpoint): Update.
1250         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1251         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1252         * infcall.c (call_function_by_hand_dummy): Update
1253
1254 2017-11-04  Tom Tromey  <tom@tromey.com>
1255
1256         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1257
1258 2017-11-04  Tom Tromey  <tom@tromey.com>
1259
1260         * linux-tdep.c (linux_core_info_proc_mappings): Use
1261         gdb::def_vector.
1262         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
1263         "size" argument.
1264         (linux_corefile_thread): Update.
1265         (linux_make_corefile_notes): Remove unused variable.
1266
1267 2017-11-04  Tom Tromey  <tom@tromey.com>
1268
1269         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1270         gdb::byte_vector.
1271
1272 2017-11-04  Tom Tromey  <tom@tromey.com>
1273
1274         * objfiles.c (do_free_objfile_cleanup): Remove.
1275         * compile/compile-object-load.c (compile_object_load): Update.
1276         * objfiles.h (make_cleanup_free_objfile): Remove.
1277
1278 2017-11-04  Tom Tromey  <tom@tromey.com>
1279
1280         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1281         (adi_read_versions): Change "tags" to "gdb_byte *".
1282         (adi_print_versions): Likewise.
1283
1284 2017-11-04  Tom Tromey  <tom@tromey.com>
1285
1286         * breakpoint.c
1287         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1288         from start_rbreak_breakpoints.
1289         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1290         * breakpoint.h (class scoped_rbreak_breakpoints): New.
1291         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1292         * symtab.c (do_end_rbreak_breakpoints): Remove.
1293         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1294
1295 2017-11-04  Tom Tromey  <tom@tromey.com>
1296
1297         * cp-namespace.c (reset_directive_searched): Remove.
1298         (cp_lookup_symbol_via_imports): Use scoped_restore.
1299         * cp-support.c (reset_directive_searched): Remove.
1300         (make_symbol_overload_list_using): Use scoped_restore.
1301         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1302         (reset_directive_searched): Remove.
1303
1304 2017-11-04  Tom Tromey  <tom@tromey.com>
1305
1306         * symfile.c (find_separate_debug_file_by_debuglink): Use
1307         unique_xmalloc_ptr.
1308
1309 2017-11-04  Tom Tromey  <tom@tromey.com>
1310
1311         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1312         type of "info".
1313         (compute_stack_depth): Likewise.
1314         (do_compile_dwarf_expr_to_c): Use std::vector.
1315
1316 2017-11-04  Tom Tromey  <tom@tromey.com>
1317
1318         * compile/compile-object-load.c (link_callbacks_einfo): Use
1319         std::string.
1320
1321 2017-11-04  Tom Tromey  <tom@tromey.com>
1322
1323         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1324         Use scoped_free_pendings.
1325         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1326         scoped_free_pendings.
1327         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1328         (xcoff_initial_scan): Likewise.
1329         * buildsym.c (reset_symtab_globals): Update comment.
1330         (scoped_free_pendings): Rename from really_free_pendings.
1331         (prepare_for_building): Update comment.
1332         (buildsym_init): Likewise.
1333         * buildsym.h (class scoped_free_pendings): New class.
1334         (really_free_pendings): Don't declare.
1335
1336 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
1337
1338         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1339         output when converting a zero value to a special byteorder format.
1340
1341 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1342
1343         * frame.c (do_frame_register_read): Remove aspace.
1344         * jit.c (jit_frame_sniffer): Likwise.
1345         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1346         * regcache.c (regcache::regcache): Pass nullptr.
1347         (regcache_print): Caller updated.
1348         * regcache.h (regcache::regcache): Remove one constructor
1349         parameter aspace.
1350
1351 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1352
1353         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1354
1355 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1356
1357         * breakpoint.c (insert_single_step_breakpoints): Update.
1358         * frame.c (struct frame_info) <aspace>: Add const.
1359         (frame_save_as_regcache): Add const.
1360         (get_frame_address_space): Return const address_space *.
1361         * frame.h (get_frame_address_space): Update declaration.
1362         * infrun.c (struct step_over_info) <aspace>: Add const.
1363         (set_step_over_info): Make aspace const.
1364         (displaced_step_prepare_throw): Change variable const.
1365         (resume): Likewise.
1366         (proceed): Likewise.
1367         (adjust_pc_after_break): Likewise.
1368         (save_waitstatus): Likewise.
1369         (handle_signal_stop): Likewise.
1370         (keep_going_pass_signal): Likewise.
1371         * jit.c (jit_frame_sniffer): Add const.
1372         * mips-tdep.c (mips_single_step_through_delay): Likewise.
1373         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1374         * record-full.c (record_full_wait_1): Likewise.
1375         * regcache.c (regcache::regcache): Change parameter to const.
1376         * regcache.h (regcache::regcache): Likewise.
1377         (regcache::aspace): Return const address_space *.
1378         (regcache) <m_aspace>: Add const.
1379
1380 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1381
1382         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1383         * frame.c (create_sentinel_frame): Likewise.
1384         * infrun.c (displaced_step_prepare_throw): Likewise.
1385         (resume): Likewise.
1386         (thread_still_needs_step_over_bp): Likewise.
1387         (proceed): Likewise.
1388         (do_target_wait): Likewise.
1389         (adjust_pc_after_break): Likewise.
1390         (handle_syscall_event): Likewise.
1391         (save_waitstatus): Likewise.
1392         (handle_inferior_event_1): Likewise.
1393         (handle_signal_stop): Likewise.
1394         (keep_going_pass_signal): Likewise.
1395         * linux-nat.c (status_callback): Likewise.
1396         (save_stop_reason): Likewise.
1397         (resume_stopped_resumed_lwps): Likewise.
1398         * record-full.c (record_full_exec_insn): Likewise.
1399         (record_full_wait_1): Likewise.
1400         * regcache.c (get_regcache_aspace): Remove.
1401         * regcache.h (get_regcache_aspace): Remove.
1402
1403 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1404
1405         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1406         (init_regcache_descr): Use gdbarch_num_regs.
1407         (regcache::regcache): Likewise.
1408         (regcache::get_register_status): Likewise.
1409         (regcache::assert_raw_regnum): Likewise.
1410         (regcache::cooked_read): Likewise.
1411         (regcache::cooked_read_value): Likewise.
1412         (regcache::cooked_write): Likewise.
1413         (regcache::dump): Likewise.
1414         (regcache::num_raw_registers): New method.
1415         * regcache.h (class regcache) <num_raw_registers>: New.
1416
1417 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1418
1419         * regcache.c (regcache::assert_regnum): New method.
1420         (regcache::invalidate): Call assert_regnum.
1421         (regcache::raw_update): Likewise.
1422         (regcache::raw_write): Likewise.
1423         (regcache::raw_read_part): Likewise.
1424         (regcache::raw_write_part): Likewise.
1425         (regcache::raw_supply): Likewise.
1426         (regcache::raw_supply_integer): Likewise.
1427         (regcache::raw_supply_zeroed): Likewise.
1428         (regcache::raw_collect): Likewise.
1429         (regcache::raw_collect_integer): Likewise.
1430         * regcache.h (regcache::assert_regnum): Declare.
1431
1432 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1433
1434         * regcache.c (regcache::dump): Remove code.
1435
1436 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1437
1438         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1439         Remove.
1440         <sizeof_cooked_register_status>: Remove.
1441         (init_regcache_descr): Update.
1442         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1443         (regcache::save): Likewise.
1444         (regcache::dump): Likewise.
1445
1446 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
1447
1448         * ft32-tdep.c (ft32_fetch_instruction): New function.
1449         (ft32_analyze_prologue): Use ft32_fetch_instruction().
1450
1451 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
1452
1453         * cli/cli-script.c (execute_control_command): Rename to ...
1454         (execute_control_command_1): ... this.
1455         (execute_control_command): New function.
1456
1457 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
1458
1459         * tracepoint.c (tfind_command): Remove const_cast.
1460
1461 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
1462
1463         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1464
1465 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
1466
1467         * common/common-utils.h (in_inclusive_range): New function.
1468         * arm-tdep.c (arm_record_extension_space): Use
1469         in_inclusive_range.
1470         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1471         * cris-tdep.c (cris_spec_reg_applicable): Use
1472         in_inclusive_range.
1473
1474 2017-10-30  Pedro Alves  <palves@redhat.com>
1475             Simon Marchi <simon.marchi@ericsson.com>
1476
1477         * remote.c (remote_set_syscall_catchpoint): Build a std::string
1478         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1479
1480 2017-10-30  Pedro Alves  <palves@redhat.com>
1481
1482         * common/common-utils.c (string_appendf, string_vappendf): New
1483         functions.
1484         * common/common-utils.h (string_appendf, string_vappendf): New
1485         declarations.
1486         * unittests/common-utils-selftests.c (string_appendf_func)
1487         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1488         (string_vappendf_tests): New functions.
1489         (_initialize_common_utils_selftests): Register "string_appendf" and
1490         "string_vappendf tests".
1491
1492 2017-10-30  Pedro Alves  <palves@redhat.com>
1493
1494         * unittests/common-utils-selftests.c (format_func): New typedef.
1495         (string_printf_tests, string_vprintf_tests): Tests factored out
1496         and merged to ...
1497         (test_format_func): ... this new function.
1498         (string_printf_tests, string_vprintf_tests): Reimplement on top of
1499         test_format_func.
1500
1501 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1502
1503         * darwin-nat.c: Remove include of gdb.h.
1504
1505 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1506
1507         * xtensa-xtregs.c: Fix formatting issues.
1508
1509 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1510
1511         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1512
1513 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
1514
1515         PR python/21213
1516         * python/py-infthread.c (thpy_get_inferior): Increment reference
1517         of inferior before returning it.
1518
1519 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1520
1521         * unittests/common-utils-selftests.c (format): Add
1522         ATTRIBUTE_PRINTF.
1523
1524 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1525
1526         * xml-syscall.c (struct syscall_desc): Add constructor.
1527         <name>: Change type to std::string.
1528         (syscall_desc_up): New typedef.
1529         (syscall_desc_p): Remove typeder.
1530         (DEF_VEC_P(syscall_desc_p)): Remove.
1531         (struct syscall_group_desc): Add constructor.
1532         <name>: Change type to std::string.
1533         <syscalls>: Change type to std::vector.
1534         (syscall_group_desc_up): New typedef.
1535         (syscall_group_desc_p): Remove typedef.
1536         (DEF_VEC_P(syscall_group_desc_p)): Remove.
1537         (struct syscalls_info) <syscalls>: Change type to std::vector of
1538         unique_ptr.
1539         <groups>: Likewise.
1540         <my_gdb_datadir>: Change type to std::string.
1541         (syscalls_info_up): New typedef.
1542         (allocate_syscalls_info): Remove.
1543         (syscalls_info_free_syscalls_desc): Remove.
1544         (syscalls_info_free_syscall_group_desc): Remove.
1545         (free_syscalls_info): Remove.
1546         (make_cleanup_free_syscalls_info): Remove.
1547         (syscall_group_create_syscall_group_desc): Adjust.
1548         (syscall_group_add_syscall): Adjust.
1549         (syscall_create_syscall_desc): Adjust.
1550         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1551         (init_syscalls_info): Adjust.
1552         (syscall_group_get_group_by_name): Adjust.
1553         (xml_get_syscall_number): Adjust.
1554         (xml_get_syscall_name): Adjust.
1555         (xml_list_of_syscalls): Adjust.
1556         (xml_list_syscalls_by_group): Adjust.
1557         (xml_list_of_groups): Adjust.
1558
1559 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1560
1561         * probe.h: Don't include gdb_vecs.h.
1562         (DEF_VEC_P (probe_p)): Remove.
1563         (find_probes_in_objfile): Return an std::vector.
1564         * probe.c (find_probes_in_objfile): Likewise.
1565         * breakpoint.c (breakpoint_objfile_data)
1566         <longjmp_probes>: Change type to std::vector.
1567         <exception_probes>: Likewise.
1568         (free_breakpoint_probes): Don't manually free vectors.
1569         (create_longjmp_master_breakpoint): Adjust.
1570         (create_exception_master_breakpoint): Adjust.
1571         * solib-svr4.c (svr4_create_probe_breakpoints): Change
1572         parameter type, adjust.
1573         (svr4_create_solib_event_breakpoints): Adjust.
1574
1575 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1576
1577         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1578         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1579         with new.
1580         (free_breakpoint_probes): Rename to ...
1581         (free_breakpoint_objfile_data): ... this, and call delete on
1582         bp_objfile_data..
1583
1584 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1585
1586         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1587         (loaded_script_ptr): Remove typedef.
1588         (DEF_VEC_P (loaded_script_ptr)): Remove.
1589         (struct collect_matching_scripts_data): Add constructor.
1590         <scripts_p>: Change type to (pointer to) std::vector.
1591         (collect_matching_scripts_data): Adjust.
1592         (sort_scripts_by_name): Make suitable for std::sort.
1593         (print_scripts): Don't sort vector, adjust to std::vector.
1594         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1595
1596 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1597
1598         * symfile.c (filename_language): Make struct, not typedef.  Add
1599         constructor.
1600         <ext>: Change type to std::string.
1601         (DEF_VEC_O (filename_language)): Remove.
1602         (filename_language_table): Change type to std::vector.
1603         (add_filename_language): Adjust.
1604         (set_ext_lang_command): Adjust.
1605         (info_ext_lang_command): Adjust.
1606         (deduce_language_from_filename): Adjust.
1607         (class scoped_restore_filename_language_table): Remove.
1608         (test_filename_language): Use scoped_restore.
1609         (test_set_ext_lang_command): Use scoped_restore, adjust to
1610         std::vector change.
1611
1612 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1613
1614         * symfile.c: Include selftest.h.
1615         (class scoped_restore_filename_language_table): New.
1616         (test_filename_language): New test.
1617         (test_set_ext_lang_command): New test.
1618         (_initialize_symfile): Register tests.
1619
1620 2017-10-27  Keith Seitz  <keiths@redhat.com>
1621
1622         * breakpoint.c (print_breakpoint_location): Use the symbol saved
1623         in the bp_location, falling back to find_pc_sect_function when
1624         needed.
1625         (add_location_to_breakpoint): Save sal->symbol.
1626         * breakpoint.h (struct bp_location) <symbol>: New field.
1627         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1628         * symtab.h (struct symtab_and_line) <symbol>: New field.
1629
1630 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
1631
1632         PR gdb/13669
1633         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1634         to rewind obstack.
1635
1636 2017-10-26  Pedro Alves  <palves@redhat.com>
1637
1638         * remote.c (remote_async_terminal_ours_p): Delete.
1639         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1640         Remove references to 'remote_async_terminal_ours_p'.
1641
1642 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1643
1644         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1645
1646 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1647
1648         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1649         aspace const.
1650         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1651         Likewise.
1652         * breakpoint.c (bpstat_check_location): Remove cast.
1653         (breakpoint_hit_catch_fork): Make aspce const.
1654         (breakpoint_hit_catch_solib): Likewise.
1655         (breakpoint_hit_catch_exec): Likewise.
1656         (breakpoint_hit_ranged_breakpoint): Likewise.
1657         (breakpoint_hit_watchpoint): Likewise.
1658         (base_breakpoint_breakpoint_hit): Likewise.
1659         (bkpt_breakpoint_hit): Likewise.
1660         (dprintf_breakpoint_hit): Likewise.
1661         (tracepoint_breakpoint_hit): Likewise.
1662         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1663
1664 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1665
1666         * breakpoint.c (breakpoint_location_address_match): Change
1667         "struct address_space *" to "const address_space".
1668         (breakpoint_location_address_range_overlap): Likewise.
1669         (breakpoint_here_p): Likewise.
1670         (breakpoint_in_range_p): Likewise.
1671         (moribund_breakpoint_here_p): Likewise.
1672         (bp_location_inserted_here_p): Likewise.
1673         (software_breakpoint_inserted_here_p): Likewise.
1674         (hardware_breakpoint_inserted_here_p): Likewise.
1675         (hardware_watchpoint_inserted_in_range): Likewise.
1676         (bpstat_check_location): Likewise.
1677         (bpstat_stop_status): Likewise.
1678         (breakpoint_address_match): Likewise.
1679         (breakpoint_address_match_range): Likewise.
1680         (breakpoint_location_address_match): Likewise.
1681         (breakpoint_location_address_range_overlap): Likewise.
1682         (insert_single_step_breakpoint): Likewise.
1683         (breakpoint_has_location_inserted_here): Likewise.
1684         (single_step_breakpoint_inserted_here_p): Likewise.
1685         (pc_at_non_inline_function): Likewise.
1686         * breakpoint.h (bpstat_stop_status): Update declaration.
1687         (breakpoint_here_p): Likewise.
1688         (breakpoint_in_range_p): Likewise.
1689         (moribund_breakpoint_here_p): Likewise.
1690         (breakpoint_inserted_here_p): Likewise.
1691         (software_breakpoint_inserted_here_p): Likewise.
1692         (hardware_breakpoint_inserted_here_p): Likewise.
1693         (breakpoint_has_location_inserted_here): Likewise.
1694         (single_step_breakpoint_inserted_here_p): Likewise.
1695         (hardware_watchpoint_inserted_in_range): Likewise.
1696         (breakpoint_address_match): Likewise.
1697         (insert_single_step_breakpoint): Likewise.
1698         (pc_at_non_inline_function): Likewise.
1699         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1700         * record.c (record_check_stopped_by_breakpoint): Likewise.
1701         * record.h (record_check_stopped_by_breakpoint): Likewise.
1702         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1703
1704 2017-10-25  Yao Qi  <yao.qi@linaro.org>
1705
1706         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1707         regcache->arch () instead get_regcache_arch.
1708         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1709         Likewise.
1710         (aarch64_fbsd_store_inferior_registers): Likewise.
1711         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1712         (store_gregs_to_thread): Likewise.
1713         (fetch_fpregs_from_thread): Likewise.
1714         (store_fpregs_to_thread): Likewise.
1715         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1716         (aarch64_store_return_value): Likewise.
1717         (aarch64_software_single_step): Likewise.
1718         * aix-thread.c (aix_thread_wait): Likewise.
1719         (supply_reg32): Likewise.
1720         (supply_sprs64): Likewise.
1721         (supply_sprs32): Likewise.
1722         (fill_gprs64): Likewise.
1723         (fill_gprs32): Likewise.
1724         (fill_sprs64): Likewise.
1725         (fill_sprs32): Likewise.
1726         (store_regs_user_thread): Likewise.
1727         (store_regs_kernel_thread): Likewise.
1728         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1729         (alphabsd_store_inferior_registers): Likewise.
1730         * alpha-tdep.c (alpha_extract_return_value): Likewise.
1731         (alpha_store_return_value): Likewise.
1732         (alpha_deal_with_atomic_sequence): Likewise.
1733         (alpha_next_pc): Likewise.
1734         (alpha_software_single_step): Likewise.
1735         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1736         (amd64bsd_store_inferior_registers): Likewise.
1737         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1738         Likewise.
1739         (amd64_linux_store_inferior_registers): Likewise.
1740         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1741         (amd64_collect_native_gregset): Likewise.
1742         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1743         (amd64obsd_collect_uthread): Likewise.
1744         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1745         (amd64_collect_fpregset): Likewise.
1746         (amd64_supply_fxsave): Likewise.
1747         (amd64_supply_xsave): Likewise.
1748         (amd64_collect_fxsave): Likewise.
1749         (amd64_collect_xsave): Likewise.
1750         * arc-tdep.c (arc_write_pc): Likewise.
1751         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1752         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1753         (arm_fbsd_store_inferior_registers): Likewise.
1754         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1755         (store_vfp_regs): Likewise.
1756         (arm_linux_fetch_inferior_registers): Likewise.
1757         (arm_linux_store_inferior_registers): Likewise.
1758         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1759         (arm_linux_sigreturn_next_pc): Likewise.
1760         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1761         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1762         (fetch_register): Likewise.
1763         (store_register): Likewise.
1764         * arm-tdep.c (arm_is_thumb): Likewise.
1765         (displaced_in_arm_mode): Likewise.
1766         (bx_write_pc): Likewise.
1767         (arm_get_next_pcs_addr_bits_remove): Likewise.
1768         (arm_software_single_step): Likewise.
1769         (arm_extract_return_value): Likewise.
1770         (arm_store_return_value): Likewise.
1771         (arm_write_pc): Likewise.
1772         * bfin-tdep.c (bfin_extract_return_value): Likewise.
1773         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
1774         (bsd_uthread_store_registers): Likewise.
1775         * core-regset.c (fetch_core_registers): Likewise.
1776         * corelow.c (get_core_registers): Likewise.
1777         * cris-tdep.c (cris_store_return_value): Likewise.
1778         (cris_extract_return_value): Likewise.
1779         (find_step_target): Likewise.
1780         (find_step_target): Likewise.
1781         (cris_software_single_step): Likewise.
1782         * ctf.c (ctf_fetch_registers): Likewise.
1783         * darwin-nat.c (cancel_breakpoint): Likewise.
1784         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
1785         * frv-tdep.c (frv_extract_return_value): Likewise.
1786         * ft32-tdep.c (ft32_store_return_value): Likewise.
1787         (ft32_extract_return_value): Likewise.
1788         * go32-nat.c (fetch_register): Likewise.
1789         (go32_fetch_registers): Likewise.
1790         (go32_store_registers): Likewise.
1791         (store_register): Likewise.
1792         * h8300-tdep.c (h8300_extract_return_value): Likewise.
1793         (h8300_store_return_value): Likewise.
1794         * hppa-linux-nat.c (fetch_register): Likewise.
1795         (store_register): Likewise.
1796         (hppa_linux_fetch_inferior_registers): Likewise.
1797         (hppa_linux_store_inferior_registers): Likewise.
1798         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
1799         (i386_darwin_store_inferior_registers): Likewise.
1800         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
1801         (gnu_store_registers): Likewise.
1802         * i386-linux-nat.c (fetch_register): Likewise.
1803         (store_register): Likewise.
1804         (supply_gregset): Likewise.
1805         (fill_gregset): Likewise.
1806         (i386_linux_fetch_inferior_registers): Likewise.
1807         (i386_linux_store_inferior_registers): Likewise.
1808         (i386_linux_resume): Likewise.
1809         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
1810         Likewise.
1811         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
1812         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
1813         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
1814         (i386obsd_collect_uthread): Likewise.
1815         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1816         (i386_supply_gregset): Likewise.
1817         (i386_collect_gregset): Likewise.
1818         (i386_supply_fpregset): Likewise.
1819         (i386_collect_fpregset): Likewise.
1820         (i386_mpx_bd_base): Likewise.
1821         * i386-v4-nat.c (supply_fpregset): Likewise.
1822         (fill_fpregset): Likewise.
1823         * i387-tdep.c (i387_supply_fsave): Likewise.
1824         (i387_collect_fsave): Likewise.
1825         (i387_supply_fxsave): Likewise.
1826         (i387_collect_fxsave): Likewise.
1827         (i387_supply_xsave): Likewise.
1828         (i387_collect_xsave): Likewise.
1829         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
1830         (ia64_linux_store_registers): Likewise.
1831         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
1832         (ia64_extract_return_value): Likewise.
1833         (ia64_store_return_value): Likewise.
1834         (find_func_descr): Likewise.
1835         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
1836         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
1837         (inf_ptrace_store_registers): Likewise.
1838         * infrun.c (use_displaced_stepping): Likewise.
1839         (displaced_step_prepare_throw): Likewise.
1840         (resume): Likewise.
1841         (proceed): Likewise.
1842         (do_target_wait): Likewise.
1843         (adjust_pc_after_break): Likewise.
1844         (handle_inferior_event_1): Likewise.
1845         (handle_signal_stop): Likewise.
1846         (save_infcall_suspend_state): Likewise.
1847         (restore_infcall_suspend_state): Likewise.
1848         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
1849         * jit.c (jit_frame_prev_register): Likewise.
1850         * linux-nat.c (save_stop_reason): Likewise.
1851         (linux_nat_wait_1): Likewise.
1852         (resume_stopped_resumed_lwps): Likewise.
1853         * linux-record.c (record_linux_sockaddr): Likewise.
1854         (record_linux_msghdr): Likewise.
1855         (record_linux_system_call): Likewise.
1856         * linux-tdep.c (linux_collect_thread_registers): Likewise.
1857         * lm32-tdep.c (lm32_extract_return_value): Likewise.
1858         (lm32_store_return_value): Likewise.
1859         * m32c-tdep.c (m32c_read_flg): Likewise.
1860         (m32c_pseudo_register_read): Likewise.
1861         (m32c_pseudo_register_write): Likewise.
1862         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
1863         (m32r_linux_collect_gregset): Likewise.
1864         * m32r-tdep.c (m32r_store_return_value): Likewise.
1865         (m32r_extract_return_value): Likewise.
1866         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1867         (m68kbsd_collect_fpregset): Likewise.
1868         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
1869         * m68k-linux-nat.c (fetch_register): Likewise.
1870         (old_fetch_inferior_registers): Likewise.
1871         (old_store_inferior_registers): Likewise.
1872         (store_regs): Likewise.
1873         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
1874         (m68k_svr4_store_return_value): Likewise.
1875         * m88k-tdep.c (m88k_store_arguments): Likewise.
1876         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
1877         (mi_cmd_data_write_register_values): Likewise.
1878         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
1879         (mips_fbsd_store_inferior_registers): Likewise.
1880         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
1881         (mips_fbsd_supply_gregs): Likewise.
1882         (mips_fbsd_collect_fpregs): Likewise.
1883         (mips_fbsd_collect_gregs): Likewise.
1884         (mips_fbsd_supply_fpregset): Likewise.
1885         (mips_fbsd_collect_fpregset): Likewise.
1886         (mips_fbsd_supply_gregset): Likewise.
1887         (mips_fbsd_collect_gregset): Likewise.
1888         * mips-linux-nat.c (supply_gregset): Likewise.
1889         (fill_gregset): Likewise.
1890         (supply_fpregset): Likewise.
1891         (fill_fpregset): Likewise.
1892         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
1893         (mips_fill_gregset): Likewise.
1894         (mips_supply_fpregset): Likewise.
1895         (mips_fill_fpregset): Likewise.
1896         (mips64_supply_gregset): Likewise.
1897         (micromips_linux_sigframe_validate): Likewise.
1898         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
1899         (mipsnbsd_fetch_inferior_registers): Likewise.
1900         (mipsnbsd_store_inferior_registers): Likewise.
1901         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1902         (mipsnbsd_supply_gregset): Likewise.
1903         (mipsnbsd_iterate_over_regset_sections): Likewise.
1904         (mipsnbsd_supply_reg): Likewise.
1905         (mipsnbsd_supply_fpreg): Likewise.
1906         * mips-tdep.c (mips_in_frame_stub): Likewise.
1907         (mips_dummy_id): Likewise.
1908         (is_octeon_bbit_op): Likewise.
1909         (micromips_bc1_pc): Likewise.
1910         (extended_mips16_next_pc): Likewise.
1911         (mips16_next_pc): Likewise.
1912         (deal_with_atomic_sequence): Likewise.
1913         * moxie-tdep.c (moxie_process_readu): Likewise.
1914         * nios2-tdep.c (nios2_get_next_pc): Likewise.
1915         * nto-procfs.c (procfs_store_registers): Likewise.
1916         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
1917         (ppcfbsd_store_inferior_registers): Likewise.
1918         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
1919         (fetch_altivec_register): Likewise.
1920         (get_spe_registers): Likewise.
1921         (fetch_spe_register): Likewise.
1922         (fetch_altivec_registers): Likewise.
1923         (fetch_all_gp_regs): Likewise.
1924         (fetch_all_fp_regs): Likewise.
1925         (store_vsx_register): Likewise.
1926         (store_altivec_register): Likewise.
1927         (set_spe_registers): Likewise.
1928         (store_spe_register): Likewise.
1929         (store_altivec_registers): Likewise.
1930         (store_all_gp_regs): Likewise.
1931         (store_all_fp_regs): Likewise.
1932         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
1933         (ppc_linux_collect_gregset): Likewise.
1934         (ppc_canonicalize_syscall): Likewise.
1935         (ppc_linux_record_signal): Likewise.
1936         (ppu2spu_prev_register): Likewise.
1937         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
1938         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
1939         (ppcobsd_store_registers): Likewise.
1940         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
1941         Likewise.
1942         (ppc_ravenscar_generic_store_registers): Likewise.
1943         * procfs.c (procfs_fetch_registers): Likewise.
1944         (procfs_store_registers): Likewise.
1945         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
1946         (ravenscar_store_registers): Likewise.
1947         (ravenscar_prepare_to_store): Likewise.
1948         * record-btrace.c (record_btrace_fetch_registers): Likewise.
1949         * record-full.c (record_full_wait_1): Likewise.
1950         (record_full_registers_change): Likewise.
1951         (record_full_store_registers): Likewise.
1952         (record_full_core_fetch_registers): Likewise.
1953         (record_full_save): Likewise.
1954         (record_full_goto_insn): Likewise.
1955         * regcache.c (regcache_register_size): Likewise.
1956         (get_regcache_arch): Remove.
1957         (regcache_read_pc): Likewise.
1958         * regcache.h (get_regcache_arch): Remove.
1959         * remote-sim.c (gdbsim_fetch_register): Likewise.
1960         (gdbsim_store_register): Likewise.
1961         * remote.c (fetch_register_using_p): Likewise.
1962         (send_g_packet): Likewise.
1963         (remote_prepare_to_store): Likewise.
1964         (store_registers_using_G): Likewise.
1965         * reverse.c (save_bookmark_command): Likewise.
1966         (goto_bookmark_command): Likewise.
1967         * rs6000-aix-tdep.c (branch_dest): Likewise.
1968         * rs6000-nat.c (rs6000_ptrace64): Likewise.
1969         (fetch_register): Likewise.
1970         * rs6000-tdep.c (ppc_supply_reg): Likewise.
1971         (ppc_collect_reg): Likewise.
1972         (ppc_collect_gregset): Likewise.
1973         (ppc_collect_fpregset): Likewise.
1974         (ppc_collect_vsxregset): Likewise.
1975         (ppc_collect_vrregset): Likewise.
1976         (ppc_displaced_step_hw_singlestep): Likewise.
1977         (rs6000_pseudo_register_read): Likewise.
1978         (rs6000_pseudo_register_write): Likewise.
1979         * s390-linux-nat.c (supply_gregset): Likewise.
1980         (fill_gregset): Likewise.
1981         (s390_linux_fetch_inferior_registers): Likewise.
1982         * s390-linux-tdep.c (s390_write_pc): Likewise.
1983         (s390_software_single_step): Likewise.
1984         (s390_all_but_pc_registers_record): Likewise.
1985         (s390_linux_syscall_record): Likewise.
1986         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
1987         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
1988         (shnbsd_store_inferior_registers): Likewise.
1989         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
1990         (sh_extract_return_value_fpu): Likewise.
1991         (sh_store_return_value_nofpu): Likewise.
1992         (sh_corefile_supply_regset): Likewise.
1993         (sh_corefile_collect_regset): Likewise.
1994         * sh64-tdep.c (sh64_extract_return_value): Likewise.
1995         (sh64_store_return_value): Likewise.
1996         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
1997         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
1998         (sparc_store_inferior_registers): Likewise.
1999         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2000         (sparc_ravenscar_prepare_to_store): Likewise.
2001         * sparc-tdep.c (sparc32_store_arguments): Likewise.
2002         (sparc_analyze_control_transfer): Likewise.
2003         (sparc_step_trap): Likewise.
2004         (sparc_software_single_step): Likewise.
2005         (sparc32_gdbarch_init): Likewise.
2006         (sparc_supply_rwindow): Likewise.
2007         (sparc_collect_rwindow): Likewise.
2008         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2009         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2010         (sparc64nbsd_collect_gregset): Likewise.
2011         (sparc64nbsd_supply_fpregset): Likewise.
2012         (sparc64nbsd_collect_fpregset): Likewise.
2013         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2014         (sparc64_supply_gregset): Likewise.
2015         (sparc64_collect_gregset): Likewise.
2016         (sparc64_supply_fpregset): Likewise.
2017         (sparc64_collect_fpregset): Likewise.
2018         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2019         * spu-tdep.c (spu_unwind_sp): Likewise.
2020         (spu2ppu_prev_register): Likewise.
2021         (spu_memory_remove_breakpoint): Likewise.
2022         * stack.c (return_command): Likewise.
2023         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2024         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2025         * tracefile.c (trace_save_ctf): Likewise.
2026         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2027         (do_windows_store_inferior_registers): Likewise.
2028         (windows_resume): Likewise.
2029         * xtensa-linux-nat.c (fill_gregset): Likewise.
2030         (supply_gregset_reg): Likewise.
2031         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2032         (xtensa_register_read_masked): Likewise.
2033         (xtensa_supply_gregset): Likewise.
2034         (xtensa_extract_return_value): Likewise.
2035         (xtensa_store_return_value): Likewise.
2036
2037 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
2038
2039         * doublest.c (floatformat_from_string): New function.
2040         * doublest.h (floatformat_from_string): Add prototype.
2041
2042         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2043         (OP_FLOAT): ... this.
2044         * expression.h: Do not include "doublest.h".
2045         (union exp_element): Replace doubleconst and decfloatconst by
2046         new element floatconst.
2047         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2048         (ada_evaluate_subexp): Likewise.
2049         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2050         OP_DOUBLE and OP_DECFLOAT.
2051         * expprint.c (print_subexp_standard): Likewise.
2052         (dump_subexp_body_standard): Likewise.
2053         * breakpoint.c (watchpoint_exp_is_const): Likewise.
2054
2055         * parse.c: Include "dfp.h".
2056         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2057         (write_exp_elt_floatcst): New function.
2058         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2059         and OP_DECFLOAT.
2060         (operator_check_standard): Likewise.
2061         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
2062         Return target format buffer instead of host DOUBLEST.
2063         Use floatformat_from_string and decimal_from_string to parse
2064         either binary or decimal floating-point types.
2065         (parse_c_float): Remove.
2066         * parser-defs.h: Do not include "doublest.h".
2067         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2068         (write_exp_elt_floatcst): Add prototype.
2069         (parse_float): Update prototype.
2070         (parse_c_float): Remove.
2071
2072         * c-exp.y: Do not include "dfp.h".
2073         (typed_val_float): Use byte buffer instead of DOUBLEST.
2074         (typed_val_decfloat): Remove.
2075         (DECFLOAT): Remove.
2076         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2077         (parse_number): Update to new parse_float interface.
2078         Parse suffixes and determine type before calling parse_float.
2079         Handle decimal and binary FP types the same way.
2080
2081         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2082         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2083         (parse_number): Update to new parse_float interface.
2084         Parse suffixes and determine type before calling parse_float.
2085
2086         * f-exp.y: Replace dval by typed_val_float.
2087         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2088         (parse_number): Use parse_float instead of atof.
2089
2090         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2091         (parse_go_float): Remove.
2092         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2093         (parse_number): Call parse_float instead of parse_go_float.
2094         Parse suffixes and determine type before calling parse_float.
2095
2096         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2097         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2098         (parse_number): Update to new parse_float interface.
2099         Parse suffixes and determine type before calling parse_float.
2100
2101         * m2-exp.y: Replace dval by byte buffer val.
2102         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2103         (parse_number): Call parse_float instead of atof.
2104
2105         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2106         (lex_number): Call parse_float instead of strtod.
2107         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2108         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2109         Use write_exp_elt_floatcst.
2110         (unit_testing): Remove static variable.
2111         (rust_type): Do not check unit_testing.
2112         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
2113
2114         * ada-exp.y (type_float, type_double): Remove.
2115         (typed_val_float): Use byte buffer instead of DOUBLEST.
2116         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2117         * ada-lex.l (processReal): Use parse_float instead of sscanf.
2118
2119 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
2120
2121         * aarch64-tdep.h (enum aarch64_regnum): Remove.
2122         * arch/aarch64.h: New file.
2123
2124 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2125
2126         * dfp.h (decimal_from_string): Use const reference for argument.
2127         * dfp.c (decimal_from_string): Likewise.
2128
2129 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2130
2131         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2132         * sh64-tdep.c (sh64_do_fp_register): Likewise.
2133         * mips-tdep.c (mips_print_fp_register): Likewise.
2134
2135 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2136
2137         * common/format.h (enum argclass): Replace decfloat_arg by
2138         dec32float_arg, dec64float_arg, and dec128float_arg.
2139         * common/format.c (parse_format_string): Update to return
2140         new decimal float argument classes.
2141
2142         * printcmd.c (printf_decfloat): Rename to ...
2143         (printf_floating): ... this.  Add argclass argument, and use it
2144         instead of parsing the format string again.  Add support for
2145         binary floating-point values, using floatformat_to_string.
2146         Convert value to the target format if it doesn't already match.
2147         (ui_printf): Call printf_floating instead of printf_decfloat,
2148         also for double_arg / long_double_arg.  Pass argclass.
2149
2150         * dfp.c (decimal_to_string): Add format string argument.
2151         * dfp.h (decimal_to_string): Likewise.
2152
2153         * doublest.c (floatformat_to_string): Add format string argument.
2154         * doublest.h (floatformat_to_string): Likewise.
2155
2156 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2157
2158         * doublest.c (floatformat_precision): New routine.
2159         (floatformat_to_string): Likewise.
2160         * doublest.c (floatformat_to_string): Add prototype.
2161
2162         * printcmd.c (print_scalar_formatted): Only call print_floating
2163         on floating-point types.
2164         * valprint.c: Do not include "floatformat.h".
2165         (generic_val_print_decfloat): Remove.
2166         (generic_val_print): Call generic_val_print_float for both
2167         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2168         (print_floating): Use floatformat_to_string.  Handle decimal float.
2169         (print_decimal_floating): Remove, merge into floatformat_to_string.
2170         * value.h (print_decimal_floating): Remove.
2171
2172         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2173
2174 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2175
2176         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2177
2178 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2179
2180         * memattr.h: Don't include vec.h.
2181         (struct mem_attrib): Initialize fields.
2182         <unknown>: New static method.
2183         (struct mem_region): Add constructors, operator<, initialize
2184         fields.
2185         * memattr.c: Include algorithm.
2186         (default_mem_attrib, unknown_mem_attrib): Remove.
2187         (user_mem_region_list): New global.
2188         (target_mem_region_list, mem_region_list): Change type to
2189         std::vector<mem_region>.
2190         (mem_use_target): Now a function.
2191         (target_mem_regions_valid): Change type to bool.
2192         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2193         (require_user_regions): Adjust.
2194         (require_target_regions): Adjust.
2195         (create_mem_region): Adjust.
2196         (lookup_mem_region): Adjust.
2197         (invalidate_target_mem_regions): Adjust.
2198         (mem_clear): Rename to...
2199         (user_mem_clear): ... this, and adjust.
2200         (mem_command): Adjust.
2201         (info_mem_command): Adjust.
2202         (mem_enable, enable_mem_command, mem_disable,
2203         disable_mem_command): Adjust.
2204         (mem_delete): Adjust.
2205         (delete_mem_command): Adjust.
2206         * memory-map.h (parse_memory_map): Return an std::vector.
2207         * memory-map.c (parse_memory_map): Likewise.
2208         (struct memory_map_parsing_data): Add constructor.
2209         <memory_map>: Point to std::vector.
2210         (memory_map_start_memory): Adjust.
2211         (memory_map_end_memory): Adjust.
2212         (memory_map_end_property): Adjust.
2213         (clear_result): Remove.
2214         * remote.c (remote_memory_map): Return an std::vector.
2215         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2216         Remove.
2217         (target_debug_print_mem_region_vector): New.
2218         * target-delegates.c: Regenerate.
2219         * target.h (mem_region_vector): New typedef.
2220         (to_memory_map): Return mem_region_vector.
2221         (target_memory_map): Return an std::vector.
2222         * target.c (target_memory_map): Return an std::vector.
2223         (flash_erase_command): Adjust.
2224
2225 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2226
2227         * memory-map.c (struct memory_map_parsing_data) <property_name>:
2228         Change type to std::string.
2229         (memory_map_start_property): Adjust.
2230         (memory_map_end_property): Adjust.
2231
2232 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2233
2234         * infrun.h: Include common/byte-vector.h.
2235         (struct displaced_step_closure): New struct.
2236         (struct buf_displaced_step_closure): New struct.
2237         * infrun.c (displaced_step_closure::~displaced_step_closure):
2238         Provide default implementation.
2239         (displaced_step_clear): Deallocate step closure with delete.
2240         * aarch64-tdep.c (displaced_step_closure): Rename to ...
2241         (aarch64_displaced_step_closure): ... this, extend
2242         displaced_step_closure.
2243         (aarch64_displaced_step_data) <dsc>: Change type to
2244         aarch64_displaced_step_closure.
2245         (aarch64_displaced_step_copy_insn): Adjust to type change, use
2246         unique_ptr.
2247         (aarch64_displaced_step_fixup): Add cast for displaced step
2248         closure.
2249         * amd64-tdep.c (displaced_step_closure): Rename to ...
2250         (amd64_displaced_step_closure): ... this, extend
2251         displaced_step_closure.
2252         <insn_buf>: Change type to std::vector<gdb_byte>.
2253         <max_len>: Remove.
2254         (fixup_riprel): Change type of DSC parameter, adjust to type
2255         change of insn_buf.
2256         (fixup_displaced_copy): Change type of DSC parameter.
2257         (amd64_displaced_step_copy_insn): Instantiate
2258         amd64_displaced_step_closure.
2259         (amd64_displaced_step_fixup): Add cast for closure type, adjust
2260         to type change of insn_buf.
2261         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2262         parameter DSC.
2263         (arm_linux_copy_svc): Likewise.
2264         (cleanup_kernel_helper_return): Likewise.
2265         (arm_catch_kernel_helper_return): Likewise.
2266         (arm_linux_displaced_step_copy_insn): Instantiate
2267         arm_displaced_step_closure.
2268         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2269         (displaced_read_reg): Change type of parameter DSC.
2270         (branch_write_pc): Likewise.
2271         (load_write_pc): Likewise.
2272         (alu_write_pc): Likewise.
2273         (displaced_write_reg): Likewise.
2274         (arm_copy_unmodified): Likewise.
2275         (thumb_copy_unmodified_32bit): Likewise.
2276         (thumb_copy_unmodified_16bit): Likewise.
2277         (cleanup_preload): Likewise.
2278         (install_preload): Likewise.
2279         (arm_copy_preload): Likewise.
2280         (thumb2_copy_preload): Likewise.
2281         (install_preload_reg): Likewise.
2282         (arm_copy_preload_reg): Likewise.
2283         (cleanup_copro_load_store): Likewise.
2284         (install_copro_load_store): Likewise.
2285         (arm_copy_copro_load_store) Likewise.
2286         (thumb2_copy_copro_load_store): Likewise.
2287         (cleanup_branch): Likewise.
2288         (install_b_bl_blx): Likewise.
2289         (arm_copy_b_bl_blx): Likewise.
2290         (thumb2_copy_b_bl_blx): Likewise.
2291         (thumb_copy_b): Likewise.
2292         (install_bx_blx_reg): Likewise.
2293         (arm_copy_bx_blx_reg): Likewise.
2294         (thumb_copy_bx_blx_reg): Likewise.
2295         (cleanup_alu_imm): Likewise.
2296         (arm_copy_alu_imm): Likewise.
2297         (thumb2_copy_alu_imm): Likewise.
2298         (cleanup_alu_reg): Likewise.
2299         (install_alu_reg): Likewise.
2300         (arm_copy_alu_reg): Likewise.
2301         (thumb_copy_alu_reg): Likewise.
2302         (cleanup_alu_shifted_reg): Likewise.
2303         (install_alu_shifted_reg): Likewise.
2304         (arm_copy_alu_shifted_reg): Likewise.
2305         (cleanup_load): Likewise.
2306         (cleanup_store): Likewise.
2307         (arm_copy_extra_ld_st): Likewise.
2308         (install_load_store): Likewise.
2309         (thumb2_copy_load_literal): Likewise.
2310         (thumb2_copy_load_reg_imm): Likewise.
2311         (arm_copy_ldr_str_ldrb_strb): Likewise.
2312         (cleanup_block_load_all): Likewise.
2313         (cleanup_block_store_pc): Likewise.
2314         (cleanup_block_load_pc): Likewise.
2315         (arm_copy_block_xfer): Likewise.
2316         (thumb2_copy_block_xfer): Likewise.
2317         (cleanup_svc): Likewise.
2318         (install_svc): Likewise.
2319         (arm_copy_svc): Likewise.
2320         (thumb_copy_svc): Likewise.
2321         (arm_copy_undef): Likewise.
2322         (thumb_32bit_copy_undef): Likewise.
2323         (arm_copy_unpred): Likewise.
2324         (arm_decode_misc_memhint_neon): Likewise.
2325         (arm_decode_unconditional): Likewise.
2326         (arm_decode_miscellaneous): Likewise.
2327         (arm_decode_dp_misc): Likewise.
2328         (arm_decode_ld_st_word_ubyte): Likewise.
2329         (arm_decode_media): Likewise.
2330         (arm_decode_b_bl_ldmstm): Likewise.
2331         (arm_decode_ext_reg_ld_st): Likewise.
2332         (thumb2_decode_dp_shift_reg): Likewise.
2333         (thumb2_decode_ext_reg_ld_st): Likewise.
2334         (arm_decode_svc_copro): Likewise.
2335         (thumb2_decode_svc_copro): Likewise.
2336         (install_pc_relative): Likewise.
2337         (thumb_copy_pc_relative_16bit): Likewise.
2338         (thumb_decode_pc_relative_16bit): Likewise.
2339         (thumb_copy_pc_relative_32bit): Likewise.
2340         (thumb_copy_16bit_ldr_literal): Likewise.
2341         (thumb_copy_cbnz_cbz): Likewise.
2342         (thumb2_copy_table_branch): Likewise.
2343         (cleanup_pop_pc_16bit_all): Likewise.
2344         (thumb_copy_pop_pc_16bit): Likewise.
2345         (thumb_process_displaced_16bit_insn): Likewise.
2346         (decode_thumb_32bit_ld_mem_hints): Likewise.
2347         (thumb_process_displaced_32bit_insn): Likewise.
2348         (thumb_process_displaced_insn): Likewise.
2349         (arm_process_displaced_insn): Likewise.
2350         (arm_displaced_init_closure): Likewise.
2351         (arm_displaced_step_fixup): Add cast for closure.
2352         * arm-tdep.h: Include infrun.h.
2353         (displaced_step_closure): Rename to ...
2354         (arm_displaced_step_closure): ... this, extend
2355         displaced_step_closure.
2356         <u::svc::copy_svc_os>: Change type of parameter DSC.
2357         <cleanup>: Likewise.
2358         (arm_process_displaced_insn): Likewise.
2359         (arm_displaced_init_closure): Likewise.
2360         (displaced_read_reg): Likewise.
2361         (displaced_write_reg): Likewise.
2362         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2363         Adjust.
2364         * i386-tdep.h: Include infrun.h.
2365         (i386_displaced_step_closure): New typedef.
2366         * i386-tdep.c (i386_displaced_step_copy_insn): Use
2367         i386_displaced_step_closure.
2368         (i386_displaced_step_fixup): Adjust.
2369         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2370         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2371         and unique_ptr.
2372         (ppc_displaced_step_fixup): Adjust.
2373         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2374         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2375         and unique_ptr.
2376         (s390_displaced_step_fixup): Adjust.
2377
2378 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2379
2380         * interps.h (interp_resume, interp_suspend, interp_set_temp):
2381         Remove declarations.
2382
2383 2017-10-20  Tom Tromey  <tom@tromey.com>
2384
2385         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2386         std::vector.
2387         (gdb_bfd_record_inclusion): Update.
2388         (bfdp): Remove typedef.
2389
2390 2017-10-20  Tom Tromey  <tom@tromey.com>
2391
2392         * gdb_bfd.c (gdb_bfd_ref): Use new.
2393         (struct gdb_bfd_data): Add constructor, destructor, and member
2394         initializers.
2395         (gdb_bfd_unref): Use delete.
2396
2397 2017-10-20  Tom Tromey  <tom@tromey.com>
2398
2399         * exec.c (exec_file_attach): Use new_bfd_ref.
2400         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2401         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2402         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2403         new_bfd_ref.
2404         * gdb_bfd.h (new_bfd_ref): New function.
2405
2406 2017-10-20  Pedro Alves  <palves@redhat.com>
2407
2408         * main.c (captured_command_loop): Add attribute noinline.
2409
2410 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
2411
2412         * interps.c (struct interp_factory): Add constructor.
2413         (interp_factory_p): Remove typedef.
2414         (DEF_VEC_P(interp_factory_p)): Remove.
2415         (interpreter_factories): Change type to std::vector.
2416         (interp_factory_register): Adjust.
2417         (interp_lookup): Adjust.
2418         (interpreter_completer): Adjust.
2419
2420 2017-10-19  Tom Tromey  <tom@tromey.com>
2421
2422         * break-catch-syscall.c (catch_syscall_completer): Use
2423         std::string, gdb::unique_xmalloc_ptr.
2424
2425 2017-10-19  Tom Tromey  <tom@tromey.com>
2426
2427         * infcall.c (call_function_by_hand_dummy): Use std::string.
2428
2429 2017-10-19  Tom Tromey  <tom@tromey.com>
2430
2431         * mi/mi-main.c (mi_cmd_execute): Update.
2432         * top.h (prepare_execute_command): Return scoped_value_mark.
2433         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2434         Add move constructor.
2435         * top.c (prepare_execute_command): Return scoped_value_mark.
2436         (execute_command): Update.
2437
2438 2017-10-19  Pedro Alves  <palves@redhat.com>
2439
2440         * xml-support.c (xml_fetch_content_from_file): Check fread's
2441         return.
2442
2443 2017-10-19  Pedro Alves  <palves@redhat.com>
2444
2445         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2446         async.
2447         (handle_error_fd): New function.
2448         (ser_base_async): Add/delete an event loop file handler for
2449         error_fd.
2450
2451 2017-10-19  Pedro Alves  <palves@redhat.com>
2452
2453         * xml-support.c (xml_fetch_content_from_file): Don't read in
2454         chunks.  Instead use fseek to determine the file's size, and read
2455         it in one go.
2456
2457 2017-11-18  Keith Seitz  <keiths@redhat.com>
2458
2459         * c-exp.y (oper): Canonicalize conversion operators of user-defined
2460         types.
2461         Add whitespace to front of type name.
2462
2463 2017-10-18  Keith Seitz  <keiths@redhat.com>
2464
2465         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2466         DW_AT_accessibility.
2467
2468 2017-10-18  Yao Qi  <yao.qi@linaro.org>
2469
2470         * features/tic6x-c62x-linux.c: Remove.
2471
2472 2017-10-17  Tom Tromey  <tom@tromey.com>
2473
2474         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2475         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2476         (do_mixed_source_and_assembly): Likewise.
2477
2478 2017-10-17  Tom Tromey  <tom@tromey.com>
2479
2480         * regcache.c (regcache::xfer_part): Remove assertion.
2481
2482 2017-10-17  Pedro Alves  <palves@redhat.com>
2483
2484         * xml-support.c (xml_fetch_content_from_file): Call
2485         unique_ptr::release() instead unique_ptr::get() when passing
2486         through xrealloc.
2487
2488 2017-10-17  Yao Qi  <yao.qi@linaro.org>
2489
2490         * regcache.c (regcache::xfer_part): Remove parameters read and
2491         write, add parameter is_raw.  All callers are updated.
2492
2493 2017-10-16  Keith Seitz  <keiths@redhat.com>
2494
2495         * c-typeprint.c (enum access_specifier): Moved here from
2496         c_type_print_base.
2497         (output_access_specifier): New function.
2498         (c_type_print_base): Consider typedefs when assessing
2499         whether access labels are needed.
2500         Use output_access_specifier as needed.
2501         Output access specifier for typedefs, if needed.
2502         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2503         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2504         fields.
2505         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2506         accessor macros.
2507
2508 2017-10-16  Tom Tromey  <tom@tromey.com>
2509
2510         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2511         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2512         * target.c (target_fileio_read_stralloc): Update.
2513         * sparc64-tdep.c (adi_is_addr_mapped): Update.
2514         * target.h (target_fileio_read_stralloc): Return
2515         unique_xmalloc_ptr.
2516
2517 2017-10-16  Tom Tromey  <tom@tromey.com>
2518
2519         * xml-syscall.c (xml_init_syscalls_info): Update.
2520         * xml-support.c (xinclude_start_include): Update.
2521         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2522         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2523         (xml_fetch_content_from_file): Likewise.
2524         * osdata.c (get_osdata): Update.
2525         * target.h (target_read_stralloc, target_get_osdata): Return
2526         unique_xmalloc_ptr.
2527         * solib-aix.c (solib_aix_get_library_list): Update.
2528         * solib-target.c (solib_target_current_sos): Update.
2529         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2530         * xml-tdesc.c (fetch_available_features_from_target): Update.
2531         (target_fetch_description_xml): Update.
2532         (file_read_description_xml): Update.
2533         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2534         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2535         (remote_pid_to_exec_file): Update.
2536         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2537         (target_get_osdata): Likewise.
2538
2539 2017-10-16  Tom Tromey  <tom@tromey.com>
2540
2541         * remote.c (remote_register_number_and_offset): Use std::vector.
2542         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2543         (putpkt_binary): Use gdb::def_vector.
2544         (compare_sections_command): Use gdb::byte_vector.
2545
2546 2017-10-16  Tom Tromey  <tom@tromey.com>
2547
2548         * ppc-linux-nat.c (hwdebug_insert_point): Use
2549         gdb::unique_xmalloc_ptr, XDUP.
2550
2551 2017-10-16  Tom Tromey  <tom@tromey.com>
2552
2553         * probe.c (parse_probes): Use std::string.
2554         (info_probes_for_ops, enable_probes_command)
2555         (disable_probes_command): Remove cleanups.
2556
2557 2017-10-16  Tom Tromey  <tom@tromey.com>
2558
2559         * buildsym.c (block_compar): Remove.
2560         (end_symtab_get_static_block): Use std::vector.
2561
2562 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
2563
2564         * memrange.h (struct mem_range): Define operator< and operator==.
2565         (mem_range_s): Remove.
2566         (DEF_VEC_O (mem_range_s)): Remove.
2567         (normalize_mem_ranges): Change parameter type to std::vector.
2568         * memrange.c (compare_mem_ranges): Remove.
2569         (normalize_mem_ranges): Change parameter type to std::vector,
2570         adjust to vector change.
2571         * exec.c (section_table_available_memory): Return vector, remove
2572         parameter.
2573         (section_table_read_available_memory): Adjust to std::vector
2574         change.
2575         * remote.c (remote_read_bytes): Adjust to std::vector
2576         change.
2577         * tracepoint.h (traceframe_available_memory): Change parameter
2578         type to std::vector.
2579         * tracepoint.c (traceframe_available_memory): Change parameter
2580         type to std::vector, adjust.
2581         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2582         std::vector change.
2583         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2584         unittests/memrange-selftests.c.
2585         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2586         * gdb/unittests/memrange-selftests.c: New file.
2587
2588 2017-10-16  Pedro Alves  <palves@redhat.com>
2589
2590         * elfread.c (probe_key_free): Rename range-for variable.
2591         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2592         (find_probe_by_pc, collect_probes): Rename range-for variable.
2593
2594 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2595
2596         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2597         * features/tic6x-c62x.c: Remove.
2598         * features/tic6x-c64x-linux.c: Remove.
2599         * features/tic6x-c64x.c: Remove.
2600         * features/tic6x-c64xp-linux.c: Remove.
2601         * features/tic6x-c64xp.c: Remove.
2602         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2603         initialize_tdesc_tic6x_*_linux functions.
2604         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2605         initialize_tdesc_tic6x_* functions.
2606
2607 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2608
2609         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2610         tic6x-c62x.
2611         * regformats/tic6x-c62x.dat: Remove.
2612         * regformats/tic6x-c64x.dat: Remove.
2613         * regformats/tic6x-c64xp.dat: Remove.
2614
2615 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2616
2617         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2618         (the !HAVE_LIBEXPAT version).
2619
2620 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2621
2622         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2623         const.
2624
2625 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2626
2627         * target.h: Include tracepoint.h.
2628         (enum trace_find_type): Move to tracepoint.h.
2629         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2630         * tracepoint.h: Don't include target.h
2631         (enum trace_find_type): Move from target.h.
2632         (parse_traceframe_info): Return a unique ptr.
2633         * tracepoint.c (current_traceframe_info): Change type to unique
2634         ptr.
2635         (free_traceframe_info): Remove.
2636         (clear_traceframe_info): Don't manually free
2637         current_traceframe_info.
2638         (free_result): Remove.
2639         (parse_traceframe_info): Return a unique ptr.
2640         (get_traceframe_info): Adjust to unique ptr.
2641         * ctf.c (ctf_traceframe_info): Return a unique ptr.
2642         * remote.c (remote_traceframe_info): Return a unique ptr.
2643         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2644         ptr.
2645         * target-debug.h (target_debug_print_traceframe_info_up): New
2646         macro.
2647         * target-delegates.c: Regenerate.
2648
2649 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2650
2651         * memrange.h (struct mem_range): Add constructors.
2652         * tracepoint.h (struct traceframe_info) <memory>: Change type to
2653         std::vector<mem_range>.
2654         * tracepoint.c (free_traceframe_info): Don't manually free
2655         vector.
2656         (traceframe_info_start_memory): Adjust to vector change.
2657         (traceframe_available_memory): Likewise.
2658         * tracefile-tfile.c (build_traceframe_info): Likewise.
2659         * ctf.c (ctf_traceframe_info): Likewise.
2660
2661 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2662
2663         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2664         std::vector<int>.
2665         * tracepoint.c (free_traceframe_info): Deallocate with delete.
2666         (traceframe_info_start_tvar): Adjust to vector change.
2667         (parse_traceframe_info): Allocate with new.
2668         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2669         vector change.
2670         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2671         change.
2672         tfile_traceframe_info): Allocate with new.
2673         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2674         change.
2675
2676 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2677
2678         * tracepoint.c (traceframe_info): Rename to...
2679         (current_traceframe_info): ...this.
2680         (clear_traceframe_info): Adjust.
2681         (get_traceframe_info): Adjust.
2682
2683 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2684
2685         * nat/linux-osdata.c: Include algorithm.
2686         (compare_processes): Remove.
2687         (struct pid_pgid_entry): New struct.
2688         (linux_xfer_osdata_processgroups): Use std::vector instead of
2689         XNEWVEC.
2690
2691 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2692
2693         * objfiles.h: Don't include symfile.h.
2694         (struct partial_symbol): Remove forward-declaration.
2695         (struct objfile) <global_psymbols, static_psymbols>: Change type
2696         to std::vector<partial_symbol *>.
2697         * objfiles.c (objfile::objfile): Don't memset those fields.
2698         (objfile::~objfile): Don't free those fields.
2699         * psympriv.h (struct psymbol_allocation_list): Remove
2700         forward-declaration.
2701         (add_psymbol_to_list): Change psymbol_allocation_list parameter
2702         to std::vector.
2703         (start_psymtab_common): Change parameters to std::vector.
2704         * psymtab.c: Include algorithm.
2705         (require_partial_symbols): Call shrink_to_fit.
2706         (find_pc_sect_psymbol): Adjust to vector change.
2707         (match_partial_symbol): Likewise.
2708         (lookup_partial_symbol): Likewise.
2709         (psym_relocate): Likewise.
2710         (dump_psymtab): Likewise.
2711         (recursively_search_psymtabs): Likewise.
2712         (compare_psymbols): Remove.
2713         (sort_pst_symbols): Adjust to vector change.
2714         (start_psymtab_common): Likewise.
2715         (end_psymtab_common): Likewise.
2716         (psymbol_bcache_full): De-constify return value.
2717         (add_psymbol_to_bcache): Likewise.
2718         (extend_psymbol_list): Remove.
2719         (append_psymbol_to_list): Adjust to vector change.
2720         (add_psymbol_to_list): Likewise.
2721         (init_psymbol_list): Likewise.
2722         (maintenance_info_psymtabs): Likewise.
2723         (maintenance_check_psymtabs): Likewise.
2724         * symfile.h (struct psymbol_allocation_list): Remove.
2725         * symfile.c (reread_symbols): Adjust to vector change.
2726         * dbxread.c (start_psymtab): Change type of parameters.
2727         (dbx_symfile_read): Adjust to vector change.
2728         (read_dbx_symtab): Likewise.
2729         (start_psymtab): Change type of parameters.
2730         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2731         (create_partial_symtab): Likewise.
2732         (add_partial_symbol): Likewise.
2733         (write_one_signatured_type): Likewise.
2734         (recursively_write_psymbols): Likewise.
2735         * mdebugread.c (parse_partial_symbols): Likewise.
2736         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2737         (scan_xcoff_symtab): Adjust to vector change.
2738         (xcoff_initial_scan): Likewise.
2739
2740 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
2741
2742         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2743
2744 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2745
2746         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2747         Remove s390x-*-expedite, add s390x-expedite.
2748
2749 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2750
2751         * features/s390-gs-linux64.c: Regenerated.
2752         * features/s390x-gs-linux64.c: Regenerated.
2753
2754 2017-10-13  Tom Tromey  <tom@tromey.com>
2755
2756         * compile/compile-object-run.c (do_module_cleanup): Use delete.
2757         * solib.c (update_solib_list, reload_shared_libraries_1): Use
2758         delete.
2759         * symfile.c (symbol_file_add_with_addrs): Use new.
2760         (symbol_file_add_separate): Update comment.
2761         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2762         * jit.c (jit_object_close_impl): Use new.
2763         (jit_unregister_code): Use delete.
2764         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2765         (~objfile): Rename from free_objfile.
2766         (free_objfile_separate_debug, do_free_objfile_cleanup)
2767         (free_all_objfiles, objfile_purge_solibs): Use delete.
2768         * objfiles.h (struct objfile): Add constructor and destructor.
2769         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
2770         (allocate_objfile, free_objfile): Don't declare.
2771         (struct objstats): Add initializers.
2772
2773 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2774
2775         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
2776         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
2777         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
2778         * gdbarch.h: Regenerate.
2779         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2780         Adjust comment.
2781         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
2782         (i386_displaced_step_fixup): Adjust comment.
2783         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
2784
2785 2017-10-12  Tom Tromey  <tom@tromey.com>
2786
2787         * prologue-value.h (pv_area::store_would_trash): Return bool.
2788         (pv_area::find_reg): Likewise.
2789         * prologue-value.c (pv_area::store_would_trash): Return bool.
2790         (pv_area::find_reg): Likewise.
2791
2792 2017-10-12  Tom Tromey  <tom@tromey.com>
2793
2794         * s390-linux-tdep.c (s390_store, s390_load)
2795         (s390_check_for_saved, s390_analyze_prologue): Update.
2796         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
2797         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
2798         * prologue-value.h (class pv_area): Move from prologue-value.c.
2799         Change names of members.  Add constructor, destructor, member
2800         functions.
2801         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
2802         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
2803         (pv_area_fetch, pv_area_scan): Don't declare.
2804         * prologue-value.c (struct pv_area::area_entry): Now member of
2805         pv_area.
2806         (struct pv_area): Move to prologue-value.h.
2807         (pv_area::pv_area): Rename from make_pv_area.
2808         (pv_area::~pv_area): Rename from free_pv_area.
2809         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
2810         (clear_entries, find_entry, overlaps, store_would_trash, store)
2811         (fetch, find_reg, scan): Now member of pv_area.
2812         Remove "area" argument.  Update.
2813         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
2814         Update.
2815         * mn10300-tdep.c (push_reg, check_for_saved)
2816         (mn10300_analyze_prologue): Update.
2817         * mep-tdep.c (is_arg_spill, check_for_saved)
2818         (mep_analyze_prologue): Update.
2819         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
2820         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
2821         (m32c_is_struct_return, m32c_analyze_prologue): Update.
2822         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
2823         Update.
2824         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
2825         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
2826
2827 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2828
2829         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
2830         * linux-nat.c (linux_nat_delete_thread): New variable.
2831         (lwp_free): Invoke linux_nat_delete_thread if set.
2832         (linux_nat_set_delete_thread): New function.
2833         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
2834         thread delete callback.
2835         * arm-linux-nat.c (arm_linux_delete_thread): New function.
2836         (_initialize_arm_linux_nat): Assign thread delete callback.
2837         * s390-linux-nat.c (s390_delete_thread): New function.
2838         (_initialize_s390_nat): Assign thread delete callback.
2839         * x86-linux-nat.c (x86_linux_add_target): Likewise.
2840         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
2841         function.
2842         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
2843         declaration.
2844         * nat/x86-linux.c (x86_linux_delete_thread): New function.
2845         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
2846
2847 2017-10-09  Tom Tromey  <tom@tromey.com>
2848
2849         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
2850         std::string.
2851         * tui/tui-layout.c (enum tui_status): Use std::string.
2852
2853 2017-10-11  Tom Tromey  <tom@tromey.com>
2854
2855         * gdbthread.h (thread_command): Constify.
2856         * inferior.h (detach_command): Constify.
2857         * top.h (set_history, show_history): Constify.
2858         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
2859         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
2860         * bsd-kvm.c (bsd_kvm_cmd): Constify.
2861         * printcmd.c (set_command): Constify.
2862         (non_const_set_command): New function.
2863         * dcache.c (set_dcache_command, show_dcache_command): Constify.
2864         * breakpoint.c (enable_command, disable_command, delete_command)
2865         (catch_command, tcatch_command, set_breakpoint_cmd)
2866         (show_breakpoint_cmd): Constify.
2867         * macrocmd.c (macro_command): Constify.
2868         * infcmd.c (unset_command, kill_command, detach_command)
2869         (info_proc_cmd): Constify.
2870         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
2871         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
2872         (info_auto_load_cmd): Constify.
2873         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
2874         (unset_tdesc_cmd): Constify.
2875         * ada-lang.c (set_ada_command, show_ada_command)
2876         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
2877         * guile/guile.c (set_guile_command, show_guile_command)
2878         (info_guile_command): Constify.
2879         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
2880         Constify.
2881         * skip.c (skip_command): Constify.
2882         * compile/compile.c (_initialize_compile): Constify.
2883         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
2884         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
2885         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
2886         (maint_btrace_pt_show_cmd): Constify.
2887         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
2888         Constify.
2889         * python/python.c (user_show_python, user_set_python): Constify.
2890         * mips-tdep.c (set_mips_command, show_mips_command)
2891         (set_mipsfpu_command): Constify.
2892         * record-btrace.c (cmd_record_btrace_start)
2893         (cmd_set_record_btrace, cmd_show_record_btrace)
2894         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
2895         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
2896         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
2897         Constify.
2898         * symfile.c (overlay_command): Constify.
2899         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2900         * cli/cli-logging.c (set_logging_command, show_logging_command):
2901         Constify.
2902         * cli/cli-dump.c (dump_command, append_command)
2903         (srec_dump_command, ihex_dump_command, verilog_dump_command)
2904         (tekhex_dump_command, binary_dump_command)
2905         (binary_append_command): Constify.
2906         * cli/cli-decode.c (struct cmd_list_element): Change type of
2907         "fun".
2908         * cli/cli-cmds.c (info_command, show_command, set_debug)
2909         (show_debug): Constify.
2910         (show_command): Add non-const overload.
2911         * top.c (set_history, show_history): Constify.
2912         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
2913         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
2914         * target.c (target_command): Constify.
2915         * sparc64-tdep.c (info_adi_command): Constify.
2916         * record-full.c (cmd_record_full_start): Constify.
2917         (set_record_full_command): Constify.  Fix typo.
2918         (show_record_full_command): Constify.
2919         * thread.c (thread_command, thread_apply_command): Constify.
2920         * memattr.c (dummy_cmd): Constify.
2921         * value.c (function_command): Constify.
2922         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
2923         * probe.c (info_probes_command): Constify.
2924         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
2925         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
2926         (show_thread_cmd, set_thread_default_cmd)
2927         (show_thread_default_cmd): Constify.
2928         (check_empty): Constify.
2929         * tracepoint.c (tfind_command): Constify.
2930         * cp-support.c (maint_cplus_command): Constify.
2931         * windows-tdep.c (info_w32_command): Constify.
2932         * record.c (cmd_record_start, set_record_command)
2933         (show_record_command, info_record_command, cmd_record_goto):
2934         Constify.
2935         * ravenscar-thread.c (set_ravenscar_command)
2936         (show_ravenscar_command): Constify.
2937         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
2938         Constify.
2939         (add_internal_problem_command): Remove casts.
2940         * arc-tdep.c (maintenance_print_arc_command): Constify.
2941         * valprint.c (set_print, show_print, set_print_raw)
2942         (show_print_raw): Constify.
2943         * maint.c (maintenance_command, maintenance_info_command)
2944         (maintenance_print_command, maintenance_set_cmd)
2945         (maintenance_show_cmd, set_per_command_cmd)
2946         (show_per_command_cmd, maintenance_check_command): Constify.
2947         * language.c (set_check, show_check): Constify.
2948         * typeprint.c (show_print_type, set_print_type): Constify.
2949         * go32-nat.c (go32_info_dos_command): Constify.
2950
2951 2017-10-11  Tom Tromey  <tom@tromey.com>
2952
2953         * breakpoint.c (prepare_re_set_context): Remove.
2954         (breakpoint_re_set_one): Update.  Don't use cleanups.
2955         (breakpoint_re_set): Use scoped_restore, std::string, and
2956         scoped_restore_current_language.
2957
2958 2017-10-11  Tom Tromey  <tom@tromey.com>
2959
2960         * breakpoint.c (commands_command_1): Use std::string.
2961         (cleanup_executing_breakpoints): Remove.
2962         (bpstat_do_actions_1): Use scoped_restore.
2963         (bpstat_check_watchpoint): Use std::string.
2964         (decode_static_tracepoint_spec): Likewise.
2965         (break_range_command): Likewise.
2966         (watch_command_1): Likewise.
2967         (compare_breakpoints): Change argument types.
2968         (clear_command): Use std::vector.
2969         (cleanup_executing_breakpoints): Remove.
2970         (update_global_location_list): Use unique_xmalloc_ptr.
2971         (strace_command): Remove unused declaration.
2972
2973 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2974
2975         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
2976         * NEWS: Mention new FreeBSD/arm native configuration.
2977         * configure.host: Add arm*-*-freebsd*.
2978         * configure.nat: Likewise.
2979         * arm-fbsd-nat.c: New file.
2980
2981 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2982
2983         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
2984         (ALLDEPFILES): Add arm-fbsd-tdep.c.
2985         * NEWS: Mention new FreeBSD/arm target.
2986         * configure.tgt: Add arm*-*-freebsd*.
2987         * arm-fbsd-tdep.c: New file.
2988         * arm-fbsd-tdep.h: New file.
2989
2990 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2991
2992         * linux-tdep.c (linux_make_corefile_notes): Remove call to
2993         `gdbarch_elfcore_write_linux_prpsinfo'.
2994         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
2995         method.
2996         (elf_internal_linux_prpsinfo): Remove declaration.
2997         * gdbarch.h: Regenerate.
2998         * gdbarch.c: Regenerate.
2999
3000 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3001
3002         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3003         `set_gdbarch_elfcore_write_linux_prpsinfo'.
3004
3005 2017-10-11  Pedro Alves  <palves@redhat.com>
3006
3007         * breakpoint.c (reattach_breakpoints): Delete.
3008         * breakpoint.h (reattach_breakpoints): Delete.
3009
3010 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
3011
3012         * symfile.c (registered_sym_fns): Make struct, not typedef.
3013         (DEF_VEC_O (registered_sym_fns)): Remove.
3014         (symtab_fns): Change type to std::vector.
3015         (add_symtab_fns): Adjust.
3016         (find_sym_fns): Adjust.
3017
3018 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
3019
3020         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3021         * arc-tdep.h (arc_arch_is_em): New function.
3022         (arc_arch_is_hs): Likewise.
3023
3024 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
3025
3026         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3027         parentheses in the declaration.
3028         (macro_lookup_inclusion): Likewise.
3029         (macro_lookup_definition): Likewise.
3030         * p-lang.h (pascal_builtin_types): Likewise.
3031         * tui/tui-data.c (tui_win_list): Likewise.
3032         * tui/tui-data.h (tui_win_list): Likewise.
3033         * utils.h (make_cleanup_free_section_addr_info): Likewise.
3034
3035 2017-10-11  Mark Rages  <markrages@gmail.com>
3036
3037         * target-memory.c (block_boundaries): Fix for block address not
3038         aligned on block size.
3039
3040 2017-10-10  Pedro Alves <palves@redhat.com>
3041             Tom Tromey  <tom@tromey.com>
3042
3043         * breakpoint.c (struct captured_breakpoint_query_args)
3044         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3045         (print_breakpoint): New.
3046         * breakpoint.h (print_breakpoint): Declare.
3047         * common/common-exceptions.h (enum return_reason): Remove
3048         references to catch_exceptions.
3049         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3050         Delete.
3051         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3052         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3053         * gdb.h: Delete.
3054         * gdbthread.h (thread_select): Declare.
3055         * mi/mi-cmd-break.c: Don't include gdb.h.
3056         (breakpoint_notify): Use print_breakpoint.
3057         * mi/mi-cmd-catch.c: Don't include gdb.h.
3058         * mi/mi-interp.c: Don't include gdb.h.
3059         (mi_print_breakpoint_for_event): New.
3060         (mi_breakpoint_created, mi_breakpoint_modified): Use
3061         mi_print_breakpoint_for_event.
3062         * mi/mi-main.c: Don't include gdb.h.
3063         (mi_cmd_thread_select): Parse the global thread ID here.  Use
3064         thread_select instead of gdb_thread_select.
3065         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3066         of using gdb_list_thread_ids.
3067         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
3068         FILEIO_ENOSYS here.
3069         (remote_fileio_request): Use TRY/CATCH instead of
3070         catch_exceptions.
3071         * symfile-mem.c (struct symbol_file_add_from_memory_args)
3072         (symbol_file_add_from_memory_wrapper): Delete.
3073         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3074         * thread.c: Don't include gdb.h.
3075         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3076         (thread_alive): Use thread_select.
3077         (do_captured_thread_select): Delete, parts salvaged as ...
3078         (thread_select): ... this new function.
3079         (gdb_thread_select): Delete.
3080
3081 2017-10-10  Pedro Alves  <palves@redhat.com>
3082             Tom Tromey  <tom@tromey.com>
3083
3084         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3085         and reverse logic.
3086         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3087         No longer macros.  Instead ...
3088         (enum wp_check_result): They're now values of this new
3089         enumeration.
3090         (watchpoint_check): Change return type to wp_check_result and
3091         parameter type to bpstat.
3092         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3093         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3094         catch_errors.  Reverse logic of watchpoint_check call.
3095         (breakpoint_re_set_one): Now returns void and takes a breakpoint
3096         pointer as parameter.
3097         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3098         * common/common-exceptions.c (throw_exception_sjlj): Update
3099         comments to avoid mentioning catch_errors.
3100         * exceptions.c (catch_errors): Delete.
3101         * exceptions.h: Update comments to avoid mentioning catch_errors.
3102         (catch_errors_ftype, catch_errors): Delete.
3103         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3104         (hook_stop_stub): Delete.
3105         (restore_selected_frame): Change return type to void, and
3106         parameter type to const frame_id &.
3107         (restore_infcall_control_state): Use TRY/CATCH instead of
3108         catch_errors.
3109         * main.c (captured_command_loop): Return void and remove
3110         parameter.  Remove references to catch_errors.
3111         (captured_main): Use TRY/CATCH instead of catch_errors.
3112         * objc-lang.c (objc_submethod_helper_data)
3113         (find_objc_msgcall_submethod_helper): Delete.
3114         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3115         catch_errors.
3116         * record-full.c (record_full_message): Return void.
3117         (record_full_message_args, record_full_message_wrapper): Delete.
3118         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3119         instead of catch_errors.
3120         * solib-aix.c (solib_aix_open_symbol_file_object): Change
3121         parameter type to int.
3122         * solib-darwin.c (open_symbol_file_object): Ditto.
3123         * solib-dsbt.c (open_symbol_file_object): Ditto.
3124         * solib-frv.c (open_symbol_file_object): Ditto.
3125         * solib-svr4.c (open_symbol_file_object): Ditto.
3126         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3127         * solib.c (update_solib_list): Use TRY/CATCH instead of
3128         catch_errors.
3129         * solist.h (struct target_so_ops) <open_symbol_file_object>:
3130         Change type.
3131         * symmisc.c (struct print_symbol_args): Remove.
3132         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3133         (print_symbol): Change type.
3134         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3135         and remove parameters.
3136         (catch_errors): New.
3137         (get_windows_debug_event): Adjust.
3138
3139 2017-10-09  Tom Tromey  <tom@tromey.com>
3140
3141         * mi/mi-main.c (free_splay_tree): Remove.
3142         (list_available_thread_groups): Use splay_tree_up.
3143         * common/gdb_splay_tree.h: New file.
3144
3145 2017-10-09  Tom Tromey  <tom@tromey.com>
3146
3147         * mi/mi-main.c (do_nothing): Remove.
3148         (list_available_thread_groups): Update.
3149
3150 2017-10-09  Pedro Alves  <palves@redhat.com>
3151
3152         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3153         reading registers when switching context.
3154
3155 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
3156
3157         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3158         (fbsd_convert_siginfo): Likewise.
3159         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3160
3161 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
3162
3163         * configure.ac (try_guile_versions): Remove guile-2.2.
3164         * configure: Regenerate.
3165
3166 2017-10-09  Tom Tromey  <tom@tromey.com>
3167
3168         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3169         (COMPILE.pre): Use $(CXX).
3170
3171 2017-10-09  Pedro Alves  <palves@redhat.com>
3172
3173         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3174         Use bool.
3175         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3176         * cp-support.h (cp_remove_params): Now returns a
3177         gdb::unique_xmalloc_ptr.
3178         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3179         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3180         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3181         returning a gdb::unique_xmalloc_ptr.
3182         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3183         * stack.c (find_frame_funname): Adjust to cp_remove_params
3184         returning a gdb::unique_xmalloc_ptr.
3185
3186 2017-10-08  Tom Tromey  <tom@tromey.com>
3187
3188         * dwarf2read.c (dwarf2_get_dwz_file): Use
3189         gdb::unique_xmalloc_ptr.
3190         (find_slot_in_mapped_hash): Likewise.
3191         (dwarf2_physname): Likewise.
3192         (create_dwo_unit_in_dwp_v1): Use std::string.
3193         (create_dwo_unit_in_dwp_v2): Likewise.
3194         (lookup_dwo_cutu): Likewise.
3195         (inherit_abstract_dies): Use std::vector.
3196         (read_array_type): Likewise.
3197         (dwarf_decode_macros): Remove unused declaration.
3198         (unsigned_int_compar): Remove.
3199         (dwarf2_build_psymtabs_hard): Use scoped_restore.
3200         (psymtabs_addrmap_cleanup): Remove.
3201
3202 2017-10-08  Tom Tromey  <tom@tromey.com>
3203
3204         * frame-unwind.c (frame_unwind_try_unwinder): Update.
3205         * frame.h (frame_cleanup_after_sniffer): Declare.
3206         (frame_prepare_for_sniffer): Return void.
3207         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
3208         type of argument.
3209         (frame_prepare_for_sniffer): Return void.
3210
3211 2017-10-08  Tom Tromey  <tom@tromey.com>
3212
3213         * utils.h (make_cleanup_value_free): Remove.
3214         * utils.c (do_value_free, struct cleanup): Remove.
3215         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3216         Use gdb_value_up.
3217         * value.h (struct value_deleter): New.
3218         (gdb_value_up): New typedef.
3219
3220 2017-10-08  Tom Tromey  <tom@tromey.com>
3221
3222         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3223         (make_cleanup_free_search_symbols): Remove.
3224         (search_symbols): Return std::vector.
3225         (symbol_search::compare_search_syms): Now member of
3226         symbol_search.  Change arguments.
3227         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
3228         (symtab_symbol_info, rbreak_command): Update.
3229         * symtab.h (struct symbol_search) <next>: Remove.
3230         Add constructors.
3231         (symbol_search::operator<): New function.
3232         (symbol_search::operator==): New function.
3233         (search_symbols): Remove std::vector.
3234         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3235         (symbol_search::compare_search_syms): Declare.
3236
3237 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3238
3239         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3240         arch/aarch64-insn.o.
3241         Remove one rule.
3242         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3243
3244 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3245
3246         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3247         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3248         arch/arm-linux.o respectively.
3249         * configure.tgt: Likewise.
3250
3251 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3252
3253         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3254         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3255
3256 2017-10-06  Pedro Alves  <palves@redhat.com>
3257
3258         * windows-nat.c: Include <algorithm>.
3259
3260 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3261
3262         * configure.tgt (i386_tobjs): New variable.
3263         (amd64_tobjs): New variable.
3264         Set $cpu_obs and $os_obs.
3265
3266 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3267
3268         * Makefile.in (CONFIG_SRC_SUBDIR): New.
3269         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3270         (clean): Remove object files and dependency files.
3271         (distclean): Remove the directory.
3272         * configure.ac: Invoke AC_CONFIG_COMMANDS.
3273         * configure: Re-generated.
3274         * configure.tgt: Replace amd64.o with arch/amd64.o.
3275
3276 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
3277
3278         PR build/22188
3279         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3280         and SETEND.
3281
3282 2017-10-05  Pedro Alves  <palves@redhat.com>
3283
3284         * linux-nat.c (linux_child_follow_fork): When following the parent
3285         and detaching the child, consult the parent thread's architecture
3286         instead of the child's.
3287
3288 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3289
3290         * ax.h: Do not include "doublest.h".
3291         (union agent_val): Remove.
3292
3293 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3294
3295         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3296         (decimal_to_string): Return std::string object.
3297         (decimal_from_string): Accept std::string object.  Return bool.
3298         (decimal_from_integral, decimal_from_doublest): Remove.
3299         (decimal_from_longest): Add prototype.
3300         (decimal_from_ulongest): Likewise.
3301         (decimal_to_longest): Likewise.
3302         (decimal_from_doublest): Likewise.
3303         * dfp.c: Do not include "gdbtypes.h" or "value.h".
3304         (MAX_DECIMAL_STRING): Move here.
3305         (decimal_to_string): Return std::string object.
3306         (decimal_from_string): Accept std::string object.  Return bool.
3307         (decimal_from_integral): Remove, replace by ...
3308         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3309         (decimal_to_longest): New function.
3310         (decimal_from_floating): Remove, replace by ...
3311         (decimal_from_doublest): ... this new function.
3312         (decimal_to_doublest): Update to new decimal_to_string interface.
3313
3314         * value.c (unpack_long): Use decimal_to_longest.
3315         * valops.c (value_cast): Use decimal_from_doublest instead of
3316         decimal_from_floating.  Use decimal_from_[u]longest isntead of
3317         decimal_from_integral.
3318         * valarith.c (value_args_as_decimal): Likewise.
3319         * valprint.c (print_decimal_floating): Update to new
3320         decimal_to_string interface.
3321         * printcmd.c (printf_decfloat): Likewise.
3322         * c-exp.y (parse_number): Update to new decimal_from_string interface.
3323
3324 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3325
3326         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
3327         * gdbtypes.c: Include "floatformat.h".
3328         * value.c: Likewise.
3329         * m68k-tdep.c: Likewise.
3330
3331         * findvar.c: Do not include "floatformat.h".
3332         * amd64-darwin-tdep.c: Likewise.
3333         * arm-linux-tdep.c: Likewise.
3334         * i386-darwin-tdep.c: Likewise.
3335         * i387-tdep.c: Likewise.
3336         * m68k-linux-tdep.c: Likewise.
3337         * mep-tdep.c: Likewise.
3338         * mips-tdep.c: Likewise.
3339         * nios2-tdep.c: Likewise.
3340         * s390-linux-tdep.c: Likewise.
3341         * sparc-obsd-tdep.c: Likewise.
3342         * sparc-tdep.c: Likewise.
3343         * sparc64-tdep.c: Likewise.
3344         * spu-tdep.c: Likewise.
3345         * tic6x-tdep.c: Likewise.
3346         * tilegx-tdep.c: Likewise.
3347         * vax-tdep.c: Likewise.
3348         * xstormy16-tdep.c: Likewise.
3349         * xtensa-tdep.c: Likewise.
3350
3351         * top.c: Do not include "doublest.h".
3352         * aarch64-tdep.c: Likewise.
3353         * alpha-tdep.c: Likewise.
3354         * arm-linux-tdep.c: Likewise.
3355         * m68k-linux-tdep.c: Likewise.
3356         * tilegx-tdep.c: Likewise.
3357         * xstormy16-tdep.c: Likewise.
3358
3359 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3360
3361         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3362         (mipsn32_fbsd_sigframe): Define.
3363         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3364         for FreeBSD/mipsn32.
3365
3366 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3367
3368         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3369         AT_HWCAP.
3370
3371 2017-10-05  Tristan Gingold  <tgingold@free.fr>
3372
3373         * MAINTAINERS (Misc): Update my email address.
3374
3375 2017-10-04  Pedro Alves  <palves@redhat.com>
3376
3377         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
3378         it instead of target_gdbarch.
3379         (get_remote_state, get_remote_packet_size): Adjust
3380         get_remote_arch_state calls, passing down target_gdbarch
3381         explicitly.
3382         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3383         'gdbarch' and use it instead of target_gdbarch.
3384         (get_memory_packet_size): Adjust get_remote_arch_state calls,
3385         passing down target_gdbarch explicitly.
3386         (struct stop_reply) <arch>: New field.
3387         (remote_parse_stop_reply): Use the stopped thread's architecture,
3388         not the current inferior's.  Save the architecture in the
3389         stop_reply.
3390         (process_stop_reply): Use the stop reply's architecture.
3391         (process_g_packet, remote_fetch_registers)
3392         (remote_prepare_to_store, store_registers_using_G)
3393         (remote_store_registers): Adjust get_remote_arch_state calls,
3394         using the regcache's architecture.
3395         (remote_get_trace_status): Adjust get_remote_arch_state calls,
3396         passing down target_gdbarch explicitly.
3397         * spu-multiarch.c (spu_thread_architecture): Defer to the target
3398         beneath instead of calling target_gdbarch.
3399         * target.c (default_thread_architecture): Use the specified
3400         inferior's architecture, instead of the current inferior's
3401         architecture (via target_gdbarch).
3402
3403 2017-10-04  Pedro Alves  <palves@redhat.com>
3404
3405         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3406         case.
3407         (regcache_print): Handle !target_has_registers here instead.
3408
3409 2017-10-04  Pedro Alves  <palves@redhat.com>
3410
3411         * frame.c (create_test_frame): Delete.
3412         * frame.h (create_test_frame): Delete.
3413         * gdbarch-selftests.c: Include gdbthread.h and target.h.
3414         (class regcache_test): Delete.
3415         (test_target_has_registers, test_target_has_stack)
3416         (test_target_has_memory, test_target_prepare_to_store)
3417         (test_target_store_registers): New functions.
3418         (test_target_ops): New class.
3419         (register_to_value_test): Error out if there's already a
3420         process_stratum (or higher) target pushed.  Create a fuller mock
3421         environment, with mock target_ops, inferior, address space, thread
3422         and inferior_ptid.
3423         * progspace.c (struct address_space): Move to ...
3424         * progspace.h (struct address_space): ... here.
3425         * regcache.h (regcache::~regcache, regcache::raw_write)
3426         [GDB_SELF_TEST]: No longer virtual.
3427
3428 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
3429
3430         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3431
3432 2017-10-04  Pedro Alves  <palves@redhat.com>
3433
3434         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3435         out of 'between TRY and CATCH'.
3436
3437 2017-10-04  Pedro Alves  <palves@redhat.com>
3438
3439         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3440         * common/common-exceptions.h (TRY): Open an outermost scope.
3441         Expand intro comment.
3442         (CATCH): Reindent.
3443         (END_CATCH): Close the outermost scope.
3444         * completer.c (complete_line_internal): Add missing END_CATCH.
3445
3446 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3447
3448         * NEWS (Changes since GDB 8.0): Add entry about new
3449         'set-cwd-on-gdbserver' feature.
3450         (New remote packets): Add entry for QSetWorkingDir.
3451         * common/common-inferior.h (set_inferior_cwd): New prototype.
3452         * infcmd.c (set_inferior_cwd): Remove "static".
3453         (show_cwd_command): Expand text to include remote debugging.
3454         * remote.c: Add PACKET_QSetWorkingDir.
3455         (remote_protocol_features) <QSetWorkingDir>: New entry for
3456         PACKET_QSetWorkingDir.
3457         (extended_remote_set_inferior_cwd): New function.
3458         (extended_remote_create_inferior): Call
3459         "extended_remote_set_inferior_cwd".
3460         (_initialize_remote): Call "add_packet_config_cmd" for
3461         QSetWorkingDir.
3462
3463 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3464
3465         * NEWS (New commands): Mention "set/show cwd".
3466         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3467         "cd" command's help text.
3468         * common/common-inferior.h (get_inferior_cwd): New prototype.
3469         * infcmd.c (inferior_cwd_scratch): New global variable.
3470         (set_inferior_cwd): New function.
3471         (get_inferior_cwd): Likewise.
3472         (set_cwd_command): Likewise.
3473         (show_cwd_command): Likewise.
3474         (_initialize_infcmd): Add "set/show cwd" commands.
3475         * inferior.h (class inferior) <cwd>: New field.
3476         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3477         (fork_inferior): Change inferior's cwd before its execution.
3478         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3479         to CreateProcess.
3480
3481 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3482
3483         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3484         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3485         (COMMON_OBS): Add gdb_tilde_expand.o.
3486         * common/gdb_tilde_expand.c: New file.
3487         * common/gdb_tilde_expand.h: Likewise.
3488
3489 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
3490
3491         * gdbarch.sh (objfile): Remove duplicate declaration.
3492         * gdbarch.h: Regenerate.
3493
3494 2017-10-03  Tom Tromey  <tom@tromey.com>
3495
3496         * utils.c (internal_vproblem): Use string_vprintf.
3497
3498 2017-10-03  Tom Tromey  <tom@tromey.com>
3499
3500         * printcmd.c (info_symbol_command): Use std::string.
3501
3502 2017-10-03  Tom Tromey  <tom@tromey.com>
3503
3504         * top.c (gdb_safe_append_history): Use std::string.
3505
3506 2017-10-03  Tom Tromey  <tom@tromey.com>
3507
3508         * event-top.c (stdin_event_handler): Update.
3509         * main.c (captured_main_1): Update.
3510         * top.h (make_delete_ui_cleanup): Remove.
3511         (struct ui): Add constructor and destructor.
3512         (new_ui, delete_ui): Remove.
3513         * top.c (make_delete_ui_cleanup): Remove.
3514         (new_ui_command): Use std::unique_ptr.
3515         (delete_ui_cleanup): Remove.
3516         (ui::ui): Rename from new_ui.  Update.
3517         (free_ui): Remove.
3518         (ui::~ui): Rename from delete_ui.  Update.
3519
3520 2017-10-03  Tom Tromey  <tom@tromey.com>
3521
3522         * symfile.c (load_progress): Use gdb::byte_vector.
3523
3524 2017-10-03  Tom Tromey  <tom@tromey.com>
3525
3526         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3527         declaration.
3528         * printcmd.c (x_command): Remove unused declaration.
3529         * symfile.c (symbol_file_command): Remove unused declaration.
3530
3531 2017-10-03  Tom Tromey  <tom@tromey.com>
3532
3533         * utils.c (internal_vproblem): Use std::string.
3534         (defaulted_query): Likewise.
3535
3536 2017-10-03  Tom Tromey  <tom@tromey.com>
3537
3538         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3539         * top.c (execute_command_to_string): Update.
3540         * utils.c (make_cleanup_restore_page_info): Remove.
3541         (do_restore_page_info_cleanup): Remove.
3542         (set_batch_flag_and_restore_page_info):
3543         New.
3544         (make_cleanup_restore_page_info): Remove.
3545         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3546         (~set_batch_flag_and_restore_page_info): New
3547         (make_cleanup_restore_uinteger): Remove.
3548         (make_cleanup_restore_integer): Remove.
3549         (struct restore_integer_closure): Remove.
3550         (restore_integer): Remove.
3551         * utils.h (struct set_batch_flag_and_restore_page_info): New
3552         class.
3553         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3554         (make_cleanup_restore_page_info): Remove.
3555         (make_cleanup_restore_uinteger) Remove.
3556         (make_cleanup_restore_integer) Remove.
3557
3558 2017-10-03  Tom Tromey  <tom@tromey.com>
3559
3560         * record-full.h (record_full_gdb_operation_disable_set): Return
3561         scoped_restore_tmpl<int>.
3562         * infrun.c (adjust_pc_after_break): Update.
3563         (handle_signal_stop): Update.
3564         * record-full.c (record_full_gdb_operation_disable_set): Return
3565         scoped_restore_tmpl<int>.
3566         (record_full_wait_1, record_full_insert_breakpoint)
3567         (record_full_remove_breakpoint, record_full_save)
3568         (record_full_goto_insn): Update.
3569
3570 2017-10-02  Tom Tromey  <tom@tromey.com>
3571
3572         PR rust/22236:
3573         * rust-lang.c (rust_val_print_str): New function.
3574         (val_print_struct): Call it.
3575         (rust_subscript): Preserve name of slice type.
3576
3577 2017-10-02  Tom Tromey  <tom@tromey.com>
3578
3579         * rust-lang.c (rust_subscript): Handle slices in
3580         EVAL_AVOID_SIDE_EFFECTS case.
3581
3582 2017-10-02  Tom Tromey  <tom@tromey.com>
3583
3584         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3585
3586 2017-10-02  Tom Tromey  <tom@tromey.com>
3587
3588         * rust-lang.h (rust_slice_type): Add "extern".
3589
3590 2017-10-02  Tom Tromey  <tom@tromey.com>
3591             Pedro Alves  <palves@redhat.com>
3592
3593         * ada-lang.h (ada_exc_info::operator<): Make const.
3594         (ada_exc_info::operator==): Make const.
3595         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3596         Make const.
3597
3598 2017-09-29  Tom Tromey  <tom@tromey.com>
3599
3600         * target.c (read_whatever_is_readable): Change type of "result".
3601         Update.
3602         (free_memory_read_result_vector): Remove.
3603         (read_memory_robust): Change return type.  Update.
3604         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
3605         bin2hex, std::string.
3606         * target.h (memory_read_result_s): Remove typedef.
3607         (free_memory_read_result_vector): Remove.
3608         (read_memory_robust): Return std::vector.
3609
3610 2017-09-29  Tom Tromey  <tom@tromey.com>
3611
3612         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3613
3614 2017-09-29  Tom Tromey  <tom@tromey.com>
3615
3616         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3617         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
3618         operator< and operator==.
3619         (ada_exceptions_list): Return a std::vector.
3620         * ada-lang.c (ada_exc_info::operator<): Rename from
3621         compare_ada_exception_info.
3622         (ada_exc_info::operator==): New.
3623         (sort_remove_dups_ada_exceptions_list): Change type of
3624         "exceptions".
3625         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3626         (ada_add_global_exceptions): Likewise.
3627         (ada_exceptions_list_1): Return a std::vector.
3628         (ada_exceptions_list): Likewise.
3629
3630 2017-09-29  Tom Tromey  <tom@tromey.com>
3631
3632         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3633         'std::set *'.
3634         (print_one_inferior): Update.
3635         (free_vector_of_ints): Remove.
3636         (list_available_thread_groups): Change "ids" to std::set.
3637         (mi_cmd_list_thread_groups): Update.
3638         (struct collect_cores_data) <core>: Now a std::set.
3639         (collect_cores): Update.
3640         (unique): Remove.
3641         (print_one_inferior): Update.
3642
3643 2017-09-29  Tom Tromey  <tom@tromey.com>
3644
3645         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3646         (mi_execute_async_cli_command): Likewise.
3647         (mi_cmd_trace_frame_collected): Use field_fmt.
3648
3649 2017-09-29  Tom Tromey  <tom@tromey.com>
3650
3651         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3652         gdb::byte_vector.
3653
3654 2017-09-29  Tom Tromey  <tom@tromey.com>
3655
3656         * mi/mi-parse.c (mi_parse): Remove unused declaration.
3657
3658 2017-09-29  Tom Tromey  <tom@tromey.com>
3659
3660         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3661
3662 2017-09-29  Tom Tromey  <tom@tromey.com>
3663
3664         * varobj.h (varobj_gen_name): Return std::string.
3665         * varobj.c (varobj_gen_name): Return std::string.
3666         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3667         (mi_cmd_var_delete): Don't copy "name".
3668
3669 2017-09-29  Tom Tromey  <tom@tromey.com>
3670
3671         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3672         (mi_cmd_break_insert_1): Update.
3673
3674 2017-09-29  Tom Tromey  <tom@tromey.com>
3675
3676         * target.h (make_scoped_defer_target_commit_resume): Update.
3677         * target.c (make_scoped_defer_target_commit_resume): Rename from
3678         make_cleanup_defer_target_commit_resume.  Return a
3679         scoped_restore.
3680         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3681
3682 2017-09-29  Tom Tromey  <tom@tromey.com>
3683
3684         * main.c (captured_main_1): Remove unused declaration.
3685         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3686
3687 2017-09-29  Tom Tromey  <tom@tromey.com>
3688
3689         * symtab.c (search_symbols): Remove unused outer cleanup.
3690         (make_source_files_completion_list): Remove unused declaration.
3691
3692 2017-09-29  Tom Tromey  <tom@tromey.com>
3693
3694         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3695
3696 2017-09-29  Tom Tromey  <tom@tromey.com>
3697
3698         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3699         gdb::byte_vector.
3700
3701 2017-09-29  Tom Tromey  <tom@tromey.com>
3702
3703         * complaints.c (vcomplaint): Use std::string.
3704
3705 2017-09-29  Tom Tromey  <tom@tromey.com>
3706
3707         * tracepoint.c (trace_variable_command): Use std::string.
3708         (encode_actions_1): Remove unused declarations.
3709         (create_tsv_from_upload): Use std::string.
3710
3711 2017-09-29  Tom Tromey  <tom@tromey.com>
3712
3713         * cp-support.c (gdb_demangle): Use std::string.
3714
3715 2017-09-29  Tom Tromey  <tom@tromey.com>
3716
3717         * stack.c (parse_frame_specification): Use std::string
3718         (info_frame_command): Use gdb::unique_xmalloc_ptr.
3719
3720 2017-09-29  Tom Tromey  <tom@tromey.com>
3721
3722         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3723
3724 2017-09-29  Tom Tromey  <tom@tromey.com>
3725
3726         * utils.c (vfprintf_maybe_filtered): Use std::string.
3727         (vfprintf_unfiltered): Likewise.
3728
3729 2017-09-29  Tom Tromey  <tom@tromey.com>
3730
3731         * event-top.c (top_level_prompt): Return std::string.
3732         (display_gdb_prompt): Update.
3733
3734 2017-09-29  Tom Tromey  <tom@tromey.com>
3735
3736         * unittests/common-utils-selftests.c (format): New function.
3737         (string_vprintf_tests): New function.
3738         (_initialize_common_utils_selftests): Register new tests.
3739         * common/common-utils.c (string_vprintf): New function.
3740         * common/common-utils.h (string_vprintf): Declare.
3741
3742 2017-09-29  Pedro Alves  <palves@redhat.com>
3743
3744         * common/rsp-low.c (unpack_varlen_hex): Constify.
3745         * common/rsp-low.h (unpack_varlen_hex): Constify.
3746         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3747         Constify.
3748         * remote.c (remote_set_permissions, read_ptid)
3749         (remote_current_thread, remote_get_threads_with_qthreadinfo)
3750         (remote_static_tracepoint_marker_at)
3751         (remote_static_tracepoint_markers_by_strid)
3752         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3753         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3754         (parse_tracepoint_definition, parse_tsv_definition)
3755         (parse_static_tracepoint_marker_definition): Constify.
3756         * tracepoint.h (parse_static_tracepoint_marker_definition)
3757         (parse_trace_status, parse_tracepoint_status)
3758         (parse_tracepoint_definition, parse_tsv_definition): Constify.
3759
3760 2017-09-29  Pedro Alves  <palves@redhat.com>
3761
3762         * remote.c (target_buf, target_buf_size): Delete.
3763         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3764         Use the connection's packet buffer instead.
3765         All callers adjusted.
3766         (_initialize_remote): Remove references to target_buf and
3767         target_buf_size.
3768
3769 2017-09-28  Pedro Alves  <palves@redhat.com>
3770
3771         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3772         unittests/common-utils-selftests.c.
3773         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
3774         (COMMON_OBS): Remove utils-selftests.o.
3775         * utils-selftests.c: Move to ...
3776         * unittests/common-utils-selftests.c: ... here and rename self
3777         test to "string_printf".
3778
3779 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
3780
3781         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
3782         having NULL cus or tus.
3783
3784 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3785
3786         * arm-tdep.c: (convert_from_extended): Remove.
3787         (convert_to_extended): Likewise.
3788         (arm_extract_return_value): Use convert_typed_floating.
3789         (arm_store_return_value): Likewise.
3790
3791         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3792         * sh-tdep.c: Do not include "floatformat.h".
3793         (sh_littlebyte_bigword_type): New function.
3794         (sh_register_convert_to_virtual): Use convert_typed_floating.
3795         (sh_register_convert_to_raw): Likewise.
3796         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3797         (sh64_littlebyte_bigword_type): New function.
3798         (sh64_extract_return_value): Use convert_typed_floating.
3799         (sh64_register_convert_to_virtual): Likewise.
3800         (sh64_register_convert_to_raw): Likewise.
3801
3802 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3803
3804         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
3805         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
3806
3807         * gdbtypes.h (union type_specific): Make field floatformat hold
3808         just a single struct floatformat, not an array.
3809         (floatformat_from_type): Move here.
3810         * gdbtypes.c (floatformat_from_type): Move here.  Update to
3811         changed TYPE_FLOATFORMAT definition.
3812         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
3813         (recursive_dump_type): Likewise.
3814         (init_float_type): Install correct floatformat for byte order.
3815         (arch_float_type): Likewise.
3816
3817 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3818
3819         * gdbtypes.c (init_type): Change incoming argument from
3820         length-in-bytes to length-in-bits.  Assert length is a
3821         multiple of TARGET_CHAR_BITS.
3822         (arch_type, arch_flags_type): Likewise.
3823         (init_integer_type): Update call to init_type.
3824         (init_character_type): Likewise.
3825         (init_boolean_type): Likewise.
3826         (init_float_type): Likewise.
3827         (init_decfloat_type): Likewise.
3828         (init_complex_type): Likewise.
3829         (init_pointer_type): Likewise.
3830         (objfile_type): Likewise.
3831         (arch_integer_type): Update call to arch_type.
3832         (arch_character_type): Likewise.
3833         (arch_boolean_type): Likewise.
3834         (arch_float_type): Likewise.
3835         (arch_decfloat_type): Likewise.
3836         (arch_complex_type): Likewise.
3837         (arch_pointer_type): Likewise.
3838         (gdbtypes_post_init): Likewise.
3839
3840         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
3841         (read_base_type): Likewise.
3842         * mdebugread.c (basic_type): Likewise.
3843         * stabsread.c (dbx_init_float_type): Likewise.
3844         (rs6000_builtin_type): Likewise.
3845         (read_range_type): Likewise.  Also, fix call to init_integer_type
3846         with erroneous length argument.
3847
3848         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
3849         * d-lang.c (build_d_types): Likewise.
3850         * f-lang.c (build_fortran_types): Likewise.
3851         * go-lang.c (build_go_types): Likewise.
3852         * opencl-lang.c (build_opencl_types): Likewise.
3853         * jit.c (finalize_symtab): Likewise.
3854         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
3855         (build_std_type_info_type): Likewise.
3856         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
3857         update call to arch_flags_type.
3858
3859         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
3860         arch_type.
3861         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
3862         * windows-tdep.c (windows_get_tlb_type): Likewise.
3863
3864         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
3865         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3866         * m32c-tdep.c (make_types): Likewise.
3867         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
3868         (rl78_psw_type): Update call to arch_flags_type.
3869         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
3870         * rx-tdep.c (rx_psw_type): Likewise.
3871         (rx_fpsw_type): Likewise.
3872         * sparc-tdep.c (sparc_psr_type): Likewise.
3873         (sparc_fsr_type): Likewise.
3874         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
3875         (sparc64_ccr_type): Likewise.
3876         (sparc64_fsr_type): Likewise.
3877         (sparc64_fprs_type): Likewise.
3878
3879 2017-09-27  Tom Tromey  <tom@tromey.com>
3880
3881         * findcmd.c (find_command): Constify.
3882
3883 2017-09-27  Tom Tromey  <tom@tromey.com>
3884
3885         * ada-tasks.c (task_command_1, task_command): Constify.
3886
3887 2017-09-27  Tom Tromey  <tom@tromey.com>
3888
3889         * symtab.c (maintenance_print_symbol_cache)
3890         (maintenance_flush_symbol_cache)
3891         (maintenance_print_symbol_cache_statistics): Constify.
3892
3893 2017-09-27  Tom Tromey  <tom@tromey.com>
3894
3895         * inferior.c (detach_inferior_command, kill_inferior_command)
3896         (inferior_command): Constify.
3897
3898 2017-09-27  Tom Tromey  <tom@tromey.com>
3899
3900         * regcache.c (regcache_print, maintenance_print_registers)
3901         (maintenance_print_raw_registers)
3902         (maintenance_print_cooked_registers)
3903         (maintenance_print_register_groups)
3904         (maintenance_print_remote_registers): Constify.
3905
3906 2017-09-27  Tom Tromey  <tom@tromey.com>
3907
3908         * printcmd.c (map_display_numbers, undisplay_command)
3909         (enable_disable_display_command, enable_display_command)
3910         (disable_display_command): Constify.
3911
3912 2017-09-27  Tom Tromey  <tom@tromey.com>
3913
3914         * breakpoint.h (delete_command): Don't declare.
3915         * breakpoint.c (delete_command, enable_once_command)
3916         (enable_count_command, enable_delete_command, breakpoint_1)
3917         (maintenance_info_breakpoints, stopin_command, stopat_command)
3918         (delete_command, delete_trace_command, save_breakpoints)
3919         (save_breakpoints_command, save_tracepoints_command): Constify.
3920
3921 2017-09-27  Tom Tromey  <tom@tromey.com>
3922
3923         * macrocmd.c (macro_expand_command, macro_expand_once_command)
3924         (skip_ws, extract_identifier, macro_define_command)
3925         (macro_undef_command, macro_list_command): Constify.
3926
3927 2017-09-27  Tom Tromey  <tom@tromey.com>
3928
3929         * infcmd.c (environment_info, set_environment_command)
3930         (unset_environment_command, path_info, info_proc_cmd_1)
3931         (info_proc_cmd_mappings, info_proc_cmd_stat)
3932         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
3933         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
3934
3935 2017-09-27  Tom Tromey  <tom@tromey.com>
3936
3937         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
3938         Constify.
3939
3940 2017-09-27  Tom Tromey  <tom@tromey.com>
3941
3942         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
3943
3944 2017-09-27  Tom Tromey  <tom@tromey.com>
3945
3946         * demangle.c (demangle_command): Constify.
3947
3948 2017-09-27  Tom Tromey  <tom@tromey.com>
3949
3950         * progspace.c (maintenance_info_program_spaces_command):
3951         Constify.
3952
3953 2017-09-27  Tom Tromey  <tom@tromey.com>
3954
3955         * compile/compile.c (check_raw_argument, compile_file_command)
3956         (compile_code_command, compile_print_command): Constify.
3957
3958 2017-09-27  Tom Tromey  <tom@tromey.com>
3959
3960         * reggroups.c (maintenance_print_reggroups): Constify.
3961
3962 2017-09-27  Tom Tromey  <tom@tromey.com>
3963
3964         * dwarf2read.c (save_gdb_index_command): Constify.
3965
3966 2017-09-27  Tom Tromey  <tom@tromey.com>
3967
3968         * stap-probe.c (info_probes_stap_command): Constify.
3969
3970 2017-09-27  Tom Tromey  <tom@tromey.com>
3971
3972         * fork-child.c (unset_exec_wrapper_command): Constify.
3973
3974 2017-09-27  Tom Tromey  <tom@tromey.com>
3975
3976         * btrace.c (get_uint, get_context_size, no_chunk)
3977         (maint_btrace_packet_history_cmd)
3978         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
3979         (maint_info_btrace_cmd): Constify.
3980
3981 2017-09-27  Tom Tromey  <tom@tromey.com>
3982
3983         * reverse.c (delete_bookmark_command): Constify.
3984
3985 2017-09-27  Tom Tromey  <tom@tromey.com>
3986
3987         * remote.c (set_memory_packet_size)
3988         (set_memory_write_packet_size, show_memory_write_packet_size)
3989         (set_memory_read_packet_size, show_memory_read_packet_size)
3990         (compare_sections_command, packet_command, remote_put_command)
3991         (remote_get_command, remote_delete_command): Constify.
3992
3993 2017-09-27  Tom Tromey  <tom@tromey.com>
3994
3995         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
3996         (set_mipsfpu_double_command, set_mipsfpu_none_command)
3997         (set_mipsfpu_auto_command): Constify.
3998
3999 2017-09-27  Tom Tromey  <tom@tromey.com>
4000
4001         * cli/cli-cmds.h (cd_command): Constify.
4002         * cli/cli-cmds.c (cd_command): Constify.
4003
4004 2017-09-27  Tom Tromey  <tom@tromey.com>
4005
4006         * thread.c (thread_name_command, thread_find_command): Constify.
4007
4008 2017-09-27  Tom Tromey  <tom@tromey.com>
4009
4010         * probe.c (enable_probes_command, disable_probes_command):
4011         Constify.
4012
4013 2017-09-27  Tom Tromey  <tom@tromey.com>
4014
4015         * symfile.c (symbol_file_command): Constify.
4016         * gdbcore.h (deprecated_file_changed_hook): Constify.
4017         * exec.c (deprecated_file_changed_hook, exec_file_command)
4018         (file_command): Constify.
4019         * defs.h (symbol_file_command): Constify.
4020
4021 2017-09-27  Tom Tromey  <tom@tromey.com>
4022
4023         * remote-fileio.c (set_system_call_allowed)
4024         (show_system_call_allowed): Constify.
4025
4026 2017-09-27  Tom Tromey  <tom@tromey.com>
4027
4028         * tracepoint.c (delete_trace_variable_command)
4029         (tfind_end_command, tfind_start_command, tfind_pc_command)
4030         (tfind_tracepoint_command, tfind_line_command)
4031         (tfind_range_command, tfind_outside_command): Constify.
4032
4033 2017-09-27  Tom Tromey  <tom@tromey.com>
4034
4035         * ax-gdb.c (maint_agent_printf_command, agent_command)
4036         (agent_eval_command): Constify.
4037
4038 2017-09-27  Tom Tromey  <tom@tromey.com>
4039
4040         * tracepoint.c (info_scope_command): Constify.
4041         * python/python.c (gdbpy_decode_line): Constify.
4042         * python/py-breakpoint.c (bppy_init): Constify.
4043         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4044         * location.h: (new_linespec_location)
4045         (string_to_event_location_basic, string_to_event_location):
4046         Constify.
4047         * location.c (new_linespec_location)
4048         (string_to_event_location_basic, string_to_event_location):
4049         Constify.
4050         * linespec.h (decode_line_with_current_source)
4051         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4052         * linespec.c (linespec_lex_to_end)
4053         (decode_line_with_current_source)
4054         (decode_line_with_last_displayed): Constify.
4055         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4056         Constify.
4057         * cli/cli-cmds.c (edit_command, list_command): Constify.
4058         * breakpoint.h (until_break_command, watch_command_wrapper)
4059         (awatch_command_wrapper, rwatch_command_wrapper)
4060         (init_ada_exception_breakpoint): Constify.
4061         * breakpoint.c (break_command_1, dprintf_command)
4062         (break_range_command, watch_command_wrapper)
4063         (rwatch_command_wrapper, awatch_command_wrapper)
4064         (until_break_command, init_ada_exception_breakpoint)
4065         (strace_marker_create_sals_from_location, trace_command)
4066         (ftrace_command, strace_command, struct tracepoint): Constify.
4067         * ax-gdb.c (agent_command_1): Constify.
4068         * ada-lang.c (ada_exception_sal): Constify.
4069
4070 2017-09-27  Tom Tromey  <tom@tromey.com>
4071
4072         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4073         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4074         (get_context_size, no_chunk, get_insn_history_modifiers)
4075         (cmd_record_insn_history, get_call_history_modifiers)
4076         (cmd_record_call_history): Constify.
4077
4078 2017-09-27  Tom Tromey  <tom@tromey.com>
4079
4080         * source.c (show_substitute_path_command)
4081         (unset_substitute_path_command, set_substitute_path_command):
4082         Constify.
4083
4084 2017-09-27  Tom Tromey  <tom@tromey.com>
4085
4086         * typeprint.c (maintenance_print_type): Constify.
4087         * maint.c (maintenance_dump_me, maintenance_demangle)
4088         (maintenance_time_display, maintenance_info_sections)
4089         (maintenance_print_statistics, maintenance_deprecate)
4090         (maintenance_undeprecate): Constify.
4091         (maintenance_do_deprecate): Constify.  Use std::string.
4092         (maintenance_selftest): Constify.
4093         * gdbtypes.h (maintenance_print_type): Constify.
4094
4095 2017-09-27  Tom Tromey  <tom@tromey.com>
4096
4097         * hppa-tdep.c (unwind_command): Constify.
4098
4099 2017-09-27  Tom Tromey  <tom@tromey.com>
4100
4101         * target-descriptions.c (unset_tdesc_filename_cmd)
4102         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4103         Constify.
4104
4105 2017-09-27  Tom Tromey  <tom@tromey.com>
4106
4107         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4108
4109 2017-09-27  Tom Tromey  <tom@tromey.com>
4110
4111         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4112
4113 2017-09-27  Tom Tromey  <tom@tromey.com>
4114
4115         * tui/tui-regs.c (tui_reg_command): Constify.
4116
4117 2017-09-27  Tom Tromey  <tom@tromey.com>
4118
4119         * skip.c (skip_file_command, skip_function_command)
4120         (skip_enable_command, skip_disable_command, skip_delete_command):
4121         Constify.
4122
4123 2017-09-27  Tom Tromey  <tom@tromey.com>
4124
4125         * record-btrace.c (cmd_record_btrace_bts_start)
4126         (cmd_record_btrace_pt_start): Constify.
4127
4128 2017-09-27  Tom Tromey  <tom@tromey.com>
4129
4130         * symmisc.c (maintenance_print_symbols)
4131         (maintenance_print_msymbols, maintenance_print_objfiles)
4132         (maintenance_info_symtabs, maintenance_check_symtabs)
4133         (maintenance_expand_symtabs, maintenance_info_line_tables):
4134         Constify.
4135
4136 2017-09-27  Tom Tromey  <tom@tromey.com>
4137
4138         * top.c (new_ui_command): Constify.
4139
4140 2017-09-27  Tom Tromey  <tom@tromey.com>
4141
4142         * symfile.c (add_symbol_file_command)
4143         (remove_symbol_file_command, list_overlays_command)
4144         (map_overlay_command, unmap_overlay_command)
4145         (overlay_auto_command, overlay_manual_command)
4146         (overlay_off_command, overlay_load_command): Constify.
4147
4148 2017-09-27  Tom Tromey  <tom@tromey.com>
4149
4150         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4151         (info_spu_mailbox_command, info_spu_dma_command)
4152         (info_spu_proxydma_command): Constify.
4153
4154 2017-09-27  Tom Tromey  <tom@tromey.com>
4155
4156         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4157
4158 2017-09-27  Tom Tromey  <tom@tromey.com>
4159
4160         * cli/cli-script.c (user_defined_command): Constify.
4161
4162 2017-09-27  Tom Tromey  <tom@tromey.com>
4163
4164         * cli/cli-dump.c (dump_memory_command, dump_value_command)
4165         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4166         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4167         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4168         (dump_binary_value, append_binary_memory, append_binary_value):
4169         Constify.
4170         (struct dump_context) <func>: Constify.
4171         (add_dump_command): Update.
4172
4173 2017-09-27  Tom Tromey  <tom@tromey.com>
4174
4175         * cli/cli-cmds.c (show_version, show_configuration)
4176         (source_command, show_user): Constify.
4177
4178 2017-09-27  Tom Tromey  <tom@tromey.com>
4179
4180         * target.c (maintenance_print_target_stack): Constify.
4181
4182 2017-09-27  Tom Tromey  <tom@tromey.com>
4183
4184         * interps.c (interpreter_exec_cmd): Constify.
4185
4186 2017-09-27  Tom Tromey  <tom@tromey.com>
4187
4188         * record-full.c (cmd_record_full_restore): Constify.
4189
4190 2017-09-27  Tom Tromey  <tom@tromey.com>
4191
4192         * memattr.c (enable_mem_command, disable_mem_command)
4193         (delete_mem_command): Constify.
4194
4195 2017-09-27  Tom Tromey  <tom@tromey.com>
4196
4197         * value.c (show_convenience): Constify.
4198
4199 2017-09-27  Tom Tromey  <tom@tromey.com>
4200
4201         * gdbcore.h (core_file_command): Update.
4202         * corefile.c (core_file_command): Constify.
4203
4204 2017-09-27  Tom Tromey  <tom@tromey.com>
4205
4206         * user-regs.c (maintenance_print_user_registers): Constify.
4207
4208 2017-09-27  Tom Tromey  <tom@tromey.com>
4209
4210         * cp-namespace.c (maintenance_cplus_namespace): Constify.
4211
4212 2017-09-27  Tom Tromey  <tom@tromey.com>
4213
4214         * cp-support.c (first_component_command): Constify.
4215
4216 2017-09-27  Tom Tromey  <tom@tromey.com>
4217
4218         * psymtab.c (maintenance_print_psymbols)
4219         (maintenance_info_psymtabs, maintenance_check_psymtabs):
4220         Constify.
4221
4222 2017-09-27  Tom Tromey  <tom@tromey.com>
4223
4224         * windows-tdep.c (display_tib): Constify.
4225
4226 2017-09-27  Tom Tromey  <tom@tromey.com>
4227
4228         * linux-fork.c (delete_checkpoint_command)
4229         (detach_checkpoint_command): Constify.
4230
4231 2017-09-27  Tom Tromey  <tom@tromey.com>
4232
4233         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4234
4235 2017-09-27  Tom Tromey  <tom@tromey.com>
4236
4237         * arc-tdep.c (dump_arc_instruction_command): Constify.
4238
4239 2017-09-27  Tom Tromey  <tom@tromey.com>
4240
4241         * valprint.c (set_radix, show_radix): Constify.
4242
4243 2017-09-27  Tom Tromey  <tom@tromey.com>
4244
4245         * dtrace-probe.c (info_probes_dtrace_command): Constify.
4246
4247 2017-09-27  Tom Tromey  <tom@tromey.com>
4248
4249         * command.h (not_just_help_class_command): Update.
4250         * cli/cli-decode.h (not_just_help_class_command): Update.
4251         * cli/cli-decode.c (not_just_help_class_command): Constify.
4252
4253 2017-09-27  Tom Tromey  <tom@tromey.com>
4254
4255         * gdb_bfd.c (maintenance_info_bfds): Constify.
4256
4257 2017-09-27  Tom Tromey  <tom@tromey.com>
4258
4259         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4260         overloads.
4261         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
4262         (do_const_cfunc): New function.
4263         (cmd_cfunc_eq): New overload.
4264         (cli_user_command_p): Check do_const_cfunc.
4265         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4266         const_cfunc.
4267         * command.h (add_cmd): Add const overload and no-function
4268         overload.
4269         (set_cmd_cfunc): Add const overload.
4270         (cmd_const_cfunc_ftype): Declare.
4271         (cmd_cfunc_eq): Add const overload.
4272         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4273         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4274         overload.
4275
4276 2017-09-27  Tom Tromey  <tom@tromey.com>
4277
4278         * macroexp.c (get_next_token_for_substitution): New function.
4279         (substitute_args): Call it.  Check for __VA_OPT__.
4280
4281 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4282             Pedro Alves <palves@redhat.com>
4283
4284         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4285         producer_is_icc_lt_14.
4286         (producer_is_icc_lt_14): New function.
4287         (check_producer): Add code for checking version of ICC.
4288         (producer_is_icc): Move to producer.c.
4289         (read_structure_type): Restrict ICC workaround to ICC<14.
4290         * producer.c: Include selftest.h.
4291         (producer_is_icc, producer_parsing_tests, _initialize_producer):
4292         New functions.
4293         * producer.h (producer_is_icc): New declaration.
4294
4295 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4296
4297         * Makefile.in (SFILES): Add producer.c.
4298         (COMMON_OBS): Add producer.o
4299         * amd64-tdep.c (producer.h): Add new include.
4300         * dwarf2read.c (producer.h): Add new include.
4301         * producer.c: New file.
4302         * producer.h: New file.
4303         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4304         producer.c.
4305         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4306         producer.h.
4307
4308 2017-09-26  Matthias Klose  <doko@ubuntu.com>
4309
4310         * configure.ac: Search ncursesw before ncurses.
4311         Check ncursesw/ncurses.h before ncurses/ncurses.h.
4312         * gdb_curses.h: Include <ncursesw/ncurses.h>
4313         * config.in, configure: Regenerate.
4314
4315 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4316
4317         PR gdb/22185
4318         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4319         obsolete.
4320         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4321         Remove i386sol2 support.
4322         * configure.nat <i386sol2>: Remove.
4323         <sol2-64>: Fold into ...
4324         <sol2>: ... this.
4325         Move common settings to default section.
4326         Add sol-thread.o.
4327         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4328         x86_64-*-solaris2.1[0-9]*>: Rename to ...
4329         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4330         <i[34567]86-*-solaris*>: Remove.
4331         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4332
4333         * configure.ac: Remove wctype in libw check.
4334         (_MSE_INT_H): Don't define on Solaris 7-9.
4335         <solaris*>: Remove libthread_db.so.1 check.
4336         * configure: Regenerate.
4337         * config.in: Regenerate.
4338
4339         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4340         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4341         (gdb_ps_size_t): Remove.
4342         Use base types in users.
4343         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4344
4345         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4346
4347 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4348
4349         PR build/22206
4350         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4351         (adi_is_addr_mapped): Likewise.
4352         (PSR_ICC): Don't redefine.
4353         (PSR_IMPL): Likewise.
4354
4355 2017-09-25  Tom Tromey  <tom@tromey.com>
4356
4357         * regcache.c (regcache::dump): Use string_printf.
4358
4359 2017-09-25  Tom Tromey  <tom@tromey.com>
4360
4361         * regcache.c (class regcache_invalidator): New.
4362         (struct register_to_invalidate): Remove.
4363         (make_cleanup_regcache_invalidate): Remove.
4364         (regcache::raw_write): Use regcache_invalidator.
4365
4366 2017-09-25  Tom Tromey  <tom@tromey.com>
4367
4368         * spu-tdep.c (spu2ppu_sniffer): Update.
4369         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4370         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4371         Remove.
4372         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4373         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4374         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4375         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4376         (frame_pop): Update.
4377
4378 2017-09-25  Tom Tromey  <tom@tromey.com>
4379
4380         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4381         * regcache.h (regcache_xfree): Don't declare.
4382         * regcache.c (regcache_xfree): Remove.
4383         (do_regcache_xfree): Use delete.
4384         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4385         * linux-fork.c (free_fork): Use delete.
4386         (fork_save_infrun_state): Likewise.
4387         * jit.c (jit_dealloc_cache): Use delete.
4388         * infrun.c (discard_infcall_suspend_state): Use delete.
4389
4390 2017-09-25  Tom Tromey  <tom@tromey.com>
4391
4392         * regcache.h (regcache_xmalloc): Don't declare.
4393         (regcache_raw_set_cached_value): Update comment.
4394         * regcache.c (regcache_xmalloc): Remove.
4395         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4396         * jit.c (jit_frame_sniffer): Use new.
4397         * frame.c (frame_save_as_regcache): Use new.
4398
4399 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4400
4401         * NEWS: Advertise support for guarded-storage registers on IBM z.
4402
4403 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4404
4405         * s390-linux-nat.c (have_regset_gs): New static variable.
4406         (s390_linux_fetch_inferior_registers): Handle guarded-storage
4407         control block and guarded-storage broadcast control regsets.
4408         (s390_read_description): Detect whether the target has
4409         guarded-storage support, return appropriate tdesc.
4410         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4411         (features/s390x-gs-linux64.c): Likewise.
4412         (struct gdbarch_tdep) <have_gs>: New field.
4413         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4414         (s390_gsbc_regset): New variables.
4415         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4416         and s390_gsbc_regset, if applicable.
4417         (s390_core_read_description): Check whether core file was from a
4418         target with guarded-storage support; include appropriate regsets.
4419         (s390_gdbarch_init): Add registers for guarded-storage support.
4420         (_initialize_s390_tdep): Initialize new target descriptions that
4421         include registers for guarded-storage support.
4422         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4423         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4424         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4425         (S390_NUM_REGS): Adjust macro definition.
4426         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4427         (tdesc_s390x_gs_linux64): New declarations.
4428
4429 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4430
4431         * features/s390-gs-linux64.xml: New file.
4432         * features/s390-gs.xml: New file.
4433         * features/s390-gsbc.xml: New file.
4434         * features/s390x-gs-linux64.xml: New file.
4435         * features/Makefile (WHICH): Add s390-gs-linux64 and
4436         s390x-gs-linux64.
4437         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4438         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4439         * features/s390-gs-linux64.c: New generated file.
4440         * features/s390x-gs-linux64.c: New file.
4441         * regformats/s390-gs-linux64.dat: New file.
4442         * regformats/s390x-gs-linux64.dat: New file.
4443
4444 2017-09-23  Tom Tromey  <tom@tromey.com>
4445
4446         * defs.h (make_cleanup_override_quit_handler): Don't declare.
4447
4448 2017-09-22  Tom Tromey  <tom@tromey.com>
4449
4450         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4451         type to scoped_restore_tmpl.
4452         <scoped_input_handler>: Initialize m_quit_handler directly.
4453
4454 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4455
4456         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4457         (cd_command): Likewise.  Free "current_directory" before
4458         assigning to it.
4459         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4460         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4461         * top.c (gdb_dirbuf): Remove global declaration.
4462         * top.h (gdb_dirbuf): Likewise.
4463
4464 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4465
4466         * gnulib/aclocal.m4: Regenerate.
4467         * gnulib/config.in: Regenerate.
4468         * gnulib/configure: Regenerate.
4469         * gnulib/import/Makefile.am: Regenerate.
4470         * gnulib/import/Makefile.in: Regenerate.
4471         * gnulib/import/assure.h: New file.
4472         * gnulib/import/at-func.c: Likewise
4473         * gnulib/import/chdir-long.c: New file.
4474         * gnulib/import/chdir-long.h: New file.
4475         * gnulib/import/cloexec.c: New file.
4476         * gnulib/import/cloexec.h: New file.
4477         * gnulib/import/close.c: New file.
4478         * gnulib/import/closedir.c: New file.
4479         * gnulib/import/dirent-private.h: New file.
4480         * gnulib/import/dup-safer.c: New file.
4481         * gnulib/import/dup.c: New file.
4482         * gnulib/import/dup2.c: New file.
4483         * gnulib/import/error.c: New file.
4484         * gnulib/import/error.h: New file.
4485         * gnulib/import/exitfail.c: New file.
4486         * gnulib/import/exitfail.h: New file.
4487         * gnulib/import/fchdir.c: New file.
4488         * gnulib/import/fcntl.c: New file.
4489         * gnulib/import/fcntl.in.h: New file.
4490         * gnulib/import/fd-hook.c: New file.
4491         * gnulib/import/fd-hook.h: New file.
4492         * gnulib/import/fd-safer.c: New file.
4493         * gnulib/import/fdopendir.c: New file.
4494         * gnulib/import/filename.h: New file.
4495         * gnulib/import/filenamecat-lgpl.c: New file.
4496         * gnulib/import/filenamecat.h: New file.
4497         * gnulib/import/fstat.c: New file.
4498         * gnulib/import/fstatat.c: New file.
4499         * gnulib/import/getcwd-lgpl.c: New file.
4500         * gnulib/import/getcwd.c: New file.
4501         * gnulib/import/getdtablesize.c: New file.
4502         * gnulib/import/getlogin_r.c: New file.
4503         * gnulib/import/getprogname.c: New file.
4504         * gnulib/import/getprogname.h: New file.
4505         * gnulib/import/gettext.h: New file.
4506         * gnulib/import/glob-libc.h: New file.
4507         * gnulib/import/glob.c: New file.
4508         * gnulib/import/glob.in.h: New file.
4509         * gnulib/import/intprops.h: New file.
4510         * gnulib/import/m4/chdir-long.m4: New file.
4511         * gnulib/import/m4/close.m4: New file.
4512         * gnulib/import/m4/closedir.m4: New file.
4513         * gnulib/import/m4/d-ino.m4: New file.
4514         * gnulib/import/m4/d-type.m4: New file.
4515         * gnulib/import/m4/dup.m4: New file.
4516         * gnulib/import/m4/dup2.m4: New file.
4517         * gnulib/import/m4/error.m4: New file.
4518         * gnulib/import/m4/fchdir.m4: New file.
4519         * gnulib/import/m4/fcntl.m4: New file.
4520         * gnulib/import/m4/fcntl_h.m4: New file.
4521         * gnulib/import/m4/fdopendir.m4: New file.
4522         * gnulib/import/m4/filenamecat.m4: New file.
4523         * gnulib/import/m4/fstat.m4: New file.
4524         * gnulib/import/m4/fstatat.m4: New file.
4525         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4526         * gnulib/import/m4/getcwd-path-max.m4: New file.
4527         * gnulib/import/m4/getcwd.m4: New file.
4528         * gnulib/import/m4/getdtablesize.m4: New file.
4529         * gnulib/import/m4/getlogin_r.m4: New file.
4530         * gnulib/import/m4/getprogname.m4: New file.
4531         * gnulib/import/m4/glob.m4: New file.
4532         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4533         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4534         * gnulib/import/m4/mempcpy.m4: New file.
4535         * gnulib/import/m4/memrchr.m4: New file.
4536         * gnulib/import/m4/mode_t.m4: New file.
4537         * gnulib/import/m4/msvc-inval.m4: New file.
4538         * gnulib/import/m4/msvc-nothrow.m4: New file.
4539         * gnulib/import/m4/open.m4: New file.
4540         * gnulib/import/m4/openat.m4: New file.
4541         * gnulib/import/m4/opendir.m4: New file.
4542         * gnulib/import/m4/readdir.m4: New file.
4543         * gnulib/import/m4/realloc.m4: New file.
4544         * gnulib/import/m4/rewinddir.m4: New file.
4545         * gnulib/import/m4/save-cwd.m4: New file.
4546         * gnulib/import/m4/strdup.m4: New file.
4547         * gnulib/import/m4/strerror.m4: New file.
4548         * gnulib/import/m4/unistd-safer.m4: New file.
4549         * gnulib/import/mempcpy.c: New file.
4550         * gnulib/import/memrchr.c: New file.
4551         * gnulib/import/msvc-inval.c: New file.
4552         * gnulib/import/msvc-inval.h: New file.
4553         * gnulib/import/msvc-nothrow.c: New file.
4554         * gnulib/import/msvc-nothrow.h: New file.
4555         * gnulib/import/open.c: New file.
4556         * gnulib/import/openat-die.c: New file.
4557         * gnulib/import/openat-priv.h: New file.
4558         * gnulib/import/openat-proc.c: New file.
4559         * gnulib/import/openat.c: New file.
4560         * gnulib/import/openat.h: New file.
4561         * gnulib/import/opendir.c: New file.
4562         * gnulib/import/pipe-safer.c: New file.
4563         * gnulib/import/readdir.c: New file.
4564         * gnulib/import/realloc.c: New file.
4565         * gnulib/import/rewinddir.c: New file.
4566         * gnulib/import/save-cwd.c: New file.
4567         * gnulib/import/save-cwd.h: New file.
4568         * gnulib/import/strdup.c: New file.
4569         * gnulib/import/strerror-override.c: New file.
4570         * gnulib/import/strerror-override.h: New file.
4571         * gnulib/import/strerror.c: New file.
4572         * gnulib/import/unistd--.h: New file.
4573         * gnulib/import/unistd-safer.h: New file.
4574         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4575         "getcwd" and "glob".
4576         * ser-tcp.c: Undefine "close" before redefining it.
4577
4578 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4579
4580         * guile/scm-value.c (gdbscm_value_address): Initialize address,
4581         get rid of res_val.
4582
4583 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4584
4585         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4586         <sol2,sparc>: Likewise.
4587         <sol2-64,i386>: Likewise.
4588
4589         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4590         -Wdeprecated-declarations on *-*-solaris*.
4591         * configure: Regenerate.
4592
4593         * procfs.c: Include "nat/inferior.h".
4594         (procfs_info_proc): Fix typo.
4595
4596 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4597
4598         * remote.c (vector): Include.
4599         (struct private_thread_info): Add field, thread_handle.
4600         (free_private_thread_info): Deallocate storage associated with
4601         thread handle.
4602         (get_private_info_thread): Initialize `thread_handle' field.
4603         (struct thread_item): Add field, thread_handle.
4604         (clear_threads_listing_context): Deallocate storage associated
4605         with thread handle.
4606         (start_thread): Add support for "handle" attribute.
4607         (thread_attributes): Add "handle".
4608         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4609         field.
4610         (remote_update_thread_list): Update thread_handle.
4611         (remote_thread_handle_to_thread_info): New function.
4612         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4613
4614 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4615
4616         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4617         function.
4618         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4619         * python/python-internal.h (thread_object_type): Declare.
4620
4621 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4622
4623         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4624         (target_thread_handle_to_thread_info): Declare.
4625         * target.c (target_thread_handle_to_thread_info): New function.
4626         * target-delegates.c: Regenerate.
4627         * gdbthread.h (find_thread_by_handle): Declare.
4628         * thread.c (find_thread_by_handle): New function.
4629         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4630         function.
4631         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4632
4633 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4634
4635         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4636
4637 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4638
4639         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4640
4641 2017-09-21  Yao Qi  <yao.qi@linaro.org>
4642
4643         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4644         to gdb_target_obs.
4645
4646 2017-09-20  Tom Tromey  <tom@tromey.com>
4647
4648         * breakpoint.c (struct counted_command_line): Remove.
4649         (breakpoint_commands): Update.
4650         (alloc_counted_command_line, incref_counted_command_line)
4651         (decref_counted_command_line, do_cleanup_counted_command_line)
4652         (make_cleanup_decref_counted_command_line): Remove.
4653         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4654         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4655         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4656         (save_breakpoints): Update.
4657         * breakpoint.h (counted_command_line): Now a typedef to
4658         shared_ptr.
4659         (struct breakpoint) <commands>: Now a counted_command_line.
4660         (struct bpstats) <command>: Likewise.
4661
4662 2017-09-20  Tom Tromey  <tom@tromey.com>
4663
4664         * breakpoint.c (struct commands_info, do_map_commands_command):
4665         Remove.
4666         (commands_command_1): Update.
4667         (iterate_over_related_breakpoints): Take a function_view.
4668         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4669         (delete_command): Update.
4670         (map_breakpoint_numbers): Take a function_view.
4671         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4672         (disable_command): Update.
4673         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4674         (enable_command): Update.
4675         (struct disp_data, do_enable_breakpoint_disp)
4676         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4677         (do_map_enable_delete_breakpoint): Remove.
4678         (enable_once_command, enable_count_command, enable_delete_command)
4679         (delete_trace_variable_command): Update.
4680
4681 2017-09-20  Tom Tromey  <tom@tromey.com>
4682
4683         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
4684         (bpstat_clear): Use delete.
4685         (bpstats): New constructors.
4686         (bpstat_copy, bpstat_stop_status): Use new.
4687         (dprintf_after_condition_true): Update.
4688         * breakpoint.h (bpstats::bpstats): Add constructors.
4689         (bpstats::~bpstats): Add destructor.
4690
4691 2017-09-20  Pedro Alves  <palves@redhat.com>
4692
4693         * eval.c (make_params): Delete, refactored as ...
4694         (class fake_method): ... this new type's ctor.
4695         (fake_method::~fake_method): New.
4696         (evaluate_subexp_standard): Use 'fake_method'.
4697
4698 2017-09-20  Tom Tromey  <tom@tromey.com>
4699
4700         * windows-nat.c (get_windows_debug_event, windows_wait)
4701         (do_initial_windows_stuff, windows_attach): Update.
4702         * utils.c (vwarning, internal_vproblem): Update.
4703         (ui_unregister_input_event_handler_cleanup)
4704         (prepare_to_handle_input): Remove.
4705         (class scoped_input_handler): New.
4706         (defaulted_query, prompt_for_continue): Update.
4707         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4708         Update.
4709         * top.c (undo_terminal_modifications_before_exit): Update.
4710         * target/target.h (target_terminal_init, target_terminal_inferior)
4711         (target_terminal_ours): Don't declare.
4712         (class target_terminal): New.
4713         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4714         (target_terminal_ours_for_output)
4715         (make_cleanup_restore_target_terminal): Don't declare.
4716         (target_terminal_info): Remove.
4717         * target.c (enum terminal_state, terminal_state): Remove.
4718         (target_terminal::terminal_state): Define.
4719         (target_terminal::init): Rename from target_terminal_init.
4720         (target_terminal::inferior): Rename from
4721         target_terminal_inferior.
4722         (target_terminal::ours): Rename from target_terminal_ours.
4723         (target_terminal::ours_for_output): Rename from
4724         target_terminal_ours_for_output.
4725         (target_terminal::info): New method.
4726         (cleanup_restore_target_terminal)
4727         (make_cleanup_restore_target_terminal): Remove.
4728         * solib.c (handle_solib_event): Update.
4729         * remote.c (remote_serial_quit_handler): Update.
4730         (remote_terminal_inferior, remote_wait_as): Update.
4731         * record-full.c (record_full_wait_1): Update.
4732         * nto-procfs.c (procfs_create_inferior): Update.
4733         * nat/fork-inferior.c (startup_inferior): Update.
4734         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4735         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4736         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4737         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4738         (mi_breakpoint_created, mi_breakpoint_deleted)
4739         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4740         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4741         (mi_user_selected_context_changed, report_initial_inferior):
4742         Update.
4743         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4744         (linux_nat_terminal_inferior): Update.
4745         * infrun.c (follow_fork_inferior)
4746         (handle_vfork_child_exec_or_exit, do_target_resume)
4747         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4748         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4749         Update.
4750         * inflow.c (child_terminal_init, info_terminal_command): Update.
4751         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4752         (attach_command): Update.
4753         * infcall.c (call_thread_fsm_should_stop): Update.
4754         * gnu-nat.c (gnu_attach): Update.
4755         * extension.c (struct active_ext_lang_state)
4756         (restore_active_ext_lang): Update.
4757         * exceptions.c (print_flush): Update.
4758         * event-top.c (async_enable_stdin, default_quit_handler): Update.
4759         (struct quit_handler_cleanup_data, restore_quit_handler)
4760         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4761         Remove.
4762         * cp-support.c (gdb_demangle): Update.
4763         * breakpoint.c (update_inserted_breakpoint_locations)
4764         (insert_breakpoint_locations, handle_jit_event)
4765         (disable_breakpoints_in_unloaded_shlib): Update.
4766         * annotate.c (annotate_breakpoints_invalid)
4767         (annotate_frames_invalid): Update.
4768
4769 2017-09-20  Tom Tromey  <tom@tromey.com>
4770
4771         * main.c (catch_command_errors): Rename from
4772         catch_command_errors_const.
4773         (captured_main_1): Update.
4774
4775 2017-09-20  Pedro Alves  <palves@redhat.com>
4776
4777         * cli/cli-cmds.c (list_command): Use print_sal_location.
4778         (print_sal_location): New function.
4779         (ambiguous_line_spec): Use print_sal_location.
4780         * linespec.c (symbol_to_sal): Record the symbol in the sal.
4781         * symtab.c (find_function_start_sal): Likewise.
4782         * symtab.h (symtab_and_line::symbol): New field.
4783
4784 2017-09-20  Pedro Alves  <palves@redhat.com>
4785
4786         * linespec.c (minsym_found): Handle non-text minsyms.
4787         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
4788
4789 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4790
4791         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
4792         backslash.
4793
4794 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4795
4796         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
4797         vmovups instead vmovaps.
4798         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
4799
4800 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
4801
4802         * NEWS (Changes since GDB 8.0): Add starti.
4803         * infcmd.c (enum run_break): New.
4804         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
4805         case.
4806         (run_command): Use enum run_how.
4807         (start_command): Likewise.
4808         (starti_command): New function.
4809         (RUN_ARGS_HELP): New macro.
4810         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
4811         commands.  Add starti command.
4812
4813 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4814
4815         * Makefile.in (monitor.o): Remove the rule.
4816
4817 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4818
4819         * annotate.h (struct annotate_arg_emitter): Use
4820         DISABLE_COPY_AND_ASSIGN.
4821         * common/refcounted-object.h (refcounted_object): Likewise.
4822         * completer.h (struct completion_result): Likewise.
4823         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
4824         * filename-seen-cache.h (filename_seen_cache): Likewise.
4825         * gdbcore.h (thread_section_name): Likewise.
4826         * gdb_regex.h (compiled_regex): Likewise.
4827         * gdbthread.h (scoped_restore_current_thread): Likewise.
4828         * inferior.h (scoped_restore_current_inferior): Likewise.
4829         * jit.c (jit_reader): Likewise.
4830         * linespec.h (struct linespec_result): Likewise.
4831         * mi/mi-parse.h (struct mi_parse): Likewise.
4832         * nat/fork-inferior.c (execv_argv): Likewise.
4833         * progspace.h (scoped_restore_current_program_space): Likewise.
4834         * python/python-internal.h (class gdbpy_enter): Likewise.
4835         * regcache.h (regcache): Likewise.
4836         * target-descriptions.c (struct tdesc_reg): Likewise.
4837         (struct tdesc_type): Likewise.
4838         (struct tdesc_feature): Likewise.
4839         * ui-out.h (ui_out_emit_type): Likewise.
4840
4841 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
4842
4843         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
4844         label abort_expression.
4845
4846 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4847
4848         * common/buffer.c (buffer_xml_printf): Adjust.
4849         * common/xml-utils.c (xml_escape_text): Change return type to
4850         std::string, update code accordingly.
4851         * common/xml-utils.h (xml_escape_text): Change return type to
4852         std::string.
4853         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
4854         * windows-tdep.c (windows_xfer_shared_library): Adjust.
4855         * unittests/xml-utils-selftests.c (test_xml_escape_text):
4856         Adjust.
4857
4858 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4859
4860         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
4861         (SUBDIR_UNITTESTS_OBS): Add new object file.
4862         * unittests/xml-utils-selftests.c: New file.
4863
4864 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4865
4866         * common/selftest.h (selftest): New struct/interface.
4867         (register_test): Add name parameter, add new overload.
4868         (run_tests): Add filter parameter.
4869         (for_each_selftest_ftype): New typedef.
4870         (for_each_selftest): New declaration.
4871         * common/selftest.c (tests): Change type to
4872         map<string, unique_ptr<selftest>>.
4873         (simple_selftest): New struct.
4874         (register_test): New function.
4875         (register_test): Add name parameter and use it.
4876         (run_tests): Add filter parameter and use it.  Add prints.
4877         Adjust to vector -> map change.
4878         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
4879         registering selftests.
4880         * arm-tdep.c (_initialize_arm_tdep): Likewise.
4881         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
4882         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
4883         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
4884         * findvar.c (_initialize_findvar): Likewise.
4885         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
4886         * maint.c (maintenance_selftest): Update call to run_tests.
4887         (maintenance_info_selftests): New function.
4888         (_initialize_maint_cmds): Register "maintenance info selftests"
4889         command.  Update "maintenance selftest" doc.
4890         * regcache.c (_initialize_regcache): Add names when registering
4891         selftests.
4892         * rust-exp.y (_initialize_rust_exp): Likewise.
4893         * selftest-arch.c (gdbarch_selftest): New struct.
4894         (gdbarch_tests): Remove.
4895         (register_test_foreach_arch): Add name parameter.  Call
4896         register_test.
4897         (tests_with_arch): Remove, move most content to
4898         gdbarch_selftest::operator().
4899         (_initialize_selftests_foreach_arch): Remove.
4900         * selftest-arch.h (register_test_foreach_arch): Add name
4901         parameter.
4902         (run_tests_with_arch): New declaration.
4903         * utils-selftests.c (_initialize_utils_selftests): Add names
4904         when registering selftests.
4905         * utils.c (_initialize_utils): Likewise.
4906         * unittests/array-view-selftests.c
4907         (_initialize_array_view_selftests): Likewise.
4908         * unittests/environ-selftests.c (_initialize_environ_selftests):
4909         Likewise.
4910         * unittests/function-view-selftests.c
4911         (_initialize_function_view_selftests): Likewise.
4912         * unittests/offset-type-selftests.c
4913         (_initialize_offset_type_selftests): Likewise.
4914         * unittests/optional-selftests.c
4915         (_initialize_optional_selftests): Likewise.
4916         * unittests/scoped_restore-selftests.c
4917         (_initialize_scoped_restore_selftests): Likewise.
4918         * NEWS: Document "maintenance selftest" and "maint info
4919         selftests".
4920
4921 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4922
4923         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
4924         scoped_restore.
4925
4926 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4927
4928         * mi/mi-main.c (mi_load_progress): Make uiout variable
4929         a unique_ptr.
4930
4931 2017-09-15  Pedro Alves  <palves@redhat.com>
4932
4933         * compile/compile-c-types.c (convert_enum, convert_int)
4934         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
4935
4936 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
4937
4938         * dwarf2read.c (copy_string): Remove.
4939         (parse_macro_definition): Replace copy_string with savestring.
4940
4941 2017-09-15  Yao Qi  <yao.qi@linaro.org>
4942
4943         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
4944         gdb_target_obs.
4945         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
4946         Likewise.
4947         (i[34567]86-*-linux*): Likewise.
4948
4949 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4950
4951         * dwarf2expr.h (dwarf_stack_value): Add constructor.
4952         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
4953         <stack>: Change type to std::vector.
4954         <stack_len, stack_allocated>: Remove.
4955         <grow_stack>: Remove.
4956         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4957         (dwarf_expr_context::~dwarf_expr_context): Remove.
4958         (dwarf_expr_context::grow_stack): Remove.
4959         (dwarf_expr_context::push): Adjust.
4960         (dwarf_expr_context::pop): Adjust.
4961         (dwarf_expr_context::fetch): Adjust.
4962         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
4963         (dwarf_expr_context::stack_empty_p): Adjust.
4964         (dwarf_expr_context::execute_stack_op): Adjust.
4965
4966 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4967
4968         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
4969         return type to bool.
4970         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
4971
4972 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4973
4974         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
4975         Change type to bool.
4976         (dwarf_stack_value) <in_stack_memory>: Likewise.
4977         (dwarf_expr_context) <push_address>: Change parameter type to
4978         bool.
4979         <fetch_in_stack_memory>: Change return type to bool.
4980         <push>: Change parameter type to bool.
4981         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
4982         to bool.
4983         (dwarf_expr_context::push_address): Likewise.
4984         (dwarf_expr_context::fetch_in_stack_memory): Change return type
4985         to bool.
4986         (dwarf_expr_context::execute_stack_op): Adjust.
4987         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
4988
4989 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4990
4991         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
4992         (struct dwarf_expr_context) <n_pieces>: Remove.
4993         <pieces>: Change type to std::vector.
4994         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4995         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
4996         pieces.
4997         (dwarf_expr_context::add_piece): Adjust.
4998         * dwarf2loc.c (struct piece_closure): Initialize fields.
4999         <n_pieces>: Remove.
5000         <pieces>: Change type to std::vector.
5001         (allocate_piece_closure): Adjust, change parameter to
5002         std::vector rvalue and std::move it to piece_closure.
5003         (rw_pieced_value): Adjust.
5004         (check_pieced_synthetic_pointer): Adjust.
5005         (indirect_synthetic_pointer): Adjust.
5006         (coerce_pieced_ref): Adjust.
5007         (free_pieced_value_closure):  Adjust.  Use delete to free
5008         piece_closure.
5009         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
5010         to allocate_piece_closure.
5011         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5012
5013 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5014
5015         * probe.h (probe_ops_cp): Remove typedef.
5016         (DEF_VEC_P (probe_ops_cp)): Remove.
5017         (all_probe_ops): Change type to std::vector.
5018         * probe.c (info_probes_for_ops): Adjust to vector change.
5019         (probe_linespec_to_ops): Likewise.
5020         (all_probe_ops): Change type to std::vector.
5021         (_initialize_probe): Adjust to vector change.
5022         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5023         * elfread.c (elf_get_probes): Likewise.
5024         * stap-probe.c (_initialize_stap_probe): Likewise.
5025
5026 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5027
5028         * probe.h (struct bound_probe): Define constructors.
5029         * probe.c (bound_probe_s): Remove typedef.
5030         (DEF_VEC_O (bound_probe_s)): Remove VEC.
5031         (collect_probes): Change return type to std::vector, remove
5032         cleanup.
5033         (compare_probes): Return bool, change parameter type.  Change
5034         semantic to "less than".
5035         (gen_ui_out_table_header_info): Change parameter to std::vector
5036         and update.
5037         (exists_probe_with_pops): Likewise.
5038         (info_probes_for_ops): Update to std::vector change.
5039         (enable_probes_command): Likewise.
5040         (disable_probes_command): Likewise.
5041
5042 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5043
5044         * probe.h (struct probe_ops) <get_probes>: Change parameter from
5045         vec to std::vector.
5046         * probe.c (parse_probes_in_pspace): Update.
5047         (find_probes_in_objfile): Update.
5048         (find_probe_by_pc): Update.
5049         (collect_probes): Update.
5050         (probe_any_get_probes): Update.
5051         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5052         return type to reference to std::vector.
5053         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5054         std::vector and update.
5055         (dtrace_process_dof): Likewise.
5056         (dtrace_get_probes): Likewise.
5057         * elfread.c (elf_get_probes): Change return type to std::vector,
5058         store an std::vector in bfd_data.
5059         (probe_key_free): Update to std::vector.
5060         * stap-probe.c (handle_stap_probe): Change parameter to
5061         std::vector and update.
5062         (stap_get_probes): Likewise.
5063         * symfile-debug.c (debug_sym_get_probes): Change return type to
5064         std::vector and update.
5065
5066 2017-09-11  Tom Tromey  <tom@tromey.com>
5067
5068         * breakpoint.c (program_breakpoint_here_p): Update.
5069         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5070         from make_show_memory_breakpoints_cleanup.  Return a
5071         scoped_restore_tmpl<int>.
5072         (restore_show_memory_breakpoints): Remove.
5073         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5074         * mem-break.c (memory_validate_breakpoint): Update.
5075         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5076         (ia64_memory_remove_breakpoint): Update.
5077         (ia64_breakpoint_from_pc): Update.
5078         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5079         from make_show_memory_breakpoints_cleanup.
5080
5081 2017-09-11  Tom Tromey  <tom@tromey.com>
5082
5083         * d-namespace.c (d_lookup_symbol): Use std::string.
5084         (find_symbol_in_baseclass): Likewise.
5085
5086 2017-09-11  Tom Tromey  <tom@tromey.com>
5087
5088         * ctf.c (ctf_start): Use std::string.
5089
5090 2017-09-11  Tom Tromey  <tom@tromey.com>
5091
5092         * ada-lang.c (is_known_support_routine): Update.
5093         (ada_unhandled_exception_name_addr_from_raise): Update.
5094         * guile/scm-frame.c (gdbscm_frame_name): Update.
5095         * python/py-frame.c (frapy_name): Update.
5096         (frapy_function): Update.
5097         * stack.h (find_frame_funname): Update.
5098         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5099         (print_frame): Update.
5100
5101 2017-09-11  Tom Tromey  <tom@tromey.com>
5102
5103         * findcmd.c (put_bits): Take a gdb::byte_vector.
5104         (parse_find_args): Return gdb::byte_vector.  "args" now const.
5105         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
5106         cleanups.
5107         (find_command): Update.
5108
5109 2017-09-11  Tom Tromey  <tom@tromey.com>
5110
5111         * cli/cli-script.c (class scoped_restore_hook_in): New.
5112         (clear_hook_in_cleanup): Remove.
5113         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5114         scoped_restore_hook_in.
5115
5116 2017-09-11  Tom Tromey  <tom@tromey.com>
5117
5118         * cli/cli-script.c (restore_interp): Remove.
5119         (read_command_lines): Use scoped_restore_interp.
5120         * interps.c (scoped_restore_interp::set_temp): Rename from
5121         interp_set_temp.
5122         * interps.h (class scoped_restore_interp): New.
5123         (interp_set_temp): Remove.
5124
5125 2017-09-11  Tom Tromey  <tom@tromey.com>
5126
5127         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5128         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5129         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5130         scoped_restore.
5131         (mi_cmd_break_insert_1): Update.
5132         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5133         scoped_restore.
5134
5135 2017-09-11  Tom Tromey  <tom@tromey.com>
5136
5137         * demangle.c (demangle_command): Update.
5138         * breakpoint.c (disable_command): Update.
5139         (enable_command): Update.
5140         (find_location_by_number): Make "number" const.  Use
5141         get_number_trailer.
5142         * cli/cli-utils.c (extract_arg): Return std::string.
5143         * probe.c (parse_probe_linespec): Update.  Change types.
5144         (collect_probes): Take string arguments.
5145         (parse_probe_linespec): Likewise.
5146         (info_probes_for_ops): Update.
5147         (enable_probes_command): Update.
5148         (disable_probes_command): Update.
5149         * break-catch-sig.c (catch_signal_split_args): Update.
5150         * mi/mi-parse.c (mi_parse): Update.
5151
5152 2017-09-11  Tom Tromey  <tom@tromey.com>
5153
5154         * language.h (language_enum): Make argument const.
5155         * language.c (language_enum): Make argument const.
5156
5157 2017-09-11  Tom Tromey  <tom@tromey.com>
5158
5159         * common/common-utils.h (skip_to_space): Remove macro, redeclare
5160         as function.
5161         (skip_to_space): Rename from skip_to_space_const.
5162         * common/common-utils.c (skip_to_space): New function.
5163         (skip_to_space): Rename from skip_to_space_const.
5164         * cli/cli-utils.h (get_number): Rename from get_number_const.
5165         (extract_arg): Rename from extract_arg_const.
5166         * cli/cli-utils.c (get_number): Rename from get_number_const.
5167         (extract_arg): Rename from extract_arg_const.
5168         (number_or_range_parser::get_number): Use ::get_number.
5169         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5170         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5171         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5172         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5173         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5174         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5175         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5176         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5177
5178 2017-09-11  Tom Tromey  <tom@tromey.com>
5179
5180         * python/python.c (do_start_initialization): Use
5181         py-event-types.def to initialize types.
5182         Define all object type structures.
5183         * python/python-internal.h: Don't declare event initialization
5184         functions.
5185         * python/py-threadevent.c (thread_event_object_type): Don't
5186         define.
5187         * python/py-stopevent.c (stop_event_object_type): Don't define.
5188         * python/py-signalevent.c (signal_event_object_type): Don't
5189         declare or define.
5190         * python/py-newobjfileevent.c (new_objfile_event_object_type)
5191         (clear_objfiles_event_object_type): Don't declare or define.
5192         * python/py-infevents.c (inferior_call_pre_event_object_type)
5193         (inferior_call_post_event_object_type)
5194         (register_changed_event_object_type)
5195         (memory_changed_event_object_type): Don't declare or define.
5196         * python/py-inferior.c (new_thread_event_object_type)
5197         (new_inferior_event_object_type)
5198         (inferior_deleted_event_object_type): Don't declare or define.
5199         * python/py-exitedevent.c (exited_event_object_type): Don't
5200         declare or define.
5201         * python/py-evts.c (gdbpy_initialize_py_events): Use
5202         py-all-events.def.
5203         * python/py-events.h (thread_event_object_type): Don't declare.
5204         (events_object): Use py-all-events.def.
5205         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
5206         py-event-types.def.
5207         * python/py-event-types.def: New file.
5208         * python/py-continueevent.c (create_continue_event_object): Don't
5209         declare or define.
5210         * python/py-bpevent.c (breakpoint_event_object_type): Don't
5211         declare or define.
5212         * python/py-all-events.def: New file.
5213
5214 2017-09-11  Tom Tromey  <tom@tromey.com>
5215
5216         * python/py-threadevent.c (create_thread_event_object): Return
5217         gdbpy_ref.
5218         * python/py-stopevent.h (create_stop_event_object)
5219         (create_breakpoint_event_object, create_signal_event_object):
5220         Update.
5221         * python/py-stopevent.c (create_stop_event_object): Return
5222         gdbpy_ref.
5223         (emit_stop_event): Update.
5224         * python/py-signalevent.c (create_signal_event_object): Return
5225         gdbpy_ref.
5226         * python/py-infevents.c (create_inferior_call_event_object):
5227         Update.
5228         * python/py-event.h (create_event_object)
5229         (create_thread_event_object): Update.
5230         * python/py-event.c (create_event_object): Return gdbpy_ref.
5231         * python/py-continueevent.c: Return gdbpy_ref.
5232         * python/py-bpevent.c (create_breakpoint_event_object): Return
5233         gdbpy_ref.
5234
5235 2017-09-11  Tom Tromey  <tom@tromey.com>
5236
5237         PR python/15622:
5238         * NEWS: Add entry.
5239         * python/python.c (do_start_initialization): Initialize new event
5240         types.
5241         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5242         (gdbpy_initialize_inferior_deleted_event)
5243         (gdbpy_initialize_new_thread_event): Declare.
5244         * python/py-threadevent.c (create_thread_event_object): Add option
5245         "thread" parameter.
5246         * python/py-inferior.c (new_thread_event_object_type)
5247         (new_inferior_event_object_type)
5248         (inferior_deleted_event_object_type): Declare.
5249         (python_new_inferior, python_inferior_deleted): New functions.
5250         (add_thread_object): Emit new_thread event.
5251         (gdbpy_initialize_inferior): Attach new functions to corresponding
5252         observers.
5253         (new_thread, new_inferior, inferior_deleted): Define new event
5254         types.
5255         * python/py-evts.c (gdbpy_initialize_py_events): Add new
5256         registries.
5257         * python/py-events.h (events_object) <new_inferior,
5258         inferior_deleted, new_thread>: New fields.
5259         * python/py-event.h (create_thread_event_breakpoint): Add optional
5260         "thread" parameter.
5261
5262 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5263
5264         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5265         check current_ui instead.
5266         (internal_vproblem): Likewise.
5267
5268 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
5269
5270         * thread.c (print_thread_info_1): Remove unnecessary calls to
5271         uiout->is_mi_like_p.
5272
5273 2017-09-09  Tom Tromey  <tom@tromey.com>
5274
5275         * namespace.h (add_using_directive): Update.
5276         * namespace.c (add_using_directive): Change type of excludes to
5277         std::vector.
5278         * dwarf2read.c (read_import_statement): Use std::vector.
5279         (read_namespace): Update.
5280         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5281
5282 2017-09-09  Tom Tromey  <tom@tromey.com>
5283
5284         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5285
5286 2017-09-09  Tom Tromey  <tom@tromey.com>
5287
5288         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5289
5290 2017-09-09  Tom Tromey  <tom@tromey.com>
5291
5292         * stack.c (func_command): Use gdb::def_vector.
5293
5294 2017-09-09  Tom Tromey  <tom@tromey.com>
5295
5296         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5297         ui_out_emit_list, ui_out_emit_tuple.
5298         (mi_cmd_var_update): Likewise.
5299
5300 2017-09-09  Tom Tromey  <tom@tromey.com>
5301
5302         * mi/mi-interp.c (mi_user_selected_context_changed): Use
5303         ui_out_redirect_pop.
5304         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5305         ui_out_redirect_pop.
5306         * utils.c (do_ui_out_redirect_pop)
5307         (make_cleanup_ui_out_redirect_pop): Remove.
5308         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5309         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5310         * ui-out.h (ui_out_redirect_pop): New class.
5311
5312 2017-09-09  Tom Tromey  <tom@tromey.com>
5313
5314         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5315         (list_available_thread_groups, mi_cmd_list_thread_groups)
5316         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5317         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5318         Likewise.
5319
5320 2017-09-09  Tom Tromey  <tom@tromey.com>
5321
5322         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5323         ui_out_emit_tuple.
5324
5325 2017-09-09  Tom Tromey  <tom@tromey.com>
5326
5327         * target.c (flash_erase_command): Use ui_out_emit_tuple.
5328         * stack.c (print_frame): Use ui_out_emit_tuple.
5329         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5330         (info_spu_mailbox_command, info_spu_dma_command)
5331         (info_spu_proxydma_command): Likewise.
5332         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5333         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5334         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5335         ui_out_emit_tuple.
5336         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5337
5338 2017-09-09  Tom Tromey  <tom@tromey.com>
5339
5340         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5341         (class ui_out_emit_table): Update comment.
5342         * ui-out.c (do_cleanup_table_end)
5343         (make_cleanup_ui_out_table_begin_end): Remove.
5344         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5345         (info_spu_dma_cmdlist): Likewise.
5346         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5347         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5348         ui_out_emit_table.
5349
5350 2017-09-09  Tom Tromey  <tom@tromey.com>
5351
5352         * thread.c (print_thread_info_1): Use ui_out_emit_table,
5353         ui_out_emit_list, gdb::optional.
5354
5355 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
5356
5357         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5358         prototype.
5359         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5360         prototype.
5361         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5362         prototype.
5363         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5364         * ada-exp.y: Remove _initialize_ada_exp prototype.
5365         * ada-lang.c: Remove _initialize_ada_language prototype.
5366         * ada-tasks.c: Remove _initialize_tasks prototype.
5367         * addrmap.c: Remove _initialize_addrmap prototype.
5368         * agent.c: Remove _initialize_agent prototype.
5369         * aix-thread.c: Remove _initialize_aix_thread prototype.
5370         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5371         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5372         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5373         prototype.
5374         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5375         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5376         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5377         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5378         prototype.
5379         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5380         prototype.
5381         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5382         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5383         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5384         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5385         prototype.
5386         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5387         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5388         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5389         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5390         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5391         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5392         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5393         prototype.
5394         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5395         prototype.
5396         * annotate.c: Remove _initialize_annotate prototype.
5397         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5398         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5399         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5400         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5401         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5402         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5403         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5404         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5405         prototype.
5406         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5407         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5408         * auto-load.c: Remove _initialize_auto_load prototype.
5409         * auxv.c: Remove _initialize_auxv prototype.
5410         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5411         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5412         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5413         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5414         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5415         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5416         prototype.
5417         * break-catch-throw.c: Remove _initialize_break_catch_throw
5418         prototype.
5419         * breakpoint.c: Remove _initialize_breakpoint prototype.
5420         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5421         * btrace.c: Remove _initialize_btrace prototype.
5422         * charset.c: Remove _initialize_charset prototype.
5423         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5424         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5425         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5426         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5427         * cli/cli-script.c: Remove _initialize_cli_script prototype.
5428         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5429         * coffread.c: Remove _initialize_coffread prototype.
5430         * compile/compile.c: Remove _initialize_compile prototype.
5431         * complaints.c: Remove _initialize_complaints prototype.
5432         * completer.c: Remove _initialize_completer prototype.
5433         * copying.awk: Remove _initialize_copying prototype.
5434         * copying.c: Regenerate.
5435         * core-regset.c: Remove _initialize_core_regset prototype.
5436         * corefile.c: Remove _initialize_core prototype.
5437         * corelow.c: Remove _initialize_corelow prototype.
5438         * cp-abi.c: Remove _initialize_cp_abi prototype.
5439         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5440         * cp-support.c: Remove _initialize_cp_support prototype.
5441         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5442         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5443         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5444         * ctf.c: Remove _initialize_ctf prototype.
5445         * d-lang.c: Remove _initialize_d_language prototype.
5446         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5447         prototype.
5448         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5449         * dbxread.c: Remove _initialize_dbxread prototype.
5450         * dcache.c: Remove _initialize_dcache prototype.
5451         * demangle.c: Remove _initialize_demangler prototype.
5452         * disasm-selftests.c: Remove _initialize_disasm_selftests
5453         prototype.
5454         * disasm.c: Remove _initialize_disasm prototype.
5455         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5456         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5457         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5458         prototype.
5459         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5460         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5461         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5462         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5463         * elfread.c: Remove _initialize_elfread prototype.
5464         * exec.c: Remove _initialize_exec prototype.
5465         * extension.c: Remove _initialize_extension prototype.
5466         * f-lang.c: Remove _initialize_f_language prototype.
5467         * f-valprint.c: Remove _initialize_f_valprint prototype.
5468         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5469         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5470         * filesystem.c: Remove _initialize_filesystem prototype.
5471         * findcmd.c: Remove _initialize_mem_search prototype.
5472         * fork-child.c: Remove _initialize_fork_child prototype.
5473         * frame-base.c: Remove _initialize_frame_base prototype.
5474         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5475         * frame.c: Remove _initialize_frame prototype.
5476         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5477         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5478         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5479         * gcore.c: Remove _initialize_gcore prototype.
5480         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5481         * gdbarch.c: Regenerate.
5482         * gdbarch.sh: Remove _initialize_gdbarch prototype.
5483         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5484         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5485         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5486         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5487         * go-lang.c: Remove _initialize_go_language prototype.
5488         * go32-nat.c: Remove _initialize_go32_nat prototype.
5489         * guile/guile.c: Remove _initialize_guile prototype.
5490         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5491         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5492         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5493         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5494         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5495         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5496         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5497         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5498         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5499         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5500         prototype.
5501         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5502         prototype.
5503         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5504         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5505         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5506         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5507         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5508         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5509         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5510         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5511         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5512         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5513         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5514         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5515         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5516         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5517         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5518         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5519         prototype.
5520         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5521         prototype.
5522         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5523         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5524         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5525         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5526         * infcall.c: Remove _initialize_infcall prototype.
5527         * infcmd.c: Remove _initialize_infcmd prototype.
5528         * inferior.c: Remove _initialize_inferiors prototype.
5529         * inflow.c: Remove _initialize_inflow prototype.
5530         * infrun.c: Remove _initialize_infrun prototype.
5531         * interps.c: Remove _initialize_interpreter prototype.
5532         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5533         * jit.c: Remove _initialize_jit prototype.
5534         * language.c: Remove _initialize_language prototype.
5535         * linux-fork.c: Remove _initialize_linux_fork prototype.
5536         * linux-nat.c: Remove _initialize_linux_nat prototype.
5537         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5538         * linux-thread-db.c: Remove _initialize_thread_db prototype.
5539         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5540         * m2-lang.c: Remove _initialize_m2_language prototype.
5541         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5542         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5543         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5544         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5545         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5546         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5547         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5548         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5549         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5550         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5551         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5552         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5553         * machoread.c: Remove _initialize_machoread prototype.
5554         * macrocmd.c: Remove _initialize_macrocmd prototype.
5555         * macroscope.c: Remove _initialize_macroscope prototype.
5556         * maint.c: Remove _initialize_maint_cmds prototype.
5557         * mdebugread.c: Remove _initialize_mdebugread prototype.
5558         * memattr.c: Remove _initialize_mem prototype.
5559         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5560         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5561         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5562         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5563         * mi/mi-main.c: Remove _initialize_mi_main prototype.
5564         * microblaze-linux-tdep.c: Remove
5565         _initialize_microblaze_linux_tdep prototype.
5566         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5567         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5568         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5569         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5570         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5571         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5572         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5573         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5574         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5575         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5576         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5577         prototype.
5578         * mipsread.c: Remove _initialize_mipsread prototype.
5579         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5580         prototype.
5581         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5582         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5583         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5584         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5585         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5586         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5587         prototype.
5588         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5589         * nto-procfs.c: Remove _initialize_procfs prototype.
5590         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5591         * objc-lang.c: Remove _initialize_objc_language prototype.
5592         * objfiles.c: Remove _initialize_objfiles prototype.
5593         * observer.c: Remove observer_test_first_notification_function,
5594         observer_test_second_notification_function,
5595         observer_test_third_notification_function, and
5596         _initialize_observer prototypes.
5597         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5598         * osabi.c: Remove _initialize_gdb_osabi prototype.
5599         * osdata.c: Remove _initialize_osdata prototype.
5600         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5601         * parse.c: Remove _initialize_parse prototype.
5602         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5603         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5604         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5605         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5606         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5607         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5608         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5609         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5610         * printcmd.c: Remove _initialize_printcmd prototype.
5611         * probe.c: Remove _initialize_probe prototype.
5612         * proc-api.c: Remove _initialize_proc_api prototype.
5613         * proc-events.c: Remove _initialize_proc_events prototype.
5614         * proc-service.c: Remove _initialize_proc_service prototype.
5615         * procfs.c: Remove _initialize_procfs prototype.
5616         * psymtab.c: Remove _initialize_psymtab prototype.
5617         * python/python.c: Remove _initialize_python prototype.
5618         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5619         * record-btrace.c: Remove _initialize_record_btrace prototype.
5620         * record-full.c: Remove _initialize_record_full prototype.
5621         * record.c: Remove _initialize_record prototype.
5622         * regcache.c: Remove _initialize_regcache prototype.
5623         * reggroups.c: Remove _initialize_reggroup prototype.
5624         * remote-notif.c: Remove _initialize_notif prototype.
5625         * remote-sim.c: Remove _initialize_remote_sim prototype.
5626         * remote.c: Remove _initialize_remote prototype.
5627         * reverse.c: Remove _initialize_reverse prototype.
5628         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5629         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5630         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5631         prototype.
5632         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5633         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5634         * rust-exp.y: Remove _initialize_rust_exp prototype.
5635         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5636         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5637         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5638         * score-tdep.c: Remove _initialize_score_tdep prototype.
5639         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5640         prototype.
5641         * ser-go32.c: Remove _initialize_ser_dos prototype.
5642         * ser-mingw.c: Remove _initialize_ser_windows prototype.
5643         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5644         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5645         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5646         * serial.c: Remove _initialize_serial prototype.
5647         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5648         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5649         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5650         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5651         * skip.c: Remove _initialize_step_skip prototype.
5652         * sol-thread.c: Remove _initialize_sol_thread prototype.
5653         * solib-aix.c: Remove _initialize_solib_aix prototype.
5654         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5655         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5656         * solib-frv.c: Remove _initialize_frv_solib prototype.
5657         * solib-spu.c: Remove _initialize_spu_solib prototype.
5658         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5659         * solib-target.c: Remove _initialize_solib_target prototype.
5660         * solib.c: Remove _initialize_solib prototype.
5661         * source.c: Remove _initialize_source prototype.
5662         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5663         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5664         prototype.
5665         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5666         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5667         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5668         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5669         prototype.
5670         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5671         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5672         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5673         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5674         prototype.
5675         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5676         prototype.
5677         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5678         prototype.
5679         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5680         prototype.
5681         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5682         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5683         prototype.
5684         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5685         prototype.
5686         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5687         prototype.
5688         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5689         prototype.
5690         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5691         prototype.
5692         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5693         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5694         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5695         * stabsread.c: Remove _initialize_stabsread prototype.
5696         * stack.c: Remove _initialize_stack prototype.
5697         * stap-probe.c: Remove _initialize_stap_probe prototype.
5698         * std-regs.c: Remove _initialize_frame_reg prototype.
5699         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5700         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5701         * symfile.c: Remove _initialize_symfile prototype.
5702         * symmisc.c: Remove _initialize_symmisc prototype.
5703         * symtab.c: Remove _initialize_symtab prototype.
5704         * target-dcache.c: Remove _initialize_target_dcache prototype.
5705         * target-descriptions.c: Remove _initialize_target_descriptions
5706         prototype.
5707         * thread.c: Remove _initialize_thread prototype.
5708         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5709         prototype.
5710         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5711         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5712         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5713         prototype.
5714         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5715         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5716         * tracefile.c: Remove _initialize_tracefile prototype.
5717         * tracepoint.c: Remove _initialize_tracepoint prototype.
5718         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5719         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5720         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5721         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5722         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5723         * tui/tui-win.c: Remove _initialize_tui_win prototype.
5724         * tui/tui.c: Remove _initialize_tui prototype.
5725         * typeprint.c: Remove _initialize_typeprint prototype.
5726         * user-regs.c: Remove _initialize_user_regs prototype.
5727         * utils.c: Remove _initialize_utils prototype.
5728         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5729         * valarith.c: Remove _initialize_valarith prototype.
5730         * valops.c: Remove _initialize_valops prototype.
5731         * valprint.c: Remove _initialize_valprint prototype.
5732         * value.c: Remove _initialize_values prototype.
5733         * varobj.c: Remove _initialize_varobj prototype.
5734         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5735         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5736         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5737         * windows-nat.c: Remove _initialize_windows_nat,
5738         _initialize_check_for_gdb_ini, and _initialize_loadable
5739         prototypes.
5740         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5741         * xcoffread.c: Remove _initialize_xcoffread prototype.
5742         * xml-support.c: Remove _initialize_xml_support prototype.
5743         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5744         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5745         prototype.
5746         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5747         prototype.
5748         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5749
5750 2017-09-08  Keith Seitz  <keiths@redhat.com>
5751
5752         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5753         field.
5754
5755 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
5756
5757         * f-valprint.c (f_val_print): Remove check for one byte
5758         sized integers. Remove printing of character type.
5759
5760 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
5761             Christoph Weinmann  <christoph.t.weinmann@intel.com>
5762             Bernhard Heckel  <bernhard.heckel@intel.com>
5763
5764         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5765         to maintain proper indentation when printing pointers/refs.
5766
5767 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5768
5769         GDB 8.0.1 released.
5770
5771 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5772
5773         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
5774
5775 2017-09-05  Tom Tromey  <tom@tromey.com>
5776
5777         * parse.c (funcall_chain): Now a std::vector.
5778         (start_arglist, end_arglist): Simplify.
5779         (free_funcalls): Remove.
5780         (parse_exp_in_context_1): Remove cleanup.
5781
5782 2017-09-05  Tom Tromey  <tom@tromey.com>
5783
5784         * go-exp.y (go_parse): Don't create a cleanup.
5785
5786 2017-09-05  Tom Tromey  <tom@tromey.com>
5787
5788         * d-exp.y (PrimaryExpression): Use std::string.
5789         (d_parse): Don't create a cleanup.
5790
5791 2017-09-05  Tom Tromey  <tom@tromey.com>
5792
5793         * utils.c (do_clear_parser_state): Remove.
5794         (make_cleanup_clear_parser_state): Remove.
5795         * p-exp.y (pascal_parse): Use scoped_restore.
5796         * m2-exp.y (m2_parse): Use scoped_restore.
5797         * f-exp.y (f_parse): Use scoped_restore.
5798         * d-exp.y (d_parse): Use scoped_restore.
5799         * c-exp.y (c_parse): Use scoped_restore.
5800         * ada-exp.y (ada_parse): Use scoped_restore.
5801         * utils.h (make_cleanup_clear_parser_state): Remove.
5802
5803 2017-09-06  Keith Seitz  <keiths@redhat.com>
5804
5805         * dwarf2read.c (dw2_linkage_name_attr): New function.
5806         (dw2_linkage_name): New function.
5807         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
5808         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
5809         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
5810
5811 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5812
5813         * config/djgpp/djconfig.sh: Correct shell portability issue.
5814
5815 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5816
5817         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
5818
5819 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5820
5821         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
5822         * NEWS: Mention new FreeBSD/mips native configuration.
5823         * configure.host: Add aarch64*-*-freebsd*.
5824         * configure.nat: Likewise.
5825         * aarch64-fbsd-nat.c: New file.
5826
5827 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5828
5829         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
5830         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
5831         * NEWS: Mention new FreeBSD/aarch64 target.
5832         * configure.tgt: Add aarch64*-*-freebsd*.
5833         * aarch64-fbsd-tdep.c: New file.
5834         * aarch64-fbsd-tdep.h: New file.
5835
5836 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5837
5838         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
5839
5840 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
5841
5842         * parse.c (find_minsym_type_and_address): Don't relocate addresses
5843         of TLS symbols.
5844
5845 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5846
5847         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
5848         call.
5849
5850 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5851
5852         * infrun.c (follow_exec): Call add_thread after
5853         target_find_description.
5854
5855 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5856
5857         * infrun.c (handle_inferior_event_1): When exec'ing, read
5858         stop_pc after follow_exec.
5859
5860 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5861
5862         * remote.c (process_g_packet): Update error message.
5863
5864 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5865
5866         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
5867         targets.
5868
5869 2017-09-05  Pedro Alves  <palves@redhat.com>
5870
5871         * eval.c (eval_call, evaluate_funcall): New functions, factored
5872         out from ...
5873         (evaluate_subexp_standard): ... this.
5874
5875 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5876
5877         * amd64-tdep.c (amd64_target_description): Create target
5878         descriptions.
5879         (_initialize_amd64_tdep): Don't call functions
5880         initialize_tdesc_amd64_*.  Add self tests.
5881         * arch/amd64.c (amd64_create_target_description): Add parameter
5882         is_linux.  Call set_tdesc_osabi if is_linux is true.
5883         * arch/amd64.h (amd64_create_target_description): Update the
5884         declaration.
5885         * arch/i386.c (i386_create_target_description): Add parameter
5886         is_linux.  Call set_tdesc_osabi if is_linux is true.
5887         * arch/i386.h (i386_create_target_description): Update
5888         declaration.
5889         * configure.tgt: Add i386.o to gdb_target_obs.
5890         * features/Makefile (XMLTOC): Remove i386/*.xml.
5891         * features/i386/amd64-avx-avx512.c: Remove.
5892         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
5893         * features/i386/amd64-avx-mpx.c: Remove.
5894         * features/i386/amd64-avx.c: Remove.
5895         * features/i386/amd64-mpx.c: Remove.
5896         * features/i386/amd64.c: Remove.
5897         * features/i386/i386-avx-avx512.c: Remove.
5898         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
5899         * features/i386/i386-avx-mpx.c: Remove.
5900         * features/i386/i386-avx.c: Remove.
5901         * features/i386/i386-mmx.c: Remove.
5902         * features/i386/i386-mpx.c: Remove.
5903         * features/i386/i386.c: Remove.
5904         * i386-tdep.c: Don't include features/i386/i386*.c., include
5905         target-descriptions.h and arch/i386.h.
5906         (i386_target_description): Create target descriptions.
5907         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
5908         functions.  Do self tests.
5909
5910 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5911
5912         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
5913         * features/i386/amd64-avx-avx512-linux.c: Removed.
5914         * features/i386/amd64-avx-linux.c: Removed.
5915         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
5916         * features/i386/amd64-avx-mpx-linux.c: Removed.
5917         * features/i386/amd64-linux.c: Removed.
5918         * features/i386/amd64-mpx-linux.c: Removed.
5919         * features/i386/x32-avx-avx512-linux.c: Removed.
5920         * features/i386/x32-avx-linux.c: Removed.
5921         * features/i386/x32-linux.c: Removed.
5922
5923 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5924
5925         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
5926         features/i386/*.c.
5927         (amd64_linux_read_description): Call
5928         amd64_create_target_description.
5929         * arch/amd64.c: New file.
5930         * arch/amd64.h: New file.
5931         * configure.tgt (x86_64-*-linux*): Append amd64.o.
5932         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
5933
5934 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5935
5936         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
5937         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
5938         (amd64_linux_read_description): Create target descriptions.
5939         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
5940         functions.  Add unit tests.
5941         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
5942         x32-core.xml.
5943         * features/i386/64bit-avx.c: Generated.
5944         * features/i386/64bit-avx512.c: Generated.
5945         * features/i386/64bit-core.c: Generated.
5946         * features/i386/64bit-linux.c: Generated.
5947         * features/i386/64bit-mpx.c: Generated.
5948         * features/i386/64bit-pkeys.c: Generated.
5949         * features/i386/64bit-segments.c: Generated.
5950         * features/i386/64bit-sse.c: Generated.
5951         * features/i386/x32-core.c: Generated.
5952         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
5953         c files for amd64-linux and x32-linux.
5954
5955 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5956
5957         * amd64-linux-tdep.c (amd64_linux_read_description): New
5958         function.
5959         (amd64_linux_core_read_description): Call
5960         amd64_linux_read_description.
5961         (amd64_linux_init_abi): Likewise.
5962         (amd64_x32_linux_init_abi): Likewise.
5963         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
5964         * x86-linux-nat.c (x86_linux_read_description): Call
5965         amd64_linux_read_description.
5966
5967 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5968
5969         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
5970         comments.
5971
5972 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5973
5974         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
5975         * features/i386/i386-avx-avx512-linux.c: Remove.
5976         * features/i386/i386-avx-linux.c: Remove.
5977         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
5978         * features/i386/i386-avx-mpx-linux.c: Remove.
5979         * features/i386/i386-linux.c: Remove.
5980         * features/i386/i386-mmx-linux.c: Remove.
5981         * features/i386/i386-mpx-linux.c: Remove.
5982
5983 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5984
5985         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
5986         (SFILES): Add arch/i386.c.
5987         (HFILES_NO_SRCDIR): Add arch/i386.h.
5988         * arch/i386.c: New file.
5989         * arch/i386.h: New file.
5990         * arch/tdesc.h (allocate_target_description): Declare.
5991         (set_tdesc_architecture): Declare.
5992         (set_tdesc_osabi): Declare.
5993         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
5994         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
5995         include arch/i386.h.
5996         (i386_linux_read_description): Remove code and call
5997         i386_create_target_description.
5998         (set_tdesc_architecture): New function.
5999         (set_tdesc_osabi): New function.
6000         * target-descriptions.h (allocate_target_description): Remove.
6001
6002 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6003
6004         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6005         * target-descriptions.c (tdesc_create_feature): Likewise, and
6006         adjust code.
6007         * features/i386/32bit-avx.c: Re-generated.
6008         * features/i386/32bit-avx512.c: Re-generated.
6009         * features/i386/32bit-core.c: Re-generated.
6010         * features/i386/32bit-linux.c: Re-generated.
6011         * features/i386/32bit-mpx.c: Re-generated.
6012         * features/i386/32bit-pkeys.c: Re-generated.
6013         * features/i386/32bit-sse.c: Re-generated.
6014
6015 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6016
6017         * regformats/regdef.h (struct reg): Override operator == and !=.
6018
6019 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6020
6021         * arch/tdesc.h: New file.
6022         * regformats/regdat.sh: Generate code using tdesc_create_reg.
6023         * target-descriptions.c: Update comments.
6024         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
6025         declarations.
6026         * features/i386/32bit-avx.c: Re-generated.
6027         * features/i386/32bit-avx512.c: Re-generated.
6028         * features/i386/32bit-core.c: Re-generated.
6029         * features/i386/32bit-linux.c: Re-generated.
6030         * features/i386/32bit-mpx.c: Re-generated.
6031         * features/i386/32bit-pkeys.c: Re-generated.
6032         * features/i386/32bit-sse.c: Re-generated.
6033
6034 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6035
6036         * regformats/regdat.sh: Update generated code.
6037
6038 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6039
6040         * regformats/regdat.sh: Adjust code order.
6041
6042 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6043
6044         * expprint.c (dump_subexp_body_standard): Use constant format
6045         string in fprintf_filtered call.
6046
6047 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6048
6049         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6050         NetBSD/i386.
6051         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6052
6053 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6054
6055         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6056
6057 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6058
6059         * bsd-kvm.o: Define _KMEMUSER.
6060         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6061         * configure: Regenerate.
6062
6063 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6064
6065         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6066         * i386-fbsd-nat.c: Likewise.
6067
6068 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6069
6070         * unittests/array-view-selftests.c: Add include of <array>.
6071
6072 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6073
6074         * spu-tdep.c (flush_ea_cache): Add missing argument to
6075         call_function_by_hand.
6076
6077 2017-09-04  Pedro Alves  <palves@redhat.com>
6078
6079         * NEWS (Safer support for debugging with no debug info): New.
6080
6081 2017-09-04  Pedro Alves  <palves@redhat.com>
6082
6083         * c-exp.y (function_method, function_method_void): Add current
6084         instance flags to TYPE_INSTANCE.
6085         * dwarf2read.c (check_modifier): New.
6086         (compute_delayed_physnames): Assert that only C++ adds delayed
6087         physnames.  Mark fn_fields as const/volatile depending on
6088         physname.
6089         * eval.c (make_params): New type_instance_flags parameter.  Use
6090         it as the new type's instance flags.
6091         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6092         flags element and pass it to make_params.
6093         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6094         instance flags element.
6095         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6096         * gdbtypes.h: Include "enum-flags.h".
6097         (type_instance_flags): New enum-flags type.
6098         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6099         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6100         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6101         (follow_type_instance_flags): New function.
6102         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6103         * parser-defs.h (follow_type_instance_flags): Declare.
6104         * valops.c (value_struct_elt_for_reference): const/volatile must
6105         match too.
6106
6107 2017-09-04  Pedro Alves  <palves@redhat.com>
6108
6109         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6110         function/method scopes; lookup the nested name as a function local
6111         static variable.
6112
6113 2017-09-04  Pedro Alves  <palves@redhat.com>
6114
6115         (%type <voidval>): Add function_method.
6116         * c-exp.y (exp): New production for calls with no arguments.
6117         (function_method, function_method_void_or_typelist): New
6118         productions.
6119         (exp): New production for "method()::static_var".
6120         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6121         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6122         Handle OP_FUNC_STATIC_VAR.
6123         * parse.c (operator_length_standard):
6124         Handle OP_FUNC_STATIC_VAR.
6125
6126 2017-09-04  Pedro Alves  <palves@redhat.com>
6127
6128         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6129         handling.
6130         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6131         Ditto.
6132         * parse.c (operator_length_standard, operator_check_standard):
6133         Ditto.
6134         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6135
6136 2017-09-04  Pedro Alves  <palves@redhat.com>
6137
6138         * ax-gdb.c: Include "typeprint.h".
6139         (gen_expr_for_cast): New function.
6140         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6141         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6142         type is unknown.
6143         * dwarf2read.c (new_symbol_full): Fallback to int instead of
6144         nodebug_data_symbol.
6145         * eval.c: Include "typeprint.h".
6146         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6147         Error out if symbol has unknown type.
6148         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6149         evaluate_subexp_for_cast.
6150         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6151         OP_VAR_MSYM_VALUE.
6152         (evaluate_subexp_for_cast): New function.
6153         * gdbtypes.c (init_nodebug_var_type): New function.
6154         (objfile_type): Use it to initialize types of variables with no
6155         debug info.
6156         * typeprint.c (error_unknown_type): New.
6157         * typeprint.h (error_unknown_type): New declaration.
6158         * compile/compile-c-types.c (convert_type_basic): Handle
6159         TYPE_CODE_ERROR; warn and fallback to int for variables with
6160         unknown type.
6161
6162 2017-09-04  Pedro Alves  <palves@redhat.com>
6163
6164         * eval.c (evaluate_var_value): New function, factored out from ...
6165         (evaluate_subexp_standard): ... here.
6166
6167 2017-09-04  Pedro Alves  <palves@redhat.com>
6168
6169         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6170         Remove useless assignments to 'op'.
6171
6172 2017-09-04  Pedro Alves  <palves@redhat.com>
6173
6174         * eval.c (eval_skip_value): New function.
6175         (evaluate_subexp_standard): Use it.
6176
6177 2017-09-04  Pedro Alves  <palves@redhat.com>
6178
6179         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6180         function name from symbol/minsym and pass it to
6181         error_call_unknown_return_type.
6182
6183 2017-09-04  Pedro Alves  <palves@redhat.com>
6184
6185         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6186         * ax-gdb.c (gen_msym_var_ref): New function.
6187         (gen_expr): Handle OP_VAR_MSYM_VALUE.
6188         * eval.c (evaluate_var_msym_value): New function.
6189         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6190         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6191         to call_function_by_hand.
6192         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6193         Handle OP_VAR_MSYM_VALUE.
6194         (union exp_element) <msymbol>: New field.
6195         * minsyms.h (struct type): Forward declare.
6196         (find_minsym_type_and_address): Declare.
6197         * parse.c (write_exp_elt_msym): New function.
6198         (write_exp_msymbol): Delete, refactored as ...
6199         (find_minsym_type_and_address): ... this new function.
6200         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6201         (operator_length_standard, operator_check_standard): Handle
6202         OP_VAR_MSYM_VALUE.
6203         * std-operator.def (OP_VAR_MSYM_VALUE): New.
6204
6205 2017-09-04  Pedro Alves  <palves@redhat.com>
6206
6207         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6208         TYPE_GNU_IFUNC specially here.  Throw error if return type is
6209         unknown.
6210         * ada-typeprint.c (print_func_type): Handle functions with unknown
6211         return type.
6212         * c-typeprint.c (c_type_print_base): Handle functions and methods
6213         with unknown return type.
6214         * compile/compile-c-symbols.c (convert_symbol_bmsym)
6215         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6216         * compile/compile-c-types.c: Include "objfiles.h".
6217         (convert_func): For functions with unknown return type, warn and
6218         default to int.
6219         * compile/compile-object-run.c (compile_object_run): Adjust call
6220         to call_function_by_hand_dummy.
6221         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6222         call_function_by_hand.
6223         * eval.c (evaluate_subexp_standard): Adjust calls to
6224         call_function_by_hand.  Handle functions and methods with unknown
6225         return type.  Pass expect_type to call_function_by_hand.
6226         * f-typeprint.c (f_type_print_base): Handle functions with unknown
6227         return type.
6228         * gcore.c (call_target_sbrk): Adjust call to
6229         call_function_by_hand.
6230         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6231         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
6232         an integer address type instead of nodebug.
6233         * guile/scm-value.c (gdbscm_value_call): Adjust call to
6234         call_function_by_hand.
6235         * infcall.c (error_call_unknown_return_type): New function.
6236         (call_function_by_hand): New "default_return_type" parameter.
6237         Pass it down.
6238         (call_function_by_hand_dummy): New "default_return_type"
6239         parameter.  Use it instead of defaulting to int.  If there's no
6240         default and the return type is unknown, throw an error.  If
6241         there's a default return type, and the called function has no
6242         debug info, then assume the function is prototyped.
6243         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6244         New "default_return_type" parameter.
6245         (error_call_unknown_return_type): New declaration.
6246         * linux-fork.c (call_lseek): Cast return type of lseek.
6247         (inferior_call_waitpid, checkpoint_command): Adjust calls to
6248         call_function_by_hand.
6249         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6250         calls to call_function_by_hand.
6251         * m2-typeprint.c (m2_procedure): Handle functions with unknown
6252         return type.
6253         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6254         (value_nsstring, print_object_command): Adjust calls to
6255         call_function_by_hand.
6256         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6257         functions with unknown return type.
6258         (pascal_type_print_func_varspec_suffix): New function.
6259         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6260         TYPE_CODE_METHOD>: Use it.
6261         * python/py-value.c (valpy_call): Adjust call to
6262         call_function_by_hand.
6263         * rust-lang.c (rust_evaluate_funcall): Adjust call to
6264         call_function_by_hand.
6265         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6266         call_function_by_hand.
6267         * valops.c (value_allocate_space_in_inferior): Adjust call to
6268         call_function_by_hand.
6269         * typeprint.c (type_print_unknown_return_type): New function.
6270         * typeprint.h (type_print_unknown_return_type): New declaration.
6271
6272 2017-09-04  Pedro Alves  <palves@redhat.com>
6273
6274         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6275         types with more than one parameter as prototyped.
6276
6277 2017-09-04  Pedro Alves  <palves@redhat.com>
6278
6279         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6280         (disassemble_command): Use gdb_disassembly_flags instead of bare
6281         int.
6282         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6283         (dump_insns, do_mixed_source_and_assembly_deprecated)
6284         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6285         Use gdb_disassembly_flags instead of bare int.
6286         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6287         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6288         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6289         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
6290         (enum gdb_disassembly_flag): ... values of this new enumeration.
6291         (gdb_disassembly_flags): Define.
6292         (gdb_disassembly)
6293         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6294         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6295         gdb_disassembly_flags instead of bare int.
6296         * record-btrace.c (btrace_insn_history)
6297         (record_btrace_insn_history, record_btrace_insn_history_range)
6298         (record_btrace_insn_history_from): Use gdb_disassembly_flags
6299         instead of bare int.
6300         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6301         Use gdb_disassembly_flags instead of bare int.
6302         * target-debug.h (target_debug_print_gdb_disassembly_flags):
6303         Define.
6304         * target-delegates.c: Regenerate.
6305         * target.c (target_insn_history, target_insn_history_from)
6306         (target_insn_history_range): Use gdb_disassembly_flags instead of
6307         bare int.
6308         * target.h: Include "disasm.h".
6309         (struct target_ops) <to_insn_history, to_insn_history_from,
6310         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6311         int.
6312         (target_insn_history, target_insn_history_from)
6313         (target_insn_history_range): Use gdb_disassembly_flags instead of
6314         bare int.
6315
6316 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6317
6318         * cli/cli-script.c (build_command_line): For if/while commands,
6319         check whether args is empty.
6320
6321 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6322
6323         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6324         (enum command_control_type): Likewise.
6325         (struct command_line): Likewise.
6326         (free_command_lines): Likewise.
6327         (struct command_lines_deleter): Likewise.
6328         (command_line_up): Likewise.
6329         (read_command_lines): Likewise.
6330         (read_command_lines_1): Likewise.
6331         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6332         (enum command_control_type): Likewise.
6333         (struct command_line): Likewise.
6334         (free_command_lines): Likewise.
6335         (struct command_lines_deleter): Likewise.
6336         (command_line_up): Likewise.
6337         (read_command_lines): Likewise.
6338         (read_command_lines_1): Likewise.
6339         * breakpoint.h: Include cli/cli-script.h.
6340         * extension-priv.h: Likewise.
6341         * gdbcmd.h: Likewise.
6342
6343 2017-09-04  Pedro Alves  <palves@redhat.com>
6344
6345         * ada-lang.c (is_known_support_routine): Move sal declaration to
6346         where it is initialized.
6347         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6348         (parse_breakpoint_sals, decode_static_tracepoint_spec)
6349         (clear_command, update_static_tracepoint): Remove init_sal
6350         references.  Move declarations closer to initializations.
6351         * cli/cli-cmds.c (list_command): Move sal declarations closer to
6352         initializations.
6353         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6354         references.  Move sal declarations closer to initializations.
6355         * frame.c (find_frame_sal): Return a symtab_and_line via function
6356         return instead of output parameter.  Remove init_sal references.
6357         * frame.h (find_frame_sal): Return a symtab_and_line via function
6358         return instead of output parameter.
6359         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6360         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6361         instead of memset.
6362         (gdbscm_find_pc_line): Remove init_sal reference.
6363         * infcall.c (call_function_by_hand_dummy): Remove init_sal
6364         references.  Move declarations closer to initializations.
6365         * infcmd.c (set_step_frame): Update.  Move declarations closer to
6366         initializations.
6367         (finish_backward): Remove init_sal references.  Move declarations
6368         closer to initializations.
6369         * infrun.c (process_event_stop_test, handle_step_into_function)
6370         (insert_hp_step_resume_breakpoint_at_frame)
6371         (insert_step_resume_breakpoint_at_caller): Likewise.
6372         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6373         (symbol_to_sal): Likewise.
6374         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6375         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6376         to its initialization.
6377         * reverse.c (save_bookmark_command): Use new/delete.  Remove
6378         init_sal references.  Move declarations closer to initializations.
6379         * source.c (get_current_source_symtab_and_line): Remove brace
6380         initialization.
6381         (set_current_source_symtab_and_line): Now takes the sal by const
6382         reference.  Remove brace initialization.
6383         (line_info): Remove init_sal reference.
6384         * source.h (set_current_source_symtab_and_line): Now takes a
6385         symtab_and_line via const reference.
6386         * stack.c (set_current_sal_from_frame): Adjust.
6387         (print_frame_info): Adjust.
6388         (get_last_displayed_sal): Return the sal via function return
6389         instead of via output parameter.  Simplify.
6390         (frame_info): Adjust.
6391         * stack.h (get_last_displayed_sal): Return the sal via function
6392         return instead of via output parameter.
6393         * symtab.c (init_sal): Delete.
6394         (find_pc_sect_line): Remove init_sal references.  Move
6395         declarations closer to initializations.
6396         (find_function_start_sal): Remove init_sal references.  Move
6397         declarations closer to initializations.
6398         * symtab.h (struct symtab_and_line): In-class initialize all
6399         fields.
6400         * tracepoint.c (set_traceframe_context)
6401         (print_one_static_tracepoint_marker): Remove init_sal references.
6402         Move declarations closer to initializations.
6403         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6404         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
6405         declarations closer to initializations.
6406         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6407         init_sal references.  Adjust.
6408
6409 2017-09-04  Pedro Alves  <palves@redhat.com>
6410
6411         * ax-gdb.c (agent_command_1): Use range-for.
6412         * break-catch-throw.c (re_set_exception_catchpoint): Update.
6413         * breakpoint.c: Include "common/array-view.h".
6414         (init_breakpoint_sal, create_breakpoint_sal): Change sals
6415         parameter from struct symtabs_and_lines to
6416         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
6417         (breakpoint_sals_to_pc): Change sals parameter from struct
6418         symtabs_and_lines to std::vector reference.
6419         (check_fast_tracepoint_sals): Change sals parameter from struct
6420         symtabs_and_lines to std::array_view.  Use range-for.
6421         (decode_static_tracepoint_spec): Return a std::vector instead of
6422         symtabs_and_lines.  Update.
6423         (create_breakpoint): Update.
6424         (break_range_command, until_break_command, clear_command): Update.
6425         (base_breakpoint_decode_location, bkpt_decode_location)
6426         (bkpt_probe_create_sals_from_location)
6427         (bkpt_probe_decode_location, tracepoint_decode_location)
6428         (tracepoint_probe_decode_location)
6429         (strace_marker_create_sals_from_location): Return a std::vector
6430         instead of symtabs_and_lines.
6431         (strace_marker_create_breakpoints_sal): Update.
6432         (strace_marker_decode_location): Return a std::vector instead of
6433         symtabs_and_lines.  Update.
6434         (update_breakpoint_locations): Change struct symtabs_and_lines
6435         parameters to gdb::array_view.  Adjust.
6436         (location_to_sals): Return a std::vector instead of
6437         symtabs_and_lines.  Update.
6438         (breakpoint_re_set_default): Use std::vector instead of struct
6439         symtabs_and_lines.
6440         (decode_location_default): Return a std::vector instead of
6441         symtabs_and_lines.  Update.
6442         * breakpoint.h: Include "common/array-view.h".
6443         (struct breakpoint_ops) <decode_location>: Now returns a
6444         std::vector instead of returning a symtabs_and_lines via output
6445         parameter.
6446         (update_breakpoint_locations): Change sals parameters to use
6447         gdb::array_view.
6448         * cli/cli-cmds.c (edit_command, list_command): Update to use
6449         std::vector and gdb::array_view.
6450         (ambiguous_line_spec): Adjust to use gdb::array_view and
6451         range-for.
6452         (compare_symtabs): Rename to ...
6453         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
6454         const reference and adjust.
6455         (filter_sals): Rewrite using std::vector and standard algorithms.
6456         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6457         (jump_command): Update to use std::vector.
6458         * linespec.c (struct linespec_state) <canonical_names>: Update
6459         comment.
6460         (add_sal_to_sals_basic): Delete.
6461         (add_sal_to_sals, filter_results, convert_results_to_lsals)
6462         (decode_line_2, create_sals_line_offset)
6463         (convert_address_location_to_sals, convert_linespec_to_sals)
6464         (convert_explicit_location_to_sals, parse_linespec)
6465         (event_location_to_sals, decode_line_full, decode_line_1)
6466         (decode_line_with_current_source)
6467         (decode_line_with_last_displayed, decode_objc)
6468         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6469         (linespec_result::~linespec_result): Adjust to use std::vector
6470         instead of symtabs_and_lines.
6471         * linespec.h (linespec_sals::sals): Now a std::vector.
6472         (struct linespec_result): Use std::vector, bool, and in-class
6473         initialization.
6474         (decode_line_1, decode_line_with_current_source)
6475         (decode_line_with_last_displayed): Return std::vector.
6476         * macrocmd.c (info_macros_command): Use std::vector.
6477         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6478         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6479         std::vector.
6480         * probe.h (parse_probes): Return a std::vector.
6481         * python/python.c (gdbpy_decode_line): Use std::vector and
6482         gdb::array_view.
6483         * source.c (select_source_symtab, line_info): Use std::vector.
6484         * stack.c (func_command): Use std::vector.
6485         * symtab.h (struct symtabs_and_lines): Delete.
6486         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6487
6488 2017-09-04  Pedro Alves  <palves@redhat.com>
6489
6490         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6491         unittests/array-view-selftests.c.
6492         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6493         * common/array-view.h: New file.
6494         * unittests/array-view-selftests.c: New file.
6495
6496 2017-09-04  Pedro Alves  <palves@redhat.com>
6497
6498         * cli/cli-cmds.c (edit_command): Pass message to
6499         ambiguous_line_spec.
6500         (list_command): Pass message to ambiguous_line_spec.  Say
6501         "first"/"last" instead of "start" and "end" to be consistent with
6502         the manual.
6503         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
6504         them to print formatted message.
6505
6506 2017-09-04  Pedro Alves  <palves@redhat.com>
6507
6508         * btrace.c (ftrace_add_pt): Pass btrace_insn to
6509         ftrace_update_insns by reference instead of pointer.
6510
6511 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6512
6513         * i386-go32-tdep.c: Include x86-xstate.h.
6514         (i386_go32_init_abi): Call i386_target_description.
6515         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6516         if xcr0 is X86_XSTATE_X87_MASK.
6517         * i386-tdep.h (tdesc_i386): Remove the declaration.
6518         (tdesc_i386_mmx): Likewise.
6519
6520 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6521
6522         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6523         X86_XSTATE_SSE_MASK instead of 0.
6524
6525 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6526
6527         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6528         i386_target_description.
6529         * i386-fbsd-nat.c (i386fbsd_read_description): Call
6530         i386_target_description.
6531         * i386-tdep.c (i386_gdbarch_init): Likewise.
6532
6533 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6534
6535         * amd64-darwin-tdep.c: Include "x86-xstate.h".
6536         (x86_darwin_init_abi_64): Call amd64_target_description.
6537         * amd64-dicos-tdep.c: Likewise.
6538         * amd64-fbsd-nat.c: Likewise.
6539         * amd64-fbsd-tdep.c: Likewise.
6540         * amd64-nbsd-tdep.c: Likewise.
6541         * amd64-obsd-tdep.c: Likewise.
6542         * amd64-sol2-tdep.c: Likewise.
6543         * amd64-windows-tdep.c: Likewise.
6544         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6545
6546 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6547
6548         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6549         (btrace_function) <insn>: Change type to use std::vector.
6550         * btrace.c (ftrace_debug, ftrace_call_num_insn,
6551         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6552         ftrace_update_insns, ftrace_compute_global_level_offset,
6553         btrace_stitch_bts, btrace_clear, btrace_insn_get,
6554         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6555         change to std::vector.
6556         (ftrace_update_insns): Adjust to change to std::vector, change
6557         type of INSN parameter.
6558         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6559         * record-btrace.c (btrace_call_history_insn_range,
6560         btrace_compute_src_line_range,
6561         record_btrace_frame_prev_register): Adjust to change to
6562         std::vector.
6563         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6564         to change to std::vector.
6565
6566 2017-09-03  Tom Tromey  <tom@tromey.com>
6567
6568         * corefile.c (reopen_exec_file): Use std::string.
6569
6570 2017-09-03  Tom Tromey  <tom@tromey.com>
6571
6572         * compile/compile.c (compile_register_name_mangled): Return
6573         std::string.
6574         * compile/compile-loc2c.c (pushf_register_address): Update.
6575         (pushf_register): Update.
6576         * compile/compile-c-types.c (convert_array): Update.
6577         * compile/compile-c-symbols.c (generate_vla_size): Update.
6578         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6579         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6580         (convert_one_symbol): Update.
6581         (generate_c_for_for_one_variable): Update.
6582         * compile/compile-c-support.c (c_get_range_decl_name): Return a
6583         std::string.
6584         (generate_register_struct): Update.
6585         * compile/compile-internal.h (c_get_range_decl_name): Return a
6586         std::string.
6587         (compile_register_name_mangled): Return std::string.
6588
6589 2017-09-03  Tom Tromey  <tom@tromey.com>
6590
6591         * utils.c (perror_string): Return a std::string.
6592         (throw_perror_with_name, perror_warning_with_name): Update.
6593
6594 2017-09-03  Tom Tromey  <tom@tromey.com>
6595
6596         * demangle.c (demangle_command): Use std::string,
6597         unique_xmalloc_ptr.
6598
6599 2017-09-03  Tom Tromey  <tom@tromey.com>
6600
6601         * cli/cli-setshow.c (do_set_command): Use std::string.
6602
6603 2017-09-03  Tom Tromey  <tom@tromey.com>
6604
6605         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6606
6607 2017-09-03  Tom Tromey  <tom@tromey.com>
6608
6609         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6610
6611 2017-09-03  Tom Tromey  <tom@tromey.com>
6612
6613         * mi/mi-cmd-env.c (env_execute_cli_command): Use
6614         gdb::unique_xmalloc_ptr.
6615
6616 2017-09-03  Tom Tromey  <tom@tromey.com>
6617
6618         * thread.c (print_thread_info_1): Use string_printf.
6619         (thread_apply_command, thread_apply_all_command): Use
6620         std::string.
6621
6622 2017-09-03  Tom Tromey  <tom@tromey.com>
6623
6624         * valprint.c (val_print_string): Update.
6625         * gdbcore.h (memory_error_message): Return std::string.
6626         * corefile.c (memory_error_message): Return std::string.
6627         (memory_error): Update.
6628         * breakpoint.c (insert_bp_location): Update.
6629
6630 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
6631
6632         * target/waitstatus.h (target_waitstatus_to_string): Change
6633         return type to std::string.
6634         * target/waitstatus.c (target_waitstatus_to_string): Return
6635         std::string.
6636         * target.h (target_waitstatus_to_string): Remove declaration.
6637         * infrun.c (resume, clear_proceed_status_thread,
6638         print_target_wait_results, do_target_wait, save_waitstatus,
6639         stop_all_threads): Adjust.
6640         * record-btrace.c (record_btrace_wait): Adjust.
6641         * target-debug.h
6642         (target_debug_print_struct_target_waitstatus_p): Adjust.
6643
6644 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6645
6646         PR gdb/22046
6647         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6648         detection.
6649
6650 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
6651
6652         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6653         for setting/unsetting environment variables on the remote target.
6654         (New remote packets): Add entries for QEnvironmentHexEncoded,
6655         QEnvironmentUnset and QEnvironmentReset.
6656         * common/environ.c (gdb_environ::operator=): Extend method to
6657         handle m_user_set_env_list and m_user_unset_env_list.
6658         (gdb_environ::clear): Likewise.
6659         (match_var_in_string): Change type of first parameter from 'char
6660         *' to 'const char *'.
6661         (gdb_environ::set): Extend method to handle
6662         m_user_set_env_list and m_user_unset_env_list.
6663         (gdb_environ::unset): Likewise.
6664         (gdb_environ::clear_user_set_env): New method.
6665         (gdb_environ::user_set_envp): Likewise.
6666         (gdb_environ::user_unset_envp): Likewise.
6667         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6668         m_user_unset_env_list on move constructor/assignment.
6669         (unset): Add new default parameter 'update_unset_list = true'.
6670         (clear_user_set_env): New method.
6671         (user_set_envp): Likewise.
6672         (user_unset_envp): Likewise.
6673         (m_user_set_env_list): New std::set.
6674         (m_user_unset_env_list): Likewise.
6675         * common/rsp-low.c (hex2str): New function.
6676         (bin2hex): New overload for bin2hex function.
6677         * common/rsp-low.c (hex2str): New prototype.
6678         (str2hex): New overload prototype.
6679         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6680         QEnvironmentUnset and QEnvironmentReset.
6681         (remote_protocol_features): Add QEnvironmentHexEncoded,
6682         QEnvironmentUnset and QEnvironmentReset packets.
6683         (send_environment_packet): New function.
6684         (extended_remote_environment_support): Likewise.
6685         (extended_remote_create_inferior): Call
6686         extended_remote_environment_support.
6687         (_initialize_remote): Add QEnvironmentHexEncoded,
6688         QEnvironmentUnset and QEnvironmentReset packet configs.
6689         * unittests/environ-selftests.c (gdb_selftest_env_var):
6690         New variable.
6691         (test_vector_initialization): New function.
6692         (test_init_from_host_environ): Likewise.
6693         (test_reinit_from_host_environ): Likewise.
6694         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6695         Likewise.
6696         (test_unset_set_empty_vector): Likewise.
6697         (test_vector_clear): Likewise.
6698         (test_std_move): Likewise.
6699         (test_move_constructor):
6700         (test_self_move): Likewise.
6701         (test_set_unset_reset): Likewise.
6702         (run_tests): Rewrite in terms of the functions above.
6703
6704 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
6705
6706         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6707         (adi_available): Use a temp variable of type CORE_ADDR as argument
6708         3 when calling target_auxv_search.
6709         (adi_normalize_address): Use masks and xor operators to calculate
6710         normalized address.
6711         (adi_read_versions, adi_write_versions, adi_print_versions)
6712         (do_examine, do_assign): Use paddress.
6713
6714 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
6715
6716         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6717         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6718         out of loop and add supply of FIR.
6719         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6720         add collect of FIR.
6721
6722 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
6723
6724         PR gdb/21827
6725         * cli/cli-script.c (define_command): Don't convert command name
6726         to lower case.
6727
6728 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
6729
6730         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6731         Update all callers accordingly. Remove all code blocks handling
6732         the case where DISPP is not NULL.
6733
6734 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6735
6736         PR symtab/22003
6737         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6738         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6739         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6740
6741 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6742
6743         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6744         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6745         (read_comp_units_from_section): New parameter abbrev_section, use
6746         read_and_check_comp_unit_head, allocate signatured_type if needed.
6747         (create_all_comp_units): Update read_comp_units_from_section caller.
6748
6749 2017-08-23  Pedro Alves  <palves@redhat.com>
6750
6751         PR remote/21852
6752         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6753         to null_ptid and switch to thread without reading the registers
6754         after adding the inferior.
6755
6756 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6757
6758         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6759         compile-gcc.
6760         * compile/compile.c (compile_gcc, show_compile_gcc): New.
6761         (compile_to_object): Implement compile_gcc.
6762         (_initialize_compile): Install "set compile-gcc".  Initialize
6763         compile_gcc.
6764
6765 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6766
6767         * compile/compile.c (compile_to_object): Conditionally call
6768         set_verbose.  Conditionally call compile or compile_v0.
6769
6770 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
6771
6772         * sparc64-tdep.h: (adi_normalize_address): New export.
6773         * sparc-nat.h: (open_adi_tag_fd): New export.
6774         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
6775         * sparc64-linux-tdep.c:
6776         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
6777         (sparc64_linux_handle_segmentation_fault): New function.
6778         (sparc64_linux_init_abi): Register
6779         sparc64_linux_handle_segmentation_fault
6780         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
6781         (sparc64_addr_bits_remove): New function.
6782         (sparc64_init_abi): Register sparc64_addr_bits_remove.
6783         (MAX_PROC_NAME_SIZE): New macro.
6784         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
6785         (sparc64adilist): New variable.
6786         (adi_proc_list): New variable.
6787         (find_adi_info): New function.
6788         (add_adi_info): New function.
6789         (get_adi_info_proc): New function.
6790         (get_adi_info): New function.
6791         (info_adi_command): New function.
6792         (read_maps_entry): New function.
6793         (adi_available): New function.
6794         (adi_normalize_address): New function.
6795         (adi_align_address): New function.
6796         (adi_convert_byte_count): New function.
6797         (adi_tag_fd): New function.
6798         (adi_is_addr_mapped): New function.
6799         (adi_read_versions): New function.
6800         (adi_write_versions): New function.
6801         (adi_print_versions): New function.
6802         (do_examine): New function.
6803         (do_assign): New function.
6804         (adi_examine_command): New function.
6805         (adi_assign_command): New function.
6806         (_initialize_sparc64_adi_tdep): New function.
6807
6808 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
6809
6810         * breakpoint.c (breakpoints_info): Rename to ...
6811         (info_breakpoints_command): ... this.
6812         (watchpoints_info): Rename to ...
6813         (info_watchpoints_command): ... this.
6814         (tracepoints_info): Rename to ...
6815         (info_tracepoints_command): ... this.
6816         (_initialize_breakpoint): Adjust.
6817         * dcache.c (dcache_info): Rename to ...
6818         (info_display_command): ... this.
6819         (_initialize_dcache): Adjust.
6820         * frame.h (args_info): Rename to ...
6821         (info_args_command): ... this.
6822         (locals_info): Rename to ...
6823         (info_locals_command): ... this.
6824         * infcmd.c (nofp_registers_info): Rename to ...
6825         (info_registers_command): ... this.
6826         (float_info): Rename to ...
6827         (info_float_command): ... this.
6828         (program_info): Rename to ...
6829         (info_program_command): ... this.
6830         (all_registers_info): Rename to ...
6831         (info_all_registers_command): ... this.
6832         (vector_info): Rename to ...
6833         (info_vector_command): ... this.
6834         (float_info): Rename to ...
6835         (info_float_command): ... this.
6836         (_initialize_infcmd): Adjust.
6837         * inferior.h (term_info): Rename to ...
6838         (info_terminal_command): ... this.
6839         * inflow.c (term_info): Rename to ...
6840         (info_terminal_command): ... this.
6841         (_initialize_inflow): Adjust.
6842         * infrun.c (signals_info): Rename to ...
6843         (info_signals_command): ... this.
6844         (_initialize_infrun): Adjust.
6845         * objc-lang.c (classes_info): Rename to ...
6846         (info_classes_command): ... this.
6847         (selectors_info): Rename to ...
6848         (info_selectors_command): ... this.
6849         (_initialize_objc_language): Adjust.
6850         * printcmd.c (sym_info): Rename to ...
6851         (info_symbol_command): ... this.
6852         (address_info): Rename to ...
6853         (info_address_command): ... this.
6854         (display_info): Rename to ...
6855         (info_display_command): ... this.
6856         (_initialize_printcmd): Adjust.
6857         * reverse.c (bookmarks_info): Rename to ...
6858         (info_breakpoints_command): ... this.
6859         (_initialize_reverse): Adjust.
6860         * ser-go32.c (dos_info): Rename to ...
6861         (info_serial_command): ... this.
6862         (_initialize_ser_dos): Adjust.
6863         * skip.c (skip_info): Rename to ...
6864         (info_skip_command): ... this.
6865         (_initialize_step_skip): Adjust.
6866         * source.c (line_info): Rename to ...
6867         (info_line_command): ... this.
6868         (source_info): Rename to ...
6869         (info_source_command)
6870         * stack.c (frame_info): Rename to ...
6871         (info_frame_command): ... this.
6872         (locals_info): Rename to ...
6873         (info_locals_command): ... this.
6874         (args_info): Rename to ...
6875         (info_args_command): ... this.
6876         (_initialize_stack): Adjust.
6877         * symtab.c (sources_info): Rename to ...
6878         (info_sources_command): ... this.
6879         (variables_info): Rename to ...
6880         (info_variables_command): ... this.
6881         (functions_info): Rename to ...
6882         (info_functions_command): ... this.
6883         (types_info): Rename to ...
6884         (info_types_command): ... this.
6885         (_initialize_symtab): Adjust.
6886         * target.c (target_info): Rename to ...
6887         (info_target_command): ... this.
6888         (initialize_targets): Adjust.
6889         * tracepoint.c (tvariables_info): Rename to ...
6890         (info_tvariables_command): ... this.
6891         (scope_info): Rename to ...
6892         (info_scope_command): ... this.
6893         (trace_dump_actions): Adjust.
6894         (_initialize_tracepoint): Adjust.
6895
6896 2017-08-22  Tom Tromey  <tom@tromey.com>
6897
6898         * breakpoint.h (install_breakpoint): Update.
6899         * breakpoint.c (add_solib_catchpoint): Update.
6900         (install_breakpoint): Change argument to a std::unique_ptr.
6901         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6902         (create_breakpoint_sal, create_breakpoint): Update.
6903         (watch_command_1, catch_exec_command_1)
6904         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6905         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6906         Return the breakpoint.
6907         (set_raw_breakpoint_without_location, set_raw_breakpoint)
6908         (new_single_step_breakpoint): Update.
6909         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
6910         std::unique_ptr.
6911         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6912         std::unique_ptr.
6913         * break-catch-sig.c (create_signal_catchpoint): Use
6914         std::unique_ptr.
6915         * ada-lang.c (create_ada_exception_catchpoint): Use
6916         std::unique_ptr.
6917
6918 2017-08-22  Tom Tromey  <tom@tromey.com>
6919
6920         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
6921
6922 2017-08-22  Tom Tromey  <tom@tromey.com>
6923
6924         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
6925         (lookup_partial_symbol): Update.
6926
6927 2017-08-22  Tom Tromey  <tom@tromey.com>
6928
6929         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
6930         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
6931         (find_and_open_source, symtab_to_fullname): Update.
6932         * psymtab.c (psymtab_to_fullname): Update.
6933
6934 2017-08-22  Tom Tromey  <tom@tromey.com>
6935
6936         * exec.c (exec_file_attach): Update.
6937         * linux-thread-db.c (try_thread_db_load): Update.
6938         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
6939         * utils.c (gdb_realpath): Change return type.
6940         (gdb_realpath_keepfile): Update.
6941         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
6942         (_initialize_utils): Register the new self test.
6943         * source.c (openp): Update.
6944         (find_and_open_source): Update.
6945         * nto-tdep.c (nto_find_and_open_solib): Update.
6946         * main.c (set_gdb_data_directory): Update.
6947         (captured_main_1): Update.
6948         * dwarf2read.c (dwarf2_get_dwz_file): Update
6949         (dw2_map_symbol_filenames): Update.
6950         * auto-load.c (auto_load_safe_path_vec_update): Update.
6951         (filename_is_in_auto_load_safe_path_vec): Change type of
6952         "filename_realp".
6953         (auto_load_objfile_script): Update.
6954         (file_is_auto_load_safe): Update.  Use std::string.
6955         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
6956
6957 2017-08-22  Tom Tromey  <tom@tromey.com>
6958
6959         * utils.c (gdb_realpath_keepfile): Return a
6960         gdb::unique_xmalloc_ptr.
6961         * exec.c (exec_file_attach): Update.
6962         * utils.h (gdb_realpath_keepfile): Return a
6963         gdb::unique_xmalloc_ptr.
6964
6965 2017-08-22  Tom Tromey  <tom@tromey.com>
6966
6967         * compile/compile.c (compile_file_command): Use
6968         gdb::unique_xmalloc_ptr, std::string.
6969         * utils.c (gdb_abspath): Change return type.
6970         * source.c (openp): Update.
6971         * objfiles.c (allocate_objfile): Update.
6972         * main.c (set_gdb_data_directory): Update.
6973         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
6974
6975 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
6976
6977         * cli-cmds.c (list_commands): List actual code around more than
6978         one location.
6979
6980 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
6981
6982         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
6983
6984 2017-08-21  Pedro Alves  <palves@redhat.com>
6985
6986         PR gdb/19487
6987         * c-exp.y (variable production): Handle function aliases.
6988         * minsyms.c (msymbol_is_text): New function.
6989         * minsyms.h (msymbol_is_text): Declare.
6990         * symtab.c (find_function_alias_target): New function.
6991         * symtab.h (find_function_alias_target): Declare.
6992
6993 2017-08-21  Pedro Alves  <palves@redhat.com>
6994
6995         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
6996         typedefs.
6997         * typeprint.c (whatis_exp): If handling "whatis", and expression
6998         is OP_TYPE, strip one typedef level.  Otherwise don't strip
6999         typedefs here.
7000         * valops.c (value_cast): Save "to" type before resolving
7001         stubs/typedefs.  Use that type as resulting value's type.
7002
7003 2017-08-18  Tom Tromey  <tom@tromey.com>
7004             Pedro Alves  <palves@redhat.com>
7005
7006         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7007         * sol-thread.c (sol_thread_resume, sol_thread_wait)
7008         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7009         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7010         * proc-service.c (ps_xfer_memory): Use scoped_restore.
7011         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7012         (linux_get_siginfo_data): Add "thread" argument.  Use
7013         scoped_restore.
7014         * linux-nat.c (linux_child_follow_fork)
7015         (check_stopped_by_watchpoint): Use scoped_restore.
7016         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7017         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7018         (restore_inferior_ptid, save_inferior_ptid): Remove.
7019         * btrace.c (btrace_fetch): Use scoped_restore.
7020         * bsd-uthread.c (bsd_uthread_fetch_registers)
7021         (bsd_uthread_store_registers): Use scoped_restore.
7022         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7023         scoped_restore.
7024         * aix-thread.c (aix_thread_resume, aix_thread_wait)
7025         (aix_thread_xfer_partial): Use scoped_restore.
7026         * inferior.h (save_inferior_ptid): Remove.
7027
7028 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7029
7030         PR tdep/21818
7031         * arm-tdep.c (gdb_print_insn_arm): Mark
7032         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7033
7034 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7035
7036         * NEWS: Mention GDBserver's new option "--selftest".
7037         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7038         * selftest.c: Move it to common/selftest.c.
7039         * selftest.h: Move it to common/selftest.h.
7040         * selftest-arch.c (reset): New function.
7041         (tests_with_arch): Call reset.
7042
7043 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7044
7045         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
7046         instead of exception_fprintf and printf_filtered.
7047
7048 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7049
7050         * selftest.c (register_self_test): Rename it to
7051         selftests::register_test.
7052         (run_self_tests): selftest::run_tests.
7053         * selftest.h: Update declarations.
7054         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7055         selftests::register_test_foreach_arch.
7056         * selftest-arch.h: Update declaration.
7057         * aarch64-tdep.c: Update.
7058         * arm-tdep.c: Likewise.
7059         * disasm-selftests.c: Likewise.
7060         * dwarf2loc.c: Likewise.
7061         * dwarf2-frame.c: Likewise.
7062         * findvar.c: Likewise.
7063         * gdbarch-selftests.c: Likewise.
7064         * maint.c (maintenance_selftest): Likewise.
7065         * regcache.c: Likewise.
7066         * rust-exp.y: Likewise.
7067         * selftest-arch.c: Likewise.
7068         * unittests/environ-selftests.c: Likewise.
7069         * unittests/function-view-selftests.c: Likewise.
7070         * unittests/offset-type-selftests.c: Likewise.
7071         * unittests/optional-selftests.c: Likewise.
7072         * unittests/scoped_restore-selftests.c: Likewise.
7073         * utils-selftests.c: Likewise.
7074
7075 2017-08-17  Pedro Alves  <palves@redhat.com>
7076
7077         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7078         local.
7079
7080 2017-08-17  Pedro Alves  <palves@redhat.com>
7081
7082         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7083         field.
7084         (reset_die_in_process): Delete, replaced by ...
7085         (process_die_scope): ... this new class.  Make it responsible for
7086         freeing cu->line_header too.
7087         (process_die): Use process_die_scope.
7088         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7089         cu->line_header_die_owner.  Don't release the line header if it's
7090         owned by the CU.
7091         (setup_type_unit_groups): Make the CU/DIE own the line header.
7092         Don't release the line header here.
7093
7094 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
7095
7096         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7097
7098 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7099
7100         * NEWS: Mention new shortcuts for nexti and stepi in TUI
7101         Single-Key mode
7102
7103 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7104
7105         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7106         mode command list.
7107
7108 2017-08-15  Stafford Horne  <shorne@gmail.com>
7109
7110         * MAINTAINERS (Write After Approval): Add Stafford Horne.
7111
7112 2017-08-15  Stafford Horne  <shorne@gmail.com>
7113
7114         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7115
7116 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
7117
7118         PR gdb/21954
7119         * infcmd.c (unset_environment_command): Use the 'clear' method on
7120         the environment instead of resetting it.
7121
7122 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
7123
7124         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7125         platforms.
7126
7127 2017-08-14  Tom Tromey  <tom@tromey.com>
7128
7129         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7130         (print_binary_chars): Likewise.
7131         (BITS_IN_BYTES): Remove.
7132
7133 2017-08-14  Tom Tromey  <tom@tromey.com>
7134
7135         PR gdb/21675
7136         * valprint.c (LOW_ZERO): Change value to 034.
7137         (print_octal_chars): Add static_asserts for octal constants.
7138         * printcmd.c (print_scalar_formatted): Add 'd' case.
7139
7140 2017-08-11  Tom Tromey  <tom@tromey.com>
7141
7142         * symfile.c (add_symbol_file_command): Use std::vector.
7143
7144 2017-08-14  Tom Tromey  <tom@tromey.com>
7145
7146         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7147         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7148         std::move.
7149         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7150
7151 2017-08-11  Pedro Alves  <palves@redhat.com>
7152
7153         * infrun.c (process_event_stop_test): Adjust
7154         function_name_is_marked_for_skip call.
7155         * skip.c: Include <list>.
7156         (skiplist_entry): Make it a class with private fields, and
7157         getters/setters.
7158         (skiplist_entry_chain): Delete.
7159         (skiplist_entries): New.
7160         (skiplist_entry_count): Delete.
7161         (highest_skiplist_entry_num): New.
7162         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7163         (add_skiplist_entry): Delete.
7164         (skiplist_entry::skiplist_entry): New.
7165         (skiplist_entry::add_entry): New.
7166         (skip_file_command, skip_function): Adjust.
7167         (compile_skip_regexp): Delete.
7168         (skip_command): Don't compile regexp here.  Adjust to use
7169         skiplist_entry::add_entry.
7170         (skip_info): Adjust to use range-for and getters.
7171         (skip_enable_command, skip_disable_command): Adjust to use
7172         range-for and setters.
7173         (skip_delete_command): Adjust to use std::list.
7174         (add_skiplist_entry): Delete.
7175         (skip_file_p): Delete, refactored as ...
7176         (skiplist_entry::do_skip_file_p): ... this new method.
7177         (skip_gfile_p): Delete, refactored as ...
7178         (skiplist_entry::do_gskip_file_p): ... this new method.
7179         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7180         (skiplist_entry::skip_function_p): ... this new method.
7181         (function_name_is_marked_for_skip): Now returns bool, and takes
7182         the function sal by const reference.  Adjust to use range-for and
7183         skiplist_entry methods.
7184         (_initialize_step_skip): Remove references to
7185         skiplist_entry_chain, skiplist_entry_count.
7186         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7187         takes the function sal by const reference.
7188
7189 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7190
7191         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7192         (dwarf2_frame_cache): Remove reset_cache_cleanup.
7193         (dwarf2_frame_cache):
7194         * frame-unwind.c (frame_unwind_try_unwinder): Catch
7195         RETURN_MASK_ALL and set *this_case to NULL.
7196         * frame-unwind.h: Update comments.
7197
7198 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7199
7200         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7201         (dwarf2_frame_state_copy_regs): Remove.
7202         (dwarf2_frame_state_free_regs): Remove.
7203         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7204         (dwarf2_restore_rule): Call method .alloc_regs instead of
7205         dwarf2_frame_state_alloc_regs.
7206         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
7207         constructor.  Call std::move.
7208         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7209         (dwarf2_frame_cache): Likewise.
7210
7211         [GDB_SELF_TEST]: Include selftest.h and
7212         selftest-arch.h.
7213         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7214         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7215         execute_cfa_program_test.
7216
7217         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7218         copy ctor, assignment operator, move assignment.
7219         <alloc_regs>: New method.
7220         <swap>: New method.
7221         (struct dwarf2_frame_state): Delete dtor.
7222         (dwarf2_frame_state_alloc_regs): Remove declaration.
7223         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7224         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7225
7226 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7227
7228         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7229         (dwarf2_frame_state::dwarf2_frame_state): New.
7230         (dwarf2_frame_state::~dwarf2_frame_state): New.
7231         (dwarf2_fetch_cfa_info): Update.
7232         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
7233         rather than a pointer.  Update code.
7234         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7235         dtor.
7236         <data_align, code_align, retaddr_column>: Change them to const.
7237         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7238         to bool.
7239
7240 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7241
7242         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7243         <loc.exp>: New field.
7244         * dwarf2-frame.c (execute_cfa_program): Update.
7245         (dwarf2_frame_prev_register): Update.
7246
7247 2017-08-10  Pedro Alves  <palves@redhat.com>
7248
7249         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7250
7251 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7252
7253         * fbsd-nat.c (struct fbsd_fork_info): Remove.
7254         (fbsd_pending_children): Use std::list.
7255         (fbsd_remember_child): Likewise.
7256         (fbsd_is_child_pending): Likewise.
7257         (fbsd_pending_vfork_done): Use std::forward_list.
7258         (fbsd_add_vfork_done): Likewise.
7259         (fbsd_is_vfork_done_pending): Likewise.
7260         (fbsd_next_vfork_done): Likewise.
7261
7262 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7263
7264         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7265         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7266         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7267         for `mapfilename'.
7268         (fbsd_xfer_partial): Use gdb::byte_vector.
7269         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7270
7271 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7272
7273         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7274         "filestuff.h".
7275         (fbsd_find_memory_regions): Fix `mapfile' initialization.
7276
7277 2017-08-09  Tom Tromey  <tom@tromey.com>
7278
7279         * skip.c (skiplist_entry): New constructor.
7280         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7281         (skiplist_entry::file_is_glob): Now bool.
7282         (skiplist_entry::file, skiplist_entry::function): Now
7283         std::string.
7284         (make_skip_entry): Return a unique_ptr.  Use new.
7285         (free_skiplist_entry, free_skiplist_entry_cleanup)
7286         (make_free_skiplist_entry_cleanup): Remove.
7287         (skip_command, skip_disable_command, add_skiplist_entry)
7288         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7289         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7290         (function_name_is_marked_for_skip): Update.
7291         (skip_delete_command): Update.  Use delete.
7292
7293 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
7294
7295         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7296         (aarch64_linux_core_read_description): New function.
7297         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7298
7299 2017-08-09  Pedro Alves  <palves@redhat.com>
7300
7301         * cp-name-parser.y (cp_comp_to_string): Return a
7302         gdb::unique_xmalloc_ptr<char>.
7303         * cp-support.c (replace_typedefs_qualified_name)
7304         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7305         (cp_canonicalize_string_full): Use op= instead of explicit
7306         convertion.
7307         (cp_class_name_from_physname, method_name_from_physname)
7308         (cp_func_name, cp_remove_params): Adjust to use
7309         gdb::unique_xmalloc_ptr<char>.
7310         * cp-support.h (cp_comp_to_string): Return a
7311         gdb::unique_xmalloc_ptr<char>.
7312         * python/py-type.c (typy_lookup_type): Adjust to use
7313         gdb::unique_xmalloc_ptr<char>.
7314
7315 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
7316
7317         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7318
7319 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
7320             Yao Qi  <yao.qi@linaro.org>
7321
7322         * cp-support.c (cp_canonicalize_string_full): Use
7323         gdb::unique_xmalloc_ptr<char>.
7324         (cp_canonicalize_string): Likewise.
7325
7326 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7327
7328         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7329         * regformats/i386/amd64-avx-avx512.dat: Remove.
7330         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7331         * regformats/i386/amd64-avx-mpx.dat:Remove.
7332         * regformats/i386/amd64-avx.dat: Remove.
7333         * regformats/i386/amd64-mpx.dat: Remove.
7334         * regformats/i386/i386-avx-avx512.dat: Remove.
7335         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7336         * regformats/i386/i386-avx-mpx.dat: Remove.
7337         * regformats/i386/i386-mmx.dat: Remove.
7338         * regformats/i386/i386-mpx.dat: Remove.
7339
7340 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7341
7342         * amd64-tdep.h (tdesc_x32): Remove the declaration.
7343         * amd64-tdep.c: Don't include features/i386/x32*.c.
7344         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7345         functions.
7346         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7347         and i386/x32-avx-avx512.
7348         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7349         and i386/x32.xml.
7350         * features/i386/x32-avx-avx512.c: Removed.
7351         * features/i386/x32-avx-avx512.xml: Removed.
7352         * features/i386/x32-avx.c: Removed.
7353         * features/i386/x32-avx.xml: Removed.
7354         * features/i386/x32.c: Removed.
7355         * features/i386/x32.xml: Removed.
7356         * regformats/i386/x32-avx-avx512.dat: Removed.
7357         * regformats/i386/x32-avx.dat: Removed.
7358         * regformats/i386/x32.dat: Removed.
7359
7360 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7361
7362         PR breakpoints/21886
7363         * mem-break.c (default_memory_insert_breakpoint): Use
7364         `->placed_address' rather than `->reqstd_address' for the
7365         breakpoint location.
7366
7367 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7368
7369         * arch-utils.c (default_print_insn): Remove arch/mach/endian
7370         assertions.
7371
7372 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7373
7374         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7375         a union of `tdep_info', `tdesc_data' and `id'.
7376         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7377         rather than `info.tdep_info'.
7378         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7379         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7380         * i386-tdep.c (i386_gdbarch_init): Likewise.
7381         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7382         * mips-tdep.c (mips_gdbarch_init): Likewise.
7383         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7384         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7385         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7386         `info.tdep_info'.
7387         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7388         `info.tdep_info'.
7389         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7390         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7391         `info.tdep_info'.
7392         * spu-tdep.c (spu_gdbarch_init): Likewise.
7393         * gdbarch.h: Regenerate.
7394
7395 2017-08-07  Leszek Swirski  <leszeks@google.com>
7396
7397         PR symtab/20899
7398         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7399
7400 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
7401
7402         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7403         (gdbsim_open): Rename gdb_argv args object to argv.
7404
7405 2017-08-05  Tom Tromey  <tom@tromey.com>
7406
7407         * compile/compile-object-load.c (compile_object_load): Use
7408         gdb::unique_xmalloc_ptr.
7409         * cli/cli-dump.c (scan_filename): Rename from
7410         scan_filename_with_cleanup.  Change return type.
7411         (scan_expression): Rename from scan_expression_with_cleanup.
7412         Change return type.
7413         (dump_memory_to_file, dump_value_to_file, restore_command):
7414         Use gdb::unique_xmalloc_ptr.  Update.
7415         * cli/cli-cmds.c (find_and_open_script): Use
7416         gdb::unique_xmalloc_ptr.
7417         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7418         * symmisc.c (maintenance_print_symbols)
7419         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7420         * symfile.c (symfile_bfd_open, generic_load)
7421         (add_symbol_file_command, remove_symbol_file_command): Use
7422         gdb::unique_xmalloc_ptr.
7423         * source.c (openp): Use gdb::unique_xmalloc_ptr.
7424         * psymtab.c (maintenance_print_psymbols): Use
7425         gdb::unique_xmalloc_ptr.
7426         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7427         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7428         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7429         (reload_shared_libraries_1): Likewise.
7430
7431 2017-08-05  Tom Tromey  <tom@tromey.com>
7432
7433         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7434         (rust_op_vector, rust_set_vector): New typedefs.
7435         (current_parser): New global.
7436         (work_obstack): Change to pointer type.  Update all users.
7437         (rust_ast, pstate): Remove globals.
7438         (struct rust_parser): New.
7439         (%union) <params, field_inits>: Change type.
7440         (start, tuple_expr, unit_expr, struct_expr_list, literal)
7441         (field_expr, expr_list, maybe_expr_list, type_list): Update.
7442         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7443         (convert_params_to_types, convert_params_to_expression): Change
7444         type of "params".
7445         (ast_string): Change type of "fields".
7446         (rust_parse): Make a rust_parser.  Remove cleanups.
7447         (rust_lex_tests): Make and install an auto_obstack.
7448
7449 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7450
7451         * configure.srv (ipa_x32_linux_regobj): New.
7452         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7453         instead of X86_TDESC_AVX512.
7454         (initialize_low_tracepoint): Call
7455         init_registers_x32_avx_avx512_linux.
7456
7457 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7458
7459         * utils.h (gdb_argv): Add namespace std for nullptr_t.
7460
7461 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7462
7463         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7464
7465 2017-08-03  Tom Tromey  <tom@tromey.com>
7466
7467         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7468         Remove.
7469         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7470
7471 2017-08-03  Tom Tromey  <tom@tromey.com>
7472
7473         * python/py-param.c (compute_enum_values): Use gdb_argv.
7474
7475 2017-08-03  Tom Tromey  <tom@tromey.com>
7476
7477         * utils.h (struct gdb_argv_deleter): New.
7478         (gdb_argv): New class.
7479         * utils.c (gdb_argv::reset): New method.
7480         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7481         * tracefile.c (tsave_command): Use gdb_argv.
7482         * top.c (new_ui_command): Use gdb_argv.
7483         * symmisc.c (maintenance_print_symbols)
7484         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7485         * symfile.c (symbol_file_command, generic_load)
7486         (remove_symbol_file_command): Use gdb_argv.
7487         * stack.c (backtrace_command): Use gdb_argv.
7488         * source.c (add_path, show_substitute_path_command)
7489         (unset_substitute_path_command, set_substitute_path_command):
7490         Use gdb_argv.
7491         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
7492         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7493         * remote.c (extended_remote_run, remote_put_command)
7494         (remote_get_command, remote_delete_command): Use gdb_argv.
7495         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7496         (gdbsim_open): Use gdb_argv.
7497         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7498         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7499         * procfs.c (procfs_info_proc): Use gdb_argv.
7500         * interps.c (interpreter_exec_cmd): Use gdb_argv.
7501         * infrun.c (handle_command): Use gdb_argv.
7502         * inferior.c (add_inferior_command, clone_inferior_command):
7503         Use gdb_argv.
7504         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7505         * exec.c (exec_file_command): Use gdb_argv.
7506         * cli/cli-cmds.c (alias_command): Use gdb_argv.
7507         * compile/compile.c (build_argc_argv): Use gdb_argv.
7508
7509 2017-08-03  Tom Tromey  <tom@tromey.com>
7510
7511         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7512
7513 2017-08-03  Tom Tromey  <tom@tromey.com>
7514
7515         * python/python.c (compute_python_string): Return std::string.
7516         (gdbpy_eval_from_control_command): Update.
7517         (do_start_initialization): Use std::string.
7518         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7519         xstrprintf.
7520         * python/py-breakpoint.c (local_setattro): Use string_printf, not
7521         xstrprintf.
7522
7523 2017-08-03  Tom Tromey  <tom@tromey.com>
7524
7525         * top.h (do_restore_instream_cleanup): Remove.
7526         * top.c (do_restore_instream_cleanup): Remove.
7527         (read_command_file): Use scoped_restore.
7528         * cli/cli-script.c (execute_user_command): Use scoped_restore.
7529
7530 2017-08-03  Tom Tromey  <tom@tromey.com>
7531
7532         * cli/cli-script.c (execute_user_command)
7533         (execute_control_command): Use scoped_restore.
7534
7535 2017-08-03  Tom Tromey  <tom@tromey.com>
7536
7537         * cli/cli-script.c (do_restore_user_call_depth): Remove.
7538         (execute_user_command): Remove user_call_depth; use
7539         user_args_stack's size instead.
7540
7541 2017-08-03  Tom Tromey  <tom@tromey.com>
7542
7543         * top.h (in_user_command): Remove.
7544         * top.c (in_user_command): Remove.
7545         * cli/cli-script.c (do_restore_user_call_depth)
7546         (execute_user_command): Update.
7547
7548 2017-08-03  Tom Tromey  <tom@tromey.com>
7549
7550         * valops.c (search_struct_method): Use gdb::byte_vector.
7551         * valarith.c (value_concat): Use std::vector.
7552         * target.c (memory_xfer_partial): Use gdb::byte_vector.
7553         (simple_search_memory): Likewise.
7554         * printcmd.c (find_string_backward): Use gdb::byte_vector.
7555         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7556         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7557         * elfread.c (elf_rel_plt_read): Use std::string.
7558         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7559         * cli/cli-dump.c (restore_section_callback): Use
7560         gdb::byte_vector.
7561
7562 2017-08-03  Tom Tromey  <tom@tromey.com>
7563
7564         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7565
7566 2017-08-03  Tom Tromey  <tom@tromey.com>
7567
7568         * tui/tui-regs.c (tui_restore_gdbout): Remove.
7569         (tui_register_format): Use scoped_restore.
7570
7571 2017-08-03  Tom Tromey  <tom@tromey.com>
7572
7573         * reverse.c (exec_direction_default): Remove.
7574         (exec_reverse_once): Use scoped_restore.
7575         * remote.c (restore_remote_timeout): Remove.
7576         (remote_flash_erase, remote_flash_write, remote_flash_done)
7577         (readchar, remote_serial_write): Use scoped_restore.
7578         * cli/cli-script.c (struct source_cleanup_lines_args)
7579         (source_cleanup_lines): Remove.
7580         (script_from_file): Use scoped_restore.
7581         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7582         (source_command): Use scoped_restore.
7583
7584 2017-08-03  Tom Tromey  <tom@tromey.com>
7585
7586         * utils.h (make_cleanup_free_so): Remove.
7587         * utils.c (do_free_so, make_cleanup_free_so): Remove.
7588         * solist.h (struct so_deleter): New.
7589         (so_list_up): New typedef.
7590         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7591
7592 2017-08-03  Tom Tromey  <tom@tromey.com>
7593
7594         * utils.h (make_cleanup_restore_current_language): Remove.
7595         * utils.c (do_restore_current_language)
7596         (make_cleanup_restore_current_language): Remove.
7597         * parse.c (parse_exp_in_context_1)
7598         (parse_expression_with_language): Use
7599         scoped_restore_current_language.
7600         * mi/mi-main.c (mi_cmd_execute): Use
7601         scoped_restore_current_language.
7602         * language.h (scoped_restore_current_language): New class.
7603
7604 2017-08-03  Tom Tromey  <tom@tromey.com>
7605
7606         * compile/compile.c (cleanup_unlink_file): Remove.
7607         (compile_to_object): Use gdb::unlinker.
7608         (eval_compile_command): Likewise.
7609
7610 2017-08-03  Tom Tromey  <tom@tromey.com>
7611
7612         * utils.h (make_cleanup_fclose): Remove.
7613         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7614
7615 2017-08-03  Tom Tromey  <tom@tromey.com>
7616
7617         * top.c (open_terminal_stream): Return gdb_file_up.
7618         (new_ui_command): Update.
7619
7620 2017-08-03  Tom Tromey  <tom@tromey.com>
7621
7622         * source.c (print_source_lines_base, forward_search_command)
7623         (reverse_search_command): Use gdb_file_up.
7624
7625 2017-08-03  Tom Tromey  <tom@tromey.com>
7626
7627         * fbsd-nat.c (fbsd_find_memory_regions): Update.
7628
7629 2017-08-03  Tom Tromey  <tom@tromey.com>
7630
7631         * cli/cli-cmds.c (find_and_open_script): Change return type.
7632         Remove "streamp" and "full_path" parameters.
7633         (source_script_with_search): Update.
7634         * auto-load.c (source_script_file): Update.
7635         * cli/cli-cmds.h (find_and_open_script): Change type.
7636         (open_script): New struct.
7637
7638 2017-08-03  Tom Tromey  <tom@tromey.com>
7639
7640         * xml-support.c (xml_fetch_content_from_file): Update.
7641         * ui-file.c (stdio_file::open): Update.
7642         * tracefile-tfile.c (tfile_start): Update.
7643         * remote.c (remote_file_put, remote_file_get): Update.
7644         * nat/linux-procfs.c (linux_proc_get_int)
7645         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7646         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7647         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7648         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7649         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7650         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7651         * linux-nat.c (linux_proc_pending_signals): Update.
7652         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7653         (file_closer): Remove.
7654         * compile/compile.c (compile_to_object): Update.
7655         * common/filestuff.h (struct gdb_file_deleter): New.
7656         (gdb_file_up): New typedef.
7657         (gdb_fopen_cloexec): Change return type.
7658         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7659         * cli/cli-dump.c (fopen_with_cleanup): Remove.
7660         (dump_binary_file, restore_binary_file): Update.
7661         * auto-load.c (auto_load_objfile_script_1): Update.
7662
7663 2017-08-03  Tom Tromey  <tom@tromey.com>
7664
7665         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7666         (info_static_tracepoint_markers_command): Likewise.
7667         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7668         * skip.c (skip_info): Use ui_out_emit_table.
7669         * progspace.c (print_program_space): Use ui_out_emit_table.
7670         * osdata.c (info_osdata): Use ui_out_emit_table.
7671         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7672         ui_out_emit_table.
7673         * linux-thread-db.c (info_auto_load_libthread_db): Use
7674         ui_out_emit_table.
7675         * inferior.c (print_inferior): Use ui_out_emit_table.
7676         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7677         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7678         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7679         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7680         * ui-out.h (class ui_out_emit_table): New.
7681
7682 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
7683
7684         * mips-tdep.c (mips_fpu_type_str): New function.
7685         (mips_dump_tdep): Call it.
7686
7687 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
7688
7689         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7690         `->mips_fpu_type'.
7691
7692 2017-07-31  Xavier Roirand  <roirand@adacore.com>
7693
7694         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7695
7696 2017-07-27  Xavier Roirand  <roirand@adacore.com>
7697
7698         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7699
7700 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7701
7702         * cli/cli-cmds.c (maintenancechecklist): New variable.
7703         * gdbcmd.h (maintenancechecklist): Declare it.
7704         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7705         Call i386_linux_read_description with different masks.
7706         * maint.c (maintenance_check_command): New function.
7707         (_initialize_maint_cmds): Call add_prefix_cmd.
7708         * target-descriptions.c (tdesc_reg): override operator != and ==.
7709         (tdesc_type): Likewise.
7710         (tdesc_feature): Likewise.
7711         (target_desc): Likewise.
7712         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7713         (maintenance_check_xml_descriptions): New function.
7714         (_initialize_target_descriptions) Add command "xml-descriptions".
7715         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7716
7717 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7718
7719         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7720         Include features/i386/32bit-*.c.
7721         (i386_linux_read_description): Generate target description if it
7722         doesn't exist.
7723         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7724         functions.
7725         * features/i386/32bit-linux.c: Re-generated.
7726         * features/i386/32bit-sse.c: Likewise.
7727         * target-descriptions.c (print_c_feature::visit): Print code to
7728         set register number if needed.
7729         (print_c_feature) <m_next_regnum>: New field.
7730
7731 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7732
7733         * features/Makefile (CFILES): Rename with TDESC_CFILES.
7734         (FEATURE_XMLFILES): New.
7735         (FEATURE_CFILES): New.
7736         New rules.
7737         (clean-cfiles): Remove generated c files.
7738         * features/i386/32bit-avx.c: Generated.
7739         * features/i386/32bit-avx512.c: Generated.
7740         * features/i386/32bit-core.c: Generated.
7741         * features/i386/32bit-linux.c: Generated.
7742         * features/i386/32bit-mpx.c: Generated.
7743         * features/i386/32bit-pkeys.c: Generated.
7744         * features/i386/32bit-sse.c: Generated.
7745         * target-descriptions.c: Include algorithm.
7746         (tdesc_element_visitor): Add method visit_end.
7747         (print_c_tdesc): Implement visit_end.
7748         (print_c_tdesc:: m_filename_after_features): Move it to
7749         protected.
7750         (print_c_feature): New class.
7751         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7752         name starts with "i386/32bit-".
7753
7754 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7755
7756         * target-descriptions.c (tdesc_element_visitor): New class.
7757         (tdesc_element): New class.
7758         (tdesc_reg): Inherit from tdesc_element.
7759         (tdesc_reg::accept): New function.
7760         (tdesc_type): Inherit from tdesc_element.
7761         (tdesc_type::accept): New function.
7762         (tdesc_feature): Inherit from tdesc_element.
7763         (tdesc_feature::accept): New function.
7764         (target_desc): Inherit from tdesc_element.
7765         (target_desc::target_desc): New.
7766         (target_desc::~target_desc): New.
7767         (target_desc::accept): New.
7768         (allocate_target_description): Use new.
7769         (free_target_description): Use delete.
7770         (print_c_tdesc): New class.
7771         (maint_print_c_tdesc_cmd): Adjust.
7772
7773         * features/aarch64.c: Re-generated.
7774         * features/arc-arcompact.c: Re-generated.
7775         * features/arc-v2.c: Re-generated.
7776         * features/arm/arm-with-iwmmxt.c: Re-generated.
7777         * features/arm/arm-with-m.c: Re-generated.
7778         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
7779         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
7780         * features/arm/arm-with-neon.c: Re-generated.
7781         * features/arm/arm-with-vfpv2.c: Re-generated.
7782         * features/arm/arm-with-vfpv3.c: Re-generated.
7783         * features/i386/amd64-avx-avx512.c: Re-generated.
7784         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7785         * features/i386/amd64-avx.c: Re-generated.
7786         * features/i386/amd64-avx-linux.c: Re-generated.
7787         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
7788         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7789         * features/i386/amd64-avx-mpx.c: Re-generated.
7790         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
7791         * features/i386/amd64.c: Re-generated.
7792         * features/i386/amd64-linux.c: Re-generated.
7793         * features/i386/amd64-mpx.c: Re-generated.
7794         * features/i386/amd64-mpx-linux.c: Re-generated.
7795         * features/i386/i386-avx-avx512.c: Re-generated.
7796         * features/i386/i386-avx-avx512-linux.c: Re-generated.
7797         * features/i386/i386-avx.c: Re-generated.
7798         * features/i386/i386-avx-linux.c: Re-generated.
7799         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
7800         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
7801         * features/i386/i386-avx-mpx.c: Re-generated.
7802         * features/i386/i386-avx-mpx-linux.c: Re-generated.
7803         * features/i386/i386.c: Re-generated.
7804         * features/i386/i386-linux.c: Re-generated.
7805         * features/i386/i386-mmx.c: Re-generated.
7806         * features/i386/i386-mmx-linux.c: Re-generated.
7807         * features/i386/i386-mpx.c: Re-generated.
7808         * features/i386/i386-mpx-linux.c: Re-generated.
7809         * features/i386/x32-avx-avx512.c: Re-generated.
7810         * features/i386/x32-avx-avx512-linux.c: Re-generated.
7811         * features/i386/x32-avx.c: Re-generated.
7812         * features/i386/x32-avx-linux.c: Re-generated.
7813         * features/i386/x32.c: Re-generated.
7814         * features/i386/x32-linux.c: Re-generated.
7815         * features/microblaze.c: Re-generated.
7816         * features/microblaze-with-stack-protect.c: Re-generated.
7817         * features/mips64-dsp-linux.c: Re-generated.
7818         * features/mips64-linux.c: Re-generated.
7819         * features/mips-dsp-linux.c: Re-generated.
7820         * features/mips-linux.c: Re-generated.
7821         * features/nds32.c: Re-generated.
7822         * features/nios2.c: Re-generated.
7823         * features/nios2-linux.c: Re-generated.
7824         * features/rs6000/powerpc-32.c: Re-generated.
7825         * features/rs6000/powerpc-32l.c: Re-generated.
7826         * features/rs6000/powerpc-403.c: Re-generated.
7827         * features/rs6000/powerpc-403gc.c : Re-generated.
7828         * features/rs6000/powerpc-405.c: Re-generated.
7829         * features/rs6000/powerpc-505.c: Re-generated.
7830         * features/rs6000/powerpc-601.c: Re-generated.
7831         * features/rs6000/powerpc-602.c: Re-generated.
7832         * features/rs6000/powerpc-603.c: Re-generated.
7833         * features/rs6000/powerpc-604.c: Re-generated.
7834         * features/rs6000/powerpc-64.c: Re-generated.
7835         * features/rs6000/powerpc-64l.c: Re-generated.
7836         * features/rs6000/powerpc-7400.c: Re-generated.
7837         * features/rs6000/powerpc-750.c: Re-generated.
7838         * features/rs6000/powerpc-860.c: Re-generated.
7839         * features/rs6000/powerpc-altivec32.c: Re-generated.
7840         * features/rs6000/powerpc-altivec32l.c: Re-generated.
7841         * features/rs6000/powerpc-altivec64.c: Re-generated.
7842         * features/rs6000/powerpc-altivec64l.c: Re-generated.
7843         * features/rs6000/powerpc-cell32l.c: Re-generated.
7844         * features/rs6000/powerpc-cell64l.c: Re-generated.
7845         * features/rs6000/powerpc-e500.c: Re-generated.
7846         * features/rs6000/powerpc-e500l.c: Re-generated.
7847         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
7848         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
7849         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
7850         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
7851         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
7852         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
7853         * features/rs6000/powerpc-vsx32.c: Re-generated.
7854         * features/rs6000/powerpc-vsx32l.c: Re-generated.
7855         * features/rs6000/powerpc-vsx64.c: Re-generated.
7856         * features/rs6000/powerpc-vsx64l.c: Re-generated.
7857         * features/rs6000/rs6000.c: Re-generated.
7858         * features/s390-linux32.c: Re-generated.
7859         * features/s390-linux32v1.c: Re-generated.
7860         * features/s390-linux32v2.c: Re-generated.
7861         * features/s390-linux64.c: Re-generated.
7862         * features/s390-linux64v1.c: Re-generated.
7863         * features/s390-linux64v2.c: Re-generated.
7864         * features/s390-te-linux64.c: Re-generated.
7865         * features/s390-tevx-linux64.c: Re-generated.
7866         * features/s390-vx-linux64.c: Re-generated.
7867         * features/s390x-linux64.c: Re-generated.
7868         * features/s390x-linux64v1.c: Re-generated.
7869         * features/s390x-linux64v2.c: Re-generated.
7870         * features/s390x-te-linux64.c: Re-generated.
7871         * features/s390x-tevx-linux64.c: Re-generated.
7872         * features/s390x-vx-linux64.c: Re-generated.
7873         * features/sparc/sparc32-solaris.c: Re-generated.
7874         * features/sparc/sparc64-solaris.c: Re-generated.
7875         * features/tic6x-c62x.c: Re-generated.
7876         * features/tic6x-c62x-linux.c: Re-generated.
7877         * features/tic6x-c64x.c: Re-generated.
7878         * features/tic6x-c64x-linux.c: Re-generated.
7879         * features/tic6x-c64xp.c: Re-generated.
7880         * features/tic6x-c64xp-linux.c: Re-generated.
7881
7882 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7883
7884         * i386-linux-tdep.c (i386_linux_read_description): New function.
7885         (i386_linux_core_read_description): Call
7886         i386_linux_read_description.
7887         * i386-linux-tdep.h (i386_linux_read_description): Declare.
7888         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
7889         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
7890         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
7891         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
7892         * x86-linux-nat.c (x86_linux_read_description): Call
7893         i386_linux_read_description.
7894
7895 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7896
7897         * NEWS: Mention it.
7898         * features/Makefile (%.c: %.xml): Pass the xml file name to
7899         command "maint print c-tdesc".
7900         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7901         name from 'arg'.
7902
7903 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7904
7905         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
7906         in-class initialization.
7907         (tdesc_create_feature): Call new instead of XCNEW.
7908         (free_target_description): Ue delete.
7909
7910 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
7911
7912         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
7913
7914 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7915
7916         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
7917         constant.
7918         (amd64_x32_init_abi): Likewise.
7919         * amd64-tdep.h (amd64_init_abi): Update declaration.
7920         (amd64_x32_init_abi): Likewise.
7921
7922 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7923
7924         PR tdep/21717
7925         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
7926         condition for FPSCR.
7927         (arm_linux_store_inferior_registers): Likewise.
7928
7929 2017-07-22  Tom Tromey  <tom@tromey.com>
7930
7931         * break-catch-syscall.c (struct catch_syscall_inferior_data)
7932         <syscalls_counts>: Now a std::vector.
7933         (get_catch_syscall_inferior_data): Use "new".
7934         (catch_syscall_inferior_data_cleanup): Use "delete".
7935         (insert_catch_syscall, remove_catch_syscall)
7936         (clear_syscall_counts): Update.
7937
7938 2017-07-22  Tom Tromey  <tom@tromey.com>
7939
7940         * break-catch-syscall.c (syscall_catchpoint)
7941         <syscalls_to_be_caught>: Now a std::vector<int>
7942         (~syscall_catchpoint): Remove.
7943         (insert_catch_syscall, remove_catch_syscall)
7944         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
7945         (print_mention_catch_syscall, print_recreate_catch_syscall):
7946         Update.
7947         (create_syscall_event_catchpoint): Change type of "filter"
7948         parameter.
7949         (catch_syscall_split_args): Return a std::vector.
7950         (catch_syscall_command_1, catching_syscall_number_1): Update.
7951
7952 2017-07-22  Tom Tromey  <tom@tromey.com>
7953
7954         * break-catch-throw.c (struct exception_catchpoint)
7955         <exception_rx>: Now a std::string.
7956         (~exception_catchpoint): Remove.
7957         (print_one_detail_exception_catchpoint): Update.
7958         (handle_gnu_v3_exceptions): Change type of except_rx.
7959         (extract_exception_regexp): Return a std::string.
7960         (catch_exception_command_1): Update.
7961
7962 2017-07-22  Tom Tromey  <tom@tromey.com>
7963
7964         * break-catch-sig.c (gdb_signal_type): Remove typedef.
7965         (struct signal_catchpoint) <signals_to_be_caught>: Now a
7966         std::vector.
7967         <catch_all>: Now a bool.
7968         (~signal_catchpoint): Remove.
7969         (signal_catchpoint_insert_location)
7970         (signal_catchpoint_remove_location)
7971         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
7972         (signal_catchpoint_print_mention)
7973         (signal_catchpoint_print_recreate)
7974         (signal_catchpoint_explains_signal): Update.
7975         (create_signal_catchpoint): Change type of "filter" and
7976         "catch_all".
7977         (catch_signal_split_args): Return a std::vector.  Change type of
7978         "catch_all".
7979         (catch_signal_command): Update.
7980
7981 2017-07-20  Pedro Alves  <palves@redhat.com>
7982
7983         * ada-lang.c (ada_language_defn): Make extern.
7984         (_initialize_ada_language): Remove add_language call.
7985         * c-lang.c (c_language_defn, cplus_language_defn)
7986         (asm_language_defn, minimal_language_defn): Make extern.
7987         (_initialize_c_language): Delete.
7988         * completer.c (compare_cstrings): Delete, moved to utils.h.
7989         * d-lang.c (d_language_defn): Make extern.
7990         (_initialize_d_language): Remove add_language calls.
7991         * defs.h (enum language): Add comment.
7992         * f-lang.c (f_language_defn): Make extern.
7993         (_initialize_f_language): Remove add_language call.
7994         * go-lang.c (go_language_defn): Make extern.
7995         (_initialize_go_language): Remove add_language call.
7996         * language.c: Include <algorithm>.
7997         (languages): Redefine as const array.
7998         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
7999         (set_language_command): Handle "local".  Use for-range loop.
8000         (set_language): Remove loop.
8001         (language_enum): Rewrite.
8002         (language_def, language_str): Remove loops.
8003         (add_language): Delete.
8004         (add_set_language_command): New, based on add_languages.
8005         (skip_language_trampoline): Adjust.
8006         (local_language_defn): Delete.
8007         (language_gdbarch_post_init): Adjust.
8008         (_initialize_language): Remove add_language calls.  Call
8009         add_set_language_command.
8010         * language.h (add_language): Delete.
8011         (auto_language_defn)
8012         (unknown_language_defn, minimal_language_defn, ada_language_defn)
8013         (asm_language_defn, c_language_defn, cplus_language_defn)
8014         (d_language_defn, f_language_defn, go_language_defn)
8015         (m2_language_defn, objc_language_defn, opencl_language_defn)
8016         (pascal_language_defn, rust_language_defn): Declare.
8017         * m2-lang.c (m2_language_defn): Make extern.
8018         (_initialize_m2_language): Remove add_language call.
8019         * objc-lang.c (objc_language_defn): Make extern.
8020         (_initialize_objc_language): Remove add_language call.
8021         * opencl-lang.c (opencl_language_defn): Make extern.
8022         (_initialize_opencl_language): Remove add_language call.
8023         * p-lang.c (pascal_language_defn): Make extern.
8024         (_initialize_pascal_language): Delete.
8025         * rust-lang.c (rust_language_defn): Make extern.
8026         (_initialize_rust_language): Delete.
8027         * utils.h (compare_cstrings): New static inline function.
8028
8029 2017-07-20  Pedro Alves  <palves@redhat.com>
8030
8031         * ada-lang.c (ada_to_fixed_type_1): Adjust.
8032         (get_var_value): Constify parameters.
8033         (get_int_var_value): Change prototype.
8034         (to_fixed_range_type): Adjust.
8035         * ada-lang.h (get_int_var_value): Change prototype.
8036
8037 2017-07-20  Pedro Alves  <palves@redhat.com>
8038
8039         * dwarf2read.c (dw2_lookup_symbol): Use
8040         SYMBOL_MATCHES_SEARCH_NAME.
8041         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8042
8043 2017-07-20  Pedro Alves  <palves@redhat.com>
8044
8045         * block.c (block_iter_name_step, block_iter_name_first)
8046         (block_iter_name_next): Delete.
8047         (block_lookup_symbol_primary): Adjust to use
8048         dict_iter_match_first/dict_iter_match_next.
8049         * block.h (block_iter_name_first, block_iter_name_next): Delete
8050         declarations.
8051         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8052         dict_iter_match_first/dict_iter_match_next.
8053
8054 2017-07-20  Pedro Alves  <palves@redhat.com>
8055
8056         * cp-support.c (cp_find_first_component_aux): Add missing case for
8057         end of string.
8058
8059 2017-07-18  David Blaikie  <dblaikie@gmail.com>
8060
8061         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8062         of dwo_cu's dwo_file.
8063
8064 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8065
8066         * remote.c (store_registers_using_G): Remove one line comment.
8067
8068 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8069
8070         * regcache.c (regcache_cpy): Simplify it.
8071         (regcache::cpy_no_passthrough): Remove it.
8072         * regcache.h (cpy_no_passthrough): Remove it.
8073         (regcache_dup, regcache_cpy): Update comments.
8074
8075 2017-07-18  Pedro Alves  <palves@redhat.com>
8076
8077         * remote-sim.c (sim_command_completer): Adjust to work with a
8078         completion_tracker instead of a VEC.
8079
8080 2017-07-17  Pedro Alves  <palves@redhat.com>
8081
8082         * completer.c (complete_source_filenames): New function.
8083         (complete_address_and_linespec_locations): New function.
8084         (location_completer): Use complete_address_and_linespec_locations.
8085         (completion_tracker::build_completion_result): Honor the tracker's
8086         request to suppress append.
8087         * completer.h (completion_tracker::suppress_append_ws)
8088         (completion_tracker::set_suppress_append_ws): New methods.
8089         (completion_tracker::m_suppress_append_ws): New field.
8090         (complete_source_filenames): New declaration.
8091         * linespec.c (linespec_complete_what): New.
8092         (struct ls_parser) <complete_what, completion_word,
8093         completion_quote_char, completion_quote_end, completion_tracker>:
8094         New fields.
8095         (string_find_incomplete_keyword_at_end): New.
8096         (linespec_lexer_lex_string): Record quote char.  If in completion
8097         mode, don't throw.
8098         (linespec_lexer_consume_token): Advance the completion word point.
8099         (linespec_lexer_peek_token): Save/restore completion info.
8100         (save_stream_and_consume_token): New.
8101         (set_completion_after_number): New.
8102         (linespec_parse_basic): Set what to complete next depending on
8103         token.  Handle function and label completions specially.
8104         (parse_linespec): Disable objc shortcut in completion mode.  Set
8105         what to complete next depending on token type.  Skip keyword if in
8106         completion mode.
8107         (complete_linespec_component, linespec_complete): New.
8108         * linespec.h (linespec_complete): Declare.
8109
8110 2017-07-17  Pedro Alves  <palves@redhat.com>
8111
8112         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8113         Handle 'operator<' / 'operator<<'.
8114
8115 2017-07-17  Pedro Alves  <palves@redhat.com>
8116
8117         * completer.c (collect_explicit_location_matches): Handle
8118         MATCH_LABEL.
8119         (convert_explicit_location_to_linespec): New, factored out from
8120         ...
8121         (convert_explicit_location_to_sals): ... this.
8122         (complete_label): New.
8123         (linespec_complete_label, find_label_symbols_in_block): New.
8124         (find_label_symbols): Add completion_mode parameter and adjust to
8125         call find_label_symbols_in_block.
8126         * linespec.h (linespec_complete_label): Declare.
8127
8128 2017-07-17  Pedro Alves  <palves@redhat.com>
8129
8130         * ada-lang.c (ada_collect_symbol_completion_matches): Add
8131         complete_symbol_mode parameter.
8132         * cli/cli-cmds.c (complete_command): Get the completion result out
8133         of the handle_brkchars tracker if used a custom word point.
8134         * completer.c: Include "linespec.h".
8135         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8136         (advance_to_expression_complete_word_point): New.
8137         (completion_tracker::completes_to_completion_word): New.
8138         (complete_files_symbols): Pass down
8139         complete_symbol_mode::EXPRESSION.
8140         (explicit_options, probe_options): New.
8141         (collect_explicit_location_matches): Complete on the
8142         explictit_loc->foo instead of word.  Use
8143         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
8144         keyword and options completions.
8145         (backup_text_ptr): Delete.
8146         (skip_keyword): New.
8147         (complete_explicit_location): Remove 'word' parameter.  Add
8148         language, quoted_arg_start and quoted_arg_end parameters.
8149         Rewrite, parsing left to right.
8150         (location_completer): Rewrite.
8151         (location_completer_handle_brkchars): New function.
8152         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8153         (enum complete_line_internal_reason): Adjust comments.
8154         (completion_tracker::discard_completions): New.
8155         (completer_handle_brkchars_func_for_completer): Handle
8156         location_completer.
8157         (gdb_custom_word_point_brkchars)
8158         (gdb_org_rl_basic_quote_characters): New.
8159         (gdb_completion_word_break_characters_throw)
8160         (completion_find_completion_word): Handle trackers that use a
8161         custom word point.
8162         (completion_tracker::advance_custom_word_point_by): New.
8163         (completion_tracker::build_completion_result): Don't rely on
8164         readline appending the quote char.
8165         (gdb_rl_attempted_completion_function_throw): Handle trackers that
8166         use a custom word point.
8167         (gdb_rl_attempted_completion_function): Restore
8168         rl_basic_quote_characters.
8169         * completer.h (class completion_tracker): Extend intro comment.
8170         (completion_tracker::set_quote_char)
8171         (completion_tracker::quote_char)
8172         (completion_tracker::set_use_custom_word_point)
8173         (completion_tracker::use_custom_word_point)
8174         (completion_tracker::custom_word_point)
8175         (completion_tracker::set_custom_word_point)
8176         (completion_tracker::advance_custom_word_point_by)
8177         (completion_tracker::completes_to_completion_word)
8178         (completion_tracker::discard_completions): New methods.
8179         (completion_tracker::m_quote_char)
8180         (completion_tracker::m_use_custom_word_point)
8181         (completion_tracker::m_custom_word_point): New fields.
8182         (advance_to_expression_complete_word_point): Declare.
8183         * f-lang.c (f_collect_symbol_completion_matches): Add
8184         complete_symbol_mode parameter.
8185         * language.h (struct language_defn)
8186         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8187         parameter.
8188         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
8189         (linespec_complete_function): New function.
8190         (linespec_lexer_lex_keyword): Adjust.
8191         * linespec.h (linespec_keywords, linespec_complete_function): New
8192         declarations.
8193         * location.c (find_end_quote): New function.
8194         (explicit_location_lex_one): Add explicit_completion_info
8195         parameter.  Save quoting info.  Don't throw if being called for
8196         completion.  Don't handle Ada operators here.
8197         (is_cp_operator, skip_op_false_positives, first_of)
8198         (explicit_location_lex_one_function): New function.
8199         (string_to_explicit_location): Replace 'dont_throw' parameter with
8200         an explicit_completion_info pointer parameter.  Handle it.  Don't
8201         use explicit_location_lex_one to lex function names.  Use
8202         explicit_location_lex_one_function instead.
8203         * location.h (struct explicit_completion_info): New.
8204         (string_to_explicit_location): Replace 'dont_throw' parameter with
8205         an explicit_completion_info pointer parameter.
8206         * symtab.c (default_collect_symbol_completion_matches_break_on):
8207         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
8208         (default_collect_symbol_completion_matches)
8209         (collect_symbol_completion_matches): Add complete_symbol_mode
8210         parameter.
8211         (collect_symbol_completion_matches_type): Pass down
8212         complete_symbol_mode::EXPRESSION.
8213         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8214         parameter.  Handle LINESPEC mode.
8215         * symtab.h (complete_symbol_mode): New.
8216         (default_collect_symbol_completion_matches_break_on)
8217         (default_collect_symbol_completion_matches)
8218         (collect_symbol_completion_matches)
8219         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8220         parameter.
8221
8222 2017-07-17  Pedro Alves  <palves@redhat.com>
8223
8224         * utils.c (enum class strncmp_iw_mode): New.
8225         (strcmp_iw): Rename to ...
8226         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
8227         parameters.  Handle them.
8228         (strncmp_iw): New.
8229         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8230         * utils.h (strncmp_iw): Declare.
8231         (strcmp_iw): Move describing comments here.
8232
8233 2017-07-17  Pedro Alves  <palves@redhat.com>
8234
8235         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8236         CP_OPERATOR_STR.
8237         * c-typeprint.c (is_type_conversion_operator): Use
8238         CP_OPERATOR_STR.
8239         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8240         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8241         CP_OPERATOR_LEN.
8242         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8243         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8244         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8245         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8246         CP_OPERATOR_STR.
8247         * location.c: Include "cp-support.h".
8248         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8249         CP_OPERATOR_STR.
8250         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8251         CP_OPERATOR_LEN.
8252
8253 2017-07-17  Pedro Alves  <palves@redhat.com>
8254
8255         * cli/cli-cmds.c (complete_command): Use a completion tracker
8256         along with completion_find_completion_word for handle_brkchars
8257         phase.
8258         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8259         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8260         (struct gdb_rl_completion_word_info): New.
8261         (gdb_rl_find_completion_word): New.
8262         (completion_find_completion_word): New.
8263         * completer.h (completion_find_completion_word): Declare.
8264
8265 2017-07-17  Pedro Alves  <palves@redhat.com>
8266
8267         * ada-lang.c (symbol_completion_match): Adjust comments.
8268         (symbol_completion_add): Replace vector parameter with
8269         completion_tracker parameter.  Use it.
8270         (ada_make_symbol_completion_list): Rename to...
8271         (ada_collect_symbol_completion_matches): ... this.  Add
8272         completion_tracker parameter and use it.
8273         (ada_language_defn): Adjust.
8274         * break-catch-syscall.c (catch_syscall_completer): Adjust
8275         prototype and work with completion_tracker instead of VEC.
8276         * breakpoint.c (condition_completer): Adjust prototype and work
8277         with completion_tracker instead of VEC.
8278         * c-lang.c (c_language_defn, cplus_language_defn)
8279         (asm_language_defn, minimal_language_defn): Adjust to renames.
8280         * cli/cli-cmds.c (complete_command): Rework using
8281         completion_tracker.  Catch exceptions when completing.
8282         * cli/cli-decode.c (integer_unlimited_completer)
8283         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8284         with completion_tracker instead of VEC.
8285         * command.h (struct completion_tracker): Forward declare.
8286         (completer_ftype, completer_handle_brkchars_ftype): Change
8287         types.
8288         (complete_on_cmdlist, complete_on_enum): Adjust.
8289         * completer.c: Include <algorithm>.
8290         (struct gdb_completer_state): New.
8291         (current_completion): New global.
8292         (readline_line_completion_function): Delete.
8293         (noop_completer, filename_completer)
8294         (filename_completer_handle_brkchars, complete_files_symbols)
8295         (linespec_location_completer): Adjust to work with a
8296         completion_tracker instead of a VEC.
8297         (string_or_empty): New.
8298         (collect_explicit_location_matches): Adjust to work with a
8299         completion_tracker instead of a VEC.
8300         (explicit_location_completer): Rename to ...
8301         (complete_explicit_location): ... this and adjust to work with a
8302         completion_tracker instead of a VEC.
8303         (location_completer): Adjust to work with a completion_tracker
8304         instead of a VEC.
8305         (add_struct_fields): Adjust to work with a completion_list instead
8306         of VEC.
8307         (expression_completer): Rename to ...
8308         (complete_expression): ... this and adjust to work with a
8309         completion_tracker instead of a VEC.  Use complete_files_symbols.
8310         (expression_completer): Reimplement on top of complete_expression.
8311         (symbol_completer): Adjust to work with a completion_tracker
8312         instead of a VEC.
8313         (enum complete_line_internal_reason): Add describing comments.
8314         (complete_line_internal_normal_command): Adjust to work with a
8315         completion_tracker instead of a VEC.
8316         (complete_line_internal): Rename to ...
8317         (complete_line_internal_1): ... this and adjust to work with a
8318         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
8319         handle_brkchars phase.
8320         (new_completion_tracker): Delete.
8321         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8322         complete_line_internal_1.
8323         (free_completion_tracker): Delete.
8324         (INITIAL_COMPLETION_HTAB_SIZE): New.
8325         (completion_tracker::completion_tracker)
8326         (completion_tracker::~completion_tracker): New.
8327         (maybe_add_completion): Delete.
8328         (completion_tracker::maybe_add_completion)
8329         (completion_tracker::add_completion)
8330         (completion_tracker::add_completions): New.
8331         (throw_max_completions_reached_error): Delete.
8332         (complete_line): Adjust to work with a completion_tracker instead
8333         of a VEC.  Don't create a completion_tracker_t or check for max
8334         completions here.
8335         (command_completer, command_completer_handle_brkchars)
8336         (signal_completer, reg_or_group_completer_1)
8337         (reg_or_group_completer, default_completer_handle_brkchars):
8338         Adjust to work with a completion_tracker.
8339         (gdb_completion_word_break_characters_throw): New.
8340         (gdb_completion_word_break_characters): Reimplement.
8341         (line_completion_function): Delete.
8342         (completion_tracker::recompute_lowest_common_denominator)
8343         (expand_preserving_ws)
8344         (completion_tracker::build_completion_result)
8345         (completion_result::completion_result)
8346         (completion_result::completion_result)
8347         (completion_result::~completion_result)
8348         (completion_result::completion_result)
8349         (completion_result::release_match_list, compare_cstrings)
8350         (completion_result::sort_match_list)
8351         (completion_result::reset_match_list)
8352         (gdb_rl_attempted_completion_function_throw)
8353         (gdb_rl_attempted_completion_function): New.
8354         * completer.h (completion_list, struct completion_result)
8355         (class completion_tracker): New.
8356         (complete_line): Add completion_tracker parameter.
8357         (readline_line_completion_function): Delete.
8358         (gdb_rl_attempted_completion_function): New.
8359         (noop_completer, filename_completer, expression_completer)
8360         (location_completer, symbol_completer, command_completer)
8361         (signal_completer, reg_or_group_completer): Update prototypes.
8362         (completion_tracker_t, new_completion_tracker)
8363         (make_cleanup_free_completion_tracker): Delete.
8364         (enum maybe_add_completion_enum): Delete.
8365         (maybe_add_completion): Delete.
8366         (throw_max_completions_reached_error): Delete.
8367         * corefile.c (complete_set_gnutarget): Adjust to work with a
8368         completion_tracker instead of a VEC.
8369         * cp-abi.c (cp_abi_completer): Adjust to work with a
8370         completion_tracker instead of a VEC.
8371         * d-lang.c (d_language_defn): Adjust.
8372         * disasm.c (disassembler_options_completer): Adjust to work with a
8373         completion_tracker instead of a VEC.
8374         * f-lang.c (f_make_symbol_completion_list): Rename to ...
8375         (f_collect_symbol_completion_matches): ... this.  Adjust to work
8376         with a completion_tracker instead of a VEC.
8377         (f_language_defn): Adjust.
8378         * go-lang.c (go_language_defn): Adjust.
8379         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8380         Adjust to work with a completion_tracker instead of a VEC.
8381         * infrun.c (handle_completer): Likewise.
8382         * interps.c (interpreter_completer): Likewise.
8383         * interps.h (interpreter_completer): Likewise.
8384         * language.c (unknown_language_defn, auto_language_defn)
8385         (local_language_defn): Adjust.
8386         * language.h (language_defn::la_make_symbol_completion_list):
8387         Rename to ...
8388         (language_defn::la_collect_symbol_completion_matches): ... this
8389         and adjust to work with a completion_tracker instead of a VEC.
8390         * m2-lang.c (m2_language_defn): Adjust.
8391         * objc-lang.c (objc_language_defn): Adjust.
8392         * opencl-lang.c (opencl_language_defn): Adjust.
8393         * p-lang.c (pascal_language_defn): Adjust.
8394         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8395         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8396         with a completion_tracker.
8397         * rust-lang.c (rust_language_defn): Adjust.
8398         * symtab.c (free_completion_list, do_free_completion_list)
8399         (return_val, completion_tracker): Delete.
8400         (completion_list_add_name, completion_list_add_symbol)
8401         (completion_list_add_msymbol, completion_list_objc_symbol)
8402         (completion_list_add_fields, add_symtab_completions): Add
8403         completion_tracker parameter and use it.
8404         (default_make_symbol_completion_list_break_on_1): Rename to...
8405         (default_collect_symbol_completion_matches_break_on): ... this.
8406         Add completion_tracker parameter and use it instead of allocating
8407         a completion tracker here.
8408         (default_make_symbol_completion_list_break_on): Delete old
8409         implementation.
8410         (default_make_symbol_completion_list): Delete.
8411         (default_collect_symbol_completion_matches): New.
8412         (make_symbol_completion_list): Delete.
8413         (collect_symbol_completion_matches): New.
8414         (make_symbol_completion_type): Rename to ...
8415         (collect_symbol_completion_matches_type): ... this.  Add
8416         completion_tracker parameter and use it instead of VEC.
8417         (make_file_symbol_completion_list_1): Rename to...
8418         (collect_file_symbol_completion_matches): ... this.  Add
8419         completion_tracker parameter and use it instead of VEC.
8420         (make_file_symbol_completion_list): Delete.
8421         (add_filename_to_list): Use completion_list instead of a VEC.
8422         (add_partial_filename_data::list): Now a completion_list.
8423         (make_source_files_completion_list): Work with a completion_list
8424         instead of a VEC.
8425         * symtab.h: Include "completer.h".
8426         (default_make_symbol_completion_list_break_on)
8427         (default_make_symbol_completion_list, make_symbol_completion_list)
8428         (make_symbol_completion_type, make_file_symbol_completion_list)
8429         (make_source_files_completion_list): Delete.
8430         (default_collect_symbol_completion_matches_break_on)
8431         (default_collect_symbol_completion_matches)
8432         (collect_symbol_completion_matches)
8433         (collect_symbol_completion_matches_type)
8434         (collect_file_symbol_completion_matches)
8435         (make_source_files_completion_list): New.
8436         * top.c (init_main): Don't install a rl_completion_entry_function
8437         hook.  Install a rl_attempted_completion_function hook instead.
8438         * tui/tui-layout.c (layout_completer): Adjust to work with a
8439         completion_tracker.
8440         * tui/tui-regs.c (tui_reggroup_completer):
8441         * tui/tui-win.c (window_name_completer, focus_completer)
8442         (winheight_completer): Adjust to work with a completion_tracker.
8443         * value.c: Include "completer.h".
8444         (complete_internalvar): Adjust to work with a completion_tracker.
8445         * value.h (complete_internalvar): Likewise.
8446
8447 2017-07-17  Pedro Alves  <palves@redhat.com>
8448
8449         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8450         renames.
8451         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8452         comments to completer_ftype's declaration.
8453         <completer_handle_brkchars>: Change type to
8454         completer_handle_brkchars_ftype.
8455         * command.h (completer_ftype): Add describing comment and give
8456         names to parameters.
8457         (completer_ftype_void): Rename to ...
8458         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
8459         (set_cmd_completer_handle_brkchars): Adjust.
8460         * completer.c (filename_completer_handle_brkchars): New function.
8461         (complete_line_internal_normal_command): New function, factored
8462         out from ...
8463         (complete_line_internal): ... here.
8464         (command_completer_handle_brkchars)
8465         (default_completer_handle_brkchars)
8466         (completer_handle_brkchars_func_for_completer): New functions.
8467         * completer.h (set_gdb_completion_word_break_characters): Delete
8468         declaration.
8469         (completer_handle_brkchars_func_for_completer): New declaration.
8470         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8471         completer_handle_brkchars_func_for_completer.
8472
8473 2017-07-17  Pedro Alves  <palves@redhat.com>
8474
8475         * completer.c (symbol_completer): New function, based on
8476         make_symbol_completion_list_fn.
8477         * completer.h (symbol_completer): New declaration.
8478         * guile/scm-cmd.c (cmdscm_completers): Adjust.
8479         * python/py-cmd.c (completers): Adjust.
8480         * symtab.c (make_symbol_completion_list_fn): Delete.
8481         * symtab.h (make_symbol_completion_list_fn): Delete.
8482         * cli/cli-decode.c (add_cmd): Adjust.
8483
8484 2017-07-17  Pedro Alves  <palves@redhat.com>
8485
8486         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8487         * dwarf2read.c: Include "filename-seen-cache.h".
8488         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8489         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8490         * filename-seen-cache.c: New file.
8491         * filename-seen-cache.h: New file.
8492         * symtab.c: Include "filename-seen-cache.h".
8493         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8494         (create_filename_seen_cache, clear_filename_seen_cache)
8495         (delete_filename_seen_cache, filename_seen): Delete, parts moved
8496         to filename-seen-cache.h/filename-seen-cache.c.
8497         (output_source_filename, sources_info)
8498         (maybe_add_partial_symtab_filename)
8499         (make_source_files_completion_list): Adjust to use
8500         filename_seen_cache.
8501
8502 2017-07-17  Pedro Alves  <palves@redhat.com>
8503
8504         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8505         fields.
8506         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8507         dwarf2_debug_sections*)): New.
8508         (dwarf2_per_objfile::dwarf2_per_objfile(const
8509         dwarf2_per_objfile&)): Declare as deleted.
8510         (dwarf2_per_objfile::operator=): Declare as deleted.
8511         (dwarf2_per_objfile::dwarf2_per_objfile)
8512         (dwarf2_per_objfile::~dwarf2_per_objfile)
8513         (dwarf2_per_objfile::free_cached_comp_units): New.
8514         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8515         ctor.  Call dwarf2_per_objfile's ctor manually.
8516         (dwarf2_locate_sections): Deleted/refactored as ...
8517         (dwarf2_per_objfile::locate_sections): ... this new method.
8518         (free_cached_comp_units): Defer to
8519         dwarf2_per_objfile::free_cached_comp_units.
8520         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8521
8522 2017-07-14  Tom Tromey  <tom@tromey.com>
8523
8524         PR rust/21764:
8525         * rust-exp.y (convert_ast_to_expression): Add "want_type"
8526         parameter.
8527         <UNOP_SIZEOF>: Split into separate case.
8528         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
8529
8530 2017-07-14  Tom Tromey  <tom@tromey.com>
8531
8532         PR rust/21763:
8533         * symtab.c (symbol_matches_domain): Add language_rust to special
8534         case.
8535         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8536         treat LOC_TYPEDEF symbols as variables.
8537
8538 2017-07-14  Pedro Alves  <palves@redhat.com>
8539
8540         * symtab.c (make_file_symbol_completion_list_1): Iterate over
8541         symtabs matching all symtabs with SRCFILE as file name instead of
8542         only considering the first hit, with lookup_symtab.
8543
8544 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8545
8546         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8547         operator_name parameters.
8548         (gen_expr): Update function call.
8549
8550 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8551
8552         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8553         parameter.
8554         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8555         Likewise.
8556         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8557         parameter, use agent_expr::gdbarch instead, update function
8558         calls.
8559         (locexpr_tracepoint_var_ref): Likewise.
8560         (loclist_tracepoint_var_ref): Likewise.
8561         * ax-gdb.c (gen_trace_static_fields): Likewise.
8562         (gen_traced_pop): Likewise.
8563         (gen_frame_args_address): Likewise.
8564         (gen_frame_locals_address): Likewise.
8565         (gen_var_ref): Likewise.
8566         (gen_struct_ref_recursive): Likewise.
8567         (gen_static_field): Likewise.
8568         (gen_maybe_namespace_elt): Likewise.
8569         (gen_expr): Likewise.
8570         (gen_trace_for_var): Likewise.
8571         (gen_trace_for_expr): Likewise.
8572         (gen_trace_for_return_address): Likewise.
8573
8574 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8575
8576         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8577         parameter.
8578         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8579
8580 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8581
8582         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8583         from ax, update calls.
8584         (gen_usual_arithmetic): Likewise.
8585         (gen_integral_promotions): Likewise.
8586         (gen_bitfield_ref): Likewise.
8587         (gen_primitive_field): Likewise.
8588         (gen_struct_ref_recursive): Likewise.
8589         (gen_struct_ref): Likewise.
8590         (gen_maybe_namespace_elt): Likewise.
8591         (gen_struct_elt_for_reference): Likewise.
8592         (gen_namespace_elt): Likewise.
8593         (gen_aggregate_elt_ref): Likewise.
8594         (gen_expr): Get gdbarch from ax, update calls.
8595         (gen_expr_binop_rest): Likewise.
8596
8597 2017-07-13  Pedro Alves  <palves@redhat.com>
8598
8599         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8600         as default tdesc.
8601         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8602         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8603         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8604         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
8605         tdep.
8606         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8607         Get final tdesc from the tdep.
8608         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8609         default tdesc.
8610         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8611         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8612         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8613         Use it as default tdesc.
8614         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8615         down to amd_init_abi.  No longer handle fallback tdesc here.
8616         * amd64-tdep.h (tdesc_x32): Declare.
8617         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8618         parameter.
8619         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8620         as default tdesc.
8621
8622 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8623
8624         * s390-linux-tdep.c (s390_process_record): Add support for
8625         instructions new in arch12.
8626
8627 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8628
8629         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8630         PT_GETFSBASE and PT_GETGSBASE.
8631         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8632         PT_SETGSBASE.
8633
8634 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8635
8636         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8637         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8638         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8639         those rules.
8640         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8641         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8642         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8643         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8644         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8645         * features/i386/amd64.xml: Add 64bit-segments.xml.
8646         * features/i386/amd64-avx-avx512.c: Regenerated.
8647         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8648         * features/i386/amd64-avx-mpx.c: Regenerated.
8649         * features/i386/amd64-avx.c: Regenerated.
8650         * features/i386/amd64-mpx.c: Regenerated.
8651         * features/i386/amd64.c: Regenerated.
8652         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8653         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8654         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8655         * regformats/i386/amd64-avx.dat: Regenerated.
8656         * regformats/i386/amd64-mpx.dat: Regenerated.
8657         * regformats/i386/amd64.dat: Regenerated.
8658
8659 2017-07-10  Yao Qi  <yao.qi@linaro.org>
8660
8661         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8662         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8663
8664 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
8665
8666         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8667         unsetenv.
8668         * gnulib/aclocal.m4: Regenerate.
8669         * gnulib/config.in: Regenerate.
8670         * gnulib/configure: Regenerate.
8671         * gnulib/import/Makefile.am: Regenerate.
8672         * gnulib/import/Makefile.in: Regenerate.
8673         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8674         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8675         * gnulib/import/m4/environ.m4: New file.
8676         * gnulib/import/m4/setenv.m4: New file.
8677         * gnulib/import/setenv.c: New file.
8678         * gnulib/import/unsetenv.c: New file.
8679
8680 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
8681
8682         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8683         address when op is DW_OP_addr.
8684
8685 2017-07-09  Tom Tromey  <tom@tromey.com>
8686
8687         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8688         check and apply to outer type.
8689
8690 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8691
8692         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8693         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8694         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8695         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8696
8697 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8698
8699         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8700
8701 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8702
8703         * corelow.c (get_core_siginfo): Remove.
8704         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8705         instead of get_core_siginfo.
8706         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8707         * gdbarch.h: Re-generate.
8708         * gdbarch.c: Re-generate.
8709         * linux-tdep.c (linux_core_xfer_siginfo): New.
8710         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8711
8712 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8713
8714         * corelow.c (thread_section_name): Move to ...
8715         * gdbcore.h (thread_section_name): ... here.
8716
8717 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8718
8719         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8720         (struct siginfo32): New.
8721         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8722         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8723         via ptrace(PT_LWPINFO).
8724
8725 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8726
8727         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8728         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8729         (fbsd_get_siginfo_type): New.
8730         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8731         (_initialize_fbsd_tdep): New.
8732
8733 2017-07-06  David Blaikie  <dblaikie@gmail.com>
8734
8735         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8736         a singular dwo_unit*) to support multiple CUs in the same way that
8737         multiple TUs are supported.
8738         (create_cus_hash_table): Replace create_dwo_cu with a function for
8739         parsing multiple CUs from a DWO file.
8740         (open_and_init_dwo_file): Use create_cus_hash_table rather than
8741         create_dwo_cu.
8742         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8743         htab_find, rather than comparing the signature to a singleton CU in
8744         the dwo_file.
8745
8746 2017-07-06  Pedro Alves  <palves@redhat.com>
8747
8748         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8749
8750 2017-07-04  Pedro Alves  <palves@redhat.com>
8751
8752         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8753         * gdbtypes.h (TYPE_STATIC): Delete.
8754         (struct fn_field) <is_public, is_abstract, is_static, is_final,
8755         is_synchronized, is_native>: Delete.
8756         <dummy>: Bump.
8757         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8758         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8759         (TYPE_FN_FIELD_ABSTRACT): Delete.
8760
8761 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
8762
8763         * buffer.h (buffer_finish): Fix spelling mistakes.
8764
8765 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
8766
8767         * .dir-locals.el: Automatically switch to C-style comments in
8768         versions of Emacs that support the feature.
8769
8770 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8771             Pedro Alves  <palves@redhat.com>
8772
8773         PR cli/21688
8774         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
8775         (process_next_line): New variable 'inline_cmd'.
8776         Adjust 'if' clauses for "python", "compile" and "guile" to use
8777         'command_name_equals' and check for '!inline_cmd'.
8778
8779 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8780
8781         PR cli/21688
8782         * cli/cli-script.c (command_name_equals_not_inline): New function.
8783         (process_next_line): Adjust 'if' clauses for "python", "compile"
8784         and "guile" to use command_name_equals_not_inline.
8785
8786 2017-06-29  Pedro Alves  <palves@redhat.com>
8787
8788         * completer.c (expression_completer): Call
8789         linespec_location_completer instead of location_completer.
8790
8791 2017-06-29  Pedro Alves  <palves@redhat.com>
8792
8793         * completer.c (expression_completer): Remove code that recomputes
8794         'text' from 'word'.
8795
8796 2017-06-29  Yao Qi  <yao.qi@linaro.org>
8797
8798         * regformats/regdat.sh: Generate code with
8799         "ifndef IN_PROCESS_AGENT".
8800
8801 2017-06-28  Pedro Alves  <palves@redhat.com>
8802
8803         * command.h: Include "common/scoped_restore.h".
8804
8805 2017-06-28  Yao Qi  <yao.qi@linaro.org>
8806
8807         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
8808         instead of obstack_grow.
8809
8810 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
8811
8812         PR gdb/21337
8813         * symfile.c (reread_symbols): Call objfiles_changed just before
8814         read_symbols.
8815
8816 2017-06-27  Pedro Alves  <palves@redhat.com>
8817
8818         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
8819         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
8820         (completion_list_add_symbol, completion_list_add_msymbol):
8821         ... these new functions.
8822         (add_symtab_completions)
8823         (default_make_symbol_completion_list_break_on_1): Adjust.
8824
8825 2017-06-27  Pedro Alves  <palves@redhat.com>
8826
8827         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
8828         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
8829         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
8830         dtor.
8831         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
8832         'storage_obstack' field an auto_obstack.  In-class initialize all
8833         non-bitfield fields.  Make minsyms_read bool.
8834         * symfile.c (read_symbols): Adjust.
8835
8836 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
8837
8838         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
8839         (gdbsim_store_register): Likewise.
8840
8841 2017-06-27  Pedro Alves  <palves@redhat.com>
8842
8843         * c-exp.y (name_obstack): Now an auto_obstack.
8844         (yylex): Use auto_obstack::clear.
8845         (c_parse): Use auto_obstack::clear instead of reinitializing and
8846         freeing the obstack.
8847         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
8848         * d-exp.y (name_obstack): Now an auto_obstack.
8849         (yylex): Use auto_obstack::clear.
8850         (d_parse): Use auto_obstack::clear instead of reinitializing and
8851         freeing the obstack.
8852         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
8853         auto_obstack.
8854         * dwarf2read.c (create_addrmap_from_index)
8855         (dwarf2_build_psymtabs_hard)
8856         (update_enumeration_type_from_children): Likewise.
8857         * gdb_obstack.h (auto_obstack): New type.
8858         * go-exp.y (name_obstack): Now an auto_obstack.
8859         (build_packaged_name): Use auto_obstack::clear.
8860         (go_parse): Use auto_obstack::clear instead of reinitializing and
8861         freeing the obstack.
8862         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
8863         auto_obstack.
8864         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
8865         * rust-exp.y (work_obstack): Now an auto_obstack.
8866         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
8867         reinitializing and freeing the obstack.
8868         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
8869         (host_char_to_target): Use auto_obstack.
8870         * utils.h (make_cleanup_obstack_free): Delete declaration.
8871         * valprint.c (generic_emit_char, generic_printstr): Use
8872         auto_obstack.
8873
8874 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
8875
8876         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
8877         thread.
8878         (darwin_init_thread_list): Don't update dummy thread.
8879         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
8880
8881 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8882
8883         * record-full.c (netorder16): Remove.
8884
8885 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8886
8887         * common/diagnostics.h: Define macros for GCC.
8888         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
8889         * common/vec.h: Include diagnostics.h.
8890         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
8891         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
8892         warning.
8893
8894 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8895
8896         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
8897         New macro.
8898         * ada-lex.l: Ignore deprecated register warnings.
8899
8900 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8901
8902         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8903         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8904
8905 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8906
8907         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
8908         its own line.
8909
8910 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8911
8912         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
8913
8914 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
8915
8916         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
8917         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
8918         (xtensa_register_read_masked): Likewise.
8919
8920 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
8921
8922         * common/environ.c (gdb_environ::unset): Update comment.
8923
8924 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8925
8926         * python/py-unwind.c (pyuw_sniffer): Allocate space for
8927         registers.
8928
8929 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8930
8931         * record-full.c (record_full_exec_insn): Use byte_vector.
8932
8933 2017-06-22  Yao Qi  <yao.qi@linaro.org>
8934
8935         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
8936         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8937
8938 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8939
8940         * remote.c (cached_reg): Move from here...
8941         * regcache.h (cached_reg): ...to here.
8942         * python/py-unwind.c (struct reg_info): Remove.
8943         (cached_frame_info): Use cached_reg_t.
8944         (pyuw_prev_register): Likewise.
8945         (pyuw_sniffer): Use cached_reg_t and allocate registers.
8946         (pyuw_dealloc_cache): Free all registers.
8947
8948 2017-06-22  Pedro Alves  <palves@redhat.com>
8949             Simon Marchi  <simon.marchi@ericsson.com>
8950
8951         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
8952         warning.
8953         * common/diagnostics.h: New file.
8954
8955 2017-06-22  Pedro Alves  <palves@redhat.com>
8956
8957         * common/agent.h: Add include guards.
8958
8959 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
8960
8961         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
8962         talk about addressable units instead of bytes.
8963
8964 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8965
8966         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
8967         of '::const_iterator'.
8968
8969 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8970
8971         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8972         'unittests/environ-selftests.c'.
8973         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
8974         * charset.c (find_charset_names): Declare object 'iconv_env'.
8975         Update code to use 'iconv_env' object.  Remove call to
8976         'free_environ'.
8977         * common/environ.c: Include <utility>.
8978         (make_environ): Delete function.
8979         (free_environ): Delete function.
8980         (gdb_environ::clear): New function.
8981         (gdb_environ::operator=): New function.
8982         (gdb_environ::get): Likewise.
8983         (environ_vector): Delete function.
8984         (set_in_environ): Delete function.
8985         (gdb_environ::set): New function.
8986         (unset_in_environ): Delete function.
8987         (gdb_environ::unset): New function.
8988         (gdb_environ::envp): Likewise.
8989         * common/environ.h: Include <vector>.
8990         (struct gdb_environ): Delete; transform into...
8991         (class gdb_environ): ... this class.
8992         (free_environ): Delete prototype.
8993         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
8994         environ_vector): Likewise.
8995         * infcmd.c (run_command_1): Update code to call
8996         'envp' from 'gdb_environ' class.
8997         (environment_info): Update code to call methods from 'gdb_environ'
8998         class.
8999         (unset_environment_command): Likewise.
9000         (path_info): Likewise.
9001         (path_command): Likewise.
9002         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9003         (inferior::inferior): Initialize 'environment' using the host's
9004         information.
9005         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9006         Include "environ.h".
9007         (class inferior) <environment>: Change type from 'struct
9008         gdb_environ' to 'gdb_environ'.
9009         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9010         methods from 'gdb_environ' class.
9011         * solib.c (solib_find_1): Likewise
9012         * unittests/environ-selftests.c: New file.
9013
9014 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9015
9016         * features/i386/i386-linux.xml: Exchange the order of including
9017         32bit-linux.xml and 32bit-sse.xml.
9018         * features/i386/i386-linux.c: Regenerated.
9019
9020 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9021
9022         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9023         Delete copy ctor and assignment operator.
9024         (tdesc_type): Likewise.
9025         (tdesc_feature): Likewise.
9026         (tdesc_free_reg): Remove.
9027         (tdesc_create_reg): Use new.
9028         (tdesc_free_type): Remove.
9029         (tdesc_create_vector): Use new.
9030         (tdesc_create_union): Likewise.
9031         (tdesc_create_flags): Likewise.
9032         (tdesc_create_enum): Likewise.
9033         (tdesc_free_feature): Delete.
9034         (free_target_description): Use delete.
9035
9036 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
9037
9038         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9039         registers.
9040
9041 2017-06-19  Pedro Alves  <palves@redhat.com>
9042
9043         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9044         after gdb::unlinker.
9045
9046 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
9047
9048         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9049         gdb_environ to access an environment variable.
9050
9051 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
9052
9053         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9054         gdb_byte*.
9055
9056 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9057
9058         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9059
9060 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9061
9062         * configure: Re-generate.
9063         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9064
9065 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9066
9067         * configure: Re-generate.
9068         * warning.m4: Pass -Werror to compiler when checking for
9069         supported warning flags.
9070
9071 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9072
9073         * Makefile.in (COMPILE.pre): Add "-x c++".
9074
9075 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
9076             Pedro Alves  <palves@redhat.com>
9077             Yao Qi  <yao.qi@linaro.org>
9078
9079         * defs.h (RequireLongest): New.
9080         (extract_integer): Declare function template.
9081         (extract_signed_integer): Remove the declaration, but define it
9082         static inline.
9083         (extract_unsigned_integer): Likewise.
9084         (store_integer): Declare function template.
9085         (store_signed_integer): Remove the declaration, but define it
9086         static inline.
9087         (store_unsigned_integer): Likewise.
9088         * findvar.c (extract_integer): New function template.
9089         (extract_signed_integer): Remove.
9090         (extract_unsigned_integer): Remove.
9091         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9092         instantiations.
9093         (store_integer): New function template.
9094         (store_signed_integer): Remove.
9095         (store_unsigned_integer): Remove.
9096         (store_integer): Explicit instantiations.
9097         * regcache.c (regcache_raw_read_signed): Update.
9098         (regcache::raw_read): New function.
9099         (regcache::raw_read_signed): Remove.
9100         (regcache::raw_read_unsigned): Remove.
9101         (regcache_raw_read_unsigned): Update.
9102         (regcache_raw_write_unsigned): Update.
9103         (regcache::raw_write_signed): Remove.
9104         (regcache::raw_write): New function.
9105         (regcache_cooked_read_signed): Update.
9106         (regcache::raw_write_unsigned): Remove.
9107         (regcache::cooked_read_signed): Remove.
9108         (regcache_cooked_read_unsigned): Update.
9109         (regcache::cooked_read_unsigned): Remove.
9110         (regcache_cooked_write_signed): Update.
9111         (regcache_cooked_write_unsigned): Update.
9112         * regcache.h (regcache) <raw_read_signed>: Remove.
9113         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9114         <raw_read, raw_write>: New.
9115         <cooked_read_signed, cooked_write_signed>: Remove.
9116         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9117         <cooked_read, cooked_write>: New.
9118         * sh64-tdep.c (sh64_pseudo_register_read): Update.
9119         (sh64_pseudo_register_write): Update.
9120
9121 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
9122
9123         * arc-tdep.c (arc_disassembler_options): New variable.
9124         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9125         of default_print_insn.
9126         (arc_delayed_print_insn): Set info->section when needed,
9127         use default_print_insn to retrieve a disassembler.
9128
9129 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
9130
9131         PR gdb/21574
9132         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9133         to mention $SHELL and startup-with-shell.
9134
9135 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
9136
9137         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9138
9139 2017-06-14  Yao Qi  <yao.qi@linaro.org>
9140
9141         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9142         default_print_insn instead of print_insn_aarch64.
9143         * arm-tdep.c (gdb_print_insn_arm): Call
9144         default_print_insn instead of print_insn_big_arm
9145         and print_insn_little_arm.
9146         * i386-tdep.c (i386_print_insn): Call default_print_insn
9147         instead of print_insn_i386.
9148         * ia64-tdep.c (ia64_print_insn): Call
9149         default_print_insn instead of print_insn_ia64.
9150         * mips-tdep.c (gdb_print_insn_mips): Call
9151         default_print_insn instead of print_insn_big_mips
9152         and print_insn_little_mips.
9153         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9154         instead of print_insn_spu.
9155
9156 2017-06-14  Pedro Alves  <palves@redhat.com>
9157
9158         * ada-lang.c: Include "common/byte-vector.h".
9159         (ada_value_primitive_packed_val): Use gdb::byte_vector.
9160         * charset.c (wchar_iterator::iterate): Resize the vector instead
9161         of reserving it.
9162         * common/byte-vector.h: Include "common/def-vector.h".
9163         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9164         * cli/cli-dump.c: Include "common/byte-vector.h".
9165         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9166         * common/byte-vector.h: New file.
9167         * common/def-vector.h: New file.
9168         * common/default-init-alloc.h: New file.
9169         * dwarf2loc.c: Include "common/byte-vector.h".
9170         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9171         instead of reserving it.
9172         * dwarf2read.c: Include "common/byte-vector.h".
9173         (data_buf::m_vec): Now a gdb::byte_vector.
9174         * gdb_regex.c: Include "common/def-vector.h".
9175         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9176         * mi/mi-main.c: Include "common/byte-vector.h".
9177         (mi_cmd_data_read_memory): Use gdb::byte_vector.
9178         * printcmd.c: Include "common/byte-vector.h".
9179         (print_scalar_formatted): Use gdb::byte_vector.
9180         * valprint.c: Include "common/byte-vector.h".
9181         (maybe_negate_by_bytes, print_decimal_chars): Use
9182         gdb::byte_vector.
9183
9184 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9185
9186         * darwin-nat.c: Include "nat/fork-inferior.h".
9187
9188 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9189
9190         * configure.nat: Factor out Darwin bits that are not
9191         architecture-specific.  Add fork-inferior.o.
9192
9193 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9194
9195         * configure.nat: Factor out AIX bits that are not
9196         architecture-specific.  Add fork-inferior.o.
9197
9198 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9199
9200         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
9201         (read_pieced_value, write_pieced_value): ...here.  Reduce to
9202         wrappers that just call rw_pieced_value.
9203
9204 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9205
9206         * dwarf2loc.c (write_pieced_value): When writing the data for a
9207         memory piece, use write_memory_with_notification instead of
9208         write_memory.
9209
9210 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9211
9212         * valops.c (read_value_memory): Change embedded_offset to
9213         represent a bit offset instead of a byte offset.
9214         * value.h (read_value_memory): Adjust comment.
9215
9216 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9217
9218         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9219         dest_offset_bits and source_offset_bits.
9220         (write_pieced_value): Likewise.
9221
9222 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9223
9224         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9225         given by DW_OP_bit_piece.
9226         (write_pieced_value): Likewise.
9227
9228 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9229
9230         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9231         some other preparations to the places where sufficient information
9232         is available.
9233         (write_pieced_value): Likewise.
9234
9235 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9236
9237         * dwarf2loc.c (bits_to_bytes): New function.
9238         (read_pieced_value): Fix offset calculations for register pieces
9239         on big-endian targets.
9240         (write_pieced_value): Likewise.
9241
9242 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9243
9244         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9245         (write_pieced_value): Likewise.
9246
9247 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9248
9249         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9250         transfer the source value's least significant bits, instead of its
9251         lowest-addressed ones.  Rename type_len to max_offset.
9252         (read_pieced_value): Mirror above changes to write_pieced_value as
9253         applicable.
9254
9255 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9256
9257         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9258         truncate full bytes from dest_offset_bits before using it as an
9259         offset into the buffer.
9260
9261 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9262
9263         * dwarf2loc.c (write_pieced_value): Include transfer size in
9264         byte-wise check.
9265
9266 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9267
9268         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9269         calculation of this_size.
9270
9271 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9272
9273         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9274         when targeting a bit-field.
9275         (write_pieced_value): Likewise.
9276
9277 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9278
9279         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9280         (allocate_piece_closure): Drop addr_size parameter.
9281         (dwarf2_evaluate_loc_desc_full): Adjust call to
9282         allocate_piece_closure.
9283
9284 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9285
9286         PR gdb/21226
9287         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9288         the LSB end, independent of endianness.
9289
9290 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9291
9292         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9293         size capping.
9294
9295 2017-06-13  Yao Qi  <yao.qi@linaro.org>
9296
9297         * mips-linux-nat.c: Move include features/mips*-linux.c to
9298         mips-linux-tdep.c.
9299         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9300         to mips-linux-tdep.c.
9301         * mips-linux-tdep.c: Include features/mips*-linux.c
9302         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9303         functions.
9304         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9305         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9306         (tdesc_mips64_dsp_linux): Declare.
9307
9308 2017-06-12  Tom Tromey  <tom@tromey.com>
9309
9310         * valprint.h (val_print_type_code_int): Remove.
9311         * valprint.c (generic_val_print_int): Always call
9312         val_print_scalar_formatted.
9313         (val_print_type_code_int): Remove.
9314         * printcmd.c (print_scalar_formatted): Handle options->format==0.
9315         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9316         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9317         * ada-valprint.c (ada_val_print_num): Use
9318         val_print_scalar_formatted.
9319
9320 2017-06-12  Tom Tromey  <tom@tromey.com>
9321
9322         * printcmd.c (print_scalar_formatted): Unify the two switches.
9323         Don't convert scalars to LONGEST.
9324
9325 2017-06-12  Tom Tromey  <tom@tromey.com>
9326
9327         PR exp/16225:
9328         * valprint.h (print_decimal_chars): Update.
9329         * valprint.c (maybe_negate_by_bytes): New function.
9330         (print_decimal_chars): Add "is_signed" argument.
9331         * printcmd.c (print_scalar_formatted): Update.
9332
9333 2017-06-12  Tom Tromey  <tom@tromey.com>
9334
9335         PR exp/16225:
9336         * valprint.h (print_binary_chars, print_hex_chars): Update.
9337         * valprint.c (val_print_type_code_int): Update.
9338         (print_binary_chars): Add "zero_pad" argument.
9339         (emit_octal_digit): New function.
9340         (print_octal_chars): Don't zero-pad.
9341         (print_decimal_chars): Likewise.
9342         (print_hex_chars): Add "zero_pad" argument.
9343         * sh64-tdep.c (sh64_do_fp_register): Update.
9344         * regcache.c (regcache::dump): Update.
9345         * printcmd.c (print_scalar_formatted): Update.
9346         * infcmd.c (default_print_one_register_info): Update.
9347
9348 2017-06-12  Pedro Alves  <palves@redhat.com>
9349             Alan Hayward  <alan.hayward@arm.com>
9350
9351         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9352         (mips_eabi_push_dummy_call): Rename local 'regsize' to
9353         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
9354         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9355         Assert that abi_regsize bytes fit in 'ref_valbuf'.
9356
9357 2017-06-12  Pedro Alves  <palves@redhat.com>
9358
9359         * dwarf2read.c (mapped_symtab::data): Now a vector of
9360         symtab_index_entry instead of vector of
9361         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
9362         whether an element's name is NULL instead of checking whether the
9363         element itself is NULL.
9364         (find_slot): Change return type.  Adjust.
9365         (hash_expand, , add_index_entry, uniquify_cu_indices)
9366         (write_hash_table): Adjust.
9367
9368 2017-06-12  Pedro Alves  <palves@redhat.com>
9369
9370         * dwarf2read.c (recursively_count_psymbols): New function.
9371         (write_psymtabs_to_index): Call it to compute number of psyms and
9372         pass estimate size of psyms_seen to unordered_set's ctor.
9373
9374 2017-06-12  Pedro Alves  <palves@redhat.com>
9375
9376         * dwarf2read.c (write_hash_table): Check if key already exists
9377         before emplacing.
9378
9379 2017-06-12  Pedro Alves  <palves@redhat.com>
9380
9381         * dwarf2read.c (data_buf::append_space): Rename to...
9382         (data_buf::grow): ... this, and make private.  Adjust all callers.
9383         (data_buf::append_uint): New method.
9384         (add_address_entry, write_one_signatured_type)
9385         (write_psymtabs_to_index): Use it.
9386
9387 2017-06-12  Pedro Alves  <palves@redhat.com>
9388
9389         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9390         (file_write (FILE *, const std::vector<Elem>&)): Delete.
9391         (data_buf::file_write): Call ::fwrite directly.
9392
9393 2017-06-12  Pedro Alves  <palves@redhat.com>
9394
9395         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9396         std::vector::erase.
9397
9398 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9399
9400         Code cleanup: C++ify .gdb_index producer.
9401         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9402         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9403         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9404         (create_strtab, add_string): Remove.
9405         (file_write, data_buf): New.
9406         (struct symtab_index_entry): Use std::vector for cu_indices.
9407         (struct mapped_symtab): Use std::vector for data.
9408         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9409         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9410         Remove.
9411         (find_slot): Change return type.  Update it to the new data structures.
9412         (hash_expand, add_index_entry): Update it to the new data structures.
9413         (offset_type_compare): Remove.
9414         (uniquify_cu_indices): Update it to the new data structures.
9415         (c_str_view, c_str_view_hasher, vector_hasher): New.
9416         (add_indices_to_cpool): Remove.
9417         (write_hash_table): Update it to the new data structures.
9418         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9419         (eq_psymtab_cu_index): Remove.
9420         (psym_index_map): New typedef.
9421         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9422         reference and std::unordered_map for cu_index_htab.
9423         (add_address_entry, add_address_entry_worker, write_address_map)
9424         (write_psymbols): Update it to the new data structures.
9425         (write_obstack): Remove.
9426         (struct signatured_type_index_data): Change types_list to a data_buf
9427         reference and psyms_seen to a std::unordered_set reference.
9428         (write_one_signatured_type, recursively_write_psymbols)
9429         (write_psymtabs_to_index): Update it to the new data structures.
9430
9431 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
9432
9433         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9434         separate-debug-file commands.
9435         * symfile.h (separate_debug_file_debug): New global.
9436         * symfile.c (separate_debug_file_debug): New global.
9437         (separate_debug_file_exists, find_separate_debug_file): Add
9438         debug output.
9439         (_initialize_symfile): Add "set debug separate-debug-file"
9440         command.
9441         * build-id.c (build_id_to_debug_bfd,
9442         find_separate_debug_file_by_buildid): Add debug output.
9443
9444 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
9445
9446         * gdbarch.sh (displaced_step_free_closure): Remove.
9447         * gdbarch.h, gdbarch.c: Re-generate.
9448         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9449         displaced_step_free_closure.
9450         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9451         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9452         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9453         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9454         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9455         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9456         * arch-utils.h (simple_displaced_step_free_closure): Remove.
9457         * arch-utils.c (simple_displaced_step_free_closure): Remove.
9458         * infrun.c (displaced_step_clear): Call xfree instead of
9459         gdbarch_displaced_step_free_closure.
9460
9461 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
9462
9463         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9464         NULL".
9465
9466 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
9467
9468         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9469         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9470         (mn10300_push_dummy_call): Likewise.
9471
9472 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9473
9474         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9475
9476 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9477
9478         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9479
9480 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9481
9482         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9483         able to start inferiors using a shell.
9484         (New remote packets): Announce new packet "QStartupWithShell".
9485         * remote.c: Add PACKET_QStartupWithShell.
9486         (extended_remote_create_inferior): Handle new
9487         PACKET_QStartupWithShell.
9488         (remote_protocol_features) <QStartupWithShell>: New entry for
9489         PACKET_QStartupWithShell.
9490         (_initialize_remote): Call "add_packet_config_cmd" for
9491         QStartupShell.
9492
9493 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9494             Pedro Alves  <palves@redhat.com>
9495
9496         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9497         and "nat/fork-inferior.h".
9498         * common/common-inferior.h: New file, with contents from
9499         "gdb/inferior.h".
9500         * commom/common-utils.c: Include "common-utils.h".
9501         (stringify_argv): New function.
9502         * common/common-utils.h (stringify_argv): New prototype.
9503         * configure.nat: Add "fork-inferior.o" as a dependency for
9504         "*linux*", "fbsd*" and "nbsd*" hosts.
9505         * corefile.c (get_exec_file): Update comment.
9506         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9507         instead of "startup_inferior".
9508         (darwin_create_inferior): Call "add_thread_silent" after
9509         "fork_inferior".
9510         * fork-child.c: Cleanup unnecessary includes.
9511         (SHELL_FILE): Move to "common/common-fork-child.c".
9512         (environ): Likewise.
9513         (exec_wrapper): Initialize.
9514         (get_exec_wrapper): New function.
9515         (breakup_args): Move to "common/common-fork-child.c"; rename to
9516         "breakup_args_for_exec".
9517         (escape_bang_in_quoted_argument): Move to
9518         "common/common-fork-child.c".
9519         (saved_ui): New variable.
9520         (prefork_hook): New function.
9521         (postfork_hook): Likewise.
9522         (postfork_child_hook): Likewise.
9523         (gdb_startup_inferior): Likewise.
9524         (fork_inferior): Move to "common/common-fork-child.c".  Update
9525         function to support gdbserver.
9526         (startup_inferior): Likewise.
9527         * gdbcore.h (get_exec_file): Remove declaration.
9528         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9529         instead of "startup_inferior".  Call "add_thread_silent" after
9530         "fork_inferior".
9531         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9532         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9533         instead of "startup_inferior".  Call "add_thread_silent" after
9534         "fork_inferior".
9535         * inferior.h: Include "common-inferior.h".
9536         (trace_start_error): Move to "common/common-utils.h".
9537         (trace_start_error_with_name): Likewise.
9538         (fork_inferior): Move prototype to "nat/fork-inferior.h".
9539         (startup_inferior): Likewise.
9540         (gdb_startup_inferior): New prototype.
9541         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9542         * nat/fork-inferior.h: New file.
9543         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9544         instead of "startup_inferior".  Call "add_thread_silent" after
9545         "fork_inferior".
9546         * target.h (target_terminal_init): Move prototype to
9547         "target/target.h".
9548         (target_terminal_inferior): Likewise.
9549         (target_terminal_ours): Likewise.
9550         * target/target.h (target_terminal_init): New prototype, moved
9551         from "target.h".
9552         (target_terminal_inferior): Likewise.
9553         (target_terminal_ours): Likewise.
9554         * utils.c (gdb_flush_out_err): New function.
9555
9556 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9557
9558         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9559         * common/common-gdbthread.h: New file, with parts from
9560         "gdb/gdbthread.h".
9561         * gdbthread.h: Include "common-gdbthread.h".
9562         (switch_to_thread): Moved to "common/common-gdbthread.h".
9563
9564 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9565
9566         * Makefile.in (SFILES): Add "common/job-control.c".
9567         (HFILES_NO_SRCDIR): Add "common/job-control.h".
9568         (COMMON_OBS): Add "job-control.o".
9569         * common/job-control.c: New file, with contents from
9570         "gdb/inflow.c".
9571         * common/job-control.h: New file, with contents from "terminal.h".
9572         * fork-child.c: Include "job-control.h".
9573         * inflow.c: Include "job-control.h".
9574         (gdb_setpgid): Move to "common/common-inflow.c".
9575         (_initialize_inflow): Move setting of "job_control" to
9576         "handle_job_control".
9577         * terminal.h (job_control): Moved to "common/common-terminal.h".
9578         (gdb_setpgid): Likewise.
9579         * top.c: Include "job_control.h".
9580         * utils.c: Likewise.
9581         (job_control): Moved to "job-control.c".
9582
9583 2017-06-07  Pedro Alves  <palves@redhat.com>
9584
9585         * Makefile.in (SFILES): Add gdb_regex.c.
9586         (COMMON_OBS): Add gdb_regex.o.
9587         * ada-lang.c (ada_add_standard_exceptions)
9588         (ada_add_exceptions_from_frame, name_matches_regex)
9589         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9590         parameter type to compiled_regex.  Adjust.
9591         (ada_exceptions_list): Use compiled_regex.
9592         * break-catch-throw.c (exception_catchpoint::pattern): Now a
9593         std::unique_ptr<compiled_regex>.
9594         (exception_catchpoint::~exception_catchpoint): Remove regfree
9595         call.
9596         (check_status_exception_catchpoint): Adjust to use compiled_regex.
9597         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9598         * breakpoint.c (solib_catchpoint::compiled): Now a
9599         std::unique_ptr<compiled_regex>.
9600         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9601         (check_status_catch_solib): Adjust to use compiled_regex.
9602         (add_solib_catchpoint): Adjust to use compiled_regex.
9603         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9604         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9605         compiled_regex reference.  Adjust to use it.
9606         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9607         declaration.  Include "gdb_regex.h".
9608         (apropos_cmd): Change regex parameter to compiled_regex reference.
9609         * gdb_regex.c: New file.
9610         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9611         declarations.
9612         (class compiled_regex): New.
9613         * linux-tdep.c: Include "common/gdb_optional.h".
9614         (struct mapping_regexes): New, factored out from
9615         mapping_is_anonymous_p, and adjusted to use compiled_regex.
9616         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9617         gdb::optional and remove cleanups.  Adjust to compiled_regex.
9618         * probe.c: Include "common/gdb_optional.h".
9619         (collect_probes): Use compiled_regex and gdb::optional and remove
9620         cleanups.
9621         * skip.c: Include "common/gdb_optional.h".
9622         (skiplist_entry::compiled_function_regexp): Now a
9623         gdb::optional<compiled_regex>.
9624         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9625         (free_skiplist_entry): Remove regfree call.
9626         (compile_skip_regexp, skip_rfunction_p): Adjust to use
9627         compiled_regex and gdb::optional.
9628         * symtab.c: Include "common/gdb_optional.h".
9629         (search_symbols): Use compiled_regex and gdb::optional.
9630         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9631         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
9632         to gdb_regex.c.
9633
9634 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9635
9636         * regcache.c (regcache::save): Avoid buffer use.
9637         (regcache::dump): Likewise.
9638
9639 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9640
9641         * sh-tdep.c (sh_pseudo_register_read): Remove
9642         MAX_REGISTER_SIZE.
9643         (sh_pseudo_register_write): Likewise.
9644         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9645         (sh64_pseudo_register_write): Likewise
9646
9647 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9648
9649         * aarch64-tdep.c (aarch64_store_return_value): Use
9650         V_REGISTER_SIZE.
9651         (aarch64_pseudo_read_value): Likewise.
9652         (aarch64_pseudo_write): Likewise.
9653
9654 2017-06-06  Yao Qi  <yao.qi@linaro.org>
9655
9656         * regformats/regdef.h (set_register_cache): Remove the
9657         declaration.
9658
9659 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
9660
9661         * frame.c (frame_unwind_register_signed): Use
9662         frame_unwind_register_value.
9663
9664 2017-06-06  Pedro Alves  <palves@redhat.com>
9665
9666         PR breakpoints/21553
9667         * breakpoint.c (create_breakpoints_sal_default)
9668         (init_breakpoint_sal, create_breakpoint_sal): Use
9669         gdb::unique_xmalloc_ptr for string parameters.
9670         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9671         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
9672         (base_breakpoint_create_breakpoints_sal)
9673         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9674         (strace_marker_create_breakpoints_sal)
9675         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9676         string parameters.
9677         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9678         gdb::unique_xmalloc_ptr for string parameters.
9679         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9680         parameters.
9681
9682 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9683
9684         * alpha-tdep.c (alpha_register_to_value): Use
9685         get_frame_register_value.
9686         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9687
9688 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9689
9690         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9691         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9692         (ia64_value_to_register): Likewise.
9693         (ia64_extract_return_value): Likewise.
9694         (ia64_store_return_value): Likewise.
9695         (ia64_push_dummy_call): Likewise.
9696
9697 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
9698
9699         GDB 8.0 released.
9700
9701 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
9702
9703         * x86-linux-nat.c (struct arch_lwp_info): Remove.
9704
9705 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
9706
9707         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9708         parameter.
9709         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9710
9711 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
9712
9713         * event-loop.c (poll_timers): Unallocate timer using delete
9714         instead of xfree.
9715
9716 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9717
9718         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9719         (struct breakpoint) <~breakpoint>: New.
9720         (struct watchpoint): Inherit from breakpoint.
9721         <~watchpoint>: New.
9722         <base>: Remove.
9723         (struct tracepoint): Inherit from breakpoint.
9724         <base>: Remove.
9725         * breakpoint.c (longjmp_breakpoint_ops): Remove.
9726         (struct longjmp_breakpoint): Inherit from breakpoint.
9727         <~longjmp_breakpoint>: New.
9728         <base>: Remove.
9729         (new_breakpoint_from_type): Remove casts.
9730         (watchpoint_in_thread_scope): Remove reference to base field.
9731         (watchpoint_del_at_next_stop): Likewise.
9732         (update_watchpoint): Likewise.
9733         (watchpoint_check): Likewise.
9734         (bpstat_check_watchpoint): Likewise.
9735         (set_longjmp_breakpoint): Likewise.
9736         (struct fork_catchpoint): Inherit from breakpoint.
9737         <base>: Remove.
9738         (struct solib_catchpoint): Inherit from breakpoint.
9739         <~solib_catchpoint>: New.
9740         <base>: Remove.
9741         (dtor_catch_solib): Change to ...
9742         (solib_catchpoint::~solib_catchpoint): ... this.
9743         (breakpoint_hit_catch_solib): Remove reference to base field.
9744         (add_solib_catchpoint): Likewise.
9745         (create_fork_vfork_event_catchpoint): Likewise.
9746         (struct exec_catchpoint): Inherit from breakpoint.
9747         <~exec_catchpoint>: New.
9748         <base>: Remove.
9749         (dtor_catch_exec): Change to ...
9750         (exec_catchpoint::~exec_catchpoint): ... this.
9751         (dtor_watchpoint): Change to ...
9752         (watchpoint::~watchpoint): ... this.
9753         (watch_command_1): Remove reference to base field.
9754         (catch_exec_command_1): Likewise.
9755         (base_breakpoint_dtor): Change to ...
9756         (breakpoint::~breakpoint): ... this.
9757         (base_breakpoint_ops): Remove dtor field value.
9758         (longjmp_bkpt_dtor): Change to ...
9759         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9760         (strace_marker_create_breakpoints_sal): Remove reference to base
9761         field.
9762         (delete_breakpoint): Don't manually call breakpoint destructor.
9763         (create_tracepoint_from_upload): Remove reference to base field.
9764         (trace_pass_set_count): Likewise.
9765         (initialize_breakpoint_ops): Don't initialize
9766         momentary_breakpoint_ops, don't set dtors.
9767         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9768         <~ada_catchpoint>: New.
9769         <base>: Remove.
9770         (create_excep_cond_exprs): Remove reference to base field.
9771         (dtor_exception): Change to ...
9772         (ada_catchpoint::~ada_catchpoint): ... this.
9773         (dtor_catch_exception): Remove.
9774         (dtor_catch_exception_unhandled): Remove.
9775         (dtor_catch_assert): Remove.
9776         (create_ada_exception_catchpoint): Remove reference to base
9777         field.
9778         (initialize_ada_catchpoint_ops): Don't set dtors.
9779         * break-catch-sig.c (struct signal_catchpoint): Inherit from
9780         breakpoint.
9781         <~signal_catchpoint>: New.
9782         <base>: Remove.
9783         (signal_catchpoint_dtor): Change to ...
9784         (signal_catchpoint::~signal_catchpoint): ... this.
9785         (create_signal_catchpoint): Remove reference to base field.
9786         (initialize_signal_catchpoint_ops): Don't set dtor.
9787         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
9788         from breakpoint.
9789         <~syscall_catchpoint>: New.
9790         <base>: Remove.
9791         (dtor_catch_syscall): Change to ...
9792         (syscall_catchpoint::~syscall_catchpoint): ... this.
9793         (create_syscall_event_catchpoint): Remove reference to base
9794         field.
9795         (initialize_syscall_catchpoint_ops): Don't set dtor.
9796         * break-catch-throw.c (struct exception_catchpoint): Inherit
9797         from breakpoint.
9798         <~exception_catchpoint>: New.
9799         <base>: Remove.
9800         (dtor_exception_catchpoint): Change to ...
9801         (exception_catchpoint::~exception_catchpoint): ... this.
9802         (handle_gnu_v3_exceptions): Remove reference to base field.
9803         (initialize_throw_catchpoint_ops): Don't set dtor.
9804         * ctf.c (ctf_get_traceframe_address): Remove reference to base
9805         field.
9806         * remote.c (remote_get_tracepoint_status): Likewise.
9807         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
9808         * tracefile.c (tracefile_fetch_registers): Likewise.
9809         * tracepoint.c (actions_command): Likewise.
9810         (validate_actionline): Likewise.
9811         (tfind_1): Likewise.
9812         (get_traceframe_location): Likewise.
9813         (find_matching_tracepoint_location): Likewise.
9814         (parse_tracepoint_status): Likewise.
9815         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
9816
9817 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9818
9819         * breakpoint.c (struct longjmp_breakpoint): New struct.
9820         (is_tracepoint_type): Change return type to bool.
9821         (is_longjmp_type): New function.
9822         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
9823         (set_raw_breakpoint_without_location): Use
9824         new_breakpoint_from_type.
9825         (set_raw_breakpoint): Likewise.
9826
9827 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9828
9829         * breakpoint.c (new_breakpoint_from_type): New function.
9830         (create_breakpoint_sal): Use new_breakpoint_from_type and
9831         unique_ptr.
9832         (create_breakpoint): Likewise.
9833
9834 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
9835
9836         * memattr.c (mem_info_command): Rename to ...
9837         (info_mem_command): ... this.
9838         (mem_enable_command): Rename to ...
9839         (enable_mem_command): ... this.
9840         (mem_disable_command): Rename to ...
9841         (disable_mem_command): ... this.
9842         (mem_delete_command): Rename to ...
9843         (delete_mem_command): ... this.
9844         (_initialize_mem): Adjust function names.
9845
9846 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9847
9848         * btrace.c (handle_pt_insn_events): New.
9849         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
9850         STATUS.  Split into this and ...
9851         (handle_pt_insn_event_flags): ... this.
9852
9853 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9854
9855         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
9856         and struct pt_insn.resynced.
9857         * configure: Regenerated.
9858         * config.in: Regenerated.
9859
9860 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9861
9862         * btrace.c (ftrace_find_call_by_number): New function.
9863         (ftrace_new_function): Store objects, not pointers.
9864         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
9865         ftrace_new_gap, ftrace_update_function,
9866         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
9867         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
9868         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
9869         btrace_ends_with_single_insn, btrace_call_get): Account for
9870         btrace_thread_info::functions now storing objects.
9871         * btrace.h (struct btrace_thread_info): Add constructor.
9872         (struct btrace_thread_info) <functions>: Make std::vector.
9873         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
9874         Initialize with default values.
9875         * record-btrace.c (record_btrace_frame_sniffer): Account for
9876         btrace_thread_info::functions now storing objects.
9877
9878 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9879
9880         * btrace.c: Remove typedef bfun_s.
9881         (ftrace_new_gap): Directly add gaps to the list of gaps.
9882         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
9883         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
9884         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
9885         instead of gdb VEC.
9886
9887 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9888
9889         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
9890         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
9891         with btrace_thread_info::next_segment and
9892         btrace_thread_info::prev_segment.
9893         * btrace.h: Remove struct btrace_func_link.
9894         (struct btrace_function): Replace pair of function segment pointers
9895         with pair of indices.
9896         * python/py-record-btrace.c (btpy_call_prev_sibling,
9897         btpy_call_next_sibling): Replace references to
9898         btrace_thread_info::segment with btrace_thread_info::next_segment and
9899         btrace_thread_info::prev_segment.
9900         * record-btrace.c (record_btrace_frame_this_id): Use
9901         btrace_find_call_by_number.
9902
9903 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9904
9905         * btrace.c (ftrace_new_function, ftrace_fixup_level,
9906         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9907         btrace_insn_next, btrace_insn_prev): Remove references to
9908         btrace_thread_info::flow.
9909         * btrace.h (struct btrace_function): Remove FLOW.
9910
9911 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9912
9913         * btrace.c (ftrace_find_call_by_number): New function.
9914         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
9915         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
9916         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
9917         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
9918         index.
9919         * btrace.h (struct btrace_function): Turn UP into an index.
9920         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
9921         as an index.
9922         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
9923         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
9924         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
9925
9926 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9927
9928         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9929         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9930         ftrace_update_function, ftrace_compute_global_level_offset,
9931         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
9932         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
9933         btrace_insn_end, btrace_is_empty): Remove references to
9934         btrace_thread_info::begin and btrace_thread_info::end.
9935         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
9936         (struct btrace_thread_info) <functions>: Adjust comment.
9937         * record-btrace.c (record_btrace_start_replaying): Remove reference to
9938         btrace_thread_info::begin.
9939
9940 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9941
9942         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9943         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9944         ftrace_update_function): Remove arguments that implicitly were always
9945         BTINFO->END.
9946         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
9947         Don't pass BTINFO->END.
9948
9949 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9950
9951         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
9952         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
9953         btrace_find_insn_by_number): Replace function segment pointer with
9954         index.
9955         (btrace_insn_cmp): Simplify.
9956         * btrace.h: (struct btrace_insn_iterator) Rename index to
9957         insn_index.  Replace function segment pointer with index into function
9958         segment vector.
9959         * record-btrace.c (record_btrace_call_history): Replace function
9960         segment pointer use with index.
9961         (record_btrace_frame_sniffer): Retrieve function call segment through
9962         vector.
9963         (record_btrace_set_replay): Remove defunc't safety check.
9964
9965 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9966
9967         * btrace.c (btrace_ends_with_single_insn): New function.
9968         (btrace_call_get, btrace_call_number, btrace_call_begin,
9969         btrace_call_end, btrace_call_next, btrace_call_prev,
9970         btrace_find_call_by_number): Use index into call segment vector
9971         instead of pointer.
9972         (btrace_call_cmp): Simplify.
9973         * btrace.h (struct btrace_call_iterator): Replace function call segment
9974         pointer with index into vector.
9975         * record-btrace.c (record_btrace_call_history): Use index instead of
9976         pointer.
9977
9978 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9979
9980         * btrace.c (btrace_insn_begin, btrace_insn_end,
9981         btrace_find_insn_by_number): Add btinfo to iterator.
9982         * btrace.h (struct btrace_insn_iterator): Add btinfo.
9983
9984 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9985
9986         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
9987         and save pointers directly.
9988         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
9989         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
9990         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
9991         changed signature of functions.
9992         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
9993         (btrace_fetch): Remove code that adds btrace_function pointers to
9994         vector of btrace_functions.
9995         (btrace_clear): Simplify freeing vector of btrace_functions.
9996
9997 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9998
9999         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10000         Replace VEC_* with std::vector functions.
10001         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10002         (struct btrace_thread_info)<functions>: Change type to std::vector.
10003
10004 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
10005
10006         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
10007         "Removed targets and native configurations" up.  Merge duplicate
10008         "New commands" sub-sections.  Add "New options" sub-sections.
10009
10010 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
10011
10012         * defs.h (copy_integer_to_size): New declaration.
10013         * findvar.c (copy_integer_to_size): New function.
10014         (do_cint_test): New selftest function.
10015         (copy_integer_to_size_test): Likewise.
10016         (_initialize_findvar): Likewise.
10017         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10018         (mips_fbsd_collect_reg): Use raw_collect_integer.
10019         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10020         (mips64_fill_gregset): Use raw_collect_integer
10021         (mips64_fill_fpregset): Use raw_supply_integer.
10022         * regcache.c (regcache::raw_supply_integer): New function.
10023         (regcache::raw_collect_integer): Likewise.
10024         * regcache.h: (regcache::raw_supply_integer): New declaration.
10025         (regcache::raw_collect_integer): Likewise.
10026
10027 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10028
10029         * Makefile.in (SFILES): Add gdbarch-selftests.c.
10030         (COMMON_OBS): Add gdbarch-selftests.o.
10031         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10032         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10033         * gdbarch-selftests.c: New file.
10034         * regcache.h (regcache) <~regcache>: Mark it virtual if
10035         GDB_SELF_TEST.
10036         <raw_write>: Likewise.
10037
10038 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10039
10040         * regcache.c (current_regcache): Change it to
10041         regcache::current_regcache.
10042         (regcache_observer_target_changed): Update.
10043         (regcache_thread_ptid_changed): Make it a regcache static
10044         method.
10045         (regcache_thread_ptid_changed): Update.
10046         (class regcache_access): New.
10047         (current_regcache_test): Update.
10048         (_initialize_regcache): Update.
10049         * regcache.h: Include forward_list.
10050         (regcache): Declare regcache_thread_ptid_changed and declare
10051         registers_changed_ptid as friend.
10052
10053 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10054
10055         * i387-tdep.c (i387_register_to_value): Use register_size
10056         instead of TYPE_LENGTH.
10057         * m68k-tdep.c (m68k_register_to_value): Likewise.
10058
10059 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10060
10061         * i387-tdep.c (i387_convert_register_p): Return false if type
10062         code isn't TYPE_CODE_FLT.
10063
10064 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10065
10066         * alpha-tdep.c (alpha_convert_register_p): Return true if type
10067         length is 4.
10068         (alpha_register_to_value): Remove type length check.
10069         (alpha_value_to_register): Likewise.
10070
10071 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10072
10073         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10074         TYPE_CODE_FLT.
10075
10076 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10077
10078         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10079         TYPE_CODE_FLT or not.
10080
10081 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10082
10083         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10084         * avr-tdep.c (avr_gdbarch_init): Likewise.
10085         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10086         * cris-tdep.c (cris_gdbarch_init): Likewise.
10087         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10088         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10089         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10090         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10091         * mep-tdep.c (mep_gdbarch_init): Likewise.
10092         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10093         * mips-tdep.c (mips_gdbarch_init): Likewise.
10094         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10095         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10096         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10097         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10098         * v850-tdep.c (v850_gdbarch_init): Likewise.
10099
10100 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10101
10102         * selftest-arch.c (tests_with_arch): Call registers_changed
10103         and reinit_frame_cache.
10104         * selftest.c (run_self_tests): Likewise.
10105
10106 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10107
10108         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10109         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10110
10111 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10112
10113         * rl78-tdep.c (rl78_gdbarch_init): Don't call
10114         set_gdbarch_print_insn.
10115
10116 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10117
10118         * h8300-tdep.c (h8300_gdbarch_init): Don't call
10119         set_gdbarch_print_insn.
10120
10121 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10122
10123         * alpha-tdep.c (alpha_gdbarch_init): Don't call
10124         set_gdbarch_print_insn.
10125         * arc-tdep.c (arc_gdbarch_init): Likewise.
10126         * arch-utils.c: include dis-asm.h.
10127         (default_print_insn): New function.
10128         * arch-utils.h (default_print_insn): Declare.
10129         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10130         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10131         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10132         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10133         * frv-tdep.c (frv_gdbarch_init): Likewise.
10134         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10135         * gdbarch.sh (print_insn): Use default_print_insn.
10136         * gdbarch.c: Regenerated.
10137         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10138         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10139         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10140         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10141         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10142         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10143         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10144         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10145         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10146         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10147         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10148         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10149         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10150         * mt-tdep.c (mt_gdbarch_init): Likewise.
10151         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10152         * nios2-tdep.c (nios2_print_insn): Remove.
10153         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10154         * rx-tdep.c (rx_gdbarch_init): Likewise.
10155         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10156         * score-tdep.c (score_print_insn): Remove.
10157         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10158         * sh-tdep.c (sh_gdbarch_init): Likewise.
10159         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10160         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10161         * tic6x-tdep.c (tic6x_print_insn): Remove.
10162         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10163         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10164         * v850-tdep.c (v850_gdbarch_init): Likewise.
10165         * vax-tdep.c (vax_gdbarch_init): Likewise.
10166         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10167         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10168
10169 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10170
10171         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10172         (MIPS_FP0_REGNUM): Remove.
10173         (MIPS_FSR_REGNUM): Remove.
10174         (mips_fbsd_supply_fpregs): Use mips_regnum.
10175         (mips_fbsd_supply_gregs): Likewise.
10176         (mips_fbsd_collect_fpregs): Likewise.
10177         (mips_fbsd_collect_gregs): Likewise.
10178
10179 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10180
10181         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10182         (getpfpregs_supplies): New function.
10183         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10184         getfpregs_supplies.
10185         (mips_fbsd_store_inferior_registers): Likewise.
10186
10187 2017-05-22  Pedro Alves <palves@redhat.com>
10188
10189         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10190         maintainer.
10191
10192 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
10193
10194         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10195         (store_register): Likewise.
10196         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10197         (get_decimal_float_return_value): Likewise.
10198         (do_ppc_sysv_return_value): Likewise.
10199         (ppc64_sysv_abi_push_integer): Likewise.
10200         (ppc64_sysv_abi_push_freg): Likewise.
10201         (ppc64_sysv_abi_return_value_base): Likewise.
10202         (ppc64_sysv_abi_return_value): Likewise.
10203         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10204         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10205         * rs6000-nat.c: Likewise.
10206         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10207         (rs6000_value_to_register): Likewise.
10208         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10209
10210 2017-05-21  Tom Tromey  <tom@tromey.com>
10211
10212         PR rust/21466:
10213         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10214         arrays as "[T]", not "[T; ]".
10215
10216 2017-05-19  Tom Tromey  <tom@tromey.com>
10217
10218         PR rust/21484:
10219         * rust-lang.c (exp_descriptor_rust): New function.
10220         (rust_language_defn): Use it.
10221         * p-lang.c (pascal_language_defn): Update.
10222         * opencl-lang.c (opencl_language_defn): Update.
10223         * objc-lang.c (objc_language_defn): Update.
10224         * m2-lang.c (m2_language_defn): Update.
10225         * language.h (struct language_defn)
10226         <la_watch_location_expression>: New member.
10227         * language.c (unknown_language_defn, auto_language_defn)
10228         (local_language_defn): Update.
10229         * go-lang.c (go_language_defn): Update.
10230         * f-lang.c (f_language_defn): Update.
10231         * d-lang.c (d_language_defn): Update.
10232         * c-lang.h (c_watch_location_expression): Declare.
10233         * c-lang.c (c_watch_location_expression): New function.
10234         (c_language_defn, cplus_language_defn, asm_language_defn)
10235         (minimal_language_defn): Use it.
10236         * breakpoint.c (watch_command_1): Call
10237         la_watch_location_expression.
10238         * ada-lang.c (ada_language_defn): Update.
10239
10240 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10241
10242         PR tui/21482
10243         * gdb_curses.h (NOMACROS): Define.
10244         (NCURSES_NOMACROS): Define.
10245
10246 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10247
10248         PR tui/21482
10249         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10250         arg to char *.
10251         * tui/tui-wingeneral.c (box_win): Likewise.
10252         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10253         (tui_show_source_line): Likewise.
10254         (tui_show_exec_info_content): Likewise.
10255
10256 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10257
10258         * sparc-tdep.c (sparc_structure_return_p)
10259         (sparc_arg_on_registers_p): New functions.
10260         (sparc32_store_arguments): Use them.
10261         * sparc64-tdep.c (sparc64_16_byte_align_p)
10262         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10263         Handle TYPE_CODE_ARRAY.
10264
10265 2017-05-17  Yao Qi  <yao.qi@linaro.org>
10266
10267         * cli/cli-decode.c (add_alias_cmd): New function.
10268         * command.h (add_alias_cmd): Declare.
10269         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10270         instead call add_alias_cmd.
10271
10272 2017-05-17  Pedro Alves  <palves@redhat.com>
10273
10274         * Makefile.in (nat_extra_makefile_frag): Rename to ...
10275         (nat_makefile_frag): ... this.  All references updated.
10276         * configure.ac: Likewise.
10277         * configure.nat: Likewise.  Enhance comments.
10278         * configure: Regenerate.
10279
10280 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10281
10282         * procfs.c (procfs_create_inferior): Change prototype to match
10283         definition.
10284
10285 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
10286
10287         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10288         C++ compiler warning.
10289
10290 2017-05-12  Tom Tromey  <tom@tromey.com>
10291
10292         PR rust/21483:
10293         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10294         recurse, just call value_struct_elt directly.
10295
10296 2017-05-12  Tom Tromey  <tom@tromey.com>
10297
10298         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10299         OP_RUST_ARRAY>: Fix.
10300
10301 2017-05-12  Tom Tromey  <tom@tromey.com>
10302
10303         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10304
10305 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10306
10307         * regcache.c: Include <forward_list>.
10308         (struct regcache_list): Remove.
10309         (current_regcache): Update.
10310         (get_thread_arch_aspace_regcache): Update for std::forward_list.
10311         (regcache_thread_ptid_changed): Likewise.
10312         (registers_changed_ptid): Likewise.
10313         (current_regcache_size): Likewise.
10314
10315 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10316
10317         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10318         (current_regcache_size): New function.
10319         (current_regcache_test): New function.
10320         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10321
10322 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10323
10324         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10325         (print_gp_register_row): Use get_frame_register_value.
10326
10327 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10328
10329         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10330         (mips_supply_fpregset): Likewise.
10331         (mips64_supply_gregset): Likewise.
10332
10333 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10334
10335         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
10336         regcache->raw_supply_zeroed.
10337
10338 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10339
10340         * configure.nat: Rearrange 'case' statements to match
10341         host before cpu.
10342
10343 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10344
10345         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
10346         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10347         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
10348         "@nat_extra_makefile_frag@".
10349         (Makefile): Remove dependency on "@frags@".
10350         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10351         (data-directory/Makefile): Likewise.
10352         * config/aarch64/linux.mh: Deleted; moved contents to
10353         "gdb/configure.nat".
10354         * config/alpha/alpha-linux.mh: Likewise.
10355         * config/alpha/nbsd.mh: Likewise.
10356         * config/arm/linux.mh: Likewise.
10357         * config/arm/nbsdelf.mh: Likewise.
10358         * config/i386/cygwin.mh: Likewise.
10359         * config/i386/cygwin64.mh: Likewise.
10360         * config/i386/darwin.mh: Likewise.
10361         * config/i386/fbsd.mh: Likewise.
10362         * config/i386/fbsd64.mh: Likewise.
10363         * config/i386/go32.mh: Likewise.
10364         * config/i386/i386gnu.mh: Likewise.
10365         * config/i386/i386sol2.mh: Likewise.
10366         * config/i386/linux.mh: Likewise.
10367         * config/i386/linux64.mh: Likewise.
10368         * config/i386/mingw.mh: Likewise.
10369         * config/i386/mingw64.mh: Likewise.
10370         * config/i386/nbsd64.mh: Likewise.
10371         * config/i386/nbsdelf.mh: Likewise.
10372         * config/i386/nto.mh: Likewise.
10373         * config/i386/obsd.mh: Likewise.
10374         * config/i386/obsd64.mh: Likewise.
10375         * config/i386/sol2-64.mh: Likewise.
10376         * config/ia64/linux.mh: Likewise.
10377         * config/m32r/linux.mh: Likewise.
10378         * config/m68k/linux.mh: Likewise.
10379         * config/m68k/nbsdelf.mh: Likewise.
10380         * config/m68k/obsd.mh: Likewise.
10381         * config/m88k/obsd.mh: Likewise.
10382         * config/mips/fbsd.mh: Likewise.
10383         * config/mips/linux.mh: Likewise.
10384         * config/mips/nbsd.mh: Likewise.
10385         * config/mips/obsd64.mh: Likewise.
10386         * config/pa/linux.mh: Likewise.
10387         * config/pa/nbsd.mh: Likewise.
10388         * config/pa/obsd.mh: Likewise.
10389         * config/powerpc/aix.mh: Likewise.
10390         * config/powerpc/fbsd.mh: Likewise.
10391         * config/powerpc/linux.mh: Likewise.
10392         * config/powerpc/nbsd.mh: Likewise.
10393         * config/powerpc/obsd.mh: Likewise.
10394         * config/powerpc/ppc64-linux.mh: Likewise.
10395         * config/powerpc/spu-linux.mh: Likewise.
10396         * config/s390/linux.mh: Likewise.
10397         * config/sh/nbsd.mh: Likewise.
10398         * config/sparc/fbsd.mh: Likewise.
10399         * config/sparc/linux.mh: Likewise.
10400         * config/sparc/linux64.mh: Likewise.
10401         * config/sparc/nbsd64.mh: Likewise.
10402         * config/sparc/nbsdelf.mh: Likewise.
10403         * config/sparc/obsd64.mh: Likewise.
10404         * config/sparc/sol2.mh: Likewise.
10405         * config/tilegx/linux.mh: Likewise.
10406         * config/vax/nbsdelf.mh: Likewise.
10407         * config/vax/obsd.mh: Likewise.
10408         * config/xtensa/linux.mh: Likewise.
10409         * config/i386/i386gnu.mn: New file, with excerpts from
10410         "config/i386/i386gnu.mh".
10411         * configure: Regenerate.
10412         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10413         *.mh files under "gdb/config".
10414         * configure.nat: New file, with contents from the
10415         "gdb/config/*/*.mh" files.
10416
10417 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
10418
10419         * btrace.c (btrace_clear): Free insn vector.
10420
10421 2017-05-05  Pedro Alves  <palves@redhat.com>
10422
10423         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10424         * configure: Regenerate.
10425
10426 2017-05-04  Pedro Alves  <palves@redhat.com>
10427
10428         * Makefile.in (SFILES): Add progspace-and-thread.c.
10429         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10430         (COMMON_OBS): Add progspace-and-thread.o.
10431         * breakpoint.c: Include "progspace-and-thread.h".
10432         (update_inserted_breakpoint_locations)
10433         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10434         Use scoped_restore_current_pspace_and_thread.
10435         (create_std_terminate_master_breakpoint): Use
10436         scoped_restore_current_program_space.
10437         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10438         (print_breakpoint_location): Use
10439         scoped_restore_current_program_space.
10440         (bp_loc_is_permanent): Use
10441         scoped_restore_current_pspace_and_thread.
10442         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10443         (download_tracepoint_locations): Use
10444         scoped_restore_current_pspace_and_thread.
10445         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10446         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10447         (enum step_over_calls_kind): Moved from inferior.h.
10448         (class scoped_restore_current_thread): New class.
10449         * gdbthread.h (make_cleanup_restore_current_thread): Delete
10450         declaration.
10451         (scoped_restore_current_thread): New class.
10452         * infcmd.c: Include "common/gdb_optional.h".
10453         (continue_1, proceed_after_attach): Use
10454         scoped_restore_current_thread.
10455         (notice_new_inferior): Use scoped_restore_current_thread.
10456         * inferior.c: Include "progspace-and-thread.h".
10457         (restore_inferior, save_current_inferior): Delete.
10458         (add_inferior_command, clone_inferior_command): Use
10459         scoped_restore_current_pspace_and_thread.
10460         * inferior.h (scoped_restore_current_inferior): New class.
10461         * infrun.c: Include "progspace-and-thread.h" and
10462         "common/gdb_optional.h".
10463         (follow_fork_inferior): Use
10464         scoped_restore_current_pspace_and_thread.
10465         (scoped_restore_exited_inferior): New class.
10466         (handle_vfork_child_exec_or_exit): Use
10467         scoped_restore_exited_inferior,
10468         scoped_restore_current_pspace_and_thread,
10469         scoped_restore_current_thread and scoped_restore.
10470         (fetch_inferior_event): Use scoped_restore_current_thread.
10471         * linespec.c (decode_line_full, decode_line_1): Use
10472         scoped_restore_current_program_space.
10473         * mi/mi-main.c: Include "progspace-and-thread.h".
10474         (exec_continue): Use scoped_restore_current_thread.
10475         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10476         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10477         * proc-service.c (ps_pglobal_lookup): Use
10478         scoped_restore_current_program_space.
10479         * progspace-and-thread.c: New file.
10480         * progspace-and-thread.h: New file.
10481         * progspace.c (release_program_space, clone_program_space): Use
10482         scoped_restore_current_program_space.
10483         (restore_program_space, save_current_program_space)
10484         (save_current_space_and_thread): Delete.
10485         (switch_to_program_space_and_thread): Moved to
10486         progspace-and-thread.c.
10487         * progspace.h (save_current_program_space)
10488         (save_current_space_and_thread): Delete declarations.
10489         (scoped_restore_current_program_space): New class.
10490         * remote.c (remote_btrace_maybe_reopen): Use
10491         scoped_restore_current_thread.
10492         * symtab.c: Include "progspace-and-thread.h".
10493         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10494         * thread.c (print_thread_info_1): Use
10495         scoped_restore_current_thread.
10496         (struct current_thread_cleanup): Delete.
10497         (do_restore_current_thread_cleanup)
10498         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10499         (scoped_restore_current_thread::~scoped_restore_current_thread):
10500         ... this new dtor.
10501         (make_cleanup_restore_current_thread): Rename/convert to ...
10502         (scoped_restore_current_thread::scoped_restore_current_thread):
10503         ... this new ctor.
10504         (thread_apply_all_command): Use scoped_restore_current_thread.
10505         (thread_apply_command): Use scoped_restore_current_thread.
10506         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10507         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10508
10509 2017-05-04  Pedro Alves  <palves@redhat.com>
10510
10511         * thread.c (make_cleanup_restore_current_thread): Move
10512         find_thread_ptid call before the is_stopped call.  Assert that the
10513         thread is found.  Replace is_stopped call by checking the thread's
10514         state directly.  Remove unnecessary NULL-thread check.
10515
10516 2017-05-04  Pedro Alves  <palves@redhat.com>
10517
10518         * corelow.c (thread_section_name): New class.
10519         (get_core_register_section, get_core_siginfo): Use it.
10520
10521 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10522
10523         * corelow.c (sniff_core_bfd): Remove extra semicolon.
10524         (get_core_register_section): Remove xfree of NULL pointer.
10525
10526 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
10527
10528         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10529         * regcache.c (regcache::raw_supply_zeroed): New function.
10530         * regcache.h (regcache::raw_supply_zeroed): New declaration.
10531
10532 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10533
10534         * gdbarch.sh: Remove commented out definition of
10535         TARGET_CHAR_BIT.
10536         * gdbarch.h: Re-generate.
10537
10538 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
10539
10540         * configure: Regenerate.
10541
10542 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
10543
10544         * solib-target.c (solib_target_relocate_section_addresses):
10545         Remove num_section_bases, num_bases, segment_bases variables.
10546
10547 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10548
10549         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10550
10551 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10552
10553         * solib-target.c: Include <vector>
10554         (struct lm_info_target) <~lm_info_target>: Remove.
10555         <segment_bases, section_bases>: Change type to
10556         std::vector<CORE_ADDR>.
10557         (library_list_start_segment, library_list_start_section,
10558         library_list_end_library,
10559         solib_target_relocate_section_addresses): Adjust.
10560
10561 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10562
10563         * gdbarch.sh (software_single_step): Change return type to
10564         std::vector<CORE_ADDR>.
10565         * gdbarch.c, gdbarch.h: Re-generate.
10566         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10567         Adjust.
10568         (arm_deal_with_atomic_sequence_raw): Adjust.
10569         (thumb_get_next_pcs_raw): Adjust.
10570         (arm_get_next_pcs_raw): Adjust.
10571         (arm_get_next_pcs): Adjust.
10572         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10573         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10574         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10575         (alpha_software_single_step): Adjust.
10576         * alpha-tdep.h (alpha_software_single_step): Adjust.
10577         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10578         * arm-tdep.c (arm_software_single_step): Adjust.
10579         (arm_breakpoint_kind_from_current_state): Adjust.
10580         * arm-tdep.h (arm_software_single_step): Adjust.
10581         * breakpoint.c (insert_single_step_breakpoint): Adjust.
10582         * cris-tdep.c (cris_software_single_step): Adjust.
10583         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10584         (micromips_deal_with_atomic_sequence): Adjust.
10585         (deal_with_atomic_sequence): Adjust.
10586         (mips_software_single_step): Adjust.
10587         * mips-tdep.h (mips_software_single_step): Adjust.
10588         * moxie-tdep.c (moxie_software_single_step): Adjust.
10589         * nios2-tdep.c (nios2_software_single_step): Adjust.
10590         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10591         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10592         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10593         * s390-linux-tdep.c (s390_software_single_step): Adjust.
10594         * sparc-tdep.c (sparc_software_single_step): Adjust.
10595         * spu-tdep.c (spu_software_single_step): Adjust.
10596         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10597
10598 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10599
10600         * gdbarch.sh: Use semi-colon as field separator instead of colon.
10601         * gdbarch.h: Re-generate.
10602
10603 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10604
10605         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10606         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10607         * python/py-instruction.c, python/py-instruction.h: New file.
10608         * python/py-record.c: Add py-instruction.h include.
10609         (gdbpy_initialize_record): Make gdb.Instruction a super class of
10610         gdb.RecordInstruction.
10611         * python/python-internal.h: Add gdbpy_initialize_instruction
10612         declaration.
10613         * python/python.c (do_start_initialization): Add
10614         gdbpy_initialize_instruction.
10615
10616 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10617
10618         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10619         Remove.
10620         (btrace_func_from_recpy_func): New function.
10621         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10622         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10623         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10624         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10625         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10626         Also, use new helper functions.
10627         (btpy_list_item): Use new helper functions.
10628         (recpy_bt_function_call_history): Use new type name.
10629         (btpy_call_getset): Remove.
10630         (gdbpy_initialize_btrace): Remove code to initialize
10631         gdb.BtraceFunctionCall.
10632         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10633         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10634         recpy_bt_func_prev, recpy_bt_func_next): New export.
10635         * python/py-record.c (recpy_func_type): New static object.
10636         (recpy_func_new, recpy_func_level, recpy_func_symbol,
10637         recpy_func_instructions, recpy_func_up, recpy_func_prev,
10638         recpy_func_next): New function.
10639         (recpy_element_hash, recpy_element_richcompare): Updated comment.
10640         (recpy_func_getset): New static object.
10641         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10642         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10643
10644 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10645
10646         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10647         (btpy_object, btpy_insn_type, btpy_new): Remove.
10648         (btpy_list_object): Use gdb.RecordInstruction type instead of
10649         gdb.BtraceInstruction type.
10650         (btrace_insn_from_recpy_insn): New function.
10651         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10652         btpy_new.
10653         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10654         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10655         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10656         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10657         instead of btpy_object.
10658         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10659         btpy_insn_data, btpy_insn_decode): Rename to ...
10660         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10661         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10662         recpy_bt_insn_decode): This.  Also, use new helper functions.
10663         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10664         recpy_insn_type.
10665         (btpy_insn_getset): Remove.
10666         (gdbpy_initialize_btrace): Remove code to initialize
10667         gdb.BtraceInstruction.  Use recpy_element_object.
10668         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10669         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10670         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10671         * python/py-record.c (recpy_insn_type): New static object.
10672         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10673         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10674         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10675         New function.
10676         (recpy_insn_getset): New static object.
10677         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10678         * python/py-record.h (recpy_element_object): New typedef.
10679         (recpy_insn_type, recpy_insn_new): New export.
10680
10681 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10682
10683         * py-record-btrace.c (btpy_insn_new): Removed.
10684         (btpy_insn_or_gap_new): New function.
10685         (btpy_insn_error): Removed.
10686         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10687         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10688         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10689         btpy_insn_or_gap_new instead of btpy_insn_new.
10690         (btpy_insn_getset): Remove btpy_insn_error.
10691         * py-record.c (recpy_gap_type): New static object.
10692         (recpy_gap_object): New typedef.
10693         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10694         recpy_gap_reason_string): New function.
10695         (recpy_gap_getset): New static object.
10696         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10697         * py-record.h (recpy_gap_new): New export.
10698
10699 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10700
10701         * python/py-record.c (recpy_ptid): Remove.
10702         (recpy_record_getset): Remove recpy_ptid.
10703
10704 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10705
10706         * btrace.c (btrace_fetch): Set inferior_ptid.
10707         * python/py-record-btrace.c: Add "py-record.h" include.
10708         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10709         recpy_bt_end, recpy_bt_instruction_history,
10710         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10711         in gdb.Record object instead of current ptid.
10712         * python/py-record.c: Include new "py-record.h" file.
10713         (recpy_record_object): Moved to py-record.h.
10714         * python/py-record.h: New file.
10715
10716 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10717
10718         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10719         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10720         indentation.
10721
10722 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
10723
10724         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10725         the past maintainers section.
10726
10727 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10728
10729         * infcmd.c (get_return_value): Use regcache ctor, and remove
10730         cleanup.
10731
10732 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10733             Pedro Alves  <palves@redhat.com>
10734
10735         * regcache.c (regcache::regcache): New tag dispatch ctor.
10736         (do_cooked_read): Moved above.
10737         (regcache_dup): Use the tag dispatch ctor..
10738         * regcache.h (regcache): Declare ctor, delete copy ctor and
10739         assignment operator, remove friend regcache_dup.
10740
10741 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10742
10743         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10744         call method save instead of regcache_cpy.
10745         * regcache.h (struct regcache): Make regcache_dup a friend.
10746
10747 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10748
10749         * regcache.c (struct regcache): Move to regcache.h
10750         (regcache::arch): New method.
10751         (regcache_get_ptid): Update.
10752         (get_regcache_arch): Call arch method.
10753         (get_regcache_aspace): Call method aspace.
10754         (register_buffer): Change it to method.
10755         (regcache_save): Change it to regcache::save.
10756         (regcache_restore): Likewise.
10757         (regcache_cpy_no_passthrough): Remove the declaration.
10758         (regcache_cpy): Call methods restore and cpy_no_passthrough.
10759         (regcache_cpy_no_passthrough): Change it to method
10760         cpy_no_passthrough.
10761         (regcache_register_status): Change it to method
10762         get_register_status.
10763         (regcache_invalidate): Change it to method invalidate.
10764         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10765         (regcache_raw_update): Change it to method raw_update.
10766         (regcache_raw_read): Likewise.
10767         (regcache_raw_read_signed): Likewise.
10768         (regcache_raw_read_unsigned): Likewise.
10769         (regcache_raw_write_signed): Likewise.
10770         (regcache_raw_write_unsigned): Likewise.
10771         (regcache_cooked_read): Likewise.
10772         (regcache_cooked_read_value): Likewise.
10773         (regcache_cooked_read_signed): Likewise.
10774         (regcache_cooked_read_unsigned): Likewise.
10775         (regcache_cooked_write_signed): Likewise.
10776         (regcache_cooked_write_unsigned): Likewise.
10777         (regcache_raw_set_cached_value): Likewise.
10778         (regcache_raw_write): Likewise.
10779         (regcache_cooked_write): Likewise.
10780         (regcache_xfer_part): Likewise.
10781         (regcache_raw_read_part): Likewise.
10782         (regcache_raw_write_part): Likewise.
10783         (regcache_cooked_read_part): Likewise.
10784         (regcache_cooked_write_part): Likewise.
10785         (regcache_raw_supply): Likewise.
10786         (regcache_raw_collect): Likewise.
10787         (regcache_transfer_regset): Likewise.
10788         (regcache_supply_regset): Likewise.
10789         (regcache_collect_regset): Likewise.
10790         (regcache_debug_print_register): Likewise.
10791         (enum regcache_dump_what): Move it to regcache.h.
10792         (regcache_dump): Change it to method dump.
10793         * regcache.h (enum regcache_dump_what): New.
10794         (class regcache): New.
10795         * target.c (target_fetch_registers): Call method
10796         debug_print_register.
10797         (target_store_registers): Likewise.
10798
10799 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10800
10801         * windows-nat.c (struct lm_info_windows): Initialize field.
10802         (windows_make_so): Allocate lm_info_windows with new.
10803         (windows_free_so): Free lm_info_windows with delete.
10804
10805 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10806
10807         * solib-darwin.c (struct lm_info_darwin): Initialize field.
10808         (darwin_current_sos): Allocate lm_info_darwin with new, remove
10809         cleanup.
10810         (darwin_free_so): Free lm_info_darwin with delete.
10811
10812 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10813
10814         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
10815         <l_addr_p>: Change type to bool.
10816         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
10817         (svr4_free_so): Free lm_info_svr4 with delete.
10818         (svr4_copy_library_list): Replace memcpy with call to copy
10819         constructor.
10820         (library_list_start_library, svr4_default_sos): Allocate
10821         lm_info_svr4 with new.
10822
10823 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10824
10825         * solib-target.c (struct lm_info_target): Add destructor,
10826         initialize fields.
10827         <name>: Change type to std::string.
10828         (library_list_start_library): Allocate lm_info_target with new.
10829         (solib_target_free_library_list): Free lm_info_target with
10830         delete.
10831         (solib_target_current_sos): Adapt to std::string.
10832         (solib_target_free_so): Free lm_info_target with delete.
10833
10834 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10835
10836         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
10837         fields.
10838         (frv_current_sos): Allocate lm_info_frv with new.
10839         (frv_relocate_main_executable): Free lm_info_frv with delete,
10840         allocate with new.
10841         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
10842
10843 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10844
10845         * solib-frv.c (struct lm_info_frv): Fix indentation.
10846
10847 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10848
10849         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
10850         map field.
10851         (dsbt_current_sos): Allocate lm_info_dsbt with new.
10852         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
10853         and allocate with new.
10854         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
10855
10856 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10857
10858         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
10859         <filename, member_name>: Change type to std::string.
10860         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
10861         (library_list_start_library): Allocate lm_info_aix with new.
10862         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
10863         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
10864         with copy constructor.
10865
10866 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10867
10868         * solist.h (struct lm_info): Remove.
10869         (struct lm_info_base): New class.
10870         (struct so_list) <lm_info>: Change type to lm_info_base *.
10871         * nto-tdep.c (struct lm_info): Remove.
10872         (lm_addr): Adjust.
10873         * solib-aix.c (struct lm_info): Rename to ...
10874         (struct lm_info_aix): ... this.  Extend lm_info_base.
10875         (lm_info_p): Rename to ...
10876         (lm_info_aix_p): ... this, and adjust.
10877         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
10878         solib_aix_parse_libraries, library_list_start_library,
10879         solib_aix_free_library_list, solib_aix_parse_libraries,
10880         solib_aix_get_library_list,
10881         solib_aix_relocate_section_addresses, solib_aix_free_so,
10882         solib_aix_get_section_offsets,
10883         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
10884         Adjust.
10885         (struct solib_aix_inferior_data) <library_list>: Adjust.
10886         * solib-darwin.c (struct lm_info): Rename to ...
10887         (struct lm_info_darwin): ... this.  Extend lm_info_base.
10888         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
10889         * solib-dsbt.c (struct lm_info): Rename to ...
10890         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
10891         (struct dsbt_info) <main_executable_lm_info): Adjust.
10892         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
10893         dsbt_relocate_section_addresses): Adjust.
10894         * solib-frv.c (struct lm_info): Rename to ...
10895         (struct lm_info_frv): ... this.  Extend lm_info_base.
10896         (main_executable_lm_info): Adjust.
10897         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
10898         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
10899         find_canonical_descriptor_in_load_object,
10900         frv_fdpic_find_canonical_descriptor): Adjust.
10901         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10902         to lm_info_svr4.
10903         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10904         svr4_clear_so, svr4_copy_library_list,
10905         library_list_start_library, svr4_default_sos, svr4_read_so_list,
10906         svr4_current_sos, svr4_fetch_objfile_link_map,
10907         solist_update_incremental): Adjust.
10908         * solib-svr4.h (struct lm_info_svr4): Move here from
10909         solib-svr4.c.
10910         * solib-target.c (struct lm_info): Rename to ...
10911         (struct lm_info_target): ... this.  Extend lm_info_base.
10912         (lm_info_p): Rename to ...
10913         (lm_info_target_p): ... this.
10914         (solib_target_parse_libraries, library_list_start_segment,
10915         library_list_start_section, library_list_start_library,
10916         library_list_end_library, solib_target_free_library_list,
10917         solib_target_current_sos, solib_target_free_so,
10918         solib_target_relocate_section_addresses): Adjust.
10919         * windows-nat.c (struct lm_info): Rename to ...
10920         (struct lm_info_windows): ... this.  Extend lm_info_base.
10921         (windows_make_so, handle_load_dll, handle_unload_dll,
10922         windows_xfer_shared_libraries): Adjust.
10923
10924 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10925
10926         * solib-darwin.c (struct darwin_so_list): Remove.
10927         (darwin_current_sos): Allocate an so_list object instead of a
10928         darwin_so_list, separately allocate an lm_info object.
10929         (darwin_free_so): Free lm_info.
10930
10931 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
10932
10933         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
10934         with fprintf_filtered.
10935
10936 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10937
10938         * regcache.c (regcache::regcache): New function.
10939         (regcache::~regcache): New function.
10940         (regcache_xmalloc_1): Remove.
10941         (regcache_xmalloc): Call new regcache.
10942         (regcache_xfree): Call delete regcache.
10943         (get_thread_arch_aspace_regcache): Call new regcache.
10944
10945 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10946
10947         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
10948         lwp instead of ptid_get_lwp.
10949
10950 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10951
10952         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
10953         lwp_info instead of getting from inferior_ptid.
10954
10955 2017-04-27  Keith Seitz  <keiths@redhat.com>
10956
10957         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
10958         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
10959         (CV_CONVERSION_BADNESS): Define.
10960         (rank_one_type): Remove overly restrictive rvalue reference
10961         rank checks.
10962         Add cv-qualifier checks and subranks for type equality.
10963         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
10964         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
10965         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
10966
10967 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
10968
10969         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
10970         count when creating the object.
10971
10972 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
10973             Ulrich Weigand  <uweigand@de.ibm.com>
10974
10975         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
10976         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
10977         is used in AIX.
10978         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
10979         (process_xcoff_symbol): Likewise.
10980         (scan_xcoff_symtab): Likewise.
10981
10982 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10983
10984         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
10985         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
10986         (ia64_access_reg): Use get_frame_register_unsigned.
10987         (ia64_access_rse_reg): Likewise.
10988         (ia64_libunwind_frame_prev_register): Likewise.
10989
10990 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
10991
10992         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
10993         * gdbarch.c: Regenerated.
10994         * gdbarch.h: Regenerated.
10995         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
10996         visibility external.
10997         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
10998         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
10999         (enum cfa_how_kind): Move to ...
11000         (struct dwarf2_frame_state_reg_info): Likewise.
11001         (struct dwarf2_frame_state): Likewise.
11002         * dwarf2-frame.h: ... here.
11003         (dwarf2_frame_state_alloc_regs): New declaration.
11004         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11005         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11006
11007 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11008
11009         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11010         regcache_raw_read_unsigned.
11011         (xtensa_pseudo_register_write): Likewise.
11012
11013 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11014
11015         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11016         (nds32_pseudo_register_write): Likewise.
11017
11018 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11019
11020         * regcache.c (struct regcache) <readonly_p>: Change its type
11021         to bool.
11022         (regcache_xmalloc_1): Update parameter type and callers update.
11023
11024 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11025
11026         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11027         set_gdbarch_wchar_bit.
11028         * arm-tdep.c (arm_gdbarch_init): Likewise.
11029
11030 2017-04-25  Pedro Alves  <palves@redhat.com>
11031
11032         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11033         (BothAreRelocatable, memcopy, memmove): Don't define.
11034         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11035         macros.
11036
11037 2017-04-25  Pedro Alves  <palves@redhat.com>
11038
11039         * common/common-defs.h: Include "common/poison.h".
11040         * common/function-view.h: (Not, Or, Requires): Move to traits.h
11041         and adjust.
11042         * common/poison.h: New file.
11043         * common/traits.h: Include <type_traits>.
11044         (Not, Or, Requires): New, moved from common/function-view.h.
11045
11046 2017-04-25  Pedro Alves  <palves@redhat.com>
11047
11048         * breakpoint.h (struct breakpoint): In-class initialize all
11049         fields.  Make boolean fields "bool".
11050         * breakpoint.c (init_raw_breakpoint_without_location): Remove
11051         memset call and initializations no longer necessary.
11052
11053 2017-04-25  Pedro Alves  <palves@redhat.com>
11054
11055         * btrace.c (pt_btrace_insn_flags): Change parameter type to
11056         reference.
11057         (pt_btrace_insn): New function.
11058         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11059
11060 2017-04-25  Pedro Alves  <palves@redhat.com>
11061
11062         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
11063         "base" field and inherit from "bp_location" instead.  Add
11064         non-default ctor.
11065         (allocate_location_exception): Use new non-default ctor.
11066         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11067         (init_bp_location): Convert to ...
11068         (bp_location::bp_location): ... this new ctor, and remove memset
11069         call.
11070         (base_breakpoint_allocate_location): Use the new non-default ctor.
11071         * breakpoint.h (bp_location): Now a class.  Declare default and
11072         non-default ctors.  In-class initialize all members.
11073         (init_bp_location): Remove declaration.
11074
11075 2017-04-25  Pedro Alves  <palves@redhat.com>
11076
11077         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11078         assignment operator.
11079
11080 2017-04-24  Yao Qi  <yao.qi@linaro.org>
11081
11082         * doublest.c (convert_doublest_to_floatformat): Call
11083         floatformat_totalsize_bytes.
11084
11085 2017-04-22  Tom Tromey  <tom@tromey.com>
11086
11087         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11088         ui_out_emit_list.
11089         * stack.c (print_frame): Use ui_out_emit_list.
11090         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11091         ui_out_emit_list.
11092         * mi/mi-main.c (print_one_inferior)
11093         (mi_cmd_data_list_register_names)
11094         (mi_cmd_data_list_register_values, mi_cmd_list_features)
11095         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11096         ui_out_emit_list.
11097         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11098         (mi_output_solib_attribs): Use ui_out_emit_list,
11099         ui_out_emit_tuple.
11100         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11101         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11102         (mi_cmd_stack_list_args, list_args_or_locals): Use
11103         ui_out_emit_list.
11104         * disasm.c (do_assembly_only): Use ui_out_emit_list.
11105         * breakpoint.c (print_solib_event, output_thread_groups): Use
11106         ui_out_emit_list.
11107
11108 2017-04-22  Tom Tromey  <tom@tromey.com>
11109
11110         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11111         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11112         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11113
11114 2017-04-22  Tom Tromey  <tom@tromey.com>
11115
11116         * tracepoint.c (tvariables_info_1)
11117         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11118
11119 2017-04-22  Tom Tromey  <tom@tromey.com>
11120
11121         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11122         annotate_arg_emitter.
11123         * breakpoint.c (print_mention_watchpoint)
11124         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11125         * annotate.h (struct annotate_arg_emitter): New.
11126
11127 2017-04-22  Tom Tromey  <tom@tromey.com>
11128
11129         * record-btrace.c (record_btrace_insn_history)
11130         (record_btrace_insn_history_range, record_btrace_call_history)
11131         (record_btrace_call_history_range): Use ui_out_emit_tuple.
11132         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11133         ui_out_emit_tuple.
11134         * stack.c (print_frame_info): Use ui_out_emit_tuple.
11135         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11136         * skip.c (skip_info): Use ui_out_emit_tuple.
11137         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11138         * progspace.c (print_program_space): Use ui_out_emit_tuple.
11139         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11140         * osdata.c (info_osdata): Use ui_out_emit_tuple.
11141         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11142         ui_out_emit_tuple.
11143         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11144         (output_register, mi_cmd_data_read_memory)
11145         (mi_cmd_data_read_memory_bytes, mi_load_progress)
11146         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11147         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11148         Use ui_out_emit_tuple.
11149         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11150         ui_out_emit_tuple.
11151         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11152         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11153         * linux-thread-db.c (info_auto_load_libthread_db): Use
11154         ui_out_emit_tuple.
11155         * inferior.c (print_inferior): Use ui_out_emit_tuple.
11156         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11157         * disasm.c (do_mixed_source_and_assembly_deprecated)
11158         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11159         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11160         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11161         * breakpoint.c (print_one_breakpoint_location)
11162         (print_one_breakpoint): Use ui_out_emit_tuple.
11163         * auto-load.c (print_script, info_auto_load_cmd): Use
11164         ui_out_emit_tuple.
11165         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11166
11167 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
11168
11169         * thread.c (print_thread_info_1): Remove dead code.
11170
11171 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11172
11173         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11174         GDB_SELF_TEST.
11175         * arm-tdep.c (selftests::arm_record_test): Likewise.
11176
11177 2017-04-21  Yao Qi  <yao.qi@linaro.org>
11178
11179         * regcache.c (regcache_restore): Remove argument 2.  Replace
11180         argument 3 with regcache.  Get register status from
11181         src->register_status and get register contents from
11182         register_buffer (src, regnum).
11183         (regcache_cpy): Update.
11184
11185 2017-04-19  Pedro Alves  <palves@redhat.com>
11186
11187         * gdbthread.h (thread): Add missing closing parenthesis in
11188         comment.
11189
11190 2017-04-19  Pedro Alves  <palves@redhat.com>
11191
11192         * common/refcounted-object.h: New file.
11193         * gdbthread.h: Include "common/refcounted-object.h".
11194         (thread_info): Inherit from refcounted_object and add comments.
11195         (thread_info::incref, thread_info::decref)
11196         (thread_info::m_refcount): Delete.
11197         (thread_info::deletable): Use the refcounted_object::refcount()
11198         method.
11199         * inferior.c (current_inferior_): Add comment.
11200         (set_current_inferior): Increment/decrement refcounts.
11201         (prune_inferiors, remove_inferior_command): Skip inferiors marked
11202         not-deletable instead of comparing with the current inferior.
11203         (initialize_inferiors): Increment the initial inferior's refcount.
11204         * inferior.h (struct inferior): Forward declare.
11205         Include "common/refcounted-object.h".
11206         (current_inferior, set_current_inferior): Move declaration to
11207         before struct inferior's definition, and fix comment.
11208         (inferior): Inherit from refcounted_object.  Add comments.
11209         * thread.c (switch_to_thread_no_regs): Reference the thread's
11210         inferior pointer directly instead of doing a ptid lookup.
11211         (switch_to_no_thread): New function.
11212         (switch_to_thread(thread_info *)): New function, factored out
11213         from ...
11214         (switch_to_thread(ptid_t)): ... this.
11215         (restore_current_thread): Delete.
11216         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11217         fields, and add 'inf' field.
11218         (do_restore_current_thread_cleanup): Check whether old->inf is
11219         alive instead of looking up an inferior by ptid.  Use
11220         switch_to_thread and switch_to_no_thread.
11221         (restore_current_thread_cleanup_dtor): Use old->inf directly
11222         instead of lookup up an inferior by id.  Decref the inferior.
11223         Don't restore 'removable'.
11224         (make_cleanup_restore_current_thread): Same the inferior pointer
11225         in old, instead of the inferior number.  Incref the inferior.
11226         Don't save/clear 'removable'.
11227
11228 2017-04-19  Pedro Alves  <palves@redhat.com>
11229
11230         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11231         unittests/scoped_restore-selftests.c.
11232         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11233         * common/scoped_restore.h (scoped_restore_base): Make "class".
11234         (scoped_restore_base::release): New public method.
11235         (scoped_restore_base::scoped_restore_base): New protected ctor.
11236         (scoped_restore_base::m_saved_var): New protected field.
11237         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11238         scoped_restore_base base class instead of m_saved_var directly.
11239         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11240         (scoped_restore_tmpl::scoped_restore_tmpl(const
11241         scoped_restore_tmpl<T>&)): Likewise.
11242         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11243         method.
11244         (scoped_restore_tmpl::saved_var): New method.
11245         (scoped_restore_tmpl::m_saved_var): Delete.
11246         * inferior.h (inferior::detaching): Now a bool.
11247         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11248         cleanup.
11249         * unittests/scoped_restore-selftests.c: New file.
11250
11251 2017-04-19  Pedro Alves  <palves@redhat.com>
11252
11253         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11254         Re-sort in alphabetic order.
11255
11256 2017-04-18  Pedro Alves  <palves@redhat.com>
11257
11258         * xml-support.c (obstack_xml_printf): Delete.
11259         * xml-support.h (obstack_xml_printf): Delete.
11260
11261 2017-04-18  Pedro Alves  <palves@redhat.com>
11262
11263         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11264         vdebug, verror, body_text, start_element, end_element, name,
11265         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11266         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11267         is_xinclude>: Make private and add m_ prefix.
11268         (gdb_xml_parser::body_text): New method, based on ...
11269         (gdb_xml_body_text): ... this.  Adjust.
11270         (gdb_xml_parser::vdebug): New method, based on ...
11271         (gdb_xml_debug): ... this.  Adjust.
11272         (gdb_xml_parser::verror): New method, based on ...
11273         (gdb_xml_error): ... this.  Adjust.
11274         (gdb_xml_parser::start_element): New method, based on ...
11275         (gdb_xml_start_element): ... this.  Adjust.
11276         (gdb_xml_start_element_wrapper): Defer to
11277         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11278         (gdb_xml_parser::end_element): New method, based on ...
11279         (gdb_xml_end_element_wrapper): ... this.  Adjust.
11280         (gdb_xml_parser::~gdb_xml_parser): Adjust.
11281         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11282         (gdb_xml_parser::use_dtd): New method, based on ...
11283         (gdb_xml_use_dtd): ... this.  Adjust.
11284         (gdb_xml_parser::parse): New method, based on ...
11285         (gdb_xml_parse): ... this.  Adjust.
11286         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11287         (xinclude_start_include): Adjust to call the parser's name method.
11288         (xml_xinclude_default, xml_xinclude_start_doctype)
11289         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11290         method.
11291         (xml_process_xincludes): Adjust to call parser methods.
11292         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11293         declarations.
11294
11295 2017-04-18  Pedro Alves  <palves@redhat.com>
11296
11297         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11298         gdb::optional<std::string>.
11299         * xml-support.c: Include <string>.
11300         (scope_level::scope_level(scope_level &&))
11301         (scope_level::~scope_level): Delete.
11302         (scope_level::body): Now a std::string.
11303         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11304         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11305         parameter.
11306         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11307         (xinclude_parsing_data::output): Now a std::string reference.
11308         (xinclude_start_include): Adjust.
11309         (xml_xinclude_default): Adjust.
11310         (xml_process_xincludes): Add 'output' parameter, and return bool.
11311         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11312         and return bool.
11313         * xml-tdesc.c: Include <unordered_map> and <string>.
11314         (tdesc_xml_cache): Delete.
11315         (tdesc_xml_cache_s): Delete.
11316         (xml_cache): Now an std::unordered_map.
11317         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11318         (target_fetch_description_xml): Change return type to
11319         gdb::optional<std::string>, and adjust.
11320         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11321         (target_fetch_description_xml): Change return type to
11322         gdb::optional<std::string>.
11323
11324 2017-04-18  Pedro Alves  <palves@redhat.com>
11325
11326         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11327         unittests/optional-selftests.c.
11328         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11329         * unittests/optional-selftests.c: New file.
11330         * unittests/optional/assignment/1.cc: New file.
11331         * unittests/optional/assignment/2.cc: New file.
11332         * unittests/optional/assignment/3.cc: New file.
11333         * unittests/optional/assignment/4.cc: New file.
11334         * unittests/optional/assignment/5.cc: New file.
11335         * unittests/optional/assignment/6.cc: New file.
11336         * unittests/optional/assignment/7.cc: New file.
11337         * unittests/optional/cons/copy.cc: New file.
11338         * unittests/optional/cons/default.cc: New file.
11339         * unittests/optional/cons/move.cc: New file.
11340         * unittests/optional/cons/value.cc: New file.
11341         * unittests/optional/in_place.cc: New file.
11342         * unittests/optional/observers/1.cc: New file.
11343         * unittests/optional/observers/2.cc: New file.
11344
11345 2017-04-18  Pedro Alves  <palves@redhat.com>
11346
11347         * common/gdb_optional.h: Include common/traits.h.
11348         (in_place_t): New type.
11349         (in_place): New constexpr variable.
11350         (optional::optional): Remove member initialization of
11351         m_instantiated.
11352         (optional::optional(in_place_t...)): New constructor.
11353         (optional::~optional): Use reset.
11354         (optional::optional(const optional&)): New.
11355         (optional::optional(const optional&&)): New.
11356         (optional::optional(T &)): New.
11357         (optional::optional(T &&)): New.
11358         (operator::operator=(const optional &)): New.
11359         (operator::operator=(optional &&)): New.
11360         (operator::operator= (const T &))
11361         (operator::operator= (T &&))
11362         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
11363         (operator::reset): New.
11364         (operator::m_instantiated):: Add in-class initializer.
11365         * common/traits.h: Include <type_traits>.
11366         (struct And): New types.
11367
11368 2017-04-18  Pedro Alves  <palves@redhat.com>
11369
11370         * xml-support.c: Include <vector>.
11371         (scope_level::scope_level(const gdb_xml_element *))
11372         (scope_level::scope_level(scope_level&&)): New.
11373         (scope_level::~scope_level): New.
11374         (scope_level_s): Delete.
11375         (gdb_xml_parser::scopes): Now a std::vector.
11376         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11377         Use std::vector.
11378         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11379         scope cleanup code.
11380         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11381         of the scopes member.  Use std::vector::emplace_back.
11382
11383 2017-04-18  Pedro Alves  <palves@redhat.com>
11384
11385         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
11386         a bool.
11387         (gdb_xml_end_element): Change type of first parameter.
11388         (gdb_xml_cleanup): Rename to ...
11389         (gdb_xml_parser::~gdb_xml_parser): ... this.
11390         (gdb_xml_create_parser_and_cleanup): Delete with ...
11391         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11392         to this new ctor.
11393         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11394         using gdb_xml_create_parser_and_cleanup.
11395         (xinclude_parsing_data): Add ctor/dtor.
11396         (xml_xinclude_cleanup): Delete.
11397         (xml_process_xincludes): Create a local xinclude_parsing_data
11398         instead of heap-allocating one.  Create a local gdb_xml_parser
11399         instead of heap-allocating one with
11400         gdb_xml_create_parser_and_cleanup.
11401
11402 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
11403
11404         PR threads/20743
11405         * fbsd-nat.c (resume_one_thread_cb): Remove.
11406         (resume_all_threads_cb): Remove.
11407         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11408         iterate_over_threads.
11409
11410 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11411
11412         * NEWS: Create a new section for the next release branch.
11413         Rename the section of the current branch, now that it has
11414         been cut.
11415
11416 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11417
11418         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11419         * version.in: Bump version to 8.0.50.DATE-git.
11420
11421 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
11422
11423         PR gdb/21385
11424         * windows-nat.c (windows_create_inferior): Declare 'allargs'
11425         independently of the host, and fix build breakage on Cygwin.
11426
11427 2017-04-13  Pedro Alves  <palves@redhat.com>
11428
11429         * inferior.c (free_inferior): Convert to ...
11430         (inferior::~inferior): ... this dtor.
11431         (inferior::inferior): New ctor, factored out from ...
11432         (add_inferior_silent): ... here.  Allocate the inferior with a new
11433         expression.
11434         (delete_inferior): Call delete instead of free_inferior.
11435         * inferior.h (gdb_environ, continuation): Forward declare.
11436         (inferior): Now a class.  Add in-class initialization to all
11437         members.  Make boolean fields bool, except 'detaching'.
11438         (inferior::inferior): New explicit ctor.
11439         (inferior::~inferior): New.
11440
11441 2017-04-13  Pedro Alves  <palves@redhat.com>
11442
11443         * inferior.c (init_inferior_list): Delete.
11444         * inferior.h (init_inferior_list): Delete.
11445
11446 2017-04-13  Pedro Alves  <palves@redhat.com>
11447
11448         PR threads/13217
11449         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11450         (top level): Call it twice, with different thread sets.
11451
11452 2017-04-13  Pedro Alves  <palves@redhat.com>
11453
11454         * thread.c: Include <algorithm>.
11455         (thread_array_cleanup): Delete.
11456         (scoped_inc_dec_ref): New class.
11457         (live_threads_count): New function.
11458         (set_thread_refcount): Delete.
11459         (tp_array_compar_ascending): Now a bool.
11460         (tp_array_compar): Convert to a std::sort comparison function.
11461         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11462         and live_threads_count.
11463
11464 2017-04-13  Pedro Alves  <palves@redhat.com>
11465
11466         * infrun.c (follow_fork_inferior): Also switch the current
11467         inferior.
11468
11469 2017-04-13  Pedro Alves  <palves@redhat.com>
11470
11471         * breakpoint.c (watch_command_1): Save watchpoint-frame info
11472         before calling create_internal_breakpoint.
11473
11474 2017-04-13  Pedro Alves  <palves@redhat.com>
11475
11476         * fork-child.c (execv_argv): New class.
11477         (breakup_args): Refactored as ...
11478         (execv_argv::init_for_no_shell): .. this method of execv_argv.
11479         Copy arguments to storage and replace separators with NULL
11480         terminators in place.
11481         (escape_bang_in_quoted_argument): Adjust to return bool.
11482         (execv_argv::execv_argv): New ctor.
11483         (execv_argv::init_for_shell): New method, factored out from
11484         fork_inferior.  Don't strdup strings into the vector.
11485         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
11486         Remove free_vector_argv call.
11487
11488 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11489
11490         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11491         tdep->rx_psw_type.
11492
11493 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11494
11495         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11496         * rx-tdep.c (rx_gdbarch_init): Likewise.
11497
11498 2017-04-13  Pedro Alves  <palves@redhat.com>
11499
11500         * breakpoint.h (struct breakpoint): Reindent.
11501
11502 2017-04-13  Pedro Alves  <palves@redhat.com>
11503
11504         * breakpoint.c (bp_location): Rename to ...
11505         (bp_locations): ... this.  All references updated.
11506         (bp_location_count): Rename to ...
11507         (bp_locations_count): ... this.  All references updated.
11508         (bp_location_placed_address_before_address_max): Rename to ...
11509         (bp_locations_placed_address_before_address_max): ... this.  All
11510         references updated.
11511         (bp_location_shadow_len_after_address_max): Rename to ...
11512         (bp_locations_shadow_len_after_address_max): ... this.  All
11513         references updated.
11514         (bp_location_compare_addrs): Rename to ...
11515         (bp_locations_compare_addrs): ... this.  All references updated.
11516         (bp_location_compare):Rename to ...
11517         (bp_locations_compare): ... this.  All references updated.
11518         (bp_location_target_extensions_update): Rename to ...
11519         (bp_locations_target_extensions_update): ... this.  All references
11520         updated.
11521
11522 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11523
11524         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11525         * common/common.m4: Check headers 'termios.h', 'termio.h' and
11526         'sgtty.h'.
11527         * common/gdb_termios.h: New file, with parts of "terminal.h".
11528         * inflow.c: Include "gdb_termios.h".
11529         * ser-unix.c: Include "gdb_termios.h".
11530         * terminal.h: Move terminal-related defines to
11531         "common/gdb_termios.h".
11532
11533 2017-04-12  Tom Tromey  <tom@tromey.com>
11534
11535         * probe.c (parse_probes): Update.
11536         * location.h (delete_event_location): Don't declare.
11537         (event_location_deleter::operator()): Update.
11538         * location.c (event_location_deleter::operator()): Rename from
11539         delete_event_location.
11540         * linespec.h (linespec_result) <location>: Change type to
11541         event_location_up.
11542         * linespec.c (canonicalize_linespec, event_location_to_sals)
11543         (decode_objc): Update.
11544         (linespec_result): Don't call delete_event_location.
11545         * breakpoint.c (create_breakpoints_sal)
11546         (bkpt_probe_create_sals_from_location)
11547         (strace_marker_create_sals_from_location): Update.
11548
11549 2017-04-12  Tom Tromey  <tom@tromey.com>
11550
11551         * linespec.h (struct linespec_result): Add constructor and
11552         destructor.
11553         (init_linespec_result, destroy_linespec_result)
11554         (make_cleanup_destroy_linespec_result): Don't declare.
11555         * linespec.c (init_linespec_result): Remove.
11556         (linespec_result::~linespec_result): Rename from
11557         destroy_linespec_result.  Update.
11558         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11559         Remove.
11560         * breakpoint.c (create_breakpoint, break_range_command)
11561         (decode_location_default): Update.
11562         * ax-gdb.c (agent_command_1): Update.
11563
11564 2017-04-12  Tom Tromey  <tom@tromey.com>
11565
11566         * remote.c (remote_download_tracepoint): Update.
11567         * python/py-breakpoint.c (bppy_get_location): Update.
11568         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11569         (gdbscm_breakpoint_location): Update.
11570         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11571         * breakpoint.h (struct breakpoint) <location, location_range_end>:
11572         Change type to event_location_up.
11573         * breakpoint.c (create_overlay_event_breakpoint)
11574         (create_longjmp_master_breakpoint)
11575         (create_std_terminate_master_breakpoint)
11576         (create_exception_master_breakpoint)
11577         (breakpoint_event_location_empty_p, print_breakpoint_location)
11578         (print_one_breakpoint_location, create_thread_event_breakpoint)
11579         (init_breakpoint_sal, create_breakpoint)
11580         (print_recreate_ranged_breakpoint, break_range_command)
11581         (init_ada_exception_breakpoint, say_where): Update.
11582         (base_breakpoint_dtor): Don't call delete_event_location.
11583         (bkpt_print_recreate, tracepoint_print_recreate)
11584         (dprintf_print_recreate, update_static_tracepoint)
11585         (breakpoint_re_set_default): Update.
11586
11587 2017-04-12  Tom Tromey  <tom@tromey.com>
11588
11589         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11590         type of "to_do".  Update.
11591         (compute_stack_depth): Use std::vector.
11592
11593 2017-04-12  Tom Tromey  <tom@tromey.com>
11594
11595         * printcmd.c (find_instruction_backward): Use std::vector.
11596
11597 2017-04-12  Tom Tromey  <tom@tromey.com>
11598
11599         * symfile.c (objfilep): Remove typedef.
11600         (reread_symbols): Use a std::vector.
11601
11602 2017-04-12  Tom Tromey  <tom@tromey.com>
11603
11604         * mi/mi-main.c (exec_direction_forward): Remove.
11605         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11606         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11607         scoped_restore.
11608         * guile/guile.c (guile_repl_command, guile_command)
11609         (gdbscm_execute_gdb_command): Use scoped_restore.
11610         * go-exp.y (go_parse): Use scoped_restore.
11611         * d-exp.y (d_parse): Use scoped_restore.
11612         * cli/cli-decode.c (cmd_func): Use scoped_restore.
11613         * c-exp.y (c_parse): Use scoped_restore.
11614
11615 2017-04-12  Tom Tromey  <tom@tromey.com>
11616
11617         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11618         (mi_parse): Update return type.
11619         (mi_parse_free): Remove.
11620         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11621         (mi_parse::~mi_parse): Rename from mi_parse_free.
11622         (mi_parse_cleanup): Remove.
11623         (mi_parse): Return a unique_ptr.  Use new.
11624         * mi/mi-main.c (mi_execute_command): Update.
11625
11626 2017-04-12  Tom Tromey  <tom@tromey.com>
11627
11628         * location.c (explicit_location_lex_one): Return a
11629         unique_xmalloc_ptr.
11630         (string_to_explicit_location): Update.  Remove cleanups.
11631
11632 2017-04-12  Tom Tromey  <tom@tromey.com>
11633
11634         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11635         (compare_value_and_voffset): Change type.  Update.
11636         (compute_vtable_size): Change type of "offset_vec".
11637         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
11638         (gnuv3_get_typeid): Remove extraneous declaration.
11639
11640 2017-04-12  Tom Tromey  <tom@tromey.com>
11641
11642         * charset.h (wchar_iterator): Fix comment.
11643
11644 2017-04-12  Tom Tromey  <tom@tromey.com>
11645
11646         * charset.c (iconv_wrapper): New class.
11647         (cleanup_iconv): Remove.
11648         (convert_between_encodings): Use it.
11649
11650 2017-04-12  Tom Tromey  <tom@tromey.com>
11651
11652         * symfile.h (increment_reading_symtab): Update type.
11653         * symfile.c (decrement_reading_symtab): Remove.
11654         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11655         * psymtab.c (psymtab_to_symtab): Update.
11656         * dwarf2read.c (dw2_instantiate_symtab): Update.
11657
11658 2017-04-12  Tom Tromey  <tom@tromey.com>
11659
11660         * jit.c (struct jit_reader): Declare separately.  Add constructor
11661         and destructor.  Change type of "handle".
11662         (loaded_jit_reader): Define separately.
11663         (jit_reader_load): Update.  New "new".
11664         (jit_reader_unload_command): Use "delete".
11665         * gdb-dlfcn.h (struct dlclose_deleter): New.
11666         (gdb_dlhandle_up): New typedef.
11667         (gdb_dlopen, gdb_dlsym): Update types.
11668         (gdb_dlclose): Remove.
11669         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11670         (gdb_dlsym): Change type of "handle".
11671         (make_cleanup_dlclose): Remove.
11672         (dlclose_deleter::operator()): Rename from gdb_dlclose.
11673         * compile/compile-c-support.c (load_libcc): Update.
11674
11675 2017-04-12  Tom Tromey  <tom@tromey.com>
11676
11677         * symtab.h (find_pcs_for_symtab_line): Change return type.
11678         * symtab.c (find_pcs_for_symtab_line): Change return type.
11679         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11680         type of "vec".  Update.
11681         (ltpy_get_pcs_for_line): Update.
11682         * linespec.c (decode_digits_ordinary): Update.
11683
11684 2017-04-12  Tom Tromey  <tom@tromey.com>
11685
11686         * tracepoint.c (actions_command): Update.
11687         * python/python.c (python_command, python_interactive_command):
11688         Update.
11689         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11690         * guile/guile.c (guile_command): Update.
11691         * defs.h (read_command_lines, read_command_lines_1): Return
11692         command_line_up.
11693         (command_lines_deleter): New struct.
11694         (command_line_up): New typedef.
11695         * compile/compile.c (compile_code_command)
11696         (compile_print_command): Update.
11697         * cli/cli-script.h (get_command_line, copy_command_lines): Return
11698         command_line_up.
11699         (make_cleanup_free_command_lines): Remove.
11700         * cli/cli-script.c (get_command_line, read_command_lines_1)
11701         (copy_command_lines): Return command_line_up.
11702         (while_command, if_command, read_command_lines, define_command)
11703         (document_command): Update.
11704         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11705         Remove.
11706         * breakpoint.h (breakpoint_set_commands): Change type of
11707         "commands".
11708         * breakpoint.c (breakpoint_set_commands): Change type of
11709         "commands".  Update.
11710         (do_map_commands_command, update_dprintf_command_list)
11711         (create_tracepoint_from_upload): Update.
11712
11713 2017-04-12  Tom Tromey  <tom@tromey.com>
11714
11715         * tracepoint.c (scope_info): Update.
11716         * spu-tdep.c (spu_catch_start): Update.
11717         * python/python.c (gdbpy_decode_line): Update.
11718         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11719         * python/py-breakpoint.c (bppy_init): Update.
11720         * probe.c (parse_probes): Update.
11721         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11722         * location.h (event_location_deleter): New struct.
11723         (event_location_up): New typedef.
11724         (new_linespec_location, new_address_location, new_probe_location)
11725         (new_explicit_location, copy_event_location)
11726         (string_to_event_location, string_to_event_location_basic)
11727         (string_to_explicit_location): Update return type.
11728         (make_cleanup_delete_event_location): Remove.
11729         * location.c (new_linespec_location, new_address_location)
11730         (new_probe_location, new_explicit_location, copy_event_location):
11731         Return event_location_up.
11732         (delete_event_location_cleanup)
11733         (make_cleanup_delete_event_location): Remove.
11734         (string_to_explicit_location, string_to_event_location_basic)
11735         (string_to_event_location): Return event_location_up.
11736         * linespec.c (canonicalize_linespec, event_location_to_sals)
11737         (decode_line_with_current_source)
11738         (decode_line_with_last_displayed, decode_objc): Update.
11739         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11740         * completer.c (location_completer): Update.
11741         * cli/cli-cmds.c (edit_command, list_command): Update.
11742         * breakpoint.c (create_overlay_event_breakpoint)
11743         (create_longjmp_master_breakpoint)
11744         (create_std_terminate_master_breakpoint)
11745         (create_exception_master_breakpoint)
11746         (create_thread_event_breakpoint): Update.
11747         (init_breakpoint_sal): Update.  Remove some dead code.
11748         (create_breakpoint_sal): Change type of "location".  Update.
11749         (create_breakpoints_sal, create_breakpoint, break_command_1)
11750         (dprintf_command, break_range_command, until_break_command)
11751         (init_ada_exception_breakpoint)
11752         (strace_marker_create_sals_from_location)
11753         (update_static_tracepoint, trace_command, ftrace_command)
11754         (strace_command, create_tracepoint_from_upload): Update.
11755         * break-catch-throw.c (re_set_exception_catchpoint): Update.
11756         * ax-gdb.c (agent_command_1): Update.
11757
11758 2017-04-12  Pedro Alves  <palves@redhat.com>
11759
11760         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11761         * configure.tgt: Handle i[34567]86-*-go32* and
11762         i[34567]86-*-msdosdjgpp*.
11763         * i386-tdep.c (i386_svr4_reg_to_regnum):
11764         Make extern.
11765         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11766         i386-go32-tdep.c.
11767         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11768         * i386-go32-tdep.c: New file.
11769         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
11770         declarations.
11771
11772 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
11773
11774         * aix-thread.c (pd_status2str): Change return type to const char *.
11775
11776 2017-04-12  Pedro Alves  <palves@redhat.com>
11777
11778         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
11779         calls to set_gdbarch_gnu_triplet_regexp.
11780
11781 2017-04-12  Pedro Alves  <palves@redhat.com>
11782
11783         PR gdb/21323
11784         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
11785         New enum value.
11786         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
11787         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
11788         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
11789         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
11790         * gdbarch.h, gdbarch.c: Regenerate.
11791         * aarch64-tdep.c (aarch64_gdbarch_init): Override
11792         gdbarch_wchar_bit and gdbarch_wchar_signed.
11793         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
11794         * arm-tdep.c (arm_gdbarch_init): Likewise.
11795         * avr-tdep.c (avr_gdbarch_init): Likewise.
11796         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
11797         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
11798         * i386-tdep.c (i386_go32_init_abi): Likewise.
11799         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11800         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11801         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11802         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11803         * sh-tdep.c (sh_gdbarch_init): Likewise.
11804         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11805         * sparc64-tdep.c (sparc64_init_abi): Likewise.
11806         * windows-tdep.c (windows_init_abi): Likewise.
11807         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11808
11809 2017-04-12  Pedro Alves  <palves@redhat.com>
11810
11811         PR c++/21323
11812         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
11813         cplus_primitive_type_char32_t>: New enum values.
11814         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
11815         and cplus_primitive_type_char32_t.
11816         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
11817         32, use the archtecture's built-in type for char16_t and char32_t,
11818         respectively.  Otherwise, fallback to init_integer_type as before,
11819         but make the type unsigned, and issue a complaint.
11820         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
11821
11822 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
11823
11824         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
11825         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
11826
11827 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11828
11829         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
11830         'const char *'.
11831
11832 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11833
11834         * common/common-utils.c (free_vector_argv): New function.
11835         * common/common-utils.h: Include <vector>.
11836         (free_vector_argv): New prototype.
11837         * darwin-nat.c (darwin_create_inferior): Rewrite function
11838         prototype in order to constify "exec_file" and accept a
11839         "std::string" for "allargs".
11840         * fork-child.c: Include <vector>.
11841         (breakup_args): Rewrite function, using C++.
11842         (fork_inferior): Rewrite function header, constify "exec_file_arg"
11843         and accept "std::string" for "allargs".  Update the code to
11844         calculate "argv" based on "allargs".  Update calls to "exec_fun"
11845         and "execvp".
11846         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
11847         order to constify "exec_file" and accept a "std::string" for
11848         "allargs".
11849         * go32-nat.c (go32_create_inferior): Likewise.
11850         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
11851         * infcmd.c (run_command_1): Constify "exec_file".  Use
11852         "std::string" for inferior arguments.
11853         * inferior.h (fork_inferior): Update prototype.
11854         * linux-nat.c (linux_nat_create_inferior): Rewrite function
11855         prototype in order to constify "exec_file" and accept a
11856         "std::string" for "allargs".
11857         * nto-procfs.c (procfs_create_inferior): Likewise.
11858         * procfs.c (procfs_create_inferior): Likewise.
11859         * remote-sim.c (gdbsim_create_inferior): Likewise.
11860         * remote.c (extended_remote_run): Update code to accept
11861         "std::string" as argument.
11862         (extended_remote_create_inferior): Rewrite function prototype in
11863         order to constify "exec_file" and accept a "std::string" for
11864         "allargs".
11865         * rs6000-nat.c (super_create_inferior): Likewise.
11866         (rs6000_create_inferior): Likewise.
11867         * target.h (struct target_ops) <to_create_inferior>: Likewise.
11868         * windows-nat.c (windows_create_inferior): Likewise.
11869
11870 2017-04-11  Pedro Alves  <palves@redhat.com>
11871
11872         * thread.c: Fix whitespace throughout.
11873
11874 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11875
11876         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
11877
11878 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
11879
11880         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
11881
11882 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
11883
11884         PR gdb/21364
11885         * osdata.c (info_osdata): Check if 'type' is an empty string
11886         instead of NULL.
11887
11888 2017-04-10  Pedro Alves  <palves@redhat.com>
11889
11890         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
11891         (ptid_to_global_thread_id, in_thread_list)
11892         (do_captured_list_thread_ids, set_resumed, set_running)
11893         (set_executing, set_stop_requested, finish_thread_state)
11894         (validate_registers_access, can_access_registers_ptid)
11895         (print_thread_info_1, switch_to_thread)
11896         (do_restore_current_thread_cleanup)
11897         (make_cleanup_restore_current_thread, thread_command)
11898         (thread_name_command): Use operator== instead of ptid_equal.
11899
11900 2017-04-10  Pedro Alves  <palves@redhat.com>
11901
11902         * thread.c (struct current_thread_cleanup) <next>: Delete field.
11903         (current_thread_cleanup_chain): Delete.
11904         (restore_current_thread_cleanup_dtor)
11905         (make_cleanup_restore_current_thread): Remove references to
11906         current_thread_cleanup_chain.
11907
11908 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
11909
11910         * msp430-tdep.c (msp430_pseudo_register_read): Never return
11911         REG_UNKNOWN.
11912
11913 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11914
11915         PR gdb/19942
11916         * gdbthread.h (thread_info::deletable): New method.
11917         (thread_info::incref): New method.
11918         (thread_info::decref): New method.
11919         (thread_info::refcount): Move it to private.
11920         * infrun.c (save_stop_context): Call inc_refcount.
11921         (release_stop_context_cleanup): Likewise.
11922         * thread.c (set_thread_exited): New function.
11923         (init_thread_list): Delete "tp" only it is deletable, otherwise
11924         call set_thread_exited.
11925         (delete_thread_1): Call set_thread_exited.
11926         (current_thread_cleanup) <inferior_pid>: Remove.
11927         <thread>: New field.
11928         (restore_current_thread_ptid_changed): Removed.
11929         (do_restore_current_thread_cleanup): Adjust.
11930         (restore_current_thread_cleanup_dtor): Don't call
11931         find_thread_ptid.
11932         (set_thread_refcount): Use dec_refcount.
11933         (make_cleanup_restore_current_thread): Adjust.
11934         (thread_apply_all_command): Call inc_refcount.
11935         (_initialize_thread): Don't call
11936         observer_attach_thread_ptid_changed.
11937
11938 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11939
11940         * thread.c (delete_thread_1): Hoist code on marking thread as
11941         exited.
11942
11943 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11944
11945         * windows-nat.c (windows_detach): Initialize ptid with
11946         minus_one_ptid.
11947
11948 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11949
11950         * unittests/ptid-selftests.c: Fix erroneous assert messages.
11951
11952 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
11953
11954         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
11955         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
11956         (bfin_pseudo_register_write): Likewise
11957
11958 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
11959
11960         * common/ptid.h (struct ptid): Change to...
11961         (class ptid_t): ... this.
11962         <ptid_t>: New constructors.
11963         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
11964         matches>: New methods.
11965         <make_null, make_minus_one>: New static methods.
11966         <pid>: Rename to...
11967         <m_pid>: ...this.
11968         <lwp>: Rename to...
11969         <m_lwp>: ...this.
11970         <tid>: Rename to...
11971         <m_tid>: ...this.
11972         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
11973         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
11974         as references, move comment to class ptid_t.
11975         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
11976         ptid_t static methods.
11977         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
11978         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
11979         Take ptid arguments as references, implement using ptid_t methods.
11980         * unittests/ptid-selftests.c: New file.
11981         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11982         unittests/ptid-selftests.c.
11983         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
11984
11985 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
11986
11987         * python/python.c (python_run_simple_file): Cast mode literal to
11988         non-const char pointer as expected by PyFile_FromString.
11989
11990 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
11991
11992         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
11993         minus_one_ptid and null_ptid.
11994
11995 2017-04-05  Pedro Alves  <palves@redhat.com>
11996
11997         * warning.m4 (build_warnings): Remove -Wno-write-strings.
11998         * configure: Regenerate.
11999
12000 2017-04-05  Pedro Alves  <palves@redhat.com>
12001
12002         * ada-exp.y (yyerror): Constify.
12003         * ada-lang.c (bound_name, get_selections)
12004         (ada_variant_discrim_type)
12005         (ada_variant_discrim_name, ada_value_struct_elt)
12006         (ada_lookup_struct_elt_type, is_unchecked_variant)
12007         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12008         (catch_ada_exception_command_split)
12009         (catch_ada_assert_command_split, catch_assert_command)
12010         (ada_op_name): Constify.
12011         * ada-lang.h (ada_yyerror, get_selections)
12012         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12013         * arc-tdep.c (arc_print_frame_cache): Constify.
12014         * arm-tdep.c (arm_skip_stub): Constify.
12015         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12016         (gen_aggregate_elt_ref): Constify.
12017         * bcache.c (print_bcache_statistics): Constify.
12018         * bcache.h (print_bcache_statistics): Constify.
12019         * break-catch-throw.c (catch_exception_command_1):
12020         * breakpoint.c (struct ep_type_description::description):
12021         Constify.
12022         (add_solib_catchpoint): Constify.
12023         (catch_fork_command_1): Add cast.
12024         (add_catch_command): Constify.
12025         * breakpoint.h (add_catch_command, add_solib_catchpoint):
12026         Constify.
12027         * bsd-uthread.c (bsd_uthread_state): Constify.
12028         * buildsym.c (patch_subfile_names): Constify.
12029         * buildsym.h (next_symbol_text_func, patch_subfile_names):
12030         Constify.
12031         * c-exp.y (yyerror): Constify.
12032         (token::oper): Constify.
12033         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12034         * c-varobj.c (cplus_describe_child): Constify.
12035         * charset.c (find_charset_names): Add cast.
12036         (find_charset_names): Constify array and add const_cast.
12037         * cli/cli-cmds.c (complete_command, cd_command): Constify.
12038         (edit_command): Constify.
12039         * cli/cli-decode.c (lookup_cmd): Constify.
12040         * cli/cli-dump.c (dump_memory_command, dump_value_command):
12041         Constify.
12042         (struct dump_context): Constify.
12043         (add_dump_command, restore_command): Constify.
12044         * cli/cli-script.c (get_command_line): Constify.
12045         * cli/cli-script.h (get_command_line): Constify.
12046         * cli/cli-utils.c (check_for_argument): Constify.
12047         * cli/cli-utils.h (check_for_argument): Constify.
12048         * coff-pe-read.c (struct read_pe_section_data): Constify.
12049         * command.h (lookup_cmd): Constify.
12050         * common/print-utils.c (decimal2str): Constify.
12051         * completer.c (gdb_print_filename): Constify.
12052         * corefile.c (set_gnutarget): Constify.
12053         * cp-name-parser.y (yyerror): Constify.
12054         * cp-valprint.c (cp_print_class_member): Constify.
12055         * cris-tdep.c (cris_register_name, crisv32_register_name):
12056         Constify.
12057         * d-exp.y (yyerror): Constify.
12058         (struct token::oper): Constify.
12059         * d-lang.h (d_yyerror): Constify.
12060         * dbxread.c (struct header_file_location::name): Constify.
12061         (add_old_header_file, add_new_header_file, last_function_name)
12062         (dbx_next_symbol_text, add_bincl_to_list)
12063         (find_corresponding_bincl_psymtab, set_namestring)
12064         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12065         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12066         * defs.h (command_line_input, print_address_symbolic)
12067         (deprecated_readline_begin_hook): Constify.
12068         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12069         Constify.
12070         * event-top.c (handle_line_of_input): Constify and add cast.
12071         * exceptions.c (catch_errors): Constify.
12072         * exceptions.h (catch_errors): Constify.
12073         * expprint.c (print_subexp_standard, op_string, op_name)
12074         (op_name_standard, dump_raw_expression, dump_raw_expression):
12075         * expression.h (op_name, op_string, dump_raw_expression):
12076         Constify.
12077         * f-exp.y (yyerror): Constify.
12078         (struct token::oper): Constify.
12079         (struct f77_boolean_val::name): Constify.
12080         * f-lang.c (f_word_break_characters): Constify.
12081         * f-lang.h (f_yyerror): Constify.
12082         * fork-child.c (fork_inferior): Add cast.
12083         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12084         (new_variant): Constify.
12085         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12086         * gdbarch.c: Regenerate.
12087         * gdbcore.h (set_gnutarget): Constify.
12088         * go-exp.y (yyerror): Constify.
12089         (token::oper): Constify.
12090         * go-lang.h (go_yyerror): Constify.
12091         * go32-nat.c (go32_sysinfo): Constify.
12092         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12093         * guile/scm-cmd.c (cmdscm_function): Constify.
12094         * guile/scm-param.c (pascm_param_value): Constify.
12095         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12096         (h8300sx_register_name): Constify.
12097         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12098         Constify.
12099         * ia64-tdep.c (ia64_register_names): Constify.
12100         * infcmd.c (construct_inferior_arguments): Constify.
12101         (path_command, attach_post_wait): Constify.
12102         * language.c (show_range_command, show_case_command)
12103         (unk_lang_error): Constify.
12104         * language.h (language_defn::la_error)
12105         (language_defn::la_name_of_this): Constify.
12106         * linespec.c (decode_line_2): Constify.
12107         * linux-thread-db.c (thread_db_err_str): Constify.
12108         * lm32-tdep.c (lm32_register_name): Constify.
12109         * m2-exp.y (yyerror): Constify.
12110         * m2-lang.h (m2_yyerror): Constify.
12111         * m32r-tdep.c (m32r_register_names): Constify and make static.
12112         * m68hc11-tdep.c (m68hc11_register_names): Constify.
12113         * m88k-tdep.c (m88k_register_name): Constify.
12114         * macroexp.c (appendmem): Constify.
12115         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12116         (upgrade_type, parse_external, parse_partial_symbols)
12117         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12118         (new_symbol): Constify.
12119         * memattr.c (mem_info_command): Constify.
12120         * mep-tdep.c (register_name_from_keyword): Constify.
12121         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12122         Constify.
12123         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12124         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12125         * mi/mi-main.c (captured_mi_execute_command): Constify and add
12126         cast.
12127         (mi_execute_async_cli_command): Constify.
12128         * mips-tdep.c (mips_register_name): Constify.
12129         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12130         (am33_register_name, am33_2_register_name)
12131         * moxie-tdep.c (moxie_register_names): Constify.
12132         * nat/linux-osdata.c (osdata_type): Constify fields.
12133         * nto-tdep.c (nto_parse_redirection): Constify.
12134         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12135         (lookup_child_selector): Constify.
12136         (objc_methcall::name): Constify.
12137         * objc-lang.h (lookup_objc_class, lookup_child_selector)
12138         (lookup_struct_typedef): Constify.
12139         * objfiles.c (pc_in_section): Constify.
12140         * objfiles.h (pc_in_section): Constify.
12141         * p-exp.y (struct token::oper): Constify.
12142         (yyerror): Constify.
12143         * p-lang.h (pascal_yyerror): Constify.
12144         * parser-defs.h (op_name_standard): Constify.
12145         (op_print::string): Constify.
12146         (exp_descriptor::op_name): Constify.
12147         * printcmd.c (print_address_symbolic): Constify.
12148         * psymtab.c (print_partial_symbols): Constify.
12149         * python/py-breakpoint.c (stop_func): Constify.
12150         (bppy_get_expression): Constify.
12151         * python/py-cmd.c (cmdpy_completer::name): Constify.
12152         (cmdpy_function): Constify.
12153         * python/py-event.c (evpy_add_attribute)
12154         (gdbpy_initialize_event_generic): Constify.
12155         * python/py-event.h (evpy_add_attribute)
12156         (gdbpy_initialize_event_generic): Constify.
12157         * python/py-evts.c (add_new_registry): Constify.
12158         * python/py-finishbreakpoint.c (outofscope_func): Constify.
12159         * python/py-framefilter.c (get_py_iter_from_func): Constify.
12160         * python/py-inferior.c (get_buffer): Add cast.
12161         * python/py-param.c (parm_constant::name): Constify.
12162         * python/py-unwind.c (fprint_frame_id): Constify.
12163         * python/python.c (gdbpy_parameter_value): Constify.
12164         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12165         * remote.c (memory_packet_config::name): Constify.
12166         (show_packet_config_cmd, remote_write_bytes)
12167         (remote_buffer_add_string):
12168         * reverse.c (exec_reverse_once): Constify.
12169         * rs6000-tdep.c (variant::name, variant::description): Constify.
12170         * rust-exp.y (rustyyerror): Constify.
12171         * rust-lang.c (rust_op_name): Constify.
12172         * rust-lang.h (rustyyerror): Constify.
12173         * serial.h (serial_ops::name): Constify.
12174         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12175         (sh_sh3e_register_name, sh_sh2e_register_name)
12176         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12177         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12178         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12179         (sh_sh4al_dsp_register_name): Constify.
12180         * sh64-tdep.c (sh64_register_name): Constify.
12181         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12182         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12183         * stabsread.c (patch_block_stabs, read_type_number)
12184         (ref_map::stabs, ref_add, process_reference)
12185         (symbol_reference_defined, define_symbol, define_symbol)
12186         (error_type, read_type, read_member_functions, read_cpp_abbrev)
12187         (read_one_struct_field, read_struct_fields, read_baseclasses)
12188         (read_tilde_fields, read_struct_type, read_array_type)
12189         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12190         (read_huge_number, read_range_type, read_args, common_block_start)
12191         (find_name_end): Constify.
12192         * stabsread.h (common_block_start, define_symbol)
12193         (process_one_symbol, symbol_reference_defined, ref_add):
12194         * symfile.c (get_section_index, add_symbol_file_command):
12195         * symfile.h (get_section_index): Constify.
12196         * target-descriptions.c (tdesc_type::name): Constify.
12197         (tdesc_free_type): Add cast.
12198         * target.c (find_default_run_target):
12199         (add_deprecated_target_alias, find_default_run_target)
12200         (target_announce_detach): Constify.
12201         (do_option): Constify.
12202         * target.h (add_deprecated_target_alias): Constify.
12203         * thread.c (print_thread_info_1): Constify.
12204         * top.c (deprecated_readline_begin_hook, command_line_input):
12205         Constify.
12206         (init_main): Add casts.
12207         * top.h (handle_line_of_input): Constify.
12208         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12209         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12210         (tfind_command): Rename to ...
12211         (tfind_command_1): ... this and constify.
12212         (tfind_command): New function.
12213         (tfind_end_command, tfind_start_command): Adjust.
12214         (encode_source_string): Constify.
12215         * tracepoint.h (encode_source_string): Constify.
12216         * tui/tui-data.c (tui_partial_win_by_name): Constify.
12217         * tui/tui-data.h (tui_partial_win_by_name): Constify.
12218         * tui/tui-source.c (tui_set_source_content_nil): Constify.
12219         * tui/tui-source.h (tui_set_source_content_nil): Constify.
12220         * tui/tui-win.c (parse_scrolling_args): Constify.
12221         * tui/tui-windata.c (tui_erase_data_content): Constify.
12222         * tui/tui-windata.h (tui_erase_data_content): Constify.
12223         * tui/tui-winsource.c (tui_erase_source_content): Constify.
12224         * tui/tui.c (tui_enable): Add cast.
12225         * utils.c (defaulted_query): Constify.
12226         (init_page_info): Add cast.
12227         (puts_debug, subset_compare): Constify.
12228         * utils.h (subset_compare): Constify.
12229         * varobj.c (varobj_format_string): Constify.
12230         * varobj.h (varobj_format_string): Constify.
12231         * vax-tdep.c (vax_register_name): Constify.
12232         * windows-nat.c (windows_detach): Constify.
12233         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12234         * xml-support.c (gdb_xml_end_element): Constify.
12235         * xml-tdesc.c (tdesc_start_reg): Constify.
12236         * xstormy16-tdep.c (xstormy16_register_name): Constify.
12237         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12238         * xtensa-tdep.h (xtensa_register_t::name): Constify.
12239
12240 2017-04-05  Pedro Alves  <palves@redhat.com>
12241
12242         * proc-api.c (struct trans): Constify.
12243         (procfs_note): Constify.
12244         * proc-events.c (struct trans, syscall_table):
12245         * proc-flags.c (struct trans): Constify.
12246         * proc-utils.h (procfs_note): Constify.
12247         * proc-why.c (struct trans): Constify.
12248         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12249         (procfs_detach): Constify.
12250         * sol-thread.c (struct string_map): Constify.
12251         (td_err_string, td_state_string): Constify.
12252
12253 2017-04-05  Pedro Alves  <palves@redhat.com>
12254
12255         * proc-api.c (procfs_filename): Don't initialize
12256         procfs_filename.
12257         (prepare_to_trace): Assume procfs_filename is non-NULL.
12258         (_initialize_proc_api): Give procfs_filename a default value here.
12259
12260 2017-04-05  Pedro Alves  <palves@redhat.com>
12261
12262         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12263         'cond_string' parameter.
12264         (extract_exception_regexp): Constify 'string' parameter.
12265         (catch_exception_command_1): Constify.
12266         * breakpoint.c (init_catchpoint)
12267         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12268         parameter.
12269         (ep_parse_optional_if_clause, catch_fork_command_1)
12270         (catch_exec_command_1): Constify.
12271         * breakpoint.h (init_catchpoint): Constify 'cond_string'
12272         parameter.
12273         (ep_parse_optional_if_clause): Constify.
12274         * cli/cli-utils.c (remove_trailing_whitespace)
12275         (check_for_argument): Constify.
12276         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12277         non-const overload.
12278         (check_for_argument): Likewise.
12279
12280 2017-04-05  Pedro Alves  <palves@redhat.com>
12281
12282         * event-top.c (command_line_handler): Add cast to execute_command
12283         call.
12284         * record-btrace.c (cmd_record_btrace_bts_start)
12285         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12286         (cmd_record_btrace_start): Add cast to execute_command call.
12287         * record-full.c (record_full_goto_insn):
12288         * record.c (record_start, record_stop): Add cast to
12289         execute_command_to_string calls.
12290         (cmd_record_start): Add cast to execute_command calls.
12291
12292 2017-04-05  Pedro Alves  <palves@redhat.com>
12293
12294         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12295         static inline function.
12296         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12297         array and use gdb_PyArg_ParseTupleAndKeywords.
12298         * python/py-cmd.c (cmdpy_init): Likewise.
12299         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12300         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12301         (infpy_search_memory): Likewise.
12302         * python/py-objfile.c (objfpy_add_separate_debug_file)
12303         (gdbpy_lookup_objfile): Likewise.
12304         * python/py-symbol.c (gdbpy_lookup_symbol)
12305         (gdbpy_lookup_global_symbol): Likewise.
12306         * python/py-type.c (gdbpy_lookup_type): Likewise.
12307         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12308         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12309         Likewise.
12310
12311 2017-04-05  Pedro Alves  <palves@redhat.com>
12312
12313         * python/python-internal.h (gdb_PyGetSetDef): New type.
12314         * python/py-block.c (block_object_getset)
12315         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12316         * python/py-event.c (event_object_getset)
12317         (finish_breakpoint_object_getset): Likewise.
12318         * python/py-inferior.c (inferior_object_getset): Likewise.
12319         * python/py-infthread.c (thread_object_getset): Likewise.
12320         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12321         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12322         * python/py-objfile.c (objfile_getset): Likewise.
12323         * python/py-progspace.c (pspace_getset): Likewise.
12324         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12325         Likewise.
12326         * python/py-record.c (recpy_record_getset): Likewise.
12327         * python/py-symbol.c (symbol_object_getset): Likewise.
12328         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12329         Likewise.
12330         * python/py-type.c (type_object_getset, field_object_getset):
12331         Likewise.
12332         * python/py-value.c (value_object_getset): Likewise.
12333
12334 2017-04-05  Pedro Alves  <palves@redhat.com>
12335
12336         * python/python-internal.h (gdb_PyObject_CallMethod)
12337         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12338         New functions.
12339         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12340         (PySys_GetObject, PySys_SetPath): New macros.
12341
12342 2017-04-05  Pedro Alves  <palves@redhat.com>
12343
12344         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12345         info_osdata_command.
12346         * osdata.c (info_osdata_command): Rename to ...
12347         (info_osdata): ... this.  Constify 'type' parameter, and remove
12348         the 'from_tty' parameter.  Accept NULL TYPE.
12349         (info_osdata_command): New function.
12350         * osdata.h (info_osdata_command): Remove declaration.
12351         (info_osdata): New declaration.
12352
12353 2017-04-05  Pedro Alves  <palves@redhat.com>
12354
12355         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12356         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12357         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12358         parameter.
12359         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12360         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12361         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12362         parameter.
12363         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12364         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12365         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12366         (mi_cmd_file_list_exec_source_files)
12367         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12368         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12369         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12370         parameter.
12371         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12372         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12373         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12374         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12375         (mi_cmd_stack_info_frame): Constify 'command' parameter.
12376         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12377         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12378         'command' parameter.
12379         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12380         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12381         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12382         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12383         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12384         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12385         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12386         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12387         (mi_cmd_var_set_update_range): Constify 'command' parameter.
12388         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12389         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12390         parameter.
12391         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12392         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12393         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12394         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12395         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12396         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12397         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12398         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12399         (mi_cmd_data_list_changed_registers)
12400         (mi_cmd_data_write_register_values)
12401         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12402         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12403         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12404         (mi_cmd_list_features, mi_cmd_list_target_features)
12405         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12406         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12407         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12408         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12409         (mi_cmd_trace_frame_collected): Constify 'command'
12410         parameter.
12411         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12412         'command' parameter.
12413
12414 2017-04-05  Pedro Alves  <palves@redhat.com>
12415
12416         * ada-lang.c (ada_completer_word_break_characters): Now a const
12417         array.
12418         (ada_get_gdb_completer_word_break_characters): Constify.
12419         * completer.c (gdb_completer_command_word_break_characters)
12420         (gdb_completer_file_name_break_characters)
12421         (gdb_completer_quote_characters): Now const arrays.
12422         (get_gdb_completer_quote_characters): Constify.
12423         (set_rl_completer_word_break_characters): New function.
12424         (set_gdb_completion_word_break_characters)
12425         (complete_line_internal): Use it.
12426         * completer.h (get_gdb_completer_quote_characters): Constify.
12427         (set_rl_completer_word_break_characters): Declare.
12428         * f-lang.c (f_word_break_characters): Constify.
12429         * language.c (default_word_break_characters): Constify.
12430         * language.h (language_defn::la_word_break_characters): Constify.
12431         (default_word_break_characters): Constify.
12432         * top.c (init_main): Use set_rl_completer_word_break_characters.
12433
12434 2017-04-05  Pedro Alves  <palves@redhat.com>
12435
12436         * aix-thread.c (aix_thread_pid_to_str)
12437         (aix_thread_extra_thread_info): Constify.
12438         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12439         * bsd-uthread.c (bsd_uthread_extra_thread_info)
12440         (bsd_uthread_pid_to_str): Constify.
12441         * corelow.c (core_pid_to_str): Constify.
12442         * darwin-nat.c (darwin_pid_to_str): Constify.
12443         * fbsd-nat.c (fbsd_pid_to_str): Constify.
12444         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12445         Constify.
12446         * gnu-nat.c (gnu_pid_to_str): Constify.
12447         * go32-nat.c (go32_pid_to_str): Constify.
12448         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12449         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12450         * inferior.c (inferior_pid_to_str): Constify.
12451         * linux-nat.c (linux_nat_pid_to_str): Constify.
12452         * linux-tdep.c (linux_core_pid_to_str): Constify.
12453         * linux-thread-db.c (thread_db_pid_to_str)
12454         (thread_db_extra_thread_info): Constify.
12455         * nto-tdep.c (nto_extra_thread_info): Constify.
12456         * nto-tdep.h (nto_extra_thread_info): Constify.
12457         * obsd-nat.c (obsd_pid_to_str): Constify.
12458         * procfs.c (procfs_pid_to_str): Constify.
12459         * ravenscar-thread.c (ravenscar_extra_thread_info)
12460         (ravenscar_pid_to_str): Constify.
12461         * remote-sim.c (gdbsim_pid_to_str): Constify.
12462         * remote.c (remote_threads_extra_info, remote_pid_to_str):
12463         Constify.
12464         * sol-thread.c (solaris_pid_to_str): Constify.
12465         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12466         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12467         * target.c (default_pid_to_str, target_pid_to_str)
12468         (normal_pid_to_str, default_pid_to_str): Constify.
12469         * target.h (target_ops::to_pid_to_str)
12470         (target_ops::to_extra_thread_info): Constify.
12471         (target_pid_to_str, normal_pid_to_str): Constify.
12472         * windows-nat.c (windows_pid_to_str): Constify.
12473         * gdbarch.sh (core_pid_to_str): Constify.
12474         * target-delegates.c: Regenerate.
12475         * gdbarch.h, gdbarch.c: Regenerate.
12476
12477 2017-04-05  Pedro Alves  <palves@redhat.com>
12478
12479         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12480         the memory of the temporary warning_pre_print override.
12481         * utils.c (warning_pre_print): Constify.
12482         * utils.h (warning_pre_print): Constify.
12483
12484 2017-04-05  Pedro Alves  <palves@redhat.com>
12485
12486         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12487         (shell_command): New function.
12488         (make_command): Use std::string.
12489         (init_cli_cmds): Register shell_command instead of shell_escape.
12490
12491 2017-04-05  Pedro Alves  <palves@redhat.com>
12492
12493         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12494         * tracepoint.c (default_collect): Don't initialize.
12495
12496 2017-04-05  Pedro Alves  <palves@redhat.com>
12497
12498         * macroexp.c (macro_buffer::shared): Now a bool.
12499         (init_buffer): Update.
12500         (init_shared_buffer): Constify 'addr' parameter.
12501         (substitute_args, expand, macro_expand, macro_expand_next): Remove
12502         casts.
12503
12504 2017-04-05  Pedro Alves  <palves@redhat.com>
12505
12506         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12507         * disasm.c (set_disassembler_options): Constify local.
12508         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12509
12510 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
12511
12512         PR gdb/21352
12513         * tracefile.c (tsave_command): Fix argument parsing for '-r'
12514         option.
12515
12516 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12517
12518         * frame.c (frame_unwind_register_unsigned): Call
12519         frame_unwind_register_value.
12520
12521 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12522
12523         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12524         Use gdb_test_multiple, and don't match anchor.
12525
12526 2017-04-05  Pedro Alves  <palves@redhat.com>
12527
12528         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12529         (Write After Approval): Remove Simon Marchi.
12530
12531 2017-04-05  Pedro Alves  <palves@redhat.com>
12532
12533         * common/gdb_optional.h (optional::optional): Make constexpr and
12534         initialize m_dummy.
12535
12536 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12537
12538         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12539         (amd64fbsd_jmp_buf_reg_offset): Remove.
12540         (amd64fbsd_supply_uthread): Remove function.
12541         (amd64fbsd_collect_uthread): Remove function.
12542         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12543         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12544         (x86_64-*-freebsd*): Remove bsd-uthread.o.
12545         (fbsd-nat.c): Update comment.
12546         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12547         (i386fbsd_jmp_buf_reg_offset): Remove.
12548         (i386fbsd_supply_uthread): Remove function.
12549         (i386fbsd_collect_uthread): Remove function.
12550         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12551
12552 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12553
12554         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12555         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12556         * NEWS: Mention that support for FreeBSD/alpha was removed.
12557         * alpha-fbsd-tdep.c: Delete file.
12558         * config/alpha/fbsd.mh: Delete file.
12559         * configure.host: Delete alpha*-*-freebsd* and
12560         alpha*-*-kfreebsd*-gnu.
12561         * configure.tgt: Delete alpha*-*-freebsd* and
12562         alpha*-*-kfreebsd*-gnu.
12563
12564 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12565
12566         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12567         amd64bsd_store_inferior_registers): Use ptid from regcache.
12568
12569 2017-04-04  Pedro Alves  <palves@redhat.com>
12570
12571         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
12572         data fields, make them private and add "m_" prefixes.
12573         (lnp_state_machine::lnp_state_machine): New ctor.
12574         (record_line, check_line_address, handle_set_discriminator)
12575         (handle_set_address, handle_advance_pc, handle_special_opcode)
12576         (handle_advance_line, handle_set_file, handle_negate_stmt)
12577         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12578         (end_sequence, advance_line): New methods.
12579         (m_gdbarch, m_record_lines_p): New fields.
12580         (lnp_reader_state): Delete.
12581         (dwarf_record_line): Rename to ...
12582         (lnp_state_machine::record_line): ... adjust.
12583         (init_lnp_state_machine): Delete.
12584         (lnp_state_machine::lnp_state_machine): New.
12585         (check_line_address): Rename to ...
12586         (lnp_state_machine::check_line_address): This.
12587         (dwarf_decode_lines_1): Remove reference to "reader_state".
12588         Adjust lnp_state_machine having a non-default ctor.  Use bool.
12589         State machine internal state manipulation moved to
12590         lnp_state_machine methods.
12591
12592 2017-04-04  Pedro Alves  <palves@redhat.com>
12593
12594         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12595         unittests/offset-type-selftests.c.
12596         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12597         * common/offset-type.h: New file.
12598         * common/preprocessor.h: New file.
12599         * common/traits.h: New file.
12600         * common/valid-expr.h: New file.
12601         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
12602         sect_offset and cu_offset strong typedefs throughout.
12603         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12604         typedefs throughout.
12605         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
12606         sect_offset and cu_offset strong typedefs throughout.
12607         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12608         typedefs throughout.
12609         * gdbtypes.h: Include "common/offset-type.h".
12610         (cu_offset): Now an offset type (strong typedef) instead of a
12611         struct.
12612         (sect_offset): Likewise.
12613         (union call_site_parameter_u): Rename "param_offset" field to
12614         "param_cu_off".
12615         * unittests/offset-type-selftests.c: New file.
12616
12617 2017-04-04  Pedro Alves  <palves@redhat.com>
12618
12619         * common/underlying.h: New file.
12620         * dwarf2read.c: Include "common/gdb_optional.h" and
12621         "common/underlying.h".
12622         (dir_index, file_name_index): New types.
12623         (file_entry): Use them.
12624         (file_entry::include): Use to_underlying.
12625         (line_header::add_file_name): Use dir_index.
12626         (read_formatted_entries): Use gdb::optional.  Read form before
12627         writting to file_entry.
12628         (dwarf_decode_line_header): Use dir_index.
12629         (lnp_state_machine::current_file): Use to_underlying.
12630         (lnp_state_machine::file): Change type to file_name_index.
12631         (dwarf_record_line): Use to_underlying.
12632         (init_lnp_state_machine): Use file_name_index.
12633         (dwarf_decode_lines_1): Use dir_index and file_name_index.
12634
12635 2017-04-04  Pedro Alves  <palves@redhat.com>
12636
12637         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12638         operator bool, has_value and get methods.
12639
12640 2017-04-04  Pedro Alves  <palves@redhat.com>
12641
12642         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12643         fields.
12644         (line_header): Initialize all data fields.  Change type of
12645         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12646         Change type of include_dirs to std::vector<const char *>.  Remove
12647         num_include_dirs, include_dirs_size.  Change type of file_names to
12648         std::vector<file_entry>.  Remove num_file_names, file_names_size.
12649         (line_header::line_header): New.
12650         (line_header::add_include_dir, line_header::add_file_name): New
12651         methods.
12652         (line_header::include_dir_at): Remove NULL check.
12653         (line_header::file_name_at): Add const overload.
12654         (line_header_up): New unique_ptr typedef.
12655         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
12656         std::vector.  Remove free_line_header call.
12657         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
12658         free_line_header call.
12659         (free_cu_line_header): Delete.
12660         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12661         (setup_type_unit_groups): Use line_header_up instead of cleanups.
12662         Adjust to use std::vector.
12663         (free_line_header): Delete.
12664         (free_line_header_voidp): Use delete.
12665         (add_include_dir): Replace with ...
12666         (line_header::add_include_dir): ... this method.  Use std::vector.
12667         (add_file_name): Replace with ...
12668         (line_header::add_file_name): ... this method.  Use std::vector.
12669         (add_include_dir_stub): Delete.
12670         (read_formatted_entries): Remove memset.
12671         (dwarf_decode_line_header): Return a line_header_up instead of a
12672         raw pointer.  Remove cleanup handling.  Pass lambdas to
12673         read_formatted_entries.  Adjust to use line_header methods.
12674         (dwarf_decode_lines_1): Adjust to use line_header methods.
12675         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12676         use std::vector.
12677
12678 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
12679
12680         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12681         instead of struct ptid.
12682
12683 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
12684
12685         * frame.c (get_frame_register_bytes): Unwind using value.
12686         (put_frame_register_bytes): Likewise.
12687
12688 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
12689
12690         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12691         aggregate-like.
12692
12693 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
12694
12695         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12696
12697 2017-03-29  Yao Qi  <yao.qi@linaro.org>
12698
12699         * gdbthread.h (struct thread_info): Declare constructor and
12700         destructor.  Add some in-class member initializers.
12701         * thread.c (free_thread): Remove.
12702         (init_thread_list): Call delete instead of free_thread.
12703         (new_thread): Call thread_info constructor.
12704         (thread_info::thread_info): New function.
12705         (thread_info::~thread_info): New function.
12706         (delete_thread_1): Call delete instead of free_thread.
12707         (make_cleanup_restore_current_thread): Move tp and frame to
12708         inner block.
12709
12710 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12711
12712         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12713         (arc_skip_prologue): Likewise.
12714         (arc_make_frame_cache): Likewise.
12715         (arc_pv_get_operand): New function.
12716         (arc_is_in_prologue): Likewise.
12717         (arc_analyze_prologue): Likewise.
12718         (arc_print_frame_cache): Likewise.
12719         (MAX_PROLOGUE_LENGTH): New constant.
12720
12721 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12722
12723         * configure.tgt: Add arc-insn.o.
12724         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12725         (dump_arc_instruction_command): New function.
12726         (arc_fprintf_disasm): Likewise.
12727         (arc_disassemble_info): Likewise.
12728         (arc_insn_get_operand_value): Likewise.
12729         (arc_insn_get_operand_value_signed): Likewise.
12730         (arc_insn_get_memory_base_reg): Likewise.
12731         (arc_insn_get_memory_offset): Likewise.
12732         (arc_insn_get_branch_target): Likewise.
12733         (arc_insn_dump): Likewise.
12734         (arc_insn_get_linear_next_pc): Likewise.
12735         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12736         (arc_disassemble_info): Likewise.
12737         (arc_insn_get_branch_target): Likewise.
12738         (arc_insn_get_linear_next_pc): Likewise.
12739         * NEWS: Mention new "maint print arc arc-instruction".
12740
12741 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12742
12743         * arc-tdep (maintenance_print_arc_list): New variable.
12744         (maintenance_print_arc_command): New function.
12745
12746 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12747
12748         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12749         Add "limm" and "reserved".
12750         (arc_cannot_fetch_register, arc_cannot_store_register): Add
12751         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12752         * arc-tdep.h (arc_regnum): Likewise.
12753
12754 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12755
12756         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12757         for THREADPTR register.
12758         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12759         register.
12760         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12761         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12762         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12763
12764 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12765
12766         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12767         registers above gdbarch_num_regs (gdbarch) as privileged in
12768         call0 ABI.
12769
12770 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12771
12772         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12773         for a single specified register or for all registers in
12774         a0_base..a0_base + C0_NREGS range.
12775         (supply_gregset_reg): Call regcache_raw_supply for a single
12776         specified register or for all registers in a0_base..a0_base +
12777         C0_NREGS range.
12778
12779 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12780
12781         * arch/xtensa.h (C0_NREGS): Add definition.
12782         * xtensa-tdep.c (C0_NREGS): Remove definition.
12783
12784 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12785
12786         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
12787         Drop xtensa_default_isa initialization.
12788         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
12789
12790 2017-03-27  Pedro Alves  <palves@redhat.com>
12791
12792         * dwarf2read.c (file_entry) <dir_index>: Add comment.
12793         (file_entry::include_dir): New method.
12794         (line_header::include_dir_at, line_header::file_name_at): New
12795         methods.
12796         (setup_type_unit_groups, setup_type_unit_groups)
12797         (psymtab_include_file_name): Simplify using the new methods.
12798         (lnp_state_machine) <the_line_header>: New field.
12799         <file>: Add comment.
12800         (lnp_state_machine::current_file): New method.
12801         (dwarf_record_line): Simplify using the new methods.
12802         (init_lnp_state_machine): Initialize the "the_line_header" field.
12803         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
12804         Simplify using the new methods.
12805
12806 2017-03-27  Pedro Alves  <palves@redhat.com>
12807
12808         * cp-name-parser.y (make_empty): Delete.
12809         (demangler_special, nested_name, ptr_operator, array_indicator)
12810         (direct_declarator, declarator_1): Use fill_comp instead of
12811         make_empty.
12812
12813 2017-03-27  Pedro Alves  <palves@redhat.com>
12814
12815         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
12816         to ATTRIBUTE_PRINTF.
12817         * solib-target.c (library_list_start_list): Print "string" not
12818         "version".
12819         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
12820         gdb_xml_error call.
12821
12822 2017-03-27  Pedro Alves  <palves@redhat.com>
12823
12824         * dwarf2read.c (struct file_and_directory): New.
12825         (dwarf2_get_dwz_file): Adjust to use std::string.
12826         (dw2_get_file_names_reader): Adjust to use file_and_directory.
12827         (find_file_and_directory): Adjust to return a file_and_directory
12828         object.
12829         (read_file_scope): Adjust to use file_and_directory.  Remove
12830         make_cleanup/do_cleanups calls.
12831         (open_and_init_dwp_file): Adjust to use std::string.  Remove
12832         make_cleanup/do_cleanups calls.
12833         * python/python.c (do_start_initialization): Adjust to ldirname
12834         returning a std::string.
12835         * utils.c (ldirname): Now returns a std::string.
12836         * utils.h (ldirname): Change return type to std::string.
12837         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
12838         returning a std::string.
12839         * xml-tdesc.c (file_read_description_xml): Likewise.
12840
12841 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
12842
12843         * regcache.c (regcache_debug_print_register): New function.
12844         * regcache.h (regcache_debug_print_register): New declaration.
12845         * target.c (debug_print_register): Remove.
12846         (target_fetch_registers): Call regcache_debug_print_register.
12847         (target_store_registers): Likewise.
12848
12849 2017-03-24  Pádraig Brady  <pbrady@fb.com>
12850
12851         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
12852         reference beyond the 'lh->include_dirs' array before accessing to
12853         it.
12854         (psymtab_include_file_name): Likewise.
12855         (dwarf_decode_lines_1): Likewise.
12856         (dwarf_decode_lines): Likewise.
12857         (file_file_name): Likewise.
12858
12859 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
12860
12861         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
12862         inferior_ptid.
12863         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12864         ps_lsetfpregs): Likewise.
12865         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
12866         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12867         ps_lsetfpregs): Likewise.
12868         * target.c (target_fetch_registers, target_store_registers):
12869         Remove asserts.
12870
12871 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
12872
12873         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
12874
12875 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12876
12877         * aarch64-tdep.c (aarch64_process_record_test): Declare.
12878         (_initialize_aarch64_tdep): Register it.
12879         (aarch64_record_load_store): Handle PRFM instruction.
12880         (aarch64_process_record_test): New function.
12881
12882 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12883
12884         * aarch64-tdep.c (aarch64_record_load_store): Fix code
12885         indentation.
12886
12887 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12888
12889         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
12890
12891 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12892
12893         python/python.c (do_start_initialization): Fix memory leak.
12894
12895 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12896
12897         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
12898         using get_ptrace_pid.
12899         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12900         inferior_ptid.
12901         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12902         inferior_ptid instead of pid.
12903
12904 2017-03-22  Yao Qi  <yao.qi@linaro.org>
12905
12906         * aarch64-tdep.c: Wrap locally used classes in anonymous
12907         namespace.
12908         * arm-tdep.c: Likewise.
12909         * linespec.c: Likewise.
12910         * ui-out.c: Likewise.
12911
12912 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
12913
12914         PR gdb/19637
12915         * python/lib/gdb/printer/bound_registers.py: Import sys.
12916
12917 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12918
12919         * windows-nat.c (do_windows_fetch_inferior_registers): Add
12920         windows_thread_info parameter and use it instead of
12921         current_thread.
12922         (windows_fetch_inferior_registers): Don't set current_thread,
12923         pass the thread to do_windows_fetch_inferior_registers.  Use
12924         ptid from regcache instead of inferior_ptid.
12925         (do_windows_store_inferior_registers): Add windows_thread_info
12926         parameter and use it instead of current_thread.
12927         (windows_store_inferior_registers): Don't set current_thread,
12928         pass the thread to do_windows_store_inferior_registers.  Use
12929         ptid from regcache instead of inferior_ptid.
12930
12931 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12932
12933         * ser-mingw.c (ser_windows_raw): Remove reference to
12934         struct serial::current_timeout.
12935
12936 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
12937
12938         PR tdep/20928
12939         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
12940         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
12941         (sparc64_fsr_type): Fix %fsr decoding.
12942
12943 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
12944
12945         * python/py-record-btrace.c (btpy_insn_data): Change return type
12946         for Python 2.
12947
12948 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12949
12950         * spu-linux-nat.c (spu_fetch_inferior_registers,
12951         spu_store_inferior_registers): Use ptid from regcache, set and
12952         restore inferior_ptid.
12953         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
12954         Likewise.
12955
12956 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12957
12958         * i386-linux-nat.c (fetch_register, store_register,
12959         i386_linux_fetch_inferior_registers,
12960         i386_linux_store_inferior_registers): Use ptid from regcache.
12961         * ia64-linux-nat.c (ia64_linux_fetch_register,
12962         ia64_linux_store_register): Likewise.
12963         * inf-ptrace.c (inf_ptrace_fetch_register,
12964         inf_ptrace_store_register): Likewise.
12965         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
12966         m32r_linux_store_inferior_registers): Likewise.
12967         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
12968         m68kbsd_store_inferior_registers): Likewise.
12969         * m68k-linux-nat.c (fetch_register, store_register,
12970         m68k_linux_fetch_inferior_registers,
12971         m68k_linux_store_inferior_registers): Likewise.
12972         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
12973         m88kbsd_store_inferior_registers): Likewise.
12974         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
12975         mips_fbsd_store_inferior_registers): Likewise.
12976         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
12977         mips64_linux_regsets_store_registers): Likewise.
12978         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
12979         mipsnbsd_store_inferior_registers): Likewise.
12980         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
12981         mips64obsd_store_inferior_registers): Likewise.
12982         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
12983         Likewise.
12984         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
12985         ppcfbsd_store_inferior_registers): Likewise.
12986         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
12987         ppc_linux_store_inferior_registers): Likewise.
12988         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
12989         ppcnbsd_store_inferior_registers): Likewise.
12990         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
12991         ppcobsd_store_registers): Likewise.
12992         * procfs.c (procfs_fetch_registers, procfs_store_registers):
12993         Likewise.
12994         * ravenscar-thread.c (ravenscar_fetch_registers,
12995         ravenscar_store_registers, ravenscar_prepare_to_store):
12996         Likewise.
12997         * record-btrace.c (record_btrace_fetch_registers,
12998         record_btrace_store_registers, record_btrace_prepare_to_store):
12999         Likewise.
13000         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13001         Lookup inferior using ptid from regcache, instead of
13002         current_inferior.
13003         * remote.c (remote_fetch_registers, remote_store_registers): Use
13004         ptid from regcache.
13005         * rs6000-nat.c (fetch_register, store_register): Likewise.
13006         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13007         s390_linux_store_inferior_registers): Likewise.
13008         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13009         shnbsd_store_inferior_registers): Likewise.
13010         * sol-thread.c (sol_thread_fetch_registers,
13011         sol_thread_store_registers): Likewise.
13012         * sparc-nat.c (sparc_fetch_inferior_registers,
13013         sparc_store_inferior_registers): Likewise.
13014         * tilegx-linux-nat.c (fetch_inferior_registers,
13015         store_inferior_registers): Likewise.
13016         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13017         vaxbsd_store_inferior_registers): Likewise.
13018         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13019         store_xtregs): Likewise.
13020
13021 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13022
13023         PR gdb/14441
13024         * NEWS: Mention support for rvalue references in GDB and python.
13025         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13026         supports both lvalue and rvalue references.
13027
13028 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13029
13030         PR gdb/14441
13031         * gdbtypes.c (rank_one_type): Implement overloading
13032         resolution rules regarding rvalue references.
13033
13034 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13035
13036         PR gdb/14441
13037         * aarch64-tdep.c (aarch64_type_align)
13038         (aarch64_extract_return_value, aarch64_store_return_value): Change
13039         lvalue reference type checks to general reference type checks.
13040         * amd64-tdep.c (amd64_classify): Likewise.
13041         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13042         Likewise.
13043         * arm-tdep.c (arm_type_align, arm_extract_return_value)
13044         (arm_store_return_value): Likewise.
13045         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13046         * c-typeprint.c (c_print_type): Likewise.
13047         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13048         (cplus_number_of_children, cplus_describe_child): Likewise.
13049         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13050         * completer.c (expression_completer): Likewise.
13051         * cp-support.c (make_symbol_overload_list_adl_namespace):
13052         Likewise.
13053         * darwin-nat-info.c (info_mach_region_command): Likewise.
13054         * dwarf2loc.c (entry_data_value_coerce_ref)
13055         (value_of_dwarf_reg_entry): Likewise.
13056         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13057         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13058         Likewise.
13059         * findvar.c (extract_typed_address, store_typed_address):
13060         Likewise.
13061         * gdbtypes.c (rank_one_type): Likewise.
13062         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13063         * infcall.c (value_arg_coerce): Likewise.
13064         * language.c (pointer_type): Likewise.
13065         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13066         Likewise.
13067         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13068         * mn10300-tdep.c (mn10300_type_align): Likewise.
13069         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13070         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13071         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13072         Likewise.
13073         * printcmd.c (print_formatted, x_command): Likewise.
13074         * python/py-type.c (typy_get_composite, typy_template_argument):
13075         Likewise.
13076         * python/py-value.c (valpy_referenced_value)
13077         (valpy_get_dynamic_type, value_has_field): Likewise.
13078         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13079         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13080         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13081         * spu-tdep.c (spu_scalar_value_p): Likewise.
13082         * symtab.c (lookup_symbol_aux): Likewise.
13083         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13084         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13085         Likewise.
13086         * valops.c (value_cast_pointers, value_cast)
13087         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13088         (value_struct_elt, value_struct_elt_bitpos)
13089         (value_find_oload_method_list, find_overload_match)
13090         (value_rtti_indirect_type): Likewise.
13091         * valprint.c (val_print_scalar_type_p, generic_val_print):
13092         Likewise.
13093         * value.c (value_actual_type, value_as_address, unpack_long)
13094         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13095         (coerce_ref): Likewise.
13096         * varobj.c (varobj_get_value_type): Likewise.
13097
13098 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13099
13100         PR gdb/14441
13101         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13102         table of constants.
13103         * python/lib/gdb/command/explore.py: Support exploring values
13104         of rvalue reference types.
13105         * python/lib/gdb/types.py: Implement get_basic_type() for
13106         rvalue reference types.
13107         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13108         constant.
13109         * python/py-value.c (valpy_getitem): Add an rvalue reference
13110         check.
13111         (valpy_reference_value): Add new parameter "refcode".
13112         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13113         New wrappers for valpy_reference_value().
13114         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13115         (gdbpy_invoke_xmethod): Likewise.
13116
13117 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13118
13119         PR gdb/14441
13120         * dwarf2read.c (process_die, read_type_die_1): Handle the
13121         DW_TAG_rvalue_reference_type DIE.
13122         (read_tag_reference_type): Add new parameter "refcode".
13123
13124 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13125
13126         PR gdb/14441
13127         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13128         (c_type_print_modifier, c_type_print_varspec_suffix)
13129         (c_type_print_base): Support printing rvalue reference types.
13130         * c-valprint.c (c_val_print, c_value_print): Support printing
13131         rvalue reference values.
13132
13133 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13134
13135         PR gdb/14441
13136         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13137         typename.
13138         * cp-support.c (replace_typedefs): Handle
13139         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13140         * python/py-type.c (typy_lookup_type): Likewise.
13141
13142 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13143
13144         PR gdb/14441
13145         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13146         * parse.c (insert_type): Change assert statement.
13147         (follow_types): Handle rvalue reference types.
13148         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13149         constant.
13150
13151 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13152
13153         PR gdb/14441
13154         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13155         value_ref() interface.
13156         * c-valprint.c (c_value_print): Likewise.
13157         * infcall.c (value_arg_coerce): Likewise.
13158         * python/py-value.c (valpy_reference_value): Likewise.
13159         * valops.c (value_cast, value_reinterpret_cast)
13160         (value_dynamic_cast, typecmp): Likewise.
13161         (value_ref): Parameterize by kind of return value reference type.
13162         * value.h (value_ref): Add new parameter "refcode".
13163
13164 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13165
13166         PR gdb/14441
13167         * dwarf2read.c (read_tag_reference_type): Use
13168         lookup_lvalue_reference_type() instead of lookup_reference_type().
13169         * eval.c (evaluate_subexp_standard): Likewise.
13170         * f-exp.y: Likewise.
13171         * gdbtypes.c (make_reference_type, lookup_reference_type):
13172         Generalize with rvalue reference types.
13173         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13174         convenience wrappers for lookup_reference_type().
13175         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13176         reference kind parameter.
13177         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13178         wrappers for lookup_reference_type().
13179         * guile/scm-type.c (gdbscm_type_reference): Use
13180         lookup_lvalue_reference_type() instead of lookup_reference_type().
13181         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13182         * parse.c (follow_types): Likewise.
13183         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13184         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13185         Likewise.
13186         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13187         (gdbpy_invoke_xmethod): Likewise.
13188         * stabsread.c: Provide extra argument to make_reference_type()
13189         call.
13190         * valops.c (value_ref, value_rtti_indirect_type): Use
13191         lookup_lvalue_reference_type() instead of lookup_reference_type().
13192
13193 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13194
13195         PR gdb/14441
13196         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13197         (TYPE_IS_REFERENCE): New macro.
13198         (struct type): Add rvalue_reference_type field.
13199         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13200
13201 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13202
13203         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13204         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13205         New function definition.
13206         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13207         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13208         New function declaration.
13209         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13210         * mi/mi-interp.h: New file.
13211         * solib.c (info_sharedlibrary_command): Replace for loop with
13212         ALL_SO_LIBS macro
13213         * solib.h (update_solib_list): New function declaration.
13214         (so_list_head): Move macro.
13215         * solist.h (ALL_SO_LIBS): New macro.
13216
13217 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13218
13219         * infcmd.c (post_create_inferior): Remove unused argument in
13220         call to solib_add.
13221         * remote.c (remote_start_remote): Likewise.
13222         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13223         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13224         (enable_break): Likewise.
13225         * solib.c (update_solib_list): Remove unused target argument
13226         and its documentation.
13227         (solib_add): Remove unused target argument.  Remove unused
13228         argument in call to update_solib_list.
13229         (info_sharedlibrary_command): Remove unused argument in call
13230         to update_solib_list.
13231         (sharedlibrary_command): Remove unused argument in call to
13232         solib_add.
13233         (handle_solib_event): Likewise.
13234         (reload_shared_libraries): Likewise.
13235         * solib.h (solib_add): Remove unused target argument.
13236
13237 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13238
13239         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13240         (s390_displaced_step_fixup): Cover relative branches with the
13241         default fixup handling.  This fixes lack of support for some
13242         relative branch instructions.
13243
13244 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13245
13246         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13247         ptid from regcache.
13248
13249 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13250
13251         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13252         i386_darwin_store_inferior_registers): Use ptid from regcache.
13253
13254 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13255
13256         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13257         i386bsd_store_inferior_registers): Use ptid from regcache.
13258
13259 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13260
13261         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13262         hppaobsd_store_registers): Use ptid from regcache.
13263
13264 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13265
13266         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13267         hppanbsd_store_registers): Use ptid from regcache.
13268
13269 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13270
13271         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13272         from regcache.  Use get_ptrace_pid.
13273
13274 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13275
13276         * corelow.c (get_core_register_section): Use ptid from regcache,
13277         update doc.
13278
13279 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13280
13281         * bsd-uthread.c (bsd_uthread_fetch_registers,
13282         bsd_uthread_store_registers): Use ptid from regcache, set and
13283         restore inferior_ptid.
13284
13285 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13286
13287         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13288         fetch_fp_regs, store_register, store_regs, store_fp_register,
13289         store_fp_regs): Use ptid from regcache.
13290
13291 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13292
13293         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13294         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13295         store_vfp_regs): Use ptid from regcache.
13296
13297 2017-03-17  Pedro Alves  <palves@redhat.com>
13298
13299         PR remote/21188
13300         * ser-base.c (ser_base_wait_for): Add comment.
13301         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13302         version.
13303         * ser-unix.c (hardwire_raw): Remove reference to
13304         scb->current_timeout.
13305         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13306         (hardwire_ops): Install ser_base_readchar instead of
13307         hardwire_readchar.
13308         * serial.h (struct serial) <current_timeout, timeout_remaining>:
13309         Remove fields.
13310
13311 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
13312
13313         PR gdb/19637
13314         * python/lib/gdb/printer/bound_registers.py: Add support for
13315         Python 3.
13316
13317 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13318
13319         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13320         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13321         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13322         byte_offset to subobj_byte_offset.  Fix the handling of
13323         DWARF_VALUE_STACK on big-endian targets when coming via an
13324         implicit pointer.
13325         (dwarf2_evaluate_loc_desc): Adjust call to
13326         dwarf2_evaluate_loc_desc_full.
13327         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13328         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13329
13330 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13331
13332         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13333         and REVSH instructions.
13334
13335 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13336
13337         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13338         (arm_record_test): Declare.
13339         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13340         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13341         align with the manual.
13342         (thumb_record_misc): Adjust the code order to align with the
13343         manual.
13344         (thumb2_record_decode_insn_handler): Fix instruction matching.
13345         (instruction_reader_thumb): New class.
13346         (arm_record_test): New function.
13347
13348 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13349
13350         * arm-tdep.c (abstract_memory_reader): New class.
13351         (instruction_reader): New class.
13352         (extract_arm_insn): Add argument 'reader'.  Callers updated.
13353         (decode_insn): Likewise.
13354
13355 2017-03-16  Doug Evans  <dje@google.com>
13356
13357         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13358         member.  Change type of TYPE member to SCM.  All uses updated.
13359         (lsscm_make_lazy_string_smob): Add assert.
13360         (lsscm_make_lazy_string): Flag bad length values.
13361         (lsscm_elt_type): New function.
13362         (gdbscm_lazy_string_to_value): Rewrite to use
13363         lsscm_safe_lazy_string_to_value.
13364         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13365         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13366         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
13367         in incoming type.
13368         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13369         * guile/scm-type.c (tyscm_scm_to_type): New function.
13370
13371 2017-03-15  Doug Evans  <dje@google.com>
13372
13373         PR python/17728, python/18439, python/18779
13374         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13375         member.  Change type of TYPE member to PyObject *.  All uses updated.
13376         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13377         (gdbpy_create_lazy_string_object): Flag bad length values.
13378         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13379         Handle typedefs in incoming type.
13380         (stpy_lazy_string_elt_type): New function.
13381         (gdbpy_extract_lazy_string): Call it.
13382         * python/py-value.c (valpy_lazy_string): Flag bad length values.
13383         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
13384         typedefs in incoming type.
13385
13386 2017-03-16  Doug Evans  <dje@google.com>
13387
13388         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13389         * guile/scm-type.c (tyscm_scm_to_type): New function.
13390
13391 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
13392
13393         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13394         "ULONGEST" for "skip".
13395
13396 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13397
13398         PR gdb/21220
13399         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13400         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13401         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
13402         over ptrace peek/poke until end of buffer or error.
13403
13404 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
13405
13406         * parse.c (length_of_subexp): Make static.
13407         * parser-defs.h (length_of_subexp): Remove.
13408
13409 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13410
13411         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13412         as well.
13413
13414 2017-03-14  Pedro Alves  <palves@redhat.com>
13415
13416         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13417         (main): Use std::unique_ptr.  Remove calls to
13418         cp_demangled_name_parse_free.
13419
13420 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13421
13422         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13423         alphabsd_store_inferior_registers): Use regcache->ptid instead
13424         of inferior_ptid.
13425
13426 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13427
13428         * aix-thread.c (aix_thread_fetch_registers,
13429         aix_thread_store_registers): Use regcache->ptid instead of
13430         inferior_ptid.
13431
13432 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13433
13434         * aarch64-linux-nat.c (fetch_gregs_from_thread,
13435         store_gregs_to_thread, fetch_fpregs_from_thread,
13436         store_fpregs_to_thread): Use regcache->ptid instead of
13437         inferior_ptid.
13438
13439 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13440
13441         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13442         amd64_linux_fetch_inferior_registers): Use regcache->ptid
13443         instead of inferior_ptid.
13444
13445 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13446
13447         * target.c (target_fetch_registers, target_store_registers): Add
13448         assert.
13449
13450 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13451
13452         * regcache.h (regcache_get_ptid): New function.
13453         * regcache.c (regcache_get_ptid): New function.
13454
13455 2017-03-13  Mark Wielaard  <mark@klomp.org>
13456
13457         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13458
13459 2017-03-10  Keith Seitz  <keiths@redhat.com>
13460
13461         PR c++/8218
13462         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13463
13464 2017-03-08  Pedro Alves  <palves@redhat.com>
13465
13466         PR gdb/18360
13467         * infrun.c (start_step_over, do_target_resume, resume)
13468         (restart_threads): Assert we're not resuming a thread that is
13469         meant to be stopped.
13470         (infrun_thread_stop_requested_callback): Delete.
13471         (infrun_thread_stop_requested): If the thread is internally
13472         stopped, queue a pending stop event and clear the thread's
13473         inline-frame state.
13474         (handle_stop_requested): New function.
13475         (handle_syscall_event, handle_inferior_event_1): Use
13476         handle_stop_requested.
13477         (handle_stop_requested): New function.
13478         (handle_signal_stop): Set the thread's stop_signal here instead of
13479         at caller.
13480         (finish_step_over): Clear step over info unconditionally.
13481         (handle_signal_stop): If the user had interrupted the event
13482         thread, consider the stop a random signal.
13483         (handle_signal_stop) <signal arrived while stepping over
13484         breakpoint>: Don't restart threads here.
13485         (stop_waiting): Don't clear step-over info here.
13486
13487 2017-03-08  Pedro Alves  <palves@redhat.com>
13488
13489         PR 21206
13490         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13491         goes to argument 2, not 1.
13492
13493 2017-03-08  Pedro Alves  <palves@redhat.com>
13494
13495         PR cli/21218
13496         * top.c (gdb_readline_wrapper): Avoid passing NULL to
13497         display_gdb_prompt.
13498         (command_line_input): Add comment.
13499
13500 2017-03-08  Pedro Alves  <palves@redhat.com>
13501
13502         PR tui/21216
13503         * tui/tui-file.c (tui_file::write): New.
13504         * tui/tui-file.h (tui_file): Override "write".
13505         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13506         factored out from ...
13507         (tui_puts): ... here.
13508         (tui_putc): Use them.
13509         (tui_write): New function.
13510         * tui/tui-io.h (tui_write): Declare.
13511
13512 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
13513
13514         * Makefile.in (SFILES): Replace "environ.c" with
13515         "common/environ.c".
13516         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13517         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
13518         to...
13519         * common/environ.c: ... here.
13520         * environ.h: Moved to...
13521         * common/environ.h: ... here.
13522
13523 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13524
13525         * gdbarch.sh (pstring_ptr): New static function.
13526         (gdbarch_disassembler_options): Use it.
13527         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13528         not valid_disassembler_option->name.
13529         * gdbarch.c: Regenerate.
13530
13531 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13532
13533         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13534
13535 2017-03-07  Pedro Alves  <palves@redhat.com>
13536
13537         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13538
13539 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13540
13541         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13542         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13543         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13544         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13545
13546 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
13547
13548         * xtensa-linux-nat.c (fetch_gregs): Remove const.
13549
13550 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
13551
13552         * remote.c (remote_add_target_side_commands): Use range-based
13553         for loop.
13554
13555 2017-03-03  Yao Qi  <yao.qi@linaro.org>
13556
13557         PR gdb/21165
13558         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13559         value is lazy.
13560         * valprint.c (common_val_print): Likewise.
13561
13562 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
13563
13564         * NEWS: Mention new set/show disassembler-options commands.
13565         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13566         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13567         (prospective_options): New static variable.
13568         (gdb_disassembler::gdb_disassembler): Initialize
13569         m_di.disassembler_options.
13570         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13571         (get_disassembler_options): New function.
13572         (set_disassembler_options): Likewise.
13573         (set_disassembler_options_sfunc): Likewise.
13574         (show_disassembler_options_sfunc): Likewise.
13575         (disassembler_options_completer): Likewise.
13576         (_initialize_disasm): Likewise.
13577         * disasm.h (get_disassembler_options): New prototype.
13578         (set_disassembler_options): Likewise.
13579         * gdbarch.sh (gdbarch_disassembler_options): New variable.
13580         (gdbarch_verify_disassembler_options): Likewise.
13581         * gdbarch.c: Regenerate.
13582         * gdbarch.h: Likewise.
13583         * arm-tdep.c (num_disassembly_options): Delete.
13584         (set_disassembly_style): Likewise.
13585         (arm_disassembler_options): New static variable.
13586         (set_disassembly_style_sfunc): Convert short style name into long
13587         option name.  Call set_disassembler_options.
13588         (show_disassembly_style_sfunc): New function.
13589         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13590         set_gdbarch_verify_disassembler_options.
13591         (_initialize_arm_tdep): Delete regnames variable and update callers.
13592         (arm_disassembler_options): Initialize.
13593         (disasm_options): New variable.
13594         (num_disassembly_options): Rename from this...
13595         (num_disassembly_styles): ...to this.  Compute by scanning through
13596         disasm_options.
13597         (valid_disassembly_styles): Initialize using disasm_options.
13598         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13599         set_arm_regname_option.
13600         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13601         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13602         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13603         set_gdbarch_verify_disassembler_options.
13604         * s390-tdep.c (s390_disassembler_options): New static variable.
13605         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13606         set_gdbarch_verify_disassembler_options.
13607
13608 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13609
13610         * remote.c (remote_add_target_side_condition): Remove "struct"
13611         keyword from range-based for loop.
13612
13613 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13614
13615         * remote.c (remote_add_target_side_condition): Use range-based
13616         for loop.  Update comment.
13617
13618 2017-02-27  Yao Qi  <yao.qi@linaro.org>
13619
13620         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13621
13622 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
13623
13624         * regcache.c (regcache_raw_update): New function.
13625         (regcache_raw_read): Move code to regcache_raw_update.
13626         * regcache.h (regcache_raw_update): New declaration.
13627         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13628
13629 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
13630
13631         * dwarf2read.c (create_debug_type_hash_table): Initialize
13632         header.signature and header.type_offset_in_tu.
13633
13634 2017-02-24  Pedro Alves  <palves@redhat.com>
13635
13636         * symtab.c (make_file_symbol_completion_list_1): Use
13637         add_symtab_completions.
13638
13639 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13640
13641         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13642
13643 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13644
13645         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13646         I386_MAX_REGISTER_SIZE.
13647         (i386_pseudo_register_write): Likewise.
13648         (i386_process_record): Likewise.
13649         * i387-tdep.c (i387_supply_xsave): Likewise.
13650         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13651         (store_register): Likewise.
13652
13653 2017-02-23  Pedro Alves  <palves@redhat.com>
13654
13655         * ada-lang.c: Include "common/function-view.h".
13656         (ada_iterate_over_symbols): Adjust to use function_view as
13657         callback type.
13658         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13659         (ada_make_symbol_completion_list): Use a lambda.
13660         (ada_exc_search_name_matches): Delete.
13661         (name_matches_regex): New.
13662         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13663         * compile/compile-c-support.c: Include "common/function-view.h".
13664         (print_one_macro): Change prototype to accept a ui_file pointer.
13665         (write_macro_definitions): Use a lambda.
13666         * dwarf2read.c: Include "common/function-view.h".
13667         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13668         (dw2_expand_symtabs_matching): Adjust to use function_view as
13669         callback type.
13670         * language.h: Include "common/function-view.h".
13671         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13672         function_view as callback type.
13673         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13674         * linespec.c: Include "common/function-view.h".
13675         (collect_info::add_symbol): New method.
13676         (struct symbol_and_data_callback, iterate_inline_only, struct
13677         symbol_matcher_data, iterate_name_matcher): Delete.
13678         (iterate_over_all_matching_symtabs): Adjust to use function_view
13679         as callback type and lambdas.
13680         (iterate_over_file_blocks): Adjust to use function_view as
13681         callback type.
13682         (decode_compound_collector): Now a class with private fields.
13683         (decode_compound_collector::release_symbols): New method.
13684         (collect_one_symbol): Rename to...
13685         (decode_compound_collector::operator()): ... this and adjust.
13686         (lookup_prefix_sym): decode_compound_collector construction bits
13687         move to decode_compound_collector ctor.  Pass the
13688         decode_compound_collector object directly as callback.  Remove
13689         cleanups and use decode_compound_collector::release_symbols
13690         instead.
13691         (symtab_collector): Now a class with private fields.
13692         (symtab_collector::release_symtabs): New method.
13693         (add_symtabs_to_list): Rename to...
13694         (symtab_collector::operator()): ... this and adjust.
13695         (collect_symtabs_from_filename): symtab_collector construction
13696         bits move to symtab_collector ctor.  Pass the symtab_collector
13697         object directly as callback.  Remove cleanups and use
13698         symtab_collector::release_symtabs instead.
13699         (collect_symbols): Delete.
13700         (add_matching_symbols_to_info): Use lambdas.
13701         * macrocmd.c (print_macro_callback): Delete.
13702         (info_macro_command): Use a lambda.
13703         (info_macros_command): Pass print_macro_definition as callable
13704         directly.
13705         (print_one_macro): Remove 'ignore' parameter.
13706         (macro_list_command): Adjust.
13707         * macrotab.c (macro_for_each_data::fn): Now a function_view.
13708         (macro_for_each_data::user_data): Delete field.
13709         (foreach_macro): Adjust to call the function_view.
13710         (macro_for_each): Adjust to use function_view as callback type.
13711         (foreach_macro_in_scope): Adjust to call the function_view.
13712         (macro_for_each_in_scope): Adjust to use function_view as callback
13713         type.
13714         * macrotab.h: Include "common/function-view.h".
13715         (macro_callback_fn): Declare a prototype instead of a pointer.
13716         Remove "user_data" parameter.
13717         (macro_for_each, macro_for_each_in_scope): Adjust to use
13718         function_view as callback type.
13719         * psymtab.c (partial_map_expand_apply)
13720         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13721         Adjust to use function_view as callback type and to return bool.
13722         (psym_expand_symtabs_matching): Adjust to use function_view as
13723         callback types.
13724         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13725         to use function_view as callback type and to return bool.
13726         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13727         callback types.
13728         * symfile.c (expand_symtabs_matching): Adjust to use function_view
13729         as callback types.
13730         * symfile.h: Include "common/function-view.h".
13731         (expand_symtabs_file_matcher_ftype)
13732         (expand_symtabs_symbol_matcher_ftype)
13733         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13734         return bool.
13735         (quick_symbol_functions::map_symtabs_matching_filename)
13736         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13737         function_view as callback type and return bool.
13738         (expand_symtabs_matching): Adjust to use function_view as callback
13739         type.
13740         (maintenance_expand_name_matcher)
13741         (maintenance_expand_file_matcher): Delete.
13742         (maintenance_expand_symtabs): Use lambdas.
13743         * symtab.c (iterate_over_some_symtabs): Adjust to use
13744         function_view as callback types and return bool.
13745         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
13746         of a cleanup.
13747         (lookup_symtab_callback): Delete.
13748         (lookup_symtab): Use a lambda.
13749         (iterate_over_symbols): Adjust to use function_view as callback
13750         type.
13751         (struct search_symbols_data, search_symbols_file_matches)
13752         (search_symbols_name_matches): Delete.
13753         (search_symbols): Use a pair of lambdas.
13754         (struct add_name_data, add_macro_name, symbol_completion_matcher)
13755         (symtab_expansion_callback): Delete.
13756         (default_make_symbol_completion_list_break_on_1): Use lambdas.
13757         * symtab.h: Include "common/function-view.h".
13758         (iterate_over_some_symtabs): Adjust to use function_view as
13759         callback type and return bool.
13760         (iterate_over_symtabs): Adjust to use function_view as callback
13761         type.
13762         (symbol_found_callback_ftype): Remove 'data' parameter and return
13763         bool.
13764         (iterate_over_symbols): Adjust to use function_view as callback
13765         type.
13766
13767 2017-02-23  Pedro Alves  <palves@redhat.com>
13768
13769         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
13770         (%.o) <unittests/%.c>: New pattern.
13771         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
13772         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
13773         * common/function-view.h: New file.
13774         * unittests/function-view-selftests.c: New file.
13775         * configure: Regenerate.
13776
13777 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
13778
13779         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
13780         inferior_ptid.
13781         * go32-nat.c (go32_thread_alive): Likewise.
13782
13783 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13784
13785         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
13786         delete.
13787
13788 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13789
13790         * varobj.c (varobj_clear_saved_item): Use delete instead of
13791         xfree.
13792         (update_dynamic_varobj_children): Likewise.
13793
13794 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13795
13796         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
13797
13798 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
13799
13800         * common/enum-flags.h (enum_flags::enum_flags): Initialize
13801         m_enum_value to 0 in default constructor.
13802
13803 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
13804
13805         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
13806         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
13807         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
13808         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
13809         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
13810         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
13811         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
13812         IS_STORE_CONDITIONAL_INSN.
13813
13814 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13815
13816         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
13817
13818 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13819
13820         * NEWS (Changes since GDB 7.12): Add DWARF-5.
13821
13822 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13823
13824         * dwarf2read.c (skip_one_die, read_attribute_value)
13825         (dwarf2_const_value_attr, dump_die_shallow)
13826         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
13827         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
13828
13829 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13830
13831         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
13832         (dwarf_parse_macro_header): Accept DWARF version 5.
13833         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
13834
13835 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13836
13837         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
13838         DW_AT_GNU_*.
13839         * common/common-exceptions.h (enum errors): Likewise.
13840         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
13841         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
13842         (dwarf_expr_context::execute_stack_op): Likewise.
13843         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
13844         Likewise.
13845         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
13846         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
13847         (show_entry_values_debug, call_site_to_target_addr)
13848         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
13849         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
13850         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
13851         (value_of_dwarf_block_entry, indirect_pieced_value)
13852         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
13853         (disassemble_dwarf_expression): Likewise.
13854         * dwarf2read.c (process_die, inherit_abstract_dies)
13855         (read_call_site_scope): Likewise.
13856         * gdbtypes.h (struct func_type, struct call_site_parameter)
13857         (struct call_site): Likewise.
13858         * stack.c (read_frame_arg): Likewise.
13859         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
13860
13861 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13862
13863         * defs.h (read_unsigned_leb128): New declaration.
13864         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
13865         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
13866         (dwarf2_find_location_expression): Call also
13867         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
13868         * dwarf2loc.h (dwarf2_version): New declaration.
13869         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
13870         rnglists.
13871         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
13872         .debug_rnglists.
13873         (struct dwop_section_names): Add loclists_dwo.
13874         (dwop_section_names): Add .debug_loclists.dwo.
13875         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
13876         (struct dwarf2_per_cu_data): Add dwarf_version.
13877         (struct dwo_sections): Add loclists.
13878         (struct attr_abbrev): Add implicit_const.
13879         (read_indirect_line_string): New declaration.
13880         (read_unsigned_leb128): Delete declaration.
13881         (rcuh_kind): New definition.
13882         (read_and_check_comp_unit_head): Change parameter
13883         is_debug_types_section to section_kind.
13884         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
13885         (read_comp_unit_head): Change parameter abfd to section, add parameter
13886         section_kind.  Handle DWARF-5.
13887         (error_check_comp_unit_head): Accept also DWARF version 5.
13888         (read_and_check_comp_unit_head): Change parameter
13889         is_debug_types_section to section_kind.
13890         (read_and_check_type_unit_head): Delete function.
13891         (read_abbrev_offset): Handle DWARF-5.
13892         (create_debug_type_hash_table): Add parameter section_kind.  Process
13893         only DW_UT_type.  Use signature and type_offset_in_tu from struct
13894         comp_unit_head.
13895         (create_debug_types_hash_table): Update create_debug_type_hash_table
13896         caller.
13897         (create_all_type_units): Call create_debug_type_hash_table.
13898         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
13899         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13900         caller.
13901         (skip_one_die): Handle DW_FORM_implicit_const.
13902         (dwarf2_rnglists_process): New function.
13903         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13904         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13905         (read_attribute_value): Handle DW_FORM_implicit_const,
13906         DW_FORM_line_strp.
13907         (read_attribute): Handle DW_FORM_implicit_const.
13908         (read_indirect_string_at_offset_from): New function from
13909         read_indirect_string_at_offset.
13910         (read_indirect_string_at_offset): Call
13911         read_indirect_string_at_offset_from.
13912         (read_indirect_line_string_at_offset): New function.
13913         (read_indirect_string): New function comment.
13914         (read_indirect_line_string): New function.
13915         (read_unsigned_leb128): Make it global.
13916         (dwarf2_string_attr): Handle DWARF-5.
13917         (add_include_dir_stub, read_formatted_entries): New functions.
13918         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
13919         Handle DWARF-5.
13920         (per_cu_header_read_in): Update read_comp_unit_head caller.
13921         (dwarf2_version): New function.
13922         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
13923         rnglists.
13924         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
13925         fields.
13926
13927 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13928
13929         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
13930
13931 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13932
13933         * dwarf2read.c (dwarf2_ranges_process): New function from
13934         dwarf2_ranges_read.
13935         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
13936         dwarf2_ranges_process.
13937
13938 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13939
13940         * dwarf2read.c (create_debug_type_hash_table): New function from
13941         create_debug_types_hash_table.
13942         (create_debug_types_hash_table): Call create_debug_type_hash_table.
13943         (create_all_type_units, open_and_init_dwo_file): Update
13944         create_debug_types_hash_table callers.
13945
13946 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13947
13948         PR gdb/16188
13949         * fork-child.c (trace_start_error): Fix thinko.  va_end should
13950         refer to 'ap', not 'args'.
13951
13952 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13953             Pedro Alves  <palves@redhat.com>
13954
13955         PR gdb/16188
13956         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
13957         calls succeeded.
13958         * fork-child.c (trace_start_error): New function.
13959         (trace_start_error_with_name): Likewise.
13960         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
13961         * inf-ptrace.c (inf_ptrace_me): Likewise.
13962         * inferior.h (trace_start_error): New prototype.
13963         (trace_start_error_with_name): Likewise.
13964
13965 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
13966
13967         PR gdb/21164
13968         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
13969         NULL before using it.
13970         * symmisc.c (maintenance_print_symbols): Likewise.
13971         (maintenance_print_msymbols): Likewise.
13972
13973 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13974
13975         * NEWS: Add record Python bindings entry.
13976
13977 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13978
13979         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
13980         py-record-full.o.
13981         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
13982         * python/py-record-btrace.c, python/py-record-btrace.h,
13983         python/py-record-full.c, python/py-record-full.h: New file.
13984         * python/py-record.c: Add include for py-record-btrace.h and
13985         py-record-full.h.
13986         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
13987         recpy_instruction_history, recpy_function_call_history, recpy_begin,
13988         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
13989         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
13990         New definition.
13991         (gdbpy_initialize_btrace): New export.
13992         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
13993
13994 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13995
13996         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
13997         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
13998         * python/py-record.c: New file.
13999         * python/python-internal.h (gdbpy_start_recording,
14000         gdbpy_current_recording, gdpy_stop_recording,
14001         gdbpy_initialize_record): New export.
14002         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14003         (python_GdbMethods): Add gdbpy_start_recording,
14004         gdbpy_current_recording and gdbpy_stop_recording.
14005
14006 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14007
14008         * record-btrace.c (record_btrace_record_method): New function.
14009         (init_record_btrace_ops): Initialize to_record_method.
14010         * record-full.c (record_full_record_method): New function.
14011         (init_record_full_ops, init_record_full_core_ops): Add
14012         record_full_record_method.
14013         * record.h (enum record_method): New enum.
14014         * target-debug.h (target_debug_print_enum_record_method: New define.
14015         * target-delegates.c: Regenerate.
14016         * target.c (target_record_method): New function.
14017         * target.h: Include record.h.
14018         (struct target_ops) <to_record_method>: New field.
14019         (target_record_method): New export.
14020
14021 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14022
14023         * record.h (record_start, record_stop): New export.
14024         * record.c (record_start, record_stop): New function.
14025
14026 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14027
14028         * btrace.c (btrace_fetch): Copy function call segments pointer
14029         into a vector.
14030         (btrace_clear): Clear the vector.
14031         (btrace_find_insn_by_number): Use binary search to find the correct
14032         function call segment.
14033         * btrace.h (brace_fun_p): New typedef.
14034         (struct btrace_thread_info) <functions>: New field.
14035
14036 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14037
14038         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14039         * btrace.c (btrace_decode_error): ... here.  New function.
14040         * btrace.h (btrace_decode_error): New export.
14041
14042 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14043
14044         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14045         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14046         btrace_find_insn_by_number): Remove special case for gaps.
14047         * btrace.h (btrace_insn_get_error): New export.
14048         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14049         * record-btrace.c (btrace_insn_history): Print number for gaps.
14050         (record_btrace_info, record_btrace_goto): Handle gaps.
14051
14052 2017-02-14  Tom Tromey  <tom@tromey.com>
14053
14054         PR python/13598:
14055         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14056         event.
14057         * python/py-evts.c (gdbpy_initialize_py_events): Add
14058         before_prompt registry.
14059         * python/py-events.h (events_object) <before_prompt>: New field.
14060
14061 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
14062
14063         * btrace.c (ftrace_new_switch): Preserve up link and flags.
14064
14065 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
14066
14067         * symfile (_initialize_symfile): Add usage text to the load command's
14068         help text.
14069
14070 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
14071
14072         * utils.c (defaulted_query): Don't query on secondary UIs.
14073
14074 2017-02-10  Tom Tromey  <tom@tromey.com>
14075
14076         * rust-lang.c (rust_get_disr_info): Remove unused variable.
14077
14078 2017-02-10  Tom Tromey  <tom@tromey.com>
14079
14080         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14081         "cleanup" local.
14082         * python/py-type.c (typy_legacy_template_argument): Remove
14083         unnecessary "cleanup" local.
14084
14085 2017-02-10  Tom Tromey  <tom@tromey.com>
14086
14087         * python/python.c (do_start_initialization): New function, from
14088         _initialize_python.
14089         (_initialize_python): Call do_start_initialization.
14090         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14091         goto.
14092
14093 2017-02-10  Tom Tromey  <tom@tromey.com>
14094
14095         * python/py-prettyprint.c (pretty_print_one_value): Use
14096         gdbpy_ref.
14097
14098 2017-02-10  Tom Tromey  <tom@tromey.com>
14099
14100         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14101         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14102         gdbpy_ref.
14103         * python/py-type.c (field_new): Use gdbpy_ref.
14104         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14105         gdbpy_ref.
14106         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14107         (py_free_pspace): Likewise.
14108         (pspace_to_pspace_object): Likewise.
14109         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14110         (py_free_objfile): Likewise.
14111         (objfile_to_objfile_object): Likewise.
14112         * python/py-inferior.c (delete_thread_object): Use
14113         gdbpy_ref.
14114         (infpy_read_memory): Likewise.
14115         (py_free_inferior): Likewise.
14116         * python/py-evtregistry.c (create_eventregistry_object): Use
14117         gdbpy_ref.
14118         * python/py-event.c (create_event_object): Use gdbpy_ref.
14119
14120 2017-02-10  Tom Tromey  <tom@tromey.com>
14121
14122         * python/py-ref.h (gdbpy_ref_policy): Now a template.
14123         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14124         used.
14125         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14126         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14127         python/py-exitedevent.c, python/py-finishbreakpoint.c,
14128         python/py-framefilter.c, python/py-function.c,
14129         python/py-inferior.c, python/py-infevents.c,
14130         python/py-linetable.c, python/py-newobjfileevent.c,
14131         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14132         python/py-signalevent.c, python/py-stopevent.c,
14133         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14134         python/py-unwind.c, python/py-utils.c, python/py-value.c,
14135         python/py-varobj.c, python/py-xmethods.c, python/python.c,
14136         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14137
14138 2017-02-10  Tom Tromey  <tom@tromey.com>
14139
14140         * ui-out.h (ui_out_emit_type): New class.
14141         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14142         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14143         and ui_out_emit_tuple.
14144         (enumerate_locals): Likewise.
14145         (py_mi_print_variables, py_print_locals, py_print_args): Use
14146         ui_out_emit_list.
14147         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14148         ui_out_emit_list.
14149         * common/gdb_optional.h: New file.
14150
14151 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14152
14153         * MAINTAINERS (Write After Approval): Update my e-mail address.
14154
14155 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14156
14157         PR gdb/21122
14158         * breakpoint.c (_initialize_breakpoint): Update the help description
14159         of the 'commands' command to indicate that it takes a list argument.
14160
14161 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
14162
14163         * interps.c (current_interp_set_logging): Remove "return".
14164
14165 2017-02-09  Gary Benson  <gbenson@redhat.com>
14166
14167         * symtab.c (add_symtab_completions): Prevent NULL pointer
14168         dereference.
14169
14170 2017-02-08  Pedro Alves  <palves@redhat.com>
14171
14172         * interps.c (interp::interp): Remove reference to quiet_p.
14173         (interp_set): Make static.  Remove dead "Switching to" output
14174         code.
14175         (interp_quiet_p, interp_set_quiet): Delete.
14176         (interpreter_exec_cmd): Don't set the interpreter quiet.
14177         * interps.h (interp_quiet_p): Make static.
14178         (class interp) <quiet_p>: Remove field
14179
14180 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14181
14182         * cli/cli-decode.c (find_command_name_length): Make it extern.
14183         * cli/cli-decode.h (find_command_name_length): Declare.
14184         * cli/cli-script.c (command_name_equals, line_first_arg):
14185         New functions.
14186         (process_next_line): Use cli-decode to parse command names.
14187         (build_command_line): Make args a constant pointer.
14188
14189 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14190
14191         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14192         Remove case-insensitive search.
14193
14194 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
14195
14196         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14197         at the end of the line.  Avoids an ARI warning.
14198
14199 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
14200
14201         * NEWS: Mention support for record/replay of Intel 64 rdrand and
14202         rdseed instructions.
14203         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14204
14205 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
14206
14207         PR tdep/20936
14208         Provide and use sparc32 and sparc64 target description XML files.
14209         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14210         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14211         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14212         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14213         * features/sparc/sparc32-solaris.xml: New file.
14214         * features/sparc/sparc64-solaris.xml: New file.
14215         * features/sparc/sparc32-solaris.c: Generated.
14216         * features/sparc/sparc64-solaris.c: Generated.
14217         * sparc-tdep.h: Account for differences in target descriptions.
14218         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14219         (sparc32_register_type): Use target provided registers.
14220         (validate_tdesc_registers): New function.
14221         (sparc32_gdbarch_init): Use tdesc_has_registers.
14222         Set pseudoregister functions.
14223         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14224         (sparc64_register_type): Use target provided registers.
14225         (sparc64_init_abi): Set pseudoregister functions.
14226
14227 2017-02-03  Tom Tromey  <tom@tromey.com>
14228
14229         PR rust/21097:
14230         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14231         with a single member.
14232
14233 2017-02-03  Pedro Alves  <palves@redhat.com>
14234
14235         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14236         (cli_interp_base::~cli_interp_base): New.
14237         (cli_interp): New struct.
14238         (as_cli_interp): Cast the interp itself to cli_interp.
14239         (cli_interpreter_pre_command_loop): Rename to ...
14240         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
14241         parameter.
14242         (cli_interpreter_init): Rename to ...
14243         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
14244         boolean.  Make extern.
14245         (cli_interpreter_resume): Rename to ...
14246         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
14247         extern.
14248         (cli_interpreter_suspend): Rename to ...
14249         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
14250         extern.
14251         (cli_interpreter_exec): Rename to ...
14252         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
14253         extern.
14254         (cli_interpreter_supports_command_editing): Rename to ...
14255         (cli_interp_base::supports_command_editing): ... this.  Remove
14256         'interp' parameter.  Make extern.
14257         (cli_ui_out): Rename to ...
14258         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
14259         Make extern.
14260         (cli_set_logging): Rename to ...
14261         (cli_interp_base::set_logging): ... this.  Remove 'interp'
14262         parameter.  Make extern.
14263         (cli_interp_procs): Delete.
14264         (cli_interp_factory): Adjust to use "new".
14265         * cli/cli-interp.h: Include "interps.h".
14266         (struct cli_interp_base): New struct.
14267         * interps.c (struct interp): Delete.  Fields moved to interps.h.
14268         (interp_new): Delete.
14269         (interp::interp, interp::~interp): New.
14270         (interp_set): Use bool, and return void.  Assume the interpreter
14271         has suspend, init and resume methods, and that the all return
14272         void.
14273         (set_top_level_interpreter): interp_set returns void.
14274         (interp_ui_out): Adapt.
14275         (current_interp_set_logging): Adapt.
14276         (interp_data): Delete.
14277         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14278         (interp_exec): Adapt.
14279         (top_level_interpreter_data): Delete.
14280         * interps.h (interp_init_ftype, interp_resume_ftype)
14281         (interp_suspend_ftype, interp_exec_ftype)
14282         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14283         (class interp): New.
14284         (interp_new): Delete.
14285         (interp_set): Now returns void.  Use bool.
14286         (interp_data, top_level_interpreter_data): Delete.
14287         * mi/mi-common.h: Include interps.h.
14288         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
14289         init, resume, suspect, exec, interp_ui_out, set_logging and
14290         pre_command_loop methods.
14291         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14292         (mi_interpreter_init): Rename to ...
14293         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
14294         bool, return void and make extern.  Adjust.
14295         (mi_interpreter_resume): ... Rename to ...
14296         (mi_interp::resume): ... this.  Remove the 'data' parameter,
14297         return void and make extern.  Adjust.
14298         (mi_interpreter_suspend): ... Rename to ...
14299         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
14300         return void and make extern.  Adjust.
14301         (mi_interpreter_exec): ... Rename to ...
14302         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
14303         extern.  Adjust.
14304         (mi_interpreter_pre_command_loop): ... Rename to ...
14305         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
14306         parameter and make extern.
14307         (mi_on_normal_stop_1): Adjust.
14308         (mi_ui_out): Rename to ...
14309         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
14310         parameter and make extern.  Adjust.
14311         (mi_set_logging): Rename to ...
14312         (mi_interp::set_logging): ... this.  Remove the 'interp'
14313         parameter and make extern.  Adjust.
14314         (mi_interp_procs): Delete.
14315         (mi_interp_factory): Adjust to use 'new'.
14316         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14317         (mi_print_exception, mi_execute_command, mi_load_progress):
14318         Adjust.
14319         * tui/tui-interp.c (tui_interp): New class.
14320         (as_tui_interp): Return a tui_interp pointer.
14321         (tui_on_normal_stop, tui_on_signal_received)
14322         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14323         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14324         to use interp::interp_ui_out.
14325         (tui_init): Rename to ...
14326         (tui_interp::init): ... this.  Remove the 'self' parameter, use
14327         bool, return void and make extern.  Adjust.
14328         (tui_resume): Rename to ...
14329         (tui_interp::resume): ... this.  Remove the 'data' parameter,
14330         return void and make extern.  Adjust.
14331         (tui_suspend): Rename to ...
14332         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
14333         return void and make extern.  Adjust.
14334         (tui_ui_out): Rename to ...
14335         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
14336         parameter, and make extern.  Adjust.
14337         (tui_exec): Rename to ...
14338         (tui_interp::exec): ... this.  Remove the 'data' parameter and
14339         make extern.
14340         (tui_interp_procs): Delete.
14341         (tui_interp_factory): Use "new".
14342
14343 2017-02-02  Tom Tromey  <tom@tromey.com>
14344
14345         * rust-exp.y (ends_raw_string, space_then_number)
14346         (rust_identifier_start_p): Return bool.
14347         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14348         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14349         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14350         (rust_chartype_p): Return bool.
14351         (val_print_struct, rust_print_struct_def, rust_print_type):
14352         Update.
14353         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14354         Return bool.
14355
14356 2017-02-02  Tom Tromey  <tom@tromey.com>
14357
14358         * rust-lang.c: Reindent.
14359
14360 2017-02-02  Tom Tromey  <tom@tromey.com>
14361
14362         * rust-lang.h (rust_crate_for_block): Update.
14363         * rust-lang.c (rust_crate_for_block): Return std::string.
14364         (rust_get_disr_info): Use std:;string, not
14365         gdb::unique_xmalloc_ptr.
14366         * rust-exp.y (crate_name): Update.
14367
14368 2017-02-02  Pedro Alves  <palves@redhat.com>
14369
14370         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14371         field out of gdb_disassembler_test and make it static.
14372
14373 2017-02-02  Pedro Alves  <palves@redhat.com>
14374
14375         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14376         mi1_interp and mi_interp fields.
14377
14378 2017-02-02  Pedro Alves  <palves@redhat.com>
14379
14380         * cli/cli-interp.c (struct saved_output_files, saved_output):
14381         Moved from cli/cli-logging.c.
14382         (cli_set_logging): New function.
14383         (cli_interp_procs): Install cli_set_logging.
14384         * cli/cli-interp.h (make_logging_output, cli_set_logging):
14385         Declare.
14386         * cli/cli-logging.c (struct saved_output_files, saved_output):
14387         Moved to cli/cli-interp.c.
14388         (pop_output_files): Don't save outputs here.
14389         (make_logging_output): New function.
14390         (handle_redirections): Don't build tee nor save previous outputs
14391         here.
14392         * interps.c (current_interp_set_logging): Change prototype.
14393         Assume there's always a set_logging_proc method installed.
14394         * interps.h (interp_set_logging_ftype): Change prototype.
14395         (current_interp_set_logging): Change prototype and adjust comment.
14396         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
14397         use make_logging_output.
14398         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14399 2017-02-02  Pedro Alves  <palves@redhat.com>
14400
14401         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14402         from ...
14403         (set_logging_overwrite): ... here.
14404         (logging_no_redirect_file): Delete.
14405         (set_logging_redirect): Don't handle redirection on the fly.
14406         Instead warn that "logging off" / "logging on" is necessary.
14407         (pop_output_files): Delete references to logging_no_redirect_file.
14408         (show_logging_command): Always speak in terms of what will happen
14409         once logging is reenabled.
14410
14411 2017-02-02  Pedro Alves  <palves@redhat.com>
14412
14413         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14414
14415 2017-02-02  Pedro Alves  <palves@redhat.com>
14416
14417         * disasm.c (gdb_pretty_print_insn): Rename to ...
14418         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14419         Remove gdbarch parameter.  Adapt to clear the object's buffers
14420         instead of allocating new buffers, and to print using the object's
14421         gdb_disassembler instead of calling gdb_print_insn.
14422         (dump_insns): Use gdb_pretty_print_disassembler.
14423         * disasm.h (gdb_pretty_print_insn): Delete declaration.
14424         (gdb_pretty_print_disassembler): New class.
14425         * record-btrace.c (btrace_insn_history): Use
14426         gdb_pretty_print_disassembler.
14427
14428 2017-02-02  Pedro Alves  <palves@redhat.com>
14429
14430         * ada-lang.c (type_as_string): Use string_file.
14431         * ada-valprint.c (ada_print_floating): Use string_file.
14432         * ada-varobj.c (ada_varobj_scalar_image)
14433         (ada_varobj_get_value_image): Use string_file.
14434         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14435         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14436         * breakpoint.c (update_inserted_breakpoint_locations)
14437         (insert_breakpoint_locations, reattach_breakpoints)
14438         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14439         (print_it_watchpoint): Use string_file.
14440         (save_breakpoints): Use stdio_file.
14441         * c-exp.y (oper): Use string_file.
14442         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14443         tee_file.
14444         (pop_output_files): Use delete.
14445         (handle_redirections): Use stdio_file and tee_file.
14446         * cli/cli-setshow.c (do_show_command): Use string_file.
14447         * compile/compile-c-support.c (c_compute_program): Use
14448         string_file.
14449         * compile/compile-c-symbols.c (generate_vla_size): Take a
14450         'string_file &' instead of a 'ui_file *'.
14451         (generate_c_for_for_one_variable): Take a 'string_file &' instead
14452         of a 'ui_file *'.  Use string_file.
14453         (generate_c_for_variable_locations): Take a 'string_file &'
14454         instead of a 'ui_file *'.
14455         * compile/compile-internal.h (generate_c_for_for_one_variable):
14456         Take a 'string_file &' instead of a 'ui_file *'.
14457         * compile/compile-loc2c.c (push, pushf, unary, binary)
14458         (print_label, pushf_register_address, pushf_register)
14459         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14460         'ui_file *'.  Adjust.
14461         * compile/compile.c (compile_to_object): Use string_file.
14462         * compile/compile.h (compile_dwarf_expr_to_c)
14463         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14464         'ui_file *'.
14465         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14466         (replace_typedefs_qualified_name): Use string_file and
14467         obstack_copy0.
14468         * disasm.c (gdb_pretty_print_insn): Use string_file.
14469         (gdb_disassembly): Adjust reference the null_stream global.
14470         (do_ui_file_delete): Delete.
14471         (gdb_insn_length): Use null_stream.
14472         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14473         * dwarf2loc.c (dwarf2_compile_property_to_c)
14474         (locexpr_generate_c_location, loclist_generate_c_location): Take a
14475         'string_file &' instead of a 'ui_file *'.
14476         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14477         * dwarf2read.c (do_ui_file_peek_last): Delete.
14478         (dwarf2_compute_name): Use string_file.
14479         * event-top.c (gdb_setup_readline): Use stdio_file.
14480         * gdbarch.sh (verify_gdbarch): Use string_file.
14481         * gdbtypes.c (safe_parse_type): Use null_stream.
14482         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14483         string_file.
14484         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14485         'string_file *' instead of a 'ui_file *'.
14486         (gdbscm_arch_disassemble): Use string_file.
14487         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14488         * guile/scm-ports.c (class ioscm_file_port): Now a class that
14489         inherits from ui_file.
14490         (ioscm_file_port_delete, ioscm_file_port_rewind)
14491         (ioscm_file_port_put): Delete.
14492         (ioscm_file_port_write): Rename to ...
14493         (ioscm_file_port::write): ... this.  Remove file_port_magic
14494         checks.
14495         (ioscm_file_port_new): Delete.
14496         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14497         ui_file_up.
14498         * guile/scm-type.c (tyscm_type_name): Use string_file.
14499         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14500         Use string_file.
14501         * infcmd.c (print_return_value_1): Use string_file.
14502         * infrun.c (print_target_wait_results): Use string_file.
14503         * language.c (add_language): Use string_file.
14504         * location.c (explicit_to_string_internal): Use string_file.
14505         * main.c (captured_main_1): Use null_file.
14506         * maint.c (maintenance_print_architecture): Use stdio_file.
14507         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14508         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14509         event_channel>: Change type to mi_console_file pointer.
14510         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14511         (mi_console_file_delete): Delete.
14512         (struct mi_console_file): Delete.
14513         (mi_console_file_magic): Delete.
14514         (mi_console_file_new): Delete.
14515         (mi_console_file::mi_console_file): New.
14516         (mi_console_file_delete): Delete.
14517         (mi_console_file_fputs): Delete.
14518         (mi_console_file::write): New.
14519         (mi_console_raw_packet): Delete.
14520         (mi_console_file::flush): New.
14521         (mi_console_file_flush): Delete.
14522         (mi_console_set_raw): Rename to ...
14523         (mi_console_file::set_raw): ... this.
14524         * mi/mi-console.h (class mi_console_file): New class.
14525         (mi_console_file_new, mi_console_set_raw): Delete.
14526         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14527         (mi_set_logging): Use delete and tee_file.  Adjust.
14528         * mi/mi-main.c (output_register): Use string_file.
14529         (mi_cmd_data_evaluate_expression): Use string_file.
14530         (mi_cmd_data_read_memory): Use string_file.
14531         (mi_cmd_execute, print_variable_or_computed): Use string_file.
14532         * mi/mi-out.c (mi_ui_out::main_stream): New.
14533         (mi_ui_out::rewind): Use main_stream and
14534         string_file.
14535         (mi_ui_out::put): Use main_stream and string_file.
14536         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14537         Allocate a 'string_file' instead.
14538         (mi_out_new): Don't allocate a mem_fileopen stream here.
14539         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14540         (mi_ui_out::main_stream): Declare method.
14541         * printcmd.c (eval_command): Use string_file.
14542         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14543         * python/py-arch.c (archpy_disassemble): Use string_file.
14544         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14545         * python/py-frame.c (frapy_str): Use string_file.
14546         * python/py-framefilter.c (py_print_type, py_print_single_arg):
14547         Use string_file.
14548         * python/py-type.c (typy_str): Use string_file.
14549         * python/py-unwind.c (unwind_infopy_str): Use string_file.
14550         * python/py-value.c (valpy_str): Use string_file.
14551         * record-btrace.c (btrace_insn_history): Use string_file.
14552         * regcache.c (regcache_print): Use stdio_file.
14553         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14554         * remote.c (escape_buffer): Use string_file.
14555         * rust-lang.c (rust_get_disr_info): Use string_file.
14556         * serial.c (serial_open_ops_1): Use stdio_file.
14557         (do_serial_close): Use delete.
14558         * stack.c (print_frame_arg): Use string_file.
14559         (print_frame_args): Remove local mem_fileopen stream, not used.
14560         (print_frame): Use string_file.
14561         * symmisc.c (maintenance_print_symbols): Use stdio_file.
14562         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14563         Take a 'string_file *' instead of a 'ui_file *'.
14564         * top.c (new_ui): Use stdio_file and stderr_file.
14565         (free_ui): Use delete.
14566         (execute_command_to_string): Use string_file.
14567         (quit_confirm): Use string_file.
14568         * tracepoint.c (collection_list::append_exp): Use string_file.
14569         * tui/tui-disasm.c (tui_disassemble): Use string_file.
14570         * tui/tui-file.c: Don't include "ui-file.h".
14571         (enum streamtype, struct tui_stream): Delete.
14572         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14573         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14574         (tui_file::tui_file): New method.
14575         (tui_file_fputs): Delete.
14576         (tui_file_get_strbuf): Delete.
14577         (tui_file::puts): New method.
14578         (tui_file_adjust_strbuf): Delete.
14579         (tui_file_flush): Delete.
14580         (tui_file::flush): New method.
14581         * tui/tui-file.h: Tweak intro comment.
14582         Include ui-file.h.
14583         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14584         (tui_file_adjust_strbuf): Delete declarations.
14585         (class tui_file): New class.
14586         * tui/tui-io.c (tui_initialize_io): Use tui_file.
14587         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14588         (tui_register_format): Use string_stream.
14589         * tui/tui-stack.c (tui_make_status_line): Use string_file.
14590         (tui_get_function_from_frame): Use string_file.
14591         * typeprint.c (type_to_string): Use string_file.
14592         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14593         (null_stream): New global.
14594         (ui_file_delete): Delete.
14595         (ui_file::ui_file): New.
14596         (null_file_isatty): Delete.
14597         (ui_file::~ui_file): New.
14598         (null_file_rewind): Delete.
14599         (ui_file::printf): New.
14600         (null_file_put): Delete.
14601         (null_file_flush): Delete.
14602         (ui_file::putstr): New.
14603         (null_file_write): Delete.
14604         (ui_file::putstrn): New.
14605         (null_file_read): Delete.
14606         (ui_file::putc): New.
14607         (null_file_fputs): Delete.
14608         (null_file_write_async_safe): Delete.
14609         (ui_file::vprintf): New.
14610         (null_file_delete): Delete.
14611         (null_file::write): New.
14612         (null_file_fseek): Delete.
14613         (null_file::puts): New.
14614         (ui_file_data): Delete.
14615         (null_file::write_async_safe): New.
14616         (gdb_flush, ui_file_isatty): Adjust.
14617         (ui_file_put, ui_file_rewind): Delete.
14618         (ui_file_write): Adjust.
14619         (ui_file_write_for_put): Delete.
14620         (ui_file_write_async_safe, ui_file_read): Adjust.
14621         (ui_file_fseek): Delete.
14622         (fputs_unfiltered): Adjust.
14623         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14624         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14625         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14626         (set_ui_file_data): Delete.
14627         (string_file::~string_file, string_file::write)
14628         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14629         (do_ui_file_as_string, ui_file_as_string): Delete.
14630         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14631         (struct mem_file): Delete.
14632         (mem_file_new): Delete.
14633         (stdio_file::stdio_file): New.
14634         (mem_file_delete): Delete.
14635         (stdio_file::stdio_file): New.
14636         (mem_fileopen): Delete.
14637         (stdio_file::~stdio_file): New.
14638         (mem_file_rewind): Delete.
14639         (stdio_file::set_stream): New.
14640         (mem_file_put): Delete.
14641         (stdio_file::open): New.
14642         (mem_file_write): Delete.
14643         (stdio_file_magic, struct stdio_file): Delete.
14644         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14645         (stdio_file::flush): New.
14646         (stdio_file_read): Rename to ...
14647         (stdio_file::read): ... this.  Adjust.
14648         (stdio_file_write): Rename to ...
14649         (stdio_file::write): ... this.  Adjust.
14650         (stdio_file_write_async_safe): Rename to ...
14651         (stdio_file::write_async_safe) ... this.  Adjust.
14652         (stdio_file_fputs): Rename to ...
14653         (stdio_file::puts) ... this.  Adjust.
14654         (stdio_file_isatty): Delete.
14655         (stdio_file_fseek): Delete.
14656         (stdio_file::isatty): New.
14657         (stderr_file_write): Rename to ...
14658         (stderr_file::write) ... this.  Adjust.
14659         (stderr_file_fputs): Rename to ...
14660         (stderr_file::puts) ... this.  Adjust.
14661         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14662         (stderr_file::stderr_file): New.
14663         (tee_file_magic): Delete.
14664         (struct tee_file): Delete.
14665         (tee_file::tee_file): New.
14666         (tee_file_new): Delete.
14667         (tee_file::~tee_file): New.
14668         (tee_file_delete): Delete.
14669         (tee_file_flush): Rename to ...
14670         (tee_file::flush): ... this.  Adjust.
14671         (tee_file_write): Rename to ...
14672         (tee_file::write): ... this.  Adjust.
14673         (tee_file::write_async_safe): New.
14674         (tee_file_fputs): Rename to ...
14675         (tee_file::puts): ... this.  Adjust.
14676         (tee_file_isatty): Rename to ...
14677         (tee_file::isatty): ... this.  Adjust.
14678         * ui-file.h (struct obstack, struct ui_file): Don't
14679         forward-declare.
14680         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14681         (ui_file_write_ftype)
14682         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14683         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14684         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14685         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14686         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14687         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14688         (set_ui_file_fseek): Delete.
14689         (ui_file_data, ui_file_delete, ui_file_rewind)
14690         (struct ui_file): New.
14691         (ui_file_up): New.
14692         (class null_file): New.
14693         (null_stream): Declare.
14694         (ui_file_write_for_put, ui_file_put): Delete.
14695         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14696         Delete.
14697         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14698         (gdb_fopen, tee_file_new): Delete.
14699         (struct string_file): New.
14700         (struct stdio_file): New.
14701         (stdio_file_up): New.
14702         (struct stderr_file): New.
14703         (class tee_file): New.
14704         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14705         of a 'ui_file *'.  Adjust.
14706         * ui-out.h (class ui_out) <field_stream>: Likewise.
14707         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14708         (null_stream): Delete.
14709         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14710         Adjust.
14711         * utils.h (struct ui_file): Delete forward declaration..
14712         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14713         (error_stream): Take a 'string_file &' instead of a
14714         'ui_file *'.
14715         * varobj.c (varobj_value_get_print_value): Use string_file.
14716         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14717         * gdbarch.c: Regenerate.
14718
14719 2017-02-02  Pedro Alves  <palves@redhat.com>
14720
14721         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14722         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
14723         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
14724         Adjust to call gdb_print_insn instead of
14725         gdb_disassembler::print_insn.
14726         (dump_insns, do_mixed_source_and_assembly_deprecated)
14727         (do_mixed_source_and_assembly, do_assembly_only): Add back a
14728         'gdbarch' parameter.  Remove gdb_disassembler parameter.
14729         (gdb_disassembly): Don't allocate a gdb_disassembler here.
14730         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14731         declaration.
14732         (gdb_pretty_print_insn): Re-add declaration.
14733         * record-btrace.c (btrace_insn_history): Don't allocate a
14734         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
14735
14736 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
14737
14738         * disasm.h (gdb_disassembly): Remove file_string parameter.
14739         * disasm.c (gdb_disassembly): Likewise.
14740         * cli/cli-cmds.c (print_disassembly): Adapt.
14741         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14742         * stack.c (do_gdb_disassembly): Likewise.
14743
14744 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14745
14746         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14747         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14748         targets.  And if the implicit value is longer than needed, extract
14749         the first bytes instead of the "least significant" ones.
14750
14751 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14752
14753         * btrace.c (btrace_enable): Do not call btrace_add_pc for
14754         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14755         (btrace_fetch): Assert can_access_registers_ptid.
14756         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14757         validate_registers_access.
14758
14759 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14760
14761         * gdbthread.h (can_access_registers_ptid): New.
14762         * thread.c (can_access_registers_ptid): New.
14763
14764 2017-02-01  Pedro Alves  <palves@redhat.com>
14765
14766         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14767
14768 2017-01-31  Pedro Alves  <palves@redhat.com>
14769
14770         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
14771         Fix typos.
14772
14773 2017-01-31  Pedro Alves  <palves@redhat.com>
14774
14775         * stack.c (print_frame_args): Remove local mem_fileopen stream,
14776         not used.
14777
14778 2017-01-31  Pedro Alves  <palves@redhat.com>
14779
14780         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
14781
14782 2017-01-31  Pedro Alves  <palves@redhat.com>
14783
14784         * common/scoped_restore.h
14785         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
14786         change the value's parameter type to T2.
14787         (make_scoped_restore): Likewise.
14788
14789 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14790             Richard Henderson  <rth@redhat.com>
14791
14792         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
14793         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
14794         GS_BASE for older kernels.
14795         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
14796         GS_BASE for older kernels.
14797         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
14798         and GS_BASE to the offset table.
14799         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
14800         system register group.
14801         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
14802         for older kernels.
14803         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
14804         amd64 ABI.
14805         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
14806         AMD64_GSBASE_REGNUM.
14807         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
14808         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
14809         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
14810         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
14811         i386/64bit-segments.xml in those rules.
14812         * features/i386/64bit-segments.xml: New file.
14813         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
14814         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
14815         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
14816         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
14817         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
14818         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
14819         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
14820         * features/i386/amd64-avx-linux.c: Regenerated.
14821         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
14822         * features/i386/amd64-avx-mpx.c: Regenerated.
14823         * features/i386/amd64-avx512-linux.c: Regenerated.
14824         * features/i386/amd64-linux.c: Regenerated.
14825         * features/i386/amd64-mpx-linux.c: Regenerated.
14826         * features/i386/i386-avx-mpx-linux.c: Regenerated.
14827         * features/i386/i386-avx-mpx.c: Regenerated.
14828         * features/i386/x32-avx-linux.c: Regenerated.
14829         * features/i386/x32-avx512-linux.c: Regenerated.
14830         * regformats/i386/amd64-avx-linux.dat: Regenerated.
14831         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
14832         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
14833         * regformats/i386/amd64-linux.dat: Regenerated.
14834         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
14835         * regformats/i386/x32-avx-linux.dat: Regenerated.
14836         * regformats/i386/x32-avx512-linux.dat: Regenerated.
14837         * regformats/i386/x32-linux.dat: Regenerated.
14838
14839 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14840
14841         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
14842         Set to AMD64_NUM_REGS.
14843
14844 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14845
14846         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
14847         that checks validity of a register number.
14848
14849 2017-01-27  Kees Cook  <keescook@google.com>
14850
14851         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
14852         fetch_fpregs if target has fpa registers.
14853         (arm_linux_store_inferior_registers): Call store_fpregs if target
14854         has fpa registers.
14855
14856 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14857
14858         * cris-tdep.c (cris_gdbarch_init): Remove check for
14859         info.byte_order and force it to BFD_ENDIAN_LITTLE.
14860
14861 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
14862
14863         * corelow.c (get_core_register_section): Check for regset
14864         existence before checking for REGSET_VARIABLE_SIZE.
14865
14866 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14867             Pedro Alves  <palves@redhat.com>
14868
14869         PR gdb/20939
14870         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
14871         call memory_error, save memaddr instead.
14872         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
14873         negative, cal memory_error.
14874         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
14875
14876 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14877
14878         * disasm-selftests.c (memory_error_test): New function.
14879         (_initialize_disasm_selftests): Register memory_error_test.
14880
14881 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14882
14883         * Makefile.in (SFILES): Add disasm-selftests.c and
14884         selftest-arch.c.
14885         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
14886         * disasm-selftests.c: New file.
14887         * selftest-arch.c: New file.
14888         * selftest-arch.h: New file.
14889
14890 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14891
14892         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
14893         to bfd_arch_mep.  Don't return 0 if section is not
14894         found.  Call print_insn_mep.
14895
14896 2017-01-26  Pedro Alves  <palves@redhat.com>
14897             Yao Qi  <yao.qi@linaro.org>
14898
14899         * arm-tdep.c: Include "disasm.h".
14900         (gdb_print_insn_arm): Update code to get gdbarch.
14901         * disasm.c (dis_asm_read_memory): Change it to
14902         gdb_disassembler::dis_asm_read_memory.
14903         (dis_asm_memory_error): Likewise.
14904         (dis_asm_print_address): Likewise.
14905         (gdb_pretty_print_insn): Change it to
14906         gdb_disassembler::pretty_print_insn.
14907         (dump_insns): Add one argument gdb_disassemlber.  All
14908         callers updated.
14909         (do_mixed_source_and_assembly_deprecated): Likewise.
14910         (do_mixed_source_and_assembly): Likewise.
14911         (do_assembly_only): Likewise.
14912         (gdb_disassembler::gdb_disassembler): New.
14913         (gdb_disassembler::print_insn): New.
14914         * disasm.h (class gdb_disassembler): New.
14915         (gdb_pretty_print_insn): Remove declaration.
14916         (gdb_disassemble_info): Likewise.
14917         * guile/scm-disasm.c (class gdbscm_disassembler): New.
14918         (gdbscm_disasm_read_memory_worker): Update.
14919         (gdbscm_disasm_read_memory): Update.
14920         (gdbscm_disasm_memory_error): Remove.
14921         (gdbscm_disasm_print_address): Remove.
14922         (gdbscm_disassembler::gdbscm_disassembler): New.
14923         (gdbscm_print_insn_from_port): Update.
14924         * mips-tdep.c: Include disasm.h.
14925         (gdb_print_insn_mips): Update code to get gdbarch.
14926         * record-btrace.c (btrace_insn_history): Update.
14927         * spu-tdep.c: Include disasm.h.
14928         (struct spu_dis_asm_data): Remove.
14929         (struct spu_dis_asm_info): New.
14930         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
14931         SPU id.
14932         (gdb_print_insn_spu): Cast disassemble_info to
14933         spu_dis_asm_info.
14934
14935 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14936
14937         * disasm.c (do_ui_file_delete): Delete.
14938         (gdb_insn_length): Move code creating stream to ...
14939         * utils.c (null_stream): ... here.  New function.
14940         * utils.h (null_stream): Declare.
14941
14942 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
14943
14944         * python/py-inferior.c (find_thread_object): Return directly
14945         from the loop.  Remove "found" variable.
14946
14947 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
14948
14949         GDB 7.12.1 released.
14950
14951 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14952
14953         * python/py-function.c (fnpy_call): Reorder declarations to have
14954         the gdbpy_enter object declared first.
14955         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
14956
14957 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14958
14959         PR python/21068
14960         * python/python-internal.h (PyMem_RawMalloc): Define for
14961         Python < 3.4.
14962         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
14963         PyMem_RawMalloc instead of PyMem_Malloc.
14964
14965 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
14966             Luis Machado  <lgustavo@codesourcery.com>
14967
14968         * NEWS (New commands): Mention flash-erase.
14969         (New MI commands): Mention target-flash-erase.
14970         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
14971         command.
14972         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
14973         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
14974         * target.c (flash_erase_command): New function.
14975         (initialize_targets): Add new flash-erase command.
14976         * target.h (flash_erase_command): New declaration.
14977
14978 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
14979
14980         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
14981         HAVE_SYS_PROCFS_H is defined.
14982
14983 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14984
14985         * remote.c (struct cached_reg): Change data into a pointer.
14986         * (stop_reply_dtr): Free data pointers before deleting vector.
14987         (process_stop_reply): Likewise.
14988         (remote_parse_stop_reply): Allocate space for data
14989
14990 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14991
14992         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
14993         MAX_REGISTER_SIZE.
14994         (amd64_pseudo_register_read_value): Likewise.
14995         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
14996         (store_register_using_P): Likewise.
14997         * regcache.c (regcache_xfer_part): Likewise.
14998
14999 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
15000
15001         Split real and pseudo registers.
15002         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15003         (sparc32_pseudo_regnum): New enum.
15004         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15005         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15006         (SPARC32_CP0_REGISTERS): New macro.
15007         (sparc32_pseudo_register_name): New function.
15008         (sparc32_register_name): Use sparc32_pseudo_register_name.
15009         (sparc32_pseudo_register_type): New function.
15010         (sparc32_register_type): Use sparc32_pseudo_register_type.
15011         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15012         pseudo register numbers.
15013         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15014         (SPARC64_CP0_REGISTERS): New macro.
15015         (sparc64_pseudo_register_name): New function.
15016         (sparc64_register_name): Use sparc64_pseudo_register_name.
15017         (sparc64_pseudo_register_type): New function.
15018         (sparc64_register_type): Use sparc64_pseudo_register_type.
15019         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15020         pseudo register numbers.
15021         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15022         sparc64_store_arguments): Handle pseudo register numbers.
15023
15024 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15025
15026         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15027         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15028         output.
15029         (getpkt_or_notif_sane_1): Likewise.
15030
15031 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15032
15033         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15034         of CC.  Pass "-x c++-header" instead of "-x c".
15035
15036 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15037
15038         * remote.c (remote_can_async_p): Update comment.
15039
15040 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15041
15042         * linux-nat.c (linux_nat_can_async_p): Update comment.
15043
15044 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15045
15046         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15047
15048 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
15049
15050         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15051
15052 2017-01-10  Tom Tromey  <tom@tromey.com>
15053
15054         * python/py-type.c (typy_legacy_template_argument): Update.
15055         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15056         ~demangle_parse_info): Declare new members.
15057         (cp_demangled_name_to_comp): Return unique_ptr.
15058         (cp_demangled_name_parse_free)
15059         (make_cleanup_cp_demangled_name_parse_free)
15060         (cp_new_demangle_parse_info): Remove.
15061         * cp-support.c (do_demangled_name_parse_free_cleanup)
15062         (make_cleanup_cp_demangled_name_parse_free): Remove.
15063         (inspect_type, cp_canonicalize_string_full)
15064         (cp_canonicalize_string): Update.
15065         (mangled_name_to_comp): Change return type.
15066         (cp_class_name_from_physname, method_name_from_physname)
15067         (cp_func_name, cp_remove_params): Update.
15068         * cp-name-parser.y (demangle_parse_info): New constructor, from
15069         cp_new_demangle_parse_info.
15070         (~demangle_parse_info): New destructor, from
15071         cp_demangled_name_parse_free.
15072         (cp_merge_demangle_parse_infos): Update.
15073         (cp_demangled_name_to_comp): Change return type.
15074
15075 2017-01-10  Tom Tromey  <tom@tromey.com>
15076
15077         * top.c (prevent_dont_repeat): Change return type.
15078         * python/python.c (execute_gdb_command): Use std::string.
15079         Update.
15080         * guile/guile.c (gdbscm_execute_gdb_command): Update.
15081         * command.h (prevent_dont_repeat): Change return type.
15082         * breakpoint.c (bpstat_do_actions_1): Update.
15083
15084 2017-01-10  Tom Tromey  <tom@tromey.com>
15085
15086         * value.h (scoped_value_mark::~scoped_value_mark): Call
15087         free_to_mark.
15088         (scoped_value_mark::free_to_mark): New method.
15089         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15090         scoped_value_mark.
15091
15092 2017-01-10  Tom Tromey  <tom@tromey.com>
15093
15094         * python/py-value.c (valpy_dereference, valpy_referenced_value)
15095         (valpy_reference_value, valpy_const_value, valpy_get_address)
15096         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15097         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15098         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15099         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15100         scoped_value_mark.
15101         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15102         * value.h (scoped_value_mark): New class.
15103
15104 2017-01-10  Tom Tromey  <tom@tromey.com>
15105
15106         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15107         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15108         * psymtab.c (discard_psymtabs_upto): Remove.
15109         (make_cleanup_discard_psymtabs): Remove.
15110         (struct psymtab_state): Remove.
15111
15112 2017-01-10  Tom Tromey  <tom@tromey.com>
15113
15114         * record-full.c (record_full_save_cleanups): Remove.
15115         (record_full_save): Use gdb::unlinker.
15116         * gcore.c (do_bfd_delete_cleanup): Remove.
15117         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
15118         cleanups.
15119         * dwarf2read.c (unlink_if_set): Remove.
15120         (write_psymtabs_to_index): Use gdb::unlinker.
15121         * common/gdb_unlinker.h: New file.
15122
15123 2017-01-10  Tom Tromey  <tom@tromey.com>
15124
15125         * windows-tdep.c (windows_xfer_shared_library): Update.
15126         * windows-nat.c (windows_make_so): Update.
15127         * utils.h (make_cleanup_bfd_unref): Remove.
15128         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15129         * symfile.h (symfile_bfd_open)
15130         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15131         * symfile.c (read_symbols, symbol_file_add)
15132         (separate_debug_file_exists): Update.
15133         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15134         (generic_load, reread_symbols): Update.
15135         * symfile-mem.c (symbol_file_add_from_memory): Update.
15136         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15137         (spu_symbol_file_add_from_memory): Update.
15138         * solist.h (struct target_so_ops) <bfd_open>: Return
15139         gdb_bfd_ref_ptr.
15140         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15141         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15142         gdb_bfd_ref_ptr.
15143         (solib_map_sections, reload_shared_libraries_1): Update.
15144         * solib-svr4.c (enable_break): Update.
15145         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15146         * solib-frv.c (enable_break2): Update.
15147         * solib-dsbt.c (enable_break): Update.
15148         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15149         gdb_bfd_ref_ptr.
15150         (darwin_solib_get_all_image_info_addr_at_init): Update.
15151         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15152         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15153         * record-full.c (record_full_save): Update.
15154         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15155         * procfs.c (insert_dbx_link_bpt_in_file): Update.
15156         * minidebug.c (find_separate_debug_file_in_section): Return
15157         gdb_bfd_ref_ptr.
15158         * machoread.c (macho_add_oso_symfile): Change abfd to
15159         gdb_bfd_ref_ptr.
15160         (macho_symfile_read_all_oso): Update.
15161         (macho_check_dsym): Return gdb_bfd_ref_ptr.
15162         (macho_symfile_read): Update.
15163         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15164         (jit_bfd_try_read_symtab): Update.
15165         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15166         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15167         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15168         gdb_bfd_ref_ptr.
15169         (gdb_bfd_ref_policy): New struct.
15170         (gdb_bfd_ref_ptr): New typedef.
15171         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15172         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15173         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15174         gdb_bfd_ref_ptr.
15175         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15176         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15177         (gcore_command): Update.
15178         * exec.c (exec_file_attach): Update.
15179         * elfread.c (elf_symfile_read): Update.
15180         * dwarf2read.c (dwarf2_get_dwz_file): Update.
15181         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15182         (open_and_init_dwo_file): Update.
15183         (open_dwp_file): Return gdb_bfd_ref_ptr.
15184         (open_and_init_dwp_file): Update.
15185         * corelow.c (core_open): Update.
15186         * compile/compile-object-load.c (compile_object_load): Update.
15187         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15188         * coffread.c (coff_symfile_read): Update.
15189         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15190         gdb_bfd_ref_ptr.  Rename.
15191         (dump_bfd_file, restore_command): Update.
15192         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15193         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15194         (find_separate_debug_file_by_buildid): Update.
15195
15196 2017-01-10  Tom Tromey  <tom@tromey.com>
15197
15198         * common/gdb_ref_ptr.h: New file.
15199         * python/py-ref.h (struct gdbpy_ref_policy): New.
15200         (gdbpy_ref): Now a typedef.
15201
15202 2017-01-10  Tom Tromey  <tom@tromey.com>
15203
15204         * utils.h (make_cleanup_htab_delete): Don't declare.
15205         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15206         Remove.
15207         * linespec.c (decode_compound_collector): Add constructor,
15208         destructor.
15209         (lookup_prefix_sym): Remove cleanup.
15210         (symtab_collector): Add constructor, destructor.
15211         (collect_symtabs_from_filename): Remove cleanup.
15212         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15213         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15214         Use htab_up.
15215         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15216         * dwarf2read.c (dw2_expand_symtabs_matching)
15217         (dw2_map_symbol_filenames, dwarf_decode_macros)
15218         (write_psymtabs_to_index): Use htab_up.
15219         * dwarf2loc.c (func_verify_no_selftailcall)
15220         (call_site_find_chain_1, func_verify_no_selftailcall)
15221         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15222         std::vector, gdb::unique_xmalloc_ptr.
15223         (call_sitep): Remove typedef.
15224         (dwarf2_locexpr_baton_eval): Remove unused variable.
15225
15226 2017-01-10  Tom Tromey  <tom@tromey.com>
15227
15228         * python/python-internal.h (make_cleanup_py_decref)
15229         (make_cleanup_py_xdecref): Don't declare.
15230         * python/py-utils.c (py_decref, make_cleanup_py_decref)
15231         (py_xdecref, make_cleanup_py_xdecref): Remove.
15232
15233 2017-01-10  Tom Tromey  <tom@tromey.com>
15234
15235         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15236         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15237
15238 2017-01-10  Tom Tromey  <tom@tromey.com>
15239
15240         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15241
15242 2017-01-10  Tom Tromey  <tom@tromey.com>
15243
15244         * python/py-utils.c (unicode_to_encoded_string)
15245         (python_string_to_target_string)
15246         (python_string_to_target_python_string)
15247         (python_string_to_host_string, gdbpy_obj_to_string)
15248         (get_addr_from_python): Use gdbpy_ref.
15249
15250 2017-01-10  Tom Tromey  <tom@tromey.com>
15251
15252         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15253         gdbpy_ref.
15254
15255 2017-01-10  Tom Tromey  <tom@tromey.com>
15256
15257         * python/python.c (eval_python_command, gdbpy_decode_line)
15258         (gdbpy_run_events, gdbpy_start_type_printers)
15259         (gdbpy_apply_type_printers): Use gdbpy_ref.
15260
15261 2017-01-10  Tom Tromey  <tom@tromey.com>
15262
15263         * python/py-param.c (get_doc_string, compute_enum_values): Use
15264         gdbpy_ref.
15265
15266 2017-01-10  Tom Tromey  <tom@tromey.com>
15267
15268         * python/py-inferior.c (find_thread_object, build_inferior_list):
15269         Use gdbpy_ref.
15270
15271 2017-01-10  Tom Tromey  <tom@tromey.com>
15272
15273         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15274
15275 2017-01-10  Tom Tromey  <tom@tromey.com>
15276
15277         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15278         gdbpy_ref.
15279
15280 2017-01-10  Tom Tromey  <tom@tromey.com>
15281
15282         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
15283         extra incref.
15284         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15285         Use gdbpy_ref.
15286
15287 2017-01-10  Tom Tromey  <tom@tromey.com>
15288
15289         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15290         gdbpy_ref.
15291
15292 2017-01-10  Tom Tromey  <tom@tromey.com>
15293
15294         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
15295         decref results of PyArg_ParseTupleAndKeywords.
15296
15297 2017-01-10  Tom Tromey  <tom@tromey.com>
15298
15299         * python/python.c (python_run_simple_file): Use
15300         unique_xmalloc_ptr, gdbpy_ref.
15301
15302 2017-01-10  Tom Tromey  <tom@tromey.com>
15303
15304         * python/py-prettyprint.c (print_stack_unless_memory_error)
15305         (print_string_repr, print_children): Use gdbpy_ref.
15306         (dummy_python_frame): New class.
15307         (dummy_python_frame::dummy_python_frame): Rename from
15308         push_dummy_python_frame.
15309         (py_restore_tstate): Remove.
15310
15311 2017-01-10  Tom Tromey  <tom@tromey.com>
15312
15313         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15314
15315 2017-01-10  Tom Tromey  <tom@tromey.com>
15316
15317         * python/python.c (ensure_python_env, restore_python_env):
15318         Remove.
15319         * python/python-internal.h (ensure_python_env): Don't declare.
15320         * varobj.h (varobj_ensure_python_env): Don't declare.
15321         * varobj.c (varobj_ensure_python_env): Remove.
15322
15323 2017-01-10  Tom Tromey  <tom@tromey.com>
15324
15325         * varobj.c (varobj_value_get_print_value): Use
15326         gdbpy_enter_varobj.
15327
15328 2017-01-10  Tom Tromey  <tom@tromey.com>
15329
15330         * python/py-prettyprint.c (print_string_repr, print_children):
15331         Update.
15332         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15333         of "encoding".
15334         * varobj.c (varobj_value_get_print_value): Update.
15335         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15336
15337 2017-01-10  Tom Tromey  <tom@tromey.com>
15338
15339         * varobj.c (varobj_get_display_hint)
15340         (dynamic_varobj_has_child_method, install_new_value_visualizer)
15341         (varobj_set_visualizer, free_variable): Use
15342         gdbpy_enter_varobj.
15343
15344 2017-01-10  Tom Tromey  <tom@tromey.com>
15345
15346         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15347         (do_finish_initialization): New function.  Use gdbpy_ref.
15348         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
15349         do_finish_initialization.
15350
15351 2017-01-10  Tom Tromey  <tom@tromey.com>
15352
15353         * python/py-param.c (get_set_value, get_show_value): Use
15354         gdbpy_enter, gdbpy_ref.
15355
15356 2017-01-10  Tom Tromey  <tom@tromey.com>
15357
15358         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15359
15360 2017-01-10  Tom Tromey  <tom@tromey.com>
15361
15362         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15363
15364 2017-01-10  Tom Tromey  <tom@tromey.com>
15365
15366         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15367         Use gdbpy_enter_varobj.
15368
15369 2017-01-10  Tom Tromey  <tom@tromey.com>
15370
15371         * varobj.c (gdbpy_enter_varobj): New constructor.
15372         * python/python-internal.h (gdbpy_enter_varobj): New class.
15373         * python/py-varobj.c (py_varobj_get_iterator): Use
15374         gdbpy_enter_varobj.
15375
15376 2017-01-10  Tom Tromey  <tom@tromey.com>
15377
15378         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15379         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15380         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15381         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15382         unique_xmalloc_ptr.
15383         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15384
15385 2017-01-10  Tom Tromey  <tom@tromey.com>
15386
15387         * python/py-xmethods.c (invoke_match_method): Use
15388         gdbpy_ref.
15389
15390 2017-01-10  Tom Tromey  <tom@tromey.com>
15391
15392         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15393         gdbpy_enter, gdbpy_ref.
15394
15395 2017-01-10  Tom Tromey  <tom@tromey.com>
15396
15397         * python/python.c (python_interactive_command): Use gdbpy_enter.
15398
15399 2017-01-10  Tom Tromey  <tom@tromey.com>
15400
15401         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15402         gdbpy_ref.
15403
15404 2017-01-10  Tom Tromey  <tom@tromey.com>
15405
15406         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15407         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15408
15409 2017-01-10  Tom Tromey  <tom@tromey.com>
15410
15411         * utils.h (htab_deleter): New struct.
15412         (htab_up): New typedef.
15413         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15414         gdbpy_enter, gdbpy_ref, htab_up.
15415
15416 2017-01-10  Tom Tromey  <tom@tromey.com>
15417
15418         * python/py-unwind.c (pending_frame_invalidate): Remove.
15419         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15420
15421 2017-01-10  Tom Tromey  <tom@tromey.com>
15422
15423         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15424         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15425
15426 2017-01-10  Tom Tromey  <tom@tromey.com>
15427
15428         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15429
15430 2017-01-10  Tom Tromey  <tom@tromey.com>
15431
15432         * python/python.c (gdbpy_eval_from_control_command)
15433         (gdbpy_source_script, gdbpy_run_events)
15434         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15435         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15436         gdbpy_enter.
15437
15438 2017-01-10  Tom Tromey  <tom@tromey.com>
15439
15440         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15441
15442 2017-01-10  Tom Tromey  <tom@tromey.com>
15443
15444         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15445
15446 2017-01-10  Tom Tromey  <tom@tromey.com>
15447
15448         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15449         (python_on_inferior_call_pre, python_on_inferior_call_post)
15450         (python_on_memory_change, python_on_register_change)
15451         (python_inferior_exit, python_new_objfile, add_thread_object)
15452         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15453
15454 2017-01-10  Tom Tromey  <tom@tromey.com>
15455
15456         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15457         (bpfinishpy_handle_exit): Use gdbpy_enter.
15458
15459 2017-01-10  Tom Tromey  <tom@tromey.com>
15460
15461         * python/py-cmd.c (cmdpy_destroyer)
15462         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15463         gdbpy_enter.
15464
15465 2017-01-10  Tom Tromey  <tom@tromey.com>
15466
15467         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15468         gdbpy_enter.
15469         (gdbpy_breakpoint_has_cond): Likewise.
15470
15471 2017-01-10  Tom Tromey  <tom@tromey.com>
15472
15473         * python/python.c (gdbpy_enter): New constructor.
15474         (~gdbpy_enter): New destructor.
15475         (restore_python_env, ensure_python_env): Rewrite.
15476         * python/python-internal.h (gdbpy_enter): New class.
15477
15478 2017-01-10  Tom Tromey  <tom@tromey.com>
15479
15480         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15481
15482 2017-01-10  Tom Tromey  <tom@tromey.com>
15483
15484         * python/py-value.c (value_has_field, get_field_flag)
15485         (get_field_type, valpy_getitem, convert_value_from_python): Use
15486         gdbpy_ref.
15487
15488 2017-01-10  Tom Tromey  <tom@tromey.com>
15489
15490         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15491         gdbpy_ref.
15492
15493 2017-01-10  Tom Tromey  <tom@tromey.com>
15494
15495         * python/py-prettyprint.c (search_pp_list)
15496         (find_pretty_printer_from_objfiles)
15497         (find_pretty_printer_from_progspace)
15498         (find_pretty_printer_from_gdb, find_pretty_printer)
15499         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15500         gdbpy_ref.
15501
15502 2017-01-10  Tom Tromey  <tom@tromey.com>
15503
15504         * python/py-param.c (call_doc_function): Use gdbpy_ref.
15505
15506 2017-01-10  Tom Tromey  <tom@tromey.com>
15507
15508         * python/py-linetable.c (build_line_table_tuple_from_pcs)
15509         (ltpy_get_all_source_lines): Use gdbpy_ref.
15510
15511 2017-01-10  Tom Tromey  <tom@tromey.com>
15512
15513         * python/py-framefilter.c (extract_sym, extract_value)
15514         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15515         gdbpy_ref.
15516
15517 2017-01-10  Tom Tromey  <tom@tromey.com>
15518
15519         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15520
15521 2017-01-10  Tom Tromey  <tom@tromey.com>
15522
15523         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15524
15525 2017-01-10  Tom Tromey  <tom@tromey.com>
15526
15527         * python/py-function.c (convert_values_to_python, fnpy_init): Use
15528         gdbpy_ref.
15529
15530 2017-01-10  Tom Tromey  <tom@tromey.com>
15531
15532         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15533
15534 2017-01-10  Tom Tromey  <tom@tromey.com>
15535
15536         * python/py-type.c (convert_field, make_fielditem, typy_fields)
15537         (typy_range): Use gdbpy_ref.
15538
15539 2017-01-10  Tom Tromey  <tom@tromey.com>
15540
15541         * python/py-threadevent.c (create_thread_event_object): Use
15542         gdbpy_ref.
15543         * python/py-stopevent.c (create_stop_event_object): Simplify.
15544         (emit_stop_event): Use gdbpy_ref.
15545         * python/py-signalevent.c (create_signal_event_object): Use
15546         gdbpy_ref.
15547         * python/py-newobjfileevent.c (create_new_objfile_event_object)
15548         (emit_new_objfile_event, create_clear_objfiles_event_object)
15549         (emit_clear_objfiles_event): Use gdbpy_ref.
15550         * python/py-infevents.c (create_inferior_call_event_object)
15551         (create_register_changed_event_object)
15552         (create_memory_changed_event_object, emit_inferior_call_event)
15553         (emit_memory_changed_event, emit_register_changed_event): Use
15554         gdbpy_ref.
15555         * python/py-exitedevent.c (create_exited_event_object)
15556         (emit_exited_event): Use gdbpy_ref.
15557         * python/py-event.h (evpy_emit_event): Remove
15558         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15559         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15560         * python/py-continueevent.c (emit_continue_event): Use
15561         gdbpy_ref.
15562         * python/py-breakpoint.c (gdbpy_breakpoint_created)
15563         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15564         gdbpy_ref.
15565         * python/py-bpevent.c (create_breakpoint_event_object): Use
15566         gdbpy_ref.
15567
15568 2017-01-10  Tom Tromey  <tom@tromey.com>
15569
15570         * python/py-ref.h: New file.
15571
15572 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15573
15574         * cli-out.c (cli_ui_out::do_redirect): Change return type to
15575         void.
15576         * cli-out.h (cli_ui_out::do_redirect): Likewise.
15577         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15578         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15579         * ui-out.c (ui_out::redirect): Likewise.
15580         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15581         * cli/cli-logging.c (set_logging_redirect): Update call site of
15582         ui_out::redirect.
15583         (handle_redirections): Likewise.
15584         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15585         * top.c (execute_command_to_string): Likewise.
15586         * utils.c (do_ui_out_redirect_pop): Likewise.
15587
15588 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15589
15590         * stack.c (_initialize_stack): Update "frame" command help message.
15591
15592 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
15593
15594         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15595
15596 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15597
15598         * x86-linux-nat.h: Include gdb_proc_service.h.
15599
15600 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15601
15602         * ser-base.h: Include serial.h.
15603
15604 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15605
15606         * ppc-linux-tdep.h: Include ppc-tdep.h.
15607
15608 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15609
15610         * nat/amd64-linux-siginfo.h: Include signal.h.
15611
15612 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15613
15614         * nat/aarch64-linux-hw-point.h: Include break-common.h.
15615
15616 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15617
15618         * mi/mi-parse.h: Include mi-cmds.h.
15619
15620 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15621
15622         * inf-loop.c: Don't include "target.h".
15623         * inf-loop.h: Include it here.
15624
15625 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15626
15627         * dfp.h: Include "dboulest.h" and "expression.h".
15628
15629 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15630
15631         * ax-gdb.h: Include "ax.h".
15632
15633 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15634
15635         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15636         with nat/gdb_ptrace.h.
15637
15638 2017-01-05  Yao Qi  <yao.qi@linaro.org>
15639
15640         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15641         new line.
15642         (mips64_fbsd_sigframe_init): Likewise.
15643
15644 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15645
15646         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15647         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15648
15649 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15650
15651         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15652         * NEWS: Mention new FreeBSD/mips native configuration.
15653         * config/mips/fbsd.mh: New file.
15654         * configure.host: Add mips*-*-freebsd*.
15655         * mips-fbsd-nat.c: New file.
15656
15657 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15658
15659         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15660         (ALLDEPFILES): Add mips-fbsd-tdep.c.
15661         * NEWS: Mention new FreeBSD/mips target.
15662         * configure.tgt: Add mips*-*-freebsd*.
15663         * mips-fbsd-tdep.c: New file.
15664         * mips-fbsd-tdep.h: New file.
15665
15666 2017-01-04  Yao Qi  <yao.qi@linaro.org>
15667
15668         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15669         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15670
15671 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15672
15673         Update copyright year range in all GDB files.
15674
15675 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15676
15677         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15678
15679 For older changes see ChangeLog-2016.
15680 \f
15681 Local Variables:
15682 mode: change-log
15683 left-margin: 8
15684 fill-column: 74
15685 version-control: never
15686 coding: utf-8
15687 End: